diff --git a/Gemfile.lock b/Gemfile.lock index 6f80b6c..05a2287 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -130,6 +130,3 @@ DEPENDENCIES RUBY VERSION ruby 2.3.3p222 - -BUNDLED WITH - 1.17.1 diff --git a/build/v1/rest/fonts/slate.eot b/build/v1/rest/fonts/slate.eot new file mode 100644 index 0000000..13c4839 Binary files /dev/null and b/build/v1/rest/fonts/slate.eot differ diff --git a/build/v1/rest/fonts/slate.svg b/build/v1/rest/fonts/slate.svg new file mode 100644 index 0000000..5f34982 --- /dev/null +++ b/build/v1/rest/fonts/slate.svg @@ -0,0 +1,14 @@ + + + +Generated by IcoMoon + + + + + + + + + + diff --git a/build/v1/rest/fonts/slate.ttf b/build/v1/rest/fonts/slate.ttf new file mode 100644 index 0000000..ace9a46 Binary files /dev/null and b/build/v1/rest/fonts/slate.ttf differ diff --git a/build/v1/rest/fonts/slate.woff b/build/v1/rest/fonts/slate.woff new file mode 100644 index 0000000..1e72e0e Binary files /dev/null and b/build/v1/rest/fonts/slate.woff differ diff --git a/build/v1/rest/fonts/slate.woff2 b/build/v1/rest/fonts/slate.woff2 new file mode 100644 index 0000000..7c585a7 Binary files /dev/null and b/build/v1/rest/fonts/slate.woff2 differ diff --git a/build/v1/rest/images/favicon.ico b/build/v1/rest/images/favicon.ico new file mode 100644 index 0000000..5c63651 Binary files /dev/null and b/build/v1/rest/images/favicon.ico differ diff --git a/build/v1/rest/images/icon_nav.svg b/build/v1/rest/images/icon_nav.svg new file mode 100644 index 0000000..701b268 --- /dev/null +++ b/build/v1/rest/images/icon_nav.svg @@ -0,0 +1,18 @@ + + + + Group 59 Copy 5 + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/v1/rest/images/logo.png b/build/v1/rest/images/logo.png new file mode 100644 index 0000000..413fbaf Binary files /dev/null and b/build/v1/rest/images/logo.png differ diff --git a/build/v1/rest/images/logo.svg b/build/v1/rest/images/logo.svg new file mode 100644 index 0000000..a08a3bd --- /dev/null +++ b/build/v1/rest/images/logo.svg @@ -0,0 +1,28 @@ + + + + Group 54 Copy 2 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/v1/rest/images/navbar.png b/build/v1/rest/images/navbar.png new file mode 100644 index 0000000..df38e90 Binary files /dev/null and b/build/v1/rest/images/navbar.png differ diff --git a/build/v1/rest/index.html b/build/v1/rest/index.html new file mode 100644 index 0000000..35b3bad --- /dev/null +++ b/build/v1/rest/index.html @@ -0,0 +1,3786 @@ + + + + + + + + + API 文档 + + + + + + + + + + Navbar + + +
+
+

Cloud API

+ + +
+ +
+
+
+ shell +
+ + +
+
+
+
+

REST API 简介

+

API实现程序化交易。

+ +

通过API可以实现以下功能:

+ + +

安全认证

+

目前关于apikey申请和修改,请在“账户 - API管理”页面进行相关操作。其中AccessKey为API 访问密钥,SecretKey为用户对请求进行签名的密钥(仅申请时可见)。

+ +

重要提示:这两个密钥与账号安全紧密相关,无论何时都请勿向其它人透露。

+

合法请求结构

+

基于安全考虑,除行情API 外的 API 请求都必须进行签名运算。一个合法的请求由以下几部分组成:

+ + + +

例:

+
https://{HOST}/api/v1/order/orders?
+AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx
+&SignatureMethod=HmacSHA256
+&SignatureVersion=2
+&Timestamp=2017-05-11T15%3A19%3A30
+&order-id=1234567890
+&Signature=calculated value
+

签名运算

+

API 请求在通过 Internet 发送的过程中极有可能被篡改。为了确保请求未被更改,我们会要求用户在每个请求中带上签名(行情 API 除外),来校验参数或参数值在传输途中是否发生了更改。

+

计算签名所需的步骤:

+
    +
  1. 规范要计算签名的请求 +因为使用 HMAC 进行签名计算时,使用不同内容计算得到的结果会完全不同。所以在进行签名计算前,请先对请求进行规范化处理。下面以查询某订单详情请求为例进行说明
  2. +
+
https://{HOST}/api/v1/order/orders?
+AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx
+&SignatureMethod=HmacSHA256
+&SignatureVersion=2
+&Timestamp=2017-05-11T15:19:30
+&order-id=1234567890
+
+
    +
  1. 请求方法(GET 或 POST),后面添加换行符\n。
  2. +
+
GET\n
+
+
    +
  1. 添加小写的访问地址,后面添加换行符\n。
  2. +
+
{host}\n
+
+
    +
  1. 访问方法的路径,后面添加换行符\n。
  2. +
+
/v1/order/orders\n
+
+
    +
  1. 按照ASCII码的顺序对参数名进行排序(使用 UTF-8 编码,且进行了 URI 编码,十六进制字符必须大写,如‘:’会被编码为'%3A',空格被编码为'%20')。 +例如,下面是请求参数的原始顺序,进行过编码后。
  2. +
+
AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx
+order-id=1234567890
+SignatureMethod=HmacSHA256
+SignatureVersion=2
+Timestamp=2017-05-11T15%3A19%3A30
+
+

这些参数会被排序为:

+
AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx
+SignatureMethod=HmacSHA256
+SignatureVersion=2
+Timestamp=2017-05-11T15%3A19%3A30
+order-id=1234567890
+
+
+

按照以上顺序,将各参数使用字符’&’连接。

+
AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order-id=1234567890
+
+

组成最终的要进行签名计算的字符串如下:

+
GET\n
+{host}\n
+/v1/order/orders\n
+AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order-id=1234567890
+
+

计算签名,将以下两个参数传入加密哈希函数: +要进行签名计算的字符串

+
GET\n
+{host}\n
+/v1/order/orders\n
+AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order-id=1234567890
+
+

进行签名的密钥(SecretKey)

+
b0xxxxxx-c6xxxxxx-94xxxxxx-dxxxx
+
+

得到签名计算结果并进行 Base64编码

+
4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=
+
+

将上述值作为参数Signature的取值添加到 API 请求中。 将此参数添加到请求时,必须将该值进行 URI 编码。

+ +

最终,发送到服务器的 API 请求应该为:

+
https://{host}/v1/order/orders?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order-id=1234567890&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D
+

请求说明

+
    +
  1. 访问地址:将文档中的{HOST}替换为服务商的host
  2. +
  3. POST请求头信息中必须声明 Content-Type:application/json;GET请求头信息中必须声明 Content-Type:application/x-www-form-urlencoded。(汉语用户建议设置 Accept-Language:zh-cn)
  4. +
  5. 所有请求参数请按照 API 说明进行参数封装。
  6. +
  7. 将封装好参数的 API 请求通过 POST 或 GET 的方式提交到服务器。
  8. +
  9. 服务端处理请求,并返回相应的 JSON 格式结果。
  10. +
  11. 请使用 https 请求。
  12. +
  13. 限制频率(每个接口,只针对交易api,行情api不限制)为10秒100次。
  14. +
  15. 查询资产详情方法调用顺序:查询当前用户的所有账户->查询指定账户的余额
  16. +
+

API Reference

+ + + +

接口列表

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
接口数据类型请求方法类型描述需要验签子账号可用
市场行情GET /market/history/klineGETK线NY
市场行情GET /market/detail/mergedGET滚动24小时交易和最优报价聚合行情(单个symbol)NY
市场行情GET /market/tickersGET全部symbol的交易行情NY
市场行情GET /market/depthGET市场深度行情(单个symbol)NY
市场行情GET /market/tradeGET单个symbol最新成交记录NY
市场行情GET /market/history/tradeGET单个symbol批量成交记录NY
交易品种信息GET /v1/common/symbolsGET交易品种的计价货币和报价精度NY
交易品种信息GET /v1/common/currencysGET交易币种列表NY
系统信息GET /v1/common/timestampGET查询当前系统时间NY
账户信息GET /v1/account/accountsGET查询用户的所有账户状态YY
账户信息GET /v1/account/accounts/{account-id}/balanceGET查询指定账户余额YY
交易POST/v1/order/orders/placePOST下单YY
交易POST/v1/order/orders/{order-id}/submitcancelPOST按order-id撤销一个订单YY
交易POST /v1/order/orders/batchcancelPOST按order_id, 批量撤销订单(up to 50)YY
交易POST /v1/order/orders/batchCancelOpenOrdersPOST按订单条件批量撤销订单(up to 100)YY
用户订单信息GET /v1/order/orders/{order-id}GET根据order-id查询订单详情YY
用户订单信息GET /v1/order/orders/{order-id}/matchresultsGET根据order-id查询订单的成交明细YY
用户订单信息GET /v1/order/ordersGET查询用户当前委托、或历史委托订单 (up to 100)YY
用户订单信息GET /v1/order/matchresultsGET查询用户当前成交、历史成交YY
用户订单信息GET /v1/order/openOrdersGET查询用户当前未成交订单 (up to 500)YY
充提币POST /v1/dw/withdraw/api/createPOST申请提币YN
充提币POST /v1/dw/withdraw-virtual/{withdraw-id}/cancelPOST撤销提币申请YN
充提币GET /v1/query/deposit-withdrawGET查询充提记录YN
+

市场行情

+

在调用行情接口时,请添加get参数,key为AccessKeyId ,value为网页上申请的apikey的accesskey 。

+ +

例:

+
https://{HOST}/market/history/kline?period=1day&size=200&symbol=btcusdt&AccessKeyId=fff-xxx-ssss-kkk
+
+

GET /market/history/kline 获取K线数据

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, bchbtc, rcneth ...
periodtruestringK线类型1min, 5min, 15min, 30min, 60min, 1day, 1mon, 1week, 1year
sizefalseinteger获取数量150[1,2000]
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
statustruestring请求处理结果"ok" , "error"
tstruenumber响应生成时间点,单位:毫秒
ticktrueobjectKLine 数据
chtruestring数据所属的 channel,格式: market.$symbol.kline.$period
+ +

data 说明:

+
  "data": [
+{
+    "id": K线id,
+    "amount": 成交量,
+    "count": 成交笔数,
+    "open": 开盘价,
+    "close": 收盘价,当K线为最晚的一根时,是最新成交价
+    "low": 最低价,
+    "high": 最高价,
+    "vol": 成交额, 即 sum(每一笔成交价 * 该笔的成交量)
+  }
+]
+
+

请求响应示例:

+
/* GET /market/history/kline?period=1day&size=200&symbol=btcusdt */
+{
+  "status": "ok",
+  "ch": "market.btcusdt.kline.1day",
+  "ts": 1499223904680,
+  "data": [
+{
+    "id": 1499184000,
+    "amount": 37593.0266,
+    "count": 0,
+    "open": 1935.2000,
+    "close": 1879.0000,
+    "low": 1856.0000,
+    "high": 1940.0000,
+    "vol": 71031537.97866500
+  },
+// more data here
+]
+}
+
+/* GET /market/history/kline?period=not-exist&size=200&symbol=ethusdt */
+{
+  "ts": 1490758171271,
+  "status": "error",
+  "err-code": "invalid-parameter",
+  "err-msg": "invalid period"
+}
+
+/* GET /market/history/kline?period=1day&size=not-exist&symbol=ethusdt */
+{
+  "ts": 1490758221221,
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "invalid size, valid range: [1,2000]"
+}
+
+/* GET /market/history/kline?period=1day&size=200&symbol=not-exist */
+{
+  "ts": 1490758171271,
+  "status": "error",
+  "err-code": "invalid-parameter",
+  "err-msg": "invalid symbol"
+}
+

GET /market/detail/merged 获取聚合行情(Ticker)

+

请求参数:

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, bchbtc, rcneth ...
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
statustruestring请求处理结果"ok" , "error"
tstruenumber响应生成时间点,单位:毫秒
ticktrueobjectK线数据
chtruestring数据所属的 channel,格式: market.$symbol.detail.merged
+ +

tick 说明:

+
  "tick": {
+    "id": K线id,
+    "amount": 成交量,
+    "count": 成交笔数,
+    "open": 开盘价,
+    "close": 收盘价,当K线为最晚的一根时,是最新成交价
+    "low": 最低价,
+    "high": 最高价,
+    "vol": 成交额, 即 sum(每一笔成交价 * 该笔的成交量)
+    "bid": [买1价,买1量],
+    "ask": [卖1价,卖1量]
+  }
+
+
+

请求响应示例:

+
/* GET /market/detail/merged?symbol=ethusdt */
+{
+"status":"ok",
+"ch":"market.ethusdt.detail.merged",
+"ts":1499225276950,
+"tick":{
+  "id":1499225271,
+  "ts":1499225271000,
+  "close":1885.0000,
+  "open":1960.0000,
+  "high":1985.0000,
+  "low":1856.0000,
+  "amount":81486.2926,
+  "count":42122,
+  "vol":157052744.85708200,
+  "ask":[1885.0000,21.8804],
+  "bid":[1884.0000,1.6702]
+  }
+}
+
+/* GET /market/detail/merged?symbol=not-exist */
+{
+  "ts": 1490758171271,
+  "status": "error",
+  "err-code": "invalid-parameter",
+  "err-msg": "invalid symbol”
+}
+
+

GET /market/tickers

{  
+    "status":"ok",
+    "ts":1510885463001,
+    "data":[  
+        {  
+            "open":0.044297,      // 日K线 开盘价
+            "close":0.042178,     // 日K线 收盘价
+            "low":0.040110,       // 日K线 最低价
+            "high":0.045255,      // 日K线 最高价
+            "amount":12880.8510,  // 24小时成交量
+            "count":12838,        // 24小时成交笔数
+            "vol":563.0388715740, // 24小时成交额
+            "symbol":"ethbtc"     // 交易对
+        },
+        {  
+            "open":0.008545,
+            "close":0.008656,
+            "low":0.008088,
+            "high":0.009388,
+            "amount":88056.1860,
+            "count":16077,
+            "vol":771.7975953754,
+            "symbol":"ltcbtc"
+        }
+    ]
+}
+
+

