!(function(t, e) {
if ('object' == typeof exports && 'object' == typeof module)
module.exports = e();
else if ('function' == typeof define && define.amd) define([], e);
else {
var n = e();
for (var i in n) ('object' == typeof exports ? exports : t)[i] = n[i];
}
})(this, function() {
return (function(t) {
function e(i) {
if (n[i]) return n[i].exports;
var r = (n[i] = { exports: {}, id: i, loaded: !1 });
return t[i].call(r.exports, r, r.exports, e), (r.loaded = !0), r.exports;
}
var n = {};
return (e.m = t), (e.c = n), (e.p = ''), e(0);
})([
function(t, e, n) {
'use strict';
function i(t) {
return t && t.__esModule ? t : { default: t };
}
function r(t, e) {
if (!(t instanceof e))
throw new TypeError('Cannot call a class as a function');
}
Object.defineProperty(e, '__esModule', { value: !0 }),
(e.JSPlugin = void 0);
var o = (function() {
function t(t, e) {
for (var n = 0; n < e.length; n++) {
var i = e[n];
(i.enumerable = i.enumerable || !1),
(i.configurable = !0),
'value' in i && (i.writable = !0),
Object.defineProperty(t, i.key, i);
}
}
return function(e, n, i) {
return n && t(e.prototype, n), i && t(e, i), e;
};
})(),
a = n(5),
s = n(15),
u = n(16),
l = n(10),
f = n(9),
c = n(1),
h = i(c),
d = (function() {
function t() {
document.addEventListener(
'visibilitychange',
function() {
if (document.hidden)
for (var t = 0; t < 16; t++)
p[I][t] &&
p[I][t].bLoad &&
p[I][t].oPlayCtrl.PlayM4_IsVisible(!1);
else
for (var e = 0; e < 16; e++)
p[I][e] &&
p[I][e].bLoad &&
p[I][e].oPlayCtrl.PlayM4_IsVisible(!0);
},
!1
);
}
function e(t, e) {
t && e && ((p[M].iWidth = t), (p[M].iHeight = e));
var n = p[M].iWidth % p[M].iCurrentSplit,
i = p[M].iHeight % p[M].iCurrentSplit,
r =
(p[M].iWidth - n - 2 * p[M].iCurrentSplit) / p[M].iCurrentSplit,
o =
(p[M].iHeight - i - 2 * p[M].iCurrentSplit) /
p[M].iCurrentSplit,
a = (p[M].iWidth - n) / p[M].iCurrentSplit,
s = (p[M].iHeight - i) / p[M].iCurrentSplit,
u = p[M].iCurrentSplit;
D = (0, h.default)('#' + p[M].szId);
for (
var l =
'
',
f = 0;
f < p[z];
f++
) {
(t = r + (f % u === u - 1 ? n : 0)),
(e = o + (f + u >= Math.pow(u, 2) ? i : 0));
var c = a + (f % u === u - 1 ? n : 0),
d = s + (f + u >= Math.pow(u, 2) ? i : 0);
l +=
'';
}
(l += '
'),
D.html(l),
D.find('.parent-wnd')
.eq(0)
.children()
.eq(0)
.find('.play-window')
.eq(0)
.css('border', '1px solid ' + p[M].oStyle.borderSelect);
}
function n() {
p.EventCallback = (function() {
return {
loadEventHandler: function() {
window.loadEventHandler && window.loadEventHandler();
},
zoomEventResponse: function() {},
windowEventSelect: function(t) {
p[H] !== t &&
((p[H] = t),
(p[I][t].bEZoom || p[I][t].b3DZoom) &&
((0, h.default)('.draw-window').unbind(),
p[A].setDrawStatus(!1),
(p[A] = null),
(p[A] = new f.ESCanvas('canvas_draw' + t)),
p[A].setShapeType('Rect'),
p[A].setDrawStyle('#ff0000', '', 0),
p[I][t].bEZoom
? p[A].setDrawStatus(!0, function(e) {
e.startPos &&
e.endPos &&
(e.startPos[0] > e.endPos[0]
? p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
null,
!1
)
: p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
{
left: e.startPos[0],
top: e.startPos[1],
right: e.endPos[0],
bottom: e.endPos[1],
},
!0
));
})
: p[I][t].b3DZoom &&
p[A].setDrawStatus(!0, function(t) {
p[j](t);
})),
window.GetSelectWndInfo && window.GetSelectWndInfo(t));
},
pluginErrorHandler: function(t, e, n) {
window.PluginEventHandler &&
window.PluginEventHandler(t, e, n);
},
windowEventOver: function(t) {
window.windowEventOver && window.windowEventOver(t);
},
windowEventOut: function(t) {
window.windowEventOut && window.windowEventOut(t);
},
windowEventUp: function(t) {
window.windowEventUp && window.windowEventUp(t);
},
windowFullCcreenChange: function(t) {
window.windowFullCcreenChange &&
window.windowFullCcreenChange(t);
},
firstFrameDisplay: function(t) {
window.firstFrameDisplay && window.firstFrameDisplay(t);
},
performanceLack: function() {
window.performanceLack && window.performanceLack();
},
};
})();
}
function i() {
n(),
D.find('.parent-wnd')
.eq(0)
.children()
.each(function(t) {
var e = this;
(0, h.default)(e)
.unbind()
.bind('mousedown', function() {
D.find('.parent-wnd')
.eq(0)
.find('.play-window')
.css('border', '1px solid ' + p[M].oStyle.border),
D.find('.parent-wnd')
.eq(0)
.children()
.eq(t)
.find('.play-window')
.eq(0)
.css(
'border',
'1px solid ' + p[M].oStyle.borderSelect
),
p.EventCallback.windowEventSelect(
parseInt(
D.find('.parent-wnd')
.eq(0)
.children()
.eq(t)
.find('.play-window')
.eq(0)
.attr('wid'),
10
)
);
}),
(0, h.default)(e).bind('mouseover', function(e) {
p.EventCallback.windowEventOver(t), e.stopPropagation();
}),
(0, h.default)(e).bind('mouseout', function(e) {
p.EventCallback.windowEventOut(t), e.stopPropagation();
}),
(0, h.default)(e).bind('mouseup', function() {
p.EventCallback.windowEventUp(t);
}),
(0, h.default)(e).bind('dblclick', function(t) {
if (p[I][p[H]].bPlay) {
var n =
document.fullscreen ||
document.webkitIsFullScreen ||
document.mozFullScreen ||
!1,
i = (0, h.default)(e).get(0);
if (n) {
if (
D.find('.parent-wnd')
.eq(0)
.width() === (0, h.default)(window).width()
)
return;
document.exitFullscreen
? document.exitFullscreen()
: document.webkitCancelFullScreen
? document.webkitCancelFullScreen()
: document.mozCancelFullScreen &&
document.mozCancelFullScreen();
} else
i.requestFullScreen
? i.requestFullScreen()
: i.webkitRequestFullScreen
? i.webkitRequestFullScreen()
: i.mozRequestFullScreen &&
i.mozRequestFullScreen(),
(p[B] = (0, h.default)(e));
t.stopPropagation();
}
});
}),
'undefined' != typeof document.fullScreen
? document.addEventListener('fullscreenchange', function() {
var t = document.fullscreen || !1;
p.EventCallback.windowFullCcreenChange(t);
})
: 'undefined' != typeof document.webkitIsFullScreen
? document.addEventListener(
'webkitfullscreenchange',
function() {
var t = document.webkitIsFullScreen || !1;
p.EventCallback.windowFullCcreenChange(t);
}
)
: 'undefined' != typeof document.mozFullScreen &&
document.addEventListener(
'mozfullscreenchange',
function() {
var t = document.mozFullScreen || !1;
p.EventCallback.windowFullCcreenChange(t);
}
);
}
function c() {
for (
var t = D.find('.parent-wnd')
.eq(0)
.children().length,
e = p[M].iWidth % p[M].iCurrentSplit,
n = p[M].iHeight % p[M].iCurrentSplit,
i =
(p[M].iWidth - e - 2 * p[M].iCurrentSplit) /
p[M].iCurrentSplit,
r =
(p[M].iHeight - n - 2 * p[M].iCurrentSplit) /
p[M].iCurrentSplit,
o = (p[M].iWidth - e) / p[M].iCurrentSplit,
a = (p[M].iHeight - n) / p[M].iCurrentSplit,
s = p[M].iCurrentSplit,
u = 0;
u < t;
u++
) {
var l = i + (u % s === s - 1 ? e : 0),
f = r + (u + s >= Math.pow(s, 2) ? n : 0),
c = o + (u % s === s - 1 ? e : 0),
h = a + (u + s >= Math.pow(s, 2) ? n : 0);
D.find('.parent-wnd')
.eq(0)
.children()
.eq(u)
.width(c),
D.find('.parent-wnd')
.eq(0)
.children()
.eq(u)
.height(h),
D.find('.parent-wnd')
.eq(0)
.children()
.eq(u)
.find('.draw-window')
.attr('width', c),
D.find('.parent-wnd')
.eq(0)
.children()
.eq(u)
.find('.draw-window')
.attr('height', h),
D.find('.parent-wnd')
.eq(0)
.children()
.eq(u)
.find('.play-window')
.attr('width', l),
D.find('.parent-wnd')
.eq(0)
.children()
.eq(u)
.find('.play-window')
.attr('height', f);
}
D.find('.parent-wnd')
.eq(p[H])
.find('.play-window')
.css('border', '1px solid ' + p[M].oStyle.border),
D.find('.parent-wnd')
.eq(p[H])
.children()
.eq(0)
.find('.play-window')
.eq(0)
.css('border', '1px solid ' + p[M].oStyle.borderSelect);
}
function d(t, e, n, i, r, o, a) {
if ((0, h.default)('#' + p[I][n].windowID).length) {
var s = !1;
i && r && (s = !0),
(p[I][n].bLoad = !0),
T.openStream(
t,
e,
function(t) {
if (t.bHead && !p[I][n].bPlay)
(p[I][n].bPlay = !0),
(p[I][n].aHead = new Uint8Array(t.buf)),
p[I][n].oPlayCtrl.PlayM4_OpenStream(t.buf, S, 2097152),
'' !== p[I][n].szSecretKey &&
(p[I][n].oPlayCtrl.PlayM4_SetSecretKey(
1,
p[I][n].szSecretKey,
128
),
(p[I][n].szSecretKey = '')),
4 === p[I][n].aHead[8]
? p[I][n].oPlayCtrl.PlayM4_SetStreamOpenMode(0)
: p[I][n].oPlayCtrl.PlayM4_SetStreamOpenMode(1),
p[I][n].oPlayCtrl.PlayM4_SetInputBufSize(b),
p[I][n].oPlayCtrl.PlayM4_Play(p[I][n].windowID);
else {
var e = new Uint8Array(t.buf),
i = p[I][n].oPlayCtrl.PlayM4_GetInputBufSize(),
r = p[I][n].oPlayCtrl.PlayM4_GetYUVBufSize();
2 !== r ||
p[I][n].bFirstFrame ||
((p[I][n].bFirstFrame = !0),
p.EventCallback.firstFrameDisplay(n));
var o = p[I][n].oPlayCtrl.PlayM4_GetDecodeFrameType();
i > 0.5 * b && i < 0.8 * b && 1 === p[I][n].iRate
? o !== g &&
(p[I][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g),
p.EventCallback.performanceLack())
: i >= 0.8 * b && (e = new Uint8Array([1, 2, 3, 4])),
r > 10 && r < 15
? o !== g &&
(p[I][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g),
p.EventCallback.performanceLack())
: r > 15 && (e = new Uint8Array([1, 2, 3, 4])),
r < 10 &&
i < 0.5 * b &&
o !== v &&
p[I][n].oPlayCtrl.PlayM4_SetDecodeFrameType(v),
t.statusString
? p.EventCallback.pluginErrorHandler(n, w, t)
: t.type && 'exception' === t.type
? p.EventCallback.pluginErrorHandler(n, _, t)
: p[I][n].oPlayCtrl.PlayM4_InputData(e, e.length),
(e = null);
}
p[I][n].szStorageUUID &&
k.inputData(p[I][n].szStorageUUID, t.buf),
(t = null);
},
function() {
p[I][n].bPlay &&
(p.EventCallback.pluginErrorHandler(n, P),
(p[I][n].bPlay = !1),
(p[I][n].bFrameForward = !1),
(p[I][n].iRate = 1),
p[I][n].oPlayCtrl &&
(p[I][n].oPlayCtrl.PlayM4_Stop(),
p[I][n].oPlayCtrl.PlayM4_CloseStream()));
}
).then(
function(t) {
(p[I][n].szStreamUUID = t),
T.startPlay(t, i, r).then(
function() {
s
? ((p[I][n].szPlayType = 'playback'),
(p[I][n].iRate = 1),
p[I][n].oPlayCtrl.PlayM4_PlayRate(p[I][n].iRate))
: (p[I][n].szPlayType = 'realplay'),
o();
},
function(t) {
a(t);
}
);
},
function(t) {
a(t);
}
);
}
}
if ('undefined' != typeof Symbol) {
var p = null,
y = -1,
m = 0,
v = 0,
g = 1,
S = 40,
b = 4194304,
w = 1001,
_ = 1002,
P = 1003,
C = 2001,
x = 2002,
T = new s.StreamClient(),
k = null,
D = null,
M = Symbol('OPTIONS'),
R = Symbol('CURRENTPLAYRATE'),
E = Symbol('CURRENTSOUNDWND'),
z = Symbol('MAXWNDNUM'),
I = Symbol('MAXWNDNUM'),
A = Symbol('DRAWCANVAS'),
F = Symbol('SHAPEID'),
O = Symbol('WINDOWFULL'),
B = Symbol('SINGLEWINDOW'),
L = Symbol('FILETMP'),
N = Symbol('STATUSTMP'),
q = Symbol('UPGRADESTATUSURL'),
H = Symbol('CURWNDINDEX'),
j = Symbol('CALLBACKFUNCTION'),
W = (function() {
function n(o) {
r(this, n), (p = this);
var a = {
szId: 'playWnd',
iType: 1,
iWidth: 400,
iHeight: 300,
iMaxSplit: 4,
iCurrentSplit: 2,
szBasePath: './',
};
var wsParams = {wsParams: ''};
this[M] = Object.assign(a,wsParams,o);
var s = {
border: '#343434',
borderSelect: '#FFCC00',
background: '#4C4B4B',
};
(s = Object.assign(s, o.oStyle)),
(this[M].oStyle = s),
this[M].iCurrentSplit > this[M].iMaxSplit &&
(this[M].iCurrentSplit = this[M].iMaxSplit),
(this[R] = 1),
(this[E] = -1),
(this[z] = this[M].iMaxSplit * this[M].iMaxSplit),
(this[F] = ''),
(this[O] = !1),
(this[B] = null),
(this[L] = null),
(this[N] = ''),
(this[q] = ''),
(this[H] = -1),
(this[j] = null),
(k = new l.StorageManager(
this[M].szBasePath + '/transform'
)),
(D = (0, h.default)('#' + p[M].szId)),
(this[I] = []);
for (var u = 0; u < this[z]; u++)
(this[I][u] = {}),
(this[I][u].bSelect = !1),
(this[I][u].bPlay = !1),
(this[I][u].bRecord = !1),
(this[I][u].oPlayCtrl = null),
(this[I][u].szPlayType = ''),
(this[I][u].szStorageUUID = ''),
(this[I][u].szStreamUUID = ''),
(this[I][u].aHead = []),
(this[I][u].bLoad = !1),
(this[I][u].windowID = 'canvas' + u),
(this[I][u].drawID = 'canvas_draw' + u),
(this[I][u].iRate = 1),
(this[I][u].bEZoom = !1),
(this[I][u].b3DZoom = !1),
(this[I][u].szSecretKey = ''),
(this[I][u].bFrameForward = !1),
(this[I][u].iDecodeType = v),
(this[I][u].bFirstFrame = !1);
t(),
e(),
(this[A] = new f.ESCanvas('canvas_draw0')),
0 === this[M].iType &&
(0, h.default)('#' + p[M].szId).hide(),
i(),
p.EventCallback.windowEventSelect(0);
}
return (
o(n, [
{
key: 'JS_ArrangeWindow',
value: function(t) {
if (
(t < p[M].iMaxSplit
? (p[M].iCurrentSplit = t)
: (p[M].iCurrentSplit = p[M].iMaxSplit),
a.oTool.isFirefox())
)
for (
var e = 0;
e < p[M].iMaxSplit * p[M].iMaxSplit;
e++
)
p[I][e].oPlayCtrl &&
p[I][e].oPlayCtrl.PlayM4_ClearCanvas();
c(), p.EventCallback.windowEventSelect(0);
},
},
{
key: 'JS_SetSecretKey',
value: function(t, e) {
return t < 0
? -1
: '' === e || 'undefined' == typeof e
? -1
: ((this[I][t].szSecretKey = e), 0);
},
},
{
key: 'JS_Play',
value: function(t, e, n, i, r) {
var o = new Promise(function(o, a) {
return n < 0 || n > p[z] - 1
? void a()
: p[I][n].bFrameForward
? void a()
: (p[I][n].bPlay && p.JS_Stop(n),
(p[I][n].bFirstFrame = !1),
(p[I][n].iDecodeType = v),
void (p[I][n].oPlayCtrl
? d(t, e, n, i, r, o, a)
: (p[I][n].oPlayCtrl = new u.JSPlayCtrl(
p[M].szBasePath + '/playctrl/',
function(s) {
'loaded' !== s.cmd || p[I][n].bLoad
? 'OnebyOne' === s.cmd
? s.status
? T.resume(p[I][n].szStreamUUID)
: T.pause(p[I][n].szStreamUUID)
: 'GetFrameData' === s.cmd &&
p.EventCallback.pluginErrorHandler(
n,
C
)
: d(t, e, n, i, r, o, a);
},
n
))));
});
return o;
},
},
{
key: 'JS_Seek',
value: function(t, e, n) {
var i = new Promise(function(i, r) {
return t < 0 || t > p[z] - 1
? void r()
: p[I][t].bPlay
? void T.seek(p[I][t].szStreamUUID, e, n).then(
function() {
i();
},
function(t) {
r(t);
}
)
: void r();
});
return i;
},
},
{
key: 'JS_GetSdkVersion',
value: function() {
return p[I][0].oPlayCtrl.PlayM4_GetSdkVersion();
},
},
{
key: 'JS_DestroyWorker',
value: function() {
p[I].forEach(function(t) {
t.bPlay && t.oPlayCtrl.PlayM4_CloseStream(),
t.oPlayCtrl &&
(t.oPlayCtrl.PlayM4_Destroy(),
(t.oPlayCtrl = null),
(t.bLoad = !1));
});
},
},
{
key: 'JS_Stop',
value: function(t) {
var e = new Promise(function(e, n) {
return t < 0 || t > p[z] - 1
? void n()
: (p[I][t].szStorageUUID && p.JS_StopSave(t),
p[I][t].bEZoom && p.JS_DisableZoom(t),
p[E] === t && (p[E] = -1),
void T.stop(p[I][t].szStreamUUID).then(
function() {
(p[I][t].bPlay = !1),
(p[I][t].bFrameForward = !1),
(p[I][t].iRate = 1),
p[I][t].oPlayCtrl &&
(p[I][t].oPlayCtrl.PlayM4_Stop(),
p[I][t].oPlayCtrl.PlayM4_CloseStream()),
setTimeout(function() {
e();
}, 500);
},
function() {
setTimeout(function() {
n();
}, 500);
}
));
});
return e;
},
},
{
key: 'JS_Pause',
value: function(t) {
var e = new Promise(function(e, n) {
return t < 0 || t > p[z] - 1
? void n()
: p[I][t].bPlay
? p[I][t].bFrameForward
? void n()
: void T.pause(p[I][t].szStreamUUID).then(
function() {
p[I][t].oPlayCtrl.PlayM4_Pause(!0), e();
},
function(t) {
n(t);
}
)
: void n();
});
return e;
},
},
{
key: 'JS_Resume',
value: function(t) {
var e = new Promise(function(e, n) {
return t < 0 || t > p[z] - 1
? void n()
: p[I][t].bPlay
? void T.resume(p[I][t].szStreamUUID).then(
function() {
1 !== p[R] &&
((p[I][t].iRate = p[R]),
T.setPlayRate(
p[I][t].szStreamUUID,
p[I][t].iRate
),
p[I][t].oPlayCtrl.PlayM4_PlayRate(
p[I][t].iRate
),
p[R] > 1
? p[I][
t
].oPlayCtrl.PlayM4_SetDecodeFrameType(
g
)
: p[I][
t
].oPlayCtrl.PlayM4_SetDecodeFrameType(
v
)),
p[I][t].bFrameForward
? (p[I][t].oPlayCtrl.PlayM4_Play(
p[I][t].windowID
),
(p[I][t].bFrameForward = !1))
: p[I][t].oPlayCtrl.PlayM4_Pause(!1),
e();
},
function(t) {
n(t);
}
)
: void n();
});
return e;
},
},
{
key: 'JS_Slow',
value: function(t) {
var e = new Promise(function(e, n) {
return t < 0 || t > p[z] - 1
? void n()
: p[I][t].bPlay
? 'playback' !== p[I][t].szPlayType
? void n()
: p[I][t].iRate === -8
? void n()
: p[I][t].bFrameForward
? void n()
: (p[I][t].iRate < 0 &&
p[I][t].iRate > -8 &&
(p[I][t].iRate *= 2),
1 === p[I][t].iRate &&
(p[I][t].iRate *= -2),
p[I][t].iRate > 1 && (p[I][t].iRate /= 2),
void T.setPlayRate(
p[I][t].szStreamUUID,
p[I][t].iRate
).then(
function() {
p[I][t].iRate < 2
? p[I][
t
].oPlayCtrl.PlayM4_SetDecodeFrameType(
v
)
: (p[I][
t
].oPlayCtrl.PlayM4_SetDecodeFrameType(
g
),
p[I][
t
].oPlayCtrl.PlayM4_SetIFrameDecInterval(
0
)),
p[I][t].oPlayCtrl.PlayM4_PlayRate(
p[I][t].iRate
),
e();
},
function(t) {
n(t);
}
))
: void n();
});
return e;
},
},
{
key: 'JS_Fast',
value: function(t) {
var e = new Promise(function(e, n) {
return t < 0 || t > p[z] - 1
? void n()
: p[I][t].bPlay
? 'playback' !== p[I][t].szPlayType
? void n()
: p[I][t].bFrameForward
? void n()
: 8 === p[I][t].iRate
? void n()
: (p[I][t].iRate === -2
? (p[I][t].iRate = 1)
: p[I][t].iRate < -2
? (p[I][t].iRate /= 2)
: p[I][t].iRate > 0 &&
p[I][t].iRate < 8 &&
(p[I][t].iRate *= 2),
void T.setPlayRate(
p[I][t].szStreamUUID,
p[I][t].iRate
).then(
function() {
p[I][t].iRate < 2
? p[I][
t
].oPlayCtrl.PlayM4_SetDecodeFrameType(
v
)
: (p[I][
t
].oPlayCtrl.PlayM4_SetDecodeFrameType(
g
),
8 === p[I][t].iRate
? p[I][
t
].oPlayCtrl.PlayM4_SetIFrameDecInterval(
2
)
: p[I][
t
].oPlayCtrl.PlayM4_SetIFrameDecInterval(
0
)),
p[I][t].oPlayCtrl.PlayM4_PlayRate(
p[I][t].iRate
),
e();
},
function(t) {
n(t);
}
))
: void n();
});
return e;
},
},
{
key: 'JS_Transmission',
value: function(t, e) {
var n = new Promise(function(n, i) {
return t < 0 || t > p[z] - 1
? void i()
: p[I][t].szStreamUUID
? void T.transmission(
p[I][t].szStreamUUID,
e
).then(
function(t) {
n(t);
},
function(t) {
i(t);
}
)
: void i();
});
return n;
},
},
{
key: 'JS_FrameForward',
value: function(t) {
var e = new Promise(function(e, n) {
return t < 0 || t > p[z] - 1
? void n()
: p[I][t].bPlay
? (1 !== p[I][t].iRate
? ((p[I][t].iRate = 1),
(p[R] = p[I][t].iRate),
T.setPlayRate(
p[I][t].szStreamUUID,
p[I][t].iRate
).then(
function() {
p[I][t].oPlayCtrl.PlayM4_PlayRate(
p[I][t].iRate
),
p[I][
t
].oPlayCtrl.PlayM4_SetDecodeFrameType(
v
),
p[I][t].oPlayCtrl.PlayM4_OneByOne(),
(p[I][t].bFrameForward = !0);
},
function(t) {
n(t);
}
))
: (p[I][t].oPlayCtrl.PlayM4_PlayRate(
p[I][t].iRate
),
p[I][t].oPlayCtrl.PlayM4_SetDecodeFrameType(
v
),
p[I][t].oPlayCtrl.PlayM4_OneByOne(),
(p[I][t].bFrameForward = !0)),
void e())
: void n();
});
return e;
},
},
{
key: 'JS_GetOSDTime',
value: function(t) {
var e = new Promise(function(e, n) {
if (t < 0 || t > p[z] - 1) return void n(y);
if (!p[I][t].bPlay) return void n(y);
var i = p[I][t].oPlayCtrl.PlayM4_GetOSDTime(function(
t
) {
var n = Date.parse(t.replace(/-/g, ' ')) / 1e3;
e(n);
});
return 0 !== i ? void n(y) : void 0;
});
return e;
},
},
{
key: 'JS_OpenSound',
value: function(t) {
return t < 0 || t > p[z] - 1
? y
: p[I][t].bPlay
? p[E] === t
? y
: (p[E] !== -1 &&
p[I][p[E]].oPlayCtrl.PlayM4_StopSound(),
0 !== p[I][t].oPlayCtrl.PlayM4_PlaySound(t)
? y
: ((p[E] = t), m))
: y;
},
},
{
key: 'JS_GetVolume',
value: function(t, e) {
p[I][t].oPlayCtrl.PlayM4_GetVolume(function(t) {
e(t);
});
},
},
{
key: 'JS_SetVolume',
value: function(t, e) {
return 0 !== p[I][t].oPlayCtrl.PlayM4_SetVolume(e)
? y
: m;
},
},
{
key: 'JS_CloseSound',
value: function() {
var t = p[E];
return t < 0 || t > p[z] - 1
? y
: p[I][t].bPlay
? 0 !== p[I][t].oPlayCtrl.PlayM4_StopSound()
? y
: ((p[E] = -1), m)
: y;
},
},
{
key: 'JS_EnableZoom',
value: function(t) {
return t < 0 || t > p[z] - 1
? y
: p[I][t].bPlay
? ((0, h.default)('.draw-window').unbind(),
(this[A] = new f.ESCanvas('canvas_draw' + t)),
this[A].setShapeType('Rect'),
this[A].setDrawStyle('#ff0000', '', 0),
this[A].setDrawStatus(!0, function(e) {
e.startPos &&
e.endPos &&
(e.startPos[0] > e.endPos[0]
? p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
null,
!1
)
: p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
{
left: e.startPos[0],
top: e.startPos[1],
right: e.endPos[0],
bottom: e.endPos[1],
},
!0
));
}),
(p[I][t].bEZoom = !0),
m)
: y;
},
},
{
key: 'JS_DisableZoom',
value: function(t) {
return t < 0 || t > p[z] - 1
? y
: p[I][t].bPlay
? (this[A].setDrawStatus(!1),
0 !==
this[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
null,
!1
)
? y
: ((this[I][t].bEZoom = !1), m))
: y;
},
},
{
key: 'JS_Enable3DZoom',
value: function(t, e) {
return t < 0 || t > p[z] - 1
? y
: p[I][t].bPlay
? ((0, h.default)('.draw-window').unbind(),
(this[j] = e),
(this[A] = new f.ESCanvas('canvas_draw' + t)),
this[A].setShapeType('Rect'),
this[A].setDrawStyle('#ff0000', '', 0),
this[A].setDrawStatus(!0, function(t) {
e(t);
}),
(p[I][t].b3DZoom = !0),
m)
: y;
},
},
{
key: 'JS_Disable3DZoom',
value: function(t) {
return t < 0 || t > p[z] - 1
? y
: p[I][t].bPlay
? (this[A].setDrawStatus(!1),
(this[I][t].b3DZoom = !1),
m)
: y;
},
},
{
key: 'JS_CapturePicture',
value: function(t, e, n) {
var i = new Promise(function(i, r) {
return t < 0 || t > p[z] - 1
? void r()
: p[I][t].bPlay
? (n || (n = 'JPEG'),
void ('BMP' === n
? p[I][t].oPlayCtrl.PlayM4_GetBMP(function(
t
) {
6 === t
? r(x)
: (a.oTool.downloadFile(t, e + '.BMP'),
i());
})
: 'JPEG' === n &&
p[I][t].oPlayCtrl.PlayM4_GetJPEG(function(
t
) {
6 === t
? r(x)
: (a.oTool.downloadFile(t, e + '.jpeg'),
i());
})))
: void r();
});
return i;
},
},
{
key: 'JS_StopRealPlayAll',
value: function() {
T.stopAll(),
p[I].forEach(function(t, e) {
t.bPlay &&
(t.szStorageUUID && p.JS_StopSave(e),
t.bEZoom && p.JS_DisableZoom(e),
t.oPlayCtrl.PlayM4_Stop(),
t.oPlayCtrl.PlayM4_CloseStream()),
(t.bPlay = !1);
}),
(p[E] = -1);
},
},
{
key: 'JS_StartSave',
value: function(t, e) {
var n = new Promise(function(n, i) {
if (t < 0 || t > p[z] - 1) return void i();
if (!p[I][t].bPlay) return void i();
e.indexOf('.mp4') < 0 && (e += '.mp4');
var r = p[I][t].aHead,
o = 0;
'playback' === p[I][t].szPlayType && (o = 1),
k
.startRecord(e, r, 2, o, {
cbEventHandler: function(e) {
p.EventCallback.pluginErrorHandler(t, e);
},
})
.then(
function(e) {
(p[I][t].szStorageUUID = e), n();
},
function() {
i();
}
);
});
return n;
},
},
{
key: 'JS_StopSave',
value: function(t) {
var e = new Promise(function(e, n) {
return p[I][t].szStorageUUID
? void k.stopRecord(p[I][t].szStorageUUID).then(
function() {
(p[I][t].szStorageUUID = ''), e();
},
function(t) {
n(t);
}
)
: void n();
});
return e;
},
},
{
key: 'JS_GetLocalConfig',
value: function() {
return '';
},
},
{
key: 'JS_SetLocalConfig',
value: function() {
return !0;
},
},
{
key: 'JS_SetGridInfo',
value: function(t) {
if (null === t || 'undefined' == typeof t) return -1;
var e = '#ff0000';
return (
t.style &&
t.style.drawColor &&
(e = t.style.drawColor),
this[A].setDrawStyle(e),
this[A].setShapesInfoByType('Grid', [
{
szGridMap: t.gridMap,
iGridColNum: t.gridColNum,
iGridRowNum: t.gridRowNum,
},
]),
0
);
},
},
{
key: 'JS_GetGridInfo',
value: function() {
if (!this[A]) return {};
var t = this[A].getShapesInfoByType('Grid')[0];
return t
? {
gridColNum: t.iGridColNum,
gridRowNum: t.iGridRowNum,
gridMap: t.szGridMap,
}
: { iGridRowNum: 18, iGridColNum: 22, szGridMap: '' };
},
},
{
key: 'JS_SetDrawShapeInfo',
value: function(t, e) {
return 'undefined' == typeof t || '' === t
? -1
: (this[A].setShapeType(t),
e.style &&
this[A].setDrawStyle(
e.style.szDrawColor || '',
e.style.szFillColor || '',
e.style.iTranslucent || 0
),
e.iMaxShapeSupport &&
e.iMaxShapeSupport > 0 &&
this[A].setMaxShapeSupport(e.iMaxShapeSupport),
void (
e.iMaxPointSupport &&
e.iMaxPointSupport > 0 &&
this[A].setCurrentShapeInfo({
szId: '',
szTips: '',
iMinClosed: 3,
iMaxPointNum: e.iMaxPointSupport,
iPolygonType: 1,
szDrawColor: e.style.szDrawColor || '',
szFillColor: e.style.szFillColor || '',
iTranslucent: e.style.iTranslucent || 0,
})
));
},
},
{
key: 'JS_SetPolygonInfo',
value: function(t) {
if ('undefined' == typeof t || !t.length) return -1;
var e = [];
if (t.length > 0)
for (var n = 0, i = t.length; n < i; n++) {
var r = t[n].aPoint;
r.length > 0 && e.push(t[n]);
}
return e.length > 0
? (this[A].setShapesInfoByType('Polygon', e), 0)
: -1;
},
},
{
key: 'JS_GetPolygonInfo',
value: function() {
for (
var t = [],
e = this[A].getShapesInfoByType('Polygon'),
n = 0,
i = e.length;
n < i;
n++
) {
var r = e[n],
o = {
aPoint: r.aPoint,
bClosed: r.bClosed,
szTips: r.szTips,
};
t.push(o);
}
return t;
},
},
{
key: 'JS_SetLineInfo',
value: function(t) {
if ('undefined' == typeof t || !t.length) return -1;
var e = [];
if (t.length > 0)
for (var n = 0, i = t.length; n < i; n++) {
var r = t[n].aPoint;
r.length > 0 && e.push(t[n]);
}
return e.length > 0
? (this[A].setShapesInfoByType('Line', e), 0)
: -1;
},
},
{
key: 'JS_GetLineInfo',
value: function() {
for (
var t = [],
e = this[A].getShapesInfoByType('Line'),
n = 0,
i = e.length;
n < i;
n++
) {
var r = e[n],
o = {
iLineType: r.iLineType,
aPoint: r.aPoint,
szTips: r.szTips,
};
t.push(o);
}
return t;
},
},
{
key: 'JS_SetRectInfo',
value: function(t) {
if ('undefined' == typeof t || !t.length) return -1;
var e = [];
if (t.length > 0)
for (var n = 0, i = t.length; n < i; n++) {
var r = t[n].aPoint;
r.length > 0 && e.push(t[n]);
}
return e.length > 0
? (this[A].setShapesInfoByType('Rect', e), 0)
: -1;
},
},
{
key: 'JS_GetRectInfo',
value: function() {
for (
var t = [],
e = this[A].getShapesInfoByType('Rect'),
n = 0,
i = e.length;
n < i;
n++
) {
var r = e[n],
o = { aPoint: r.aPoint, szTips: r.szTips };
t.push(o);
}
return t;
},
},
{
key: 'JS_SetRegionInfo',
value: function(t) {
var e = this;
this[A].clearAllShape();
var n = a.oTool.parseXmlFromStr(t);
if (
(this[A].setDrawStyle('#ff0000', '#343434', 0.3),
(0, h.default)(n).find('DetectionRegionInfo').length >
0)
)
!(function() {
e[A].setShapeType('Rect');
var t = parseInt(
(0, h.default)(n)
.find('MaxRegionNum')
.eq(0)
.text(),
10
);
e[A].setMaxShapeSupport(t),
(e[A].m_szDisplayMode = (0, h.default)(n)
.find('DisplayMode')
.eq(0)
.text()),
(e[A].m_szVideoFormat = (0, h.default)(n)
.find('videoFormat')
.eq(0)
.text()),
(e[A].m_iHorizontalResolution = parseInt(
(0, h.default)(n)
.find('HorizontalResolution')
.eq(0)
.text(),
10
)),
(e[A].m_iVerticalResolution = parseInt(
(0, h.default)(n)
.find('VerticalResolution')
.eq(0)
.text(),
10
));
var i = [];
(0, h.default)(n)
.find('DetectionRegion')
.each(function() {
for (
var t = [],
e = 0,
n = (0, h.default)(this).find('positionX')
.length;
e < n;
e++
) {
var r =
Math.round(
(0, h.default)(this)
.find('positionX')
.eq(e)
.text()
) *
p[A].m_iCanvasWidth /
p[A].m_iHorizontalResolution,
o =
(p[A].m_iVerticalResolution -
Math.round(
(0, h.default)(this)
.find('positionY')
.eq(e)
.text()
)) *
p[A].m_iCanvasHeight /
p[A].m_iVerticalResolution;
t.push([r, o]);
}
t.length > 0 &&
(0 !== t[0][0] ||
0 !== t[1][0] ||
0 !== t[2][0] ||
0 !== t[3][0]) &&
i.push({
aPoint: t,
iEditType:
'transparent' === p[A].m_szDisplayMode
? 1
: 0,
});
}),
e[A].setShapesInfoByType('Rect', i);
})();
else if (
(0, h.default)(n).find('MoveDetection').length > 0
) {
this[A].setShapeType('Grid');
var i = parseInt(
(0, h.default)(n)
.find('columnGranularity')
.eq(0)
.text(),
10
),
r = parseInt(
(0, h.default)(n)
.find('rowGranularity')
.eq(0)
.text(),
10
),
o = (0, h.default)(n)
.find('gridMap')
.eq(0)
.text();
this[A].setShapesInfoByType('Grid', [
{ szGridMap: o, iGridColNum: i, iGridRowNum: r },
]);
}
return 0;
},
},
{
key: 'JS_GetRegionInfo',
value: function() {
if (!this[A]) return '';
var t = this[A].getShapeType(),
e = '';
if ('Rect' === t) {
(e += ''),
(e +=
'' +
this[A].m_szVideoFormat +
'roi'),
(e +=
'' +
this[A].m_iHorizontalResolution +
'' +
this[A].m_iVerticalResolution +
''),
(e +=
'' +
this[A].m_szDisplayMode +
'' +
this[A].getMaxShapeSupport() +
''),
(e += '');
for (
var n = this[A].getShapesInfoByType('Rect'),
i = 0,
r = n.length;
i < r;
i++
) {
var o = n[i].aPoint;
(e += ''),
(e +=
'' +
Math.round(
o[3][0] *
this[A].m_iHorizontalResolution /
this[A].m_iCanvasWidth
) +
'' +
(this[A].m_iVerticalResolution -
Math.round(
o[3][1] *
this[A].m_iVerticalResolution /
this[A].m_iCanvasHeight
)) +
''),
(e +=
'' +
Math.round(
o[2][0] *
this[A].m_iHorizontalResolution /
this[A].m_iCanvasWidth
) +
'' +
(this[A].m_iVerticalResolution -
Math.round(
o[2][1] *
this[A].m_iVerticalResolution /
this[A].m_iCanvasHeight
)) +
''),
(e +=
'' +
Math.round(
o[1][0] *
this[A].m_iHorizontalResolution /
this[A].m_iCanvasWidth
) +
'' +
(this[A].m_iVerticalResolution -
Math.round(
o[1][1] *
this[A].m_iVerticalResolution /
this[A].m_iCanvasHeight
)) +
''),
(e +=
'' +
Math.round(
o[0][0] *
this[A].m_iHorizontalResolution /
this[A].m_iCanvasWidth
) +
'' +
(this[A].m_iVerticalResolution -
Math.round(
o[0][1] *
this[A].m_iVerticalResolution /
this[A].m_iCanvasHeight
)) +
''),
(e +=
'');
}
(e += ''),
(e += '');
} else if ('Grid' === t) {
var a = this[A].getShapesInfoByType('Grid')[0];
a ||
(a = {
iGridRowNum: 18,
iGridColNum: 22,
szGridMap: '',
}),
(e +=
'PALgrid'),
(e +=
'' +
a.iGridRowNum +
'' +
a.iGridColNum +
''),
(e += 'transparent'),
(e +=
'' +
a.szGridMap +
'');
}
return e;
},
},
{
key: 'JS_SetDrawStatus',
value: function(t) {
return this[A] ? (this[A].setDrawStatus(t), 0) : -1;
},
},
{
key: 'JS_ClearRegion',
value: function() {
return this[A] ? (this[A].clearAllShape(), 0) : -1;
},
},
{
key: 'JS_GetTextOverlay',
value: function() {
if (!this[A]) return '';
var t = '';
(t += ''),
(t +=
'' +
this[A].m_iHorizontalResolution +
''),
(t +=
'' +
this[A].m_iVerticalResolution +
'');
for (
var e = '',
n = '',
i = '',
r = this[A].getShapesInfoByType('RectOSD'),
o = 0,
a = r.length;
o < a;
o++
) {
var s = r[o],
u = Math.round(
s.iPositionX *
this[A].m_iHorizontalResolution /
this[A].m_iCanvasWidth
),
l = Math.round(
s.iPositionY *
this[A].m_iVerticalResolution /
this[A].m_iCanvasHeight
);
'overlay-date' === s.szOSDType
? ((e +=
'' +
s.szDateStyle +
''),
(e +=
'' + s.szClockType + ''),
(e +=
'' +
s.szDisplayWeek +
''),
(e += '' + s.szEnabled + ''),
(e +=
'' +
u +
'' +
l +
''))
: 'overlay-ch' === s.szOSDType
? ((n +=
'' +
s.szEnabled +
''),
(n +=
'' +
s.szText +
''),
(n +=
'' +
u +
'' +
l +
''))
: 'overlay-text' === s.szOSDType &&
((i +=
'' +
s.szId +
'' +
s.szEnabled +
''),
(i +=
'' +
s.szText +
''),
(i +=
'' +
u +
'' +
l +
''));
}
return (
(t += e),
(t += n),
(t += ''),
(t += i),
(t += ''),
(t += '')
);
},
},
{
key: 'JS_SetTextOverlay',
value: function(t) {
this[A].setMaxShapeSupport(20);
var e = a.oTool.parseXmlFromStr(t);
if (
(this[A].clearShapeByType('RectOSD'),
(0, h.default)(e).find('OSD').length > 0)
) {
if (
(this[A].setDrawStyle('#ff0000', '#343434', 0.7),
(this[A].m_iHorizontalResolution = parseInt(
(0, h.default)(e)
.find('videoResolutionWidth')
.eq(0)
.text(),
10
)),
(this[A].m_iVerticalResolution = parseInt(
(0, h.default)(e)
.find('videoResolutionHeight')
.eq(0)
.text(),
10
)),
(0, h.default)(e).find('channelNameOverlay')
.length > 0)
) {
var n = (0, h.default)(e)
.find('channelNameOverlay')
.eq(0),
i = (0, h.default)(n)
.find('ChannelName')
.eq(0)
.text(),
r = (0, h.default)(n)
.find('enabled')
.eq(0)
.text(),
o =
Math.round(
(0, h.default)(n)
.find('positionX')
.eq(0)
.text()
) *
this[A].m_iCanvasWidth /
this[A].m_iHorizontalResolution,
s =
Math.round(
(0, h.default)(n)
.find('positionY')
.eq(0)
.text()
) *
this[A].m_iCanvasHeight /
this[A].m_iVerticalResolution;
this[A].addOSDShape(i, r, o, s, {
szOSDType: 'overlay-ch',
});
}
if (
(0, h.default)(e).find('DateTimeOverlay').length > 0
) {
var u = (0, h.default)(e)
.find('DateTimeOverlay')
.eq(0),
l = (0, h.default)(u)
.find('enabled')
.eq(0)
.text(),
f =
(0, h.default)(u)
.find('Type')
.eq(0)
.text() ||
(0, h.default)(u)
.find('type')
.eq(0)
.text(),
c = (0, h.default)(u)
.find('displayWeek')
.eq(0)
.text(),
d = (0, h.default)(u)
.find('clockType')
.eq(0)
.text(),
y = '',
m = '',
v = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
],
g = new Date();
switch (
('true' === c && (m = v[g.getDay()]),
(d = '24hour' === d ? '' : 'AM/PM'),
f)
) {
case '0':
y = 'YYYY-MM-DD ' + m + ' hh:mm:ss ' + d;
break;
case '1':
y = 'MM-DD-YYYY ' + m + ' hh:mm:ss ' + d;
break;
case '2':
y = 'CHR-YYYY-MM-DD ' + m + ' hh:mm:ss ' + d;
break;
case '3':
y = 'CHR-MM-DD-YYYY ' + m + ' hh:mm:ss ' + d;
break;
case '4':
y = 'DD-MM-YYYY ' + m + ' hh:mm:ss ' + d;
break;
case '5':
y = 'CHR-DD-MM-YYYY ' + m + ' hh:mm:ss ' + d;
}
var S =
Math.round(
(0, h.default)(u)
.find('positionX')
.eq(0)
.text()
) *
this[A].m_iCanvasWidth /
this[A].m_iHorizontalResolution,
b =
Math.round(
(0, h.default)(u)
.find('positionY')
.eq(0)
.text()
) *
this[A].m_iCanvasHeight /
this[A].m_iVerticalResolution;
this[A].addOSDShape(y, l, S, b, {
szOSDType: 'overlay-date',
szDateStyle: f,
szDisplayWeek: c,
szClockType: d,
});
}
(0, h.default)(e).find('TextOverlayList').length >
0 &&
(0, h.default)(e)
.find('TextOverlayList')
.eq(0)
.find('TextOverlay')
.each(function() {
var t = (0, h.default)(this)
.find('displayText')
.eq(0)
.text(),
e = (0, h.default)(this)
.find('enabled')
.eq(0)
.text(),
n = (0, h.default)(this)
.find('id')
.eq(0)
.text(),
i =
Math.round(
(0, h.default)(this)
.find('positionX')
.eq(0)
.text()
) *
p[A].m_iCanvasWidth /
p[A].m_iHorizontalResolution,
r =
Math.round(
(0, h.default)(this)
.find('positionY')
.eq(0)
.text()
) *
p[A].m_iCanvasHeight /
p[A].m_iVerticalResolution;
p[A].addOSDShape(t, e, i, r, {
szOSDType: 'overlay-text',
szId: n,
});
});
}
return 0;
},
},
{
key: 'JS_ClearSnapInfo',
value: function(t) {
return this[A]
? (0 === t
? this[A].clearShapeByType('Rect')
: 1 === t
? this[A].clearShapeByType('Polygon')
: 2 === t
? this[A].clearShapeByType('Line')
: 3 === t
? (this[A].clearShapeByType('Rect'),
this[A].clearShapeByType('Polygon'))
: this[A].clearAllShape(),
0)
: -1;
},
},
{
key: 'JS_ClearTargetPolygon',
value: function(t) {
var e = a.oTool.parseXmlFromStr(t),
n = this[A].getAllShapesInfo(),
i = n.length;
if (i > 0)
for (var r = 0; r < i; r++) {
var o = (0, h.default)(e)
.find('id')
.eq(0)
.text();
if ('Polygon' === n[r].szType && n[r].szId === o) {
this[A].deleteShape(r);
break;
}
}
},
},
{
key: 'JS_SetSnapPolygonInfo',
value: function(t) {
this[A].setShapeType('Polygon'),
this[A].setMaxShapeSupport(20),
this[A].setDrawStyle('#FFFF00', '#FFFF00', 0.1);
var e = a.oTool.parseXmlFromStr(t),
n = this[A].getAllShapesInfo(),
i = n.length;
if (i > 0)
for (var r = 0; r < i; r++) {
var o = (0, h.default)(e)
.find('id')
.eq(0)
.text();
if ('Polygon' === n[r].szType && n[r].szId === o) {
this[A].deleteShape(r);
break;
}
}
var s = [];
return (
(0, h.default)(e).find('SnapPolygonList').length >
0 &&
(0, h.default)(e)
.find('SnapPolygonList')
.eq(0)
.find('SnapPolygon')
.each(function() {
var t = (0, h.default)(e)
.find('id')
.eq(0)
.text(),
n = parseInt(
(0, h.default)(e)
.find('polygonType')
.eq(0)
.text() || '1',
10
),
i =
(0, h.default)(e)
.find('Tips')
.eq(0)
.text() ||
(0, h.default)(e)
.find('tips')
.eq(0)
.text(),
r = parseInt(
(0, h.default)(e)
.find('MinClosed')
.eq(0)
.text(),
10
),
o = parseInt(
(0, h.default)(e)
.find('PointNumMax')
.eq(0)
.text(),
10
),
a =
parseInt(
(0, h.default)(e)
.find('EditType')
.eq(0)
.text(),
10
) || 0,
u =
'true' ===
(0, h.default)(e)
.find('isClosed')
.eq(0)
.text(),
l =
'rgb(' +
(0, h.default)(e)
.find('r')
.eq(0)
.text() +
', ' +
(0, h.default)(e)
.find('g')
.eq(0)
.text() +
', ' +
(0, h.default)(e)
.find('b')
.eq(0)
.text() +
')',
f = l,
c = 0.1,
d = [];
(0, h.default)(e)
.find('pointList')
.eq(0)
.find('point')
.each(function(t) {
(d[t] = []),
(d[t][0] = Math.round(
(0, h.default)(this)
.find('x')
.eq(0)
.text() * p[A].m_iCanvasWidth
)),
(d[t][1] = Math.round(
(0, h.default)(this)
.find('y')
.eq(0)
.text() * p[A].m_iCanvasHeight
));
}),
d.length > 0
? (s.push({
szId: t,
iPolygonType: n,
iMinClosed: r,
iMaxPointNum: o,
iEditType: a,
aPoint: d,
bClosed: u,
szTips: i,
szDrawColor: l,
szFillColor: f,
iTranslucent: c,
}),
p[A].setDrawStatus(!1))
: (p[A].setCurrentShapeInfo({
szId: t,
szTips: i,
iMinClosed: r,
iMaxPointNum: o,
iPolygonType: n,
szDrawColor: l,
szFillColor: f,
iTranslucent: c,
}),
p[A].setDrawStatus(!0));
}),
s.length > 0 &&
this[A].setShapesInfoByType('Polygon', s),
0
);
},
},
{
key: 'JS_GetSnapPolygonInfo',
value: function() {
for (
var t =
"",
e = this[A].getShapesInfoByType('Polygon'),
n = 0,
i = e.length;
n < i;
n++
) {
var r = e[n];
(t += ''),
(t += '' + r.szId + ''),
(t +=
'' +
r.iPolygonType +
''),
(t += '');
var o = r.szDrawColor
.substring(4, r.szDrawColor.length - 1)
.split(',');
(t += '' + o[0] + ''),
(t += '' + o[1] + ''),
(t += '' + o[2] + ''),
(t += ''),
(t += '' + r.szTips + ''),
(t += '' + r.bClosed + '');
var a = r.aPoint;
t += '';
for (var s = 0, u = a.length; s < u; s++)
t +=
'' +
(a[s][0] / this[A].m_iCanvasWidth).toFixed(6) +
'' +
(a[s][1] / this[A].m_iCanvasHeight).toFixed(6) +
'';
(t += ''), (t += '');
}
return (t += '');
},
},
{
key: 'JS_SetSnapDrawMode',
value: function() {
return this[A]
? (this[A].setDrawMutiShapeOneTime(!1), 0)
: -1;
},
},
{
key: 'JS_SetSnapLineInfo',
value: function(t) {
this[A].setShapeType('Line'),
this[A].setMaxShapeSupport(20),
this[A].setDrawStyle('#FFFF00', '#FFFF00', 0.1);
var e = a.oTool.parseXmlFromStr(t),
n = this[A].getAllShapesInfo(),
i = n.length;
if (i > 0)
for (var r = 0; r < i; r++) {
var o = (0, h.default)(e)
.find('id')
.eq(0)
.text();
if ('Line' === n[r].szType && n[r].szId === o) {
this[A].deleteShape(r);
break;
}
}
var s = [];
return (
(0, h.default)(e).find('SnapLineList').length > 0 &&
(0, h.default)(e)
.find('SnapLineList')
.eq(0)
.find('SnapLine')
.each(function() {
var t = (0, h.default)(e)
.find('id')
.eq(0)
.text(),
n = parseInt(
(0, h.default)(e)
.find('LineTypeEx')
.eq(0)
.text(),
10
),
i =
parseInt(
(0, h.default)(e)
.find('CustomType')
.text(),
10
) ||
parseInt(
(0, h.default)(e)
.find('LineType')
.text(),
10
),
r =
parseInt(
(0, h.default)(e)
.find('ArrowType')
.text(),
10
) || 0,
o =
(0, h.default)(e)
.find('Tips')
.eq(0)
.text() ||
(0, h.default)(e)
.find('tips')
.eq(0)
.text(),
a =
'rgb(' +
(0, h.default)(e)
.find('r')
.eq(0)
.text() +
', ' +
(0, h.default)(e)
.find('g')
.eq(0)
.text() +
', ' +
(0, h.default)(e)
.find('b')
.eq(0)
.text() +
')',
u = [];
(u[0] = []),
(u[1] = []),
(u[0][0] = Math.round(
(0, h.default)(e)
.find('StartPos')
.eq(0)
.find('x')
.eq(0)
.text() * p[A].m_iCanvasWidth
)),
(u[0][1] = Math.round(
(0, h.default)(e)
.find('StartPos')
.eq(0)
.find('y')
.eq(0)
.text() * p[A].m_iCanvasHeight
)),
(u[1][0] = Math.round(
(0, h.default)(e)
.find('EndPos')
.eq(0)
.find('x')
.eq(0)
.text() * p[A].m_iCanvasWidth
)),
(u[1][1] = Math.round(
(0, h.default)(e)
.find('EndPos')
.eq(0)
.find('y')
.eq(0)
.text() * p[A].m_iCanvasHeight
)),
u.length > 0 &&
(s.push({
szId: t,
iLineType: n,
aPoint: u,
szTips: o,
iDirection: i,
iArrowType: r,
szDrawColor: a,
}),
p[A].setDrawStatus(!1));
}),
s.length > 0 &&
this[A].setShapesInfoByType('Line', s),
0
);
},
},
{
key: 'JS_GetSnapLineInfo',
value: function() {
for (
var t =
"",
e = this[A].getShapesInfoByType('Line'),
n = 0,
i = e.length;
n < i;
n++
) {
(t += ''),
(t += '' + e[n].szId + ''),
(t +=
'' +
e[n].iLineType +
''),
(t +=
'00' +
e[n].iArrowType +
''),
(t += '' + e[n].szTips + '');
var r = e[n].aPoint;
(t +=
'' +
(r[0][0] / p[A].m_iCanvasWidth).toFixed(6) +
'' +
(r[0][1] / p[A].m_iCanvasHeight).toFixed(6) +
''),
(t +=
'' +
(r[1][0] / p[A].m_iCanvasWidth).toFixed(6) +
'' +
(r[1][1] / p[A].m_iCanvasHeight).toFixed(6) +
''),
(t += 'false'),
e[n].aCrossArrowPoint.length > 0 &&
((t +=
'' +
(
e[n].aCrossArrowPoint[0][0] /
p[A].m_iCanvasWidth
).toFixed(6) +
''),
(t +=
'' +
(
e[n].aCrossArrowPoint[0][1] /
p[A].m_iCanvasWidth
).toFixed(6) +
''),
(t +=
'' +
(
e[n].aCrossArrowPoint[1][0] /
p[A].m_iCanvasWidth
).toFixed(6) +
''),
(t +=
'' +
(
e[n].aCrossArrowPoint[1][1] /
p[A].m_iCanvasWidth
).toFixed(6) +
'')),
(t += 'false');
var o = e[n].szDrawColor.split(',')[0].split('(')[1],
a = e[n].szDrawColor.split(',')[1],
s = e[n].szDrawColor.split(',')[2].split(')')[0];
(t +=
'' +
(o || '255') +
'' +
(a || '255') +
'' +
(s || '0') +
''),
(t += '');
}
return (t += '');
},
},
{
key: 'JS_FullScreenDisplay',
value: function(t) {
if (t) {
this[O] = t;
var e = (0, h.default)('#' + p[M].szId).get(0);
e.requestFullScreen
? e.requestFullScreen()
: e.webkitRequestFullScreen
? e.webkitRequestFullScreen()
: e.mozRequestFullScreen &&
e.mozRequestFullScreen();
}
},
},
{
key: 'JS_FullScreenSingle',
value: function(t) {
if (p[I][t].bPlay) {
var e =
document.fullscreen ||
document.webkitIsFullScreen ||
document.mozFullScreen ||
!1,
n = D.find('.parent-wnd')
.eq(0)
.children()
.eq(t)
.get(0);
if (e) {
if (
D.find('.parent-wnd')
.eq(0)
.width() === (0, h.default)(window).width()
)
return;
document.exitFullscreen
? document.exitFullscreen()
: document.webkitCancelFullScreen
? document.webkitCancelFullScreen()
: document.mozCancelFullScreen &&
document.mozCancelFullScreen();
} else
n.requestFullScreen
? n.requestFullScreen()
: n.webkitRequestFullScreen
? n.webkitRequestFullScreen()
: n.mozRequestFullScreen &&
n.mozRequestFullScreen(),
(p[B] = D.find('.parent-wnd')
.eq(0)
.children()
.eq(t));
}
},
},
{
key: 'JS_StartDownload',
value: function(t, e, n, i) {
var r = (0, h.default)(a.oTool.parseXmlFromStr(i))
.find('playbackURI')
.eq(0)
.text(),
o = t + '?playbackURI=' + r,
s = '.mp4';
t.indexOf('picture/Streaming/tracks') > 0 &&
((o = t), (s = '.jpg'));
var u = o.indexOf('&name=') + 6,
l = o.indexOf('&size=');
return (
(n = o.substring(u, l)),
(0, h.default)('body').append(
''
),
(0, h.default)('#jsplugin_download_li').trigger(
'click'
),
(0, h.default)('#jsplugin_download_a').remove(),
0
);
},
},
{
key: 'JS_Resize',
value: function(t, e) {
if (
(this[O]
? ((t = (0, h.default)(window).width()),
(e = (0, h.default)(window).height()),
(0, h.default)('#' + this[M].szId).css({
width: t,
height: e,
}),
(this[O] = !1))
: (0, h.default)('#' + this[M].szId).css({
width: t,
height: e,
}),
(this[M].iWidth = t),
(this[M].iHeight = e),
a.oTool.isFirefox())
)
for (
var n = 0;
n < p[M].iMaxSplit * p[M].iMaxSplit;
n++
)
p[I][n].oPlayCtrl &&
p[I][n].oPlayCtrl.PlayM4_ClearCanvas();
c(),
p[B] &&
((t = (0, h.default)(window).width()),
(e = (0, h.default)(window).height()),
p[B].css({ width: t, height: e }),
p[B].find('canvas').attr('width', t - 2),
p[B].find('canvas').attr('height', e - 2),
(p[B] = null)),
this[A].resizeCanvas(),
this[A].canvasRedraw();
},
},
{
key: 'JS_WndCreate',
value: function(t, n, i) {
e(n, i),
this[A].updateCanvas('canvas_draw0'),
this[A].clearAllShape(),
0 === t
? (0, h.default)('#' + this[M].szId).hide()
: (0, h.default)('#' + this[M].szId).show(),
p.EventCallback.windowEventSelect(0);
},
},
{
key: 'JS_ExportDeviceConfig',
value: function(t) {
return (
(0, h.default)('body').append(
''
),
(0, h.default)('#jsplugin_download_li').trigger(
'click'
),
(0, h.default)('#jsplugin_download_a').remove(),
0
);
},
},
{
key: 'JS_OpenFileBrowser',
value: function(t, e, n, i, r) {
p[L] = null;
var o = window.document.createElement('input');
(o.type = 'file'),
'bmp' === e.toLowerCase() && (o.accept = 'image/bmp'),
0 === t && o.setAttribute('webkitdirectory', ''),
o.addEventListener('change', function() {
1 === t
? ((p[L] = o.files[0]),
(n[i] = o.files[0].name),
r &&
r.$digest(function() {
n[i] = o.files[0].name;
}))
: 0 === t && (p[L] = o.files);
});
var a = document.createEvent('MouseEvents');
a.initEvent('click', !0, !0), o.dispatchEvent(a);
},
},
{
key: 'JS_UploadFile',
value: function(t, e, n, i) {
var r = 0,
o = new XMLHttpRequest();
return (
(o.onreadystatechange = function() {
4 === o.readyState && 200 !== o.status && (r = -1);
}),
o.open('put', t, !1),
o.setRequestHeader('Content-Type', i),
o.send(p[L]),
r
);
},
},
{
key: 'JS_StartAsynUpload',
value: function(t) {
var e = new XMLHttpRequest();
return (
(e.onreadystatechange = function() {
4 === e.readyState && (p[N] = e.responseText);
}),
e.open('put', t, !0),
e.send(p[L]),
0
);
},
},
{
key: 'JS_StopAsynUpload',
value: function() {
(p[L] = null), (p[N] = '');
},
},
{
key: 'JS_GetUploadErrorInfo',
value: function() {
return 'string' == typeof p[N] && p[N].length > 0
? p[N]
: '';
},
},
{
key: 'JS_StartUpgradeEx',
value: function(t, e) {
var n = new Promise(function(n, i) {
if (!t) return i(), y;
if (!e) return i(), y;
p[N] = 0;
var r = new XMLHttpRequest();
(r.onreadystatechange = function() {
if (4 === r.readyState)
if (200 === r.status) (p[N] = 100), n();
else {
p[N] = 1;
var t = a.oTool.parseXmlFromStr(r.responseText);
'lowPrivilege' ===
(0, h.default)(t)
.find('subStatusCode')
.text()
? i(403)
: i();
}
}),
r.open('put', t, !0),
r.send(p[L]),
(p[q] = e),
setTimeout(function() {
n();
}, 3e3);
});
return n;
},
},
{
key: 'JS_UpgradeStatus',
value: function() {
return 100 === p[N] ? 0 : p[N];
},
},
{
key: 'JS_UpgradeProgress',
value: function() {
var t = 0,
e = new XMLHttpRequest();
return (
(e.onreadystatechange = function() {
4 === e.readyState &&
200 === e.status &&
(t = parseInt(
(0, h.default)(
a.oTool.parseXmlFromStr(e.responseText)
)
.find('percent')
.text(),
10
));
}),
e.open('get', p[q], !1),
e.send(null),
100 === p[N] ? 100 : t
);
},
},
{
key: 'JS_StopUpgrade',
value: function() {
return (p[L] = null), 0;
},
},
{
key: 'JS_ExportDeviceLog',
value: function(t, e) {
function n(t) {
a.push(t);
var e = t.slice('');
if (/^[\u4e00-\u9fa5]/.test(t))
for (var n = 0; n < 30 - 2 * e.length; n++)
a.push(' ');
else
for (var i = 0; i < 30 - e.length; i++) a.push(' ');
}
e = 'Log.txt';
var i = [],
r = [];
i = i.concat(
(0, h.default)(t)
.find('searchMatchItem')
.toArray()
);
for (var o = 0; o < i.length; o++)
(r[o] = []),
(r[o][0] = (0, h.default)(i[o])
.find('logtime')
.text()
.replace('T', ' ')
.replace('Z', '')),
(r[o][1] = (0, h.default)(i[o])
.find('majortype')
.text()),
(r[o][2] = (0, h.default)(i[o])
.find('minortype')
.text()),
(r[o][3] = (0, h.default)(i[o])
.find('channelid')
.text()),
(r[o][4] = (0, h.default)(i[o])
.find('userName')
.text()),
(r[o][5] = (0, h.default)(i[o])
.find('remoteaddress')
.text());
var a = [];
n(' '),
n(
(0, h.default)(t)
.find('laLogTime')
.text()
),
n(
(0, h.default)(t)
.find('laLogMajorType')
.text()
),
n(
(0, h.default)(t)
.find('laLogMinorType')
.text()
),
n(
(0, h.default)(t)
.find('laLogChannel')
.text()
),
n(
(0, h.default)(t)
.find('laLogRemoteUser')
.text()
),
n(
(0, h.default)(t)
.find('laLogRemoteIP')
.text()
),
a.push('\r\n');
for (var s = 0; s < r.length; s++) {
var u = (s + 1).toString();
n(u);
for (var l = 0; l < 6; l++) n(r[s][l]);
a.push('\r\n');
}
a = a.join('');
var f = new Blob([a], { type: 'text/plain' }),
c = (window.URL || window.webkitURL).createObjectURL(
f
),
d = window.document.createElement('a');
(d.href = c), (d.download = e);
var p = document.createEvent('MouseEvents');
p.initEvent('click', !0, !0), d.dispatchEvent(p);
},
},
{
key: 'JS_GetWndContainer',
value: function(t) {
return t < 0 || 'undefined' == typeof t || null === t
? -1
: D.find('.parent-wnd')
.eq(0)
.children()
.eq(t)[0];
},
},
{
key: 'JS_GetWndStatus',
value: function(t) {
if (t < 0 || 'undefined' == typeof t || null === t)
return -1;
var e = {
bPlay: this[I][t].bPlay,
bSound: this[E] === t,
bSelect: this[I][t].bSelect,
iRate: this[I][t].iRate,
};
return e;
},
},
{
key: 'JS_SelectWnd',
value: function(t) {
D.find('.parent-wnd')
.eq(0)
.children()
.eq(t)
.mousedown();
},
},
]),
n
);
})();
return W;
}
})();
e.JSPlugin = d;
},
function(t, e, n) {
var i, r;
(function(t) {
'use strict';
var n =
'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
? function(t) {
return typeof t;
}
: function(t) {
return t &&
'function' == typeof Symbol &&
t.constructor === Symbol &&
t !== Symbol.prototype
? 'symbol'
: typeof t;
}; /*!
* jQuery JavaScript Library v3.2.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2017-03-20T18:59Z
*/
!(function(e, i) {
'object' === n(t) && 'object' === n(t.exports)
? (t.exports = e.document
? i(e, !0)
: function(t) {
if (!t.document)
throw new Error(
'jQuery requires a window with a document'
);
return i(t);
})
: i(e);
})('undefined' != typeof window ? window : void 0, function(o, a) {
function s(t, e) {
e = e || st;
var n = e.createElement('script');
(n.text = t), e.head.appendChild(n).parentNode.removeChild(n);
}
function u(t) {
var e = !!t && 'length' in t && t.length,
n = bt.type(t);
return (
'function' !== n &&
!bt.isWindow(t) &&
('array' === n ||
0 === e ||
('number' == typeof e && e > 0 && e - 1 in t))
);
}
function l(t, e) {
return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase();
}
function f(t, e, n) {
return bt.isFunction(e)
? bt.grep(t, function(t, i) {
return !!e.call(t, i, t) !== n;
})
: e.nodeType
? bt.grep(t, function(t) {
return (t === e) !== n;
})
: 'string' != typeof e
? bt.grep(t, function(t) {
return ht.call(e, t) > -1 !== n;
})
: Rt.test(e)
? bt.filter(e, t, n)
: ((e = bt.filter(e, t)),
bt.grep(t, function(t) {
return ht.call(e, t) > -1 !== n && 1 === t.nodeType;
}));
}
function c(t, e) {
for (; (t = t[e]) && 1 !== t.nodeType; );
return t;
}
function h(t) {
var e = {};
return (
bt.each(t.match(Ot) || [], function(t, n) {
e[n] = !0;
}),
e
);
}
function d(t) {
return t;
}
function p(t) {
throw t;
}
function y(t, e, n, i) {
var r;
try {
t && bt.isFunction((r = t.promise))
? r
.call(t)
.done(e)
.fail(n)
: t && bt.isFunction((r = t.then))
? r.call(t, e, n)
: e.apply(void 0, [t].slice(i));
} catch (t) {
n.apply(void 0, [t]);
}
}
function m() {
st.removeEventListener('DOMContentLoaded', m),
o.removeEventListener('load', m),
bt.ready();
}
function v() {
this.expando = bt.expando + v.uid++;
}
function g(t) {
return (
'true' === t ||
('false' !== t &&
('null' === t
? null
: t === +t + ''
? +t
: Wt.test(t)
? JSON.parse(t)
: t))
);
}
function S(t, e, n) {
var i;
if (void 0 === n && 1 === t.nodeType)
if (
((i = 'data-' + e.replace(Ut, '-$&').toLowerCase()),
(n = t.getAttribute(i)),
'string' == typeof n)
) {
try {
n = g(n);
} catch (t) {}
jt.set(t, e, n);
} else n = void 0;
return n;
}
function b(t, e, n, i) {
var r,
o = 1,
a = 20,
s = i
? function() {
return i.cur();
}
: function() {
return bt.css(t, e, '');
},
u = s(),
l = (n && n[3]) || (bt.cssNumber[e] ? '' : 'px'),
f =
(bt.cssNumber[e] || ('px' !== l && +u)) &&
Vt.exec(bt.css(t, e));
if (f && f[3] !== l) {
(l = l || f[3]), (n = n || []), (f = +u || 1);
do (o = o || '.5'), (f /= o), bt.style(t, e, f + l);
while (o !== (o = s() / u) && 1 !== o && --a);
}
return (
n &&
((f = +f || +u || 0),
(r = n[1] ? f + (n[1] + 1) * n[2] : +n[2]),
i && ((i.unit = l), (i.start = f), (i.end = r))),
r
);
}
function w(t) {
var e,
n = t.ownerDocument,
i = t.nodeName,
r = $t[i];
return r
? r
: ((e = n.body.appendChild(n.createElement(i))),
(r = bt.css(e, 'display')),
e.parentNode.removeChild(e),
'none' === r && (r = 'block'),
($t[i] = r),
r);
}
function _(t, e) {
for (var n, i, r = [], o = 0, a = t.length; o < a; o++)
(i = t[o]),
i.style &&
((n = i.style.display),
e
? ('none' === n &&
((r[o] = Ht.get(i, 'display') || null),
r[o] || (i.style.display = '')),
'' === i.style.display && Xt(i) && (r[o] = w(i)))
: 'none' !== n &&
((r[o] = 'none'), Ht.set(i, 'display', n)));
for (o = 0; o < a; o++) null != r[o] && (t[o].style.display = r[o]);
return t;
}
function P(t, e) {
var n;
return (
(n =
'undefined' != typeof t.getElementsByTagName
? t.getElementsByTagName(e || '*')
: 'undefined' != typeof t.querySelectorAll
? t.querySelectorAll(e || '*')
: []),
void 0 === e || (e && l(t, e)) ? bt.merge([t], n) : n
);
}
function C(t, e) {
for (var n = 0, i = t.length; n < i; n++)
Ht.set(t[n], 'globalEval', !e || Ht.get(e[n], 'globalEval'));
}
function x(t, e, n, i, r) {
for (
var o,
a,
s,
u,
l,
f,
c = e.createDocumentFragment(),
h = [],
d = 0,
p = t.length;
d < p;
d++
)
if (((o = t[d]), o || 0 === o))
if ('object' === bt.type(o)) bt.merge(h, o.nodeType ? [o] : o);
else if (ee.test(o)) {
for (
a = a || c.appendChild(e.createElement('div')),
s = (Zt.exec(o) || ['', ''])[1].toLowerCase(),
u = te[s] || te._default,
a.innerHTML = u[1] + bt.htmlPrefilter(o) + u[2],
f = u[0];
f--;
)
a = a.lastChild;
bt.merge(h, a.childNodes),
(a = c.firstChild),
(a.textContent = '');
} else h.push(e.createTextNode(o));
for (c.textContent = '', d = 0; (o = h[d++]); )
if (i && bt.inArray(o, i) > -1) r && r.push(o);
else if (
((l = bt.contains(o.ownerDocument, o)),
(a = P(c.appendChild(o), 'script')),
l && C(a),
n)
)
for (f = 0; (o = a[f++]); ) Qt.test(o.type || '') && n.push(o);
return c;
}
function T() {
return !0;
}
function k() {
return !1;
}
function D() {
try {
return st.activeElement;
} catch (t) {}
}
function M(t, e, i, r, o, a) {
var s, u;
if ('object' === ('undefined' == typeof e ? 'undefined' : n(e))) {
'string' != typeof i && ((r = r || i), (i = void 0));
for (u in e) M(t, u, i, r, e[u], a);
return t;
}
if (
(null == r && null == o
? ((o = i), (r = i = void 0))
: null == o &&
('string' == typeof i
? ((o = r), (r = void 0))
: ((o = r), (r = i), (i = void 0))),
o === !1)
)
o = k;
else if (!o) return t;
return (
1 === a &&
((s = o),
(o = function(t) {
return bt().off(t), s.apply(this, arguments);
}),
(o.guid = s.guid || (s.guid = bt.guid++))),
t.each(function() {
bt.event.add(this, e, o, r, i);
})
);
}
function R(t, e) {
return l(t, 'table') &&
l(11 !== e.nodeType ? e : e.firstChild, 'tr')
? bt('>tbody', t)[0] || t
: t;
}
function E(t) {
return (
(t.type = (null !== t.getAttribute('type')) + '/' + t.type), t
);
}
function z(t) {
var e = le.exec(t.type);
return e ? (t.type = e[1]) : t.removeAttribute('type'), t;
}
function I(t, e) {
var n, i, r, o, a, s, u, l;
if (1 === e.nodeType) {
if (
Ht.hasData(t) &&
((o = Ht.access(t)), (a = Ht.set(e, o)), (l = o.events))
) {
delete a.handle, (a.events = {});
for (r in l)
for (n = 0, i = l[r].length; n < i; n++)
bt.event.add(e, r, l[r][n]);
}
jt.hasData(t) &&
((s = jt.access(t)), (u = bt.extend({}, s)), jt.set(e, u));
}
}
function A(t, e) {
var n = e.nodeName.toLowerCase();
'input' === n && Kt.test(t.type)
? (e.checked = t.checked)
: ('input' !== n && 'textarea' !== n) ||
(e.defaultValue = t.defaultValue);
}
function F(t, e, n, i) {
e = ft.apply([], e);
var r,
o,
a,
u,
l,
f,
c = 0,
h = t.length,
d = h - 1,
p = e[0],
y = bt.isFunction(p);
if (
y ||
(h > 1 && 'string' == typeof p && !gt.checkClone && ue.test(p))
)
return t.each(function(r) {
var o = t.eq(r);
y && (e[0] = p.call(this, r, o.html())), F(o, e, n, i);
});
if (
h &&
((r = x(e, t[0].ownerDocument, !1, t, i)),
(o = r.firstChild),
1 === r.childNodes.length && (r = o),
o || i)
) {
for (a = bt.map(P(r, 'script'), E), u = a.length; c < h; c++)
(l = r),
c !== d &&
((l = bt.clone(l, !0, !0)),
u && bt.merge(a, P(l, 'script'))),
n.call(t[c], l, c);
if (u)
for (
f = a[a.length - 1].ownerDocument, bt.map(a, z), c = 0;
c < u;
c++
)
(l = a[c]),
Qt.test(l.type || '') &&
!Ht.access(l, 'globalEval') &&
bt.contains(f, l) &&
(l.src
? bt._evalUrl && bt._evalUrl(l.src)
: s(l.textContent.replace(fe, ''), f));
}
return t;
}
function O(t, e, n) {
for (
var i, r = e ? bt.filter(e, t) : t, o = 0;
null != (i = r[o]);
o++
)
n || 1 !== i.nodeType || bt.cleanData(P(i)),
i.parentNode &&
(n && bt.contains(i.ownerDocument, i) && C(P(i, 'script')),
i.parentNode.removeChild(i));
return t;
}
function B(t, e, n) {
var i,
r,
o,
a,
s = t.style;
return (
(n = n || de(t)),
n &&
((a = n.getPropertyValue(e) || n[e]),
'' !== a ||
bt.contains(t.ownerDocument, t) ||
(a = bt.style(t, e)),
!gt.pixelMarginRight() &&
he.test(a) &&
ce.test(e) &&
((i = s.width),
(r = s.minWidth),
(o = s.maxWidth),
(s.minWidth = s.maxWidth = s.width = a),
(a = n.width),
(s.width = i),
(s.minWidth = r),
(s.maxWidth = o))),
void 0 !== a ? a + '' : a
);
}
function L(t, e) {
return {
get: function() {
return t()
? void delete this.get
: (this.get = e).apply(this, arguments);
},
};
}
function N(t) {
if (t in Se) return t;
for (var e = t[0].toUpperCase() + t.slice(1), n = ge.length; n--; )
if (((t = ge[n] + e), t in Se)) return t;
}
function q(t) {
var e = bt.cssProps[t];
return e || (e = bt.cssProps[t] = N(t) || t), e;
}
function H(t, e, n) {
var i = Vt.exec(e);
return i ? Math.max(0, i[2] - (n || 0)) + (i[3] || 'px') : e;
}
function j(t, e, n, i, r) {
var o,
a = 0;
for (
o = n === (i ? 'border' : 'content') ? 4 : 'width' === e ? 1 : 0;
o < 4;
o += 2
)
'margin' === n && (a += bt.css(t, n + Yt[o], !0, r)),
i
? ('content' === n &&
(a -= bt.css(t, 'padding' + Yt[o], !0, r)),
'margin' !== n &&
(a -= bt.css(t, 'border' + Yt[o] + 'Width', !0, r)))
: ((a += bt.css(t, 'padding' + Yt[o], !0, r)),
'padding' !== n &&
(a += bt.css(t, 'border' + Yt[o] + 'Width', !0, r)));
return a;
}
function W(t, e, n) {
var i,
r = de(t),
o = B(t, e, r),
a = 'border-box' === bt.css(t, 'boxSizing', !1, r);
return he.test(o)
? o
: ((i = a && (gt.boxSizingReliable() || o === t.style[e])),
'auto' === o &&
(o = t['offset' + e[0].toUpperCase() + e.slice(1)]),
(o = parseFloat(o) || 0),
o + j(t, e, n || (a ? 'border' : 'content'), i, r) + 'px');
}
function U(t, e, n, i, r) {
return new U.prototype.init(t, e, n, i, r);
}
function G() {
we &&
(st.hidden === !1 && o.requestAnimationFrame
? o.requestAnimationFrame(G)
: o.setTimeout(G, bt.fx.interval),
bt.fx.tick());
}
function V() {
return (
o.setTimeout(function() {
be = void 0;
}),
(be = bt.now())
);
}
function Y(t, e) {
var n,
i = 0,
r = { height: t };
for (e = e ? 1 : 0; i < 4; i += 2 - e)
(n = Yt[i]), (r['margin' + n] = r['padding' + n] = t);
return e && (r.opacity = r.width = t), r;
}
function X(t, e, n) {
for (
var i,
r = (K.tweeners[e] || []).concat(K.tweeners['*']),
o = 0,
a = r.length;
o < a;
o++
)
if ((i = r[o].call(n, e, t))) return i;
}
function J(t, e, n) {
var i,
r,
o,
a,
s,
u,
l,
f,
c = 'width' in e || 'height' in e,
h = this,
d = {},
p = t.style,
y = t.nodeType && Xt(t),
m = Ht.get(t, 'fxshow');
n.queue ||
((a = bt._queueHooks(t, 'fx')),
null == a.unqueued &&
((a.unqueued = 0),
(s = a.empty.fire),
(a.empty.fire = function() {
a.unqueued || s();
})),
a.unqueued++,
h.always(function() {
h.always(function() {
a.unqueued--, bt.queue(t, 'fx').length || a.empty.fire();
});
}));
for (i in e)
if (((r = e[i]), _e.test(r))) {
if (
(delete e[i],
(o = o || 'toggle' === r),
r === (y ? 'hide' : 'show'))
) {
if ('show' !== r || !m || void 0 === m[i]) continue;
y = !0;
}
d[i] = (m && m[i]) || bt.style(t, i);
}
if (((u = !bt.isEmptyObject(e)), u || !bt.isEmptyObject(d))) {
c &&
1 === t.nodeType &&
((n.overflow = [p.overflow, p.overflowX, p.overflowY]),
(l = m && m.display),
null == l && (l = Ht.get(t, 'display')),
(f = bt.css(t, 'display')),
'none' === f &&
(l
? (f = l)
: (_([t], !0),
(l = t.style.display || l),
(f = bt.css(t, 'display')),
_([t]))),
('inline' === f || ('inline-block' === f && null != l)) &&
'none' === bt.css(t, 'float') &&
(u ||
(h.done(function() {
p.display = l;
}),
null == l &&
((f = p.display), (l = 'none' === f ? '' : f))),
(p.display = 'inline-block'))),
n.overflow &&
((p.overflow = 'hidden'),
h.always(function() {
(p.overflow = n.overflow[0]),
(p.overflowX = n.overflow[1]),
(p.overflowY = n.overflow[2]);
})),
(u = !1);
for (i in d)
u ||
(m
? 'hidden' in m && (y = m.hidden)
: (m = Ht.access(t, 'fxshow', { display: l })),
o && (m.hidden = !y),
y && _([t], !0),
h.done(function() {
y || _([t]), Ht.remove(t, 'fxshow');
for (i in d) bt.style(t, i, d[i]);
})),
(u = X(y ? m[i] : 0, i, h)),
i in m ||
((m[i] = u.start), y && ((u.end = u.start), (u.start = 0)));
}
}
function $(t, e) {
var n, i, r, o, a;
for (n in t)
if (
((i = bt.camelCase(n)),
(r = e[i]),
(o = t[n]),
Array.isArray(o) && ((r = o[1]), (o = t[n] = o[0])),
n !== i && ((t[i] = o), delete t[n]),
(a = bt.cssHooks[i]),
a && 'expand' in a)
) {
(o = a.expand(o)), delete t[i];
for (n in o) n in t || ((t[n] = o[n]), (e[n] = r));
} else e[i] = r;
}
function K(t, e, n) {
var i,
r,
o = 0,
a = K.prefilters.length,
s = bt.Deferred().always(function() {
delete u.elem;
}),
u = function() {
if (r) return !1;
for (
var e = be || V(),
n = Math.max(0, l.startTime + l.duration - e),
i = n / l.duration || 0,
o = 1 - i,
a = 0,
u = l.tweens.length;
a < u;
a++
)
l.tweens[a].run(o);
return (
s.notifyWith(t, [l, o, n]),
o < 1 && u
? n
: (u || s.notifyWith(t, [l, 1, 0]),
s.resolveWith(t, [l]),
!1)
);
},
l = s.promise({
elem: t,
props: bt.extend({}, e),
opts: bt.extend(
!0,
{ specialEasing: {}, easing: bt.easing._default },
n
),
originalProperties: e,
originalOptions: n,
startTime: be || V(),
duration: n.duration,
tweens: [],
createTween: function(e, n) {
var i = bt.Tween(
t,
l.opts,
e,
n,
l.opts.specialEasing[e] || l.opts.easing
);
return l.tweens.push(i), i;
},
stop: function(e) {
var n = 0,
i = e ? l.tweens.length : 0;
if (r) return this;
for (r = !0; n < i; n++) l.tweens[n].run(1);
return (
e
? (s.notifyWith(t, [l, 1, 0]), s.resolveWith(t, [l, e]))
: s.rejectWith(t, [l, e]),
this
);
},
}),
f = l.props;
for ($(f, l.opts.specialEasing); o < a; o++)
if ((i = K.prefilters[o].call(l, t, f, l.opts)))
return (
bt.isFunction(i.stop) &&
(bt._queueHooks(l.elem, l.opts.queue).stop = bt.proxy(
i.stop,
i
)),
i
);
return (
bt.map(f, X, l),
bt.isFunction(l.opts.start) && l.opts.start.call(t, l),
l
.progress(l.opts.progress)
.done(l.opts.done, l.opts.complete)
.fail(l.opts.fail)
.always(l.opts.always),
bt.fx.timer(
bt.extend(u, { elem: t, anim: l, queue: l.opts.queue })
),
l
);
}
function Z(t) {
var e = t.match(Ot) || [];
return e.join(' ');
}
function Q(t) {
return (t.getAttribute && t.getAttribute('class')) || '';
}
function tt(t, e, i, r) {
var o;
if (Array.isArray(e))
bt.each(e, function(e, o) {
i || Ie.test(t)
? r(t, o)
: tt(
t +
'[' +
('object' ===
('undefined' == typeof o ? 'undefined' : n(o)) &&
null != o
? e
: '') +
']',
o,
i,
r
);
});
else if (i || 'object' !== bt.type(e)) r(t, e);
else for (o in e) tt(t + '[' + o + ']', e[o], i, r);
}
function et(t) {
return function(e, n) {
'string' != typeof e && ((n = e), (e = '*'));
var i,
r = 0,
o = e.toLowerCase().match(Ot) || [];
if (bt.isFunction(n))
for (; (i = o[r++]); )
'+' === i[0]
? ((i = i.slice(1) || '*'), (t[i] = t[i] || []).unshift(n))
: (t[i] = t[i] || []).push(n);
};
}
function nt(t, e, n, i) {
function r(s) {
var u;
return (
(o[s] = !0),
bt.each(t[s] || [], function(t, s) {
var l = s(e, n, i);
return 'string' != typeof l || a || o[l]
? a
? !(u = l)
: void 0
: (e.dataTypes.unshift(l), r(l), !1);
}),
u
);
}
var o = {},
a = t === Ge;
return r(e.dataTypes[0]) || (!o['*'] && r('*'));
}
function it(t, e) {
var n,
i,
r = bt.ajaxSettings.flatOptions || {};
for (n in e)
void 0 !== e[n] && ((r[n] ? t : i || (i = {}))[n] = e[n]);
return i && bt.extend(!0, t, i), t;
}
function rt(t, e, n) {
for (
var i, r, o, a, s = t.contents, u = t.dataTypes;
'*' === u[0];
)
u.shift(),
void 0 === i &&
(i = t.mimeType || e.getResponseHeader('Content-Type'));
if (i)
for (r in s)
if (s[r] && s[r].test(i)) {
u.unshift(r);
break;
}
if (u[0] in n) o = u[0];
else {
for (r in n) {
if (!u[0] || t.converters[r + ' ' + u[0]]) {
o = r;
break;
}
a || (a = r);
}
o = o || a;
}
if (o) return o !== u[0] && u.unshift(o), n[o];
}
function ot(t, e, n, i) {
var r,
o,
a,
s,
u,
l = {},
f = t.dataTypes.slice();
if (f[1])
for (a in t.converters) l[a.toLowerCase()] = t.converters[a];
for (o = f.shift(); o; )
if (
(t.responseFields[o] && (n[t.responseFields[o]] = e),
!u && i && t.dataFilter && (e = t.dataFilter(e, t.dataType)),
(u = o),
(o = f.shift()))
)
if ('*' === o) o = u;
else if ('*' !== u && u !== o) {
if (((a = l[u + ' ' + o] || l['* ' + o]), !a))
for (r in l)
if (
((s = r.split(' ')),
s[1] === o && (a = l[u + ' ' + s[0]] || l['* ' + s[0]]))
) {
a === !0
? (a = l[r])
: l[r] !== !0 && ((o = s[0]), f.unshift(s[1]));
break;
}
if (a !== !0)
if (a && t.throws) e = a(e);
else
try {
e = a(e);
} catch (t) {
return {
state: 'parsererror',
error: a ? t : 'No conversion from ' + u + ' to ' + o,
};
}
}
return { state: 'success', data: e };
}
var at = [],
st = o.document,
ut = Object.getPrototypeOf,
lt = at.slice,
ft = at.concat,
ct = at.push,
ht = at.indexOf,
dt = {},
pt = dt.toString,
yt = dt.hasOwnProperty,
mt = yt.toString,
vt = mt.call(Object),
gt = {},
St = '3.2.1',
bt = function t(e, n) {
return new t.fn.init(e, n);
},
wt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
_t = /^-ms-/,
Pt = /-([a-z])/g,
Ct = function(t, e) {
return e.toUpperCase();
};
(bt.fn = bt.prototype = {
jquery: St,
constructor: bt,
length: 0,
toArray: function() {
return lt.call(this);
},
get: function(t) {
return null == t
? lt.call(this)
: t < 0
? this[t + this.length]
: this[t];
},
pushStack: function(t) {
var e = bt.merge(this.constructor(), t);
return (e.prevObject = this), e;
},
each: function(t) {
return bt.each(this, t);
},
map: function(t) {
return this.pushStack(
bt.map(this, function(e, n) {
return t.call(e, n, e);
})
);
},
slice: function() {
return this.pushStack(lt.apply(this, arguments));
},
first: function() {
return this.eq(0);
},
last: function() {
return this.eq(-1);
},
eq: function(t) {
var e = this.length,
n = +t + (t < 0 ? e : 0);
return this.pushStack(n >= 0 && n < e ? [this[n]] : []);
},
end: function() {
return this.prevObject || this.constructor();
},
push: ct,
sort: at.sort,
splice: at.splice,
}),
(bt.extend = bt.fn.extend = function() {
var t,
e,
i,
r,
o,
a,
s = arguments[0] || {},
u = 1,
l = arguments.length,
f = !1;
for (
'boolean' == typeof s &&
((f = s), (s = arguments[u] || {}), u++),
'object' === ('undefined' == typeof s ? 'undefined' : n(s)) ||
bt.isFunction(s) ||
(s = {}),
u === l && ((s = this), u--);
u < l;
u++
)
if (null != (t = arguments[u]))
for (e in t)
(i = s[e]),
(r = t[e]),
s !== r &&
(f &&
r &&
(bt.isPlainObject(r) || (o = Array.isArray(r)))
? (o
? ((o = !1), (a = i && Array.isArray(i) ? i : []))
: (a = i && bt.isPlainObject(i) ? i : {}),
(s[e] = bt.extend(f, a, r)))
: void 0 !== r && (s[e] = r));
return s;
}),
bt.extend({
expando: 'jQuery' + (St + Math.random()).replace(/\D/g, ''),
isReady: !0,
error: function(t) {
throw new Error(t);
},
noop: function() {},
isFunction: function(t) {
return 'function' === bt.type(t);
},
isWindow: function(t) {
return null != t && t === t.window;
},
isNumeric: function(t) {
var e = bt.type(t);
return (
('number' === e || 'string' === e) &&
!isNaN(t - parseFloat(t))
);
},
isPlainObject: function(t) {
var e, n;
return (
!(!t || '[object Object]' !== pt.call(t)) &&
(!(e = ut(t)) ||
((n = yt.call(e, 'constructor') && e.constructor),
'function' == typeof n && mt.call(n) === vt))
);
},
isEmptyObject: function(t) {
var e;
for (e in t) return !1;
return !0;
},
type: function(t) {
return null == t
? t + ''
: 'object' ===
('undefined' == typeof t ? 'undefined' : n(t)) ||
'function' == typeof t
? dt[pt.call(t)] || 'object'
: 'undefined' == typeof t
? 'undefined'
: n(t);
},
globalEval: function(t) {
s(t);
},
camelCase: function(t) {
return t.replace(_t, 'ms-').replace(Pt, Ct);
},
each: function(t, e) {
var n,
i = 0;
if (u(t))
for (
n = t.length;
i < n && e.call(t[i], i, t[i]) !== !1;
i++
);
else for (i in t) if (e.call(t[i], i, t[i]) === !1) break;
return t;
},
trim: function(t) {
return null == t ? '' : (t + '').replace(wt, '');
},
makeArray: function(t, e) {
var n = e || [];
return (
null != t &&
(u(Object(t))
? bt.merge(n, 'string' == typeof t ? [t] : t)
: ct.call(n, t)),
n
);
},
inArray: function(t, e, n) {
return null == e ? -1 : ht.call(e, t, n);
},
merge: function(t, e) {
for (var n = +e.length, i = 0, r = t.length; i < n; i++)
t[r++] = e[i];
return (t.length = r), t;
},
grep: function(t, e, n) {
for (var i, r = [], o = 0, a = t.length, s = !n; o < a; o++)
(i = !e(t[o], o)), i !== s && r.push(t[o]);
return r;
},
map: function(t, e, n) {
var i,
r,
o = 0,
a = [];
if (u(t))
for (i = t.length; o < i; o++)
(r = e(t[o], o, n)), null != r && a.push(r);
else for (o in t) (r = e(t[o], o, n)), null != r && a.push(r);
return ft.apply([], a);
},
guid: 1,
proxy: function t(e, n) {
var i, r, t;
if (
('string' == typeof n && ((i = e[n]), (n = e), (e = i)),
bt.isFunction(e))
)
return (
(r = lt.call(arguments, 2)),
(t = function() {
return e.apply(n || this, r.concat(lt.call(arguments)));
}),
(t.guid = e.guid = e.guid || bt.guid++),
t
);
},
now: Date.now,
support: gt,
}),
'function' == typeof Symbol &&
(bt.fn[Symbol.iterator] = at[Symbol.iterator]),
bt.each(
'Boolean Number String Function Array Date RegExp Object Error Symbol'.split(
' '
),
function(t, e) {
dt['[object ' + e + ']'] = e.toLowerCase();
}
);
var xt /*!
* Sizzle CSS Selector Engine v2.3.3
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-08-08
*/ = (function(
t
) {
function e(t, e, n, i) {
var r,
o,
a,
s,
u,
l,
f,
h = e && e.ownerDocument,
p = e ? e.nodeType : 9;
if (
((n = n || []),
'string' != typeof t || !t || (1 !== p && 9 !== p && 11 !== p))
)
return n;
if (
!i &&
((e ? e.ownerDocument || e : H) !== I && z(e), (e = e || I), F)
) {
if (11 !== p && (u = vt.exec(t)))
if ((r = u[1])) {
if (9 === p) {
if (!(a = e.getElementById(r))) return n;
if (a.id === r) return n.push(a), n;
} else if (
h &&
(a = h.getElementById(r)) &&
N(e, a) &&
a.id === r
)
return n.push(a), n;
} else {
if (u[2]) return Z.apply(n, e.getElementsByTagName(t)), n;
if (
(r = u[3]) &&
_.getElementsByClassName &&
e.getElementsByClassName
)
return Z.apply(n, e.getElementsByClassName(r)), n;
}
if (_.qsa && !V[t + ' '] && (!O || !O.test(t))) {
if (1 !== p) (h = e), (f = t);
else if ('object' !== e.nodeName.toLowerCase()) {
for (
(s = e.getAttribute('id'))
? (s = s.replace(wt, _t))
: e.setAttribute('id', (s = q)),
l = T(t),
o = l.length;
o--;
)
l[o] = '#' + s + ' ' + d(l[o]);
(f = l.join(',')),
(h = (gt.test(t) && c(e.parentNode)) || e);
}
if (f)
try {
return Z.apply(n, h.querySelectorAll(f)), n;
} catch (t) {
} finally {
s === q && e.removeAttribute('id');
}
}
}
return D(t.replace(st, '$1'), e, n, i);
}
function n() {
function t(n, i) {
return (
e.push(n + ' ') > P.cacheLength && delete t[e.shift()],
(t[n + ' '] = i)
);
}
var e = [];
return t;
}
function i(t) {
return (t[q] = !0), t;
}
function r(t) {
var e = I.createElement('fieldset');
try {
return !!t(e);
} catch (t) {
return !1;
} finally {
e.parentNode && e.parentNode.removeChild(e), (e = null);
}
}
function o(t, e) {
for (var n = t.split('|'), i = n.length; i--; )
P.attrHandle[n[i]] = e;
}
function a(t, e) {
var n = e && t,
i =
n &&
1 === t.nodeType &&
1 === e.nodeType &&
t.sourceIndex - e.sourceIndex;
if (i) return i;
if (n) for (; (n = n.nextSibling); ) if (n === e) return -1;
return t ? 1 : -1;
}
function s(t) {
return function(e) {
var n = e.nodeName.toLowerCase();
return 'input' === n && e.type === t;
};
}
function u(t) {
return function(e) {
var n = e.nodeName.toLowerCase();
return ('input' === n || 'button' === n) && e.type === t;
};
}
function l(t) {
return function(e) {
return 'form' in e
? e.parentNode && e.disabled === !1
? 'label' in e
? 'label' in e.parentNode
? e.parentNode.disabled === t
: e.disabled === t
: e.isDisabled === t ||
(e.isDisabled !== !t && Ct(e) === t)
: e.disabled === t
: 'label' in e && e.disabled === t;
};
}
function f(t) {
return i(function(e) {
return (
(e = +e),
i(function(n, i) {
for (var r, o = t([], n.length, e), a = o.length; a--; )
n[(r = o[a])] && (n[r] = !(i[r] = n[r]));
})
);
});
}
function c(t) {
return t && 'undefined' != typeof t.getElementsByTagName && t;
}
function h() {}
function d(t) {
for (var e = 0, n = t.length, i = ''; e < n; e++) i += t[e].value;
return i;
}
function p(t, e, n) {
var i = e.dir,
r = e.next,
o = r || i,
a = n && 'parentNode' === o,
s = W++;
return e.first
? function(e, n, r) {
for (; (e = e[i]); )
if (1 === e.nodeType || a) return t(e, n, r);
return !1;
}
: function(e, n, u) {
var l,
f,
c,
h = [j, s];
if (u) {
for (; (e = e[i]); )
if ((1 === e.nodeType || a) && t(e, n, u)) return !0;
} else
for (; (e = e[i]); )
if (1 === e.nodeType || a)
if (
((c = e[q] || (e[q] = {})),
(f = c[e.uniqueID] || (c[e.uniqueID] = {})),
r && r === e.nodeName.toLowerCase())
)
e = e[i] || e;
else {
if ((l = f[o]) && l[0] === j && l[1] === s)
return (h[2] = l[2]);
if (((f[o] = h), (h[2] = t(e, n, u)))) return !0;
}
return !1;
};
}
function y(t) {
return t.length > 1
? function(e, n, i) {
for (var r = t.length; r--; ) if (!t[r](e, n, i)) return !1;
return !0;
}
: t[0];
}
function m(t, n, i) {
for (var r = 0, o = n.length; r < o; r++) e(t, n[r], i);
return i;
}
function v(t, e, n, i, r) {
for (
var o, a = [], s = 0, u = t.length, l = null != e;
s < u;
s++
)
(o = t[s]) &&
((n && !n(o, i, r)) || (a.push(o), l && e.push(s)));
return a;
}
function g(t, e, n, r, o, a) {
return (
r && !r[q] && (r = g(r)),
o && !o[q] && (o = g(o, a)),
i(function(i, a, s, u) {
var l,
f,
c,
h = [],
d = [],
p = a.length,
y = i || m(e || '*', s.nodeType ? [s] : s, []),
g = !t || (!i && e) ? y : v(y, h, t, s, u),
S = n ? (o || (i ? t : p || r) ? [] : a) : g;
if ((n && n(g, S, s, u), r))
for (l = v(S, d), r(l, [], s, u), f = l.length; f--; )
(c = l[f]) && (S[d[f]] = !(g[d[f]] = c));
if (i) {
if (o || t) {
if (o) {
for (l = [], f = S.length; f--; )
(c = S[f]) && l.push((g[f] = c));
o(null, (S = []), l, u);
}
for (f = S.length; f--; )
(c = S[f]) &&
(l = o ? tt(i, c) : h[f]) > -1 &&
(i[l] = !(a[l] = c));
}
} else (S = v(S === a ? S.splice(p, S.length) : S)), o ? o(null, a, S, u) : Z.apply(a, S);
})
);
}
function S(t) {
for (
var e,
n,
i,
r = t.length,
o = P.relative[t[0].type],
a = o || P.relative[' '],
s = o ? 1 : 0,
u = p(
function(t) {
return t === e;
},
a,
!0
),
l = p(
function(t) {
return tt(e, t) > -1;
},
a,
!0
),
f = [
function(t, n, i) {
var r =
(!o && (i || n !== M)) ||
((e = n).nodeType ? u(t, n, i) : l(t, n, i));
return (e = null), r;
},
];
s < r;
s++
)
if ((n = P.relative[t[s].type])) f = [p(y(f), n)];
else {
if (
((n = P.filter[t[s].type].apply(null, t[s].matches)), n[q])
) {
for (i = ++s; i < r && !P.relative[t[i].type]; i++);
return g(
s > 1 && y(f),
s > 1 &&
d(
t
.slice(0, s - 1)
.concat({ value: ' ' === t[s - 2].type ? '*' : '' })
).replace(st, '$1'),
n,
s < i && S(t.slice(s, i)),
i < r && S((t = t.slice(i))),
i < r && d(t)
);
}
f.push(n);
}
return y(f);
}
function b(t, n) {
var r = n.length > 0,
o = t.length > 0,
a = function(i, a, s, u, l) {
var f,
c,
h,
d = 0,
p = '0',
y = i && [],
m = [],
g = M,
S = i || (o && P.find.TAG('*', l)),
b = (j += null == g ? 1 : Math.random() || 0.1),
w = S.length;
for (
l && (M = a === I || a || l);
p !== w && null != (f = S[p]);
p++
) {
if (o && f) {
for (
c = 0, a || f.ownerDocument === I || (z(f), (s = !F));
(h = t[c++]);
)
if (h(f, a || I, s)) {
u.push(f);
break;
}
l && (j = b);
}
r && ((f = !h && f) && d--, i && y.push(f));
}
if (((d += p), r && p !== d)) {
for (c = 0; (h = n[c++]); ) h(y, m, a, s);
if (i) {
if (d > 0)
for (; p--; ) y[p] || m[p] || (m[p] = $.call(u));
m = v(m);
}
Z.apply(u, m),
l &&
!i &&
m.length > 0 &&
d + n.length > 1 &&
e.uniqueSort(u);
}
return l && ((j = b), (M = g)), y;
};
return r ? i(a) : a;
}
var w,
_,
P,
C,
x,
T,
k,
D,
M,
R,
E,
z,
I,
A,
F,
O,
B,
L,
N,
q = 'sizzle' + 1 * new Date(),
H = t.document,
j = 0,
W = 0,
U = n(),
G = n(),
V = n(),
Y = function(t, e) {
return t === e && (E = !0), 0;
},
X = {}.hasOwnProperty,
J = [],
$ = J.pop,
K = J.push,
Z = J.push,
Q = J.slice,
tt = function(t, e) {
for (var n = 0, i = t.length; n < i; n++)
if (t[n] === e) return n;
return -1;
},
et =
'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped',
nt = '[\\x20\\t\\r\\n\\f]',
it = '(?:\\\\.|[\\w-]|[^\0-\\xa0])+',
rt =
'\\[' +
nt +
'*(' +
it +
')(?:' +
nt +
'*([*^$|!~]?=)' +
nt +
'*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' +
it +
'))|)' +
nt +
'*\\]',
ot =
':(' +
it +
')(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|' +
rt +
')*)|.*)\\)|)',
at = new RegExp(nt + '+', 'g'),
st = new RegExp(
'^' + nt + '+|((?:^|[^\\\\])(?:\\\\.)*)' + nt + '+$',
'g'
),
ut = new RegExp('^' + nt + '*,' + nt + '*'),
lt = new RegExp('^' + nt + '*([>+~]|' + nt + ')' + nt + '*'),
ft = new RegExp('=' + nt + '*([^\\]\'"]*?)' + nt + '*\\]', 'g'),
ct = new RegExp(ot),
ht = new RegExp('^' + it + '$'),
dt = {
ID: new RegExp('^#(' + it + ')'),
CLASS: new RegExp('^\\.(' + it + ')'),
TAG: new RegExp('^(' + it + '|[*])'),
ATTR: new RegExp('^' + rt),
PSEUDO: new RegExp('^' + ot),
CHILD: new RegExp(
'^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' +
nt +
'*(even|odd|(([+-]|)(\\d*)n|)' +
nt +
'*(?:([+-]|)' +
nt +
'*(\\d+)|))' +
nt +
'*\\)|)',
'i'
),
bool: new RegExp('^(?:' + et + ')$', 'i'),
needsContext: new RegExp(
'^' +
nt +
'*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' +
nt +
'*((?:-\\d)?\\d*)' +
nt +
'*\\)|)(?=[^-]|$)',
'i'
),
},
pt = /^(?:input|select|textarea|button)$/i,
yt = /^h\d$/i,
mt = /^[^{]+\{\s*\[native \w/,
vt = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
gt = /[+~]/,
St = new RegExp(
'\\\\([\\da-f]{1,6}' + nt + '?|(' + nt + ')|.)',
'ig'
),
bt = function(t, e, n) {
var i = '0x' + e - 65536;
return i !== i || n
? e
: i < 0
? String.fromCharCode(i + 65536)
: String.fromCharCode(
(i >> 10) | 55296,
(1023 & i) | 56320
);
},
wt = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
_t = function(t, e) {
return e
? '\0' === t
? '�'
: t.slice(0, -1) +
'\\' +
t.charCodeAt(t.length - 1).toString(16) +
' '
: '\\' + t;
},
Pt = function() {
z();
},
Ct = p(
function(t) {
return t.disabled === !0 && ('form' in t || 'label' in t);
},
{ dir: 'parentNode', next: 'legend' }
);
try {
Z.apply((J = Q.call(H.childNodes)), H.childNodes),
J[H.childNodes.length].nodeType;
} catch (t) {
Z = {
apply: J.length
? function(t, e) {
K.apply(t, Q.call(e));
}
: function(t, e) {
for (var n = t.length, i = 0; (t[n++] = e[i++]); );
t.length = n - 1;
},
};
}
(_ = e.support = {}),
(x = e.isXML = function(t) {
var e = t && (t.ownerDocument || t).documentElement;
return !!e && 'HTML' !== e.nodeName;
}),
(z = e.setDocument = function(t) {
var e,
n,
i = t ? t.ownerDocument || t : H;
return i !== I && 9 === i.nodeType && i.documentElement
? ((I = i),
(A = I.documentElement),
(F = !x(I)),
H !== I &&
(n = I.defaultView) &&
n.top !== n &&
(n.addEventListener
? n.addEventListener('unload', Pt, !1)
: n.attachEvent && n.attachEvent('onunload', Pt)),
(_.attributes = r(function(t) {
return (t.className = 'i'), !t.getAttribute('className');
})),
(_.getElementsByTagName = r(function(t) {
return (
t.appendChild(I.createComment('')),
!t.getElementsByTagName('*').length
);
})),
(_.getElementsByClassName = mt.test(
I.getElementsByClassName
)),
(_.getById = r(function(t) {
return (
(A.appendChild(t).id = q),
!I.getElementsByName || !I.getElementsByName(q).length
);
})),
_.getById
? ((P.filter.ID = function(t) {
var e = t.replace(St, bt);
return function(t) {
return t.getAttribute('id') === e;
};
}),
(P.find.ID = function(t, e) {
if ('undefined' != typeof e.getElementById && F) {
var n = e.getElementById(t);
return n ? [n] : [];
}
}))
: ((P.filter.ID = function(t) {
var e = t.replace(St, bt);
return function(t) {
var n =
'undefined' != typeof t.getAttributeNode &&
t.getAttributeNode('id');
return n && n.value === e;
};
}),
(P.find.ID = function(t, e) {
if ('undefined' != typeof e.getElementById && F) {
var n,
i,
r,
o = e.getElementById(t);
if (o) {
if (
((n = o.getAttributeNode('id')),
n && n.value === t)
)
return [o];
for (
r = e.getElementsByName(t), i = 0;
(o = r[i++]);
)
if (
((n = o.getAttributeNode('id')),
n && n.value === t)
)
return [o];
}
return [];
}
})),
(P.find.TAG = _.getElementsByTagName
? function(t, e) {
return 'undefined' != typeof e.getElementsByTagName
? e.getElementsByTagName(t)
: _.qsa
? e.querySelectorAll(t)
: void 0;
}
: function(t, e) {
var n,
i = [],
r = 0,
o = e.getElementsByTagName(t);
if ('*' === t) {
for (; (n = o[r++]); )
1 === n.nodeType && i.push(n);
return i;
}
return o;
}),
(P.find.CLASS =
_.getElementsByClassName &&
function(t, e) {
if ('undefined' != typeof e.getElementsByClassName && F)
return e.getElementsByClassName(t);
}),
(B = []),
(O = []),
(_.qsa = mt.test(I.querySelectorAll)) &&
(r(function(t) {
(A.appendChild(t).innerHTML =
""),
t.querySelectorAll("[msallowcapture^='']").length &&
O.push('[*^$]=' + nt + '*(?:\'\'|"")'),
t.querySelectorAll('[selected]').length ||
O.push('\\[' + nt + '*(?:value|' + et + ')'),
t.querySelectorAll('[id~=' + q + '-]').length ||
O.push('~='),
t.querySelectorAll(':checked').length ||
O.push(':checked'),
t.querySelectorAll('a#' + q + '+*').length ||
O.push('.#.+[+~]');
}),
r(function(t) {
t.innerHTML =
"";
var e = I.createElement('input');
e.setAttribute('type', 'hidden'),
t.appendChild(e).setAttribute('name', 'D'),
t.querySelectorAll('[name=d]').length &&
O.push('name' + nt + '*[*^$|!~]?='),
2 !== t.querySelectorAll(':enabled').length &&
O.push(':enabled', ':disabled'),
(A.appendChild(t).disabled = !0),
2 !== t.querySelectorAll(':disabled').length &&
O.push(':enabled', ':disabled'),
t.querySelectorAll('*,:x'),
O.push(',.*:');
})),
(_.matchesSelector = mt.test(
(L =
A.matches ||
A.webkitMatchesSelector ||
A.mozMatchesSelector ||
A.oMatchesSelector ||
A.msMatchesSelector)
)) &&
r(function(t) {
(_.disconnectedMatch = L.call(t, '*')),
L.call(t, "[s!='']:x"),
B.push('!=', ot);
}),
(O = O.length && new RegExp(O.join('|'))),
(B = B.length && new RegExp(B.join('|'))),
(e = mt.test(A.compareDocumentPosition)),
(N =
e || mt.test(A.contains)
? function(t, e) {
var n = 9 === t.nodeType ? t.documentElement : t,
i = e && e.parentNode;
return (
t === i ||
!(
!i ||
1 !== i.nodeType ||
!(n.contains
? n.contains(i)
: t.compareDocumentPosition &&
16 & t.compareDocumentPosition(i))
)
);
}
: function(t, e) {
if (e)
for (; (e = e.parentNode); )
if (e === t) return !0;
return !1;
}),
(Y = e
? function(t, e) {
if (t === e) return (E = !0), 0;
var n =
!t.compareDocumentPosition -
!e.compareDocumentPosition;
return n
? n
: ((n =
(t.ownerDocument || t) ===
(e.ownerDocument || e)
? t.compareDocumentPosition(e)
: 1),
1 & n ||
(!_.sortDetached &&
e.compareDocumentPosition(t) === n)
? t === I || (t.ownerDocument === H && N(H, t))
? -1
: e === I ||
(e.ownerDocument === H && N(H, e))
? 1
: R
? tt(R, t) - tt(R, e)
: 0
: 4 & n
? -1
: 1);
}
: function(t, e) {
if (t === e) return (E = !0), 0;
var n,
i = 0,
r = t.parentNode,
o = e.parentNode,
s = [t],
u = [e];
if (!r || !o)
return t === I
? -1
: e === I
? 1
: r
? -1
: o
? 1
: R
? tt(R, t) - tt(R, e)
: 0;
if (r === o) return a(t, e);
for (n = t; (n = n.parentNode); ) s.unshift(n);
for (n = e; (n = n.parentNode); ) u.unshift(n);
for (; s[i] === u[i]; ) i++;
return i
? a(s[i], u[i])
: s[i] === H
? -1
: u[i] === H
? 1
: 0;
}),
I)
: I;
}),
(e.matches = function(t, n) {
return e(t, null, null, n);
}),
(e.matchesSelector = function(t, n) {
if (
((t.ownerDocument || t) !== I && z(t),
(n = n.replace(ft, "='$1']")),
_.matchesSelector &&
F &&
!V[n + ' '] &&
(!B || !B.test(n)) &&
(!O || !O.test(n)))
)
try {
var i = L.call(t, n);
if (
i ||
_.disconnectedMatch ||
(t.document && 11 !== t.document.nodeType)
)
return i;
} catch (t) {}
return e(n, I, null, [t]).length > 0;
}),
(e.contains = function(t, e) {
return (t.ownerDocument || t) !== I && z(t), N(t, e);
}),
(e.attr = function(t, e) {
(t.ownerDocument || t) !== I && z(t);
var n = P.attrHandle[e.toLowerCase()],
i =
n && X.call(P.attrHandle, e.toLowerCase())
? n(t, e, !F)
: void 0;
return void 0 !== i
? i
: _.attributes || !F
? t.getAttribute(e)
: (i = t.getAttributeNode(e)) && i.specified
? i.value
: null;
}),
(e.escape = function(t) {
return (t + '').replace(wt, _t);
}),
(e.error = function(t) {
throw new Error('Syntax error, unrecognized expression: ' + t);
}),
(e.uniqueSort = function(t) {
var e,
n = [],
i = 0,
r = 0;
if (
((E = !_.detectDuplicates),
(R = !_.sortStable && t.slice(0)),
t.sort(Y),
E)
) {
for (; (e = t[r++]); ) e === t[r] && (i = n.push(r));
for (; i--; ) t.splice(n[i], 1);
}
return (R = null), t;
}),
(C = e.getText = function(t) {
var e,
n = '',
i = 0,
r = t.nodeType;
if (r) {
if (1 === r || 9 === r || 11 === r) {
if ('string' == typeof t.textContent) return t.textContent;
for (t = t.firstChild; t; t = t.nextSibling) n += C(t);
} else if (3 === r || 4 === r) return t.nodeValue;
} else for (; (e = t[i++]); ) n += C(e);
return n;
}),
(P = e.selectors = {
cacheLength: 50,
createPseudo: i,
match: dt,
attrHandle: {},
find: {},
relative: {
'>': { dir: 'parentNode', first: !0 },
' ': { dir: 'parentNode' },
'+': { dir: 'previousSibling', first: !0 },
'~': { dir: 'previousSibling' },
},
preFilter: {
ATTR: function(t) {
return (
(t[1] = t[1].replace(St, bt)),
(t[3] = (t[3] || t[4] || t[5] || '').replace(St, bt)),
'~=' === t[2] && (t[3] = ' ' + t[3] + ' '),
t.slice(0, 4)
);
},
CHILD: function(t) {
return (
(t[1] = t[1].toLowerCase()),
'nth' === t[1].slice(0, 3)
? (t[3] || e.error(t[0]),
(t[4] = +(t[4]
? t[5] + (t[6] || 1)
: 2 * ('even' === t[3] || 'odd' === t[3]))),
(t[5] = +(t[7] + t[8] || 'odd' === t[3])))
: t[3] && e.error(t[0]),
t
);
},
PSEUDO: function(t) {
var e,
n = !t[6] && t[2];
return dt.CHILD.test(t[0])
? null
: (t[3]
? (t[2] = t[4] || t[5] || '')
: n &&
ct.test(n) &&
(e = T(n, !0)) &&
(e = n.indexOf(')', n.length - e) - n.length) &&
((t[0] = t[0].slice(0, e)), (t[2] = n.slice(0, e))),
t.slice(0, 3));
},
},
filter: {
TAG: function(t) {
var e = t.replace(St, bt).toLowerCase();
return '*' === t
? function() {
return !0;
}
: function(t) {
return t.nodeName && t.nodeName.toLowerCase() === e;
};
},
CLASS: function(t) {
var e = U[t + ' '];
return (
e ||
((e = new RegExp(
'(^|' + nt + ')' + t + '(' + nt + '|$)'
)) &&
U(t, function(t) {
return e.test(
('string' == typeof t.className && t.className) ||
('undefined' != typeof t.getAttribute &&
t.getAttribute('class')) ||
''
);
}))
);
},
ATTR: function(t, n, i) {
return function(r) {
var o = e.attr(r, t);
return null == o
? '!=' === n
: !n ||
((o += ''),
'=' === n
? o === i
: '!=' === n
? o !== i
: '^=' === n
? i && 0 === o.indexOf(i)
: '*=' === n
? i && o.indexOf(i) > -1
: '$=' === n
? i && o.slice(-i.length) === i
: '~=' === n
? (
' ' +
o.replace(at, ' ') +
' '
).indexOf(i) > -1
: '|=' === n &&
(o === i ||
o.slice(0, i.length + 1) ===
i + '-'));
};
},
CHILD: function(t, e, n, i, r) {
var o = 'nth' !== t.slice(0, 3),
a = 'last' !== t.slice(-4),
s = 'of-type' === e;
return 1 === i && 0 === r
? function(t) {
return !!t.parentNode;
}
: function(e, n, u) {
var l,
f,
c,
h,
d,
p,
y = o !== a ? 'nextSibling' : 'previousSibling',
m = e.parentNode,
v = s && e.nodeName.toLowerCase(),
g = !u && !s,
S = !1;
if (m) {
if (o) {
for (; y; ) {
for (h = e; (h = h[y]); )
if (
s
? h.nodeName.toLowerCase() === v
: 1 === h.nodeType
)
return !1;
p = y = 'only' === t && !p && 'nextSibling';
}
return !0;
}
if (
((p = [a ? m.firstChild : m.lastChild]), a && g)
) {
for (
h = m,
c = h[q] || (h[q] = {}),
f = c[h.uniqueID] || (c[h.uniqueID] = {}),
l = f[t] || [],
d = l[0] === j && l[1],
S = d && l[2],
h = d && m.childNodes[d];
(h =
(++d && h && h[y]) || (S = d = 0) || p.pop());
)
if (1 === h.nodeType && ++S && h === e) {
f[t] = [j, d, S];
break;
}
} else if (
(g &&
((h = e),
(c = h[q] || (h[q] = {})),
(f = c[h.uniqueID] || (c[h.uniqueID] = {})),
(l = f[t] || []),
(d = l[0] === j && l[1]),
(S = d)),
S === !1)
)
for (
;
(h =
(++d && h && h[y]) ||
(S = d = 0) ||
p.pop()) &&
((s
? h.nodeName.toLowerCase() !== v
: 1 !== h.nodeType) ||
!++S ||
(g &&
((c = h[q] || (h[q] = {})),
(f = c[h.uniqueID] || (c[h.uniqueID] = {})),
(f[t] = [j, S])),
h !== e));
);
return (
(S -= r), S === i || (S % i === 0 && S / i >= 0)
);
}
};
},
PSEUDO: function(t, n) {
var r,
o =
P.pseudos[t] ||
P.setFilters[t.toLowerCase()] ||
e.error('unsupported pseudo: ' + t);
return o[q]
? o(n)
: o.length > 1
? ((r = [t, t, '', n]),
P.setFilters.hasOwnProperty(t.toLowerCase())
? i(function(t, e) {
for (var i, r = o(t, n), a = r.length; a--; )
(i = tt(t, r[a])), (t[i] = !(e[i] = r[a]));
})
: function(t) {
return o(t, 0, r);
})
: o;
},
},
pseudos: {
not: i(function(t) {
var e = [],
n = [],
r = k(t.replace(st, '$1'));
return r[q]
? i(function(t, e, n, i) {
for (
var o, a = r(t, null, i, []), s = t.length;
s--;
)
(o = a[s]) && (t[s] = !(e[s] = o));
})
: function(t, i, o) {
return (
(e[0] = t),
r(e, null, o, n),
(e[0] = null),
!n.pop()
);
};
}),
has: i(function(t) {
return function(n) {
return e(t, n).length > 0;
};
}),
contains: i(function(t) {
return (
(t = t.replace(St, bt)),
function(e) {
return (
(e.textContent || e.innerText || C(e)).indexOf(t) > -1
);
}
);
}),
lang: i(function(t) {
return (
ht.test(t || '') || e.error('unsupported lang: ' + t),
(t = t.replace(St, bt).toLowerCase()),
function(e) {
var n;
do
if (
(n = F
? e.lang
: e.getAttribute('xml:lang') ||
e.getAttribute('lang'))
)
return (
(n = n.toLowerCase()),
n === t || 0 === n.indexOf(t + '-')
);
while ((e = e.parentNode) && 1 === e.nodeType);
return !1;
}
);
}),
target: function(e) {
var n = t.location && t.location.hash;
return n && n.slice(1) === e.id;
},
root: function(t) {
return t === A;
},
focus: function(t) {
return (
t === I.activeElement &&
(!I.hasFocus || I.hasFocus()) &&
!!(t.type || t.href || ~t.tabIndex)
);
},
enabled: l(!1),
disabled: l(!0),
checked: function(t) {
var e = t.nodeName.toLowerCase();
return (
('input' === e && !!t.checked) ||
('option' === e && !!t.selected)
);
},
selected: function(t) {
return (
t.parentNode && t.parentNode.selectedIndex,
t.selected === !0
);
},
empty: function(t) {
for (t = t.firstChild; t; t = t.nextSibling)
if (t.nodeType < 6) return !1;
return !0;
},
parent: function(t) {
return !P.pseudos.empty(t);
},
header: function(t) {
return yt.test(t.nodeName);
},
input: function(t) {
return pt.test(t.nodeName);
},
button: function(t) {
var e = t.nodeName.toLowerCase();
return (
('input' === e && 'button' === t.type) || 'button' === e
);
},
text: function(t) {
var e;
return (
'input' === t.nodeName.toLowerCase() &&
'text' === t.type &&
(null == (e = t.getAttribute('type')) ||
'text' === e.toLowerCase())
);
},
first: f(function() {
return [0];
}),
last: f(function(t, e) {
return [e - 1];
}),
eq: f(function(t, e, n) {
return [n < 0 ? n + e : n];
}),
even: f(function(t, e) {
for (var n = 0; n < e; n += 2) t.push(n);
return t;
}),
odd: f(function(t, e) {
for (var n = 1; n < e; n += 2) t.push(n);
return t;
}),
lt: f(function(t, e, n) {
for (var i = n < 0 ? n + e : n; --i >= 0; ) t.push(i);
return t;
}),
gt: f(function(t, e, n) {
for (var i = n < 0 ? n + e : n; ++i < e; ) t.push(i);
return t;
}),
},
}),
(P.pseudos.nth = P.pseudos.eq);
for (w in {
radio: !0,
checkbox: !0,
file: !0,
password: !0,
image: !0,
})
P.pseudos[w] = s(w);
for (w in { submit: !0, reset: !0 }) P.pseudos[w] = u(w);
return (
(h.prototype = P.filters = P.pseudos),
(P.setFilters = new h()),
(T = e.tokenize = function(t, n) {
var i,
r,
o,
a,
s,
u,
l,
f = G[t + ' '];
if (f) return n ? 0 : f.slice(0);
for (s = t, u = [], l = P.preFilter; s; ) {
(i && !(r = ut.exec(s))) ||
(r && (s = s.slice(r[0].length) || s), u.push((o = []))),
(i = !1),
(r = lt.exec(s)) &&
((i = r.shift()),
o.push({ value: i, type: r[0].replace(st, ' ') }),
(s = s.slice(i.length)));
for (a in P.filter)
!(r = dt[a].exec(s)) ||
(l[a] && !(r = l[a](r))) ||
((i = r.shift()),
o.push({ value: i, type: a, matches: r }),
(s = s.slice(i.length)));
if (!i) break;
}
return n ? s.length : s ? e.error(t) : G(t, u).slice(0);
}),
(k = e.compile = function(t, e) {
var n,
i = [],
r = [],
o = V[t + ' '];
if (!o) {
for (e || (e = T(t)), n = e.length; n--; )
(o = S(e[n])), o[q] ? i.push(o) : r.push(o);
(o = V(t, b(r, i))), (o.selector = t);
}
return o;
}),
(D = e.select = function(t, e, n, i) {
var r,
o,
a,
s,
u,
l = 'function' == typeof t && t,
f = !i && T((t = l.selector || t));
if (((n = n || []), 1 === f.length)) {
if (
((o = f[0] = f[0].slice(0)),
o.length > 2 &&
'ID' === (a = o[0]).type &&
9 === e.nodeType &&
F &&
P.relative[o[1].type])
) {
if (
((e = (P.find.ID(a.matches[0].replace(St, bt), e) ||
[])[0]),
!e)
)
return n;
l && (e = e.parentNode),
(t = t.slice(o.shift().value.length));
}
for (
r = dt.needsContext.test(t) ? 0 : o.length;
r-- && ((a = o[r]), !P.relative[(s = a.type)]);
)
if (
(u = P.find[s]) &&
(i = u(
a.matches[0].replace(St, bt),
(gt.test(o[0].type) && c(e.parentNode)) || e
))
) {
if ((o.splice(r, 1), (t = i.length && d(o)), !t))
return Z.apply(n, i), n;
break;
}
}
return (
(l || k(t, f))(
i,
e,
!F,
n,
!e || (gt.test(t) && c(e.parentNode)) || e
),
n
);
}),
(_.sortStable =
q
.split('')
.sort(Y)
.join('') === q),
(_.detectDuplicates = !!E),
z(),
(_.sortDetached = r(function(t) {
return (
1 & t.compareDocumentPosition(I.createElement('fieldset'))
);
})),
r(function(t) {
return (
(t.innerHTML = ""),
'#' === t.firstChild.getAttribute('href')
);
}) ||
o('type|href|height|width', function(t, e, n) {
if (!n)
return t.getAttribute(
e,
'type' === e.toLowerCase() ? 1 : 2
);
}),
(_.attributes &&
r(function(t) {
return (
(t.innerHTML = ''),
t.firstChild.setAttribute('value', ''),
'' === t.firstChild.getAttribute('value')
);
})) ||
o('value', function(t, e, n) {
if (!n && 'input' === t.nodeName.toLowerCase())
return t.defaultValue;
}),
r(function(t) {
return null == t.getAttribute('disabled');
}) ||
o(et, function(t, e, n) {
var i;
if (!n)
return t[e] === !0
? e.toLowerCase()
: (i = t.getAttributeNode(e)) && i.specified
? i.value
: null;
}),
e
);
})(o);
(bt.find = xt),
(bt.expr = xt.selectors),
(bt.expr[':'] = bt.expr.pseudos),
(bt.uniqueSort = bt.unique = xt.uniqueSort),
(bt.text = xt.getText),
(bt.isXMLDoc = xt.isXML),
(bt.contains = xt.contains),
(bt.escapeSelector = xt.escape);
var Tt = function(t, e, n) {
for (
var i = [], r = void 0 !== n;
(t = t[e]) && 9 !== t.nodeType;
)
if (1 === t.nodeType) {
if (r && bt(t).is(n)) break;
i.push(t);
}
return i;
},
kt = function(t, e) {
for (var n = []; t; t = t.nextSibling)
1 === t.nodeType && t !== e && n.push(t);
return n;
},
Dt = bt.expr.match.needsContext,
Mt = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,
Rt = /^.[^:#\[\.,]*$/;
(bt.filter = function(t, e, n) {
var i = e[0];
return (
n && (t = ':not(' + t + ')'),
1 === e.length && 1 === i.nodeType
? bt.find.matchesSelector(i, t)
? [i]
: []
: bt.find.matches(
t,
bt.grep(e, function(t) {
return 1 === t.nodeType;
})
)
);
}),
bt.fn.extend({
find: function(t) {
var e,
n,
i = this.length,
r = this;
if ('string' != typeof t)
return this.pushStack(
bt(t).filter(function() {
for (e = 0; e < i; e++)
if (bt.contains(r[e], this)) return !0;
})
);
for (n = this.pushStack([]), e = 0; e < i; e++)
bt.find(t, r[e], n);
return i > 1 ? bt.uniqueSort(n) : n;
},
filter: function(t) {
return this.pushStack(f(this, t || [], !1));
},
not: function(t) {
return this.pushStack(f(this, t || [], !0));
},
is: function(t) {
return !!f(
this,
'string' == typeof t && Dt.test(t) ? bt(t) : t || [],
!1
).length;
},
});
var Et,
zt = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
It = (bt.fn.init = function(t, e, n) {
var i, r;
if (!t) return this;
if (((n = n || Et), 'string' == typeof t)) {
if (
((i =
'<' === t[0] && '>' === t[t.length - 1] && t.length >= 3
? [null, t, null]
: zt.exec(t)),
!i || (!i[1] && e))
)
return !e || e.jquery
? (e || n).find(t)
: this.constructor(e).find(t);
if (i[1]) {
if (
((e = e instanceof bt ? e[0] : e),
bt.merge(
this,
bt.parseHTML(
i[1],
e && e.nodeType ? e.ownerDocument || e : st,
!0
)
),
Mt.test(i[1]) && bt.isPlainObject(e))
)
for (i in e)
bt.isFunction(this[i])
? this[i](e[i])
: this.attr(i, e[i]);
return this;
}
return (
(r = st.getElementById(i[2])),
r && ((this[0] = r), (this.length = 1)),
this
);
}
return t.nodeType
? ((this[0] = t), (this.length = 1), this)
: bt.isFunction(t)
? void 0 !== n.ready
? n.ready(t)
: t(bt)
: bt.makeArray(t, this);
});
(It.prototype = bt.fn), (Et = bt(st));
var At = /^(?:parents|prev(?:Until|All))/,
Ft = { children: !0, contents: !0, next: !0, prev: !0 };
bt.fn.extend({
has: function(t) {
var e = bt(t, this),
n = e.length;
return this.filter(function() {
for (var t = 0; t < n; t++)
if (bt.contains(this, e[t])) return !0;
});
},
closest: function(t, e) {
var n,
i = 0,
r = this.length,
o = [],
a = 'string' != typeof t && bt(t);
if (!Dt.test(t))
for (; i < r; i++)
for (n = this[i]; n && n !== e; n = n.parentNode)
if (
n.nodeType < 11 &&
(a
? a.index(n) > -1
: 1 === n.nodeType && bt.find.matchesSelector(n, t))
) {
o.push(n);
break;
}
return this.pushStack(o.length > 1 ? bt.uniqueSort(o) : o);
},
index: function(t) {
return t
? 'string' == typeof t
? ht.call(bt(t), this[0])
: ht.call(this, t.jquery ? t[0] : t)
: this[0] && this[0].parentNode
? this.first().prevAll().length
: -1;
},
add: function(t, e) {
return this.pushStack(
bt.uniqueSort(bt.merge(this.get(), bt(t, e)))
);
},
addBack: function(t) {
return this.add(
null == t ? this.prevObject : this.prevObject.filter(t)
);
},
}),
bt.each(
{
parent: function t(e) {
var t = e.parentNode;
return t && 11 !== t.nodeType ? t : null;
},
parents: function(t) {
return Tt(t, 'parentNode');
},
parentsUntil: function(t, e, n) {
return Tt(t, 'parentNode', n);
},
next: function(t) {
return c(t, 'nextSibling');
},
prev: function(t) {
return c(t, 'previousSibling');
},
nextAll: function(t) {
return Tt(t, 'nextSibling');
},
prevAll: function(t) {
return Tt(t, 'previousSibling');
},
nextUntil: function(t, e, n) {
return Tt(t, 'nextSibling', n);
},
prevUntil: function(t, e, n) {
return Tt(t, 'previousSibling', n);
},
siblings: function(t) {
return kt((t.parentNode || {}).firstChild, t);
},
children: function(t) {
return kt(t.firstChild);
},
contents: function(t) {
return l(t, 'iframe')
? t.contentDocument
: (l(t, 'template') && (t = t.content || t),
bt.merge([], t.childNodes));
},
},
function(t, e) {
bt.fn[t] = function(n, i) {
var r = bt.map(this, e, n);
return (
'Until' !== t.slice(-5) && (i = n),
i && 'string' == typeof i && (r = bt.filter(i, r)),
this.length > 1 &&
(Ft[t] || bt.uniqueSort(r), At.test(t) && r.reverse()),
this.pushStack(r)
);
};
}
);
var Ot = /[^\x20\t\r\n\f]+/g;
(bt.Callbacks = function(t) {
t = 'string' == typeof t ? h(t) : bt.extend({}, t);
var e,
n,
i,
r,
o = [],
a = [],
s = -1,
u = function() {
for (r = r || t.once, i = e = !0; a.length; s = -1)
for (n = a.shift(); ++s < o.length; )
o[s].apply(n[0], n[1]) === !1 &&
t.stopOnFalse &&
((s = o.length), (n = !1));
t.memory || (n = !1), (e = !1), r && (o = n ? [] : '');
},
l = {
add: function() {
return (
o &&
(n && !e && ((s = o.length - 1), a.push(n)),
(function e(n) {
bt.each(n, function(n, i) {
bt.isFunction(i)
? (t.unique && l.has(i)) || o.push(i)
: i && i.length && 'string' !== bt.type(i) && e(i);
});
})(arguments),
n && !e && u()),
this
);
},
remove: function() {
return (
bt.each(arguments, function(t, e) {
for (var n; (n = bt.inArray(e, o, n)) > -1; )
o.splice(n, 1), n <= s && s--;
}),
this
);
},
has: function(t) {
return t ? bt.inArray(t, o) > -1 : o.length > 0;
},
empty: function() {
return o && (o = []), this;
},
disable: function() {
return (r = a = []), (o = n = ''), this;
},
disabled: function() {
return !o;
},
lock: function() {
return (r = a = []), n || e || (o = n = ''), this;
},
locked: function() {
return !!r;
},
fireWith: function(t, n) {
return (
r ||
((n = n || []),
(n = [t, n.slice ? n.slice() : n]),
a.push(n),
e || u()),
this
);
},
fire: function() {
return l.fireWith(this, arguments), this;
},
fired: function() {
return !!i;
},
};
return l;
}),
bt.extend({
Deferred: function(t) {
var e = [
[
'notify',
'progress',
bt.Callbacks('memory'),
bt.Callbacks('memory'),
2,
],
[
'resolve',
'done',
bt.Callbacks('once memory'),
bt.Callbacks('once memory'),
0,
'resolved',
],
[
'reject',
'fail',
bt.Callbacks('once memory'),
bt.Callbacks('once memory'),
1,
'rejected',
],
],
i = 'pending',
r = {
state: function() {
return i;
},
always: function() {
return a.done(arguments).fail(arguments), this;
},
catch: function(t) {
return r.then(null, t);
},
pipe: function() {
var t = arguments;
return bt
.Deferred(function(n) {
bt.each(e, function(e, i) {
var r = bt.isFunction(t[i[4]]) && t[i[4]];
a[i[1]](function() {
var t = r && r.apply(this, arguments);
t && bt.isFunction(t.promise)
? t
.promise()
.progress(n.notify)
.done(n.resolve)
.fail(n.reject)
: n[i[0] + 'With'](this, r ? [t] : arguments);
});
}),
(t = null);
})
.promise();
},
then: function(t, i, r) {
function a(t, e, i, r) {
return function() {
var u = this,
l = arguments,
f = function() {
var o, f;
if (!(t < s)) {
if (((o = i.apply(u, l)), o === e.promise()))
throw new TypeError(
'Thenable self-resolution'
);
(f =
o &&
('object' ===
('undefined' == typeof o
? 'undefined'
: n(o)) ||
'function' == typeof o) &&
o.then),
bt.isFunction(f)
? r
? f.call(o, a(s, e, d, r), a(s, e, p, r))
: (s++,
f.call(
o,
a(s, e, d, r),
a(s, e, p, r),
a(s, e, d, e.notifyWith)
))
: (i !== d && ((u = void 0), (l = [o])),
(r || e.resolveWith)(u, l));
}
},
c = r
? f
: function() {
try {
f();
} catch (n) {
bt.Deferred.exceptionHook &&
bt.Deferred.exceptionHook(
n,
c.stackTrace
),
t + 1 >= s &&
(i !== p && ((u = void 0), (l = [n])),
e.rejectWith(u, l));
}
};
t
? c()
: (bt.Deferred.getStackHook &&
(c.stackTrace = bt.Deferred.getStackHook()),
o.setTimeout(c));
};
}
var s = 0;
return bt
.Deferred(function(n) {
e[0][3].add(
a(0, n, bt.isFunction(r) ? r : d, n.notifyWith)
),
e[1][3].add(a(0, n, bt.isFunction(t) ? t : d)),
e[2][3].add(a(0, n, bt.isFunction(i) ? i : p));
})
.promise();
},
promise: function(t) {
return null != t ? bt.extend(t, r) : r;
},
},
a = {};
return (
bt.each(e, function(t, n) {
var o = n[2],
s = n[5];
(r[n[1]] = o.add),
s &&
o.add(
function() {
i = s;
},
e[3 - t][2].disable,
e[0][2].lock
),
o.add(n[3].fire),
(a[n[0]] = function() {
return (
a[n[0] + 'With'](
this === a ? void 0 : this,
arguments
),
this
);
}),
(a[n[0] + 'With'] = o.fireWith);
}),
r.promise(a),
t && t.call(a, a),
a
);
},
when: function(t) {
var e = arguments.length,
n = e,
i = Array(n),
r = lt.call(arguments),
o = bt.Deferred(),
a = function(t) {
return function(n) {
(i[t] = this),
(r[t] = arguments.length > 1 ? lt.call(arguments) : n),
--e || o.resolveWith(i, r);
};
};
if (
e <= 1 &&
(y(t, o.done(a(n)).resolve, o.reject, !e),
'pending' === o.state() || bt.isFunction(r[n] && r[n].then))
)
return o.then();
for (; n--; ) y(r[n], a(n), o.reject);
return o.promise();
},
});
var Bt = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
(bt.Deferred.exceptionHook = function(t, e) {
o.console &&
o.console.warn &&
t &&
Bt.test(t.name) &&
o.console.warn(
'jQuery.Deferred exception: ' + t.message,
t.stack,
e
);
}),
(bt.readyException = function(t) {
o.setTimeout(function() {
throw t;
});
});
var Lt = bt.Deferred();
(bt.fn.ready = function(t) {
return (
Lt.then(t).catch(function(t) {
bt.readyException(t);
}),
this
);
}),
bt.extend({
isReady: !1,
readyWait: 1,
ready: function(t) {
(t === !0 ? --bt.readyWait : bt.isReady) ||
((bt.isReady = !0),
(t !== !0 && --bt.readyWait > 0) || Lt.resolveWith(st, [bt]));
},
}),
(bt.ready.then = Lt.then),
'complete' === st.readyState ||
('loading' !== st.readyState && !st.documentElement.doScroll)
? o.setTimeout(bt.ready)
: (st.addEventListener('DOMContentLoaded', m),
o.addEventListener('load', m));
var Nt = function t(e, n, i, r, o, a, s) {
var u = 0,
l = e.length,
f = null == i;
if ('object' === bt.type(i)) {
o = !0;
for (u in i) t(e, n, u, i[u], !0, a, s);
} else if (
void 0 !== r &&
((o = !0),
bt.isFunction(r) || (s = !0),
f &&
(s
? (n.call(e, r), (n = null))
: ((f = n),
(n = function(t, e, n) {
return f.call(bt(t), n);
}))),
n)
)
for (; u < l; u++)
n(e[u], i, s ? r : r.call(e[u], u, n(e[u], i)));
return o ? e : f ? n.call(e) : l ? n(e[0], i) : a;
},
qt = function(t) {
return 1 === t.nodeType || 9 === t.nodeType || !+t.nodeType;
};
(v.uid = 1),
(v.prototype = {
cache: function(t) {
var e = t[this.expando];
return (
e ||
((e = {}),
qt(t) &&
(t.nodeType
? (t[this.expando] = e)
: Object.defineProperty(t, this.expando, {
value: e,
configurable: !0,
}))),
e
);
},
set: function(t, e, n) {
var i,
r = this.cache(t);
if ('string' == typeof e) r[bt.camelCase(e)] = n;
else for (i in e) r[bt.camelCase(i)] = e[i];
return r;
},
get: function(t, e) {
return void 0 === e
? this.cache(t)
: t[this.expando] && t[this.expando][bt.camelCase(e)];
},
access: function(t, e, n) {
return void 0 === e ||
(e && 'string' == typeof e && void 0 === n)
? this.get(t, e)
: (this.set(t, e, n), void 0 !== n ? n : e);
},
remove: function(t, e) {
var n,
i = t[this.expando];
if (void 0 !== i) {
if (void 0 !== e) {
Array.isArray(e)
? (e = e.map(bt.camelCase))
: ((e = bt.camelCase(e)),
(e = e in i ? [e] : e.match(Ot) || [])),
(n = e.length);
for (; n--; ) delete i[e[n]];
}
(void 0 === e || bt.isEmptyObject(i)) &&
(t.nodeType
? (t[this.expando] = void 0)
: delete t[this.expando]);
}
},
hasData: function(t) {
var e = t[this.expando];
return void 0 !== e && !bt.isEmptyObject(e);
},
});
var Ht = new v(),
jt = new v(),
Wt = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
Ut = /[A-Z]/g;
bt.extend({
hasData: function(t) {
return jt.hasData(t) || Ht.hasData(t);
},
data: function(t, e, n) {
return jt.access(t, e, n);
},
removeData: function(t, e) {
jt.remove(t, e);
},
_data: function(t, e, n) {
return Ht.access(t, e, n);
},
_removeData: function(t, e) {
Ht.remove(t, e);
},
}),
bt.fn.extend({
data: function t(e, i) {
var r,
o,
t,
a = this[0],
s = a && a.attributes;
if (void 0 === e) {
if (
this.length &&
((t = jt.get(a)),
1 === a.nodeType && !Ht.get(a, 'hasDataAttrs'))
) {
for (r = s.length; r--; )
s[r] &&
((o = s[r].name),
0 === o.indexOf('data-') &&
((o = bt.camelCase(o.slice(5))), S(a, o, t[o])));
Ht.set(a, 'hasDataAttrs', !0);
}
return t;
}
return 'object' ===
('undefined' == typeof e ? 'undefined' : n(e))
? this.each(function() {
jt.set(this, e);
})
: Nt(
this,
function(t) {
var n;
if (a && void 0 === t) {
if (((n = jt.get(a, e)), void 0 !== n)) return n;
if (((n = S(a, e)), void 0 !== n)) return n;
} else
this.each(function() {
jt.set(this, e, t);
});
},
null,
i,
arguments.length > 1,
null,
!0
);
},
removeData: function(t) {
return this.each(function() {
jt.remove(this, t);
});
},
}),
bt.extend({
queue: function t(e, n, i) {
var t;
if (e)
return (
(n = (n || 'fx') + 'queue'),
(t = Ht.get(e, n)),
i &&
(!t || Array.isArray(i)
? (t = Ht.access(e, n, bt.makeArray(i)))
: t.push(i)),
t || []
);
},
dequeue: function(t, e) {
e = e || 'fx';
var n = bt.queue(t, e),
i = n.length,
r = n.shift(),
o = bt._queueHooks(t, e),
a = function() {
bt.dequeue(t, e);
};
'inprogress' === r && ((r = n.shift()), i--),
r &&
('fx' === e && n.unshift('inprogress'),
delete o.stop,
r.call(t, a, o)),
!i && o && o.empty.fire();
},
_queueHooks: function(t, e) {
var n = e + 'queueHooks';
return (
Ht.get(t, n) ||
Ht.access(t, n, {
empty: bt.Callbacks('once memory').add(function() {
Ht.remove(t, [e + 'queue', n]);
}),
})
);
},
}),
bt.fn.extend({
queue: function(t, e) {
var n = 2;
return (
'string' != typeof t && ((e = t), (t = 'fx'), n--),
arguments.length < n
? bt.queue(this[0], t)
: void 0 === e
? this
: this.each(function() {
var n = bt.queue(this, t, e);
bt._queueHooks(this, t),
'fx' === t &&
'inprogress' !== n[0] &&
bt.dequeue(this, t);
})
);
},
dequeue: function(t) {
return this.each(function() {
bt.dequeue(this, t);
});
},
clearQueue: function(t) {
return this.queue(t || 'fx', []);
},
promise: function(t, e) {
var n,
i = 1,
r = bt.Deferred(),
o = this,
a = this.length,
s = function() {
--i || r.resolveWith(o, [o]);
};
for (
'string' != typeof t && ((e = t), (t = void 0)),
t = t || 'fx';
a--;
)
(n = Ht.get(o[a], t + 'queueHooks')),
n && n.empty && (i++, n.empty.add(s));
return s(), r.promise(e);
},
});
var Gt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
Vt = new RegExp('^(?:([+-])=|)(' + Gt + ')([a-z%]*)$', 'i'),
Yt = ['Top', 'Right', 'Bottom', 'Left'],
Xt = function(t, e) {
return (
(t = e || t),
'none' === t.style.display ||
('' === t.style.display &&
bt.contains(t.ownerDocument, t) &&
'none' === bt.css(t, 'display'))
);
},
Jt = function(t, e, n, i) {
var r,
o,
a = {};
for (o in e) (a[o] = t.style[o]), (t.style[o] = e[o]);
r = n.apply(t, i || []);
for (o in e) t.style[o] = a[o];
return r;
},
$t = {};
bt.fn.extend({
show: function() {
return _(this, !0);
},
hide: function() {
return _(this);
},
toggle: function(t) {
return 'boolean' == typeof t
? t
? this.show()
: this.hide()
: this.each(function() {
Xt(this) ? bt(this).show() : bt(this).hide();
});
},
});
var Kt = /^(?:checkbox|radio)$/i,
Zt = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i,
Qt = /^$|\/(?:java|ecma)script/i,
te = {
option: [1, "'],
thead: [1, '
', '
'],
col: [2, '
', '
'],
tr: [2, '
', '
'],
td: [3, '
', '
'],
_default: [0, '', ''],
};
(te.optgroup = te.option),
(te.tbody = te.tfoot = te.colgroup = te.caption = te.thead),
(te.th = te.td);
var ee = /<|?\w+;/;
!(function() {
var t = st.createDocumentFragment(),
e = t.appendChild(st.createElement('div')),
n = st.createElement('input');
n.setAttribute('type', 'radio'),
n.setAttribute('checked', 'checked'),
n.setAttribute('name', 't'),
e.appendChild(n),
(gt.checkClone = e.cloneNode(!0).cloneNode(!0).lastChild.checked),
(e.innerHTML = ''),
(gt.noCloneChecked = !!e.cloneNode(!0).lastChild.defaultValue);
})();
var ne = st.documentElement,
ie = /^key/,
re = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
oe = /^([^.]*)(?:\.(.+)|)/;
(bt.event = {
global: {},
add: function(t, e, n, i, r) {
var o,
a,
s,
u,
l,
f,
c,
h,
d,
p,
y,
m = Ht.get(t);
if (m)
for (
n.handler && ((o = n), (n = o.handler), (r = o.selector)),
r && bt.find.matchesSelector(ne, r),
n.guid || (n.guid = bt.guid++),
(u = m.events) || (u = m.events = {}),
(a = m.handle) ||
(a = m.handle = function(e) {
return 'undefined' != typeof bt &&
bt.event.triggered !== e.type
? bt.event.dispatch.apply(t, arguments)
: void 0;
}),
e = (e || '').match(Ot) || [''],
l = e.length;
l--;
)
(s = oe.exec(e[l]) || []),
(d = y = s[1]),
(p = (s[2] || '').split('.').sort()),
d &&
((c = bt.event.special[d] || {}),
(d = (r ? c.delegateType : c.bindType) || d),
(c = bt.event.special[d] || {}),
(f = bt.extend(
{
type: d,
origType: y,
data: i,
handler: n,
guid: n.guid,
selector: r,
needsContext: r && bt.expr.match.needsContext.test(r),
namespace: p.join('.'),
},
o
)),
(h = u[d]) ||
((h = u[d] = []),
(h.delegateCount = 0),
(c.setup && c.setup.call(t, i, p, a) !== !1) ||
(t.addEventListener && t.addEventListener(d, a))),
c.add &&
(c.add.call(t, f),
f.handler.guid || (f.handler.guid = n.guid)),
r ? h.splice(h.delegateCount++, 0, f) : h.push(f),
(bt.event.global[d] = !0));
},
remove: function(t, e, n, i, r) {
var o,
a,
s,
u,
l,
f,
c,
h,
d,
p,
y,
m = Ht.hasData(t) && Ht.get(t);
if (m && (u = m.events)) {
for (e = (e || '').match(Ot) || [''], l = e.length; l--; )
if (
((s = oe.exec(e[l]) || []),
(d = y = s[1]),
(p = (s[2] || '').split('.').sort()),
d)
) {
for (
c = bt.event.special[d] || {},
d = (i ? c.delegateType : c.bindType) || d,
h = u[d] || [],
s =
s[2] &&
new RegExp(
'(^|\\.)' + p.join('\\.(?:.*\\.|)') + '(\\.|$)'
),
a = o = h.length;
o--;
)
(f = h[o]),
(!r && y !== f.origType) ||
(n && n.guid !== f.guid) ||
(s && !s.test(f.namespace)) ||
(i &&
i !== f.selector &&
('**' !== i || !f.selector)) ||
(h.splice(o, 1),
f.selector && h.delegateCount--,
c.remove && c.remove.call(t, f));
a &&
!h.length &&
((c.teardown && c.teardown.call(t, p, m.handle) !== !1) ||
bt.removeEvent(t, d, m.handle),
delete u[d]);
} else for (d in u) bt.event.remove(t, d + e[l], n, i, !0);
bt.isEmptyObject(u) && Ht.remove(t, 'handle events');
}
},
dispatch: function(t) {
var e,
n,
i,
r,
o,
a,
s = bt.event.fix(t),
u = new Array(arguments.length),
l = (Ht.get(this, 'events') || {})[s.type] || [],
f = bt.event.special[s.type] || {};
for (u[0] = s, e = 1; e < arguments.length; e++)
u[e] = arguments[e];
if (
((s.delegateTarget = this),
!f.preDispatch || f.preDispatch.call(this, s) !== !1)
) {
for (
a = bt.event.handlers.call(this, s, l), e = 0;
(r = a[e++]) && !s.isPropagationStopped();
)
for (
s.currentTarget = r.elem, n = 0;
(o = r.handlers[n++]) && !s.isImmediatePropagationStopped();
)
(s.rnamespace && !s.rnamespace.test(o.namespace)) ||
((s.handleObj = o),
(s.data = o.data),
(i = (
(bt.event.special[o.origType] || {}).handle || o.handler
).apply(r.elem, u)),
void 0 !== i &&
(s.result = i) === !1 &&
(s.preventDefault(), s.stopPropagation()));
return f.postDispatch && f.postDispatch.call(this, s), s.result;
}
},
handlers: function(t, e) {
var n,
i,
r,
o,
a,
s = [],
u = e.delegateCount,
l = t.target;
if (u && l.nodeType && !('click' === t.type && t.button >= 1))
for (; l !== this; l = l.parentNode || this)
if (
1 === l.nodeType &&
('click' !== t.type || l.disabled !== !0)
) {
for (o = [], a = {}, n = 0; n < u; n++)
(i = e[n]),
(r = i.selector + ' '),
void 0 === a[r] &&
(a[r] = i.needsContext
? bt(r, this).index(l) > -1
: bt.find(r, this, null, [l]).length),
a[r] && o.push(i);
o.length && s.push({ elem: l, handlers: o });
}
return (
(l = this),
u < e.length && s.push({ elem: l, handlers: e.slice(u) }),
s
);
},
addProp: function(t, e) {
Object.defineProperty(bt.Event.prototype, t, {
enumerable: !0,
configurable: !0,
get: bt.isFunction(e)
? function() {
if (this.originalEvent) return e(this.originalEvent);
}
: function() {
if (this.originalEvent) return this.originalEvent[t];
},
set: function(e) {
Object.defineProperty(this, t, {
enumerable: !0,
configurable: !0,
writable: !0,
value: e,
});
},
});
},
fix: function(t) {
return t[bt.expando] ? t : new bt.Event(t);
},
special: {
load: { noBubble: !0 },
focus: {
trigger: function() {
if (this !== D() && this.focus) return this.focus(), !1;
},
delegateType: 'focusin',
},
blur: {
trigger: function() {
if (this === D() && this.blur) return this.blur(), !1;
},
delegateType: 'focusout',
},
click: {
trigger: function() {
if (
'checkbox' === this.type &&
this.click &&
l(this, 'input')
)
return this.click(), !1;
},
_default: function(t) {
return l(t.target, 'a');
},
},
beforeunload: {
postDispatch: function(t) {
void 0 !== t.result &&
t.originalEvent &&
(t.originalEvent.returnValue = t.result);
},
},
},
}),
(bt.removeEvent = function(t, e, n) {
t.removeEventListener && t.removeEventListener(e, n);
}),
(bt.Event = function(t, e) {
return this instanceof bt.Event
? (t && t.type
? ((this.originalEvent = t),
(this.type = t.type),
(this.isDefaultPrevented =
t.defaultPrevented ||
(void 0 === t.defaultPrevented && t.returnValue === !1)
? T
: k),
(this.target =
t.target && 3 === t.target.nodeType
? t.target.parentNode
: t.target),
(this.currentTarget = t.currentTarget),
(this.relatedTarget = t.relatedTarget))
: (this.type = t),
e && bt.extend(this, e),
(this.timeStamp = (t && t.timeStamp) || bt.now()),
void (this[bt.expando] = !0))
: new bt.Event(t, e);
}),
(bt.Event.prototype = {
constructor: bt.Event,
isDefaultPrevented: k,
isPropagationStopped: k,
isImmediatePropagationStopped: k,
isSimulated: !1,
preventDefault: function() {
var t = this.originalEvent;
(this.isDefaultPrevented = T),
t && !this.isSimulated && t.preventDefault();
},
stopPropagation: function() {
var t = this.originalEvent;
(this.isPropagationStopped = T),
t && !this.isSimulated && t.stopPropagation();
},
stopImmediatePropagation: function() {
var t = this.originalEvent;
(this.isImmediatePropagationStopped = T),
t && !this.isSimulated && t.stopImmediatePropagation(),
this.stopPropagation();
},
}),
bt.each(
{
altKey: !0,
bubbles: !0,
cancelable: !0,
changedTouches: !0,
ctrlKey: !0,
detail: !0,
eventPhase: !0,
metaKey: !0,
pageX: !0,
pageY: !0,
shiftKey: !0,
view: !0,
char: !0,
charCode: !0,
key: !0,
keyCode: !0,
button: !0,
buttons: !0,
clientX: !0,
clientY: !0,
offsetX: !0,
offsetY: !0,
pointerId: !0,
pointerType: !0,
screenX: !0,
screenY: !0,
targetTouches: !0,
toElement: !0,
touches: !0,
which: function(t) {
var e = t.button;
return null == t.which && ie.test(t.type)
? null != t.charCode
? t.charCode
: t.keyCode
: !t.which && void 0 !== e && re.test(t.type)
? 1 & e
? 1
: 2 & e
? 3
: 4 & e
? 2
: 0
: t.which;
},
},
bt.event.addProp
),
bt.each(
{
mouseenter: 'mouseover',
mouseleave: 'mouseout',
pointerenter: 'pointerover',
pointerleave: 'pointerout',
},
function(t, e) {
bt.event.special[t] = {
delegateType: e,
bindType: e,
handle: function(t) {
var n,
i = this,
r = t.relatedTarget,
o = t.handleObj;
return (
(r && (r === i || bt.contains(i, r))) ||
((t.type = o.origType),
(n = o.handler.apply(this, arguments)),
(t.type = e)),
n
);
},
};
}
),
bt.fn.extend({
on: function(t, e, n, i) {
return M(this, t, e, n, i);
},
one: function(t, e, n, i) {
return M(this, t, e, n, i, 1);
},
off: function(t, e, i) {
var r, o;
if (t && t.preventDefault && t.handleObj)
return (
(r = t.handleObj),
bt(t.delegateTarget).off(
r.namespace ? r.origType + '.' + r.namespace : r.origType,
r.selector,
r.handler
),
this
);
if (
'object' === ('undefined' == typeof t ? 'undefined' : n(t))
) {
for (o in t) this.off(o, e, t[o]);
return this;
}
return (
(e !== !1 && 'function' != typeof e) ||
((i = e), (e = void 0)),
i === !1 && (i = k),
this.each(function() {
bt.event.remove(this, t, i, e);
})
);
},
});
var ae = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
se = /