Authored by 鲁尚清

大屏及电子税务局页面样式修改,资产概览,业务性能指标,本月申报率,今日业务量无数据时展示,数据中心弹框

Showing 44 changed files with 1020 additions and 301 deletions
@@ -163,7 +163,7 @@ @@ -163,7 +163,7 @@
163 left:20px; 163 left:20px;
164 } 164 }
165 .yxqk .items li.list-0 p,.yxqk .items li.list-1 p,.yxqk .items li.list-2 p{ 165 .yxqk .items li.list-0 p,.yxqk .items li.list-1 p,.yxqk .items li.list-2 p{
166 - left:52px; 166 + left:49px;
167 } 167 }
168 .yxqk .items li.list-3 .listNum,.yxqk .items li.list-4 .listNum,.yxqk .items li.list-5 .listNum{ 168 .yxqk .items li.list-3 .listNum,.yxqk .items li.list-4 .listNum,.yxqk .items li.list-5 .listNum{
169 right:20px; 169 right:20px;
@@ -172,7 +172,7 @@ @@ -172,7 +172,7 @@
172 margin:0; 172 margin:0;
173 display: inline; 173 display: inline;
174 position: absolute; 174 position: absolute;
175 - left: 40px; 175 + left: 37px;
176 top: 10px; 176 top: 10px;
177 } 177 }
178 .yxqk .items li .listNum{ 178 .yxqk .items li .listNum{
@@ -54,8 +54,8 @@ @@ -54,8 +54,8 @@
54 } 54 }
55 .ypt .item .ui_base { 55 .ypt .item .ui_base {
56 position: relative; 56 position: relative;
57 - top:11%;  
58 - left: 5%; 57 + top:10%;
  58 + left: 0;
59 width: 100%; 59 width: 100%;
60 height: 100%; 60 height: 100%;
61 -webkit-perspective: 1000px; 61 -webkit-perspective: 1000px;
@@ -83,8 +83,8 @@ @@ -83,8 +83,8 @@
83 height:100%; 83 height:100%;
84 text-align: center; 84 text-align: center;
85 background: url('/vue3/src/assets/images/zjdp/cloud-bg.png') no-repeat; 85 background: url('/vue3/src/assets/images/zjdp/cloud-bg.png') no-repeat;
86 - left: 57px;  
87 - top: 24px; 86 + left: 61px;
  87 + top: 26px;
88 } 88 }
89 .ypt .item .ball_c.HuaWeiCloud{ 89 .ypt .item .ball_c.HuaWeiCloud{
90 /*background: url('/vue3/src/assets/images/zjdp/HuaWeiCloud.png') no-repeat;*/ 90 /*background: url('/vue3/src/assets/images/zjdp/HuaWeiCloud.png') no-repeat;*/
@@ -120,13 +120,13 @@ @@ -120,13 +120,13 @@
120 } 120 }
121 121
122 .ypt .item .ball_base .ball{ 122 .ypt .item .ball_base .ball{
123 - font-size: 12px; 123 + font-size: 0.7rem;
124 color: #61c5d5; 124 color: #61c5d5;
125 text-align: center; 125 text-align: center;
126 line-height: 14px; 126 line-height: 14px;
127 } 127 }
128 .ypt .item .ball_base .ball p{ 128 .ypt .item .ball_base .ball p{
129 - font-size: 8px; 129 + /*font-size: 8px;*/
130 position: relative; 130 position: relative;
131 margin:0; 131 margin:0;
132 } 132 }
@@ -155,7 +155,7 @@ @@ -155,7 +155,7 @@
155 } 155 }
156 .ypt__info div.ball_base:nth-child(3) { 156 .ypt__info div.ball_base:nth-child(3) {
157 top: 51px; 157 top: 51px;
158 - left: 224px; 158 + left: 232px;
159 } 159 }
160 .ypt__info div.ball_base:nth-child(4) { 160 .ypt__info div.ball_base:nth-child(4) {
161 top: 150px; 161 top: 150px;
@@ -163,7 +163,7 @@ @@ -163,7 +163,7 @@
163 } 163 }
164 .ypt__info div.ball_base:nth-child(5) { 164 .ypt__info div.ball_base:nth-child(5) {
165 top: 150px; 165 top: 150px;
166 - left: 230px; 166 + left: 232px;
167 } 167 }
168 .ypt__info div.ball_base:nth-child(6) { 168 .ypt__info div.ball_base:nth-child(6) {
169 top: 205px; 169 top: 205px;
@@ -176,7 +176,7 @@ @@ -176,7 +176,7 @@
176 } 176 }
177 .ypt__info .ball_base .ball.active{ 177 .ypt__info .ball_base .ball.active{
178 color:#ffffff; 178 color:#ffffff;
179 - transform: scale(1.4); 179 + transform: scale(1.2);
180 background: url("/vue3/src/assets/images/zjdp/cloudItem-hover.png") no-repeat; 180 background: url("/vue3/src/assets/images/zjdp/cloudItem-hover.png") no-repeat;
181 background-size: contain; 181 background-size: contain;
182 } 182 }
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 position:absolute; 24 position:absolute;
25 bottom:-13px; 25 bottom:-13px;
26 left:17px; 26 left:17px;
  27 + cursor: pointer;