注:当交易对尚未产生成交时,返回的数据里面 open close high low amount count vol 的值都为 null

+

GET /market/depth 获取 Market Depth 数据

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typetruestringDepth 类型step0, step1, step2, step3, step4, step5(合并深度0-5);step0时,不合并深度
+ + + +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
statustruestring"ok" 或者 "error"
tstruenumber响应生成时间点,单位:毫秒
ticktrueobjectDepth 数据
chtruestring数据所属的 channel,格式: market.$symbol.depth.$type
+ +

tick 说明:

+
  "tick": {
+    "id": 消息id,
+    "ts": 消息生成时间,单位:毫秒,
+    "bids": 买盘,[price(成交价), amount(成交量)], 按price降序,
+    "asks": 卖盘,[price(成交价), amount(成交量)], 按price升序
+  }
+
+

请求响应示例:

+
/* GET /market/depth?symbol=ethusdt&type=step1 */
+{
+  "status": "ok",
+  "ch": "market.btcusdt.depth.step1",
+  "ts": 1489472598812,
+  "tick": {
+    "id": 1489464585407,
+    "ts": 1489464585407,
+    "bids": [
+      [7964, 0.0678], // [price, amount]
+      [7963, 0.9162],
+      [7961, 0.1],
+      [7960, 12.8898],
+      [7958, 1.2],
+      [7955, 2.1009],
+      [7954, 0.4708],
+      [7953, 0.0564],
+      [7951, 2.8031],
+      [7950, 13.7785],
+      [7949, 0.125],
+      [7948, 4],
+      [7942, 0.4337],
+      [7940, 6.1612],
+      [7936, 0.02],
+      [7935, 1.3575],
+      [7933, 2.002],
+      [7932, 1.3449],
+      [7930, 10.2974],
+      [7929, 3.2226]
+    ],
+    "asks": [
+      [7979, 0.0736],
+      [7980, 1.0292],
+      [7981, 5.5652],
+      [7986, 0.2416],
+      [7990, 1.9970],
+      [7995, 0.88],
+      [7996, 0.0212],
+      [8000, 9.2609],
+      [8002, 0.02],
+      [8008, 1],
+      [8010, 0.8735],
+      [8011, 2.36],
+      [8012, 0.02],
+      [8014, 0.1067],
+      [8015, 12.9118],
+      [8016, 2.5206],
+      [8017, 0.0166],
+      [8018, 1.3218],
+      [8019, 0.01],
+      [8020, 13.6584]
+    ]
+  }
+}
+
+/* GET /market/depth?symbol=ethusdt&type=not-exist */
+{
+  "ts": 1490759358099,
+  "status": "error",
+  "err-code": "invalid-parameter",
+  "err-msg": "invalid type"
+}
+

GET /market/trade 获取 Trade Detail 数据

+

请求参数:

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, bchbtc, rcneth ...
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
statustruestring"ok" 或者 "error"
tstruenumber响应生成时间点,单位:毫秒
ticktrueobjectTrade 数据
chtruestring数据所属的 channel,格式: market.$symbol.trade.detail
+ +

tick 说明:

+
  "tick": {
+    "id": 消息id,
+    "ts": 最新成交时间,
+    "data": [
+      {
+        "id": 成交id,
+        "price": 成交价钱,
+        "amount": 成交量,
+        "direction": 主动成交方向,
+        "ts": 成交时间
+      }
+    ]
+  }
+
+

请求响应例子:

+
/* GET /market/trade?symbol=ethusdt */
+{
+  "status": "ok",
+  "ch": "market.btcusdt.trade.detail",
+  "ts": 1489473346905,
+  "tick": {
+    "id": 600848670,
+    "ts": 1489464451000,
+    "data": [
+      {
+        "id": 600848670,
+        "price": 7962.62,
+        "amount": 0.0122,
+        "direction": "buy",
+        "ts": 1489464451000
+      }
+    ]
+  }
+}
+
+/* GET /market/trade?symbol=not-exist */
+{
+  "ts": 1490759506429,
+  "status": "error",
+  "err-code": "invalid-parameter",
+  "err-msg": "invalid symbol"
+}
+

GET /market/history/trade 批量获取最近的交易记录

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, bchbtc, rcneth ...
sizefalseinteger获取交易记录的数量1[1, 2000]
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
statustruestringok, error
chtruestring数据所属的 channel,格式: market.$symbol.trade.detail
tstrueinteger发送时间
datatrueobject成交记录
+ +

data 说明:

+
  "data": {
+    "id": 消息id,
+    "ts": 最新成交时间,
+    "data": [
+      {
+        "id": 成交id,
+        "price": 成交价,
+        "amount": 成交量,
+        "direction": 主动成交方向,
+        "ts": 成交时间
+      }
+    ]
+  }
+
+

请求响应例子:

+
/* GET /market/history/trade?symbol=ethusdt */
+{
+    "status": "ok",
+    "ch": "market.ethusdt.trade.detail",
+    "ts": 1502448925216,
+    "data": [
+        {
+            "id": 31459998,
+            "ts": 1502448920106,
+            "data": [
+                {
+                    "id": 17592256642623,
+                    "amount": 0.04,
+                    "price": 1997,
+                    "direction": "buy",
+                    "ts": 1502448920106
+                }
+            ]
+        }
+    ]
+}
+

公共API

GET /v1/common/symbols 查询支持的所有交易对及精度

+

请求参数: +(无)

+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
base-currencytruestring基础币种
quote-currencytruestring计价币种
price-precisiontruestring价格精度位数(0为个位)
amount-precisiontruestring数量精度位数(0为个位)
symbol-partitiontruestring交易区main主区,innovation创新区,bifurcation分叉区
+ +

请求响应例子:

+
/* GET /v1/common/symbols */
+{
+  "status": "ok",
+  "data": [
+    {
+      "base-currency": "eth",
+      "quote-currency": "usdt",
+      "symbol": "ethusdt"
+    }
+    {
+      "base-currency": "etc",
+      "quote-currency": "usdt",
+      "symbol": "etcusdt"
+    }
+  ]
+}
+

GET /v1/common/currencys 查询支持的所有币种

+

请求参数:

+ +

(无)

+ +

响应数据:

+
currency list
+
+

请求响应例子:

+
/* GET /v1/common/currencys */
+{
+  "status": "ok",
+  "data": [
+    "usdt",
+    "eth",
+    "etc"
+  ]
+}
+

GET /v1/common/timestamp 查询系统当前时间

+

请求参数:

+ +

(无)

+ +

响应数据:

+
系统时间戳
+
+

请求响应例子

+
/* GET /v1/common/timestamp */
+{
+  "status": "ok",
+  "data": 1494900087029
+}
+

用户资产API

GET /v1/account/accounts

+

请求参数:

+ +

+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
idtruelongaccount-id
statetruestring账户状态working:正常, lock:账户被锁定
typetruestring账户类型spot:现货账户
+ +

请求响应例子:

+
/* GET /v1/account/accounts */
+{
+  "status": "ok",
+  "data": [
+    {
+      "id": 100009,
+      "type": "spot",
+      "state": "working",
+      "user-id": 1000
+    }
+  ]
+}
+

GET /v1/account/accounts/{account-id}/balance 查询指定账户的余额

+

请求参数

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
account-idtruestringaccount-id,填在 path 中,可用 GET /v1/account/accounts 获取
+ + + +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
idtruelong账户 ID
statetruestring账户状态working:正常 lock:账户被锁定
typetruestring账户类型spot:现货账户
listfalseArray子账户数组
+ +

list字段说明

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
balancetruestring余额
currencytruestring币种
typetruestring类型trade: 交易余额,frozen: 冻结余额
+ +

请求响应例子:

+
/* GET /v1/account/accounts/'account-id'/balance */
+{
+  "status": "ok",
+  "data": {
+    "id": 100009,
+    "type": "spot",
+    "state": "working",
+    "list": [
+      {
+        "currency": "usdt",
+        "type": "trade",
+        "balance": "500009195917.4362872650"
+      },
+      {
+        "currency": "usdt",
+        "type": "frozen",
+        "balance": "328048.1199920000"
+      },
+     {
+        "currency": "etc",
+        "type": "trade",
+        "balance": "499999894616.1302471000"
+      },
+      {
+        "currency": "etc",
+        "type": "frozen",
+        "balance": "9786.6783000000"
+      }
+     {
+        "currency": "eth",
+        "type": "trade",
+        "balance": "499999894616.1302471000"
+      },
+      {
+        "currency": "eth",
+        "type": "frozen",
+        "balance": "9786.6783000000"
+      }
+    ],
+    "user-id": 1000
+  }
+}
+

交易API

POST /v1/order/orders/place 下单

请求参数

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
account-idtruestring账户 ID,使用accounts方法获得。币币交易使用‘spot’账户的accountid
amounttruestring限价单表示下单数量,市价买单时表示买多少钱,市价卖单时表示卖多少币
pricefalsestring下单价格,市价单不传该参数
sourcefalsestring订单来源api
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typetruestring订单类型buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖, buy-ioc:IOC买单, sell-ioc:IOC卖单, buy-limit-maker, sell-limit-maker(详细说明见下)
+ +

buy-limit-maker

+ +

当“下单价格”>=“市场最低卖出价”,订单提交后,系统将拒绝接受此订单;

+ +

当“下单价格”<“市场最低卖出价”,提交成功后,此订单将被系统接受。

+ +

sell-limit-maker

+ +

当“下单价格”<=“市场最高买入价”,订单提交后,系统将拒绝接受此订单;

+ +

当“下单价格”>“市场最高买入价”,提交成功后,此订单将被系统接受。

+

响应数据:

+ + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datafalsestring订单ID
+

请求响应例子:

/* POST /v1/order/orders/place */
+{
+   "account-id": "100009",
+   "amount": "10.1",
+   "price": "100.1",
+   "source": "api",
+   "symbol": "ethusdt",
+   "type": "buy-limit"
+}
+{
+  "status": "ok",
+  "data": "59378"
+}
+

GET /v1/order/openOrders 获取所有当前帐号下未成交订单

请求参数:

+

“account-id” 和 “symbol” 需同时指定或者二者都不指定。如果二者都不指定,返回最多500条尚未成交订单,按订单号降序排列。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
account-idtruestring账号ID
symboltruestring交易对单个交易对字符串,缺省将返回所有符合条件尚未成交订单
sidefalsestring主动交易方向“buy”或者“sell”,缺省将返回所有符合条件尚未成交订单
sizefalseint所需返回记录数10[0,500]
+

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
idtruelong订单号
symboltruestring交易对
pricetruestring下单价格
created-attrueint下单时间(毫秒)Unix时间戳
typetruestring订单类型buy-market, sell-market, buy-limit, sell-limit, buy-ioc, sell-ioc
filled-amounttruestring下单时间(毫秒)对于非“部分成交”订单,此字段为 0
filled-cash-amounttruestring已成交部分的订单价格(=已成交单量x下单价格)对于非“部分成交”订单,此字段为 0
filled-feestruestring已成交部分所收取手续费对于非“部分成交”订单,此字段为 0
sourcetruestring订单来源sys, web, api, app
statetruestring此订单状态submitted(已提交), partial-filled(部分成交), cancelling(正在取消)
+

响应示例:

/* GET /v1/orders/openOrders */
+{
+  "status": "ok",
+  "data": [
+    {
+      "id": 5454937,
+      "symbol": "ethusdt",
+      "account-id": 30925,
+      "amount": "1.000000000000000000",
+      "price": "0.453000000000000000",
+      "created-at": 1530604762277,
+      "type": "sell-limit",
+      "filled-amount": "0.0",
+      "filled-cash-amount": "0.0",
+      "filled-fees": "0.0",
+      "source": "web",
+      "state": "submitted"
+    }
+  ]
+}
+

POST /v1/order/orders/{order-id}/submitcancel 申请撤销一个订单请求

+

请求参数:

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
order-idtruestring订单ID,填在path中
+ +

响应数据:

+ + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datatruestring订单 ID
+ +

请求响应例子:

+
/* POST /v1/order/orders/{order-id}/submitcancel */
+{
+  "status": "ok",//注意,返回OK表示撤单请求成功。订单是否撤销成功请调用订单查询接口查询该订单状态
+  "data": "59378"
+}
+

POST /v1/order/orders/batchcancel 批量撤销订单

+

请求参数:

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
order-idstruelist撤销订单ID列表单次不超过50个订单id
+ +

响应数据:

+ + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datafalsemap撤单结果
+ +

请求响应例子:

+
/* POST /v1/order/orders/batchcancel */
+{
+  "order-ids": [
+    "1", "2", "3"
+  ]
+}
+
+
+
{
+  "status": "ok",
+  "data": {
+    "success": [
+      "1",
+      "3"
+    ],
+    "failed": [
+      {
+        "err-msg": "记录无效",
+        "order-id": "2",
+        "err-code": "base-record-invalid"
+      }
+    ]
+  }
+}
+

POST /v1/order/orders/batchCancelOpenOrders 批量取消符合条件的订单

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
account-idtruestring账户ID
symbolfalsestring交易对单个交易对字符串,缺省将返回所有符合条件尚未成交订单
sidefalsestring主动交易方向“buy”或“sell”,缺省将返回所有符合条件尚未成交订单
sizefalseint所需返回记录数100[0,100]
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
success-counttrueint成功取消的订单数
failed-counttrueint取消失败的订单数
next-idtruelong下一个符合取消条件的订单号
+

响应示例:

/* POST /v1/order/orders/batchCancelOpenOrders */
+{
+  "status": "ok",
+  "data": {
+    "success-count": 2,
+    "failed-count": 0,
+    "next-id": 5454600
+  }
+}
+

GET /v1/order/orders/{order-id} 查询某个订单详情

+

请求参数:

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
order-idtruestring订单ID,填在path中
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
account-idtruelong账户 ID
amounttruestring订单数量
canceled-atfalselong订单撤销时间
created-attruelong订单创建时间
field-amounttruestring已成交数量
field-cash-amounttruestring已成交总金额
field-feestruestring已成交手续费(买入为币,卖出为钱)
finished-atfalselong订单变为终结态的时间,不是成交时间,包含“已撤单”状态
idtruelong订单ID
pricetruestring订单价格
sourcetruestring订单来源api
statetruestring订单状态submitting , submitted 已提交, partial-filled 部分成交, partial-canceled 部分成交撤销, filled 完全成交, canceled 已撤销
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typetruestring订单类型buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖, buy-ioc:IOC买单, sell-ioc:IOC卖单
+ +

