input-duration 2.2.7 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/getWorkflowIDs.yml +57 -0
- package/.github/workflows/manualTriggersAll.yml +60 -0
- package/.github/workflows/manualTriggersEcho0.yml +60 -0
- package/.github/workflows/npm-publish.yml +4 -1
- package/Competitors/ParliamentLive/downloadJs.js +2324 -0
- package/Competitors/ParliamentLive/morefuncrtions.js +2424 -0
- package/Competitors/ReadMe.md +7 -0
- package/README.md +1 -1
- package/index.js +2 -1
- package/package.json +6 -6
|
@@ -0,0 +1,2324 @@
|
|
|
1
|
+
|
|
2
|
+
function updateClipping() {
|
|
3
|
+
var n = $("#clippingContainer").data("load-url");
|
|
4
|
+
$.get(n, function(n) {
|
|
5
|
+
$("#clippingContainer").html(n);
|
|
6
|
+
initSelectDates();
|
|
7
|
+
initCheckbox();
|
|
8
|
+
reloadEmbedData();
|
|
9
|
+
initSetShareTime();
|
|
10
|
+
initShareInputMask();
|
|
11
|
+
initShareUpdateEmbed()
|
|
12
|
+
})
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
function i(t) {
|
|
17
|
+
n.fields.longUrl.val(t.pageUrl);
|
|
18
|
+
n.fields.embed.text(t.embedCode);
|
|
19
|
+
n.fields.longUrl.trigger("updated-url", t.pageUrl)
|
|
20
|
+
}
|
|
21
|
+
var n = {
|
|
22
|
+
options: {
|
|
23
|
+
start: {
|
|
24
|
+
input: $("#shareStartTime"),
|
|
25
|
+
date: $("#startClipDate"),
|
|
26
|
+
hiddenStart: $("#hiddenStart"),
|
|
27
|
+
checkbox: $("#startTimeCheck")
|
|
28
|
+
},
|
|
29
|
+
end: {
|
|
30
|
+
input: $("#shareEndTime"),
|
|
31
|
+
date: $("#endClipDate"),
|
|
32
|
+
hiddenEnd: $("#hiddenEnd"),
|
|
33
|
+
checkbox: $("#endTimeCheck")
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
urlBase: $("#share").data("url"),
|
|
37
|
+
eventId: $("#eventId").val(),
|
|
38
|
+
fields: {
|
|
39
|
+
longUrl: $("#url"),
|
|
40
|
+
embed: $("#embed")
|
|
41
|
+
},
|
|
42
|
+
timepickerOpts: {
|
|
43
|
+
defaultTime: !1,
|
|
44
|
+
showSeconds: !0,
|
|
45
|
+
showMeridian: !1,
|
|
46
|
+
minuteStep: 1,
|
|
47
|
+
secondStep: 1
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
$.each(n.options, function() {
|
|
51
|
+
if (this.hasOwnProperty("input")) this.input.on("changeTime.timepicker", t);
|
|
52
|
+
if (this.hasOwnProperty("date")) this.date.on("change", t)
|
|
53
|
+
});
|
|
54
|
+
$(n.options.start.checkbox).click(function() {
|
|
55
|
+
n.options.start.checkbox.prop("checked") == !1 ? (n.options.start.input.val(""), n.options.end.input.val(""), n.options.end.checkbox.prop("checked", !1), initCheckbox()) : n.options.start.input.val(n.options.start.hiddenStart.val());
|
|
56
|
+
t()
|
|
57
|
+
});
|
|
58
|
+
n.options.end.checkbox.click(function() {
|
|
59
|
+
n.options.end.checkbox.prop("checked") == !1 ? n.options.end.input.val("") : n.options.end.input.val(n.options.end.hiddenEnd.val());
|
|
60
|
+
t()
|
|
61
|
+
});
|
|
62
|
+
t()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function selectableEmbedCode() {
|
|
66
|
+
var n = $("#embed, #url");
|
|
67
|
+
n.bind("click", function() {
|
|
68
|
+
this.focus();
|
|
69
|
+
this.setSelectionRange(0, 9999)
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function updateSocialLinks(n, t) {
|
|
74
|
+
var i = [$(".btn-facebook"), $(".btn-twitter"), $(".btn-google"), $(".btn-linkedin")];
|
|
75
|
+
t = encodeURIComponent(t);
|
|
76
|
+
$.each(i, function() {
|
|
77
|
+
var n = $(this).data("share-url");
|
|
78
|
+
this.hasClass("btn-twitter") ? (n += "Parliamentlive.tv ", n += "&url=" + t) : n += t;
|
|
79
|
+
$(this).attr("href", n)
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function setAudioButtonState(n) {
|
|
84
|
+
var t = $("#audioToggle"),
|
|
85
|
+
i = $(t).data("audioonly-on-state");
|
|
86
|
+
if (i == "True") {
|
|
87
|
+
$(t).data("audioonly-on-state", "False");
|
|
88
|
+
n || loadPlayer(!0, !0);
|
|
89
|
+
$(t).html('video with audio <i class="fa fa-player-volume fa-2x"><\/i>');
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
if (i == "False") {
|
|
93
|
+
$(t).data("audioonly-on-state", "True");
|
|
94
|
+
n || loadPlayer(!1, !0);
|
|
95
|
+
$(t).html('audio only <i class="fa fa-player-volume fa-2x"><\/i>');
|
|
96
|
+
return
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function audiOnlySwitch() {
|
|
101
|
+
setAudioButtonState(!0);
|
|
102
|
+
$(document).on("click", "#audioToggle", null, function() {
|
|
103
|
+
setAudioButtonState(!1)
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function stopHub() {
|
|
108
|
+
$.connection.hub.stop()
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function randomIntFromInterval(n, t) {
|
|
112
|
+
return Math.floor(Math.random() * (t - n + 1) + n)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function scrollStackAndLogs() {
|
|
116
|
+
$(".log-list").length && ($(".log-list").slimScroll({
|
|
117
|
+
railVisible: !0,
|
|
118
|
+
railColor: "#9c9c9c",
|
|
119
|
+
railOpacity: 1,
|
|
120
|
+
color: "#000",
|
|
121
|
+
size: "16px",
|
|
122
|
+
height: "525px",
|
|
123
|
+
alwaysVisible: !0,
|
|
124
|
+
disableFadeOut: !0,
|
|
125
|
+
start: logPos
|
|
126
|
+
}), $(".log-list").slimScroll().bind("slimscroll", function(n, t) {
|
|
127
|
+
logPos = t
|
|
128
|
+
}));
|
|
129
|
+
var n = window.matchMedia("(max-width: 480px)");
|
|
130
|
+
n.matches || $(".stack-list").length && ($(".stack-list").slimScroll({
|
|
131
|
+
railVisible: !0,
|
|
132
|
+
railColor: "#9c9c9c",
|
|
133
|
+
railOpacity: 1,
|
|
134
|
+
color: "#000",
|
|
135
|
+
size: "16px",
|
|
136
|
+
height: "525px",
|
|
137
|
+
alwaysVisible: !0,
|
|
138
|
+
disableFadeOut: !0,
|
|
139
|
+
start: logPos
|
|
140
|
+
}), $(".stack-list").slimScroll().bind("slimscroll", function(n, t) {
|
|
141
|
+
stackPos = t
|
|
142
|
+
}))
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function refreshStackItems() {
|
|
146
|
+
var n = $("#stackTab").data("refresh-stack-url");
|
|
147
|
+
$.get(n, {}, function(n) {
|
|
148
|
+
$(".stack-list").html(n);
|
|
149
|
+
scrollStackAndLogs()
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function refreshStackInterval() {
|
|
154
|
+
setInterval(refreshStackItems, 24e4)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function appendArchiveLog() {
|
|
158
|
+
$($(".log-list > li").get().reverse()).each(function(n, t) {
|
|
159
|
+
var i = $(t).find(".time-code").data("time"),
|
|
160
|
+
r;
|
|
161
|
+
return i == "" ? !0 : (r = $("#logTab").data("load-new-log-url"), $.get(r, {
|
|
162
|
+
startTime: i
|
|
163
|
+
}, function(n) {
|
|
164
|
+
$(n).insertAfter($(t))
|
|
165
|
+
}), !1)
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function appendLiveLog() {
|
|
170
|
+
var n = randomIntFromInterval(1, 15) * 1e3;
|
|
171
|
+
setTimeout(function() {
|
|
172
|
+
var n = $(".log-list > li").first().find(".time-code").data("time"),
|
|
173
|
+
t = $("#logTab").data("load-new-log-url");
|
|
174
|
+
$.get(t, {
|
|
175
|
+
startTime: n
|
|
176
|
+
}, function(n) {
|
|
177
|
+
$(".log-list").prepend(n)
|
|
178
|
+
})
|
|
179
|
+
}, n)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function appendLogMoments() {
|
|
183
|
+
$("#LiveLogging").val() == "True" ? appendLiveLog() : appendArchiveLog()
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function refreshLogMoments() {
|
|
187
|
+
var n = $("#logTab").data("refresh-log-url"),
|
|
188
|
+
t = randomIntFromInterval(1, 45) * 1e3;
|
|
189
|
+
setTimeout(function() {
|
|
190
|
+
$.get(n, {}, function(n) {
|
|
191
|
+
$(".log-list").html(n);
|
|
192
|
+
scrollStackAndLogs()
|
|
193
|
+
})
|
|
194
|
+
}, t)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function highlightLiveLog(n) {
|
|
198
|
+
var t = $(".log-list > li.logouter");
|
|
199
|
+
t.removeClass("active");
|
|
200
|
+
t = $(".log-list > li.logouter").get().reverse();
|
|
201
|
+
$(t).each(function(i, r) {
|
|
202
|
+
var u = $(r),
|
|
203
|
+
f = new Date(u.find(".time-code").data("time"));
|
|
204
|
+
if (n >= f) {
|
|
205
|
+
$(t[i - 1]).removeClass("active");
|
|
206
|
+
u.addClass("active");
|
|
207
|
+
return
|
|
208
|
+
}
|
|
209
|
+
})
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function highlightArchiveLog(n) {
|
|
213
|
+
var t = $(".log-list > li.logouter");
|
|
214
|
+
t.removeClass("active");
|
|
215
|
+
t.each(function(i, r) {
|
|
216
|
+
var u = $(r),
|
|
217
|
+
f = new Date(u.find(".time-code").data("time"));
|
|
218
|
+
if (n >= f) {
|
|
219
|
+
$(t[i - 1]).removeClass("active");
|
|
220
|
+
u.addClass("active");
|
|
221
|
+
return
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function highlightLogItems(n) {
|
|
227
|
+
$("#LiveLogging").val() == "True" ? highlightLiveLog(n) : highlightArchiveLog(n)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function logItemClicked(n) {
|
|
231
|
+
var r = $(this),
|
|
232
|
+
t, u, i, f;
|
|
233
|
+
return highlightItem = !1, t = r.find(".time-code").data("time"), lastClickedTimecode = new Date(t), u = $(".log-list > li.logouter"), u.removeClass("active"), r.addClass("active"), $("#seekToLiveButton").removeClass("btn-seek-to-live-grey"), i = $("#UKPPlayer")[0], f = {
|
|
234
|
+
"function": "seekPostMessage",
|
|
235
|
+
sender: document.location.href,
|
|
236
|
+
data: "seek-program-date-time_" + t
|
|
237
|
+
}, $.postMessage(JSON.stringify(f), i.src, i.contentWindow), setTimeout(function() {
|
|
238
|
+
highlightItem = !0
|
|
239
|
+
}, 6e3), n.preventDefault(), !1
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function seekToLive() {
|
|
243
|
+
$("#seekToLiveButton").addClass("btn-seek-to-live-grey");
|
|
244
|
+
var n = $("#UKPPlayer")[0],
|
|
245
|
+
t = {
|
|
246
|
+
"function": "seekPostMessage",
|
|
247
|
+
sender: document.location.href,
|
|
248
|
+
data: "seek-to-live_true"
|
|
249
|
+
};
|
|
250
|
+
$.postMessage(JSON.stringify(t), n.src, n.contentWindow);
|
|
251
|
+
setTimeout(function() {
|
|
252
|
+
var n = $(".log-list > li.logouter");
|
|
253
|
+
n.removeClass("active")
|
|
254
|
+
}, 2e3)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function timeUpdate(n) {
|
|
258
|
+
var i = n.timeUpdateString.split("_"),
|
|
259
|
+
t;
|
|
260
|
+
i.length < 2 || i[0].indexOf("program-date-time") != -1 && (t = new Date(i[1]), $("#ProgramDateTime").val(t.toISOString()), (lastClickedTimecode == null || t > lastClickedTimecode) && highlightItem && highlightLogItems(t))
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function initTermsAndConditions() {
|
|
264
|
+
var n = $(".acceptance");
|
|
265
|
+
n.on("click", termsAndConditionsClickHandler)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function initEnableEmbed() {
|
|
269
|
+
var n = document.getElementById("shareContinue");
|
|
270
|
+
n.addEventListener("click", enableEmbed)
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function initEnableEmail() {
|
|
274
|
+
var n = document.getElementById("downloadContinue");
|
|
275
|
+
n.addEventListener("click", enableEmail)
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function initSetShareTime() {
|
|
279
|
+
var n = $(".set-share-time");
|
|
280
|
+
n.on("click", getShareTime)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function initSetDownloadTime() {
|
|
284
|
+
var n = $(".set-download-time");
|
|
285
|
+
n.on("click", getDownloadTime)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function initSetClipboard() {
|
|
289
|
+
var n = $(".fa-clipboard");
|
|
290
|
+
n.on("click", copyToClipbloard)
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function initSetFileType() {
|
|
294
|
+
var n = $(".fileType");
|
|
295
|
+
n.on("change", checkMakeClip)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function initEmailValid() {
|
|
299
|
+
var n = $("#email");
|
|
300
|
+
n.on("change", checkMakeClip)
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function checkStartTime() {
|
|
304
|
+
var r = $("#downloadStartTime").val().split(":"),
|
|
305
|
+
e = $('[data-id="startDownloadDate"]')[0],
|
|
306
|
+
n = new Date(Date.parse(e.title)),
|
|
307
|
+
u, i, t, f;
|
|
308
|
+
if (n.setHours(n.getHours() + r[0]), n.setMinutes(n.getMinutes() + r[1]), n.setSeconds(n.getSeconds() + r[2]), u = document.getElementById("MeetingStartTime").value, !isNaN(n.valueOf()))
|
|
309
|
+
if (i = n.toISOString().split(".")[0] + "Z", t = $("#EndTime").val(), t === "" && (t = document.getElementById("MeetingEndTime").value), i < t && i >= u) {
|
|
310
|
+
if (f = new Date(t), f - n >= 324e5) {
|
|
311
|
+
setErrorMessage("Clip cannot exceed 9 hours");
|
|
312
|
+
return
|
|
313
|
+
}
|
|
314
|
+
setDownloadTimeForm("StartTime", i);
|
|
315
|
+
timesValid = !0;
|
|
316
|
+
keepError || $(".error-message").prop("hidden", !0);
|
|
317
|
+
checkMakeClip()
|
|
318
|
+
} else keepError = !1, i > t ? setErrorMessage("Start Time cannot be later than the End Time") : i === t ? setErrorMessage("Start Time cannot be equal to the End Time") : setErrorMessage("Start Time cannot be earlier than the meeting start time")
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function setErrorMessage(n) {
|
|
322
|
+
$(".error-message").text(n);
|
|
323
|
+
$(".error-message").removeAttr("hidden");
|
|
324
|
+
timesValid = !1;
|
|
325
|
+
checkMakeClip()
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function setDownloadTimeForm(n, t) {
|
|
329
|
+
document.getElementById(n).value = t
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function checkEndTime() {
|
|
333
|
+
var r = $("#downloadEndTime").val().split(":"),
|
|
334
|
+
o = $('[data-id="endDownloadDate"]')[0],
|
|
335
|
+
n = new Date(Date.parse(o.title)),
|
|
336
|
+
u, t, i, f, e;
|
|
337
|
+
if (n.setHours(n.getHours() + r[0]), n.setMinutes(n.getMinutes() + r[1]), n.setSeconds(n.getSeconds() + r[2]), u = document.getElementById("MeetingEndTime").value, !isNaN(n.valueOf()))
|
|
338
|
+
if (t = n.toISOString().split(".")[0] + "Z", i = $("#StartTime").val(), t > i && t <= u) {
|
|
339
|
+
if (isLivePlayer() && (f = new Date(u).getTime() / 1e3, e = n.getTime() / 1e3, f - e <= 11)) {
|
|
340
|
+
setErrorMessage("End Time cannot be within 10 seconds of the live edge");
|
|
341
|
+
timesValid = !1;
|
|
342
|
+
return
|
|
343
|
+
}
|
|
344
|
+
setDownloadTimeForm("EndTime", t);
|
|
345
|
+
timesValid = !0;
|
|
346
|
+
keepError || $(".error-message").prop("hidden", !0);
|
|
347
|
+
checkMakeClip()
|
|
348
|
+
} else keepError = !1, t < i ? setErrorMessage("End Time cannot be earlier than the Start Time") : t === i ? setErrorMessage("End Time cannot be equal to the Start Time") : setErrorMessage("End Time cannot be later than the meeting end time")
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function compareTimes() {
|
|
352
|
+
var s = document.getElementById("downloadStartTime").value.split(":"),
|
|
353
|
+
h = document.querySelectorAll('[data-id="startDownloadDate"]')[0],
|
|
354
|
+
c = document.getElementById("downloadEndTime").value.split(":"),
|
|
355
|
+
l = document.querySelectorAll('[data-id="endDownloadDate"]')[0],
|
|
356
|
+
t = getDate(s, h),
|
|
357
|
+
n = getDate(c, l),
|
|
358
|
+
u = document.getElementById("MeetingStartTime").value,
|
|
359
|
+
f = document.getElementById("MeetingEndTime").value,
|
|
360
|
+
i, r;
|
|
361
|
+
if (isNaN(n.valueOf()) || isNaN(t.valueOf())) return !1;
|
|
362
|
+
if (i = t.toISOString().split(".")[0] + "Z", r = n.toISOString().split(".")[0] + "Z", n - t >= 1e4 && r <= f && i >= u) return n - t >= 324e5 ? (setErrorMessage("Clip cannot exceed 9 hours"), !1) : checkLiveEdge(f, n) ? (setDownloadTimeForm("StartTime", i), setDownloadTimeForm("EndTime", r), timesValid = !0, keepError || (document.getElementsByClassName("error-message")[0].hidden = !0), checkMakeClip()) : !1;
|
|
363
|
+
keepError = !1;
|
|
364
|
+
setTimeError(i, r, u);
|
|
365
|
+
var e = new Date(u),
|
|
366
|
+
a = new Date(e.getFullYear(), e.getMonth(), e.getDate()),
|
|
367
|
+
o = new Date(f),
|
|
368
|
+
v = new Date(o.getFullYear(), o.getMonth(), o.getDate());
|
|
369
|
+
return Math.floor((v.getTime() - a.getTime()) / 864e5) > 0 && $(".error-message").append(" Please ensure you have selected the correct date"), !1
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
function getDate(n, t) {
|
|
373
|
+
var i = "+0000";
|
|
374
|
+
return document.getElementById("IsEventDaylightSavingTime").value === "True" && (i = "+0100"), new Date(Date.parse(t.title + " " + n[0] + ":" + n[1] + ":" + n[2] + " GMT" + i))
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
function checkLiveEdge(n, t) {
|
|
378
|
+
if (isLivePlayer()) {
|
|
379
|
+
var i = new Date(n).getTime() / 1e3,
|
|
380
|
+
r = t.getTime() / 1e3;
|
|
381
|
+
if (i - r <= 11) return setErrorMessage("End Time cannot be within 10 seconds of the live edge"), timesValid = !1, !1
|
|
382
|
+
}
|
|
383
|
+
return !0
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function setTimeError(n, t, i) {
|
|
387
|
+
startDate = new Date(n);
|
|
388
|
+
endDate = new Date(t);
|
|
389
|
+
n > t ? setErrorMessage("Start Time cannot be later than the End Time.") : endDate - startDate < 1e4 ? setErrorMessage("Start Time and End Time must be at least 10 seconds apart.") : n < i ? setErrorMessage("Start Time cannot be earlier than the meeting start time.") : t < n ? setErrorMessage("End Time cannot be earlier than the Start Time.") : setErrorMessage("End Time cannot be later than the meeting end time.")
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function termsAndConditionsClickHandler(n) {
|
|
393
|
+
var t = n.target.dataset.continueId;
|
|
394
|
+
enableDisableButton(t, n.target.checked)
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
function enableDisableButton(n, t) {
|
|
398
|
+
var i = document.getElementById(n);
|
|
399
|
+
t ? $(i).removeAttr("disabled") : $(i).prop("disabled", !0)
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function enableEmbed() {
|
|
403
|
+
var n = $(".embed-code"),
|
|
404
|
+
t = $(".share-terms");
|
|
405
|
+
t.fadeOut();
|
|
406
|
+
n.fadeIn();
|
|
407
|
+
urlPageNavigation("#player-tabs")
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
function enableEmail() {
|
|
411
|
+
var n = $(".email-me"),
|
|
412
|
+
t = $(".download-terms");
|
|
413
|
+
t.fadeOut();
|
|
414
|
+
n.fadeIn();
|
|
415
|
+
urlPageNavigation("#player-tabs")
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function urlPageNavigation(n) {
|
|
419
|
+
var t = window.location.href;
|
|
420
|
+
t.indexOf("#") !== -1 ? t = t.substring(0, t.indexOf("#")) + n : t += n;
|
|
421
|
+
window.location.href = t
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
function copyToClipbloard() {
|
|
425
|
+
var i = document.querySelector("#embed"),
|
|
426
|
+
n, t, r;
|
|
427
|
+
i.select();
|
|
428
|
+
n = $(".response-message");
|
|
429
|
+
try {
|
|
430
|
+
t = document.execCommand("copy");
|
|
431
|
+
r = t ? "successful" : "unsuccessful";
|
|
432
|
+
n.text("Copied to Clipboard");
|
|
433
|
+
n.addClass("show")
|
|
434
|
+
} catch (u) {
|
|
435
|
+
n.text("unable to copy")
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
function resetDownloadTab() {
|
|
440
|
+
$(".thankyou").prop("hidden", !0);
|
|
441
|
+
$(".download-form").removeAttr("hidden");
|
|
442
|
+
$("#email").val("");
|
|
443
|
+
document.getElementById("ClipRequested").value = !1;
|
|
444
|
+
document.getElementById("EmailAddress").value = "";
|
|
445
|
+
grecaptcha.reset()
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
function checkMakeClip() {
|
|
449
|
+
var n = !1,
|
|
450
|
+
t = document.getElementById("ClipRequested").value === "true";
|
|
451
|
+
return isRadioChecked() && isValidEmail() && captchaValid && timesValid && !t && (n = !0), n ? ($("#downloadSubmit").removeAttr("disabled"), keepError || $(".error-message").prop("hidden", !0)) : $("#downloadSubmit").prop("disabled", !0), n
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
function isRadioChecked() {
|
|
455
|
+
var n = $("input:radio.radioFileType:checked");
|
|
456
|
+
return n.length > 0 ? ($("#AudioOnly").val(n[0].id === "fileType2"), !0) : !1
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
function isValidEmail() {
|
|
460
|
+
var n = $("#email").val(),
|
|
461
|
+
t = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n);
|
|
462
|
+
return t && $("#EmailAddress").val(n), t
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
function captchaResponse() {
|
|
466
|
+
return grecaptcha.getResponse()
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
function expCallback() {
|
|
470
|
+
captchaValid = !1;
|
|
471
|
+
checkMakeClip()
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
function recaptchaCallback() {
|
|
475
|
+
captchaValid = !0;
|
|
476
|
+
checkMakeClip()
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function initShareUpdateEmbed() {
|
|
480
|
+
var n = document.getElementById("shareStartTime"),
|
|
481
|
+
t = document.getElementById("shareEndTime");
|
|
482
|
+
n != null && t != null && (n.addEventListener("focusout", reloadEmbedData), t.addEventListener("focusout", reloadEmbedData), n.addEventListener("focusout", updatePartnerElement), t.addEventListener("focusout", updatePartnerElement), n.addEventListener("focusout", compareTimes), t.addEventListener("focusout", compareTimes))
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function updatePartnerElement(n) {
|
|
486
|
+
document.getElementById(n.target.dataset.partnerId).value = n.target.value;
|
|
487
|
+
reloadEmbedData()
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
function initInputMask() {
|
|
491
|
+
var n = document.getElementById("downloadStartTime"),
|
|
492
|
+
t = document.getElementById("downloadEndTime");
|
|
493
|
+
n != null && t != null && (n.addEventListener("keydown", inputMask), n.addEventListener("input", mobileMask), t.addEventListener("keydown", inputMask), t.addEventListener("input", mobileMask))
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
function initShareInputMask() {
|
|
497
|
+
var n = document.getElementById("shareStartTime"),
|
|
498
|
+
t = document.getElementById("shareEndTime");
|
|
499
|
+
n != null && t != null && (n.addEventListener("keydown", inputMask), n.addEventListener("input", mobileMask), t.addEventListener("keydown", inputMask), t.addEventListener("input", mobileMask))
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function mobileMask(n) {
|
|
503
|
+
var e = "00:00:00",
|
|
504
|
+
r = n.target.dataset.lastInput,
|
|
505
|
+
t, u, f, i;
|
|
506
|
+
if (androidInput) {
|
|
507
|
+
if (t = this.selectionStart, u = this.selectionEnd, t === u ? (f = n.target.value.substring(t - 1, u), t--) : f = n.target.value.substring(t, u), r !== n.target.value) {
|
|
508
|
+
if (i = parseInt(f), isNaN(i) || t === 8) {
|
|
509
|
+
n.target.value = r;
|
|
510
|
+
return
|
|
511
|
+
}
|
|
512
|
+
r.substring(t, t + 1) === ":" && (t++, u++);
|
|
513
|
+
n.target.value.substring(t + 1, t + 2) === ":" && (t++, u++);
|
|
514
|
+
t === 0 && i > 2 && (i = 2, parseInt(n.target.value.substr(t + 1, t + 2)) > 3 && i > 1 && (i = 1));
|
|
515
|
+
t === 1 && n.target.value.substr(0, 1) === "2" && i > 3 && (i = 3);
|
|
516
|
+
(t === 3 || t === 6 || t === 2 || t === 5) && i > 5 && (i = 5);
|
|
517
|
+
n.target.value = r.substring(0, t) + i + r.substring(u, r.length);
|
|
518
|
+
n.target.value += e.substr(n.target.value.length, e.length);
|
|
519
|
+
r = n.target.value;
|
|
520
|
+
n.target.dataset.lastInput = r;
|
|
521
|
+
this.selectionStart = t + 1;
|
|
522
|
+
this.selectionEnd = t + 1
|
|
523
|
+
}
|
|
524
|
+
androidInput = !1
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
function inputMask(n) {
|
|
529
|
+
var e = "00:00:00",
|
|
530
|
+
i = n.target.value,
|
|
531
|
+
t = this.selectionStart,
|
|
532
|
+
r = this.selectionEnd,
|
|
533
|
+
f = "",
|
|
534
|
+
u, o, s;
|
|
535
|
+
if (n.keyCode === 229) {
|
|
536
|
+
androidInput = !0;
|
|
537
|
+
return
|
|
538
|
+
}
|
|
539
|
+
n.keyCode < 41 && n.keyCode > 36 || (n.preventDefault(), n.keyCode === 8 && (t === r && t--, f = i.substring(0, t) + e.substring(t, r) + i.substring(r, i.length), ApplyMask(n.target, f, e, t)), n.keyCode === 46 && (t === r && n.keyCode === 46 && r++, f = i.substring(0, t) + e.substring(t, r) + i.substring(r, i.length), ApplyMask(n.target, f, e, r)), u = parseInt(n.key), isNaN(u)) || t !== 8 && (t === 0 && u > 2 && (u = 2), parseInt(i.substr(t + 1, t + 2)) > 3 && u > 1 && (u = 1), t === 1 && i.substr(0, 1) === "2" && u > 3 && (u = 3), (t === 3 || t === 6 || t === 2 || t === 5) && u > 5 && (u = 5), i.substring(t, t + 1) === ":" && (t++, r++), t === r ? f = i.substr(0, t) + u + i.substr(r + 1, i.length) : (o = u + e.substr(t + 1, r - 1), f = i.substring(0, t) + o, s = f.length, f += i.substr(s, 8)), ApplyMask(n.target, f, e, t + 1))
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
function ApplyMask(n, t, i, r) {
|
|
543
|
+
t += i.substr(t.length, i.length);
|
|
544
|
+
n.value = t;
|
|
545
|
+
n.selectionStart = r;
|
|
546
|
+
n.selectionEnd = n.selectionStart;
|
|
547
|
+
n.dataset.lastInput = n.value
|
|
548
|
+
}
|
|
549
|
+
var embedGenTimeoutId, eventPollingsInterval, androidInput;
|
|
550
|
+
$(function() {
|
|
551
|
+
resizePlayer();
|
|
552
|
+
setTimeout(function() {
|
|
553
|
+
resizePlayer()
|
|
554
|
+
}, 1e3);
|
|
555
|
+
$(window).resize(function() {
|
|
556
|
+
resizePlayer()
|
|
557
|
+
})
|
|
558
|
+
}),
|
|
559
|
+
function(n, t, i) {
|
|
560
|
+
function v(t, i) {
|
|
561
|
+
var u, f;
|
|
562
|
+
if (n.isArray(t)) {
|
|
563
|
+
for (u = t.length - 1; u >= 0; u--) f = t[u], n.type(f) === "string" && r.transports[f] || (i.log("Invalid transport: " + f + ", removing it from the transports list."), t.splice(u, 1));
|
|
564
|
+
t.length === 0 && (i.log("No transports remain within the specified transport array."), t = null)
|
|
565
|
+
} else if (r.transports[t] || t === "auto") {
|
|
566
|
+
if (t === "auto" && r._.ieVersion <= 8) return ["longPolling"]
|
|
567
|
+
} else i.log("Invalid transport: " + t.toString() + "."), t = null;
|
|
568
|
+
return t
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
function y(n) {
|
|
572
|
+
return n === "http:" ? 80 : n === "https:" ? 443 : void 0
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
function h(n, t) {
|
|
576
|
+
return t.match(/:\d+$/) ? t : t + ":" + y(n)
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
function p(t, i) {
|
|
580
|
+
var u = this,
|
|
581
|
+
r = [];
|
|
582
|
+
u.tryBuffer = function(i) {
|
|
583
|
+
return t.state === n.signalR.connectionState.connecting ? (r.push(i), !0) : !1
|
|
584
|
+
};
|
|
585
|
+
u.drain = function() {
|
|
586
|
+
if (t.state === n.signalR.connectionState.connected)
|
|
587
|
+
while (r.length > 0) i(r.shift())
|
|
588
|
+
};
|
|
589
|
+
u.clear = function() {
|
|
590
|
+
r = []
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
var f = {
|
|
594
|
+
nojQuery: "jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",
|
|
595
|
+
noTransportOnInit: "No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",
|
|
596
|
+
errorOnNegotiate: "Error during negotiation request.",
|
|
597
|
+
stoppedWhileLoading: "The connection was stopped during page load.",
|
|
598
|
+
stoppedWhileNegotiating: "The connection was stopped during the negotiate request.",
|
|
599
|
+
errorParsingNegotiateResponse: "Error parsing negotiate response.",
|
|
600
|
+
errorDuringStartRequest: "Error during start request. Stopping the connection.",
|
|
601
|
+
stoppedDuringStartRequest: "The connection was stopped during the start request.",
|
|
602
|
+
errorParsingStartResponse: "Error parsing start response: '{0}'. Stopping the connection.",
|
|
603
|
+
invalidStartResponse: "Invalid start response: '{0}'. Stopping the connection.",
|
|
604
|
+
protocolIncompatible: "You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",
|
|
605
|
+
sendFailed: "Send failed.",
|
|
606
|
+
parseFailed: "Failed at parsing response: {0}",
|
|
607
|
+
longPollFailed: "Long polling request failed.",
|
|
608
|
+
eventSourceFailedToConnect: "EventSource failed to connect.",
|
|
609
|
+
eventSourceError: "Error raised by EventSource",
|
|
610
|
+
webSocketClosed: "WebSocket closed.",
|
|
611
|
+
pingServerFailedInvalidResponse: "Invalid ping response when pinging server: '{0}'.",
|
|
612
|
+
pingServerFailed: "Failed to ping server.",
|
|
613
|
+
pingServerFailedStatusCode: "Failed to ping server. Server responded with status code {0}, stopping the connection.",
|
|
614
|
+
pingServerFailedParse: "Failed to parse ping server response, stopping the connection.",
|
|
615
|
+
noConnectionTransport: "Connection is in an invalid state, there is no transport active.",
|
|
616
|
+
webSocketsInvalidState: "The Web Socket transport is in an invalid state, transitioning into reconnecting.",
|
|
617
|
+
reconnectTimeout: "Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",
|
|
618
|
+
reconnectWindowTimeout: "The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."
|
|
619
|
+
};
|
|
620
|
+
if (typeof n != "function") throw new Error(f.nojQuery);
|
|
621
|
+
var r, c, s = t.document.readyState === "complete",
|
|
622
|
+
e = n(t),
|
|
623
|
+
l = "__Negotiate Aborted__",
|
|
624
|
+
u = {
|
|
625
|
+
onStart: "onStart",
|
|
626
|
+
onStarting: "onStarting",
|
|
627
|
+
onReceived: "onReceived",
|
|
628
|
+
onError: "onError",
|
|
629
|
+
onConnectionSlow: "onConnectionSlow",
|
|
630
|
+
onReconnecting: "onReconnecting",
|
|
631
|
+
onReconnect: "onReconnect",
|
|
632
|
+
onStateChanged: "onStateChanged",
|
|
633
|
+
onDisconnect: "onDisconnect"
|
|
634
|
+
},
|
|
635
|
+
w = function(n, i) {
|
|
636
|
+
if (i !== !1) {
|
|
637
|
+
var r;
|
|
638
|
+
typeof t.console != "undefined" && (r = "[" + (new Date).toTimeString() + "] SignalR: " + n, t.console.debug ? t.console.debug(r) : t.console.log && t.console.log(r))
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
o = function(t, i, r) {
|
|
642
|
+
return i === t.state ? (t.state = r, n(t).triggerHandler(u.onStateChanged, [{
|
|
643
|
+
oldState: i,
|
|
644
|
+
newState: r
|
|
645
|
+
}]), !0) : !1
|
|
646
|
+
},
|
|
647
|
+
b = function(n) {
|
|
648
|
+
return n.state === r.connectionState.disconnected
|
|
649
|
+
},
|
|
650
|
+
a = function(n) {
|
|
651
|
+
return n._.keepAliveData.activated && n.transport.supportsKeepAlive(n)
|
|
652
|
+
},
|
|
653
|
+
k = function(i) {
|
|
654
|
+
var f, e;
|
|
655
|
+
i._.configuredStopReconnectingTimeout || (e = function(t) {
|
|
656
|
+
var i = r._.format(r.resources.reconnectTimeout, t.disconnectTimeout);
|
|
657
|
+
t.log(i);
|
|
658
|
+
n(t).triggerHandler(u.onError, [r._.error(i, "TimeoutException")]);
|
|
659
|
+
t.stop(!1, !1)
|
|
660
|
+
}, i.reconnecting(function() {
|
|
661
|
+
var n = this;
|
|
662
|
+
n.state === r.connectionState.reconnecting && (f = t.setTimeout(function() {
|
|
663
|
+
e(n)
|
|
664
|
+
}, n.disconnectTimeout))
|
|
665
|
+
}), i.stateChanged(function(n) {
|
|
666
|
+
n.oldState === r.connectionState.reconnecting && t.clearTimeout(f)
|
|
667
|
+
}), i._.configuredStopReconnectingTimeout = !0)
|
|
668
|
+
};
|
|
669
|
+
r = function(n, t, i) {
|
|
670
|
+
return new r.fn.init(n, t, i)
|
|
671
|
+
};
|
|
672
|
+
r._ = {
|
|
673
|
+
defaultContentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
|
674
|
+
ieVersion: function() {
|
|
675
|
+
var i, n;
|
|
676
|
+
return t.navigator.appName === "Microsoft Internet Explorer" && (n = /MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent), n && (i = t.parseFloat(n[1]))), i
|
|
677
|
+
}(),
|
|
678
|
+
error: function(n, t, i) {
|
|
679
|
+
var r = new Error(n);
|
|
680
|
+
return r.source = t, typeof i != "undefined" && (r.context = i), r
|
|
681
|
+
},
|
|
682
|
+
transportError: function(n, t, r, u) {
|
|
683
|
+
var f = this.error(n, r, u);
|
|
684
|
+
return f.transport = t ? t.name : i, f
|
|
685
|
+
},
|
|
686
|
+
format: function() {
|
|
687
|
+
for (var t = arguments[0], n = 0; n < arguments.length - 1; n++) t = t.replace("{" + n + "}", arguments[n + 1]);
|
|
688
|
+
return t
|
|
689
|
+
},
|
|
690
|
+
firefoxMajorVersion: function(n) {
|
|
691
|
+
var t = n.match(/Firefox\/(\d+)/);
|
|
692
|
+
return !t || !t.length || t.length < 2 ? 0 : parseInt(t[1], 10)
|
|
693
|
+
},
|
|
694
|
+
configurePingInterval: function(i) {
|
|
695
|
+
var f = i._.config,
|
|
696
|
+
e = function(t) {
|
|
697
|
+
n(i).triggerHandler(u.onError, [t])
|
|
698
|
+
};
|
|
699
|
+
f && !i._.pingIntervalId && f.pingInterval && (i._.pingIntervalId = t.setInterval(function() {
|
|
700
|
+
r.transports._logic.pingServer(i).fail(e)
|
|
701
|
+
}, f.pingInterval))
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
r.events = u;
|
|
705
|
+
r.resources = f;
|
|
706
|
+
r.ajaxDefaults = {
|
|
707
|
+
processData: !0,
|
|
708
|
+
timeout: null,
|
|
709
|
+
async: !0,
|
|
710
|
+
global: !1,
|
|
711
|
+
cache: !1
|
|
712
|
+
};
|
|
713
|
+
r.changeState = o;
|
|
714
|
+
r.isDisconnecting = b;
|
|
715
|
+
r.connectionState = {
|
|
716
|
+
connecting: 0,
|
|
717
|
+
connected: 1,
|
|
718
|
+
reconnecting: 2,
|
|
719
|
+
disconnected: 4
|
|
720
|
+
};
|
|
721
|
+
r.hub = {
|
|
722
|
+
start: function() {
|
|
723
|
+
throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.");
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
e.load(function() {
|
|
727
|
+
s = !0
|
|
728
|
+
});
|
|
729
|
+
r.fn = r.prototype = {
|
|
730
|
+
init: function(t, i, r) {
|
|
731
|
+
var f = n(this);
|
|
732
|
+
this.url = t;
|
|
733
|
+
this.qs = i;
|
|
734
|
+
this.lastError = null;
|
|
735
|
+
this._ = {
|
|
736
|
+
keepAliveData: {},
|
|
737
|
+
connectingMessageBuffer: new p(this, function(n) {
|
|
738
|
+
f.triggerHandler(u.onReceived, [n])
|
|
739
|
+
}),
|
|
740
|
+
onFailedTimeoutHandle: null,
|
|
741
|
+
lastMessageAt: (new Date).getTime(),
|
|
742
|
+
lastActiveAt: (new Date).getTime(),
|
|
743
|
+
beatInterval: 5e3,
|
|
744
|
+
beatHandle: null,
|
|
745
|
+
totalTransportConnectTimeout: 0
|
|
746
|
+
};
|
|
747
|
+
typeof r == "boolean" && (this.logging = r)
|
|
748
|
+
},
|
|
749
|
+
_parseResponse: function(n) {
|
|
750
|
+
var t = this;
|
|
751
|
+
return n ? typeof n == "string" ? t.json.parse(n) : n : n
|
|
752
|
+
},
|
|
753
|
+
_originalJson: t.JSON,
|
|
754
|
+
json: t.JSON,
|
|
755
|
+
isCrossDomain: function(i, r) {
|
|
756
|
+
var u;
|
|
757
|
+
return (i = n.trim(i), r = r || t.location, i.indexOf("http") !== 0) ? !1 : (u = t.document.createElement("a"), u.href = i, u.protocol + h(u.protocol, u.host) !== r.protocol + h(r.protocol, r.host))
|
|
758
|
+
},
|
|
759
|
+
ajaxDataType: "text",
|
|
760
|
+
contentType: "application/json; charset=UTF-8",
|
|
761
|
+
logging: !1,
|
|
762
|
+
state: r.connectionState.disconnected,
|
|
763
|
+
clientProtocol: "1.4",
|
|
764
|
+
reconnectDelay: 2e3,
|
|
765
|
+
transportConnectTimeout: 0,
|
|
766
|
+
disconnectTimeout: 3e4,
|
|
767
|
+
reconnectWindow: 3e4,
|
|
768
|
+
keepAliveWarnAt: 2 / 3,
|
|
769
|
+
start: function(i, h) {
|
|
770
|
+
var c = this,
|
|
771
|
+
y = {
|
|
772
|
+
pingInterval: 3e5,
|
|
773
|
+
waitForPageLoad: !0,
|
|
774
|
+
transport: "auto",
|
|
775
|
+
jsonp: !1
|
|
776
|
+
},
|
|
777
|
+
d, p = c._deferral || n.Deferred(),
|
|
778
|
+
w = t.document.createElement("a"),
|
|
779
|
+
b, g;
|
|
780
|
+
if (c.lastError = null, c._deferral = p, !c.json) throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");
|
|
781
|
+
if (n.type(i) === "function" ? h = i : n.type(i) === "object" && (n.extend(y, i), n.type(y.callback) === "function" && (h = y.callback)), y.transport = v(y.transport, c), !y.transport) throw new Error("SignalR: Invalid transport(s) specified, aborting start.");
|
|
782
|
+
return (c._.config = y, !s && y.waitForPageLoad === !0) ? (c._.deferredStartHandler = function() {
|
|
783
|
+
c.start(i, h)
|
|
784
|
+
}, e.bind("load", c._.deferredStartHandler), p.promise()) : c.state === r.connectionState.connecting ? p.promise() : o(c, r.connectionState.disconnected, r.connectionState.connecting) === !1 ? (p.resolve(c), p.promise()) : (k(c), w.href = c.url, w.protocol && w.protocol !== ":" ? (c.protocol = w.protocol, c.host = w.host) : (c.protocol = t.document.location.protocol, c.host = w.host || t.document.location.host), c.baseUrl = c.protocol + "//" + c.host, c.wsProtocol = c.protocol === "https:" ? "wss://" : "ws://", y.transport === "auto" && y.jsonp === !0 && (y.transport = "longPolling"), c.url.indexOf("//") === 0 && (c.url = t.location.protocol + c.url, c.log("Protocol relative URL detected, normalizing it to '" + c.url + "'.")), this.isCrossDomain(c.url) && (c.log("Auto detected cross domain url."), y.transport === "auto" && (y.transport = ["webSockets", "serverSentEvents", "longPolling"]), typeof y.withCredentials == "undefined" && (y.withCredentials = !0), y.jsonp || (y.jsonp = !n.support.cors, y.jsonp && c.log("Using jsonp because this browser doesn't support CORS.")), c.contentType = r._.defaultContentType), c.withCredentials = y.withCredentials, c.ajaxDataType = y.jsonp ? "jsonp" : "text", n(c).bind(u.onStart, function() {
|
|
785
|
+
n.type(h) === "function" && h.call(c);
|
|
786
|
+
p.resolve(c)
|
|
787
|
+
}), d = function(i, s) {
|
|
788
|
+
var y = r._.error(f.noTransportOnInit);
|
|
789
|
+
if (s = s || 0, s >= i.length) {
|
|
790
|
+
n(c).triggerHandler(u.onError, [y]);
|
|
791
|
+
p.reject(y);
|
|
792
|
+
c.stop();
|
|
793
|
+
return
|
|
794
|
+
}
|
|
795
|
+
if (c.state !== r.connectionState.disconnected) {
|
|
796
|
+
var w = i[s],
|
|
797
|
+
h = r.transports[w],
|
|
798
|
+
l = !1,
|
|
799
|
+
v = function() {
|
|
800
|
+
l || (l = !0, t.clearTimeout(c._.onFailedTimeoutHandle), h.stop(c), d(i, s + 1))
|
|
801
|
+
};
|
|
802
|
+
c.transport = h;
|
|
803
|
+
try {
|
|
804
|
+
c._.onFailedTimeoutHandle = t.setTimeout(function() {
|
|
805
|
+
c.log(h.name + " timed out when trying to connect.");
|
|
806
|
+
v()
|
|
807
|
+
}, c._.totalTransportConnectTimeout);
|
|
808
|
+
h.start(c, function() {
|
|
809
|
+
var i = function() {
|
|
810
|
+
var i = r._.firefoxMajorVersion(t.navigator.userAgent) >= 11,
|
|
811
|
+
f = !!c.withCredentials && i;
|
|
812
|
+
c.log("The start request succeeded. Transitioning to the connected state.");
|
|
813
|
+
a(c) && r.transports._logic.monitorKeepAlive(c);
|
|
814
|
+
r.transports._logic.startHeartbeat(c);
|
|
815
|
+
r._.configurePingInterval(c);
|
|
816
|
+
o(c, r.connectionState.connecting, r.connectionState.connected) || c.log("WARNING! The connection was not in the connecting state.");
|
|
817
|
+
c._.connectingMessageBuffer.drain();
|
|
818
|
+
n(c).triggerHandler(u.onStart);
|
|
819
|
+
e.bind("unload", function() {
|
|
820
|
+
c.log("Window unloading, stopping the connection.");
|
|
821
|
+
c.stop(f)
|
|
822
|
+
});
|
|
823
|
+
i && e.bind("beforeunload", function() {
|
|
824
|
+
t.setTimeout(function() {
|
|
825
|
+
c.stop(f)
|
|
826
|
+
}, 0)
|
|
827
|
+
})
|
|
828
|
+
};
|
|
829
|
+
if (!l) {
|
|
830
|
+
if (l = !0, t.clearTimeout(c._.onFailedTimeoutHandle), c.state === r.connectionState.disconnected) return;
|
|
831
|
+
c.log(h.name + " transport selected. Initiating start request.");
|
|
832
|
+
r.transports._logic.ajaxStart(c, i)
|
|
833
|
+
}
|
|
834
|
+
}, v)
|
|
835
|
+
} catch (b) {
|
|
836
|
+
c.log(h.name + " transport threw '" + b.message + "' when attempting to start.");
|
|
837
|
+
v()
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}, b = c.url + "/negotiate", g = function(t, i) {
|
|
841
|
+
var e = r._.error(f.errorOnNegotiate, t, i._.negotiateRequest);
|
|
842
|
+
n(i).triggerHandler(u.onError, e);
|
|
843
|
+
p.reject(e);
|
|
844
|
+
i.stop()
|
|
845
|
+
}, n(c).triggerHandler(u.onStarting), b = r.transports._logic.prepareQueryString(c, b), c.log("Negotiating with '" + b + "'."), c._.negotiateRequest = r.transports._logic.ajax(c, {
|
|
846
|
+
url: b,
|
|
847
|
+
error: function(n, t) {
|
|
848
|
+
t !== l ? g(n, c) : p.reject(r._.error(f.stoppedWhileNegotiating, null, c._.negotiateRequest))
|
|
849
|
+
},
|
|
850
|
+
success: function(t) {
|
|
851
|
+
var i, e, h, o = [],
|
|
852
|
+
s = [];
|
|
853
|
+
try {
|
|
854
|
+
i = c._parseResponse(t)
|
|
855
|
+
} catch (l) {
|
|
856
|
+
g(r._.error(f.errorParsingNegotiateResponse, l), c);
|
|
857
|
+
return
|
|
858
|
+
}
|
|
859
|
+
if (e = c._.keepAliveData, c.appRelativeUrl = i.Url, c.id = i.ConnectionId, c.token = i.ConnectionToken, c.webSocketServerUrl = i.WebSocketServerUrl, c._.longPollDelay = i.LongPollDelay * 1e3, c.disconnectTimeout = i.DisconnectTimeout * 1e3, c._.totalTransportConnectTimeout = c.transportConnectTimeout + i.TransportConnectTimeout * 1e3, i.KeepAliveTimeout ? (e.activated = !0, e.timeout = i.KeepAliveTimeout * 1e3, e.timeoutWarning = e.timeout * c.keepAliveWarnAt, c._.beatInterval = (e.timeout - e.timeoutWarning) / 3) : e.activated = !1, c.reconnectWindow = c.disconnectTimeout + (e.timeout || 0), !i.ProtocolVersion || i.ProtocolVersion !== c.clientProtocol) {
|
|
860
|
+
h = r._.error(r._.format(f.protocolIncompatible, c.clientProtocol, i.ProtocolVersion));
|
|
861
|
+
n(c).triggerHandler(u.onError, [h]);
|
|
862
|
+
p.reject(h);
|
|
863
|
+
return
|
|
864
|
+
}
|
|
865
|
+
n.each(r.transports, function(n) {
|
|
866
|
+
if (n.indexOf("_") === 0 || n === "webSockets" && !i.TryWebSockets) return !0;
|
|
867
|
+
s.push(n)
|
|
868
|
+
});
|
|
869
|
+
n.isArray(y.transport) ? n.each(y.transport, function(t, i) {
|
|
870
|
+
n.inArray(i, s) >= 0 && o.push(i)
|
|
871
|
+
}) : y.transport === "auto" ? o = s : n.inArray(y.transport, s) >= 0 && o.push(y.transport);
|
|
872
|
+
d(o)
|
|
873
|
+
}
|
|
874
|
+
}), p.promise())
|
|
875
|
+
},
|
|
876
|
+
starting: function(t) {
|
|
877
|
+
var i = this;
|
|
878
|
+
return n(i).bind(u.onStarting, function() {
|
|
879
|
+
t.call(i)
|
|
880
|
+
}), i
|
|
881
|
+
},
|
|
882
|
+
send: function(n) {
|
|
883
|
+
var t = this;
|
|
884
|
+
if (t.state === r.connectionState.disconnected) throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");
|
|
885
|
+
if (t.state === r.connectionState.connecting) throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");
|
|
886
|
+
return t.transport.send(t, n), t
|
|
887
|
+
},
|
|
888
|
+
received: function(t) {
|
|
889
|
+
var i = this;
|
|
890
|
+
return n(i).bind(u.onReceived, function(n, r) {
|
|
891
|
+
t.call(i, r)
|
|
892
|
+
}), i
|
|
893
|
+
},
|
|
894
|
+
stateChanged: function(t) {
|
|
895
|
+
var i = this;
|
|
896
|
+
return n(i).bind(u.onStateChanged, function(n, r) {
|
|
897
|
+
t.call(i, r)
|
|
898
|
+
}), i
|
|
899
|
+
},
|
|
900
|
+
error: function(t) {
|
|
901
|
+
var i = this;
|
|
902
|
+
return n(i).bind(u.onError, function(n, r, u) {
|
|
903
|
+
i.lastError = r;
|
|
904
|
+
t.call(i, r, u)
|
|
905
|
+
}), i
|
|
906
|
+
},
|
|
907
|
+
disconnected: function(t) {
|
|
908
|
+
var i = this;
|
|
909
|
+
return n(i).bind(u.onDisconnect, function() {
|
|
910
|
+
t.call(i)
|
|
911
|
+
}), i
|
|
912
|
+
},
|
|
913
|
+
connectionSlow: function(t) {
|
|
914
|
+
var i = this;
|
|
915
|
+
return n(i).bind(u.onConnectionSlow, function() {
|
|
916
|
+
t.call(i)
|
|
917
|
+
}), i
|
|
918
|
+
},
|
|
919
|
+
reconnecting: function(t) {
|
|
920
|
+
var i = this;
|
|
921
|
+
return n(i).bind(u.onReconnecting, function() {
|
|
922
|
+
t.call(i)
|
|
923
|
+
}), i
|
|
924
|
+
},
|
|
925
|
+
reconnected: function(t) {
|
|
926
|
+
var i = this;
|
|
927
|
+
return n(i).bind(u.onReconnect, function() {
|
|
928
|
+
t.call(i)
|
|
929
|
+
}), i
|
|
930
|
+
},
|
|
931
|
+
stop: function(i, h) {
|
|
932
|
+
var c = this,
|
|
933
|
+
v = c._deferral;
|
|
934
|
+
if (c._.deferredStartHandler && e.unbind("load", c._.deferredStartHandler), delete c._.config, delete c._.deferredStartHandler, !s && (!c._.config || c._.config.waitForPageLoad === !0)) {
|
|
935
|
+
c.log("Stopping connection prior to negotiate.");
|
|
936
|
+
v && v.reject(r._.error(f.stoppedWhileLoading));
|
|
937
|
+
return
|
|
938
|
+
}
|
|
939
|
+
if (c.state !== r.connectionState.disconnected) return c.log("Stopping connection."), o(c, c.state, r.connectionState.disconnected), t.clearTimeout(c._.beatHandle), t.clearTimeout(c._.onFailedTimeoutHandle), t.clearInterval(c._.pingIntervalId), c.transport && (c.transport.stop(c), h !== !1 && c.transport.abort(c, i), a(c) && r.transports._logic.stopMonitoringKeepAlive(c), c.transport = null), c._.negotiateRequest && (c._.negotiateRequest.abort(l), delete c._.negotiateRequest), r.transports._logic.tryAbortStartRequest(c), n(c).triggerHandler(u.onDisconnect), delete c._deferral, delete c.messageId, delete c.groupsToken, delete c.id, delete c._.pingIntervalId, delete c._.lastMessageAt, delete c._.lastActiveAt, delete c._.longPollDelay, c._.connectingMessageBuffer.clear(), c
|
|
940
|
+
},
|
|
941
|
+
log: function(n) {
|
|
942
|
+
w(n, this.logging)
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
r.fn.init.prototype = r.fn;
|
|
946
|
+
r.noConflict = function() {
|
|
947
|
+
return n.connection === r && (n.connection = c), r
|
|
948
|
+
};
|
|
949
|
+
n.connection && (c = n.connection);
|
|
950
|
+
n.connection = n.signalR = r
|
|
951
|
+
}(window.jQuery, window),
|
|
952
|
+
function(n, t) {
|
|
953
|
+
function e(n) {
|
|
954
|
+
n._.keepAliveData.monitoring && s(n);
|
|
955
|
+
r.markActive(n) && (n._.beatHandle = t.setTimeout(function() {
|
|
956
|
+
e(n)
|
|
957
|
+
}, n._.beatInterval))
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
function s(t) {
|
|
961
|
+
var r = t._.keepAliveData,
|
|
962
|
+
f;
|
|
963
|
+
t.state === i.connectionState.connected && (f = (new Date).getTime() - t._.lastMessageAt, f >= r.timeout ? (t.log("Keep alive timed out. Notifying transport that connection has been lost."), t.transport.lostConnection(t)) : f >= r.timeoutWarning ? r.userNotified || (t.log("Keep alive has been missed, connection may be dead/slow."), n(t).triggerHandler(u.onConnectionSlow), r.userNotified = !0) : r.userNotified = !1)
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
function f(n, t) {
|
|
967
|
+
var i = n.url + t;
|
|
968
|
+
return n.transport && (i += "?transport=" + n.transport.name), r.prepareQueryString(n, i)
|
|
969
|
+
}
|
|
970
|
+
var i = n.signalR,
|
|
971
|
+
u = n.signalR.events,
|
|
972
|
+
h = n.signalR.changeState,
|
|
973
|
+
o = "__Start Aborted__",
|
|
974
|
+
r;
|
|
975
|
+
i.transports = {};
|
|
976
|
+
r = i.transports._logic = {
|
|
977
|
+
ajax: function(t, i) {
|
|
978
|
+
return n.ajax(n.extend(!0, {}, n.signalR.ajaxDefaults, {
|
|
979
|
+
type: "GET",
|
|
980
|
+
data: {},
|
|
981
|
+
xhrFields: {
|
|
982
|
+
withCredentials: t.withCredentials
|
|
983
|
+
},
|
|
984
|
+
contentType: t.contentType,
|
|
985
|
+
dataType: t.ajaxDataType
|
|
986
|
+
}, i))
|
|
987
|
+
},
|
|
988
|
+
pingServer: function(t) {
|
|
989
|
+
var e, f, u = n.Deferred();
|
|
990
|
+
return t.transport ? (e = t.url + "/ping", e = r.addQs(e, t.qs), f = r.ajax(t, {
|
|
991
|
+
url: e,
|
|
992
|
+
success: function(n) {
|
|
993
|
+
var r;
|
|
994
|
+
try {
|
|
995
|
+
r = t._parseResponse(n)
|
|
996
|
+
} catch (e) {
|
|
997
|
+
u.reject(i._.transportError(i.resources.pingServerFailedParse, t.transport, e, f));
|
|
998
|
+
t.stop();
|
|
999
|
+
return
|
|
1000
|
+
}
|
|
1001
|
+
r.Response === "pong" ? u.resolve() : u.reject(i._.transportError(i._.format(i.resources.pingServerFailedInvalidResponse, n), t.transport, null, f))
|
|
1002
|
+
},
|
|
1003
|
+
error: function(n) {
|
|
1004
|
+
n.status === 401 || n.status === 403 ? (u.reject(i._.transportError(i._.format(i.resources.pingServerFailedStatusCode, n.status), t.transport, n, f)), t.stop()) : u.reject(i._.transportError(i.resources.pingServerFailed, t.transport, n, f))
|
|
1005
|
+
}
|
|
1006
|
+
})) : u.reject(i._.transportError(i.resources.noConnectionTransport, t.transport)), u.promise()
|
|
1007
|
+
},
|
|
1008
|
+
prepareQueryString: function(n, i) {
|
|
1009
|
+
var u;
|
|
1010
|
+
return u = r.addQs(i, "clientProtocol=" + n.clientProtocol), u = r.addQs(u, n.qs), n.token && (u += "&connectionToken=" + t.encodeURIComponent(n.token)), n.data && (u += "&connectionData=" + t.encodeURIComponent(n.data)), u
|
|
1011
|
+
},
|
|
1012
|
+
addQs: function(t, i) {
|
|
1013
|
+
var r = t.indexOf("?") !== -1 ? "&" : "?",
|
|
1014
|
+
u;
|
|
1015
|
+
if (!i) return t;
|
|
1016
|
+
if (typeof i == "object") return t + r + n.param(i);
|
|
1017
|
+
if (typeof i == "string") return u = i.charAt(0), (u === "?" || u === "&") && (r = ""), t + r + i;
|
|
1018
|
+
throw new Error("Query string property must be either a string or object.");
|
|
1019
|
+
},
|
|
1020
|
+
getUrl: function(n, i, u, f) {
|
|
1021
|
+
var s = i === "webSockets" ? "" : n.baseUrl,
|
|
1022
|
+
e = s + n.appRelativeUrl,
|
|
1023
|
+
o = "transport=" + i;
|
|
1024
|
+
return n.groupsToken && (o += "&groupsToken=" + t.encodeURIComponent(n.groupsToken)), u ? (e += f ? "/poll" : "/reconnect", n.messageId && (o += "&messageId=" + t.encodeURIComponent(n.messageId))) : e += "/connect", e += "?" + o, e = r.prepareQueryString(n, e), e + ("&tid=" + Math.floor(Math.random() * 11))
|
|
1025
|
+
},
|
|
1026
|
+
maximizePersistentResponse: function(n) {
|
|
1027
|
+
return {
|
|
1028
|
+
MessageId: n.C,
|
|
1029
|
+
Messages: n.M,
|
|
1030
|
+
Initialized: typeof n.S != "undefined" ? !0 : !1,
|
|
1031
|
+
Disconnect: typeof n.D != "undefined" ? !0 : !1,
|
|
1032
|
+
ShouldReconnect: typeof n.T != "undefined" ? !0 : !1,
|
|
1033
|
+
LongPollDelay: n.L,
|
|
1034
|
+
GroupsToken: n.G
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
updateGroups: function(n, t) {
|
|
1038
|
+
t && (n.groupsToken = t)
|
|
1039
|
+
},
|
|
1040
|
+
stringifySend: function(n, t) {
|
|
1041
|
+
return typeof t == "string" || typeof t == "undefined" || t === null ? t : n.json.stringify(t)
|
|
1042
|
+
},
|
|
1043
|
+
ajaxSend: function(t, e) {
|
|
1044
|
+
var h = r.stringifySend(t, e),
|
|
1045
|
+
c = f(t, "/send"),
|
|
1046
|
+
o, s = function(t, r) {
|
|
1047
|
+
n(r).triggerHandler(u.onError, [i._.transportError(i.resources.sendFailed, r.transport, t, o), e])
|
|
1048
|
+
};
|
|
1049
|
+
return o = r.ajax(t, {
|
|
1050
|
+
url: c,
|
|
1051
|
+
type: t.ajaxDataType === "jsonp" ? "GET" : "POST",
|
|
1052
|
+
contentType: i._.defaultContentType,
|
|
1053
|
+
data: {
|
|
1054
|
+
data: h
|
|
1055
|
+
},
|
|
1056
|
+
success: function(n) {
|
|
1057
|
+
var i;
|
|
1058
|
+
if (n) {
|
|
1059
|
+
try {
|
|
1060
|
+
i = t._parseResponse(n)
|
|
1061
|
+
} catch (u) {
|
|
1062
|
+
s(u, t);
|
|
1063
|
+
t.stop();
|
|
1064
|
+
return
|
|
1065
|
+
}
|
|
1066
|
+
r.triggerReceived(t, i)
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
error: function(n, i) {
|
|
1070
|
+
i !== "abort" && i !== "parsererror" && s(n, t)
|
|
1071
|
+
}
|
|
1072
|
+
})
|
|
1073
|
+
},
|
|
1074
|
+
ajaxAbort: function(n, t) {
|
|
1075
|
+
if (typeof n.transport != "undefined") {
|
|
1076
|
+
t = typeof t == "undefined" ? !0 : t;
|
|
1077
|
+
var i = f(n, "/abort");
|
|
1078
|
+
r.ajax(n, {
|
|
1079
|
+
url: i,
|
|
1080
|
+
async: t,
|
|
1081
|
+
timeout: 1e3,
|
|
1082
|
+
type: "POST"
|
|
1083
|
+
});
|
|
1084
|
+
n.log("Fired ajax abort async = " + t + ".")
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
ajaxStart: function(t, e) {
|
|
1088
|
+
var h = function(n) {
|
|
1089
|
+
var i = t._deferral;
|
|
1090
|
+
i && i.reject(n)
|
|
1091
|
+
},
|
|
1092
|
+
s = function(i) {
|
|
1093
|
+
t.log("The start request failed. Stopping the connection.");
|
|
1094
|
+
n(t).triggerHandler(u.onError, [i]);
|
|
1095
|
+
h(i);
|
|
1096
|
+
t.stop()
|
|
1097
|
+
};
|
|
1098
|
+
t._.startRequest = r.ajax(t, {
|
|
1099
|
+
url: f(t, "/start"),
|
|
1100
|
+
success: function(n, r, u) {
|
|
1101
|
+
var f;
|
|
1102
|
+
try {
|
|
1103
|
+
f = t._parseResponse(n)
|
|
1104
|
+
} catch (o) {
|
|
1105
|
+
s(i._.error(i._.format(i.resources.errorParsingStartResponse, n), o, u));
|
|
1106
|
+
return
|
|
1107
|
+
}
|
|
1108
|
+
f.Response === "started" ? e() : s(i._.error(i._.format(i.resources.invalidStartResponse, n), null, u))
|
|
1109
|
+
},
|
|
1110
|
+
error: function(n, r, u) {
|
|
1111
|
+
r !== o ? s(i._.error(i.resources.errorDuringStartRequest, u, n)) : (t.log("The start request aborted because connection.stop() was called."), h(i._.error(i.resources.stoppedDuringStartRequest, null, n)))
|
|
1112
|
+
}
|
|
1113
|
+
})
|
|
1114
|
+
},
|
|
1115
|
+
tryAbortStartRequest: function(n) {
|
|
1116
|
+
n._.startRequest && (n._.startRequest.abort(o), delete n._.startRequest)
|
|
1117
|
+
},
|
|
1118
|
+
tryInitialize: function(n, t) {
|
|
1119
|
+
n.Initialized && t()
|
|
1120
|
+
},
|
|
1121
|
+
triggerReceived: function(t, i) {
|
|
1122
|
+
t._.connectingMessageBuffer.tryBuffer(i) || n(t).triggerHandler(u.onReceived, [i])
|
|
1123
|
+
},
|
|
1124
|
+
processMessages: function(t, i, u) {
|
|
1125
|
+
var f;
|
|
1126
|
+
r.markLastMessage(t);
|
|
1127
|
+
i && (f = r.maximizePersistentResponse(i), r.updateGroups(t, f.GroupsToken), f.MessageId && (t.messageId = f.MessageId), f.Messages && (n.each(f.Messages, function(n, i) {
|
|
1128
|
+
r.triggerReceived(t, i)
|
|
1129
|
+
}), r.tryInitialize(f, u)))
|
|
1130
|
+
},
|
|
1131
|
+
monitorKeepAlive: function(t) {
|
|
1132
|
+
var i = t._.keepAliveData;
|
|
1133
|
+
i.monitoring ? t.log("Tried to monitor keep alive but it's already being monitored.") : (i.monitoring = !0, r.markLastMessage(t), t._.keepAliveData.reconnectKeepAliveUpdate = function() {
|
|
1134
|
+
r.markLastMessage(t)
|
|
1135
|
+
}, n(t).bind(u.onReconnect, t._.keepAliveData.reconnectKeepAliveUpdate), t.log("Now monitoring keep alive with a warning timeout of " + i.timeoutWarning + " and a connection lost timeout of " + i.timeout + "."))
|
|
1136
|
+
},
|
|
1137
|
+
stopMonitoringKeepAlive: function(t) {
|
|
1138
|
+
var i = t._.keepAliveData;
|
|
1139
|
+
i.monitoring && (i.monitoring = !1, n(t).unbind(u.onReconnect, t._.keepAliveData.reconnectKeepAliveUpdate), t._.keepAliveData = {}, t.log("Stopping the monitoring of the keep alive."))
|
|
1140
|
+
},
|
|
1141
|
+
startHeartbeat: function(n) {
|
|
1142
|
+
n._.lastActiveAt = (new Date).getTime();
|
|
1143
|
+
e(n)
|
|
1144
|
+
},
|
|
1145
|
+
markLastMessage: function(n) {
|
|
1146
|
+
n._.lastMessageAt = (new Date).getTime()
|
|
1147
|
+
},
|
|
1148
|
+
markActive: function(n) {
|
|
1149
|
+
return r.verifyLastActive(n) ? (n._.lastActiveAt = (new Date).getTime(), !0) : !1
|
|
1150
|
+
},
|
|
1151
|
+
isConnectedOrReconnecting: function(n) {
|
|
1152
|
+
return n.state === i.connectionState.connected || n.state === i.connectionState.reconnecting
|
|
1153
|
+
},
|
|
1154
|
+
ensureReconnectingState: function(t) {
|
|
1155
|
+
return h(t, i.connectionState.connected, i.connectionState.reconnecting) === !0 && n(t).triggerHandler(u.onReconnecting), t.state === i.connectionState.reconnecting
|
|
1156
|
+
},
|
|
1157
|
+
clearReconnectTimeout: function(n) {
|
|
1158
|
+
n && n._.reconnectTimeout && (t.clearTimeout(n._.reconnectTimeout), delete n._.reconnectTimeout)
|
|
1159
|
+
},
|
|
1160
|
+
verifyLastActive: function(t) {
|
|
1161
|
+
if ((new Date).getTime() - t._.lastActiveAt >= t.reconnectWindow) {
|
|
1162
|
+
var r = i._.format(i.resources.reconnectWindowTimeout, new Date(t._.lastActiveAt), t.reconnectWindow);
|
|
1163
|
+
return t.log(r), n(t).triggerHandler(u.onError, [i._.error(r, "TimeoutException")]), t.stop(!1, !1), !1
|
|
1164
|
+
}
|
|
1165
|
+
return !0
|
|
1166
|
+
},
|
|
1167
|
+
reconnect: function(n, u) {
|
|
1168
|
+
var f = i.transports[u];
|
|
1169
|
+
if (r.isConnectedOrReconnecting(n) && !n._.reconnectTimeout) {
|
|
1170
|
+
if (!r.verifyLastActive(n)) return;
|
|
1171
|
+
n._.reconnectTimeout = t.setTimeout(function() {
|
|
1172
|
+
r.verifyLastActive(n) && (f.stop(n), r.ensureReconnectingState(n) && (n.log(u + " reconnecting."), f.start(n)))
|
|
1173
|
+
}, n.reconnectDelay)
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
handleParseFailure: function(t, r, f, e, o) {
|
|
1177
|
+
t.state === i.connectionState.connecting ? (t.log("Failed to parse server response while attempting to connect."), e()) : (n(t).triggerHandler(u.onError, [i._.transportError(i._.format(i.resources.parseFailed, r), t.transport, f, o)]), t.stop())
|
|
1178
|
+
},
|
|
1179
|
+
foreverFrame: {
|
|
1180
|
+
count: 0,
|
|
1181
|
+
connections: {}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}(window.jQuery, window),
|
|
1185
|
+
function(n, t) {
|
|
1186
|
+
var r = n.signalR,
|
|
1187
|
+
u = n.signalR.events,
|
|
1188
|
+
f = n.signalR.changeState,
|
|
1189
|
+
i = r.transports._logic;
|
|
1190
|
+
r.transports.webSockets = {
|
|
1191
|
+
name: "webSockets",
|
|
1192
|
+
supportsKeepAlive: function() {
|
|
1193
|
+
return !0
|
|
1194
|
+
},
|
|
1195
|
+
send: function(t, f) {
|
|
1196
|
+
var e = i.stringifySend(t, f);
|
|
1197
|
+
try {
|
|
1198
|
+
t.socket.send(e)
|
|
1199
|
+
} catch (o) {
|
|
1200
|
+
n(t).triggerHandler(u.onError, [r._.transportError(r.resources.webSocketsInvalidState, t.transport, o, t.socket), f])
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
start: function(e, o, s) {
|
|
1204
|
+
var h, c = !1,
|
|
1205
|
+
l = this,
|
|
1206
|
+
a = !o,
|
|
1207
|
+
v = n(e);
|
|
1208
|
+
if (!t.WebSocket) {
|
|
1209
|
+
s();
|
|
1210
|
+
return
|
|
1211
|
+
}
|
|
1212
|
+
e.socket || (h = e.webSocketServerUrl ? e.webSocketServerUrl : e.wsProtocol + e.host, h += i.getUrl(e, this.name, a), e.log("Connecting to websocket endpoint '" + h + "'."), e.socket = new t.WebSocket(h), e.socket.onopen = function() {
|
|
1213
|
+
c = !0;
|
|
1214
|
+
e.log("Websocket opened.");
|
|
1215
|
+
i.clearReconnectTimeout(e);
|
|
1216
|
+
f(e, r.connectionState.reconnecting, r.connectionState.connected) === !0 && v.triggerHandler(u.onReconnect)
|
|
1217
|
+
}, e.socket.onclose = function(t) {
|
|
1218
|
+
if (this === e.socket) {
|
|
1219
|
+
if (c) typeof t.wasClean != "undefined" && t.wasClean === !1 ? (n(e).triggerHandler(u.onError, [r._.transportError(r.resources.webSocketClosed, e.transport, t)]), e.log("Unclean disconnect from websocket: " + t.reason || "[no reason given].")) : e.log("Websocket closed.");
|
|
1220
|
+
else {
|
|
1221
|
+
s ? s() : a && l.reconnect(e);
|
|
1222
|
+
return
|
|
1223
|
+
}
|
|
1224
|
+
l.reconnect(e)
|
|
1225
|
+
}
|
|
1226
|
+
}, e.socket.onmessage = function(t) {
|
|
1227
|
+
var r;
|
|
1228
|
+
try {
|
|
1229
|
+
r = e._parseResponse(t.data)
|
|
1230
|
+
} catch (u) {
|
|
1231
|
+
i.handleParseFailure(e, t.data, u, s, t);
|
|
1232
|
+
return
|
|
1233
|
+
}
|
|
1234
|
+
r && (n.isEmptyObject(r) || r.M ? i.processMessages(e, r, o) : i.triggerReceived(e, r))
|
|
1235
|
+
})
|
|
1236
|
+
},
|
|
1237
|
+
reconnect: function(n) {
|
|
1238
|
+
i.reconnect(n, this.name)
|
|
1239
|
+
},
|
|
1240
|
+
lostConnection: function(n) {
|
|
1241
|
+
this.reconnect(n)
|
|
1242
|
+
},
|
|
1243
|
+
stop: function(n) {
|
|
1244
|
+
i.clearReconnectTimeout(n);
|
|
1245
|
+
n.socket && (n.log("Closing the Websocket."), n.socket.close(), n.socket = null)
|
|
1246
|
+
},
|
|
1247
|
+
abort: function(n, t) {
|
|
1248
|
+
i.ajaxAbort(n, t)
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}(window.jQuery, window),
|
|
1252
|
+
function(n, t) {
|
|
1253
|
+
var i = n.signalR,
|
|
1254
|
+
u = n.signalR.events,
|
|
1255
|
+
e = n.signalR.changeState,
|
|
1256
|
+
r = i.transports._logic,
|
|
1257
|
+
f = function(n) {
|
|
1258
|
+
t.clearTimeout(n._.reconnectAttemptTimeoutHandle);
|
|
1259
|
+
delete n._.reconnectAttemptTimeoutHandle
|
|
1260
|
+
};
|
|
1261
|
+
i.transports.serverSentEvents = {
|
|
1262
|
+
name: "serverSentEvents",
|
|
1263
|
+
supportsKeepAlive: function() {
|
|
1264
|
+
return !0
|
|
1265
|
+
},
|
|
1266
|
+
timeOut: 3e3,
|
|
1267
|
+
start: function(o, s, h) {
|
|
1268
|
+
var c = this,
|
|
1269
|
+
l = !1,
|
|
1270
|
+
a = n(o),
|
|
1271
|
+
v = !s,
|
|
1272
|
+
y;
|
|
1273
|
+
if (o.eventSource && (o.log("The connection already has an event source. Stopping it."), o.stop()), !t.EventSource) {
|
|
1274
|
+
h && (o.log("This browser doesn't support SSE."), h());
|
|
1275
|
+
return
|
|
1276
|
+
}
|
|
1277
|
+
y = r.getUrl(o, this.name, v);
|
|
1278
|
+
try {
|
|
1279
|
+
o.log("Attempting to connect to SSE endpoint '" + y + "'.");
|
|
1280
|
+
o.eventSource = new t.EventSource(y, {
|
|
1281
|
+
withCredentials: o.withCredentials
|
|
1282
|
+
})
|
|
1283
|
+
} catch (p) {
|
|
1284
|
+
o.log("EventSource failed trying to connect with error " + p.Message + ".");
|
|
1285
|
+
h ? h() : (a.triggerHandler(u.onError, [i._.transportError(i.resources.eventSourceFailedToConnect, o.transport, p)]), v && c.reconnect(o));
|
|
1286
|
+
return
|
|
1287
|
+
}
|
|
1288
|
+
v && (o._.reconnectAttemptTimeoutHandle = t.setTimeout(function() {
|
|
1289
|
+
l === !1 && o.eventSource.readyState !== t.EventSource.OPEN && c.reconnect(o)
|
|
1290
|
+
}, c.timeOut));
|
|
1291
|
+
o.eventSource.addEventListener("open", function() {
|
|
1292
|
+
o.log("EventSource connected.");
|
|
1293
|
+
f(o);
|
|
1294
|
+
r.clearReconnectTimeout(o);
|
|
1295
|
+
l === !1 && (l = !0, e(o, i.connectionState.reconnecting, i.connectionState.connected) === !0 && a.triggerHandler(u.onReconnect))
|
|
1296
|
+
}, !1);
|
|
1297
|
+
o.eventSource.addEventListener("message", function(n) {
|
|
1298
|
+
var t;
|
|
1299
|
+
if (n.data !== "initialized") {
|
|
1300
|
+
try {
|
|
1301
|
+
t = o._parseResponse(n.data)
|
|
1302
|
+
} catch (i) {
|
|
1303
|
+
r.handleParseFailure(o, n.data, i, h, n);
|
|
1304
|
+
return
|
|
1305
|
+
}
|
|
1306
|
+
r.processMessages(o, t, s)
|
|
1307
|
+
}
|
|
1308
|
+
}, !1);
|
|
1309
|
+
o.eventSource.addEventListener("error", function(n) {
|
|
1310
|
+
if (this === o.eventSource) {
|
|
1311
|
+
if (!l) {
|
|
1312
|
+
h && h();
|
|
1313
|
+
return
|
|
1314
|
+
}
|
|
1315
|
+
o.log("EventSource readyState: " + o.eventSource.readyState + ".");
|
|
1316
|
+
n.eventPhase === t.EventSource.CLOSED ? (o.log("EventSource reconnecting due to the server connection ending."), c.reconnect(o)) : (o.log("EventSource error."), a.triggerHandler(u.onError, [i._.transportError(i.resources.eventSourceError, o.transport, n)]))
|
|
1317
|
+
}
|
|
1318
|
+
}, !1)
|
|
1319
|
+
},
|
|
1320
|
+
reconnect: function(n) {
|
|
1321
|
+
r.reconnect(n, this.name)
|
|
1322
|
+
},
|
|
1323
|
+
lostConnection: function(n) {
|
|
1324
|
+
this.reconnect(n)
|
|
1325
|
+
},
|
|
1326
|
+
send: function(n, t) {
|
|
1327
|
+
r.ajaxSend(n, t)
|
|
1328
|
+
},
|
|
1329
|
+
stop: function(n) {
|
|
1330
|
+
f(n);
|
|
1331
|
+
r.clearReconnectTimeout(n);
|
|
1332
|
+
n && n.eventSource && (n.log("EventSource calling close()."), n.eventSource.close(), n.eventSource = null, delete n.eventSource)
|
|
1333
|
+
},
|
|
1334
|
+
abort: function(n, t) {
|
|
1335
|
+
r.ajaxAbort(n, t)
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}(window.jQuery, window),
|
|
1339
|
+
function(n, t) {
|
|
1340
|
+
var r = n.signalR,
|
|
1341
|
+
e = n.signalR.events,
|
|
1342
|
+
o = n.signalR.changeState,
|
|
1343
|
+
i = r.transports._logic,
|
|
1344
|
+
u = function() {
|
|
1345
|
+
var n = t.document.createElement("iframe");
|
|
1346
|
+
return n.setAttribute("style", "position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"), n
|
|
1347
|
+
},
|
|
1348
|
+
f = function() {
|
|
1349
|
+
var i = null,
|
|
1350
|
+
f = 1e3,
|
|
1351
|
+
n = 0;
|
|
1352
|
+
return {
|
|
1353
|
+
prevent: function() {
|
|
1354
|
+
r._.ieVersion <= 8 && (n === 0 && (i = t.setInterval(function() {
|
|
1355
|
+
var n = u();
|
|
1356
|
+
t.document.body.appendChild(n);
|
|
1357
|
+
t.document.body.removeChild(n);
|
|
1358
|
+
n = null
|
|
1359
|
+
}, f)), n++)
|
|
1360
|
+
},
|
|
1361
|
+
cancel: function() {
|
|
1362
|
+
n === 1 && t.clearInterval(i);
|
|
1363
|
+
n > 0 && n--
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
}();
|
|
1367
|
+
r.transports.foreverFrame = {
|
|
1368
|
+
name: "foreverFrame",
|
|
1369
|
+
supportsKeepAlive: function() {
|
|
1370
|
+
return !0
|
|
1371
|
+
},
|
|
1372
|
+
iframeClearThreshold: 50,
|
|
1373
|
+
start: function(n, r, e) {
|
|
1374
|
+
var l = this,
|
|
1375
|
+
s = i.foreverFrame.count += 1,
|
|
1376
|
+
h, o = u(),
|
|
1377
|
+
c = function() {
|
|
1378
|
+
n.log("Forever frame iframe finished loading and is no longer receiving messages.");
|
|
1379
|
+
l.reconnect(n)
|
|
1380
|
+
};
|
|
1381
|
+
if (t.EventSource) {
|
|
1382
|
+
e && (n.log("This browser supports SSE, skipping Forever Frame."), e());
|
|
1383
|
+
return
|
|
1384
|
+
}
|
|
1385
|
+
o.setAttribute("data-signalr-connection-id", n.id);
|
|
1386
|
+
f.prevent();
|
|
1387
|
+
h = i.getUrl(n, this.name);
|
|
1388
|
+
h += "&frameId=" + s;
|
|
1389
|
+
t.document.body.appendChild(o);
|
|
1390
|
+
n.log("Binding to iframe's load event.");
|
|
1391
|
+
o.addEventListener ? o.addEventListener("load", c, !1) : o.attachEvent && o.attachEvent("onload", c);
|
|
1392
|
+
o.src = h;
|
|
1393
|
+
i.foreverFrame.connections[s] = n;
|
|
1394
|
+
n.frame = o;
|
|
1395
|
+
n.frameId = s;
|
|
1396
|
+
r && (n.onSuccess = function() {
|
|
1397
|
+
n.log("Iframe transport started.");
|
|
1398
|
+
r()
|
|
1399
|
+
})
|
|
1400
|
+
},
|
|
1401
|
+
reconnect: function(n) {
|
|
1402
|
+
var r = this;
|
|
1403
|
+
i.isConnectedOrReconnecting(n) && i.verifyLastActive(n) && t.setTimeout(function() {
|
|
1404
|
+
if (i.verifyLastActive(n) && n.frame && i.ensureReconnectingState(n)) {
|
|
1405
|
+
var u = n.frame,
|
|
1406
|
+
t = i.getUrl(n, r.name, !0) + "&frameId=" + n.frameId;
|
|
1407
|
+
n.log("Updating iframe src to '" + t + "'.");
|
|
1408
|
+
u.src = t
|
|
1409
|
+
}
|
|
1410
|
+
}, n.reconnectDelay)
|
|
1411
|
+
},
|
|
1412
|
+
lostConnection: function(n) {
|
|
1413
|
+
this.reconnect(n)
|
|
1414
|
+
},
|
|
1415
|
+
send: function(n, t) {
|
|
1416
|
+
i.ajaxSend(n, t)
|
|
1417
|
+
},
|
|
1418
|
+
receive: function(t, u) {
|
|
1419
|
+
var f, e, o;
|
|
1420
|
+
if (t.json !== t._originalJson && (u = t._originalJson.stringify(u)), o = t._parseResponse(u), i.processMessages(t, o, t.onSuccess), t.state === n.signalR.connectionState.connected && (t.frameMessageCount = (t.frameMessageCount || 0) + 1, t.frameMessageCount > r.transports.foreverFrame.iframeClearThreshold && (t.frameMessageCount = 0, f = t.frame.contentWindow || t.frame.contentDocument, f && f.document && f.document.body)))
|
|
1421
|
+
for (e = f.document.body; e.firstChild;) e.removeChild(e.firstChild)
|
|
1422
|
+
},
|
|
1423
|
+
stop: function(n) {
|
|
1424
|
+
var r = null;
|
|
1425
|
+
if (f.cancel(), n.frame) {
|
|
1426
|
+
if (n.frame.stop) n.frame.stop();
|
|
1427
|
+
else try {
|
|
1428
|
+
r = n.frame.contentWindow || n.frame.contentDocument;
|
|
1429
|
+
r.document && r.document.execCommand && r.document.execCommand("Stop")
|
|
1430
|
+
} catch (u) {
|
|
1431
|
+
n.log("Error occured when stopping foreverFrame transport. Message = " + u.message + ".")
|
|
1432
|
+
}
|
|
1433
|
+
n.frame.parentNode === t.document.body && t.document.body.removeChild(n.frame);
|
|
1434
|
+
delete i.foreverFrame.connections[n.frameId];
|
|
1435
|
+
n.frame = null;
|
|
1436
|
+
n.frameId = null;
|
|
1437
|
+
delete n.frame;
|
|
1438
|
+
delete n.frameId;
|
|
1439
|
+
delete n.onSuccess;
|
|
1440
|
+
delete n.frameMessageCount;
|
|
1441
|
+
n.log("Stopping forever frame.")
|
|
1442
|
+
}
|
|
1443
|
+
},
|
|
1444
|
+
abort: function(n, t) {
|
|
1445
|
+
i.ajaxAbort(n, t)
|
|
1446
|
+
},
|
|
1447
|
+
getConnection: function(n) {
|
|
1448
|
+
return i.foreverFrame.connections[n]
|
|
1449
|
+
},
|
|
1450
|
+
started: function(t) {
|
|
1451
|
+
o(t, r.connectionState.reconnecting, r.connectionState.connected) === !0 && n(t).triggerHandler(e.onReconnect)
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
}(window.jQuery, window),
|
|
1455
|
+
function(n, t) {
|
|
1456
|
+
var r = n.signalR,
|
|
1457
|
+
u = n.signalR.events,
|
|
1458
|
+
e = n.signalR.changeState,
|
|
1459
|
+
f = n.signalR.isDisconnecting,
|
|
1460
|
+
i = r.transports._logic,
|
|
1461
|
+
o = function() {
|
|
1462
|
+
try {
|
|
1463
|
+
return "onprogress" in new t.XMLHttpRequest
|
|
1464
|
+
} catch (n) {
|
|
1465
|
+
return !1
|
|
1466
|
+
}
|
|
1467
|
+
}();
|
|
1468
|
+
r.transports.longPolling = {
|
|
1469
|
+
name: "longPolling",
|
|
1470
|
+
supportsKeepAlive: function(n) {
|
|
1471
|
+
return o && n.ajaxDataType !== "jsonp" && n._.longPollDelay === 0
|
|
1472
|
+
},
|
|
1473
|
+
reconnectDelay: 3e3,
|
|
1474
|
+
start: function(o, s, h) {
|
|
1475
|
+
var a = this,
|
|
1476
|
+
v = function() {
|
|
1477
|
+
v = n.noop;
|
|
1478
|
+
h = null;
|
|
1479
|
+
o.log("LongPolling connected.");
|
|
1480
|
+
s()
|
|
1481
|
+
},
|
|
1482
|
+
y = function() {
|
|
1483
|
+
return h ? (h(), h = null, o.log("LongPolling failed to connect."), !0) : !1
|
|
1484
|
+
},
|
|
1485
|
+
c = o._,
|
|
1486
|
+
l = 0,
|
|
1487
|
+
p = function(i) {
|
|
1488
|
+
t.clearTimeout(c.reconnectTimeoutId);
|
|
1489
|
+
c.reconnectTimeoutId = null;
|
|
1490
|
+
e(i, r.connectionState.reconnecting, r.connectionState.connected) === !0 && (i.log("Raising the reconnect event"), n(i).triggerHandler(u.onReconnect))
|
|
1491
|
+
},
|
|
1492
|
+
w = 36e5;
|
|
1493
|
+
o.pollXhr && (o.log("Polling xhr requests already exists, aborting."), o.stop());
|
|
1494
|
+
o.messageId = null;
|
|
1495
|
+
c.reconnectTimeoutId = null;
|
|
1496
|
+
c.pollTimeoutId = t.setTimeout(function() {
|
|
1497
|
+
(function e(s, h) {
|
|
1498
|
+
var d = s.messageId,
|
|
1499
|
+
g = d === null,
|
|
1500
|
+
b = !g,
|
|
1501
|
+
nt = !h,
|
|
1502
|
+
k = i.getUrl(s, a.name, b, nt);
|
|
1503
|
+
f(s) !== !0 && (o.log("Opening long polling request to '" + k + "'."), s.pollXhr = i.ajax(o, {
|
|
1504
|
+
xhrFields: {
|
|
1505
|
+
onprogress: function() {
|
|
1506
|
+
i.markLastMessage(o)
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
url: k,
|
|
1510
|
+
success: function(r) {
|
|
1511
|
+
var h, w = 0,
|
|
1512
|
+
u, a;
|
|
1513
|
+
o.log("Long poll complete.");
|
|
1514
|
+
l = 0;
|
|
1515
|
+
try {
|
|
1516
|
+
h = o._parseResponse(r)
|
|
1517
|
+
} catch (b) {
|
|
1518
|
+
i.handleParseFailure(s, r, b, y, s.pollXhr);
|
|
1519
|
+
return
|
|
1520
|
+
}(c.reconnectTimeoutId !== null && p(s), h && (u = i.maximizePersistentResponse(h)), i.processMessages(s, h, v), u && n.type(u.LongPollDelay) === "number" && (w = u.LongPollDelay), u && u.Disconnect) || f(s) !== !0 && (a = u && u.ShouldReconnect, !a || i.ensureReconnectingState(s)) && (w > 0 ? c.pollTimeoutId = t.setTimeout(function() {
|
|
1521
|
+
e(s, a)
|
|
1522
|
+
}, w) : e(s, a))
|
|
1523
|
+
},
|
|
1524
|
+
error: function(f, h) {
|
|
1525
|
+
if (t.clearTimeout(c.reconnectTimeoutId), c.reconnectTimeoutId = null, h === "abort") {
|
|
1526
|
+
o.log("Aborted xhr request.");
|
|
1527
|
+
return
|
|
1528
|
+
}
|
|
1529
|
+
if (!y()) {
|
|
1530
|
+
if (l++, o.state !== r.connectionState.reconnecting && (o.log("An error occurred using longPolling. Status = " + h + ". Response = " + f.responseText + "."), n(s).triggerHandler(u.onError, [r._.transportError(r.resources.longPollFailed, o.transport, f, s.pollXhr)])), (o.state === r.connectionState.connected || o.state === r.connectionState.reconnecting) && !i.verifyLastActive(o)) return;
|
|
1531
|
+
if (!i.ensureReconnectingState(s)) return;
|
|
1532
|
+
c.pollTimeoutId = t.setTimeout(function() {
|
|
1533
|
+
e(s, !0)
|
|
1534
|
+
}, a.reconnectDelay)
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
}), b && h === !0 && (c.reconnectTimeoutId = t.setTimeout(function() {
|
|
1538
|
+
p(s)
|
|
1539
|
+
}, Math.min(1e3 * (Math.pow(2, l) - 1), w))))
|
|
1540
|
+
})(o)
|
|
1541
|
+
}, 250)
|
|
1542
|
+
},
|
|
1543
|
+
lostConnection: function(n) {
|
|
1544
|
+
n.pollXhr && n.pollXhr.abort("lostConnection")
|
|
1545
|
+
},
|
|
1546
|
+
send: function(n, t) {
|
|
1547
|
+
i.ajaxSend(n, t)
|
|
1548
|
+
},
|
|
1549
|
+
stop: function(n) {
|
|
1550
|
+
t.clearTimeout(n._.pollTimeoutId);
|
|
1551
|
+
t.clearTimeout(n._.reconnectTimeoutId);
|
|
1552
|
+
delete n._.pollTimeoutId;
|
|
1553
|
+
delete n._.reconnectTimeoutId;
|
|
1554
|
+
n.pollXhr && (n.pollXhr.abort(), n.pollXhr = null, delete n.pollXhr)
|
|
1555
|
+
},
|
|
1556
|
+
abort: function(n, t) {
|
|
1557
|
+
i.ajaxAbort(n, t)
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
}(window.jQuery, window),
|
|
1561
|
+
function(n) {
|
|
1562
|
+
function r(n) {
|
|
1563
|
+
return n + s
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
function e(n, t, i) {
|
|
1567
|
+
for (var f = n.length, u = [], r = 0; r < f; r += 1) n.hasOwnProperty(r) && (u[r] = t.call(i, n[r], r, n));
|
|
1568
|
+
return u
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
function o(t) {
|
|
1572
|
+
return n.isFunction(t) ? null : n.type(t) === "undefined" ? null : t
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
function u(n) {
|
|
1576
|
+
for (var t in n)
|
|
1577
|
+
if (n.hasOwnProperty(t)) return !0;
|
|
1578
|
+
return !1
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
function f(n, t) {
|
|
1582
|
+
var i = n._.invocationCallbacks,
|
|
1583
|
+
r, f;
|
|
1584
|
+
u(i) && n.log("Clearing hub invocation callbacks with error: " + t + ".");
|
|
1585
|
+
n._.invocationCallbackId = 0;
|
|
1586
|
+
delete n._.invocationCallbacks;
|
|
1587
|
+
n._.invocationCallbacks = {};
|
|
1588
|
+
for (f in i) r = i[f], r.method.call(r.scope, {
|
|
1589
|
+
E: t
|
|
1590
|
+
})
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
function i(n, t) {
|
|
1594
|
+
return new i.fn.init(n, t)
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
function t(i, r) {
|
|
1598
|
+
var u = {
|
|
1599
|
+
qs: null,
|
|
1600
|
+
logging: !1,
|
|
1601
|
+
useDefaultPath: !0
|
|
1602
|
+
};
|
|
1603
|
+
return n.extend(u, r), (!i || u.useDefaultPath) && (i = (i || "") + "/signalr"), new t.fn.init(i, u)
|
|
1604
|
+
}
|
|
1605
|
+
var s = ".hubProxy",
|
|
1606
|
+
h = n.signalR;
|
|
1607
|
+
i.fn = i.prototype = {
|
|
1608
|
+
init: function(n, t) {
|
|
1609
|
+
this.state = {};
|
|
1610
|
+
this.connection = n;
|
|
1611
|
+
this.hubName = t;
|
|
1612
|
+
this._ = {
|
|
1613
|
+
callbackMap: {}
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
hasSubscriptions: function() {
|
|
1617
|
+
return u(this._.callbackMap)
|
|
1618
|
+
},
|
|
1619
|
+
on: function(t, i) {
|
|
1620
|
+
var u = this,
|
|
1621
|
+
f = u._.callbackMap;
|
|
1622
|
+
return t = t.toLowerCase(), f[t] || (f[t] = {}), f[t][i] = function(n, t) {
|
|
1623
|
+
i.apply(u, t)
|
|
1624
|
+
}, n(u).bind(r(t), f[t][i]), u
|
|
1625
|
+
},
|
|
1626
|
+
off: function(t, i) {
|
|
1627
|
+
var e = this,
|
|
1628
|
+
o = e._.callbackMap,
|
|
1629
|
+
f;
|
|
1630
|
+
return t = t.toLowerCase(), f = o[t], f && (f[i] ? (n(e).unbind(r(t), f[i]), delete f[i], u(f) || delete o[t]) : i || (n(e).unbind(r(t)), delete o[t])), e
|
|
1631
|
+
},
|
|
1632
|
+
invoke: function(t) {
|
|
1633
|
+
var i = this,
|
|
1634
|
+
r = i.connection,
|
|
1635
|
+
s = n.makeArray(arguments).slice(1),
|
|
1636
|
+
c = e(s, o),
|
|
1637
|
+
f = {
|
|
1638
|
+
H: i.hubName,
|
|
1639
|
+
M: t,
|
|
1640
|
+
A: c,
|
|
1641
|
+
I: r._.invocationCallbackId
|
|
1642
|
+
},
|
|
1643
|
+
u = n.Deferred(),
|
|
1644
|
+
l = function(f) {
|
|
1645
|
+
var e = i._maximizeHubResponse(f),
|
|
1646
|
+
s, o;
|
|
1647
|
+
n.extend(i.state, e.State);
|
|
1648
|
+
e.Progress ? u.notifyWith ? u.notifyWith(i, [e.Progress.Data]) : r._.progressjQueryVersionLogged || (r.log("A hub method invocation progress update was received but the version of jQuery in use (" + n.prototype.jquery + ") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."), r._.progressjQueryVersionLogged = !0) : e.Error ? (e.StackTrace && r.log(e.Error + "\n" + e.StackTrace + "."), s = e.IsHubException ? "HubException" : "Exception", o = h._.error(e.Error, s), o.data = e.ErrorData, r.log(i.hubName + "." + t + " failed to execute. Error: " + o.message), u.rejectWith(i, [o])) : (r.log("Invoked " + i.hubName + "." + t), u.resolveWith(i, [e.Result]))
|
|
1649
|
+
};
|
|
1650
|
+
return r._.invocationCallbacks[r._.invocationCallbackId.toString()] = {
|
|
1651
|
+
scope: i,
|
|
1652
|
+
method: l
|
|
1653
|
+
}, r._.invocationCallbackId += 1, n.isEmptyObject(i.state) || (f.S = i.state), r.log("Invoking " + i.hubName + "." + t), r.send(f), u.promise()
|
|
1654
|
+
},
|
|
1655
|
+
_maximizeHubResponse: function(n) {
|
|
1656
|
+
return {
|
|
1657
|
+
State: n.S,
|
|
1658
|
+
Result: n.R,
|
|
1659
|
+
Progress: n.P ? {
|
|
1660
|
+
Id: n.P.I,
|
|
1661
|
+
Data: n.P.D
|
|
1662
|
+
} : null,
|
|
1663
|
+
Id: n.I,
|
|
1664
|
+
IsHubException: n.H,
|
|
1665
|
+
Error: n.E,
|
|
1666
|
+
StackTrace: n.T,
|
|
1667
|
+
ErrorData: n.D
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
};
|
|
1671
|
+
i.fn.init.prototype = i.fn;
|
|
1672
|
+
t.fn = t.prototype = n.connection();
|
|
1673
|
+
t.fn.init = function(t, i) {
|
|
1674
|
+
var e = {
|
|
1675
|
+
qs: null,
|
|
1676
|
+
logging: !1,
|
|
1677
|
+
useDefaultPath: !0
|
|
1678
|
+
},
|
|
1679
|
+
u = this;
|
|
1680
|
+
n.extend(e, i);
|
|
1681
|
+
n.signalR.fn.init.call(u, t, e.qs, e.logging);
|
|
1682
|
+
u.proxies = {};
|
|
1683
|
+
u._.invocationCallbackId = 0;
|
|
1684
|
+
u._.invocationCallbacks = {};
|
|
1685
|
+
u.received(function(t) {
|
|
1686
|
+
var f, o, e, i, s, h;
|
|
1687
|
+
t && (typeof t.P != "undefined" ? (e = t.P.I.toString(), i = u._.invocationCallbacks[e], i && i.method.call(i.scope, t)) : typeof t.I != "undefined" ? (e = t.I.toString(), i = u._.invocationCallbacks[e], i && (u._.invocationCallbacks[e] = null, delete u._.invocationCallbacks[e], i.method.call(i.scope, t))) : (f = this._maximizeClientHubInvocation(t), u.log("Triggering client hub event '" + f.Method + "' on hub '" + f.Hub + "'."), s = f.Hub.toLowerCase(), h = f.Method.toLowerCase(), o = this.proxies[s], n.extend(o.state, f.State), n(o).triggerHandler(r(h), [f.Args])))
|
|
1688
|
+
});
|
|
1689
|
+
u.error(function(n, t) {
|
|
1690
|
+
var i, r;
|
|
1691
|
+
t && (i = t.I, r = u._.invocationCallbacks[i], r && (u._.invocationCallbacks[i] = null, delete u._.invocationCallbacks[i], r.method.call(r.scope, {
|
|
1692
|
+
E: n
|
|
1693
|
+
})))
|
|
1694
|
+
});
|
|
1695
|
+
u.reconnecting(function() {
|
|
1696
|
+
u.transport && u.transport.name === "webSockets" && f(u, "Connection started reconnecting before invocation result was received.")
|
|
1697
|
+
});
|
|
1698
|
+
u.disconnected(function() {
|
|
1699
|
+
f(u, "Connection was disconnected before invocation result was received.")
|
|
1700
|
+
})
|
|
1701
|
+
};
|
|
1702
|
+
t.fn._maximizeClientHubInvocation = function(n) {
|
|
1703
|
+
return {
|
|
1704
|
+
Hub: n.H,
|
|
1705
|
+
Method: n.M,
|
|
1706
|
+
Args: n.A,
|
|
1707
|
+
State: n.S
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1710
|
+
t.fn._registerSubscribedHubs = function() {
|
|
1711
|
+
var t = this;
|
|
1712
|
+
t._subscribedToHubs || (t._subscribedToHubs = !0, t.starting(function() {
|
|
1713
|
+
var i = [];
|
|
1714
|
+
n.each(t.proxies, function(n) {
|
|
1715
|
+
this.hasSubscriptions() && (i.push({
|
|
1716
|
+
name: n
|
|
1717
|
+
}), t.log("Client subscribed to hub '" + n + "'."))
|
|
1718
|
+
});
|
|
1719
|
+
i.length === 0 && t.log("No hubs have been subscribed to. The client will not receive data from hubs. To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to.");
|
|
1720
|
+
t.data = t.json.stringify(i)
|
|
1721
|
+
}))
|
|
1722
|
+
};
|
|
1723
|
+
t.fn.createHubProxy = function(n) {
|
|
1724
|
+
n = n.toLowerCase();
|
|
1725
|
+
var t = this.proxies[n];
|
|
1726
|
+
return t || (t = i(this, n), this.proxies[n] = t), this._registerSubscribedHubs(), t
|
|
1727
|
+
};
|
|
1728
|
+
t.fn.init.prototype = t.fn;
|
|
1729
|
+
n.hubConnection = t
|
|
1730
|
+
}(window.jQuery, window),
|
|
1731
|
+
function(n) {
|
|
1732
|
+
n.signalR.version = "2.1.1"
|
|
1733
|
+
}(window.jQuery),
|
|
1734
|
+
function($) {
|
|
1735
|
+
var n, f, h = 1,
|
|
1736
|
+
t, i = this,
|
|
1737
|
+
r = !1,
|
|
1738
|
+
u = "postMessage",
|
|
1739
|
+
e = "addEventListener",
|
|
1740
|
+
o, s = i[u];
|
|
1741
|
+
$[u] = function(n, t, i) {
|
|
1742
|
+
t && (n = typeof n == "string" ? n : $.param(n), i = i || parent, s ? i[u](n, t.replace(/([^:]+:\/\/[^\/]+).*/, "$1")) : t && (i.location = t.replace(/#.*$/, "") + "#" + +new Date + h++ + "&" + n))
|
|
1743
|
+
};
|
|
1744
|
+
$.receiveMessage = o = function(u, h, c) {
|
|
1745
|
+
s ? (u && (t && o(), t = function(n) {
|
|
1746
|
+
if (typeof h == "string" && n.origin !== h || $.isFunction(h) && h(n.origin) === r) return r;
|
|
1747
|
+
u(n)
|
|
1748
|
+
}), i[e] ? i[u ? e : "removeEventListener"]("message", t, r) : i[u ? "attachEvent" : "detachEvent"]("onmessage", t)) : (n && clearInterval(n), n = null, u && (c = typeof h == "number" ? h : typeof c == "number" ? c : 100, n = setInterval(function() {
|
|
1749
|
+
var n = document.location.hash,
|
|
1750
|
+
t = /^#?\d+&/;
|
|
1751
|
+
n !== f && t.test(n) && (f = n, u({
|
|
1752
|
+
data: n.replace(t, "")
|
|
1753
|
+
}))
|
|
1754
|
+
}, c)))
|
|
1755
|
+
}
|
|
1756
|
+
}(jQuery),
|
|
1757
|
+
function(n, t, i, r) {
|
|
1758
|
+
"use strict";
|
|
1759
|
+
var u = function(t, i) {
|
|
1760
|
+
this.widget = "";
|
|
1761
|
+
this.$element = n(t);
|
|
1762
|
+
this.defaultTime = i.defaultTime;
|
|
1763
|
+
this.disableFocus = i.disableFocus;
|
|
1764
|
+
this.isOpen = i.isOpen;
|
|
1765
|
+
this.minuteStep = i.minuteStep;
|
|
1766
|
+
this.modalBackdrop = i.modalBackdrop;
|
|
1767
|
+
this.secondStep = i.secondStep;
|
|
1768
|
+
this.showInputs = i.showInputs;
|
|
1769
|
+
this.showMeridian = i.showMeridian;
|
|
1770
|
+
this.showSeconds = i.showSeconds;
|
|
1771
|
+
this.template = i.template;
|
|
1772
|
+
this.appendWidgetTo = i.appendWidgetTo;
|
|
1773
|
+
this.upArrowStyle = i.upArrowStyle;
|
|
1774
|
+
this.downArrowStyle = i.downArrowStyle;
|
|
1775
|
+
this.containerClass = i.containerClass;
|
|
1776
|
+
this.timeSeparator = i.timeSeparator;
|
|
1777
|
+
this._init()
|
|
1778
|
+
};
|
|
1779
|
+
u.prototype = {
|
|
1780
|
+
constructor: u,
|
|
1781
|
+
_init: function() {
|
|
1782
|
+
var t = this;
|
|
1783
|
+
if (this.$element.parent().hasClass("input-group")) {
|
|
1784
|
+
if (this.$element.parent(".input-group").find(".input-group-addon").length) this.$element.parent(".input-group").find(".input-group-addon").on({
|
|
1785
|
+
mousedown: n.proxy(this.showWidget, this)
|
|
1786
|
+
});
|
|
1787
|
+
else this.$element.closest(this.containerClass).find(".input-group-addon").on({
|
|
1788
|
+
mousedown: n.proxy(this.showWidget, this)
|
|
1789
|
+
});
|
|
1790
|
+
this.$element.on({
|
|
1791
|
+
"focus.timepicker": n.proxy(this.highlightUnit, this),
|
|
1792
|
+
mousedown: n.proxy(this.highlightUnit, this),
|
|
1793
|
+
"keydown.timepicker": n.proxy(this.elementKeydown, this),
|
|
1794
|
+
"blur.timepicker": n.proxy(this.blurElement, this)
|
|
1795
|
+
})
|
|
1796
|
+
} else if (this.template) this.$element.on({
|
|
1797
|
+
"focus.timepicker": n.proxy(this.showWidget, this),
|
|
1798
|
+
mousedown: n.proxy(this.showWidget, this),
|
|
1799
|
+
"blur.timepicker": n.proxy(this.blurElement, this)
|
|
1800
|
+
});
|
|
1801
|
+
else this.$element.on({
|
|
1802
|
+
"focus.timepicker": n.proxy(this.highlightUnit, this),
|
|
1803
|
+
mousedown: n.proxy(this.highlightUnit, this),
|
|
1804
|
+
"keydown.timepicker": n.proxy(this.elementKeydown, this),
|
|
1805
|
+
"blur.timepicker": n.proxy(this.blurElement, this)
|
|
1806
|
+
});
|
|
1807
|
+
this.$widget = this.template !== !1 ? n(this.getTemplate()).prependTo(this.$element.parents(this.appendWidgetTo)).on("click", n.proxy(this.widgetClick, this)) : !1;
|
|
1808
|
+
this.showInputs && this.$widget !== !1 && this.$widget.find("input").each(function() {
|
|
1809
|
+
n(this).on({
|
|
1810
|
+
mousedown: function() {
|
|
1811
|
+
n(this).select()
|
|
1812
|
+
},
|
|
1813
|
+
"keydown.timepicker": n.proxy(t.widgetKeydown, t)
|
|
1814
|
+
})
|
|
1815
|
+
});
|
|
1816
|
+
this.bindClickHandlers();
|
|
1817
|
+
this.setDefaultTime(this.defaultTime)
|
|
1818
|
+
},
|
|
1819
|
+
bindClickHandlers: function() {
|
|
1820
|
+
if (this.$element.parent().hasClass("input-group")) {
|
|
1821
|
+
if (this.$element.parent(".input-group").find(".input-group-addon").length) this.$element.parent(".input-group").find(".input-group-addon").one({
|
|
1822
|
+
mousedown: n.proxy(this.showWidget, this)
|
|
1823
|
+
});
|
|
1824
|
+
else this.$element.closest(this.containerClass).find(".input-group-addon").one({
|
|
1825
|
+
mousedown: n.proxy(this.showWidget, this)
|
|
1826
|
+
});
|
|
1827
|
+
this.$element.one({
|
|
1828
|
+
mousedown: n.proxy(this.highlightUnit, this)
|
|
1829
|
+
})
|
|
1830
|
+
} else if (this.template) this.$element.one({
|
|
1831
|
+
mousedown: n.proxy(this.showWidget, this)
|
|
1832
|
+
});
|
|
1833
|
+
else this.$element.one({
|
|
1834
|
+
mousedown: n.proxy(this.highlightUnit, this)
|
|
1835
|
+
});
|
|
1836
|
+
this.showInputs && this.$widget !== !1 && this.$widget.find("input").each(function() {
|
|
1837
|
+
n(this).one({
|
|
1838
|
+
mousedown: function() {
|
|
1839
|
+
n(this).select()
|
|
1840
|
+
}
|
|
1841
|
+
})
|
|
1842
|
+
})
|
|
1843
|
+
},
|
|
1844
|
+
blurElement: function() {
|
|
1845
|
+
this.highlightedUnit = r;
|
|
1846
|
+
this.updateFromElementVal()
|
|
1847
|
+
},
|
|
1848
|
+
decrementHour: function() {
|
|
1849
|
+
if (this.showMeridian)
|
|
1850
|
+
if (this.hour === 1) this.hour = 12;
|
|
1851
|
+
else {
|
|
1852
|
+
if (this.hour === 12) return this.hour--, this.toggleMeridian();
|
|
1853
|
+
if (this.hour === 0) return this.hour = 11, this.toggleMeridian();
|
|
1854
|
+
this.hour--
|
|
1855
|
+
}
|
|
1856
|
+
else this.hour === 0 ? this.hour = 23 : this.hour--
|
|
1857
|
+
},
|
|
1858
|
+
decrementMinute: function(n) {
|
|
1859
|
+
var t;
|
|
1860
|
+
t = n ? this.minute - n : this.minute - this.minuteStep;
|
|
1861
|
+
t < 0 ? (this.decrementHour(), this.minute = t + 60) : this.minute = t
|
|
1862
|
+
},
|
|
1863
|
+
decrementSecond: function() {
|
|
1864
|
+
var n = this.second - this.secondStep;
|
|
1865
|
+
n < 0 ? (this.decrementMinute(!0), this.second = n + 60) : this.second = n
|
|
1866
|
+
},
|
|
1867
|
+
elementKeydown: function(n) {
|
|
1868
|
+
switch (n.keyCode) {
|
|
1869
|
+
case 9:
|
|
1870
|
+
this.updateFromElementVal();
|
|
1871
|
+
switch (this.highlightedUnit) {
|
|
1872
|
+
case "hour":
|
|
1873
|
+
n.preventDefault();
|
|
1874
|
+
this.highlightNextUnit();
|
|
1875
|
+
break;
|
|
1876
|
+
case "minute":
|
|
1877
|
+
(this.showMeridian || this.showSeconds) && (n.preventDefault(), this.highlightNextUnit());
|
|
1878
|
+
break;
|
|
1879
|
+
case "second":
|
|
1880
|
+
this.showMeridian && (n.preventDefault(), this.highlightNextUnit())
|
|
1881
|
+
}
|
|
1882
|
+
break;
|
|
1883
|
+
case 27:
|
|
1884
|
+
this.updateFromElementVal();
|
|
1885
|
+
break;
|
|
1886
|
+
case 37:
|
|
1887
|
+
n.preventDefault();
|
|
1888
|
+
this.highlightPrevUnit();
|
|
1889
|
+
this.updateFromElementVal();
|
|
1890
|
+
break;
|
|
1891
|
+
case 38:
|
|
1892
|
+
n.preventDefault();
|
|
1893
|
+
switch (this.highlightedUnit) {
|
|
1894
|
+
case "hour":
|
|
1895
|
+
this.incrementHour();
|
|
1896
|
+
this.highlightHour();
|
|
1897
|
+
break;
|
|
1898
|
+
case "minute":
|
|
1899
|
+
this.incrementMinute();
|
|
1900
|
+
this.highlightMinute();
|
|
1901
|
+
break;
|
|
1902
|
+
case "second":
|
|
1903
|
+
this.incrementSecond();
|
|
1904
|
+
this.highlightSecond();
|
|
1905
|
+
break;
|
|
1906
|
+
case "meridian":
|
|
1907
|
+
this.toggleMeridian();
|
|
1908
|
+
this.highlightMeridian()
|
|
1909
|
+
}
|
|
1910
|
+
break;
|
|
1911
|
+
case 39:
|
|
1912
|
+
n.preventDefault();
|
|
1913
|
+
this.updateFromElementVal();
|
|
1914
|
+
this.highlightNextUnit();
|
|
1915
|
+
break;
|
|
1916
|
+
case 40:
|
|
1917
|
+
n.preventDefault();
|
|
1918
|
+
switch (this.highlightedUnit) {
|
|
1919
|
+
case "hour":
|
|
1920
|
+
this.decrementHour();
|
|
1921
|
+
this.highlightHour();
|
|
1922
|
+
break;
|
|
1923
|
+
case "minute":
|
|
1924
|
+
this.decrementMinute();
|
|
1925
|
+
this.highlightMinute();
|
|
1926
|
+
break;
|
|
1927
|
+
case "second":
|
|
1928
|
+
this.decrementSecond();
|
|
1929
|
+
this.highlightSecond();
|
|
1930
|
+
break;
|
|
1931
|
+
case "meridian":
|
|
1932
|
+
this.toggleMeridian();
|
|
1933
|
+
this.highlightMeridian()
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
formatTime: function(n, t, i, r) {
|
|
1938
|
+
return n = n < 10 ? "0" + n : n, t = t < 10 ? "0" + t : t, i = i < 10 ? "0" + i : i, n + ":" + t + (this.showSeconds ? ":" + i : "") + (this.showMeridian ? " " + r : "")
|
|
1939
|
+
},
|
|
1940
|
+
getCursorPosition: function() {
|
|
1941
|
+
var n = this.$element.get(0),
|
|
1942
|
+
t, r;
|
|
1943
|
+
return "selectionStart" in n ? n.selectionStart : i.selection ? (n.focus(), t = i.selection.createRange(), r = i.selection.createRange().text.length, t.moveStart("character", -n.value.length), t.text.length - r) : void 0
|
|
1944
|
+
},
|
|
1945
|
+
getTemplate: function() {
|
|
1946
|
+
var n, t, i, r, u, f;
|
|
1947
|
+
this.showInputs ? (t = '<input type="text" name="hour" class="bootstrap-timepicker-hour form-control" maxlength="2"/>', i = '<input type="text" name="minute" class="bootstrap-timepicker-minute form-control" maxlength="2"/>', r = '<input type="text" name="second" class="bootstrap-timepicker-second form-control" maxlength="2"/>', u = '<input type="text" name="meridian" class="bootstrap-timepicker-meridian form-control" maxlength="2"/>') : (t = '<span class="bootstrap-timepicker-hour"><\/span>', i = '<span class="bootstrap-timepicker-minute"><\/span>', r = '<span class="bootstrap-timepicker-second"><\/span>', u = '<span class="bootstrap-timepicker-meridian"><\/span>');
|
|
1948
|
+
f = '<table><tr><td><a href="#" data-action="incrementHour"><i class="' + this.upArrowStyle + '"><\/i><\/a><\/td><td class="separator"> <\/td><td><a href="#" data-action="incrementMinute"><i class="' + this.upArrowStyle + '"><\/i><\/a><\/td>' + (this.showSeconds ? '<td class="separator"> <\/td><td><a href="#" data-action="incrementSecond"><i class="' + this.upArrowStyle + '"><\/i><\/a><\/td>' : "") + (this.showMeridian ? '<td class="separator"> <\/td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="' + this.upArrowStyle + '"><\/i><\/a><\/td>' : "") + "<\/tr><tr><td>" + t + '<\/td> <td class="separator">' + this.timeSeparator + "<\/td><td>" + i + "<\/td> " + (this.showSeconds ? '<td class="separator">' + this.timeSeparator + "<\/td><td>" + r + "<\/td>" : "") + (this.showMeridian ? '<td class="separator"> <\/td><td>' + u + "<\/td>" : "") + '<\/tr><tr><td><a href="#" data-action="decrementHour"><i class="' + this.downArrowStyle + '"><\/i><\/a><\/td><td class="separator"><\/td><td><a href="#" data-action="decrementMinute"><i class="' + this.downArrowStyle + '"><\/i><\/a><\/td>' + (this.showSeconds ? '<td class="separator"> <\/td><td><a href="#" data-action="decrementSecond"><i class="' + this.downArrowStyle + '"><\/i><\/a><\/td>' : "") + (this.showMeridian ? '<td class="separator"> <\/td><td><a href="#" data-action="toggleMeridian"><i class="' + this.downArrowStyle + '"><\/i><\/a><\/td>' : "") + "<\/tr><\/table>";
|
|
1949
|
+
switch (this.template) {
|
|
1950
|
+
case "modal":
|
|
1951
|
+
n = '<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="' + (this.modalBackdrop ? "true" : "false") + '"><div class="modal-header"><a href="#" class="close" data-dismiss="modal">×<\/a><h3>Pick a Time<\/h3><\/div><div class="modal-content">' + f + '<\/div><div class="modal-footer"><a href="#" class="btn btn-primary" data-dismiss="modal">OK<\/a><\/div><\/div>';
|
|
1952
|
+
break;
|
|
1953
|
+
case "dropdown":
|
|
1954
|
+
n = '<div class="bootstrap-timepicker-widget dropdown-menu">' + f + "<\/div>"
|
|
1955
|
+
}
|
|
1956
|
+
return n
|
|
1957
|
+
},
|
|
1958
|
+
getTime: function() {
|
|
1959
|
+
return this.formatTime(this.hour, this.minute, this.second, this.meridian)
|
|
1960
|
+
},
|
|
1961
|
+
hideWidget: function() {
|
|
1962
|
+
this.isOpen !== !1 && (this.showInputs && this.updateFromWidgetInputs(), this.$element.trigger({
|
|
1963
|
+
type: "hide.timepicker",
|
|
1964
|
+
time: {
|
|
1965
|
+
value: this.getTime(),
|
|
1966
|
+
hours: this.hour,
|
|
1967
|
+
minutes: this.minute,
|
|
1968
|
+
seconds: this.second,
|
|
1969
|
+
meridian: this.meridian
|
|
1970
|
+
}
|
|
1971
|
+
}), this.template === "modal" && this.$widget.modal ? this.$widget.modal("hide") : (this.$widget.removeClass("open"), this.$widget.hide()), n(i).off("mousedown.timepicker"), this.isOpen = !1, this.bindClickHandlers())
|
|
1972
|
+
},
|
|
1973
|
+
highlightUnit: function() {
|
|
1974
|
+
this.position = this.getCursorPosition();
|
|
1975
|
+
this.position >= 0 && this.position <= 2 ? this.highlightHour() : this.position >= 3 && this.position <= 5 ? this.highlightMinute() : this.position >= 6 && this.position <= 8 ? this.showSeconds ? this.highlightSecond() : this.highlightMeridian() : this.position >= 9 && this.position <= 11 && this.highlightMeridian()
|
|
1976
|
+
},
|
|
1977
|
+
highlightNextUnit: function() {
|
|
1978
|
+
switch (this.highlightedUnit) {
|
|
1979
|
+
case "hour":
|
|
1980
|
+
this.highlightMinute();
|
|
1981
|
+
break;
|
|
1982
|
+
case "minute":
|
|
1983
|
+
this.showSeconds ? this.highlightSecond() : this.showMeridian ? this.highlightMeridian() : this.highlightHour();
|
|
1984
|
+
break;
|
|
1985
|
+
case "second":
|
|
1986
|
+
this.showMeridian ? this.highlightMeridian() : this.highlightHour();
|
|
1987
|
+
break;
|
|
1988
|
+
case "meridian":
|
|
1989
|
+
this.highlightHour()
|
|
1990
|
+
}
|
|
1991
|
+
},
|
|
1992
|
+
highlightPrevUnit: function() {
|
|
1993
|
+
switch (this.highlightedUnit) {
|
|
1994
|
+
case "hour":
|
|
1995
|
+
this.highlightMeridian();
|
|
1996
|
+
break;
|
|
1997
|
+
case "minute":
|
|
1998
|
+
this.highlightHour();
|
|
1999
|
+
break;
|
|
2000
|
+
case "second":
|
|
2001
|
+
this.highlightMinute();
|
|
2002
|
+
break;
|
|
2003
|
+
case "meridian":
|
|
2004
|
+
this.showSeconds ? this.highlightSecond() : this.highlightMinute()
|
|
2005
|
+
}
|
|
2006
|
+
},
|
|
2007
|
+
highlightHour: function() {
|
|
2008
|
+
var n = this.$element.get(0);
|
|
2009
|
+
this.highlightedUnit = "hour";
|
|
2010
|
+
n.setSelectionRange && setTimeout(function() {
|
|
2011
|
+
n.setSelectionRange(0, 2)
|
|
2012
|
+
}, 0)
|
|
2013
|
+
},
|
|
2014
|
+
highlightMinute: function() {
|
|
2015
|
+
var n = this.$element.get(0);
|
|
2016
|
+
this.highlightedUnit = "minute";
|
|
2017
|
+
n.setSelectionRange && setTimeout(function() {
|
|
2018
|
+
n.setSelectionRange(3, 5)
|
|
2019
|
+
}, 0)
|
|
2020
|
+
},
|
|
2021
|
+
highlightSecond: function() {
|
|
2022
|
+
var n = this.$element.get(0);
|
|
2023
|
+
this.highlightedUnit = "second";
|
|
2024
|
+
n.setSelectionRange && setTimeout(function() {
|
|
2025
|
+
n.setSelectionRange(6, 8)
|
|
2026
|
+
}, 0)
|
|
2027
|
+
},
|
|
2028
|
+
highlightMeridian: function() {
|
|
2029
|
+
var n = this.$element.get(0);
|
|
2030
|
+
this.highlightedUnit = "meridian";
|
|
2031
|
+
n.setSelectionRange && (this.showSeconds ? setTimeout(function() {
|
|
2032
|
+
n.setSelectionRange(9, 11)
|
|
2033
|
+
}, 0) : setTimeout(function() {
|
|
2034
|
+
n.setSelectionRange(6, 8)
|
|
2035
|
+
}, 0))
|
|
2036
|
+
},
|
|
2037
|
+
incrementHour: function() {
|
|
2038
|
+
if (this.showMeridian) {
|
|
2039
|
+
if (this.hour === 11) return this.hour++, this.toggleMeridian();
|
|
2040
|
+
this.hour === 12 && (this.hour = 0)
|
|
2041
|
+
}
|
|
2042
|
+
if (this.hour === 23) {
|
|
2043
|
+
this.hour = 0;
|
|
2044
|
+
return
|
|
2045
|
+
}
|
|
2046
|
+
this.hour++
|
|
2047
|
+
},
|
|
2048
|
+
incrementMinute: function(n) {
|
|
2049
|
+
var t;
|
|
2050
|
+
t = n ? this.minute + n : this.minute + this.minuteStep - this.minute % this.minuteStep;
|
|
2051
|
+
t > 59 ? (this.incrementHour(), this.minute = t - 60) : this.minute = t
|
|
2052
|
+
},
|
|
2053
|
+
incrementSecond: function() {
|
|
2054
|
+
var n = this.second + this.secondStep - this.second % this.secondStep;
|
|
2055
|
+
n > 59 ? (this.incrementMinute(!0), this.second = n - 60) : this.second = n
|
|
2056
|
+
},
|
|
2057
|
+
remove: function() {
|
|
2058
|
+
n("document").off(".timepicker");
|
|
2059
|
+
this.$widget && this.$widget.remove();
|
|
2060
|
+
delete this.$element.data().timepicker
|
|
2061
|
+
},
|
|
2062
|
+
setDefaultTime: function(n) {
|
|
2063
|
+
if (this.$element.val()) this.updateFromElementVal();
|
|
2064
|
+
else if (n === "current") {
|
|
2065
|
+
var i = new Date,
|
|
2066
|
+
t = i.getHours(),
|
|
2067
|
+
u = Math.floor(i.getMinutes() / this.minuteStep) * this.minuteStep,
|
|
2068
|
+
f = Math.floor(i.getSeconds() / this.secondStep) * this.secondStep,
|
|
2069
|
+
r = "AM";
|
|
2070
|
+
this.showMeridian && (t === 0 ? t = 12 : t >= 12 ? (t > 12 && (t = t - 12), r = "PM") : r = "AM");
|
|
2071
|
+
this.hour = t;
|
|
2072
|
+
this.minute = u;
|
|
2073
|
+
this.second = f;
|
|
2074
|
+
this.meridian = r;
|
|
2075
|
+
this.update()
|
|
2076
|
+
} else n === !1 ? (this.hour = 0, this.minute = 0, this.second = 0, this.meridian = "AM") : this.setTime(n)
|
|
2077
|
+
},
|
|
2078
|
+
setTime: function(n) {
|
|
2079
|
+
var i, t;
|
|
2080
|
+
this.showMeridian ? (i = n.split(" "), t = i[0].split(":"), this.meridian = i[1]) : t = n.split(":");
|
|
2081
|
+
this.hour = parseInt(t[0], 10);
|
|
2082
|
+
this.minute = parseInt(t[1], 10);
|
|
2083
|
+
this.second = parseInt(t[2], 10);
|
|
2084
|
+
isNaN(this.hour) && (this.hour = 0);
|
|
2085
|
+
isNaN(this.minute) && (this.minute = 0);
|
|
2086
|
+
this.showMeridian ? (this.hour > 12 ? this.hour = 12 : this.hour < 1 && (this.hour = 12), this.meridian === "am" || this.meridian === "a" ? this.meridian = "AM" : (this.meridian === "pm" || this.meridian === "p") && (this.meridian = "PM"), this.meridian !== "AM" && this.meridian !== "PM" && (this.meridian = "AM")) : this.hour >= 24 ? this.hour = 23 : this.hour < 0 && (this.hour = 0);
|
|
2087
|
+
this.minute < 0 ? this.minute = 0 : this.minute >= 60 && (this.minute = 59);
|
|
2088
|
+
this.showSeconds && (isNaN(this.second) ? this.second = 0 : this.second < 0 ? this.second = 0 : this.second >= 60 && (this.second = 59));
|
|
2089
|
+
this.update()
|
|
2090
|
+
},
|
|
2091
|
+
showWidget: function(t) {
|
|
2092
|
+
if ((t.stopPropagation(), !this.isOpen) && !this.$element.is(":disabled")) {
|
|
2093
|
+
var r = this;
|
|
2094
|
+
n(i).on("mousedown.timepicker touchstart.timepicker", function(t) {
|
|
2095
|
+
n(t.target).closest(".bootstrap-timepicker-widget").length === 0 && r.hideWidget()
|
|
2096
|
+
});
|
|
2097
|
+
if (this.$element.trigger({
|
|
2098
|
+
type: "show.timepicker",
|
|
2099
|
+
time: {
|
|
2100
|
+
value: this.getTime(),
|
|
2101
|
+
hours: this.hour,
|
|
2102
|
+
minutes: this.minute,
|
|
2103
|
+
seconds: this.second,
|
|
2104
|
+
meridian: this.meridian
|
|
2105
|
+
}
|
|
2106
|
+
}), this.disableFocus && this.$element.blur(), this.updateFromElementVal(), this.template === "modal" && this.$widget.modal) this.$widget.modal("show").on("hidden", n.proxy(this.hideWidget, this));
|
|
2107
|
+
else this.isOpen === !1 && (this.$widget.addClass("open"), this.$widget.show());
|
|
2108
|
+
this.isOpen = !0
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
toggleMeridian: function() {
|
|
2112
|
+
this.meridian = this.meridian === "AM" ? "PM" : "AM";
|
|
2113
|
+
this.update()
|
|
2114
|
+
},
|
|
2115
|
+
update: function() {
|
|
2116
|
+
this.$element.trigger({
|
|
2117
|
+
type: "changeTime.timepicker",
|
|
2118
|
+
time: {
|
|
2119
|
+
value: this.getTime(),
|
|
2120
|
+
hours: this.hour,
|
|
2121
|
+
minutes: this.minute,
|
|
2122
|
+
seconds: this.second,
|
|
2123
|
+
meridian: this.meridian
|
|
2124
|
+
}
|
|
2125
|
+
});
|
|
2126
|
+
this.updateElement();
|
|
2127
|
+
this.updateWidget()
|
|
2128
|
+
},
|
|
2129
|
+
updateElement: function() {
|
|
2130
|
+
this.$element.val(this.getTime()).change()
|
|
2131
|
+
},
|
|
2132
|
+
updateFromElementVal: function() {
|
|
2133
|
+
var n = this.$element.val();
|
|
2134
|
+
n && this.setTime(n)
|
|
2135
|
+
},
|
|
2136
|
+
updateWidget: function() {
|
|
2137
|
+
if (this.$widget !== !1) {
|
|
2138
|
+
var n = this.hour < 10 ? "0" + this.hour : this.hour,
|
|
2139
|
+
t = this.minute < 10 ? "0" + this.minute : this.minute,
|
|
2140
|
+
i = this.second < 10 ? "0" + this.second : this.second;
|
|
2141
|
+
this.showInputs ? (this.$widget.find("input.bootstrap-timepicker-hour").val(n), this.$widget.find("input.bootstrap-timepicker-minute").val(t), this.showSeconds && this.$widget.find("input.bootstrap-timepicker-second").val(i), this.showMeridian && this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)) : (this.$widget.find("span.bootstrap-timepicker-hour").text(n), this.$widget.find("span.bootstrap-timepicker-minute").text(t), this.showSeconds && this.$widget.find("span.bootstrap-timepicker-second").text(i), this.showMeridian && this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))
|
|
2142
|
+
}
|
|
2143
|
+
},
|
|
2144
|
+
updateFromWidgetInputs: function() {
|
|
2145
|
+
if (this.$widget !== !1) {
|
|
2146
|
+
var t = n("input.bootstrap-timepicker-hour", this.$widget).val() + ":" + n("input.bootstrap-timepicker-minute", this.$widget).val() + (this.showSeconds ? ":" + n("input.bootstrap-timepicker-second", this.$widget).val() : "") + (this.showMeridian ? " " + n("input.bootstrap-timepicker-meridian", this.$widget).val() : "");
|
|
2147
|
+
this.setTime(t)
|
|
2148
|
+
}
|
|
2149
|
+
},
|
|
2150
|
+
widgetClick: function(t) {
|
|
2151
|
+
t.stopPropagation();
|
|
2152
|
+
t.preventDefault();
|
|
2153
|
+
var i = n(t.target).closest("a").data("action");
|
|
2154
|
+
i && (this[i](), this.update())
|
|
2155
|
+
},
|
|
2156
|
+
widgetKeydown: function(t) {
|
|
2157
|
+
var r = n(t.target).closest("input"),
|
|
2158
|
+
i = r.attr("name");
|
|
2159
|
+
switch (t.keyCode) {
|
|
2160
|
+
case 9:
|
|
2161
|
+
if (this.showMeridian) {
|
|
2162
|
+
if (i === "meridian") return this.hideWidget()
|
|
2163
|
+
} else if (this.showSeconds) {
|
|
2164
|
+
if (i === "second") return this.hideWidget()
|
|
2165
|
+
} else if (i === "minute") return this.hideWidget();
|
|
2166
|
+
this.updateFromWidgetInputs();
|
|
2167
|
+
break;
|
|
2168
|
+
case 27:
|
|
2169
|
+
this.hideWidget();
|
|
2170
|
+
break;
|
|
2171
|
+
case 38:
|
|
2172
|
+
t.preventDefault();
|
|
2173
|
+
switch (i) {
|
|
2174
|
+
case "hour":
|
|
2175
|
+
this.incrementHour();
|
|
2176
|
+
this.update();
|
|
2177
|
+
break;
|
|
2178
|
+
case "minute":
|
|
2179
|
+
this.incrementMinute();
|
|
2180
|
+
this.update();
|
|
2181
|
+
break;
|
|
2182
|
+
case "second":
|
|
2183
|
+
this.incrementSecond();
|
|
2184
|
+
this.update();
|
|
2185
|
+
break;
|
|
2186
|
+
case "meridian":
|
|
2187
|
+
this.toggleMeridian();
|
|
2188
|
+
this.update()
|
|
2189
|
+
}
|
|
2190
|
+
break;
|
|
2191
|
+
case 40:
|
|
2192
|
+
t.preventDefault();
|
|
2193
|
+
switch (i) {
|
|
2194
|
+
case "hour":
|
|
2195
|
+
this.decrementHour();
|
|
2196
|
+
this.update();
|
|
2197
|
+
break;
|
|
2198
|
+
case "minute":
|
|
2199
|
+
this.decrementMinute();
|
|
2200
|
+
this.update();
|
|
2201
|
+
break;
|
|
2202
|
+
case "second":
|
|
2203
|
+
this.decrementSecond();
|
|
2204
|
+
this.update();
|
|
2205
|
+
break;
|
|
2206
|
+
case "meridian":
|
|
2207
|
+
this.toggleMeridian();
|
|
2208
|
+
this.update()
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
};
|
|
2213
|
+
n.fn.timepicker = function(t) {
|
|
2214
|
+
var i = Array.apply(null, arguments);
|
|
2215
|
+
return i.shift(), this.each(function() {
|
|
2216
|
+
var f = n(this),
|
|
2217
|
+
r = f.data("timepicker"),
|
|
2218
|
+
e = typeof t == "object" && t;
|
|
2219
|
+
r || f.data("timepicker", r = new u(this, n.extend({}, n.fn.timepicker.defaults, e, n(this).data())));
|
|
2220
|
+
typeof t == "string" && r[t].apply(r, i)
|
|
2221
|
+
})
|
|
2222
|
+
};
|
|
2223
|
+
n.fn.timepicker.defaults = {
|
|
2224
|
+
defaultTime: "current",
|
|
2225
|
+
disableFocus: !1,
|
|
2226
|
+
isOpen: !1,
|
|
2227
|
+
minuteStep: 15,
|
|
2228
|
+
modalBackdrop: !1,
|
|
2229
|
+
secondStep: 15,
|
|
2230
|
+
showSeconds: !1,
|
|
2231
|
+
showInputs: !0,
|
|
2232
|
+
showMeridian: !0,
|
|
2233
|
+
template: "dropdown",
|
|
2234
|
+
appendWidgetTo: ".bootstrap-timepicker",
|
|
2235
|
+
upArrowStyle: "fa fa-arrow-up fa-2x",
|
|
2236
|
+
downArrowStyle: "fa fa-arrow-down fa-2x",
|
|
2237
|
+
containerClass: "bootstrap-timepicker",
|
|
2238
|
+
timeSeparator: ":"
|
|
2239
|
+
};
|
|
2240
|
+
n.fn.timepicker.Constructor = u
|
|
2241
|
+
}(jQuery, window, document);
|
|
2242
|
+
embedGenTimeoutId = null;
|
|
2243
|
+
eventPollingsInterval = 12e4;
|
|
2244
|
+
$(function() {
|
|
2245
|
+
var t = 288e5,
|
|
2246
|
+
r = $.connection.eventStateHub,
|
|
2247
|
+
u = $("#eventId").val(),
|
|
2248
|
+
i = setTimeout(stopHub, t),
|
|
2249
|
+
n;
|
|
2250
|
+
|
|
2251
|
+
$.connection.hub.start().done(function() {});
|
|
2252
|
+
$(".embed-code").hide();
|
|
2253
|
+
$(".embed-terms .btn-agree").on("click", function(n) {
|
|
2254
|
+
n.preventDefault();
|
|
2255
|
+
$(".embed-terms").fadeOut();
|
|
2256
|
+
$(".embed-code").fadeIn()
|
|
2257
|
+
});
|
|
2258
|
+
n = {
|
|
2259
|
+
defaultTime: !1,
|
|
2260
|
+
showSeconds: !0,
|
|
2261
|
+
showMeridian: !0,
|
|
2262
|
+
minuteStep: 1,
|
|
2263
|
+
secondStep: 1
|
|
2264
|
+
};
|
|
2265
|
+
$("#startTime").timepicker(n);
|
|
2266
|
+
$("#endTime").timepicker(n);
|
|
2267
|
+
$(".embed-code").hide();
|
|
2268
|
+
$(".embed-terms .btn-agree").bind("click", function(n) {
|
|
2269
|
+
n.preventDefault();
|
|
2270
|
+
$(".embed-terms").fadeOut();
|
|
2271
|
+
$(".embed-code").fadeIn()
|
|
2272
|
+
});
|
|
2273
|
+
updateSocialLinks(null, $("#url").val());
|
|
2274
|
+
$("#url").bind("updated-url", updateSocialLinks);
|
|
2275
|
+
updateClipping();
|
|
2276
|
+
selectableEmbedCode();
|
|
2277
|
+
audiOnlySwitch();
|
|
2278
|
+
pollEvent()
|
|
2279
|
+
});
|
|
2280
|
+
var stackPos = "top",
|
|
2281
|
+
logPos = "top",
|
|
2282
|
+
lastClickedTimecode = null,
|
|
2283
|
+
highlightItem = !0;
|
|
2284
|
+
$(function() {
|
|
2285
|
+
var n = $.connection.eventStateHub,
|
|
2286
|
+
t = $("#eventId").val();
|
|
2287
|
+
$("#ContainsLogMoments").val() == "True" && $("#DefaultToStackTab").val() == "False" && ($("#stacks").removeClass("active").removeClass("in"), $("#logs").addClass("active").addClass("in"));
|
|
2288
|
+
n.client.logUpdate = function(n, i) {
|
|
2289
|
+
if (t == i) {
|
|
2290
|
+
if ($("#ContainsLogMoments").val() == "False") {
|
|
2291
|
+
$("#LiveLogging").val("True");
|
|
2292
|
+
$("#index-message").removeClass("hidden");
|
|
2293
|
+
$("#ContainsLogMoments").val("True");
|
|
2294
|
+
$("#logTab").removeClass("invisible");
|
|
2295
|
+
$("#logTab a").tab("show");
|
|
2296
|
+
refreshLogMoments();
|
|
2297
|
+
return
|
|
2298
|
+
}
|
|
2299
|
+
n == "Add" ? appendLogMoments() : refreshLogMoments()
|
|
2300
|
+
}
|
|
2301
|
+
};
|
|
2302
|
+
$.connection.hub.start().done(function() {});
|
|
2303
|
+
scrollStackAndLogs();
|
|
2304
|
+
refreshStackInterval();
|
|
2305
|
+
$(document).on("tap", ".logouter", logItemClicked);
|
|
2306
|
+
$(document).on("click", ".logouter", logItemClicked);
|
|
2307
|
+
$(document).on("click", "#seekToLiveButton", seekToLive)
|
|
2308
|
+
});
|
|
2309
|
+
var captchaValid = !1,
|
|
2310
|
+
timesValid = !0,
|
|
2311
|
+
keepError = !1;
|
|
2312
|
+
$(function() {
|
|
2313
|
+
initTermsAndConditions();
|
|
2314
|
+
initEnableEmbed();
|
|
2315
|
+
initSetShareTime();
|
|
2316
|
+
initSetDownloadTime();
|
|
2317
|
+
initSetClipboard();
|
|
2318
|
+
initSetFileType();
|
|
2319
|
+
initEmailValid()
|
|
2320
|
+
});
|
|
2321
|
+
$(function() {
|
|
2322
|
+
initInputMask()
|
|
2323
|
+
});
|
|
2324
|
+
androidInput = !1
|