27 } 28 }
28 29
29 .sjzx .item img { 30 .sjzx .item img {
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 } 5 }
6 .declare-container{ 6 .declare-container{
7 - max-width:323px; 7 + width:100%;
8 8
9 } 9 }
10 .declare-total{ 10 .declare-total{
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 .declare-report .rate-title{ 26 .declare-report .rate-title{
27 position: absolute; 27 position: absolute;
28 width: 100%; 28 width: 100%;
29 - top: 7px; 29 + top: -10px;
30 } 30 }
31 .declare-report .grid-content.rate-container{ 31 .declare-report .grid-content.rate-container{
32 background-image: url("/vue3/src/assets/images/digitalDp/icon-rate.png"); 32 background-image: url("/vue3/src/assets/images/digitalDp/icon-rate.png");
  1 +@charset "utf-8";
  2 +*
  3 +{
  4 + margin:0;
  5 + padding:0;
  6 +}
  7 +html
  8 +{
  9 + width:100%;
  10 + height:100%;
  11 + font-size:12px;
  12 + font-family:Arial, Helvetica, sans-serif;
  13 + -webkit-text-size-adjust:none;
  14 + background:#FFFFFF;
  15 +}
  16 +body
  17 +{
  18 + padding:5px;
  19 +}
  20 +select
  21 +{
  22 + height:20px;
  23 + line-height:20px;
  24 +}
  25 +.left
  26 +{
  27 + float:left;
  28 +}
  29 +.freeze
  30 +{
  31 + position:absolute;
  32 + text-align:center;
  33 + background:#343434;
  34 + color:#FFFFFF;
  35 + font-size:26px;
  36 + font-weight:bold;
  37 + filter:alpha(opacity=60);
  38 + opacity:0.6;
  39 +}
  40 +.vtop
  41 +{
  42 + vertical-align:middle;
  43 + margin-top:-1px;
  44 +}
  45 +/*插件*/
  46 +.plugin
  47 +{
  48 + width:100%;
  49 + height:668px;
  50 +}
  51 +fieldset
  52 +{
  53 + display:block;
  54 +}
  55 +/*本地配置*/
  56 +.localconfig
  57 +{
  58 + width:480px;
  59 + padding:10px;
  60 + border:1px solid #7F9DB9;
  61 +}
  62 +.localconfig .tt
  63 +{
  64 + width:125px;
  65 +}
  66 +.localconfig .txt
  67 +{
  68 + width:310px;
  69 +}
  70 +.localconfig .txt2
  71 +{
  72 + width:300px;
  73 +}
  74 +.localconfig .btn
  75 +{
  76 + width:45px;
  77 + height:22px;
  78 + line-height:18px;
  79 +}
  80 +.localconfig .sel
  81 +{
  82 + width:120px;
  83 +}
  84 +/*登录*/
  85 +.login
  86 +{
  87 + width:480px;
  88 + padding:10px;
  89 + border:1px solid #7F9DB9;
  90 +}
  91 +.login .tt
  92 +{
  93 + width:100px;
  94 +}
  95 +.login .txt
  96 +{
  97 + width:130px;
  98 +}
  99 +.login .btn
  100 +{
  101 + width:45px;
  102 + height:22px;
  103 + line-height:18px;
  104 +}
  105 +.login .btn2
  106 +{
  107 + width:100px;
  108 + height:22px;
  109 + line-height:18px;
  110 +}
  111 +.login .sel
  112 +{
  113 + width:130px;
  114 +}
  115 +.login .sel2
  116 +{
  117 + width:65px;
  118 +}
  119 +/*数字通道*/
  120 +.ipchannel
  121 +{
  122 + width:480px;
  123 + padding:10px;
  124 + border:1px solid #7F9DB9;
  125 +}
  126 +.ipchannel .btn
  127 +{
  128 + width:130px;
  129 + height:22px;
  130 + line-height:18px;
  131 +}
  132 +.ipchannel .digitaltdiv
  133 +{
  134 + height:100px;
  135 + overflow:hidden;
  136 + overflow-y:auto;
  137 + border:1px solid #7F9DB9;
  138 + font-size:11px;
  139 +}
  140 +.ipchannel .digitalchannellist th, .ipchannel .digitalchannellist td
  141 +{
  142 + padding:2px;
  143 + border:1px solid #7F9DB9;
  144 + border-collapse:collapse;
  145 + white-space:nowrap;
  146 +}
  147 +/*预览*/
  148 +.preview
  149 +{
  150 + width:450px;
  151 + padding:10px;
  152 + padding-top:0;
  153 + margin-left:10px;
  154 + border:1px solid #7F9DB9;
  155 +}
  156 +.preview .tt
  157 +{
  158 + width:60px;
  159 +}
  160 +.preview .txt
  161 +{
  162 + width:30px;
  163 +}
  164 +.preview .btn
  165 +{
  166 + width:70px;
  167 + height:22px;
  168 + line-height:18px;
  169 +}
  170 +.preview .btn2
  171 +{
  172 + width:90px;
  173 + height:22px;
  174 + line-height:18px;
  175 +}
  176 +.preview .sel
  177 +{
  178 + width:105px;
  179 +}
  180 +/*云台*/
  181 +.ptz
  182 +{
  183 + width:450px;
  184 + padding:10px;
  185 + margin-left:10px;
  186 + border:1px solid #7F9DB9;
  187 +}
  188 +.ptz .tt
  189 +{
  190 + width:60px;
  191 +}
  192 +.ptz .txt
  193 +{
  194 + width:60px;
  195 +}
  196 +.ptz .btn
  197 +{
  198 + width:45px;
  199 + height:22px;
  200 + line-height:18px;
  201 +}
  202 +.ptz .btn2
  203 +{
  204 + width:60px;
  205 + height:22px;
  206 + line-height:18px;
  207 +}
  208 +.ptz .sel
  209 +{
  210 + width:65px;
  211 +}
  212 +/*视频参数*/
  213 +.videoparam
  214 +{
  215 + width:450px;
  216 + padding:10px;
  217 + margin-left:10px;
  218 + border:1px solid #7F9DB9;
  219 +}
  220 +.videoparam .tt
  221 +{
  222 + width:60px;
  223 +}
  224 +.videoparam .txt
  225 +{
  226 + width:60px;
  227 +}
  228 +.videoparam .btn
  229 +{
  230 + width:45px;
  231 + height:22px;
  232 + line-height:18px;
  233 +}
  234 +.videoparam .sel
  235 +{
  236 + width:65px;
  237 +}
  238 +/*回放*/
  239 +.playback
  240 +{
  241 + width:450px;
  242 + padding:10px;
  243 + margin-left:10px;
  244 + border:1px solid #7F9DB9;
  245 +}
  246 +.playback .tt
  247 +{
  248 + width:60px;
  249 +}
  250 +.playback .txt
  251 +{
  252 + width:140px;
  253 +}
  254 +.playback .btn
  255 +{
  256 + width:45px;
  257 + height:22px;
  258 + line-height:18px;
  259 +}
  260 +.playback .btn2
  261 +{
  262 + width:70px;
  263 + height:22px;
  264 + line-height:18px;
  265 +}
  266 +.playback .sel
  267 +{
  268 + width:142px;
  269 +}
  270 +.playback .searchdiv
  271 +{
  272 + height:100px;
  273 + overflow:hidden;
  274 + overflow-y:auto;
  275 + border:1px solid #7F9DB9;
  276 + font-size:11px;
  277 +}
  278 +.playback .searchlist th, .playback .searchlist td
  279 +{
  280 + padding:2px;
  281 + border:1px solid #7F9DB9;
  282 + border-collapse:collapse;
  283 + white-space:nowrap;
  284 +}
  285 +/*系统维护*/
  286 +.maintain
  287 +{
  288 + width:450px;
  289 + padding:10px;
  290 + margin-left:10px;
  291 + border:1px solid #7F9DB9;
  292 +}
  293 +.maintain .tt
  294 +{
  295 + width:60px;
  296 +}
  297 +.maintain .txt
  298 +{
  299 + width:280px;
  300 +}
  301 +.maintain .btn
  302 +{
  303 + width:45px;
  304 + height:22px;
  305 + line-height:18px;
  306 +}
  307 +.maintain .btn2
  308 +{
  309 + width:100px;
  310 + height:22px;
  311 + line-height:18px;
  312 +}
  313 +.maintain .sel
  314 +{
  315 + width:65px;
  316 +}
  317 +/*操作信息*/
  318 +.operate
  319 +{
  320 + width:450px;
  321 + padding:10px;
  322 + margin-left:10px;
  323 + border:1px solid #7F9DB9;
  324 +}
  325 +.operate .opinfo
  326 +{
  327 + height:150px;
  328 + border:1px solid #7F9DB9;
  329 + overflow:auto;
  330 +}
  331 +/*事件回调*/
  332 +.callback
  333 +{
  334 + width:450px;
  335 + padding:10px;
  336 + margin-left:10px;
  337 + border:1px solid #7F9DB9;
  338 +}
  339 +.callback .cbinfo
  340 +{
  341 + height:114px;
  342 + border:1px solid #7F9DB9;
  343 + overflow:auto;
  344 +}
  345 +/*IP解析*/
  346 +.ipparse
  347 +{
  348 + width:450px;
  349 + padding:10px;
  350 + margin-left:10px;
  351 + border:1px solid #7F9DB9;
  352 +}
  353 +.ipparse .tt
  354 +{
  355 + width:85px;
  356 +}
  357 +.ipparse .txt
  358 +{
  359 + width:130px;
  360 +}
  361 +.ipparse .btn
  362 +{
  363 + width:90px;
  364 + height:22px;
  365 + line-height:18px;
  366 +}
  367 +.ipparse .sel
  368 +{
  369 + width:130px;
  370 +}
  371 +/*绘图*/
  372 +.draw
  373 +{
  374 + width:450px;
  375 + padding:10px;
  376 + padding-top:0;
  377 + margin-left:10px;
  378 + border:1px solid #7F9DB9;
  379 +}
  380 +.draw .tt
  381 +{
  382 + width:60px;
  383 +}
  384 +.draw .txt
  385 +{
  386 + width:140px;
  387 +}
  388 +.draw .btn
  389 +{
  390 + width:70px;
  391 + height:22px;
  392 + line-height:18px;
  393 +}
  394 +.draw .btn2
  395 +{
  396 + width:100px;
  397 + height:22px;
  398 + line-height:18px;
  399 +}
  400 +.draw .sel
  401 +{
  402 + width:105px;
  403 +}
@@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@
49 49
50 } 50 }
51 .tabItem:hover,.tabItem.active{ 51 .tabItem:hover,.tabItem.active{
52 - background-color: #0b1943; 52 + background-color: #112a72;
53 } 53 }
54 .nullDiv{ 54 .nullDiv{
55 width:20%; 55 width:20%;
@@ -37,14 +37,14 @@ body{font-size: 15px;} @@ -37,14 +37,14 @@ body{font-size: 15px;}
37 37
38 } 38 }
39 .flex-data{ 39 .flex-data{
40 - width:55%; 40 + width:58%;
41 } 41 }
42 .flex-cloud{ 42 .flex-cloud{
43 - width:45% 43 + width:42%
44 } 44 }
45 .flex-declare{ 45 .flex-declare{
46 - width:323px;  
47 - max-width: 323px; 46 + width:330px;
  47 + /*max-width: 323px;*/
48 } 48 }
49 .flex-chart{ 49 .flex-chart{
50 flex:1; 50 flex:1;
@@ -12,8 +12,7 @@ export default { @@ -12,8 +12,7 @@ export default {
12 domainName:sessionStorage.getItem('domainName'), 12 domainName:sessionStorage.getItem('domainName'),
13 apiUrl:'/api-web/sxview/getBusinessAvailability', 13 apiUrl:'/api-web/sxview/getBusinessAvailability',
14 kpiIds:'KPI97B835A4,KPIFE85BE59,KPI7A29BAC3,KPIE7A7E3E4', 14 kpiIds:'KPI97B835A4,KPIFE85BE59,KPI7A29BAC3,KPIE7A7E3E4',
15 - // busId:'247c0c978f574285bf642f55611ea75d',  
16 - busId: '', 15 + busId: '385773d9f6314aac8756cf2b98ec0190',
17 performanceData:'', 16 performanceData:'',
18 xAxisData:'', 17 xAxisData:'',
19 yAxisData:'', 18 yAxisData:'',
@@ -70,29 +69,40 @@ export default { @@ -70,29 +69,40 @@ export default {
70 }; 69 };
71 $.get(proxy.domainName +proxy.apiUrl,params,function (res) { 70 $.get(proxy.domainName +proxy.apiUrl,params,function (res) {
72 const data = res; 71 const data = res;
  72 + let legendData=Vue.ref([]);
  73 + let xAxisData=Vue.ref([]);
  74 + let yAxisData=Vue.ref([]);
  75 + let mapData={
  76 + legend:[ "可用性","成功率","响应率","业务告警量"],
  77 + x:[ "10:00","10:15","10:30", "10:45","11:00","11:15","11:30","11:45","12:00","12:15","12:30","12:45", "13:00","13:15","13:30","13:45",
  78 + "14:00","14:15","14:30", "14:45","15:00","15:15","15:30","15:45","16:00","16:15","16:30","16:45", "17:00","17:15","17:30","17:45",
  79 + "18:00","18:15","18:30", "18:45","19:00","19:15","19:30","19:45","20:00","20:15","20:30","20:45", "21:00","21:15","21:30","21:45",
  80 + "22:00","22:15","22:30", "22:45","23:00","23:15","23:30","23:45","00:00","00:15","00:30","00:45", "01:00","01:15","01:30","01:45",
  81 + "02:00","02:15","02:30", "02:45","03:00","03:15","03:30","03:45","04:00","04:15","04:30","04:45", "05:00","05:15","05:30","05:45",
  82 + "06:00","06:15","06:30", "06:45","07:00","07:15","07:30","07:45","08:00","08:15","08:30","08:45", "09:00","09:15","09:30","09:45",
  83 + "10:00"
  84 + ],
  85 + y:[[ 0,1,0,0,0,0,0,0],[ 0,0,0,0,0,0,0,0],[ 0,0,0,0,0,0,0,0],[ 0,0,0,0,0,0,0,0]
  86 + ]
  87 + }
73 if (data ) { 88 if (data ) {
74 if(data.map){ 89 if(data.map){
75 let resData=data.map; 90 let resData=data.map;
76 - proxy.legendData=resData.legend;  
77 - proxy.xAxisData=resData.x;  
78 - proxy.yAxisData=resData.y;  
79 - }else{  
80 - let nullArr=[];  
81 - for(let i=0;i<4;i++){  
82 - nullArr.push(i)  
83 - proxy.legendData.push({  
84 - name:''  
85 - })  
86 - }  
87 - proxy.xAxisData=nullArr;  
88 - for(let i=0;i<4;i++){  
89 - proxy.yAxisData.push(nullArr);  
90 - 91 + if(!resData.x || resData.x.length==0){
  92 + resData=mapData;
91 } 93 }
  94 + xAxisData=resData.x;
  95 + yAxisData=resData.y;
  96 + legendData=resData.legend;
92 97
  98 + }else{
  99 + xAxisData=mapData.x;
  100 + yAxisData=mapData.y;
  101 + legendData=mapData.legend;
93 } 102 }
94 -  
95 - 103 + proxy.legendData= legendData;
  104 + proxy.xAxisData=xAxisData;
  105 + proxy.yAxisData=yAxisData;
96 proxy.optionInit(); 106 proxy.optionInit();
97 107
98 } 108 }
@@ -106,13 +116,9 @@ export default { @@ -106,13 +116,9 @@ export default {
106 116
107 let data3=proxy.yAxisData[0]; 117 let data3=proxy.yAxisData[0];
108 let data4=proxy.yAxisData[3]; 118 let data4=proxy.yAxisData[3];
109 - let data2=proxy.yAxisData[2];  
110 - let data1=proxy.yAxisData[1];  
111 -  
112 - let min1=proxy.calMin([data1,data2]);  
113 - let max1=proxy.calMax([data1,data2]);  
114 let min2=proxy.calMin([data3,data4]); 119 let min2=proxy.calMin([data3,data4]);
115 let max2=proxy.calMax([data3,data4]); 120 let max2=proxy.calMax([data3,data4]);
  121 + let ySeriesCommon=[];
116 proxy.legendData.map((item,index)=>{ 122 proxy.legendData.map((item,index)=>{
117 let i=0; 123 let i=0;
118 if(index%2==0 ||index%3==0){ 124 if(index%2==0 ||index%3==0){
@@ -120,7 +126,7 @@ export default { @@ -120,7 +126,7 @@ export default {
120 }else{ 126 }else{
121 i=1; 127 i=1;
122 } 128 }
123 - proxy.ySeriesCommon.push( 129 + ySeriesCommon.push(
124 { 130 {
125 name:item, 131 name:item,
126 type: 'line', 132 type: 'line',
@@ -156,6 +162,7 @@ export default { @@ -156,6 +162,7 @@ export default {
156 ) 162 )
157 }) 163 })
158 //业务双y轴数据 164 //业务双y轴数据
  165 + proxy.ySeriesCommon=ySeriesCommon;
159 166
160 // let xAxisDataLength=proxy.ySeriesCommon[0].length; 167 // let xAxisDataLength=proxy.ySeriesCommon[0].length;
161 let xAxisData=[]; 168 let xAxisData=[];
@@ -58,7 +58,7 @@ export default { @@ -58,7 +58,7 @@ export default {
58 }) 58 })
59 59
60 }) 60 })
61 - xAxisData=ret.ports[0].x 61 + xAxisData=ret.ports[0].data.x
62 }else{ 62 }else{
63 for(let i=0;i<12;i++){ 63 for(let i=0;i<12;i++){
64 dataArr.push('0') 64 dataArr.push('0')
@@ -26,6 +26,20 @@ export default { @@ -26,6 +26,20 @@ export default {
26 today: ["00", "02", "04", "06", "08", "10", "12", "14", "16", "18", "20", "22"] 26 today: ["00", "02", "04", "06", "08", "10", "12", "14", "16", "18", "20", "22"]
27 } 27 }
28 }, 28 },
  29 + res1:{
  30 + code:'0',
  31 + data:{
  32 + kpiUnit:'%',
  33 + names:['20:10','21:10','22:15','23:15'],
  34 + series:[
  35 + {
  36 + name:'89.12.97.3',
  37 + datas:[1,1,1,1,1,1,1,1],
  38 + flag:'vmem'
  39 + }
  40 + ]
  41 + }
  42 + },
29 startValue: 0, // 区域缩放的起点值 43 startValue: 0, // 区域缩放的起点值
30 endValue: 9, // 区域缩放的终点值 44 endValue: 9, // 区域缩放的终点值
31 timerId: null, // 定时器的标识 45 timerId: null, // 定时器的标识
@@ -58,7 +72,7 @@ export default { @@ -58,7 +72,7 @@ export default {
58 }, 72 },
59 methods: { 73 methods: {
60 getData1(that){ 74 getData1(that){
61 - const { proxy } = Vue.getCurrentInstance(); 75 + // const { proxy } = Vue.getCurrentInstance();
62 76
63 var params = { 77 var params = {
64 resId: that.resId1, 78 resId: that.resId1,
@@ -68,33 +82,28 @@ export default { @@ -68,33 +82,28 @@ export default {
68 endTime:'', 82 endTime:'',
69 access_token:localStorage.getItem("access_token") 83 access_token:localStorage.getItem("access_token")
70 }; 84 };
71 - // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) {  
72 - var res1={  
73 - code:'0',  
74 - data:{  
75 - kpiUnit:'%',  
76 - names:['20:10','21:10','22:15','23:15'],  
77 - series:[  
78 - {  
79 - name:'89.12.97.3',  
80 - datas:[0.8,1,1,1,1,0.7,1,1],  
81 - flag:'vmem'  
82 - }  
83 - ] 85 + that.$http.get("/api-web/detail/his/line/base", params, function (res) {
  86 +
  87 + let resData='';
  88 + if(res && res.data){
  89 + if(res.data.series && res.data.series.length>0){
  90 + resData=res.data;
  91 + }else{
  92 + resData=that.res1.data;
84 } 93 }
85 - }  
86 - if(res1 && res1.data){  
87 - let resData=res1.data;  
88 - that.allData.polyline.data.push(resData.series[0])  
89 - console.log("123",that.allData)  
90 - that.updateChart() 94 + }else{
  95 + resData=that.res1.data;
91 96
92 } 97 }
93 - // }); 98 + that.allData.polyline.data.push(resData.series[0])
  99 + that.updateChart()
  100 +
  101 +
  102 + });
94 }, 103 },
95 104
96 getData (that) { 105 getData (that) {
97 - const { proxy } = Vue.getCurrentInstance(); 106 + // const { proxy } = Vue.getCurrentInstance();
98 var params = { 107 var params = {
99 resId: that.resId, 108 resId: that.resId,
100 kpiIds: that.kpiIds, 109 kpiIds: that.kpiIds,
@@ -103,39 +112,34 @@ export default { @@ -103,39 +112,34 @@ export default {
103 endTime:'', 112 endTime:'',
104 access_token:localStorage.getItem("access_token") 113 access_token:localStorage.getItem("access_token")
105 }; 114 };
106 - // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) {  
107 - var res={  
108 - code:'0',  
109 - data:{  
110 - kpiUnit:'%',  
111 - names:['20:10','21:10','22:15','23:15'],  
112 - series:[  
113 - {  
114 - name:'89.12.97.2',  
115 - datas:[1,1,1,1,1,1,1,1],  
116 - flag:'vmem'  
117 - }  
118 - ]  
119 - }  
120 - } 115 + that.$http.get("/api-web/detail/his/line/base", params, function (res) {
  116 +
  117 + let resData='';
  118 + let seriesData1=[];
121 if(res && res.data){ 119 if(res && res.data){
122 - let resData=res.data;  
123 - let seriesData1=[];  
124 - seriesData1.push(resData.series[0])  
125 - // that.seriesData1=resData.series;  
126 - that.allData = {  
127 - polyline: {  
128 - title: "申报库CPU监控",  
129 - unit: "cpu%",  
130 - data: seriesData1  
131 - },  
132 - xAxis: {  
133 - today:resData.names  
134 - }  
135 - };  
136 - that.getData1(that) 120 + if(res.data.series && res.data.series.length>0){
  121 + resData=res.data;
  122 + }else{
  123 + resData=that.res1.data;
  124 + }
  125 +
  126 + }else{
  127 + resData=that.res1.data;
137 } 128 }
138 - // }); 129 + seriesData1.push(resData.series[0])
  130 + that.allData = {
  131 + polyline: {
  132 + title: "申报库CPU监控",
  133 + unit: "cpu%",
  134 + data: seriesData1
  135 + },
  136 + xAxis: {
  137 + today:resData.names
  138 + }
  139 + };
  140 + that.getData1(that)
  141 +
  142 + });
139 143
140 }, 144 },
141 updateChart () { 145 updateChart () {
@@ -28,9 +28,10 @@ @@ -28,9 +28,10 @@
28 <el-row> 28 <el-row>
29 <el-col :span="24"> 29 <el-col :span="24">
30 <div class="grid-content bg-purple-dark rate-container" :style="comtitletextStyle"> 30 <div class="grid-content bg-purple-dark rate-container" :style="comtitletextStyle">
31 - <div class="rate-num">  
32 - <span>{{declareRateLeft}}</span><span :style="comboxtextStyle">{{declareRateRight}}</span>  
33 - </div> 31 + <GaugeChart :optionData="optionData" v-if="optionData"></GaugeChart>
  32 +<!-- <div class="rate-num">-->
  33 +<!-- <span>{{declareRateLeft}}</span><span :style="comboxtextStyle">{{declareRateRight}}</span>-->
  34 +<!-- </div>-->
34 35
35 </div> 36 </div>
36 </el-col> 37 </el-col>
1 export default { 1 export default {
2 name: 'declareReport', 2 name: 'declareReport',
3 template: '', 3 template: '',
4 - components: {}, 4 + components: {
  5 + 'GaugeChart': Vue.defineAsyncComponent(
  6 + () => myImport('views/dp/components/gaugeChart/index')
  7 + )
  8 + },
5 data () { 9 data () {
6 return { 10 return {
7 allData:{}, 11 allData:{},
@@ -12,14 +16,15 @@ export default { @@ -12,14 +16,15 @@ export default {
12 declareNumer: 0, 16 declareNumer: 0,
13 curve: 'KPIDA0ACBBP', 17 curve: 'KPIDA0ACBBP',
14 rateTitle: 'KPIDA0ACBBK', 18 rateTitle: 'KPIDA0ACBBK',
15 - numerTitle: 'KPIDA0ACBBG' 19 + numerTitle: 'KPIDA0ACBBG',
  20 + optionData:''
16 } 21 }
17 }, 22 },
18 computed: { 23 computed: {
19 comtitletextStyle () { 24 comtitletextStyle () {
20 return { 25 return {
21 color: '#23ffff', 26 color: '#23ffff',
22 - fontSize: this.titleFontSize * 3 + 'px' 27 + fontSize: this.titleFontSize * 3.2 + 'px'
23 } 28 }
24 }, 29 },
25 comtitlesizeStyle () { 30 comtitlesizeStyle () {
@@ -58,15 +63,90 @@ export default { @@ -58,15 +63,90 @@ export default {
58 const declareRate = that.allData.polyline.declareRate 63 const declareRate = that.allData.polyline.declareRate
59 if(declareRate.indexOf('.') > 0){ 64 if(declareRate.indexOf('.') > 0){
60 that.declareRateLeft = declareRate.split('.')[0] + '.' 65 that.declareRateLeft = declareRate.split('.')[0] + '.'
61 - that.declareRateRight = declareRate.split('.')[1] 66 + that.declareRateLeft = declareRate.split('.')[1]
  67 + }
  68 + let declareRateNum=0;
  69 + if(declareRate.indexOf('%') > 0){
  70 + declareRateNum = declareRate.split('%')[0]
62 } 71 }
  72 + that.declareRate=declareRateNum;
63 that.declareNumer = that.allData.polyline.declareNumer 73 that.declareNumer = that.allData.polyline.declareNumer
  74 + that.optionInit();
64 75
65 76
66 } 77 }
67 }); 78 });
68 79
69 }, 80 },
  81 + optionInit(){
  82 + const gaugeData = [
  83 + {
  84 + value: this.declareRate,
  85 + detail: {
  86 + valueAnimation: true,
  87 + offsetCenter: ['0%', '0%']
  88 + }
  89 + },
  90 +
  91 + ];
  92 + this.optionData={
  93 + series: [
  94 + {
  95 + type: 'gauge',
  96 + startAngle: 90,
  97 + endAngle: -270,
  98 + pointer: {
  99 + show: false
  100 + },
  101 + progress: {
  102 + show: true,
  103 + overlap: false,
  104 + roundCap: true,
  105 + clip: false,
  106 + itemStyle: {
  107 + borderWidth: 1,
  108 + borderColor: '#23fffc'
  109 + }
  110 + },
  111 + itemStyle:{
  112 + normal:{
  113 + color:'#23fffc'
  114 + }
  115 + },
  116 + axisLine: {
  117 + lineStyle: {
  118 + width: 15,
  119 + color:[[1,'#1b5453']],
  120 + }
  121 + },
  122 + splitLine: {
  123 + show: false,
  124 + distance: 0,
  125 + length: 10
  126 + },
  127 + axisTick: {
  128 + show: false
  129 + },
  130 + axisLabel: {
  131 + show: false,
  132 + distance: 50
  133 + },
  134 + data: gaugeData,
  135 + title: {
  136 + fontSize: 14
  137 + },
  138 + detail: {
  139 + width: 50,
  140 + height: 14,
  141 + fontSize: 14,
  142 + color: 'auto',
  143 + borderWidth: 0,
  144 + formatter: '{value}%'
  145 + }
  146 + }
  147 + ]
  148 + }
  149 + },
70 screenAdapter () { 150 screenAdapter () {
71 this.titleFontSize = document.getElementById('declareReport_ref').offsetWidth / 100 * 3.6 151 this.titleFontSize = document.getElementById('declareReport_ref').offsetWidth / 100 * 3.6
72 } 152 }
@@ -25,6 +25,20 @@ export default { @@ -25,6 +25,20 @@ export default {
25 today: ["00", "02", "04", "06", "08", "10", "12", "14", "16", "18", "20", "22"] 25 today: ["00", "02", "04", "06", "08", "10", "12", "14", "16", "18", "20", "22"]
26 } 26 }
27 }, 27 },
  28 + res1:{
  29 + code:'0',
  30 + data:{
  31 + kpiUnit:'%',
  32 + names:['20:10','21:10','22:15','23:15'],
  33 + series:[
  34 + {
  35 + name:'89.12.97.3',
  36 + datas:[1,1,1,1,1,1,1,1],
  37 + flag:'vmem'
  38 + }
  39 + ]
  40 + }
  41 + },
28 titleFontSize: 30, 42 titleFontSize: 30,
29 kpiIds:'KPI20352505', 43 kpiIds:'KPI20352505',
30 resId:'166eb917fe734dafa2d2474b0a66c37b', 44 resId:'166eb917fe734dafa2d2474b0a66c37b',
@@ -52,7 +66,7 @@ export default { @@ -52,7 +66,7 @@ export default {
52 methods: { 66 methods: {
53 67
54 getData1(that){ 68 getData1(that){
55 - const { proxy } = Vue.getCurrentInstance(); 69 + // const { proxy } = Vue.getCurrentInstance();
56 70
57 var params = { 71 var params = {
58 resId: that.resId1, 72 resId: that.resId1,
@@ -62,33 +76,26 @@ export default { @@ -62,33 +76,26 @@ export default {
62 endTime:'', 76 endTime:'',
63 access_token:localStorage.getItem("access_token") 77 access_token:localStorage.getItem("access_token")
64 }; 78 };
65 - // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) {  
66 - var res1={  
67 - code:'0',  
68 - data:{  
69 - kpiUnit:'%',  
70 - names:['20:10','21:10','22:15','23:15'],  
71 - series:[  
72 - {  
73 - name:'89.12.97.3',  
74 - datas:[0.7,1,1,0.7,1,0.7,0.5,1],  
75 - flag:'vmem'  
76 - }  
77 - ] 79 + that.$http.get("/api-web/detail/his/line/base", params, function (res) {
  80 +
  81 + let resData='';
  82 + if(res && res.data){
  83 + if(res.data.series && res.data.series.length>0){
  84 + resData=res.data;
  85 + }else{
  86 + resData=that.res1.data;
  87 + }
  88 +
  89 + }else{
  90 + resData=that.res1.data
78 } 91 }
79 - }  
80 - if(res1 && res1.data){  
81 - let resData=res1.data;  
82 that.allData.polyline.data.push(resData.series[0]) 92 that.allData.polyline.data.push(resData.series[0])
83 - console.log("123",that.allData)  
84 that.updateChart() 93 that.updateChart()
85 -  
86 - }  
87 - // }); 94 + });
88 }, 95 },
89 96
90 getData (that) { 97 getData (that) {
91 - const { proxy } = Vue.getCurrentInstance(); 98 + // const { proxy } = Vue.getCurrentInstance();
92 var params = { 99 var params = {
93 resId: that.resId, 100 resId: that.resId,
94 kpiIds: that.kpiIds, 101 kpiIds: that.kpiIds,
@@ -97,26 +104,20 @@ export default { @@ -97,26 +104,20 @@ export default {
97 endTime:'', 104 endTime:'',
98 access_token:localStorage.getItem("access_token") 105 access_token:localStorage.getItem("access_token")
99 }; 106 };
100 - // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) {  
101 - var res={  
102 - code:'0',  
103 - data:{  
104 - kpiUnit:'%',  
105 - names:['20:10','21:10','22:15','23:15'],  
106 - series:[  
107 - {  
108 - name:'89.12.97.2',  
109 - datas:[0.9,0.9,1,1,0.9,1,1,1],  
110 - flag:'vmem'  
111 - }  
112 - ]  
113 - }  
114 - }  
115 - if(res && res.data){  
116 - let resData=res.data; 107 + that.$http.get("/api-web/detail/his/line/base", params, function (res) {
  108 +
  109 + let resData='';
117 let seriesData1=[]; 110 let seriesData1=[];
118 - seriesData1.push(resData.series[0])  
119 - // that.seriesData1=resData.series; 111 + if(res && res.data){
  112 + if(res.data.series && res.data.series.length>0){
  113 + resData=res.data;
  114 + }else{
  115 + resData=that.res1.data;
  116 + }
  117 + }else{
  118 + resData=that.res1.data;
  119 + }
  120 + seriesData1.push(resData.series[0]);
120 that.allData = { 121 that.allData = {
121 polyline: { 122 polyline: {
122 title: "文书库CPU监控", 123 title: "文书库CPU监控",
@@ -128,8 +129,8 @@ export default { @@ -128,8 +129,8 @@ export default {
128 } 129 }
129 }; 130 };
130 that.getData1(that) 131 that.getData1(that)
131 - }  
132 - // }); 132 +
  133 + });
133 134
134 }, 135 },
135 updateChart () { 136 updateChart () {
  1 +<div id="gauge-echart" style="width:100%;height:100%;"></div>
  1 +export default {
  2 + name: 'gaugeChart',
  3 + template: '',
  4 + props:['optionData'],
  5 + components: {
  6 + },
  7 + data(){
  8 + return {
  9 + chartId:'gaoge-echart'
  10 +
  11 + }
  12 + },
  13 + setup(props, {attrs, slots, emit}) {
  14 + const {proxy} = Vue.getCurrentInstance();
  15 + // 挂载完
  16 + Vue.onMounted(() => {
  17 + const chartDom=proxy.$el
  18 + const myChart = echarts.init(chartDom);
  19 + let option=props.optionData;
  20 +
  21 +
  22 +
  23 + window.addEventListener('resize', function () {
  24 +
  25 + myChart.resize();
  26 + });
  27 + option && myChart.setOption(option);
  28 +
  29 + })
  30 + return{
  31 +
  32 + }
  33 + }
  34 +}
@@ -70,7 +70,7 @@ export default { @@ -70,7 +70,7 @@ export default {
70 title:"系统响应请求数监控", 70 title:"系统响应请求数监控",
71 unit: "MB", 71 unit: "MB",
72 data: { 72 data: {
73 - name: "请求应数/秒", 73 + name: "请求应数/秒",
74 data: dataArr 74 data: dataArr
75 } 75 }
76 }, 76 },
@@ -122,7 +122,7 @@ export default { @@ -122,7 +122,7 @@ export default {
122 text: title, 122 text: title,
123 left: '10%', 123 left: '10%',
124 textStyle: { 124 textStyle: {
125 - fontSize: this.titleFontSize*0.5, 125 + fontSize: this.titleFontSize*0.6,
126 color:'#ffffff' 126 color:'#ffffff'
127 } 127 }
128 }, 128 },
@@ -47,20 +47,23 @@ export default { @@ -47,20 +47,23 @@ export default {
47 //华为云、阿里云、Vmware、小型机分区、存储、路由器资源总量统计量 47 //华为云、阿里云、Vmware、小型机分区、存储、路由器资源总量统计量
48 // 遍历过滤出以上6种类型的统计,因为是固定6种,所以先写死 48 // 遍历过滤出以上6种类型的统计,因为是固定6种,所以先写死
49 $.each(data.object,function (i,v) { 49 $.each(data.object,function (i,v) {
50 - const resType = v.code; 50 + if(i<6){
  51 + showData.push(v)
  52 + }
  53 + /* const resType = v.code;
51 if(resType.indexOf("HUAWEI_CLOUD_PLAT") >= 0 ) { huawei += v.num; } 54 if(resType.indexOf("HUAWEI_CLOUD_PLAT") >= 0 ) { huawei += v.num; }
52 if(resType.indexOf("ALI_CLOUD_PLAT") >= 0 ) { ali += v.num; } 55 if(resType.indexOf("ALI_CLOUD_PLAT") >= 0 ) { ali += v.num; }
53 if(resType.indexOf("VIRTUALIZATION_VMWARE") >= 0 ) { vmware += v.num; } 56 if(resType.indexOf("VIRTUALIZATION_VMWARE") >= 0 ) { vmware += v.num; }
54 if(resType.indexOf('HOST_MINICOMPUTER_PARTITION') >= 0 ) { minicomputer_partition += v.num; } 57 if(resType.indexOf('HOST_MINICOMPUTER_PARTITION') >= 0 ) { minicomputer_partition += v.num; }
55 if(resType.indexOf('HUAWEI_CLOUD_STORAGE') >= 0) { storage += v.num; } 58 if(resType.indexOf('HUAWEI_CLOUD_STORAGE') >= 0) { storage += v.num; }
56 - if(resType == 'NETHARDWARE_ROUTER' ) { router += v.num; } 59 + if(resType == 'NETHARDWARE_ROUTER' ) { router += v.num; }*/
57 }); 60 });
58 - showData.push({name:"华为云",num:huawei,code:'HUAWEI_CLOUD_PLAT'}); 61 + /* showData.push({name:"华为云",num:huawei,code:'HUAWEI_CLOUD_PLAT'});
59 showData.push({name:"阿里云",num:ali,code:'ALI_CLOUD_PLAT'}); 62 showData.push({name:"阿里云",num:ali,code:'ALI_CLOUD_PLAT'});
60 showData.push({name:"Vmware",num:vmware,code:'VIRTUALIZATION_VMWARE'}); 63 showData.push({name:"Vmware",num:vmware,code:'VIRTUALIZATION_VMWARE'});
61 showData.push({name:"小型机分区",num:minicomputer_partition,code:'HOST_MINICOMPUTER'}); 64 showData.push({name:"小型机分区",num:minicomputer_partition,code:'HOST_MINICOMPUTER'});
62 showData.push({name:"存储",num:storage,code:'STORAGE'}); 65 showData.push({name:"存储",num:storage,code:'STORAGE'});
63 - showData.push({name:"路由器",num:router,code:'NETHARDWARE_ROUTER'}); 66 + showData.push({name:"路由器",num:router,code:'NETHARDWARE_ROUTER'});*/
64 //类型统计 67 //类型统计
65 68
66 proxy.assetOverviewData=showData; 69 proxy.assetOverviewData=showData;
@@ -6,7 +6,6 @@ export default { @@ -6,7 +6,6 @@ export default {
6 }, 6 },
7 data(){ 7 data(){
8 return { 8 return {
9 - domainName:'http://192.168.0.159:8080/api-web',  
10 chartId:'bar-echart' 9 chartId:'bar-echart'
11 10
12 } 11 }
@@ -88,7 +88,7 @@ export default { @@ -88,7 +88,7 @@ export default {
88 }, 88 },
89 { 89 {
90 top: '51px', // 3 90 top: '51px', // 3
91 - left: '224px' 91 + left: '232px'
92 }, 92 },
93 { 93 {
94 top: '150px', // 4 94 top: '150px', // 4
@@ -96,7 +96,7 @@ export default { @@ -96,7 +96,7 @@ export default {
96 }, 96 },
97 { 97 {
98 top: '150px', // 5 98 top: '150px', // 5
99 - left: '230px' 99 + left: '232px'
100 }, 100 },
101 { 101 {
102 top: '205px', // 6 102 top: '205px', // 6
@@ -5,10 +5,10 @@ @@ -5,10 +5,10 @@
5 5
6 </div> 6 </div>
7 <div class="sjzx"> 7 <div class="sjzx">
8 - <div class="item sjzx_machineroom" v-for="item in jfdata">  
9 - <h5>{{item.machineRoomName}}</h5>  
10 - <img v-if="item.healthStatus==0" src="/vue3/src/assets/images/zjdp/jifang-1.png" alt="">  
11 - <img else="item.healthStatus==1" src="/vue3/src/assets/images/zjdp/jifang-2.png" alt=""> 8 + <div class="item sjzx_machineroom" v-for="item in jfdata" >
  9 + <h5 @click="isShowOuter(item)">{{item.machineRoomName}}</h5>
  10 + <img @click="isShow(item)" v-if="item.healthStatus==0" src="/vue3/src/assets/images/zjdp/jifang-1.png" alt="">
  11 + <img @click="isShow(item)" else="item.healthStatus==1" src="/vue3/src/assets/images/zjdp/jifang-2.png" alt="">
12 <ul class="float-container"> 12 <ul class="float-container">
13 <li><i class='icon-wd'></i><span>温度:{{item.wd}}</span></li> 13 <li><i class='icon-wd'></i><span>温度:{{item.wd}}</span></li>
14 <li><i class='icon-sd'></i><span>湿度:{{item.sd}}</span></li> 14 <li><i class='icon-sd'></i><span>湿度:{{item.sd}}</span></li>
@@ -19,4 +19,34 @@ @@ -19,4 +19,34 @@
19 19
20 </div> 20 </div>
21 </div> 21 </div>
  22 + <!--机房视频弹框-->
  23 + <el-dialog class="data-dialog" v-model="centerDialogVisible" :title="dialogMachineName" width="60%" >
  24 + <div class="machine-video">
  25 + <el-row>
  26 + <el-col class="video-item" :span="12" v-for="i in 4">
  27 + <iframe :src="'/zjdp/video.html?type='+dialogMachineName+'&access_token='+accessToken" frameborder="0"></iframe>
  28 + </el-col>
  29 + </el-row>
  30 + </div>
  31 + </el-dialog>
  32 +
  33 + <!--机房布局-->
  34 + <el-dialog v-model="outerVisible" title="机房布局" width="60%">
  35 + <el-row>
  36 + <el-col :span="11"></el-col>
  37 + <el-col :span="2">过道</el-col>
  38 + <el-col :span="11"></el-col>
  39 + </el-row>
  40 + <template #default>
  41 + <el-dialog
  42 + v-model="innerVisible"
  43 + width="60%"
  44 + title="Inner Dialog"
  45 + append-to-body
  46 + >
  47 + </el-dialog>
  48 + </template>
  49 +
  50 + </el-dialog>
  51 +
22 </div> 52 </div>
@@ -5,8 +5,10 @@ export default { @@ -5,8 +5,10 @@ export default {
5 data(){ 5 data(){
6 return { 6 return {
7 domainName:sessionStorage.getItem('domainName'), 7 domainName:sessionStorage.getItem('domainName'),
  8 + accessToken:localStorage.getItem('access_token'),
8 apiUrl:'/api-web/bigScreen/getMachineRoomInfoList', 9 apiUrl:'/api-web/bigScreen/getMachineRoomInfoList',
9 - jfdata:'' 10 + jfdata:'',
  11 + dialogMachineName:'',
10 } 12 }
11 }, 13 },
12 setup(props, {attrs, slots, emit}) { 14 setup(props, {attrs, slots, emit}) {
@@ -35,9 +37,25 @@ export default { @@ -35,9 +37,25 @@ export default {
35 });*/ 37 });*/
36 } 38 }
37 }) 39 })
  40 + proxy.jfdata=[
  41 + {machineRoomName:'兴议机房',wd:'0',sd:'0',area:'0'},
  42 + {machineRoomName:'湖州机房',wd:'0',sd:'0',area:'0'}
  43 + ]
38 }) 44 })
  45 + const isShow=(item)=>{
  46 + proxy.dialogMachineName=item.machineRoomName
  47 + proxy.centerDialogVisible = true
  48 + }
  49 + const isShowOuter=(item)=>{
  50 + proxy.outerVisible = true
39 51
  52 + }
40 return{ 53 return{
  54 + centerDialogVisible: Vue.ref(false),
  55 + outerVisible: Vue.ref(false),
  56 + innerVisible: Vue.ref(false),
  57 + isShowOuter,
  58 + isShow
41 } 59 }
42 } 60 }
43 } 61 }
@@ -40,14 +40,11 @@ @@ -40,14 +40,11 @@
40 <div class="declare-title"> 40 <div class="declare-title">
41 <div class="declare-bg volume-today"></div> 41 <div class="declare-bg volume-today"></div>
42 </div> 42 </div>
43 - <div v-if="volumdData" class="volume-today-container" v-for="(item,index) in volumeData"> 43 + <div v-if="volumeData" class="volume-today-container" v-for="(item,index) in volumeData">
44 <span class="volume-text">{{item.name}}</span> 44 <span class="volume-text">{{item.name}}</span>
45 <span :class="['volume-proportion',{'volume-proportion-doc':index==1,'volume-proportion-net':index==2}]" :style="item.styleVolume"></span> 45 <span :class="['volume-proportion',{'volume-proportion-doc':index==1,'volume-proportion-net':index==2}]" :style="item.styleVolume"></span>
46 <span class="volume-num">{{item.num1}}</span> 46 <span class="volume-num">{{item.num1}}</span>
47 </div> 47 </div>
48 - <div class="volume-today-container" v-else style="justify-content: center;">  
49 - <span>0</span>  
50 - </div>  
51 48
52 </div> 49 </div>
53 </div> 50 </div>
@@ -49,7 +49,8 @@ export default { @@ -49,7 +49,8 @@ export default {
49 proxy.allData = res.obj; 49 proxy.allData = res.obj;
50 const declareRate = proxy.allData.polyline.declareRate 50 const declareRate = proxy.allData.polyline.declareRate
51 51
52 - proxy.reportable = proxy.allData.polyline.declareNumer 52 + let reportable = proxy.allData.polyline.declareNumer
  53 + proxy.reportable=proxy.numberFilter(reportable,-1);
53 let declareRateNum=0; 54 let declareRateNum=0;
54 if(declareRate.indexOf('%') > 0){ 55 if(declareRate.indexOf('%') > 0){
55 declareRateNum = parseInt(declareRate.split('%')[0] ) 56 declareRateNum = parseInt(declareRate.split('%')[0] )
@@ -95,6 +96,23 @@ export default { @@ -95,6 +96,23 @@ export default {
95 //业务量 96 //业务量
96 $.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),function (res) { 97 $.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),function (res) {
97 const data = res; 98 const data = res;
  99 + let noVlumeData=[
  100 + {
  101 + name:'网络发票',
  102 + num1:'0',
  103 + styleVolume:'width:150px;'
  104 + },
  105 + {
  106 + name:'涉税文书',
  107 + num1:'0',
  108 + styleVolume:'width:150px;'
  109 + },
  110 + {
  111 + name:'网上申报',
  112 + num1:'0',
  113 + styleVolume:'width:150px;'
  114 + }
  115 + ]
98 if(data && data.data){ 116 if(data && data.data){
99 let volumeData=data.data; 117 let volumeData=data.data;
100 let maxVal=0; 118 let maxVal=0;
@@ -109,6 +127,9 @@ export default { @@ -109,6 +127,9 @@ export default {
109 }) 127 })
110 proxy.volumeData=volumeData; 128 proxy.volumeData=volumeData;
111 129
  130 + }else{
  131 + proxy.volumeData=noVlumeData;
  132 +
112 } 133 }
113 134
114 }) 135 })
@@ -15,6 +15,7 @@ export default { @@ -15,6 +15,7 @@ export default {
15 yAxisCommon:[], 15 yAxisCommon:[],
16 ySeriesCommon:[], 16 ySeriesCommon:[],
17 legendData:[], 17 legendData:[],
  18 + xAxisDataDate:[],
18 optionData:'', 19 optionData:'',
19 colorData:["#97d5f4",'#efe0a7','#e5abd1'], 20 colorData:["#97d5f4",'#efe0a7','#e5abd1'],
20 chartId:'line-echart-declare' 21 chartId:'line-echart-declare'
@@ -40,6 +41,7 @@ export default { @@ -40,6 +41,7 @@ export default {
40 if (data && data.data) { 41 if (data && data.data) {
41 let declareLineData=data.data; 42 let declareLineData=data.data;
42 let legendData=[]; 43 let legendData=[];
  44 + let xAxisDataDate=[];
43 $.each(declareLineData,function (i,v){ 45 $.each(declareLineData,function (i,v){
44 ySeriesCommon.push({ 46 ySeriesCommon.push({
45 name:v.name, 47 name:v.name,
@@ -62,11 +64,13 @@ export default { @@ -62,11 +64,13 @@ export default {
62 } 64 }
63 }, 65 },
64 }) 66 })
65 - legendData.push(v.name) 67 + legendData.push(v.name);
  68 + xAxisDataDate.push(v.days);
66 69
67 }) 70 })
68 proxy.ySeriesCommon=ySeriesCommon; 71 proxy.ySeriesCommon=ySeriesCommon;
69 proxy.legendData=legendData; 72 proxy.legendData=legendData;
  73 + proxy.xAxisDataDate=xAxisDataDate[0];
70 proxy.optionInit(); 74 proxy.optionInit();
71 } 75 }
72 }) 76 })
@@ -74,11 +78,7 @@ export default { @@ -74,11 +78,7 @@ export default {
74 78
75 }) 79 })
76 const optionInit=()=>{ 80 const optionInit=()=>{
77 - let xAxisDataLength=proxy.ySeriesCommon[0].data.length;  
78 - let xAxisData=[];  
79 - for(let i=1;i<=xAxisDataLength;i++){  
80 - xAxisData.push(i)  
81 - } 81 +
82 proxy.optionData = { 82 proxy.optionData = {
83 title: { 83 title: {
84 text: '' 84 text: ''
@@ -112,7 +112,7 @@ export default { @@ -112,7 +112,7 @@ export default {
112 xAxis: { 112 xAxis: {
113 type: 'category', 113 type: 'category',
114 boundaryGap: false, 114 boundaryGap: false,
115 - data: xAxisData, 115 + data: proxy.xAxisDataDate,
116 116
117 axisLine:{ 117 axisLine:{
118 show:false,//是否显示坐标线 118 show:false,//是否显示坐标线
@@ -19,6 +19,7 @@ export default { @@ -19,6 +19,7 @@ export default {
19 timer:null, 19 timer:null,
20 domainName:sessionStorage.getItem('domainName'), 20 domainName:sessionStorage.getItem('domainName'),
21 apiUrl:'/api-web/sxview/getbizListByUser?access_token=', 21 apiUrl:'/api-web/sxview/getbizListByUser?access_token=',
  22 + apiUrl1:'/api-web/sxview/getHealthDegree?busId=53bebbd79f384f619513b50666ea1d48&kpiId=KPIFB844B8B',
22 checkId:0,//当前选中的tabs 23 checkId:0,//当前选中的tabs
23 listItem:1,//轮播数-总页数 24 listItem:1,//轮播数-总页数
24 pageSize:5,//每页显示5条数据 25 pageSize:5,//每页显示5条数据
@@ -45,6 +46,9 @@ export default { @@ -45,6 +46,9 @@ export default {
45 proxy.startInterval(); 46 proxy.startInterval();
46 } 47 }
47 }) 48 })
  49 + $.get(proxy.domainName +proxy.apiUrl1+accessToken,function (res){
  50 +
  51 + })
48 52
49 }) 53 })
50 const startInterval=()=>{ 54 const startInterval=()=>{
@@ -22,7 +22,7 @@ export default { @@ -22,7 +22,7 @@ export default {
22 domainName:sessionStorage.getItem('domainName'), 22 domainName:sessionStorage.getItem('domainName'),
23 apiUrl:'/api-web/sxview/getBusinessAvailability', 23 apiUrl:'/api-web/sxview/getBusinessAvailability',
24 kpiIds:'KPI97B835A4,KPIFE85BE59,KPI7A29BAC3,KPIE7A7E3E4', 24 kpiIds:'KPI97B835A4,KPIFE85BE59,KPI7A29BAC3,KPIE7A7E3E4',
25 - // busId:'247c0c978f574285bf642f55611ea75d', 25 + // busId:'7a9d2360e09f4ed8aaa8011ceb4178fd',
26 busId:'', 26 busId:'',
27 performanceData:'', 27 performanceData:'',
28 xAxisData:'', 28 xAxisData:'',
@@ -36,11 +36,11 @@ export default { @@ -36,11 +36,11 @@ export default {
36 const xAxisData=Vue.ref(); 36 const xAxisData=Vue.ref();
37 const yAxisData=Vue.ref([]); 37 const yAxisData=Vue.ref([]);
38 const legendData=Vue.ref([]); 38 const legendData=Vue.ref([]);
  39 + const ySeriesCommon=Vue.ref([]);
39 // 获取状态 40 // 获取状态
40 const { busId} = indirectManage() 41 const { busId} = indirectManage()
41 // 监听编辑状态 42 // 监听编辑状态
42 Vue.watch(() =>busId.value, (newVal, oldVlaue) => { 43 Vue.watch(() =>busId.value, (newVal, oldVlaue) => {
43 - // console.log("333",busId.value)  
44 proxy.busId=busId.value 44 proxy.busId=busId.value
45 proxy.getData(); 45 proxy.getData();
46 }); 46 });
@@ -75,29 +75,40 @@ export default { @@ -75,29 +75,40 @@ export default {
75 }; 75 };
76 $.get(proxy.domainName +proxy.apiUrl+'?access_token='+localStorage.getItem('access_token'),params,function (res) { 76 $.get(proxy.domainName +proxy.apiUrl+'?access_token='+localStorage.getItem('access_token'),params,function (res) {
77 const data = res; 77 const data = res;
  78 + let legendData=Vue.ref([]);
  79 + let xAxisData=Vue.ref([]);
  80 + let yAxisData=Vue.ref([]);
  81 + let mapData={
  82 + legend:[ "可用性","成功率","响应率","业务告警量"],
  83 + x:[ "10:00","10:15","10:30", "10:45","11:00","11:15","11:30","11:45","12:00","12:15","12:30","12:45", "13:00","13:15","13:30","13:45",
  84 + "14:00","14:15","14:30", "14:45","15:00","15:15","15:30","15:45","16:00","16:15","16:30","16:45", "17:00","17:15","17:30","17:45",
  85 + "18:00","18:15","18:30", "18:45","19:00","19:15","19:30","19:45","20:00","20:15","20:30","20:45", "21:00","21:15","21:30","21:45",
  86 + "22:00","22:15","22:30", "22:45","23:00","23:15","23:30","23:45","00:00","00:15","00:30","00:45", "01:00","01:15","01:30","01:45",
  87 + "02:00","02:15","02:30", "02:45","03:00","03:15","03:30","03:45","04:00","04:15","04:30","04:45", "05:00","05:15","05:30","05:45",
  88 + "06:00","06:15","06:30", "06:45","07:00","07:15","07:30","07:45","08:00","08:15","08:30","08:45", "09:00","09:15","09:30","09:45",
  89 + "10:00"
  90 + ],
  91 + y:[[ 0,1,0,0,0,0,0,0],[ 0,0,0,0,0,0,0,0],[ 0,0,0,0,0,0,0,0],[ 0,0,0,0,0,0,0,0]
  92 + ]
  93 + }
78 if (data ) { 94 if (data ) {
79 if(data.map){ 95 if(data.map){
80 let resData=data.map; 96 let resData=data.map;
81 - proxy.legendData=resData.legend;  
82 - proxy.xAxisData=resData.x;  
83 - proxy.yAxisData=resData.y;  
84 - }else{  
85 - let nullArr=[];  
86 - for(let i=0;i<4;i++){  
87 - nullArr.push(i)  
88 - proxy.legendData.push({  
89 - name:''  
90 - })  
91 - }  
92 - proxy.xAxisData=nullArr;  
93 - for(let i=0;i<4;i++){  
94 - proxy.yAxisData.push(nullArr);  
95 - 97 + if(!resData.x || resData.x.length==0){
  98 + resData=mapData;
96 } 99 }
  100 + xAxisData=resData.x;
  101 + yAxisData=resData.y;
  102 + legendData=resData.legend;
97 103
  104 + }else{
  105 + xAxisData=mapData.x;
  106 + yAxisData=mapData.y;
  107 + legendData=mapData.legend;
98 } 108 }
99 -  
100 - 109 + proxy.legendData= legendData;
  110 + proxy.xAxisData=xAxisData;
  111 + proxy.yAxisData=yAxisData;
101 proxy.optionInit(); 112 proxy.optionInit();
102 113
103 } 114 }
@@ -109,15 +120,10 @@ export default { @@ -109,15 +120,10 @@ export default {
109 const optionInit=()=>{ 120 const optionInit=()=>{
110 121
111 let data3=proxy.yAxisData[0]; 122 let data3=proxy.yAxisData[0];
112 - let data4=[220, 182, 191, 234, 290, 330, 310];  
113 - let data2=proxy.yAxisData[2];  
114 - let data1=proxy.yAxisData[1];  
115 -  
116 - let min1=proxy.calMin([data1,data2]);  
117 - let max1=proxy.calMax([data1,data2]); 123 + let data4=proxy.yAxisData[3];
118 let min2=proxy.calMin([data3,data4]); 124 let min2=proxy.calMin([data3,data4]);
119 let max2=proxy.calMax([data3,data4]); 125 let max2=proxy.calMax([data3,data4]);
120 - 126 + let ySeriesCommon=[];
121 proxy.legendData.map((item,index)=>{ 127 proxy.legendData.map((item,index)=>{
122 let i=0; 128 let i=0;
123 if(index%2==0 ||index%3==0){ 129 if(index%2==0 ||index%3==0){
@@ -125,7 +131,7 @@ export default { @@ -125,7 +131,7 @@ export default {
125 }else{ 131 }else{
126 i=1; 132 i=1;
127 } 133 }
128 - proxy.ySeriesCommon.push( 134 + ySeriesCommon.push(
129 { 135 {
130 name:item, 136 name:item,
131 type: 'line', 137 type: 'line',
@@ -160,107 +166,8 @@ export default { @@ -160,107 +166,8 @@ export default {
160 }, 166 },
161 ) 167 )
162 }) 168 })
163 - //业务双y轴数据  
164 - /* proxy.ySeriesCommon=[  
165 - {  
166 - name:proxy.legendData[0],  
167 - type: 'line',  
168 - smooth:true,  
169 - // stack: 'Total',  
170 - show:false,  
171 - data:data3,  
172 - yAxisIndex:1,  
173 - showSymbol:false,  
174 - itemStyle : {  
175 - normal : {  
176 - color:"#97d5f4",//tooltip里的小圆点颜色  
177 - lineStyle:{  
178 - color:'#97d5f4',  
179 - width:1  
180 - }  
181 - }  
182 - },  
183 - areaStyle: {  
184 - // color:'rgba(151,213,244,0.4)',  
185 - normal:{  
186 - color:new echarts.graphic.LinearGradient(0, 0, 0, .6, [{ //关键在这里, 设置面积渐变  
187 - offset: 0,  
188 - color: '#97d5f4' //这里是我设置的渐变的颜色从线条颜色变为透明  
189 - }, {  
190 - offset: 1,  
191 - color: 'rgba(151,213,244,0.1)'  
192 - }])  
193 - } 169 + proxy.ySeriesCommon=ySeriesCommon;
194 170
195 - },  
196 - },  
197 - {  
198 - name:proxy.legendData[1],  
199 - type: 'line',  
200 - smooth:true,  
201 - // stack: 'Total',  
202 - show:false,  
203 - data:data1,  
204 - yAxisIndex:0,  
205 - showSymbol:false,  
206 - itemStyle : {  
207 - normal : {  
208 - color:"#efe0a7",//tooltip里的小圆点颜色  
209 - lineStyle:{  
210 - color:'#efe0a7',  
211 - width:1  
212 - }  
213 - }  
214 - },  
215 - areaStyle: {  
216 - color:'rgba(239,224,167,0)'  
217 - },  
218 - },  
219 - {  
220 - name:'响应率',  
221 - type: 'line',  
222 - smooth:true,  
223 - // stack: 'Total',  
224 - show:false,  
225 - data:data2,  
226 - yAxisIndex:0,  
227 - showSymbol:false,  
228 - itemStyle : {  
229 - normal : {  
230 - color:"#e5abd1",//tooltip里的小圆点颜色  
231 - lineStyle:{  
232 - color:'#e5abd1',  
233 - width:1  
234 - }  
235 - }  
236 - },  
237 - areaStyle: {  
238 - color:'rgba(229,171,209,0)'  
239 - },  
240 - },  
241 - {  
242 - name:'交易量',  
243 - type: 'line',  
244 - smooth:true,  
245 - // stack: 'Total',  
246 - show:false,  
247 - data:data4,  
248 - yAxisIndex:1,  
249 - showSymbol:false,  
250 - itemStyle : {  
251 - normal : {  
252 - color:"#97aaff",//tooltip里的小圆点颜色  
253 - lineStyle:{  
254 - color:'#97aaff',  
255 - width:1,  
256 - }  
257 - }  
258 - },  
259 - areaStyle: {  
260 - color:'rgba(151,170,255,0)'  
261 - },  
262 - }  
263 - ]*/  
264 // let xAxisDataLength=proxy.ySeriesCommon[0].length; 171 // let xAxisDataLength=proxy.ySeriesCommon[0].length;
265 let xAxisData=[]; 172 let xAxisData=[];
266 if(proxy.xAxisData){ 173 if(proxy.xAxisData){
@@ -300,7 +207,7 @@ export default { @@ -300,7 +207,7 @@ export default {
300 top:'2%', 207 top:'2%',
301 left: '3%', 208 left: '3%',
302 right: '4%', 209 right: '4%',
303 - // bottom: '3%', 210 + bottom: '30%',
304 containLabel: true, 211 containLabel: true,
305 }, 212 },
306 xAxis: { 213 xAxis: {
  1 +!function(e){if(!e.WebVideoCtrl){var t=function(){function t(){this.id=this.createUUID()}var r="100%",s="100%",o="",i="",a={szContainerID:"",szColorProperty:"",szOcxClassId:"clsid:FDF0038A-CF64-4634-81AB-80F0A7946D6C",szMimeTypes:"application/webvideo-plugin-kit",szBasePath:"",iWndowType:1,iPlayMode:2,bWndFull:!0,iPackageType:2,bDebugMode:!1,bNoPlugin:!0,cbSelWnd:null,cbDoubleClickWnd:null,cbEvent:null,cbRemoteConfig:null,cbInitPluginComplete:null},c=null,u=0,l=!1,d=[],p=[],P=null,h=null,I=null,f=null,m=this,C=null,S=1,v=2,y=200,g=0,x=1,D=2,z=3,T=4,b=5,A=6,M=0,R=2,L=3,q=21,G=-1,W=0,X="IPCamera",w="IPDome",H="IPZoom",k="<?xml version='1.0' encoding='utf-8'?><FileVersion><Platform name='win32'><npWebVideoKitPlugin.dll>3,0,6,2</npWebVideoKitPlugin.dll><WebVideoKitActiveX.ocx>3,0,6,2</WebVideoKitActiveX.ocx><PlayCtrl.dll>7,3,3,61</PlayCtrl.dll><StreamTransClient.dll>1,1,3,6</StreamTransClient.dll><SystemTransform.dll>2,5,2,8</SystemTransform.dll><NetStream.dll>1,0,5,59</NetStream.dll></Platform></FileVersion>";e.GetSelectWndInfo=function(e){if(re()){u=e;var t=[];t.push("<RealPlayInfo>"),t.push("<SelectWnd>"+e+"</SelectWnd>"),t.push("</RealPlayInfo>"),a.cbSelWnd&&a.cbSelWnd(f.loadXML(t.join("")))}else{var r=f.loadXML(e);if(n.$XML(r).find("SelectWnd",!0).length>0){u=parseInt(n.$XML(r).find("SelectWnd").eq(0).text(),10),null===C&&U();var t=[];t.push("<RealPlayInfo>"),t.push("<SelectWnd>"+u+"</SelectWnd>"),t.push("</RealPlayInfo>"),a.cbSelWnd&&a.cbSelWnd(f.loadXML(t.join("")))}else if(n.$XML(r).find("DoubleClickWnd",!0).length>0){var s=parseInt(n.$XML(r).find("DoubleClickWnd").eq(0).text(),10);l="0"===n.$XML(r).find("IsFullScreen").eq(0).text(),a.cbDoubleClickWnd&&a.cbDoubleClickWnd(s,l)}}},e.WindowDblClick=function(e){l=e,a.cbDoubleClickWnd&&a.cbDoubleClickWnd(u,l)},e.ZoomInfoCallback=function(e){var t=m.findWndIndexByIndex(u);if(-1!=t){var n=p[t];if(t=m.findDeviceIndexByIP(n.szDeviceIdentify),-1!=t){var r=d[t];r.oProtocolInc.set3DZoom(r,n,e,{success:function(e){},error:function(){}})}}},e.PluginEventHandler=function(e,t,n){re()?a.cbEvent&&a.cbEvent(n,t,""):(_("插件事件:PluginEventHandler iEventType:%s iParam1: %s, iParam2: %s",e,t,n),M==e||R==e?m.I_Stop(t):q==e?m.I_StopRecord(t):L==e&&m.I_StopVoiceTalk(),a.cbEvent&&a.cbEvent(e,t,n))},e.GetHttpInfo=function(e,t,n){_("http响应返回:http状态:%s, http数据:%s",e,t),ue.prototype.processCallback(e,t)},e.RemoteConfigInfo=function(e){a.cbRemoteConfig&&a.cbRemoteConfig(e)},e.KeyBoardEventInfo=function(e){100===parseInt(e,10)&&(l=!1,a.cbDoubleClickWnd&&a.cbDoubleClickWnd(u,l))};var _=function(){if(a.bDebugMode){var e=E(arguments);P._alert(e)}},E=function(){for(var e=arguments[0],t=1;t<arguments.length;t++)e=e.replace("%s",arguments[t]);return e},Z=function(e){var t=e.indexOf(":");return t>-1?e.substring(0,t):e},B=function(e){return"undefined"==typeof e},N=function(e){return"[object Object]"===Object.prototype.toString.call(e)},F=function(){var e="";if(f.browser().msie)e="<object classid='"+a.szOcxClassId+"' codebase='' standby='Waiting...' id='"+o+"' width='"+r+"' height='"+s+"' align='center' ><param name='wndtype' value='"+a.iWndowType+"'><param name='playmode' value='"+a.iPlayMode+"'><param name='colors' value='"+a.szColorProperty+"'></object>";else for(var t=navigator.mimeTypes.length,n=0;t>n;n++)navigator.mimeTypes[n].type.toLowerCase()==a.szMimeTypes&&(e="<embed align='center' type='"+a.szMimeTypes+"' width='"+r+"' height='"+s+"' name='"+i+"' wndtype='"+a.iWndowType+"' playmode='"+a.iPlayMode+"' colors='"+a.szColorProperty+"'>");return e},U=function(){if(!re()&&null!==c){var e=c.HWP_GetLocalConfig();C=f.loadXML(e)}},V=function(e){m.I_GetDeviceInfo(e.szIP,{success:function(t){e.szDeviceType=n.$XML(t).find("deviceType").eq(0).text()}}),m.I_GetAnalogChannelInfo(e.szIP,{success:function(t){e.iAnalogChannelNum=n.$XML(t).find("VideoInputChannel",!0).length}}),m.I_GetAudioInfo(e.szIP,{success:function(t){var r=n.$XML(t).find("audioCompressionType",!0);if(r.length>0){var s=n.$XML(r).eq(0).text(),o=0;"G.711ulaw"==s?o=1:"G.711alaw"==s?o=2:"G.726"==s?o=3:"MP2L2"==s||"MPEL2"==s?o=4:"G.722.1"==s?o=0:"AAC"==s?o=5:"PCM"==s&&(o=6),e.iAudioType=o}""!==n.$XML(t).find("audioBitRate").eq(0).text()?e.m_iAudioBitRate=1e3*parseInt(n.$XML(t).find("audioBitRate").eq(0).text(),10):e.m_iAudioBitRate=0,""!==n.$XML(t).find("audioSamplingRate").eq(0).text()?e.m_iAudioSamplingRate=1e3*parseInt(n.$XML(t).find("audioSamplingRate").eq(0).text(),10):e.m_iAudioSamplingRate=0}})},j=function(e){e.bSupportWebsocket=!1,e.bSupportSubStreamPlayback=!1,e.oProtocolInc.getSystemCapa(e,{success:function(t){var r=n.$XML(t).find("NetworkCap").eq(0).find("isSupportWebsocket",!0);r.length>0&&(e.bSupportWebsocket="true"===n.$XML(t).find("NetworkCap").eq(0).find("isSupportWebsocket").eq(0).text()),r=n.$XML(t).find("RacmCap").eq(0).find("isSupportMainAndSubRecord",!0),r.length>0&&(e.bSupportSubStreamPlayback="true"===n.$XML(t).find("RacmCap").eq(0).find("isSupportMainAndSubRecord").eq(0).text())}})},O=function(){var e=a.bWndFull?1:0;c.HWP_SetCanFullScreen(e),c.HWP_SetPackageType(a.iPackageType)},J=function(e){var t=-1,n=-1,r=-1,s=null;if(ee(e))s=K(e),t=s.iRtspPort,r=s.iDevicePort;else{for(var o=Q(e),i=!1,a=0;a<o.length;a++)if(o[a].ipv4==e.szIP||o[a].ipv6==e.szIP){i=!0;break}i?s=K(e):(s=Y(e),-1==s.iRtspPort&&-1==s.iDevicePort&&(s=K(e))),t=s.iRtspPort,n=s.iHttpPort,r=s.iDevicePort}return s},K=function(e){var t=-1,r=-1,s=-1;return e.oProtocolInc.getPortInfo(e,{async:!1,success:function(e){var o=n.$XML(e).find("AdminAccessProtocol",!0);t=554;for(var i=0,a=o.length;a>i;i++)"rtsp"===n.$XML(o).eq(i).find("protocol").eq(0).text().toLowerCase()&&(t=parseInt(n.$XML(o).eq(i).find("portNo").eq(0).text(),10)),"http"===n.$XML(o).eq(i).find("protocol").eq(0).text().toLowerCase()&&(r=parseInt(n.$XML(o).eq(i).find("portNo").eq(0).text(),10)),"dev_manage"===n.$XML(o).eq(i).find("protocol").eq(0).text().toLowerCase()&&(s=parseInt(n.$XML(o).eq(i).find("portNo").eq(0).text(),10))},error:function(){t=-1,r=-1,s=-1}}),{iRtspPort:t,iHttpPort:r,iDevicePort:s}},Y=function(e){var t=-1,r=-1,s=-1;return e.oProtocolInc.getUPnPPortStatus(e,{async:!1,success:function(e){for(var o=n.$XML(e).find("portStatus",!0),i=0,a=o.length;a>i;i++)"rtsp"==n.$XML(o).eq(i).find("internalPort").eq(0).text().toLowerCase()&&(t=parseInt(n.$XML(o).eq(i).find("externalPort").eq(0).text(),10)),"http"==n.$XML(o).eq(i).find("internalPort").eq(0).text().toLowerCase()&&(r=parseInt(n.$XML(o).eq(i).find("externalPort").eq(0).text(),10)),"admin"==n.$XML(o).eq(i).find("internalPort").eq(0).text().toLowerCase()&&(s=parseInt(n.$XML(o).eq(i).find("externalPort").eq(0).text(),10))},error:function(){t=-1,r=-1,s=-1}}),{iRtspPort:t,iHttpPort:r,iDevicePort:s}},Q=function(e){var t=[];return e.oProtocolInc.getNetworkBond(e,{async:!1,success:function(r){"true"==n.$XML(r).find("enabled").eq(0).text()?t.push({ipv4:n.$XML(r).find("ipAddress").eq(0).text(),ipv6:n.$XML(r).find("ipv6Address").eq(0).text()}):e.oProtocolInc.getNetworkInterface(e,{async:!1,success:function(e){for(var r=n.$XML(e).find("NetworkInterface",!0),s=0,o=r.length;o>s;s++){t.push({ipv4:n.$XML(e).find("ipAddress").eq(0).text(),ipv6:n.$XML(e).find("ipv6Address").eq(0).text()});break}},error:function(){}})},error:function(){e.oProtocolInc.getNetworkInterface(e,{async:!1,success:function(e){for(var r=n.$XML(e).find("NetworkInterface",!0),s=0,o=r.length;o>s;s++){t.push({ipv4:n.$XML(e).find("ipAddress").eq(0).text(),ipv6:n.$XML(e).find("ipv6Address").eq(0).text()});break}},error:function(){}})}}),t},ee=function(e){var t=!1;return e.oProtocolInc.getPPPoEStatus(e,{async:!1,success:function(e){t=n.$XML(e).find("ipAddress",!0).length>0?!0:n.$XML(e).find("ipv6Address",!0).length>0},error:function(){t=!1}}),t},te=function(e){e.oStreamCapa.bObtained||e.oProtocolInc instanceof le&&e.oProtocolInc.getSDKCapa(e,{async:!1,success:function(t){e.oStreamCapa.bObtained=!0,e.oStreamCapa.bSupportShttpPlay="true"===n.$XML(t).find("isSupportHttpPlay").eq(0).text(),e.oStreamCapa.bSupportShttpPlayback="true"===n.$XML(t).find("isSupportHttpPlayback").eq(0).text(),e.oStreamCapa.bSupportShttpsPlay="true"===n.$XML(t).find("isSupportHttpsPlay").eq(0).text(),e.oStreamCapa.bSupportShttpsPlayback="true"===n.$XML(t).find("isSupportHttpsPlayback").eq(0).text(),e.oStreamCapa.bSupportShttpPlaybackTransCode="true"===n.$XML(t).find("isSupportHttpTransCodePlayback").eq(0).text(),e.oStreamCapa.bSupportShttpsPlaybackTransCode="true"===n.$XML(t).find("isSupportHttpsTransCodePlayback").eq(0).text(),n.$XML(t).find("ipChanBase",!0).length>0&&(e.oStreamCapa.iIpChanBase=parseInt(n.$XML(t).find("ipChanBase").eq(0).text(),10))},error:function(){e.oStreamCapa.bObtained=!0}})},ne=function(e){var t={TransFrameRate:"",TransResolution:"",TransBitrate:""};if(f.extend(t,e),""==t.TransFrameRate||""==t.TransResolution||""==t.TransBitrate)return"";var n=[];return n.push("<?xml version='1.0' encoding='UTF-8'?>"),n.push("<CompressionInfo>"),n.push("<TransFrameRate>"+t.TransFrameRate+"</TransFrameRate>"),n.push("<TransResolution>"+t.TransResolution+"</TransResolution>"),n.push("<TransBitrate>"+t.TransBitrate+"</TransBitrate>"),n.push("</CompressionInfo>"),n.join("")},re=function(){if(a.bNoPlugin){var e=f.browser();return!!(e.chrome&&parseInt(e.version,10)>45||e.mozilla&&parseInt(e.version,10)>52)}return!1},se=function(e){var t=location.hostname,n=location.port||"80";return/^(http|https):\/\/([^\/]+)(.+)$/.test(e)&&(e=e.replace(RegExp.$2,t+":"+n)),f.cookie("webVideoCtrlProxy",RegExp.$2,{raw:!0}),e},oe=function(){var e="<ResponseStatus>";return e+="<requestURL></requestURL>",e+="<statusCode>4</statusCode>",e+="<statusString>Invalid Operation</statusString>",e+="<subStatusCode>notSupport</subStatusCode>",e+="</ResponseStatus>",f.loadXML(e)};this.I_InitPlugin=function(t,n,o){if(r=t,s=n,f.extend(a,o),re()){var i=f.getDirName();i&&("object"==typeof exports&&"undefined"!=typeof module||("function"==typeof define&&define.amd?require([i+"/jsPlugin-1.0.0.min.js"],function(t){e.JSPlugin=t.JSPlugin,o.cbInitPluginComplete&&o.cbInitPluginComplete()}):f.loadScript(i+"/jsPlugin-1.0.0.min.js",function(){o.cbInitPluginComplete&&o.cbInitPluginComplete()}))),e.addEventListener("resize",function(){null!==c&&c.JS_Resize(r,s)}),B(document.fullScreen)?B(document.webkitIsFullScreen)?B(document.mozFullScreen)||document.addEventListener("mozfullscreenchange",function(t){var n=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!1;l&&!n&&e.KeyBoardEventInfo(100)}):document.addEventListener("webkitfullscreenchange",function(t){var n=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!1;l&&!n&&e.KeyBoardEventInfo(100)}):document.addEventListener("fullscreenchange",function(t){var n=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!1;l&&!n&&e.KeyBoardEventInfo(100)}),e.addEventListener("unload",function(){null!==c&&c.JS_DestroyWorker()})}else o.cbInitPluginComplete&&o.cbInitPluginComplete()},this.I_InsertOBJECTPlugin=function(t){if(B(t)||(a.szContainerID=t),null==document.getElementById(a.szContainerID))return-1;if(null!=document.getElementById(o)||0!=document.getElementsByName(o).length)return-1;if(re()){var n={szId:t,iType:1,iWidth:r,iHeight:s,iMaxSplit:4,iCurrentSplit:a.iWndowType,szBasePath:f.getDirName()},u=a.szColorProperty;if(""!=u){for(var l={},d=u.split(";"),p="",P=0,h=d.length;h>P;P++)p=d[P],p.indexOf("sub-background")>-1?l.background=p.split(":")[1]:p.indexOf("sub-border-select")>-1?l.borderSelect=p.split(":")[1]:p.indexOf("sub-border")>-1&&(l.border=p.split(":")[1]);n.oStyle=l}c=new JSPlugin(n)}else document.getElementById(a.szContainerID).innerHTML=F(),c=f.browser().msie?document.getElementById(o):document.getElementsByName(i)[0];return null==c&&null==c.object?-1:("object"==typeof e.attachEvent&&f.browser().msie&&(c.attachEvent("GetSelectWndInfo",GetSelectWndInfo),c.attachEvent("ZoomInfoCallback",ZoomInfoCallback),c.attachEvent("GetHttpInfo",GetHttpInfo),c.attachEvent("PluginEventHandler",PluginEventHandler),c.attachEvent("RemoteConfigInfo",RemoteConfigInfo),c.attachEvent("KeyBoardEventInfo",KeyBoardEventInfo)),U(),0)},this.I_WriteOBJECT_XHTML=function(){return re()?-1:(document.writeln(F()),c=f.browser().msie?document.getElementById(o):document.getElementsByName(i)[0],null==c&&null==c.object?-1:("object"==typeof e.attachEvent&&f.browser().msie&&(c.attachEvent("GetSelectWndInfo",GetSelectWndInfo),c.attachEvent("ZoomInfoCallback",ZoomInfoCallback),c.attachEvent("GetHttpInfo",GetHttpInfo),c.attachEvent("PluginEventHandler",PluginEventHandler),c.attachEvent("RemoteConfigInfo",RemoteConfigInfo),c.attachEvent("KeyBoardEventInfo",KeyBoardEventInfo)),U(),0))},this.I_OpenFileDlg=function(e){var t="";if(re())return t;if(t=c.HWP_OpenFileBrowser(e,""),null==t)return"";if(1==e){if(t.length>100)return-1}else if(t.length>130)return-1;return t},this.I_GetLocalCfg=function(){var e=null;if(re())return e;var t=c.HWP_GetLocalConfig(),r=[];return C=f.loadXML(t),r.push("<LocalConfigInfo>"),r.push("<ProtocolType>"+n.$XML(C).find("ProtocolType").eq(0).text()+"</ProtocolType>"),r.push("<PackgeSize>"+n.$XML(C).find("PackgeSize").eq(0).text()+"</PackgeSize>"),r.push("<PlayWndType>"+n.$XML(C).find("PlayWndType").eq(0).text()+"</PlayWndType>"),r.push("<BuffNumberType>"+n.$XML(C).find("BuffNumberType").eq(0).text()+"</BuffNumberType>"),r.push("<RecordPath>"+n.$XML(C).find("RecordPath").eq(0).text()+"</RecordPath>"),r.push("<CapturePath>"+n.$XML(C).find("CapturePath").eq(0).text()+"</CapturePath>"),r.push("<PlaybackFilePath>"+n.$XML(C).find("PlaybackFilePath").eq(0).text()+"</PlaybackFilePath>"),r.push("<PlaybackPicPath>"+n.$XML(C).find("PlaybackPicPath").eq(0).text()+"</PlaybackPicPath>"),r.push("<DeviceCapturePath>"+n.$XML(C).find("DeviceCapturePath").eq(0).text()+"</DeviceCapturePath>"),r.push("<DownloadPath>"+n.$XML(C).find("DownloadPath").eq(0).text()+"</DownloadPath>"),r.push("<IVSMode>"+n.$XML(C).find("IVSMode").eq(0).text()+"</IVSMode>"),r.push("<CaptureFileFormat>"+n.$XML(C).find("CaptureFileFormat").eq(0).text()+"</CaptureFileFormat>"),r.push("</LocalConfigInfo>"),e=f.loadXML(r.join(""))},this.I_SetLocalCfg=function(e){if(re())return-1;var t=f.loadXML(e),r=!1;return n.$XML(C).find("ProtocolType").eq(0).text(n.$XML(t).find("ProtocolType").eq(0).text()),n.$XML(C).find("PackgeSize").eq(0).text(n.$XML(t).find("PackgeSize").eq(0).text()),n.$XML(C).find("PlayWndType").eq(0).text(n.$XML(t).find("PlayWndType").eq(0).text()),n.$XML(C).find("BuffNumberType").eq(0).text(n.$XML(t).find("BuffNumberType").eq(0).text()),n.$XML(C).find("RecordPath").eq(0).text(n.$XML(t).find("RecordPath").eq(0).text()),n.$XML(C).find("CapturePath").eq(0).text(n.$XML(t).find("CapturePath").eq(0).text()),n.$XML(C).find("PlaybackFilePath").eq(0).text(n.$XML(t).find("PlaybackFilePath").eq(0).text()),n.$XML(C).find("DeviceCapturePath").eq(0).text(n.$XML(t).find("DeviceCapturePath").eq(0).text()),n.$XML(C).find("PlaybackPicPath").eq(0).text(n.$XML(t).find("PlaybackPicPath").eq(0).text()),n.$XML(C).find("DownloadPath").eq(0).text(n.$XML(t).find("DownloadPath").eq(0).text()),n.$XML(C).find("IVSMode").eq(0).text(n.$XML(t).find("IVSMode").eq(0).text()),n.$XML(C).find("CaptureFileFormat").eq(0).text(n.$XML(t).find("CaptureFileFormat").eq(0).text()),r=c.HWP_SetLocalConfig(f.toXMLStr(C)),r?0:-1};var ie=function(e,t,n,r,s,o,i){var a={protocol:t,success:null,error:null};f.extend(a,i),f.extend(a,{success:function(a){var c=new ae;c.szIP=e,2==t?(c.szHttpProtocol="https://",c.iHttpsPort=n):(c.szHttpProtocol="http://",c.iHttpPort=n),c.iCGIPort=n,c.szDeviceIdentify=e+"_"+n,c.szAuth=r,c.iDeviceProtocol=s,c.oProtocolInc=o,d.push(c),_("使用%s协议登录成功",s),V(c),O(),j(c),i.success&&i.success(a)},error:function(e,t){i.error&&i.error(e,t)}}),o.login(e,n,r,a)};this.I_Login=function(t,r,s,o,i,a){var c=t+"_"+s,u=this.findDeviceIndexByIP(c);if(-1!=u)return _("设备已经登录过"),-1;var l=h,p=S;if(B(a.cgi)||(S==a.cgi?(l=h,p=S):(l=I,p=v)),re())if(S==p){var P={success:null,error:null};f.extend(P,{success:function(c){var u={success:null,error:null};f.extend(u,{success:function(o){var i=new ae;i.szIP=t,2==r?(i.szHttpProtocol="https://",i.iHttpsPort=s):(i.szHttpProtocol="http://",i.iHttpPort=s),i.iCGIPort=s,i.szDeviceIdentify=t+"_"+s,i.szAuth=n.$XML(o).find("sessionID").eq(0).text(),i.iDeviceProtocol=p,i.oProtocolInc=l,d.push(i),_("使用%s协议登录成功",p),V(i),j(i),i.sessionFailed=0,i.sesstionTimer=setInterval(function(){l.sessionHeartbeat(i,function(){i.sessionFailed=0},function(){i.sessionFailed++,i.sessionFailed>=5&&(clearInterval(i.sesstionTimer),e.PluginEventHandler(G,i.szDeviceIdentify))})},3e4),a.success&&a.success(o)},error:function(e,t){a.error&&a.error(e,t)}}),l.sessionLogin(t,r,s,o,i,c,u)},error:function(e,t){a.error&&a.error(e,t)}}),l.getSessionCap(t,r,s,o,P)}else a.error&&a.error(403,oe());else{var m="";if(S==p){m=f.Base64.encode(":"+o+":"+i);var P={success:null,error:null};f.extend(P,a),f.extend(P,{error:function(e,n){m=f.Base64.encode(o+":"+i),p=S,l=h;var c={success:null,error:null};f.extend(c,a),f.extend(c,{error:function(){if(!B(a.cgi))return void(a.error&&a.error(e,n));m=f.Base64.encode(":"+o+":"+i),p=v,l=I;var c={success:null,error:null};f.extend(c,a),f.extend(c,{error:function(e,n){m=f.Base64.encode(o+":"+i),p=v,l=I;var c={success:null,error:null};f.extend(c,a),f.extend(c,{error:function(){a.error&&a.error(e,n)}}),ie(t,r,s,m,p,l,c)}}),ie(t,r,s,m,p,l,c)}}),ie(t,r,s,m,p,l,c)}}),ie(t,r,s,m,p,l,P)}else{m=f.Base64.encode(":"+o+":"+i),p=v,l=I;var P={success:null,error:null};f.extend(P,a),f.extend(P,{error:function(e,n){m=f.Base64.encode(o+":"+i),p=v,l=I;var c={success:null,error:null};f.extend(c,a),f.extend(c,{error:function(){a.error&&a.error(e,n)}}),ie(t,r,s,m,p,l,c)}}),ie(t,r,s,m,p,l,P)}}},this.I_Logout=function(e){var t=this.findDeviceIndexByIP(e);if(-1!=t){if(re()){var n=d[t];clearInterval(n.sesstionTimer),n.oProtocolInc.sessionLogout(n,{})}return d.splice(t,1),0}return-1},this.I_GetAudioInfo=function(e,t){var n=this.findDeviceIndexByIP(e);if(-1!=n){var r=d[n],s={success:null,error:null};f.extend(s,t),r.oProtocolInc.getAudioInfo(r,s)}},this.I_GetDeviceInfo=function(e,t){var n=this.findDeviceIndexByIP(e);if(-1!=n){var r=d[n],s={success:null,error:null};f.extend(s,t),r.oProtocolInc.getDeviceInfo(r,s)}},this.I_GetAnalogChannelInfo=function(e,t){var n=this.findDeviceIndexByIP(e);if(-1!=n){var r=d[n],s={success:null,error:null};f.extend(s,t),r.oProtocolInc.getAnalogChannelInfo(r,s)}},this.I_GetDigitalChannelInfo=function(e,t){var n=this.findDeviceIndexByIP(e);if(-1!=n){var r=d[n],s={success:null,error:null};f.extend(s,t),r.oProtocolInc.getDigitalChannelInfo(r,s)}},this.I_GetZeroChannelInfo=function(e,t){var n=this.findDeviceIndexByIP(e);if(-1!=n){var r=d[n],s={success:null,error:null};f.extend(s,t),r.oProtocolInc.getZeroChannelInfo(r,s)}},this.I_StartRealPlay=function(e,t){var r=this.findDeviceIndexByIP(e),s="",o="",i=-1,a=0,c=0,l=!1,P={iWndIndex:u,iStreamType:1,iChannelID:1,bZeroChannel:!1};if(f.extend(P,t),-1!=r){te(d[r]);var h=d[r];if(re()){if(!h.bSupportWebsocket)return void(t.error&&t.error(403,oe()));s=h.oProtocolInc.CGI.startWsRealPlay,o="ws://",B(P.iWSPort)?h.iWSPort=7681:h.iWSPort=P.iWSPort,i=h.iWSPort,c=P.iStreamType,a=P.iChannelID<=h.iAnalogChannelNum?P.iChannelID:h.oStreamCapa.iIpChanBase+parseInt(P.iChannelID,10)-h.iAnalogChannelNum-1,l=!0}else{var I=parseInt(n.$XML(C).find("ProtocolType").eq(0).text(),10);I==W&&h.oStreamCapa.bSupportShttpPlay?(_("SHTTP RealPlay"),s=h.oProtocolInc.CGI.startShttpRealPlay,o="http://",c=P.iStreamType-1,a=P.iChannelID<=h.iAnalogChannelNum?P.iChannelID:h.oStreamCapa.iIpChanBase+parseInt(P.iChannelID,10)-h.iAnalogChannelNum-1,l=!0,B(P.iPort)?"https://"==h.szHttpProtocol?(-1==h.iHttpPort&&(h.iHttpPort=J(h).iHttpPort),i=h.iHttpPort):i=h.iCGIPort:(h.iHttpPort=P.iPort,i=P.iPort)):(_("RTSP RealPlay"),s=h.oProtocolInc.CGI.startRealPlay,o="rtsp://",c=P.iStreamType,a=P.iChannelID,B(P.iRtspPort)||(h.iRtspPort=P.iRtspPort),-1==h.iRtspPort&&(h.iRtspPort=J(h).iRtspPort),i=h.iRtspPort)}if(-1==i)return _("获取端口号失败"),void(t.error&&t.error());if(f.extend(P,{urlProtocol:o,cgi:s,iPort:i,iStreamType:c,iChannelID:a}),r=this.findWndIndexByIndex(P.iWndIndex),-1==r)if(re())h.oProtocolInc.startRealPlay(h,P).then(function(){r=this.findWndIndexByIndex(P.iWndIndex);var e=p[r];e.bShttpIPChannel=l,t.success&&t.success()},function(){t.error&&t.error()});else{var m=h.oProtocolInc.startRealPlay(h,P);if(0==m){r=this.findWndIndexByIndex(P.iWndIndex);var S=p[r];S.bShttpIPChannel=l,t.success&&t.success()}else h.iRtspPort=-1,t.error&&t.error()}}else t.error&&t.error()},this.I_Stop=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){var r=p[n];if(r.bRecord&&(re()||c.HWP_StopSave(r.iIndex)),r.bSound&&(re()||c.HWP_CloseSound()),r.bEZoom&&(re()||c.HWP_DisableZoom(r.iIndex)),re())c.JS_Stop(t.iWndIndex).then(function(){p.splice(n,1),t.success&&t.success()},function(){t.error&&t.error()});else{var s=c.HWP_Stop(t.iWndIndex);0==s?(p.splice(n,1),t.success&&t.success()):t.error&&t.error()}}else t.error&&t.error()},this.I_OpenSound=function(e){e=B(e)?u:e;var t=this.findWndIndexByIndex(e),n=-1;if(-1!=t){var r=p[t];r.bSound||(n=re()?c.JS_OpenSound(e):c.HWP_OpenSound(e),0==n&&(r.bSound=!0))}return n},this.I_CloseSound=function(e){e=B(e)?u:e;var t=this.findWndIndexByIndex(e),n=-1;if(-1!=t){var r=p[t];r.bSound&&(n=re()?c.JS_CloseSound():c.HWP_CloseSound(),0==n&&(r.bSound=!1))}return n},this.I_SetVolume=function(e,t){var n=-1;if(e=parseInt(e,10),isNaN(e))return n;if(0>e||e>100)return n;t=B(t)?u:t;var r=this.findWndIndexByIndex(t);return-1!=r&&(re()?(c.JS_SetVolume(t,e),n=0):n=c.HWP_SetVolume(t,e)),n},this.I_CapturePic=function(e,t){var n={iWndIndex:u,bDateDir:!0};N(t)?f.extend(n,t):B(t)||(n.iWndIndex=t);var r=this.findWndIndexByIndex(n.iWndIndex),s=-1;if(-1!=r)if(re()){var o="JPEG";".jpg"===e.slice(-4).toLowerCase()?e=e.slice(0,-4):".jpeg"===e.slice(-5).toLowerCase()?e=e.slice(0,-5):".bmp"===e.slice(-4).toLowerCase()&&(e=e.slice(0,-4),o="BMP"),s=c.JS_CapturePicture(n.iWndIndex,e,o)}else".jpg"===e.slice(-4).toLowerCase()?e=e.slice(0,-4):".jpeg"===e.slice(-5).toLowerCase()&&(e=e.slice(0,-5)),s=c.HWP_CapturePicture(n.iWndIndex,e,n.bDateDir);return s},this.I_StartRecord=function(e,t){var n={iWndIndex:u,bDateDir:!0};N(t)?f.extend(n,t):B(t)||(n.iWndIndex=t);var r=this.findWndIndexByIndex(n.iWndIndex);if(-1!=r){var s=p[r];if(s.bRecord)n.error&&n.error();else if(re()){var o=f.browser();o.chrome?c.JS_StartSave(n.iWndIndex,e).then(function(){s.bRecord=!0,n.success&&n.success()},function(){n.error&&n.error()}):n.error&&n.error()}else{var i=c.HWP_StartSave(n.iWndIndex,e,n.bDateDir);0==i?(s.bRecord=!0,n.success&&n.success()):n.error&&n.error()}}else n.error&&n.error()},this.I_StopRecord=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){var r=p[n];if(r.bRecord)if(re()){var s=f.browser();s.chrome?c.JS_StopSave(t.iWndIndex).then(function(){r.bRecord=!1,t.success&&t.success()},function(){t.error&&t.error()}):t.error&&t.error()}else{var o=c.HWP_StopSave(t.iWndIndex);0==o?(r.bRecord=!1,t.success&&t.success()):t.error&&t.error()}else t.error&&t.error()}else t.error&&t.error()},this.I_StartVoiceTalk=function(e,t){if(isNaN(parseInt(t,10)))return-1;var n=this.findDeviceIndexByIP(e),r=-1;if(-1!=n){var s=d[n];s.bVoiceTalk||(r=re()?-1:s.oProtocolInc.startVoiceTalk(s,t),0==r&&(d[n].bVoiceTalk=!0))}return r},this.I_StopVoiceTalk=function(){var e=-1;if(!re()){e=c.HWP_StopVoiceTalk();for(var t=0,n=d.length;n>t;t++)if(d[t].bVoiceTalk){d[t].bVoiceTalk=!1;break}}return e},this.I_PTZControl=function(e,t,n){var r={iWndIndex:u,iPTZIndex:e,iPTZSpeed:4};f.extend(r,n),f.extend(r,{async:!1});var s=this.findWndIndexByIndex(r.iWndIndex);if(-1!=s){var o=p[s];if(s=this.findDeviceIndexByIP(o.szIP),-1!=s){var i=d[s];9==e?i.oProtocolInc.ptzAutoControl(i,t,o,r):i.oProtocolInc.ptzControl(i,t,o,r)}}},this.I_EnableEZoom=function(e){e=B(e)?u:e;var t=this.findWndIndexByIndex(e),n=-1;if(-1!=t){var r=p[t];r.bEZoom||(n=re()?c.JS_EnableZoom(e):c.HWP_EnableZoom(e,0),0==n&&(r.bEZoom=!0))}return n},this.I_DisableEZoom=function(e){e=B(e)?u:e;var t=this.findWndIndexByIndex(e),n=-1;if(-1!=t){var r=p[t];r.bEZoom&&(re()?n=c.JS_DisableZoom(e):(c.HWP_DisableZoom(e),n=0),0==n&&(r.bEZoom=!1))}return n},this.I_Enable3DZoom=function(e){e=B(e)?u:e;var t=this.findWndIndexByIndex(e),n=-1;if(-1!=t){var r=p[t];r.b3DZoom||(n=re()?-1:c.HWP_EnableZoom(e,1),0==n&&(r.b3DZoom=!0))}return n},this.I_Disable3DZoom=function(e){e=B(e)?u:e;var t=this.findWndIndexByIndex(e),n=-1;if(-1!=t){var r=p[t];r.b3DZoom&&(re()?n=-1:(c.HWP_DisableZoom(e),n=0),0==n&&(r.b3DZoom=!1))}return n},this.I_FullScreen=function(e){re()?c.JS_FullScreenDisplay(e):c.HWP_FullScreenDisplay(e)},this.I_SetPreset=function(e,t){var n={iWndIndex:u,iPresetID:e};f.extend(n,t);var r=this.findWndIndexByIndex(n.iWndIndex);if(-1!=r){var s=p[r];if(r=this.findDeviceIndexByIP(s.szIP),-1!=r){var o=d[r];o.oProtocolInc.setPreset(o,s,n)}}},this.I_GoPreset=function(e,t){var n={iWndIndex:u,iPresetID:e};f.extend(n,t);var r=this.findWndIndexByIndex(n.iWndIndex);if(-1!=r){var s=p[r];if(r=this.findDeviceIndexByIP(s.szIP),-1!=r){var o=d[r];o.oProtocolInc.goPreset(o,s,n)}}},this.I_RecordSearch=function(e,t,n,r,s){var o=this.findDeviceIndexByIP(e);if(-1!=o){var i=d[o],a={iChannelID:t,szStartTime:n,szEndTime:r,iSearchPos:0,iStreamType:1,success:null,error:null};f.extend(a,s),i.oProtocolInc.recordSearch(i,a)}},this.I_StartPlayback=function(e,t){var r=this.findDeviceIndexByIP(e),s="",o="",i=-1,a=1,c=0,l=f.dateFormat(new Date,"yyyy-MM-dd"),p={iWndIndex:u,iStreamType:1,iChannelID:1,szStartTime:l+" 00:00:00",szEndTime:l+" 23:59:59"};if(f.extend(p,t),-1!=r){te(d[r]);var P=d[r];if(re()){if(!P.bSupportWebsocket)return void(t.error&&t.error(403,oe()));if(!B(p.oTransCodeParam))return void(t.error&&t.error());s=P.oProtocolInc.CGI.startWsPlayback,o="ws://",B(p.iWSPort)?P.iWSPort=7681:P.iWSPort=p.iWSPort,i=P.iWSPort,c=p.iStreamType,a=p.iChannelID<=P.iAnalogChannelNum?p.iChannelID:P.oStreamCapa.iIpChanBase+parseInt(p.iChannelID,10)-P.iAnalogChannelNum-1,a=100*a+c}else{var h=parseInt(n.$XML(C).find("ProtocolType").eq(0).text(),10);h==W&&P.oStreamCapa.bSupportShttpPlay?(s=B(p.oTransCodeParam)?P.oProtocolInc.CGI.startShttpPlayback:P.oProtocolInc.CGI.startTransCodePlayback,o="http://",c=p.iStreamType-1,a=p.iChannelID<=P.iAnalogChannelNum?p.iChannelID:P.oStreamCapa.iIpChanBase+parseInt(p.iChannelID,10)-P.iAnalogChannelNum-1,P.bSupportSubStreamPlayback&&(a=100*a+c),B(p.iPort)?"https://"==P.szHttpProtocol?(-1==P.iHttpPort&&(P.iHttpPort=J(P).iHttpPort),i=P.iHttpPort):i=P.iCGIPort:(P.iHttpPort=p.iPort,i=p.iPort)):(s=P.oProtocolInc.CGI.startPlayback,o="rtsp://",c=p.iStreamType,a=100*p.iChannelID+c,B(p.iRtspPort)||(P.iRtspPort=p.iRtspPort),-1==P.iRtspPort&&(P.iRtspPort=J(P).iRtspPort),i=P.iRtspPort)}if(-1==i)return _("获取端口号失败"),void(t.error&&t.error());if(f.extend(p,{urlProtocol:o,cgi:s,iPort:i,iChannelID:a}),r=this.findWndIndexByIndex(p.iWndIndex),-1==r)if(re())p.szStartTime=p.szStartTime.replace(" ","T")+"Z",p.szEndTime=p.szEndTime.replace(" ","T")+"Z",P.oProtocolInc.startPlayback(P,p).then(function(){t.success&&t.success()},function(){t.error&&t.error()});else{p.szStartTime=p.szStartTime.replace(/[-:]/g,"").replace(" ","T")+"Z",p.szEndTime=p.szEndTime.replace(/[-:]/g,"").replace(" ","T")+"Z";var I=P.oProtocolInc.startPlayback(P,p);0==I?t.success&&t.success():(P.iRtspPort=-1,t.error&&t.error())}}else t.error&&t.error()},this.I_ReversePlayback=function(e,t){var r=this.findDeviceIndexByIP(e),s=-1,o="",i="",a=-1,c=-1,l=0,p=f.dateFormat(new Date,"yyyy-MM-dd"),P={iWndIndex:u,iStreamType:1,iChannelID:1,szStartTime:p+" 00:00:00",szEndTime:p+" 23:59:59"};if(f.extend(P,t),-1!=r){te(d[r]);var h=d[r];if(re())return s;var I=parseInt(n.$XML(C).find("ProtocolType").eq(0).text(),10);if(I==W&&h.oStreamCapa.bSupportShttpPlay?(o=h.oProtocolInc.CGI.startShttpReversePlayback,i="http://",l=P.iStreamType-1,c=P.iChannelID<=h.iAnalogChannelNum?P.iChannelID:h.oStreamCapa.iIpChanBase+parseInt(P.iChannelID,10)-h.iAnalogChannelNum-1,c=100*c+l,B(P.iPort)?"https://"==h.szHttpProtocol?(-1==h.iHttpPort&&(h.iHttpPort=J(h).iHttpPort),a=h.iHttpPort):a=h.iCGIPort:(h.iHttpPort=P.iPort,a=P.iPort)):(o=h.oProtocolInc.CGI.startPlayback,i="rtsp://",l=P.iStreamType,c=100*P.iChannelID+l,B(P.iRtspPort)||(h.iRtspPort=P.iRtspPort),-1==h.iRtspPort&&(h.iRtspPort=J(h).iRtspPort),a=h.iRtspPort),-1==a)return _("获取端口号失败"),s;f.extend(P,{urlProtocol:i,cgi:o,iPort:a,iChannelID:c}),r=this.findWndIndexByIndex(P.iWndIndex),-1==r&&(P.szStartTime=P.szStartTime.replace(/[-:]/g,"").replace(" ","T")+"Z",P.szEndTime=P.szEndTime.replace(/[-:]/g,"").replace(" ","T")+"Z",s=h.oProtocolInc.reversePlayback(h,P))}return-1==s&&(h.iRtspPort=-1),s},this.I_Frame=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){var r=p[n],s=r.iPlayStatus;if(s==D||s==T)if(re())c.JS_FrameForward(t.iWndIndex).then(function(){r.iPlayStatus=T,t.success&&t.success()},function(){t.error&&t.error()});else{var o=c.HWP_FrameForward(t.iWndIndex);0==o?(r.iPlayStatus=T,t.success&&t.success()):t.error&&t.error()}else t.error&&t.error()}else t.error&&t.error()},this.I_Pause=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){var r=p[n],s=r.iPlayStatus,o=-1;if(s==D)o=z;else{if(s!=b)return void(t.error&&t.error());o=A}if(re())c.JS_Pause(t.iWndIndex).then(function(){r.iPlayStatus=o,t.success&&t.success()},function(){t.error&&t.error()});else{var i=c.HWP_Pause(t.iWndIndex);0==i?(r.iPlayStatus=o,t.success&&t.success()):t.error&&t.error()}}else t.error&&t.error()},this.I_Resume=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){var r=p[n],s=r.iPlayStatus,o=-1;if(s==z||s==T)o=D;else{if(s!=A)return void(t.error&&t.error());o=b}if(re())c.JS_Resume(t.iWndIndex).then(function(){r.iPlayStatus=o,t.success&&t.success()},function(){t.error&&t.error()});else{var i=c.HWP_Resume(t.iWndIndex);0==i?(r.iPlayStatus=o,t.success&&t.success()):t.error&&t.error()}}else t.error&&t.error()},this.I_PlaySlow=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){var r=p[n];if(r.iPlayStatus==D)if(re()){var s=c.JS_GetWndStatus(t.iWndIndex);s.iRate<=-4?t.error&&t.error():c.JS_Slow(t.iWndIndex).then(function(){t.success&&t.success()},function(){t.error&&t.error()})}else{var o=c.HWP_Slow(t.iWndIndex);0==o?t.success&&t.success():t.error&&t.error()}else t.error&&t.error()}else t.error&&t.error()},this.I_PlayFast=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){var r=p[n];if(r.iPlayStatus==D)if(re()){var s=c.JS_GetWndStatus(t.iWndIndex);s.iRate>=4?t.error&&t.error():c.JS_Fast(t.iWndIndex).then(function(){t.success&&t.success()},function(){t.error&&t.error()})}else{var o=c.HWP_Fast(t.iWndIndex);0==o?t.success&&t.success():t.error&&t.error()}else t.error&&t.error()}else t.error&&t.error()},this.I_GetOSDTime=function(e){var t={iWndIndex:u};N(e)?f.extend(t,e):B(e)||(t.iWndIndex=e);var n=this.findWndIndexByIndex(t.iWndIndex);if(-1!=n){if(re())c.JS_GetOSDTime(t.iWndIndex).then(function(e){if(t.success){var n=f.dateFormat(new Date(1e3*e),"yyyy-MM-dd hh:mm:ss");t.success(n)}},function(){t.error&&t.error()});else if(t.success){var r=c.HWP_GetOSDTime(t.iWndIndex),s=f.dateFormat(new Date(1e3*r),"yyyy-MM-dd hh:mm:ss");t.success(s)}}else t.error&&t.error()},this.I_StartDownloadRecord=function(e,t,n,r){var s=this.findDeviceIndexByIP(e),o=-1;if(-1!=s){var i=d[s],a={szPlaybackURI:t,szFileName:n,bDateDir:!0};B(r)||f.extend(a,r),o=i.oProtocolInc.startDownloadRecord(i,a)}return o},this.I_GetDownloadStatus=function(e){var t=-1;return re()?t:(t=c.HWP_GetDownloadStatus(e),1==t&&(t=-1),t)},this.I_GetDownloadProgress=function(e){return re()?-1:c.HWP_GetDownloadProgress(e);
  2 +},this.I_StopDownloadRecord=function(e){return re()?-1:c.HWP_StopDownload(e)},this.I_ExportDeviceConfig=function(e){var t=this.findDeviceIndexByIP(e),n=-1;if(-1!=t){var r=d[t];if(re())return n;n=r.oProtocolInc.exportDeviceConfig(r)}return n},this.I_ImportDeviceConfig=function(e,t){var n=this.findDeviceIndexByIP(e),r=-1;if(-1!=n){var s=d[n],o={szFileName:t};if(re())return r;r=s.oProtocolInc.importDeviceConfig(s,o)}return r},this.I_RestoreDefault=function(e,t,n){var r={success:null,error:null};f.extend(r,n);var s=this.findDeviceIndexByIP(e);if(-1!=s){var o=d[s];o.oProtocolInc.restore(o,t,r)}},this.I_Restart=function(e,t){var n=this.findDeviceIndexByIP(e),r={success:null,error:null};if(f.extend(r,t),-1!=n){var s=d[n];s.oProtocolInc.restart(s,r)}},this.I_Reconnect=function(e,t){var n=this.findDeviceIndexByIP(e),r={success:null,error:null};if(f.extend(r,t),-1!=n){var s=d[n];s.oProtocolInc.login(s.szIP,s.iCGIPort,s.szAuth,r)}},this.I_StartUpgrade=function(e,t){var n=this.findDeviceIndexByIP(e),r=-1;if(-1!=n){var s=d[n],o={szFileName:t};if(re())return r;r=s.oProtocolInc.startUpgrade(s,o)}return r},this.I_UpgradeStatus=function(){return re()?-1:c.HWP_UpgradeStatus()},this.I_UpgradeProgress=function(){return re()?-1:c.HWP_UpgradeProgress()},this.I_StopUpgrade=function(){return re()?-1:c.HWP_StopUpgrade()},this.I_CheckPluginInstall=function(){var e=-1,t=f.browser();if(re())e=0;else if(t.msie)try{new ActiveXObject("WebVideoKitActiveX.WebVideoKitActiveXCtrl.1");e=0}catch(n){}else for(var r=0,s=navigator.mimeTypes.length;s>r;r++)if("application/webvideo-plugin-kit"==navigator.mimeTypes[r].type.toLowerCase()){e=0;break}return e},this.I_CheckPluginVersion=function(){return re()?0:c.HWP_CheckPluginUpdate(k)?-1:0},this.I_SendHTTPRequest=function(e,t,n){var r=this.findDeviceIndexByIP(e);if(!(0>r)){var s=d[r],o=new ue,i=s.szHttpProtocol+s.szIP+":"+s.iCGIPort+"/"+t,a={type:"GET",url:i,auth:s.szAuth,success:null,error:null};f.extend(a,n),f.extend(a,{success:function(e){n.success&&n.success(e)},error:function(e,t){n.error&&n.error(e,t)}}),o.setRequestParam(a),o.submitRequest()}},this.I_RemoteConfig=function(e,t){var n=this.findDeviceIndexByIP(e),r=-1,s=-1;if(re())return r;var o={iLan:0,iDevicePort:-1,iType:0};if(f.extend(o,t),-1!=n){var i=d[n];if(-1==o.iDevicePort)if(-1==i.iDevicePort){if(i.iDevicePort=J(i).iDevicePort,s=i.iDevicePort,-1==s)return r}else s=i.iDevicePort;else s=o.iDevicePort;if(":"==f.Base64.decode(i.szAuth)[0])var a=f.Base64.decode(i.szAuth).split(":")[1],u=f.Base64.decode(i.szAuth).split(":")[2];else var a=f.Base64.decode(i.szAuth).split(":")[0],u=f.Base64.decode(i.szAuth).split(":")[1];var l="<RemoteInfo><DeviceInfo><DeviceType>"+o.iType+"</DeviceType><LanType>"+o.iLan+"</LanType><IP>"+i.szIP+"</IP><Port>"+s+"</Port><UName>"+a+"</UName><PWD>"+f.Base64.encode(u)+"</PWD></DeviceInfo></RemoteInfo>";return c.HWP_ShowRemConfig(l)}return r},this.I_ChangeWndNum=function(e){return isNaN(parseInt(e,10))?-1:(re()?c.JS_ArrangeWindow(e):c.HWP_ArrangeWindow(e),0)},this.I_GetLastError=function(){return re()?-1:c.HWP_GetLastError()},this.I_GetWindowStatus=function(e){if(B(e)){var t=[];return f.extend(t,p),t}var n=this.findWndIndexByIndex(e);if(-1!=n){var t={};return f.extend(t,p[n]),t}return null},this.I_GetIPInfoByMode=function(e,t,n,r){return re()?"":c.HWP_GetIpInfoByMode(e,t,n,r)},this.I_SetPlayModeType=function(e){return re()?-1:c.HWP_SetPlayModeType(e)},this.I_SetSnapDrawMode=function(e,t){return re()?-1:c.HWP_SetSnapDrawMode(e,t)},this.I_SetSnapPolygonInfo=function(e,t){if(re())return-1;var r,s,o,i,a,u,l,d,p,P,h,I,m,C=c.HWP_GetSnapPolygonInfo(e);r=f.loadXML(C),s=n.$XML(r).find("SnapPolygon",!0);var S=s.length,v=[];for(o=0,i=s.length;i>o;o++)a=s[o],v.push(n.$XML(a).find("id").eq(0).text());var y=v.join(",");if(y=","+y+",",r=f.loadXML(t),s=n.$XML(r).find("SnapPolygon",!0),S+s.length>32)return-3;for(o=0,i=s.length;i>o;o++){if(a=s[o],u=n.$XML(a).find("id").eq(0).text(),!f.isInt(u))return-2;if(l=parseInt(u,10),1>l||l>32)return-2;if(y.indexOf(","+u+",")>-1)return-4;if(d=n.$XML(a).find("tips").eq(0).text(),d.length>32)return-2;if(h="true"===n.$XML(a).find("isClosed").eq(0).text(),!h){if(p=n.$XML(a).find("MinClosed").eq(0).text(),!f.isInt(p))return-2;if(P=parseInt(p,10),4>P||P>17)return-2;if(I=n.$XML(a).find("PointNumMax").eq(0).text(),!f.isInt(I))return-2;if(m=parseInt(I,10),P>m||m>17)return-2}}return c.HWP_SetSnapPolygonInfo(e,t)},this.I_GetSnapPolygonInfo=function(e){return re()?"":c.HWP_GetSnapPolygonInfo(e)},this.I_ClearSnapInfo=function(e){return re()?-1:c.HWP_ClearSnapInfo(e,1)},this.I_DeviceCapturePic=function(e,t,n,r){var s=this.findDeviceIndexByIP(e),o=-1;if(-1!=s){var i=d[s],a={bDateDir:!0};if(f.extend(a,r),!B(a.iResolutionWidth)&&!f.isInt(a.iResolutionWidth))return o;if(!B(a.iResolutionHeight)&&!f.isInt(a.iResolutionHeight))return o;o=i.oProtocolInc.deviceCapturePic(i,t,n,a)}return o},this.I_SetPackageType=function(e){return re()?-1:c.HWP_SetPackageType(e)},this.I_GetDevicePort=function(e){var t=this.findDeviceIndexByIP(e),n=null;if(-1!=t){var r=d[t];n=J(r)}return n},this.findDeviceIndexByIP=function(e){if(e.indexOf("_")>-1){for(var t=0,n=d.length;n>t;t++)if(d[t].szDeviceIdentify==e)return t}else for(var t=0,n=d.length;n>t;t++)if(d[t].szIP==e)return t;return-1},this.findWndIndexByIndex=function(e){for(var t=0,n=p.length;n>t;t++)if(p[t].iIndex==e)return t;return-1};var ae=function(){this.szIP="",this.szHostName="",this.szAuth="",this.szHttpProtocol="http://",this.iCGIPort=80,this.szDeviceIdentify="",this.iDevicePort=-1,this.iHttpPort=-1,this.iHttpsPort=-1,this.iRtspPort=-1,this.iWSPort=-1,this.iAudioType=1,this.m_iAudioBitRate=-1,this.m_iAudioSamplingRate=-1,this.iDeviceProtocol=S,this.oProtocolInc=null,this.iAnalogChannelNum=0,this.szDeviceType="",this.bVoiceTalk=!1,this.oStreamCapa={bObtained:!1,bSupportShttpPlay:!1,bSupportShttpPlayback:!1,bSupportShttpsPlay:!1,bSupportShttpsPlayback:!1,bSupportShttpPlaybackTransCode:!1,bSupportShttpsPlaybackTransCode:!1,iIpChanBase:1}},ce=function(){this.iIndex=0,this.szIP="",this.iCGIPort=80,this.szDeviceIdentify="",this.iChannelID="",this.iPlayStatus=g,this.bSound=!1,this.bRecord=!1,this.bPTZAuto=!1,this.bEZoom=!1,this.b3DZoom=!1},ue=function(){this.options={type:"GET",url:"",auth:"",timeout:1e4,data:"",async:!0,success:null,error:null},this.m_szHttpHead="",this.m_szHttpContent="",this.m_szHttpData=""};ue.prototype.m_httpRequestSet=[],ue.prototype.setRequestParam=function(e){f.extend(this.options,e)},ue.prototype.submitRequest=function(){var t=null,n=this;if(re()){this.options.auth?f.cookie("WebSession",this.options.auth):f.cookie("WebSession",null);var r=se(this.options.url),s=new e.XMLHttpRequest;s.open(this.options.type,r,this.options.async),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.setRequestHeader("If-Modified-Since","0"),s.send(this.options.data||null);var o=function(){if(4===s.readyState){t={funSuccessCallback:n.options.success,funErrorCallback:n.options.error};var e=s.status+s.responseText;0===s.status&&(e=""),n.httpDataAnalyse(t,e)}};this.options.async?(s.timeout=this.options.timeout,s.onreadystatechange=function(){o()}):o()}else{var i=this.getHttpMethod(this.options.type);if(this.options.async){var a=c.HWP_SubmitHttpRequest(i,this.options.url,this.options.auth,this.options.data,this.options.timeout);-1!=a&&(t={iRequestID:a,funSuccessCallback:this.options.success,funErrorCallback:this.options.error},this.m_httpRequestSet.push(t))}else{var u=c.HWP_SendHttpSynRequest(i,this.options.url,this.options.auth,this.options.data,this.options.timeout);t={funSuccessCallback:this.options.success,funErrorCallback:this.options.error},this.httpDataAnalyse(t,u)}}},ue.prototype.getHttpMethod=function(e){var t={GET:1,POST:2,PUT:5,DELETE:6},n=t[e];return n?n:-1},ue.prototype.processCallback=function(e,t){for(var n=null,r=0;r<this.m_httpRequestSet.length;r++)if(e==this.m_httpRequestSet[r].iRequestID){n=this.m_httpRequestSet[r],this.m_httpRequestSet.splice(r,1);break}null!=n&&(this.httpDataAnalyse(n,t),delete n)},ue.prototype.httpDataAnalyse=function(e,t){var n="",r=0;""==t||B(t)?e.funErrorCallback():(r=parseInt(t.substring(0,3)),n=t.substring(3,t.length),isNaN(r)?e.funErrorCallback():y==r?e.funSuccessCallback(f.loadXML(n)):e.funErrorCallback(r,f.loadXML(n)))};var le=function(){};le.prototype.CGI={login:"%s%s:%s/ISAPI/Security/userCheck",getAudioInfo:"%s%s:%s/ISAPI/System/TwoWayAudio/channels",getDeviceInfo:"%s%s:%s/ISAPI/System/deviceInfo",getAnalogChannelInfo:"%s%s:%s/ISAPI/System/Video/inputs/channels",getDigitalChannel:"%s%s:%s/ISAPI/ContentMgmt/InputProxy/channels",getDigitalChannelInfo:"%s%s:%s/ISAPI/ContentMgmt/InputProxy/channels/status",getZeroChannelInfo:"%s%s:%s/ISAPI/ContentMgmt/ZeroVideo/channels",getStreamChannels:{analog:"%s%s:%s/ISAPI/Streaming/channels",digital:"%s%s:%s/ISAPI/ContentMgmt/StreamingProxy/channels"},getStreamDynChannels:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/DynStreaming/channels",startRealPlay:{channels:"%s%s:%s/PSIA/streaming/channels/%s",zeroChannels:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/ZeroStreaming/channels/%s"},startShttpRealPlay:{channels:"%s%s:%s/SDK/play/%s/004",zeroChannels:"%s%s:%s/SDK/play/100/004/ZeroStreaming"},startWsRealPlay:{channels:"%s%s:%s/%s",zeroChannels:"%s%s:%s/%s"},startVoiceTalk:{open:"%s%s:%s/ISAPI/System/TwoWayAudio/channels/%s/open",close:"%s%s:%s/ISAPI/System/TwoWayAudio/channels/%s/close",audioData:"%s%s:%s/ISAPI/System/TwoWayAudio/channels/%s/audioData"},ptzControl:{analog:"%s%s:%s/ISAPI/PTZCtrl/channels/%s/continuous",digital:"%s%s:%s/ISAPI/ContentMgmt/PTZCtrlProxy/channels/%s/continuous"},ptzAutoControl:{ipdome:"%s%s:%s/ISAPI/PTZCtrl/channels/%s/presets/%s/goto",analog:"%s%s:%s/ISAPI/PTZCtrl/channels/%s/autoPan",digital:"%s%s:%s/ISAPI/ContentMgmt/PTZCtrlProxy/channels/%s/autoPan"},setPreset:{analog:"%s%s:%s/ISAPI/PTZCtrl/channels/%s/presets/%s",digital:"%s%s:%s/ISAPI/ContentMgmt/PTZCtrlProxy/channels/%s/presets/%s"},goPreset:{analog:"%s%s:%s/ISAPI/PTZCtrl/channels/%s/presets/%s/goto",digital:"%s%s:%s/ISAPI/ContentMgmt/PTZCtrlProxy/channels/%s/presets/%s/goto"},ptzFocus:{analog:"%s%s:%s/ISAPI/Image/channels/%s/focus",digital:"%s%s:%s/ISAPI/ContentMgmt/ImageProxy/channels/%s/focus",ipc:"%s%s:%s/ISAPI/System/Video/inputs/channels/%s/focus"},ptzIris:{analog:"%s%s:%s/ISAPI/Image/channels/%s/iris",digital:"%s%s:%s/ISAPI/ContentMgmt/ImageProxy/channels/%s/iris",ipc:"%s%s:%s/ISAPI/System/Video/inputs/channels/%s/iris"},getNetworkBond:"%s%s:%s/ISAPI/System/Network/Bond",getNetworkInterface:"%s%s:%s/ISAPI/System/Network/interfaces",getUPnPPortStatus:"%s%s:%s/ISAPI/System/Network/UPnP/ports/status",getPPPoEStatus:"%s%s:%s/ISAPI/System/Network/PPPoE/1/status",getPortInfo:"%s%s:%s/ISAPI/Security/adminAccesses",recordSearch:"%s%s:%s/ISAPI/ContentMgmt/search",startPlayback:"%s%s:%s/PSIA/streaming/tracks/%s?starttime=%s&endtime=%s",startWsPlayback:"%s%s:%s/%s",startShttpPlayback:"%s%s:%s/SDK/playback/%s",startShttpReversePlayback:"%s%s:%s/SDK/playback/%s/reversePlay",startTransCodePlayback:"%s%s:%s/SDK/playback/%s/transcoding",startDownloadRecord:"%s%s:%s/ISAPI/ContentMgmt/download",deviceConfig:"%s%s:%s/ISAPI/System/configurationData",restart:"%s%s:%s/ISAPI/System/reboot",restore:"%s%s:%s/ISAPI/System/factoryReset?mode=%s",startUpgrade:{upgrade:"%s%s:%s/ISAPI/System/updateFirmware",status:"%s%s:%s/ISAPI/System/upgradeStatus"},set3DZoom:{analog:"%s%s:%s/ISAPI/PTZCtrl/channels/%s/position3D",digital:"%s%s:%s/ISAPI/ContentMgmt/PTZCtrlProxy/channels/%s/position3D"},SDKCapabilities:"%s%s:%s/SDK/capabilities",deviceCapture:{channels:"%s%s:%s/ISAPI/Streaming/channels/%s/picture"},sessionCap:"%s%s:%s/ISAPI/Security/sessionLogin/capabilities?username=%s",sessionLogin:"%s%s:%s/ISAPI/Security/sessionLogin",sessionHeartbeat:"%s%s:%s/ISAPI/Security/sessionHeartbeat",sessionLogout:"%s%s:%s/ISAPI/Security/sessionLogout",systemCapabilities:"%s%s:%s/ISAPI/System/capabilities"},le.prototype.login=function(e,t,n,r){var s=2==r.protocol?"https://":"http://",o=E(this.CGI.login,s,e,t),i=new ue,a={type:"GET",url:o,auth:n,success:null,error:null};f.extend(a,r),f.extend(a,{success:function(e){r.success&&r.success(e)},error:function(e,t){r.error&&r.error(e,t)}}),i.setRequestParam(a),i.submitRequest()},le.prototype.getAudioInfo=function(e,t){var n=E(this.CGI.getAudioInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getDeviceInfo=function(e,t){var r=E(this.CGI.getDeviceInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),s=new ue,o={type:"GET",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,t),f.extend(o,{success:function(e){var r=[];r.push("<DeviceInfo>"),r.push("<deviceName>"+f.escape(n.$XML(e).find("deviceName").eq(0).text())+"</deviceName>"),r.push("<deviceID>"+n.$XML(e).find("deviceID").eq(0).text()+"</deviceID>"),r.push("<deviceType>"+n.$XML(e).find("deviceType").eq(0).text()+"</deviceType>"),r.push("<model>"+n.$XML(e).find("model").eq(0).text()+"</model>"),r.push("<serialNumber>"+n.$XML(e).find("serialNumber").eq(0).text()+"</serialNumber>"),r.push("<macAddress>"+n.$XML(e).find("macAddress").eq(0).text()+"</macAddress>"),r.push("<firmwareVersion>"+n.$XML(e).find("firmwareVersion").eq(0).text()+"</firmwareVersion>"),r.push("<firmwareReleasedDate>"+n.$XML(e).find("firmwareReleasedDate").eq(0).text()+"</firmwareReleasedDate>"),r.push("<encoderVersion>"+n.$XML(e).find("encoderVersion").eq(0).text()+"</encoderVersion>"),r.push("<encoderReleasedDate>"+n.$XML(e).find("encoderReleasedDate").eq(0).text()+"</encoderReleasedDate>"),r.push("</DeviceInfo>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),s.setRequestParam(o),s.submitRequest()},le.prototype.getAnalogChannelInfo=function(e,t){var r=E(this.CGI.getAnalogChannelInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),s=new ue,o={type:"GET",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,t),f.extend(o,{success:function(e){var r=[];r.push("<VideoInputChannelList>");for(var s=n.$XML(e).find("VideoInputChannel",!0),o=0,i=s.length;i>o;o++){var a=s[o];r.push("<VideoInputChannel>"),r.push("<id>"+n.$XML(a).find("id").eq(0).text()+"</id>"),r.push("<inputPort>"+n.$XML(a).find("inputPort").eq(0).text()+"</inputPort>"),r.push("<name>"+f.escape(n.$XML(a).find("name").eq(0).text())+"</name>"),r.push("<videoFormat>"+n.$XML(a).find("videoFormat").eq(0).text()+"</videoFormat>"),r.push("</VideoInputChannel>")}r.push("</VideoInputChannelList>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),s.setRequestParam(o),s.submitRequest()},le.prototype.getDigitalChannel=function(e,t){var r=E(this.CGI.getDigitalChannel,e.szHttpProtocol,e.szIP,e.iCGIPort),s=new ue,o={type:"GET",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,t),f.extend(o,{success:function(e){var r=[];r.push("<InputProxyChannelList>");for(var s=n.$XML(e).find("InputProxyChannel",!0),o=0,i=s.length;i>o;o++){var a=s[o];r.push("<InputProxyChannel>"),r.push("<id>"+n.$XML(a).find("id").eq(0).text()+"</id>"),r.push("<name>"+f.escape(n.$XML(a).find("name").eq(0).text())+"</name>"),r.push("</InputProxyChannel>")}r.push("</InputProxyChannelList>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),s.setRequestParam(o),s.submitRequest()},le.prototype.getDigitalChannelInfo=function(e,t){var r=null,s={};if(this.getDigitalChannel(e,{async:!1,success:function(e){r=e;for(var t=n.$XML(r).find("InputProxyChannel",!0),o=0,i=t.length;i>o;o++){var a=t[o],c=n.$XML(a).find("id").eq(0).text(),u=n.$XML(a).find("name").eq(0).text();s[c]=u}},error:function(e,n){t.error&&t.error(e,n)}}),null!==r){var o=E(this.CGI.getDigitalChannelInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),i=new ue,a={type:"GET",url:o,auth:e.szAuth,success:null,error:null};f.extend(a,t),f.extend(a,{success:function(e){var r=[];r.push("<InputProxyChannelStatusList>");for(var o=n.$XML(e).find("InputProxyChannelStatus",!0),i=0,a=o.length;a>i;i++){var c=o[i],u=n.$XML(c).find("id").eq(0).text();r.push("<InputProxyChannelStatus>"),r.push("<id>"+u+"</id>"),r.push("<sourceInputPortDescriptor>"),r.push("<proxyProtocol>"+n.$XML(c).find("proxyProtocol").eq(0).text()+"</proxyProtocol>"),r.push("<addressingFormatType>"+n.$XML(c).find("addressingFormatType").eq(0).text()+"</addressingFormatType>"),r.push("<ipAddress>"+n.$XML(c).find("ipAddress").eq(0).text()+"</ipAddress>"),r.push("<managePortNo>"+n.$XML(c).find("managePortNo").eq(0).text()+"</managePortNo>"),r.push("<srcInputPort>"+n.$XML(c).find("srcInputPort").eq(0).text()+"</srcInputPort>"),r.push("<userName>"+f.escape(n.$XML(c).find("userName").eq(0).text())+"</userName>"),r.push("<streamType>"+n.$XML(c).find("streamType").eq(0).text()+"</streamType>"),r.push("<online>"+n.$XML(c).find("online").eq(0).text()+"</online>"),r.push("<name>"+f.escape(s[u])+"</name>"),r.push("</sourceInputPortDescriptor>"),r.push("</InputProxyChannelStatus>")}r.push("</InputProxyChannelStatusList>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),i.setRequestParam(a),i.submitRequest()}},le.prototype.getZeroChannelInfo=function(e,t){var n=E(this.CGI.getZeroChannelInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getStreamChannels=function(e,t){if(0!=e.iAnalogChannelNum)var n=E(this.CGI.getStreamChannels.analog,e.szHttpProtocol,e.szIP,e.iCGIPort);else var n=E(this.CGI.getStreamChannels.digital,e.szHttpProtocol,e.szIP,e.iCGIPort);var r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getPPPoEStatus=function(e,t){var n=E(this.CGI.getPPPoEStatus,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getUPnPPortStatus=function(e,t){var n=E(this.CGI.getUPnPPortStatus,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getNetworkBond=function(e,t){var n=E(this.CGI.getNetworkBond,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getNetworkInterface=function(e,t){var n=E(this.CGI.getNetworkInterface,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getPortInfo=function(e,t){var n=E(this.CGI.getPortInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.startRealPlay=function(e,t){var n=100*t.iChannelID+t.iStreamType,r="",s=-1,o=e.szIP;"rtsp://"===t.urlProtocol&&(o=Z(o)),t.bZeroChannel?(re()&&(n=0),r=E(t.cgi.zeroChannels,t.urlProtocol,o,t.iPort,n)):r=E(t.cgi.channels,t.urlProtocol,o,t.iPort,n);var i=function(){var n=new ce;n.iIndex=t.iWndIndex,n.szIP=e.szIP,n.iCGIPort=e.iCGIPort,n.szDeviceIdentify=e.szDeviceIdentify,n.iChannelID=t.iChannelID,n.iPlayStatus=x,p.push(n)};if(re()){var a=new Promise(function(n,s){c.JS_Play(r,{session:e.szAuth},t.iWndIndex).then(function(){i(),n()},function(){s()})});return a}return s=c.HWP_Play(r,e.szAuth,t.iWndIndex,"",""),0==s&&i(),s},le.prototype.startVoiceTalk=function(e,t){var n=E(this.CGI.startVoiceTalk.open,e.szHttpProtocol,e.szIP,e.iCGIPort,t),r=E(this.CGI.startVoiceTalk.close,e.szHttpProtocol,e.szIP,e.iCGIPort,t),s=E(this.CGI.startVoiceTalk.audioData,e.szHttpProtocol,e.szIP,e.iCGIPort,t),o=c.HWP_StartVoiceTalkEx(n,r,s,e.szAuth,e.iAudioType,e.m_iAudioBitRate,e.m_iAudioSamplingRate);return o},le.prototype.ptzAutoControl=function(e,t,n,r){var s=n.iChannelID,o="",i="";if(r.iPTZSpeed=r.iPTZSpeed<7?15*r.iPTZSpeed:100,t&&(r.iPTZSpeed=0),e.szDeviceType!=w)o=s<=e.iAnalogChannelNum?E(this.CGI.ptzAutoControl.analog,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID):n.bShttpIPChannel?E(this.CGI.ptzAutoControl.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID-e.oStreamCapa.iIpChanBase+1+e.iAnalogChannelNum):E(this.CGI.ptzAutoControl.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID),i="<?xml version='1.0' encoding='UTF-8'?><autoPanData><autoPan>"+r.iPTZSpeed+"</autoPan></autoPanData>";else{var a=99;t&&(a=96),o=E(this.CGI.ptzAutoControl.ipdome,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID,a)}var c=new ue,u={type:"PUT",url:o,async:!1,auth:e.szAuth,data:i,success:null,error:null},l=this;f.extend(u,r),f.extend(u,{success:function(e){n.bPTZAuto=!n.bPTZAuto,r.success&&r.success(e)},error:function(t,s){if(X==e.szDeviceType||H==e.szDeviceType){o=n.bShttpIPChannel?E(l.CGI.ptzControl.analog,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID-e.oStreamCapa.iIpChanBase+1+e.iAnalogChannelNum):E(l.CGI.ptzControl.analog,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID),i="<?xml version='1.0' encoding='UTF-8'?><PTZData><pan>"+r.iPTZSpeed+"</pan><tilt>0</tilt></PTZData>";var a=new ue,c={type:"PUT",url:o,async:!1,auth:e.szAuth,data:i,success:null,error:null};f.extend(c,r),a.setRequestParam(c),a.submitRequest()}else r.error&&r.error(t,s)}}),c.setRequestParam(u),c.submitRequest()},le.prototype.ptzControl=function(e,t,n,r){var s=n.iChannelID,o="";n.bPTZAuto&&this.ptzAutoControl(e,!0,n,{iPTZSpeed:0}),t?r.iPTZSpeed=0:r.iPTZSpeed=r.iPTZSpeed<7?15*r.iPTZSpeed:100;var i=[{},{pan:0,tilt:r.iPTZSpeed},{pan:0,tilt:-r.iPTZSpeed},{pan:-r.iPTZSpeed,tilt:0},{pan:r.iPTZSpeed,tilt:0},{pan:-r.iPTZSpeed,tilt:r.iPTZSpeed},{pan:-r.iPTZSpeed,tilt:-r.iPTZSpeed},{pan:r.iPTZSpeed,tilt:r.iPTZSpeed},{pan:r.iPTZSpeed,tilt:-r.iPTZSpeed},{},{speed:r.iPTZSpeed},{speed:-r.iPTZSpeed},{speed:r.iPTZSpeed},{speed:-r.iPTZSpeed},{speed:r.iPTZSpeed},{speed:-r.iPTZSpeed}],a="",c={};switch(r.iPTZIndex){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:c=this.CGI.ptzControl,a="<?xml version='1.0' encoding='UTF-8'?><PTZData><pan>"+i[r.iPTZIndex].pan+"</pan><tilt>"+i[r.iPTZIndex].tilt+"</tilt></PTZData>";break;case 10:case 11:c=this.CGI.ptzControl,a="<?xml version='1.0' encoding='UTF-8'?><PTZData><zoom>"+i[r.iPTZIndex].speed+"</zoom></PTZData>";break;case 12:case 13:c=this.CGI.ptzFocus,a="<?xml version='1.0' encoding='UTF-8'?><FocusData><focus>"+i[r.iPTZIndex].speed+"</focus></FocusData>";break;case 14:case 15:c=this.CGI.ptzIris,a="<?xml version='1.0' encoding='UTF-8'?><IrisData><iris>"+i[r.iPTZIndex].speed+"</iris></IrisData>";break;default:return void(r.error&&r.error())}o=c!=this.CGI.ptzFocus&&c!=this.CGI.ptzIris||e.szDeviceType!=X&&e.szDeviceType!=w&&e.szDeviceType!=H?s<=e.iAnalogChannelNum?E(c.analog,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID):n.bShttpIPChannel?E(c.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID-e.oStreamCapa.iIpChanBase+1+e.iAnalogChannelNum):E(c.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID):E(c.ipc,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID);var u=new ue,l={type:"PUT",url:o,async:!1,auth:e.szAuth,data:a,success:null,error:null};f.extend(l,r),f.extend(l,{success:function(e){r.success&&r.success(e)},error:function(e,t){r.error&&r.error(e,t)}}),u.setRequestParam(l),u.submitRequest()},le.prototype.setPreset=function(e,t,n){var r=t.iChannelID,s="",o="";s=r<=e.iAnalogChannelNum?E(this.CGI.setPreset.analog,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID,n.iPresetID):t.bShttpIPChannel?E(this.CGI.setPreset.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID-e.oStreamCapa.iIpChanBase+1+e.iAnalogChannelNum,n.iPresetID):E(this.CGI.setPreset.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID,n.iPresetID),o="<?xml version='1.0' encoding='UTF-8'?>",o+="<PTZPreset>",o+="<id>"+n.iPresetID+"</id>",e.szDeviceType!=w&&(o+="<presetName>Preset"+n.iPresetID+"</presetName>"),o+="</PTZPreset>";var i=new ue,a={type:"PUT",url:s,auth:e.szAuth,data:o,success:null,error:null};f.extend(a,n),f.extend(a,{success:function(e){n.success&&n.success(e)},error:function(e,t){n.error&&n.error(e,t)}}),i.setRequestParam(a),i.submitRequest()},le.prototype.goPreset=function(e,t,n){var r=t.iChannelID,s="";s=r<=e.iAnalogChannelNum?E(this.CGI.goPreset.analog,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID,n.iPresetID):t.bShttpIPChannel?E(this.CGI.goPreset.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID-e.oStreamCapa.iIpChanBase+1+e.iAnalogChannelNum,n.iPresetID):E(this.CGI.goPreset.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID,n.iPresetID);var o=new ue,i={type:"PUT",url:s,auth:e.szAuth,success:null,error:null};f.extend(i,n),f.extend(i,{success:function(e){n.success&&n.success(e)},error:function(e,t){n.error&&n.error(e,t)}}),o.setRequestParam(i),o.submitRequest()},le.prototype.recordSearch=function(e,r){var s="",o="",i=r.iChannelID,a=r.iStreamType,c=r.szStartTime.replace(" ","T")+"Z",u=r.szEndTime.replace(" ","T")+"Z";s=E(this.CGI.recordSearch,e.szHttpProtocol,e.szIP,e.iCGIPort),o="<?xml version='1.0' encoding='UTF-8'?><CMSearchDescription><searchID>"+new t+"</searchID><trackList><trackID>"+(100*i+a)+"</trackID></trackList><timeSpanList><timeSpan><startTime>"+c+"</startTime><endTime>"+u+"</endTime></timeSpan></timeSpanList><maxResults>40</maxResults><searchResultPostion>"+r.iSearchPos+"</searchResultPostion><metadataList><metadataDescriptor>//metadata.ISAPI.org/VideoMotion</metadataDescriptor></metadataList></CMSearchDescription>";var l=new ue,d={type:"POST",url:s,auth:e.szAuth,data:o,success:null,error:null};f.extend(d,r),f.extend(d,{success:function(e){var t=[];t.push("<CMSearchResult>"),t.push("<responseStatus>"+n.$XML(e).find("responseStatus").eq(0).text()+"</responseStatus>"),t.push("<responseStatusStrg>"+n.$XML(e).find("responseStatusStrg").eq(0).text()+"</responseStatusStrg>"),t.push("<numOfMatches>"+n.$XML(e).find("numOfMatches").eq(0).text()+"</numOfMatches>"),t.push("<matchList>");for(var s=n.$XML(e).find("searchMatchItem",!0),o=0,i=s.length;i>o;o++){var a=s[o];t.push("<searchMatchItem>"),t.push("<trackID>"+n.$XML(a).find("trackID").eq(0).text()+"</trackID>"),t.push("<startTime>"+n.$XML(a).find("startTime").eq(0).text()+"</startTime>"),t.push("<endTime>"+n.$XML(a).find("endTime").eq(0).text()+"</endTime>"),t.push("<playbackURI>"+f.escape(n.$XML(a).find("playbackURI").eq(0).text())+"</playbackURI>"),t.push("<metadataDescriptor>"+n.$XML(a).find("metadataDescriptor").eq(0).text().split("/")[1]+"</metadataDescriptor>"),t.push("</searchMatchItem>")}t.push("</matchList>"),t.push("</CMSearchResult>"),e=f.loadXML(t.join("")),r.success&&r.success(e)},error:function(e,t){r.error&&r.error(e,t)}}),l.setRequestParam(d),l.submitRequest()},le.prototype.startPlayback=function(e,t){var n=t.iWndIndex,r="",s=t.szStartTime,o=t.szEndTime,i=e.szIP;if("rtsp://"===t.urlProtocol&&(i=Z(i)),r=re()?E(t.cgi,t.urlProtocol,i,t.iPort,t.iChannelID):E(t.cgi,t.urlProtocol,i,t.iPort,t.iChannelID,s,o),!B(t.oTransCodeParam)){var a=ne(t.oTransCodeParam);if(""==a)return-1;c.HWP_SetTrsPlayBackParam(n,a)}var u=function(){var r=new ce;r.iIndex=n,r.szIP=e.szIP,r.iCGIPort=e.iCGIPort,r.szDeviceIdentify=e.szDeviceIdentify,r.iChannelID=t.iChannelID,r.iPlayStatus=D,p.push(r)};if(re()){var l=new Promise(function(t,i){c.JS_Play(r,{session:e.szAuth},n,s,o).then(function(){u(),t()},function(){i()})});return l}var d=c.HWP_Play(r,e.szAuth,n,s,o);return 0==d&&u(),d},le.prototype.reversePlayback=function(e,t){var n=t.iWndIndex,r=t.szStartTime,s=t.szEndTime,o=e.szIP;"rtsp://"===t.urlProtocol&&(o=Z(o));var i=E(t.cgi,t.urlProtocol,o,t.iPort,t.iChannelID,r,s),a=c.HWP_ReversePlay(i,e.szAuth,n,r,s);if(0==a){var u=new ce;u.iIndex=n,u.szIP=e.szIP,u.iCGIPort=e.iCGIPort,u.szDeviceIdentify=e.szDeviceIdentify,u.iChannelID=t.iChannelID,u.iPlayStatus=b,p.push(u)}return a},le.prototype.startDownloadRecord=function(e,t){var n=-1,r=E(this.CGI.startDownloadRecord,e.szHttpProtocol,e.szIP,e.iCGIPort),s="<?xml version='1.0' encoding='UTF-8'?><downloadRequest><playbackURI> "+f.escape(t.szPlaybackURI)+"</playbackURI></downloadRequest>";return re()?(r=se(r),n=c.JS_StartDownload(r,e.szAuth,t.szFileName,s)):n=c.HWP_StartDownload(r,e.szAuth,t.szFileName,s,t.bDateDir),n},le.prototype.exportDeviceConfig=function(e){var t=E(this.CGI.deviceConfig,e.szHttpProtocol,e.szIP,e.iCGIPort);return c.HWP_ExportDeviceConfig(t,e.szAuth,"",0)},le.prototype.importDeviceConfig=function(e,t){var n=E(this.CGI.deviceConfig,e.szHttpProtocol,e.szIP,e.iCGIPort);return c.HWP_ImportDeviceConfig(n,e.szAuth,t.szFileName,0)},le.prototype.restart=function(e,t){var n=E(this.CGI.restart,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"PUT",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.restore=function(e,t,n){var r=E(this.CGI.restore,e.szHttpProtocol,e.szIP,e.iCGIPort,t),s=new ue,o={type:"PUT",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,n),f.extend(o,{success:function(e){n.success&&n.success(e)},error:function(e,t){n.error&&n.error(e,t)}}),s.setRequestParam(o),s.submitRequest()},le.prototype.startUpgrade=function(e,t){var n=E(this.CGI.startUpgrade.upgrade,e.szHttpProtocol,e.szIP,e.iCGIPort),r=E(this.CGI.startUpgrade.status,e.szHttpProtocol,e.szIP,e.iCGIPort);return c.HWP_StartUpgrade(n,r,e.szAuth,t.szFileName)},le.prototype.set3DZoom=function(e,t,r,s){var o=t.iChannelID,i="";i=o<=e.iAnalogChannelNum?E(this.CGI.set3DZoom.analog,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID):t.bShttpIPChannel?E(this.CGI.set3DZoom.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID-e.oStreamCapa.iIpChanBase+1+e.iAnalogChannelNum):E(this.CGI.set3DZoom.digital,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID);var a=f.loadXML(r),c=parseInt(n.$XML(a).find("StartPoint").eq(0).find("positionX").eq(0).text(),10),u=parseInt(n.$XML(a).find("StartPoint").eq(0).find("positionY").eq(0).text(),10),l=parseInt(n.$XML(a).find("EndPoint").eq(0).find("positionX").eq(0).text(),10),d=parseInt(n.$XML(a).find("EndPoint").eq(0).find("positionY").eq(0).text(),10),p="<?xml version='1.0' encoding='UTF-8'?><Position3D><StartPoint><positionX>"+c+"</positionX><positionY>"+(255-u)+"</positionY></StartPoint><EndPoint><positionX>"+l+"</positionX><positionY>"+(255-d)+"</positionY></EndPoint></Position3D>",P=new ue,h={type:"PUT",url:i,data:p,auth:e.szAuth,success:null,error:null};f.extend(h,s),f.extend(h,{success:function(e){s.success&&s.success(e)},error:function(e,t){s.error&&s.error(e,t)}}),P.setRequestParam(h),P.submitRequest()},le.prototype.getSDKCapa=function(e,t){var n=E(this.CGI.SDKCapabilities,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.deviceCapturePic=function(e,t,n,r){var t=100*t+1,s=-1,o=E(this.CGI.deviceCapture.channels,e.szHttpProtocol,e.szIP,e.iCGIPort,t),i=[];if(f.isInt(r.iResolutionWidth)&&i.push("videoResolutionWidth="+r.iResolutionWidth),
  3 +f.isInt(r.iResolutionHeight)&&i.push("videoResolutionHeight="+r.iResolutionHeight),i.length>0&&(o+="?"+i.join("&")),re()){var a=function(e,t){var n=".jpg";return $("body").append('<a id="jsplugin_download_a" href="'+e+'" download='+t+n+'><li id="jsplugin_download_li"></li></a>'),$("#jsplugin_download_li").trigger("click"),$("#jsplugin_download_a").remove(),0};o=se(o),s=a(o,n)}else s=c.HWP_DeviceCapturePic(o,e.szAuth,n,r.bDateDir);return s},le.prototype.getSessionCap=function(e,t,n,r,s){var o="";o=2==t?"https://":"http://";var i=E(this.CGI.sessionCap,o,e,n,encodeURIComponent(r)),a=new ue,c={type:"GET",url:i,auth:"",success:null,error:null};f.extend(c,s),f.extend(c,{success:function(e){s.success&&s.success(e)},error:function(e,t){s.error&&s.error(e,t)}}),a.setRequestParam(c),a.submitRequest()},le.prototype.sessionLogin=function(e,t,r,s,o,i,a){var c="";c=2==t?"https://":"http://";var u=E(this.CGI.sessionLogin,c,e,r),l=n.$XML(i).find("sessionID").eq(0).text(),d=n.$XML(i).find("challenge").eq(0).text(),p=parseInt(n.$XML(i).find("iterations").eq(0).text(),10),P=!1,h="";n.$XML(i).find("isIrreversible",!0).length>0&&(P="true"===n.$XML(i).find("isIrreversible").eq(0).text(),h=n.$XML(i).find("salt").eq(0).text());var I="";if(P){I=f.sha256(s+h+o),I=f.sha256(I+d);for(var m=2;p>m;m++)I=f.sha256(I)}else{I=f.sha256(o)+d;for(var m=1;p>m;m++)I=f.sha256(I)}var C="<SessionLogin>";C+="<userName>"+f.escape(s)+"</userName>",C+="<password>"+I+"</password>",C+="<sessionID>"+l+"</sessionID>",C+="</SessionLogin>";var S=new ue,v={type:"POST",url:u,data:C,auth:"",success:null,error:null};f.extend(v,a),f.extend(v,{success:function(e){a.success&&a.success(e)},error:function(e,t){a.error&&a.error(e,t)}}),S.setRequestParam(v),S.submitRequest()},le.prototype.sessionHeartbeat=function(e,t){var n=E(this.CGI.sessionHeartbeat,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"PUT",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.sessionLogout=function(e,t){var n=E(this.CGI.sessionLogout,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"PUT",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},le.prototype.getSystemCapa=function(e,t){var n=E(this.CGI.systemCapabilities,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()};var de=function(){};de.prototype.CGI={login:"%s%s:%s/PSIA/Custom/SelfExt/userCheck",getAudioInfo:"%s%s:%s/PSIA/Custom/SelfExt/TwoWayAudio/channels",getDeviceInfo:"%s%s:%s/PSIA/System/deviceInfo",getAnalogChannelInfo:"%s%s:%s/PSIA/System/Video/inputs/channels",getDigitalChannel:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/DynVideo/inputs/channels",getDigitalChannelInfo:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/DynVideo/inputs/channels/status",getZeroChannelInfo:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/ZeroVideo/channels",getStreamChannels:{analog:"%s%s:%s/PSIA/Streaming/channels",digital:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/DynStreaming/channels"},getStreamDynChannels:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/DynStreaming/channels",startRealPlay:{channels:"%s%s:%s/PSIA/streaming/channels/%s",zeroChannels:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/ZeroStreaming/channels/%s"},startVoiceTalk:{open:"%s%s:%s/PSIA/Custom/SelfExt/TwoWayAudio/channels/%s/open",close:"%s%s:%s/PSIA/Custom/SelfExt/TwoWayAudio/channels/%s/close",audioData:"%s%s:%s/PSIA/Custom/SelfExt/TwoWayAudio/channels/%s/audioData"},ptzControl:"%s%s:%s/PSIA/PTZ/channels/%s/continuous",ptzAutoControl:"%s%s:%s/PSIA/Custom/SelfExt/PTZ/channels/%s/autoptz",setPreset:"%s%s:%s/PSIA/PTZ/channels/%s/presets/%s",goPreset:"%s%s:%s/PSIA/PTZ/channels/%s/presets/%s/goto",ptzFocus:"%s%s:%s/PSIA/System/Video/inputs/channels/%s/focus",ptzIris:"%s%s:%s/PSIA/System/Video/inputs/channels/%s/iris",getNetworkBond:"%s%s:%s/PSIA/Custom/SelfExt/Bond",getNetworkInterface:"%s%s:%s/PSIA/System/Network/interfaces",getUPnPPortStatus:"%s%s:%s/PSIA/Custom/SelfExt/UPnP/ports/status",getPPPoEStatus:"%s%s:%s/PSIA/Custom/SelfExt/PPPoE/1/status",getPortInfo:"%s%s:%s/PSIA/Security/AAA/adminAccesses",recordSearch:"%s%s:%s/PSIA/ContentMgmt/search",startPlayback:"%s%s:%s/PSIA/streaming/tracks/%s?starttime=%s&endtime=%s",startDownloadRecord:"%s%s:%s/PSIA/Custom/SelfExt/ContentMgmt/download",deviceConfig:"%s%s:%s/PSIA/System/configurationData",restart:"%s%s:%s/PSIA/System/reboot",restore:"%s%s:%s/PSIA/System/factoryReset?mode=%s",startUpgrade:{upgrade:"%s%s:%s/PSIA/System/updateFirmware",status:"%s%s:%s/PSIA/Custom/SelfExt/upgradeStatus"},set3DZoom:"%s%s:%s/PSIA/Custom/SelfExt/PTZ/channels/%s/Set3DZoom",deviceCapture:{channels:"%s%s:%s/PSIA/Streaming/channels/%s/picture"},systemCapabilities:"%s%s:%s/PSIA/System/capabilities"},de.prototype.login=function(e,t,r,s){var o=2==s.protocol?"https://":"http://",i=E(this.CGI.login,o,e,t),a=new ue,c={type:"GET",url:i,auth:r,success:null,error:null};f.extend(c,s),f.extend(c,{success:function(e){"200"==n.$XML(e).find("statusValue").eq(0).text()?s.success&&s.success(e):s.error&&s.error(401,e)},error:function(e,t){s.error&&s.error(e,t)}}),a.setRequestParam(c),a.submitRequest()},de.prototype.getAudioInfo=function(e,t){var n=E(this.CGI.getAudioInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getDeviceInfo=function(e,t){var r=E(this.CGI.getDeviceInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),s=new ue,o={type:"GET",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,t),f.extend(o,{success:function(e){var r=[];r.push("<DeviceInfo>"),r.push("<deviceName>"+f.escape(n.$XML(e).find("deviceName").eq(0).text())+"</deviceName>"),r.push("<deviceID>"+n.$XML(e).find("deviceID").eq(0).text()+"</deviceID>"),r.push("<deviceType>"+n.$XML(e).find("deviceDescription").eq(0).text()+"</deviceType>"),r.push("<model>"+n.$XML(e).find("model").eq(0).text()+"</model>"),r.push("<serialNumber>"+n.$XML(e).find("serialNumber").eq(0).text()+"</serialNumber>"),r.push("<macAddress>"+n.$XML(e).find("macAddress").eq(0).text()+"</macAddress>"),r.push("<firmwareVersion>"+n.$XML(e).find("firmwareVersion").eq(0).text()+"</firmwareVersion>"),r.push("<firmwareReleasedDate>"+n.$XML(e).find("firmwareReleasedDate").eq(0).text()+"</firmwareReleasedDate>"),r.push("<encoderVersion>"+n.$XML(e).find("logicVersion").eq(0).text()+"</encoderVersion>"),r.push("<encoderReleasedDate>"+n.$XML(e).find("logicReleasedDate").eq(0).text()+"</encoderReleasedDate>"),r.push("</DeviceInfo>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),s.setRequestParam(o),s.submitRequest()},de.prototype.getSystemCapa=function(e,t){var n=E(this.CGI.systemCapabilities,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getAnalogChannelInfo=function(e,t){var r=E(this.CGI.getAnalogChannelInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),s=new ue,o={type:"GET",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,t),f.extend(o,{success:function(e){var r=[];r.push("<VideoInputChannelList>");for(var s=n.$XML(e).find("VideoInputChannel",!0),o=0,i=s.length;i>o;o++){var a=s[o];r.push("<VideoInputChannel>"),r.push("<id>"+n.$XML(a).find("id").eq(0).text()+"</id>"),r.push("<inputPort>"+n.$XML(a).find("inputPort").eq(0).text()+"</inputPort>"),r.push("<name>"+f.escape(n.$XML(a).find("name").eq(0).text())+"</name>"),r.push("<videoFormat>"+n.$XML(a).find("videoFormat").eq(0).text()+"</videoFormat>"),r.push("</VideoInputChannel>")}r.push("</VideoInputChannelList>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),s.setRequestParam(o),s.submitRequest()},de.prototype.getDigitalChannel=function(e,t){var r=E(this.CGI.getDigitalChannel,e.szHttpProtocol,e.szIP,e.iCGIPort),s=new ue,o={type:"GET",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,t),f.extend(o,{success:function(e){var r=[];r.push("<InputProxyChannelList>");for(var s=n.$XML(e).find("DynVideoInputChannel",!0),o=0,i=s.length;i>o;o++){var a=s[o];r.push("<InputProxyChannel>"),r.push("<id>"+n.$XML(a).find("id").eq(0).text()+"</id>"),r.push("<name>"+f.escape(n.$XML(a).find("name").eq(0).text())+"</name>"),r.push("</InputProxyChannel>")}r.push("</InputProxyChannelList>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),s.setRequestParam(o),s.submitRequest()},de.prototype.getDigitalChannelInfo=function(e,t){var r=null,s={};if(this.getDigitalChannel(e,{async:!1,success:function(e){r=e;for(var t=n.$XML(r).find("InputProxyChannel",!0),o=0,i=t.length;i>o;o++){var a=t[o],c=n.$XML(a).find("id").eq(0).text(),u=n.$XML(a).find("name").eq(0).text();s[c]=u}},error:function(e,n){t.error&&t.error(e,n)}}),null!==r){var o=E(this.CGI.getDigitalChannelInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),i=new ue,a={type:"GET",url:o,auth:e.szAuth,success:null,error:null};f.extend(a,t),f.extend(a,{success:function(e){var r=[];r.push("<InputProxyChannelStatusList>");for(var o=n.$XML(e).find("DynVideoInputChannelStatus",!0),i=0,a=o.length;a>i;i++){var c=o[i],u=n.$XML(c).find("id").eq(0).text();r.push("<InputProxyChannelStatus>"),r.push("<id>"+u+"</id>"),r.push("<sourceInputPortDescriptor>"),r.push("<proxyProtocol>"+n.$XML(c).find("adminProtocol").eq(0).text()+"</proxyProtocol>"),r.push("<addressingFormatType>"+n.$XML(c).find("addressingFormatType").eq(0).text()+"</addressingFormatType>"),r.push("<ipAddress>"+n.$XML(c).find("ipAddress").eq(0).text()+"</ipAddress>"),r.push("<managePortNo>"+n.$XML(c).find("adminPortNo").eq(0).text()+"</managePortNo>"),r.push("<srcInputPort>"+n.$XML(c).find("srcInputPort").eq(0).text()+"</srcInputPort>"),r.push("<userName>"+f.escape(n.$XML(c).find("userName").eq(0).text())+"</userName>"),r.push("<streamType>"+n.$XML(c).find("streamType").eq(0).text()+"</streamType>"),r.push("<online>"+n.$XML(c).find("online").eq(0).text()+"</online>"),r.push("<name>"+f.escape(s[u])+"</name>"),r.push("</sourceInputPortDescriptor>"),r.push("</InputProxyChannelStatus>")}r.push("</InputProxyChannelStatusList>"),e=f.loadXML(r.join("")),t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),i.setRequestParam(a),i.submitRequest()}},de.prototype.getZeroChannelInfo=function(e,t){var n=E(this.CGI.getZeroChannelInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getPPPoEStatus=function(e,t){var n=E(this.CGI.getPPPoEStatus,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getUPnPPortStatus=function(e,t){var n=E(this.CGI.getUPnPPortStatus,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getNetworkBond=function(e,t){var n=E(this.CGI.getNetworkBond,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getNetworkInterface=function(e,t){var n=E(this.CGI.getNetworkInterface,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getPortInfo=function(e,t){var r=E(this.CGI.getPortInfo,e.szHttpProtocol,e.szIP,e.iCGIPort),s=new ue,o={type:"GET",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,t),f.extend(o,{success:function(r){var s=[];s.push("<AdminAccessProtocolList>");for(var o=n.$XML(r).find("AdminAccessProtocol",!0),i=0,a=o.length;a>i;i++){o[i];s.push("<AdminAccessProtocol>"),s.push("<id>"+n.$XML(r).find("id").eq(0).text()+"</id>"),s.push("<enabled>"+n.$XML(r).find("enabled").eq(0).text()+"</enabled>"),s.push("<protocol>"+n.$XML(r).find("protocol").eq(0).text().toUpperCase()+"</protocol>"),s.push("<portNo>"+n.$XML(r).find("portNo").eq(0).text()+"</portNo>"),s.push("</AdminAccessProtocol>")}I.getStreamChannels(e,{async:!1,success:function(r){if(n.$XML(r).find("rtspPortNo",!0).length>0){var o=parseInt(n.$XML(r).find("rtspPortNo").eq(0).text(),10);s.push("<AdminAccessProtocol>"),s.push("<id>4</id>"),s.push("<enabled>true</enabled>"),s.push("<protocol>RTSP</protocol>"),s.push("<portNo>"+o+"</portNo>"),s.push("</AdminAccessProtocol>"),s.push("</AdminAccessProtocolList>");var i=f.loadXML(s.join(""));t.success&&t.success(i)}else I.getStreamDynChannels(e,{async:!1,success:function(e){if(n.$XML(e).find("rtspPortNo",!0).length>0){var r=parseInt(n.$XML(e).find("rtspPortNo").eq(0).text(),10);s.push("<AdminAccessProtocol>"),s.push("<id>4</id>"),s.push("<enabled>true</enabled>"),s.push("<protocol>RTSP</protocol>"),s.push("<portNo>"+r+"</portNo>"),s.push("</AdminAccessProtocol>"),s.push("</AdminAccessProtocolList>");var o=f.loadXML(s.join(""));t.success&&t.success(o)}},error:function(){t.error&&t.error()}})},error:function(){t.error&&t.error()}})},error:function(){var r=[];r.push("<AdminAccessProtocolList>"),I.getStreamChannels(e,{async:!1,success:function(s){if(n.$XML(s).find("rtspPortNo",!0).length>0){var o=parseInt(n.$XML(s).find("rtspPortNo").eq(0).text(),10);r.push("<AdminAccessProtocol>"),r.push("<id>4</id>"),r.push("<enabled>true</enabled>"),r.push("<protocol>RTSP</protocol>"),r.push("<portNo>"+o+"</portNo>"),r.push("</AdminAccessProtocol>"),r.push("</AdminAccessProtocolList>");var i=f.loadXML(r.join(""));t.success&&t.success(i)}else I.getStreamDynChannels(e,{async:!1,success:function(e){if(n.$XML(e).find("rtspPortNo",!0).length>0){var s=parseInt(n.$XML(e).find("rtspPortNo").eq(0).text(),10);r.push("<AdminAccessProtocol>"),r.push("<id>4</id>"),r.push("<enabled>true</enabled>"),r.push("<protocol>RTSP</protocol>"),r.push("<portNo>"+s+"</portNo>"),r.push("</AdminAccessProtocol>"),r.push("</AdminAccessProtocolList>");var o=f.loadXML(r.join(""));t.success&&t.success(o)}},error:function(){t.error&&t.error()}})},error:function(){t.error&&t.error()}})}}),s.setRequestParam(o),s.submitRequest()},de.prototype.getStreamChannels=function(e,t){if(0!=e.iAnalogChannelNum)var n=E(this.CGI.getStreamChannels.analog,e.szHttpProtocol,e.szIP,e.iCGIPort);else var n=E(this.CGI.getStreamChannels.digital,e.szHttpProtocol,e.szIP,e.iCGIPort);var r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.getStreamDynChannels=function(e,t){var n=E(this.CGI.getStreamDynChannels,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"GET",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.startRealPlay=function(e,t){var n=100*t.iChannelID+t.iStreamType,r="",s=e.szIP;"rtsp://"===t.urlProtocol&&(s=Z(s)),r=t.bZeroChannel?E(t.cgi.zeroChannels,t.urlProtocol,s,t.iPort,n):E(t.cgi.channels,t.urlProtocol,s,t.iPort,n);var o=c.HWP_Play(r,e.szAuth,t.iWndIndex,"","");if(0==o){var i=new ce;i.iIndex=t.iWndIndex,i.szIP=e.szIP,i.iCGIPort=e.iCGIPort,i.szDeviceIdentify=e.szDeviceIdentify,i.iChannelID=t.iChannelID,i.iPlayStatus=x,p.push(i)}return o},de.prototype.startVoiceTalk=function(e,t){var n=E(this.CGI.startVoiceTalk.open,e.szHttpProtocol,e.szIP,e.iCGIPort,t),r=E(this.CGI.startVoiceTalk.close,e.szHttpProtocol,e.szIP,e.iCGIPort,t),s=E(this.CGI.startVoiceTalk.audioData,e.szHttpProtocol,e.szIP,e.iCGIPort,t),o=c.HWP_StartVoiceTalkEx(n,r,s,e.szAuth,e.iAudioTypeoDeviceInfo.m_iAudioBitRate,e.m_iAudioSamplingRate);return o},de.prototype.ptzAutoControl=function(e,t,n,r){var s=n.iChannelID,o="",i="";if(r.iPTZSpeed=r.iPTZSpeed<7?15*r.iPTZSpeed:100,t&&(r.iPTZSpeed=0),e.szDeviceType!=w)o=E(this.CGI.ptzAutoControl,e.szHttpProtocol,e.szIP,e.iCGIPort,s),i="<?xml version='1.0' encoding='UTF-8'?><PTZData><pan>"+r.iPTZSpeed+"</pan><tilt>0</tilt></PTZData>";else{var a=99;t&&(a=96),o=E(this.CGI.goPreset,e.szHttpProtocol,e.szIP,e.iCGIPort,s,a)}var c=new ue,u={type:"PUT",url:o,async:!1,auth:e.szAuth,data:i,success:null,error:null},l=this;f.extend(u,r),f.extend(u,{success:function(e){n.bPTZAuto=!n.bPTZAuto,r.success&&r.success(e)},error:function(t,s){if(e.szDeviceType!=w){o=E(l.CGI.ptzControl,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID);var a=new ue,c={type:"PUT",url:o,async:!1,auth:e.szAuth,data:i,success:null,error:null};f.extend(c,r),a.setRequestParam(c),a.submitRequest()}else r.error&&r.error(t,s)}}),c.setRequestParam(u),c.submitRequest()},de.prototype.ptzControl=function(e,t,n,r){var s=(n.iChannelID,"");n.bPTZAuto&&this.ptzAutoControl(e,!0,n,{iPTZSpeed:0}),t?r.iPTZSpeed=0:r.iPTZSpeed=r.iPTZSpeed<7?15*r.iPTZSpeed:100;var o=[{},{pan:0,tilt:r.iPTZSpeed},{pan:0,tilt:-r.iPTZSpeed},{pan:-r.iPTZSpeed,tilt:0},{pan:r.iPTZSpeed,tilt:0},{pan:-r.iPTZSpeed,tilt:r.iPTZSpeed},{pan:-r.iPTZSpeed,tilt:-r.iPTZSpeed},{pan:r.iPTZSpeed,tilt:r.iPTZSpeed},{pan:r.iPTZSpeed,tilt:-r.iPTZSpeed},{},{speed:r.iPTZSpeed},{speed:-r.iPTZSpeed},{speed:r.iPTZSpeed},{speed:-r.iPTZSpeed},{speed:r.iPTZSpeed},{speed:-r.iPTZSpeed}],i="",a={};switch(r.iPTZIndex){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:a=this.CGI.ptzControl,i="<?xml version='1.0' encoding='UTF-8'?><PTZData><pan>"+o[r.iPTZIndex].pan+"</pan><tilt>"+o[r.iPTZIndex].tilt+"</tilt></PTZData>";break;case 10:case 11:a=this.CGI.ptzControl,i="<?xml version='1.0' encoding='UTF-8'?><PTZData><zoom>"+o[r.iPTZIndex].speed+"</zoom></PTZData>";break;case 12:case 13:a=this.CGI.ptzFocus,i="<?xml version='1.0' encoding='UTF-8'?><FocusData><focus>"+o[r.iPTZIndex].speed+"</focus></FocusData>";break;case 14:case 15:a=this.CGI.ptzIris,i="<?xml version='1.0' encoding='UTF-8'?><IrisData><iris>"+o[r.iPTZIndex].speed+"</iris></IrisData>";break;default:return void(r.error&&r.error())}s=E(a,e.szHttpProtocol,e.szIP,e.iCGIPort,n.iChannelID);var c=new ue,u={type:"PUT",url:s,async:!1,auth:e.szAuth,data:i,success:null,error:null};f.extend(u,r),f.extend(u,{success:function(e){r.success&&r.success(e)},error:function(e,t){r.error&&r.error(e,t)}}),c.setRequestParam(u),c.submitRequest()},de.prototype.setPreset=function(e,t,n){var r=(t.iChannelID,""),s="";r=E(this.CGI.setPreset,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID,n.iPresetID),s="<?xml version='1.0' encoding='UTF-8'?>",s+="<PTZPreset>",s+="<id>"+n.iPresetID+"</id>",e.szDeviceType!=w&&(s+="<presetName>Preset"+n.iPresetID+"</presetName>"),s+="</PTZPreset>";var o=new ue,i={type:"PUT",url:r,auth:e.szAuth,data:s,success:null,error:null};f.extend(i,n),f.extend(i,{success:function(e){n.success&&n.success(e)},error:function(e,t){n.error&&n.error(e,t)}}),o.setRequestParam(i),o.submitRequest()},de.prototype.goPreset=function(e,t,n){var r=(t.iChannelID,"");r=E(this.CGI.goPreset,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID,n.iPresetID);var s=new ue,o={type:"PUT",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,n),f.extend(o,{success:function(e){n.success&&n.success(e)},error:function(e,t){n.error&&n.error(e,t)}}),s.setRequestParam(o),s.submitRequest()},de.prototype.recordSearch=function(e,r){var s="",o="",i=r.iChannelID,a=r.iStreamType,c=r.szStartTime.replace(" ","T")+"Z",u=r.szEndTime.replace(" ","T")+"Z";s=E(this.CGI.recordSearch,e.szHttpProtocol,e.szIP,e.iCGIPort),o="<?xml version='1.0' encoding='UTF-8'?><CMSearchDescription><searchID>"+new t+"</searchID><trackList><trackID>"+(100*i+a)+"</trackID></trackList><timeSpanList><timeSpan><startTime>"+c+"</startTime><endTime>"+u+"</endTime></timeSpan></timeSpanList><maxResults>40</maxResults><searchResultPostion>"+r.iSearchPos+"</searchResultPostion><metadataList><metadataDescriptor>//metadata.psia.org/VideoMotion</metadataDescriptor></metadataList></CMSearchDescription>";var l=new ue,d={type:"POST",url:s,auth:e.szAuth,data:o,success:null,error:null};f.extend(d,r),f.extend(d,{success:function(e){var t=[];t.push("<CMSearchResult>"),t.push("<responseStatus>"+n.$XML(e).find("responseStatus").eq(0).text()+"</responseStatus>"),t.push("<responseStatusStrg>"+n.$XML(e).find("responseStatusStrg").eq(0).text()+"</responseStatusStrg>"),t.push("<numOfMatches>"+n.$XML(e).find("numOfMatches").eq(0).text()+"</numOfMatches>"),t.push("<matchList>");for(var s=n.$XML(e).find("searchMatchItem",!0),o=0,i=s.length;i>o;o++){var a=s[o];t.push("<searchMatchItem>"),t.push("<trackID>"+n.$XML(a).find("trackID").eq(0).text()+"</trackID>"),t.push("<startTime>"+n.$XML(a).find("startTime").eq(0).text()+"</startTime>"),t.push("<endTime>"+n.$XML(a).find("endTime").eq(0).text()+"</endTime>"),t.push("<playbackURI>"+f.escape(n.$XML(a).find("playbackURI").eq(0).text())+"</playbackURI>"),t.push("<metadataDescriptor>"+n.$XML(a).find("metadataDescriptor").eq(0).text().split("/")[1]+"</metadataDescriptor>"),t.push("</searchMatchItem>")}t.push("</matchList>"),t.push("</CMSearchResult>"),e=f.loadXML(t.join("")),r.success&&r.success(e)},error:function(e,t){r.error&&r.error(e,t)}}),l.setRequestParam(d),l.submitRequest()},de.prototype.startPlayback=function(e,t){var n=t.iWndIndex,r=t.szStartTime,s=t.szEndTime,o=e.szIP;"rtsp://"===t.urlProtocol&&(o=Z(o));var i=E(t.cgi,t.urlProtocol,o,t.iPort,t.iChannelID,r,s),a=c.HWP_Play(i,e.szAuth,n,r,s);if(0==a){var u=new ce;u.iIndex=n,u.szIP=e.szIP,u.iCGIPort=e.iCGIPort,u.szDeviceIdentify=e.szDeviceIdentify,u.iChannelID=t.iChannelID,u.iPlayStatus=D,p.push(u)}return a},de.prototype.reversePlayback=function(e,t){var n=t.iWndIndex,r=t.szStartTime,s=t.szEndTime,o=e.szIP;"rtsp://"===t.urlProtocol&&(o=Z(o));var i=E(t.cgi,t.urlProtocol,o,t.iPort,t.iChannelID,r,s),a=c.HWP_ReversePlay(i,e.szAuth,n,r,s);if(0==a){var u=new ce;u.iIndex=n,u.szIP=e.szIP,u.iCGIPort=e.iCGIPort,u.szDeviceIdentify=e.szDeviceIdentify,u.iChannelID=t.iChannelID,u.iPlayStatus=b,p.push(u)}return a},de.prototype.startDownloadRecord=function(e,t){var n=E(this.CGI.startDownloadRecord,e.szHttpProtocol,e.szIP,e.iCGIPort),r="<?xml version='1.0' encoding='UTF-8'?><downloadRequest><playbackURI> "+f.escape(t.szPlaybackURI)+"</playbackURI></downloadRequest>";return c.HWP_StartDownload(n,e.szAuth,t.szFileName,r,t.bDateDir)},de.prototype.exportDeviceConfig=function(e){var t=E(this.CGI.deviceConfig,e.szHttpProtocol,e.szIP,e.iCGIPort);return c.HWP_ExportDeviceConfig(t,e.szAuth,"",0)},de.prototype.importDeviceConfig=function(e,t){var n=E(this.CGI.deviceConfig,e.szHttpProtocol,e.szIP,e.iCGIPort);return c.HWP_ImportDeviceConfig(n,e.szAuth,t.szFileName,0)},de.prototype.restart=function(e,t){var n=E(this.CGI.restart,e.szHttpProtocol,e.szIP,e.iCGIPort),r=new ue,s={type:"PUT",url:n,auth:e.szAuth,success:null,error:null};f.extend(s,t),f.extend(s,{success:function(e){t.success&&t.success(e)},error:function(e,n){t.error&&t.error(e,n)}}),r.setRequestParam(s),r.submitRequest()},de.prototype.restore=function(e,t,n){var r=E(this.CGI.restore,e.szHttpProtocol,e.szIP,e.iCGIPort,t),s=new ue,o={type:"PUT",url:r,auth:e.szAuth,success:null,error:null};f.extend(o,n),f.extend(o,{success:function(e){n.success&&n.success(e)},error:function(e,t){n.error&&n.error(e,t)}}),s.setRequestParam(o),s.submitRequest()},de.prototype.startUpgrade=function(e,t){var n=E(this.CGI.startUpgrade.upgrade,e.szHttpProtocol,e.szIP,e.iCGIPort),r=E(this.CGI.startUpgrade.status,e.szHttpProtocol,e.szIP,e.iCGIPort);return c.HWP_StartUpgrade(n,r,e.szAuth,t.szFileName)},de.prototype.set3DZoom=function(e,t,n,r){var s=E(this.CGI.set3DZoom,e.szHttpProtocol,e.szIP,e.iCGIPort,t.iChannelID),o=new ue,i={type:"PUT",url:s,data:n,auth:e.szAuth,success:null,error:null};f.extend(i,r),f.extend(i,{success:function(e){r.success&&r.success(e)},error:function(e,t){r.error&&r.error(e,t)}}),o.setRequestParam(i),o.submitRequest()},de.prototype.deviceCapturePic=function(e,t,n,r){var t=100*t+1,s=E(this.CGI.deviceCapture.channels,e.szHttpProtocol,e.szIP,e.iCGIPort,t),o=[];return f.isInt(r.iResolutionWidth)&&o.push("videoResolutionWidth="+r.iResolutionWidth),f.isInt(r.iResolutionHeight)&&o.push("videoResolutionHeight="+r.iResolutionHeight),o.length>0&&(s+="?"+o.join("&")),c.HWP_DeviceCapturePic(s,e.szAuth,n,r.bDateDir)};var pe=function(){};pe.prototype._alert=function(e){a.bDebugMode&&console.log(e)},function(t){var n=function(e){this.elems=[],this.length=0,this.length=this.elems.push(e)};n.prototype.find=function(e,t){var n=this.elems[this.length-1]?this.elems[this.length-1].getElementsByTagName(e):[];return this.length=this.elems.push(n),t?n:this},n.prototype.eq=function(e,t){var n=this.elems[this.length-1].length,r=null;return n>0&&n>e&&(r=this.elems[this.length-1][e]),this.length=this.elems.push(r),t?r:this},n.prototype.text=function(t){return this.elems[this.length-1]?t?void(e.DOMParser?this.elems[this.length-1].textContent=t:this.elems[this.length-1].text=t):e.DOMParser?this.elems[this.length-1].textContent:this.elems[this.length-1].text:""},n.prototype.attr=function(e){if(this.elems[this.length-1]){var t=this.elems[this.length-1].attributes.getNamedItem(e);return t?t.value:""}},t.$XML=function(e){return new n(e)}}(this);var Pe=function(){};Pe.prototype.extend=function(){for(var e,t=arguments[0]||{},n=1,r=arguments.length;r>n;n++)if(null!=(e=arguments[n]))for(var s in e){var o=(t[s],e[s]);t!==o&&("object"==typeof o?t[s]=this.extend({},o):void 0!==o&&(t[s]=o))}return t},Pe.prototype.browser=function(){var e=/(chrome)[ \/]([\w.]+)/,t=/(safari)[ \/]([\w.]+)/,n=/(opera)(?:.*version)?[ \/]([\w.]+)/,r=/(msie) ([\w.]+)/,s=/(trident.*rv:)([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,i=navigator.userAgent.toLowerCase(),a=e.exec(i)||t.exec(i)||n.exec(i)||r.exec(i)||s.exec(i)||i.indexOf("compatible")<0&&o.exec(i)||["unknow","0"];a.length>0&&a[1].indexOf("trident")>-1&&(a[1]="msie");var c={};return c[a[1]]=!0,c.version=a[2],c},Pe.prototype.loadXML=function(t){if(null==t||""==t)return null;var n=null;if(e.DOMParser){var r=new DOMParser;n=r.parseFromString(t,"text/xml")}else n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t);return n},Pe.prototype.toXMLStr=function(e){var t="";try{var n=new XMLSerializer;t=n.serializeToString(e)}catch(r){try{t=e.xml}catch(r){return""}}return-1==t.indexOf("<?xml")&&(t="<?xml version='1.0' encoding='utf-8'?>"+t),t},Pe.prototype.escape=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},Pe.prototype.dateFormat=function(e,t){var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(var r in n)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return t},Pe.prototype.Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t,n,r,s,o,i,a,c="",u=0;for(e=Pe.prototype.Base64._utf8_encode(e);u<e.length;)t=e.charCodeAt(u++),n=e.charCodeAt(u++),r=e.charCodeAt(u++),s=t>>2,o=(3&t)<<4|n>>4,i=(15&n)<<2|r>>6,a=63&r,isNaN(n)?i=a=64:isNaN(r)&&(a=64),c=c+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(i)+this._keyStr.charAt(a);return c},decode:function(e){var t,n,r,s,o,i,a,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<e.length;)s=this._keyStr.indexOf(e.charAt(u++)),o=this._keyStr.indexOf(e.charAt(u++)),i=this._keyStr.indexOf(e.charAt(u++)),a=this._keyStr.indexOf(e.charAt(u++)),t=s<<2|o>>4,n=(15&o)<<4|i>>2,r=(3&i)<<6|a,c+=String.fromCharCode(t),64!=i&&(c+=String.fromCharCode(n)),64!=a&&(c+=String.fromCharCode(r));return c=Pe.prototype.Base64._utf8_decode(c)},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);128>r?t+=String.fromCharCode(r):r>127&&2048>r?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},_utf8_decode:function(e){for(var t="",n=0,r=c1=c2=0;n<e.length;)r=e.charCodeAt(n),128>r?(t+=String.fromCharCode(r),n++):r>191&&224>r?(c2=e.charCodeAt(n+1),t+=String.fromCharCode((31&r)<<6|63&c2),n+=2):(c2=e.charCodeAt(n+1),c3=e.charCodeAt(n+2),t+=String.fromCharCode((15&r)<<12|(63&c2)<<6|63&c3),n+=3);return t}},Pe.prototype.createEventScript=function(e,t,n){var r=document.createElement("script");r.htmlFor=e,r.event=t,r.innerHTML=n,document.body.parentNode.appendChild(r)},Pe.prototype.isInt=function(e){return/^\d+$/.test(e)},Pe.prototype.getDirName=function(){var e="";if(""!==a.szBasePath)e=a.szBasePath;else{var t=/[^?#]*\//,n=document.getElementById("videonode");if(n)e=n.src.match(t)[0];else{for(var r=document.scripts,s=0,o=r.length;o>s;s++)if(r[s].src.indexOf("webVideoCtrl.js")>-1){n=r[s];break}n&&(e=n.src.match(t)[0])}}return e},Pe.prototype.loadScript=function(e,t){var n=document.createElement("script");n.type="text/javascript",n.onload=function(){t()},n.src=e,document.getElementsByTagName("head")[0].appendChild(n)},Pe.prototype.sha256=function(e){function t(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function n(e,t){return e>>>t|e<<32-t}return e=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);128>r?t+=String.fromCharCode(r):(r>127&&2048>r?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t}(e),function(e){for(var t="",n=0;n<4*e.length;n++)t+="0123456789abcdef".charAt(e[n>>2]>>8*(3-n%4)+4&15)+"0123456789abcdef".charAt(e[n>>2]>>8*(3-n%4)&15);return t}(function(e,r){var s,o,i,a,c,u,l,d,p,P,h,I,f=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],C=Array(64);for(e[r>>5]|=128<<24-r%32,e[(r+64>>9<<4)+15]=r,p=0;p<e.length;p+=16){for(s=m[0],o=m[1],i=m[2],a=m[3],c=m[4],u=m[5],l=m[6],d=m[7],P=0;64>P;P++)C[P]=16>P?e[P+p]:t(t(t(n(C[P-2],17)^n(C[P-2],19)^C[P-2]>>>10,C[P-7]),n(C[P-15],7)^n(C[P-15],18)^C[P-15]>>>3),C[P-16]),h=t(t(t(t(d,n(c,6)^n(c,11)^n(c,25)),c&u^~c&l),f[P]),C[P]),
  4 +I=t(n(s,2)^n(s,13)^n(s,22),s&o^s&i^o&i),d=l,l=u,u=c,c=t(a,h),a=i,i=o,o=s,s=t(h,I);m[0]=t(s,m[0]),m[1]=t(o,m[1]),m[2]=t(i,m[2]),m[3]=t(a,m[3]),m[4]=t(c,m[4]),m[5]=t(u,m[5]),m[6]=t(l,m[6]),m[7]=t(d,m[7])}return m}(function(e){for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e),8*e.length))},Pe.prototype.cookie=function(e,t,n){if(arguments.length>1&&(null===t||"object"!=typeof t)){if(n=this.extend({},n),null===t&&(n.expires=-1),"number"==typeof n.expires){var r=n.expires,s=n.expires=new Date;s.setDate(s.getDate()+r)}return document.cookie=[encodeURIComponent(e),"=",n.raw?String(t):encodeURIComponent(String(t)),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"; path=/",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}n=t||{};var o,i=n.raw?function(e){return e}:decodeURIComponent;return(o=new RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?i(o[1]):null},t.prototype.valueOf=function(){return this.id},t.prototype.toString=function(){return this.id},t.prototype.createUUID=function(){var e=new Date(1582,10,15,0,0,0,0),n=new Date,r=n.getTime()-e.getTime(),s="-",o=t.getIntegerBits(r,0,31),i=t.getIntegerBits(r,32,47),a=t.getIntegerBits(r,48,59)+"1",c=t.getIntegerBits(t.rand(4095),0,7),u=t.getIntegerBits(t.rand(4095),0,7),l=t.getIntegerBits(t.rand(8191),0,7)+t.getIntegerBits(t.rand(8191),8,15)+t.getIntegerBits(t.rand(8191),0,7)+t.getIntegerBits(t.rand(8191),8,15)+t.getIntegerBits(t.rand(8191),0,15);return o+s+i+s+a+s+c+u+s+l},t.getIntegerBits=function(e,n,r){var s=t.returnBase(e,16),o=new Array,i="",a=0;for(a=0;a<s.length;a++)o.push(s.substring(a,a+1));for(a=Math.floor(n/4);a<=Math.floor(r/4);a++)i+=o[a]&&""!=o[a]?o[a]:"0";return i},t.returnBase=function(e,t){var n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];if(t>e)var r=n[e];else{var s=""+Math.floor(e/t),o=e-s*t;if(s>=t)var r=this.returnBase(s,t)+n[o];else var r=n[s]+n[o]}return r},t.rand=function(e){return Math.floor(Math.random()*e)},h=new le,I=new de,P=new pe,f=new Pe;var he=f.dateFormat(new Date,"yyyyMMddhhmmss");return o="webVideoCtrl"+he,i="webVideoCtrl"+he,"object"!=typeof e.attachEvent&&f.browser().msie&&(f.createEventScript(o,"GetSelectWndInfo(SelectWndInfo)","GetSelectWndInfo(SelectWndInfo);"),f.createEventScript(o,"ZoomInfoCallback(szZoomInfo)","ZoomInfoCallback(szZoomInfo);"),f.createEventScript(o,"GetHttpInfo(lID, lpInfo, lReverse)","GetHttpInfo(lID, lpInfo, lReverse);"),f.createEventScript(o,"PluginEventHandler(iEventType, iParam1, iParam2)","PluginEventHandler(iEventType, iParam1, iParam2);"),f.createEventScript(o,"RemoteConfigInfo(lID)","RemoteConfigInfo(lID);"),f.createEventScript(o,"KeyBoardEventInfo(iKeyCode)","KeyBoardEventInfo(iKeyCode);")),this}(),n=e.WebVideoCtrl=t;n.version="1.1.0"}}(this),"object"==typeof exports&&"undefined"!=typeof module||("function"==typeof define&&define.amd?define(function(){return WebVideoCtrl}):"function"==typeof define&&define.cmd&&define(function(e,t,n){n.exports=WebVideoCtrl}));
  1 +/*! jQuery v1.7.1 jquery.com | jquery.org/license */
  2 +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,t2=/(trident.*rv:)([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||t2.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];if(b.length>0&& b[1].indexOf("trident")>-1){b[1]="msie"}return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
  3 +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
  4 +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
  1 +// 设备列表
  2 +var deviceListArray ;
  3 +var xy = [
  4 + {
  5 + szIP: '21.66.255.51',
  6 + szPort: '80',
  7 + szUsername: 'admin',
  8 + szPassword: 'hikvision@123'
  9 + },
  10 + {
  11 + szIP: '21.66.255.52',
  12 + szPort: '80',
  13 + szUsername: 'admin',
  14 + szPassword: 'hikvision@123'
  15 + },
  16 + {
  17 + szIP: '21.66.255.53',
  18 + szPort: '80',
  19 + szUsername: 'admin',
  20 + szPassword: 'hikvision@123'
  21 + },
  22 + {
  23 + szIP: '21.66.255.54',
  24 + szPort: '80',
  25 + szUsername: 'admin',
  26 + szPassword: 'hikvision@123'
  27 + }
  28 +]
  29 +var wl =[
  30 + {
  31 + szIP: '22.66.2.1',
  32 + szPort: '80',
  33 + szUsername: 'admin',
  34 + szPassword: 'hikvision@123'
  35 + },
  36 + {
  37 + szIP: '22.66.2.2',
  38 + szPort: '80',
  39 + szUsername: 'admin',
  40 + szPassword: 'hikvision@123'
  41 + }
  42 +]
  43 +
  44 +// Init plugin
  45 +
  46 +// overall save the current selected window
  47 +var g_iWndIndex = 0; //don't have to set the variable; default to use the current selected window without transmiting value when the interface has window parameters
  48 +var iWndowType = 2; //设置4*4方格
  49 +var type = getUrlParam("type");
  50 +type = decodeURIComponent(type);
  51 +$(function () {
  52 + if(type.indexOf('兴议') > -1){
  53 + deviceListArray = xy
  54 + }else{
  55 + deviceListArray = wl;
  56 + }
  57 + console.log(deviceListArray)
  58 + // check the installation status of plugin
  59 + if (-1 == WebVideoCtrl.I_CheckPluginInstall()) {
  60 + alert(" If the plugin is uninstalled, please install the WebComponents.exe!");
  61 + return;
  62 + }
  63 +
  64 + // Init plugin parameters and insert the plugin
  65 + WebVideoCtrl.I_InitPlugin('100%', '100%', {
  66 + iWndowType: iWndowType,
  67 + cbSelWnd: function (xmlDoc) {
  68 + g_iWndIndex = $(xmlDoc).find("SelectWnd").eq(0).text();
  69 + }
  70 + });
  71 +
  72 + WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin");
  73 +
  74 + // check plugin to see whether it is the latest
  75 + if (-1 == WebVideoCtrl.I_CheckPluginVersion()) {
  76 + alert("Detect the latest version, please double click WebComponents.exe to update!");
  77 + return;
  78 + }
  79 +
  80 + // 将一维数组按区块个数分割成二维数组
  81 + /*let deviceList = oneArrayToTwoArray(deviceListArray)
  82 + let key = 0
  83 + // 自动登陆
  84 + clickLogin(deviceList[key])
  85 + // 定时器轮播
  86 + setInterval(() => {
  87 + key++
  88 + if (key >= deviceList.length) {
  89 + key = 0
  90 + }
  91 + clickLogin(deviceList[key])
  92 + }, 9000)*/
  93 + clickLogin(deviceListArray)
  94 +
  95 +});
  96 +
  97 +/*function oneArrayToTwoArray (deviceListArray) {
  98 + let twoArray = []
  99 + let oneArray = []
  100 + let len = iWndowType * iWndowType
  101 + for (let b = 0; b < deviceListArray.length; b++) {
  102 + if (b % len == 0) {
  103 + oneArray = []
  104 + }
  105 + oneArray.push(deviceListArray[b])
  106 + if (b % len == (len - 1)) {
  107 + twoArray.push(oneArray)
  108 + }
  109 + }
  110 + return twoArray
  111 +}*/
  112 +
  113 +// login
  114 +function clickLogin(deviceList) {
  115 + for (let i = 0; i < deviceList.length; i++) {
  116 + let index = deviceList[i]
  117 + if ("" == index.szIP || "" == index.szPort) {
  118 + continue;
  119 + }
  120 +
  121 + var iRet = WebVideoCtrl.I_Login(index.szIP, 1, index.szPort, index.szUsername, index.szPassword, {
  122 + success: function (xmlDoc) {
  123 + console.log(index.szIP + " login success!");
  124 + setTimeout(function () {
  125 + clickStartRealPlay(index.szIP, i);
  126 + }, 100);
  127 + },
  128 + error: function () {
  129 + console.log(index.szIP + " login failed!");
  130 + }
  131 + });
  132 +
  133 + if (-1 == iRet) {
  134 + console.log(index.szIP + " login already !");
  135 + setTimeout(() => {
  136 + clickStartRealPlay(index.szIP, i);
  137 + }, 100);
  138 + }
  139 + }
  140 +}
  141 +
  142 +// strat real play
  143 +function clickStartRealPlay(szIP, g_iWndIndex) {
  144 + let oWndInfo = WebVideoCtrl.I_GetWindowStatus(g_iWndIndex)
  145 +
  146 + if ("" == szIP) {
  147 + return;
  148 + }
  149 +
  150 + if (oWndInfo != null) {// stop first
  151 + WebVideoCtrl.I_Stop(g_iWndIndex);
  152 + }
  153 +
  154 + let iRet = WebVideoCtrl.I_StartRealPlay(szIP, {
  155 + iWndIndex: g_iWndIndex
  156 + });
  157 +
  158 + if (0 == iRet) {
  159 + console.log("start real play success!");
  160 + } else {
  161 + console.log("start real play failed!");
  162 + }
  163 +}
  164 +
  165 +function getUrlParam(key) {
  166 + var href = window.location.href;
  167 + var url = href.split("?");
  168 + if (url.length <= 1) {
  169 + return "";
  170 + }
  171 + var params = url[1].split("&");
  172 +
  173 + for (var i = 0; i < params.length; i++) {
  174 + var param = params[i].split("=");
  175 + if (key == param[0]) {
  176 + return param[1];
  177 + }
  178 + }
  179 + return "";
  180 +}
  1 +<!doctype html>
  2 +<html>
  3 +<head>
  4 + <title></title>
  5 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6 + <meta http-equiv="Pragma" content="no-cache" />
  7 + <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
  8 + <meta http-equiv="Expires" content="0" />
  9 + <script>
  10 + document.write("<link type='text/css' href=" + new Date().getTime() + "'/static/vue3/public/css/demo.css?version=' rel='stylesheet' />");
  11 + </script>
  12 +</head>
  13 +<body>
  14 +<div id="divPlugin" class="plugin"></div>
  15 +</body>
  16 +<script src="js/video/jquery-1.7.1.min.js"></script>
  17 +<script id="videonode" src="js/codebase/webVideoCtrl.js"></script>
  18 +<script src="js/video/video.js"></script>
  19 +
  20 +</html>