请求响应例子:

+
/* GET /v1/order/orders/{order-id} */
+{
+  "status": "ok",
+  "data": {
+    "id": 59378,
+    "symbol": "ethusdt",
+    "account-id": 100009,
+    "amount": "10.1000000000",
+    "price": "100.1000000000",
+    "created-at": 1494901162595,
+    "type": "buy-limit",
+    "field-amount": "10.1000000000",
+    "field-cash-amount": "1011.0100000000",
+    "field-fees": "0.0202000000",
+    "finished-at": 1494901400468,
+    "user-id": 1000,
+    "source": "api",
+    "state": "filled",
+    "canceled-at": 0,
+    "exchange": "xxx",
+    "batch": ""
+  }
+}
+

GET /v1/order/orders/{order-id}/matchresults 查询某个订单的成交明细

+

请求参数:

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
order-idtruestring订单ID,填在path中
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
created-attruelong成交时间
filled-amounttruestring成交数量
filled-feestruestring成交手续费
idtruelong订单成交记录ID
match-idtruelong撮合ID
order-idtruelong订单 ID
pricetruestring成交价格
sourcetruestring订单来源api
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typetruestring订单类型buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖, buy-ioc:IOC买单, sell-ioc:IOC卖单
+ +

请求响应例子:

+
/* GET /v1/order/orders/{order-id}/matchresults */
+{
+  "status": "ok",
+  "data": [
+    {
+      "id": 29553,
+      "order-id": 59378,
+      "match-id": 59335,
+      "symbol": "ethusdt",
+      "type": "buy-limit",
+      "source": "api",
+      "price": "100.1000000000",
+      "filled-amount": "9.1155000000",
+      "filled-fees": "0.0182310000",
+      "created-at": 1494901400435
+    }
+  ]
+}
+

GET /v1/order/orders 查询当前委托、历史委托

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typesfalsestring查询的订单类型组合,使用','分割buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖, buy-ioc:IOC买单, sell-ioc:IOC卖单
start-datefalsestring查询开始日期, 日期格式yyyy-mm-dd
end-datefalsestring查询结束日期, 日期格式yyyy-mm-dd
statestruestring查询的订单状态组合,使用','分割submitted 已提交, partial-filled 部分成交, partial-canceled 部分成交撤销, filled 完全成交, canceled 已撤销
fromfalsestring查询起始 ID
directfalsestring查询方向prev 向前,next 向后
sizefalsestring查询记录大小
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
account-idtruelong账户 ID
amounttruestring订单数量
canceled-atfalselong接到撤单申请的时间
created-attruelong订单创建时间
field-amounttruestring已成交数量
field-cash-amounttruestring已成交总金额
field-feestruestring已成交手续费(买入为币,卖出为钱)
finished-atfalselong最后成交时间
idtruelong订单ID
pricetruestring订单价格
sourcetruestring订单来源api
statetruestring订单状态submitting , submitted 已提交, partial-filled 部分成交, partial-canceled 部分成交撤销, filled 完全成交, canceled 已撤销
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typetruestring订单类型submit-cancel:已提交撤单申请 ,buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖, buy-ioc:IOC买单, sell-ioc:IOC卖单
+ +

请求响应例子:

+
/* GET /v1/order/orders */
+{
+  "status": "ok",
+  "data": [
+    {
+      "id": 59378,
+      "symbol": "ethusdt",
+      "account-id": 100009,
+      "amount": "10.1000000000",
+      "price": "100.1000000000",
+      "created-at": 1494901162595,
+      "type": "buy-limit",
+      "field-amount": "10.1000000000",
+      "field-cash-amount": "1011.0100000000",
+      "field-fees": "0.0202000000",
+      "finished-at": 1494901400468,
+      "user-id": 1000,
+      "source": "api",
+      "state": "filled",
+      "canceled-at": 0,
+      "exchange": "xxx",
+      "batch": ""
+    }
+  ]
+}
+

GET /v1/order/matchresults 查询当前成交、历史成交

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typesfalsestring查询的订单类型组合,使用','分割buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖, buy-ioc:IOC买单, sell-ioc:IOC卖单
start-datefalsestring查询开始日期, 日期格式yyyy-mm-dd-61 days[-61day, now]
end-datefalsestring查询结束日期, 日期格式yyyy-mm-ddNow[start-date, now]
fromfalsestring查询起始 ID订单成交记录ID(最大值)
directfalsestring查询方向默认next, 成交记录ID由大到小排序prev 向前,next 向后
sizefalsestring查询记录大小100<=100
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
created-attruelong成交时间
filled-amounttruestring成交数量
filled-feestruestring成交手续费
idtruelong订单成交记录ID
match-idtruelong撮合ID
order-idtruelong订单 ID
pricetruestring成交价格
sourcetruestring订单来源api
symboltruestring交易对btcusdt, bchbtc, rcneth ...
typetruestring订单类型buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖, buy-ioc:IOC买单, sell-ioc:IOC卖单
+ +

请求响应例子:

+
/* GET /v1/orders/matchresults */
+{
+  "status": "ok",
+  "data": [
+    {
+      "id": 29555,
+      "order-id": 59378,
+      "match-id": 59335,
+      "symbol": "ethusdt",
+      "type": "buy-limit",
+      "source": "api",
+      "price": "100.1000000000",
+      "filled-amount": "0.9845000000",
+      "filled-fees": "0.0019690000",
+      "created-at": 1494901400487
+    }
+  ]
+}
+

虚拟币提现API

+
+

仅支持提现到【Pro站提币地址列表中的提币地址】

+
+

POST /v1/dw/withdraw/api/create 申请提现虚拟币

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
addresstruestring提现地址
amounttruestring提币数量
currencytruestring资产类型btc, ltc, bch, eth, etc ...(支持的币种)
feefalsestring转账手续费
addr-tagfalsestring虚拟币共享地址tag,适用于xrp,xem,bts,steem,eos,xmr格式, "123"类的整数字符串
+ +

响应数据:

+ + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datafalselong提现ID
+ +

请求响应例子:

+
/* POST /v1/dw/withdraw/api/create*/
+{
+  "address": "0xde709f2102306220921060314715629080e2fb77",
+  "amount": "0.05",
+  "currency": "eth",
+  "fee": "0.01"
+}
+{
+  "status": "ok",
+  "data": 700
+}
+

POST /v1/dw/withdraw-virtual/{withdraw-id}/cancel 申请取消提现虚拟币

+

请求参数:

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
withdraw-idtruelong提现ID,填在path中
+ +

响应数据:

+ + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datafalselong提现 ID
+ +

请求响应例子:

+
/* POST /v1/dw/withdraw-virtual/{withdraw-id}/cancel */
+{
+  "status": "ok",
+  "data": 700
+}
+

GET /v1/query/deposit-withdraw 查询虚拟币充提记录

+

请求参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
currencytruestring币种
typetruestring'deposit' or 'withdraw'
fromfalsestring查询起始 ID
sizefalsestring查询记录大小
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
idtruelong
typetruelong类型'deposit' 'withdraw'
currencytruestring币种
tx-hashtruestring交易哈希
amounttruelong个数
addresstruestring地址
address-tagtruestring地址标签
feetruelong手续费
statetruestring状态状态参见下表
created-attruelong发起时间
updated-attruelong最后更新时间
+
虚拟币提现状态定义:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
状态描述
submitted已提交
reexamine审核中
canceled已撤销
pass审批通过
reject审批拒绝
pre-transfer处理中
wallet-transfer已汇出
wallet-reject钱包拒绝
confirmed区块已确认
confirm-error区块确认错误
repealed已撤销
+
虚拟币充值状态定义:
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
状态描述
unknown状态未知
confirming确认中
confirmed确认中
safe已完成
orphan待确认
+ +

请求响应例子:

+
/* GET /v1/query/deposit-withdraw?currency=xrp&type=deposit&from=5&size=12 */
+
+{
+
+    "status": "ok",
+    "data": [
+      {
+        "id": 1171,
+        "type": "deposit",
+        "currency": "xrp",
+        "tx-hash": "ed03094b84eafbe4bc16e7ef766ee959885ee5bcb265872baaa9c64e1cf86c2b",
+        "amount": 7.457467,
+        "address": "rae93V8d2mdoUQHwBDBdM4NHCMehRJAsbm",
+        "address-tag": "100040",
+        "fee": 0,
+        "state": "safe",
+        "created-at": 1510912472199,
+        "updated-at": 1511145876575
+      },
+     ...
+    ]
+}
+

借贷交易API (重要:如果使用借贷资产交易,请在下单接口/v1/order/orders/place请求参数source中填写‘margin-api’)

+

目前仅支持 USDT 交易区和 BTC 交易区部分交易对

+

POST /v1/dw/transfer-in/margin 现货账户划入至借贷账户

POST /v1/dw/transfer-out/margin 借贷账户划出至现货账户

+

请求参数

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对
currencytruestring币种
amounttruestring金额
+ +

响应数据:

+ + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datatruelong划转ID
+ +

请求响应例子:

+
/* POST /v1/dw/transfer-in/margin
+{
+  "symbol": "ethusdt",
+  "currency": "eth",
+  "amount": "1.0"
+} */
+{
+  "status": "ok",
+  "data": 1000
+}
+

POST /v1/margin/orders 申请借贷

+

请求参数

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对
currencytruestring币种
amounttruestring金额
+ +

响应数据:

+ + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datatruelong订单号
+ +

请求响应例子:

+
/* POST /v1/margin/orders {
+   "amount": "10.1",
+   "symbol": "ethusdt",
+   "currency": "eth"
+} */
+{
+  "status": "ok",
+  "data": 59378
+}
+

POST /v1/margin/orders/{order-id}/repay 归还借贷

+

请求参数

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
order-idtruelong借贷订单 ID,写在path中
amounttruestring还款量
+ +

响应数据:

+ + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
datatruelong订单号
+ +

请求响应例子:

+
/* POST /v1/margin/orders/59378/repay {
+   "amount": "10.1"
+}*/
+{
+  "status": "ok",
+  "data": 59378
+}
+

GET /v1/margin/loan-orders 借贷订单

+

请求参数

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对
start-datefalsestring查询开始日期, 日期格式yyyy-mm-dd
end-datefalsestring查询结束日期, 日期格式yyyy-mm-dd
statesfalsestring状态
fromfalsestring查询起始 ID
directfalsestring查询方向prev 向前,next 向后
sizefalsestring查询记录大小
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
idtruelong订单号
user-idtruelong用户ID
account-idtruelong账户ID
symboltruestring交易对
currencytruestring币种
loan-amounttruestring借贷本金总额
loan-balancetruestring未还本金
interest-ratetruestring利率
interest-amounttruestring利息总额
interest-balancetruestring未还利息
created-attruelong借贷发起时间
accrued-attruelong最近一次计息时间
statetruestring订单状态created 未放款,accrual 已放款,cleared 已还清,invalid 异常
+ +

请求响应例子:

+
/* GET /v1/margin/loan-orders?symbol=btcusdt
+
+*/
+{
+  "status": "ok",
+  "data": [
+    {
+      "loan-balance": "0.100000000000000000",
+      "interest-balance": "0.000200000000000000",
+      "interest-rate": "0.002000000000000000",
+      "loan-amount": "0.100000000000000000",
+      "accrued-at": 1511169724531,
+      "interest-amount": "0.000200000000000000",
+      "symbol": "ethbtc",
+      "currency": "btc",
+      "id": 394,
+      "state": "accrual",
+      "account-id": 17747,
+      "user-id": 119913,
+      "created-at": 1511169724531
+    }
+  ]
+}
+
+

GET /v1/margin/accounts/balance 借贷账户详情

+

请求参数

+ + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symbolfalsestring交易对,作为get参数
+ +

响应数据:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须数据类型描述取值范围
symboltruestring交易对
statetruestring账户状态working,fl-sys,fl-mgt,fl-end
risk-ratetrueobject风险率
fl-pricetruestring爆仓价
listtruearray子账户列表
+ +

请求响应例子:

+
/* GET /v1/margin/accounts/balance?symbol=btcusdt
+
+*/
+{
+    "status": "ok",
+    "data": [
+        {
+            "id": 18264,
+            "type": "margin",
+            "state": "working",
+            "symbol": "btcusdt",
+            "fl-price": "0",
+            "fl-type": "safe",
+            "risk-rate": "475.952571086994250554",
+            "list": [
+                {
+                    "currency": "btc",
+                    "type": "trade",
+                    "balance": "1168.533000000000000000"
+                },
+                {
+                    "currency": "btc",
+                    "type": "frozen",
+                    "balance": "0.000000000000000000"
+                },
+                {
+                    "currency": "btc",
+                    "type": "loan",
+                    "balance": "-2.433000000000000000"
+                },
+                {
+                    "currency": "btc",
+                    "type": "interest",
+                    "balance": "-0.000533000000000000"
+                },
+                {
+                    "currency": "usdt",
+                    "type": "trade",//借贷账户可用
+                    "balance": "1313.534000000000000000"
+                },
+                {
+                    "currency": "usdt",
+                    "type": "frozen",//借贷账户冻结
+                    "balance": "0.000000000000000000"
+                },
+                {
+                    "currency": "usdt",
+                    "type": "loan",//已借贷
+                    "balance": "-140.234099999999999920"
+                },
+                {
+                    "currency": "usdt",
+                    "type": "interest",//usdt待还利息
+                    "balance": "-0.931206660000000000"
+                },
+                {
+                    "currency": "btc",
+                    "type": "transfer-out-available",//可转btc
+                    "balance": "1163.872174670000000000"
+                },
+                { "currency": "usdt",
+                    "type": "transfer-out-available",//可转usdt
+                    "balance": "1313.534000000000000000"
+                },
+                {
+                    "currency": "btc",
+                    "type": "loan-available",//可借btc
+                    "balance": "8161.876538350676000000"
+                },
+                {
+                    "currency": "usdt",
+                    "type": "loan-available",//可借usdt
+                    "balance": "49859.765900000000000080"
+                }
+            ]
+        }
+    ]
+}
+
+

错误码

行情 API 错误码

+ + + + + + + + + + + + + + + + + + +
错误码描述
bad-request错误请求
invalid-parameter参数错
invalid-command指令错
+ +

code 的具体解释, 参考对应的 err-msg.

+

交易 API 错误码

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
错误码描述
base-symbol-error交易对不存在
base-currency-error币种不存在
base-date-error错误的日期格式
account-transfer-balance-insufficient-error余额不足无法冻结
bad-argument无效参数
api-signature-not-validAPI签名错误
gateway-internal-error系统繁忙,请稍后再试
security-require-assets-password需要输入资金密码
audit-failed下单失败
ad-ethereum-addresss请输入有效的以太坊地址
order-accountbalance-error账户余额不足
order-limitorder-price-error限价单下单价格超出限制
order-limitorder-amount-error限价单下单数量超出限制
order-orderprice-precision-error下单价格超出精度限制
order-orderamount-precision-error下单数量超过精度限制
order-marketorder-amount-error下单数量超出限制
order-queryorder-invalid查询不到此条订单
order-orderstate-error订单状态错误
order-datelimit-error查询超出时间限制
order-update-error订单更新出错
+ +


+
+
+
+

+ +
+
+
+ shell +
+
+
+ + + diff --git a/build/v1/rest/javascripts/all.js b/build/v1/rest/javascripts/all.js new file mode 100644 index 0000000..05af78b --- /dev/null +++ b/build/v1/rest/javascripts/all.js @@ -0,0 +1,131 @@ +!function(){if("ontouchstart"in window){var e,t,n,r,i,o,s={};e=function(e,t){return Math.abs(e[0]-t[0])>5||Math.abs(e[1]-t[1])>5},t=function(e){this.startXY=[e.touches[0].clientX,e.touches[0].clientY],this.threshold=!1},n=function(t){return!this.threshold&&void(this.threshold=e(this.startXY,[t.touches[0].clientX,t.touches[0].clientY]))},r=function(t){if(!this.threshold&&!e(this.startXY,[t.changedTouches[0].clientX,t.changedTouches[0].clientY])){var n=t.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),r.simulated=!0,t.target.dispatchEvent(r)}},i=function(e){var t=Date.now(),n=t-s.time,r=e.clientX,i=e.clientY,a=[Math.abs(s.x-r),Math.abs(s.y-i)],u=o(e.target,"A")||e.target,c=u.nodeName,l="A"===c,f=window.navigator.standalone&&l&&e.target.getAttribute("href");return s.time=t,s.x=r,s.y=i,!((!e.simulated&&(n<500||n<1500&&a[0]<50&&a[1]<50)||f)&&(e.preventDefault(),e.stopPropagation(),!f))&&(f&&(window.location=u.getAttribute("href")),void(u&&u.classList&&(u.classList.add("energize-focus"),window.setTimeout(function(){u.classList.remove("energize-focus")},150))))},o=function(e,t){for(var n=e;n!==document.body;){if(!n||n.nodeName===t)return n;n=n.parentNode}return null},document.addEventListener("touchstart",t,!1),document.addEventListener("touchmove",n,!1),document.addEventListener("touchend",r,!1),document.addEventListener("click",i,!0)}}(),/*! + * jQuery JavaScript Library v3.2.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2017-03-20T18:59Z + */ +function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=ge.type(e);return"function"!==n&&!ge.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return ge.isFunction(t)?ge.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?ge.grep(e,function(e){return e===t!==n}):"string"!=typeof t?ge.grep(e,function(e){return ae.call(t,e)>-1!==n}):Ce.test(t)?ge.filter(t,e,n):(t=ge.filter(t,e),ge.grep(e,function(e){return ae.call(t,e)>-1!==n&&1===e.nodeType}))}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t={};return ge.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function u(e){return e}function c(e){throw e}function l(e,t,n,r){var i;try{e&&ge.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&ge.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){ne.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),ge.ready()}function d(){this.expando=ge.expando+d.uid++}function p(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ie.test(e)?JSON.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Re,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=p(n)}catch(e){}He.set(e,t,n)}else n=void 0;return n}function g(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return ge.css(e,t,"")},u=a(),c=n&&n[3]||(ge.cssNumber[t]?"":"px"),l=(ge.cssNumber[t]||"px"!==c&&+u)&&Me.exec(ge.css(e,t));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do o=o||".5",l/=o,ge.style(e,t,l+c);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}function v(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ve[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=ge.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ve[r]=i,i)}function m(e,t){for(var n,r,i=[],o=0,s=e.length;o-1)i&&i.push(o);else if(c=ge.contains(o.ownerDocument,o),s=y(f.appendChild(o),"script"),c&&x(s),n)for(l=0;o=s[l++];)Qe.test(o.type||"")&&n.push(o);return f}function w(){return!0}function T(){return!1}function S(){try{return ne.activeElement}catch(e){}}function E(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)E(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=T;else if(!i)return e;return 1===o&&(s=i,i=function(e){return ge().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=ge.guid++)),e.each(function(){ge.event.add(this,t,i,r,n)})}function C(e,t){return i(e,"table")&&i(11!==t.nodeType?t:t.firstChild,"tr")?ge(">tbody",e)[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function N(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function j(e,t){var n,r,i,o,s,a,u,c;if(1===t.nodeType){if(Pe.hasData(e)&&(o=Pe.access(e),s=Pe.set(t,o),c=o.events)){delete s.handle,s.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!pe.checkClone&&rt.test(h))return e.each(function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),L(o,t,r,i)});if(d&&(o=b(t,e[0].ownerDocument,!1,e,i),s=o.firstChild,1===o.childNodes.length&&(o=s),s||i)){for(a=ge.map(y(o,"script"),k),u=a.length;f=0&&nS.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[_]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)S.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function v(e,n,r){for(var i=0,o=n.length;i-1&&(r[c]=!(s[c]=f))}}else x=m(x===s?x.splice(h,x.length):x),o?o(null,s,x,u):K.apply(s,x)})}function x(e){for(var t,n,r,i=e.length,o=S.relative[e[0].type],s=o||S.relative[" "],a=o?1:0,u=h(function(e){return e===t},s,!0),c=h(function(e){return ee(t,e)>-1},s,!0),l=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,i}];a1&&g(l),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,o=e.length>0,s=function(r,s,a,u,c){var l,f,d,p=0,h="0",g=r&&[],v=[],y=A,x=r||o&&S.find.TAG("*",c),b=W+=null==y?1:Math.random()||.1,w=x.length;for(c&&(A=s===q||s||c);h!==w&&null!=(l=x[h]);h++){if(o&&l){for(f=0,s||l.ownerDocument===q||(O(l),a=!$);d=e[f++];)if(d(l,s||q,a)){u.push(l);break}c&&(W=b)}i&&((l=!d&&l)&&p--,r&&g.push(l))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,v,s,a);if(r){if(p>0)for(;h--;)g[h]||v[h]||(v[h]=J.call(u));v=m(v)}K.apply(u,v),c&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return c&&(W=b,A=y),g};return i?r(s):s}var w,T,S,E,C,k,N,j,A,L,D,O,q,F,$,P,H,I,R,_="sizzle"+1*new Date,M=e.document,W=0,B=0,z=n(),V=n(),X=n(),U=function(e,t){return e===t&&(D=!0),0},Q={}.hasOwnProperty,Y=[],J=Y.pop,G=Y.push,K=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Se=function(){O()},Ee=h(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{K.apply(Y=Z.call(M.childNodes),M.childNodes),Y[M.childNodes.length].nodeType}catch(e){K={apply:Y.length?function(e,t){G.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}T=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==q&&9===r.nodeType&&r.documentElement?(q=r,F=q.documentElement,$=!C(q),M!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Se,!1):n.attachEvent&&n.attachEvent("onunload",Se)),T.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=i(function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=ve.test(q.getElementsByClassName),T.getById=i(function(e){return F.appendChild(e).id=_,!q.getElementsByName||!q.getElementsByName(_).length}),T.getById?(S.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&$){var n=t.getElementById(e);return n?[n]:[]}}):(S.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&$){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),S.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},S.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&$)return t.getElementsByClassName(e)},H=[],P=[],(T.qsa=ve.test(q.querySelectorAll))&&(i(function(e){F.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+_+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||P.push(".#.+[+~]")}),i(function(e){e.innerHTML="";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&P.push(":enabled",":disabled"),F.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(T.matchesSelector=ve.test(I=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.oMatchesSelector||F.msMatchesSelector))&&i(function(e){T.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),H.push("!=",oe)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),t=ve.test(F.compareDocumentPosition),R=t||ve.test(F.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===M&&R(M,e)?-1:t===q||t.ownerDocument===M&&R(M,t)?1:L?ee(L,e)-ee(L,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:L?ee(L,e)-ee(L,t):0;if(i===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===M?-1:u[r]===M?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&O(e),n=n.replace(le,"='$1']"),T.matchesSelector&&$&&!X[n+" "]&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var r=I.call(e,n);if(r||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&O(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&O(e);var n=S.attrHandle[t.toLowerCase()],r=n&&Q.call(S.attrHandle,t.toLowerCase())?n(e,t,!$):void 0;return void 0!==r?r:T.attributes||!$?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!T.detectDuplicates,L=!T.sortStable&&e.slice(0),e.sort(U),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return L=null,e},E=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},S=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,p,h,g=o!==s?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?v.firstChild:v.lastChild],s&&y){for(d=v,f=d[_]||(d[_]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===W&&c[1],x=p&&c[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){l[e]=[W,p,x];break}}else if(y&&(d=t,f=d[_]||(d[_]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===W&&c[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(y&&(f=d[_]||(d[_]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),l[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=S.pseudos[e]||S.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[_]?o(n):o.length>1?(i=[e,e,"",n],S.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=ee(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=N(e.replace(ae,"$1"));return i[_]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do if(n=$?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===F},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=o[0]).type&&9===t.nodeType&&$&&S.relative[o[1].type]){if(t=(S.find.ID(s.matches[0].replace(xe,be),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(s=o[i],!S.relative[a=s.type]);)if((u=S.find[a])&&(r=u(s.matches[0].replace(xe,be),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return K.apply(n,r),n;break}}return(c||N(e,l))(r,t,!$,n,!t||ye.test(e)&&f(t.parentNode)||t),n},T.sortStable=_.split("").sort(U).join("")===_,T.detectDuplicates=!!D,O(),T.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);ge.find=be,ge.expr=be.selectors,ge.expr[":"]=ge.expr.pseudos,ge.uniqueSort=ge.unique=be.uniqueSort,ge.text=be.getText,ge.isXMLDoc=be.isXML,ge.contains=be.contains,ge.escapeSelector=be.escape;var we=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ge(e).is(n))break;r.push(e)}return r},Te=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Se=ge.expr.match.needsContext,Ee=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ce=/^.[^:#\[\.,]*$/;ge.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ge.find.matchesSelector(r,e)?[r]:[]:ge.find.matches(e,ge.grep(t,function(e){return 1===e.nodeType}))},ge.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ge(e).filter(function(){for(t=0;t1?ge.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Se.test(e)?ge(e):e||[],!1).length}});var ke,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,je=ge.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ge?t[0]:t,ge.merge(this,ge.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),Ee.test(r[1])&&ge.isPlainObject(t))for(r in t)ge.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=ne.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ge.isFunction(e)?void 0!==n.ready?n.ready(e):e(ge):ge.makeArray(e,this)};je.prototype=ge.fn,ke=ge(ne);var Ae=/^(?:parents|prev(?:Until|All))/,Le={children:!0,contents:!0,next:!0,prev:!0};ge.fn.extend({has:function(e){var t=ge(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ge.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ge.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?ae.call(ge(e),this[0]):ae.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ge.uniqueSort(ge.merge(this.get(),ge(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ge.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,n){return we(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,n){return we(e,"nextSibling",n)},prevUntil:function(e,t,n){return we(e,"previousSibling",n)},siblings:function(e){return Te((e.parentNode||{}).firstChild,e)},children:function(e){return Te(e.firstChild)},contents:function(e){return i(e,"iframe")?e.contentDocument:(i(e,"template")&&(e=e.content||e),ge.merge([],e.childNodes))}},function(e,t){ge.fn[e]=function(n,r){var i=ge.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ge.filter(r,i)),this.length>1&&(Le[e]||ge.uniqueSort(i),Ae.test(e)&&i.reverse()),this.pushStack(i)}});var De=/[^\x20\t\r\n\f]+/g;ge.Callbacks=function(e){e="string"==typeof e?a(e):ge.extend({},e);var t,n,r,i,o=[],s=[],u=-1,c=function(){for(i=i||e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?ge.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},ge.extend({Deferred:function(t){var n=[["notify","progress",ge.Callbacks("memory"),ge.Callbacks("memory"),2],["resolve","done",ge.Callbacks("once memory"),ge.Callbacks("once memory"),0,"resolved"],["reject","fail",ge.Callbacks("once memory"),ge.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return ge.Deferred(function(t){ge.each(n,function(n,r){var i=ge.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&ge.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var a=this,l=arguments,f=function(){var e,f;if(!(t=s&&(r!==c&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?d():(ge.Deferred.getStackHook&&(d.stackTrace=ge.Deferred.getStackHook()),e.setTimeout(d))}}var s=0;return ge.Deferred(function(e){n[0][3].add(o(0,e,ge.isFunction(i)?i:u,e.notifyWith)),n[1][3].add(o(0,e,ge.isFunction(t)?t:u)),n[2][3].add(o(0,e,ge.isFunction(r)?r:c))}).promise()},promise:function(e){return null!=e?ge.extend(e,i):i}},o={};return ge.each(n,function(e,t){var s=t[2],a=t[5];i[t[1]]=s.add,a&&s.add(function(){r=a},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=ie.call(arguments),o=ge.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?ie.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(l(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||ge.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)l(i[n],s(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ge.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Oe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},ge.readyException=function(t){e.setTimeout(function(){throw t})};var qe=ge.Deferred();ge.fn.ready=function(e){return qe.then(e)["catch"](function(e){ge.readyException(e)}),this},ge.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--ge.readyWait:ge.isReady)||(ge.isReady=!0,e!==!0&&--ge.readyWait>0||qe.resolveWith(ne,[ge]))}}),ge.ready.then=qe.then,"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(ge.ready):(ne.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f));var Fe=function(e,t,n,r,i,o,s){var a=0,u=e.length,c=null==n;if("object"===ge.type(n)){i=!0;for(a in n)Fe(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,ge.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(ge(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){He.remove(this,e)})}}),ge.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Pe.get(e,t),n&&(!r||Array.isArray(n)?r=Pe.access(e,t,ge.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ge.queue(e,t),r=n.length,i=n.shift(),o=ge._queueHooks(e,t),s=function(){ge.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Pe.get(e,n)||Pe.access(e,n,{empty:ge.Callbacks("once memory").add(function(){Pe.remove(e,[t+"queue",n])})})}}),ge.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Qe=/^$|\/(?:java|ecma)script/i,Ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td;var Je=/<|&#?\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement("div")),n=ne.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ge=ne.documentElement,Ke=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;ge.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=Pe.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&ge.find.matchesSelector(Ge,i),n.guid||(n.guid=ge.guid++),(u=v.events)||(u=v.events={}), +(s=v.handle)||(s=v.handle=function(t){return"undefined"!=typeof ge&&ge.event.triggered!==t.type?ge.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(De)||[""],c=t.length;c--;)a=et.exec(t[c])||[],p=g=a[1],h=(a[2]||"").split(".").sort(),p&&(f=ge.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=ge.event.special[p]||{},l=ge.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ge.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(p,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),ge.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=Pe.hasData(e)&&Pe.get(e);if(v&&(u=v.events)){for(t=(t||"").match(De)||[""],c=t.length;c--;)if(a=et.exec(t[c])||[],p=g=a[1],h=(a[2]||"").split(".").sort(),p){for(f=ge.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)l=d[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));s&&!d.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||ge.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)ge.event.remove(e,p+t[c],n,r,!0);ge.isEmptyObject(u)&&Pe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=ge.event.fix(e),u=new Array(arguments.length),c=(Pe.get(this,"events")||{})[a.type]||[],l=ge.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(o=[],s={},n=0;n-1:ge.find(i,this,null,[c]).length),s[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,nt=/\s*$/g;ge.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=ge.contains(e.ownerDocument,e);if(!(pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ge.isXMLDoc(e)))for(s=y(a),o=y(e),r=0,i=o.length;r0&&x(s,!u&&y(e,"script")),a},cleanData:function(e){for(var t,n,r,i=ge.event.special,o=0;void 0!==(n=e[o]);o++)if($e(n)){if(t=n[Pe.expando]){if(t.events)for(r in t.events)i[r]?ge.event.remove(n,r):ge.removeEvent(n,r,t.handle);n[Pe.expando]=void 0}n[He.expando]&&(n[He.expando]=void 0)}}}),ge.fn.extend({detach:function(e){return D(this,e,!0)},remove:function(e){return D(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?ge.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.appendChild(e)}})},prepend:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ge.cleanData(y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ge.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!nt.test(e)&&!Ye[(Ue.exec(e)||["",""])[1].toLowerCase()]){e=ge.htmlPrefilter(e);try{for(;n1)}}),ge.Tween=R,R.prototype={constructor:R,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ge.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ge.cssNumber[n]?"":"px")},cur:function(){var e=R.propHooks[this.prop];return e&&e.get?e.get(this):R.propHooks._default.get(this)},run:function(e){var t,n=R.propHooks[this.prop];return this.options.duration?this.pos=t=ge.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ge.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ge.fx.step[e.prop]?ge.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ge.cssProps[e.prop]]&&!ge.cssHooks[e.prop]?e.elem[e.prop]=e.now:ge.style(e.elem,e.prop,e.now+e.unit)}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ge.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ge.fx=R.prototype.init,ge.fx.step={};var gt,vt,mt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;ge.Animation=ge.extend(X,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return g(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){ge.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){ge.removeAttr(this,e)})}}),ge.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ge.prop(e,t,n):(1===o&&ge.isXMLDoc(e)||(i=ge.attrHooks[t.toLowerCase()]||(ge.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void ge.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ge.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&i(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(De);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return t===!1?ge.removeAttr(e,n):e.setAttribute(n,n),n}},ge.each(ge.expr.match.bool.source.match(/\w+/g),function(e,t){var n=bt[t]||ge.find.attr;bt[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=bt[s],bt[s]=i,i=null!=n(e,t,r)?s:null,bt[s]=o),i}});var wt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;ge.fn.extend({prop:function(e,t){return Fe(this,ge.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ge.propFix[e]||e]})}}),ge.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ge.isXMLDoc(e)||(t=ge.propFix[t]||t,i=ge.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ge.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),pe.optSelected||(ge.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ge.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ge.propFix[this.toLowerCase()]=this}),ge.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(ge.isFunction(e))return this.each(function(t){ge(this).addClass(e.call(this,t,Q(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&" "+U(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a=U(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(ge.isFunction(e))return this.each(function(t){ge(this).removeClass(e.call(this,t,Q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&" "+U(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a=U(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ge.isFunction(e)?this.each(function(n){ge(this).toggleClass(e.call(this,n,Q(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=ge(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Q(this),t&&Pe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Pe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+U(Q(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;ge.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ge.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ge(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=ge.map(i,function(e){return null==e?"":e+""})),t=ge.valHooks[this.type]||ge.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ge.valHooks[i.type]||ge.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),ge.extend({valHooks:{option:{get:function(e){var t=ge.find.attr(e,"value");return null!=t?t:U(ge.text(e))}},select:{get:function(e){var t,n,r,o=e.options,s=e.selectedIndex,a="select-one"===e.type,u=a?null:[],c=a?s+1:o.length;for(r=s<0?c:a?s:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ge.each(["radio","checkbox"],function(){ge.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=ge.inArray(ge(e).val(),t)>-1}},pe.checkOn||(ge.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=/^(?:focusinfocus|focusoutblur)$/;ge.extend(ge.event,{trigger:function(t,n,r,i){var o,s,a,u,c,l,f,d=[r||ne],p=le.call(t,"type")?t.type:t,h=le.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||ne,3!==r.nodeType&&8!==r.nodeType&&!Et.test(p+ge.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[ge.expando]?t:new ge.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:ge.makeArray(n,[t]),f=ge.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!ge.isWindow(r)){for(u=f.delegateType||p,Et.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(r.ownerDocument||ne)&&d.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=d[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||p,l=(Pe.get(s,"events")||{})[t.type]&&Pe.get(s,"handle"),l&&l.apply(s,n),l=c&&s[c],l&&l.apply&&$e(s)&&(t.result=l.apply(s,n),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!$e(r)||c&&ge.isFunction(r[p])&&!ge.isWindow(r)&&(a=r[c],a&&(r[c]=null),ge.event.triggered=p,r[p](),ge.event.triggered=void 0,a&&(r[c]=a)),t.result}},simulate:function(e,t,n){var r=ge.extend(new ge.Event,n,{type:e,isSimulated:!0});ge.event.trigger(r,null,t)}}),ge.fn.extend({trigger:function(e,t){return this.each(function(){ge.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ge.event.trigger(e,t,n,!0)}}),ge.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){ge.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ge.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin="onfocusin"in e,pe.focusin||ge.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ge.event.simulate(t,e.target,ge.event.fix(e))};ge.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Pe.access(r,t);i||r.addEventListener(e,n,!0),Pe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Pe.access(r,t)-1;i?Pe.access(r,t,i):(r.removeEventListener(e,n,!0),Pe.remove(r,t))}}});var Ct=e.location,kt=ge.now(),Nt=/\?/;ge.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||ge.error("Invalid XML: "+t),n};var jt=/\[\]$/,At=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;ge.param=function(e,t){var n,r=[],i=function(e,t){var n=ge.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!ge.isPlainObject(e))ge.each(e,function(){i(this.name,this.value)});else for(n in e)Y(n,e[n],t,i);return r.join("&")},ge.fn.extend({serialize:function(){return ge.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ge.prop(this,"elements");return e?ge.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ge(this).is(":disabled")&&Dt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Xe.test(e))}).map(function(e,t){var n=ge(this).val();return null==n?null:Array.isArray(n)?ge.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}});var Ot=/%20/g,qt=/#.*$/,Ft=/([?&])_=[^&]*/,$t=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ht=/^(?:GET|HEAD)$/,It=/^\/\//,Rt={},_t={},Mt="*/".concat("*"),Wt=ne.createElement("a");Wt.href=Ct.href,ge.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ge.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?K(K(e,ge.ajaxSettings),t):K(ge.ajaxSettings,e)},ajaxPrefilter:J(Rt),ajaxTransport:J(_t),ajax:function(t,n){function r(t,n,r,a){var c,d,p,b,w,T=n;l||(l=!0,u&&e.clearTimeout(u),i=void 0,s=a||"",S.readyState=t>0?4:0,c=t>=200&&t<300||304===t,r&&(b=Z(h,S,r)),b=ee(h,b,S,c),c?(h.ifModified&&(w=S.getResponseHeader("Last-Modified"),w&&(ge.lastModified[o]=w),w=S.getResponseHeader("etag"),w&&(ge.etag[o]=w)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=b.state,d=b.data,p=b.error,c=!p)):(p=T,!t&&T||(T="error",t<0&&(t=0))),S.status=t,S.statusText=(n||T)+"",c?m.resolveWith(g,[d,T,S]):m.rejectWith(g,[S,T,p]),S.statusCode(x),x=void 0,f&&v.trigger(c?"ajaxSuccess":"ajaxError",[S,h,c?d:p]),y.fireWith(g,[S,T]),f&&(v.trigger("ajaxComplete",[S,h]),--ge.active||ge.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,s,a,u,c,l,f,d,p,h=ge.ajaxSetup({},n),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?ge(g):ge.event,m=ge.Deferred(),y=ge.Callbacks("once memory"),x=h.statusCode||{},b={},w={},T="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=$t.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?s:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(m.promise(S),h.url=((t||h.url||Ct.href)+"").replace(It,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(De)||[""],null==h.crossDomain){c=ne.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Wt.protocol+"//"+Wt.host!=c.protocol+"//"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ge.param(h.data,h.traditional)),G(Rt,h,n,S),l)return S;f=ge.event&&h.global,f&&0===ge.active++&&ge.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ht.test(h.type),o=h.url.replace(qt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ot,"+")):(p=h.url.slice(o.length),h.data&&(o+=(Nt.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(o=o.replace(Ft,"$1"),p=(Nt.test(o)?"&":"?")+"_="+kt++ +p),h.url=o+p),h.ifModified&&(ge.lastModified[o]&&S.setRequestHeader("If-Modified-Since",ge.lastModified[o]),ge.etag[o]&&S.setRequestHeader("If-None-Match",ge.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Mt+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(h.beforeSend.call(g,S,h)===!1||l))return S.abort();if(T="abort",y.add(h.complete),S.done(h.success),S.fail(h.error),i=G(_t,h,n,S)){if(S.readyState=1,f&&v.trigger("ajaxSend",[S,h]),l)return S;h.async&&h.timeout>0&&(u=e.setTimeout(function(){S.abort("timeout")},h.timeout));try{l=!1,i.send(b,r)}catch(e){if(l)throw e;r(-1,e)}}else r(-1,"No Transport");return S},getJSON:function(e,t,n){return ge.get(e,t,n,"json")},getScript:function(e,t){return ge.get(e,void 0,t,"script")}}),ge.each(["get","post"],function(e,t){ge[t]=function(e,n,r,i){return ge.isFunction(n)&&(i=i||r,r=n,n=void 0),ge.ajax(ge.extend({url:e,type:t,dataType:i,data:n,success:r},ge.isPlainObject(e)&&e))}}),ge._evalUrl=function(e){return ge.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},ge.fn.extend({wrapAll:function(e){var t;return this[0]&&(ge.isFunction(e)&&(e=e.call(this[0])),t=ge(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ge.isFunction(e)?this.each(function(t){ge(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ge(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ge.isFunction(e);return this.each(function(n){ge(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ge(this).replaceWith(this.childNodes)}),this}}),ge.expr.pseudos.hidden=function(e){return!ge.expr.pseudos.visible(e)},ge.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ge.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},zt=ge.ajaxSettings.xhr();pe.cors=!!zt&&"withCredentials"in zt,pe.ajax=zt=!!zt,ge.ajaxTransport(function(t){var n,r;if(pe.cors||zt&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)a.setRequestHeader(s,i[s]);n=function(e){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Bt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),ge.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ge.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){ +return ge.globalEval(e),e}}}),ge.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ge.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=ge(" + + + + + + Navbar + + +
+
+

Cloud API

+ + +
+ +
+ +
+
+
+

WebSocket API简介

+

WebSocket协议是基于TCP的一种新的网络协议。它实现了客户端与服务器之间在单个 tcp 连接上的全双工通信,由服务器主动发送信息给客户端,减少了频繁的身份验证等不必要的开销。其最大优点有两个:

+ +
    +
  • 两方请求的 header 数据很小,大概只有2 Bytes。

  • +
  • 服务器不再是被动的接到客户端的请求后才返回数据,而是有了新数据后主动推送给客户端。

  • +
+ +

以上 WebSocket 协议带来的优点使得其十分适用于数字货币行情和交易这种实时性强的接口。

+

请求与订阅说明

1. 访问地址

+
    +
  • 行情请求地址为:wss://{HOST}/ws
  • +
  • HOST常用的格式说明:
  • +
+ +

需要验签的接口:www.xxxx.com

+ +

不需要验签的接口:www.xxxx.com/api

+ + +

2. 数据压缩

+

WebSocket API 返回的所有数据都进行了 GZIP 压缩,需要 client 在收到数据之后解压,推荐使用pako。(【pako】 是一个支持压缩和解压 GZIP 的库)

+

3. WebSocket库

+

【ws】 是 Node.js 下的 WebSocket 库。

+

4. 心跳

+

WebSocket API 支持双向心跳,无论是 Server 还是 Client 都可以发起 ping message,对方返回 pong message。

+ +

WebSocket Server 发送心跳:

+
{"ping": 18212558000}
+
+

WebSocket Client 应该返回:

+
 {"pong": 18212558000}
+
+ + + +
┌────────┐                         ┌────────┐ 
+│ Client │                         │ Server │
+└───┬────┘                         └───┬────┘
+    │         {"ping": 18212558000}    │
+    │<─────────────────────────────────┤
+    │                                  │ wait 5s
+    │                                  ├───┐
+    │                                  │<──┘
+    │         {"ping": 18212558000}    │
+    │<─────────────────────────────────┤
+    │                                  │
+    │ {"pong": 18212558000}            │
+    ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄>│
+    │                                  │
+
+ +
┌────────┐                         ┌────────┐ 
+│ Client │                         │ Server │
+└───┬────┘                         └───┬────┘
+    │         {"ping": 1523778470416}  │
+    │<─────────────────────────────────┤
+    │                                  │ wait 5s
+    │                                  ├───┐
+    │                                  │<──┘
+    │         {"ping": 1523778475416}  │
+    │<─────────────────────────────────┤
+    │                                  │ wait 5s
+    │                                  ├───┐
+    │                                  │<──┘
+    │                                  │
+    │                                  │ close WebSocket connection
+    │                                  ├───┐
+    │                                  │<──┘
+    │                                  │
+
+
+ + +

WebSocket Client 发送心跳:

+
{"ping": 18212553000}
+
+ +
{
+  "ts": 1492420473027,
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "invalid ping"
+}
+
+

WebSocket Server 会返回:

+
{"pong": 18212553000}
+
+ + +

错误信息返回格式

+
{
+  "id": "id generate by client",
+  "status": "error",
+  "err-code": "err-code",
+  "err-msg": "err-message",
+  "ts": 1487152091345
+}
+
+ +

5. topic格式

+

订阅数据和请求数据都要使用 topictopic 的语法如下:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
topic 类型topic 语法sub/req描述
KLinemarket.$symbol.kline.$periodsub/reqK线 数据,包含单位时间区间的开盘价、收盘价、最高价、最低价、成交量、成交额、成交笔数等数据 $period 可选值:{ 1min, 5min, 15min, 30min, 60min, 4hour,1day, 1mon, 1week, 1year }
Market Depthmarket.$symbol.depth.$typesub/req盘口深度,按照不同 step 聚合的买一、买二、买三等和卖一、卖二、卖三等数据 $type 可选值:{ step0, step1, step2, step3, step4, step5, percent10 } (合并深度0-5);step0时,不合并深度
Trade Detailmarket.$symbol.trade.detailsub/req成交记录,包含成交价格、成交量、成交方向等信息
Market Detailmarket.$symbol.detailsub/req最近24小时成交量、成交额、开盘价、收盘价、最高价、最低价、成交笔数等
Market Tickersmarket.tickerssub所有对外公开交易对的 日K线、最近24小时成交量等信息
+ +
    +
  • $symbol 为交易对,可选值: { ethbtc, ltcbtc, etcbtc, bchbtc...... }
  • +
  • 用户选择“合并深度”时,一定报价精度内的市场挂单将予以合并显示。合并深度仅改变显示方式,不改变实际成交价格。
  • +
+

6. 请求数据(req/rep)

+

请求数据,仅返回一次数据

+

请求数据的格式

{
+  "req": "topic to req",
+  "id": "id generate by client"
+}
+
+
    +
  • "req" 的值为 topic ,请参考 "5. topic格式"topic 格式
  • +
+ +

正确请求数据的例子

+
{
+  "req": "market.btcusdt.kline.1min",
+  "id": "id10"
+}
+
+

返回数据的例子:

+
{
+  "status": "ok",
+  "rep": "market.btcusdt.kline.1min",
+  "tick": [
+    {
+      "amount": 1.6206,
+      "count":  3,
+      "id":     1494465840,
+      "open":   9887.00,
+      "close":  9885.00,
+      "low":    9885.00,
+      "high":   9887.00,
+      "vol":    16021.632026
+    },
+    {
+      "amount": 2.2124,
+      "count":  6,
+      "id":     1494465900,
+      "open":   9885.00,
+      "close":  9880.00,
+      "low":    9880.00,
+      "high":   9885.00,
+      "vol":    21859.023500
+    }
+  ]
+}
+
+

错误请求数据的例子

+
{
+  "req": "market.invalidsymbo.kline.1min",
+  "id": "id10"
+}
+
+

返回的错误信息的例子:

+
{
+  "status": "error",
+  "id": "id10",
+  "err-code": "bad-request",
+  "err-msg": "invalid topic market.invalidsymbol.trade.detail",
+  "ts": 1494483996521
+}
+

7. 订阅数据(sub)

订阅数据(sub)以及接收订阅数据的大致流程

┌────────┐                         ┌────────┐ 
+│ Client │                         │ Server │
+└───┬────┘                         └───┬────┘
+    │ {"sub": "topic"}                 │
+    ├─────────────────────────────────>│
+    │                                  │
+    │              {"subbed": "topic"} │
+    │<┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
+    │                                  │
+    │        {"tick": "data of topic"} │
+    │<┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
+    │                                  │
+    │        {"tick": "data of topic"} │
+    │<┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
+    │                                  │
+
+ +

订阅数据的格式

+

成功建立和 WebSocket API 的连接之后,向 Server 发送如下格式的数据来订阅数据:

+
{
+   "id": "id generate by client",
+  "sub": "topic to sub",
+  "freq-ms": 1000
+}
+
+ + + + +

正确订阅的例子

+ +

正确订阅:

+
{
+  "sub": "market.btcusdt.kline.1min",
+  "id": "id1"
+}
+
+
    +
  • "sub" 的值为 topic ,请参考 "5. topic格式"topic 格式
  • +
+ +

订阅成功返回数据的例子:

+
{
+  "id": "id1",
+  "status": "ok",
+  "subbed": "market.btcusdt.kline.1min",
+  "ts": 1489474081631
+}
+
+

之后每当 KLine 有更新时,client 会收到数据,例子:

+
{
+  "ch": "market.btcusdt.kline.1min",
+  "ts": 1489474082831,
+  "tick": {
+    "id": 1489464480,
+    "amount": 0.0,
+    "count": 0,
+    "open": 7962.62,
+    "close": 7962.62,
+    "low": 7962.62,
+    "high": 7962.62,
+    "vol": 0.0
+  }
+}
+
+

tick 说明:

+
  "tick": {
+    "id": K线id,
+    "amount": 成交量,
+    "count": 成交笔数,
+    "open": 开盘价,
+    "close": 收盘价,当K线为最晚的一根时,是最新成交价
+    "low": 最低价,
+    "high": 最高价,
+    "vol": 成交额, 即 sum(每一笔成交价 * 该笔的成交量)
+  }
+
+
+

错误订阅的例子

+ +

错误订阅(错误的 symbol):

+
{
+  "sub": "market.invalidsymbol.kline.1min",
+  "id": "id2"
+}
+
+

订阅失败返回数据的例子:

+
{
+  "id": "id2",
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "invalid topic market.invalidsymbol.kline.1min",
+  "ts": 1494301904959
+}
+
+

错误订阅(错误的 topic):

+
{
+  "sub": "market.btcusdt.kline.3min",
+  "id": "id3"
+}
+
+

订阅失败返回数据的例子:

+
{
+  "id": "id3",
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "invalid topic market.btcusdt.kline.3min",
+  "ts": 1494310283622
+}
+

8. 取消订阅(unsub)

取消订阅的格式

+

WebSocket Client 订阅数据之后,可以取消订阅,取消订阅之后 WebSocket Server 将不会再发送该 topic 的数据,取消订阅的格式如下:

+
{
+  "unsub": "topic to unsub",
+  "id": "id generate by client"
+}
+
+

正确取消订阅的例子

+ +

正确取消订阅的例子:

+
{
+  "unsub": "market.btcusdt.trade.detail",
+  "id": "id4"
+}
+
+

取消订阅成功返回信息的例子:

+
{
+  "id": "id4",
+  "status": "ok",
+  "unsubbed": "market.btcusdt.trade.detail",
+  "ts": 1494326028889
+}
+
+

错误取消订阅的例子

+ +

错误取消订阅的例子(取消订阅一个尚未订阅的 topic):

+
{
+  "unsub": "market.btcusdt.trade.detail",
+  "id": "id5"
+}
+
+

返回的错误信息的例子

+
{
+  "id": "id5",
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "unsub with not subbed topic market.btcusdt.trade.detail",
+  "ts": 1494326217428
+}
+
+

错误取消订阅的例子(取消订阅一个不存在的 topic):

+
{
+  "unsub": "not-exists-topic",
+  "id": "id5"
+}
+
+

返回的错误信息的例子:

+
{
+  "id": "id5",
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "unsub with not subbed topic not-exists-topic",
+  "ts": 1494326318809
+}
+

WebSocket API Reference

订阅 KLine 数据 market.$symbol.kline.$period

+

成功建立和 WebSocket API 的连接之后,向 Server 发送如下格式的数据来订阅数据:

+
{
+  "sub": "market.$symbol.kline.$period",
+  "id": "id generate by client"
+}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对ethbtc,btusdt...
periodtruestringK线周期1min, 5min, 15min, 30min, 60min, 1day, 1mon, 1week, 1year
+ +

正确订阅的例子

+ +

正确订阅

+
{
+  "sub": "market.btcusdt.kline.1min",
+  "id": "id1"
+}
+
+

订阅成功返回数据的例子

+
{
+  "id": "id1",
+  "status": "ok",
+  "subbed": "market.btcusdt.kline.1min",
+  "ts": 1489474081631
+}
+
+

之后每当 KLine 有更新时,client 会收到数据,例子

+
{
+  "ch": "market.btcusdt.kline.1min",
+  "ts": 1489474082831,
+  "tick": {
+    "id": 1489464480,
+    "amount": 0.0,
+    "count": 0,
+    "open": 7962.62,
+    "close": 7962.62,
+    "low": 7962.62,
+    "high": 7962.62,
+    "vol": 0.0
+  }
+}
+
+

tick 说明

+
  "tick": {
+    "id": K线id,
+    "amount": 成交量,
+    "count": 成交笔数,
+    "open": 开盘价,
+    "close": 收盘价,当K线为最晚的一根时,是最新成交价
+    "low": 最低价,
+    "high": 最高价,
+    "vol": 成交额, 即 sum(每一笔成交价 * 该笔的成交量)
+  }
+
+
+

错误订阅的例子

+ +

错误订阅(错误的 symbol)

+
{
+  "sub": "market.invalidsymbol.kline.1min",
+  "id": "id2"
+}
+
+

订阅失败返回数据的例子

+
{
+  "id": "id2",
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "invalid topic market.invalidsymbol.kline.1min",
+  "ts": 1494301904959
+}
+
+

错误订阅(错误的 topic)

+
{
+  "sub": "market.btcusdt.kline.3min",
+  "id": "id3"
+}
+
+

订阅失败返回数据的例子

+
{
+  "id": "id3",
+  "status": "error",
+  "err-code": "bad-request",
+  "err-msg": "invalid topic market.btcusdt.kline.3min",
+  "ts": 1494310283622
+}
+

请求 KLine 数据 market.$symbol.kline.$period

{
+  "req": "market.$symbol.kline.$period",
+  "id": "id generated by client",
+  "from": 1533536947, //optional, type: long, 2017-07-28T00:00:00+08:00  2050-01-01T00:00:00+08:00 之间的时间点,单位:秒
+  "to": 1533536947 //optional, type: long, 2017-07-28T00:00:00+08:00  2050-01-01T00:00:00+08:00 之间的时间点,单位:秒,必须比 from 
+}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, ethusdt, ltcusdt...
periodtruestringK线周期1min, 5min, 15min, 30min, 60min, 1day, 1mon, 1week, 1year
+

请求 KLine 数据的例子

{
+  "req": "market.btcusdt.kline.1min",
+  "id": "id10"
+}
+
+

返回数据的例子

+
{
+  "rep": "market.btcusdt.kline.1min",
+  "status": "ok",
+  "id": "id10",
+  "tick": [
+    {
+      "amount": 17.4805,
+      "count":  27,
+      "id":     1494478080,
+      "open":   10050.00,
+      "close":  10058.00,
+      "low":    10050.00,
+      "high":   10058.00,
+      "vol":    175798.757708
+    },
+    {
+      "amount": 15.7389,
+      "count":  28,
+      "id":     1494478140,
+      "open":   10058.00,
+      "close":  10060.00,
+      "low":    10056.00,
+      "high":   10065.00,
+      "vol":    158331.348600
+    },
+    // more KLine data here
+  ]
+}
+

订阅 Market Depth 数据 market.$symbol.depth.$type

+

成功建立和 WebSocket API 的连接之后,向 Server 发送如下格式的数据来订阅数据:

+
{
+  "sub": "market.$symbol.depth.$type",
+  "id": "id generated by client"
+}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, ethusdt, ltcusdt, etcusdt, bchusdt, ethbtc, ltcbtc, etcbtc, bchbtc...
typetruestringDepth 类型step0, step1, step2, step3, step4, step5(合并深度0-5);step0时,不合并深度
+ +
    +
  • 用户选择“合并深度”时,一定报价精度内的市场挂单将予以合并显示。合并深度仅改变显示方式,不改变实际成交价格。
  • +
+ +

正确订阅例子

+
{
+  "sub": "market.btcusdt.depth.step0",
+  "id": "id1"
+}
+
+

订阅成功返回数据的例子

+
{
+  "id": "id1",
+  "status": "ok",
+  "subbed": "market.btcusdt.depth.step0",
+  "ts": 1489474081631
+}
+
+

之后每当 depth 有更新时,client 会收到数据,例子

+
{
+  "ch": "market.btcusdt.depth.step0",
+  "ts": 1489474082831,
+  "tick": {
+    "bids": [
+    [9999.3900,0.0098], // [price, amount]
+    [9992.5947,0.0560],
+    // more Market Depth data here
+    ],
+    "asks": [
+    [10010.9800,0.0099]
+    [10011.3900,2.0000]
+    //more data here
+    ]
+  }
+}
+
+

tick 说明 + + "tick": { + "bids": [ + [买1价,买1量] + [买2价,买2量] + //more data here + ], + "asks": [ + [卖1价,卖1量] + [卖2价,卖2量] + //more data here + ] + } +

+

请求 Market Depth 数据 market.$symbol.depth.$type

{
+  "req": "market.$symbol.depth.$type",
+  "id": "id generated by client"
+}
+

请求 Market Depth 数据的例子

{
+  "req": "market.btcusdt.depth.step0",
+  "id": "id10"
+}
+
+

返回数据的例子:

+
{
+  "rep": "market.btcusdt.depth.step0",
+  "status": "ok",
+  "id": "id10",
+  "tick": {
+    "bids": [
+    [9999.3900,0.0098], // [price, amount]
+    [9992.5947,0.0560],
+    // more Market Depth data here
+    ],
+    "asks": [
+    [10010.9800,0.0099]
+    [10011.3900,2.0000]
+    //more data here
+    ]
+  }
+}
+

订阅 Trade Detail 数据 market.$symbol.trade.detail

{
+  "sub": "market.$symbol.trade.detail",
+  "id": "id generated by client"
+}
+
+ + + + + + + + + + + + + + + + + + +
参数名称是否必须类型描述默认值取值范围
symboltruestring交易对btcusdt, ethusdt, ltcusdt, etcusdt, bchusdt, ethbtc, ltcbtc, etcbtc, bchbtc...
+ +

正确订阅例子:

+
{
+  "sub": "market.btcusdt.trade.detail",
+  "id": "id1"
+}
+
+

订阅成功返回数据的例子:

+
{
+  "id": "id1",
+  "status": "ok",
+  "subbed": "market.btcusdt.trade.detail",
+  "ts": 1489474081631
+}
+
+

之后每当 Trade Detail 有更新时,client 会收到数据,例子:

+
{
+  "ch": "market.btcusdt.trade.detail",
+  "ts": 1489474082831,
+  "tick": {
+        "id": 14650745135,
+        "ts": 1533265950234,
+        "data": [
+            {
+                "amount": 0.0099,
+                "ts": 1533265950234,
+                "id": 146507451359183894799,
+                "price": 401.74,
+                "direction": "buy"
+            },
+            // more Trade Detail data here
+        ]
+    }
+  }
+}
+
+

data 说明:

+
  "data": [
+    {
+      "id":        消息ID,
+      "price":     成交价,
+      "time":      成交时间,
+      "amount":    成交量,
+      "direction": 成交方向,
+      "tradeId":   成交ID,
+      "ts":        时间戳
+    }
+  ]
+

请求 Trade Detail 数据 market.$symbol.trade.detail

{
+  "req": "market.$symbol.trade.detail",
+  "id": "id generated by client"
+}
+
+
    +
  • 仅能获取最近 300 个 Trade Detail 数据
  • +
+

请求 Trade Detail 数据的例子

{
+  "req": "market.btcusdt.trade.detail",
+  "id": "id11"
+}
+
+

返回数据的例子:

+
{
+  "rep": "market.btcusdt.trade.detail",
+  "status": "ok",
+  "id": "id11",
+  "data": [
+    {
+      "id":        601595424,
+      "price":     10195.64,
+      "time":      1494495766,
+      "amount":    0.2943,
+      "direction": "buy",
+      "tradeId":   601595424,
+      "ts":        1494495766000
+    },
+    {
+      "id":        601595423,
+      "price":     10195.64,
+      "time":      1494495711,
+      "amount":    0.2430,
+      "direction": "buy",
+      "tradeId":   601595423,
+      "ts":        1494495711000
+    },
+    // more Trade Detail data here
+  ]
+}
+

请求 Market Detail 数据 market.$symbol.detail

{
+  "req": "market.$symbol.detail",
+  "id": "id generated by client"
+}
+
+
    +
  • 仅返回当前 Market Detail
  • +
+

请求 Market Detail 数据的例子

{
+  "req": "market.btcusdt.detail",
+  "id": "id12"
+}
+
+

返回数据的例子:

+
{
+  "rep": "market.btcusdt.detail",
+  "status": "ok",
+  "id": "id12",
+  "tick": {
+    "amount": 12224.2922,
+    "open":   9790.52,
+    "close":  10195.00,
+    "high":   10300.00,
+    "ts":     1494496390000,
+    "id":     1494496390,
+    "count":  15195,
+    "low":    9657.00,
+    "vol":    121906001.754751
+  }
+}
+
+


+
+
+
+

+ +
+
+
+ shell +
+
+
+ + + diff --git a/build/v1/ws/javascripts/all.js b/build/v1/ws/javascripts/all.js new file mode 100644 index 0000000..05af78b --- /dev/null +++ b/build/v1/ws/javascripts/all.js @@ -0,0 +1,131 @@ +!function(){if("ontouchstart"in window){var e,t,n,r,i,o,s={};e=function(e,t){return Math.abs(e[0]-t[0])>5||Math.abs(e[1]-t[1])>5},t=function(e){this.startXY=[e.touches[0].clientX,e.touches[0].clientY],this.threshold=!1},n=function(t){return!this.threshold&&void(this.threshold=e(this.startXY,[t.touches[0].clientX,t.touches[0].clientY]))},r=function(t){if(!this.threshold&&!e(this.startXY,[t.changedTouches[0].clientX,t.changedTouches[0].clientY])){var n=t.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),r.simulated=!0,t.target.dispatchEvent(r)}},i=function(e){var t=Date.now(),n=t-s.time,r=e.clientX,i=e.clientY,a=[Math.abs(s.x-r),Math.abs(s.y-i)],u=o(e.target,"A")||e.target,c=u.nodeName,l="A"===c,f=window.navigator.standalone&&l&&e.target.getAttribute("href");return s.time=t,s.x=r,s.y=i,!((!e.simulated&&(n<500||n<1500&&a[0]<50&&a[1]<50)||f)&&(e.preventDefault(),e.stopPropagation(),!f))&&(f&&(window.location=u.getAttribute("href")),void(u&&u.classList&&(u.classList.add("energize-focus"),window.setTimeout(function(){u.classList.remove("energize-focus")},150))))},o=function(e,t){for(var n=e;n!==document.body;){if(!n||n.nodeName===t)return n;n=n.parentNode}return null},document.addEventListener("touchstart",t,!1),document.addEventListener("touchmove",n,!1),document.addEventListener("touchend",r,!1),document.addEventListener("click",i,!0)}}(),/*! + * jQuery JavaScript Library v3.2.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2017-03-20T18:59Z + */ +function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=ge.type(e);return"function"!==n&&!ge.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return ge.isFunction(t)?ge.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?ge.grep(e,function(e){return e===t!==n}):"string"!=typeof t?ge.grep(e,function(e){return ae.call(t,e)>-1!==n}):Ce.test(t)?ge.filter(t,e,n):(t=ge.filter(t,e),ge.grep(e,function(e){return ae.call(t,e)>-1!==n&&1===e.nodeType}))}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t={};return ge.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function u(e){return e}function c(e){throw e}function l(e,t,n,r){var i;try{e&&ge.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&ge.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){ne.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),ge.ready()}function d(){this.expando=ge.expando+d.uid++}function p(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ie.test(e)?JSON.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Re,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=p(n)}catch(e){}He.set(e,t,n)}else n=void 0;return n}function g(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return ge.css(e,t,"")},u=a(),c=n&&n[3]||(ge.cssNumber[t]?"":"px"),l=(ge.cssNumber[t]||"px"!==c&&+u)&&Me.exec(ge.css(e,t));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do o=o||".5",l/=o,ge.style(e,t,l+c);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}function v(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ve[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=ge.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ve[r]=i,i)}function m(e,t){for(var n,r,i=[],o=0,s=e.length;o-1)i&&i.push(o);else if(c=ge.contains(o.ownerDocument,o),s=y(f.appendChild(o),"script"),c&&x(s),n)for(l=0;o=s[l++];)Qe.test(o.type||"")&&n.push(o);return f}function w(){return!0}function T(){return!1}function S(){try{return ne.activeElement}catch(e){}}function E(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)E(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=T;else if(!i)return e;return 1===o&&(s=i,i=function(e){return ge().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=ge.guid++)),e.each(function(){ge.event.add(this,t,i,r,n)})}function C(e,t){return i(e,"table")&&i(11!==t.nodeType?t:t.firstChild,"tr")?ge(">tbody",e)[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function N(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function j(e,t){var n,r,i,o,s,a,u,c;if(1===t.nodeType){if(Pe.hasData(e)&&(o=Pe.access(e),s=Pe.set(t,o),c=o.events)){delete s.handle,s.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!pe.checkClone&&rt.test(h))return e.each(function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),L(o,t,r,i)});if(d&&(o=b(t,e[0].ownerDocument,!1,e,i),s=o.firstChild,1===o.childNodes.length&&(o=s),s||i)){for(a=ge.map(y(o,"script"),k),u=a.length;f=0&&nS.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[_]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)S.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function v(e,n,r){for(var i=0,o=n.length;i-1&&(r[c]=!(s[c]=f))}}else x=m(x===s?x.splice(h,x.length):x),o?o(null,s,x,u):K.apply(s,x)})}function x(e){for(var t,n,r,i=e.length,o=S.relative[e[0].type],s=o||S.relative[" "],a=o?1:0,u=h(function(e){return e===t},s,!0),c=h(function(e){return ee(t,e)>-1},s,!0),l=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,i}];a1&&g(l),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,o=e.length>0,s=function(r,s,a,u,c){var l,f,d,p=0,h="0",g=r&&[],v=[],y=A,x=r||o&&S.find.TAG("*",c),b=W+=null==y?1:Math.random()||.1,w=x.length;for(c&&(A=s===q||s||c);h!==w&&null!=(l=x[h]);h++){if(o&&l){for(f=0,s||l.ownerDocument===q||(O(l),a=!$);d=e[f++];)if(d(l,s||q,a)){u.push(l);break}c&&(W=b)}i&&((l=!d&&l)&&p--,r&&g.push(l))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,v,s,a);if(r){if(p>0)for(;h--;)g[h]||v[h]||(v[h]=J.call(u));v=m(v)}K.apply(u,v),c&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return c&&(W=b,A=y),g};return i?r(s):s}var w,T,S,E,C,k,N,j,A,L,D,O,q,F,$,P,H,I,R,_="sizzle"+1*new Date,M=e.document,W=0,B=0,z=n(),V=n(),X=n(),U=function(e,t){return e===t&&(D=!0),0},Q={}.hasOwnProperty,Y=[],J=Y.pop,G=Y.push,K=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Se=function(){O()},Ee=h(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{K.apply(Y=Z.call(M.childNodes),M.childNodes),Y[M.childNodes.length].nodeType}catch(e){K={apply:Y.length?function(e,t){G.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}T=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==q&&9===r.nodeType&&r.documentElement?(q=r,F=q.documentElement,$=!C(q),M!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Se,!1):n.attachEvent&&n.attachEvent("onunload",Se)),T.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=i(function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=ve.test(q.getElementsByClassName),T.getById=i(function(e){return F.appendChild(e).id=_,!q.getElementsByName||!q.getElementsByName(_).length}),T.getById?(S.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&$){var n=t.getElementById(e);return n?[n]:[]}}):(S.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&$){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),S.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},S.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&$)return t.getElementsByClassName(e)},H=[],P=[],(T.qsa=ve.test(q.querySelectorAll))&&(i(function(e){F.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+_+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||P.push(".#.+[+~]")}),i(function(e){e.innerHTML="";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&P.push(":enabled",":disabled"),F.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(T.matchesSelector=ve.test(I=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.oMatchesSelector||F.msMatchesSelector))&&i(function(e){T.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),H.push("!=",oe)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),t=ve.test(F.compareDocumentPosition),R=t||ve.test(F.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===M&&R(M,e)?-1:t===q||t.ownerDocument===M&&R(M,t)?1:L?ee(L,e)-ee(L,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:L?ee(L,e)-ee(L,t):0;if(i===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===M?-1:u[r]===M?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&O(e),n=n.replace(le,"='$1']"),T.matchesSelector&&$&&!X[n+" "]&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var r=I.call(e,n);if(r||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&O(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&O(e);var n=S.attrHandle[t.toLowerCase()],r=n&&Q.call(S.attrHandle,t.toLowerCase())?n(e,t,!$):void 0;return void 0!==r?r:T.attributes||!$?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!T.detectDuplicates,L=!T.sortStable&&e.slice(0),e.sort(U),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return L=null,e},E=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},S=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,p,h,g=o!==s?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?v.firstChild:v.lastChild],s&&y){for(d=v,f=d[_]||(d[_]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===W&&c[1],x=p&&c[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){l[e]=[W,p,x];break}}else if(y&&(d=t,f=d[_]||(d[_]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===W&&c[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(y&&(f=d[_]||(d[_]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),l[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=S.pseudos[e]||S.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[_]?o(n):o.length>1?(i=[e,e,"",n],S.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=ee(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=N(e.replace(ae,"$1"));return i[_]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do if(n=$?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===F},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=o[0]).type&&9===t.nodeType&&$&&S.relative[o[1].type]){if(t=(S.find.ID(s.matches[0].replace(xe,be),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(s=o[i],!S.relative[a=s.type]);)if((u=S.find[a])&&(r=u(s.matches[0].replace(xe,be),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return K.apply(n,r),n;break}}return(c||N(e,l))(r,t,!$,n,!t||ye.test(e)&&f(t.parentNode)||t),n},T.sortStable=_.split("").sort(U).join("")===_,T.detectDuplicates=!!D,O(),T.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);ge.find=be,ge.expr=be.selectors,ge.expr[":"]=ge.expr.pseudos,ge.uniqueSort=ge.unique=be.uniqueSort,ge.text=be.getText,ge.isXMLDoc=be.isXML,ge.contains=be.contains,ge.escapeSelector=be.escape;var we=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ge(e).is(n))break;r.push(e)}return r},Te=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Se=ge.expr.match.needsContext,Ee=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ce=/^.[^:#\[\.,]*$/;ge.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ge.find.matchesSelector(r,e)?[r]:[]:ge.find.matches(e,ge.grep(t,function(e){return 1===e.nodeType}))},ge.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ge(e).filter(function(){for(t=0;t1?ge.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Se.test(e)?ge(e):e||[],!1).length}});var ke,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,je=ge.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ge?t[0]:t,ge.merge(this,ge.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),Ee.test(r[1])&&ge.isPlainObject(t))for(r in t)ge.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=ne.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ge.isFunction(e)?void 0!==n.ready?n.ready(e):e(ge):ge.makeArray(e,this)};je.prototype=ge.fn,ke=ge(ne);var Ae=/^(?:parents|prev(?:Until|All))/,Le={children:!0,contents:!0,next:!0,prev:!0};ge.fn.extend({has:function(e){var t=ge(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ge.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ge.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?ae.call(ge(e),this[0]):ae.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ge.uniqueSort(ge.merge(this.get(),ge(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ge.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,n){return we(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,n){return we(e,"nextSibling",n)},prevUntil:function(e,t,n){return we(e,"previousSibling",n)},siblings:function(e){return Te((e.parentNode||{}).firstChild,e)},children:function(e){return Te(e.firstChild)},contents:function(e){return i(e,"iframe")?e.contentDocument:(i(e,"template")&&(e=e.content||e),ge.merge([],e.childNodes))}},function(e,t){ge.fn[e]=function(n,r){var i=ge.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ge.filter(r,i)),this.length>1&&(Le[e]||ge.uniqueSort(i),Ae.test(e)&&i.reverse()),this.pushStack(i)}});var De=/[^\x20\t\r\n\f]+/g;ge.Callbacks=function(e){e="string"==typeof e?a(e):ge.extend({},e);var t,n,r,i,o=[],s=[],u=-1,c=function(){for(i=i||e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?ge.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},ge.extend({Deferred:function(t){var n=[["notify","progress",ge.Callbacks("memory"),ge.Callbacks("memory"),2],["resolve","done",ge.Callbacks("once memory"),ge.Callbacks("once memory"),0,"resolved"],["reject","fail",ge.Callbacks("once memory"),ge.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return ge.Deferred(function(t){ge.each(n,function(n,r){var i=ge.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&ge.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var a=this,l=arguments,f=function(){var e,f;if(!(t=s&&(r!==c&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?d():(ge.Deferred.getStackHook&&(d.stackTrace=ge.Deferred.getStackHook()),e.setTimeout(d))}}var s=0;return ge.Deferred(function(e){n[0][3].add(o(0,e,ge.isFunction(i)?i:u,e.notifyWith)),n[1][3].add(o(0,e,ge.isFunction(t)?t:u)),n[2][3].add(o(0,e,ge.isFunction(r)?r:c))}).promise()},promise:function(e){return null!=e?ge.extend(e,i):i}},o={};return ge.each(n,function(e,t){var s=t[2],a=t[5];i[t[1]]=s.add,a&&s.add(function(){r=a},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=ie.call(arguments),o=ge.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?ie.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(l(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||ge.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)l(i[n],s(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ge.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Oe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},ge.readyException=function(t){e.setTimeout(function(){throw t})};var qe=ge.Deferred();ge.fn.ready=function(e){return qe.then(e)["catch"](function(e){ge.readyException(e)}),this},ge.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--ge.readyWait:ge.isReady)||(ge.isReady=!0,e!==!0&&--ge.readyWait>0||qe.resolveWith(ne,[ge]))}}),ge.ready.then=qe.then,"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(ge.ready):(ne.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f));var Fe=function(e,t,n,r,i,o,s){var a=0,u=e.length,c=null==n;if("object"===ge.type(n)){i=!0;for(a in n)Fe(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,ge.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(ge(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){He.remove(this,e)})}}),ge.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Pe.get(e,t),n&&(!r||Array.isArray(n)?r=Pe.access(e,t,ge.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ge.queue(e,t),r=n.length,i=n.shift(),o=ge._queueHooks(e,t),s=function(){ge.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Pe.get(e,n)||Pe.access(e,n,{empty:ge.Callbacks("once memory").add(function(){Pe.remove(e,[t+"queue",n])})})}}),ge.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Qe=/^$|\/(?:java|ecma)script/i,Ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td;var Je=/<|&#?\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement("div")),n=ne.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ge=ne.documentElement,Ke=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;ge.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=Pe.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&ge.find.matchesSelector(Ge,i),n.guid||(n.guid=ge.guid++),(u=v.events)||(u=v.events={}), +(s=v.handle)||(s=v.handle=function(t){return"undefined"!=typeof ge&&ge.event.triggered!==t.type?ge.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(De)||[""],c=t.length;c--;)a=et.exec(t[c])||[],p=g=a[1],h=(a[2]||"").split(".").sort(),p&&(f=ge.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=ge.event.special[p]||{},l=ge.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ge.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(p,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),ge.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=Pe.hasData(e)&&Pe.get(e);if(v&&(u=v.events)){for(t=(t||"").match(De)||[""],c=t.length;c--;)if(a=et.exec(t[c])||[],p=g=a[1],h=(a[2]||"").split(".").sort(),p){for(f=ge.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)l=d[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));s&&!d.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||ge.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)ge.event.remove(e,p+t[c],n,r,!0);ge.isEmptyObject(u)&&Pe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=ge.event.fix(e),u=new Array(arguments.length),c=(Pe.get(this,"events")||{})[a.type]||[],l=ge.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(o=[],s={},n=0;n-1:ge.find(i,this,null,[c]).length),s[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,nt=/\s*$/g;ge.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=ge.contains(e.ownerDocument,e);if(!(pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ge.isXMLDoc(e)))for(s=y(a),o=y(e),r=0,i=o.length;r0&&x(s,!u&&y(e,"script")),a},cleanData:function(e){for(var t,n,r,i=ge.event.special,o=0;void 0!==(n=e[o]);o++)if($e(n)){if(t=n[Pe.expando]){if(t.events)for(r in t.events)i[r]?ge.event.remove(n,r):ge.removeEvent(n,r,t.handle);n[Pe.expando]=void 0}n[He.expando]&&(n[He.expando]=void 0)}}}),ge.fn.extend({detach:function(e){return D(this,e,!0)},remove:function(e){return D(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?ge.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.appendChild(e)}})},prepend:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ge.cleanData(y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ge.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!nt.test(e)&&!Ye[(Ue.exec(e)||["",""])[1].toLowerCase()]){e=ge.htmlPrefilter(e);try{for(;n1)}}),ge.Tween=R,R.prototype={constructor:R,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ge.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ge.cssNumber[n]?"":"px")},cur:function(){var e=R.propHooks[this.prop];return e&&e.get?e.get(this):R.propHooks._default.get(this)},run:function(e){var t,n=R.propHooks[this.prop];return this.options.duration?this.pos=t=ge.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ge.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ge.fx.step[e.prop]?ge.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ge.cssProps[e.prop]]&&!ge.cssHooks[e.prop]?e.elem[e.prop]=e.now:ge.style(e.elem,e.prop,e.now+e.unit)}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ge.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ge.fx=R.prototype.init,ge.fx.step={};var gt,vt,mt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;ge.Animation=ge.extend(X,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return g(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){ge.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){ge.removeAttr(this,e)})}}),ge.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ge.prop(e,t,n):(1===o&&ge.isXMLDoc(e)||(i=ge.attrHooks[t.toLowerCase()]||(ge.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void ge.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ge.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&i(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(De);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return t===!1?ge.removeAttr(e,n):e.setAttribute(n,n),n}},ge.each(ge.expr.match.bool.source.match(/\w+/g),function(e,t){var n=bt[t]||ge.find.attr;bt[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=bt[s],bt[s]=i,i=null!=n(e,t,r)?s:null,bt[s]=o),i}});var wt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;ge.fn.extend({prop:function(e,t){return Fe(this,ge.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ge.propFix[e]||e]})}}),ge.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ge.isXMLDoc(e)||(t=ge.propFix[t]||t,i=ge.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ge.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),pe.optSelected||(ge.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ge.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ge.propFix[this.toLowerCase()]=this}),ge.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(ge.isFunction(e))return this.each(function(t){ge(this).addClass(e.call(this,t,Q(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&" "+U(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a=U(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(ge.isFunction(e))return this.each(function(t){ge(this).removeClass(e.call(this,t,Q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&" "+U(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a=U(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ge.isFunction(e)?this.each(function(n){ge(this).toggleClass(e.call(this,n,Q(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=ge(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Q(this),t&&Pe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Pe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+U(Q(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;ge.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ge.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ge(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=ge.map(i,function(e){return null==e?"":e+""})),t=ge.valHooks[this.type]||ge.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ge.valHooks[i.type]||ge.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),ge.extend({valHooks:{option:{get:function(e){var t=ge.find.attr(e,"value");return null!=t?t:U(ge.text(e))}},select:{get:function(e){var t,n,r,o=e.options,s=e.selectedIndex,a="select-one"===e.type,u=a?null:[],c=a?s+1:o.length;for(r=s<0?c:a?s:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ge.each(["radio","checkbox"],function(){ge.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=ge.inArray(ge(e).val(),t)>-1}},pe.checkOn||(ge.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=/^(?:focusinfocus|focusoutblur)$/;ge.extend(ge.event,{trigger:function(t,n,r,i){var o,s,a,u,c,l,f,d=[r||ne],p=le.call(t,"type")?t.type:t,h=le.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||ne,3!==r.nodeType&&8!==r.nodeType&&!Et.test(p+ge.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[ge.expando]?t:new ge.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:ge.makeArray(n,[t]),f=ge.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!ge.isWindow(r)){for(u=f.delegateType||p,Et.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(r.ownerDocument||ne)&&d.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=d[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||p,l=(Pe.get(s,"events")||{})[t.type]&&Pe.get(s,"handle"),l&&l.apply(s,n),l=c&&s[c],l&&l.apply&&$e(s)&&(t.result=l.apply(s,n),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!$e(r)||c&&ge.isFunction(r[p])&&!ge.isWindow(r)&&(a=r[c],a&&(r[c]=null),ge.event.triggered=p,r[p](),ge.event.triggered=void 0,a&&(r[c]=a)),t.result}},simulate:function(e,t,n){var r=ge.extend(new ge.Event,n,{type:e,isSimulated:!0});ge.event.trigger(r,null,t)}}),ge.fn.extend({trigger:function(e,t){return this.each(function(){ge.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ge.event.trigger(e,t,n,!0)}}),ge.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){ge.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ge.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin="onfocusin"in e,pe.focusin||ge.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ge.event.simulate(t,e.target,ge.event.fix(e))};ge.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Pe.access(r,t);i||r.addEventListener(e,n,!0),Pe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Pe.access(r,t)-1;i?Pe.access(r,t,i):(r.removeEventListener(e,n,!0),Pe.remove(r,t))}}});var Ct=e.location,kt=ge.now(),Nt=/\?/;ge.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||ge.error("Invalid XML: "+t),n};var jt=/\[\]$/,At=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;ge.param=function(e,t){var n,r=[],i=function(e,t){var n=ge.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!ge.isPlainObject(e))ge.each(e,function(){i(this.name,this.value)});else for(n in e)Y(n,e[n],t,i);return r.join("&")},ge.fn.extend({serialize:function(){return ge.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ge.prop(this,"elements");return e?ge.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ge(this).is(":disabled")&&Dt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Xe.test(e))}).map(function(e,t){var n=ge(this).val();return null==n?null:Array.isArray(n)?ge.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}});var Ot=/%20/g,qt=/#.*$/,Ft=/([?&])_=[^&]*/,$t=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ht=/^(?:GET|HEAD)$/,It=/^\/\//,Rt={},_t={},Mt="*/".concat("*"),Wt=ne.createElement("a");Wt.href=Ct.href,ge.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ge.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?K(K(e,ge.ajaxSettings),t):K(ge.ajaxSettings,e)},ajaxPrefilter:J(Rt),ajaxTransport:J(_t),ajax:function(t,n){function r(t,n,r,a){var c,d,p,b,w,T=n;l||(l=!0,u&&e.clearTimeout(u),i=void 0,s=a||"",S.readyState=t>0?4:0,c=t>=200&&t<300||304===t,r&&(b=Z(h,S,r)),b=ee(h,b,S,c),c?(h.ifModified&&(w=S.getResponseHeader("Last-Modified"),w&&(ge.lastModified[o]=w),w=S.getResponseHeader("etag"),w&&(ge.etag[o]=w)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=b.state,d=b.data,p=b.error,c=!p)):(p=T,!t&&T||(T="error",t<0&&(t=0))),S.status=t,S.statusText=(n||T)+"",c?m.resolveWith(g,[d,T,S]):m.rejectWith(g,[S,T,p]),S.statusCode(x),x=void 0,f&&v.trigger(c?"ajaxSuccess":"ajaxError",[S,h,c?d:p]),y.fireWith(g,[S,T]),f&&(v.trigger("ajaxComplete",[S,h]),--ge.active||ge.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,s,a,u,c,l,f,d,p,h=ge.ajaxSetup({},n),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?ge(g):ge.event,m=ge.Deferred(),y=ge.Callbacks("once memory"),x=h.statusCode||{},b={},w={},T="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=$t.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?s:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(m.promise(S),h.url=((t||h.url||Ct.href)+"").replace(It,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(De)||[""],null==h.crossDomain){c=ne.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Wt.protocol+"//"+Wt.host!=c.protocol+"//"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ge.param(h.data,h.traditional)),G(Rt,h,n,S),l)return S;f=ge.event&&h.global,f&&0===ge.active++&&ge.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ht.test(h.type),o=h.url.replace(qt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ot,"+")):(p=h.url.slice(o.length),h.data&&(o+=(Nt.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(o=o.replace(Ft,"$1"),p=(Nt.test(o)?"&":"?")+"_="+kt++ +p),h.url=o+p),h.ifModified&&(ge.lastModified[o]&&S.setRequestHeader("If-Modified-Since",ge.lastModified[o]),ge.etag[o]&&S.setRequestHeader("If-None-Match",ge.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Mt+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(h.beforeSend.call(g,S,h)===!1||l))return S.abort();if(T="abort",y.add(h.complete),S.done(h.success),S.fail(h.error),i=G(_t,h,n,S)){if(S.readyState=1,f&&v.trigger("ajaxSend",[S,h]),l)return S;h.async&&h.timeout>0&&(u=e.setTimeout(function(){S.abort("timeout")},h.timeout));try{l=!1,i.send(b,r)}catch(e){if(l)throw e;r(-1,e)}}else r(-1,"No Transport");return S},getJSON:function(e,t,n){return ge.get(e,t,n,"json")},getScript:function(e,t){return ge.get(e,void 0,t,"script")}}),ge.each(["get","post"],function(e,t){ge[t]=function(e,n,r,i){return ge.isFunction(n)&&(i=i||r,r=n,n=void 0),ge.ajax(ge.extend({url:e,type:t,dataType:i,data:n,success:r},ge.isPlainObject(e)&&e))}}),ge._evalUrl=function(e){return ge.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},ge.fn.extend({wrapAll:function(e){var t;return this[0]&&(ge.isFunction(e)&&(e=e.call(this[0])),t=ge(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ge.isFunction(e)?this.each(function(t){ge(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ge(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ge.isFunction(e);return this.each(function(n){ge(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ge(this).replaceWith(this.childNodes)}),this}}),ge.expr.pseudos.hidden=function(e){return!ge.expr.pseudos.visible(e)},ge.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ge.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},zt=ge.ajaxSettings.xhr();pe.cors=!!zt&&"withCredentials"in zt,pe.ajax=zt=!!zt,ge.ajaxTransport(function(t){var n,r;if(pe.cors||zt&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)a.setRequestHeader(s,i[s]);n=function(e){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Bt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),ge.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ge.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){ +return ge.globalEval(e),e}}}),ge.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ge.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=ge("