Created
July 25, 2017 03:56
-
-
Save ColeMundus/592cba7aaaa990e2742914e8bfc5911b to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var O2C = { | |
'Y7j': function(v7j, P7j) { | |
return v7j / P7j; | |
}, | |
'P8W': function(w8W, V8W) { | |
return w8W === V8W; | |
}, | |
'd17': function(p17, W17) { | |
return p17 > W17; | |
}, | |
'c87': function(d87, p87) { | |
return d87 >= p87; | |
}, | |
'o8D': function(z8D, u8D) { | |
return z8D === u8D; | |
}, | |
'A8W': function(M8W, l8W) { | |
return M8W - l8W; | |
}, | |
'd4w': function(p4w, W4w) { | |
return p4w - W4w; | |
}, | |
'y97': function(m97, N97, n97) { | |
return m97 - N97 - n97; | |
}, | |
'O7w': function(h7w, g7w, J7w) { | |
return h7w * g7w / J7w; | |
}, | |
'b0D': function(r0D, S0D) { | |
return r0D * S0D; | |
}, | |
'v1O': function(P1O, w1O) { | |
return P1O - w1O; | |
}, | |
'e4w': function(F4w, T4w) { | |
return F4w / T4w; | |
}, | |
'r2w': function(S2w, a2w) { | |
return S2w > a2w; | |
}, | |
'k3D': function(o3D, z3D) { | |
return o3D - z3D; | |
}, | |
'w2O': function(V2O, L2O) { | |
return V2O >= L2O; | |
}, | |
'N57': function(n57, G57) { | |
return n57 > G57; | |
}, | |
'S4j': function(a4j, e4j) { | |
return a4j > e4j; | |
}, | |
'D5w': function(c5w, d5w) { | |
return c5w * d5w; | |
}, | |
'e27': function(F27, T27) { | |
return F27 - T27; | |
}, | |
'V1O': function(L1O, k1O) { | |
return L1O - k1O; | |
}, | |
'u7D': function(q7D, b7D) { | |
return q7D - b7D; | |
}, | |
'V5j': function(L5j, k5j) { | |
return L5j / k5j; | |
}, | |
'C57': function(U57, Q57) { | |
return U57 >= Q57; | |
}, | |
'r2D': function(S2D, a2D) { | |
return S2D < a2D; | |
}, | |
'x5w': function(B5w, C7w) { | |
return B5w < C7w; | |
}, | |
'A47': function(M47, l47) { | |
return M47 < l47; | |
}, | |
'j9W': function(E9W, K9W) { | |
return E9W < K9W; | |
}, | |
's4j': function(D4j, c4j) { | |
return D4j < c4j; | |
}, | |
's57': function(D57, c57) { | |
return D57 < c57; | |
}, | |
'z37': function(u37, q37) { | |
return u37 - q37; | |
}, | |
'U47': function(Q47, s47) { | |
return Q47 - s47; | |
}, | |
'K9O': function(R9O, t9O) { | |
return R9O - t9O; | |
}, | |
'T3w': function(j3w, E3w) { | |
return j3w <= E3w; | |
}, | |
'p9D': function(W9D, f9D) { | |
return W9D > f9D; | |
}, | |
'W77': function(f77, y77) { | |
return f77 > y77; | |
}, | |
'C8w': function(U8w, Q8w) { | |
return U8w <= Q8w; | |
}, | |
'y6D': function(m6D, N6D) { | |
return m6D < N6D; | |
}, | |
'C5D': function(U5D, Q5D) { | |
return U5D < Q5D; | |
}, | |
'S1O': function(a1O, e1O) { | |
return a1O === e1O; | |
}, | |
'R7D': function(t7D, I7D) { | |
return t7D < I7D; | |
}, | |
'i57': function(A57, M57) { | |
return A57 > M57; | |
}, | |
'd07': function(p07, W07) { | |
return p07 - W07; | |
}, | |
'j0W': function(E0W, K0W) { | |
return E0W < K0W; | |
}, | |
'a6W': function(e6W, F6W) { | |
return e6W === F6W; | |
}, | |
'Q2O': function(s2O, D2O) { | |
return s2O >= D2O; | |
}, | |
's2j': 4, | |
'B4j': function(C5j, U5j) { | |
return C5j - U5j; | |
}, | |
'F5D': function(T5D, j5D) { | |
return T5D | j5D; | |
}, | |
'q1w': function(b1w, r1w) { | |
return b1w < r1w; | |
}, | |
'F8D': function(T8D, j8D) { | |
return T8D - j8D; | |
}, | |
'b9O': function(r9O, S9O) { | |
return r9O - S9O; | |
}, | |
'R4w': function(t4w, I4w) { | |
return t4w >= I4w; | |
}, | |
'Y27': function(v27, P27) { | |
return v27 <= P27; | |
}, | |
'C17': function(U17, Q17) { | |
return U17 >= Q17; | |
}, | |
'b6w': function(r6w, S6w) { | |
return r6w >= S6w; | |
}, | |
'u3O': function(q3O, b3O) { | |
return q3O | b3O; | |
}, | |
'Z47': function(Y47, v47) { | |
return Y47 > v47; | |
}, | |
'Y5O': function(v5O, P5O) { | |
return v5O - P5O; | |
}, | |
'i3w': function(A3w, M3w) { | |
return A3w <= M3w; | |
}, | |
'c9W': function(d9W, p9W) { | |
return d9W === p9W; | |
}, | |
'D47': function(c47, d47) { | |
return c47 !== d47; | |
}, | |
'a5w': function(e5w, F5w) { | |
return e5w - F5w; | |
}, | |
'o1O': function(z1O, u1O) { | |
return z1O === u1O; | |
}, | |
'j97': function(E97, K97) { | |
return E97 === K97; | |
}, | |
'l1W': function(O1W, h1W) { | |
return O1W !== h1W; | |
}, | |
'F4j': function(T4j, j4j) { | |
return T4j > j4j; | |
}, | |
'k97': function(o97, z97) { | |
return o97 == z97; | |
}, | |
'x5O': function(B5O, C7O) { | |
return B5O <= C7O; | |
}, | |
'N07': function(n07, G07) { | |
return n07 < G07; | |
}, | |
'N3W': function(n3W, G3W) { | |
return n3W >= G3W; | |
}, | |
'E8D': function(K8D, R8D) { | |
return K8D - R8D; | |
}, | |
'n6w': function(G6w, i6w) { | |
return G6w - i6w; | |
}, | |
'Q4D': function(s4D, D4D) { | |
return s4D >= D4D; | |
}, | |
'z4D': function(u4D, q4D) { | |
return u4D | q4D; | |
}, | |
'H1w': function(Z1w, Y1w) { | |
return Z1w > Y1w; | |
}, | |
'u27': function(q27, b27) { | |
return q27 < b27; | |
}, | |
'H6O': function(Z6O, Y6O, v6O) { | |
return Z6O - Y6O + v6O; | |
}, | |
'n8W': function(G8W, i8W) { | |
return G8W <= i8W; | |
}, | |
'H8w': function(Z8w, Y8w) { | |
return Z8w - Y8w; | |
}, | |
'N8w': function(n8w, G8w) { | |
return n8w < G8w; | |
}, | |
'h27': function(g27, J27) { | |
return g27 === J27; | |
}, | |
'E8O': function(K8O, R8O) { | |
return K8O !== R8O; | |
}, | |
'c2O': function(d2O, p2O) { | |
return d2O === p2O; | |
}, | |
'z6W': function(u6W, q6W) { | |
return u6W < q6W; | |
}, | |
'e2O': function(F2O, T2O) { | |
return F2O === T2O; | |
}, | |
'N1W': function(n1W, G1W) { | |
return n1W === G1W; | |
}, | |
'f1w': function(y1w, m1w) { | |
return y1w / m1w; | |
}, | |
'X77': function(H77, Z77) { | |
return H77 < Z77; | |
}, | |
'T67': function(j67, E67) { | |
return j67 === E67; | |
}, | |
'K9w': function(R9w, t9w) { | |
return R9w < t9w; | |
}, | |
'T9O': function(j9O, E9O) { | |
return j9O - E9O; | |
}, | |
'y67': function(m67, N67) { | |
return m67 === N67; | |
}, | |
'U6D': function(Q6D, s6D) { | |
return Q6D > s6D; | |
}, | |
'p97': function(W97, f97) { | |
return W97 === f97; | |
}, | |
'F17': function(T17, j17) { | |
return T17 - j17; | |
}, | |
'E17': function(K17, R17) { | |
return K17 - R17; | |
}, | |
's1W': function(D1W, c1W) { | |
return D1W / c1W; | |
}, | |
'a07': function(e07, F07) { | |
return e07 < F07; | |
}, | |
'b37': function(r37, S37) { | |
return r37 == S37; | |
}, | |
'r7j': function(S7j, a7j) { | |
return S7j < a7j; | |
}, | |
'B0w': function(C4D, U4D) { | |
return C4D * U4D; | |
}, | |
'J8W': function(X8W, H8W) { | |
return X8W !== H8W; | |
}, | |
'T37': function(j37, E37) { | |
return j37 === E37; | |
}, | |
'N8O': function(n8O, G8O) { | |
return n8O == G8O; | |
}, | |
'Q2D': function(s2D, D2D) { | |
return s2D < D2D; | |
}, | |
'T5w': function(j5w, E5w) { | |
return j5w > E5w; | |
}, | |
'H4j': function(Z4j, Y4j) { | |
return Z4j <= Y4j; | |
}, | |
'y5w': function(m5w, N5w) { | |
return m5w * N5w; | |
}, | |
'v1w': function(P1w, w1w) { | |
return P1w < w1w; | |
}, | |
't1O': function(I1O, x1O) { | |
return I1O != x1O; | |
}, | |
'O9D': function(h9D, g9D) { | |
return h9D === g9D; | |
}, | |
'n6D': function(G6D, i6D) { | |
return G6D <= i6D; | |
}, | |
'J3w': function(X3w, H3w) { | |
return X3w > H3w; | |
}, | |
'f2W': function(y2W, m2W) { | |
return y2W < m2W; | |
}, | |
'V17': function(L17, k17) { | |
return L17 - k17; | |
}, | |
'b7O': function(r7O, S7O) { | |
return r7O - S7O; | |
}, | |
'G2O': function(i2O, A2O) { | |
return i2O != A2O; | |
}, | |
'm27': function(N27, n27) { | |
return N27 >= n27; | |
}, | |
'f8D': function(y8D, m8D) { | |
return y8D === m8D; | |
}, | |
'B1w': function(C2w, U2w) { | |
return C2w <= U2w; | |
}, | |
'C4O': function(U4O, Q4O) { | |
return U4O === Q4O; | |
}, | |
'H0O': function(Z0O, Y0O) { | |
return Z0O - Y0O; | |
}, | |
'b07': function(r07, S07) { | |
return r07 < S07; | |
}, | |
't5j': function(I5j, x5j) { | |
return I5j === x5j; | |
}, | |
'P67': function(w67, V67) { | |
return w67 >= V67; | |
}, | |
'o17': function(z17, u17) { | |
return z17 < u17; | |
}, | |
'R77': function(t77, I77) { | |
return t77 === I77; | |
}, | |
'Y2w': function(v2w, P2w) { | |
return v2w - P2w; | |
}, | |
'K6W': function(R6W, t6W) { | |
return R6W === t6W; | |
}, | |
'z9O': function(u9O, q9O) { | |
return u9O - q9O; | |
}, | |
'X7j': function(H7j, Z7j) { | |
return H7j !== Z7j; | |
}, | |
'V0w': function(L0w, k0w) { | |
return L0w - k0w; | |
}, | |
'u4w': function(q4w, b4w) { | |
return q4w <= b4w; | |
}, | |
'B5j': function(C7j, U7j) { | |
return C7j > U7j; | |
}, | |
'k7D': function(o7D, z7D) { | |
return o7D <= z7D; | |
}, | |
'n37': function(G37, i37) { | |
return G37 === i37; | |
}, | |
'M9W': function(l9W, O9W) { | |
return l9W === O9W; | |
}, | |
'm0O': function(N0O, n0O) { | |
return N0O | n0O; | |
}, | |
'u1j': 3, | |
't1w': function(I1w, x1w) { | |
return I1w > x1w; | |
}, | |
't17': function(I17, x17) { | |
return I17 / x17; | |
}, | |
'a67': function(e67, F67) { | |
return e67 - F67; | |
}, | |
'N0w': function(n0w, G0w) { | |
return n0w / G0w; | |
}, | |
'w5O': function(V5O, L5O) { | |
return V5O === L5O; | |
}, | |
'm87': function(N87, n87) { | |
return N87 === n87; | |
}, | |
'B1O': function(C2O, U2O) { | |
return C2O >= U2O; | |
}, | |
'E57': function(K57, R57) { | |
return K57 >= R57; | |
}, | |
'm9W': function(N9W, n9W) { | |
return N9W < n9W; | |
}, | |
'q8O': function(b8O, r8O) { | |
return b8O == r8O; | |
}, | |
'p6D': function(W6D, f6D) { | |
return W6D > f6D; | |
}, | |
'e3D': function(F3D, T3D) { | |
return F3D * T3D; | |
}, | |
'v07': function(P07, w07) { | |
return P07 * w07; | |
}, | |
'v1D': function(P1D, w1D) { | |
return P1D <= w1D; | |
}, | |
's07': function(D07, c07) { | |
return D07 - c07; | |
}, | |
'W4D': function(f4D, y4D) { | |
return f4D - y4D; | |
}, | |
'R2D': function(t2D, I2D) { | |
return t2D == I2D; | |
}, | |
'a9w': function(e9w, F9w) { | |
return e9w < F9w; | |
}, | |
'S5j': function(a5j, e5j) { | |
return a5j == e5j; | |
}, | |
'g57': function(J57, X57) { | |
return J57 === X57; | |
}, | |
'E4j': function(K4j, R4j) { | |
return K4j - R4j; | |
}, | |
'M0W': function(l0W, O0W) { | |
return l0W - O0W; | |
}, | |
'd5D': function(p5D, W5D) { | |
return p5D < W5D; | |
}, | |
'f4O': function(y4O, m4O) { | |
return y4O < m4O; | |
}, | |
'X9W': function(H9W, Z9W) { | |
return H9W < Z9W; | |
}, | |
'I1W': function(x1W, B1W) { | |
return x1W < B1W; | |
}, | |
'G0D': function(i0D, A0D, M0D) { | |
return i0D * A0D / M0D; | |
}, | |
'n67': function(G67, i67) { | |
return G67 !== i67; | |
}, | |
'g3W': function(J3W, X3W) { | |
return J3W - X3W; | |
}, | |
'l8w': function(O8w, h8w) { | |
return O8w === h8w; | |
}, | |
'X0W': function(H0W, Z0W) { | |
return H0W <= Z0W; | |
}, | |
'r27': function(S27, a27) { | |
return S27 > a27; | |
}, | |
'A37': function(M37, l37) { | |
return M37 === l37; | |
}, | |
'E0w': function(K0w, R0w) { | |
return K0w - R0w; | |
}, | |
'J9D': function(X9D, H9D) { | |
return X9D >= H9D; | |
}, | |
'R7j': function(t7j, I7j) { | |
return t7j - I7j; | |
}, | |
'K8W': function(R8W, t8W) { | |
return R8W < t8W; | |
}, | |
'l0D': function(O0D, h0D, g0D) { | |
return O0D * h0D / g0D; | |
}, | |
'l4O': function(O4O, h4O) { | |
return O4O === h4O; | |
}, | |
'y9w': function(m9w, N9w) { | |
return m9w <= N9w; | |
}, | |
'o1D': function(z1D, u1D) { | |
return z1D / u1D; | |
}, | |
'M7D': function(l7D, O7D) { | |
return l7D < O7D; | |
}, | |
'n7w': function(G7w, i7w) { | |
return G7w >= i7w; | |
}, | |
'Q9W': function(s9W, D9W) { | |
return s9W === D9W; | |
}, | |
'l07': function(O07, h07) { | |
return O07 - h07; | |
}, | |
'y6w': function(m6w, N6w) { | |
return m6w > N6w; | |
}, | |
'n3O': function(G3O, i3O) { | |
return G3O < i3O; | |
}, | |
'o3W': function(z3W, u3W) { | |
return z3W - u3W; | |
}, | |
'J9O': function(X9O, H9O) { | |
return X9O < H9O; | |
}, | |
'C3O': function(U3O, Q3O) { | |
return U3O <= Q3O; | |
}, | |
'G9W': function(i9W, A9W) { | |
return i9W === A9W; | |
}, | |
'K9D': function(R9D, t9D) { | |
return R9D - t9D; | |
}, | |
'J6j': (function() { | |
var X6j = function(L6j, k6j, o6j) { | |
if (a6j[o6j] !== undefined) { | |
return a6j[o6j]; | |
} | |
var z6j = 0xcc9e2d51, | |
u6j = 0x1b873593, | |
q6j = o6j, | |
b6j = k6j & ~0x3; | |
for (var r6j = 0; r6j < b6j; r6j += 4) { | |
var S6j = (L6j.charCodeAt(r6j) & 0xff) | ((L6j.charCodeAt(r6j + 1) & 0xff) << 8) | ((L6j.charCodeAt(r6j + 2) & 0xff) << 16) | ((L6j.charCodeAt(r6j + 3) & 0xff) << 24); | |
S6j = Y6j(S6j, z6j); | |
S6j = ((S6j & 0x1ffff) << 15) | (S6j >>> 17); | |
S6j = Y6j(S6j, u6j); | |
q6j ^= S6j; | |
q6j = ((q6j & 0x7ffff) << 13) | (q6j >>> 19); | |
q6j = (q6j * 5 + 0xe6546b64) | 0; | |
} | |
S6j = 0; | |
switch (k6j % 4) { | |
case 3: | |
S6j = (L6j.charCodeAt(b6j + 2) & 0xff) << 16; | |
case 2: | |
S6j |= (L6j.charCodeAt(b6j + 1) & 0xff) << 8; | |
case 1: | |
S6j |= (L6j.charCodeAt(b6j) & 0xff); | |
S6j = Y6j(S6j, z6j); | |
S6j = ((S6j & 0x1ffff) << 15) | (S6j >>> 17); | |
S6j = Y6j(S6j, u6j); | |
q6j ^= S6j; | |
} | |
q6j ^= k6j; | |
q6j ^= q6j >>> 16; | |
q6j = Y6j(q6j, 0x85ebca6b); | |
q6j ^= q6j >>> 13; | |
q6j = Y6j(q6j, 0xc2b2ae35); | |
q6j ^= q6j >>> 16; | |
a6j[o6j] = q6j; | |
return q6j; | |
}, | |
Y6j = function(v6j, P6j) { | |
var w6j = P6j & 0xffff; | |
var V6j = P6j - w6j; | |
return ((V6j * v6j | 0) + (w6j * v6j | 0)) | 0; | |
}, | |
a6j = {}; | |
return { | |
Y6j: Y6j, | |
X6j: X6j | |
}; | |
})(), | |
'v8D': function(P8D, w8D) { | |
return P8D - w8D; | |
}, | |
'I0O': function(x0O, B0O) { | |
return x0O < B0O; | |
}, | |
'm5O': function(N5O, n5O) { | |
return N5O != n5O; | |
}, | |
'Y3D': function(v3D, P3D) { | |
return v3D === P3D; | |
}, | |
't57': function(I57, x57) { | |
return I57 >= x57; | |
}, | |
'q1D': function(b1D, r1D) { | |
return b1D < r1D; | |
}, | |
'Z37': function(Y37, v37) { | |
return Y37 < v37; | |
}, | |
'j7j': function(E7j, K7j) { | |
return E7j < K7j; | |
}, | |
'i8w': function(A8w, M8w) { | |
return A8w > M8w; | |
}, | |
'H1D': function(Z1D, Y1D) { | |
return Z1D <= Y1D; | |
}, | |
'T07': function(j07, E07) { | |
return j07 - E07; | |
}, | |
'v4j': function(P4j, w4j) { | |
return P4j * w4j; | |
}, | |
'm2D': function(N2D, n2D) { | |
return N2D / n2D; | |
}, | |
'o0O': function(z0O, u0O) { | |
return z0O < u0O; | |
}, | |
'Q0D': function(s0D, D0D, c0D) { | |
return s0D * D0D / c0D; | |
}, | |
'x87': function(B87, C37) { | |
return B87 > C37; | |
}, | |
'q3W': function(b3W, r3W) { | |
return b3W < r3W; | |
}, | |
'q8D': function(b8D, r8D) { | |
return b8D !== r8D; | |
}, | |
'k2D': function(o2D, z2D) { | |
return o2D / z2D; | |
}, | |
'O4w': function(h4w, g4w) { | |
return h4w | g4w; | |
}, | |
't4j': function(I4j, x4j) { | |
return I4j > x4j; | |
}, | |
'q5j': function(b5j, r5j) { | |
return b5j / r5j; | |
}, | |
'S0w': function(a0w, e0w) { | |
return a0w < e0w; | |
}, | |
'c7j': function(d7j, p7j) { | |
return d7j / p7j; | |
}, | |
'x2w': function(B2w, C9w) { | |
return B2w <= C9w; | |
}, | |
'u2D': function(q2D, b2D) { | |
return q2D / b2D; | |
}, | |
'F1D': function(T1D, j1D) { | |
return T1D < j1D; | |
}, | |
'e9W': function(F9W, T9W) { | |
return F9W === T9W; | |
}, | |
'F0w': function(T0w, j0w) { | |
return T0w < j0w; | |
}, | |
'P9O': function(w9O, V9O) { | |
return w9O == V9O; | |
}, | |
'A7w': function(M7w, l7w) { | |
return M7w < l7w; | |
}, | |
'E4O': function(K4O, R4O) { | |
return K4O === R4O; | |
}, | |
'w97': function(V97, L97) { | |
return V97 < L97; | |
}, | |
'a8W': function(e8W, F8W) { | |
return e8W != F8W; | |
}, | |
'C2W': function(U2W, Q2W) { | |
return U2W < Q2W; | |
}, | |
'O9O': function(h9O, g9O) { | |
return h9O != g9O; | |
}, | |
'z6O': function(u6O, q6O) { | |
return u6O !== q6O; | |
}, | |
'h2D': function(g2D, J2D) { | |
return g2D / J2D; | |
}, | |
'j3O': function(E3O, K3O) { | |
return E3O * K3O; | |
}, | |
'X3D': function(H3D, Z3D) { | |
return H3D === Z3D; | |
}, | |
'i1D': function(A1D, M1D) { | |
return A1D === M1D; | |
}, | |
'a9O': function(e9O, F9O) { | |
return e9O - F9O; | |
}, | |
'b9D': function(r9D, S9D) { | |
return r9D === S9D; | |
}, | |
'g0w': function(J0w, X0w) { | |
return J0w < X0w; | |
}, | |
'V1w': function(L1w, k1w) { | |
return L1w < k1w; | |
}, | |
'p5w': function(W5w, f5w) { | |
return W5w > f5w; | |
}, | |
'b6W': function(r6W, S6W) { | |
return r6W > S6W; | |
}, | |
'B4O': function(C5O, U5O) { | |
return C5O > U5O; | |
}, | |
'R7w': function(t7w, I7w) { | |
return t7w - I7w; | |
}, | |
'L6D': function(k6D, o6D) { | |
return k6D < o6D; | |
}, | |
'e2w': function(F2w, T2w) { | |
return F2w > T2w; | |
}, | |
'a4D': function(e4D, F4D) { | |
return e4D === F4D; | |
}, | |
'Z5w': function(Y5w, v5w) { | |
return Y5w / v5w; | |
}, | |
'H5D': function(Z5D, Y5D) { | |
return Z5D >= Y5D; | |
}, | |
'A9w': function(M9w, l9w) { | |
return M9w - l9w; | |
}, | |
'y3O': function(m3O, N3O) { | |
return m3O < N3O; | |
}, | |
'j7D': function(E7D, K7D) { | |
return E7D - K7D; | |
}, | |
'd57': function(p57, W57) { | |
return p57 > W57; | |
}, | |
't3W': function(I3W, x3W) { | |
return I3W == x3W; | |
}, | |
'Y2O': function(v2O, P2O) { | |
return v2O == P2O; | |
}, | |
'A5w': function(M5w, l5w) { | |
return M5w > l5w; | |
}, | |
'O47': function(h47, g47) { | |
return h47 * g47; | |
}, | |
'm4D': function(N4D, n4D, G4D) { | |
return N4D - n4D - G4D; | |
}, | |
'l57': function(O57, h57) { | |
return O57 > h57; | |
}, | |
't1D': function(I1D, x1D) { | |
return I1D < x1D; | |
}, | |
'S8O': function(a8O, e8O) { | |
return a8O - e8O; | |
}, | |
'J9w': function(X9w, H9w) { | |
return X9w <= H9w; | |
}, | |
'H07': function(Z07, Y07) { | |
return Z07 - Y07; | |
}, | |
'f6O': function(y6O, m6O) { | |
return y6O < m6O; | |
}, | |
'v3W': function(P3W, w3W) { | |
return P3W === w3W; | |
}, | |
'f07': function(y07, m07) { | |
return y07 - m07; | |
}, | |
'g17': function(J17, X17) { | |
return J17 <= X17; | |
}, | |
'b4D': function(r4D, S4D) { | |
return r4D >= S4D; | |
}, | |
'N2W': function(n2W, G2W) { | |
return n2W > G2W; | |
}, | |
'c0W': function(d0W, p0W) { | |
return d0W >= p0W; | |
}, | |
'm77': function(N77, n77) { | |
return N77 >= n77; | |
}, | |
'k9W': function(o9W, z9W) { | |
return o9W < z9W; | |
}, | |
'S1D': function(a1D, e1D) { | |
return a1D - e1D; | |
}, | |
'k7j': function(o7j, z7j) { | |
return o7j !== z7j; | |
}, | |
'v0O': function(P0O, w0O) { | |
return P0O <= w0O; | |
}, | |
'O5w': function(h5w, g5w) { | |
return h5w < g5w; | |
}, | |
'z9w': function(u9w, q9w) { | |
return u9w - q9w; | |
}, | |
'B57': function(C77, U77) { | |
return C77 - U77; | |
}, | |
'L6w': function(k6w, o6w) { | |
return k6w >= o6w; | |
}, | |
'L1W': function(k1W, o1W) { | |
return k1W === o1W; | |
}, | |
'z8W': function(u8W, q8W) { | |
return u8W !== q8W; | |
}, | |
'e2D': function(F2D, T2D) { | |
return F2D != T2D; | |
}, | |
'u2w': function(q2w, b2w) { | |
return q2w > b2w; | |
}, | |
'Q0W': function(s0W, D0W) { | |
return s0W === D0W; | |
}, | |
'M2D': function(l2D, O2D) { | |
return l2D / O2D; | |
}, | |
'R2w': function(t2w, I2w) { | |
return t2w < I2w; | |
}, | |
'w7w': function(V7w, L7w) { | |
return V7w < L7w; | |
}, | |
'A67': function(M67, l67) { | |
return M67 !== l67; | |
}, | |
'i17': function(A17, M17) { | |
return A17 !== M17; | |
}, | |
'f8O': function(y8O, m8O) { | |
return y8O == m8O; | |
}, | |
'i0w': function(A0w, M0w) { | |
return A0w - M0w; | |
}, | |
'y9D': function(m9D, N9D) { | |
return m9D - N9D; | |
}, | |
'Q7j': function(s7j, D7j) { | |
return s7j === D7j; | |
}, | |
'M7j': function(l7j, O7j) { | |
return l7j / O7j; | |
}, | |
'I9D': function(x9D, B9D) { | |
return x9D !== B9D; | |
}, | |
'Q27': function(s27, D27) { | |
return s27 >= D27; | |
}, | |
'h5O': function(g5O, J5O) { | |
return g5O == J5O; | |
}, | |
'c3D': function(d3D, p3D) { | |
return d3D * p3D; | |
}, | |
'f0w': function(y0w, m0w) { | |
return y0w != m0w; | |
}, | |
'R0W': function(t0W, I0W) { | |
return t0W < I0W; | |
}, | |
'f57': function(y57, m57) { | |
return y57 === m57; | |
}, | |
'a6D': function(e6D, F6D) { | |
return e6D - F6D; | |
}, | |
'D6w': function(c6w, d6w) { | |
return c6w - d6w; | |
}, | |
'C4w': function(U4w, Q4w) { | |
return U4w > Q4w; | |
}, | |
'C3w': function(U3w, Q3w) { | |
return U3w * Q3w; | |
}, | |
'g07': function(J07, X07) { | |
return J07 < X07; | |
}, | |
'U6w': function(Q6w, s6w) { | |
return Q6w === s6w; | |
}, | |
'a6w': function(e6w, F6w) { | |
return e6w < F6w; | |
}, | |
'p6w': function(W6w, f6w) { | |
return W6w / f6w; | |
}, | |
'T8W': function(j8W, E8W) { | |
return j8W < E8W; | |
}, | |
'k77': function(o77, z77) { | |
return o77 !== z77; | |
}, | |
'P9w': function(w9w, V9w) { | |
return w9w - V9w; | |
}, | |
'd6O': function(p6O, W6O) { | |
return p6O <= W6O; | |
}, | |
'd1D': function(p1D, W1D) { | |
return p1D - W1D; | |
}, | |
'A6j': function(M6j, l6j) { | |
return M6j < l6j; | |
}, | |
'b8W': function(r8W, S8W) { | |
return r8W - S8W; | |
}, | |
'T8w': function(j8w, E8w) { | |
return j8w < E8w; | |
}, | |
'D8W': function(c8W, d8W) { | |
return c8W < d8W; | |
}, | |
'L7O': function(k7O, o7O) { | |
return k7O > o7O; | |
}, | |
'R2O': function(t2O, I2O) { | |
return t2O == I2O; | |
}, | |
'J4D': function(X4D, H4D) { | |
return X4D * H4D; | |
}, | |
't2W': function(I2W, x2W) { | |
return I2W == x2W; | |
}, | |
'j2O': function(E2O, K2O) { | |
return E2O != K2O; | |
}, | |
'm3D': function(N3D, n3D) { | |
return N3D * n3D; | |
}, | |
'u5O': function(q5O, b5O) { | |
return q5O === b5O; | |
}, | |
'S57': function(a57, e57) { | |
return a57 === e57; | |
}, | |
'Y4w': function(v4w, P4w) { | |
return v4w < P4w; | |
}, | |
'K07': function(R07, t07) { | |
return R07 == t07; | |
}, | |
'o5j': function(z5j, u5j) { | |
return z5j / u5j; | |
}, | |
'L6O': function(k6O, o6O) { | |
return k6O > o6O; | |
}, | |
'Z8W': function(Y8W, v8W) { | |
return Y8W == v8W; | |
}, | |
'H8O': function(Z8O, Y8O) { | |
return Z8O != Y8O; | |
}, | |
'q4O': function(b4O, r4O) { | |
return b4O === r4O; | |
}, | |
'X5O': function(H5O, Z5O) { | |
return H5O >= Z5O; | |
}, | |
'q0O': function(b0O, r0O) { | |
return b0O < r0O; | |
}, | |
'u2O': function(q2O, b2O) { | |
return q2O == b2O; | |
}, | |
'R9W': function(t9W, I9W) { | |
return t9W !== I9W; | |
}, | |
'q17': function(b17, r17) { | |
return b17 == r17; | |
}, | |
'b1W': function(r1W, S1W) { | |
return r1W === S1W; | |
}, | |
'i8O': function(A8O, M8O) { | |
return A8O == M8O; | |
}, | |
'K6D': function(R6D, t6D) { | |
return R6D === t6D; | |
}, | |
'P37': function(w37, V37) { | |
return w37 - V37; | |
}, | |
'P9D': function(w9D, V9D) { | |
return w9D === V9D; | |
}, | |
'P6D': function(w6D, V6D) { | |
return w6D - V6D; | |
}, | |
'P6w': function(w6w, V6w) { | |
return w6w < V6w; | |
}, | |
'g87': function(J87, X87) { | |
return J87 !== X87; | |
}, | |
'q57': function(b57, r57) { | |
return b57 === r57; | |
}, | |
'j5O': function(E5O, K5O) { | |
return E5O <= K5O; | |
}, | |
'I9w': function(x9w, B9w) { | |
return x9w > B9w; | |
}, | |
'x7w': function(B7w, C6w) { | |
return B7w <= C6w; | |
}, | |
'G97': function(i97, A97) { | |
return i97 > A97; | |
}, | |
'z7O': function(u7O, q7O) { | |
return u7O > q7O; | |
}, | |
'T9w': function(j9w, E9w) { | |
return j9w > E9w; | |
}, | |
'd8w': function(p8w, W8w) { | |
return p8w <= W8w; | |
}, | |
'W7D': function(f7D, y7D) { | |
return f7D > y7D; | |
}, | |
'h97': function(g97, J97) { | |
return g97 != J97; | |
}, | |
'c27': function(d27, p27) { | |
return d27 != p27; | |
}, | |
'g6O': function(J6O, X6O) { | |
return J6O < X6O; | |
}, | |
'w77': function(V77, L77) { | |
return V77 - L77; | |
}, | |
'L67': function(k67, o67) { | |
return k67 < o67; | |
}, | |
'U5w': function(Q5w, s5w) { | |
return Q5w < s5w; | |
}, | |
'I6w': function(x6w, B6w) { | |
return x6w < B6w; | |
}, | |
'e97': function(F97, T97) { | |
return F97 != T97; | |
}, | |
'b5w': function(r5w, S5w) { | |
return r5w - S5w; | |
}, | |
'y7w': function(m7w, N7w) { | |
return m7w <= N7w; | |
}, | |
'y6j': function(m6j, N6j) { | |
return m6j < N6j; | |
}, | |
'K7O': function(R7O, t7O) { | |
return R7O > t7O; | |
}, | |
'x2O': function(B2O, C9O) { | |
return B2O - C9O; | |
}, | |
'e5O': function(F5O, T5O) { | |
return F5O === T5O; | |
}, | |
'f1D': function(y1D, m1D) { | |
return y1D === m1D; | |
}, | |
'D6D': function(c6D, d6D) { | |
return c6D > d6D; | |
}, | |
'F4O': function(T4O, j4O) { | |
return T4O == j4O; | |
}, | |
'p7O': function(W7O, f7O) { | |
return W7O - f7O; | |
}, | |
'N1D': function(n1D, G1D) { | |
return n1D === G1D; | |
}, | |
's8O': function(D8O, c8O) { | |
return D8O === c8O; | |
}, | |
'L9w': function(k9w, o9w) { | |
return k9w - o9w; | |
}, | |
'm2O': function(N2O, n2O) { | |
return N2O === n2O; | |
}, | |
'M2w': function(l2w, O2w) { | |
return l2w == O2w; | |
}, | |
'W5O': function(f5O, y5O) { | |
return f5O < y5O; | |
}, | |
'R87': function(t87, I87) { | |
return t87 < I87; | |
}, | |
'K3w': function(R3w, t3w) { | |
return R3w > t3w; | |
}, | |
'E5j': function(K5j, R5j) { | |
return K5j / R5j; | |
}, | |
'K6O': function(R6O, t6O) { | |
return R6O !== t6O; | |
}, | |
'L5w': function(k5w, o5w) { | |
return k5w > o5w; | |
}, | |
'o4O': function(z4O, u4O) { | |
return z4O - u4O; | |
}, | |
'j2D': function(E2D, K2D) { | |
return E2D == K2D; | |
}, | |
'P0D': function(w0D, V0D) { | |
return w0D - V0D; | |
}, | |
'd1O': function(p1O, W1O) { | |
return p1O == W1O; | |
}, | |
'j77': function(E77, K77) { | |
return E77 === K77; | |
}, | |
'U7O': function(Q7O, s7O) { | |
return Q7O < s7O; | |
}, | |
'O37': function(h37, g37) { | |
return h37 == g37; | |
}, | |
'I6W': function(x6W, B6W) { | |
return x6W < B6W; | |
}, | |
'N17': function(n17, G17) { | |
return n17 === G17; | |
}, | |
't0w': function(I0w, x0w) { | |
return I0w - x0w; | |
}, | |
'V5D': function(L5D, k5D) { | |
return L5D | k5D; | |
}, | |
'j2w': function(E2w, K2w) { | |
return E2w < K2w; | |
}, | |
'H5j': function(Z5j, Y5j) { | |
return Z5j < Y5j; | |
}, | |
'x7j': function(B7j, C6j) { | |
return B7j < C6j; | |
}, | |
'H4O': function(Z4O, Y4O) { | |
return Z4O >= Y4O; | |
}, | |
'G0O': function(i0O, A0O, M0O) { | |
return i0O * A0O / M0O; | |
}, | |
'o8O': function(z8O, u8O) { | |
return z8O == u8O; | |
}, | |
'l1w': function(O1w, h1w) { | |
return O1w < h1w; | |
}, | |
'k7w': function(o7w, z7w) { | |
return o7w > z7w; | |
}, | |
'I3w': function(x3w, B3w) { | |
return x3w <= B3w; | |
}, | |
'Y9W': function(v9W, P9W) { | |
return v9W - P9W; | |
}, | |
'i5j': function(A5j, M5j) { | |
return A5j - M5j; | |
}, | |
'E2W': function(K2W, R2W) { | |
return K2W !== R2W; | |
}, | |
'H87': function(Z87, Y87) { | |
return Z87 < Y87; | |
}, | |
'f5D': function(y5D, m5D) { | |
return y5D - m5D; | |
}, | |
'Z9O': function(Y9O, v9O) { | |
return Y9O > v9O; | |
}, | |
'A9D': function(M9D, l9D) { | |
return M9D === l9D; | |
}, | |
's6O': function(D6O, c6O) { | |
return D6O / c6O; | |
}, | |
'W2D': function(f2D, y2D) { | |
return f2D < y2D; | |
}, | |
'w3O': function(V3O, L3O) { | |
return V3O - L3O; | |
}, | |
'B5D': function(C7D, U7D) { | |
return C7D > U7D; | |
}, | |
'p6j': function(W6j, f6j) { | |
return W6j - f6j; | |
}, | |
'x9W': function(B9W, C8W) { | |
return B9W === C8W; | |
}, | |
'd5j': function(p5j, W5j) { | |
return p5j > W5j; | |
}, | |
'i07': function(A07, M07) { | |
return A07 < M07; | |
}, | |
'U9O': function(Q9O, s9O) { | |
return Q9O == s9O; | |
}, | |
'v87': function(P87, w87, V87, L87) { | |
return P87 - w87 + V87 + L87; | |
}, | |
'Z9w': function(Y9w, v9w) { | |
return Y9w > v9w; | |
}, | |
'o5D': function(z5D, u5D) { | |
return z5D - u5D; | |
}, | |
'u7j': function(q7j, b7j) { | |
return q7j - b7j; | |
}, | |
'K37': function(R37, t37) { | |
return R37 * t37; | |
}, | |
'T7w': function(j7w, E7w, K7w) { | |
return j7w * E7w / K7w; | |
}, | |
'w9W': function(V9W, L9W) { | |
return V9W === L9W; | |
}, | |
'w4w': function(V4w, L4w) { | |
return V4w / L4w; | |
}, | |
'o2W': function(z2W, u2W) { | |
return z2W == u2W; | |
}, | |
'J7O': function(X7O, H7O) { | |
return X7O <= H7O; | |
}, | |
's1D': function(D1D, c1D) { | |
return D1D - c1D; | |
}, | |
'T4D': function(j4D, E4D) { | |
return j4D > E4D; | |
}, | |
'h9W': function(g9W, J9W) { | |
return g9W < J9W; | |
}, | |
'l0O': function(O0O, h0O) { | |
return O0O < h0O; | |
}, | |
'h3D': function(g3D, J3D) { | |
return g3D === J3D; | |
}, | |
'l1D': function(O1D, h1D) { | |
return O1D === h1D; | |
}, | |
'l4j': function(O4j, h4j) { | |
return O4j * h4j; | |
}, | |
'L0D': function(k0D, o0D) { | |
return k0D % o0D; | |
}, | |
'm2w': function(N2w, n2w) { | |
return N2w < n2w; | |
}, | |
'V2W': function(L2W, k2W) { | |
return L2W === k2W; | |
}, | |
'u87': function(q87, b87) { | |
return q87 === b87; | |
}, | |
'X2D': function(H2D, Z2D) { | |
return H2D < Z2D; | |
}, | |
'T6D': function(j6D, E6D) { | |
return j6D <= E6D; | |
}, | |
'X3O': function(H3O, Z3O) { | |
return H3O < Z3O; | |
}, | |
'N1O': function(n1O, G1O) { | |
return n1O == G1O; | |
}, | |
'n6j': function(G6j, i6j) { | |
return G6j >= i6j; | |
}, | |
'l5j': function(O5j, h5j) { | |
return O5j - h5j; | |
}, | |
'k3O': function(o3O, z3O) { | |
return o3O < z3O; | |
}, | |
'C4j': function(U4j, Q4j) { | |
return U4j / Q4j; | |
}, | |
'v0w': function(P0w, w0w) { | |
return P0w - w0w; | |
}, | |
'X6t': 15, | |
'm7j': function(N7j, n7j) { | |
return N7j < n7j; | |
}, | |
'c2w': function(d2w, p2w) { | |
return d2w < p2w; | |
}, | |
'M5O': function(l5O, O5O) { | |
return l5O !== O5O; | |
}, | |
'g8w': function(J8w, X8w) { | |
return J8w < X8w; | |
}, | |
'a9D': function(e9D, F9D) { | |
return e9D === F9D; | |
}, | |
'x3O': function(B3O, C0O, U0O) { | |
return B3O * C0O / U0O; | |
}, | |
'e0W': function(F0W, T0W) { | |
return F0W < T0W; | |
}, | |
'r87': function(S87, a87) { | |
return S87 === a87; | |
}, | |
'F1w': function(T1w, j1w) { | |
return T1w < j1w; | |
}, | |
't4O': function(I4O, x4O) { | |
return I4O === x4O; | |
}, | |
't5D': function(I5D, x5D) { | |
return I5D <= x5D; | |
}, | |
'H8D': function(Z8D, Y8D) { | |
return Z8D != Y8D; | |
}, | |
'r9W': function(S9W, a9W) { | |
return S9W - a9W; | |
}, | |
'K0D': function(R0D, t0D) { | |
return R0D / t0D; | |
}, | |
'X97': function(H97, Z97) { | |
return H97 != Z97; | |
}, | |
'I9O': function(x9O, B9O) { | |
return x9O != B9O; | |
}, | |
'r3D': function(S3D, a3D) { | |
return S3D * a3D; | |
}, | |
'l0w': function(O0w, h0w) { | |
return O0w < h0w; | |
}, | |
'M77': function(l77, O77) { | |
return l77 < O77; | |
}, | |
'N4j': function(n4j, G4j) { | |
return n4j === G4j; | |
}, | |
'B17': function(C27, U27) { | |
return C27 < U27; | |
}, | |
'D97': function(c97, d97) { | |
return c97 === d97; | |
}, | |
'k2O': function(o2O, z2O) { | |
return o2O < z2O; | |
}, | |
'v57': function(P57, w57) { | |
return P57 >= w57; | |
}, | |
'J0D': function(X0D, H0D) { | |
return X0D === H0D; | |
}, | |
'U87': function(Q87, s87, D87) { | |
return Q87 - s87 - D87; | |
}, | |
'y0D': function(m0D, N0D, n0D) { | |
return m0D * N0D / n0D; | |
}, | |
'g1D': function(J1D, X1D) { | |
return J1D - X1D; | |
}, | |
'A6D': function(M6D, l6D) { | |
return M6D >= l6D; | |
}, | |
'S1j': 1, | |
'P1W': function(w1W, V1W) { | |
return w1W > V1W; | |
}, | |
'R97': function(t97, I97) { | |
return t97 < I97; | |
}, | |
'T6O': function(j6O, E6O) { | |
return j6O - E6O; | |
}, | |
's1O': function(D1O, c1O) { | |
return D1O < c1O; | |
}, | |
'n7O': function(G7O, i7O) { | |
return G7O === i7O; | |
}, | |
'I0D': function(x0D, B0D) { | |
return x0D / B0D; | |
}, | |
'n5w': function(G5w, i5w) { | |
return G5w * i5w; | |
}, | |
'C1w': function(U1w, Q1w) { | |
return U1w < Q1w; | |
}, | |
'L47': function(k47, o47) { | |
return k47 >= o47; | |
}, | |
'Y7D': function(v7D, P7D) { | |
return v7D - P7D; | |
}, | |
'Z4D': function(Y4D, v4D) { | |
return Y4D * v4D; | |
}, | |
'K4D': function(R4D, t4D) { | |
return R4D * t4D; | |
}, | |
'h7D': function(g7D, J7D) { | |
return g7D * J7D; | |
}, | |
'w27': function(V27, L27) { | |
return V27 > L27; | |
}, | |
'V4j': function(L4j, k4j) { | |
return L4j - k4j; | |
}, | |
'S5D': function(a5D, e5D) { | |
return a5D === e5D; | |
}, | |
'T9D': function(j9D, E9D) { | |
return j9D === E9D; | |
}, | |
'X2O': function(H2O, Z2O) { | |
return H2O == Z2O; | |
}, | |
'd8D': function(p8D, W8D) { | |
return p8D < W8D; | |
}, | |
'Z9D': function(Y9D, v9D) { | |
return Y9D < v9D; | |
}, | |
'H2W': function(Z2W, Y2W) { | |
return Z2W === Y2W; | |
}, | |
'V4O': function(L4O, k4O) { | |
return L4O === k4O; | |
}, | |
'Q77': function(s77, D77) { | |
return s77 >= D77; | |
}, | |
'g5j': function(J5j, X5j) { | |
return J5j == X5j; | |
}, | |
'O7O': function(h7O, g7O) { | |
return h7O < g7O; | |
}, | |
'p7w': function(W7w, f7w) { | |
return W7w * f7w; | |
}, | |
'V57': function(L57, k57) { | |
return L57 >= k57; | |
}, | |
'z47': function(u47, q47) { | |
return u47 > q47; | |
}, | |
'g8O': function(J8O, X8O) { | |
return J8O != X8O; | |
}, | |
'J4w': function(X4w, H4w, Z4w) { | |
return X4w * H4w / Z4w; | |
}, | |
'e77': function(F77, T77) { | |
return F77 === T77; | |
}, | |
'n9D': function(G9D, i9D) { | |
return G9D < i9D; | |
}, | |
'o4j': function(z4j, u4j) { | |
return z4j === u4j; | |
}, | |
'c5O': function(d5O, p5O) { | |
return d5O < p5O; | |
}, | |
'U67': function(Q67, s67) { | |
return Q67 < s67; | |
}, | |
'r2O': function(S2O, a2O) { | |
return S2O >= a2O; | |
}, | |
'V8D': function(L8D, k8D) { | |
return L8D < k8D; | |
}, | |
'w2w': function(V2w, L2w) { | |
return V2w - L2w; | |
}, | |
'r77': function(S77, a77) { | |
return S77 === a77; | |
}, | |
'G77': function(i77, A77) { | |
return i77 === A77; | |
}, | |
'v17': function(P17, w17) { | |
return P17 - w17; | |
}, | |
'T6w': function(j6w, E6w) { | |
return j6w < E6w; | |
}, | |
'O67': function(h67, g67) { | |
return h67 < g67; | |
}, | |
'x27': function(B27, C97) { | |
return B27 != C97; | |
}, | |
'K1W': function(R1W, t1W) { | |
return R1W === t1W; | |
}, | |
'l2W': function(O2W, h2W) { | |
return O2W === h2W; | |
}, | |
'd3W': function(p3W, W3W) { | |
return p3W - W3W; | |
}, | |
'b6D': function(r6D, S6D) { | |
return r6D <= S6D; | |
}, | |
'u3D': function(q3D, b3D) { | |
return q3D < b3D; | |
}, | |
'n9O': function(G9O, i9O) { | |
return G9O !== i9O; | |
}, | |
'i5D': function(A5D, M5D) { | |
return A5D < M5D; | |
}, | |
'W2w': function(f2w, y2w) { | |
return f2w > y2w; | |
}, | |
'B8D': function(C3D, U3D) { | |
return C3D === U3D; | |
}, | |
'w7j': function(V7j, L7j) { | |
return V7j !== L7j; | |
}, | |
'M3D': function(l3D, O3D) { | |
return l3D === O3D; | |
}, | |
'S7w': function(a7w, e7w, F7w) { | |
return a7w / e7w * F7w; | |
}, | |
'L3w': function(k3w, o3w) { | |
return k3w < o3w; | |
}, | |
'H1O': function(Z1O, Y1O) { | |
return Z1O === Y1O; | |
}, | |
'E1O': function(K1O, R1O) { | |
return K1O != R1O; | |
}, | |
'c4D': function(d4D, p4D) { | |
return d4D - p4D; | |
}, | |
'r5O': function(S5O, a5O) { | |
return S5O === a5O; | |
}, | |
'g5D': function(J5D, X5D) { | |
return J5D < X5D; | |
}, | |
'R3O': function(t3O, I3O) { | |
return t3O | I3O; | |
}, | |
'G7j': function(i7j, A7j) { | |
return i7j / A7j; | |
}, | |
'C6O': function(U6O, Q6O) { | |
return U6O === Q6O; | |
}, | |
'x3D': function(B3D, C0D, U0D) { | |
return B3D * C0D / U0D; | |
}, | |
'Z0D': function(Y0D, v0D) { | |
return Y0D - v0D; | |
}, | |
'P4D': function(w4D, V4D) { | |
return w4D - V4D; | |
}, | |
'L9O': function(k9O, o9O) { | |
return k9O > o9O; | |
}, | |
'W0W': function(f0W, y0W) { | |
return f0W <= y0W; | |
}, | |
's3W': function(D3W, c3W) { | |
return D3W < c3W; | |
}, | |
'N1w': function(n1w, G1w) { | |
return n1w < G1w; | |
}, | |
's8D': function(D8D, c8D) { | |
return D8D === c8D; | |
}, | |
'P6W': function(w6W, V6W) { | |
return w6W / V6W; | |
}, | |
'm7D': function(N7D, n7D) { | |
return N7D > n7D; | |
}, | |
'g1O': function(J1O, X1O) { | |
return J1O >= X1O; | |
}, | |
'W87': function(f87, y87) { | |
return f87 === y87; | |
}, | |
'J37': function(X37, H37) { | |
return X37 == H37; | |
}, | |
'F57': function(T57, j57) { | |
return T57 === j57; | |
}, | |
'f4j': function(y4j, m4j) { | |
return y4j / m4j; | |
}, | |
'H6t': 16, | |
'e7j': function(F7j, T7j) { | |
return F7j < T7j; | |
}, | |
'j1j': 0, | |
'J67': function(X67, H67) { | |
return X67 === H67; | |
}, | |
'o1w': function(z1w, u1w) { | |
return z1w > u1w; | |
}, | |
'o57': function(z57, u57) { | |
return z57 === u57; | |
}, | |
'U97': function(Q97, s97) { | |
return Q97 === s97; | |
}, | |
'Y7w': function(v7w, P7w) { | |
return v7w < P7w; | |
}, | |
'C07': function(U07, Q07) { | |
return U07 == Q07; | |
}, | |
'B2W': function(C9W, U9W) { | |
return C9W > U9W; | |
}, | |
'f3w': function(y3w, m3w) { | |
return y3w <= m3w; | |
}, | |
'y37': function(m37, N37) { | |
return m37 !== N37; | |
}, | |
'w7D': function(V7D, L7D) { | |
return V7D <= L7D; | |
}, | |
'V8O': function(L8O, k8O) { | |
return L8O == k8O; | |
}, | |
'X27': function(H27, Z27) { | |
return H27 - Z27; | |
}, | |
'D9O': function(c9O, d9O) { | |
return c9O !== d9O; | |
}, | |
'T1W': function(j1W, E1W) { | |
return j1W / E1W; | |
}, | |
'i1w': function(A1w, M1w) { | |
return A1w < M1w; | |
}, | |
'Z67': function(Y67, v67) { | |
return Y67 === v67; | |
}, | |
'Z3w': function(Y3w, v3w) { | |
return Y3w < v3w; | |
}, | |
'G0W': function(i0W, A0W) { | |
return i0W <= A0W; | |
}, | |
'i1W': function(A1W, M1W) { | |
return A1W < M1W; | |
}, | |
'v8O': function(P8O, w8O) { | |
return P8O > w8O; | |
}, | |
'l17': function(O17, h17) { | |
return O17 != h17; | |
}, | |
'f5j': function(y5j, m5j) { | |
return y5j > m5j; | |
}, | |
'q0w': function(b0w, r0w) { | |
return b0w >= r0w; | |
}, | |
'O6D': function(h6D, g6D) { | |
return h6D === g6D; | |
}, | |
'a47': function(e47, F47) { | |
return e47 >= F47; | |
}, | |
'H57': function(Z57, Y57) { | |
return Z57 >= Y57; | |
}, | |
'H1W': function(Z1W, Y1W, v1W) { | |
return Z1W - Y1W - v1W; | |
}, | |
'C3W': function(U3W, Q3W) { | |
return U3W != Q3W; | |
}, | |
'f1W': function(y1W, m1W) { | |
return y1W > m1W; | |
}, | |
'd0w': function(p0w, W0w) { | |
return p0w <= W0w; | |
}, | |
'd4O': function(p4O, W4O) { | |
return p4O <= W4O; | |
}, | |
'I47': function(x47, B47) { | |
return x47 < B47; | |
}, | |
'C0w': function(U0w, Q0w) { | |
return U0w > Q0w; | |
}, | |
'Z7O': function(Y7O, v7O) { | |
return Y7O < v7O; | |
}, | |
'M2O': function(l2O, O2O) { | |
return l2O != O2O; | |
}, | |
'S0O': function(a0O, e0O, F0O) { | |
return a0O * e0O / F0O; | |
}, | |
'J5w': function(X5w, H5w) { | |
return X5w * H5w; | |
}, | |
'K5w': function(R5w, t5w, I5w) { | |
return R5w - t5w - I5w; | |
}, | |
'D37': function(c37, d37) { | |
return c37 < d37; | |
}, | |
'x77': function(B77, C67) { | |
return B77 < C67; | |
}, | |
'F5j': function(T5j, j5j) { | |
return T5j / j5j; | |
}, | |
'j27': function(E27, K27) { | |
return E27 === K27; | |
}, | |
'k2w': function(o2w, z2w) { | |
return o2w > z2w; | |
}, | |
'N4w': function(n4w, G4w) { | |
return n4w * G4w; | |
}, | |
'W9W': function(f9W, y9W) { | |
return f9W < y9W; | |
}, | |
'T47': function(j47, E47) { | |
return j47 >= E47; | |
}, | |
'L8w': function(k8w, o8w) { | |
return k8w >= o8w; | |
}, | |
'Z6w': function(Y6w, v6w) { | |
return Y6w - v6w; | |
}, | |
'G7D': function(i7D, A7D) { | |
return i7D * A7D; | |
}, | |
'p3O': function(W3O, f3O) { | |
return W3O | f3O; | |
}, | |
'k0W': function(o0W, z0W) { | |
return o0W < z0W; | |
}, | |
'q5D': function(b5D, r5D) { | |
return b5D / r5D; | |
}, | |
'c2D': function(d2D, p2D) { | |
return d2D / p2D; | |
}, | |
'i4O': function(A4O, M4O) { | |
return A4O < M4O; | |
}, | |
'G3D': function(i3D, A3D) { | |
return i3D * A3D; | |
}, | |
'i1O': function(A1O, M1O) { | |
return A1O == M1O; | |
}, | |
'W7j': function(f7j, y7j) { | |
return f7j <= y7j; | |
}, | |
'Y97': function(v97, P97) { | |
return v97 == P97; | |
}, | |
'P6O': function(w6O, V6O) { | |
return w6O <= V6O; | |
}, | |
'c0O': function(d0O, p0O) { | |
return d0O / p0O; | |
}, | |
'd3w': function(p3w, W3w) { | |
return p3w <= W3w; | |
}, | |
'D9w': function(c9w, d9w) { | |
return c9w * d9w; | |
}, | |
'M27': function(l27, O27) { | |
return l27 - O27; | |
}, | |
'g8D': function(J8D, X8D) { | |
return J8D < X8D; | |
}, | |
'v4O': function(P4O, w4O) { | |
return P4O === w4O; | |
}, | |
'U9D': function(Q9D, s9D) { | |
return Q9D < s9D; | |
}, | |
'Y0W': function(v0W, P0W) { | |
return v0W < P0W; | |
}, | |
's3O': function(D3O, c3O, d3O) { | |
return D3O * c3O / d3O; | |
}, | |
'U6j': function(Q6j, s6j) { | |
return Q6j <= s6j; | |
}, | |
'h2w': function(g2w, J2w) { | |
return g2w > J2w; | |
}, | |
'N5j': function(n5j, G5j) { | |
return n5j - G5j; | |
}, | |
'T6W': function(j6W, E6W) { | |
return j6W >= E6W; | |
}, | |
'e87': function(F87, T87) { | |
return F87 < T87; | |
}, | |
'h77': function(g77, J77) { | |
return g77 < J77; | |
}, | |
'p47': function(W47, f47) { | |
return W47 < f47; | |
}, | |
'K0O': function(R0O, t0O) { | |
return R0O < t0O; | |
}, | |
'a8w': function(e8w, F8w) { | |
return e8w > F8w; | |
}, | |
'b3w': function(r3w, S3w) { | |
return r3w <= S3w; | |
}, | |
's0w': function(D0w, c0w) { | |
return D0w <= c0w; | |
}, | |
'K8w': function(R8w, t8w) { | |
return R8w <= t8w; | |
}, | |
'I07': function(x07, B07) { | |
return x07 === B07; | |
}, | |
'l3W': function(O3W, h3W) { | |
return O3W > h3W; | |
}, | |
'W2O': function(f2O, y2O) { | |
return f2O != y2O; | |
}, | |
'B1D': function(C2D, U2D) { | |
return C2D - U2D; | |
}, | |
'G87': function(i87, A87, M87) { | |
return i87 - A87 - M87; | |
}, | |
'U7w': function(Q7w, s7w) { | |
return Q7w < s7w; | |
}, | |
'Q2w': function(s2w, D2w) { | |
return s2w < D2w; | |
}, | |
'k27': function(o27, z27) { | |
return o27 > z27; | |
}, | |
'E5D': function(K5D, R5D) { | |
return K5D | R5D; | |
}, | |
'n47': function(G47, i47) { | |
return G47 < i47; | |
}, | |
'd8O': function(p8O, W8O) { | |
return p8O === W8O; | |
}, | |
'Q5O': function(s5O, D5O) { | |
return s5O === D5O; | |
}, | |
'P5w': function(w5w, V5w) { | |
return w5w >= V5w; | |
}, | |
'd1W': function(p1W, W1W) { | |
return p1W === W1W; | |
}, | |
'E1D': function(K1D, R1D) { | |
return K1D > R1D; | |
}, | |
'b1j': 2, | |
'g1W': function(J1W, X1W) { | |
return J1W / X1W; | |
}, | |
'F8O': function(T8O, j8O) { | |
return T8O <= j8O; | |
}, | |
'k5O': function(o5O, z5O) { | |
return o5O === z5O; | |
}, | |
'u0W': function(q0W, b0W) { | |
return q0W * b0W; | |
}, | |
'z8w': function(u8w, q8w) { | |
return u8w > q8w; | |
}, | |
'Y3O': function(v3O, P3O) { | |
return v3O / P3O; | |
}, | |
'w0W': function(V0W, L0W) { | |
return V0W < L0W; | |
}, | |
'I8W': function(x8W, B8W) { | |
return x8W > B8W; | |
}, | |
'C8O': function(U8O, Q8O) { | |
return U8O > Q8O; | |
}, | |
'l3w': function(O3w, h3w, g3w) { | |
return O3w * h3w / g3w; | |
}, | |
'A9O': function(M9O, l9O) { | |
return M9O >= l9O; | |
}, | |
'A7O': function(M7O, l7O) { | |
return M7O === l7O; | |
}, | |
'v5D': function(P5D, w5D) { | |
return P5D > w5D; | |
}, | |
's4O': function(D4O, c4O) { | |
return D4O === c4O; | |
}, | |
'O9w': function(h9w, g9w) { | |
return h9w <= g9w; | |
}, | |
'z1W': function(u1W, q1W) { | |
return u1W === q1W; | |
}, | |
'W3D': function(f3D, y3D) { | |
return f3D * y3D; | |
}, | |
'a37': function(e37, F37) { | |
return e37 > F37; | |
}, | |
'Q3D': function(s3D, D3D) { | |
return s3D - D3D; | |
}, | |
'A3O': function(M3O, l3O) { | |
return M3O * l3O; | |
}, | |
'J6D': function(X6D, H6D) { | |
return X6D - H6D; | |
}, | |
'H0w': function(Z0w, Y0w) { | |
return Z0w < Y0w; | |
}, | |
'l8D': function(O8D, h8D) { | |
return O8D === h8D; | |
}, | |
'g2W': function(J2W, X2W) { | |
return J2W === X2W; | |
}, | |
'q1O': function(b1O, r1O) { | |
return b1O - r1O; | |
}, | |
'N3w': function(n3w, G3w) { | |
return n3w - G3w; | |
}, | |
'o0w': function(z0w, u0w) { | |
return z0w * u0w; | |
}, | |
'V07': function(L07, k07, o07) { | |
return L07 - k07 - o07; | |
}, | |
'f8w': function(y8w, m8w) { | |
return y8w > m8w; | |
}, | |
'G5O': function(i5O, A5O) { | |
return i5O - A5O; | |
}, | |
'a3w': function(e3w, F3w) { | |
return e3w - F3w; | |
}, | |
'O6j': function(h6j, g6j) { | |
return h6j >= g6j; | |
}, | |
'a0D': function(e0D, F0D) { | |
return e0D >= F0D; | |
}, | |
'K67': function(R67, t67) { | |
return R67 - t67; | |
}, | |
'D6j': function(c6j, d6j) { | |
return c6j - d6j; | |
}, | |
'j3D': function(E3D, K3D) { | |
return E3D * K3D; | |
}, | |
'L6W': function(k6W, o6W) { | |
return k6W / o6W; | |
}, | |
'p8W': function(W8W, f8W) { | |
return W8W !== f8W; | |
}, | |
'v2W': function(P2W, w2W) { | |
return P2W === w2W; | |
}, | |
'i6O': function(A6O, M6O) { | |
return A6O < M6O; | |
}, | |
'p9w': function(W9w, f9w) { | |
return W9w < f9w; | |
}, | |
'x7D': function(B7D, C6D) { | |
return B7D > C6D; | |
}, | |
'i8D': function(A8D, M8D) { | |
return A8D - M8D; | |
}, | |
'a6O': function(e6O, F6O) { | |
return e6O < F6O; | |
}, | |
'i2W': function(A2W, M2W) { | |
return A2W > M2W; | |
}, | |
'N6O': function(n6O, G6O) { | |
return n6O < G6O; | |
}, | |
'z5w': function(u5w, q5w) { | |
return u5w / q5w; | |
}, | |
'p9O': function(W9O, f9O) { | |
return W9O === f9O; | |
}, | |
'm0W': function(N0W, n0W) { | |
return N0W >= n0W; | |
}, | |
'S1w': function(a1w, e1w) { | |
return a1w < e1w; | |
}, | |
'E3W': function(K3W, R3W) { | |
return K3W < R3W; | |
}, | |
'y8W': function(m8W, N8W) { | |
return m8W <= N8W; | |
}, | |
'I8w': function(x8w, B8w) { | |
return x8w < B8w; | |
}, | |
'b9w': function(r9w, S9w) { | |
return r9w - S9w; | |
}, | |
'V1D': function(L1D, k1D) { | |
return L1D < k1D; | |
}, | |
'w2D': function(V2D, L2D) { | |
return V2D < L2D; | |
}, | |
'z6D': function(u6D, q6D) { | |
return u6D - q6D; | |
}, | |
'f17': function(y17, m17) { | |
return y17 - m17; | |
}, | |
't8O': function(I8O, x8O, B8O) { | |
return I8O / x8O * B8O; | |
}, | |
'l1O': function(O1O, h1O) { | |
return O1O == h1O; | |
}, | |
'r97': function(S97, a97) { | |
return S97 === a97; | |
}, | |
't8D': function(I8D, x8D) { | |
return I8D < x8D; | |
}, | |
'H3W': function(Z3W, Y3W) { | |
return Z3W === Y3W; | |
}, | |
'j87': function(E87, K87) { | |
return E87 < K87; | |
}, | |
'X7w': function(H7w, Z7w) { | |
return H7w - Z7w; | |
}, | |
'L37': function(k37, o37) { | |
return k37 === o37; | |
}, | |
'R27': function(t27, I27) { | |
return t27 != I27; | |
}, | |
's5D': function(D5D, c5D) { | |
return D5D - c5D; | |
}, | |
'w3D': function(V3D, L3D) { | |
return V3D - L3D; | |
}, | |
'T7O': function(j7O, E7O) { | |
return j7O != E7O; | |
}, | |
'x97': function(B97, C87) { | |
return B97 != C87; | |
}, | |
'Q0O': function(s0O, D0O) { | |
return s0O < D0O; | |
}, | |
'h7j': function(g7j, J7j) { | |
return g7j / J7j; | |
}, | |
'k4w': function(o4w, z4w) { | |
return o4w - z4w; | |
}, | |
'R3D': function(t3D, I3D) { | |
return t3D * I3D; | |
}, | |
'u9W': function(q9W, b9W) { | |
return q9W < b9W; | |
}, | |
'D67': function(c67, d67) { | |
return c67 === d67; | |
}, | |
'I67': function(x67, B67) { | |
return x67 >= B67; | |
}, | |
'r0W': function(S0W, a0W) { | |
return S0W < a0W; | |
}, | |
'T0D': function(j0D, E0D) { | |
return j0D !== E0D; | |
}, | |
'Y77': function(v77, P77) { | |
return v77 != P77; | |
}, | |
'z9D': function(u9D, q9D) { | |
return u9D !== q9D; | |
}, | |
'G27': function(i27, A27) { | |
return i27 - A27; | |
}, | |
'M97': function(l97, O97) { | |
return l97 != O97; | |
}, | |
'S4O': function(a4O, e4O) { | |
return a4O != e4O; | |
}, | |
'i4w': function(A4w, M4w, l4w) { | |
return A4w * M4w / l4w; | |
}, | |
'z6w': function(u6w, q6w) { | |
return u6w < q6w; | |
}, | |
's1w': function(D1w, c1w) { | |
return D1w <= c1w; | |
}, | |
'k87': function(o87, z87) { | |
return o87 < z87; | |
}, | |
's17': function(D17, c17) { | |
return D17 === c17; | |
}, | |
'D7O': function(c7O, d7O) { | |
return c7O < d7O; | |
}, | |
'K6w': function(R6w, t6w) { | |
return R6w > t6w; | |
}, | |
'y7O': function(m7O, N7O) { | |
return m7O === N7O; | |
}, | |
'b47': function(r47, S47) { | |
return r47 < S47; | |
}, | |
's2W': function(D2W, c2W) { | |
return D2W === c2W; | |
}, | |
'r7D': function(S7D, a7D) { | |
return S7D - a7D; | |
}, | |
'T0O': function(j0O, E0O) { | |
return j0O - E0O; | |
}, | |
'O4D': function(h4D, g4D) { | |
return h4D * g4D; | |
}, | |
'U37': function(Q37, s37) { | |
return Q37 === s37; | |
}, | |
'V3W': function(L3W, k3W) { | |
return L3W === k3W; | |
}, | |
'S8D': function(a8D, e8D) { | |
return a8D !== e8D; | |
}, | |
'j4w': function(E4w, K4w) { | |
return E4w - K4w; | |
}, | |
'x4w': function(B4w, C5w) { | |
return B4w <= C5w; | |
}, | |
'W27': function(f27, y27) { | |
return f27 - y27; | |
}, | |
'i4D': function(A4D, M4D, l4D) { | |
return A4D - M4D - l4D; | |
}, | |
'p37': function(W37, f37) { | |
return W37 !== f37; | |
}, | |
's3w': function(D3w, c3w) { | |
return D3w < c3w; | |
}, | |
'u97': function(q97, b97) { | |
return q97 == b97; | |
}, | |
'L8W': function(k8W, o8W) { | |
return k8W === o8W; | |
}, | |
'x0W': function(B0W, C47) { | |
return B0W < C47; | |
}, | |
'P47': function(w47, V47) { | |
return w47 - V47; | |
}, | |
's8w': function(D8w, c8w) { | |
return D8w > c8w; | |
}, | |
'F1O': function(T1O, j1O) { | |
return T1O - j1O; | |
}, | |
'C1D': function(U1D, Q1D) { | |
return U1D - Q1D; | |
}, | |
'l8O': function(O8O, h8O) { | |
return O8O != h8O; | |
}, | |
'L9D': function(k9D, o9D) { | |
return k9D !== o9D; | |
}, | |
'e3O': function(F3O, T3O) { | |
return F3O > T3O; | |
}, | |
'y9O': function(m9O, N9O) { | |
return m9O < N9O; | |
}, | |
'I7O': function(x7O, B7O) { | |
return x7O > B7O; | |
}, | |
'J47': function(X47, H47) { | |
return X47 >= H47; | |
}, | |
'N5D': function(n5D, G5D) { | |
return n5D < G5D; | |
}, | |
'S2W': function(a2W, e2W) { | |
return a2W !== e2W; | |
}, | |
'Z6W': function(Y6W, v6W) { | |
return Y6W === v6W; | |
}, | |
'z67': function(u67, q67) { | |
return u67 >= q67; | |
}, | |
'b6O': function(r6O, S6O) { | |
return r6O !== S6O; | |
}, | |
'Z6D': function(Y6D, v6D) { | |
return Y6D - v6D; | |
}, | |
'c7D': function(d7D, p7D) { | |
return d7D < p7D; | |
}, | |
'z3w': function(u3w, q3w) { | |
return u3w <= q3w; | |
}, | |
'f4w': function(y4w, m4w) { | |
return y4w === m4w; | |
}, | |
'l5D': function(O5D, h5D) { | |
return O5D | h5D; | |
}, | |
'R5O': function(t5O, I5O) { | |
return t5O === I5O; | |
}, | |
'Y2D': function(v2D, P2D) { | |
return v2D / P2D; | |
}, | |
'v8w': function(P8w, w8w, V8w) { | |
return P8w * w8w / V8w; | |
}, | |
'S17': function(a17, e17) { | |
return a17 === e17; | |
}, | |
'l87': function(O87, h87) { | |
return O87 - h87; | |
}, | |
'e7D': function(F7D, T7D) { | |
return F7D - T7D; | |
}, | |
'd4j': function(p4j, W4j) { | |
return p4j - W4j; | |
}, | |
'h2O': function(g2O, J2O) { | |
return g2O !== J2O; | |
}, | |
'n9w': function(G9w, i9w) { | |
return G9w <= i9w; | |
}, | |
'd2W': function(p2W, W2W) { | |
return p2W === W2W; | |
}, | |
'b67': function(r67, S67) { | |
return r67 - S67; | |
}, | |
's4w': function(D4w, c4w) { | |
return D4w / c4w; | |
}, | |
'U9w': function(Q9w, s9w) { | |
return Q9w > s9w; | |
}, | |
'y47': function(m47, N47) { | |
return m47 != N47; | |
}, | |
'I6O': function(x6O, B6O) { | |
return x6O >= B6O; | |
}, | |
'f3W': function(y3W, m3W) { | |
return y3W === m3W; | |
}, | |
'C8D': function(U8D, Q8D) { | |
return U8D >= Q8D; | |
}, | |
'i4j': function(A4j, M4j) { | |
return A4j < M4j; | |
}, | |
'D9D': function(c9D, d9D) { | |
return c9D * d9D; | |
}, | |
'B3W': function(C0W, U0W) { | |
return C0W == U0W; | |
}, | |
'd1w': function(p1w, W1w) { | |
return p1w <= W1w; | |
}, | |
'S3W': function(a3W, e3W) { | |
return a3W != e3W; | |
}, | |
'Q5j': function(s5j, D5j, c5j) { | |
return s5j * D5j / c5j; | |
}, | |
'L4D': function(k4D, o4D) { | |
return k4D | o4D; | |
}, | |
'b8w': function(r8w, S8w) { | |
return r8w * S8w; | |
}, | |
'C1O': function(U1O, Q1O) { | |
return U1O * Q1O; | |
}, | |
'N8D': function(n8D, G8D) { | |
return n8D === G8D; | |
}, | |
'I4D': function(x4D, B4D) { | |
return x4D < B4D; | |
}, | |
'P3w': function(w3w, V3w) { | |
return w3w <= V3w; | |
}, | |
'g0O': function(J0O, X0O) { | |
return J0O / X0O; | |
}, | |
'Q7D': function(s7D, D7D) { | |
return s7D == D7D; | |
}, | |
'U2j': 5, | |
'v5j': function(P5j, w5j) { | |
return P5j * w5j; | |
}, | |
'g1w': function(J1w, X1w) { | |
return J1w < X1w; | |
}, | |
'O3O': function(h3O, g3O, J3O) { | |
return h3O * g3O / J3O; | |
}, | |
'C1W': function(U1W, Q1W) { | |
return U1W > Q1W; | |
}, | |
'O6w': function(h6w, g6w) { | |
return h6w >= g6w; | |
}, | |
'r3O': function(S3O, a3O) { | |
return S3O >= a3O; | |
}, | |
'c77': function(d77, p77) { | |
return d77 - p77; | |
}, | |
'a1W': function(e1W, F1W) { | |
return e1W / F1W; | |
}, | |
'r4w': function(S4w, a4w) { | |
return S4w - a4w; | |
}, | |
'N4O': function(n4O, G4O) { | |
return n4O > G4O; | |
}, | |
'a7O': function(e7O, F7O) { | |
return e7O === F7O; | |
}, | |
'A6w': function(M6w, l6w) { | |
return M6w < l6w; | |
}, | |
'z0D': function(u0D, q0D) { | |
return u0D === q0D; | |
}, | |
'F2W': function(T2W, j2W) { | |
return T2W === j2W; | |
}, | |
'u7w': function(q7w, b7w, r7w) { | |
return q7w - b7w - r7w; | |
}, | |
'q2W': function(b2W, r2W) { | |
return b2W / r2W; | |
}, | |
'f1O': function(y1O, m1O) { | |
return y1O != m1O; | |
}, | |
'x2D': function(B2D, C9D) { | |
return B2D < C9D; | |
}, | |
'X7D': function(H7D, Z7D) { | |
return H7D >= Z7D; | |
}, | |
'y2j': 8, | |
'O8W': function(h8W, g8W) { | |
return h8W < g8W; | |
}, | |
'l6O': function(O6O, h6O) { | |
return O6O < h6O; | |
}, | |
'G2w': function(i2w, A2w) { | |
return i2w < A2w; | |
}, | |
'U8W': function(Q8W, s8W) { | |
return Q8W < s8W; | |
}, | |
'g4j': function(J4j, X4j) { | |
return J4j / X4j; | |
}, | |
'u77': function(q77, b77) { | |
return q77 === b77; | |
}, | |
'I6D': function(x6D, B6D) { | |
return x6D <= B6D; | |
}, | |
'V0O': function(L0O, k0O) { | |
return L0O == k0O; | |
}, | |
'W0O': function(f0O, y0O) { | |
return f0O * y0O; | |
}, | |
'h0W': function(g0W, J0W) { | |
return g0W <= J0W; | |
}, | |
'E1w': function(K1w, R1w) { | |
return K1w < R1w; | |
}, | |
'p67': function(W67, f67) { | |
return W67 === f67; | |
}, | |
'I37': function(x37, B37) { | |
return x37 != B37; | |
}, | |
'H17': function(Z17, Y17) { | |
return Z17 < Y17; | |
}, | |
'F3W': function(T3W, j3W) { | |
return T3W < j3W; | |
}, | |
'P7O': function(w7O, V7O) { | |
return w7O > V7O; | |
}, | |
'J6w': function(X6w, H6w) { | |
return X6w > H6w; | |
}, | |
'M6t': 17, | |
'd0D': function(p0D, W0D, f0D) { | |
return p0D * W0D / f0D; | |
}, | |
'X2w': function(H2w, Z2w) { | |
return H2w - Z2w; | |
}, | |
'D7w': function(c7w, d7w) { | |
return c7w < d7w; | |
}, | |
'G2D': function(i2D, A2D) { | |
return i2D / A2D; | |
}, | |
'g4O': function(J4O, X4O) { | |
return J4O / X4O; | |
}, | |
'q4j': function(b4j, r4j) { | |
return b4j * r4j; | |
}, | |
'K47': function(R47, t47) { | |
return R47 >= t47; | |
}, | |
'i3W': function(A3W, M3W) { | |
return A3W === M3W; | |
}, | |
'z07': function(u07, q07) { | |
return u07 < q07; | |
} | |
}; | |
(function(y, na) { | |
var H1j = 539, | |
k0e = "KE", | |
B2c = 864E5, | |
X08 = ";", | |
E0d = "fail", | |
p9j = 529, | |
N9j = 528, | |
w5u = "DM", | |
l6e = "JS", | |
o2j = 515, | |
j0j = 508, | |
O7v = "EJ", | |
v2j = 519, | |
h1j = 533, | |
T0j = 507, | |
b0j = 504, | |
p8t = 497, | |
e2t = 486, | |
d8t = 498, | |
y8t = 492, | |
D8t = 495, | |
n8t = 490, | |
E2t = 489, | |
s8t = 496, | |
N8t = 494, | |
f8t = 491, | |
a78 = 1E7, | |
a3d = "play", | |
P38 = "6", | |
N7K = " / ", | |
Y6t = 14, | |
m8t = 493, | |
T9e = "Mus", | |
a2t = 487, | |
P6K = .95, | |
C5t = .1, | |
i8i = " : ", | |
R45 = "8", | |
X1u = "43", | |
I1t = "...", | |
V3j = "K", | |
m4K = "] ", | |
V7T = " [", | |
i32 = "tin", | |
f3T = "EC", | |
q1j = 540, | |
c4v = "ID", | |
j6m = "Y", | |
Q3Y = "IL", | |
m48 = "/", | |
C98 = ">", | |
c9c = "MP", | |
i5I = "op", | |
n9j = 527, | |
O4u = "DI", | |
G5I = "ej", | |
i3u = "CA", | |
m5Y = "HE", | |
M9t = 470, | |
M5i = "SE", | |
W3j = "av", | |
R8I = 1E-4, | |
x22 = 1E-10, | |
d5K = .22, | |
p6v = 1.17759977644374, | |
M5m = .561903634898845, | |
Y6o = 1.27111376831522, | |
w8i = 1.09035458665828, | |
D92 = .420677412792809, | |
l9K = .400401204107367, | |
o9T = .0755588656690725, | |
m68 = .263672043403025, | |
g3c = .181738862222313, | |
J6Y = .12855537458795, | |
d1u = .0103329141448779, | |
N9e = .0842995352796247, | |
n1t = .21647101116447, | |
d1t = .30639082364227, | |
G2T = .127490861540904, | |
e48 = .353934286812968, | |
R9u = .269160823754313, | |
K9c = .164944450316777, | |
k5e = .179565604901062, | |
q7v = .0668887810950692, | |
s08 = .022239120872481, | |
o5m = .0566219452189998, | |
i8j = .162644679552085, | |
D6I = .142934270516382, | |
U18 = .00999932810065489, | |
D9c = .369357559975733, | |
p55 = 1.00514098612371, | |
j9i = 2.57382621685251, | |
K7t = 26, | |
H08 = 240, | |
J1j = "sc", | |
j1Y = "led", | |
j5T = 126E3, | |
c6t = 30, | |
C8t = 90, | |
S8I = 12E3, | |
A2t = 4E3, | |
K4I = "Al", | |
s6m = 5E3, | |
u0i = 131072, | |
C4m = 500, | |
R95 = "em", | |
S8d = 86400, | |
M92 = "Ex", | |
J3t = 604800, | |
t2I = "pi", | |
K7u = 600, | |
D7d = "gh", | |
V8T = "RS", | |
J52 = 7200, | |
W5K = .25, | |
K0m = 3E5, | |
t05 = "ef", | |
x7o = 2E4, | |
S0j = "buf", | |
a3I = "ps", | |
z5Y = "ld", | |
J9m = 400, | |
f1t = "tw", | |
h6t = "tt", | |
x8m = 45E3, | |
B1j = 6, | |
A75 = "che", | |
k3T = "Ca", | |
p6e = "ze", | |
m1t = 80, | |
U1m = "ati", | |
m9v = "Du", | |
P8i = "buffer", | |
B1T = "tor", | |
h5m = "der", | |
L0I = 65536, | |
Z5e = 32768, | |
I7m = "ion", | |
q9v = 4096, | |
h7T = "ead", | |
k5c = 120, | |
j0m = 3E3, | |
t6o = "ul", | |
x4o = "tat", | |
t4t = .4, | |
M05 = "ou", | |
U1K = .75, | |
r78 = 1E4, | |
H0v = 34E3, | |
z9e = "ele", | |
F5o = "us", | |
O6t = 18, | |
e0m = 393216, | |
Y82 = 8388608, | |
t8i = 1048576, | |
X1m = 262144, | |
T3o = "va", | |
Q8c = 1.5, | |
O3c = "Le", | |
f7i = 6E5, | |
U6u = "rk", | |
y05 = 9E3, | |
q9K = "ho", | |
I35 = 9E4, | |
g4T = 8E3, | |
p2c = "put", | |
K4t = .5, | |
g8K = "hr", | |
J9e = "is", | |
N75 = 24E4, | |
E7t = 25, | |
m6o = "ons", | |
m7i = 6E3, | |
o8I = 12E4, | |
y7i = 6E4, | |
X3o = 15E3, | |
L6t = 20, | |
m3I = "nit", | |
G2t = 4E4, | |
I7o = 2E3, | |
x32 = "load", | |
i8t = "z", | |
E0m = 3E4, | |
z6m = "tra", | |
b75 = "itr", | |
l6u = "rl", | |
N78 = "0", | |
y0m = "th", | |
Z1d = "fo", | |
G2d = "fr", | |
n5c = 128, | |
B7I = "own", | |
V6u = "rm", | |
l08 = "4", | |
V9d = "xp", | |
S3o = "rin", | |
H5c = "hi", | |
v2m = "W", | |
s3v = "lu", | |
v7e = "Per", | |
M2v = "ure", | |
B4e = " > ", | |
R7K = "ail", | |
a88 = "@", | |
I3e = "im", | |
M2j = "sa", | |
m8v = "lt", | |
P1v = "lta", | |
t55 = "oc", | |
D12 = "Us", | |
T1m = 4194304, | |
j1T = "da", | |
S9t = 99, | |
H3u = "bl", | |
b5u = "Co", | |
F6o = "ing", | |
m1I = "pd", | |
g5o = "ud", | |
l8m = "Pr", | |
m3T = "ct", | |
P7d = "Error", | |
H6d = "fy", | |
M3v = "ma", | |
v3Y = "Hi", | |
d2t = "ty", | |
j4v = "mi", | |
x6m = "tre", | |
u2Y = "lo", | |
P0c = "error", | |
p6Y = "li", | |
g4i = "sS", | |
j7m = "ate", | |
u8j = "as", | |
b8t = "cto", | |
v1K = "cat", | |
u6c = "ha", | |
t3T = "Tra", | |
g78 = "1", | |
Z4o = "ug", | |
C8T = "Req", | |
M9o = "!", | |
O0T = "co", | |
P7m = "ab", | |
Q22 = "Un", | |
i5o = "ream", | |
u0u = "ry", | |
z4t = "Map", | |
W2t = 60, | |
x95 = "gme", | |
N6o = "un", | |
v8v = "ls", | |
H0Y = "He", | |
p9o = "ut", | |
c0o = "Ma", | |
L58 = "2", | |
Y35 = "eq", | |
i8e = "ort", | |
F5m = "ata", | |
m0d = "he", | |
N8T = "dS", | |
G12 = "En", | |
Z3I = "pt", | |
J4m = "H", | |
M9j = "ar", | |
a7o = "up", | |
z8T = "Da", | |
h95 = "en", | |
t85 = "eri", | |
L1m = "deo", | |
Q7o = " >= ", | |
k7i = "mit", | |
W2u = "ri", | |
d9m = "ffe", | |
Q8t = "udi", | |
a4I = "Se", | |
g28 = 1E3, | |
q4i = "rv", | |
y8u = "bo", | |
T4I = .006, | |
O1Y = 2292, | |
S5i = "rn", | |
r9i = "ble", | |
k02 = "na", | |
I2m = "tc", | |
k5o = "tar", | |
J1Y = "ll", | |
L3c = "wi", | |
y5m = "ss", | |
i4K = "il", | |
g0I = "Tr", | |
b98 = "<", | |
Y5e = "je", | |
U5o = "uf", | |
d4t = "j", | |
F1c = "hT", | |
M1i = "ife", | |
v2d = ") ", | |
i6m = "ad", | |
z5K = "if", | |
I7e = "ore", | |
T22 = "anif", | |
m5u = "ch", | |
X6o = "um", | |
y9o = "fer", | |
C9j = "tA", | |
G7T = "pl", | |
g62 = "ng", | |
H1d = "gP", | |
U6i = "lB", | |
X95 = "ot", | |
f2u = "Bu", | |
I4e = "tes", | |
x3j = "L", | |
Z9d = "ff", | |
i5t = "try", | |
g35 = "ow", | |
h4i = "rr", | |
q32 = "nd", | |
I65 = "fe", | |
Q5t = "to", | |
E9e = "it", | |
k8u = "ra", | |
N0Y = "la", | |
b2d = "ft", | |
U4m = "ay", | |
g8o = "vb", | |
X5i = "ro", | |
w1Y = "end", | |
x9d = "gI", | |
f0i = "amin", | |
H25 = "St", | |
K9u = "r_", | |
K4u = "ce", | |
D25 = "ex", | |
F1e = "ted", | |
N2I = "ec", | |
V1i = "min", | |
A0d = "trea", | |
M65 = "Ap", | |
k7m = "teM", | |
l6T = "di", | |
d3c = "wo", | |
W7o = "ur", | |
X32 = "Fa", | |
f9u = "ect", | |
c3c = 100, | |
O48 = 200, | |
e6t = 10, | |
Y0m = 469, | |
H0m = 467, | |
h0m = 464, | |
R3m = 458, | |
y9t = 473, | |
O0m = 463, | |
C0m = 459, | |
N9t = 475, | |
H1I = "pe", | |
d28 = "(", | |
e3i = "js", | |
B9j = "se", | |
w88 = "A", | |
t35 = "et", | |
V9m = "te", | |
I2v = "mp", | |
B98 = "C", | |
I9j = "N", | |
M28 = ")", | |
x9j = "at", | |
b25 = " (", | |
L08 = "nde", | |
q5I = "on", | |
i85 = "or", | |
Z8j = "O", | |
m2c = "dia", | |
v4T = "do", | |
h7I = "el", | |
g4u = "qu", | |
w22 = "Er", | |
e1j = "R", | |
G7K = "ia", | |
f4o = "Me", | |
y6m = "_", | |
s4i = "rt", | |
f65 = "og", | |
n3m = "aR", | |
L8c = "wn", | |
D9j = "T", | |
o12 = "nt", | |
N3t = "w", | |
V9i = "kn", | |
h4u = "ck", | |
B3K = "Id", | |
J9u = "re", | |
q8I = "eam", | |
Z75 = "fa", | |
B48 = ",", | |
A7I = "om", | |
B7t = "ts", | |
j8j = "P", | |
Z7m = "]", | |
h1m = "[", | |
r2m = "", | |
w2K = "} ", | |
b9t = "{", | |
O2j = 512, | |
T2t = 485, | |
K2t = 488, | |
J15 = "ev", | |
w2u = "bu", | |
y9u = "rd", | |
t9o = "ve", | |
x7m = "ac", | |
b3m = "ti", | |
V1m = "ai", | |
F0j = "F", | |
I1j = "am", | |
P7t = "tr", | |
c5o = "ue", | |
J7i = "Re", | |
x2I = "ea", | |
P85 = "eo", | |
U5K = "id", | |
Z9Y = "ks", | |
F25 = "o_", | |
X4t = "k", | |
u6Y = "rac", | |
V6T = "eI", | |
I5e = ", ", | |
r3j = "si", | |
i68 = "'", | |
Y72 = "ni", | |
N35 = "er", | |
R6m = "ag", | |
A1j = "an", | |
Y9j = "M", | |
L0d = "rea", | |
X0m = "o", | |
Y0u = '"', | |
n78 = "vi", | |
l5T = "eE", | |
z0c = "cac", | |
Q3d = "fl", | |
h9u = "By", | |
R5u = "ca", | |
A9t = "|", | |
B05 = "ed", | |
Z2j = "S", | |
i3j = "J", | |
E55 = "ASE", | |
M0m = 462, | |
g9t = 471, | |
m9t = 476, | |
X1j = 532, | |
m4m = "G", | |
B1m = "U", | |
A88 = "B", | |
n0j = "E", | |
H0j = "D", | |
C62 = "nf", | |
K2j = 521, | |
q8t = "y", | |
i58 = "-", | |
O9c = ": ", | |
s3j = "I", | |
L7v = "me", | |
i0m = 461, | |
g3j = "au", | |
m7Y = "le", | |
f32 = "ne", | |
v22 = "no", | |
y02 = "nc", | |
R7u = "Br", | |
U3e = "io", | |
P3t = "v", | |
L6T = "pr", | |
s3t = "x", | |
Z5T = "de", | |
M7e = "In", | |
O05 = "es", | |
B0m = "m", | |
B0o = ".", | |
S3Y = "ent", | |
W7t = "Pts", | |
X5m = "st", | |
I08 = ":", | |
h2o = " ", | |
i0e = "in", | |
n8T = "cr", | |
N9u = null, | |
Z0m = 468, | |
k2j = 516, | |
j2t = 484, | |
B2t = 483, | |
M8j = 558, | |
v3m = "q", | |
t5t = "g", | |
K3m = "n", | |
e4t = "h", | |
t1m = "ta", | |
M4i = "rs", | |
w0m = "l", | |
E8m = "p", | |
N5m = "a", | |
R9m = "r", | |
q5t = "f", | |
s9m = "u", | |
j4m = "b", | |
B2m = "t", | |
e5d = "ge", | |
g5t = "i", | |
H8m = "td", | |
X5u = "iqr", | |
v5m = "d", | |
j5m = "e", | |
g2m = "al", | |
t5m = "c", | |
O8m = "s", | |
F78 = 1E6, | |
Rc; | |
function Qa(d, p) { | |
if (!p || "utf-8" === p) return Yf(d); | |
throw Error("unsupported encoding"); | |
} | |
function mb(d, p) { | |
if (!p || "utf-8" === p) return Zf(d); | |
throw Error("unsupported encoding"); | |
} | |
function Yf(d) { | |
for (var p = 0, m, Gb = d.length, D = ""; p < Gb;) { | |
m = d[p++]; | |
if (m & 128) | |
if (192 === (m & 224)) m = ((m & 31) << 6) + (d[p++] & 63); | |
else if (224 === (m & 240)) m = ((m & 15) << 12) + ((d[p++] & 63) << 6) + (d[p++] & 63); | |
else throw Error("unsupported character"); | |
D += String.fromCharCode(m); | |
} | |
return D; | |
} | |
function Zf(d) { | |
var p = d.length, | |
m; | |
m = 0; | |
var Gb, D = 0, | |
r; | |
for (Gb = p; Gb--;) r = d.charCodeAt(Gb), 128 > r ? m++ : m = 2048 > r ? m + 2 : m + 3; | |
m = new Uint8Array(m); | |
for (Gb = 0; Gb < p; Gb++) r = d.charCodeAt(Gb), 128 > r ? m[D++] = r : (2048 > r ? m[D++] = 192 | r >>> 6 : (m[D++] = 224 | r >>> 12, m[D++] = 128 | r >>> 6 & 63), m[D++] = 128 | r & 63); | |
return m; | |
} | |
function Nb(d, m) { | |
if (d === m) return !0; | |
if (!d || !m || d.length != m.length) return !1; | |
for (var p = 0; p < d.length; ++p) | |
if (d[p] != m[p]) return !1; | |
return !0; | |
} | |
function Rb(d) { | |
if (!(d && d.constructor == Uint8Array || Array.isArray(d))) throw new TypeError("Cannot compute the hash code of " + d); | |
for (var m = 1, p = 0; p < d.length; ++p) { | |
var Gb = d[p]; | |
if ("number" !== typeof Gb) throw new TypeError("Cannot compute the hash code over non-numeric elements: " + Gb); | |
m = 31 * m + Gb & 4294967295; | |
} | |
return m; | |
} | |
function $g(d, m) { | |
if (d === m) return !0; | |
if (!d || !m) return !1; | |
m instanceof Array || (m = [m]); | |
for (var p = 0; p < m.length; ++p) { | |
for (var Gb = m[p], r = !1, D = 0; D < d.length; ++D) { | |
var y = d[D]; | |
if (Gb.equals && "function" === typeof Gb.equals && Gb.equals(y) || Gb == y) { | |
r = !0; | |
break; | |
} | |
} | |
if (!r) return !1; | |
} | |
return !0; | |
} | |
function ah(d, m) { | |
return $g(d, m) && (d.length == m.length || $g(m, d)); | |
} | |
function m(d, m, p) { | |
var r; | |
p && (r = p); | |
if ("object" !== typeof d || "function" !== typeof d.result || "function" !== typeof d.error) throw new TypeError("callback must be an object with function properties 'result' and 'error'."); | |
try { | |
var D = m.call(r, d); | |
D !== na && d.result(D); | |
} catch (Si) { | |
try { | |
d.error(Si); | |
} catch (fb) {} | |
} | |
} | |
function r(d, p, r) { | |
if ("object" !== typeof d || "function" !== typeof d.timeout) throw new TypeError("callback must be an object with function properties 'result', 'timeout', and 'error'."); | |
m(d, p, r); | |
} | |
function d(d, m, p) { | |
1E5 > d && (d = 1E5 + d); | |
Object.defineProperties(this, { | |
internalCode: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
responseCode: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
message: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
function $f(d) { | |
switch (d) { | |
case Za.PSK: | |
case Za.MGK: | |
return !0; | |
default: | |
return !1; | |
} | |
} | |
function ag(d) { | |
switch (d) { | |
case Za.PSK: | |
case Za.MGK: | |
case Za.X509: | |
case Za.RSA: | |
case Za.NPTICKET: | |
case Za.ECC: | |
return !0; | |
default: | |
return !1; | |
} | |
} | |
function Ti(d) { | |
return d.toJSON(); | |
} | |
function bh(m, p) { | |
Rd ? p.result(Rd) : Promise.resolve().then(function() { | |
return za.getKeyByName(m); | |
})["catch"](function() { | |
return za.generateKey({ | |
name: m | |
}, !1, ["wrapKey", "unwrapKey"]); | |
}).then(function(d) { | |
Rd = d; | |
p.result(Rd); | |
})["catch"](function(m) { | |
p.error(new D(d.INTERNAL_EXCEPTION, "Unable to get system key")); | |
}); | |
} | |
function ch(d, m) { | |
var p = m.masterToken, | |
r = m.userIdToken, | |
D = m.serviceTokens; | |
return { | |
NccpMethod: d.method, | |
UserId: d.userId, | |
UT: r && r.serialNumber, | |
MT: p && p.serialNumber + ":" + p.sequenceNumber, | |
STCount: D && D.length | |
}; | |
} | |
function Ui(d) { | |
return d.uniqueKey(); | |
} | |
function Vi(r, y, Ye, bc, Ze) { | |
function Gb(d, G) { | |
d.errorCode === p.ENTITY_REAUTH || d.errorCode === p.ENTITYDATA_REAUTH ? (bc.clearCryptoContexts(), Ab()) : d.errorCode !== p.USER_REAUTH && d.errorCode !== p.USERDATA_REAUTH || fb(G); | |
} | |
function fb(d) { | |
if (d = bc.getUserIdToken(d)) bc.removeUserIdToken(d), Ab(); | |
} | |
function T(d, G, L) { | |
var B = []; | |
(function O() { | |
d.read(-1, G, { | |
result: function(d) { | |
m(L, function() { | |
if (d) B.push(d), O(); | |
else switch (B.length) { | |
case 0: | |
return new Uint8Array(0); | |
case 1: | |
return B[0]; | |
default: | |
var C, I, H, L = B.length, | |
G = 0; | |
for (I = C = 0; I < L; I++) C += B[I].length; | |
C = new Uint8Array(C); | |
for (I = 0; I < L; I++) H = B[I], C.set(H, G), G += H.length; | |
return C; | |
} | |
}); | |
}, | |
timeout: function() { | |
L.timeout(); | |
}, | |
error: function(d) { | |
L.error(d); | |
} | |
}); | |
})(); | |
} | |
function Ab() { | |
bc.getStoreState({ | |
result: function(d) { | |
for (var G = Xa.slice(), L = 0; L < G.length; L++) G[L]({ | |
storeState: d | |
}); | |
}, | |
timeout: function() { | |
r.error("Timeout getting store state", "" + e); | |
}, | |
error: function(d) { | |
r.error("Error getting store state", "" + d); | |
} | |
}); | |
} | |
var Xa = []; | |
this.addEventHandler = function(d, G) { | |
switch (d) { | |
case "shouldpersist": | |
Xa.push(G); | |
} | |
}; | |
this.send = function(m) { | |
return new Promise(function(G, L) { | |
var B = m.timeout, | |
F = new dh(r, Ye, m, bc.getKeyRequestData()), | |
O = new bg(m.url); | |
r.trace("Sending MSL request"); | |
y.request(Ye, F, O, B, { | |
result: function(F) { | |
F && F.getMessageHeader(); | |
r.trace("Received MSL response", { | |
Method: m.method | |
}); | |
if (F) { | |
m.allowTokenRefresh && Ab(); | |
var C = F.getErrorHeader(); | |
C ? (Gb(C, m.userId), L({ | |
success: !1, | |
error: C | |
})) : T(F, B, { | |
result: function(d) { | |
G({ | |
success: !0, | |
body: Qa(d) | |
}); | |
}, | |
timeout: function() { | |
L({ | |
success: !1, | |
subCode: Ze.MSL_READ_TIMEOUT | |
}); | |
}, | |
error: function(d) { | |
L({ | |
success: !1, | |
error: d | |
}); | |
} | |
}); | |
} else L({ | |
success: !1, | |
error: new D(d.INTERNAL_EXCEPTION, "Null response stream"), | |
description: "Null response stream" | |
}); | |
}, | |
timeout: function() { | |
L({ | |
success: !1, | |
subCode: Ze.MSL_REQUEST_TIMEOUT | |
}); | |
}, | |
error: function(d) { | |
L({ | |
success: !1, | |
error: d | |
}); | |
} | |
}); | |
}); | |
}; | |
this.hasUserIdToken = function(d) { | |
return !!bc.getUserIdToken(d); | |
}; | |
this.getUserIdTokenKeys = function() { | |
return bc.getUserIdTokenKeys(); | |
}; | |
this.removeUserIdToken = fb; | |
this.clearUserIdTokens = function() { | |
bc.clearUserIdTokens(); | |
Ab(); | |
}; | |
this.isErrorReauth = function(d) { | |
return d && d.errorCode == p.USERDATA_REAUTH; | |
}; | |
this.isErrorHeader = function(d) { | |
return d instanceof kd; | |
}; | |
this.getErrorCode = function(d) { | |
return d && d.errorCode; | |
}; | |
this.getStateForMdx = function(d) { | |
var G = bc.getMasterToken(); | |
d = bc.getUserIdToken(d); | |
var L = bc.getCryptoContext(G); | |
return { | |
masterToken: G, | |
userIdToken: d, | |
cryptoContext: L | |
}; | |
}; | |
this.buildPlayDataRequest = function(d, G) { | |
var L = new cg; | |
y.request(Ye, new dh(r, Ye, d), L, d.timeout, { | |
result: function() { | |
G.result(L.getRequest()); | |
}, | |
error: function() { | |
G.result(L.getRequest()); | |
}, | |
timeout: function() { | |
G.timeout(); | |
} | |
}); | |
}; | |
this.rekeyUserIdToken = function(d, G) { | |
bc.rekeyUserIdToken(d, G); | |
Ab(); | |
}; | |
} | |
function $e(m, p, r, y, Ze, N) { | |
function bc(p) { | |
var T; | |
return Promise.resolve().then(function() { | |
T = m.authenticationKeyNames[p]; | |
if (!T) throw new D(d.KEY_IMPORT_ERROR, "Invalid config keyName " + p); | |
return za.getKeyByName(T); | |
}).then(function(m) { | |
return new Promise(function(p, G) { | |
Sd(m, { | |
result: p, | |
error: function() { | |
G(new D(d.KEY_IMPORT_ERROR, "Unable to create " + T + " CipherKey")); | |
} | |
}); | |
}); | |
})["catch"](function(m) { | |
throw new D(d.KEY_IMPORT_ERROR, "Unable to import " + T, m); | |
}); | |
} | |
return Promise.resolve().then(function() { | |
if (!za.getKeyByName) throw new D(d.INTERNAL_EXCEPTION, "No WebCrypto cryptokeys"); | |
return Promise.all([bc("e"), bc("h"), bc("w")]); | |
}).then(function(d) { | |
var T = {}; | |
T[p] = new r(m.esn, d[0], d[1], d[2]); | |
d = new y(m.esn); | |
var Xa = new Wi, | |
Xa = [new Ze(Xa)], | |
$a = new N(p); | |
return { | |
entityAuthFactories: T, | |
entityAuthData: d, | |
keyExchangeFactories: Xa, | |
keyRequestData: $a | |
}; | |
}); | |
} | |
function dg(m, p, r) { | |
function y() { | |
return Promise.resolve().then(function() { | |
return za.generateKey(p, !1, ["wrapKey", "unwrapKey"]); | |
}).then(function(d) { | |
return Gb(d.publicKey, d.privateKey); | |
}); | |
} | |
function Gb(m, p) { | |
return Promise.all([new Promise(function(p, T) { | |
ld(m, { | |
result: p, | |
error: function(m) { | |
T(new D(d.INTERNAL_EXCEPTION, "Unable to create keyx public key", m)); | |
} | |
}); | |
}), new Promise(function(m, T) { | |
Td(p, { | |
result: m, | |
error: function(m) { | |
T(new D(d.INTERNAL_EXCEPTION, "Unable to create keyx private key", m)); | |
} | |
}); | |
})]).then(function(d) { | |
d = new af("rsaKeypairId", r, d[0], d[1]); | |
Xf && (d.storeData = { | |
keyxPublicKey: m, | |
keyxPrivateKey: p | |
}); | |
return d; | |
}); | |
} | |
var Xf = !m.systemKeyWrapFormat; | |
return Promise.resolve().then(function() { | |
var d = m.storeState, | |
p = d && d.keyxPublicKey, | |
d = d && d.keyxPrivateKey; | |
return Xf && p && d ? Gb(p, d) : y(); | |
}).then(function(d) { | |
var p = {}; | |
p[Za.NONE] = new Xi; | |
var Ab = new se(m.esn), | |
Xa = [new eh]; | |
return { | |
entityAuthFactories: p, | |
entityAuthData: Ab, | |
keyExchangeFactories: Xa, | |
keyRequestData: d, | |
createKeyRequestData: Xf ? y : na | |
}; | |
}); | |
} | |
function Wa(d, m) { | |
function p() {} | |
p.prototype = m.prototype; | |
d.prototype = new p; | |
d.prototype.constructor = d; | |
for (var r in m) | |
if (Object.defineProperties) { | |
var D = Object.getOwnPropertyDescriptor(m, r); | |
D && Object.defineProperty(d, r, D); | |
} | |
else d[r] = m[r]; | |
} | |
function rb() { | |
rb = function() {}; | |
Ja.Symbol || (Ja.Symbol = Yi); | |
} | |
function Yi(d) { | |
return "jscomp_symbol_" + (d || "") + Zi++; | |
} | |
function gc() { | |
rb(); | |
var d = Ja.Symbol.iterator; | |
d || (d = Ja.Symbol.iterator = Ja.Symbol("iterator")); | |
"function" != typeof Array.prototype[d] && bf(Array.prototype, d, { | |
configurable: !0, | |
writable: !0, | |
value: function() { | |
return fh(this); | |
} | |
}); | |
gc = function() {}; | |
} | |
function fh(d) { | |
var m = 0; | |
return eg(function() { | |
return m < d.length ? { | |
done: !1, | |
value: d[m++] | |
} : | |
{ | |
done: !0 | |
}; | |
}); | |
} | |
function eg(d) { | |
gc(); | |
d = { | |
next: d | |
}; | |
d[Ja.Symbol.iterator] = function() { | |
return this; | |
}; | |
return d; | |
} | |
function Sb(d) { | |
gc(); | |
var m = d[Symbol.iterator]; | |
return m ? m.call(d) : fh(d); | |
} | |
function $i(d) { | |
for (var m, p = []; !(m = d.next()).done;) p.push(m.value); | |
return p; | |
} | |
function cc(d, m) { | |
if (m) { | |
var p = Ja; | |
d = d.split("."); | |
for (var r = 0; r < d.length - 1; r++) { | |
var D = d[r]; | |
D in p || (p[D] = {}); | |
p = p[D]; | |
} | |
d = d[d.length - 1]; | |
r = p[d]; | |
m = m(r); | |
m != r && null != m && bf(p, d, { | |
configurable: !0, | |
writable: !0, | |
value: m | |
}); | |
} | |
} | |
function te(d, m) { | |
gc(); | |
d instanceof String && (d += ""); | |
var p = 0, | |
r = { | |
next: function() { | |
if (p < d.length) { | |
var D = p++; | |
return { | |
value: m(D, d[D]), | |
done: !1 | |
}; | |
} | |
r.next = function() { | |
return { | |
done: !0, | |
value: void 0 | |
}; | |
}; | |
return r.next(); | |
} | |
}; | |
r[Symbol.iterator] = function() { | |
return r; | |
}; | |
return r; | |
} | |
function Sc(d, m) { | |
return Object.prototype.hasOwnProperty.call(d, m); | |
} | |
function gh(d, m, p) { | |
if (null == d) throw new TypeError("The 'this' value for String.prototype." + p + " must not be null or undefined"); | |
if (m instanceof RegExp) throw new TypeError("First argument to String.prototype." + p + " must not be a regular expression"); | |
return d + ""; | |
} | |
var Tc = y.nfCrypto || y.msCrypto || y.webkitCrypto || y.crypto, | |
Ra = Tc && (Tc.webkitSubtle || Tc.subtle), | |
cf = y.nfCryptokeys || y.msCryptokeys || y.webkitCryptokeys || y.cryptokeys; | |
(function(d) { | |
var m = function() { | |
function d(d, p) { | |
d instanceof m ? (this.abv = d.abv, this.position = d.position) : (this.abv = d, this.position = p || 0); | |
} | |
d.prototype = { | |
readByte: function() { | |
return this.abv[this.position++]; | |
}, | |
writeByte: function(d) { | |
this.abv[this.position++] = d; | |
}, | |
peekByte: function(d) { | |
return this.abv[d]; | |
}, | |
copyBytes: function(d, m, p) { | |
var T = new Uint8Array(this.abv.buffer, this.position, p); | |
d = new Uint8Array(d.buffer, m, p); | |
T.set(d); | |
this.position += p; | |
}, | |
seek: function(d) { | |
this.position = d; | |
}, | |
skip: function(d) { | |
this.position += d; | |
}, | |
getPosition: function() { | |
return this.position; | |
}, | |
setPosition: function(d) { | |
this.position = d; | |
}, | |
getRemaining: function() { | |
return this.abv.length - this.position; | |
}, | |
getLength: function() { | |
return this.abv.length; | |
}, | |
isEndOfStream: function() { | |
return this.position >= this.abv.length; | |
}, | |
show: function() { | |
return "AbvStream: pos " + (this.getPosition().toString() + " of " + this.getLength().toString()); | |
} | |
}; | |
return d; | |
} | |
(), | |
p = {}; | |
(function() { | |
function d(a, c) { | |
c.writeByte(a.tagClass << 6 | a.constructed << 5 | a.tag); | |
var b = a.payloadLen; | |
if (128 > b) c.writeByte(b); | |
else { | |
for (var k = b, h = 0; k;) ++h, k >>= 8; | |
c.writeByte(128 | h); | |
for (k = 0; k < h; ++k) c.writeByte(b >> 8 * (h - k - 1) & 255); | |
} | |
if (a.child) | |
for (a.tag == H.BIT_STRING && c.writeByte(0), b = a._child; b;) { | |
if (!d(b, c)) return !1; | |
b = b.next; | |
} | |
else switch (a.tag) { | |
case H.INTEGER: | |
a.backingStore[a.dataIdx] >> 7 && c.writeByte(0); | |
c.copyBytes(a.backingStore, a.dataIdx, a.dataLen); | |
break; | |
case H.BIT_STRING: | |
c.writeByte(0); | |
c.copyBytes(a.backingStore, a.dataIdx, a.dataLen); | |
break; | |
case H.OCTET_STRING: | |
c.copyBytes(a.backingStore, a.dataIdx, a.dataLen); | |
break; | |
case H.OBJECT_IDENTIFIER: | |
c.copyBytes(a.backingStore, a.dataIdx, a.dataLen); | |
} | |
return !0; | |
} | |
function r(a) { | |
var c = a.readByte(), | |
b = c & 127; | |
if (b == c) return b; | |
if (3 < b || 0 === b) return -1; | |
for (var k = c = 0; k < b; ++k) c = c << 8 | a.readByte(); | |
return c; | |
} | |
function D(a, c, b) { | |
var k = a.backingStore, | |
h = new m(k, c); | |
c += b; | |
b = a; | |
var n, g, l; | |
if (8 < va++) return na; | |
for (; h.getPosition() < c;) { | |
h.getPosition(); | |
l = h.readByte(); | |
if (31 == (l & 31)) { | |
for (g = 0; l & 128;) g <<= 8, g |= l & 127; | |
l = g; | |
} | |
n = l; | |
g = n & 31; | |
if (0 > g || 30 < g) return na; | |
l = r(h); | |
if (0 > l || l > h.getRemaining()) return na; | |
b.constructed = n & 32; | |
b.tagClass = (n & 192) >> 6; | |
b.tag = g; | |
b.dataLen = l; | |
b.dataIdx = h.getPosition(); | |
g = h; | |
var f = n; | |
n = l; | |
if (f & 32) g = !0; | |
else if (f < H.BIT_STRING || f > H.OCTET_STRING) g = !1; | |
else { | |
var q = new m(g); | |
f == H.BIT_STRING && q.skip(1); | |
q.readByte() >> 6 & 1 ? g = !1 : (f = r(q), g = q.getPosition() - g.getPosition() + f == n); | |
} | |
g && (g = h.getPosition(), n = l, b.tag == H.BIT_STRING && (b.dataIdx++, b.dataLen--, g++, n--), b.child = new C(k, b), D(b.child, g, n)); | |
b.tag == H.INTEGER && (g = h.getPosition(), 0 == h.peekByte(g) && h.peekByte(g + 1) >> 7 && (b.dataIdx++, b.dataLen--)); | |
h.skip(l); | |
h.getPosition() < c && (b.next = new C(k, b.parent), b = b.next); | |
} | |
va--; | |
return a; | |
} | |
function y(a, c, b) { | |
if (9 != b) return !1; | |
for (b = 0; 9 > b; ++b) | |
if (a[c++] != db[b]) return !1; | |
return !0; | |
} | |
function T(a) { | |
if (!(a && a.child && a.child.next && a.child.child && a.child.next.child)) return !1; | |
var c = a.child.child; | |
return y(c.backingStore, c.dataIdx, c.dataLen) && 2 == a.nChildren && 2 == a.child.nChildren && 2 == a.child.next.child.nChildren ? !0 : !1; | |
} | |
function Ab(a) { | |
if (!(a && a.child && a.child.next && a.child.next.child && a.child.next.next && a.child.next.next.child)) return !1; | |
var c = a.child.next.child; | |
return y(c.backingStore, c.dataIdx, c.dataLen) && 3 == a.nChildren && 2 == a.child.next.nChildren && 9 == a.child.next.next.child.nChildren ? !0 : !1; | |
} | |
function Xa(a) { | |
var c = I.createSequenceNode(), | |
b = new nb(c); | |
b.addChild(I.createSequenceNode()); | |
b.addChild(I.createOidNode(db)); | |
b.addSibling(I.createNullNode()); | |
b.addToParent(c, I.createBitStringNode(null)); | |
b.addChild(I.createSequenceNode()); | |
b.addChild(I.createIntegerNode(a.n)); | |
b.addSibling(I.createIntegerNode(a.e)); | |
return c; | |
} | |
function $a(a) { | |
a = a.child.next.child.child; | |
var c = a.data; | |
a = a.next; | |
return new Ia(c, a.data, null, null); | |
} | |
function G(a) { | |
var c = I.createSequenceNode(), | |
b = new nb(c); | |
b.addChild(I.createIntegerNode(new Uint8Array([0]))); | |
b.addSibling(I.createSequenceNode()); | |
b.addChild(I.createOidNode(db)); | |
b.addSibling(I.createNullNode()); | |
b.addToParent(c, I.createOctetStringNode(null)); | |
b.addChild(I.createSequenceNode()); | |
b.addChild(I.createIntegerNode(new Uint8Array([0]))); | |
b.addSibling(I.createIntegerNode(a.n)); | |
b.addSibling(I.createIntegerNode(a.e)); | |
b.addSibling(I.createIntegerNode(a.d)); | |
b.addSibling(I.createIntegerNode(a.p)); | |
b.addSibling(I.createIntegerNode(a.q)); | |
b.addSibling(I.createIntegerNode(a.dp)); | |
b.addSibling(I.createIntegerNode(a.dq)); | |
b.addSibling(I.createIntegerNode(a.qi)); | |
return c; | |
} | |
function L(a) { | |
var c = []; | |
a = a.child.next.next.child.child.next; | |
for (var b = 0; 8 > b; b++) c.push(a.data), a = a.next; | |
return new sa(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7]); | |
} | |
function B(t, c, b, k) { | |
if (!(t instanceof Ia || t instanceof sa)) return na; | |
if (b) | |
for (var h = 0; h < b.length; ++h) | |
if (-1 == a.indexOf(b[h])) return na; | |
c = { | |
kty: "RSA", | |
alg: c, | |
key_ops: b || [], | |
ext: k == na ? !1 : k, | |
n: qa(t.n, !0), | |
e: qa(t.e, !0) | |
}; | |
t instanceof sa && (c.d = qa(t.d, !0), c.p = qa(t.p, !0), c.q = qa(t.q, !0), c.dp = qa(t.dp, !0), c.dq = qa(t.dq, !0), c.qi = qa(t.qi, !0)); | |
return c; | |
} | |
function F(a) { | |
if (!a.kty || "RSA" != a.kty || !a.n || !a.e) return na; | |
var c = "RSA1_5 RSA-OAEP RSA-OAEP-256 RSA-OAEP-384 RSA-OAEP-512 RS256 RS384 RS512".split(" "); | |
if (a.alg && -1 == c.indexOf(a.alg)) return na; | |
c = []; | |
a.use ? "enc" == a.use ? c = ["encrypt", "decrypt", "wrap", "unwrap"] : "sig" == a.use && (c = ["sign", "verify"]) : c = a.key_ops; | |
var b = a.ext, | |
k = Ea(a.n, !0), | |
h = Ea(a.e, !0); | |
if (a.d) { | |
var n = Ea(a.d, !0), | |
g = Ea(a.p, !0), | |
l = Ea(a.q, !0), | |
f = Ea(a.dp, !0), | |
q = Ea(a.dq, !0), | |
v = Ea(a.qi, !0); | |
return new sa(k, h, n, g, l, f, q, v, a.alg, c, b); | |
} | |
return new Ia(k, h, b, c); | |
} | |
function O(a, c, b, k) { | |
this.der = a; | |
this.type = c; | |
this.keyOps = b; | |
this.extractable = k; | |
} | |
var H = { | |
BER: 0, | |
BOOLEAN: 1, | |
INTEGER: 2, | |
BIT_STRING: 3, | |
OCTET_STRING: 4, | |
NULL: 5, | |
OBJECT_IDENTIFIER: 6, | |
OBJECT_DESCRIPTOR: 7, | |
INSTANCE_OF_EXTERNAL: 8, | |
REAL: 9, | |
ENUMERATED: 10, | |
EMBEDDED_PPV: 11, | |
UTF8_STRING: 12, | |
RELATIVE_OID: 13, | |
SEQUENCE: 16, | |
SET: 17, | |
NUMERIC_STRING: 18, | |
PRINTABLE_STRING: 19, | |
TELETEX_STRING: 20, | |
T61_STRING: 20, | |
VIDEOTEX_STRING: 21, | |
IA5_STRING: 22, | |
UTC_TIME: 23, | |
GENERALIZED_TIME: 24, | |
GRAPHIC_STRING: 25, | |
VISIBLE_STRING: 26, | |
ISO64_STRING: 26, | |
GENERAL_STRING: 27, | |
UNIVERSAL_STRING: 28, | |
CHARACTER_STRING: 29, | |
BMP_STRING: 30 | |
}, | |
C = function(a, c, b, k, h, n) { | |
this._data = a; | |
this._parent = c || na; | |
this._constructed = b || !1; | |
this._tagClass = 0; | |
this._tag = k || 0; | |
this._dataIdx = h || 0; | |
this._dataLen = n || 0; | |
}; | |
C.prototype = { | |
_child: na, | |
_next: na, | |
get data() { | |
return new Uint8Array(this._data.buffer.slice(this._dataIdx, this._dataIdx + this._dataLen)); | |
}, | |
get backingStore() { | |
return this._data; | |
}, | |
get constructed() { | |
return this._constructed; | |
}, | |
set constructed(a) { | |
this._constructed = 0 != a ? !0 : !1; | |
}, | |
get tagClass() { | |
return this._tagClass; | |
}, | |
set tagClass(a) { | |
this._tagClass = a; | |
}, | |
get tag() { | |
return this._tag; | |
}, | |
set tag(a) { | |
this._tag = a; | |
}, | |
get dataIdx() { | |
return this._dataIdx; | |
}, | |
set dataIdx(a) { | |
this._dataIdx = a; | |
}, | |
get dataLen() { | |
return this._dataLen; | |
}, | |
set dataLen(a) { | |
this._dataLen = a; | |
}, | |
get child() { | |
return this._child; | |
}, | |
set child(a) { | |
this._child = a; | |
this._child.parent = this; | |
}, | |
get next() { | |
return this._next; | |
}, | |
set next(a) { | |
this._next = a; | |
}, | |
get parent() { | |
return this._parent; | |
}, | |
set parent(a) { | |
this._parent = a; | |
}, | |
get payloadLen() { | |
var a = 0; | |
if (this._child) { | |
for (var c = this._child; c;) a += c.length, c = c.next; | |
this._tag == H.BIT_STRING && a++; | |
} else switch (this._tag) { | |
case H.INTEGER: | |
a = this._dataLen; | |
this._data[this._dataIdx] >> 7 && a++; | |
break; | |
case H.BIT_STRING: | |
a = this._dataLen + 1; | |
break; | |
case H.OCTET_STRING: | |
a = this._dataLen; | |
break; | |
case H.NULL: | |
a = 0; | |
break; | |
case H.OBJECT_IDENTIFIER: | |
y(this._data, this._dataIdx, this._dataLen) && (a = 9); | |
} | |
return a; | |
}, | |
get length() { | |
var a = this.payloadLen, | |
c; | |
if (127 < a) | |
for (c = a; c;) c >>= 8, ++a; | |
return a + 2; | |
}, | |
get der() { | |
var a = this.length; | |
if (!a) return na; | |
var a = new Uint8Array(a), | |
c = new m(a); | |
return d(this, c) ? a : na; | |
}, | |
get nChildren() { | |
for (var a = 0, c = this._child; c;) a++, c = c.next; | |
return a; | |
} | |
}; | |
var I = { | |
createSequenceNode: function() { | |
return new C(null, null, !0, H.SEQUENCE, null, null); | |
}, | |
createOidNode: function(a) { | |
return new C(a, null, !1, H.OBJECT_IDENTIFIER, 0, a ? a.length : 0); | |
}, | |
createNullNode: function() { | |
return new C(null, null, !1, H.NULL, null, null); | |
}, | |
createBitStringNode: function(a) { | |
return new C(a, null, !1, H.BIT_STRING, 0, a ? a.length : 0); | |
}, | |
createIntegerNode: function(a) { | |
return new C(a, null, !1, H.INTEGER, 0, a ? a.length : 0); | |
}, | |
createOctetStringNode: function(a) { | |
return new C(a, null, !1, H.OCTET_STRING, 0, a ? a.length : 0); | |
} | |
}, | |
nb = function(a) { | |
this._currentNode = this._rootNode = a; | |
}; | |
nb.prototype = { | |
addChild: function(a) { | |
this.addTo(this._currentNode, a); | |
}, | |
addSibling: function(a) { | |
this.addTo(this._currentNode.parent, a); | |
}, | |
addTo: function(a, c) { | |
this._currentNode = c; | |
this._currentNode.parent = a; | |
if (a.child) { | |
for (var b = a.child; b.next;) b = b.next; | |
b.next = c; | |
} else a.child = c; | |
}, | |
addToParent: function(a, c) { | |
this.findNode(a) && this.addTo(a, c); | |
}, | |
findNode: function(a) { | |
for (var c = this._currentNode; c;) { | |
if (a == c) return !0; | |
c = c.parent; | |
} | |
return !1; | |
} | |
}; | |
var va = 0, | |
db = new Uint8Array([42, 134, 72, 134, 247, 13, 1, 1, 1]), | |
Ia = function(a, c, b, k) { | |
this.n = a; | |
this.e = c; | |
this.ext = b; | |
this.keyOps = k; | |
}, | |
sa = function(a, c, b, k, h, n, g, l, f, q, v) { | |
this.n = a; | |
this.e = c; | |
this.d = b; | |
this.p = k; | |
this.q = h; | |
this.dp = n; | |
this.dq = g; | |
this.qi = l; | |
this.alg = f; | |
this.keyOps = q; | |
this.ext = v; | |
}, | |
a = "sign verify encrypt decrypt wrapKey unwrapKey deriveKey deriveBits".split(" "); | |
O.prototype.getDer = function() { | |
return this.der; | |
}; | |
O.prototype.getType = function() { | |
return this.type; | |
}; | |
O.prototype.getKeyOps = function() { | |
return this.keyOps; | |
}; | |
O.prototype.getExtractable = function() { | |
return this.extractable; | |
}; | |
p.parse = function(a) { | |
va = 0; | |
return D(new C(a), 0, a.length); | |
}; | |
p.show = function(a, c) {}; | |
p.isRsaSpki = T; | |
p.isRsaPkcs8 = Ab; | |
p.NodeFactory = I; | |
p.Builder = nb; | |
p.tagVal = H; | |
p.RsaPublicKey = Ia; | |
p.RsaPrivateKey = sa; | |
p.buildRsaSpki = Xa; | |
p.parseRsaSpki = function(a) { | |
a = p.parse(a); | |
return T ? $a(a) : na; | |
}; | |
p.buildRsaPkcs8 = G; | |
p.parseRsaPkcs8 = function(a) { | |
a = p.parse(a); | |
return Ab(a) ? L(a) : na; | |
}; | |
p.buildRsaJwk = B; | |
p.parseRsaJwk = F; | |
p.RsaDer = O; | |
p.rsaDerToJwk = function(a, c, b, k) { | |
a = p.parse(a); | |
if (!a) return na; | |
if (T(a)) a = $a(a); | |
else if (Ab(a)) a = L(a); | |
else return na; | |
return B(a, c, b, k); | |
}; | |
p.jwkToRsaDer = function(a) { | |
a = F(a); | |
if (!a) return na; | |
var c, b; | |
if (a instanceof Ia) c = "spki", b = Xa(a).der; | |
else if (a instanceof sa) c = "pkcs8", b = G(a).der; | |
else return na; | |
return new O(b, c, a.keyOps, a.ext); | |
}; | |
p.webCryptoAlgorithmToJwkAlg = function(a) { | |
return "RSAES-PKCS1-v1_5" == a.name ? "RSA1_5" : "RSASSA-PKCS1-v1_5" == a.name ? "SHA-256" == a.hash.name ? "RS256" : "SHA-384" == a.hash.name ? "RS384" : "SHA-512" == a.hash.name ? "RS512" : na : na; | |
}; | |
p.webCryptoUsageToJwkKeyOps = function(a) { | |
return a.map(function(a) { | |
return "wrapKey" == a ? "wrap" : "unwrapKey" == a ? "unwrap" : a; | |
}); | |
}; | |
})(); | |
d.ASN1 = p; | |
})(this); | |
var qa, Ea; | |
(function() { | |
for (var d = {}, m = {}, p = { | |
"=": 0, | |
".": 0 | |
}, r = { | |
"=": 0, | |
".": 0 | |
}, D = /\s+/g, y = /^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/_-]*[=]{0,2}$/, fb = 64; fb--;) d["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [fb]] = 262144 * fb, m["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [fb]] = 4096 * fb, p["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [fb]] = 64 * fb, r["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [fb]] = fb; | |
for (fb = 64; fb-- && "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [fb] != "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" [fb];) d["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" [fb]] = 262144 * fb, m["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" [fb]] = 4096 * fb, p["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" [fb]] = 64 * fb, r["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" [fb]] = fb; | |
qa = function(d, m) { | |
for (var p = "", T = 0, G = d.length, L = G - 2, B, F = m ? "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", O = m ? "" : "="; T < L;) B = 65536 * d[T++] + 256 * d[T++] + d[T++], p += F[B >>> 18] + F[B >>> 12 & 63] + F[B >>> 6 & 63] + F[B & 63]; | |
T == L ? (B = 65536 * d[T++] + 256 * d[T++], p += F[B >>> 18] + F[B >>> 12 & 63] + F[B >>> 6 & 63] + O) : T == G - 1 && (B = 65536 * d[T++], p += F[B >>> 18] + F[B >>> 12 & 63] + O + O); | |
return p; | |
}; | |
Ea = function(T, Ab) { | |
T = T.replace(D, ""); | |
if (Ab) { | |
var Xa = T.length % 4; | |
if (Xa) | |
for (var Xa = 4 - Xa, $a = 0; $a < Xa; ++$a) T += "="; | |
} | |
Xa = T.length; | |
if (0 != Xa % 4 || !y.test(T)) throw Error("bad base64: " + T); | |
for (var G = Xa / 4 * 3 - ("=" == T[Xa - 1] ? 1 : 0) - ("=" == T[Xa - 2] ? 1 : 0), L = new Uint8Array(G), B = 0, F = 0; B < Xa;) $a = d[T[B++]] + m[T[B++]] + p[T[B++]] + r[T[B++]], L[F++] = $a >>> 16, F < G && (L[F++] = $a >>> 8 & 255, F < G && (L[F++] = $a & 255)); | |
return L; | |
}; | |
})(); | |
var ob = {}; | |
(function() { | |
function d(p) { | |
if (!(this instanceof d)) return new d(p); | |
for (var G = 0, L = fb.length; G < L; G++) this[fb[G]] = ""; | |
this.bufferCheckPosition = ob.MAX_BUFFER_LENGTH; | |
this.q = this.c = this.p = ""; | |
this.opt = p || {}; | |
this.closed = this.closedRoot = this.sawRoot = !1; | |
this.tag = this.error = null; | |
this.state = T.BEGIN; | |
this.stack = new y; | |
this.index = this.position = this.column = 0; | |
this.line = 1; | |
this.slashed = !1; | |
this.unicodeI = 0; | |
this.unicodeS = null; | |
m(this, "onready"); | |
} | |
function m(d, m, L) { | |
if (d[m]) d[m](L); | |
} | |
function p(d, p) { | |
var L = d.opt, | |
B = d.textNode; | |
L.trim && (B = B.trim()); | |
L.normalize && (B = B.replace(/\s+/g, " ")); | |
d.textNode = B; | |
d.textNode && m(d, p ? p : "onvalue", d.textNode); | |
d.textNode = ""; | |
} | |
function r(d, G) { | |
p(d); | |
G += "\nLine: " + d.line + "\nColumn: " + d.column + "\nChar: " + d.c; | |
G = Error(G); | |
d.error = G; | |
m(d, "onerror", G); | |
return d; | |
} | |
function D($a) { | |
$a.state !== T.VALUE && r($a, "Unexpected end"); | |
p($a); | |
$a.c = ""; | |
$a.closed = !0; | |
m($a, "onend"); | |
d.call($a, $a.opt); | |
return $a; | |
} | |
var y = Array; | |
ob.parser = function(m) { | |
return new d(m); | |
}; | |
ob.CParser = d; | |
ob.MAX_BUFFER_LENGTH = 65536; | |
ob.DEBUG = !1; | |
ob.INFO = !1; | |
ob.EVENTS = "value string key openobject closeobject openarray closearray error end ready".split(" "); | |
var fb = ["textNode", "numberNode"]; | |
ob.EVENTS.filter(function(d) { | |
return "error" !== d && "end" !== d; | |
}); | |
var T = 0; | |
ob.STATE = { | |
BEGIN: T++, | |
VALUE: T++, | |
OPEN_OBJECT: T++, | |
CLOSE_OBJECT: T++, | |
OPEN_ARRAY: T++, | |
CLOSE_ARRAY: T++, | |
TEXT_ESCAPE: T++, | |
STRING: T++, | |
BACKSLASH: T++, | |
END: T++, | |
OPEN_KEY: T++, | |
CLOSE_KEY: T++, | |
TRUE: T++, | |
TRUE2: T++, | |
TRUE3: T++, | |
FALSE: T++, | |
FALSE2: T++, | |
FALSE3: T++, | |
FALSE4: T++, | |
NULL: T++, | |
NULL2: T++, | |
NULL3: T++, | |
NUMBER_DECIMAL_POINT: T++, | |
NUMBER_DIGIT: T++ | |
}; | |
for (var Ab in ob.STATE) ob.STATE[ob.STATE[Ab]] = Ab; | |
T = ob.STATE; | |
Object.getPrototypeOf || (Object.getPrototypeOf = function(d) { | |
return d.__proto__; | |
}); | |
var Xa = /[\\"\n]/g; | |
d.prototype = { | |
end: function() { | |
D(this); | |
}, | |
write: function(d) { | |
if (this.error) throw this.error; | |
if (this.closed) return r(this, "Cannot write after close. Assign an onready handler."); | |
if (null === d) return D(this); | |
for (var G = d[0], L; G;) { | |
L = G; | |
this.c = G = d.charAt(this.index++); | |
L !== G ? this.p = L : L = this.p; | |
if (!G) break; | |
this.position++; | |
"\n" === G ? (this.line++, this.column = 0) : this.column++; | |
switch (this.state) { | |
case T.BEGIN: | |
"{" === G ? this.state = T.OPEN_OBJECT : "[" === G ? this.state = T.OPEN_ARRAY : "\r" !== G && "\n" !== G && " " !== G && "\t" !== G && r(this, "Non-whitespace before {[."); | |
continue; | |
case T.OPEN_KEY: | |
case T.OPEN_OBJECT: | |
if ("\r" === G || "\n" === G || " " === G || "\t" === G) continue; | |
if (this.state === T.OPEN_KEY) this.stack.push(T.CLOSE_KEY); | |
else if ("}" === G) { | |
m(this, "onopenobject"); | |
m(this, "oncloseobject"); | |
this.state = this.stack.pop() || T.VALUE; | |
continue; | |
} else this.stack.push(T.CLOSE_OBJECT); | |
'"' === G ? this.state = T.STRING : r(this, 'Malformed object key should start with "'); | |
continue; | |
case T.CLOSE_KEY: | |
case T.CLOSE_OBJECT: | |
if ("\r" === G || "\n" === G || " " === G || "\t" === G) continue; | |
":" === G ? (this.state === T.CLOSE_OBJECT ? (this.stack.push(T.CLOSE_OBJECT), p(this, "onopenobject")) : p(this, "onkey"), this.state = T.VALUE) : "}" === G ? (p(this), m(this, "oncloseobject", void 0), this.state = this.stack.pop() || T.VALUE) : "," === G ? (this.state === T.CLOSE_OBJECT && this.stack.push(T.CLOSE_OBJECT), p(this), this.state = T.OPEN_KEY) : r(this, "Bad object"); | |
continue; | |
case T.OPEN_ARRAY: | |
case T.VALUE: | |
if ("\r" === G || "\n" === G || " " === G || "\t" === G) continue; | |
if (this.state === T.OPEN_ARRAY) | |
if (m(this, "onopenarray"), this.state = T.VALUE, "]" === G) { | |
m(this, "onclosearray"); | |
this.state = this.stack.pop() || T.VALUE; | |
continue; | |
} | |
else this.stack.push(T.CLOSE_ARRAY); | |
'"' === G ? this.state = T.STRING : "{" === G ? this.state = T.OPEN_OBJECT : "[" === G ? this.state = T.OPEN_ARRAY : "t" === G ? this.state = T.TRUE : "f" === G ? this.state = T.FALSE : "n" === G ? this.state = T.NULL : "-" === G ? this.numberNode += G : "0" === G ? (this.numberNode += G, this.state = T.NUMBER_DIGIT) : -1 !== "123456789".indexOf(G) ? (this.numberNode += G, this.state = T.NUMBER_DIGIT) : r(this, "Bad value"); | |
continue; | |
case T.CLOSE_ARRAY: | |
if ("," === G) this.stack.push(T.CLOSE_ARRAY), p(this, "onvalue"), this.state = T.VALUE; | |
else if ("]" === G) p(this), m(this, "onclosearray", void 0), this.state = this.stack.pop() || T.VALUE; | |
else if ("\r" === G || "\n" === G || " " === G || "\t" === G) continue; | |
else r(this, "Bad array"); | |
continue; | |
case T.STRING: | |
L = this.index - 1; | |
var B = this.slashed, | |
F = this.unicodeI; | |
a: for (;;) { | |
if (ob.DEBUG) | |
for (; 0 < F;) | |
if (this.unicodeS += G, G = d.charAt(this.index++), 4 === F ? (this.textNode += String.fromCharCode(parseInt(this.unicodeS, 16)), F = 0, L = this.index - 1) : F++, !G) break a; | |
if ('"' === G && !B) { | |
this.state = this.stack.pop() || T.VALUE; | |
(this.textNode += d.substring(L, this.index - 1)) || m(this, "onvalue", ""); | |
break; | |
} | |
if ("\\" === G && !B && (B = !0, this.textNode += d.substring(L, this.index - 1), G = d.charAt(this.index++), !G)) break; | |
if (B) | |
if (B = !1, "n" === G ? this.textNode += "\n" : "r" === G ? this.textNode += "\r" : "t" === G ? this.textNode += "\t" : "f" === G ? this.textNode += "\f" : "b" === G ? this.textNode += "\b" : "u" === G ? (F = 1, this.unicodeS = "") : this.textNode += G, G = d.charAt(this.index++), L = this.index - 1, G) continue; | |
else break; | |
Xa.lastIndex = this.index; | |
var O = Xa.exec(d); | |
if (null === O) { | |
this.index = d.length + 1; | |
this.textNode += d.substring(L, this.index - 1); | |
break; | |
} | |
this.index = O.index + 1; | |
G = d.charAt(O.index); | |
if (!G) { | |
this.textNode += d.substring(L, this.index - 1); | |
break; | |
} | |
} | |
this.slashed = B; | |
this.unicodeI = F; | |
continue; | |
case T.TRUE: | |
if ("" === G) continue; | |
"r" === G ? this.state = T.TRUE2 : r(this, "Invalid true started with t" + G); | |
continue; | |
case T.TRUE2: | |
if ("" === G) continue; | |
"u" === G ? this.state = T.TRUE3 : r(this, "Invalid true started with tr" + G); | |
continue; | |
case T.TRUE3: | |
if ("" === G) continue; | |
"e" === G ? (m(this, "onvalue", !0), this.state = this.stack.pop() || T.VALUE) : r(this, "Invalid true started with tru" + G); | |
continue; | |
case T.FALSE: | |
if ("" === G) continue; | |
"a" === G ? this.state = T.FALSE2 : r(this, "Invalid false started with f" + G); | |
continue; | |
case T.FALSE2: | |
if ("" === G) continue; | |
"l" === G ? this.state = T.FALSE3 : r(this, "Invalid false started with fa" + G); | |
continue; | |
case T.FALSE3: | |
if ("" === G) continue; | |
"s" === G ? this.state = T.FALSE4 : r(this, "Invalid false started with fal" + G); | |
continue; | |
case T.FALSE4: | |
if ("" === G) continue; | |
"e" === G ? (m(this, "onvalue", !1), this.state = this.stack.pop() || T.VALUE) : r(this, "Invalid false started with fals" + G); | |
continue; | |
case T.NULL: | |
if ("" === G) continue; | |
"u" === G ? this.state = T.NULL2 : r(this, "Invalid null started with n" + G); | |
continue; | |
case T.NULL2: | |
if ("" === G) continue; | |
"l" === G ? this.state = T.NULL3 : r(this, "Invalid null started with nu" + G); | |
continue; | |
case T.NULL3: | |
if ("" === G) continue; | |
"l" === G ? (m(this, "onvalue", null), this.state = this.stack.pop() || T.VALUE) : r(this, "Invalid null started with nul" + G); | |
continue; | |
case T.NUMBER_DECIMAL_POINT: | |
"." === G ? (this.numberNode += G, this.state = T.NUMBER_DIGIT) : r(this, "Leading zero not followed by ."); | |
continue; | |
case T.NUMBER_DIGIT: | |
-1 !== "0123456789".indexOf(G) ? this.numberNode += G : "." === G ? (-1 !== this.numberNode.indexOf(".") && r(this, "Invalid number has two dots"), this.numberNode += G) : "e" === G || "E" === G ? (-1 === this.numberNode.indexOf("e") && -1 === this.numberNode.indexOf("E") || r(this, "Invalid number has two exponential"), this.numberNode += G) : "+" === G || "-" === G ? ("e" !== L && "E" !== L && r(this, "Invalid symbol in number"), this.numberNode += G) : (this.numberNode && m(this, "onvalue", parseFloat(this.numberNode)), this.numberNode = "", this.index--, this.state = this.stack.pop() || T.VALUE); | |
continue; | |
default: | |
r(this, "Unknown state: " + this.state); | |
} | |
} | |
if (this.position >= this.bufferCheckPosition) { | |
d = Math.max(ob.MAX_BUFFER_LENGTH, 10); | |
L = G = 0; | |
for (B = fb.length; L < B; L++) { | |
F = this[fb[L]].length; | |
if (F > d) switch (fb[L]) { | |
case "text": | |
break; | |
default: | |
r(this, "Max buffer length exceeded: " + fb[L]); | |
} | |
G = Math.max(G, F); | |
} | |
this.bufferCheckPosition = ob.MAX_BUFFER_LENGTH - G + this.position; | |
} | |
return this; | |
}, | |
resume: function() { | |
this.error = null; | |
return this; | |
}, | |
close: function() { | |
return this.write(null); | |
} | |
}; | |
})(); | |
var hh, ih; | |
(function() { | |
function d(d, m) { | |
m || (m = d.length); | |
return d.reduce(function(d, p, T) { | |
return T < m ? d + String.fromCharCode(p) : d; | |
}, ""); | |
} | |
for (var m = {}, p = 0; 256 > p; ++p) { | |
var r = d([p]); | |
m[r] = p; | |
} | |
for (var D = Object.keys(m).length, y = [], p = 0; 256 > p; ++p) y[p] = [p]; | |
hh = function(p, T) { | |
function r(d, C) { | |
for (; 0 < C;) { | |
if (F >= B.length) return !1; | |
if (C > O) { | |
var I = d, | |
I = I >>> C - O; | |
B[F] |= I & 255; | |
C -= O; | |
O = 8; | |
++F; | |
} else C <= O && (I = d, I <<= O - C, I &= 255, I >>>= 8 - O, B[F] |= I & 255, O -= C, C = 0, 0 == O && (O = 8, ++F)); | |
} | |
return !0; | |
} | |
for (var Xa in m) T[Xa] = m[Xa]; | |
for (var $a = D, G = [], L = 8, B = new Uint8Array(p.length), F = 0, O = 8, H = 0; H < p.length; ++H) { | |
var C = p[H]; | |
G.push(C); | |
Xa = d(G); | |
var I = T[Xa]; | |
if (!I) { | |
G = d(G, G.length - 1); | |
if (!r(T[G], L)) return null; | |
0 != $a >> L && ++L; | |
T[Xa] = $a++; | |
G = [C]; | |
} | |
} | |
return 0 < G.length && (Xa = d(G), I = T[Xa], !r(I, L)) ? null : B.subarray(0, 8 > O ? F + 1 : F); | |
}; | |
ih = function(d) { | |
for (var p = y.slice(), m = 0, r = 0, $a = 8, G = new Uint8Array(Math.ceil(1.5 * d.length)), L = 0, B, F = []; m < d.length && !(8 * (d.length - m) - r < $a);) { | |
for (var O = B = 0; O < $a;) { | |
var H = Math.min($a - O, 8 - r), | |
C = d[m], | |
C = C << r, | |
C = C & 255, | |
C = C >>> 8 - H, | |
O = O + H, | |
r = r + H; | |
8 == r && (r = 0, ++m); | |
B |= (C & 255) << $a - O; | |
} | |
O = p[B]; | |
0 == F.length ? ++$a : (O ? F.push(O[0]) : F.push(F[0]), p[p.length] = F, F = [], p.length == 1 << $a && ++$a, O || (O = p[B])); | |
B = L + O.length; | |
B >= G.length && (H = new Uint8Array(Math.ceil(1.5 * B)), H.set(G), G = H); | |
G.set(O, L); | |
L = B; | |
F = F.concat(O); | |
} | |
return G.subarray(0, L); | |
}; | |
})(); | |
var Na, Ka, Cd, fg, Ud, jh, kh, df, p; | |
(function() { | |
Na = "utf-8"; | |
Ka = 9007199254740992; | |
var d = Cd = { | |
GZIP: "GZIP", | |
LZW: "LZW" | |
}; | |
Object.freeze(Cd); | |
fg = function(m) { | |
for (var p = [d.GZIP, d.LZW], r = 0; r < p.length && 0 < m.length; ++r) | |
for (var D = p[r], T = 0; T < m.length; ++T) | |
if (m[T] == D) return D; | |
return null; | |
}; | |
var m = Ud = { | |
AES_CBC_PKCS5Padding: "AES/CBC/PKCS5Padding", | |
AESWrap: "AESWrap", | |
RSA_ECB_PKCS1Padding: "RSA/ECB/PKCS1Padding" | |
}; | |
Object.freeze(Ud); | |
jh = function(d) { | |
return m.AES_CBC_PKCS5Padding == d ? m.AES_CBC_PKCS5Padding : m.RSA_ECB_PKCS1Padding == d ? m.RSA_ECB_PKCS1Padding : m[d]; | |
}; | |
var r = kh = { | |
HmacSHA256: "HmacSHA256", | |
SHA256withRSA: "SHA256withRSA" | |
}; | |
Object.freeze(kh); | |
df = function(d) { | |
return r[d]; | |
}; | |
p = { | |
FAIL: 1, | |
TRANSIENT_FAILURE: 2, | |
ENTITY_REAUTH: 3, | |
USER_REAUTH: 4, | |
KEYX_REQUIRED: 5, | |
ENTITYDATA_REAUTH: 6, | |
USERDATA_REAUTH: 7, | |
EXPIRED: 8, | |
REPLAYED: 9, | |
SSOTOKEN_REJECTED: 10 | |
}; | |
Object.freeze(p); | |
})(); | |
var ea = { | |
isObjectLiteral: function(d) { | |
return null !== d && "object" === typeof d && d.constructor === Object; | |
}, | |
extendDeep: function() { | |
var d = arguments[0], | |
m = 1, | |
p = arguments.length, | |
r = !1, | |
D, y, N, T; | |
"boolean" === typeof d && (r = d, d = arguments[1], m = 2); | |
for (; m < p; m++) | |
if (null != (D = arguments[m])) | |
for (y in D) r && y in d || (T = D[y], d !== T && T !== na && (N = d[y], d[y] = null !== N && null !== T && "object" === typeof N && "object" === typeof T ? ea.extendDeep(r, {}, N, T) : T)); | |
return d; | |
} | |
}; | |
(function() { | |
function d(d, m) { | |
return function() { | |
var p = d.base, | |
G; | |
d.base = m; | |
G = d.apply(this, arguments); | |
d.base = p; | |
return G; | |
}; | |
} | |
function m(m, p, r) { | |
var G, L, B, F; | |
r = r || T; | |
F = !!r.extendAll; | |
for (G in p) L = p.__lookupGetter__(G), B = p.__lookupSetter__(G), L || B ? (L && m.__defineGetter__(G, L), B && m.__defineSetter__(G, B)) : (L = p[G], B = m[G], "function" === typeof L && "function" === typeof B && L !== B ? (L.base !== Function.prototype.base && (L = d(L, B)), L.base = B) : (F || r[G]) && ea.isObjectLiteral(L) && ea.isObjectLiteral(B) && (L = ea.extendDeep({}, B, L)), m[G] = L); | |
} | |
function p() { | |
var d = Array.prototype.slice, | |
m = d.call(arguments, 1); | |
return this.extend({ | |
init: function G() { | |
var L = d.call(arguments, 0); | |
G.base.apply(this, m.concat(L)); | |
} | |
}); | |
} | |
function r(d, p) { | |
var T = new this(N); | |
m(T, d, p); | |
return y(T); | |
} | |
function D(d, p) { | |
m(this.prototype, d, p); | |
return this; | |
} | |
function y(d) { | |
var m = function() { | |
var d = this.init; | |
d && arguments[0] !== N && d.apply(this, arguments); | |
}; | |
d && (m.prototype = d); | |
m.prototype.constructor = m; | |
m.extend = r; | |
m.bind = p; | |
m.mixin = D; | |
return m; | |
} | |
var N = {}, | |
T = { | |
actions: !0 | |
}; | |
Function.prototype.base = function() {}; | |
ea.Class = { | |
create: y, | |
mixin: m, | |
extend: function(d, m) { | |
var p = y(); | |
p.prototype = new d; | |
return p.extend(m); | |
} | |
}; | |
ea.mixin = function() { | |
ea.log && ea.log.warn("util.mixin is deprecated. Please change your code to use util.Class.mixin()"); | |
m.apply(null, arguments); | |
}; | |
})(); | |
(function() { | |
function d(d, m) { | |
return function() { | |
var p = d.base, | |
L; | |
d.base = m; | |
L = d.apply(this, arguments); | |
d.base = p; | |
return L; | |
}; | |
} | |
function m(m, p, G) { | |
var L, B, F, O; | |
G = G || T; | |
O = !!G.extendAll; | |
for (L in p) B = p.__lookupGetter__(L), F = p.__lookupSetter__(L), B || F ? (B && m.__defineGetter__(L, B), F && m.__defineSetter__(L, F)) : (B = p[L], F = m[L], "function" === typeof B && "function" === typeof F && B !== F ? (B.base !== Ab && (B = d(B, F)), B.base = F) : (O || G[L]) && ea.isObjectLiteral(B) && ea.isObjectLiteral(F) && (B = ea.extendDeep({}, F, B)), m[L] = B); | |
} | |
function p() { | |
var d = Array.prototype.slice, | |
m = d.call(arguments, 1); | |
return this.extend({ | |
init: function L() { | |
var B = d.call(arguments, 0); | |
L.base.apply(this, m.concat(B)); | |
} | |
}); | |
} | |
function r(d, p) { | |
var G = new this(N); | |
m(G, d, p); | |
return y(G); | |
} | |
function D(d, p) { | |
m(this.prototype, d, p); | |
return this; | |
} | |
function y(d) { | |
var m = function() { | |
var d = this.init; | |
d && arguments[0] !== N && d.apply(this, arguments); | |
}; | |
d && (m.prototype = d); | |
m.prototype.constructor = m; | |
m.extend = r; | |
m.bind = p; | |
m.mixin = D; | |
return m; | |
} | |
var N = {}, | |
T = { | |
actions: !0 | |
}, | |
Ab = function() {}; | |
Function.prototype.base = Ab; | |
ea.Class = { | |
create: y, | |
mixin: m, | |
extend: function(d, m) { | |
var p = y(); | |
p.prototype = new d; | |
return p.extend(m); | |
} | |
}; | |
ea.mixin = function() { | |
ea.log && ea.log.warn("util.mixin is deprecated. Please change your code to use util.Class.mixin()"); | |
m.apply(null, arguments); | |
}; | |
})(); | |
var ue; | |
(function() { | |
function d(d) { | |
return d == Ka ? 1 : d + 1; | |
} | |
function m(m) { | |
if (0 === Object.keys(m._waiters).length) return 0; | |
for (var p = d(m._nextWaiter); !m._waiters[p];) p = d(p); | |
return p; | |
} | |
ue = ea.Class.create({ | |
init: function() { | |
Object.defineProperties(this, { | |
_queue: { | |
value: [], | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_waiters: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_nextWaiter: { | |
value: 0, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_lastWaiter: { | |
value: 0, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
cancel: function(d) { | |
if (this._waiters[d]) { | |
var p = this._waiters[d]; | |
delete this._waiters[d]; | |
d == this._nextWaiter && (this._nextWaiter = m(this)); | |
p.call(this, na); | |
} | |
}, | |
cancelAll: function() { | |
for (; 0 !== this._nextWaiter;) this.cancel(this._nextWaiter); | |
}, | |
poll: function(p, D) { | |
var y = this, | |
N = d(this._lastWaiter); | |
this._lastWaiter = N; | |
r(D, function() { | |
if (0 < this._queue.length) { | |
var d = this._queue.shift(); | |
setTimeout(function() { | |
D.result(d); | |
}, 0); | |
} else { | |
var T; - 1 != p && (T = setTimeout(function() { | |
delete y._waiters[N]; | |
N == y._nextWaiter && (y._nextWaiter = m(y)); | |
D.timeout(); | |
}, p)); | |
this._waiters[N] = function(d) { | |
clearTimeout(T); | |
setTimeout(function() { | |
D.result(d); | |
}, 0); | |
}; | |
this._nextWaiter || (this._nextWaiter = N); | |
} | |
}, y); | |
return N; | |
}, | |
add: function(d) { | |
if (this._nextWaiter) { | |
var p = this._waiters[this._nextWaiter]; | |
delete this._waiters[this._nextWaiter]; | |
this._nextWaiter = m(this); | |
p.call(this, d); | |
} else this._queue.push(d); | |
} | |
}); | |
})(); | |
var lh; | |
(function() { | |
var d = 0 - Ka; | |
lh = ea.Class.create({ | |
nextBoolean: function() { | |
var d = new Uint8Array(1); | |
Tc.getRandomValues(d); | |
return d[0] & 1 ? !0 : !1; | |
}, | |
nextInt: function(d) { | |
if (null !== d && d !== na) { | |
if ("number" !== typeof d) throw new TypeError("n must be of type number"); | |
if (1 > d) throw new RangeError("n must be greater than zero"); | |
--d; | |
var m = new Uint8Array(4); | |
Tc.getRandomValues(m); | |
return Math.floor(((m[3] & 127) << 24 | m[2] << 16 | m[1] << 8 | m[0]) / 2147483648 * (d - 0 + 1) + 0); | |
} | |
d = new Uint8Array(4); | |
Tc.getRandomValues(d); | |
m = (d[3] & 127) << 24 | d[2] << 16 | d[1] << 8 | d[0]; | |
return d[3] & 128 ? -m : m; | |
}, | |
nextLong: function() { | |
for (var m = d; m == d;) { | |
m = new Uint8Array(7); | |
Tc.getRandomValues(m); | |
var p = 16777216 * ((m[6] & 31) << 24 | m[5] << 16 | m[4] << 8 | m[3]) + (m[2] << 16 | m[1] << 8 | m[0]), | |
m = m[6] & 128 ? -p - 1 : p; | |
} | |
return m; | |
}, | |
nextBytes: function(d) { | |
Tc.getRandomValues(d); | |
} | |
}); | |
})(); | |
var ef; | |
(function() { | |
function d(d) { | |
return d == Ka ? 1 : d + 1; | |
} | |
function m(m) { | |
if (0 === Object.keys(m._waitingReaders).length) return 0; | |
for (var p = d(m._nextReader); !m._waitingReaders[p];) p = d(p); | |
return p; | |
} | |
function p(m) { | |
if (0 === Object.keys(m._waitingWriters).length) return 0; | |
for (var p = d(m._nextWriter); !m._waitingWriters[p];) p = d(p); | |
return p; | |
} | |
ef = ea.Class.create({ | |
init: function() { | |
Object.defineProperties(this, { | |
_readers: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_waitingReaders: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_writer: { | |
value: null, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_waitingWriters: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_nextReader: { | |
value: 0, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_nextWriter: { | |
value: 0, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_lastNumber: { | |
value: 0, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
cancel: function(d) { | |
if (this._waitingReaders[d]) { | |
var r = this._waitingReaders[d]; | |
delete this._waitingReaders[d]; | |
d == this._nextReader && (this._nextReader = m(this)); | |
r.call(this, !0); | |
} | |
this._waitingWriters[d] && (r = this._waitingWriters[d], delete this._waitingWriters[d], d == this._nextWriter && (this._nextWriter = p(this)), r.call(this, !0)); | |
}, | |
cancelAll: function() { | |
for (; 0 !== this._nextWriter;) this.cancel(this._nextWriter); | |
for (; 0 !== this._nextReader;) this.cancel(this._nextReader); | |
}, | |
readLock: function(p, D) { | |
var y = this, | |
N = d(this._lastNumber); | |
this._lastNumber = N; | |
r(D, function() { | |
if (!this._writer && 0 === Object.keys(this._waitingWriters).length) return this._readers[N] = !0, N; | |
var d; - 1 != p && (d = setTimeout(function() { | |
delete y._waitingReaders[N]; | |
N == y._nextReader && (y._nextReader = m(y)); | |
D.timeout(); | |
}, p)); | |
this._waitingReaders[N] = function(m) { | |
clearTimeout(d); | |
m ? setTimeout(function() { | |
D.result(na); | |
}, 0) : (y._readers[N] = !0, setTimeout(function() { | |
D.result(N); | |
}, 0)); | |
}; | |
this._nextReader || (this._nextReader = N); | |
}, y); | |
return N; | |
}, | |
writeLock: function(m, D) { | |
var y = this, | |
N = d(this._lastNumber); | |
this._lastNumber = N; | |
r(D, function() { | |
if (0 === Object.keys(this._readers).length && 0 === Object.keys(this._waitingReaders).length && !this._writer) return this._writer = N; | |
var d; - 1 != m && (d = setTimeout(function() { | |
delete y._waitingWriters[N]; | |
N == y._nextWriter && (y._nextWriter = p(y)); | |
D.timeout(); | |
}, m)); | |
this._waitingWriters[N] = function(m) { | |
clearTimeout(d); | |
m ? setTimeout(function() { | |
D.result(na); | |
}, 0) : (y._writer = N, setTimeout(function() { | |
D.result(N); | |
}, 0)); | |
}; | |
this._nextWriter || (this._nextWriter = N); | |
}, y); | |
return N; | |
}, | |
unlock: function(m) { | |
if (m == this._writer) this._writer = null; | |
else { | |
if (!this._readers[m]) throw new ca("There is no reader or writer with ticket number " + m + "."); | |
delete this._readers[m]; | |
} | |
if (this._nextWriter) 0 < Object.keys(this._readers).length || (m = this._waitingWriters[this._nextWriter], delete this._waitingWriters[this._nextWriter], this._nextWriter = p(this), m.call(this, !1)); | |
else { | |
for (var r = this._nextReader; 0 < Object.keys(this._waitingReaders).length; r = d(r)) this._waitingReaders[r] && (m = this._waitingReaders[r], delete this._waitingReaders[r], m.call(this, !1)); | |
this._nextReader = 0; | |
} | |
} | |
}); | |
})(); | |
ea.Class.mixin(d, { | |
JSON_PARSE_ERROR: new d(0, p.FAIL, "Error parsing JSON."), | |
JSON_ENCODE_ERROR: new d(1, p.FAIL, "Error encoding JSON."), | |
ENVELOPE_HASH_MISMATCH: new d(2, p.FAIL, "Computed hash does not match envelope hash."), | |
INVALID_PUBLIC_KEY: new d(3, p.FAIL, "Invalid public key provided."), | |
INVALID_PRIVATE_KEY: new d(4, p.FAIL, "Invalid private key provided."), | |
PLAINTEXT_ILLEGAL_BLOCK_SIZE: new d(5, p.FAIL, "Plaintext is not a multiple of the block size."), | |
PLAINTEXT_BAD_PADDING: new d(6, p.FAIL, "Plaintext contains incorrect padding."), | |
CIPHERTEXT_ILLEGAL_BLOCK_SIZE: new d(7, p.FAIL, "Ciphertext is not a multiple of the block size."), | |
CIPHERTEXT_BAD_PADDING: new d(8, p.FAIL, "Ciphertext contains incorrect padding."), | |
ENCRYPT_NOT_SUPPORTED: new d(9, p.FAIL, "Encryption not supported."), | |
DECRYPT_NOT_SUPPORTED: new d(10, p.FAIL, "Decryption not supported."), | |
ENVELOPE_KEY_ID_MISMATCH: new d(11, p.FAIL, "Encryption envelope key ID does not match crypto context key ID."), | |
CIPHERTEXT_ENVELOPE_PARSE_ERROR: new d(12, p.FAIL, "Error parsing ciphertext envelope."), | |
CIPHERTEXT_ENVELOPE_ENCODE_ERROR: new d(13, p.FAIL, "Error encoding ciphertext envelope."), | |
SIGN_NOT_SUPPORTED: new d(14, p.FAIL, "Sign not supported."), | |
VERIFY_NOT_SUPPORTED: new d(15, p.FAIL, "Verify not suppoprted."), | |
SIGNATURE_ERROR: new d(16, p.FAIL, "Signature not initialized or unable to process data/signature."), | |
HMAC_ERROR: new d(17, p.FAIL, "Error computing HMAC."), | |
ENCRYPT_ERROR: new d(18, p.FAIL, "Error encrypting plaintext."), | |
DECRYPT_ERROR: new d(19, p.FAIL, "Error decrypting ciphertext."), | |
INSUFFICIENT_CIPHERTEXT: new d(20, p.FAIL, "Insufficient ciphertext for decryption."), | |
SESSION_KEY_CREATION_FAILURE: new d(21, p.FAIL, "Error when creating session keys."), | |
ASN1_PARSE_ERROR: new d(22, p.FAIL, "Error parsing ASN.1."), | |
ASN1_ENCODE_ERROR: new d(23, p.FAIL, "Error encoding ASN.1."), | |
INVALID_SYMMETRIC_KEY: new d(24, p.FAIL, "Invalid symmetric key provided."), | |
INVALID_ENCRYPTION_KEY: new d(25, p.FAIL, "Invalid encryption key."), | |
INVALID_HMAC_KEY: new d(26, p.FAIL, "Invalid HMAC key."), | |
WRAP_NOT_SUPPORTED: new d(27, p.FAIL, "Wrap not supported."), | |
UNWRAP_NOT_SUPPORTED: new d(28, p.FAIL, "Unwrap not supported."), | |
UNIDENTIFIED_JWK_TYPE: new d(29, p.FAIL, "Unidentified JSON web key type."), | |
UNIDENTIFIED_JWK_USAGE: new d(30, p.FAIL, "Unidentified JSON web key usage."), | |
UNIDENTIFIED_JWK_ALGORITHM: new d(31, p.FAIL, "Unidentified JSON web key algorithm."), | |
WRAP_ERROR: new d(32, p.FAIL, "Error wrapping plaintext."), | |
UNWRAP_ERROR: new d(33, p.FAIL, "Error unwrapping ciphertext."), | |
INVALID_JWK: new d(34, p.FAIL, "Invalid JSON web key."), | |
INVALID_JWK_KEYDATA: new d(35, p.FAIL, "Invalid JSON web key keydata."), | |
UNSUPPORTED_JWK_ALGORITHM: new d(36, p.FAIL, "Unsupported JSON web key algorithm."), | |
WRAP_KEY_CREATION_FAILURE: new d(37, p.FAIL, "Error when creating wrapping key."), | |
INVALID_WRAP_CIPHERTEXT: new d(38, p.FAIL, "Invalid wrap ciphertext."), | |
UNSUPPORTED_JWE_ALGORITHM: new d(39, p.FAIL, "Unsupported JSON web encryption algorithm."), | |
JWE_ENCODE_ERROR: new d(40, p.FAIL, "Error encoding JSON web encryption header."), | |
JWE_PARSE_ERROR: new d(41, p.FAIL, "Error parsing JSON web encryption header."), | |
INVALID_ALGORITHM_PARAMS: new d(42, p.FAIL, "Invalid algorithm parameters."), | |
JWE_ALGORITHM_MISMATCH: new d(43, p.FAIL, "JSON web encryption header algorithms mismatch."), | |
KEY_IMPORT_ERROR: new d(44, p.FAIL, "Error importing key."), | |
KEY_EXPORT_ERROR: new d(45, p.FAIL, "Error exporting key."), | |
DIGEST_ERROR: new d(46, p.FAIL, "Error in digest."), | |
UNSUPPORTED_KEY: new d(47, p.FAIL, "Unsupported key type or algorithm."), | |
UNSUPPORTED_JWE_SERIALIZATION: new d(48, p.FAIL, "Unsupported JSON web encryption serialization."), | |
XML_PARSE_ERROR: new d(49, p.FAIL, "Error parsing XML."), | |
XML_ENCODE_ERROR: new d(50, p.FAIL, "Error encoding XML."), | |
INVALID_WRAPPING_KEY: new d(51, p.FAIL, "Invalid wrapping key."), | |
UNIDENTIFIED_CIPHERTEXT_ENVELOPE: new d(52, p.FAIL, "Unidentified ciphertext envelope version."), | |
UNIDENTIFIED_SIGNATURE_ENVELOPE: new d(53, p.FAIL, "Unidentified signature envelope version."), | |
UNSUPPORTED_CIPHERTEXT_ENVELOPE: new d(54, p.FAIL, "Unsupported ciphertext envelope version."), | |
UNSUPPORTED_SIGNATURE_ENVELOPE: new d(55, p.FAIL, "Unsupported signature envelope version."), | |
UNIDENTIFIED_CIPHERSPEC: new d(56, p.FAIL, "Unidentified cipher specification."), | |
UNIDENTIFIED_ALGORITHM: new d(57, p.FAIL, "Unidentified algorithm."), | |
SIGNATURE_ENVELOPE_PARSE_ERROR: new d(58, p.FAIL, "Error parsing signature envelope."), | |
SIGNATURE_ENVELOPE_ENCODE_ERROR: new d(59, p.FAIL, "Error encoding signature envelope."), | |
INVALID_SIGNATURE: new d(60, p.FAIL, "Invalid signature."), | |
WRAPKEY_FINGERPRINT_NOTSUPPORTED: new d(61, p.FAIL, "Wrap key fingerprint not supported"), | |
UNIDENTIFIED_JWK_KEYOP: new d(62, p.FAIL, "Unidentified JSON web key key operation."), | |
MASTERTOKEN_UNTRUSTED: new d(1E3, p.ENTITY_REAUTH, "Master token is not trusted."), | |
MASTERTOKEN_KEY_CREATION_ERROR: new d(1001, p.ENTITY_REAUTH, "Unable to construct symmetric keys from master token."), | |
MASTERTOKEN_EXPIRES_BEFORE_RENEWAL: new d(1002, p.ENTITY_REAUTH, "Master token expiration timestamp is before the renewal window opens."), | |
MASTERTOKEN_SESSIONDATA_MISSING: new d(1003, p.ENTITY_REAUTH, "No master token session data found."), | |
MASTERTOKEN_SEQUENCE_NUMBER_OUT_OF_RANGE: new d(1004, p.ENTITY_REAUTH, "Master token sequence number is out of range."), | |
MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new d(1005, p.ENTITY_REAUTH, "Master token serial number is out of range."), | |
MASTERTOKEN_TOKENDATA_INVALID: new d(1006, p.ENTITY_REAUTH, "Invalid master token data."), | |
MASTERTOKEN_SIGNATURE_INVALID: new d(1007, p.ENTITY_REAUTH, "Invalid master token signature."), | |
MASTERTOKEN_SESSIONDATA_INVALID: new d(1008, p.ENTITY_REAUTH, "Invalid master token session data."), | |
MASTERTOKEN_SEQUENCE_NUMBER_OUT_OF_SYNC: new d(1009, p.ENTITY_REAUTH, "Master token sequence number does not have the expected value."), | |
MASTERTOKEN_TOKENDATA_MISSING: new d(1010, p.ENTITY_REAUTH, "No master token data found."), | |
MASTERTOKEN_TOKENDATA_PARSE_ERROR: new d(1011, p.ENTITY_REAUTH, "Error parsing master token data."), | |
MASTERTOKEN_SESSIONDATA_PARSE_ERROR: new d(1012, p.ENTITY_REAUTH, "Error parsing master token session data."), | |
MASTERTOKEN_IDENTITY_REVOKED: new d(1013, p.ENTITY_REAUTH, "Master token entity identity is revoked."), | |
MASTERTOKEN_REJECTED_BY_APP: new d(1014, p.ENTITY_REAUTH, "Master token is rejected by the application."), | |
USERIDTOKEN_MASTERTOKEN_MISMATCH: new d(2E3, p.USER_REAUTH, "User ID token master token serial number does not match master token serial number."), | |
USERIDTOKEN_NOT_DECRYPTED: new d(2001, p.USER_REAUTH, "User ID token is not decrypted or verified."), | |
USERIDTOKEN_MASTERTOKEN_NULL: new d(2002, p.USER_REAUTH, "User ID token requires a master token."), | |
USERIDTOKEN_EXPIRES_BEFORE_RENEWAL: new d(2003, p.USER_REAUTH, "User ID token expiration timestamp is before the renewal window opens."), | |
USERIDTOKEN_USERDATA_MISSING: new d(2004, p.USER_REAUTH, "No user ID token user data found."), | |
USERIDTOKEN_MASTERTOKEN_NOT_FOUND: new d(2005, p.USER_REAUTH, "User ID token is bound to an unknown master token."), | |
USERIDTOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new d(2006, p.USER_REAUTH, "User ID token master token serial number is out of range."), | |
USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new d(2007, p.USER_REAUTH, "User ID token serial number is out of range."), | |
USERIDTOKEN_TOKENDATA_INVALID: new d(2008, p.USER_REAUTH, "Invalid user ID token data."), | |
USERIDTOKEN_SIGNATURE_INVALID: new d(2009, p.USER_REAUTH, "Invalid user ID token signature."), | |
USERIDTOKEN_USERDATA_INVALID: new d(2010, p.USER_REAUTH, "Invalid user ID token user data."), | |
USERIDTOKEN_IDENTITY_INVALID: new d(2011, p.USER_REAUTH, "Invalid user ID token user identity."), | |
RESERVED_2012: new d(2012, p.USER_REAUTH, "The entity is not associated with the user."), | |
USERIDTOKEN_IDENTITY_NOT_FOUND: new d(2013, p.USER_REAUTH, "The user identity was not found."), | |
USERIDTOKEN_PASSWORD_VERSION_CHANGED: new d(2014, p.USER_REAUTH, "The user identity must be reauthenticated because the password version changed."), | |
USERIDTOKEN_USERAUTH_DATA_MISMATCH: new d(2015, p.USER_REAUTH, "The user ID token and user authentication data user identities do not match."), | |
USERIDTOKEN_TOKENDATA_MISSING: new d(2016, p.USER_REAUTH, "No user ID token data found."), | |
USERIDTOKEN_TOKENDATA_PARSE_ERROR: new d(2017, p.USER_REAUTH, "Error parsing user ID token data."), | |
USERIDTOKEN_USERDATA_PARSE_ERROR: new d(2018, p.USER_REAUTH, "Error parsing user ID token user data."), | |
USERIDTOKEN_REVOKED: new d(2019, p.USER_REAUTH, "User ID token is revoked."), | |
USERIDTOKEN_REJECTED_BY_APP: new d(2020, p.USER_REAUTH, "User ID token is rejected by the application."), | |
SERVICETOKEN_MASTERTOKEN_MISMATCH: new d(3E3, p.FAIL, "Service token master token serial number does not match master token serial number."), | |
SERVICETOKEN_USERIDTOKEN_MISMATCH: new d(3001, p.FAIL, "Service token user ID token serial number does not match user ID token serial number."), | |
SERVICETOKEN_SERVICEDATA_INVALID: new d(3002, p.FAIL, "Service token data invalid."), | |
SERVICETOKEN_MASTERTOKEN_NOT_FOUND: new d(3003, p.FAIL, "Service token is bound to an unknown master token."), | |
SERVICETOKEN_USERIDTOKEN_NOT_FOUND: new d(3004, p.FAIL, "Service token is bound to an unknown user ID token."), | |
SERVICETOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new d(3005, p.FAIL, "Service token master token serial number is out of range."), | |
SERVICETOKEN_USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new d(3006, p.FAIL, "Service token user ID token serial number is out of range."), | |
SERVICETOKEN_TOKENDATA_INVALID: new d(3007, p.FAIL, "Invalid service token data."), | |
SERVICETOKEN_SIGNATURE_INVALID: new d(3008, p.FAIL, "Invalid service token signature."), | |
SERVICETOKEN_TOKENDATA_MISSING: new d(3009, p.FAIL, "No service token data found."), | |
UNIDENTIFIED_ENTITYAUTH_SCHEME: new d(4E3, p.FAIL, "Unable to identify entity authentication scheme."), | |
ENTITYAUTH_FACTORY_NOT_FOUND: new d(4001, p.FAIL, "No factory registered for entity authentication scheme."), | |
X509CERT_PARSE_ERROR: new d(4002, p.ENTITYDATA_REAUTH, "Error parsing X.509 certificate data."), | |
X509CERT_ENCODE_ERROR: new d(4003, p.ENTITYDATA_REAUTH, "Error encoding X.509 certificate data."), | |
X509CERT_VERIFICATION_FAILED: new d(4004, p.ENTITYDATA_REAUTH, "X.509 certificate verification failed."), | |
ENTITY_NOT_FOUND: new d(4005, p.FAIL, "Entity not recognized."), | |
INCORRECT_ENTITYAUTH_DATA: new d(4006, p.FAIL, "Entity used incorrect entity authentication data type."), | |
RSA_PUBLICKEY_NOT_FOUND: new d(4007, p.ENTITYDATA_REAUTH, "RSA public key not found."), | |
NPTICKET_GRACE_PERIOD_EXCEEDED: new d(4008, p.ENTITYDATA_REAUTH, "Fake NP-Tickets cannot be used after the grace period when the Playstation Network is up."), | |
NPTICKET_SERVICE_ID_MISSING: new d(4009, p.ENTITYDATA_REAUTH, "NP-Ticket service ID is missing."), | |
NPTICKET_SERVICE_ID_DISALLOWED: new d(4010, p.ENTITYDATA_REAUTH, "NP-Ticket service ID is not allowed."), | |
NPTICKET_NOT_YET_VALID: new d(4011, p.ENTITYDATA_REAUTH, "NP-Ticket issuance date is in the future."), | |
NPTICKET_EXPIRED: new d(4012, p.ENTITYDATA_REAUTH, "NP-Ticket has expired."), | |
NPTICKET_PRIVATE_KEY_NOT_FOUND: new d(4013, p.ENTITYDATA_REAUTH, "No private key found for NP-Ticket GUID."), | |
NPTICKET_COOKIE_VERIFICATION_FAILED: new d(4014, p.ENTITYDATA_REAUTH, "NP-Ticket cookie signature verification failed."), | |
NPTICKET_INCORRECT_COOKIE_VERSION: new d(4015, p.ENTITYDATA_REAUTH, "Incorrect NP-Ticket cookie version."), | |
NPTICKET_BROKEN: new d(4016, p.ENTITYDATA_REAUTH, "NP-Ticket broken."), | |
NPTICKET_VERIFICATION_FAILED: new d(4017, p.ENTITYDATA_REAUTH, "NP-Ticket signature verification failed."), | |
NPTICKET_ERROR: new d(4018, p.ENTITYDATA_REAUTH, "Unknown NP-Ticket TCM error."), | |
NPTICKET_CIPHER_INFO_NOT_FOUND: new d(4019, p.ENTITYDATA_REAUTH, "No cipher information found for NP-Ticket."), | |
NPTICKET_INVALID_CIPHER_INFO: new d(4020, p.ENTITYDATA_REAUTH, "Cipher information for NP-Ticket is invalid."), | |
NPTICKET_UNSUPPORTED_VERSION: new d(4021, p.ENTITYDATA_REAUTH, "Unsupported NP-Ticket version."), | |
NPTICKET_INCORRECT_KEY_LENGTH: new d(4022, p.ENTITYDATA_REAUTH, "Incorrect NP-Ticket public key length."), | |
UNSUPPORTED_ENTITYAUTH_DATA: new d(4023, p.FAIL, "Unsupported entity authentication data."), | |
CRYPTEX_RSA_KEY_SET_NOT_FOUND: new d(4024, p.FAIL, "Cryptex RSA key set not found."), | |
ENTITY_REVOKED: new d(4025, p.FAIL, "Entity is revoked."), | |
ENTITY_REJECTED_BY_APP: new d(4026, p.ENTITYDATA_REAUTH, "Entity is rejected by the application."), | |
FORCE_LOGIN: new d(5E3, p.USERDATA_REAUTH, "User must login again."), | |
NETFLIXID_COOKIES_EXPIRED: new d(5001, p.USERDATA_REAUTH, "Netflix ID cookie identity has expired."), | |
NETFLIXID_COOKIES_BLANK: new d(5002, p.USERDATA_REAUTH, "Netflix ID or Secure Netflix ID cookie is blank."), | |
UNIDENTIFIED_USERAUTH_SCHEME: new d(5003, p.FAIL, "Unable to identify user authentication scheme."), | |
USERAUTH_FACTORY_NOT_FOUND: new d(5004, p.FAIL, "No factory registered for user authentication scheme."), | |
EMAILPASSWORD_BLANK: new d(5005, p.USERDATA_REAUTH, "Email or password is blank."), | |
AUTHMGR_COMMS_FAILURE: new d(5006, p.TRANSIENT_FAILURE, "Error communicating with authentication manager."), | |
EMAILPASSWORD_INCORRECT: new d(5007, p.USERDATA_REAUTH, "Email or password is incorrect."), | |
UNSUPPORTED_USERAUTH_DATA: new d(5008, p.FAIL, "Unsupported user authentication data."), | |
SSOTOKEN_BLANK: new d(5009, p.SSOTOKEN_REJECTED, "SSO token is blank."), | |
SSOTOKEN_NOT_ASSOCIATED: new d(5010, p.USERDATA_REAUTH, "SSO token is not associated with a Netflix user."), | |
USERAUTH_USERIDTOKEN_INVALID: new d(5011, p.USERDATA_REAUTH, "User authentication data user ID token is invalid."), | |
PROFILEID_BLANK: new d(5012, p.USERDATA_REAUTH, "Profile ID is blank."), | |
UNIDENTIFIED_USERAUTH_MECHANISM: new d(5013, p.FAIL, "Unable to identify user authentication mechanism."), | |
UNSUPPORTED_USERAUTH_MECHANISM: new d(5014, p.FAIL, "Unsupported user authentication mechanism."), | |
SSOTOKEN_INVALID: new d(5015, p.SSOTOKEN_REJECTED, "SSO token invalid."), | |
USERAUTH_MASTERTOKEN_MISSING: new d(5016, p.USERDATA_REAUTH, "User authentication required master token is missing."), | |
ACCTMGR_COMMS_FAILURE: new d(5017, p.TRANSIENT_FAILURE, "Error communicating with the account manager."), | |
SSO_ASSOCIATION_FAILURE: new d(5018, p.TRANSIENT_FAILURE, "SSO user association failed."), | |
SSO_DISASSOCIATION_FAILURE: new d(5019, p.TRANSIENT_FAILURE, "SSO user disassociation failed."), | |
MDX_USERAUTH_VERIFICATION_FAILED: new d(5020, p.USERDATA_REAUTH, "MDX user authentication data verification failed."), | |
USERAUTH_USERIDTOKEN_NOT_DECRYPTED: new d(5021, p.USERDATA_REAUTH, "User authentication data user ID token is not decrypted or verified."), | |
MDX_USERAUTH_ACTION_INVALID: new d(5022, p.USERDATA_REAUTH, "MDX user authentication data action is invalid."), | |
CTICKET_DECRYPT_ERROR: new d(5023, p.USERDATA_REAUTH, "CTicket decryption failed."), | |
USERAUTH_MASTERTOKEN_INVALID: new d(5024, p.USERDATA_REAUTH, "User authentication data master token is invalid."), | |
USERAUTH_MASTERTOKEN_NOT_DECRYPTED: new d(5025, p.USERDATA_REAUTH, "User authentication data master token is not decrypted or verified."), | |
CTICKET_CRYPTOCONTEXT_ERROR: new d(5026, p.USERDATA_REAUTH, "Error creating CTicket crypto context."), | |
MDX_PIN_BLANK: new d(5027, p.USERDATA_REAUTH, "MDX controller or target PIN is blank."), | |
MDX_PIN_MISMATCH: new d(5028, p.USERDATA_REAUTH, "MDX controller and target PIN mismatch."), | |
MDX_USER_UNKNOWN: new d(5029, p.USERDATA_REAUTH, "MDX controller user ID token or CTicket is not decrypted or verified."), | |
USERAUTH_USERIDTOKEN_MISSING: new d(5030, p.USERDATA_REAUTH, "User authentication required user ID token is missing."), | |
MDX_CONTROLLERDATA_INVALID: new d(5031, p.USERDATA_REAUTH, "MDX controller authentication data is invalid."), | |
USERAUTH_ENTITY_MISMATCH: new d(5032, p.USERDATA_REAUTH, "User authentication data does not match entity identity."), | |
USERAUTH_INCORRECT_DATA: new d(5033, p.FAIL, "Entity used incorrect key request data type"), | |
SSO_ASSOCIATION_WITH_NONMEMBER: new d(5034, p.USERDATA_REAUTH, "SSO user association failed because the customer is not a member."), | |
SSO_ASSOCIATION_WITH_FORMERMEMBER: new d(5035, p.USERDATA_REAUTH, "SSO user association failed because the customer is a former member."), | |
SSO_ASSOCIATION_CONFLICT: new d(5036, p.USERDATA_REAUTH, "SSO user association failed because the token identifies a different member."), | |
USER_REJECTED_BY_APP: new d(5037, p.USERDATA_REAUTH, "User is rejected by the application."), | |
PROFILE_SWITCH_DISALLOWED: new d(5038, p.TRANSIENT_FAILURE, "Unable to switch user profile."), | |
MEMBERSHIPCLIENT_COMMS_FAILURE: new d(5039, p.TRANSIENT_FAILURE, "Error communicating with the membership manager."), | |
USERIDTOKEN_IDENTITY_NOT_ASSOCIATED_WITH_ENTITY: new d(5040, p.USER_REAUTH, "The entity is not associated with the user."), | |
UNSUPPORTED_COMPRESSION: new d(6E3, p.FAIL, "Unsupported compression algorithm."), | |
COMPRESSION_ERROR: new d(6001, p.FAIL, "Error compressing data."), | |
UNCOMPRESSION_ERROR: new d(6002, p.FAIL, "Error uncompressing data."), | |
MESSAGE_ENTITY_NOT_FOUND: new d(6003, p.FAIL, "Message header entity authentication data or master token not found."), | |
PAYLOAD_MESSAGE_ID_MISMATCH: new d(6004, p.FAIL, "Payload chunk message ID does not match header message ID ."), | |
PAYLOAD_SEQUENCE_NUMBER_MISMATCH: new d(6005, p.FAIL, "Payload chunk sequence number does not match expected sequence number."), | |
PAYLOAD_VERIFICATION_FAILED: new d(6006, p.FAIL, "Payload chunk payload signature verification failed."), | |
MESSAGE_DATA_MISSING: new d(6007, p.FAIL, "No message data found."), | |
MESSAGE_FORMAT_ERROR: new d(6008, p.FAIL, "Malformed message data."), | |
MESSAGE_VERIFICATION_FAILED: new d(6009, p.FAIL, "Message header/error data signature verification failed."), | |
HEADER_DATA_MISSING: new d(6010, p.FAIL, "No header data found."), | |
PAYLOAD_DATA_MISSING: new d(6011, p.FAIL, "No payload data found in non-EOM payload chunk."), | |
PAYLOAD_DATA_CORRUPT: new d(6012, p.FAIL, "Corrupt payload data found in non-EOM payload chunk."), | |
UNIDENTIFIED_COMPRESSION: new d(6013, p.FAIL, "Unidentified compression algorithm."), | |
MESSAGE_EXPIRED: new d(6014, p.EXPIRED, "Message expired and not renewable. Rejected."), | |
MESSAGE_ID_OUT_OF_RANGE: new d(6015, p.FAIL, "Message ID is out of range."), | |
INTERNAL_CODE_NEGATIVE: new d(6016, p.FAIL, "Error header internal code is negative."), | |
UNEXPECTED_RESPONSE_MESSAGE_ID: new d(6017, p.FAIL, "Unexpected response message ID. Possible replay."), | |
RESPONSE_REQUIRES_ENCRYPTION: new d(6018, p.KEYX_REQUIRED, "Message response requires encryption."), | |
PAYLOAD_SEQUENCE_NUMBER_OUT_OF_RANGE: new d(6019, p.FAIL, "Payload chunk sequence number is out of range."), | |
PAYLOAD_MESSAGE_ID_OUT_OF_RANGE: new d(6020, p.FAIL, "Payload chunk message ID is out of range."), | |
MESSAGE_REPLAYED: new d(6021, p.REPLAYED, "Non-replayable message replayed."), | |
INCOMPLETE_NONREPLAYABLE_MESSAGE: new d(6022, p.FAIL, "Non-replayable message sent non-renewable or without key request data or without a master token."), | |
HEADER_SIGNATURE_INVALID: new d(6023, p.FAIL, "Invalid Header signature."), | |
HEADER_DATA_INVALID: new d(6024, p.FAIL, "Invalid header data."), | |
PAYLOAD_INVALID: new d(6025, p.FAIL, "Invalid payload."), | |
PAYLOAD_SIGNATURE_INVALID: new d(6026, p.FAIL, "Invalid payload signature."), | |
RESPONSE_REQUIRES_MASTERTOKEN: new d(6027, p.KEYX_REQUIRED, "Message response requires a master token."), | |
RESPONSE_REQUIRES_USERIDTOKEN: new d(6028, p.USER_REAUTH, "Message response requires a user ID token."), | |
REQUEST_REQUIRES_USERAUTHDATA: new d(6029, p.FAIL, "User-associated message requires user authentication data."), | |
UNEXPECTED_MESSAGE_SENDER: new d(6030, p.FAIL, "Message sender is equal to the local entity or not the master token entity."), | |
NONREPLAYABLE_MESSAGE_REQUIRES_MASTERTOKEN: new d(6031, p.FAIL, "Non-replayable message requires a master token."), | |
NONREPLAYABLE_ID_OUT_OF_RANGE: new d(6032, p.FAIL, "Non-replayable message non-replayable ID is out of range."), | |
MESSAGE_SERVICETOKEN_MISMATCH: new d(6033, p.FAIL, "Service token master token or user ID token serial number does not match the message token serial numbers."), | |
MESSAGE_PEER_SERVICETOKEN_MISMATCH: new d(6034, p.FAIL, "Peer service token master token or user ID token serial number does not match the message peer token serial numbers."), | |
RESPONSE_REQUIRES_INTEGRITY_PROTECTION: new d(6035, p.KEYX_REQUIRED, "Message response requires integrity protection."), | |
HANDSHAKE_DATA_MISSING: new d(6036, p.FAIL, "Handshake message is not renewable or does not contain key request data."), | |
MESSAGE_RECIPIENT_MISMATCH: new d(6037, p.FAIL, "Message recipient does not match local identity."), | |
UNIDENTIFIED_KEYX_SCHEME: new d(7E3, p.FAIL, "Unable to identify key exchange scheme."), | |
KEYX_FACTORY_NOT_FOUND: new d(7001, p.FAIL, "No factory registered for key exchange scheme."), | |
KEYX_REQUEST_NOT_FOUND: new d(7002, p.FAIL, "No key request found matching header key response data."), | |
UNIDENTIFIED_KEYX_KEY_ID: new d(7003, p.FAIL, "Unable to identify key exchange key ID."), | |
UNSUPPORTED_KEYX_KEY_ID: new d(7004, p.FAIL, "Unsupported key exchange key ID."), | |
UNIDENTIFIED_KEYX_MECHANISM: new d(7005, p.FAIL, "Unable to identify key exchange mechanism."), | |
UNSUPPORTED_KEYX_MECHANISM: new d(7006, p.FAIL, "Unsupported key exchange mechanism."), | |
KEYX_RESPONSE_REQUEST_MISMATCH: new d(7007, p.FAIL, "Key exchange response does not match request."), | |
KEYX_PRIVATE_KEY_MISSING: new d(7008, p.FAIL, "Key exchange private key missing."), | |
UNKNOWN_KEYX_PARAMETERS_ID: new d(7009, p.FAIL, "Key exchange parameters ID unknown or invalid."), | |
KEYX_MASTER_TOKEN_MISSING: new d(7010, p.FAIL, "Master token required for key exchange is missing."), | |
KEYX_INVALID_PUBLIC_KEY: new d(7011, p.FAIL, "Key exchange public key is invalid."), | |
KEYX_PUBLIC_KEY_MISSING: new d(7012, p.FAIL, "Key exchange public key missing."), | |
KEYX_WRAPPING_KEY_MISSING: new d(7013, p.FAIL, "Key exchange wrapping key missing."), | |
KEYX_WRAPPING_KEY_ID_MISSING: new d(7014, p.FAIL, "Key exchange wrapping key ID missing."), | |
KEYX_INVALID_WRAPPING_KEY: new d(7015, p.FAIL, "Key exchange wrapping key is invalid."), | |
KEYX_INCORRECT_DATA: new d(7016, p.FAIL, "Entity used incorrect wrapping key data type"), | |
CRYPTEX_ENCRYPTION_ERROR: new d(8E3, p.FAIL, "Error encrypting data with cryptex."), | |
CRYPTEX_DECRYPTION_ERROR: new d(8001, p.FAIL, "Error decrypting data with cryptex."), | |
CRYPTEX_MAC_ERROR: new d(8002, p.FAIL, "Error computing MAC with cryptex."), | |
CRYPTEX_VERIFY_ERROR: new d(8003, p.FAIL, "Error verifying MAC with cryptex."), | |
CRYPTEX_CONTEXT_CREATION_FAILURE: new d(8004, p.FAIL, "Error creating cryptex cipher or MAC context."), | |
DATAMODEL_DEVICE_ACCESS_ERROR: new d(8005, p.TRANSIENT_FAILURE, "Error accessing data model device."), | |
DATAMODEL_DEVICETYPE_NOT_FOUND: new d(8006, p.FAIL, "Data model device type not found."), | |
CRYPTEX_KEYSET_UNSUPPORTED: new d(8007, p.FAIL, "Cryptex key set not supported."), | |
CRYPTEX_PRIVILEGE_EXCEPTION: new d(8008, p.FAIL, "Insufficient privileges for cryptex operation."), | |
CRYPTEX_WRAP_ERROR: new d(8009, p.FAIL, "Error wrapping data with cryptex."), | |
CRYPTEX_UNWRAP_ERROR: new d(8010, p.FAIL, "Error unwrapping data with cryptex."), | |
CRYPTEX_COMMS_FAILURE: new d(8011, p.TRANSIENT_FAILURE, "Error comunicating with cryptex."), | |
CRYPTEX_SIGN_ERROR: new d(8012, p.FAIL, "Error computing signature with cryptex."), | |
INTERNAL_EXCEPTION: new d(9E3, p.TRANSIENT_FAILURE, "Internal exception."), | |
MSL_COMMS_FAILURE: new d(9001, p.FAIL, "Error communicating with MSL entity."), | |
NONE: new d(9999, p.FAIL, "Special unit test error.") | |
}); | |
Object.freeze(d); | |
var D; | |
(function() { | |
D = ea.Class.create(Error()); | |
D.mixin({ | |
init: function(d, m, p) { | |
function r() { | |
return N ? N : this.cause && this.cause instanceof D ? this.cause.messageId : na; | |
} | |
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); | |
var y = d.message; | |
m && (y += " [" + m + "]"); | |
var N, ca = this.stack; | |
Object.defineProperties(this, { | |
message: { | |
value: y, | |
writable: !1, | |
configurable: !0 | |
}, | |
error: { | |
value: d, | |
writable: !1, | |
configurable: !0 | |
}, | |
cause: { | |
value: p, | |
writable: !1, | |
configurable: !0 | |
}, | |
name: { | |
value: "MslException", | |
writable: !1, | |
configurable: !0 | |
}, | |
masterToken: { | |
value: null, | |
writable: !0, | |
configurable: !1 | |
}, | |
entityAuthenticationData: { | |
value: null, | |
writable: !0, | |
configurable: !1 | |
}, | |
userIdToken: { | |
value: null, | |
writable: !0, | |
configurable: !1 | |
}, | |
userAuthenticationData: { | |
value: null, | |
writable: !0, | |
configurable: !1 | |
}, | |
messageId: { | |
get: r, | |
set: function(d) { | |
if (0 > d || d > Ka) throw new RangeError("Message ID " + d + " is outside the valid range."); | |
r() || (N = d); | |
}, | |
configurable: !0 | |
}, | |
stack: { | |
get: function() { | |
var d = this.toString(); | |
ca && (d += "\n" + ca); | |
p && p.stack && (d += "\nCaused by " + p.stack); | |
return d; | |
}, | |
configurable: !0 | |
} | |
}); | |
}, | |
setEntity: function(d) { | |
!d || this.masterToken || this.entityAuthenticationData || (d instanceof nc ? this.masterToken = d : d instanceof md && (this.entityAuthenticationData = d)); | |
return this; | |
}, | |
setUser: function(d) { | |
!d || this.userIdToken || this.userAuthenticationData || (d instanceof Vd ? this.userIdToken = d : d instanceof Uc && (this.userAuthenticationData = d)); | |
return this; | |
}, | |
setMessageId: function(d) { | |
this.messageId = d; | |
return this; | |
}, | |
toString: function() { | |
return this.name + ": " + this.message; | |
} | |
}); | |
})(); | |
var N = D.extend({ | |
init: function Xf(d, m, p) { | |
Xf.base.call(this, d, m, p); | |
Object.defineProperties(this, { | |
name: { | |
value: "MslCryptoException", | |
writable: !1, | |
configurable: !0 | |
} | |
}); | |
} | |
}), | |
ja = D.extend({ | |
init: function Ye(d, m, p) { | |
Ye.base.call(this, d, m, p); | |
Object.defineProperties(this, { | |
name: { | |
value: "MslEncodingException", | |
writable: !1, | |
configurable: !0 | |
} | |
}); | |
} | |
}), | |
Vc = D.extend({ | |
init: function bc(d, m, p) { | |
bc.base.call(this, d, m, p); | |
Object.defineProperties(this, { | |
name: { | |
value: "MslEntityAuthException", | |
writable: !1, | |
configurable: !0 | |
} | |
}); | |
} | |
}), | |
uc; | |
(function() { | |
uc = ea.Class.create(Error()); | |
uc.mixin({ | |
init: function(d, m, p) { | |
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); | |
var r = this.stack; | |
Object.defineProperties(this, { | |
message: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
cause: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
requestCause: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: "MslErrorResponseException", | |
writable: !1, | |
configurable: !0 | |
}, | |
stack: { | |
get: function() { | |
var d = this.toString(); | |
r && (d += "\n" + r); | |
m && m.stack && (d += "\nCaused by " + m.stack); | |
return d; | |
}, | |
configurable: !0 | |
} | |
}); | |
}, | |
toString: function() { | |
return this.name + ": " + this.message; | |
} | |
}); | |
})(); | |
var Bb; | |
(function() { | |
Bb = ea.Class.create(Error()); | |
Bb.mixin({ | |
init: function(d, m) { | |
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); | |
var p = this.stack; | |
Object.defineProperties(this, { | |
message: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
cause: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: "MslIoException", | |
writable: !1, | |
configurable: !0 | |
}, | |
stack: { | |
get: function() { | |
var d = this.toString(); | |
p && (d += "\n" + p); | |
m && m.stack && (d += "\nCaused by " + m.stack); | |
return d; | |
}, | |
configurable: !0 | |
} | |
}); | |
}, | |
toString: function() { | |
return this.name + ": " + this.message; | |
} | |
}); | |
})(); | |
var ca; | |
(function() { | |
ca = ea.Class.create(Error()); | |
ca.mixin({ | |
init: function(d, m) { | |
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); | |
var p = this.stack; | |
Object.defineProperties(this, { | |
message: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
cause: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: "MslInternalException", | |
writable: !1, | |
configurable: !0 | |
}, | |
stack: { | |
get: function() { | |
var d = this.toString(); | |
p && (d += "\n" + p); | |
m && m.stack && (d += "\nCaused by " + m.stack); | |
return d; | |
}, | |
configurable: !0 | |
} | |
}); | |
}, | |
toString: function() { | |
return this.name + ": " + this.message; | |
} | |
}); | |
})(); | |
var wb; | |
(function() { | |
wb = ea.Class.create(Error()); | |
wb.mixin({ | |
init: function(d, m) { | |
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); | |
var p = this.stack; | |
Object.defineProperties(this, { | |
message: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
cause: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: "MslInterruptedException", | |
writable: !1, | |
configurable: !0 | |
}, | |
stack: { | |
get: function() { | |
var d = this.toString(); | |
p && (d += "\n" + p); | |
m && m.stack && (d += "\nCaused by " + m.stack); | |
return d; | |
}, | |
configurable: !0 | |
} | |
}); | |
}, | |
toString: function() { | |
return this.name + ": " + this.message; | |
} | |
}); | |
})(); | |
var ab = D.extend({ | |
init: function Ze(d, m, p) { | |
Ze.base.call(this, d, m, p); | |
Object.defineProperties(this, { | |
name: { | |
value: "MslKeyExchangeException", | |
writable: !1, | |
configurable: !0 | |
} | |
}); | |
} | |
}), | |
Dd = D.extend({ | |
init: function Si(d, m) { | |
Si.base.call(this, d); | |
Object.defineProperties(this, { | |
masterToken: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: "MslMasterTokenException", | |
writable: !1, | |
configurable: !0 | |
} | |
}); | |
} | |
}), | |
Oa = D.extend({ | |
init: function fb(d, m, p) { | |
fb.base.call(this, d, m, p); | |
Object.defineProperties(this, { | |
name: { | |
value: "MslMessageException", | |
writable: !1, | |
configurable: !0 | |
} | |
}); | |
} | |
}), | |
Ma = D.extend({ | |
init: function T(d, m, p) { | |
T.base.call(this, d, m, p); | |
Object.defineProperties(this, { | |
name: { | |
value: "MslUserAuthException", | |
writable: !1, | |
configurable: !0 | |
} | |
}); | |
} | |
}), | |
za, Tb, ff; | |
(function() { | |
function d(d) { | |
return "undefined" === typeof d ? !1 : d; | |
} | |
function m(d) { | |
return d && d.length ? (Tb === G.V2014_02 && (d = d.map(function(d) { | |
return "wrap" == d ? "wrapKey" : "unwrap" == d ? "unwrapKey" : d; | |
})), d) : Tb === G.V2014_02 ? "encrypt decrypt sign verify deriveKey wrapKey unwrapKey".split(" ") : "encrypt decrypt sign verify deriveKey wrap unwrap".split(" "); | |
} | |
function p(d, m, F, p, H) { | |
return Promise.resolve().then(function() { | |
return Ra.importKey(d, m, F, p, H); | |
})["catch"](function(C) { | |
if ("spki" !== d && "pkcs8" !== d) throw C; | |
C = ASN1.webCryptoAlgorithmToJwkAlg(F); | |
var B = ASN1.webCryptoUsageToJwkKeyOps(H); | |
C = ASN1.rsaDerToJwk(m, C, B, p); | |
if (!C) throw Error("Could not make valid JWK from DER input"); | |
C = JSON.stringify(C); | |
return Ra.importKey("jwk", Zf(C), F, p, H); | |
}); | |
} | |
function r(d, m) { | |
return Promise.resolve().then(function() { | |
return Ra.exportKey(d, m); | |
})["catch"](function(B) { | |
if ("spki" !== d && "pkcs8" !== d) throw B; | |
return Ra.exportKey("jwk", m).then(function(d) { | |
d = JSON.parse(Yf(new Uint8Array(d))); | |
d = ASN1.jwkToRsaDer(d); | |
if (!d) throw Error("Could not make valid DER from JWK input"); | |
return d.getDer().buffer; | |
}); | |
}); | |
} | |
var G = ff = { | |
LEGACY: 1, | |
V2014_01: 2, | |
V2014_02: 3, | |
LATEST: 3 | |
}; | |
Object.freeze(ff); | |
Tb = G.LATEST; | |
za = { | |
encrypt: function(d, m, p) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(B, F) { | |
var C = Ra.encrypt(d, m, p); | |
C.oncomplete = function(d) { | |
B(d.target.result); | |
}; | |
C.onerror = function(d) { | |
F(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.encrypt(d, m, p).then(function(d) { | |
return new Uint8Array(d); | |
}); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
decrypt: function(d, m, p) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(B, F) { | |
var C = Ra.decrypt(d, m, p); | |
C.oncomplete = function(d) { | |
B(d.target.result); | |
}; | |
C.onerror = function(d) { | |
F(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.decrypt(d, m, p).then(function(d) { | |
return new Uint8Array(d); | |
}); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
sign: function(d, m, p) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(B, F) { | |
var C = Ra.sign(d, m, p); | |
C.oncomplete = function(d) { | |
B(d.target.result); | |
}; | |
C.onerror = function(d) { | |
F(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.sign(d, m, p).then(function(d) { | |
return new Uint8Array(d); | |
}); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
verify: function(d, m, p, O) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(B, C) { | |
var I = Ra.verify(d, m, p, O); | |
I.oncomplete = function(d) { | |
B(d.target.result); | |
}; | |
I.onerror = function(d) { | |
C(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.verify(d, m, p, O); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
digest: function(d, m) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(B, p) { | |
var F = Ra.digest(d, m); | |
F.oncomplete = function(d) { | |
B(d.target.result); | |
}; | |
F.onerror = function(d) { | |
p(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.digest(d, m).then(function(d) { | |
return new Uint8Array(d); | |
}); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
generateKey: function(p, B, F) { | |
var L = d(B), | |
H = m(F); | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(d, m) { | |
var C = Ra.generateKey(p, L, H); | |
C.oncomplete = function(C) { | |
d(C.target.result); | |
}; | |
C.onerror = function(d) { | |
m(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.generateKey(p, L, H); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
deriveKey: function(p, B, F, O, H) { | |
var C = d(O), | |
I = m(H); | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(d, m) { | |
var H = Ra.deriveKey(p, B, F, C, I); | |
H.oncomplete = function(C) { | |
d(C.target.result); | |
}; | |
H.onerror = function(d) { | |
m(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.deriveKey(p, B, F, C, I); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
importKey: function(L, B, F, O, H) { | |
var C = d(O), | |
I = m(H); | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(d, m) { | |
var p = Ra.importKey(L, B, F, C, I); | |
p.oncomplete = function(C) { | |
d(C.target.result); | |
}; | |
p.onerror = function(d) { | |
m(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return p(L, B, F, C, I); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
exportKey: function(d, m) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(p, B) { | |
var F = Ra.exportKey(d, m); | |
F.oncomplete = function(d) { | |
p(d.target.result); | |
}; | |
F.onerror = function(d) { | |
B(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return r(d, m).then(function(d) { | |
return new Uint8Array(d); | |
}); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
wrapKey: function(d, m, p, O) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(d, C) { | |
var B = Ra.wrapKey(m, p, O); | |
B.oncomplete = function(m) { | |
d(m.target.result); | |
}; | |
B.onerror = function(d) { | |
C(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.wrapKey(d, m, p, O).then(function(d) { | |
return new Uint8Array(d); | |
}); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}, | |
unwrapKey: function(p, B, F, O, H, C, I) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(d, m) { | |
var C = Ra.unwrapKey(B, H, F); | |
C.oncomplete = function(m) { | |
d(m.target.result); | |
}; | |
C.onerror = function(d) { | |
m(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return Ra.unwrapKey(p, B, F, O, H, d(C), m(I)); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
} | |
}; | |
cf && cf.getKeyByName && (za.getKeyByName = function(d) { | |
switch (Tb) { | |
case G.LEGACY: | |
return new Promise(function(m, p) { | |
var B = cf.getKeyByName(d); | |
B.oncomplete = function(d) { | |
m(d.target.result); | |
}; | |
B.onerror = function(d) { | |
p(d); | |
}; | |
}); | |
case G.V2014_01: | |
case G.V2014_02: | |
return cf.getKeyByName(d); | |
default: | |
throw Error("Unsupported Web Crypto version " + WEB_CRYPTO_VERSION + "."); | |
} | |
}); | |
y.netflix = y.netflix || {}; | |
y.netflix.crypto = za; | |
})(); | |
var Wc = { | |
name: "AES-KW" | |
}, | |
Jc = { | |
name: "AES-CBC" | |
}, | |
Kc = { | |
name: "HMAC", | |
hash: { | |
name: "SHA-256" | |
} | |
}, | |
ve = { | |
name: "RSA-OAEP", | |
hash: { | |
name: "SHA-1" | |
} | |
}, | |
gf = { | |
name: "RSAES-PKCS1-v1_5" | |
}, | |
mh = { | |
name: "RSASSA-PKCS1-v1_5", | |
hash: { | |
name: "SHA-256" | |
} | |
}, | |
nd = ["encrypt", "decrypt"], | |
od = ["wrap", "unwrap"], | |
pd = ["sign", "verify"], | |
hf, Sd, Xc; | |
(function() { | |
hf = ea.Class.create({ | |
init: function(p, r, D) { | |
function T(d) { | |
m(r, function() { | |
var m = d ? qa(d) : na; | |
Object.defineProperties(G, { | |
rawKey: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
keyData: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
keyDataB64: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, G); | |
} | |
var G = this; | |
m(r, function() { | |
if (!p || "object" != typeof p) throw new N(d.INVALID_SYMMETRIC_KEY); | |
!D && p.extractable ? za.exportKey("raw", p).then(function(d) { | |
T(new Uint8Array(d)); | |
}, function(m) { | |
r.error(new N(d.KEY_EXPORT_ERROR, "raw")); | |
}) : T(D); | |
}, G); | |
}, | |
size: function() { | |
return this.keyData.length; | |
}, | |
toByteArray: function() { | |
return this.keyData; | |
}, | |
toBase64: function() { | |
return this.keyDataB64; | |
} | |
}); | |
Sd = function(d, m) { | |
new hf(d, m); | |
}; | |
Xc = function(p, r, D, y) { | |
m(y, function() { | |
try { | |
p = "string" == typeof p ? Ea(p) : p; | |
} catch (G) { | |
throw new N(d.INVALID_SYMMETRIC_KEY, "keydata " + p, G); | |
} | |
za.importKey("raw", p, r, !0, D).then(function(d) { | |
new hf(d, y, p); | |
}, function(m) { | |
y.error(new N(d.INVALID_SYMMETRIC_KEY)); | |
}); | |
}); | |
}; | |
})(); | |
var we, ld, jf; | |
(function() { | |
we = ea.Class.create({ | |
init: function(p, r, D) { | |
function T(d) { | |
m(r, function() { | |
Object.defineProperties(G, { | |
rawKey: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
encoded: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, G); | |
} | |
var G = this; | |
m(r, function() { | |
if (!p || "object" != typeof p || "public" != p.type) throw new TypeError("Only original public crypto keys are supported."); | |
!D && p.extractable ? za.exportKey("spki", p).then(function(d) { | |
T(new Uint8Array(d)); | |
}, function(m) { | |
r.error(new N(d.KEY_EXPORT_ERROR, "spki")); | |
}) : T(D); | |
}); | |
}, | |
getEncoded: function() { | |
return this.encoded; | |
} | |
}); | |
ld = function(d, m) { | |
new we(d, m); | |
}; | |
jf = function(p, r, D, y) { | |
m(y, function() { | |
try { | |
p = "string" == typeof p ? Ea(p) : p; | |
} catch (G) { | |
throw new N(d.INVALID_PUBLIC_KEY, "spki " + p, G); | |
} | |
za.importKey("spki", p, r, !0, D).then(function(d) { | |
new we(d, y, p); | |
}, function(m) { | |
y.error(new N(d.INVALID_PUBLIC_KEY)); | |
}); | |
}); | |
}; | |
})(); | |
var gg, Td; | |
(function() { | |
gg = ea.Class.create({ | |
init: function(p, r, D) { | |
function T(d) { | |
m(r, function() { | |
Object.defineProperties(G, { | |
rawKey: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
encoded: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, G); | |
} | |
var G = this; | |
m(r, function() { | |
if (!p || "object" != typeof p || "private" != p.type) throw new TypeError("Only original private crypto keys are supported."); | |
!D && p.extractable ? za.exportKey("pkcs8", p).then(function(d) { | |
T(new Uint8Array(d)); | |
}, function(m) { | |
r.error(new N(d.KEY_EXPORT_ERROR, "pkcs8")); | |
}) : T(D); | |
}); | |
}, | |
getEncoded: function() { | |
return this.encoded; | |
} | |
}); | |
Td = function(d, m) { | |
new gg(d, m); | |
}; | |
})(); | |
var hg, ig, kf, jg; | |
(function() { | |
var p = jg = { | |
V1: 1, | |
V2: 2 | |
}; | |
hg = ea.Class.create({ | |
init: function(d, r, D, G) { | |
m(G, function() { | |
var m = p.V1, | |
B = d, | |
F = null, | |
O; | |
for (O in Ud) | |
if (Ud[O] == d) { | |
m = p.V2; | |
B = null; | |
F = d; | |
break; | |
} | |
Object.defineProperties(this, { | |
version: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
keyId: { | |
value: B, | |
writable: !1, | |
configurable: !1 | |
}, | |
cipherSpec: { | |
value: F, | |
writable: !1, | |
configurable: !1 | |
}, | |
iv: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
}, | |
ciphertext: { | |
value: D, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, this); | |
}, | |
toJSON: function() { | |
var d = {}; | |
switch (this.version) { | |
case p.V1: | |
d.keyid = this.keyId; | |
this.iv && (d.iv = qa(this.iv)); | |
d.ciphertext = qa(this.ciphertext); | |
d.sha256 = "AA=="; | |
break; | |
case p.V2: | |
d.version = this.version; | |
d.cipherspec = this.cipherSpec; | |
this.iv && (d.iv = qa(this.iv)); | |
d.ciphertext = qa(this.ciphertext); | |
break; | |
default: | |
throw new ca("Ciphertext envelope version " + this.version + " encoding unsupported."); | |
} | |
return d; | |
} | |
}); | |
ig = function(d, m, p, G) { | |
new hg(d, m, p, G); | |
}; | |
kf = function(r, D, y) { | |
m(y, function() { | |
var m = r.keyid, | |
L = r.cipherspec, | |
B = r.iv, | |
F = r.ciphertext, | |
O = r.sha256; | |
if (!D) | |
if ((D = r.version) && "number" === typeof D && D === D) { | |
var H = !1, | |
C; | |
for (C in p) | |
if (p[C] == D) { | |
H = !0; | |
break; | |
} | |
if (!H) throw new N(d.UNIDENTIFIED_CIPHERTEXT_ENVELOPE, "ciphertext envelope " + JSON.stringify(r)); | |
} | |
else D = p.V1; | |
switch (D) { | |
case p.V1: | |
if ("string" !== typeof m || B && "string" !== typeof B || "string" !== typeof F || "string" !== typeof O) throw new ja(d.JSON_PARSE_ERROR, "ciphertext envelope " + JSON.stringify(r)); | |
break; | |
case p.V2: | |
C = r.version; | |
if (C != p.V2) throw new N(d.UNIDENTIFIED_CIPHERTEXT_ENVELOPE, "ciphertext envelope " + JSON.stringify(r)); | |
if ("string" !== typeof L || B && "string" !== typeof B || "string" !== typeof F) throw new ja(d.JSON_PARSE_ERROR, "ciphertext envelope " + JSON.stringify(r)); | |
L = jh(L); | |
if (!L) throw new N(d.UNIDENTIFIED_CIPHERSPEC, "ciphertext envelope " + JSON.stringify(r)); | |
m = L; | |
break; | |
default: | |
throw new N(d.UNSUPPORTED_CIPHERTEXT_ENVELOPE, "ciphertext envelope " + JSON.stringify(r)); | |
} | |
try { | |
B && (B = Ea(B)), F = Ea(F); | |
} catch (I) { | |
throw new N(d.CIPHERTEXT_ENVELOPE_PARSE_ERROR, "encryption envelope " + JSON.stringify(r), I); | |
} | |
new hg(m, B, F, y); | |
}); | |
}; | |
})(); | |
var Yc, lf, mf, nf; | |
(function() { | |
var p = nf = { | |
V1: 1, | |
V2: 2 | |
}; | |
Yc = ea.Class.create({ | |
init: function(d, m, r) { | |
var G; | |
switch (d) { | |
case p.V1: | |
G = r; | |
break; | |
case p.V2: | |
G = {}; | |
G.version = d; | |
G.algorithm = m; | |
G.signature = qa(r); | |
G = mb(JSON.stringify(G), Na); | |
break; | |
default: | |
throw new ca("Signature envelope version " + d + " encoding unsupported."); | |
} | |
Object.defineProperties(this, { | |
version: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
algorithm: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
}, | |
bytes: { | |
value: G, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
}); | |
lf = function() { | |
var d, r, D, G; | |
2 == arguments.length ? (d = p.V1, r = arguments[0], D = null, G = arguments[1]) : 3 == arguments.length && (d = p.V2, D = arguments[0], r = arguments[1], G = arguments[2]); | |
m(G, function() { | |
return new Yc(d, D, r); | |
}); | |
}; | |
mf = function(r, D, y) { | |
m(y, function() { | |
if (D) switch (D) { | |
case p.V1: | |
return new Yc(p.V1, null, r); | |
case p.V2: | |
try { | |
var m = Qa(r, Na), | |
L = JSON.parse(m), | |
B = parseInt(L.version), | |
F = L.algorithm, | |
O = L.signature; | |
if (!B || "number" !== typeof B || B != B || "string" !== typeof F || "string" !== typeof O) throw new ja(d.JSON_PARSE_ERROR, "signature envelope " + qa(r)); | |
if (p.V2 != B) throw new N(d.UNSUPPORTED_SIGNATURE_ENVELOPE, "signature envelope " + qa(r)); | |
var H = df(F); | |
if (!H) throw new N(d.UNIDENTIFIED_ALGORITHM, "signature envelope " + qa(r)); | |
var C = Ea(O); | |
if (!C) throw new N(d.INVALID_SIGNATURE, "signature envelope " + Base64Util.encode(r)); | |
return new Yc(p.V2, H, C); | |
} catch (I) { | |
if (I instanceof SyntaxError) throw new ja(d.JSON_PARSE_ERROR, "signature envelope " + qa(r), I); | |
throw I; | |
} | |
default: | |
throw new N(d.UNSUPPORTED_SIGNATURE_ENVELOPE, "signature envelope " + qa(r)); | |
} | |
try { | |
m = Qa(r, Na), L = JSON.parse(m); | |
} catch (I) { | |
L = null; | |
} | |
if (L && L.version) { | |
if (m = L.version, "number" !== typeof m || m !== m) m = p.V1; | |
} else m = p.V1; | |
switch (m) { | |
case p.V1: | |
return new Yc(m, null, r); | |
case p.V2: | |
H = L.algorithm; | |
O = L.signature; | |
if ("string" !== typeof H || "string" !== typeof O) return new Yc(p.V1, null, r); | |
H = df(H); | |
if (!H) return new Yc(p.V1, null, r); | |
try { | |
C = Ea(O); | |
} catch (I) { | |
return new Yc(p.V1, null, r); | |
} | |
return new Yc(m, H, C); | |
default: | |
throw new N(d.UNSUPPORTED_SIGNATURE_ENVELOPE, "signature envelope " + r); | |
} | |
}); | |
}; | |
})(); | |
var Wd = ea.Class.create({ | |
encrypt: function(d, m) {}, | |
decrypt: function(d, m) {}, | |
wrap: function(d, m) {}, | |
unwrap: function(d, m, p, r) {}, | |
sign: function(d, m) {}, | |
verify: function(d, m, p) {} | |
}), | |
Zc, $c; | |
(function() { | |
var p = $c = { | |
RSA_OAEP: ve.name, | |
A128KW: Wc.name | |
}; | |
Rc = "A128GCM"; | |
Zc = ea.Class.create({ | |
init: function(d, m, r, G, L) { | |
switch (m) { | |
case p.RSA_OAEP: | |
L = L && (L.rawKey || L); | |
G = G && (G.rawKey || G); | |
break; | |
case p.A128KW: | |
L = G = G && (G.rawKey || G); | |
break; | |
default: | |
throw new ca("Unsupported algorithm: " + m); | |
} | |
Object.defineProperties(this, { | |
_ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_algo: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_enc: { | |
value: r, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_wrapKey: { | |
value: L, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_unwrapKey: { | |
value: G, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
encrypt: function(m, p) { | |
p.error(new N(d.ENCRYPT_NOT_SUPPORTED)); | |
}, | |
decrypt: function(m, p) { | |
p.error(new N(d.DECRYPT_NOT_SUPPORTED)); | |
}, | |
wrap: function(p, r) { | |
m(r, function() { | |
za.wrapKey("jwe+jwk", p.rawKey, this._wrapKey, this._wrapKey.algorithm).then(function(d) { | |
r.result(d); | |
}, function(m) { | |
r.error(new N(d.WRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
unwrap: function(p, r, D, G) { | |
function L(p) { | |
m(G, function() { | |
switch (p.type) { | |
case "secret": | |
Sd(p, G); | |
break; | |
case "public": | |
ld(p, G); | |
break; | |
case "private": | |
Td(p, G); | |
break; | |
default: | |
throw new N(d.UNSUPPORTED_KEY, "type: " + p.type); | |
} | |
}); | |
} | |
m(G, function() { | |
za.unwrapKey("jwe+jwk", p, this._unwrapKey, this._unwrapKey.algorithm, r, !1, D).then(function(d) { | |
L(d); | |
}, function() { | |
G.error(new N(d.UNWRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
sign: function(m, p) { | |
p.error(new N(d.SIGN_NOT_SUPPORTED)); | |
}, | |
verify: function(m, p, r) { | |
r.error(new N(d.VERIFY_NOT_SUPPORTED)); | |
} | |
}); | |
})(); | |
var Ed = Wd.extend({ | |
encrypt: function(d, m) { | |
m.result(d); | |
}, | |
decrypt: function(d, m) { | |
m.result(d); | |
}, | |
wrap: function(d, m) { | |
m.result(d); | |
}, | |
unwrap: function(d, m, p, r) { | |
r.result(d); | |
}, | |
sign: function(d, m) { | |
m.result(new Uint8Array(0)); | |
}, | |
verify: function(d, m, p) { | |
p.result(!0); | |
} | |
}), | |
xe, ye; | |
(function() { | |
var p = ye = { | |
ENCRYPT_DECRYPT_OAEP: 1, | |
ENCRYPT_DECRYPT_PKCS1: 2, | |
WRAP_UNWRAP_OAEP: 3, | |
WRAP_UNWRAP_PKCS1: 4, | |
SIGN_VERIFY: 5 | |
}; | |
xe = Wd.extend({ | |
init: function Xa(d, m, L, B, F) { | |
Xa.base.call(this); | |
L && (L = L.rawKey); | |
B && (B = B.rawKey); | |
Object.defineProperties(this, { | |
id: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
privateKey: { | |
value: L, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
publicKey: { | |
value: B, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
transform: { | |
value: F == p.ENCRYPT_DECRYPT_PKCS1 ? gf : F == p.ENCRYPT_DECRYPT_OAEP ? ve : "nullOp", | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
wrapTransform: { | |
value: F == p.WRAP_UNWRAP_PKCS1 ? gf : F == p.WRAP_UNWRAP_OAEP ? ve : "nullOp", | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
algo: { | |
value: F == p.SIGN_VERIFY ? mh : "nullOp", | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
encrypt: function(p, r) { | |
var G = this; | |
m(r, function() { | |
if ("nullOp" == this.transform) return p; | |
if (!this.publicKey) throw new N(d.ENCRYPT_NOT_SUPPORTED, "no public key"); | |
if (0 == p.length) return p; | |
za.encrypt(G.transform, G.publicKey, p).then(function(m) { | |
ig(G.id, null, m, { | |
result: function(m) { | |
try { | |
var p = JSON.stringify(m); | |
r.result(mb(p, Na)); | |
} catch (O) { | |
r.error(new N(d.ENCRYPT_ERROR, null, O)); | |
} | |
}, | |
error: function(m) { | |
m instanceof D || (m = new N(d.ENCRYPT_ERROR, null, m)); | |
r.error(m); | |
} | |
}); | |
}, function(m) { | |
r.error(new N(d.ENCRYPT_ERROR)); | |
}); | |
}, this); | |
}, | |
decrypt: function(p, r) { | |
var G = this; | |
m(r, function() { | |
if ("nullOp" == this.transform) return p; | |
if (!this.privateKey) throw new N(d.DECRYPT_NOT_SUPPORTED, "no private key"); | |
if (0 == p.length) return p; | |
var m; | |
try { | |
var B = Qa(p, Na); | |
m = JSON.parse(B); | |
} catch (F) { | |
if (F instanceof SyntaxError) throw new N(d.CIPHERTEXT_ENVELOPE_PARSE_ERROR, null, F); | |
throw new N(d.DECRYPT_ERROR, null, F); | |
} | |
kf(m, jg.V1, { | |
result: function(m) { | |
try { | |
if (m.keyId != G.id) throw new N(d.ENVELOPE_KEY_ID_MISMATCH); | |
var p = r.result; | |
za.decrypt(G.transform, G.privateKey, m.ciphertext).then(p, function(m) { | |
r.error(new N(d.DECRYPT_ERROR)); | |
}); | |
} catch (H) { | |
H instanceof D ? r.error(H) : r.error(new N(d.DECRYPT_ERROR, null, H)); | |
} | |
}, | |
error: function(m) { | |
m instanceof ja && (m = new N(d.CIPHERTEXT_ENVELOPE_ENCODE_ERROR, null, m)); | |
m instanceof D || (m = new N(d.DECRYPT_ERROR, null, m)); | |
r.error(m); | |
} | |
}); | |
}, this); | |
}, | |
wrap: function(p, r) { | |
m(r, function() { | |
if ("nullOp" == this.wrapTransform || !this.publicKey) throw new N(d.WRAP_NOT_SUPPORTED, "no public key"); | |
var m = r.result; | |
za.wrapKey("jwk", p.rawKey, this.publicKey, this.wrapTransform).then(m, function(m) { | |
r.error(new N(d.WRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
unwrap: function(p, r, G, L) { | |
function B(p) { | |
m(L, function() { | |
switch (p.type) { | |
case "secret": | |
Sd(p, L); | |
break; | |
case "public": | |
ld(p, L); | |
break; | |
case "private": | |
Td(p, L); | |
break; | |
default: | |
throw new N(d.UNSUPPORTED_KEY, "type: " + p.type); | |
} | |
}); | |
} | |
m(L, function() { | |
if ("nullOp" == this.wrapTransform || !this.privateKey) throw new N(d.UNWRAP_NOT_SUPPORTED, "no private key"); | |
za.unwrapKey("jwk", p, this.privateKey, { | |
name: this.privateKey.algorithm.name, | |
hash: { | |
name: "SHA-1" | |
} | |
}, r, !1, G).then(B, function(m) { | |
L.error(new N(d.UNWRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
sign: function(p, r) { | |
m(r, function() { | |
if ("nullOp" == this.algo) return new Uint8Array(0); | |
if (!this.privateKey) throw new N(d.SIGN_NOT_SUPPORTED, "no private key"); | |
za.sign(this.algo, this.privateKey, p).then(function(d) { | |
lf(d, { | |
result: function(d) { | |
r.result(d.bytes); | |
}, | |
error: r.error | |
}); | |
}, function(m) { | |
r.error(new N(d.SIGNATURE_ERROR)); | |
}); | |
}, this); | |
}, | |
verify: function(p, r, G) { | |
var L = this; | |
m(G, function() { | |
if ("nullOp" == this.algo) return !0; | |
if (!this.publicKey) throw new N(d.VERIFY_NOT_SUPPORTED, "no public key"); | |
mf(r, nf.V1, { | |
result: function(B) { | |
m(G, function() { | |
var m = G.result; | |
za.verify(this.algo, this.publicKey, B.signature, p).then(m, function(m) { | |
G.error(new N(d.SIGNATURE_ERROR)); | |
}); | |
}, L); | |
}, | |
error: G.error | |
}); | |
}, this); | |
} | |
}); | |
})(); | |
var Fd; | |
(function() { | |
Fd = Wd.extend({ | |
init: function Ab(d, m, p, L, B) { | |
Ab.base.call(this); | |
p = p && p.rawKey; | |
L = L && L.rawKey; | |
B = B && B.rawKey; | |
Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
id: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
encryptionKey: { | |
value: p, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
hmacKey: { | |
value: L, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
wrapKey: { | |
value: B, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
encrypt: function(p, r) { | |
var y = this; | |
m(r, function() { | |
if (!this.encryptionKey) throw new N(d.ENCRYPT_NOT_SUPPORTED, "no encryption/decryption key"); | |
if (0 == p.length) return p; | |
var m = new Uint8Array(16); | |
this.ctx.getRandom().nextBytes(m); | |
za.encrypt({ | |
name: Jc.name, | |
iv: m | |
}, y.encryptionKey, p).then(function(p) { | |
p = new Uint8Array(p); | |
ig(y.id, m, p, { | |
result: function(m) { | |
try { | |
var p = JSON.stringify(m); | |
r.result(mb(p, Na)); | |
} catch (O) { | |
r.error(new N(d.ENCRYPT_ERROR, null, O)); | |
} | |
}, | |
error: function(m) { | |
m instanceof D || (m = new N(d.ENCRYPT_ERROR, null, m)); | |
r.error(m); | |
} | |
}); | |
}, function(m) { | |
r.error(new N(d.ENCRYPT_ERROR)); | |
}); | |
}, this); | |
}, | |
decrypt: function(p, r) { | |
var y = this; | |
m(r, function() { | |
if (!this.encryptionKey) throw new N(d.DECRYPT_NOT_SUPPORTED, "no encryption/decryption key"); | |
if (0 == p.length) return p; | |
var m; | |
try { | |
var L = Qa(p, Na); | |
m = JSON.parse(L); | |
} catch (B) { | |
if (B instanceof SyntaxError) throw new N(d.CIPHERTEXT_ENVELOPE_PARSE_ERROR, null, B); | |
throw new N(d.DECRYPT_ERROR, null, B); | |
} | |
kf(m, jg.V1, { | |
result: function(m) { | |
try { | |
if (m.keyId != y.id) throw new N(d.ENVELOPE_KEY_ID_MISMATCH); | |
za.decrypt({ | |
name: Jc.name, | |
iv: m.iv | |
}, y.encryptionKey, m.ciphertext).then(function(d) { | |
d = new Uint8Array(d); | |
r.result(d); | |
}, function() { | |
r.error(new N(d.DECRYPT_ERROR)); | |
}); | |
} catch (F) { | |
F instanceof D ? r.error(F) : r.error(new N(d.DECRYPT_ERROR, null, F)); | |
} | |
}, | |
error: function(m) { | |
m instanceof ja && (m = new N(d.CIPHERTEXT_ENVELOPE_ENCODE_ERROR, null, m)); | |
m instanceof D || (m = new N(d.DECRYPT_ERROR, null, m)); | |
r.error(m); | |
} | |
}); | |
}, this); | |
}, | |
wrap: function(p, r) { | |
m(r, function() { | |
if (!this.wrapKey) throw new N(d.WRAP_NOT_SUPPORTED, "no wrap/unwrap key"); | |
za.wrapKey("raw", p.rawKey, this.wrapKey, this.wrapKey.algorithm).then(function(d) { | |
r.result(d); | |
}, function(m) { | |
r.error(new N(d.WRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
unwrap: function(p, r, D, G) { | |
function L(p) { | |
m(G, function() { | |
switch (p.type) { | |
case "secret": | |
Sd(p, G); | |
break; | |
case "public": | |
ld(p, G); | |
break; | |
case "private": | |
Td(p, G); | |
break; | |
default: | |
throw new N(d.UNSUPPORTED_KEY, "type: " + p.type); | |
} | |
}); | |
} | |
m(G, function() { | |
if (!this.wrapKey) throw new N(d.UNWRAP_NOT_SUPPORTED, "no wrap/unwrap key"); | |
za.unwrapKey("raw", p, this.wrapKey, this.wrapKey.algorithm, r, !1, D).then(function(d) { | |
L(d); | |
}, function(m) { | |
G.error(new N(d.UNWRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
sign: function(p, r) { | |
var D = this; | |
m(r, function() { | |
if (!this.hmacKey) throw new N(d.SIGN_NOT_SUPPORTED, "no HMAC key."); | |
za.sign(Kc, this.hmacKey, p).then(function(d) { | |
m(r, function() { | |
var m = new Uint8Array(d); | |
lf(m, { | |
result: function(d) { | |
r.result(d.bytes); | |
}, | |
error: r.error | |
}); | |
}, D); | |
}, function() { | |
r.error(new N(d.HMAC_ERROR)); | |
}); | |
}, this); | |
}, | |
verify: function(p, r, D) { | |
var G = this; | |
m(D, function() { | |
if (!this.hmacKey) throw new N(d.VERIFY_NOT_SUPPORTED, "no HMAC key."); | |
mf(r, nf.V1, { | |
result: function(r) { | |
m(D, function() { | |
za.verify(Kc, this.hmacKey, r.signature, p).then(function(d) { | |
D.result(d); | |
}, function(m) { | |
D.error(new N(d.HMAC_ERROR)); | |
}); | |
}, G); | |
}, | |
error: D.error | |
}); | |
}, this); | |
} | |
}); | |
})(); | |
var hc = Fd.extend({ | |
init: function Ab(m, p, r, L, B) { | |
if (r || L || B) Ab.base.call(this, m, r + "_" + p.sequenceNumber, L, B, null); | |
else { | |
if (!p.isDecrypted()) throw new Dd(d.MASTERTOKEN_UNTRUSTED, p); | |
Ab.base.call(this, m, p.identity + "_" + p.sequenceNumber, p.encryptionKey, p.hmacKey, null); | |
} | |
} | |
}), | |
aj = Wd.extend({ | |
encrypt: function(d, m) { | |
m.result(d); | |
}, | |
decrypt: function(d, m) { | |
m.result(d); | |
}, | |
wrap: function(d, m) { | |
m.error(new ca("Wrap is unsupported by the MSL token crypto context.")); | |
}, | |
unwrap: function(d, m, p, r) { | |
r.error(new ca("Unwrap is unsupported by the MSL token crypto context.")); | |
}, | |
sign: function(d, m) { | |
m.result(new Uint8Array(0)); | |
}, | |
verify: function(d, m, p) { | |
p.result(!1); | |
} | |
}), | |
Za = { | |
PSK: "PSK", | |
MGK: "MGK", | |
X509: "X509", | |
RSA: "RSA", | |
NPTICKET: "NPTICKET", | |
ECC: "ECC", | |
NONE: "NONE" | |
}; | |
Object.freeze(Za); | |
var md, nh; | |
(function() { | |
md = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
scheme: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getIdentity: function() {}, | |
getAuthData: function() {}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof md ? this.scheme == d.scheme : !1; | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.scheme = this.scheme; | |
d.authdata = this.getAuthData(); | |
return d; | |
} | |
}); | |
nh = function(m, p) { | |
var r = p.scheme, | |
G = p.authdata; | |
if (!r || !G) throw new ja(d.JSON_PARSE_ERROR, "entityauthdata " + JSON.stringify(p)); | |
if (!Za[r]) throw new Vc(d.UNIDENTIFIED_ENTITYAUTH_SCHEME, r); | |
var L = m.getEntityAuthenticationFactory(r); | |
if (!L) throw new Vc(d.ENTITYAUTH_FACTORY_NOT_FOUND, r); | |
return L.createData(m, G); | |
}; | |
})(); | |
var ze = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
scheme: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createData: function(d, m) {}, | |
getCryptoContext: function(d, m) {} | |
}), | |
Bc, oh; | |
(function() { | |
Bc = md.extend({ | |
init: function Xa(d) { | |
Xa.base.call(this, Za.MGK); | |
Object.defineProperties(this, { | |
identity: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getIdentity: function() { | |
return this.identity; | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.identity = this.identity; | |
return d; | |
}, | |
equals: function $a(d) { | |
return this === d ? !0 : d instanceof Bc ? $a.base.call(this, this, d) && this.identity == d.identity : !1; | |
} | |
}); | |
oh = function(m) { | |
var p = m.identity; | |
if (!p) throw new ja(d.JSON_PARSE_ERROR, "mgk authdata" + JSON.stringify(m)); | |
return new Bc(p); | |
}; | |
})(); | |
var bj = ze.extend({ | |
init: function Xa(d) { | |
Xa.base.call(this, Za.MGK); | |
Object.defineProperties(this, { | |
localIdentity: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createData: function(d, m) { | |
return oh(m); | |
}, | |
getCryptoContext: function(m, p) { | |
if (!(p instanceof Bc)) throw new ca("Incorrect authentication data type " + JSON.stringify(p) + "."); | |
if (p.identity != this.localIdentity) throw (new Vc(d.ENTITY_NOT_FOUND, "mgk " + p.identity)).setEntity(p); | |
return new Ed; | |
} | |
}), | |
Lc, ph; | |
(function() { | |
Lc = md.extend({ | |
init: function $a(d) { | |
$a.base.call(this, Za.PSK); | |
Object.defineProperties(this, { | |
identity: { | |
value: d, | |
writable: !1 | |
} | |
}); | |
}, | |
getIdentity: function() { | |
return this.identity; | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.identity = this.identity; | |
return d; | |
}, | |
equals: function G(d) { | |
return this === d ? !0 : d instanceof Lc ? G.base.call(this, this, d) && this.identity == d.identity : !1; | |
} | |
}); | |
ph = function(m) { | |
var p = m.identity; | |
if (!p) throw new ja(d.JSON_PARSE_ERROR, "psk authdata" + JSON.stringify(m)); | |
return new Lc(p); | |
}; | |
})(); | |
var kg; | |
kg = ze.extend({ | |
init: function $a(d) { | |
$a.base.call(this, Za.PSK); | |
Object.defineProperties(this, { | |
localIdentity: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createData: function(d, m) { | |
return ph(m); | |
}, | |
getCryptoContext: function(m, p) { | |
if (!(p instanceof Lc)) throw new ca("Incorrect authentication data type " + JSON.stringify(p) + "."); | |
if (p.getIdentity() != this.localIdentity) throw (new Vc(d.ENTITY_NOT_FOUND, "psk " + p.identity)).setEntity(p); | |
return new Ed; | |
} | |
}); | |
var Ae, qh; | |
(function() { | |
Ae = md.extend({ | |
init: function G(d, m) { | |
G.base.call(this, Za.RSA); | |
Object.defineProperties(this, { | |
identity: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
publicKeyId: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getIdentity: function() { | |
return this.identity; | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.identity = this.identity; | |
d.pubkeyid = this.publicKeyId; | |
return d; | |
}, | |
equals: function L(d) { | |
return this === d ? !0 : d instanceof Ae ? L.base.call(this, this, d) && this.identity == d.identity && this.publicKeyId == d.publicKeyId : !1; | |
} | |
}); | |
qh = function(m) { | |
var p = m.identity, | |
F = m.pubkeyid; | |
if (!p || "string" !== typeof p || !F || "string" !== typeof F) throw new ja(d.JSON_PARSE_ERROR, "RSA authdata" + JSON.stringify(m)); | |
return new Ae(p, F); | |
}; | |
})(); | |
var cj = ze.extend({ | |
init: function G(d) { | |
G.base.call(this, Za.RSA); | |
Object.defineProperties(this, { | |
store: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createData: function(d, m) { | |
return qh(m); | |
}, | |
getCryptoContext: function(m, p) { | |
if (!(p instanceof Ae)) throw new ca("Incorrect authentication data type " + p + "."); | |
var B = p.identity, | |
F = p.publicKeyId, | |
r = this.store.getPublicKey(F); | |
if (!r) throw (new Vc(d.RSA_PUBLICKEY_NOT_FOUND, F)).setEntity(p); | |
return new xe(m, B, null, r, ye.SIGN_VERIFY); | |
} | |
}), | |
se, rh; | |
(function() { | |
se = md.extend({ | |
init: function L(d) { | |
L.base.call(this, Za.NONE); | |
Object.defineProperties(this, { | |
identity: { | |
value: d, | |
writable: !1 | |
} | |
}); | |
}, | |
getIdentity: function() { | |
return this.identity; | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.identity = this.identity; | |
return d; | |
}, | |
equals: function B(d) { | |
return this === d ? !0 : d instanceof se ? B.base.call(this, this, d) && this.identity == d.identity : !1; | |
} | |
}); | |
rh = function(m) { | |
var p = m.identity; | |
if (!p) throw new ja(d.JSON_PARSE_ERROR, "Unauthenticated authdata" + JSON.stringify(m)); | |
return new se(p); | |
}; | |
})(); | |
var Xi = ze.extend({ | |
init: function L() { | |
L.base.call(this, Za.NONE); | |
}, | |
createData: function(d, m) { | |
return rh(m); | |
}, | |
getCryptoContext: function(d, m) { | |
if (!(m instanceof se)) throw new ca("Incorrect authentication data type " + JSON.stringify(m) + "."); | |
return new Ed; | |
} | |
}), | |
dj = ea.Class.create({ | |
init: function() { | |
Object.defineProperties(this, { | |
rsaKeys: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
addPublicKey: function(d, m) { | |
if (!(m instanceof we)) throw new ca("Incorrect key data type " + m + "."); | |
this.rsaKeys[d] = m; | |
}, | |
getIdentities: function() { | |
return Object.keys(this.rsaKeys); | |
}, | |
removePublicKey: function(d) { | |
delete this.rsaKeys[d]; | |
}, | |
getPublicKey: function(d) { | |
return this.rsaKeys[d]; | |
} | |
}), | |
lg = ea.Class.create({ | |
abort: function() {}, | |
close: function() {}, | |
mark: function() {}, | |
reset: function() {}, | |
markSupported: function() {}, | |
read: function(d, m, p) {} | |
}), | |
Be = ea.Class.create({ | |
abort: function() {}, | |
close: function(d, m) {}, | |
write: function(d, m, p, r, H) {}, | |
flush: function(d, m) {} | |
}), | |
ej = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
_data: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_closed: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_currentPosition: { | |
value: 0, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_mark: { | |
value: -1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
abort: function() {}, | |
close: function() { | |
this._close = !0; | |
}, | |
mark: function() { | |
this._mark = this._currentPosition; | |
}, | |
reset: function() { | |
if (-1 == this._mark) throw new Bb("Stream has not been marked."); | |
this._currentPosition = this._mark; | |
}, | |
markSupported: function() { | |
return !0; | |
}, | |
read: function(d, m, p) { | |
r(p, function() { | |
if (this._closed) throw new Bb("Stream is already closed."); | |
if (this._currentPosition == this._data.length) return null; - 1 == d && (d = this._data.length - this._currentPosition); | |
var m = this._data.subarray(this._currentPosition, this._currentPosition + d); | |
this._currentPosition += m.length; | |
return m; | |
}, this); | |
} | |
}), | |
fj = ea.Class.create({ | |
init: function() { | |
var d = { | |
_closed: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_result: { | |
value: new Uint8Array(0), | |
writable: !0, | |
enuemrable: !1, | |
configurable: !1 | |
}, | |
_buffered: { | |
value: [], | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, d); | |
}, | |
abort: function() {}, | |
close: function(d, m) { | |
this._closed = !0; | |
m.result(!0); | |
}, | |
write: function(d, m, p, O, H) { | |
r(H, function() { | |
if (this._closed) throw new Bb("Stream is already closed."); | |
if (0 > m) throw new RangeError("Offset cannot be negative."); | |
if (0 > p) throw new RangeError("Length cannot be negative."); | |
if (m + p > d.length) throw new RangeError("Offset plus length cannot be greater than the array length."); | |
var C = d.subarray(m, p); | |
this._buffered.push(C); | |
return C.length; | |
}, this); | |
}, | |
flush: function(d, m) { | |
for (; 0 < this._buffered.length;) { | |
var p = this._buffered.shift(); | |
if (this._result) { | |
var B = new Uint8Array(this._result.length + p.length); | |
B.set(this._result); | |
B.set(p, this._result.length); | |
this._result = B; | |
} else this._result = new Uint8Array(p); | |
} | |
m.result(!0); | |
}, | |
size: function() { | |
this.flush(1, { | |
result: function() {} | |
}); | |
return this._result.length; | |
}, | |
toByteArray: function() { | |
this.flush(1, { | |
result: function() {} | |
}); | |
return this._result; | |
} | |
}), | |
bg, gj = ea.Class.create({ | |
getResponse: function(d, m, p) {} | |
}); | |
(function() { | |
var d = Be.extend({ | |
init: function(d, m) { | |
var p = { | |
_httpLocation: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timeout: { | |
value: m, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_buffer: { | |
value: new fj, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_response: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_abortToken: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_responseQueue: { | |
value: new ue, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, p); | |
}, | |
setTimeout: function(d) { | |
this._timeout = d; | |
}, | |
getResponse: function(d, m) { | |
var p = this; | |
this._responseQueue.poll(d, { | |
result: function(d) { | |
r(m, function() { | |
d && this._responseQueue.add(d); | |
return d; | |
}, p); | |
}, | |
timeout: function() { | |
r(m, function() { | |
this._response = { | |
isTimeout: !0 | |
}; | |
this._responseQueue.add(this._response); | |
this.abort(); | |
m.timeout(); | |
}, p); | |
}, | |
error: function(d) { | |
r(m, function() { | |
this._response = { | |
isError: !0 | |
}; | |
this._responseQueue.add(this._response); | |
throw d; | |
}, p); | |
} | |
}); | |
}, | |
abort: function() { | |
this._abortToken && this._abortToken.abort(); | |
}, | |
close: function(d, m) { | |
var p = this; | |
r(m, function() { | |
if (this._response) return !0; | |
var d = this._buffer.toByteArray(); | |
0 < d.length && (this._abortToken = this._httpLocation.getResponse({ | |
body: d | |
}, this._timeout, { | |
result: function(d) { | |
p._response = { | |
response: d | |
}; | |
p._responseQueue.add(p._response); | |
}, | |
timeout: function() { | |
p._response = { | |
isTimeout: !0 | |
}; | |
p._responseQueue.add(p._response); | |
}, | |
error: function(d) { | |
p._response = { | |
isError: !0, | |
error: d | |
}; | |
p._responseQueue.add(p._response); | |
} | |
})); | |
return !0; | |
}, this); | |
}, | |
write: function(d, m, p, C, I) { | |
r(I, function() { | |
if (this._response) throw new Bb("HttpOutputStream already closed."); | |
this._buffer.write(d, m, p, C, I); | |
}, this); | |
}, | |
flush: function(d, m) { | |
r(m, function() { | |
if (this._response) return !0; | |
this._buffer.flush(d, m); | |
}, this); | |
} | |
}), | |
m = lg.extend({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
_out: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_buffer: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_exception: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timedout: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_aborted: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_json: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
abort: function() { | |
this._out.abort(); | |
}, | |
close: function() { | |
this._buffer && this._buffer.close(); | |
}, | |
mark: function() { | |
this._buffer || this._buffer.mark(); | |
}, | |
reset: function() { | |
this._buffer && this._buffer.reset(); | |
}, | |
markSupported: function() { | |
if (this._buffer) return this._buffer.markSupported(); | |
}, | |
read: function(d, m, p) { | |
function C(C) { | |
r(p, function() { | |
if (!C) return new Uint8Array(0); | |
this._out.getResponse(m, { | |
result: function(C) { | |
r(p, function() { | |
var B; | |
if (C.isTimeout) this._timedout = !0, p.timeout(); | |
else { | |
if (C.isError) throw this._exception = C.error || new Bb("Unknown HTTP exception."), this._exception; | |
if (!C.response) throw this._exception = new Bb("Missing HTTP response."), this._exception; | |
C.response.json !== na && (this._json = C.response.json, this.getJSON = function() { | |
return I._json; | |
}); | |
B = C.response.content || Zf("string" === typeof C.response.body ? C.response.body : JSON.stringify(this._json)); | |
this._buffer = new ej(B); | |
this._buffer.read(d, m, p); | |
} | |
}, I); | |
}, | |
timeout: function() { | |
p.timeout(); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
}, I); | |
} | |
var I = this; | |
r(p, function() { | |
if (this._exception) throw this._exception; | |
if (this._timedout) p.timeout(); | |
else { | |
if (this._aborted) return new Uint8Array(0); | |
this._buffer ? this._buffer.read(d, m, p) : this._out.close(m, { | |
result: function(d) { | |
C(d); | |
}, | |
timeout: function() { | |
p.timeout(); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
} | |
}, I); | |
} | |
}); | |
bg = ea.Class.create({ | |
init: function(d, m) { | |
Object.defineProperties(this, { | |
_httpLocation: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timeout: { | |
value: m, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
setTimeout: function(d) { | |
this._timeout = d; | |
}, | |
openConnection: function() { | |
var p = new d(this._httpLocation, this._timeout); | |
return { | |
input: new m(p), | |
output: p | |
}; | |
} | |
}); | |
})(); | |
var cg; | |
(function() { | |
var d = Be.extend({ | |
init: function() { | |
var d = { | |
_buffer: { | |
value: new Uint8Array, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, d); | |
}, | |
setTimeout: function() {}, | |
getResponse: function(d, m) { | |
m.result({ | |
success: !1, | |
content: null, | |
errorHttpCode: na, | |
errorSubCode: na | |
}); | |
}, | |
abort: function() {}, | |
close: function(d, m) { | |
m.result(!0); | |
}, | |
write: function(d, m, p, C, I) { | |
try { | |
if (0 > m) throw new RangeError("Offset cannot be negative."); | |
if (0 > p) throw new RangeError("Length cannot be negative."); | |
if (m + p > d.length) throw new RangeError("Offset plus length cannot be greater than the array length."); | |
var B = d.subarray(m, p), | |
F = new Uint8Array(this._buffer.length + B.length); | |
F.set(this._buffer); | |
F.set(B, this._buffer.length); | |
this._buffer = F; | |
I.result(B.length); | |
} catch (db) { | |
I.error(db); | |
} | |
}, | |
flush: function(d, m) { | |
m.result(!0); | |
}, | |
request: function() { | |
return this._buffer; | |
} | |
}), | |
m = lg.extend({ | |
init: function() {}, | |
abort: function() {}, | |
close: function() {}, | |
mark: function() {}, | |
reset: function() {}, | |
markSupported: function() {}, | |
read: function(d, m, p) { | |
p.result(new Uint8Array(16)); | |
} | |
}); | |
cg = ea.Class.create({ | |
init: function() { | |
var p = { | |
output: { | |
value: new d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
input: { | |
value: new m, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, p); | |
}, | |
setTimeout: function() {}, | |
openConnection: function() { | |
return { | |
input: this.input, | |
output: this.output | |
}; | |
}, | |
getRequest: function() { | |
return Yf(this.output.request()); | |
} | |
}); | |
})(); | |
var sh = function(d, m, p) { | |
function B(d) { | |
d = new hj(Qa(d, "utf-8")); | |
var m = [], | |
p; | |
for (p = d.nextValue(); p !== na;) m.push(p), p = d.nextValue(); | |
return m; | |
} | |
(function(d, m, I) { | |
d.read(-1, m, { | |
result: function(d) { | |
d && d.length ? I(null, d) : I(null, null); | |
}, | |
timeout: function() { | |
p.timeout(); | |
}, | |
error: function(d) { | |
I(d, null); | |
} | |
}); | |
})(d, m, function(m, C) { | |
m ? p.error(m) : C ? d.getJSON !== na && "function" === typeof d.getJSON ? p.result(d.getJSON()) : p.result(B(C)) : p.result(null); | |
}); | |
}, | |
oc = { | |
SYMMETRIC_WRAPPED: "SYMMETRIC_WRAPPED", | |
ASYMMETRIC_WRAPPED: "ASYMMETRIC_WRAPPED", | |
DIFFIE_HELLMAN: "DIFFIE_HELLMAN", | |
JWE_LADDER: "JWE_LADDER", | |
JWK_LADDER: "JWK_LADDER", | |
AUTHENTICATED_DH: "AUTHENTICATED_DH" | |
}; | |
Object.freeze(oc); | |
var Ce, th; | |
(function() { | |
Ce = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
keyExchangeScheme: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() {}, | |
toJSON: function() { | |
var d = {}; | |
d.scheme = this.keyExchangeScheme; | |
d.keydata = this.getKeydata(); | |
return d; | |
}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof Ce ? this.keyExchangeScheme == d.keyExchangeScheme : !1; | |
}, | |
uniqueKey: function() { | |
return this.keyExchangeScheme; | |
} | |
}); | |
th = function(p, B, F) { | |
m(F, function() { | |
var m = B.scheme, | |
r = B.keydata; | |
if (!m || !r || "object" !== typeof r) throw new ja(d.JSON_PARSE_ERROR, "keyrequestdata " + JSON.stringify(B)); | |
if (!oc[m]) throw new ab(d.UNIDENTIFIED_KEYX_SCHEME, m); | |
var C = p.getKeyExchangeFactory(m); | |
if (!C) throw new ab(d.KEYX_FACTORY_NOT_FOUND, m); | |
C.createRequestData(p, r, F); | |
}); | |
}; | |
})(); | |
var De, uh; | |
(function() { | |
De = ea.Class.create({ | |
init: function(d, m) { | |
Object.defineProperties(this, { | |
masterToken: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
keyExchangeScheme: { | |
value: m, | |
wrtiable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() {}, | |
toJSON: function() { | |
var d = {}; | |
d.mastertoken = this.masterToken; | |
d.scheme = this.keyExchangeScheme; | |
d.keydata = this.getKeydata(); | |
return d; | |
}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof De ? this.masterToken.equals(d.masterToken) && this.keyExchangeScheme == d.keyExchangeScheme : !1; | |
}, | |
uniqueKey: function() { | |
return this.masterToken.uniqueKey() + ":" + this.keyExchangeScheme; | |
} | |
}); | |
uh = function(p, B, r) { | |
m(r, function() { | |
var F = B.mastertoken, | |
H = B.scheme, | |
C = B.keydata; | |
if (!H || !F || "object" !== typeof F || !C || "object" !== typeof C) throw new ja(d.JSON_PARSE_ERROR, "keyresponsedata " + JSON.stringify(B)); | |
if (!oc[H]) throw new ab(d.UNIDENTIFIED_KEYX_SCHEME, H); | |
qd(p, F, { | |
result: function(I) { | |
m(r, function() { | |
var m = p.getKeyExchangeFactory(H); | |
if (!m) throw new ab(d.KEYX_FACTORY_NOT_FOUND, H); | |
return m.createResponseData(p, I, C); | |
}); | |
}, | |
error: function(d) { | |
r.error(d); | |
} | |
}); | |
}); | |
}; | |
})(); | |
var vc; | |
(function() { | |
var p = ea.Class.create({ | |
init: function(d, m) { | |
Object.defineProperties(this, { | |
keyResponseData: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
cryptoContext: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
}); | |
vc = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
scheme: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createRequestData: function(d, m, p) {}, | |
createResponseData: function(d, m, p) {}, | |
generateResponse: function(d, m, p, r) {}, | |
getCryptoContext: function(d, m, p, r, C) {}, | |
generateSessionKeys: function(p, r) { | |
m(r, function() { | |
var m = new Uint8Array(16), | |
B = new Uint8Array(32); | |
p.getRandom().nextBytes(m); | |
p.getRandom().nextBytes(B); | |
Xc(m, Jc, nd, { | |
result: function(m) { | |
Xc(B, Kc, pd, { | |
result: function(d) { | |
r.result({ | |
encryptionKey: m, | |
hmacKey: d | |
}); | |
}, | |
error: function(m) { | |
r.error(new N(d.SESSION_KEY_CREATION_FAILURE, null, m)); | |
} | |
}); | |
}, | |
error: function(m) { | |
r.error(new N(d.SESSION_KEY_CREATION_FAILURE, null, m)); | |
} | |
}); | |
}); | |
}, | |
importSessionKeys: function(d, m, p) { | |
Xc(d, Jc, nd, { | |
result: function(d) { | |
Xc(m, Kc, pd, { | |
result: function(m) { | |
p.result({ | |
encryptionKey: d, | |
hmacKey: m | |
}); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
} | |
}); | |
vc.KeyExchangeData = p; | |
})(); | |
var vh, mg, wh; | |
(function() { | |
function p(p, C, I, r, F) { | |
m(F, function() { | |
switch (C) { | |
case B.PSK: | |
var va = new Lc(r), | |
H = p.getEntityAuthenticationFactory(Za.PSK); | |
if (!H) throw new ab(d.UNSUPPORTED_KEYX_MECHANISM, C); | |
va = H.getCryptoContext(p, va); | |
return new Zc(p, $c.A128KW, Rc, na); | |
case B.MGK: | |
va = new Bc(r); | |
H = p.getEntityAuthenticationFactory(Za.MGK); | |
if (!H) throw new ab(d.UNSUPPORTED_KEYX_MECHANISM, C); | |
va = H.getCryptoContext(p, va); | |
return new Zc(p, $c.A128KW, Rc, na); | |
case B.WRAP: | |
va = p.getMslCryptoContext(); | |
va.unwrap(I, Wc, od, { | |
result: function(d) { | |
m(F, function() { | |
return new Zc(p, $c.A128KW, Rc, d); | |
}); | |
}, | |
error: F.error | |
}); | |
break; | |
default: | |
throw new ab(d.UNSUPPORTED_KEYX_MECHANISM, C); | |
} | |
}); | |
} | |
var B = { | |
PSK: "PSK", | |
MGK: "MGK", | |
WRAP: "WRAP" | |
}, | |
r = mg = Ce.extend({ | |
init: function C(d, m) { | |
C.base.call(this, oc.JWE_LADDER); | |
switch (d) { | |
case B.WRAP: | |
if (!m) throw new ca("Previous wrapping key based key exchange requires the previous wrapping key data and ID."); | |
break; | |
default: | |
m = null; | |
} | |
Object.defineProperties(this, { | |
mechanism: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
wrapdata: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() { | |
var d = {}; | |
d.mechanism = this.mechanism; | |
this.wrapdata && (d.wrapdata = qa(this.wrapdata)); | |
return d; | |
}, | |
equals: function I(d) { | |
return d === this ? !0 : d instanceof mg ? I.base.call(this, d) && this.mechanism == d.mechanism && Nb(this.wrapdata, d.wrapdata) : !1; | |
}, | |
uniqueKey: function nb() { | |
var d = nb.base.call(this) + ":" + this.mechanism; | |
this.wrapdata && (d += ":" + Rb(this.wrapdata)); | |
return d; | |
} | |
}), | |
O = wh = De.extend({ | |
init: function va(d, m, p, a, t) { | |
va.base.call(this, d, oc.JWE_LADDER); | |
Object.defineProperties(this, { | |
wrapKey: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
wrapdata: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
encryptionKey: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
hmacKey: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() { | |
var d = {}; | |
d.wrapkey = qa(this.wrapKey); | |
d.wrapdata = qa(this.wrapdata); | |
d.encryptionkey = qa(this.encryptionKey); | |
d.hmackey = qa(this.hmacKey); | |
return d; | |
}, | |
equals: function db(d) { | |
return this === d ? !0 : d instanceof wh ? db.base.call(this, d) && Nb(this.wrapKey, d.wrapKey) && Nb(this.wrapdata, d.wrapdata) && Nb(this.encryptionKey, d.encryptionKey) && Nb(this.hmacKey, d.hmacKey) : !1; | |
}, | |
uniqueKey: function Ia() { | |
return Ia.base.call(this) + ":" + Rb(this.wrapKey) + ":" + Rb(this.wrapdata) + ":" + Rb(this.encryptionKey) + ":" + Rb(this.hmacKey); | |
} | |
}); | |
vh = vc.extend({ | |
init: function sa(a) { | |
sa.base.call(this, oc.JWE_LADDER); | |
Object.defineProperties(this, { | |
repository: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createRequestData: function(p, a, t) { | |
m(t, function() { | |
var c = a.mechanism, | |
b = a.wrapdata; | |
if (!c || c == B.WRAP && (!b || "string" !== typeof b)) throw new ja(d.JSON_PARSE_ERROR, "keydata " + JSON.stringify(a)); | |
if (!B[c]) throw new ab(d.UNIDENTIFIED_KEYX_MECHANISM, c); | |
var k; | |
switch (c) { | |
case B.WRAP: | |
try { | |
k = Ea(b); | |
} catch (h) { | |
throw new ab(d.KEYX_WRAPPING_KEY_MISSING, "keydata " + a.toString()); | |
} | |
if (null == k || 0 == k.length) throw new ab(d.KEYX_WRAPPING_KEY_MISSING, "keydata " + a.toString()); | |
break; | |
default: | |
k = null; | |
} | |
return new r(c, k); | |
}); | |
}, | |
createResponseData: function(m, a, t) { | |
m = t.wrapkey; | |
var c = t.wrapdata, | |
b = t.encryptionkey, | |
k = t.hmackey; | |
if (!(m && "string" === typeof m && c && "string" === typeof c && b && "string" === typeof b && k) || "string" !== typeof k) throw new ja(d.JSON_PARSE_ERROR, "keydata " + JSON.stringify(t)); | |
var h, n, g, l; | |
try { | |
h = Ea(m), n = Ea(c); | |
} catch (f) { | |
throw new N(d.INVALID_SYMMETRIC_KEY, "keydata " + JSON.stringify(t), f); | |
} | |
try { | |
g = Ea(b); | |
} catch (f) { | |
throw new N(d.INVALID_ENCRYPTION_KEY, "keydata " + JSON.stringify(t), f); | |
} | |
try { | |
l = Ea(k); | |
} catch (f) { | |
throw new N(d.INVALID_HMAC_KEY, "keydata " + JSON.stringify(t), f); | |
} | |
return new O(a, h, n, g, l); | |
}, | |
generateResponse: function(B, a, t, c) { | |
function b(a, b, h) { | |
g.generateSessionKeys(B, { | |
result: function(f) { | |
m(c, function() { | |
k(a, b, h, f.encryptionKey, f.hmacKey); | |
}, g); | |
}, | |
error: function(a) { | |
m(c, function() { | |
a instanceof D && a.setEntity(l); | |
throw a; | |
}); | |
} | |
}); | |
} | |
function k(b, n, k, A, t) { | |
m(c, function() { | |
p(B, a.mechanism, a.wrapdata, b, { | |
result: function(a) { | |
a.wrap(n, { | |
result: function(a) { | |
h(n, k, A, t, a); | |
}, | |
error: function(a) { | |
m(c, function() { | |
a instanceof D && a.setEntity(l); | |
throw a; | |
}); | |
} | |
}); | |
}, | |
error: function(a) { | |
m(c, function() { | |
a instanceof D && a.setEntity(l); | |
throw a; | |
}); | |
} | |
}); | |
}, g); | |
} | |
function h(a, b, h, k, t) { | |
m(c, function() { | |
var f = new Zc(B, $c.A128KW, Rc, a); | |
f.wrap(h, { | |
result: function(a) { | |
f.wrap(k, { | |
result: function(c) { | |
n(b, t, h, a, k, c); | |
}, | |
error: function(a) { | |
m(c, function() { | |
a instanceof D && a.setEntity(l); | |
throw a; | |
}); | |
} | |
}); | |
}, | |
error: function(a) { | |
m(c, function() { | |
a instanceof D && a.setEntity(l); | |
throw a; | |
}); | |
} | |
}); | |
}, g); | |
} | |
function n(a, b, h, n, k, d) { | |
m(c, function() { | |
var f = B.getTokenFactory(); | |
l ? f.renewMasterToken(B, l, h, k, { | |
result: function(f) { | |
m(c, function() { | |
var l = new hc(B, f), | |
g = new O(f, b, a, n, d); | |
return new vc.KeyExchangeData(g, l, c); | |
}, g); | |
}, | |
error: function(a) { | |
m(c, function() { | |
a instanceof D && a.setEntity(l); | |
throw a; | |
}); | |
} | |
}) : f.createMasterToken(B, t, h, k, { | |
result: function(f) { | |
m(c, function() { | |
var l = new hc(B, f), | |
g = new O(f, b, a, n, d); | |
return new vc.KeyExchangeData(g, l, c); | |
}, g); | |
}, | |
error: c.error | |
}); | |
}, g); | |
} | |
var g = this, | |
l; | |
m(c, function() { | |
if (!(a instanceof r)) throw new ca("Key request data " + JSON.stringify(a) + " was not created by this factory."); | |
var f = t; | |
if (t instanceof nc) { | |
if (!t.isVerified()) throw new Dd(d.MASTERTOKEN_UNTRUSTED, t); | |
l = t; | |
f = t.identity; | |
} | |
var h = new Uint8Array(16); | |
B.getRandom().nextBytes(h); | |
Xc(h, Wc, od, { | |
result: function(a) { | |
m(c, function() { | |
B.getMslCryptoContext().wrap(a, { | |
result: function(c) { | |
b(f, a, c); | |
}, | |
error: function(a) { | |
m(c, function() { | |
a instanceof D && a.setEntity(l); | |
throw a; | |
}, g); | |
} | |
}); | |
}, g); | |
}, | |
error: function(a) { | |
m(c, function() { | |
throw (new N(d.WRAP_KEY_CREATION_FAILURE, null, a)).setEntity(l); | |
}, g); | |
} | |
}); | |
}, g); | |
}, | |
getCryptoContext: function(p, a, t, c, b) { | |
function k(a, c, l, f, k) { | |
m(b, function() { | |
var g = new Zc(p, $c.A128KW, Rc, k); | |
g.unwrap(c.encryptionKey, Jc, nd, { | |
result: function(n) { | |
g.unwrap(c.hmacKey, Kc, pd, { | |
result: function(a) { | |
m(b, function() { | |
this.repository.addCryptoContext(c.wrapdata, g); | |
this.repository.removeCryptoContext(l); | |
return new hc(p, c.masterToken, f, n, a); | |
}, h); | |
}, | |
error: function(c) { | |
m(b, function() { | |
c instanceof D && c.setEntity(a); | |
throw c; | |
}); | |
} | |
}); | |
}, | |
error: function(c) { | |
m(b, function() { | |
c instanceof D && c.setEntity(a); | |
throw c; | |
}); | |
} | |
}); | |
}, h); | |
} | |
var h = this; | |
m(b, function() { | |
if (!(a instanceof r)) throw new ca("Key request data " + JSON.stringify(a) + " was not created by this factory."); | |
if (!(t instanceof O)) throw new ca("Key response data " + JSON.stringify(t) + " was not created by this factory."); | |
var c = a.mechanism, | |
g = a.wrapdata; | |
p.getEntityAuthenticationData(null, { | |
result: function(a) { | |
m(b, function() { | |
var f = a.getIdentity(), | |
l; | |
switch (c) { | |
case B.PSK: | |
l = new Lc(f); | |
var h = p.getEntityAuthenticationFactory(Za.PSK); | |
if (!h) throw (new ab(d.UNSUPPORTED_KEYX_MECHANISM, c)).setEntity(a); | |
l = h.getCryptoContext(p, l); | |
l = new Zc(p, $c.A128KW, Rc, na); | |
break; | |
case B.MGK: | |
l = new Bc(f); | |
h = p.getEntityAuthenticationFactory(Za.MGK); | |
if (!h) throw (new ab(d.UNSUPPORTED_KEYX_MECHANISM, c)).setEntity(a); | |
l = h.getCryptoContext(p, l); | |
l = new Zc(p, $c.A128KW, Rc, l.wrapKey); | |
break; | |
case B.WRAP: | |
l = this.repository.getCryptoContext(g); | |
if (!l) throw (new ab(d.KEYX_WRAPPING_KEY_MISSING, qa(g))).setEntity(a); | |
break; | |
default: | |
throw (new ab(d.UNSUPPORTED_KEYX_MECHANISM, c)).setEntity(a); | |
} | |
l.unwrap(t.wrapKey, Wc, od, { | |
result: function(b) { | |
k(a, t, g, f, b); | |
}, | |
error: function(c) { | |
m(b, function() { | |
c instanceof D && c.setEntity(a); | |
throw c; | |
}); | |
} | |
}); | |
}, h); | |
}, | |
error: b.error | |
}); | |
}, h); | |
} | |
}); | |
})(); | |
var ng, Ee, xh; | |
(function() { | |
function p(p, I, r, F, O) { | |
m(O, function() { | |
switch (I) { | |
case B.PSK: | |
var C = new Lc(F), | |
va = p.getEntityAuthenticationFactory(Za.PSK); | |
if (!va) throw new ab(d.UNSUPPORTED_KEYX_MECHANISM, I); | |
C = va.getCryptoContext(p, C); | |
return new H(na); | |
case B.MGK: | |
C = new Bc(F); | |
va = p.getEntityAuthenticationFactory(Za.MGK); | |
if (!va) throw new ab(d.UNSUPPORTED_KEYX_MECHANISM, I); | |
C = va.getCryptoContext(p, C); | |
return new H(na); | |
case B.WRAP: | |
C = p.getMslCryptoContext(); | |
C.unwrap(r, Wc, od, { | |
result: function(a) { | |
m(O, function() { | |
return new H(a); | |
}); | |
}, | |
error: O.error | |
}); | |
break; | |
default: | |
throw new ab(d.UNSUPPORTED_KEYX_MECHANISM, I); | |
} | |
}); | |
} | |
var B = { | |
PSK: "PSK", | |
MGK: "MGK", | |
WRAP: "WRAP" | |
}, | |
r = Ee = Ce.extend({ | |
init: function I(d, m) { | |
I.base.call(this, oc.JWK_LADDER); | |
switch (d) { | |
case B.WRAP: | |
if (!m) throw new ca("Previous wrapping key based key exchange requires the previous wrapping key data and ID."); | |
break; | |
default: | |
m = null; | |
} | |
Object.defineProperties(this, { | |
mechanism: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
wrapdata: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() { | |
var d = {}; | |
d.mechanism = this.mechanism; | |
this.wrapdata && (d.wrapdata = qa(this.wrapdata)); | |
return d; | |
}, | |
equals: function nb(d) { | |
return d === this ? !0 : d instanceof Ee ? nb.base.call(this, d) && this.mechanism == d.mechanism && Nb(this.wrapdata, d.wrapdata) : !1; | |
}, | |
uniqueKey: function va() { | |
var d = va.base.call(this) + ":" + this.mechanism; | |
this.wrapdata && (d += ":" + Rb(this.wrapdata)); | |
return d; | |
} | |
}), | |
O = xh = De.extend({ | |
init: function db(d, m, a, t, c) { | |
db.base.call(this, d, oc.JWK_LADDER); | |
Object.defineProperties(this, { | |
wrapKey: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
wrapdata: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
encryptionKey: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
hmacKey: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() { | |
var d = {}; | |
d.wrapkey = qa(this.wrapKey); | |
d.wrapdata = qa(this.wrapdata); | |
d.encryptionkey = qa(this.encryptionKey); | |
d.hmackey = qa(this.hmacKey); | |
return d; | |
}, | |
equals: function Ia(d) { | |
return this === d ? !0 : d instanceof xh ? Ia.base.call(this, d) && Nb(this.wrapKey, d.wrapKey) && Nb(this.wrapdata, d.wrapdata) && Nb(this.encryptionKey, d.encryptionKey) && Nb(this.hmacKey, d.hmacKey) : !1; | |
}, | |
uniqueKey: function sa() { | |
return sa.base.call(this) + ":" + Rb(this.wrapKey) + ":" + Rb(this.wrapdata) + ":" + Rb(this.encryptionKey) + ":" + Rb(this.hmacKey); | |
} | |
}), | |
H = Wd.extend({ | |
init: function(d) { | |
d && d.rawKey && (d = d.rawKey); | |
Object.defineProperties(this, { | |
_wrapKey: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
encrypt: function(m, a) { | |
a.error(new N(d.ENCRYPT_NOT_SUPPORTED)); | |
}, | |
decrypt: function(m, a) { | |
a.error(new N(d.DECRYPT_NOT_SUPPORTED)); | |
}, | |
wrap: function(p, a) { | |
m(a, function() { | |
za.wrapKey("jwk", p.rawKey, this._wrapKey, Wc).then(function(t) { | |
a.result(t); | |
}, function(t) { | |
a.error(new N(d.WRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
unwrap: function(p, a, t, c) { | |
function b(a) { | |
m(c, function() { | |
switch (a.type) { | |
case "secret": | |
Sd(a, c); | |
break; | |
case "public": | |
ld(a, c); | |
break; | |
case "private": | |
Td(a, c); | |
break; | |
default: | |
throw new N(d.UNSUPPORTED_KEY, "type: " + a.type); | |
} | |
}); | |
} | |
m(c, function() { | |
za.unwrapKey("jwk", p, this._wrapKey, Wc, a, !1, t).then(function(a) { | |
b(a); | |
}, function(a) { | |
c.error(new N(d.UNWRAP_ERROR)); | |
}); | |
}, this); | |
}, | |
sign: function(m, a) { | |
a.error(new N(d.SIGN_NOT_SUPPORTED)); | |
}, | |
verify: function(m, a, t) { | |
t.error(new N(d.VERIFY_NOT_SUPPORTED)); | |
} | |
}); | |
ng = vc.extend({ | |
init: function a(t) { | |
a.base.call(this, oc.JWK_LADDER); | |
Object.defineProperties(this, { | |
repository: { | |
value: t, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createRequestData: function(a, t, c) { | |
m(c, function() { | |
var a = t.mechanism, | |
c = t.wrapdata; | |
if (!a || a == B.WRAP && (!c || "string" !== typeof c)) throw new ja(d.JSON_PARSE_ERROR, "keydata " + JSON.stringify(t)); | |
if (!B[a]) throw new ab(d.UNIDENTIFIED_KEYX_MECHANISM, a); | |
var h; | |
switch (a) { | |
case B.WRAP: | |
try { | |
h = Ea(c); | |
} catch (n) { | |
throw new ab(d.KEYX_WRAPPING_KEY_MISSING, "keydata " + t.toString()); | |
} | |
if (null == h || 0 == h.length) throw new ab(d.KEYX_WRAPPING_KEY_MISSING, "keydata " + t.toString()); | |
break; | |
default: | |
h = null; | |
} | |
return new r(a, h); | |
}); | |
}, | |
createResponseData: function(a, t, c) { | |
a = c.wrapkey; | |
var b = c.wrapdata, | |
k = c.encryptionkey, | |
h = c.hmackey; | |
if (!(a && "string" === typeof a && b && "string" === typeof b && k && "string" === typeof k && h) || "string" !== typeof h) throw new ja(d.JSON_PARSE_ERROR, "keydata " + JSON.stringify(c)); | |
var n, g, l, f; | |
try { | |
n = Ea(a), g = Ea(b); | |
} catch (q) { | |
throw new N(d.INVALID_SYMMETRIC_KEY, "keydata " + JSON.stringify(c), q); | |
} | |
try { | |
l = Ea(k); | |
} catch (q) { | |
throw new N(d.INVALID_ENCRYPTION_KEY, "keydata " + JSON.stringify(c), q); | |
} | |
try { | |
f = Ea(h); | |
} catch (q) { | |
throw new N(d.INVALID_HMAC_KEY, "keydata " + JSON.stringify(c), q); | |
} | |
return new O(t, n, g, l, f); | |
}, | |
generateResponse: function(a, t, c, b) { | |
function k(c, g, n) { | |
l.generateSessionKeys(a, { | |
result: function(a) { | |
m(b, function() { | |
h(c, g, n, a.encryptionKey, a.hmacKey); | |
}, l); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}); | |
} | |
function h(c, g, h, k, d) { | |
m(b, function() { | |
p(a, t.mechanism, t.wrapdata, c, { | |
result: function(a) { | |
a.wrap(g, { | |
result: function(a) { | |
n(g, h, k, d, a); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}); | |
}, l); | |
} | |
function n(a, c, h, n, k) { | |
m(b, function() { | |
var l = new H(a); | |
l.wrap(h, { | |
result: function(a) { | |
l.wrap(n, { | |
result: function(b) { | |
g(c, k, h, a, n, b); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}); | |
}, l); | |
} | |
function g(g, h, n, k, t, d) { | |
m(b, function() { | |
var q = a.getTokenFactory(); | |
f ? q.renewMasterToken(a, f, n, t, { | |
result: function(c) { | |
m(b, function() { | |
var f = new hc(a, c), | |
l = new O(c, h, g, k, d); | |
return new vc.KeyExchangeData(l, f, b); | |
}, l); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}) : q.createMasterToken(a, c, n, t, { | |
result: function(c) { | |
m(b, function() { | |
var f = new hc(a, c), | |
l = new O(c, h, g, k, d); | |
return new vc.KeyExchangeData(l, f, b); | |
}, l); | |
}, | |
error: b.error | |
}); | |
}, l); | |
} | |
var l = this, | |
f; | |
m(b, function() { | |
if (!(t instanceof r)) throw new ca("Key request data " + JSON.stringify(t) + " was not created by this factory."); | |
var g = c; | |
if (c instanceof nc) { | |
if (!c.isVerified()) throw new Dd(d.MASTERTOKEN_UNTRUSTED, c); | |
f = c; | |
g = c.identity; | |
} | |
var h = new Uint8Array(16); | |
a.getRandom().nextBytes(h); | |
Xc(h, Wc, od, { | |
result: function(c) { | |
m(b, function() { | |
a.getMslCryptoContext().wrap(c, { | |
result: function(a) { | |
k(g, c, a); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}, l); | |
} | |
}); | |
}, l); | |
}, | |
error: function(a) { | |
m(b, function() { | |
throw (new N(d.WRAP_KEY_CREATION_FAILURE, null, a)).setEntity(f); | |
}, l); | |
} | |
}); | |
}, l); | |
}, | |
getCryptoContext: function(a, t, c, b, k) { | |
function h(b, c, f, h, v) { | |
m(k, function() { | |
var l = new H(v); | |
l.unwrap(c.encryptionKey, Jc, nd, { | |
result: function(g) { | |
l.unwrap(c.hmacKey, Kc, pd, { | |
result: function(b) { | |
m(k, function() { | |
this.repository.addCryptoContext(c.wrapdata, l); | |
this.repository.removeCryptoContext(f); | |
return new hc(a, c.masterToken, h, g, b); | |
}, n); | |
}, | |
error: function(a) { | |
m(k, function() { | |
a instanceof D && a.setEntity(b); | |
throw a; | |
}); | |
} | |
}); | |
}, | |
error: function(a) { | |
m(k, function() { | |
a instanceof D && a.setEntity(b); | |
throw a; | |
}); | |
} | |
}); | |
}, n); | |
} | |
var n = this; | |
m(k, function() { | |
if (!(t instanceof r)) throw new ca("Key request data " + JSON.stringify(t) + " was not created by this factory."); | |
if (!(c instanceof O)) throw new ca("Key response data " + JSON.stringify(c) + " was not created by this factory."); | |
var b = t.mechanism, | |
l = t.wrapdata; | |
a.getEntityAuthenticationData(null, { | |
result: function(f) { | |
m(k, function() { | |
var g = f.getIdentity(), | |
n; | |
switch (b) { | |
case B.PSK: | |
n = new Lc(g); | |
var A = a.getEntityAuthenticationFactory(Za.PSK); | |
if (!A) throw (new ab(d.UNSUPPORTED_KEYX_MECHANISM, b)).setEntity(f); | |
n = A.getCryptoContext(a, n); | |
n = new H(n.wrapKey); | |
break; | |
case B.MGK: | |
n = new Bc(g); | |
A = a.getEntityAuthenticationFactory(Za.MGK); | |
if (!A) throw (new ab(d.UNSUPPORTED_KEYX_MECHANISM, b)).setEntity(f); | |
n = A.getCryptoContext(a, n); | |
n = new H(n.wrapKey); | |
break; | |
case B.WRAP: | |
n = this.repository.getCryptoContext(l); | |
if (!n) throw (new ab(d.KEYX_WRAPPING_KEY_MISSING, qa(l))).setEntity(f); | |
break; | |
default: | |
throw (new ab(d.UNSUPPORTED_KEYX_MECHANISM, b)).setEntity(f); | |
} | |
n.unwrap(c.wrapKey, Wc, od, { | |
result: function(a) { | |
h(f, c, l, g, a); | |
}, | |
error: function(a) { | |
m(k, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}); | |
}, n); | |
}, | |
error: k.error | |
}); | |
}, n); | |
} | |
}); | |
})(); | |
var ij = ea.Class.create({ | |
addCryptoContext: function(d, m) {}, | |
getCryptoContext: function(d) {}, | |
removeCryptoContext: function(d) {} | |
}), | |
eh, of , af, og; | |
(function() { | |
function p(m, p, r, F, H) { | |
switch (r) { | |
case B.JWE_RSA: | |
case B.JWEJS_RSA: | |
return new Zc(m, $c.RSA_OAEP, Rc, F, H); | |
case B.JWK_RSA: | |
return new xe(m, p, F, H, ye.WRAP_UNWRAP_OAEP); | |
case B.JWK_RSAES: | |
return new xe(m, p, F, H, ye.WRAP_UNWRAP_PKCS1); | |
default: | |
throw new N(d.UNSUPPORTED_KEYX_MECHANISM, r); | |
} | |
} | |
var B = of = { | |
RSA: "RSA", | |
ECC: "ECC", | |
JWE_RSA: "JWE_RSA", | |
JWEJS_RSA: "JWEJS_RSA", | |
JWK_RSA: "JWK_RSA", | |
JWK_RSAES: "JWK_RSAES" | |
}, | |
r = af = Ce.extend({ | |
init: function I(d, m, p, r) { | |
I.base.call(this, oc.ASYMMETRIC_WRAPPED); | |
Object.defineProperties(this, { | |
keyPairId: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
mechanism: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
publicKey: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
privateKey: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() { | |
var d = {}; | |
d.keypairid = this.keyPairId; | |
d.mechanism = this.mechanism; | |
d.publickey = qa(this.publicKey.getEncoded()); | |
return d; | |
}, | |
equals: function nb(d) { | |
if (d === this) return !0; | |
if (!(d instanceof af)) return !1; | |
var m = this.privateKey === d.privateKey || this.privateKey && d.privateKey && Nb(this.privateKey.getEncoded(), d.privateKey.getEncoded()); | |
return nb.base.call(this, d) && this.keyPairId == d.keyPairId && this.mechanism == d.mechanism && Nb(this.publicKey.getEncoded(), d.publicKey.getEncoded()) && m; | |
}, | |
uniqueKey: function va() { | |
var d = this.publicKey.getEncoded(), | |
m = this.privateKey && this.privateKey.getEncoded(), | |
d = va.base.call(this) + ":" + this.keyPairId + ":" + this.mechanism + ":" + Rb(d); | |
m && (d += ":" + Rb(m)); | |
return d; | |
} | |
}), | |
O = function(p, F) { | |
m(F, function() { | |
var m = p.keypairid, | |
H = p.mechanism, | |
a = p.publickey; | |
if (!m || "string" !== typeof m || !H || !a || "string" !== typeof a) throw new ja(d.JSON_PARSE_ERROR, "keydata " + JSON.stringify(p)); | |
if (!B[H]) throw new ab(d.UNIDENTIFIED_KEYX_MECHANISM, H); | |
try { | |
var t = Ea(a); | |
switch (H) { | |
case B.JWE_RSA: | |
case B.JWEJS_RSA: | |
case B.JWK_RSA: | |
jf(t, ve, od, { | |
result: function(a) { | |
F.result(new r(m, H, a, null)); | |
}, | |
error: function(a) { | |
F.error(a); | |
} | |
}); | |
break; | |
case B.JWK_RSAES: | |
jf(t, gf, od, { | |
result: function(a) { | |
F.result(new r(m, H, a, null)); | |
}, | |
error: function(a) { | |
F.error(a); | |
} | |
}); | |
break; | |
default: | |
throw new N(d.UNSUPPORTED_KEYX_MECHANISM, H); | |
} | |
} catch (c) { | |
if (!(c instanceof D)) throw new N(d.INVALID_PUBLIC_KEY, "keydata " + JSON.stringify(p), c); | |
throw c; | |
} | |
}); | |
}, | |
H = og = De.extend({ | |
init: function db(d, m, a, t) { | |
db.base.call(this, d, oc.ASYMMETRIC_WRAPPED); | |
Object.defineProperties(this, { | |
keyPairId: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
encryptionKey: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
hmacKey: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getKeydata: function() { | |
var d = {}; | |
d.keypairid = this.keyPairId; | |
d.encryptionkey = qa(this.encryptionKey); | |
d.hmackey = qa(this.hmacKey); | |
return d; | |
}, | |
equals: function Ia(d) { | |
return this === d ? !0 : d instanceof og ? Ia.base.call(this, d) && this.keyPairId == d.keyPairId && Nb(this.encryptionKey, d.encryptionKey) && Nb(this.hmacKey, d.hmacKey) : !1; | |
}, | |
uniqueKey: function sa() { | |
return sa.base.call(this) + ":" + this.keyPairId + ":" + Rb(this.encryptionKey) + ":" + Rb(this.hmacKey); | |
} | |
}); | |
eh = vc.extend({ | |
init: function a() { | |
a.base.call(this, oc.ASYMMETRIC_WRAPPED); | |
}, | |
createRequestData: function(a, t, c) { | |
O(t, c); | |
}, | |
createResponseData: function(a, t, c) { | |
a = c.keypairid; | |
var b = c.encryptionkey, | |
k = c.hmackey; | |
if (!a || "string" !== typeof a || !b || "string" !== typeof b || !k || "string" !== typeof k) throw new ja(d.JSON_PARSE_ERROR, "keydata " + JSON.stringify(c)); | |
var h; | |
try { | |
h = Ea(b); | |
} catch (g) { | |
throw new N(d.INVALID_ENCRYPTION_KEY, "keydata " + JSON.stringify(c), g); | |
} | |
var n; | |
try { | |
n = Ea(k); | |
} catch (g) { | |
throw new N(d.INVALID_HMAC_KEY, "keydata " + JSON.stringify(c), g); | |
} | |
return new H(t, a, h, n); | |
}, | |
generateResponse: function(a, t, c, b) { | |
function k(g, l) { | |
m(b, function() { | |
var f = p(a, t.keyPairId, t.mechanism, null, t.publicKey); | |
f.wrap(g, { | |
result: function(a) { | |
m(b, function() { | |
f.wrap(l, { | |
result: function(b) { | |
h(g, a, l, b); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && c instanceof nc && a.setEntity(c); | |
throw a; | |
}, n); | |
} | |
}); | |
}, n); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && c instanceof nc && a.setEntity(c); | |
throw a; | |
}, n); | |
} | |
}); | |
}, n); | |
} | |
function h(g, l, f, h) { | |
m(b, function() { | |
var k = a.getTokenFactory(); | |
c instanceof nc ? k.renewMasterToken(a, c, g, f, { | |
result: function(c) { | |
m(b, function() { | |
var f = new hc(a, c), | |
g = new H(c, t.keyPairId, l, h); | |
return new vc.KeyExchangeData(g, f, b); | |
}, n); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && a.setEntity(c); | |
throw a; | |
}, n); | |
} | |
}) : k.createMasterToken(a, c, g, f, { | |
result: function(c) { | |
m(b, function() { | |
var f = new hc(a, c), | |
g = new H(c, t.keyPairId, l, h); | |
return new vc.KeyExchangeData(g, f, b); | |
}, n); | |
}, | |
error: b.error | |
}); | |
}, n); | |
} | |
var n = this; | |
m(b, function() { | |
if (!(t instanceof r)) throw new ca("Key request data " + JSON.stringify(t) + " was not created by this factory."); | |
this.generateSessionKeys(a, { | |
result: function(a) { | |
k(a.encryptionKey, a.hmacKey); | |
}, | |
error: function(a) { | |
m(b, function() { | |
a instanceof D && c instanceof nc && a.setEntity(c); | |
throw a; | |
}, n); | |
} | |
}); | |
}, n); | |
}, | |
getCryptoContext: function(a, t, c, b, k) { | |
var h = this; | |
m(k, function() { | |
if (!(t instanceof r)) throw new ca("Key request data " + JSON.stringify(t) + " was not created by this factory."); | |
if (!(c instanceof H)) throw new ca("Key response data " + JSON.stringify(c) + " was not created by this factory."); | |
var n = t.keyPairId, | |
g = c.keyPairId; | |
if (n != g) throw (new ab(d.KEYX_RESPONSE_REQUEST_MISMATCH, "request " + n + "; response " + g)).setEntity(b); | |
g = t.privateKey; | |
if (!g) throw (new ab(d.KEYX_PRIVATE_KEY_MISSING, "request Asymmetric private key")).setEntity(b); | |
var l = p(a, n, t.mechanism, g, null); | |
l.unwrap(c.encryptionKey, Jc, nd, { | |
result: function(f) { | |
l.unwrap(c.hmacKey, Kc, pd, { | |
result: function(l) { | |
a.getEntityAuthenticationData(null, { | |
result: function(b) { | |
m(k, function() { | |
var g = b.getIdentity(); | |
return new hc(a, c.masterToken, g, f, l); | |
}, h); | |
}, | |
error: function(a) { | |
m(k, function() { | |
a instanceof D && a.setEntity(b); | |
throw a; | |
}, h); | |
} | |
}); | |
}, | |
error: function(a) { | |
m(k, function() { | |
a instanceof D && a.setEntity(b); | |
throw a; | |
}, h); | |
} | |
}); | |
}, | |
error: function(a) { | |
m(k, function() { | |
a instanceof D && a.setEntity(b); | |
throw a; | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
}); | |
})(); | |
var hj = ea.Class.create({ | |
init: function(d) { | |
var m = ob.parser(), | |
p = [], | |
r = [], | |
H, C, I, L = 0, | |
va = !1; | |
m.onerror = function(d) { | |
va || (va = !0, m.end()); | |
}; | |
m.onopenobject = function(d) { | |
if (H) H[I] = {}, r.push(H), H = H[I]; | |
else if (C) { | |
var m = {}; | |
r.push(C); | |
C.push(m); | |
H = m; | |
C = na; | |
} else H = {}; | |
I = d; | |
}; | |
m.oncloseobject = function() { | |
var d = r.pop(); | |
d ? "object" === typeof d ? H = d : (H = na, C = d) : (p.push(H), L = m.index, H = na); | |
}; | |
m.onopenarray = function() { | |
if (H) H[I] = [], r.push(H), C = H[I], H = na; | |
else if (C) { | |
var d = []; | |
r.push(C); | |
C.push(d); | |
C = d; | |
} else C = []; | |
}; | |
m.onclosearray = function() { | |
var d = r.pop(); | |
d ? "object" === typeof d ? (H = d, C = na) : C = d : (p.push(C), L = m.index, C = na); | |
}; | |
m.onkey = function(d) { | |
I = d; | |
}; | |
m.onvalue = function(d) { | |
H ? H[I] = d : C ? C.push(d) : (p.push(d), L = m.index); | |
}; | |
m.write(d).close(); | |
Object.defineProperties(this, { | |
_values: { | |
value: p, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_lastIndex: { | |
value: L, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
more: function() { | |
return 0 < this._values.length; | |
}, | |
nextValue: function() { | |
return 0 == this._values.length ? na : this._values.shift(); | |
}, | |
lastIndex: function() { | |
return this._lastIndex; | |
} | |
}), | |
pg, qg, rg, sg, tg, pf; | |
(function() { | |
var p = qg = "entityauthdata", | |
r = rg = "mastertoken", | |
F = sg = "headerdata", | |
O = tg = "errordata", | |
H = pf = "signature"; | |
pg = function(C, I, B, va) { | |
m(va, function() { | |
var m = I[p], | |
L = I[r], | |
sa = I[H]; | |
if (m && "object" !== typeof m || L && "object" !== typeof L || "string" !== typeof sa) throw new ja(d.JSON_PARSE_ERROR, "header/errormsg " + JSON.stringify(I)); | |
var a; | |
try { | |
a = Ea(sa); | |
} catch (b) { | |
throw new Oa(d.HEADER_SIGNATURE_INVALID, "header/errormsg " + JSON.stringify(I), b); | |
} | |
var t = null; | |
m && (t = nh(C, m)); | |
var c = I[F]; | |
if (c != na && null != c) { | |
if ("string" !== typeof c) throw new ja(d.JSON_PARSE_ERROR, "header/errormsg " + JSON.stringify(I)); | |
L ? qd(C, L, { | |
result: function(b) { | |
qf(C, c, t, b, a, B, va); | |
}, | |
error: function(a) { | |
va.error(a); | |
} | |
}) : qf(C, c, t, null, a, B, va); | |
} else if (m = I[O], m != na && null != m) { | |
if ("string" !== typeof m) throw new ja(d.JSON_PARSE_ERROR, "header/errormsg " + JSON.stringify(I)); | |
ug(C, m, t, a, va); | |
} else throw new ja(d.JSON_PARSE_ERROR, JSON.stringify(I)); | |
}); | |
}; | |
})(); | |
var kd, yh, ug; | |
(function() { | |
function r(d, m) { | |
this.errordata = d; | |
this.signature = m; | |
} | |
kd = ea.Class.create({ | |
init: function(p, r, O, H, C, I, L, va, db, Ia) { | |
var B = this; | |
m(Ia, function() { | |
0 > I && (I = -1); | |
if (0 > H || H > Ka) throw new ca("Message ID " + H + " is out of range."); | |
if (!r) throw new Oa(d.MESSAGE_ENTITY_NOT_FOUND); | |
if (db) return Object.defineProperties(this, { | |
entityAuthenticationData: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
}, | |
recipient: { | |
value: O, | |
writable: !1, | |
configurable: !1 | |
}, | |
messageId: { | |
value: H, | |
writable: !1, | |
configurable: !1 | |
}, | |
errorCode: { | |
value: C, | |
writable: !1, | |
configurable: !1 | |
}, | |
internalCode: { | |
value: I, | |
writable: !1, | |
configurable: !1 | |
}, | |
errorMessage: { | |
value: L, | |
writable: !1, | |
configurable: !1 | |
}, | |
userMessage: { | |
value: va, | |
writable: !1, | |
configurable: !1 | |
}, | |
errordata: { | |
value: db.errordata, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: db.signature, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}), this; | |
var a = {}; | |
O && (a.recipient = O); | |
a.messageid = H; | |
a.errorcode = C; | |
0 < I && (a.internalcode = I); | |
L && (a.errormsg = L); | |
va && (a.usermsg = va); | |
var t; | |
try { | |
t = p.getEntityAuthenticationFactory(r.scheme).getCryptoContext(p, r); | |
} catch (c) { | |
throw c instanceof D && (c.setEntity(r), c.setMessageId(H)), c; | |
} | |
a = mb(JSON.stringify(a), Na); | |
t.encrypt(a, { | |
result: function(a) { | |
m(Ia, function() { | |
t.sign(a, { | |
result: function(b) { | |
m(Ia, function() { | |
Object.defineProperties(this, { | |
entityAuthenticationData: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
}, | |
recipient: { | |
value: O, | |
writable: !1, | |
configurable: !1 | |
}, | |
messageId: { | |
value: H, | |
writable: !1, | |
configurable: !1 | |
}, | |
errorCode: { | |
value: C, | |
writable: !1, | |
configurable: !1 | |
}, | |
internalCode: { | |
value: I, | |
writable: !1, | |
configurable: !1 | |
}, | |
errorMessage: { | |
value: L, | |
writable: !1, | |
configurable: !1 | |
}, | |
userMessage: { | |
value: va, | |
writable: !1, | |
configurable: !1 | |
}, | |
errordata: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, B); | |
}, | |
error: function(a) { | |
m(Ia, function() { | |
a instanceof D && (a.setEntity(r), a.setMessageId(H)); | |
throw a; | |
}, B); | |
} | |
}); | |
}, B); | |
}, | |
error: function(a) { | |
m(Ia, function() { | |
a instanceof D && (a.setEntity(r), a.setMessageId(H)); | |
throw a; | |
}, B); | |
} | |
}); | |
}, B); | |
}, | |
toJSON: function() { | |
var d = {}; | |
d[qg] = this.entityAuthenticationData; | |
d[tg] = qa(this.errordata); | |
d[pf] = qa(this.signature); | |
return d; | |
} | |
}); | |
yh = function(d, m, p, r, C, I, L, va, db) { | |
new kd(d, m, p, r, C, I, L, va, null, db); | |
}; | |
ug = function(B, F, O, H, C) { | |
m(C, function() { | |
if (!O) throw new Oa(d.MESSAGE_ENTITY_NOT_FOUND); | |
var I; | |
try { | |
var L = O.scheme, | |
va = B.getEntityAuthenticationFactory(L); | |
if (!va) throw new Vc(d.ENTITYAUTH_FACTORY_NOT_FOUND, L); | |
I = va.getCryptoContext(B, O); | |
} catch (db) { | |
throw db instanceof D && db.setEntity(O), db; | |
} | |
try { | |
F = Ea(F); | |
} catch (db) { | |
throw (new Oa(d.HEADER_DATA_INVALID, F, db)).setEntity(O); | |
} | |
if (!F || 0 == F.length) throw (new Oa(d.HEADER_DATA_MISSING, F)).setEntity(O); | |
I.verify(F, H, { | |
result: function(va) { | |
m(C, function() { | |
if (!va) throw (new N(d.MESSAGE_VERIFICATION_FAILED)).setEntity(O); | |
I.decrypt(F, { | |
result: function(I) { | |
m(C, function() { | |
var m = Qa(I, Na), | |
a; | |
try { | |
a = JSON.parse(m); | |
} catch (l) { | |
if (l instanceof SyntaxError) throw (new ja(d.JSON_PARSE_ERROR, "errordata " + m, l)).setEntity(O); | |
throw l; | |
} | |
var t = a.recipient !== na ? a.recipient : null, | |
c = parseInt(a.messageid), | |
b = parseInt(a.errorcode), | |
k = parseInt(a.internalcode), | |
h = a.errormsg, | |
n = a.usermsg; | |
if (t && "string" !== typeof t || !c || c != c || !b || b != b || a.internalcode && k != k || h && "string" !== typeof h || n && "string" !== typeof n) throw (new ja(d.JSON_PARSE_ERROR, "errordata " + m)).setEntity(O); | |
if (0 > c || c > Ka) throw (new Oa(d.MESSAGE_ID_OUT_OF_RANGE, "errordata " + m)).setEntity(O); | |
a = !1; | |
for (var g in p) | |
if (p[g] == b) { | |
a = !0; | |
break; | |
} | |
a || (b = p.FAIL); | |
if (k) { | |
if (0 > k) throw (new Oa(d.INTERNAL_CODE_NEGATIVE, "errordata " + m)).setEntity(O).setMessageId(c); | |
} else k = -1; | |
m = new r(F, H); | |
new kd(B, O, t, c, b, k, h, n, m, C); | |
}); | |
}, | |
error: function(d) { | |
m(C, function() { | |
d instanceof D && d.setEntity(O); | |
throw d; | |
}); | |
} | |
}); | |
}); | |
}, | |
error: function(d) { | |
m(C, function() { | |
d instanceof D && d.setEntity(O); | |
throw d; | |
}); | |
} | |
}); | |
}); | |
}; | |
})(); | |
var jj = ea.Class.create({ | |
getUserMessage: function(d, m) {} | |
}), | |
Fe, zh, rf; | |
(function() { | |
rf = function(d, m) { | |
if (!d || !m) return null; | |
var p = d.compressionAlgorithms.filter(function(d) { | |
for (var p = 0; p < m.compressionAlgorithms.length; ++p) | |
if (d == m.compressionAlgorithms[p]) return !0; | |
return !1; | |
}), | |
r = d.languages.filter(function(d) { | |
for (var p = 0; p < m.languages.length; ++p) | |
if (d == m.languages[p]) return !0; | |
return !1; | |
}); | |
return new Fe(p, r); | |
}; | |
Fe = ea.Class.create({ | |
init: function(d, m) { | |
d || (d = []); | |
m || (m = []); | |
d.sort(); | |
Object.defineProperties(this, { | |
compressionAlgorithms: { | |
value: d, | |
writable: !1, | |
enumerable: !0, | |
configurable: !1 | |
}, | |
languages: { | |
value: m, | |
writable: !1, | |
enumerable: !0, | |
configurable: !1 | |
} | |
}); | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.compressionalgos = this.compressionAlgorithms; | |
d.languages = this.languages; | |
return d; | |
}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof Fe ? ah(this.compressionAlgorithms, d.compressionAlgorithms) && ah(this.languages, d.languages) : !1; | |
}, | |
uniqueKey: function() { | |
return this.compressionAlgorithms.join(":") + "|" + this.languages.join(":"); | |
} | |
}); | |
zh = function(m) { | |
var p = m.compressionalgos, | |
r = m.languages; | |
if (p && !(p instanceof Array) || r && !(r instanceof Array)) throw new ja(d.JSON_PARSE_ERROR, "capabilities " + JSON.stringify(m)); | |
m = []; | |
for (var O = 0; p && O < p.length; ++O) { | |
var H = p[O]; | |
Cd[H] && m.push(H); | |
} | |
return new Fe(m, r); | |
}; | |
})(); | |
var Xd, vg, qf, wg, Ah; | |
(function() { | |
function p(a, t, c, b, k) { | |
this.customer = a; | |
this.sender = t; | |
this.messageCryptoContext = c; | |
this.headerdata = b; | |
this.signature = k; | |
} | |
function r(a, t, c, b, k, h, n, g, l, f, q, v, A, d, E, z, x, u, M, P) { | |
return { | |
cryptoContext: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
customer: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
}, | |
entityAuthenticationData: { | |
value: b, | |
writable: !1, | |
configurable: !1 | |
}, | |
masterToken: { | |
value: k, | |
writable: !1, | |
configurable: !1 | |
}, | |
sender: { | |
value: h, | |
writable: !1, | |
configurable: !1 | |
}, | |
messageId: { | |
value: n, | |
writable: !1, | |
configurable: !1 | |
}, | |
nonReplayableId: { | |
value: z, | |
writable: !1, | |
configurable: !1 | |
}, | |
keyRequestData: { | |
value: g, | |
writable: !1, | |
configurable: !1 | |
}, | |
keyResponseData: { | |
value: l, | |
writable: !1, | |
configurable: !1 | |
}, | |
userAuthenticationData: { | |
value: f, | |
writable: !1, | |
configurable: !1 | |
}, | |
userIdToken: { | |
value: q, | |
writable: !1, | |
configurable: !1 | |
}, | |
serviceTokens: { | |
value: v, | |
writable: !1, | |
configurable: !1 | |
}, | |
peerMasterToken: { | |
value: A, | |
writable: !1, | |
configurable: !1 | |
}, | |
peerUserIdToken: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
peerServiceTokens: { | |
value: E, | |
writable: !1, | |
configurable: !1 | |
}, | |
messageCapabilities: { | |
value: u, | |
writable: !1, | |
configurable: !1 | |
}, | |
renewable: { | |
value: x, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
headerdata: { | |
value: M, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: P, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
} | |
function F(a, t, c) { | |
if (c) { | |
if (t = a.getMslStore().getCryptoContext(c)) return t; | |
if (!c.isVerified() || !c.isDecrypted()) throw new Dd(d.MASTERTOKEN_UNTRUSTED, c); | |
return new hc(a, c); | |
} | |
c = t.scheme; | |
var b = a.getEntityAuthenticationFactory(c); | |
if (!b) throw new Vc(d.ENTITYAUTH_FACTORY_NOT_FOUND, c); | |
return b.getCryptoContext(a, t); | |
} | |
function O(a, t, c, b, k) { | |
m(k, function() { | |
t.verify(c, b, { | |
result: function(a) { | |
m(k, function() { | |
if (!a) throw new N(d.MESSAGE_VERIFICATION_FAILED); | |
t.decrypt(c, { | |
result: function(a) { | |
m(k, function() { | |
return Qa(a, Na); | |
}); | |
}, | |
error: function(a) { | |
k.error(a); | |
} | |
}); | |
}); | |
}, | |
error: function(a) { | |
k.error(a); | |
} | |
}); | |
}); | |
} | |
function H(a, t, c) { | |
m(c, function() { | |
if (t) uh(a, t, c); | |
else return null; | |
}); | |
} | |
function C(a, t, c, b) { | |
m(b, function() { | |
if (t) Gd(a, t, c, b); | |
else return null; | |
}); | |
} | |
function I(a, t, c, b) { | |
m(b, function() { | |
if (c) Bh(a, t, c, b); | |
else return null; | |
}); | |
} | |
function nb(a, t, c, b, k, h, n) { | |
function g(f, n, v) { | |
if (n >= f.length) { | |
var q = [], | |
t; | |
for (t in l) q.push(l[t]); | |
v.result(q); | |
} else { | |
q = f[n]; | |
if ("object" !== typeof q) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + h); | |
Ge(a, q, c, b, k, { | |
result: function(a) { | |
m(v, function() { | |
l[a.uniqueKey()] = a; | |
g(f, n + 1, v); | |
}); | |
}, | |
error: function(a) { | |
v.error(a); | |
} | |
}); | |
} | |
} | |
var l = {}; | |
m(n, function() { | |
if (t) { | |
if (!(t instanceof Array)) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + h); | |
g(t, 0, n); | |
} else return []; | |
}); | |
} | |
function va(a, t, c, b, k, h) { | |
function n(a, b, c) { | |
m(c, function() { | |
var f = b.peermastertoken; | |
if (f && "object" !== typeof f) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + k); | |
if (!f) return null; | |
qd(a, f, c); | |
}); | |
} | |
function g(a, b, c, g) { | |
m(g, function() { | |
var f = b.peeruseridtoken; | |
if (f && "object" !== typeof f) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + k); | |
if (!f) return null; | |
Gd(a, f, c, g); | |
}); | |
} | |
m(h, function() { | |
if (!a.isPeerToPeer()) return { | |
peerMasterToken: null, | |
peerUserIdToken: null, | |
peerServiceTokens: [] | |
}; | |
n(a, t, { | |
result: function(l) { | |
m(h, function() { | |
var f = c ? c.masterToken : l; | |
g(a, t, f, { | |
result: function(c) { | |
m(h, function() { | |
nb(a, t.peerservicetokens, f, c, b, k, { | |
result: function(a) { | |
m(h, function() { | |
return { | |
peerMasterToken: l, | |
peerUserIdToken: c, | |
peerServiceTokens: a | |
}; | |
}); | |
}, | |
error: function(a) { | |
m(h, function() { | |
a instanceof D && (a.setEntity(f), a.setUser(c)); | |
throw a; | |
}); | |
} | |
}); | |
}); | |
}, | |
error: function(a) { | |
m(h, function() { | |
a instanceof D && a.setEntity(f); | |
throw a; | |
}); | |
} | |
}); | |
}); | |
}, | |
error: h.error | |
}); | |
}); | |
} | |
function db(a, t, c, b) { | |
function k(c, g) { | |
m(b, function() { | |
if (g >= c.length) return h; | |
th(a, c[g], { | |
result: function(a) { | |
m(b, function() { | |
h.push(a); | |
k(c, g + 1); | |
}); | |
}, | |
error: function(a) { | |
b.error(a); | |
} | |
}); | |
}); | |
} | |
var h = []; | |
m(b, function() { | |
var a = t.keyrequestdata; | |
if (!a) return h; | |
if (!(a instanceof Array)) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + c); | |
k(a, 0); | |
}); | |
} | |
var Ia = wg = ea.Class.create({ | |
init: function(a, t, c, b, k, h, n, g, l) { | |
Object.defineProperties(this, { | |
messageId: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
nonReplayableId: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
renewable: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
}, | |
capabilities: { | |
value: b, | |
writable: !1, | |
configurable: !1 | |
}, | |
keyRequestData: { | |
value: k, | |
writable: !1, | |
configurable: !1 | |
}, | |
keyResponseData: { | |
value: h, | |
writable: !1, | |
configurable: !1 | |
}, | |
userAuthData: { | |
value: n, | |
writable: !1, | |
configurable: !1 | |
}, | |
userIdToken: { | |
value: g, | |
writable: !1, | |
configurable: !1 | |
}, | |
serviceTokens: { | |
value: l, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
}), | |
sa = Ah = ea.Class.create({ | |
init: function(a, t, c) { | |
Object.defineProperties(this, { | |
peerMasterToken: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
peerUserIdToken: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
peerServiceTokens: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
}); | |
Xd = ea.Class.create({ | |
init: function(a, t, c, b, k, h, n) { | |
function g(f) { | |
m(n, function() { | |
t = c ? null : t; | |
var g = b.nonReplayableId, | |
v = b.renewable, | |
A = b.capabilities, | |
d = b.messageId, | |
E = b.keyRequestData ? b.keyRequestData : [], | |
z = b.keyResponseData, | |
x = b.userAuthData, | |
u = b.userIdToken, | |
M = b.serviceTokens ? b.serviceTokens : [], | |
P, V, p; | |
a.isPeerToPeer() ? (P = k.peerMasterToken, V = k.peerUserIdToken, p = k.peerServiceTokens ? k.peerServiceTokens : []) : (V = P = null, p = []); | |
if (0 > d || d > Ka) throw new ca("Message ID " + d + " is out of range."); | |
if (!t && !c) throw new ca("Message entity authentication data or master token must be provided."); | |
var ia, ha; | |
z ? a.isPeerToPeer() ? (ia = c, ha = z.masterToken) : (ia = z.masterToken, ha = P) : (ia = c, ha = P); | |
if (u && (!ia || !u.isBoundTo(ia))) throw new ca("User ID token must be bound to a master token."); | |
if (V && (!ha || !V.isBoundTo(ha))) throw new ca("Peer user ID token must be bound to a peer master token."); | |
M.forEach(function(a) { | |
if (a.isMasterTokenBound() && (!ia || !a.isBoundTo(ia))) throw new ca("Master token bound service tokens must be bound to the provided master token."); | |
if (a.isUserIdTokenBound() && (!u || !a.isBoundTo(u))) throw new ca("User ID token bound service tokens must be bound to the provided user ID token."); | |
}, this); | |
p.forEach(function(a) { | |
if (a.isMasterTokenBound() && (!ha || !a.isBoundTo(ha))) throw new ca("Master token bound peer service tokens must be bound to the provided peer master token."); | |
if (a.isUserIdTokenBound() && (!V || !a.isBoundTo(V))) throw new ca("User ID token bound peer service tokens must be bound to the provided peer user ID token."); | |
}, this); | |
if (h) { | |
var C = h.customer, | |
da = h.messageCryptoContext, | |
W = r(a, da, C, t, c, f, d, E, z, x, u, M, P, V, p, g, v, A, h.headerdata, h.signature); | |
Object.defineProperties(this, W); | |
return this; | |
} | |
var C = u ? u.customer : null, | |
W = {}; | |
f && (W.sender = f); | |
W.messageid = d; | |
"number" === typeof g && (W.nonreplayableid = g); | |
W.renewable = v; | |
A && (W.capabilities = A); | |
0 < E.length && (W.keyrequestdata = E); | |
z && (W.keyresponsedata = z); | |
x && (W.userauthdata = x); | |
u && (W.useridtoken = u); | |
0 < M.length && (W.servicetokens = M); | |
P && (W.peermastertoken = P); | |
V && (W.peeruseridtoken = V); | |
0 < p.length && (W.peerservicetokens = p); | |
var da; | |
try { | |
da = F(a, t, c); | |
} catch (la) { | |
throw la instanceof D && (la.setEntity(c), la.setEntity(t), la.setUser(u), la.setUser(x), la.setMessageId(d)), la; | |
} | |
W = mb(JSON.stringify(W), Na); | |
da.encrypt(W, { | |
result: function(b) { | |
m(n, function() { | |
da.sign(b, { | |
result: function(h) { | |
m(n, function() { | |
var l = r(a, da, C, t, c, f, d, E, z, x, u, M, P, V, p, g, v, A, b, h); | |
Object.defineProperties(this, l); | |
return this; | |
}, l); | |
}, | |
error: function(a) { | |
m(n, function() { | |
a instanceof D && (a.setEntity(c), a.setEntity(t), a.setUser(u), a.setUser(x), a.setMessageId(d)); | |
throw a; | |
}, l); | |
} | |
}); | |
}, l); | |
}, | |
error: function(a) { | |
m(n, function() { | |
a instanceof D && (a.setEntity(c), a.setEntity(t), a.setUser(u), a.setUser(x), a.setMessageId(d)); | |
throw a; | |
}, l); | |
} | |
}); | |
}, l); | |
} | |
var l = this; | |
m(n, function() { | |
h ? g(h.sender) : c ? a.getEntityAuthenticationData(null, { | |
result: function(a) { | |
a = a.getIdentity(); | |
g(a); | |
}, | |
error: n.error | |
}) : g(null); | |
}, l); | |
}, | |
isEncrypting: function() { | |
return this.masterToken || $f(this.entityAuthenticationData.scheme); | |
}, | |
isRenewable: function() { | |
return this.renewable; | |
}, | |
toJSON: function() { | |
var a = {}; | |
this.masterToken ? a[rg] = this.masterToken : a[qg] = this.entityAuthenticationData; | |
a[sg] = qa(this.headerdata); | |
a[pf] = qa(this.signature); | |
return a; | |
} | |
}); | |
vg = function(a, t, c, b, k, h) { | |
new Xd(a, t, c, b, k, null, h); | |
}; | |
qf = function(a, t, c, b, k, h, n) { | |
m(n, function() { | |
c = b ? null : c; | |
if (!c && !b) throw new Oa(d.MESSAGE_ENTITY_NOT_FOUND); | |
var g = t; | |
try { | |
t = Ea(g); | |
} catch (f) { | |
throw new Oa(d.HEADER_DATA_INVALID, g, f); | |
} | |
if (!t || 0 == t.length) throw new Oa(d.HEADER_DATA_MISSING, g); | |
var l; | |
try { | |
l = F(a, c, b); | |
} catch (f) { | |
throw f instanceof D && (f.setEntity(b), f.setEntity(c)), f; | |
} | |
O(a, l, t, k, { | |
result: function(f) { | |
m(n, function() { | |
var g; | |
try { | |
g = JSON.parse(f); | |
} catch (z) { | |
if (z instanceof SyntaxError) throw (new ja(d.JSON_PARSE_ERROR, "headerdata " + f, z)).setEntity(b).setEntity(c); | |
throw z; | |
} | |
var v = parseInt(g.messageid); | |
if (!v || v != v) throw (new ja(d.JSON_PARSE_ERROR, "headerdata " + f)).setEntity(b).setEntity(c); | |
if (0 > v || v > Ka) throw (new Oa(d.MESSAGE_ID_OUT_OF_RANGE, "headerdata " + f)).setEntity(b).setEntity(c); | |
var A = b ? g.sender : null; | |
if (b && (!A || "string" !== typeof A)) throw (new ja(d.JSON_PARSE_ERROR, "headerdata " + f)).setEntity(b).setEntity(c).setMessageId(v); | |
var J = g.keyresponsedata; | |
if (J && "object" !== typeof J) throw (new ja(d.JSON_PARSE_ERROR, "headerdata " + f)).setEntity(b).setEntity(c).setMessageId(v); | |
var E = n; | |
n = { | |
result: function(a) { | |
E.result(a); | |
}, | |
error: function(a) { | |
a instanceof D && (a.setEntity(b), a.setEntity(c), a.setMessageId(v)); | |
E.error(a); | |
} | |
}; | |
H(a, J, { | |
result: function(q) { | |
m(n, function() { | |
var x = !a.isPeerToPeer() && q ? q.masterToken : b, | |
z = g.useridtoken; | |
if (z && "object" !== typeof z) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + f); | |
C(a, z, x, { | |
result: function(z) { | |
m(n, function() { | |
var J = g.userauthdata; | |
if (J && "object" !== typeof J) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + f); | |
I(a, x, J, { | |
result: function(J) { | |
m(n, function() { | |
var u; | |
if (J) { | |
var E = J.scheme, | |
M = a.getUserAuthenticationFactory(E); | |
if (!M) throw (new Ma(d.USERAUTH_FACTORY_NOT_FOUND, E)).setUser(z).setUser(J); | |
E = b ? b.identity : c.getIdentity(); | |
u = M.authenticate(a, E, J, z); | |
} else u = z ? z.customer : null; | |
nb(a, g.servicetokens, x, z, h, f, { | |
result: function(x) { | |
m(n, function() { | |
var E = g.nonreplayableid !== na ? parseInt(g.nonreplayableid) : null, | |
M = g.renewable; | |
if (E != E || "boolean" !== typeof M) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + f); | |
if (0 > E || E > Ka) throw new Oa(d.NONREPLAYABLE_ID_OUT_OF_RANGE, "headerdata " + f); | |
var P = null, | |
V = g.capabilities; | |
if (V) { | |
if ("object" !== typeof V) throw new ja(d.JSON_PARSE_ERROR, "headerdata " + f); | |
P = zh(V); | |
} | |
db(a, g, f, { | |
result: function(d) { | |
va(a, g, q, h, f, { | |
result: function(f) { | |
m(n, function() { | |
var g = f.peerMasterToken, | |
h = f.peerUserIdToken, | |
m = f.peerServiceTokens, | |
V = new Ia(v, E, M, P, d, q, J, z, x), | |
g = new sa(g, h, m), | |
h = new p(u, A, l, t, k); | |
new Xd(a, c, b, V, g, h, n); | |
}); | |
}, | |
error: n.error | |
}); | |
}, | |
error: function(a) { | |
m(n, function() { | |
a instanceof D && (a.setUser(z), a.setUser(J)); | |
throw a; | |
}); | |
} | |
}); | |
}); | |
}, | |
error: function(a) { | |
m(n, function() { | |
a instanceof D && (a.setEntity(x), a.setUser(z), a.setUser(J)); | |
throw a; | |
}); | |
} | |
}); | |
}); | |
}, | |
error: n.error | |
}); | |
}); | |
}, | |
error: n.error | |
}); | |
}); | |
}, | |
error: n.error | |
}); | |
}); | |
}, | |
error: n.error | |
}); | |
}); | |
}; | |
})(); | |
var He, Ch, Dh; | |
(function() { | |
function p(d, m) { | |
this.payload = d; | |
this.signature = m; | |
} | |
He = ea.Class.create({ | |
init: function(d, p, r, H, C, I, L, va) { | |
var B = this; | |
m(va, function() { | |
if (0 > d || d > Ka) throw new ca("Sequence number " + d + " is outside the valid range."); | |
if (0 > p || p > Ka) throw new ca("Message ID " + p + " is outside the valid range."); | |
if (L) return Object.defineProperties(this, { | |
sequenceNumber: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
messageId: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
compressionAlgo: { | |
value: H, | |
writable: !1, | |
configurable: !1 | |
}, | |
data: { | |
value: C, | |
writable: !1, | |
configurable: !1 | |
}, | |
endofmsg: { | |
value: r, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
payload: { | |
value: L.payload, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: L.signature, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}), this; | |
var F; | |
H ? (F = xg(H, C), F || (H = null, F = C)) : (H = null, F = C); | |
var O = {}; | |
O.sequencenumber = d; | |
O.messageid = p; | |
r && (O.endofmsg = r); | |
H && (O.compressionalgo = H); | |
O.data = qa(F); | |
F = mb(JSON.stringify(O), Na); | |
I.encrypt(F, { | |
result: function(a) { | |
m(va, function() { | |
I.sign(a, { | |
result: function(t) { | |
m(va, function() { | |
Object.defineProperties(this, { | |
sequenceNumber: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
messageId: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
compressionAlgo: { | |
value: H, | |
writable: !1, | |
configurable: !1 | |
}, | |
data: { | |
value: C, | |
writable: !1, | |
configurable: !1 | |
}, | |
endofmsg: { | |
value: r, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
payload: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: t, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, B); | |
}, | |
error: function(a) { | |
va.error(a); | |
} | |
}); | |
}, B); | |
}, | |
error: function(a) { | |
va.error(a); | |
} | |
}); | |
}, B); | |
}, | |
isEndOfMessage: function() { | |
return this.endofmsg; | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.payload = qa(this.payload); | |
d.signature = qa(this.signature); | |
return d; | |
} | |
}); | |
Ch = function(d, m, p, r, C, I, L) { | |
new He(d, m, p, r, C, I, null, L); | |
}; | |
Dh = function(r, F, O) { | |
m(O, function() { | |
var B = r.payload, | |
C = r.signature; | |
if (!B || "string" !== typeof B || "string" !== typeof C) throw new ja(d.JSON_PARSE_ERROR, "payload chunk " + JSON.stringify(r)); | |
var I, L; | |
try { | |
I = Ea(B); | |
} catch (va) { | |
throw new Oa(d.PAYLOAD_INVALID, "payload chunk " + JSON.stringify(r), va); | |
} | |
try { | |
L = Ea(C); | |
} catch (va) { | |
throw new Oa(d.PAYLOAD_SIGNATURE_INVALID, "payload chunk " + JSON.stringify(r), va); | |
} | |
F.verify(I, L, { | |
result: function(C) { | |
m(O, function() { | |
if (!C) throw new N(d.PAYLOAD_VERIFICATION_FAILED); | |
F.decrypt(I, { | |
result: function(C) { | |
m(O, function() { | |
var m = Qa(C, Na), | |
r; | |
try { | |
r = JSON.parse(m); | |
} catch (h) { | |
if (h instanceof SyntaxError) throw new ja(d.JSON_PARSE_ERROR, "payload chunk payload " + m, h); | |
throw h; | |
} | |
var a = parseInt(r.sequencenumber), | |
t = parseInt(r.messageid), | |
c = r.endofmsg, | |
b = r.compressionalgo; | |
r = r.data; | |
if (!a || a != a || !t || t != t || c && "boolean" !== typeof c || b && "string" !== typeof b || "string" !== typeof r) throw new ja(d.JSON_PARSE_ERROR, "payload chunk payload " + m); | |
if (0 > a || a > Ka) throw new D(d.PAYLOAD_SEQUENCE_NUMBER_OUT_OF_RANGE, "payload chunk payload " + m); | |
if (0 > t || t > Ka) throw new D(d.PAYLOAD_MESSAGE_ID_OUT_OF_RANGE, "payload chunk payload " + m); | |
c || (c = !1); | |
if (b && !Cd[b]) throw new Oa(d.UNIDENTIFIED_COMPRESSION, b); | |
var k; | |
try { | |
k = Ea(r); | |
} catch (h) { | |
throw new Oa(d.PAYLOAD_DATA_CORRUPT, r, h); | |
} | |
if (k && 0 != k.length) m = b ? sf(b, k) : k; | |
else { | |
if (0 < r.length) throw new Oa(d.PAYLOAD_DATA_CORRUPT, r); | |
if (c) m = new Uint8Array(0); | |
else throw new Oa(d.PAYLOAD_DATA_MISSING, r); | |
} | |
k = new p(I, L); | |
new He(a, t, c, b, m, F, k, O); | |
}); | |
}, | |
error: function(d) { | |
O.error(d); | |
} | |
}); | |
}); | |
}, | |
error: function(d) { | |
O.error(d); | |
} | |
}); | |
}); | |
}; | |
})(); | |
var tf, rd, Yd, sd, Eh, Fh; | |
(function() { | |
function p(p, r, B, F, H) { | |
function C() { | |
m(H, function() { | |
a >= r.length && (a = 0, ++I); | |
if (I >= t.length) { | |
if (c) throw c; | |
throw new ab(d.KEYX_FACTORY_NOT_FOUND, JSON.stringify(r)); | |
} | |
var k = t[I], | |
h = r[a]; | |
k.scheme != h.keyExchangeScheme ? (++a, C()) : k.generateResponse(p, h, b, { | |
result: function(a) { | |
H.result(a); | |
}, | |
error: function(b) { | |
m(H, function() { | |
if (!(b instanceof D)) throw b; | |
c = b; | |
++a; | |
C(); | |
}); | |
} | |
}); | |
}); | |
} | |
var I = 0, | |
a = 0, | |
t = p.getKeyExchangeFactories(), | |
c, b = B ? B : F; | |
C(); | |
} | |
function r(d, r, B, F, H) { | |
m(H, function() { | |
var C = r.keyRequestData; | |
if (r.isRenewable() && 0 < C.length) F ? F.isRenewable() || F.isExpired() ? p(d, C, F, null, H) : d.getTokenFactory().isNewestMasterToken(d, F, { | |
result: function(r) { | |
m(H, function() { | |
if (r) return null; | |
p(d, C, F, null, H); | |
}); | |
}, | |
error: H.error | |
}) : p(d, C, null, B.getIdentity(), H); | |
else return null; | |
}); | |
} | |
function F(p, r, B, F) { | |
m(F, function() { | |
var m = r.userIdToken, | |
C = r.userAuthenticationData, | |
I = r.messageId; | |
if (m && m.isVerified()) { | |
if (m.isRenewable() && r.isRenewable() || m.isExpired() || !m.isBoundTo(B)) { | |
C = p.getTokenFactory(); | |
C.renewUserIdToken(p, m, B, F); | |
return; | |
} | |
} else if (r.isRenewable() && B && C) { | |
m = r.customer; | |
if (!m) { | |
var m = C.scheme, | |
a = p.getUserAuthenticationFactory(m); | |
if (!a) throw (new Ma(d.USERAUTH_FACTORY_NOT_FOUND, m)).setEntity(B).setUser(C).setMessageId(I); | |
m = a.authenticate(p, B.identity, C, null); | |
} | |
C = p.getTokenFactory(); | |
C.createUserIdToken(p, m, B, F); | |
return; | |
} | |
return m; | |
}); | |
} | |
var O = new Uint8Array(0), | |
H = rd = function(d) { | |
if (0 > d || d > Ka) throw new ca("Message ID " + d + " is outside the valid range."); | |
return d == Ka ? 0 : d + 1; | |
}; | |
Yd = function(d) { | |
if (0 > d || d > Ka) throw new ca("Message ID " + d + " is outside the valid range."); | |
return 0 == d ? Ka : d - 1; | |
}; | |
sd = function(d, p, r, B, F) { | |
m(F, function() { | |
if (B == na || null == B) { | |
var C = d.getRandom(); | |
do B = C.nextLong(); while (0 > B || B > Ka) | |
} else if (0 > B || B > Ka) throw new ca("Message ID " + B + " is outside the valid range."); | |
d.getEntityAuthenticationData(null, { | |
result: function(C) { | |
m(F, function() { | |
var a = d.getMessageCapabilities(); | |
return new tf(d, B, a, C, p, r, null, null, null, null, null); | |
}); | |
}, | |
error: function(d) { | |
F.error(d); | |
} | |
}); | |
}); | |
}; | |
Eh = function(d, p, B) { | |
m(B, function() { | |
function C(b) { | |
m(B, function() { | |
b instanceof D && (b.setEntity(I), b.setEntity(O), b.setUser(sa), b.setUser(a), b.setMessageId(t)); | |
throw b; | |
}); | |
} | |
var I = p.masterToken, | |
O = p.entityAuthenticationData, | |
sa = p.userIdToken, | |
a = p.userAuthenticationData, | |
t = p.messageId, | |
c = H(t); | |
r(d, p, O, I, { | |
result: function(a) { | |
m(B, function() { | |
var b = a ? a.keyResponseData.masterToken : b = I; | |
d.getEntityAuthenticationData(null, { | |
result: function(h) { | |
m(B, function() { | |
F(d, p, b, { | |
result: function(b) { | |
m(B, function() { | |
sa = b; | |
var g = rf(p.messageCapabilities, d.getMessageCapabilities()), | |
l = p.keyResponseData, | |
f = p.serviceTokens; | |
return d.isPeerToPeer() ? new tf(d, c, g, h, l ? l.masterToken : p.peerMasterToken, p.peerUserIdToken, p.peerServiceTokens, I, sa, f, a) : new tf(d, c, g, h, l ? l.masterToken : I, sa, f, null, null, null, a); | |
}); | |
}, | |
error: C | |
}); | |
}); | |
}, | |
error: C | |
}); | |
}); | |
}, | |
error: C | |
}); | |
}); | |
}; | |
Fh = function(d, p, r, B, F) { | |
m(F, function() { | |
d.getEntityAuthenticationData(null, { | |
result: function(C) { | |
m(F, function() { | |
var m; | |
if (p != na && null != p) m = H(p); | |
else { | |
var a = d.getRandom(); | |
do m = a.nextInt(); while (0 > m || m > Ka) | |
} | |
yh(d, C, m, r.responseCode, r.internalCode, r.message, B, F); | |
}); | |
}, | |
error: function(d) { | |
F.error(d); | |
} | |
}); | |
}); | |
}; | |
tf = ea.Class.create({ | |
init: function(d, m, p, r, B, F, H, a, t, c, b) { | |
if (!d.isPeerToPeer() && (a || t)) throw new ca("Cannot set peer master token or peer user ID token when not in peer-to-peer mode."); | |
var k; | |
k = b && !d.isPeerToPeer() ? b.keyResponseData.masterToken : B; | |
var h = {}; | |
d.getMslStore().getServiceTokens(k, F).forEach(function(a) { | |
h[a.name] = a; | |
}, this); | |
H && H.forEach(function(a) { | |
h[a.name] = a; | |
}, this); | |
var n, g, l = {}; | |
d.isPeerToPeer() && (n = a, g = t, H = b ? b.keyResponseData.masterToken : a, d.getMslStore().getServiceTokens(H, t).forEach(function(a) { | |
l[a.name] = a; | |
}, this), c && c.forEach(function(a) { | |
l[a.name] = a; | |
}, this)); | |
Object.defineProperties(this, { | |
_ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_entityAuthData: { | |
value: r, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_masterToken: { | |
value: B, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_messageId: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_capabilities: { | |
value: p, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_keyExchangeData: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_nonReplayable: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_renewable: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_keyRequestData: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_userAuthData: { | |
value: null, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_userIdToken: { | |
value: F, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_serviceTokens: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_peerMasterToken: { | |
value: n, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_peerUserIdToken: { | |
value: g, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_peerServiceTokens: { | |
value: l, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getMessageId: function() { | |
return this._messageId; | |
}, | |
getMasterToken: function() { | |
return this._masterToken; | |
}, | |
getUserIdToken: function() { | |
return this._userIdToken; | |
}, | |
getKeyExchangeData: function() { | |
return this._keyExchangeData; | |
}, | |
willEncryptHeader: function() { | |
return this._masterToken || $f(this._entityAuthData.scheme); | |
}, | |
willEncryptPayloads: function() { | |
return this._masterToken || !this._ctx.isPeerToPeer() && this._keyExchangeData || $f(this._entityAuthData.scheme); | |
}, | |
willIntegrityProtectHeader: function() { | |
return this._masterToken || ag(this._entityAuthData.scheme); | |
}, | |
willIntegrityProtectPayloads: function() { | |
return this._masterToken || !this._ctx.isPeerToPeer() && this._keyExchangeData || ag(this._entityAuthData.scheme); | |
}, | |
getHeader: function(p) { | |
m(p, function() { | |
var m = this._keyExchangeData ? this._keyExchangeData.keyResponseData : null, | |
C = [], | |
r; | |
for (r in this._serviceTokens) C.push(this._serviceTokens[r]); | |
var B = [], | |
F; | |
for (F in this._keyRequestData) B.push(this._keyRequestData[F]); | |
if (this._nonReplayable) { | |
if (!this._masterToken) throw new Oa(d.NONREPLAYABLE_MESSAGE_REQUIRES_MASTERTOKEN); | |
F = this._ctx.getMslStore().getNonReplayableId(this._masterToken); | |
} else F = null; | |
m = new wg(this._messageId, F, this._renewable, this._capabilities, B, m, this._userAuthData, this._userIdToken, C); | |
C = []; | |
for (r in this._peerServiceTokens) C.push(this._peerServiceTokens[r]); | |
r = new Ah(this._peerMasterToken, this._peerUserIdToken, C); | |
vg(this._ctx, this._entityAuthData, this._masterToken, m, r, p); | |
}, this); | |
}, | |
isNonReplayable: function() { | |
return this._nonReplayable; | |
}, | |
setNonReplayable: function(d) { | |
this._nonReplayable = d; | |
return this; | |
}, | |
isRenewable: function() { | |
return this._renewable; | |
}, | |
setRenewable: function(d) { | |
this._renewable = d; | |
return this; | |
}, | |
setAuthTokens: function(d, m) { | |
if (m && !m.isBoundTo(d)) throw new ca("User ID token must be bound to master token."); | |
if (this._keyExchangeData && !this._ctx.isPeerToPeer()) throw new ca("Attempt to set message builder master token when key exchange data exists as a trusted network server."); | |
var p; | |
try { | |
p = this._ctx.getMslStore().getServiceTokens(d, m); | |
} catch (Ia) { | |
if (Ia instanceof D) throw new ca("Invalid master token and user ID token combination despite checking above.", Ia); | |
throw Ia; | |
} | |
var C = [], | |
r; | |
for (r in this._serviceTokens) C.push(this._serviceTokens[r]); | |
C.forEach(function(p) { | |
(p.isUserIdTokenBound() && !p.isBoundTo(m) || p.isMasterTokenBound() && !p.isBoundTo(d)) && delete this._serviceTokens[p.name]; | |
}, this); | |
p.forEach(function(d) { | |
this._serviceTokens[d.name] = d; | |
}, this); | |
this._masterToken = d; | |
this._userIdToken = m; | |
}, | |
setUserAuthenticationData: function(d) { | |
this._userAuthData = d; | |
return this; | |
}, | |
setCustomer: function(d, p) { | |
var C = this; | |
m(p, function() { | |
if (!this._ctx.isPeerToPeer() && null != this._userIdToken || this._ctx.isPeerToPeer() && null != this._peerUserIdToken) throw new ca("User ID token or peer user ID token already exists for the remote user."); | |
var r; | |
r = this._keyExchangeData ? this._keyExchangeData.keyResponseData.masterToken : this._ctx.isPeerToPeer() ? this._peerMasterToken : this._masterToken; | |
if (!r) throw new ca("User ID token or peer user ID token cannot be created because no corresponding master token exists."); | |
this._ctx.getTokenFactory().createUserIdToken(this._ctx, d, r, { | |
result: function(d) { | |
m(p, function() { | |
this._ctx.isPeerToPeer() ? this._peerUserIdToken = d : (this._userIdToken = d, this._userAuthData = null); | |
return !0; | |
}, C); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
}, C); | |
}, | |
addKeyRequestData: function(d) { | |
this._keyRequestData[d.uniqueKey()] = d; | |
return this; | |
}, | |
removeKeyRequestData: function(d) { | |
delete this._keyRequestData[d.uniqueKey()]; | |
return this; | |
}, | |
addServiceToken: function(m) { | |
var p; | |
p = this._keyExchangeData && !this._ctx.isPeerToPeer() ? this._keyExchangeData.keyResponseData.masterToken : this._masterToken; | |
if (m.isMasterTokenBound() && !m.isBoundTo(p)) throw (new Oa(d.SERVICETOKEN_MASTERTOKEN_MISMATCH, "st " + JSON.stringify(m) + "; mt " + JSON.stringify(p))).setEntity(p); | |
if (m.isUserIdTokenBound() && !m.isBoundTo(this._userIdToken)) throw (new Oa(d.SERVICETOKEN_USERIDTOKEN_MISMATCH, "st " + JSON.stringify(m) + "; uit " + JSON.stringify(this._userIdToken))).setEntity(p).setUser(this._userIdToken); | |
this._serviceTokens[m.name] = m; | |
return this; | |
}, | |
addServiceTokenIfAbsent: function(d) { | |
this._serviceTokens[d.name] || this.addServiceToken(d); | |
return this; | |
}, | |
excludeServiceToken: function(d) { | |
delete this._serviceTokens[d]; | |
return this; | |
}, | |
deleteServiceToken: function(d, p) { | |
var r = this; | |
m(p, function() { | |
var C = this._serviceTokens[d]; | |
if (!C) return this; | |
var B = C.isMasterTokenBound() ? this._masterToken : null, | |
C = C.isUserIdTokenBound() ? this._userIdToken : null; | |
ad(this._ctx, d, O, B, C, !1, null, new Ed, { | |
result: function(d) { | |
m(p, function() { | |
return this.addServiceToken(d); | |
}, r); | |
}, | |
error: function(d) { | |
d instanceof D && (d = new ca("Failed to create and add empty service token to message.", d)); | |
p.error(d); | |
} | |
}); | |
}, r); | |
}, | |
getServiceTokens: function() { | |
var d = [], | |
m; | |
for (m in this._serviceTokens) d.push(this._serviceTokens[m]); | |
return d; | |
}, | |
getPeerMasterToken: function() { | |
return this._peerMasterToken; | |
}, | |
getPeerUserIdToken: function() { | |
return this._peerUserIdToken; | |
}, | |
setPeerAuthTokens: function(m, p) { | |
if (!this._ctx.isPeerToPeer()) throw new ca("Cannot set peer master token or peer user ID token when not in peer-to-peer mode."); | |
if (p && !m) throw new ca("Peer master token cannot be null when setting peer user ID token."); | |
if (p && !p.isBoundTo(m)) throw (new Oa(d.USERIDTOKEN_MASTERTOKEN_MISMATCH, "uit " + p + "; mt " + m)).setEntity(m).setUser(p); | |
var r; | |
try { | |
r = this._ctx.getMslStore().getServiceTokens(m, p); | |
} catch (va) { | |
if (va instanceof D) throw new ca("Invalid peer master token and user ID token combination despite proper check.", va); | |
throw va; | |
} | |
Object.keys(this._peerServiceTokens).forEach(function(d) { | |
var r = this._peerServiceTokens[d]; | |
r.isUserIdTokenBound() && !r.isBoundTo(p) ? delete this._peerServiceTokens[d] : r.isMasterTokenBound() && !r.isBoundTo(m) && delete this._peerServiceTokens[d]; | |
}, this); | |
r.forEach(function(d) { | |
var m = d.name; | |
this._peerServiceTokens[m] || (this._peerServiceTokens[m] = d); | |
}, this); | |
this._peerUserIdToken = p; | |
this._peerMasterToken = m; | |
return this; | |
}, | |
addPeerServiceToken: function(m) { | |
if (!this._ctx.isPeerToPeer()) throw new ca("Cannot set peer service tokens when not in peer-to-peer mode."); | |
if (m.isMasterTokenBound() && !m.isBoundTo(this._peerMasterToken)) throw (new Oa(d.SERVICETOKEN_MASTERTOKEN_MISMATCH, "st " + JSON.stringify(m) + "; mt " + JSON.stringify(this._peerMasterToken))).setEntity(this._peerMasterToken); | |
if (m.isUserIdTokenBound() && !m.isBoundTo(this._peerUserIdToken)) throw (new Oa(d.SERVICETOKEN_USERIDTOKEN_MISMATCH, "st " + JSON.stringify(m) + "; uit " + JSON.stringify(this._peerUserIdToken))).setEntity(this._peerMasterToken).setUser(this._peerUserIdToken); | |
this._peerServiceTokens[m.name] = m; | |
return this; | |
}, | |
addPeerServiceTokenIfAbsent: function(d) { | |
this._peerServiceTokens[d.name] || this.addPeerServiceToken(d); | |
return this; | |
}, | |
excludePeerServiceToken: function(d) { | |
delete this._peerServiceTokens[d]; | |
return this; | |
}, | |
deletePeerServiceToken: function(d, p) { | |
var r = this; | |
m(p, function() { | |
var C = this._peerServiceTokens[d]; | |
if (!C) return this; | |
var B = C.isMasterTokenBound() ? this._peerMasterToken : null, | |
C = C.isUserIdTokenBound() ? this._peerUserIdToken : null; | |
ad(this._ctx, d, O, B, C, !1, null, new Ed, { | |
result: function(d) { | |
m(p, function() { | |
return this.addPeerServiceToken(d); | |
}, r); | |
}, | |
error: function(d) { | |
d instanceof D && (d = new ca("Failed to create and add empty peer service token to message.", d)); | |
p.error(d); | |
} | |
}); | |
}, r); | |
}, | |
getPeerServiceTokens: function() { | |
var d = [], | |
m; | |
for (m in this._peerServiceTokens) d.push(this._peerServiceTokens[m]); | |
return d; | |
} | |
}); | |
})(); | |
var Gh; | |
(function() { | |
function d(d, m) { | |
return m[d] ? m[d] : m[""]; | |
} | |
function p(d) { | |
var m = d.builder.getKeyExchangeData(); | |
return m && !d.ctx.isPeerToPeer() ? m.keyResponseData.masterToken : d.builder.getMasterToken(); | |
} | |
Gh = ea.Class.create({ | |
init: function(d, m, p) { | |
d = { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
cryptoContexts: { | |
value: m.getCryptoContexts(), | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
builder: { | |
value: p, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, d); | |
}, | |
isPrimaryMasterTokenAvailable: function() { | |
return p(this) ? !0 : !1; | |
}, | |
isPrimaryUserIdTokenAvailable: function() { | |
return this.builder.getUserIdToken() ? !0 : !1; | |
}, | |
isPeerMasterTokenAvailable: function() { | |
return this.builder.getPeerMasterToken() ? !0 : !1; | |
}, | |
isPeerUserIdTokenAvailable: function() { | |
return this.builder.getPeerUserIdToken() ? !0 : !1; | |
}, | |
getPrimaryServiceTokens: function() { | |
return this.builder.getServiceTokens(); | |
}, | |
getPeerServiceTokens: function() { | |
return this.builder.getPeerServiceTokens(); | |
}, | |
addPrimaryServiceToken: function(d) { | |
try { | |
return this.builder.addServiceToken(d), !0; | |
} catch (O) { | |
if (O instanceof Oa) return !1; | |
throw O; | |
} | |
}, | |
addPeerServiceToken: function(d) { | |
try { | |
return this.builder.addPeerServiceToken(d), !0; | |
} catch (O) { | |
if (O instanceof Oa) return !1; | |
throw O; | |
} | |
}, | |
addUnboundPrimaryServiceToken: function(p, r, B, C, I) { | |
var F = this; | |
m(I, function() { | |
var H = d(p, this.cryptoContexts); | |
if (!H) return !1; | |
ad(this.ctx, p, r, null, null, B, C, H, { | |
result: function(d) { | |
m(I, function() { | |
try { | |
this.builder.addServiceToken(d); | |
} catch (Ia) { | |
if (Ia instanceof Oa) throw new ca("Service token bound to incorrect authentication tokens despite being unbound.", Ia); | |
throw Ia; | |
} | |
return !0; | |
}, F); | |
}, | |
error: function(d) { | |
I.error(d); | |
} | |
}); | |
}, F); | |
}, | |
addUnboundPeerServiceToken: function(p, r, B, C, I) { | |
var F = this; | |
m(I, function() { | |
var H = d(p, this.cryptoContexts); | |
if (!H) return !1; | |
ad(this.ctx, p, r, null, null, B, C, H, { | |
result: function(d) { | |
m(I, function() { | |
try { | |
this.builder.addPeerServiceToken(d); | |
} catch (Ia) { | |
if (Ia instanceof Oa) throw new ca("Service token bound to incorrect authentication tokens despite being unbound.", Ia); | |
throw Ia; | |
} | |
return !0; | |
}, F); | |
}, | |
error: function(d) { | |
I.error(d); | |
} | |
}); | |
}, F); | |
}, | |
addMasterBoundPrimaryServiceToken: function(r, B, H, C, I) { | |
var F = this; | |
m(I, function() { | |
var O = p(this); | |
if (!O) return !1; | |
var L = d(r, this.cryptoContexts); | |
if (!L) return !1; | |
ad(this.ctx, r, B, O, null, H, C, L, { | |
result: function(d) { | |
m(I, function() { | |
try { | |
this.builder.addServiceToken(d); | |
} catch (sa) { | |
if (sa instanceof Oa) throw new ca("Service token bound to incorrect authentication tokens despite setting correct master token.", sa); | |
throw sa; | |
} | |
return !0; | |
}, F); | |
}, | |
error: function(d) { | |
I.error(d); | |
} | |
}); | |
}, F); | |
}, | |
addMasterBoundPeerServiceToken: function(p, r, B, C, I) { | |
var F = this; | |
m(I, function() { | |
var H = this.builder.getPeerMasterToken(); | |
if (!H) return !1; | |
var O = d(p, this.cryptoContexts); | |
if (!O) return !1; | |
ad(this.ctx, p, r, H, null, B, C, O, { | |
result: function(d) { | |
m(I, function() { | |
try { | |
this.builder.addPeerServiceToken(d); | |
} catch (sa) { | |
if (sa instanceof Oa) throw new ca("Service token bound to incorrect authentication tokens despite setting correct master token.", sa); | |
throw sa; | |
} | |
return !0; | |
}, F); | |
}, | |
error: function(d) { | |
I.error(d); | |
} | |
}); | |
}, F); | |
}, | |
addUserBoundPrimaryServiceToken: function(r, B, H, C, I) { | |
var F = this; | |
m(I, function() { | |
var O = p(this); | |
if (!O) return !1; | |
var L = this.builder.getUserIdToken(); | |
if (!L) return !1; | |
var D = d(r, this.cryptoContexts); | |
if (!D) return !1; | |
ad(this.ctx, r, B, O, L, H, C, D, { | |
result: function(d) { | |
m(I, function() { | |
try { | |
this.builder.addServiceToken(d); | |
} catch (a) { | |
if (a instanceof Oa) throw new ca("Service token bound to incorrect authentication tokens despite setting correct master token and user ID token.", a); | |
throw a; | |
} | |
return !0; | |
}, F); | |
}, | |
error: function(d) { | |
I.error(d); | |
} | |
}); | |
}, F); | |
}, | |
addUserBoundPeerServiceToken: function(p, r, B, C, I) { | |
var F = this; | |
m(I, function() { | |
var H = this.builder.getPeerMasterToken(); | |
if (!H) return !1; | |
var O = this.builder.getPeerUserIdToken(); | |
if (!O) return !1; | |
var L = d(p, this.cryptoContexts); | |
if (!L) return !1; | |
ad(this.ctx, p, r, H, O, B, C, L, { | |
result: function(d) { | |
m(I, function() { | |
try { | |
this.builder.addPeerServiceToken(d); | |
} catch (a) { | |
if (a instanceof Oa) throw new ca("Service token bound to incorrect authentication tokens despite setting correct master token and user ID token.", a); | |
throw a; | |
} | |
return !0; | |
}, F); | |
}, | |
error: function(d) { | |
I.error(d); | |
} | |
}); | |
}, F); | |
}, | |
excludePrimaryServiceToken: function(d) { | |
for (var m = this.builder.getServiceTokens(), p = 0; p < m.length; ++p) | |
if (m[p].name == d) return this.builder.excludeServiceToken(d), !0; | |
return !1; | |
}, | |
excludePeerServiceToken: function(d) { | |
for (var m = this.builder.getPeerServiceTokens(), p = 0; p < m.length; ++p) | |
if (m[p].name == d) return this.builder.excludePeerServiceToken(d), !0; | |
return !1; | |
}, | |
deletePrimaryServiceToken: function(d, p) { | |
m(p, function() { | |
for (var m = this.builder.getServiceTokens(), r = 0; r < m.length; ++r) | |
if (m[r].name == d) { | |
this.builder.deleteServiceToken(d, { | |
result: function() { | |
p.result(!0); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
return; | |
} | |
return !1; | |
}, this); | |
}, | |
deletePeerServiceToken: function(d, p) { | |
m(p, function() { | |
for (var m = this.builder.getPeerServiceTokens(), r = 0; r < m.length; ++r) | |
if (m[r].name == d) { | |
this.builder.deletePeerServiceToken(d, { | |
result: function() { | |
p.result(!0); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
return; | |
} | |
return !1; | |
}, this); | |
} | |
}); | |
})(); | |
var Hh, Ih; | |
(function() { | |
function p(p, r, O, H) { | |
m(H, function() { | |
function C() { | |
m(H, function() { | |
if (sa >= O.length) { | |
if (Ia) throw Ia; | |
throw new ab(d.KEYX_RESPONSE_REQUEST_MISMATCH, JSON.stringify(O)); | |
} | |
var a = O[sa]; | |
L != a.keyExchangeScheme ? (++sa, C()) : y.getCryptoContext(p, a, F, B, { | |
result: H.result, | |
error: function(a) { | |
m(H, function() { | |
if (!(a instanceof D)) throw a; | |
Ia = a; | |
++sa; | |
C(); | |
}); | |
} | |
}); | |
}); | |
} | |
var B = r.masterToken, | |
F = r.keyResponseData; | |
if (!F) return null; | |
var L = F.keyExchangeScheme, | |
y = p.getKeyExchangeFactory(L); | |
if (!y) throw new ab(d.KEYX_FACTORY_NOT_FOUND, L); | |
var Ia, sa = 0; | |
C(); | |
}); | |
} | |
Hh = lg.extend({ | |
init: function(m, F, O, H, C, I, L) { | |
var B = this; | |
r(L, function() { | |
function r() { | |
B._ready = !0; | |
B._readyQueue.add(!0); | |
} | |
function L(a, c) { | |
try { | |
var b = c.masterToken; | |
a.getTokenFactory().isMasterTokenRevoked(a, b, { | |
result: function(h) { | |
h ? (B._errored = (new Dd(h, b)).setUser(c.userIdToken).setUser(c.userAuthenticationData).setMessageId(c.messageId), r()) : sa(a, c); | |
}, | |
error: function(a) { | |
a instanceof D && (a.setEntity(c.masterToken), a.setUser(c.userIdToken), a.setUser(c.userAuthenticationData), a.setMessageId(c.messageId)); | |
B._errored = a; | |
r(); | |
} | |
}); | |
} catch (n) { | |
n instanceof D && (n.setEntity(c.masterToken), n.setUser(c.userIdToken), n.setUser(c.userAuthenticationData), n.setMessageId(c.messageId)), B._errored = n, r(); | |
} | |
} | |
function sa(c, k) { | |
try { | |
var b = k.masterToken, | |
n = k.userIdToken; | |
n ? c.getTokenFactory().isUserIdTokenRevoked(c, b, n, { | |
result: function(g) { | |
g ? (B._errored = (new MslUserIdTokenException(g, n)).setEntity(b).setUser(n).setMessageId(k.messageId), r()) : a(c, k); | |
}, | |
error: function(a) { | |
a instanceof D && (a.setEntity(k.masterToken), a.setUser(k.userIdToken), a.setUser(k.userAuthenticationData), a.setMessageId(k.messageId)); | |
B._errored = a; | |
r(); | |
} | |
}) : a(c, k); | |
} catch (g) { | |
g instanceof D && (g.setEntity(k.masterToken), g.setUser(k.userIdToken), g.setUser(k.userAuthenticationData), g.setMessageId(k.messageId)), B._errored = g, r(); | |
} | |
} | |
function a(a, c) { | |
try { | |
var b = c.masterToken; | |
b.isExpired() ? c.isRenewable() && 0 != c.keyRequestData.length ? a.getTokenFactory().isMasterTokenRenewable(a, b, { | |
result: function(h) { | |
h ? (B._errored = (new Oa(h, "Master token is expired and not renewable.")).setEntity(b).setUser(c.userIdToken).setUser(c.userAuthenticationData).setMessageId(c.messageId), r()) : t(a, c); | |
}, | |
error: function(a) { | |
a instanceof D && (a.setEntity(c.masterToken), a.setUser(c.userIdToken), a.setUser(c.userAuthenticationData), a.setMessageId(c.messageId)); | |
B._errored = a; | |
r(); | |
} | |
}) : (B._errored = (new Oa(d.MESSAGE_EXPIRED, JSON.stringify(c))).setEntity(b).setUser(c.userIdToken).setUser(c.userAuthenticationData).setMessageId(c.messageId), r()) : t(a, c); | |
} catch (n) { | |
n instanceof D && (n.setEntity(c.masterToken), n.setUser(c.userIdToken), n.setUser(c.userAuthenticationData), n.setMessageId(c.messageId)), B._errored = n, r(); | |
} | |
} | |
function t(a, c) { | |
try { | |
var b = c.masterToken, | |
n = c.nonReplayableId; | |
"number" === typeof n ? b ? a.getTokenFactory().acceptNonReplayableId(a, b, n, { | |
result: function(a) { | |
a || (B._errored = (new Oa(d.MESSAGE_REPLAYED, JSON.stringify(c))).setEntity(b).setUser(c.userIdToken).setUser(c.userAuthenticationData).setMessageId(c.messageId)); | |
r(); | |
}, | |
error: function(a) { | |
a instanceof D && (a.setEntity(b), a.setUser(c.userIdToken), a.setUser(c.userAuthenticationData), a.setMessageId(c.messageId)); | |
B._errored = a; | |
r(); | |
} | |
}) : (B._errored = (new Oa(d.INCOMPLETE_NONREPLAYABLE_MESSAGE, JSON.stringify(c))).setEntity(c.entityAuthenticationData).setUser(c.userIdToken).setUser(c.userAuthenticationData).setMessageId(c.messageId), r()) : r(); | |
} catch (g) { | |
g instanceof D && (g.setEntity(c.masterToken), g.setEntity(c.entityAuthenticationData), g.setUser(c.userIdToken), g.setUser(c.userAuthenticationData), g.setMessageId(c.messageId)), B._errored = g, r(); | |
} | |
} | |
var c = { | |
_source: { | |
value: F, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_parser: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_charset: { | |
value: O, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_remainingData: { | |
value: "", | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timeout: { | |
value: I, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_header: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_cryptoContext: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_keyxCryptoContext: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_payloadSequenceNumber: { | |
value: 1, | |
writable: !0, | |
enuemrable: !1, | |
configurable: !1 | |
}, | |
_eom: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_closeSource: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_payloads: { | |
value: [], | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_payloadIndex: { | |
value: -1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_payloadOffset: { | |
value: 0, | |
writable: !0, | |
enuemrable: !1, | |
configurable: !1 | |
}, | |
_markOffset: { | |
value: 0, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_currentPayload: { | |
value: null, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_readException: { | |
value: null, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_ready: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_readyQueue: { | |
value: new ue, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_aborted: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timedout: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_errored: { | |
value: null, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, c); | |
sh(B._source, I, { | |
result: function(a) { | |
B._json = a; | |
B._jsonIndex = 0; | |
null === B._json ? (B._errored = new ja(d.MESSAGE_DATA_MISSING), r()) : pg(m, B._json[B._jsonIndex++], C, { | |
result: function(a) { | |
B._header = a; | |
if (B._header instanceof kd) B._keyxCryptoContext = null, B._cryptoContext = null, r(); | |
else { | |
var c = B._header; | |
p(m, c, H, { | |
result: function(a) { | |
try { | |
B._keyxCryptoContext = a; | |
m.isPeerToPeer() || !B._keyxCryptoContext ? B._cryptoContext = c.cryptoContext : B._cryptoContext = B._keyxCryptoContext; | |
try { | |
var b = c.masterToken; | |
b && (m.isPeerToPeer() || b.isVerified()) ? L(m, c) : t(m, c); | |
} catch (l) { | |
l instanceof D && (l.setEntity(c.masterToken), l.setUser(c.userIdToken), l.setUser(c.userAuthenticationData), l.setMessageId(c.messageId)), B._errored = l, r(); | |
} | |
} catch (l) { | |
l instanceof D && (l.setEntity(c.masterToken), l.setEntity(c.entityAuthenticationData), l.setUser(c.userIdToken), l.setUser(c.userAuthenticationData), l.setMessageId(c.messageId)), B._errored = l, r(); | |
} | |
}, | |
error: function(a) { | |
a instanceof D && (a.setEntity(c.masterToken), a.setEntity(c.entityAuthenticationData), a.setUser(c.userIdToken), a.setUser(c.userAuthenticationData), a.setMessageId(c.messageId)); | |
B._errored = a; | |
r(); | |
} | |
}); | |
} | |
}, | |
error: function(a) { | |
B._errored = a; | |
r(); | |
} | |
}); | |
}, | |
timeout: function() { | |
B._timedout = !0; | |
r(); | |
}, | |
error: function(a) { | |
B._errored = a; | |
r(); | |
} | |
}); | |
return this; | |
}, B); | |
}, | |
nextData: function(m, p) { | |
var B = this; | |
r(p, function() { | |
function m(d) { | |
r(d, function() { | |
var p; | |
if (this._jsonIndex < this._json.length) return p = this._json[this._jsonIndex++]; | |
sh(this._source, this._timeout, { | |
result: function(p) { | |
p && p.length && 0 < p.length ? (p.forEach(function(d) { | |
this._json.push(d); | |
}), m(d)) : (this._eom = !0, d.result(null)); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(m) { | |
d.error(m); | |
} | |
}); | |
}, B); | |
} | |
var C = this.getMessageHeader(); | |
if (!C) throw new ca("Read attempted with error message."); | |
if (-1 != this._payloadIndex && this._payloadIndex < this._payloads.length) return this._payloads[this._payloadIndex++]; | |
if (this._eom) return null; | |
m({ | |
result: function(m) { | |
r(p, function() { | |
if (!m) return null; | |
if ("object" !== typeof m) throw new ja(d.MESSAGE_FORMAT_ERROR); | |
Dh(m, this._cryptoContext, { | |
result: function(m) { | |
r(p, function() { | |
var p = C.masterToken, | |
r = C.entityAuthenticationData, | |
B = C.userIdToken, | |
I = C.getUserAuthenticationData; | |
if (m.messageId != C.messageId) throw (new Oa(d.PAYLOAD_MESSAGE_ID_MISMATCH, "payload mid " + m.messageId + " header mid " + C.messageId)).setEntity(p).setEntity(r).setUser(B).setUser(I); | |
if (m.sequenceNumber != this._payloadSequenceNumber) throw (new Oa(d.PAYLOAD_SEQUENCE_NUMBER_MISMATCH, "payload seqno " + m.sequenceNumber + " expected seqno " + this._payloadSequenceNumber)).setEntity(p).setEntity(r).setUser(B).setUser(I); | |
++this._payloadSequenceNumber; | |
m.isEndOfMessage() && (this._eom = !0); | |
p = m.data; | |
this._payloads.push(p); | |
this._payloadIndex = -1; | |
return p; | |
}, B); | |
}, | |
error: function(m) { | |
m instanceof SyntaxError && (m = new ja(d.JSON_PARSE_ERROR, "payloadchunk", m)); | |
p.error(m); | |
} | |
}); | |
}, B); | |
}, | |
timeout: function() { | |
p.timeout(); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
}, B); | |
}, | |
isReady: function(d, m) { | |
function p() { | |
r(m, function() { | |
if (this._aborted) return !1; | |
if (this._timedout) m.timeout(); | |
else { | |
if (this._errored) throw this._errored; | |
return !0; | |
} | |
}, B); | |
} | |
var B = this; | |
r(m, function() { | |
this._ready ? p() : this._readyQueue.poll(d, { | |
result: function(d) { | |
r(m, function() { | |
if (d === na) return !1; | |
p(); | |
}, B); | |
}, | |
timeout: function() { | |
m.timeout(); | |
}, | |
error: function(d) { | |
m.error(d); | |
} | |
}); | |
}, B); | |
}, | |
getMessageHeader: function() { | |
return this._header instanceof Xd ? this._header : null; | |
}, | |
getErrorHeader: function() { | |
return this._header instanceof kd ? this._header : null; | |
}, | |
getIdentity: function() { | |
var d = this.getMessageHeader(); | |
if (d) { | |
var m = d.masterToken; | |
return m ? m.identity : d.entityAuthenticationData.getIdentity(); | |
} | |
return this.getErrorHeader().entityAuthenticationData.getIdentity(); | |
}, | |
getCustomer: function() { | |
var d = this.getMessageHeader(); | |
return d ? d.customer : null; | |
}, | |
getPayloadCryptoContext: function() { | |
return this._cryptoContext; | |
}, | |
getKeyExchangeCryptoContext: function() { | |
return this._keyxCryptoContext; | |
}, | |
closeSource: function(d) { | |
this._closeSource = d; | |
}, | |
abort: function() { | |
this._aborted = !0; | |
this._source.abort(); | |
this._readyQueue.cancelAll(); | |
}, | |
close: function() { | |
this._closeSource && this._source.close(); | |
}, | |
mark: function() { | |
if (this._currentPayload) { | |
for (; 0 < this._payloads.length && this._payloads[0] !== this._currentPayload;) this._payloads.shift(); | |
this._payloadIndex = 0; | |
this._currentPayload = this._payloads[this._payloadIndex++]; | |
this._markOffset = this._payloadOffset; | |
} else this._payloadIndex = -1, this._payloads = []; | |
}, | |
markSupported: function() { | |
return !0; | |
}, | |
read: function(d, m, p) { | |
function B() { | |
r(p, function() { | |
function B(p) { | |
r(p, function() { | |
if (F && L >= F.length) return F.subarray(0, L); | |
var a = -1; | |
if (this._currentPayload) { | |
var t = this._currentPayload.length - this._payloadOffset; | |
if (!F) { | |
var c = t; | |
if (-1 != this._payloadIndex) | |
for (var b = this._payloadIndex; b < this._payloads.length; ++b) c += this._payloads[b].length; | |
0 < c && (F = new Uint8Array(c)); | |
} | |
t = Math.min(t, F ? F.length - L : 0); | |
0 < t && (a = this._currentPayload.subarray(this._payloadOffset, this._payloadOffset + t), F.set(a, O), a = t, O += t, this._payloadOffset += t); | |
} - | |
1 != a ? (L += a, B(p)) : this.nextData(m, { | |
result: function(a) { | |
r(p, function() { | |
if (this._aborted) return F ? F.subarray(0, L) : new Uint8Array(0); | |
this._currentPayload = a; | |
this._payloadOffset = 0; | |
if (this._currentPayload) B(p); | |
else return 0 == L && 0 != d ? null : F ? F.subarray(0, L) : new Uint8Array(0); | |
}, C); | |
}, | |
timeout: function() { | |
p.timeout(F ? F.subarray(0, L) : new Uint8Array(0)); | |
}, | |
error: function(a) { | |
r(p, function() { | |
a instanceof D && (a = new Bb("Error reading the payload chunk.", a)); | |
if (0 < L) return C._readException = a, F.subarray(0, L); | |
throw a; | |
}, C); | |
} | |
}); | |
}, C); | |
} | |
if (this._aborted) return new Uint8Array(0); | |
if (this._timedout) p.timeout(new Uint8Array(0)); | |
else { | |
if (this._errored) throw this._errored; | |
if (null != this._readException) { | |
var H = this._readException; | |
this._readException = null; | |
throw H; | |
} | |
var F = -1 != d ? new Uint8Array(d) : na, | |
O = 0, | |
L = 0; | |
B(p); | |
} | |
}, C); | |
} | |
var C = this; | |
r(p, function() { | |
if (-1 > d) throw new RangeError("read requested with illegal length " + d); | |
this._ready ? B() : this._readyQueue.poll(m, { | |
result: function(d) { | |
d === na ? p.result(!1) : B(); | |
}, | |
timeout: function() { | |
p.timeout(new Uint8Array(0)); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
}, C); | |
}, | |
reset: function() { | |
this._payloadIndex = 0; | |
0 < this._payloads.length ? (this._currentPayload = this._payloads[this._payloadIndex++], this._payloadOffset = this._markOffset) : this._currentPayload = null; | |
} | |
}); | |
Ih = function(d, m, p, r, C, I, L) { | |
new Hh(d, m, p, r, C, I, L); | |
}; | |
})(); | |
var Jh, Ie; | |
(function() { | |
Jh = Be.extend({ | |
init: function(d, m, p, O, H, C, I) { | |
var B = this; | |
r(I, function() { | |
function r() { | |
B._ready = !0; | |
B._readyQueue.add(!0); | |
} | |
var I = rf(d.getMessageCapabilities(), O.messageCapabilities), | |
F = null; | |
I && (F = fg(I.compressionAlgorithms)); | |
I = { | |
_destination: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_charset: { | |
value: p, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_capabilities: { | |
value: I, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_header: { | |
value: O, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_compressionAlgo: { | |
value: F, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_cryptoContext: { | |
value: H, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_payloadSequenceNumber: { | |
value: 1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_currentPayload: { | |
value: [], | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_closed: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_payloads: { | |
value: [], | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_ready: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_readyQueue: { | |
value: new ue, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_aborted: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timedout: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_errored: { | |
value: null, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, I); | |
var L = mb(JSON.stringify(O), p); | |
m.write(L, 0, L.length, C, { | |
result: function(a) { | |
try { | |
B._aborted ? r() : a < L.length ? (B._timedout = !0, r()) : m.flush(C, { | |
result: function(a) { | |
B._aborted || (B._timedout = !a); | |
r(); | |
}, | |
timeout: function() { | |
B._timedout = !0; | |
r(); | |
}, | |
error: function(a) { | |
B._errored = a; | |
r(); | |
} | |
}); | |
} catch (t) { | |
B._errored = t, r(); | |
} | |
}, | |
timeout: function() { | |
B._timedout = !0; | |
r(); | |
}, | |
error: function(a) { | |
B._errored = a; | |
r(); | |
} | |
}); | |
return this; | |
}, B); | |
}, | |
setCompressionAlgorithm: function(d, m, p) { | |
function B() { | |
F.flush(m, { | |
result: function(m) { | |
r(p, function() { | |
if (!m) throw new Bb("flush() aborted"); | |
this._compressionAlgo = d; | |
return !0; | |
}, F); | |
}, | |
timeout: function() { | |
p.timeout(); | |
}, | |
error: function(d) { | |
p.error(d); | |
} | |
}); | |
} | |
var F = this; | |
r(p, function() { | |
if (!this.getMessageHeader()) throw new ca("Cannot write payload data for an error message."); | |
if (this._compressionAlgo == d) return !0; | |
if (d) { | |
if (!this._capabilities) return !1; | |
for (var m = this._capabilities.compressionAlgorithms, p = 0; p < m.length; ++p) | |
if (m[p] == d) { | |
B(); | |
return; | |
} | |
return !1; | |
} | |
B(); | |
}, F); | |
}, | |
getMessageHeader: function() { | |
return this._header instanceof Xd ? this._header : null; | |
}, | |
getErrorMessage: function() { | |
return this._header instanceof kd ? this._header : null; | |
}, | |
getPayloads: function() { | |
return this._payloads; | |
}, | |
abort: function() { | |
this._aborted = !0; | |
this._destination.abort(); | |
this._readyQueue.cancelAll(); | |
}, | |
close: function(d, m) { | |
var p = this; | |
r(m, function() { | |
if (this._aborted) return !1; | |
if (this._timedout) m.timeout(); | |
else { | |
if (this._errored) throw this._errored; | |
if (this._closed) return !0; | |
this._closed = !0; | |
this.flush(d, { | |
result: function(d) { | |
r(m, function() { | |
d && (this._currentPayload = null); | |
return d; | |
}, p); | |
}, | |
timeout: function() { | |
m.timeout(); | |
}, | |
error: function(d) { | |
m.error(d); | |
} | |
}); | |
} | |
}, p); | |
}, | |
flush: function(d, m) { | |
function p() { | |
r(m, function() { | |
if (this._aborted) return !1; | |
if (this._timedout) m.timeout(); | |
else { | |
if (this._errored) throw this._errored; | |
if (!this._currentPayload || !this._closed && 0 == this._currentPayload.length) return !0; | |
var p = this.getMessageHeader(); | |
if (!p) return !0; | |
var C = 0; | |
this._currentPayload && this._currentPayload.forEach(function(d) { | |
C += d.length; | |
}); | |
for (var I = new Uint8Array(C), F = 0, L = 0; this._currentPayload && L < this._currentPayload.length; ++L) { | |
var O = this._currentPayload[L]; | |
I.set(O, F); | |
F += O.length; | |
} | |
Ch(this._payloadSequenceNumber, p.messageId, this._closed, this._compressionAlgo, I, this._cryptoContext, { | |
result: function(p) { | |
r(m, function() { | |
this._payloads.push(p); | |
var C = mb(JSON.stringify(p), this._charset); | |
this._destination.write(C, 0, C.length, d, { | |
result: function(a) { | |
r(m, function() { | |
if (this._aborted) return !1; | |
a < p.length ? m.timeout() : this._destination.flush(d, { | |
result: function(a) { | |
r(m, function() { | |
if (this._aborted) return !1; | |
if (a) return ++this._payloadSequenceNumber, this._currentPayload = this._closed ? null : [], !0; | |
m.timeout(); | |
}, B); | |
}, | |
timeout: function() { | |
m.timeout(); | |
}, | |
error: function(a) { | |
a instanceof D && (a = new Bb("Error encoding payload chunk [sequence number " + B._payloadSequenceNumber + "].", a)); | |
m.error(a); | |
} | |
}); | |
}, B); | |
}, | |
timeout: function(a) { | |
m.timeout(); | |
}, | |
error: function(a) { | |
a instanceof D && (a = new Bb("Error encoding payload chunk [sequence number " + B._payloadSequenceNumber + "].", a)); | |
m.error(a); | |
} | |
}); | |
}, B); | |
}, | |
error: function(d) { | |
d instanceof D && (d = new Bb("Error encoding payload chunk [sequence number " + B._payloadSequenceNumber + "].", d)); | |
m.error(d); | |
} | |
}); | |
} | |
}, B); | |
} | |
var B = this; | |
r(m, function() { | |
this._ready ? p() : this._readyQueue.poll(d, { | |
result: function(d) { | |
d === na ? m.result(!1) : p(); | |
}, | |
timeout: function() { | |
m.timeout(); | |
}, | |
error: function(d) { | |
m.error(d); | |
} | |
}); | |
}, B); | |
}, | |
write: function(d, m, p, O, H) { | |
r(H, function() { | |
if (this._aborted) return !1; | |
if (this._timedout) H.timeout(); | |
else { | |
if (this._errored) throw this._errored; | |
if (this._closed) throw new Bb("Message output stream already closed."); | |
if (0 > m) throw new RangeError("Offset cannot be negative."); | |
if (0 > p) throw new RangeError("Length cannot be negative."); | |
if (m + p > d.length) throw new RangeError("Offset plus length cannot be greater than the array length."); | |
if (!this.getMessageHeader()) throw new ca("Cannot write payload data for an error message."); | |
var r = d.subarray(m, m + p); | |
this._currentPayload.push(r); | |
return r.length; | |
} | |
}, this); | |
} | |
}); | |
Ie = function(d, m, p, r, H, C, I) { | |
new Jh(d, m, p, r, H, C, I); | |
}; | |
})(); | |
var kj = ea.Class.create({ | |
sentHeader: function(d) {}, | |
receivedHeader: function(d) {} | |
}); | |
Object.freeze({ | |
USERDATA_REAUTH: p.USERDATA_REAUTH, | |
SSOTOKEN_REJECTED: p.SSOTOKEN_REJECTED | |
}); | |
var Kh = ea.Class.create({ | |
getCryptoContexts: function() {}, | |
getRecipient: function() {}, | |
isEncrypted: function() {}, | |
isIntegrityProtected: function() {}, | |
isNonReplayable: function() {}, | |
isRequestingTokens: function() {}, | |
getUserId: function() {}, | |
getUserAuthData: function(d, m, p, r) {}, | |
getCustomer: function() {}, | |
getKeyRequestData: function(d) {}, | |
updateServiceTokens: function(d, m, p) {}, | |
write: function(d, m, p) {}, | |
getDebugContext: function() {} | |
}); | |
ea.Class.create({ | |
getInputStream: function(d) {}, | |
getOutputStream: function(d) {} | |
}); | |
var Lh; | |
(function() { | |
function L(a) { | |
return function() { | |
a.abort(); | |
}; | |
} | |
function B(a, c) { | |
Object.defineProperties(this, { | |
masterToken: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
ticket: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
function F(a, c) { | |
Object.defineProperties(this, { | |
builder: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
msgCtx: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
function O(a, c, b) { | |
Object.defineProperties(this, { | |
requestHeader: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
payloads: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
}, | |
handshake: { | |
value: b, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
function H(a, c) { | |
Object.defineProperties(this, { | |
requestHeader: { | |
value: c.requestHeader, | |
writable: !1, | |
configurable: !1 | |
}, | |
payloads: { | |
value: c.payloads, | |
writable: !1, | |
configurable: !1 | |
}, | |
handshake: { | |
value: c.handshake, | |
writable: !1, | |
configurable: !1 | |
}, | |
response: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
} | |
function C(a) { | |
for (; a;) { | |
if (a instanceof wb) return !0; | |
a = a instanceof D ? a.cause : na; | |
} | |
return !1; | |
} | |
function I(a, c, b, h, n, k, d, t, z) { | |
Fh(c, h, n, k, { | |
result: function(f) { | |
b && b.sentHeader(f); | |
Ie(c, d, Na, f, null, null, t, { | |
result: function(c) { | |
a.setAbort(function() { | |
c.abort(); | |
}); | |
c.close(t, { | |
result: function(a) { | |
r(z, function() { | |
if (!a) throw new wb("sendError aborted."); | |
return a; | |
}); | |
}, | |
timeout: function() { | |
z.timeout(); | |
}, | |
error: function(a) { | |
z.error(a); | |
} | |
}); | |
}, | |
timeout: function() {}, | |
error: function(a) { | |
z.error(a); | |
} | |
}); | |
}, | |
error: function(a) { | |
z.error(a); | |
} | |
}); | |
} | |
var y = Be.extend({ | |
close: function(a, c) { | |
c.result(!0); | |
}, | |
write: function(a, c, b, h, n) { | |
m(n, function() { | |
return Math.min(a.length - c, b); | |
}); | |
}, | |
flush: function(a, c) { | |
c.result(!0); | |
} | |
}), | |
va = jj.extend({ | |
getUserMessage: function(a, c) { | |
return null; | |
} | |
}), | |
db = Kh.extend({ | |
init: function(a) { | |
Object.defineProperties(this, { | |
_appCtx: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getCryptoContexts: function() { | |
return this._appCtx.getCryptoContexts(); | |
}, | |
isEncrypted: function() { | |
return this._appCtx.isEncrypted(); | |
}, | |
isIntegrityProtected: function() { | |
return this._appCtx.isIntegrityProtected(); | |
}, | |
isNonReplayable: function() { | |
return this._appCtx.isNonReplayable(); | |
}, | |
isRequestingTokens: function() { | |
return this._appCtx.isRequestingTokens(); | |
}, | |
getUserId: function() { | |
return this._appCtx.getUserId(); | |
}, | |
getUserAuthData: function(a, c, b, h) { | |
this._appCtx.getUserAuthData(a, c, b, h); | |
}, | |
getCustomer: function() { | |
return this._appCtx.getCustomer(); | |
}, | |
getKeyRequestData: function(a) { | |
this._appCtx.getKeyRequestData(a); | |
}, | |
updateServiceTokens: function(a, c, b) { | |
this._appCtx.updateServiceTokens(a, c, b); | |
}, | |
write: function(a, c, b) { | |
this._appCtx.write(a, c, b); | |
}, | |
getDebugContext: function() { | |
return this._appCtx.getDebugContext(); | |
} | |
}), | |
N = db.extend({ | |
init: function l(a, c) { | |
l.base.call(this, c); | |
Object.defineProperties(this, { | |
_payloads: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
write: function(a, c, b) { | |
function f(h, n) { | |
if (h == l._payloads.length) b.result(!0); | |
else { | |
var k = l._payloads[h]; | |
a.setCompressionAlgorithm(k.compressionAlgo, c, { | |
result: function(q) { | |
a.write(k.data, 0, k.data.length, c, { | |
result: function(q) { | |
r(b, function() { | |
k.isEndOfMessage() ? f(h + 1, n) : a.flush(c, { | |
result: function(a) { | |
b.result(a); | |
}, | |
timeout: function() { | |
b.timeout(); | |
}, | |
error: function(a) { | |
b.error(a); | |
} | |
}); | |
}, l); | |
}, | |
timeout: function(a) { | |
b.timeout(a); | |
}, | |
error: function(a) { | |
b.error(a); | |
} | |
}); | |
}, | |
timeout: function() {}, | |
error: function(a) { | |
b.error(a); | |
} | |
}); | |
} | |
} | |
var l = this; | |
f(0); | |
} | |
}), | |
sa = db.extend({ | |
init: function f(a) { | |
f.base.call(this, a); | |
}, | |
isEncrypted: function() { | |
return !1; | |
}, | |
isNonReplayable: function() { | |
return !1; | |
}, | |
write: function(a, c, b) { | |
b.result(!0); | |
} | |
}), | |
a = {}, | |
t, c, b, k, h = ea.Class.create({ | |
init: function(a) { | |
a || (a = new va); | |
Object.defineProperties(this, { | |
_filterFactory: { | |
value: null, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_renewingContexts: { | |
value: [], | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_masterTokenLocks: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_messageRegistry: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
setFilterFactory: function(a) { | |
this._filterFactory = a; | |
}, | |
getNewestMasterToken: function(a, c, b, h) { | |
var f = this; | |
r(h, function() { | |
var n = c.getMslStore(), | |
k = n.getMasterToken(); | |
if (!k) return null; | |
var q = k.uniqueKey(), | |
v = this._masterTokenLocks[q]; | |
v || (v = new ef, this._masterTokenLocks[q] = v); | |
var d = v.readLock(b, { | |
result: function(d) { | |
r(h, function() { | |
if (d === na) throw new wb("getNewestMasterToken aborted."); | |
var t = n.getMasterToken(); | |
if (k.equals(t)) return new B(k, d); | |
v.unlock(d); | |
v.writeLock(b, { | |
result: function(n) { | |
r(h, function() { | |
if (n === na) throw new wb("getNewestMasterToken aborted."); | |
delete this._masterTokenLocks[q]; | |
v.unlock(n); | |
return this.getNewestMasterToken(a, c, b, h); | |
}, f); | |
}, | |
timeout: function() { | |
h.timeout(); | |
}, | |
error: function(a) { | |
h.error(a); | |
} | |
}); | |
}, f); | |
}, | |
timeout: function() { | |
h.timeout(); | |
}, | |
error: function(a) { | |
h.error(a); | |
} | |
}); | |
a.setAbort(function() { | |
d && (v.cancel(d), d = na); | |
}); | |
}, f); | |
}, | |
deleteMasterToken: function(a, c) { | |
if (c) { | |
var b = this; | |
setTimeout(function() { | |
var f = c.uniqueKey(), | |
h = b._masterTokenLocks[f]; | |
h || (h = new ef, b._masterTokenLocks[f] = h); | |
h.writeLock(-1, { | |
result: function(n) { | |
a.getMslStore().removeCryptoContext(c); | |
delete b._masterTokenLocks[f]; | |
h.unlock(n); | |
}, | |
timeout: function() { | |
throw new ca("Unexpected timeout received."); | |
}, | |
error: function(a) { | |
throw a; | |
} | |
}); | |
}, 0); | |
} | |
}, | |
releaseMasterToken: function(a) { | |
if (a && a.masterToken) { | |
var c = a.masterToken.uniqueKey(), | |
c = this._masterTokenLocks[c]; | |
if (!c) throw new ca("Master token read/write lock does not exist when it should."); | |
c.unlock(a.ticket); | |
} | |
}, | |
updateOutgoingCryptoContexts: function(a, c, b) { | |
var f = a.getMslStore(); | |
!a.isPeerToPeer() && b && (f.setCryptoContext(b.keyResponseData.masterToken, b.cryptoContext), this.deleteMasterToken(a, c.masterToken)); | |
}, | |
updateIncomingCryptoContexts: function(a, c, b) { | |
var f = b.getMessageHeader(); | |
if (f) { | |
var h = a.getMslStore(); | |
if (f = f.keyResponseData) h.setCryptoContext(f.masterToken, b.getKeyExchangeCryptoContext()), this.deleteMasterToken(a, c.masterToken); | |
} | |
}, | |
storeServiceTokens: function(a, c, b, h) { | |
a = a.getMslStore(); | |
for (var f = [], n = 0; n < h.length; ++n) { | |
var k = h[n]; | |
if (!k.isBoundTo(c) || !c.isVerified()) { | |
var q = k.data; | |
q && 0 == q.length ? a.removeServiceTokens(k.name, k.isMasterTokenBound() ? c : null, k.isUserIdTokenBound() ? b : null) : f.push(k); | |
} | |
} | |
0 < f.length && a.addServiceTokens(f); | |
}, | |
buildRequest: function(a, c, b, h, n) { | |
var f = this; | |
this.getNewestMasterToken(a, c, h, { | |
result: function(a) { | |
m(n, function() { | |
var h = a && a.masterToken, | |
k; | |
if (h) { | |
k = b.getUserId(); | |
var q = c.getMslStore(); | |
k = (k = k ? q.getUserIdToken(k) : null) && k.isBoundTo(h) ? k : null; | |
} else k = null; | |
sd(c, h, k, null, { | |
result: function(c) { | |
m(n, function() { | |
c.setNonReplayable(b.isNonReplayable()); | |
return { | |
builder: c, | |
tokenTicket: a | |
}; | |
}); | |
}, | |
error: function(c) { | |
m(n, function() { | |
this.releaseMasterToken(a); | |
c instanceof D && (c = new ca("User ID token not bound to master token despite internal check.", c)); | |
throw c; | |
}, f); | |
} | |
}); | |
}, f); | |
}, | |
timeout: function() { | |
n.timeout(); | |
}, | |
error: function(a) { | |
n.error(a); | |
} | |
}); | |
}, | |
buildResponse: function(a, c, b, h, n, k) { | |
var f = this; | |
Eh(c, h, { | |
result: function(q) { | |
r(k, function() { | |
q.setNonReplayable(b.isNonReplayable()); | |
if (!c.isPeerToPeer() && !h.keyResponseData) return { | |
builder: q, | |
tokenTicket: null | |
}; | |
this.getNewestMasterToken(a, c, n, { | |
result: function(a) { | |
r(k, function() { | |
var f = a && a.masterToken, | |
h; | |
if (f) { | |
h = b.getUserId(); | |
var n = c.getMslStore(); | |
h = (h = h ? n.getUserIdToken(h) : null) && h.isBoundTo(f) ? h : null; | |
} else h = null; | |
q.setAuthTokens(f, h); | |
return { | |
builder: q, | |
tokenTicket: a | |
}; | |
}, f); | |
}, | |
timeout: function() { | |
k.timeout(); | |
}, | |
error: function(a) { | |
k.error(a); | |
} | |
}); | |
}, f); | |
}, | |
error: function(a) { | |
k.error(a); | |
} | |
}); | |
}, | |
buildErrorResponse: function(a, c, b, h, n, k, d) { | |
function f(a, f) { | |
r(d, function() { | |
var h = rd(n.messageId), | |
k = new N(f, b); | |
sd(c, null, null, h, { | |
result: function(b) { | |
r(d, function() { | |
c.isPeerToPeer() && b.setPeerAuthTokens(a.peerMasterToken, a.peerUserIdToken); | |
b.setNonReplayable(k.isNonReplayable()); | |
return { | |
errorResult: new F(b, k), | |
tokenTicket: null | |
}; | |
}, v); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, v); | |
} | |
function q(f, h) { | |
v.getNewestMasterToken(a, c, k, { | |
result: function(a) { | |
r(d, function() { | |
var k = a && a.masterToken, | |
q = rd(n.messageId), | |
t = new N(h, b); | |
sd(c, k, null, q, { | |
result: function(b) { | |
r(d, function() { | |
c.isPeerToPeer() && b.setPeerAuthTokens(f.peerMasterToken, f.peerUserIdToken); | |
b.setNonReplayable(t.isNonReplayable()); | |
return { | |
errorResult: new F(b, t), | |
tokenTicket: a | |
}; | |
}, v); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} | |
var v = this; | |
r(d, function() { | |
var t = h.requestHeader, | |
A = h.payloads, | |
x = n.errorCode; | |
switch (x) { | |
case p.ENTITYDATA_REAUTH: | |
case p.ENTITY_REAUTH: | |
c.getEntityAuthenticationData(x, { | |
result: function(a) { | |
r(d, function() { | |
if (!a) return null; | |
f(t, A); | |
}, v); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
break; | |
case p.USERDATA_REAUTH: | |
case p.SSOTOKEN_REJECTED: | |
b.getUserAuthData(x, !1, !0, { | |
result: function(a) { | |
r(d, function() { | |
if (!a) return null; | |
q(t, A); | |
}, v); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
break; | |
case p.USER_REAUTH: | |
q(t, A); | |
break; | |
case p.KEYX_REQUIRED: | |
var x = rd(n.messageId), | |
J = new N(A, b); | |
sd(c, null, null, x, { | |
result: function(a) { | |
r(d, function() { | |
c.isPeerToPeer() && a.setPeerAuthTokens(t.peerMasterToken, t.peerUserIdToken); | |
a.setRenewable(!0); | |
a.setNonReplayable(J.isNonReplayable()); | |
return { | |
errorResult: new F(a, J), | |
tokenTicket: null | |
}; | |
}, v); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
break; | |
case p.EXPIRED: | |
this.getNewestMasterToken(a, c, k, { | |
result: function(a) { | |
r(d, function() { | |
var f = a && a.masterToken, | |
h = t.userIdToken, | |
k = rd(n.messageId), | |
q = new N(A, b); | |
sd(c, f, h, k, { | |
result: function(b) { | |
r(d, function() { | |
c.isPeerToPeer() && b.setPeerAuthTokens(t.peerMasterToken, t.peerUserIdToken); | |
t.masterToken.equals(f) && b.setRenewable(!0); | |
b.setNonReplayable(q.isNonReplayable()); | |
return { | |
errorResult: new F(b, q), | |
tokenTicket: a | |
}; | |
}, v); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}, v); | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
break; | |
case p.REPLAYED: | |
this.getNewestMasterToken(a, c, k, { | |
result: function(a) { | |
r(d, function() { | |
var f = a && a.masterToken, | |
h = t.userIdToken, | |
k = rd(n.messageId), | |
q = new N(A, b); | |
sd(c, f, h, k, { | |
result: function(b) { | |
r(d, function() { | |
c.isPeerToPeer() && b.setPeerAuthTokens(t.peerMasterToken, t.peerUserIdToken); | |
t.masterToken.equals(f) ? (b.setRenewable(!0), b.setNonReplayable(!1)) : b.setNonReplayable(q.isNonReplayable()); | |
return { | |
errorResult: new F(b, q), | |
tokenTicket: a | |
}; | |
}, v); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
break; | |
default: | |
return null; | |
} | |
}, v); | |
}, | |
cleanupContext: function(a, c, b) { | |
switch (b.errorCode) { | |
case p.ENTITY_REAUTH: | |
this.deleteMasterToken(a, c.masterToken); | |
break; | |
case p.USER_REAUTH: | |
b = c.userIdToken, c.masterToken && b && a.getMslStore().removeUserIdToken(b); | |
} | |
}, | |
send: function(a, c, b, h, n, k, d) { | |
function f(a, f, h) { | |
r(d, function() { | |
var k = n.getPeerUserIdToken(); | |
!c.isPeerToPeer() && !f || c.isPeerToPeer() && !k ? (k = b.getCustomer()) ? n.setCustomer(k, { | |
result: function(c) { | |
r(d, function() { | |
f = n.getUserIdToken(); | |
q(a, f, h); | |
}, J); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}) : q(a, f, h) : q(a, f, h); | |
}, J); | |
} | |
function q(a, c, f) { | |
r(d, function() { | |
var h = !f && (!b.isEncrypted() || n.willEncryptPayloads()) && (!b.isIntegrityProtected() || n.willIntegrityProtectPayloads()) && (!b.isNonReplayable() || n.isNonReplayable() && a); | |
h || n.setNonReplayable(!1); | |
var k = []; | |
n.isRenewable() && (!a || a.isRenewable() || b.isNonReplayable()) ? b.getKeyRequestData({ | |
result: function(b) { | |
r(d, function() { | |
for (var f = 0; f < b.length; ++f) { | |
var q = b[f]; | |
k.push(q); | |
n.addKeyRequestData(q); | |
} | |
v(a, c, h, k); | |
}, J); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}) : v(a, c, h, k); | |
}, J); | |
} | |
function v(f, q, v, A) { | |
r(d, function() { | |
var A = new Gh(c, b, n); | |
b.updateServiceTokens(A, !v, { | |
result: function(A) { | |
n.getHeader({ | |
result: function(A) { | |
r(d, function() { | |
var x = b.getDebugContext(); | |
x && x.sentHeader(A); | |
x = n.getKeyExchangeData(); | |
this.updateOutgoingCryptoContexts(c, A, x); | |
this.storeServiceTokens(c, f, q, A.serviceTokens); | |
x = !c.isPeerToPeer() && x ? x.cryptoContext : A.cryptoContext; | |
if (a.isAborted()) throw new wb("send aborted."); | |
var J = null != this._filterFactory ? this._filterFactory.getOutputStream(h) : h; | |
Ie(c, J, Na, A, x, k, { | |
result: function(c) { | |
a.setAbort(function() { | |
c.abort(); | |
}); | |
t(c, A, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, J); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, J); | |
} | |
function t(f, h, n) { | |
if (n) b.write(f, k, { | |
result: function(c) { | |
r(d, function() { | |
if (a.isAborted()) throw new wb("MessageOutputStream write aborted."); | |
A(f, h, n); | |
}, J); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
else { | |
var q = new y, | |
v = new Ed; | |
Ie(c, q, Na, h, v, k, { | |
result: function(c) { | |
b.write(c, k, { | |
result: function(b) { | |
r(d, function() { | |
if (a.isAborted()) throw new wb("MessageOutputStream proxy write aborted."); | |
c.close(k, { | |
result: function(a) { | |
r(d, function() { | |
if (!a) throw new wb("MessageOutputStream proxy close aborted."); | |
var b = c.getPayloads(); | |
A(f, h, n, b); | |
}, J); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, J); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} | |
} | |
function A(a, c, b, f) { | |
a.close(k, { | |
result: function(h) { | |
r(d, function() { | |
if (!h) throw new wb("MessageOutputStream close aborted."); | |
f || (f = a.getPayloads()); | |
return new O(c, f, !b); | |
}, J); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} | |
var J = this; | |
r(d, function() { | |
var a = n.getMasterToken(), | |
c = n.getUserIdToken(), | |
h = !1; | |
if (b.getUserId()) { | |
var k = !c; | |
b.getUserAuthData(null, n.isRenewable(), k, { | |
result: function(b) { | |
r(d, function() { | |
b && (n.willEncryptHeader() && n.willIntegrityProtectHeader() ? n.setUserAuthenticationData(b) : h = !0); | |
f(a, c, h); | |
}, J); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} else f(a, c, h); | |
}, J); | |
}, | |
receive: function(a, c, b, h, n, k, t) { | |
var f = this; | |
r(t, function() { | |
if (a.isAborted()) throw new wb("receive aborted."); | |
var q = []; | |
n && (q = n.keyRequestData.filter(function() { | |
return !0; | |
})); | |
var v = b.getCryptoContexts(), | |
A = this._filterFactory ? this._filterFactory.getInputStream(h) : h; | |
Ih(c, A, Na, q, v, k, { | |
result: function(h) { | |
a.setAbort(function() { | |
h.abort(); | |
}); | |
h.isReady(k, { | |
result: function(a) { | |
r(t, function() { | |
if (!a) throw new wb("MessageInputStream aborted."); | |
var k = h.getMessageHeader(), | |
q = h.getErrorHeader(), | |
v = b.getDebugContext(); | |
v && v.receivedHeader(k ? k : q); | |
if (n && (v = q ? q.errorCode : null, k || v != p.FAIL && v != p.TRANSIENT_FAILURE && v != p.ENTITY_REAUTH && v != p.ENTITYDATA_REAUTH)) { | |
var v = k ? k.messageId : q.messageId, | |
A = rd(n.messageId); | |
if (v != A) throw new Oa(d.UNEXPECTED_RESPONSE_MESSAGE_ID, "expected " + A + "; received " + v); | |
} | |
c.getEntityAuthenticationData(null, { | |
result: function(a) { | |
r(t, function() { | |
var f = a.getIdentity(), | |
v; | |
if (k) { | |
v = k.entityAuthenticationData; | |
var t = k.masterToken; | |
v = t ? k.sender : v.getIdentity(); | |
if (t && t.isDecrypted() && t.identity != v || f == v) throw new Oa(d.UNEXPECTED_MESSAGE_SENDER, v); | |
n && this.updateIncomingCryptoContexts(c, n, h); | |
f = k.keyResponseData; | |
c.isPeerToPeer() ? (f = f ? f.masterToken : k.peerMasterToken, t = k.peerUserIdToken, v = k.peerServiceTokens) : (f = f ? f.masterToken : k.masterToken, t = k.userIdToken, v = k.serviceTokens); | |
var A = b.getUserId(); | |
A && t && !t.isVerified() && c.getMslStore().addUserIdToken(A, t); | |
this.storeServiceTokens(c, f, t, v); | |
} else if (v = q.entityAuthenticationData.getIdentity(), f == v) throw new Oa(d.UNEXPECTED_MESSAGE_SENDER, v); | |
return h; | |
}, f); | |
}, | |
error: t.error | |
}); | |
}, f); | |
}, | |
timeout: function() { | |
t.timeout(); | |
}, | |
error: function(a) { | |
t.error(a); | |
} | |
}); | |
}, | |
timeout: function() { | |
t.timeout(); | |
}, | |
error: function(a) { | |
t.error(a); | |
} | |
}); | |
}, f); | |
}, | |
sendReceive: function(a, c, b, h, n, k, d, t, u) { | |
function f(f, v) { | |
r(u, function() { | |
k.setRenewable(v); | |
this.send(a, c, b, n, k, d, { | |
result: function(n) { | |
r(u, function() { | |
var k = n.requestHeader.keyRequestData; | |
t || n.handshake || !k.isEmpty() ? this.receive(a, c, b, h, n.requestHeader, d, { | |
result: function(a) { | |
r(u, function() { | |
v && this.releaseRenewalLock(c, f, a); | |
return new H(a, n); | |
}, q); | |
}, | |
timeout: function() { | |
r(u, function() { | |
v && this.releaseRenewalLock(c, f, null); | |
u.timeout(); | |
}, q); | |
}, | |
error: function(a) { | |
r(u, function() { | |
v && this.releaseRenewalLock(c, f, null); | |
throw a; | |
}, q); | |
} | |
}) : r(u, function() { | |
v && this.releaseRenewalLock(c, f, null); | |
return new H(null, n); | |
}, q); | |
}, q); | |
}, | |
timeout: function() { | |
r(u, function() { | |
v && this.releaseRenewalLock(c, f, null); | |
u.timeout(); | |
}, q); | |
}, | |
error: function(a) { | |
r(u, function() { | |
v && this.releaseRenewalLock(c, f, null); | |
throw a; | |
}, q); | |
} | |
}); | |
}, q); | |
} | |
var q = this; | |
r(u, function() { | |
var h = new ue; | |
this.acquireRenewalLock(a, c, b, h, k, d, { | |
result: function(a) { | |
f(h, a); | |
}, | |
timeout: function() { | |
u.timeout(); | |
}, | |
error: function(a) { | |
a instanceof wb ? u.result(null) : u.error(a); | |
} | |
}); | |
}, q); | |
}, | |
acquireRenewalLock: function(c, b, h, n, k, d, t) { | |
function f(A, x, J) { | |
r(t, function() { | |
if (c.isAborted()) throw new wb("acquireRenewalLock aborted."); | |
for (var z = null, u = 0; u < this._renewingContexts.length; ++u) { | |
var E = this._renewingContexts[u]; | |
if (E.ctx === b) { | |
z = E.queue; | |
break; | |
} | |
} | |
if (!z) return this._renewingContexts.push({ | |
ctx: b, | |
queue: n | |
}), !0; | |
var m = z.poll(d, { | |
result: function(c) { | |
r(t, function() { | |
if (c === na) throw new wb("acquireRenewalLock aborted."); | |
z.add(c); | |
if (c === a || c.isExpired()) f(c, x, J); | |
else { | |
if (J && !x || x && !x.isBoundTo(c)) { | |
var n = b.getMslStore().getUserIdToken(J); | |
x = n && n.isBoundTo(c) ? n : null; | |
} | |
k.setAuthTokens(c, x); | |
k.isRenewable() && c.equals(A) ? f(c, x, J) : h.isRequestingTokens() && !x ? f(c, x, J) : q(c, x); | |
} | |
}, v); | |
}, | |
timeout: function() {}, | |
error: function(a) {} | |
}); | |
c.setAbort(function() { | |
m && (z.cancel(m), m = na); | |
}); | |
}, v); | |
} | |
function q(a, f) { | |
r(t, function() { | |
if (c.isAborted()) throw new wb("acquireRenewalLock aborted."); | |
if (!a || a.isRenewable() || !f && h.getUserId() || f && f.isRenewable()) { | |
for (var k = null, q = 0; q < this._renewingContexts.length; ++q) { | |
var v = this._renewingContexts[q]; | |
if (v.ctx === b) { | |
k = v.queue; | |
break; | |
} | |
} | |
if (!k) return this._renewingContexts.push({ | |
ctx: b, | |
queue: n | |
}), !0; | |
} | |
return !1; | |
}, v); | |
} | |
var v = this; | |
r(t, function() { | |
var a = k.getMasterToken(), | |
c = k.getUserIdToken(), | |
b = h.getUserId(); | |
h.isEncrypted() && !k.willEncryptPayloads() || h.isIntegrityProtected() && !k.willIntegrityProtectPayloads() || k.isRenewable() || !a && h.isNonReplayable() || a && a.isExpired() || !(c || !b || k.willEncryptHeader() && k.willIntegrityProtectHeader()) || h.isRequestingTokens() && (!a || b && !c) ? f(a, c, b) : q(a, c); | |
}, v); | |
}, | |
releaseRenewalLock: function(c, b, h) { | |
for (var f, n, k = 0; k < this._renewingContexts.length; ++k) { | |
var q = this._renewingContexts[k]; | |
if (q.ctx === c) { | |
f = k; | |
n = q.queue; | |
break; | |
} | |
} | |
if (n !== b) throw new ca("Attempt to release renewal lock that is not owned by this queue."); | |
h ? (h = h.messageHeader) ? (n = h.keyResponseData) ? b.add(n.masterToken) : (c = c.isPeerToPeer() ? h.peerMasterToken : h.masterToken) ? b.add(c) : b.add(a) : b.add(a) : b.add(a); | |
this._renewingContexts.splice(f, 1); | |
} | |
}); | |
Lh = ea.Class.create({ | |
init: function() { | |
var a = { | |
_impl: { | |
value: new h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_shutdown: { | |
value: !1, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, a); | |
}, | |
setFilterFactory: function(a) { | |
this._impl.setFilterFactory(a); | |
}, | |
shutdown: function() { | |
this._shutdown = !0; | |
}, | |
receive: function(a, c, b, h, n, k) { | |
if (this._shutdown) throw new D("MslControl is shutdown."); | |
var f = new t(this._impl, a, c, b, h, n); | |
setTimeout(function() { | |
f.call(k); | |
}, 0); | |
return L(f); | |
}, | |
respond: function(a, b, h, n, k, d, t) { | |
if (this._shutdown) throw new D("MslControl is shutdown."); | |
var f = new c(this._impl, a, b, h, n, k, d); | |
setTimeout(function() { | |
f.call(t); | |
}, 0); | |
return L(f); | |
}, | |
error: function(a, c, h, n, k, d, t) { | |
if (this._shutdown) throw new D("MslControl is shutdown."); | |
var f = new b(this._impl, a, c, h, n, k, d); | |
setTimeout(function() { | |
f.call(t); | |
}, 0); | |
return L(f); | |
}, | |
request: function(a, c) { | |
if (this._shutdown) throw new D("MslControl is shutdown."); | |
var b, f, h, n, q; | |
if (5 == arguments.length) { | |
if (b = arguments[2], h = f = null, n = arguments[3], q = arguments[4], a.isPeerToPeer()) { | |
q.error(new ca("This method cannot be used in peer-to-peer mode.")); | |
return; | |
} | |
} else if (6 == arguments.length && (b = null, f = arguments[2], h = arguments[3], n = arguments[4], q = arguments[5], !a.isPeerToPeer())) { | |
q.error(new ca("This method cannot be used in trusted network mode.")); | |
return; | |
} | |
var d = new k(this._impl, a, c, b, f, h, null, 0, n); | |
setTimeout(function() { | |
d.call(q); | |
}, 0); | |
return L(d); | |
} | |
}); | |
t = ea.Class.create({ | |
init: function(a, c, b, h, n, k) { | |
Object.defineProperties(this, { | |
_ctrl: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_ctx: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_msgCtx: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_input: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_output: { | |
value: n, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timeout: { | |
value: k, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_aborted: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_abortFunc: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
isAborted: function() { | |
return this._aborted; | |
}, | |
abort: function() { | |
this._aborted = !0; | |
this._abortFunc && this._abortFunc.call(this); | |
}, | |
setAbort: function(a) { | |
this._abortFunc = a; | |
}, | |
call: function(a) { | |
function c(c) { | |
r(a, function() { | |
var f = c.messageHeader; | |
if (!f) return c; | |
this.setAbort(function() { | |
c.abort(); | |
}); | |
c.mark(Number.MAX_VALUE); | |
c.read(1, h._timeout, { | |
result: function(f) { | |
r(a, function() { | |
if (f && 0 == f.length) return null; | |
if (f) return c.reset(), c; | |
b(c); | |
}, h); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(c) { | |
r(a, function() { | |
if (C(c)) return null; | |
var b = f ? f.messageId : null, | |
n, k; | |
c instanceof Bb ? (n = d.MSL_COMMS_FAILURE, k = c) : (n = d.INTERNAL_EXCEPTION, k = new ca("Error peeking into the message payloads.")); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), b, n, null, this._output, this._timeout, { | |
result: function(c) { | |
a.error(k); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(b) { | |
r(a, function() { | |
if (C(b)) return null; | |
throw new uc("Error peeking into the message payloads.", b, c); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
function b(c) { | |
r(a, function() { | |
c.close(); | |
this._ctrl.buildResponse(this, this._ctx, this._msgCtx, c.messageHeader, this._timeout, { | |
result: function(b) { | |
r(a, function() { | |
var h = b.builder, | |
n = b.tokenTicket, | |
q = c.messageHeader, | |
d = new sa(this._msgCtx); | |
if (!this._ctx.isPeerToPeer() || q.isEncrypting() || q.keyResponseData) f(q, h, d, n); | |
else { | |
var v = new k(this._ctrl, this._ctx, d, null, this._input, this._output, b, 1, this._timeout); | |
this.setAbort(function() { | |
v.abort(); | |
}); | |
v.call(a); | |
} | |
}, h); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(b) { | |
r(a, function() { | |
if (C(b)) return null; | |
var f, n, k, q; | |
b instanceof D ? (f = b.messageId, n = b.error, k = c.messageHeader.messageCapabilities, k = this._ctrl.messageRegistry.getUserMessage(n, k ? k.languages : null), q = b) : (f = requestHeader ? requestHeader.messageId : null, n = d.INTERNAL_EXCEPTION, k = null, q = new ca("Error creating an automatic handshake response.", b)); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), f, n, k, this._output, this._timeout, { | |
result: function(c) { | |
a.error(q); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(c) { | |
r(a, function() { | |
if (C(c)) return null; | |
throw new uc("Error creating an automatic handshake response.", c, b); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
function f(c, b, f, n) { | |
r(a, function() { | |
b.setRenewable(!1); | |
this._ctrl.send(this._ctx, f, this._output, b, this._timeout, { | |
result: function(c) { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this._ctrl.releaseMasterToken(n); | |
return null; | |
}, h); | |
}, | |
timeout: function() { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this._ctrl.releaseMasterToken(n); | |
a.timeout(); | |
}, h); | |
}, | |
error: function(b) { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this._ctrl.releaseMasterToken(n); | |
if (C(b)) return null; | |
var f, k, q, v; | |
b instanceof D ? (f = b.messageId, k = b.error, q = c ? c.messageCapabilities : null, q = this._ctrl.messageRegistry.getUserMessage(k, q ? q.languages : null), v = b) : b instanceof Bb ? (f = c ? c.messageId : null, k = d.MSL_COMMS_FAILURE, q = null, v = b) : (f = c ? c.messageId : null, k = d.INTERNAL_EXCEPTION, q = null, v = new ca("Error sending an automatic handshake response.", b)); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), f, k, q, this._output, this._timeout, { | |
result: function(c) { | |
a.error(v); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(c) { | |
r(a, function() { | |
if (C(c)) return null; | |
throw new uc("Error sending an automatic handshake response.", c, b); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
var h = this; | |
r(a, function() { | |
this._ctrl.receive(this, this._ctx, this._msgCtx, this._input, null, this._timeout, { | |
result: function(a) { | |
c(a); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(c) { | |
r(a, function() { | |
if (C(c)) return null; | |
var b, f, n, k; | |
c instanceof D ? (b = c.messageId, f = c.error, n = this._ctrl.messageRegistry.getUserMessage(f, null), k = c) : (b = null, f = d.INTERNAL_EXCEPTION, n = null, k = new ca("Error receiving the message header.", c)); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), b, f, n, this._output, this._timeout, { | |
result: function(c) { | |
a.error(k); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(b) { | |
r(a, function() { | |
if (C(b)) return null; | |
throw new uc("Error receiving the message header.", b, c); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
}); | |
}, h); | |
} | |
}); | |
c = ea.Class.create({ | |
init: function(a, c, b, h, n, k, d) { | |
Object.defineProperties(this, { | |
_ctrl: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_ctx: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_msgCtx: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_input: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_output: { | |
value: n, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_request: { | |
value: k, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timeout: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_aborted: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_abortFunc: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
isAborted: function() { | |
return this._aborted; | |
}, | |
abort: function() { | |
this._aborted = !0; | |
this._abortFunc && this._abortFunc.call(this); | |
}, | |
setAbort: function(a) { | |
this._abortFunc = a; | |
}, | |
trustedNetworkExecute: function(a, c, b) { | |
var f = this; | |
r(b, function() { | |
if (12 < c + 1) return !1; | |
var h; | |
if (h = this._msgCtx.isIntegrityProtected() && !a.willIntegrityProtectHeader() ? d.RESPONSE_REQUIRES_INTEGRITY_PROTECTION : this._msgCtx.isEncrypted() && !a.willEncryptPayloads() ? d.RESPONSE_REQUIRES_ENCRYPTION : null) { | |
var n = Yd(a.getMessageId()); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), n, h, null, this._output, this._timeout, { | |
result: function(a) { | |
b.result(!1); | |
}, | |
timeout: function() { | |
b.timeout(); | |
}, | |
error: function(a) { | |
r(b, function() { | |
if (C(a)) return !1; | |
throw new uc("Response requires encryption or integrity protection but cannot be protected: " + h, a, null); | |
}, f); | |
} | |
}); | |
} else !this._msgCtx.getCustomer() || a.getMasterToken() || a.getKeyExchangeData() ? (a.setRenewable(!1), this._ctrl.send(this._ctx, this._msgCtx, this._output, a, this._timeout, { | |
result: function(a) { | |
b.result(!0); | |
}, | |
timeout: function() { | |
b.timeout(); | |
}, | |
error: function(a) { | |
b.error(a); | |
} | |
})) : (n = Yd(a.getMessageId()), I(this, this._ctx, this._msgCtx.getDebugContext(), n, d.RESPONSE_REQUIRES_MASTERTOKEN, null, this._output, this._timeout, { | |
result: function(a) { | |
b.result(!1); | |
}, | |
timeout: function() { | |
b.timeout(); | |
}, | |
error: function(a) { | |
r(b, function() { | |
if (C(a)) return !1; | |
throw new uc("Response wishes to attach a user ID token but there is no master token.", a, null); | |
}, f); | |
} | |
})); | |
}, f); | |
}, | |
peerToPeerExecute: function(a, c, b, h) { | |
function f(c) { | |
r(h, function() { | |
var f = c.response; | |
f.close(); | |
f = f.getErrorHeader(); | |
this._ctrl.cleanupContext(this._ctx, c.requestHeader, f); | |
this._ctrl.buildErrorResponse(this, this._ctx, a, c, f, { | |
result: function(a) { | |
r(h, function() { | |
if (!a) return !1; | |
var c = a.errorResult, | |
f = a.tokenTicket; | |
this.peerToPeerExecute(c.msgCtx, c.builder, b, { | |
result: function(a) { | |
r(h, function() { | |
this._ctrl.releaseMasterToken(f); | |
return a; | |
}, n); | |
}, | |
timeout: function() { | |
r(h, function() { | |
this._ctrl.releaseMasterToken(f); | |
h.timeout(); | |
}, n); | |
}, | |
error: function(a) { | |
r(h, function() { | |
this._ctrl.releaseMasterToken(f); | |
throw a; | |
}, n); | |
} | |
}); | |
}, n); | |
} | |
}); | |
}, n); | |
} | |
var n = this; | |
r(h, function() { | |
if (12 < b + 2) return !1; | |
if (null != a.getCustomer() && null == c.getPeerMasterToken() && null == c.getKeyExchangeData()) { | |
var k = Yd(c.getMessageId()); | |
I(this, this._ctx, a.getDebugContext(), k, d.RESPONSE_REQUIRES_MASTERTOKEN, null, this._output, this._timeout, { | |
result: function(a) { | |
h.result(!1); | |
}, | |
timeout: function() { | |
h.timeout(); | |
}, | |
error: function(a) { | |
r(h, function() { | |
if (C(a)) return !1; | |
throw new uc("Response wishes to attach a user ID token but there is no master token.", a, null); | |
}, n); | |
} | |
}); | |
} else this._ctrl.sendReceive(this._ctx, a, this._input, this._output, c, this._timeout, !1, { | |
result: function(c) { | |
r(h, function() { | |
function k() { | |
d.read(32768, n._timeout, { | |
result: function(a) { | |
r(h, function() { | |
a ? k() : q(); | |
}, n); | |
}, | |
timeout: function() { | |
h.timeout(); | |
}, | |
error: function(a) { | |
h.error(a); | |
} | |
}); | |
} | |
function q() { | |
r(h, function() { | |
var f = new N(c.payloads, a); | |
this._ctrl.buildResponse(this, this._ctx, f, v, this._timeout, { | |
result: function(a) { | |
r(h, function() { | |
var c = a.tokenTicket; | |
this.peerToPeerExecute(f, a.builder, b, { | |
result: function(a) { | |
r(h, function() { | |
this._ctrl.releaseMasterToken(c); | |
return a; | |
}, n); | |
}, | |
timeout: function() { | |
r(h, function() { | |
this._ctrl.releaseMasterToken(c); | |
h.timeout(); | |
}, n); | |
}, | |
error: function(a) { | |
r(h, function() { | |
this._ctrl.releaseMasterToken(c); | |
throw a; | |
}, n); | |
} | |
}); | |
}, n); | |
}, | |
timeout: function() { | |
h.timeout(); | |
}, | |
error: function(a) { | |
h.error(a); | |
} | |
}); | |
}, n); | |
} | |
var d = c.response; | |
b += 2; | |
if (!d) return !0; | |
var v = d.getMessageHeader(); | |
if (v) { | |
var t = c.payloads, | |
t = 0 < t.length && 0 < t[0].data.length; | |
if (c.handshake && t) k(); | |
else return !0; | |
} else f(c); | |
}, n); | |
}, | |
timeout: function() { | |
h.timeout(); | |
}, | |
error: function(a) { | |
h.error(a); | |
} | |
}); | |
}, n); | |
}, | |
call: function(a) { | |
var c = this; | |
this._ctrl.buildResponse(this, this._ctx, this._msgCtx, this._request, this._timeout, { | |
result: function(b) { | |
r(a, function() { | |
var f = b.builder, | |
h = b.tokenTicket; | |
this._ctx.isPeerToPeer() ? this.peerToPeerExecute(this._msgCtx, f, 3, { | |
result: function(b) { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this.releaseMasterToken(h); | |
return b; | |
}, c); | |
}, | |
timeout: function() { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this.releaseMasterToken(h); | |
a.timeout(); | |
}, c); | |
}, | |
error: function(b) { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this.releaseMasterToken(h); | |
if (C(b)) return !1; | |
var n = Yd(f.getMessageId()), | |
k, q, v; | |
b instanceof D ? (k = b.error, q = this._request.messageCapabilities, q = this._ctrl.messageRegistry.getUserMessage(k, q ? q.languages : null), v = b) : b instanceof Bb ? (k = d.MSL_COMMS_FAILURE, q = null, v = b) : (k = d.INTERNAL_EXCEPTION, q = null, v = new ca("Error sending the response.", b)); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), n, k, q, this._output, this._timeout, { | |
result: function(c) { | |
a.error(v); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(b) { | |
r(a, function() { | |
if (C(b)) return !1; | |
throw new uc("Error sending the response.", b, null); | |
}, c); | |
} | |
}); | |
}, c); | |
} | |
}) : this.trustedNetworkExecute(f, 3, { | |
result: function(b) { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this.releaseMasterToken(h); | |
return b; | |
}, c); | |
}, | |
timeout: function() { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this.releaseMasterToken(h); | |
a.timeout(); | |
}, c); | |
}, | |
error: function(b) { | |
r(a, function() { | |
this._ctx.isPeerToPeer() && this.releaseMasterToken(h); | |
if (C(b)) return !1; | |
var n = Yd(f.getMessageId()), | |
k, q, v; | |
b instanceof D ? (k = b.error, q = this._request.messageCapabilities, q = this._ctrl.messageRegistry.getUserMessage(k, q ? q.languages : null), v = b) : b instanceof Bb ? (k = d.MSL_COMMS_FAILURE, q = null, v = b) : (k = d.INTERNAL_EXCEPTION, q = null, v = new ca("Error sending the response.", b)); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), n, k, q, this._output, this._timeout, { | |
result: function(c) { | |
a.error(v); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(b) { | |
r(a, function() { | |
if (C(b)) return !1; | |
throw new uc("Error sending the response.", b, null); | |
}, c); | |
} | |
}); | |
}, c); | |
} | |
}); | |
}, c); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(b) { | |
r(a, function() { | |
if (C(b)) return !1; | |
var f, h, n, k; | |
b instanceof D ? (f = b.messageId, h = b.error, n = this._request.messageCapabilities, n = this._ctrl.messageRegistry.getUserMessage(h, n ? n.languages : null), k = b) : (f = null, h = d.INTERNAL_EXCEPTION, n = null, k = new ca("Error building the response.", b)); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), f, h, n, this._output, this._timeout, { | |
result: function(c) { | |
a.error(k); | |
}, | |
timeout: function() { | |
a.timeout(); | |
}, | |
error: function(f) { | |
r(a, function() { | |
if (C(f)) return null; | |
throw new uc("Error building the response.", f, b); | |
}, c); | |
} | |
}); | |
}, c); | |
} | |
}); | |
} | |
}); | |
b = ea.Class.create({ | |
init: function(a, c, b, h, n, k, d) { | |
Object.defineProperties(this, { | |
_ctrl: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_ctx: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_msgCtx: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_appError: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_output: { | |
value: output, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_request: { | |
value: k, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timeout: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_aborted: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_abortFunc: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
isAborted: function() { | |
return this._aborted; | |
}, | |
abort: function() { | |
this._aborted = !0; | |
this._abortFunc && this._abortFunc.call(this); | |
}, | |
setAbort: function(a) { | |
this._abortFunc = a; | |
}, | |
call: function(a) { | |
var c = this; | |
r(a, function() { | |
var b; | |
if (this._appError == ENTITY_REJECTED) b = this._request.masterToken ? d.MASTERTOKEN_REJECTED_BY_APP : d.ENTITY_REJECTED_BY_APP; | |
else if (this._appError == USER_REJECTED) b = this._request.userIdToken ? d.USERIDTOKEN_REJECTED_BY_APP : d.USER_REJECTED_BY_APP; | |
else throw new ca("Unhandled application error " + this._appError + "."); | |
var f = this._request.messageCapabilities, | |
f = this._ctrl.messageRegistry.getUserMessage(b, f ? f.languages : null); | |
I(this, this._ctx, this._msgCtx.getDebugContext(), this._request.messageId, b, f, this._output, this._timeout, { | |
result: function(c) { | |
a.result(c); | |
}, | |
timeout: a.timeout, | |
error: function(b) { | |
r(a, function() { | |
if (C(b)) return !1; | |
if (b instanceof D) throw b; | |
throw new ca("Error building the error response.", b); | |
}, c); | |
} | |
}); | |
}, c); | |
} | |
}); | |
var n = { | |
result: function() {}, | |
timeout: function() {}, | |
error: function() {} | |
}; | |
k = ea.Class.create({ | |
init: function(a, c, b, h, n, k, d, t, u) { | |
var f; | |
d ? (f = d.builder, d = d.tokenTicket) : d = f = null; | |
Object.defineProperties(this, { | |
_ctrl: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_ctx: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_msgCtx: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_remoteEntity: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_input: { | |
value: n, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_output: { | |
value: k, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_openedStreams: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_builder: { | |
value: f, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_tokenTicket: { | |
value: d, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_timeout: { | |
value: u, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_msgCount: { | |
value: t, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_aborted: { | |
value: !1, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_abortFunc: { | |
value: na, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
isAborted: function() { | |
return this._aborted; | |
}, | |
abort: function() { | |
this._aborted = !0; | |
this._abortFunc && this._abortFunc.call(this); | |
}, | |
setAbort: function(a) { | |
this._abortFunc = a; | |
}, | |
execute: function(a, c, b, h, d) { | |
function f(c) { | |
function f(a) { | |
r(d, function() { | |
var b = c.response; | |
return a ? a : b; | |
}, v); | |
} | |
r(d, function() { | |
var q = c.response; | |
q.close(); | |
var t = q.getErrorHeader(); | |
this._ctrl.cleanupContext(this._ctx, c.requestHeader, t); | |
this._ctrl.buildErrorResponse(this, this._ctx, a, c, t, b, { | |
result: function(a) { | |
r(d, function() { | |
if (!a) return q; | |
var c = a.errorResult, | |
t = a.tokenTicket, | |
A = c.builder, | |
c = c.msgCtx; | |
if (this._ctx.isPeerToPeer()) this.execute(c, A, this._timeout, h, { | |
result: function(a) { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(t); | |
f(a); | |
}, v); | |
}, | |
timeout: function() { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(t); | |
d.timeout(); | |
}, v); | |
}, | |
error: function(a) { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(t); | |
d.error(a); | |
}, v); | |
} | |
}); | |
else { | |
this._openedStreams && (this._input.close(), this._output.close(b, n)); | |
var x = new k(this._ctrl, this._ctx, c, this._remoteEntity, null, null, { | |
builder: A, | |
tokenTicket: t | |
}, h, this._timeout); | |
this.setAbort(function() { | |
x.abort(); | |
}); | |
x.call({ | |
result: function(a) { | |
f(a); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, v); | |
} | |
function q(c) { | |
r(d, function() { | |
function f() { | |
t.read(32768, v._timeout, { | |
result: function(a) { | |
a ? f() : q(); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} | |
function q() { | |
r(d, function() { | |
var f = new N(c.payloads, a); | |
this._ctrl.buildResponse(this, this._ctx, a, A, b, { | |
result: function(a) { | |
r(d, function() { | |
var c = a.tokenTicket; | |
this.execute(f, a.builder, this._timeout, h, { | |
result: function(a) { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(c); | |
return a; | |
}, v); | |
}, | |
timeout: function() { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(c); | |
d.timeout(); | |
}, v); | |
}, | |
error: function(a) { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(c); | |
throw a; | |
}, v); | |
} | |
}); | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, v); | |
} | |
var t = c.response, | |
A = t.getMessageHeader(), | |
x = c.payloads, | |
x = 0 < x.length && 0 < x[0].data.length; | |
if (!this._ctx.isPeerToPeer()) { | |
if (!c.handshake || !x) return t; | |
this._openedStreams && (this._input.close(), this._output.close(b, n)); | |
var J = new N(c.payloads, a); | |
this._ctrl.buildResponse(this, this._ctx, a, A, b, { | |
result: function(a) { | |
r(d, function() { | |
var c = new k(this._ctrl, this._ctx, J, this._remoteEntity, null, null, a, h, this._timeout); | |
this.setAbort(function() { | |
c.abort(); | |
}); | |
c.call(d); | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} else if (c.handshake && x) f(); | |
else if (0 < A.keyRequestData.length) { | |
var z = new sa(a); | |
this._ctrl.buildResponse(this, this._ctx, z, A, b, { | |
result: function(a) { | |
r(d, function() { | |
var c = a.builder, | |
b = a.tokenTicket; | |
t.mark(); | |
t.read(1, this._timeout, { | |
result: function(a) { | |
r(d, function() { | |
function f() { | |
t.read(32768, v._timeout, { | |
result: function(a) { | |
a ? f() : n(); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} | |
function n() { | |
v.execute(z, c, v._timeout, h, { | |
result: function(a) { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(b); | |
return a; | |
}, v); | |
}, | |
timeout: function() { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(b); | |
d.timeout(); | |
}, v); | |
}, | |
error: function(a) { | |
r(d, function() { | |
this._ctrl.releaseMasterToken(b); | |
throw a; | |
}, v); | |
} | |
}); | |
} | |
if (a) | |
if (t.reset(), 12 >= h + 1) c.setRenewable(!1), this._ctrl.send(this, this._ctx, z, this._output, c, this._timeout, { | |
result: function(a) { | |
r(d, function() { | |
this.releaseMasterToken(b); | |
return t; | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
else return this.releaseMasterToken(b), t; | |
else f(); | |
}, v); | |
}, | |
timeout: function() { | |
r(d, function() { | |
this.releaseMasterToken(b); | |
d.timeout(); | |
}, v); | |
}, | |
error: function(a) { | |
r(d, function() { | |
this.releaseMasterToken(b); | |
throw a; | |
}, v); | |
} | |
}); | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
} | |
}, v); | |
} | |
var v = this; | |
r(d, function() { | |
if (12 < h + 2) return null; | |
this._ctrl.sendReceive(this, this._ctx, a, this._input, this._output, c, b, !0, { | |
result: function(a) { | |
r(d, function() { | |
if (!a) return null; | |
var c = a.response; | |
h += 2; | |
c.getMessageHeader() ? q(a) : f(a); | |
}, v); | |
}, | |
timeout: function() { | |
d.timeout(); | |
}, | |
error: function(a) { | |
d.error(a); | |
} | |
}); | |
}, v); | |
}, | |
call: function(a) { | |
function c(c, f, h) { | |
r(a, function() { | |
this.execute(this._msgCtx, c, h, this._msgCount, { | |
result: function(c) { | |
r(a, function() { | |
this._ctrl.releaseMasterToken(f); | |
this._openedStreams && this._output.close(h, n); | |
c && c.closeSource(this._openedStreams); | |
return c; | |
}, b); | |
}, | |
timeout: function() { | |
r(a, function() { | |
this._ctrl.releaseMasterToken(f); | |
this._openedStreams && (this._output.close(h, n), this._input.close()); | |
a.timeout(); | |
}, b); | |
}, | |
error: function(c) { | |
r(a, function() { | |
this._ctrl.releaseMasterToken(f); | |
this._openedStreams && (this._output.close(h, n), this._input.close()); | |
if (C(c)) return null; | |
throw c; | |
}, b); | |
} | |
}); | |
}, b); | |
} | |
var b = this; | |
r(a, function() { | |
var f = this._timeout; | |
if (!this._input || !this._output) try { | |
this._remoteEntity.setTimeout(this._timeout); | |
var h = Date.now(), | |
k = this._remoteEntity.openConnection(); | |
this._output = k.output; | |
this._input = k.input; - 1 != f && (f = this._timeout - (Date.now() - h)); | |
this._openedStreams = !0; | |
} | |
catch (z) { | |
this._builder && this._ctrl.releaseMasterToken(this._tokenTicket); | |
this._output && this._output.close(this._timeout, n); | |
this._input && this._input.close(); | |
if (C(z)) return null; | |
throw z; | |
} | |
this._builder ? c(this._builder, this._tokenTicket, f) : this._ctrl.buildRequest(this, this._ctx, this._msgCtx, this._timeout, { | |
result: function(h) { | |
r(a, function() { | |
c(h.builder, h.tokenTicket, f); | |
}, b); | |
}, | |
timeout: function() { | |
r(a, function() { | |
this._openedStreams && (this._output.close(this._timeout, n), this._input.close()); | |
a.timeout(); | |
}, b); | |
}, | |
error: function(c) { | |
r(a, function() { | |
this._openedStreams && (this._output.close(this._timeout, n), this._input.close()); | |
if (C(c)) return null; | |
throw c; | |
}, b); | |
} | |
}); | |
}, b); | |
} | |
}); | |
})(); | |
var uf, Mh; | |
(function() { | |
uf = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
id: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.id = this.id; | |
return d; | |
}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof uf ? this.id == d.id : !1; | |
}, | |
uniqueKey: function() { | |
return this.id; | |
} | |
}); | |
Mh = function(m) { | |
var p = m.id; | |
if (!p) throw new ja(d.JSON_PARSE_ERROR, JSON.stringify(m)); | |
return new uf(p); | |
}; | |
})(); | |
ea.Class.create({ | |
isNewestMasterToken: function(d, m, p) {}, | |
isMasterTokenRevoked: function(d, m) {}, | |
acceptNonReplayableId: function(d, m, p, r) {}, | |
createMasterToken: function(d, m, p, r, H) {}, | |
isMasterTokenRenewable: function(d, m, p) {}, | |
renewMasterToken: function(d, m, p, r, H) {}, | |
isUserIdTokenRevoked: function(d, m, p, r) {}, | |
createUserIdToken: function(d, m, p, r) {}, | |
renewUserIdToken: function(d, m, p, r) {} | |
}); | |
var nc, qd; | |
(function() { | |
function p(d, m, p, r) { | |
this.sessiondata = d; | |
this.tokendata = m; | |
this.signature = p; | |
this.verified = r; | |
} | |
nc = ea.Class.create({ | |
init: function(d, p, r, H, C, I, D, L, y, N, sa) { | |
var a = this; | |
m(sa, function() { | |
if (r.getTime() < p.getTime()) throw new ca("Cannot construct a master token that expires before its renewal window opens."); | |
if (0 > H || H > Ka) throw new ca("Sequence number " + H + " is outside the valid range."); | |
if (0 > C || C > Ka) throw new ca("Serial number " + C + " is outside the valid range."); | |
var t = Math.floor(p.getTime() / 1E3), | |
c = Math.floor(r.getTime() / 1E3), | |
b; | |
if (N) b = N.sessiondata; | |
else { | |
var k = {}; | |
I && (k.issuerdata = I); | |
k.identity = D; | |
k.encryptionkey = qa(L.toByteArray()); | |
k.hmackey = qa(y.toByteArray()); | |
b = mb(JSON.stringify(k), Na); | |
} | |
if (N) return Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
renewalWindowSeconds: { | |
value: t, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
expirationSeconds: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
sequenceNumber: { | |
value: H, | |
writable: !1, | |
configurable: !1 | |
}, | |
serialNumber: { | |
value: C, | |
writable: !1, | |
configurable: !1 | |
}, | |
issuerData: { | |
value: I, | |
writable: !1, | |
configurable: !1 | |
}, | |
identity: { | |
value: D, | |
writable: !1, | |
configurable: !1 | |
}, | |
encryptionKey: { | |
value: L, | |
writable: !1, | |
configurable: !1 | |
}, | |
hmacKey: { | |
value: y, | |
writable: !1, | |
configurable: !1 | |
}, | |
sessiondata: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
verified: { | |
value: N.verified, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
tokendata: { | |
value: N.tokendata, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: N.signature, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}), this; | |
var h = d.getMslCryptoContext(); | |
h.encrypt(b, { | |
result: function(n) { | |
m(sa, function() { | |
var g = {}; | |
g.renewalwindow = t; | |
g.expiration = c; | |
g.sequencenumber = H; | |
g.serialnumber = C; | |
g.sessiondata = qa(n); | |
var l = mb(JSON.stringify(g), Na); | |
h.sign(l, { | |
result: function(f) { | |
m(sa, function() { | |
Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
renewalWindowSeconds: { | |
value: t, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
expirationSeconds: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
sequenceNumber: { | |
value: H, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
serialNumber: { | |
value: C, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
issuerData: { | |
value: I, | |
writable: !1, | |
configurable: !1 | |
}, | |
identity: { | |
value: D, | |
writable: !1, | |
configurable: !1 | |
}, | |
encryptionKey: { | |
value: L, | |
writable: !1, | |
configurable: !1 | |
}, | |
hmacKey: { | |
value: y, | |
writable: !1, | |
configurable: !1 | |
}, | |
sessiondata: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
verified: { | |
value: !0, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
tokendata: { | |
value: l, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: f, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, a); | |
}, | |
error: function(a) { | |
sa.error(a); | |
} | |
}); | |
}, a); | |
}, | |
error: function(a) { | |
sa.error(a); | |
} | |
}); | |
}, this); | |
}, | |
get renewalWindow() { | |
return new Date(1E3 * this.renewalWindowSeconds); | |
}, | |
get expiration() { | |
return new Date(1E3 * this.expirationSeconds); | |
}, | |
isDecrypted: function() { | |
return this.sessiondata ? !0 : !1; | |
}, | |
isVerified: function() { | |
return this.verified; | |
}, | |
isRenewable: function(d) { | |
return this.isVerified() ? this.renewalWindow.getTime() <= this.ctx.getTime() : !0; | |
}, | |
isExpired: function(d) { | |
return this.isVerified() ? this.expiration.getTime() <= this.ctx.getTime() : !1; | |
}, | |
isNewerThan: function(d) { | |
if (this.sequenceNumber == d.sequenceNumber) return this.expiration > d.expiration; | |
if (this.sequenceNumber > d.sequenceNumber) { | |
var m = this.sequenceNumber - Ka + 127; | |
return d.sequenceNumber >= m; | |
} | |
m = d.sequenceNumber - Ka + 127; | |
return this.sequenceNumber < m; | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.tokendata = qa(this.tokendata); | |
d.signature = qa(this.signature); | |
return d; | |
}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof nc ? this.serialNumber == d.serialNumber && this.sequenceNumber == d.sequenceNumber && this.expiration.getTime() == d.expiration.getTime() : !1; | |
}, | |
uniqueKey: function() { | |
return this.serialNumber + ":" + this.sequenceNumber + this.expiration.getTime(); | |
} | |
}); | |
qd = function(r, F, O) { | |
m(O, function() { | |
var B = r.getMslCryptoContext(), | |
C = F.tokendata, | |
I = F.signature; | |
if ("string" !== typeof C || "string" !== typeof I) throw new ja(d.JSON_PARSE_ERROR, "mastertoken " + JSON.stringify(F)); | |
var L, y; | |
try { | |
L = Ea(C); | |
} catch (db) { | |
throw new D(d.MASTERTOKEN_TOKENDATA_INVALID, "mastertoken " + JSON.stringify(F), db); | |
} | |
if (!L || 0 == L.length) throw new ja(d.MASTERTOKEN_TOKENDATA_MISSING, "mastertoken " + JSON.stringify(F)); | |
try { | |
y = Ea(I); | |
} catch (db) { | |
throw new D(d.MASTERTOKEN_SIGNATURE_INVALID, "mastertoken " + JSON.stringify(F), db); | |
} | |
B.verify(L, y, { | |
result: function(C) { | |
m(O, function() { | |
var I, H, a, t, c, b = Qa(L, Na); | |
try { | |
var k = JSON.parse(b); | |
I = parseInt(k.renewalwindow); | |
H = parseInt(k.expiration); | |
a = parseInt(k.sequencenumber); | |
t = parseInt(k.serialnumber); | |
c = k.sessiondata; | |
} catch (l) { | |
if (l instanceof SyntaxError) throw new ja(d.MASTERTOKEN_TOKENDATA_PARSE_ERROR, "mastertokendata " + b, l); | |
throw l; | |
} | |
if (!I || I != I || !H || H != H || "number" !== typeof a || a != a || "number" !== typeof t || t != t || "string" !== typeof c) throw new ja(d.MASTERTOKEN_TOKENDATA_PARSE_ERROR, "mastertokendata " + b); | |
if (H < I) throw new D(d.MASTERTOKEN_EXPIRES_BEFORE_RENEWAL, "mastertokendata " + b); | |
if (0 > a || a > Ka) throw new D(d.MASTERTOKEN_SEQUENCE_NUMBER_OUT_OF_RANGE, "mastertokendata " + b); | |
if (0 > t || t > Ka) throw new D(d.MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, "mastertokendata " + b); | |
var h = new Date(1E3 * I), | |
n = new Date(1E3 * H), | |
g; | |
try { | |
g = Ea(c); | |
} catch (l) { | |
throw new D(d.MASTERTOKEN_SESSIONDATA_INVALID, c, l); | |
} | |
if (!g || 0 == g.length) throw new D(d.MASTERTOKEN_SESSIONDATA_MISSING, c); | |
C ? B.decrypt(g, { | |
result: function(c) { | |
m(O, function() { | |
var b, l, g, k, J = Qa(c, Na); | |
try { | |
var E = JSON.parse(J); | |
b = E.issuerdata; | |
l = E.identity; | |
g = E.encryptionkey; | |
k = E.hmackey; | |
} catch (z) { | |
if (z instanceof SyntaxError) throw new ja(d.MASTERTOKEN_SESSIONDATA_PARSE_ERROR, "sessiondata " + J, z); | |
throw z; | |
} | |
if (b && "object" !== typeof b || !l || "string" !== typeof g || "string" !== typeof k) throw new ja(d.MASTERTOKEN_SESSIONDATA_PARSE_ERROR, "sessiondata " + J); | |
Xc(g, Jc, nd, { | |
result: function(f) { | |
Xc(k, Kc, pd, { | |
result: function(g) { | |
m(O, function() { | |
var k = new p(c, L, y, C); | |
new nc(r, h, n, a, t, b, l, f, g, k, O); | |
}); | |
}, | |
error: function(a) { | |
O.error(new N(d.MASTERTOKEN_KEY_CREATION_ERROR, a)); | |
} | |
}); | |
}, | |
error: function(a) { | |
O.error(new N(d.MASTERTOKEN_KEY_CREATION_ERROR, a)); | |
} | |
}); | |
}); | |
}, | |
error: function(a) { | |
O.error(a); | |
} | |
}) : (I = new p(null, L, y, C), new nc(r, h, n, a, t, null, null, null, null, I, O)); | |
}); | |
}, | |
error: function(d) { | |
O.error(d); | |
} | |
}); | |
}); | |
}; | |
})(); | |
var Vd, Gd; | |
(function() { | |
function p(d, m, p) { | |
this.tokendata = d; | |
this.signature = m; | |
this.verified = p; | |
} | |
Vd = ea.Class.create({ | |
init: function(d, p, r, H, C, I, L, y, N) { | |
var B = this; | |
m(N, function() { | |
if (r.getTime() < p.getTime()) throw new ca("Cannot construct a user ID token that expires before its renewal window opens."); | |
if (!H) throw new ca("Cannot construct a user ID token without a master token."); | |
if (0 > C || C > Ka) throw new ca("Serial number " + C + " is outside the valid range."); | |
var F = Math.floor(p.getTime() / 1E3), | |
a = Math.floor(r.getTime() / 1E3), | |
t = H.serialNumber; | |
if (y) { | |
var c = y.tokendata, | |
b = y.signature, | |
k = y.verified, | |
t = H.serialNumber; | |
Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
renewalWindowSeconds: { | |
value: F, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
expirationSeconds: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
mtSerialNumber: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
serialNumber: { | |
value: C, | |
writable: !1, | |
configurable: !1 | |
}, | |
issuerData: { | |
value: I, | |
writable: !1, | |
configurable: !1 | |
}, | |
customer: { | |
value: L, | |
writable: !1, | |
configurable: !1 | |
}, | |
verified: { | |
value: k, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
tokendata: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
} | |
c = {}; | |
I && (c.issuerdata = I); | |
c.identity = L; | |
var c = mb(JSON.stringify(c), Na), | |
h = d.getMslCryptoContext(); | |
h.encrypt(c, { | |
result: function(c) { | |
m(N, function() { | |
var b = {}; | |
b.renewalwindow = F; | |
b.expiration = a; | |
b.mtserialnumber = t; | |
b.serialnumber = C; | |
b.userdata = qa(c); | |
var l = mb(JSON.stringify(b), Na); | |
h.sign(l, { | |
result: function(c) { | |
m(N, function() { | |
Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
renewalWindowSeconds: { | |
value: F, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
expirationSeconds: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
mtSerialNumber: { | |
value: H.serialNumber, | |
writable: !1, | |
configurable: !1 | |
}, | |
serialNumber: { | |
value: C, | |
writable: !1, | |
configurable: !1 | |
}, | |
issuerData: { | |
value: I, | |
writable: !1, | |
configurable: !1 | |
}, | |
customer: { | |
value: L, | |
writable: !1, | |
configurable: !1 | |
}, | |
verified: { | |
value: !0, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
tokendata: { | |
value: l, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, B); | |
}, | |
error: function(a) { | |
m(N, function() { | |
a instanceof D && a.setEntity(H); | |
throw a; | |
}, B); | |
} | |
}); | |
}, B); | |
}, | |
error: function(a) { | |
m(N, function() { | |
a instanceof D && a.setEntity(H); | |
throw a; | |
}, B); | |
} | |
}); | |
}, this); | |
}, | |
get renewalWindow() { | |
return new Date(1E3 * this.renewalWindowSeconds); | |
}, | |
get expiration() { | |
return new Date(1E3 * this.expirationSeconds); | |
}, | |
isVerified: function() { | |
return this.verified; | |
}, | |
isDecrypted: function() { | |
return this.customer ? !0 : !1; | |
}, | |
isRenewable: function() { | |
return this.renewalWindow.getTime() <= this.ctx.getTime(); | |
}, | |
isExpired: function() { | |
return this.expiration.getTime() <= this.ctx.getTime(); | |
}, | |
isBoundTo: function(d) { | |
return d && d.serialNumber == this.mtSerialNumber; | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.tokendata = qa(this.tokendata); | |
d.signature = qa(this.signature); | |
return d; | |
}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof Vd ? this.serialNumber == d.serialNumber && this.mtSerialNumber == d.mtSerialNumber : !1; | |
}, | |
uniqueKey: function() { | |
return this.serialNumber + ":" + this.mtSerialNumber; | |
} | |
}); | |
Gd = function(r, F, O, H) { | |
m(H, function() { | |
var C = r.getMslCryptoContext(), | |
B = F.tokendata, | |
L = F.signature; | |
if ("string" !== typeof B || "string" !== typeof L) throw (new ja(d.JSON_PARSE_ERROR, "useridtoken " + JSON.stringify(F))).setEntity(O); | |
var y, N; | |
try { | |
y = Ea(B); | |
} catch (Ia) { | |
throw (new D(d.USERIDTOKEN_TOKENDATA_INVALID, "useridtoken " + JSON.stringify(F), Ia)).setEntity(O); | |
} | |
if (!y || 0 == y.length) throw (new ja(d.USERIDTOKEN_TOKENDATA_MISSING, "useridtoken " + JSON.stringify(F))).setEntity(O); | |
try { | |
N = Ea(L); | |
} catch (Ia) { | |
throw (new D(d.USERIDTOKEN_TOKENDATA_INVALID, "useridtoken " + JSON.stringify(F), Ia)).setEntity(O); | |
} | |
C.verify(y, N, { | |
result: function(B) { | |
m(H, function() { | |
var I, a, t, c, b, k = Qa(y, Na); | |
try { | |
var h = JSON.parse(k); | |
I = parseInt(h.renewalwindow); | |
a = parseInt(h.expiration); | |
t = parseInt(h.mtserialnumber); | |
c = parseInt(h.serialnumber); | |
b = h.userdata; | |
} catch (f) { | |
if (f instanceof SyntaxError) throw (new ja(d.USERIDTOKEN_TOKENDATA_PARSE_ERROR, "usertokendata " + k, f)).setEntity(O); | |
throw f; | |
} | |
if (!I || I != I || !a || a != a || "number" !== typeof t || t != t || "number" !== typeof c || c != c || "string" !== typeof b) throw (new ja(d.USERIDTOKEN_TOKENDATA_PARSE_ERROR, "usertokendata " + k)).setEntity(O); | |
if (a < I) throw (new D(d.USERIDTOKEN_EXPIRES_BEFORE_RENEWAL, "mastertokendata " + k)).setEntity(O); | |
if (0 > t || t > Ka) throw (new D(d.USERIDTOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, "usertokendata " + k)).setEntity(O); | |
if (0 > c || c > Ka) throw (new D(d.USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, "usertokendata " + k)).setEntity(O); | |
var n = new Date(1E3 * I), | |
g = new Date(1E3 * a); | |
if (!O || t != O.serialNumber) throw (new D(d.USERIDTOKEN_MASTERTOKEN_MISMATCH, "uit mtserialnumber " + t + "; mt " + JSON.stringify(O))).setEntity(O); | |
var l; | |
try { | |
l = Ea(b); | |
} catch (f) { | |
throw (new D(d.USERIDTOKEN_USERDATA_INVALID, b, f)).setEntity(O); | |
} | |
if (!l || 0 == l.length) throw (new D(d.USERIDTOKEN_USERDATA_MISSING, b)).setEntity(O); | |
B ? C.decrypt(l, { | |
result: function(a) { | |
m(H, function() { | |
var b, f, l = Qa(a, Na); | |
try { | |
var h = JSON.parse(l); | |
b = h.issuerdata; | |
f = h.identity; | |
} catch (z) { | |
if (z instanceof SyntaxError) throw (new ja(d.USERIDTOKEN_USERDATA_PARSE_ERROR, "userdata " + l)).setEntity(O); | |
throw z; | |
} | |
if (b && "object" !== typeof b || "object" !== typeof f) throw (new ja(d.USERIDTOKEN_USERDATA_PARSE_ERROR, "userdata " + l)).setEntity(O); | |
var k; | |
try { | |
k = Mh(f); | |
} catch (z) { | |
throw (new D(d.USERIDTOKEN_IDENTITY_INVALID, "userdata " + l, z)).setEntity(O); | |
} | |
f = new p(y, N, B); | |
new Vd(r, n, g, O, c, b, k, f, H); | |
}); | |
}, | |
error: function(a) { | |
m(H, function() { | |
a instanceof D && a.setEntity(O); | |
throw a; | |
}); | |
} | |
}) : (I = new p(y, N, B), new Vd(r, n, g, O, c, null, null, I, H)); | |
}); | |
}, | |
error: function(d) { | |
m(H, function() { | |
d instanceof D && d.setEntity(O); | |
throw d; | |
}); | |
} | |
}); | |
}); | |
}; | |
})(); | |
var td, ad, Ge; | |
(function() { | |
function p(m, p) { | |
var r = m.tokendata; | |
if ("string" !== typeof r) throw new ja(d.JSON_PARSE_ERROR, "servicetoken " + JSON.stringify(m)); | |
var C; | |
try { | |
C = Ea(r); | |
} catch (nb) { | |
throw new D(d.SERVICETOKEN_TOKENDATA_INVALID, "servicetoken " + JSON.stringify(m), nb); | |
} | |
if (!C || 0 == C.length) throw new ja(d.SERVICETOKEN_TOKENDATA_MISSING, "servicetoken " + JSON.stringify(m)); | |
var B; | |
try { | |
B = JSON.parse(Qa(C, Na)).name; | |
} catch (nb) { | |
if (nb instanceof SyntaxError) throw new ja(d.JSON_PARSE_ERROR, "servicetoken " + JSON.stringify(m), nb); | |
throw nb; | |
} | |
if (!B) throw new ja(d.JSON_PARSE_ERROR, "servicetoken " + JSON.stringify(m)); | |
return p[B] ? p[B] : p[""]; | |
} | |
function r(d, m, p) { | |
this.tokendata = d; | |
this.signature = m; | |
this.verified = p; | |
} | |
td = ea.Class.create({ | |
init: function(d, p, r, C, B, L, y, N, Ia, sa) { | |
var a = this; | |
m(sa, function() { | |
if (C && B && !B.isBoundTo(C)) throw new ca("Cannot construct a service token bound to a master token and user ID token where the user ID token is not bound to the same master token."); | |
var t = C ? C.serialNumber : -1, | |
c = B ? B.serialNumber : -1; | |
if (Ia) return h = Ia.tokendata, Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
mtSerialNumber: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
uitSerialNumber: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
}, | |
data: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
}, | |
encrypted: { | |
value: L, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
compressionAlgo: { | |
value: y, | |
writable: !1, | |
configurable: !1 | |
}, | |
verified: { | |
value: Ia.verified, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
tokendata: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: Ia.signature, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}), this; | |
var b; | |
y ? (b = xg(y, r), b.length < r.length || (y = null, b = r)) : (y = null, b = r); | |
var k = {}; | |
k.name = p; - 1 != t && (k.mtserialnumber = t); - 1 != c && (k.uitserialnumber = c); | |
k.encrypted = L; | |
y && (k.compressionalgo = y); | |
if (L && 0 < b.length) N.encrypt(b, { | |
result: function(b) { | |
m(sa, function() { | |
k.servicedata = qa(b); | |
var h = mb(JSON.stringify(k), Na); | |
N.sign(h, { | |
result: function(b) { | |
m(sa, function() { | |
Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
mtSerialNumber: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
uitSerialNumber: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
}, | |
data: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
}, | |
encrypted: { | |
value: L, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
compressionAlgo: { | |
value: y, | |
writable: !1, | |
configurable: !1 | |
}, | |
verified: { | |
value: !0, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
tokendata: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, a); | |
}, | |
error: function(a) { | |
m(sa, function() { | |
a instanceof D && (a.setEntity(C), a.setUser(B)); | |
throw a; | |
}); | |
} | |
}); | |
}, a); | |
}, | |
error: function(a) { | |
m(sa, function() { | |
a instanceof D && (a.setEntity(C), a.setUser(B)); | |
throw a; | |
}); | |
} | |
}); | |
else { | |
k.servicedata = qa(b); | |
var h = mb(JSON.stringify(k), Na); | |
N.sign(h, { | |
result: function(b) { | |
m(sa, function() { | |
Object.defineProperties(this, { | |
ctx: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
name: { | |
value: p, | |
writable: !1, | |
configurable: !1 | |
}, | |
mtSerialNumber: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
}, | |
uitSerialNumber: { | |
value: c, | |
writable: !1, | |
configurable: !1 | |
}, | |
data: { | |
value: r, | |
writable: !1, | |
configurable: !1 | |
}, | |
encrypted: { | |
value: L, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
compressionAlgo: { | |
value: y, | |
writable: !1, | |
configurable: !1 | |
}, | |
verified: { | |
value: !0, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
tokendata: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
signature: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, a); | |
}, | |
error: function(a) { | |
m(sa, function() { | |
a instanceof D && (a.setEntity(C), a.setUser(B)); | |
throw a; | |
}); | |
} | |
}); | |
} | |
}, this); | |
}, | |
isEncrypted: function() { | |
return this.encrypted; | |
}, | |
isVerified: function() { | |
return this.verified; | |
}, | |
isDecrypted: function() { | |
return this.data ? !0 : !1; | |
}, | |
isDeleted: function() { | |
return this.data && 0 == this.data.length; | |
}, | |
isMasterTokenBound: function() { | |
return -1 != this.mtSerialNumber; | |
}, | |
isBoundTo: function(d) { | |
return d ? d instanceof nc ? d.serialNumber == this.mtSerialNumber : d instanceof Vd ? d.serialNumber == this.uitSerialNumber : !1 : !1; | |
}, | |
isUserIdTokenBound: function() { | |
return -1 != this.uitSerialNumber; | |
}, | |
isUnbound: function() { | |
return -1 == this.mtSerialNumber && -1 == this.uitSerialNumber; | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.tokendata = qa(this.tokendata); | |
d.signature = qa(this.signature); | |
return d; | |
}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof td ? this.name == d.name && this.mtSerialNumber == d.mtSerialNumber && this.uitSerialNumber == d.uitSerialNumber : !1; | |
}, | |
uniqueKey: function() { | |
return this.name + ":" + this.mtSerialNumber + ":" + this.uitSerialNumber; | |
} | |
}); | |
ad = function(d, m, p, r, B, L, D, y, N) { | |
new td(d, m, p, r, B, L, D, y, null, N); | |
}; | |
Ge = function(B, L, H, C, I, y) { | |
m(y, function() { | |
!I || I instanceof Wd || (I = p(L, I)); | |
var F = L.tokendata, | |
O = L.signature; | |
if ("string" !== typeof F || "string" !== typeof O) throw (new ja(d.JSON_PARSE_ERROR, "servicetoken " + JSON.stringify(L))).setEntity(H).setEntity(C); | |
var N, sa; | |
try { | |
N = Ea(F); | |
} catch (f) { | |
throw (new D(d.SERVICETOKEN_TOKENDATA_INVALID, "servicetoken " + JSON.stringify(L), f)).setEntity(H).setEntity(C); | |
} | |
if (!N || 0 == N.length) throw (new ja(d.SERVICETOKEN_TOKENDATA_MISSING, "servicetoken " + JSON.stringify(L))).setEntity(H).setEntity(C); | |
try { | |
sa = Ea(O); | |
} catch (f) { | |
throw (new D(d.SERVICETOKEN_SIGNATURE_INVALID, "servicetoken " + JSON.stringify(L), f)).setEntity(H).setEntity(C); | |
} | |
var a, t, c, b, k, h, n = Qa(N, Na); | |
try { | |
var g = JSON.parse(n); | |
a = g.name; | |
t = g.mtserialnumber ? parseInt(g.mtserialnumber) : -1; | |
c = g.uitserialnumber ? parseInt(g.uitserialnumber) : -1; | |
b = g.encrypted; | |
k = g.compressionalgo; | |
h = g.servicedata; | |
} catch (f) { | |
if (f instanceof SyntaxError) throw (new ja(d.JSON_PARSE_ERROR, "servicetokendata " + n, f)).setEntity(H).setEntity(C); | |
throw f; | |
} | |
if (!a || "number" !== typeof t || t != t || "number" !== typeof c || c != c || "boolean" !== typeof b || k && "string" !== typeof k || "string" !== typeof h) throw (new ja(d.JSON_PARSE_ERROR, "servicetokendata " + n)).setEntity(H).setEntity(C); | |
if (g.mtserialnumber && 0 > t || t > Ka) throw (new D(d.SERVICETOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, "servicetokendata " + n)).setEntity(H).setEntity(C); | |
if (g.uitserialnumber && 0 > c || c > Ka) throw (new D(d.SERVICETOKEN_USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, "servicetokendata " + n)).setEntity(H).setEntity(C); | |
if (-1 != t && (!H || t != H.serialNumber)) throw (new D(d.SERVICETOKEN_MASTERTOKEN_MISMATCH, "st mtserialnumber " + t + "; mt " + H)).setEntity(H).setEntity(C); | |
if (-1 != c && (!C || c != C.serialNumber)) throw (new D(d.SERVICETOKEN_USERIDTOKEN_MISMATCH, "st uitserialnumber " + c + "; uit " + C)).setEntity(H).setEntity(C); | |
b = !0 === b; | |
var l; | |
if (k) { | |
if (!Cd[k]) throw new D(d.UNIDENTIFIED_COMPRESSION, k); | |
l = k; | |
} else l = null; | |
I ? I.verify(N, sa, { | |
result: function(f) { | |
m(y, function() { | |
if (f) { | |
var g; | |
try { | |
g = Ea(h); | |
} catch (A) { | |
throw (new D(d.SERVICETOKEN_SERVICEDATA_INVALID, "servicetokendata " + n, A)).setEntity(H).setEntity(C); | |
} | |
if (!g || 0 != h.length && 0 == g.length) throw (new D(d.SERVICETOKEN_SERVICEDATA_INVALID, "servicetokendata " + n)).setEntity(H).setEntity(C); | |
if (b && 0 < g.length) I.decrypt(g, { | |
result: function(h) { | |
m(y, function() { | |
var g = l ? sf(l, h) : h, | |
n = new r(N, sa, f); | |
new td(B, a, g, -1 != t ? H : null, -1 != c ? C : null, b, l, I, n, y); | |
}); | |
}, | |
error: function(a) { | |
m(y, function() { | |
a instanceof D && (a.setEntity(H), a.setUser(C)); | |
throw a; | |
}); | |
} | |
}); | |
else { | |
g = l ? sf(l, g) : g; | |
var k = new r(N, sa, f); | |
new td(B, a, g, -1 != t ? H : null, -1 != c ? C : null, b, l, I, k, y); | |
} | |
} else g = "" == h ? new Uint8Array(0) : null, k = new r(N, sa, f), new td(B, a, g, -1 != t ? H : null, -1 != c ? C : null, b, l, I, k, y); | |
}); | |
}, | |
error: function(a) { | |
m(y, function() { | |
a instanceof D && (a.setEntity(H), a.setUser(C)); | |
throw a; | |
}); | |
} | |
}) : (F = "" == h ? new Uint8Array(0) : null, O = new r(N, sa, !1), new td(B, a, F, -1 != t ? H : null, -1 != c ? C : null, b, l, I, O, y)); | |
}); | |
}; | |
})(); | |
var Cb = { | |
EMAIL_PASSWORD: "EMAIL_PASSWORD", | |
NETFLIXID: "NETFLIXID", | |
SSO: "SSO", | |
SWITCH_PROFILE: "SWITCH_PROFILE", | |
MDX: "MDX" | |
}; | |
Object.freeze(Cb); | |
var Uc, Bh; | |
(function() { | |
Uc = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
scheme: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getAuthData: function() {}, | |
equals: function(d) { | |
return this === d ? !0 : d instanceof Uc ? this.scheme == d.scheme : !1; | |
}, | |
toJSON: function() { | |
var d = {}; | |
d.scheme = this.scheme; | |
d.authdata = this.getAuthData(); | |
return d; | |
} | |
}); | |
Bh = function(p, r, F, y) { | |
m(y, function() { | |
var m = F.scheme, | |
C = F.authdata; | |
if (!m || !C) throw new ja(d.JSON_PARSE_ERROR, "userauthdata " + JSON.stringify(F)); | |
if (!Cb[m]) throw new Ma(d.UNIDENTIFIED_USERAUTH_SCHEME, m); | |
var B = p.getUserAuthenticationFactory(m); | |
if (!B) throw new Ma(d.USERAUTH_FACTORY_NOT_FOUND, m); | |
B.createData(p, r, C, y); | |
}); | |
}; | |
})(); | |
var Je = ea.Class.create({ | |
init: function(d) { | |
Object.defineProperties(this, { | |
scheme: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createData: function(d, m, p, r) {}, | |
authenticate: function(d, m, p, r) {} | |
}), | |
Zd, Nh; | |
(function() { | |
Zd = Uc.extend({ | |
init: function B(d, m) { | |
B.base.call(this, Cb.NETFLIXID); | |
Object.defineProperties(this, { | |
netflixId: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
secureNetflixId: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.netflixid = this.netflixId; | |
this.secureNetflixId && (d.securenetflixid = this.secureNetflixId); | |
return d; | |
}, | |
equals: function F(d) { | |
return this === d ? !0 : d instanceof Zd ? F.base.call(this, d) && this.netflixId == d.netflixId && this.secureNetflixId == d.secureNetflixId : !1; | |
} | |
}); | |
Nh = function(m) { | |
var p = m.netflixid, | |
r = m.securenetflixid; | |
if (!p) throw new ja(d.JSON_PARSE_ERROR, "NetflixId authdata " + JSON.stringify(m)); | |
return new Zd(p, r); | |
}; | |
})(); | |
var lj = Je.extend({ | |
init: function B() { | |
B.base.call(this, Cb.NETFLIXID); | |
}, | |
createData: function(d, p, r, H) { | |
m(H, function() { | |
return Nh(r); | |
}); | |
}, | |
authenticate: function(m, p, r, H) { | |
if (!(r instanceof Zd)) throw new ca("Incorrect authentication data type " + r + "."); | |
m = r.secureNetflixId; | |
if (!r.netflixId || !m) throw (new Ma(d.NETFLIXID_COOKIES_BLANK)).setUser(r); | |
throw (new Ma(d.UNSUPPORTED_USERAUTH_DATA, this.scheme)).setUser(r); | |
} | |
}), | |
Ke, Oh; | |
(function() { | |
Ke = Uc.extend({ | |
init: function F(d, m) { | |
F.base.call(this, Cb.EMAIL_PASSWORD); | |
Object.defineProperties(this, { | |
email: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
password: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.email = this.email; | |
d.password = this.password; | |
return d; | |
}, | |
equals: function O(d) { | |
return this === d ? !0 : d instanceof Ke ? O.base.call(this, this, d) && this.email == d.email && this.password == d.password : !1; | |
} | |
}); | |
Oh = function(m) { | |
var p = m.email, | |
r = m.password; | |
if (!p || !r) throw new ja(d.JSON_PARSE_ERROR, "email/password authdata " + JSON.stringify(m)); | |
return new Ke(p, r); | |
}; | |
})(); | |
var mj = Je.extend({ | |
init: function F() { | |
F.base.call(this, Cb.EMAIL_PASSWORD); | |
}, | |
createData: function(d, p, r, C) { | |
m(C, function() { | |
return Oh(r); | |
}); | |
}, | |
authenticate: function(m, p, r, C) { | |
if (!(r instanceof Ke)) throw new ca("Incorrect authentication data type " + r + "."); | |
m = r.password; | |
if (!r.email || !m) throw (new Ma(d.EMAILPASSWORD_BLANK)).setUser(r); | |
throw (new Ma(d.UNSUPPORTED_USERAUTH_DATA, this.scheme)).setUser(r); | |
} | |
}), | |
$d, Ph, vf, wf, ae, xf; | |
(function() { | |
function p(a, c) { | |
return "<" + a + ">" + c + "</" + a + ">"; | |
} | |
function r(a) { | |
return a.replace(/[<>&"']/g, function(a) { | |
return db[a]; | |
}); | |
} | |
function H(a) { | |
return encodeURIComponent(a).replace("%20", "+").replace(/[!'()]/g, escape).replace(/\*/g, "%2A"); | |
} | |
var C = vf = { | |
MSL: "MSL", | |
NTBA: "NTBA", | |
MSL_LEGACY: "MSL_LEGACY" | |
}, | |
I = ea.Class.create({ | |
getAction: function() {}, | |
getNonce: function() {}, | |
getPin: function() {}, | |
getSignature: function() {}, | |
getEncoding: function() {}, | |
equals: function() {} | |
}), | |
y = wf = I.extend({ | |
init: function(a, c, b, k, h, n, g) { | |
function l(l) { | |
m(g, function() { | |
var n; | |
try { | |
var k = {}; | |
k.useridtoken = a; | |
k.action = c; | |
k.nonce = b; | |
k.pin = qa(l); | |
n = mb(JSON.stringify(k), Na); | |
} catch (E) { | |
throw new ja(d.JSON_ENCODE_ERROR, "MSL-based MDX authdata", E); | |
} | |
h.sign(n, { | |
result: function(a) { | |
f(n, a); | |
}, | |
error: g.error | |
}); | |
}, q); | |
} | |
function f(f, l) { | |
m(g, function() { | |
Object.defineProperties(this, { | |
_userIdToken: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_action: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_nonce: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_pin: { | |
value: k, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_encoding: { | |
value: f, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_signature: { | |
value: l, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, q); | |
} | |
var q = this; | |
m(g, function() { | |
n ? f(n.encoding, n.signature) : h.encrypt(mb(k, Na), { | |
result: function(a) { | |
l(a); | |
}, | |
error: g.error | |
}); | |
}, q); | |
}, | |
getUserIdToken: function() { | |
return this._userIdToken; | |
}, | |
getAction: function() { | |
return this._action; | |
}, | |
getNonce: function() { | |
return this._nonce; | |
}, | |
getPin: function() { | |
return this._pin; | |
}, | |
getSignature: function() { | |
return this._signature; | |
}, | |
getEncoding: function() { | |
return this._encoding; | |
}, | |
equals: function(a) { | |
return this === a ? !0 : a instanceof y ? this._action == a._action && this._nonce == a._nonce && this._pin == a._pin && this._userIdToken.equals(a._userIdToken) : !1; | |
} | |
}); | |
wf.ACTION = "userauth"; | |
var va = function(a, c, b, k, h) { | |
function n(l) { | |
m(h, function() { | |
var f = Qa(b, Na), | |
n, k, t, J; | |
try { | |
var E = JSON.parse(f); | |
n = E.useridtoken; | |
k = E.action; | |
t = E.nonce; | |
J = E.pin; | |
} catch (z) { | |
if (z instanceof SyntaxError) throw new ja(d.JSON_PARSE_ERROR, "MDX authdata " + f, z); | |
throw z; | |
} | |
if (!(n && "object" === typeof n && k && "string" === typeof k && t && "number" === typeof t && J) || "string" !== typeof J) throw new ja(d.JSON_PARSE_ERROR, "MDX authdata " + f); | |
Gd(a, n, c, { | |
result: function(a) { | |
m(h, function() { | |
if (!a.isDecrypted()) throw new Ma(d.USERAUTH_USERIDTOKEN_NOT_DECRYPTED, "MDX authdata " + f); | |
g(l, a, k, t, J); | |
}); | |
}, | |
error: function(a) { | |
m(h, function() { | |
if (a instanceof D) throw new Ma(d.USERAUTH_USERIDTOKEN_INVALID, "MDX authdata " + f, a); | |
throw a; | |
}); | |
} | |
}); | |
}); | |
} | |
function g(a, c, g, n, d) { | |
m(h, function() { | |
var f = Ea(d); | |
a.decrypt(f, { | |
result: function(a) { | |
m(h, function() { | |
var f = Qa(a, Na); | |
new y(c, g, n, f, null, { | |
encoding: b, | |
signature: k | |
}, h); | |
}); | |
}, | |
error: h.error | |
}); | |
}); | |
} | |
m(h, function() { | |
var l; | |
try { | |
var f = a.getMslStore().getCryptoContext(c); | |
l = f ? f : new hc(a, c); | |
} catch (q) { | |
if (q instanceof Dd) throw new Ma(d.USERAUTH_MASTERTOKEN_NOT_DECRYPTED, "MDX authdata " + qa(b)); | |
throw q; | |
} | |
l.verify(b, k, { | |
result: function(a) { | |
m(h, function() { | |
if (!a) throw new N(d.MDX_USERAUTH_VERIFICATION_FAILED, "MDX authdata " + qa(b)); | |
n(l); | |
}); | |
}, | |
error: h.error | |
}); | |
}); | |
}, | |
db = { | |
"<": "<", | |
">": ">", | |
"&": "&", | |
'"': """, | |
"'": "'" | |
}, | |
Ia = ae = I.extend({ | |
init: function(a, c, b, k) { | |
var h = p("action", r(a)), | |
n = p("nonce", c.toString()); | |
b = p("pin", b); | |
h = p("registerdata", h + n + b); | |
h = mb(h, "utf-8"); | |
Object.defineProperties(this, { | |
_action: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_nonce: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_pin: { | |
value: null, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_encoding: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_signature: { | |
value: k, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getAction: function() { | |
return this._action; | |
}, | |
getNonce: function() { | |
return this._nonce; | |
}, | |
getPin: function() { | |
return this._pin; | |
}, | |
getSignature: function() { | |
return this._signature; | |
}, | |
getEncoding: function() { | |
return this._encoding; | |
}, | |
equals: function(a) { | |
return this === a ? !0 : a instanceof Ia ? this._action == a._action && this._nonce == a._nonce && this._pin == a._pin : !1; | |
} | |
}); | |
ae.ACTION = "regpairrequest"; | |
var sa = xf = I.extend({ | |
init: function(a, c, b, k, h, n) { | |
function g(b) { | |
m(n, function() { | |
var f = qa(b), | |
h = p("action", r(a)), | |
g = p("nonce", c.toString()), | |
d = p("pin", f), | |
h = p("registerdata", h + g + d), | |
q = mb(h, "utf-8"), | |
f = "action=" + H(a) + "&nonce=" + H(c.toString()) + "&pin=" + H(f); | |
k.sign(mb(f, "utf-8"), { | |
result: function(a) { | |
l(q, a); | |
}, | |
error: n.error | |
}); | |
}, f); | |
} | |
function l(l, h) { | |
m(n, function() { | |
Object.defineProperties(this, { | |
_action: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_nonce: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_pin: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_encoding: { | |
value: l, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_signature: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
return this; | |
}, f); | |
} | |
var f = this; | |
m(n, function() { | |
h ? l(h.encoding, h.signature) : k.encrypt(mb(b, "utf-8"), { | |
result: function(a) { | |
g(a); | |
}, | |
error: n.error | |
}); | |
}, f); | |
}, | |
getAction: function() { | |
return this._action; | |
}, | |
getNonce: function() { | |
return this._nonce; | |
}, | |
getPin: function() { | |
return this._pin; | |
}, | |
getSignature: function() { | |
return this._signature; | |
}, | |
getEncoding: function() { | |
return this._encoding; | |
}, | |
equals: function(a) { | |
return this === a ? !0 : a instanceof sa ? this._action == a._action && this._nonce == a._nonce && this._pin == a._pin : !1; | |
} | |
}); | |
xf.ACTION = ae.ACTION; | |
var a = function(a, c, b, k, h) { | |
m(h, function() { | |
var n = a.getMslStore().getCryptoContext(c), | |
g = n ? n : new hc(a, c), | |
n = Qa(b, "utf-8"), | |
l = (new DOMParser).parseFromString(n, "application/xml"), | |
n = l.getElementsByTagName("action"), | |
f = l.getElementsByTagName("nonce"), | |
l = l.getElementsByTagName("pin"), | |
q = n && 1 == n.length && n[0].firstChild ? n[0].firstChild.nodeValue : null, | |
v = f && 1 == f.length && f[0].firstChild ? parseInt(f[0].firstChild.nodeValue) : null, | |
t = l && 1 == l.length && l[0].firstChild ? l[0].firstChild.nodeValue : null; | |
if (!q || !v || !t) throw new ja(d.XML_PARSE_ERROR, "MDX authdata " + qa(b)); | |
n = "action=" + H(q) + "&nonce=" + H(v.toString()) + "&pin=" + H(t); | |
g.verify(mb(n, "utf-8"), k, { | |
result: function(a) { | |
m(h, function() { | |
if (!a) throw new N(d.MDX_USERAUTH_VERIFICATION_FAILED, "MDX authdata " + qa(b)); | |
var c = Ea(t); | |
g.decrypt(c, { | |
result: function(a) { | |
m(h, function() { | |
var c = Qa(a, "utf-8"); | |
new sa(q, v, c, null, { | |
encoding: b, | |
signature: k | |
}, h); | |
}); | |
}, | |
error: h.error | |
}); | |
}); | |
}, | |
error: h.error | |
}); | |
}); | |
}; | |
$d = Uc.extend({ | |
init: function c(a, k, h, n, g, l) { | |
c.base.call(this, Cb.MDX); | |
var b = null, | |
d = null, | |
v = null; | |
if ("string" === typeof h) a = C.MSL_LEGACY, v = h; | |
else if (h instanceof Uint8Array) a = C.NTBA, d = h; | |
else if (h instanceof nc) a = C.MSL, b = h; | |
else throw new TypeError("Controller token " + h + " is not a master token, encrypted CTicket, or MSL token construct."); | |
var A = h = null, | |
J = null; | |
if (l) { | |
var m = l.controllerAuthData; | |
h = m.getAction(); | |
A = m.getPin(); | |
l = l.userIdToken; | |
m instanceof y ? J = m.getUserIdToken().customer : l && (J = l.customer); | |
} | |
Object.defineProperties(this, { | |
mechanism: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
action: { | |
value: h, | |
writable: !1, | |
configurable: !1 | |
}, | |
targetPin: { | |
value: k, | |
writable: !1, | |
configurable: !1 | |
}, | |
controllerPin: { | |
value: A, | |
writable: !1, | |
configurable: !1 | |
}, | |
customer: { | |
value: J, | |
writable: !1, | |
configurable: !1 | |
}, | |
_masterToken: { | |
value: b, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_encryptedCTicket: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_mslTokens: { | |
value: v, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_controllerEncoding: { | |
value: n, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_signature: { | |
value: g, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getAuthData: function() { | |
var a = {}; | |
switch (this.mechanism) { | |
case C.MSL: | |
var b = JSON.parse(JSON.stringify(this._masterToken)); | |
a.mastertoken = b; | |
break; | |
case C.NTBA: | |
b = Qa(this._encryptedCTicket, "utf-8"); | |
a.cticket = b; | |
break; | |
case C.MSL_LEGACY: | |
a.cticket = this._mslTokens; | |
break; | |
default: | |
throw new ca("Unsupported MDX mechanism."); | |
} | |
a.pin = this.targetPin; | |
a.mdxauthdata = qa(this._controllerEncoding); | |
a.signature = qa(this._signature); | |
return a; | |
}, | |
equals: function b(a) { | |
return this === a ? !0 : a instanceof $d ? b.base.call(this, a) && (this._masterToken == a._masterToken || this._masterToken && this._masterToken.equals(a._masterToken)) && (this._encryptedCTicket == a._encryptedCTicket || this._encryptedCTicket && Nb(this._encryptedCTicket, a._encryptedCTicket)) && this._mslTokens == a._mslTokens && Nb(this._controllerEncoding, a._controllerEncoding) && Nb(this._signature, a._signature) : !1; | |
} | |
}); | |
Ph = function(b, k, h) { | |
function n(a, l, g, n) { | |
qd(b, l, { | |
result: function(f) { | |
m(h, function() { | |
if (!f.isDecrypted()) throw new Ma(d.USERAUTH_MASTERTOKEN_NOT_DECRYPTED, "MDX authdata " + k.toString()); | |
va(b, f, g, n, { | |
result: function(l) { | |
m(h, function() { | |
var h = l.getEncoding(), | |
g = l.getSignature(); | |
return new $d(b, a, f, h, g, { | |
controllerAuthData: l, | |
userIdToken: null | |
}); | |
}); | |
}, | |
error: h.error | |
}); | |
}); | |
}, | |
error: function(a) { | |
m(h, function() { | |
if (a instanceof D) throw new Ma(d.USERAUTH_MASTERTOKEN_INVALID, "MDX authdata " + JSON.stringify(k), a); | |
throw a; | |
}); | |
} | |
}); | |
} | |
function g(a, b, l, g) { | |
m(h, function() { | |
throw new Ma(d.UNSUPPORTED_USERAUTH_MECHANISM, "NtbaControllerData$parse"); | |
}); | |
} | |
function l(f, l, g, n) { | |
function q(a, f) { | |
m(f, function() { | |
var l; | |
try { | |
l = Ea(a); | |
} catch (P) { | |
throw new Ma(d.USERAUTH_MASTERTOKEN_INVALID, "MDX authdata " + JSON.stringify(k), P); | |
} | |
if (!l || 0 == l.length) throw new Ma(d.USERAUTH_MASTERTOKEN_MISSING, "MDX authdata " + JSON.stringify(k)); | |
try { | |
var h = JSON.parse(Qa(l, "utf-8")); | |
qd(b, h, { | |
result: function(a) { | |
m(f, function() { | |
if (!a.isDecrypted()) throw new Ma(d.USERAUTH_MASTERTOKEN_NOT_DECRYPTED, "MDX authdata " + k.toString()); | |
return a; | |
}); | |
}, | |
error: function(a) { | |
m(f, function() { | |
if (a instanceof D) throw new Ma(d.USERAUTH_MASTERTOKEN_INVALID, "MDX authdata " + JSON.stringify(k), a); | |
throw a; | |
}); | |
} | |
}); | |
} catch (P) { | |
if (P instanceof SyntaxError) throw new ja(d.JSON_PARSE_ERROR, "MDX authdata " + JSON.stringify(k), P); | |
throw P; | |
} | |
}); | |
} | |
function v(a, f, l) { | |
m(l, function() { | |
var h; | |
try { | |
h = Ea(a); | |
} catch (V) { | |
throw new Ma(d.USERAUTH_USERIDTOKEN_INVALID, "MDX authdata " + JSON.stringify(k), V); | |
} | |
if (!h || 0 == h.length) throw new Ma(d.USERAUTH_USERIDTOKEN_MISSING, "MDX authdata " + JSON.stringify(k)); | |
try { | |
var g = JSON.parse(Qa(h, "utf-8")); | |
Gd(b, g, f, { | |
result: function(a) { | |
m(l, function() { | |
if (!a.isDecrypted()) throw new Ma(d.USERAUTH_USERIDTOKEN_NOT_DECRYPTED, "MDX authdata " + JSON.stringify(k)); | |
return a; | |
}); | |
}, | |
error: function(a) { | |
m(l, function() { | |
if (a instanceof D) throw new Ma(d.USERAUTH_USERIDTOKEN_INVALID, "MDX authdata " + JSON.stringify(k), a); | |
throw a; | |
}); | |
} | |
}); | |
} catch (V) { | |
if (V instanceof SyntaxError) throw new ja(d.JSON_PARSE_ERROR, "MDX authdata " + JSON.stringify(k), V); | |
throw V; | |
} | |
}); | |
} | |
m(h, function() { | |
var A = l.split(","); | |
if (3 != A.length || "1" != A[0]) throw new Ma(d.UNIDENTIFIED_USERAUTH_MECHANISM, "MDX authdata " + JSON.stringify(k)); | |
q(A[1], { | |
result: function(q) { | |
v(A[2], q, { | |
result: function(v) { | |
a(b, q, g, n, { | |
result: function(a) { | |
m(h, function() { | |
return new $d(b, f, l, g, n, { | |
controllerAuthData: a, | |
userIdToken: v | |
}); | |
}); | |
}, | |
error: function(a) { | |
m(h, function() { | |
if (a instanceof Dd) throw new Ma(d.USERAUTH_MASTERTOKEN_NOT_DECRYPTED, "MDX authdata " + JSON.stringify(k), a); | |
throw a; | |
}); | |
} | |
}); | |
}, | |
error: h.error | |
}); | |
}, | |
error: h.error | |
}); | |
}); | |
} | |
m(h, function() { | |
var a = k.pin, | |
b = k.mdxauthdata, | |
h = k.signature; | |
if (!a || "string" !== typeof a || !b || "string" !== typeof b || !h || "string" !== typeof h) throw new ja(d.JSON_PARSE_ERROR, "MDX authdata " + JSON.stringify(k)); | |
var A, J; | |
try { | |
A = Ea(b), J = Ea(h); | |
} catch (E) { | |
throw new Ma(d.MDX_CONTROLLERDATA_INVALID, "MDX authdata " + JSON.stringify(k), E); | |
} | |
if (k.mastertoken) { | |
b = k.mastertoken; | |
if (!b || "object" !== typeof b) throw new ja(d.JSON_PARSE_ERROR, "MDX authdata " + JSON.stringify(k)); | |
n(a, b, A, J); | |
} else if (k.cticket) { | |
b = k.cticket; | |
if (!b || "string" !== typeof b) throw new ja(d.JSON_PARSE_ERROR, "MDX authdata " + JSON.stringify(k)); - 1 == b.indexOf(",") ? g(a, b, A, J) : l(a, b, A, J); | |
} else throw new Ma(d.UNIDENTIFIED_USERAUTH_MECHANISM, "MDX authdata " + JSON.stringify(k)); | |
}); | |
}; | |
})(); | |
var Qh; | |
(function() { | |
var m = wf.ACTION, | |
p = ae.ACTION, | |
r = xf.ACTION; | |
Qh = Je.extend({ | |
init: function I() { | |
I.base.call(this, Cb.MDX); | |
}, | |
createData: function(d, m, p, r) { | |
Ph(d, p, r); | |
}, | |
authenticate: function(I, H, F, y) { | |
if (!(F instanceof $d)) throw new ca("Incorrect authentication data type " + F.getClass().getName() + "."); | |
I = F.action; | |
switch (F.mechanism) { | |
case vf.MSL: | |
if (m != I) throw (new Ma(d.MDX_USERAUTH_ACTION_INVALID)).setUser(F); | |
break; | |
case vf.NTBA: | |
if (p != I) throw (new Ma(d.MDX_USERAUTH_ACTION_INVALID)).setUser(F); | |
break; | |
case vf.MSL_LEGACY: | |
if (r != I) throw (new Ma(d.MDX_USERAUTH_ACTION_INVALID)).setUser(F); | |
} | |
I = F.controllerPin; | |
H = F.targetPin; | |
if (!I || !H) throw (new Ma(d.MDX_PIN_BLANK)).setUser(F); | |
if (I != H) throw (new Ma(d.MDX_PIN_MISMATCH)).setUser(F); | |
I = F.customer; | |
if (!I) throw (new Ma(d.MDX_USER_UNKNOWN)).setUser(F); | |
if (y && (y = y.customer, !I.equals(y))) throw (new Ma(d.USERIDTOKEN_USERAUTH_DATA_MISMATCH, "uad customer " + I + "; uit customer " + y)).setUser(F); | |
return I; | |
} | |
}); | |
})(); | |
var be, yg, Rh, Sh; | |
(function() { | |
var m = { | |
MICROSOFT_SAML: "MICROSOFT_SAML", | |
SAMSUNG: "SAMSUNG", | |
MICROSOFT_JWT: "MICROSOFT_JWT", | |
GOOGLE_JWT: "GOOGLE_JWT" | |
}, | |
p = Rh = ea.Class.create({ | |
init: function(d, m) { | |
Object.defineProperties(this, { | |
email: { | |
value: d, | |
writable: !1, | |
enumerable: !0, | |
configurable: !1 | |
}, | |
password: { | |
value: m, | |
writable: !1, | |
enumerable: !0, | |
configurable: !1 | |
} | |
}); | |
} | |
}), | |
r = Sh = ea.Class.create({ | |
init: function(d, m) { | |
Object.defineProperties(this, { | |
netflixId: { | |
value: d, | |
writable: !1, | |
enumerable: !0, | |
configurable: !1 | |
}, | |
secureNetflixId: { | |
value: m, | |
writable: !1, | |
enumerable: !0, | |
configurable: !1 | |
} | |
}); | |
} | |
}); | |
be = Uc.extend({ | |
init: function I(d, m, H) { | |
I.base.call(this, Cb.SSO); | |
var F = null, | |
y = null, | |
a = null, | |
t = null; | |
H instanceof p ? (F = H.email, y = H.password) : H instanceof r && (a = H.netflixId, t = H.secureNetflixId); | |
Object.defineProperties(this, { | |
mechanism: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
token: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
}, | |
email: { | |
value: F, | |
writable: !1, | |
configurable: !1 | |
}, | |
password: { | |
value: y, | |
writable: !1, | |
configurable: !1 | |
}, | |
netflixId: { | |
value: a, | |
writable: !1, | |
configurable: !1 | |
}, | |
secureNetflixId: { | |
value: t, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.mechanism = this.mechanism; | |
d.token = qa(this.token); | |
this.email && this.password ? (d.email = this.email, d.password = this.password) : this.netflixId && this.secureNetflixId && (d.netflixid = this.netflixId, d.securenetflixid = this.secureNetflixId); | |
return d; | |
}, | |
equals: function nb(d) { | |
return this === d ? !0 : d instanceof be ? nb.base.call(this, d) && this.mechanism == d.mechanism && Nb(this.token, d.token) && this.email == d.email && this.password == d.password && this.netflixId == d.netflixId && this.secureNetflixId == d.secureNetflixId : !1; | |
} | |
}); | |
yg = function(H) { | |
var F = H.mechanism, | |
y = H.token; | |
if (!F || !y || "string" !== typeof y) throw new ja(d.JSON_PARSE_ERROR, "SSO authdata " + JSON.stringify(H)); | |
if (!m[F]) throw new Ma(d.UNIDENTIFIED_USERAUTH_MECHANISM, "SSO authdata " + JSON.stringify(H)); | |
var D = H.email, | |
sa = H.password, | |
a = H.netflixid, | |
t = H.securenetflixid; | |
if (D && !sa || !D && sa || a && !t || !a && t || D && a) throw new ja(d.JSON_PARSE_ERROR, "SSO authdata " + JSON.stringify(H)); | |
var c; | |
try { | |
c = Ea(y); | |
} catch (k) { | |
throw new Ma(d.SSOTOKEN_INVALID, "SSO authdata " + JSON.stringify(H), k); | |
} | |
var b; | |
D && sa ? b = new p(D, sa) : a && t && (b = new r(a, t)); | |
return new be(F, c, b); | |
}; | |
})(); | |
var nj = Je.extend({ | |
init: function O() { | |
O.base.call(this, Cb.SSO); | |
}, | |
createData: function(d, p, r, I) { | |
m(I, function() { | |
return yg(r); | |
}); | |
}, | |
authenticate: function(m, p, r, I) { | |
if (!(r instanceof be)) throw new ca("Incorrect authentication data type " + r + "."); | |
m = r.token; | |
p = r.email; | |
I = r.password; | |
var C = r.netflixId, | |
H = r.secureNetflixId; | |
if (!m || 0 == m.length) throw new Ma(d.SSOTOKEN_BLANK); | |
if (!(null === p && null === I || p && I)) throw new Ma(d.EMAILPASSWORD_BLANK); | |
if (!(null === C && null === H || C && H)) throw (new Ma(d.NETFLIXID_COOKIES_BLANK)).setUser(r); | |
throw (new Ma(d.UNSUPPORTED_USERAUTH_DATA, this.scheme)).setUser(r); | |
} | |
}), | |
ce, Th; | |
(function() { | |
ce = Uc.extend({ | |
init: function H(d, m) { | |
H.base.call(this, Cb.SWITCH_PROFILE); | |
Object.defineProperties(this, { | |
userIdToken: { | |
value: d, | |
writable: !1, | |
configurable: !1 | |
}, | |
profileGuid: { | |
value: m, | |
writable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getAuthData: function() { | |
var d = {}; | |
d.useridtoken = JSON.parse(JSON.stringify(this.userIdToken)); | |
d.profileguid = this.profileGuid; | |
return d; | |
}, | |
equals: function C(d) { | |
return this == d ? !0 : d instanceof ce ? C.base.call(this, d) && this.userIdToken.equals(d.userIdToken) && this.profileGuid == d.profileGuid : !1; | |
} | |
}); | |
Th = function(p, r, y, D) { | |
m(D, function() { | |
if (!r) throw new Ma(d.USERAUTH_MASTERTOKEN_MISSING); | |
var C = y.useridtoken, | |
I = y.profileguid; | |
if ("object" !== typeof C || "string" !== typeof I) throw new ja(d.JSON_PARSE_ERROR, "switch profile authdata " + JSON.stringify(y)); | |
Gd(p, C, r, { | |
result: function(p) { | |
m(D, function() { | |
if (!p.isDecrypted()) throw new Ma(d.USERAUTH_USERIDTOKEN_NOT_DECRYPTED, "switch profile authdata " + JSON.stringify(y)); | |
return new ce(p, I); | |
}); | |
}, | |
error: function(m) { | |
D.error(new Ma(d.USERAUTH_USERIDTOKEN_INVALID, "switch profile authdata " + JSON.stringify(y), m)); | |
} | |
}); | |
}); | |
}; | |
})(); | |
var oj = Je.extend({ | |
init: function H(d) { | |
H.base.call(this, Cb.SWITCH_PROFILE); | |
Object.defineProperties(this, { | |
_store: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
createData: function(d, m, p, r) { | |
Th(d, m, p, r); | |
}, | |
authenticate: function(m, p, r, y) { | |
if (!(r instanceof ce)) throw new ca("Incorrect authentication data type " + r + "."); | |
p = r.userIdToken; | |
m = r.profileGuid; | |
if (!m) throw (new Ma(NetflixMslError.PROFILEGUID_BLANK)).setUserAuthenticationData(r); | |
p = p.user; | |
if (!p) throw (new Ma(d.USERAUTH_USERIDTOKEN_NOT_DECRYPTED)).setUserAuthenticationData(r); | |
m = this._store.switchUsers(p, m); | |
if (!m) throw (new Ma(NetflixMslError.PROFILE_SWITCH_DISALLOWED)).setUserAuthenticationData(r); | |
if (y && (y = y.user, !m.equals(y))) throw (new Ma(d.USERIDTOKEN_USERAUTH_DATA_MISMATCH, "uad user " + m + "; uit user " + y)).setUserAuthenticationData(r); | |
return m; | |
} | |
}); | |
Object.freeze({ | |
ENTITY_REAUTH: p.ENTITY_REAUTH, | |
ENTITYDATA_REAUTH: p.ENTITYDATA_REAUTH | |
}); | |
var pj = ea.Class.create({ | |
getTime: function() {}, | |
getRandom: function() {}, | |
isPeerToPeer: function() {}, | |
getMessageCapabilities: function() {}, | |
getEntityAuthenticationData: function(d, m) {}, | |
getMslCryptoContext: function() {}, | |
getEntityAuthenticationFactory: function(d) {}, | |
getUserAuthenticationFactory: function(d) {}, | |
getTokenFactory: function() {}, | |
getKeyExchangeFactory: function(d) {}, | |
getKeyExchangeFactories: function() {}, | |
getMslStore: function() {} | |
}), | |
Uh = ea.Class.create({ | |
setCryptoContext: function(d, m) {}, | |
getMasterToken: function() {}, | |
getNonReplayableId: function(d) {}, | |
getCryptoContext: function(d) {}, | |
removeCryptoContext: function(d) {}, | |
clearCryptoContexts: function() {}, | |
addUserIdToken: function(d, m) {}, | |
getUserIdToken: function(d) {}, | |
removeUserIdToken: function(d) {}, | |
clearUserIdTokens: function() {}, | |
addServiceTokens: function(d) {}, | |
getServiceTokens: function(d, m) {}, | |
removeServiceTokens: function(d, m, p) {}, | |
clearServiceTokens: function() {} | |
}), | |
xg, sf; | |
(function() { | |
var m = Cd; | |
xg = function(p, r) { | |
var C = {}; | |
switch (p) { | |
case m.LZW: | |
return hh(r, C); | |
case m.GZIP: | |
return gzip$compress(r); | |
default: | |
throw new D(d.UNSUPPORTED_COMPRESSION, p); | |
} | |
}; | |
sf = function(p, r, y) { | |
switch (p) { | |
case m.LZW: | |
return ih(r); | |
case m.GZIP: | |
return gzip$uncompress(r); | |
default: | |
throw new D(d.UNSUPPORTED_COMPRESSION, p.name()); | |
} | |
}; | |
})(); | |
Uh.extend({ | |
setCryptoContext: function(d, m) {}, | |
getMasterToken: function() { | |
return null; | |
}, | |
getNonReplayableId: function(d) { | |
return 1; | |
}, | |
getCryptoContext: function(d) { | |
return null; | |
}, | |
removeCryptoContext: function(d) {}, | |
clearCryptoContexts: function() {}, | |
addUserIdToken: function(d, m) {}, | |
getUserIdToken: function(d) { | |
return null; | |
}, | |
removeUserIdToken: function(d) {}, | |
clearUserIdTokens: function() {}, | |
addServiceTokens: function(d) {}, | |
getServiceTokens: function(m, p) { | |
if (p) { | |
if (!m) throw new D(d.USERIDTOKEN_MASTERTOKEN_NULL); | |
if (!p.isBoundTo(m)) throw new D(d.USERIDTOKEN_MASTERTOKEN_MISMATCH, "uit mtserialnumber " + p.mtSerialNumber + "; mt " + m.serialNumber); | |
} | |
return []; | |
}, | |
removeServiceTokens: function(m, p, r) { | |
if (r && p && !r.isBoundTo(p)) throw new D(d.USERIDTOKEN_MASTERTOKEN_MISMATCH, "uit mtserialnumber " + r.masterTokenSerialNumber + "; mt " + p.serialNumber); | |
}, | |
clearServiceTokens: function() {} | |
}); | |
var Vh; | |
(function() { | |
Vh = Uh.extend({ | |
init: function C() { | |
C.base.call(this); | |
Object.defineProperties(this, { | |
masterTokens: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
cryptoContexts: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
userIdTokens: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
nonReplayableIds: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
unboundServiceTokens: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
mtServiceTokens: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
uitServiceTokens: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
setCryptoContext: function(d, m) { | |
if (m) { | |
var p = d.uniqueKey(); | |
this.masterTokens[p] = d; | |
this.cryptoContexts[p] = m; | |
} else this.removeCryptoContext(d); | |
}, | |
getMasterToken: function() { | |
var d = null, | |
m; | |
for (m in this.masterTokens) { | |
var p = this.masterTokens[m]; | |
if (!d || p.isNewerThan(d)) d = p; | |
} | |
return d; | |
}, | |
getNonReplayableId: function(d) { | |
d = d.serialNumber; | |
var m; | |
m = this.nonReplayableIds[d] !== na ? this.nonReplayableIds[d] : 0; | |
if (0 > m || m > Ka) throw new ca("Non-replayable ID " + m + " is outside the valid range."); | |
m = m == Ka ? 0 : m + 1; | |
return this.nonReplayableIds[d] = m; | |
}, | |
getCryptoContext: function(d) { | |
return this.cryptoContexts[d.uniqueKey()]; | |
}, | |
removeCryptoContext: function(d) { | |
var m = d.uniqueKey(); | |
if (this.masterTokens[m]) { | |
delete this.masterTokens[m]; | |
delete this.cryptoContexts[m]; | |
var m = d.serialNumber, | |
p; | |
for (p in this.masterTokens) | |
if (this.masterTokens[p].serialNumber == m) return; | |
delete this.nonReplayableIds[m]; | |
Object.keys(this.userIdTokens).forEach(function(m) { | |
m = this.userIdTokens[m]; | |
m.isBoundTo(d) && this.removeUserIdToken(m); | |
}, this); | |
try { | |
this.removeServiceTokens(null, d, null); | |
} catch (va) { | |
if (va instanceof D) throw new ca("Unexpected exception while removing master token bound service tokens.", va); | |
throw va; | |
} | |
} | |
}, | |
clearCryptoContexts: function() { | |
[this.masterTokens, this.cryptoContexts, this.nonReplayableIds, this.userIdTokens, this.uitServiceTokens, this.mtServiceTokens].forEach(function(d) { | |
for (var m in d) delete d[m]; | |
}, this); | |
}, | |
addUserIdToken: function(m, p) { | |
var r = !1, | |
C; | |
for (C in this.masterTokens) | |
if (p.isBoundTo(this.masterTokens[C])) { | |
r = !0; | |
break; | |
} | |
if (!r) throw new D(d.USERIDTOKEN_MASTERTOKEN_NOT_FOUND, "uit mtserialnumber " + p.mtSerialNumber); | |
this.userIdTokens[m] = p; | |
}, | |
getUserIdToken: function(d) { | |
return this.userIdTokens[d]; | |
}, | |
removeUserIdToken: function(d) { | |
var m = null, | |
p; | |
for (p in this.masterTokens) { | |
var r = this.masterTokens[p]; | |
if (d.isBoundTo(r)) { | |
m = r; | |
break; | |
} | |
} | |
Object.keys(this.userIdTokens).forEach(function(p) { | |
if (this.userIdTokens[p].equals(d)) { | |
delete this.userIdTokens[p]; | |
try { | |
this.removeServiceTokens(null, m, d); | |
} catch (Ia) { | |
if (Ia instanceof D) throw new ca("Unexpected exception while removing user ID token bound service tokens.", Ia); | |
throw Ia; | |
} | |
} | |
}, this); | |
}, | |
clearUserIdTokens: function() { | |
for (var d in this.userIdTokens) { | |
var m = this.userIdTokens[d]; | |
try { | |
this.removeServiceTokens(null, null, m); | |
} catch (nb) { | |
if (nb instanceof D) throw new ca("Unexpected exception while removing user ID token bound service tokens.", nb); | |
throw nb; | |
} | |
delete this.userIdTokens[d]; | |
} | |
}, | |
addServiceTokens: function(m) { | |
m.forEach(function(m) { | |
if (m.isUnbound()) this.unboundServiceTokens[m.uniqueKey()] = m; | |
else { | |
if (m.isMasterTokenBound()) { | |
var p = !1, | |
r; | |
for (r in this.masterTokens) | |
if (m.isBoundTo(this.masterTokens[r])) { | |
p = !0; | |
break; | |
} | |
if (!p) throw new D(d.SERVICETOKEN_MASTERTOKEN_NOT_FOUND, "st mtserialnumber " + m.mtSerialNumber); | |
} | |
if (m.isUserIdTokenBound()) { | |
var p = !1, | |
C; | |
for (C in this.userIdTokens) | |
if (m.isBoundTo(this.userIdTokens[C])) { | |
p = !0; | |
break; | |
} | |
if (!p) throw new D(d.SERVICETOKEN_USERIDTOKEN_NOT_FOUND, "st uitserialnumber " + m.uitSerialNumber); | |
} | |
m.isMasterTokenBound() && ((C = this.mtServiceTokens[m.mtSerialNumber]) || (C = {}), C[m.uniqueKey()] = m, this.mtServiceTokens[m.mtSerialNumber] = C); | |
m.isUserIdTokenBound() && ((C = this.uitServiceTokens[m.uitSerialNumber]) || (C = {}), C[m.uniqueKey()] = m, this.uitServiceTokens[m.uitSerialNumber] = C); | |
} | |
}, this); | |
}, | |
getServiceTokens: function(m, p) { | |
if (p) { | |
if (!m) throw new D(d.USERIDTOKEN_MASTERTOKEN_NULL); | |
if (!p.isBoundTo(m)) throw new D(d.USERIDTOKEN_MASTERTOKEN_MISMATCH, "uit mtserialnumber " + p.mtSerialNumber + "; mt " + m.serialNumber); | |
} | |
var r = {}, | |
C; | |
for (C in this.unboundServiceTokens) { | |
var y = this.unboundServiceTokens[C]; | |
r[y.uniqueKey()] = y; | |
} | |
if (m && (y = this.mtServiceTokens[m.serialNumber])) | |
for (C in y) { | |
var I = y[C]; | |
I.isUserIdTokenBound() || (r[C] = I); | |
} | |
if (p && (y = this.uitServiceTokens[p.serialNumber])) | |
for (C in y) I = y[C], I.isBoundTo(m) && (r[C] = I); | |
y = []; | |
for (C in r) y.push(r[C]); | |
return y; | |
}, | |
removeServiceTokens: function(m, p, r) { | |
if (r && p && !r.isBoundTo(p)) throw new D(d.USERIDTOKEN_MASTERTOKEN_MISMATCH, "uit mtserialnumber " + r.mtSerialNumber + "; mt " + p.serialNumber); | |
if (m && !p && !r) { | |
Object.keys(this.unboundServiceTokens).forEach(function(a) { | |
this.unboundServiceTokens[a].name == m && delete this.unboundServiceTokens[a]; | |
}, this); | |
for (var C in this.mtServiceTokens) { | |
var y = this.mtServiceTokens[C], | |
I = Object.keys(y); | |
I.forEach(function(a) { | |
y[a].name == m && delete y[a]; | |
}, this); | |
this.mtServiceTokens[C] = y; | |
} | |
for (var sa in this.uitServiceTokens) y = this.uitServiceTokens[sa], C = Object.keys(y), C.forEach(function(a) { | |
y[a].name == m && delete y[a]; | |
}, this), this.uitServiceTokens[sa] = y; | |
} | |
if (p && !r) { | |
if (y = this.mtServiceTokens[p.serialNumber]) I = Object.keys(y), I.forEach(function(a) { | |
var c = y[a]; | |
m && c.name != m || delete y[a]; | |
}, this), this.mtServiceTokens[p.serialNumber] = y; | |
for (sa in this.uitServiceTokens) { | |
var a = this.uitServiceTokens[sa]; | |
C = Object.keys(a); | |
C.forEach(function(d) { | |
var c = a[d]; | |
m && c.name != m || c.isBoundTo(p) && delete a[d]; | |
}, this); | |
this.uitServiceTokens[sa] = a; | |
} | |
} | |
r && (y = this.uitServiceTokens[r.serialNumber]) && (C = Object.keys(y), C.forEach(function(a) { | |
var c = y[a]; | |
m && c.name != m || p && !c.isBoundTo(p) || delete y[a]; | |
}, this), this.uitServiceTokens[r.serialNumber] = y); | |
}, | |
clearServiceTokens: function() { | |
[this.unboundServiceTokens, this.mtServiceTokens, this.uitServiceTokens].forEach(function(d) { | |
for (var m in d) delete d[m]; | |
}, this); | |
} | |
}); | |
})(); | |
var Wi = ij.extend({ | |
init: function C() { | |
C.base.call(this); | |
Object.defineProperties(this, { | |
_contextMap: { | |
value: {}, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
addCryptoContext: function(d, m) { | |
if (m && d && d.length) { | |
var p = qa(d); | |
this._contextMap[p] = m; | |
} | |
}, | |
getCryptoContext: function(d) { | |
return d && d.length ? (d = qa(d), this._contextMap[d] || null) : null; | |
}, | |
removeCryptoContext: function(d) { | |
d && d.length && (d = qa(d), delete this._contextMap[d]); | |
} | |
}), | |
zg = bj.extend({ | |
init: function I(d, m, p, r) { | |
I.base.call(this, d); | |
Object.defineProperties(this, { | |
_kde: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_kdh: { | |
value: p, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_kdw: { | |
value: r, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getCryptoContext: function(m, p) { | |
if (!(p instanceof Bc)) throw new ca("Incorrect authentication data type " + JSON.stringify(p) + "."); | |
if (p.identity != this.localIdentity) throw new Vc(d.ENTITY_NOT_FOUND, "mgk " + p.identity); | |
return new Fd(m, this.localIdentity, this._kde, this._kdh, this._kdw); | |
} | |
}), | |
qj = kg.extend({ | |
init: function nb(d, m, p, r) { | |
nb.base.call(this, d); | |
Object.defineProperties(this, { | |
_kpe: { | |
value: m, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_kph: { | |
value: p, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_kpw: { | |
value: r, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}); | |
}, | |
getCryptoContext: function(m, p) { | |
if (!(p instanceof Lc)) throw new ca("Incorrect authentication data type " + JSON.stringify(p) + "."); | |
if (p.identity != this.localIdentity) throw new Vc(d.ENTITY_NOT_FOUND, "psk " + p.identity); | |
return new Fd(m, this.localIdentity, this._kpe, this._kph, this._kpw); | |
} | |
}), | |
sj = Vh.extend({ | |
init: function va(d, m, p, a, t, c) { | |
va.base.call(this); | |
this._log = d; | |
this._esn = m; | |
this._keyRequestData = p; | |
this._createKeyRequestData = a; | |
this._systemKeyName = t; | |
this._systemKeyWrapFormat = c; | |
}, | |
setCryptoContext: function db(d, m, a) { | |
var t = this; | |
t._log.trace("Adding MasterToken", { | |
SequenceNumber: d.sequenceNumber, | |
SerialNumber: d.serialNumber, | |
Expiration: d.expiration.getTime() | |
}); | |
db.base.call(this, d, m); | |
!a && (d = t._createKeyRequestData) && (t._log.trace("Generating new keyx request data"), d().then(function(a) { | |
t._keyRequestData = a; | |
}, function(a) { | |
t._log.error("Unable to generate new keyx request data", "" + a); | |
})); | |
}, | |
addUserIdToken: function Ia(d, a) { | |
this._log.trace("Adding UserIdToken", { | |
UserId: d, | |
SerialNumber: a.serialNumber, | |
MTSerialNumber: a.mtSerialNumber, | |
Expiration: a.expiration.getTime() | |
}); | |
Ia.base.call(this, d, a); | |
}, | |
addServiceTokens: function sa(a) { | |
sa.base.call(this, a.filter(function(a) { | |
return !rj[a.name]; | |
})); | |
}, | |
getUserIdTokenKeys: function() { | |
var d = [], | |
a; | |
for (a in this.userIdTokens) d.push(a); | |
return d; | |
}, | |
rekeyUserIdToken: function(d, a) { | |
this.userIdTokens[d] && (this.userIdTokens[a] = this.userIdTokens[d], delete this.userIdTokens[d]); | |
}, | |
getKeyRequestData: function() { | |
return this._keyRequestData; | |
}, | |
getStoreState: function(d) { | |
var a = this; | |
m(d, function() { | |
var t = a.getMasterToken(); | |
t ? a.getKeysForStore(t, { | |
result: function(c) { | |
m(d, function() { | |
var b = a.userIdTokens, | |
k = Object.keys(b).map(function(c) { | |
var h = b[c]; | |
return { | |
userId: c, | |
userIdTokenJSON: b[c].toJSON(), | |
serviceTokenJSONList: a.getServiceTokens(t, h).map(Ti) | |
}; | |
}); | |
c.esn = a._esn; | |
c.masterTokenJSON = t.toJSON(); | |
c.userList = k; | |
var h = a._keyRequestData.storeData; | |
h && Object.keys(h).forEach(function(a) { | |
c[a] = h[a]; | |
}); | |
return c; | |
}); | |
}, | |
timeout: d.timeout, | |
error: d.error | |
}) : d.result(null); | |
}); | |
}, | |
getKeysForStore: function(p, a) { | |
var t = this; | |
m(a, function() { | |
var c = t.getCryptoContext(p), | |
c = { | |
encryptionKey: c.encryptionKey, | |
hmacKey: c.hmacKey | |
}; | |
if (c.encryptionKey && c.hmacKey) | |
if (t._systemKeyWrapFormat) t.wrapKeysWithSystemKey(c, a); | |
else return c; | |
else throw new D(d.INTERNAL_EXCEPTION, "Unable to get CryptoContext keys"); | |
}); | |
}, | |
wrapKeysWithSystemKey: function(p, a) { | |
var t = this; | |
bh(this._systemKeyName, { | |
result: function(c) { | |
m(a, function() { | |
var b = p.encryptionKey, | |
k = p.hmacKey, | |
h = b[de], | |
n = k[de]; | |
if (h && n) return { | |
wrappedEncryptionKey: h, | |
wrappedHmacKey: n | |
}; | |
Promise.resolve().then(function() { | |
return Promise.all([za.wrapKey(t._systemKeyWrapFormat, b, c, c.algorithm), za.wrapKey(t._systemKeyWrapFormat, k, c, c.algorithm)]); | |
}).then(function(c) { | |
h = qa(c[0]); | |
b[de] = h; | |
n = qa(c[1]); | |
k[de] = n; | |
a.result({ | |
wrappedEncryptionKey: h, | |
wrappedHmacKey: n | |
}); | |
})["catch"](function(c) { | |
a.error(new D(d.INTERNAL_EXCEPTION, "Error wrapping key with SYSTEM key", c)); | |
}); | |
}); | |
}, | |
timeout: a.timeout, | |
error: a.error | |
}); | |
}, | |
unwrapKeysWithSystemKey: function(p, a) { | |
var t = this; | |
bh(this._systemKeyName, { | |
result: function(c) { | |
m(a, function() { | |
var b = Ea(p.wrappedEncryptionKey), | |
k = Ea(p.wrappedHmacKey); | |
Promise.resolve().then(function() { | |
return Promise.all([za.unwrapKey(t._systemKeyWrapFormat, b, c, c.algorithm, Jc, !1, nd), za.unwrapKey(t._systemKeyWrapFormat, k, c, c.algorithm, Kc, !1, pd)]); | |
}).then(function(c) { | |
var b = c[0]; | |
c = c[1]; | |
b[de] = p.wrappedEncryptionKey; | |
c[de] = p.wrappedHmacKey; | |
a.result({ | |
encryptionKey: b, | |
hmacKey: c | |
}); | |
})["catch"](function(c) { | |
a.error(new D(d.INTERNAL_EXCEPTION, "Error unwrapping with SYSTEM key", c)); | |
}); | |
}); | |
}, | |
timeout: a.timeout, | |
error: a.error | |
}); | |
}, | |
loadStoreState: function(d, a, t, c) { | |
function b(c, b) { | |
var f; | |
try { | |
f = t.userList.slice(); | |
} catch (q) {} | |
f ? function v() { | |
var l = f.shift(); | |
l ? Gd(a, l.userIdTokenJSON, c, { | |
result: function(a) { | |
try { | |
h.addUserIdToken(l.userId, a), k(c, a, l.serviceTokenJSONList, { | |
result: v, | |
timeout: v, | |
error: v | |
}); | |
} catch (E) { | |
v(); | |
} | |
}, | |
timeout: v, | |
error: v | |
}) : b.result(); | |
} | |
() : b.result(); | |
} | |
function k(c, b, f, n) { | |
var l; | |
try { | |
l = f.slice(); | |
} catch (J) {} | |
if (l) { | |
var g = h.getCryptoContext(c); | |
(function E() { | |
var f = l.shift(); | |
f ? Ge(a, f, c, b, g, { | |
result: function(a) { | |
h.addServiceTokens([a]); | |
E(); | |
}, | |
timeout: function() { | |
E(); | |
}, | |
error: function() { | |
E(); | |
} | |
}) : n.result(); | |
})(); | |
} else n.result(); | |
} | |
var h = this, | |
n = h._log; | |
t.esn != h._esn ? (n.error("Esn mismatch, starting fresh"), c.error()) : function(c) { | |
function b() { | |
if (!g && k && A && m) { | |
g = !0; | |
var b = new hc(a, k, d.esn, { | |
rawKey: A | |
}, { | |
rawKey: m | |
}); | |
h.setCryptoContext(k, b, !0); | |
c.result(k); | |
} | |
} | |
function f(a, b) { | |
n.error(a, b && "" + b); | |
g || (g = !0, c.error()); | |
} | |
var g, k, A, m; | |
t.masterTokenJSON ? (qd(a, t.masterTokenJSON, { | |
result: function(a) { | |
k = a; | |
b(); | |
}, | |
timeout: function() { | |
f("Timeout parsing MasterToken"); | |
}, | |
error: function(a) { | |
f("Error parsing MasterToken", a); | |
} | |
}), h._systemKeyWrapFormat ? h.unwrapKeysWithSystemKey(t, { | |
result: function(a) { | |
A = a.encryptionKey; | |
m = a.hmacKey; | |
b(); | |
}, | |
timeout: function() { | |
f("Timeout unwrapping keys"); | |
}, | |
error: function(a) { | |
f("Error unwrapping keys", a); | |
} | |
}) : Promise.resolve().then(function() { | |
return za.encrypt({ | |
name: Jc.name, | |
iv: new Uint8Array(16) | |
}, t.encryptionKey, new Uint8Array(1)); | |
}).then(function(a) { | |
A = t.encryptionKey; | |
})["catch"](function(a) { | |
f("Error loading encryptionKey"); | |
}).then(function() { | |
return za.sign(Kc, t.hmacKey, new Uint8Array(1)); | |
}).then(function(a) { | |
m = t.hmacKey; | |
b(); | |
})["catch"](function(a) { | |
f("Error loading hmacKey"); | |
})) : f("Persisted store is corrupt"); | |
} | |
({ | |
result: function(a) { | |
b(a, c); | |
}, | |
timeout: c.timeout, | |
error: c.error | |
}); | |
} | |
}), | |
rj = { | |
"streaming.servicetokens.movie": !0, | |
"streaming.servicetokens.license": !0 | |
}, | |
de = "$netflix$msl$wrapsys", | |
Rd, tj = pj.extend({ | |
init: function(d, a, t, c, b, k) { | |
var h = new Fe([Cd.LZW]), | |
n = new dj; | |
n.addPublicKey(a, t); | |
c[Za.RSA] = new cj(n); | |
a = {}; | |
a[Cb.EMAIL_PASSWORD] = new mj; | |
a[Cb.NETFLIXID] = new lj; | |
a[Cb.MDX] = new Qh; | |
a[Cb.SSO] = new nj; | |
a[Cb.SWITCH_PROFILE] = new oj; | |
d = { | |
_mslCryptoContext: { | |
value: new aj, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_capabilities: { | |
value: h, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_entityAuthData: { | |
value: b, | |
writable: !0, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_entityAuthFactories: { | |
value: c, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_userAuthFactories: { | |
value: a, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_keyExchangeFactories: { | |
value: k, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
}, | |
_store: { | |
value: d, | |
writable: !1, | |
enumerable: !1, | |
configurable: !1 | |
} | |
}; | |
Object.defineProperties(this, d); | |
}, | |
getTime: function() { | |
return Date.now(); | |
}, | |
getRandom: function() { | |
return new lh; | |
}, | |
isPeerToPeer: function() { | |
return !1; | |
}, | |
getMessageCapabilities: function() { | |
return this._capabilities; | |
}, | |
getEntityAuthenticationData: function(d, a) { | |
a.result(this._entityAuthData); | |
}, | |
getMslCryptoContext: function() { | |
return this._mslCryptoContext; | |
}, | |
getEntityAuthenticationFactory: function(d) { | |
return this._entityAuthFactories[d]; | |
}, | |
getUserAuthenticationFactory: function(d) { | |
return this._userAuthFactories[d]; | |
}, | |
getTokenFactory: function() { | |
return null; | |
}, | |
getKeyExchangeFactory: function(d) { | |
return this._keyExchangeFactories.filter(function(a) { | |
return a.scheme == d; | |
})[0]; | |
}, | |
getKeyExchangeFactories: function() { | |
return this._keyExchangeFactories; | |
}, | |
getMslStore: function() { | |
return this._store; | |
} | |
}), | |
dh = Kh.extend({ | |
init: function(d, a, t, c) { | |
this._log = d; | |
this._mslContext = a; | |
this._mslRequest = t; | |
this._keyRequestData = c; | |
}, | |
getCryptoContexts: function() { | |
return {}; | |
}, | |
isEncrypted: function() { | |
return !!this._mslRequest.encrypted; | |
}, | |
isNonReplayable: function() { | |
return !!this._mslRequest.nonReplayable; | |
}, | |
isRequestingTokens: function() { | |
return !0; | |
}, | |
getUserId: function() { | |
return this._mslRequest.profileGuid || this._mslRequest.userId || null; | |
}, | |
getUserAuthData: function(d, a, t, c) { | |
var b = this._mslRequest, | |
k = this._mslContext; | |
m(c, function() { | |
if (d) return null; | |
if (b.token) { | |
var a; | |
b.email ? a = new Rh(b.email, b.password) : b.netflixId && (a = new Sh(b.netflixId, b.secureNetflixId)); | |
return new be(b.mechanism, mb(b.token), a); | |
} | |
return b.email ? new Ke(b.email, b.password) : b.netflixId ? new Zd(b.netflixId, b.secureNetflixId) : b.mdxControllerToken ? (a = (new ae("regpairrequest", b.mdxNonce, b.mdxEncryptedPinB64, b.mdxSignature)).getEncoding(), new $d(k, b.mdxPin, b.mdxControllerToken, a, b.mdxSignature)) : b.useNetflixUserAuthData ? new Zd : b.profileGuid ? (a = b.userId, a = k.getMslStore().userIdTokens[a], new ce(a, b.profileGuid)) : null; | |
}); | |
}, | |
getCustomer: function() { | |
return null; | |
}, | |
getKeyRequestData: function(d) { | |
d.result(this._mslRequest.allowTokenRefresh ? [this._keyRequestData] : []); | |
}, | |
updateServiceTokens: function(d, a, t) { | |
var c = this._log, | |
b = (this._mslRequest.serviceTokens || []).slice(), | |
k = this._mslContext; | |
a = k.getMslStore(); | |
var h = d.builder.getMasterToken(), | |
n = this.getUserId(), | |
g = a.getUserIdToken(n); | |
(function f() { | |
var a = b.shift(); | |
if (a) try { | |
a instanceof td ? (d.addPrimaryServiceToken(a), f()) : Ge(k, a, h, g, null, { | |
result: function(a) { | |
try { | |
d.addPrimaryServiceToken(a); | |
} catch (A) { | |
c.warn("Exception adding service token", "" + A); | |
} | |
f(); | |
}, | |
timeout: function() { | |
c.warn("Timeout parsing service token"); | |
f(); | |
}, | |
error: function(a) { | |
c.warn("Error parsing service token", "" + a); | |
f(); | |
} | |
}); | |
} | |
catch (v) { | |
c.warn("Exception processing service token", "" + v), f(); | |
} else t.result(!0); | |
})(); | |
}, | |
write: function(d, a, t) { | |
var c = mb(this._mslRequest.body); | |
d.write(c, 0, c.length, a, { | |
result: function(b) { | |
b != c.length ? t.error(new Bb("Not all data was written to output.")) : d.flush(a, { | |
result: function() { | |
t.result(!0); | |
}, | |
timeout: function() { | |
t.timeout(); | |
}, | |
error: function(a) { | |
t.error(a); | |
} | |
}); | |
}, | |
timeout: function() { | |
t.timeout(); | |
}, | |
error: function(a) { | |
t.error(a); | |
} | |
}); | |
}, | |
getDebugContext: function() { | |
this._dc || (this._dc = new uj(this._log, this._mslRequest)); | |
return this._dc; | |
} | |
}), | |
uj = kj.extend({ | |
init: function(d, a) { | |
this._log = d; | |
this._mslRequest = a; | |
}, | |
sentHeader: function(d) { | |
this._log.trace("Sent MSL header", ch(this._mslRequest, d), d.serviceTokens && d.serviceTokens.map(Ui).join("\n")); | |
}, | |
receivedHeader: function(d) { | |
var a = ch(this._mslRequest, d), | |
t = d.errorCode; | |
t ? this._log.warn("Received MSL error header", a, { | |
errorCode: t, | |
errorMessage: d.errorMessage, | |
internalCode: d.internalCode | |
}) : this._log.trace("Received MSL header", a); | |
} | |
}), | |
Wh = { | |
PSK: function(d) { | |
return $e(d, Za.PSK, qj, Lc, ng, Ee); | |
}, | |
MGK: function(d) { | |
return $e(d, Za.MGK, zg, Bc, ng, Ee); | |
}, | |
MGK_WITH_FALLBACK: function(m) { | |
var a; | |
switch (m.esnPrefix) { | |
case "GOOGEUR001": | |
case "GOOGLEXX01": | |
a = "PSK"; | |
break; | |
default: | |
a = "MGK"; | |
} | |
var t = Wh[a]; | |
if (!t) throw new D(d.INTERNAL_EXCEPTION, "Invalid fallback authenticationType: " + a); | |
return t(m); | |
}, | |
MGK_JWE: function(d) { | |
return $e(d, Za.MGK, zg, Bc, vh, mg); | |
}, | |
JWK_RSA: function(d) { | |
return dg(d, { | |
name: "RSA-OAEP", | |
modulusLength: 2048, | |
publicExponent: new Uint8Array([1, 0, 1]), | |
hash: { | |
name: "SHA-1" | |
} | |
}, of .JWK_RSA); | |
}, | |
JWK_RSAES: function(d) { | |
return dg(d, { | |
name: "RSAES-PKCS1-v1_5", | |
modulusLength: 2048, | |
publicExponent: new Uint8Array([1, 0, 1]) | |
}, of .JWK_RSAES); | |
}, | |
JWEJS_RSA: function(d) { | |
return dg(d, { | |
name: "RSA-OAEP", | |
modulusLength: 2048, | |
publicExponent: new Uint8Array([1, 0, 1]) | |
}, of .JWEJS_RSA); | |
} | |
}; | |
y.netflix = y.netflix || {}; | |
y.netflix.msl = { | |
createMslClient: function(m, a) { | |
var t = m.log, | |
c, b, k, h = m.notifyMilestone || function() {}; | |
Promise.resolve().then(function() { | |
if (!(Ra && Ra.generateKey && Ra.importKey && Ra.unwrapKey)) throw new D(d.INTERNAL_EXCEPTION, "No WebCrypto"); | |
Tb = Ra.generateKey({ | |
name: "AES-CBC", | |
length: 128 | |
}, !0, nd).then ? ff.V2014_02 : ff.LEGACY; | |
h("mslisik"); | |
return za.importKey("spki", m.serverIdentityKeyData, mh, !1, ["verify"]); | |
}).then(function(a) { | |
return new Promise(function(c, b) { | |
ld(a, { | |
result: c, | |
error: function() { | |
b(new D(d.KEY_IMPORT_ERROR, "Unable to create server identity verification key")); | |
} | |
}); | |
}); | |
}).then(function(a) { | |
c = a; | |
if (a = Wh[m.authenticationType]) return h("mslcc"), a(m); | |
throw new D(d.INTERNAL_EXCEPTION, "Invalid authenticationType: " + m.authenticationType); | |
}).then(function(a) { | |
b = new sj(t, m.esn, a.keyRequestData, a.createKeyRequestData, m.authenticationKeyNames.s, m.systemKeyWrapFormat); | |
k = new tj(b, m.serverIdentityId, c, a.entityAuthFactories, a.entityAuthData, a.keyExchangeFactories); | |
var g = m.storeState; | |
if (g) return h("mslss"), t.info("Loading store state"), new Promise(function(a, c) { | |
b.loadStoreState(m, k, g, { | |
result: a, | |
timeout: a, | |
error: a | |
}); | |
}); | |
t.info("No store state, starting fresh"); | |
}).then(function() { | |
var c = new Lh; | |
h("msldone"); | |
a.result(new Vi(t, c, k, b, m.ErrorSubCodes)); | |
})["catch"](function(c) { | |
a.error(c); | |
}); | |
}, | |
IHttpLocation: gj, | |
MslIoException: Bb | |
}; | |
var Ja = "undefined" != typeof y && y === this ? this : "undefined" != typeof global && null != global ? global : this, | |
bf = "function" == typeof Object.defineProperties ? Object.defineProperty : function(d, a, t) { | |
if (t.get || t.set) throw new TypeError("ES3 does not support getters and setters."); | |
d != Array.prototype && d != Object.prototype && (d[a] = t.value); | |
}, | |
Zi = 0; | |
cc("Array.prototype.entries", function(d) { | |
return d ? d : function() { | |
return te(this, function(a, d) { | |
return [a, d]; | |
}); | |
}; | |
}); | |
cc("Array.prototype.keys", function(d) { | |
return d ? d : function() { | |
return te(this, function(a) { | |
return a; | |
}); | |
}; | |
}); | |
cc("Promise", function(d) { | |
function a(a) { | |
this.yz = 0; | |
this.$R = void 0; | |
this.Wy = []; | |
var c = this.EM(); | |
try { | |
a(c.resolve, c.reject); | |
} catch (n) { | |
c.reject(n); | |
} | |
} | |
function t() { | |
this.wn = null; | |
} | |
if (d) return d; | |
t.prototype.o_ = function(a) { | |
null == this.wn && (this.wn = [], this.Lla()); | |
this.wn.push(a); | |
}; | |
t.prototype.Lla = function() { | |
var a = this; | |
this.p_(function() { | |
a.jra(); | |
}); | |
}; | |
var c = Ja.setTimeout; | |
t.prototype.p_ = function(a) { | |
c(a, 0); | |
}; | |
t.prototype.jra = function() { | |
for (; this.wn && this.wn.length;) { | |
var a = this.wn; | |
this.wn = []; | |
for (var c = 0; c < a.length; ++c) { | |
var b = a[c]; | |
delete a[c]; | |
try { | |
b(); | |
} catch (g) { | |
this.Nla(g); | |
} | |
} | |
} | |
this.wn = null; | |
}; | |
t.prototype.Nla = function(a) { | |
this.p_(function() { | |
throw a; | |
}); | |
}; | |
a.prototype.EM = function() { | |
function a(a) { | |
return function(l) { | |
b || (b = !0, a.call(c, l)); | |
}; | |
} | |
var c = this, | |
b = !1; | |
return { | |
resolve: a(this.dCa), | |
reject: a(this.LR) | |
}; | |
}; | |
a.prototype.dCa = function(c) { | |
if (c === this) this.LR(new TypeError("A Promise cannot resolve to itself")); | |
else if (c instanceof a) this.yDa(c); | |
else { | |
var b; | |
a: switch (typeof c) { | |
case "object": | |
b = null != c; | |
break a; | |
case "function": | |
b = !0; | |
break a; | |
default: | |
b = !1; | |
} | |
b ? this.cCa(c) : this.X1(c); | |
} | |
}; | |
a.prototype.cCa = function(a) { | |
var c = void 0; | |
try { | |
c = a.then; | |
} catch (n) { | |
this.LR(n); | |
return; | |
} | |
"function" == typeof c ? this.zDa(c, a) : this.X1(a); | |
}; | |
a.prototype.LR = function(a) { | |
this.Y7(2, a); | |
}; | |
a.prototype.X1 = function(a) { | |
this.Y7(1, a); | |
}; | |
a.prototype.Y7 = function(a, c) { | |
if (0 != this.yz) throw Error("Cannot settle(" + a + ", " + c | "): Promise already settled in state" + this.yz); | |
this.yz = a; | |
this.$R = c; | |
this.kra(); | |
}; | |
a.prototype.kra = function() { | |
if (null != this.Wy) { | |
for (var a = this.Wy, c = 0; c < a.length; ++c) a[c].call(), a[c] = null; | |
this.Wy = null; | |
} | |
}; | |
var b = new t; | |
a.prototype.yDa = function(a) { | |
var c = this.EM(); | |
a.gD(c.resolve, c.reject); | |
}; | |
a.prototype.zDa = function(a, c) { | |
var b = this.EM(); | |
try { | |
a.call(c, b.resolve, b.reject); | |
} catch (g) { | |
b.reject(g); | |
} | |
}; | |
a.prototype.then = function(c, b) { | |
function h(a, c) { | |
return "function" == typeof a ? function(c) { | |
try { | |
g(a(c)); | |
} catch (J) { | |
l(J); | |
} | |
} : | |
c; | |
} | |
var g, l, f = new a(function(a, c) { | |
g = a; | |
l = c; | |
}); | |
this.gD(h(c, g), h(b, l)); | |
return f; | |
}; | |
a.prototype["catch"] = function(a) { | |
return this.then(void 0, a); | |
}; | |
a.prototype.gD = function(a, c) { | |
function h() { | |
switch (g.yz) { | |
case 1: | |
a(g.$R); | |
break; | |
case 2: | |
c(g.$R); | |
break; | |
default: | |
throw Error("Unexpected state: " + g.yz); | |
} | |
} | |
var g = this; | |
null == this.Wy ? b.o_(h) : this.Wy.push(function() { | |
b.o_(h); | |
}); | |
}; | |
a.resolve = function(c) { | |
return c instanceof a ? c : new a(function(a) { | |
a(c); | |
}); | |
}; | |
a.reject = function(c) { | |
return new a(function(a, b) { | |
b(c); | |
}); | |
}; | |
a.race = function(c) { | |
return new a(function(b, n) { | |
for (var h = Sb(c), l = h.next(); !l.done; l = h.next()) a.resolve(l.value).gD(b, n); | |
}); | |
}; | |
a.all = function(c) { | |
var b = Sb(c), | |
n = b.next(); | |
return n.done ? a.resolve([]) : new a(function(c, l) { | |
function f(a) { | |
return function(b) { | |
h[a] = b; | |
g--; | |
0 == g && c(h); | |
}; | |
} | |
var h = [], | |
g = 0; | |
do h.push(void 0), g++, a.resolve(n.value).gD(f(h.length - 1), l), n = b.next(); while (!n.done) | |
}); | |
}; | |
a.$jscomp$new$AsyncExecutor = function() { | |
return new t; | |
}; | |
return a; | |
}); | |
cc("Object.assign", function(d) { | |
return d ? d : function(a, d) { | |
for (var c = 1; c < arguments.length; c++) { | |
var b = arguments[c]; | |
if (b) | |
for (var k in b) Sc(b, k) && (a[k] = b[k]); | |
} | |
return a; | |
}; | |
}); | |
cc("Array.prototype.find", function(d) { | |
return d ? d : function(a, d) { | |
a: { | |
var c = this;c instanceof String && (c = String(c)); | |
for (var b = c.length, k = 0; k < b; k++) { | |
var h = c[k]; | |
if (a.call(d, h, k, c)) { | |
a = h; | |
break a; | |
} | |
} | |
a = void 0; | |
} | |
return a; | |
}; | |
}); | |
cc("Array.prototype.values", function(d) { | |
return d ? d : function() { | |
return te(this, function(a, d) { | |
return d; | |
}); | |
}; | |
}); | |
cc("WeakMap", function(d) { | |
function a(a) { | |
this.ay = (k += Math.random() + 1).toString(); | |
if (a) { | |
rb(); | |
gc(); | |
a = Sb(a); | |
for (var c; !(c = a.next()).done;) c = c.value, this.set(c[0], c[1]); | |
} | |
} | |
function t(a) { | |
Sc(a, b) || bf(a, b, { | |
value: {} | |
}); | |
} | |
function c(a) { | |
var c = Object[a]; | |
c && (Object[a] = function(a) { | |
t(a); | |
return c(a); | |
}); | |
} | |
if (function() { | |
if (!d || !Object.seal) return !1; | |
try { | |
var a = Object.seal({}), | |
c = Object.seal({}), | |
b = new d([ | |
[a, 2], | |
[c, 3] | |
]); | |
if (2 != b.get(a) || 3 != b.get(c)) return !1; | |
b["delete"](a); | |
b.set(c, 4); | |
return !b.has(a) && 4 == b.get(c); | |
} catch (l) { | |
return !1; | |
} | |
} | |
()) return d; | |
var b = "$jscomp_hidden_" + Math.random().toString().substring(2); | |
c("freeze"); | |
c("preventExtensions"); | |
c("seal"); | |
var k = 0; | |
a.prototype.set = function(a, c) { | |
t(a); | |
if (!Sc(a, b)) throw Error("WeakMap key fail: " + a); | |
a[b][this.ay] = c; | |
return this; | |
}; | |
a.prototype.get = function(a) { | |
return Sc(a, b) ? a[b][this.ay] : void 0; | |
}; | |
a.prototype.has = function(a) { | |
return Sc(a, b) && Sc(a[b], this.ay); | |
}; | |
a.prototype["delete"] = function(a) { | |
return Sc(a, b) && Sc(a[b], this.ay) ? delete a[b][this.ay] : !1; | |
}; | |
return a; | |
}); | |
cc("Map", function(d) { | |
function a() { | |
var a = {}; | |
return a.yd = a.next = a.head = a; | |
} | |
function t(a, c) { | |
var b = a.Zl; | |
return eg(function() { | |
if (b) { | |
for (; b.head != a.Zl;) b = b.yd; | |
for (; b.next != b.head;) return b = b.next, { | |
done: !1, | |
value: c(b) | |
}; | |
b = null; | |
} | |
return { | |
done: !0, | |
value: void 0 | |
}; | |
}); | |
} | |
function c(a, c) { | |
var b; | |
b = c && typeof c; | |
"object" == b || "function" == b ? k.has(c) ? b = k.get(c) : (b = "" + ++h, k.set(c, b)) : b = "p_" + c; | |
var f = a.Hn[b]; | |
if (f && Sc(a.Hn, b)) | |
for (a = 0; a < f.length; a++) { | |
var g = f[a]; | |
if (c !== c && g.key !== g.key || c === g.key) return { | |
id: b, | |
list: f, | |
index: a, | |
Ic: g | |
}; | |
} | |
return { | |
id: b, | |
list: f, | |
index: -1, | |
Ic: void 0 | |
}; | |
} | |
function b(c) { | |
this.Hn = {}; | |
this.Zl = a(); | |
this.size = 0; | |
if (c) { | |
c = Sb(c); | |
for (var b; !(b = c.next()).done;) b = b.value, this.set(b[0], b[1]); | |
} | |
} | |
if (function() { | |
if (!d || !d.prototype.entries || "function" != typeof Object.seal) return !1; | |
try { | |
var a = Object.seal({ | |
x: 4 | |
}), | |
c = new d(Sb([ | |
[a, "s"] | |
])); | |
if ("s" != c.get(a) || 1 != c.size || c.get({ | |
x: 4 | |
}) || c.set({ | |
x: 4 | |
}, "t") != c || 2 != c.size) return !1; | |
var b = c.entries(), | |
f = b.next(); | |
if (f.done || f.value[0] != a || "s" != f.value[1]) return !1; | |
f = b.next(); | |
return f.done || 4 != f.value[0].x || "t" != f.value[1] || !b.next().done ? !1 : !0; | |
} catch (q) { | |
return !1; | |
} | |
} | |
()) return d; | |
rb(); | |
gc(); | |
var k = new WeakMap; | |
b.prototype.set = function(a, b) { | |
var l = c(this, a); | |
l.list || (l.list = this.Hn[l.id] = []); | |
l.Ic ? l.Ic.value = b : (l.Ic = { | |
next: this.Zl, | |
yd: this.Zl.yd, | |
head: this.Zl, | |
key: a, | |
value: b | |
}, l.list.push(l.Ic), this.Zl.yd.next = l.Ic, this.Zl.yd = l.Ic, this.size++); | |
return this; | |
}; | |
b.prototype["delete"] = function(a) { | |
a = c(this, a); | |
return a.Ic && a.list ? (a.list.splice(a.index, 1), a.list.length || delete this.Hn[a.id], a.Ic.yd.next = a.Ic.next, a.Ic.next.yd = a.Ic.yd, a.Ic.head = null, this.size--, !0) : !1; | |
}; | |
b.prototype.clear = function() { | |
this.Hn = {}; | |
this.Zl = this.Zl.yd = a(); | |
this.size = 0; | |
}; | |
b.prototype.has = function(a) { | |
return !!c(this, a).Ic; | |
}; | |
b.prototype.get = function(a) { | |
return (a = c(this, a).Ic) && a.value; | |
}; | |
b.prototype.entries = function() { | |
return t(this, function(a) { | |
return [a.key, a.value]; | |
}); | |
}; | |
b.prototype.keys = function() { | |
return t(this, function(a) { | |
return a.key; | |
}); | |
}; | |
b.prototype.values = function() { | |
return t(this, function(a) { | |
return a.value; | |
}); | |
}; | |
b.prototype.forEach = function(a, c) { | |
for (var b = this.entries(), f; !(f = b.next()).done;) f = f.value, a.call(c, f[1], f[0], this); | |
}; | |
b.prototype[Symbol.iterator] = b.prototype.entries; | |
var h = 0; | |
return b; | |
}); | |
cc("String.prototype.startsWith", function(d) { | |
return d ? d : function(a, d) { | |
var c = gh(this, a, "startsWith"); | |
a += ""; | |
var b = c.length, | |
k = a.length; | |
d = Math.max(0, Math.min(d | 0, c.length)); | |
for (var h = 0; h < k && d < b;) | |
if (c[d++] != a[h++]) return !1; | |
return h >= k; | |
}; | |
}); | |
cc("String.prototype.endsWith", function(d) { | |
return d ? d : function(a, d) { | |
var c = gh(this, a, "endsWith"); | |
a += ""; | |
void 0 === d && (d = c.length); | |
d = Math.max(0, Math.min(d | 0, c.length)); | |
for (var b = a.length; 0 < b && 0 < d;) | |
if (c[--d] != a[--b]) return !1; | |
return 0 >= b; | |
}; | |
}); | |
cc("Math.log2", function(d) { | |
return d ? d : function(a) { | |
return Math.log(a) / Math.LN2; | |
}; | |
}); | |
cc("Set", function(d) { | |
function a(a) { | |
this.vk = new Map; | |
if (a) { | |
a = Sb(a); | |
for (var c; !(c = a.next()).done;) this.add(c.value); | |
} | |
this.size = this.vk.size; | |
} | |
if (function() { | |
if (!d || !d.prototype.entries || "function" != typeof Object.seal) return !1; | |
try { | |
var a = Object.seal({ | |
x: 4 | |
}), | |
c = new d(Sb([a])); | |
if (!c.has(a) || 1 != c.size || c.add(a) != c || 1 != c.size || c.add({ | |
x: 4 | |
}) != c || 2 != c.size) return !1; | |
var b = c.entries(), | |
k = b.next(); | |
if (k.done || k.value[0] != a || k.value[1] != a) return !1; | |
k = b.next(); | |
return k.done || k.value[0] == a || 4 != k.value[0].x || k.value[1] != k.value[0] ? !1 : b.next().done; | |
} catch (h) { | |
return !1; | |
} | |
} | |
()) return d; | |
rb(); | |
gc(); | |
a.prototype.add = function(a) { | |
this.vk.set(a, a); | |
this.size = this.vk.size; | |
return this; | |
}; | |
a.prototype["delete"] = function(a) { | |
a = this.vk["delete"](a); | |
this.size = this.vk.size; | |
return a; | |
}; | |
a.prototype.clear = function() { | |
this.vk.clear(); | |
this.size = 0; | |
}; | |
a.prototype.has = function(a) { | |
return this.vk.has(a); | |
}; | |
a.prototype.entries = function() { | |
return this.vk.entries(); | |
}; | |
a.prototype.values = function() { | |
return this.vk.values(); | |
}; | |
a.prototype[Symbol.iterator] = a.prototype.values; | |
a.prototype.forEach = function(a, c) { | |
var b = this; | |
this.vk.forEach(function(d) { | |
return a.call(c, d, d, b); | |
}); | |
}; | |
return a; | |
}); | |
cc("Object.setPrototypeOf", function(d) { | |
return d ? d : "object" != typeof "".__proto__ ? null : function(a, d) { | |
a.__proto__ = d; | |
if (a.__proto__ !== d) throw new TypeError(a + " is not extensible"); | |
return a; | |
}; | |
}); | |
cc("Object.getOwnPropertySymbols", function(d) { | |
return d ? d : function() { | |
return []; | |
}; | |
}); | |
cc("Array.prototype.fill", function(d) { | |
return d ? d : function(a, d, c) { | |
var b = this.length || 0; | |
0 > d && (d = Math.max(0, b + d)); | |
if (null == c || c > b) c = b; | |
c = Number(c); | |
0 > c && (c = Math.max(0, b + c)); | |
for (d = Number(d || 0); d < c; d++) this[d] = a; | |
return this; | |
}; | |
}); | |
(function a(d, c, b) { | |
function k(g, l) { | |
if (!c[g]) { | |
if (!d[g]) { | |
var f = "function" == typeof require ? require : void 0; | |
if (!l && f) return f(g, !0); | |
if (h) return h(g, !0); | |
l = Error("Cannot find module '" + g + "'"); | |
throw l.code = "MODULE_NOT_FOUND", l; | |
} | |
l = c[g] = { | |
R: {} | |
}; | |
d[g][0].call(l.R, function(a) { | |
var c = d[g][1][a]; | |
return k(c ? c : a); | |
}, l, l.R, a, d, c, b); | |
} | |
return c[g].R; | |
} | |
for (var h = "function" == typeof require ? require : void 0, n = 0; n < b.length; n++) k(b[n]); | |
return k; | |
})({ | |
1: [function(a) { | |
function d() { | |
return !0; | |
} | |
function c() { | |
U(); | |
} | |
function b() {} | |
function k(a, c) { | |
return vj.Kc(c, a, void 0); | |
} | |
function h(a, c) { | |
return vj.Kc(a, void 0, c); | |
} | |
function n(a) { | |
var c = {}, | |
b = a.errorExternalCode || a.Pa, | |
f = a.errorDetails || a.ka; | |
c.ErrorSubCode = a.errorSubCode || a.K || Z.wh; | |
b && (c.ErrorExternalCode = b); | |
f && (c.ErrorDetails = f); | |
return c; | |
} | |
function g(a) { | |
return f(a, Z.Bj); | |
} | |
function l(a) { | |
return f(a, Z.Uda); | |
} | |
function f(a, c) { | |
P(a); | |
return 1 <= a && 9 >= a ? c + a : c; | |
} | |
function q(a) { | |
return a == Y.gB || a == Y.PA; | |
} | |
function v(a) { | |
a = sb(a) ? Le(a) : a; | |
return Xh.encode(a); | |
} | |
function A(a, c) { | |
for (var b in a) a.hasOwnProperty(b) && c(b, a[b]); | |
} | |
function m(a, c, b) { | |
if (c) | |
if (b) { | |
var f = b.Cy, | |
l = b.prefix, | |
h = b.Qq; | |
A(c, function(c, b) { | |
if (!h || jb(b)) a[(l || "") + (f ? c.toLowerCase() : c)] = b; | |
}); | |
} | |
else A(c, function(c, b) { | |
a[c] = b; | |
}); | |
return a; | |
} | |
function p(a, c, b, f) { | |
if (a) { | |
var l = a[c]; | |
wd(l) && (b = l.apply(a, wj.call(arguments, 3))); | |
} | |
} | |
function z(a) { | |
var c = {}; | |
A(a, function(a, b) { | |
c[a] = b; | |
}); | |
return c; | |
} | |
function x(a) { | |
for (var c = 0, b = arguments.length; c < b;) { | |
var f = arguments[c++]; | |
if (jb(f)) return f; | |
} | |
} | |
function u(a, c) { | |
for (var b, f = !0, l; f;) | |
for (f = !1, b = a.length; --b;) l = a[b], l[c] < a[b - 1][c] && (a[b] = a[b - 1], a[b - 1] = l, f = !0); | |
} | |
function M(a) { | |
for (var c = {}, b = a.length; b--;) c[a[b]] = !0; | |
return c; | |
} | |
function P(a) { | |
return pc(a, 10); | |
} | |
function V(a) { | |
if (a) { | |
var c = a.stack, | |
b = a.number, | |
f = a.message; | |
f || (f = "" + a); | |
c ? (a = "" + c, 0 != a.indexOf(f) && (a = f + "\n" + a)) : a = f; | |
b && (a += "\nnumber:" + b); | |
return a; | |
} | |
} | |
function S(a) { | |
return Ga(a) ? a.toFixed(0) : ""; | |
} | |
function r(a) { | |
return Ga(a) ? (a / 1E3).toFixed(0) : ""; | |
} | |
function ha(a) { | |
return Ga(a) ? a.toFixed() : ""; | |
} | |
function ra(a, c) { | |
try { | |
var b = Yb.plugins, | |
f = b.length, | |
l; | |
for (l = 0; l < f; l++) | |
if (c.test(b[l][a])) return b[l]; | |
return !1; | |
} catch (vd) {} | |
} | |
function da() { | |
var a = ra("filename", /widevinecdm/i); | |
if (a) { | |
try { | |
var c = a.description.match(/version: ([0-9.]+)/); | |
if (c && c[1]) return c[1]; | |
} catch (Xb) {} | |
return "true"; | |
} | |
return "false"; | |
} | |
function W() { | |
var a = [{ | |
distinctiveIdentifier: "not-allowed", | |
videoCapabilities: [{ | |
contentType: 'video/mp4; codecs="avc1.640028"', | |
robustness: "HW_SECURE_DECODE" | |
}, { | |
contentType: 'video/mp4; codecs="avc1.640028"', | |
robustness: "SW_SECURE_DECODE" | |
}], | |
audioCapabilities: [{ | |
contentType: 'audio/mp4; codecs="mp4a.40.5"', | |
robustness: "SW_SECURE_CRYPTO" | |
}] | |
}]; | |
try { | |
Yb.requestMediaKeySystemAccess("com.widevine.alpha", a).then(function(a) { | |
var c = a.getConfiguration(); | |
a = c.videoCapabilities; | |
(c = c.audioCapabilities) && c.length && (c = la(c), 0 <= c.indexOf("SW_SECURE_CRYPTO") && (ic.cptheaacwv_sw_cryp = !0)); | |
a && a.length ? (ic.cpth264wv = !0, c = la(a), 0 <= c.indexOf("SW_SECURE_DECODE") && (ic.cpth264wv_sw_dec = !0), 0 <= c.indexOf("HW_SECURE_DECODE") && (ic.cpth264wv_hw_dec = !0)) : ic.cpth264wv = !1; | |
})["catch"](function() { | |
ic.cpth264wv = !1; | |
}); | |
} catch (ud) {} | |
} | |
function la(a) { | |
return a.map(function(a) { | |
return a.robustness; | |
}); | |
} | |
function ma(a, c) { | |
if (a === c) return !0; | |
if (!a || !c) return !1; | |
for (var b in a) | |
if (a.hasOwnProperty(b) && (!c.hasOwnProperty(b) || a[b] !== c[b])) return !1; | |
return !0; | |
} | |
function Fa(a, c) { | |
if (a.length == c.length) { | |
for (var b = a.length; b--;) | |
if (a[b] != c[b]) return !1; | |
return !0; | |
} | |
return !1; | |
} | |
function D(a) { | |
if (a) { | |
var c = a.length; | |
if (c) return --c, c = tb(0 + xj() * (c - 0)), a[c]; | |
} | |
} | |
function K(a, c) { | |
function b() { | |
a.removeEventListener("loadedmetadata", b); | |
c.apply(this, arguments); | |
} | |
a.addEventListener("loadedmetadata", b); | |
} | |
function Q() { | |
var a = Cc.cookie.split("; "), | |
c = a.length, | |
b, f, l, h = {}; | |
for (b = 0; b < c; b++) | |
if (f = Pk(a[b])) l = f.indexOf("="), 0 < l && (h[f.substr(0, l)] = f.substr(l + 1)); | |
return h; | |
} | |
function ba() { | |
var a, c; | |
if (c = ba.yja) return c; | |
a = Yh.search.substr(1); | |
c = a.indexOf("#"); | |
0 <= c && (a = a.substr(0, c)); | |
c = /[+]/g; | |
for (var b = (a || "").split("&"), f = {}, l, h = 0; h < b.length; h++) a = Pk(b[h]), l = a.indexOf("="), 0 <= l ? f[Qk(a.substr(0, l).replace(c, "%20")).toLowerCase()] = Qk(a.substr(l + 1).replace(c, "%20")) : f[a.toLowerCase()] = null; | |
return ba.yja = f; | |
} | |
function aa(a) { | |
var c = ""; | |
A(a, function(a, b) { | |
c && (c += "&"); | |
U(sb(b) || Ga(b) || Rk(b)); | |
c += fe(a) + "=" + fe(b); | |
}); | |
return c; | |
} | |
function pa(a) { | |
var c = ""; | |
A(a, function(a, b) { | |
c += (c ? ";" : "") + a + ":" + b; | |
}); | |
return c; | |
} | |
function Ba(a, c) { | |
var b = a[0]; | |
if (c <= b[0]) return b.slice(1); | |
for (var f = 1, l; l = a[f++];) { | |
if (c <= l[0]) { | |
a = (c - b[0]) / (l[0] - b[0]); | |
c = []; | |
Sa(b.length, l.length); | |
for (f = 1; f < b.length; f++) c.push((b[f] || 0) + a * ((l[f] || 0) - (b[f] || 0))); | |
return c; | |
} | |
b = l; | |
} | |
return b.slice(1); | |
} | |
function ga(a) { | |
return yj.call(a, function(a, c) { | |
return a - c; | |
}); | |
} | |
function Ca(a) { | |
for (var c = 0, b = a.length; b--;) c += a[b]; | |
return c; | |
} | |
function Db(a, c) { | |
var b = -1, | |
f = a.length, | |
l, h; | |
if (1 === arguments.length) { | |
for (; ++b < f && !(null != (l = a[b]) && l <= l);) l = void 0; | |
for (; ++b < f;) null != (h = a[b]) && h > l && (l = h); | |
} else { | |
for (; ++b < f && !(null != (l = c.call(a, a[b], b)) && l <= l);) l = void 0; | |
for (; ++b < f;) null != (h = c.call(a, a[b], b)) && h > l && (l = h); | |
} | |
return l; | |
} | |
function N(a, c) { | |
var b = -1, | |
f = a.length, | |
l, h; | |
if (1 === arguments.length) { | |
for (; ++b < f && !(null != (l = a[b]) && l <= l);) l = void 0; | |
for (; ++b < f;) null != (h = a[b]) && l > h && (l = h); | |
} else { | |
for (; ++b < f && !(null != (l = c.call(a, a[b], b)) && l <= l);) l = void 0; | |
for (; ++b < f;) null != (h = c.call(a, a[b], b)) && l > h && (l = h); | |
} | |
return l; | |
} | |
function ta(a) { | |
return wd(a.then) ? a : new ka(function(c, b) { | |
a.oncomplete = function() { | |
c(a.result); | |
}; | |
a.onerror = function() { | |
b(a.error); | |
}; | |
}); | |
} | |
function bb(a, c) { | |
function b(a) { | |
0 > f.indexOf(a) && Ga(a) && f.push(a); | |
} | |
a = a.slice(); | |
ga(a); | |
var f = []; | |
if (!c || !c.length) return a; | |
if (!a.length) return []; | |
var l = c.length, | |
h, g; | |
try { | |
for (; l--;) { | |
var n = "" + c[l], | |
d = P(n); | |
switch (n[n.length - 1]) { | |
case "-": | |
for (h = a.length; h--;) | |
if (g = a[h], g < d) { | |
b(g); | |
break; | |
} | |
break; | |
case "+": | |
for (h = 0; h < a.length; h++) | |
if (g = a[h], g > d) { | |
b(g); | |
break; | |
} | |
break; | |
default: | |
0 <= a.indexOf(d) && b(d); | |
} | |
} | |
} catch (Zh) {} | |
f.length || f.push(a[0]); | |
ga(f); | |
return f; | |
} | |
function Ib(a, c, b) { | |
var f; | |
a / c > b ? (f = tb(c * b), a = c) : (f = a, a = tb(a / b)); | |
return { | |
width: f, | |
height: a | |
}; | |
} | |
function Dc(a, c) { | |
var b = a.length; | |
c = (b - 1) * c + 1; | |
if (1 === c) return a[0]; | |
if (c == b) return a[b - 1]; | |
b = cb(c); | |
return a[b - 1] + (c - b) * (a[b] - a[b - 1]); | |
} | |
function ca(a, c) { | |
c = zf(c) ? c : [c]; | |
for (var b = a.length, f = 0; f < b; f++) | |
for (var l = 0; l < c.length; l++) | |
if (a[f].type == c[l]) return a[f]; | |
throw new ub("Box not found " + c); | |
} | |
function ja(a) { | |
return wd(Yb.requestMediaKeySystemAccess) || a.vEa; | |
} | |
function Id() { | |
var a = new ArrayBuffer(4), | |
c = new Ya(a), | |
a = new Uint32Array(a); | |
c[0] = 161; | |
c[1] = 178; | |
c[2] = 195; | |
c[3] = 212; | |
return 3569595041 == a[0] ? "LE" : 2712847316 == a[0] ? "BE" : "undefined"; | |
} | |
function na() { | |
try { | |
var a = /playercore.*js/, | |
c = xc.getEntries("resource").filter(function(c) { | |
return null !== a.exec(c.name); | |
}); | |
if (c && 0 < c.length) { | |
var b = tb(c[0].duration); | |
return ya.stringify(b); | |
} | |
} catch (Hd) {} | |
} | |
function ea(a, c, b) { | |
return a >= c ? a <= b ? a : b : c; | |
} | |
function eb(a) { | |
if (Ga(a)) return (a / 1E3).toFixed(3); | |
} | |
function qa(a, c) { | |
var b = wj.call(arguments, 1); | |
return a.replace(/{(\d+)}/g, function(a, c) { | |
return "undefined" != typeof b[c] ? b[c] : a; | |
}); | |
} | |
function Ea(a) { | |
for (var c = a.length, b = new Uint16Array(c), f = 0; f < c; f++) b[f] = a.charCodeAt(f); | |
return b.buffer; | |
} | |
function Ma() { | |
var a = new Ya(19); | |
zj.prototype.forEach.call("secure-stop-release", function(c, b) { | |
a[b] = c.charCodeAt(0); | |
}); | |
return a; | |
} | |
function Oa(a) { | |
function c() { | |
if (h) | |
for (var a; a = f.pop();) a(g); | |
} | |
function b(a) { | |
h = !0; | |
g = a; | |
c(); | |
} | |
var f = [], | |
l, h, g; | |
return function(h) { | |
f.push(h); | |
l || (l = !0, a(b)); | |
c(); | |
}; | |
} | |
function Ta(a) { | |
return y.setTimeout(a, 0); | |
} | |
function Va(a, c) { | |
return y.setTimeout(a, c); | |
} | |
function za(a) { | |
y.clearTimeout(a); | |
} | |
function Ja(a, c) { | |
return y.setInterval(a, c); | |
} | |
function Na(a) { | |
y.clearInterval(a); | |
} | |
function oa() { | |
return Af.qe().na(Ec); | |
} | |
function Ka() { | |
return Uk.bh.na($h); | |
} | |
function Za() { | |
return Im.yM(); | |
} | |
function Wa() { | |
return Af.uy.na(Ec); | |
} | |
function ab() { | |
return Uk.bh.na(Ec); | |
} | |
function Ra(a) { | |
function c(c) { | |
g = null; | |
b(c || a); | |
} | |
function b(a) { | |
var b = oa(); | |
if (h) { | |
var f = a - (b - l); | |
0 >= f ? (a = h, h = null, l = b, a()) : g = g || Va(c.bind(this, a), f); | |
} | |
} | |
Mc(a); | |
var f = this, | |
l = -a, | |
h, g; | |
this.Esa = function() { | |
return a; | |
}; | |
this.rS = function(c) { | |
a = c; | |
}; | |
this.Xa = function(a) { | |
h = a; | |
g = g || Ta(c); | |
}; | |
this.nCa = function(a) { | |
f.Ll(); | |
Ta(a); | |
}; | |
this.Ll = function() { | |
g && za(g); | |
g = null; | |
}; | |
} | |
function mb(a) { | |
var c = 0, | |
b; | |
this.get = function() { | |
var f = oa(); | |
if (!b || 1E3 < f - c) c = f, b = a(); | |
return b; | |
}; | |
this.clear = function() { | |
b = void 0; | |
}; | |
} | |
function Qa() { | |
function a(a, f, l) { | |
var h = "$netflix$player$order" + b + "$" + a; | |
if (c) { | |
var g = c[a] ? c[a].slice() : []; | |
l && (f[h] = l); | |
0 > g.indexOf(f) && (g.push(f), g.sort(function(a, c) { | |
return (a[h] || 0) - (c[h] || 0); | |
})); | |
c[a] = g; | |
} | |
} | |
var c = {}, | |
b = "$es$" + Jm++; | |
m(this, { | |
addListener: a, | |
removeListener: function(a, b) { | |
if (c && c[a]) { | |
for (var f = c[a].slice(), l; 0 <= (l = f.indexOf(b));) f.splice(l, 1); | |
c[a] = f; | |
} | |
}, | |
qua: function(a) { | |
return c && !!(c[a] || (c[a] = [])).length; | |
}, | |
Ba: function(a, b, f) { | |
if (c) | |
for (var l = c[a] || (c[a] = []), h = 0; h < l.length; h++) f ? function() { | |
var a = l[h]; | |
Ta(function() { | |
a(b); | |
}); | |
} | |
() : l[h].call(this, b); | |
}, | |
wz: function(a, b) { | |
if (c) { | |
a = c[a] || (c[a] = []); | |
b = b || {}; | |
for (var f = 0; f < a.length && !b.xO; f++) a[f](b); | |
} | |
}, | |
Ll: function() { | |
c = void 0; | |
}, | |
on: a | |
}); | |
} | |
function Bb() { | |
function a(a) { | |
var l = b.indexOf(a); | |
0 <= l ? b.splice(l, 1) : a == f ? f = void 0 : U(!1, "lock released without being acquired"); | |
Ta(c); | |
} | |
function c() { | |
for (var c = 0, g, n; !f && (g = l[c]);) { | |
if (0 >= b.length || !g.i4) l.splice(c, 1), n = h++, g.i4 ? f = n : b.push(n), g.Oma({ | |
o: !0, | |
dOa: n, | |
releaseLock: function() { | |
a(n); | |
} | |
}); | |
c++; | |
} | |
} | |
var b = [], | |
f, l = [], | |
h = 1; | |
m(this, { | |
Fka: function(a, b) { | |
l.push({ | |
i4: a, | |
Oma: b | |
}); | |
c(); | |
}, | |
releaseLock: a | |
}); | |
} | |
function Da(a, c) { | |
function b(a, c) { | |
return (a["$netflix$player$order" + h] || 0) - (c["$netflix$player$order" + h] || 0); | |
} | |
var f = this, | |
l = c ? [c] : [], | |
h = "$op$" + Km++; | |
m(f, { | |
value: a, | |
addListener: function(a, c) { | |
Vk(a); | |
U(0 > l.indexOf(a)); | |
a["$netflix$player$order" + h] = c; | |
l = l.slice(); | |
l.push(a); | |
l.sort(b); | |
}, | |
removeListener: function(a) { | |
Vk(a); | |
l = l.slice(); | |
var c; | |
0 <= (c = l.indexOf(a)) && l.splice(c, 1); | |
}, | |
set: function(a, c) { | |
if (f.value !== a) { | |
var b = { | |
oldValue: f.value, | |
newValue: a | |
}; | |
c && m(b, c); | |
f.value = a; | |
a = l; | |
c = a.length; | |
for (var h = 0; h < c; h++) a[h](b); | |
} | |
} | |
}); | |
} | |
function Nb() {} | |
function rb(a, c) { | |
var b; | |
m(this, { | |
Ql: function() { | |
b || (b = Va(c, a)); | |
}, | |
Je: function() { | |
b && (za(b), b = void 0); | |
} | |
}); | |
} | |
function Ub(a, c, b) { | |
U(a && a != Y.wh, "There should always be a specific error code"); | |
this.errorCode = a || Y.wh; | |
c && Bf(c) ? (this.K = c.K || c.ub, this.Pa = c.Pa || c.Ub, this.kk = c.kk || c.Bg, this.ka = c.ka || c.ox, this.KD = c.Tb, this.On = c.On || c.tQ, this.Se = c.Se, this.hya = c.method, U(!this.Se || this.Se == this.Pa)) : (this.K = c, this.Pa = b); | |
a = this.stack = [this.errorCode]; | |
this.K ? a.push(this.K) : this.Pa && a.push(Z.wh); | |
this.Pa && a.push(this.Pa); | |
this.bq = ai + a.join("-"); | |
} | |
function ob(a, c) { | |
return (new Ub(a, c, void 0)).nH(); | |
} | |
function wb(a) { | |
U(void 0 === Aj[a]); | |
Aj[a] = oa(); | |
} | |
function Cb(a) { | |
bi(a); | |
if (sb(a) && Lm.test(a)) { | |
var c = a.split("."); | |
if (4 === c.length) { | |
for (var b = 0; b < c.length; b++) { | |
var f = P(c[b]); | |
if (0 > f || !bd(f, 0, 255) || 1 !== c[b].length && 0 === c[b].indexOf("0")) return; | |
} | |
return a; | |
} | |
} | |
} | |
function Sb(a) { | |
var c = 0; | |
if (Cb(a) === a) return a = a.split("."), c += P(a[0]) << 24, c += P(a[1]) << 16, c += P(a[2]) << 8, c + P(a[3]); | |
} | |
function Tb(a) { | |
bi(a); | |
if (sb(a) && a.match(Mm)) { | |
var c = a.split(":"); | |
if (-1 !== c[c.length - 1].indexOf(".")) { | |
a = Sb(c[c.length - 1]) >>> 0; | |
var b = []; | |
b.push((a >>> 16 & 65535).toString(16)); | |
b.push((a & 65535).toString(16)); | |
c.pop(); | |
c.push(b[0]); | |
c.push(b[1]); | |
a = c.join(":"); | |
} | |
a = a.split("::"); | |
if (!(2 < a.length || 1 === a.length && 8 !== c.length)) { | |
if (1 < a.length) | |
if (c = a[0].split(":"), a = a[1].split(":"), 1 === c.length && "" === c[0] && (c = []), 1 === a.length && "" === a[0] && (a = []), b = 8 - (c.length + a.length), 1 > b) c = []; | |
else { | |
var f; | |
for (f = 0; f < b; f++) c.push("0"); | |
for (f = 0; f < a.length; f++) c.push(a[f]); | |
} | |
a = c.length; | |
if (8 === a) { | |
for (; a--;) | |
if (b = pc(c[a], 16), !bd(b, 0, 65535)) return; | |
return c.join(":"); | |
} | |
} | |
} | |
} | |
function cc(a, c, b) { | |
var f = Cb(a), | |
l = Tb(a), | |
h = Cb(c), | |
g = Tb(c); | |
if (!f && !l || !h && !g || f && !h || l && !g) return !1; | |
if (a === f) return b = -1 << 32 - b, (Sb(a) & b) !== (Sb(c) & b) ? !1 : !0; | |
if (a === l) { | |
a = a.split(":"); | |
c = c.split(":"); | |
for (f = cb(b / 16); f--;) | |
if (a[f] !== c[f]) return !1; | |
b %= 16; | |
if (0 !== b) | |
for (a = pc(a[f], 16).toString(2), c = pc(c[f], 16).toString(2), a = "0000000000000000".substring(0, 16 - a.length) + a, c = "0000000000000000".substring(0, 16 - c.length) + c, f = 0; f < b; f++) | |
if (a[f] !== c[f]) return !1; | |
return !0; | |
} | |
return !1; | |
} | |
function Rb(a, c) { | |
var b; | |
this.yu = function() { | |
b || (b = Ja(c, a)); | |
}; | |
this.Cn = function() { | |
b && (Na(b), b = void 0); | |
}; | |
} | |
function gc(a, c, b, f, l) { | |
sd(a, function(a) { | |
a.o ? Nm(a.object, c, b, f, function(a) { | |
a.o ? l({ | |
o: !0, | |
entries: a.entries | |
}) : l(a); | |
}) : l(a); | |
}); | |
} | |
function nc() { | |
function a(a) { | |
var b = f.jO(); | |
if (l != b) { | |
var h, d; | |
jb(b) && jb(q) && b < q && (d = n || k[cb(b * v)] || k[0]); | |
if (d) { | |
for (; d && d.endTime < b;) d = d.next; | |
for (; d && d.previous && d.previous.endTime >= b;) d = d.previous; | |
} | |
d && (d.startTime <= b && b <= d.endTime ? (h = d, c(d.endTime - b)) : c(d.startTime - b)); | |
n = d; | |
l = b; | |
g != h && (g = h, !a && f.VQ && f.VQ()); | |
} | |
} | |
function c(a) { | |
d && (za(d), d = void 0); | |
h && 0 < a && (d = Va(b, a + Qm)); | |
} | |
function b() { | |
d = void 0; | |
a(); | |
} | |
var f = this, | |
l, h, g, n, d, k, q, v; | |
m(f, { | |
R7: function(c) { | |
var b = c && c.length; | |
n = g = l = void 0; | |
k = c; | |
q = b && Sa.apply(null, c.map(function(a) { | |
return a.endTime; | |
})); | |
v = b && b / q; | |
a(); | |
}, | |
jO: void 0, | |
start: function() { | |
h = !0; | |
a(); | |
}, | |
stop: function() { | |
h = !1; | |
d && (za(d), d = void 0); | |
}, | |
ksa: function() { | |
a(!0); | |
return g; | |
}, | |
VQ: void 0 | |
}); | |
} | |
function hc(a, c, b, f, l) { | |
var h = ""; | |
a.textNodes.forEach(function(a) { | |
var g = h, | |
n = a.style, | |
d = Rm(a.text); | |
for (a = a.lineBreaks; a--;) d = "<br />" + d; | |
var k = n.characterStyle; | |
a = f[k]; | |
var R; | |
0 <= k.indexOf("MONOSPACE") ? (k = n.cellResolution, R = a && k && (40 === k.x && 19 === k.y ? R = 4 / 3 / (40 / 19) : 52 === k.x && 19 === k.y && (R = 16 / 9 / (52 / 19)), R) ? a.width / a.fontSize / R : void 0, R = R || a.lineHeight) : R = a.lineHeight; | |
R = n.characterSize * c.height / (R || 1); | |
R = 0 < l ? cb(R * l) : tb(R); | |
R = { | |
"font-size": R + "px", | |
"line-height": "normal", | |
"font-weight": "normal" | |
}; | |
n.characterItalic && (R["font-style"] = "italic"); | |
n.characterUnderline && (R["text-decoration"] = "underline"); | |
n.characterColor && (R.color = n.characterColor); | |
n.backgroundColor && 0 !== n.backgroundOpacity && (k = n.backgroundColor, a = n.backgroundOpacity, a = void 0 !== a ? a : 1, k = k.substring(1), k = pc(k, 16), R["background-color"] = "rgba(" + (k >> 16 & 255) + "," + (k >> 8 & 255) + "," + (k & 255) + "," + a + ")"); | |
a = n.characterEdgeColor || "#000000"; | |
switch (n.characterEdgeAttributes) { | |
case Cj: | |
R["text-shadow"] = a + " 0px 0px 7px"; | |
break; | |
case Xk: | |
R["text-shadow"] = "-1px 0px " + a + ",0px 1px " + a + ",1px 0px " + a + ",0px -1px " + a; | |
break; | |
case "RAISED": | |
R["text-shadow"] = "-1px -1px white, 0px -1px white, -1px 0px white, 1px 1px black, 0px 1px black, 1px 0px black"; | |
break; | |
case "DEPRESSED": | |
R["text-shadow"] = "1px 1px white, 0px 1px white, 1px 0px white, -1px -1px black, 0px -1px black, -1px 0px black"; | |
} | |
R = pa(R); | |
(a = b[n.characterStyle || "PROPORTIONAL_SANS_SERIF"]) && (R += ";" + a); | |
n = n.characterOpacity; | |
0 < n && 1 > n && (d = '<span style="opacity:' + n + '">' + d + "</span>"); | |
h = g + ('<span style="' + R + '">' + d + "</span>"); | |
}); | |
return h; | |
} | |
function uc(a, c, b, f, l) { | |
var h = "", | |
g = l.width; | |
l = l.height; | |
for (var n = c.length; n--;) { | |
var d = c[n], | |
k = a[n], | |
k = k && k.region, | |
R = "position:absolute;background:" + f + ";width:" + tb(d.width + 2 * b) + "px;height:" + tb(d.height + 2 * b) + "px;"; | |
A(oc(k, d, g, l, b), function(a, c) { | |
R += a + ":" + c + ";"; | |
}); | |
h += '<div style="' + R + '"></div>'; | |
} | |
return h; | |
} | |
function oc(a, c, b, f, l) { | |
var h = {}; | |
"right" == a.horizontalAlignment ? h.right = 100 * (b - c.left - c.width - l) / b + "%" : h.left = 100 * (c.left - l) / b + "%"; | |
"bottom" == a.verticalAlignment ? h.bottom = 100 * (f - c.top - c.height - l) / f + "%" : h.top = 100 * (c.top - l) / f + "%"; | |
return h; | |
} | |
function Bc(a) { | |
function c() { | |
var c = f.parentNode, | |
d = c && c.clientWidth, | |
k = c && c.clientHeight, | |
R = c = 0, | |
q = { | |
width: d, | |
height: k | |
}, | |
v, t; | |
if (0 < d && 0 < k && l) { | |
h && (q = Ib(d, k, h), c = tb((d - q.width) / 2), R = tb((k - q.height) / 2)); | |
var A = l.blocks; | |
v = A && A.map(function(c) { | |
var b = hc(c, q, a, g), | |
f = { | |
display: "block", | |
"white-space": "nowrap" | |
}; | |
switch (c.region.horizontalAlignment) { | |
case "left": | |
f["text-align"] = "left"; | |
break; | |
case "right": | |
f["text-align"] = "right"; | |
break; | |
default: | |
f["text-align"] = "center"; | |
} | |
c = pa(f) + ";position:absolute"; | |
return gb("div", c, b, Ej); | |
}); | |
} | |
m(b, { | |
left: c + "px", | |
right: c + "px", | |
top: R + "px", | |
bottom: R + "px" | |
}); | |
f.style.display = "none"; | |
f.innerHTML = ""; | |
if (v && v.length) { | |
d = q.width; | |
c = q.height; | |
v.forEach(function(a) { | |
f.appendChild(a); | |
}); | |
var x = pa(b); | |
f.style.cssText = x + ";visibility:hidden;z-index:-1"; | |
var Xb = [], | |
u, z, K; | |
for (t = v.length; t--;) z = v[t], K = A[t], u = vc(z, K, d, c), u.width > d && (z.innerHTML = hc(K, q, a, g, d / u.width), u = vc(z, K, d, c)), Xb[t] = u; | |
t = q; | |
n && (t = Jc(q, n, k, R)); | |
Xb = Kc(Xb, t); | |
if (R = A && A[0] && A[0].textNodes && A[0].textNodes[0] && A[0].textNodes[0].style) k = R.windowColor, R = R.windowOpacity, k && 0 < R && (t = tb(c / 50), k = uc(A, Xb, t, k, q), k = gb("div", "position:absolute;left:0;top:0;right:0;bottom:0;opacity:" + R, k, Ej), f.insertBefore(k, f.firstChild)); | |
f.style.display = "none"; | |
for (t = Xb.length; t--;) u = Xb[t], m(v[t].style, oc(A[t].region, u, d, c, 0)); | |
f.style.cssText = x; | |
} | |
} | |
var b = { | |
position: "absolute", | |
left: "0", | |
top: "0", | |
right: "0", | |
bottom: "0", | |
display: "block" | |
}, | |
f = gb("DIV", void 0, void 0, { | |
"class": "player-timedtext" | |
}), | |
l, h, g = function(a) { | |
var c = {}; | |
A(a, function(a, b) { | |
b = gb("DIV", "display:block;position:fixed;z-index:-1;visibility:hidden;font-size:1000px;" + b + ";", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Ej); | |
Cc.body.appendChild(b); | |
var f = { | |
fontSize: 1E3, | |
height: b.clientHeight, | |
width: b.clientWidth / 52, | |
lineHeight: b.clientHeight / 1E3 | |
}; | |
Cc.body.removeChild(b); | |
c[a] = f; | |
}); | |
return c; | |
} | |
(a), | |
n; | |
f.onselectstart = function() { | |
return !1; | |
}; | |
m(this, { | |
p2: function() { | |
return f; | |
}, | |
eDa: function(a) { | |
h = a; | |
}, | |
jDa: function(a) { | |
l = a; | |
c(); | |
}, | |
IBa: c, | |
vz: function(a) { | |
n = a; | |
c(); | |
} | |
}); | |
} | |
function vc(a, c, b, f) { | |
var l = c.region, | |
h = (l.marginTop || 0) * f, | |
g = (l.marginBottom || 0) * f, | |
n = (l.marginLeft || 0) * b, | |
d = (l.marginRight || 0) * b; | |
c = a.clientWidth || 1; | |
a = a.clientHeight || 1; | |
switch (l.verticalAlignment) { | |
case "top": | |
f = h; | |
break; | |
case "center": | |
f = (h + f - g - a) / 2; | |
break; | |
default: | |
f = f - g - a; | |
} | |
switch (l.horizontalAlignment) { | |
case "left": | |
b = n; | |
break; | |
case "right": | |
b = b - d - c; | |
break; | |
default: | |
b = (n + b - d - c) / 2; | |
} | |
return { | |
top: f, | |
left: b, | |
width: c, | |
height: a | |
}; | |
} | |
function Jc(a, c, b, f) { | |
return { | |
height: b - Sa(f, c.bottom | 0) - Sa(f, c.top | 0), | |
width: a.width | |
}; | |
} | |
function Kc(a, c) { | |
function b(a, c, b) { | |
if (a && 1 < a.length) { | |
for (var l = [], h = [], g = 0; g < a.length; g++) l[g] = 0, h[g] = 0; | |
for (var n = !1, g = 0; g < a.length; g++) | |
for (var d = g + 1; d < a.length; d++) { | |
var k, R = a[g], | |
q = a[d]; | |
if (0 > R.width || 0 > q.width || q.left > R.left + R.width || q.left + q.width < R.left || q.top > R.top + R.height ? 0 : q.top + q.height >= R.top) { | |
k = Sa(R.left, q.left); | |
var v = Sa(R.top, q.top); | |
k = { | |
width: Sa(Pa(R.left + R.width, q.left + q.width) - k, 0), | |
height: Sa(Pa(R.top + R.height, q.top + q.height) - v, 0), | |
x: k, | |
y: v | |
}; | |
} else k = void 0; | |
if (k && 1 < k.width && 1 < k.height) | |
if (v = k.width <= k.height, R = f(a[g]), q = f(a[d]), v && c || !v && !c) k = Sa(k.width / 2, .25), R.x <= q.x ? (h[g] -= k, h[d] += k) : (h[d] -= k, h[g] += k); | |
else if (v && !c || !v && c) R = Sa(k.height / 2, .25), l[g] -= R, l[d] += R; | |
} | |
for (g = 0; g < a.length; g++) { | |
if (-.25 > h[g] && 0 <= a[g].left + h[g] || .25 < h[g] && a[g].left + a[g].width + h[g] <= b.width) a[g].left += h[g], n = !0; | |
if (-.25 > l[g] && 0 <= a[g].top + l[g] || .25 < l[g] && a[g].top + a[g].height + l[g] <= b.height) a[g].top += l[g], n = !0; | |
} | |
return n; | |
} | |
} | |
function f(a) { | |
return { | |
x: a.left + a.width / 2, | |
y: a.top + a.height / 2 | |
}; | |
} | |
a = a.map(function(a) { | |
return { | |
top: a.top, | |
left: a.left, | |
width: a.width, | |
height: a.height | |
}; | |
}); | |
(function(a, c) { | |
a.forEach(function(a) { | |
0 > a.left && a.left + a.width < c.width ? a.left += Pa(-a.left, c.width - (a.left + a.width)) : a.left + a.width > c.width && 0 < a.left && (a.left -= Pa(a.left + a.width - c.width, a.left)); | |
0 > a.top && a.top + a.height < c.height ? a.top += Pa(-a.top, c.height - (a.top + a.height)) : a.top + a.height > c.height && 0 < a.top && (a.top -= Pa(a.top + a.height - c.height, a.top)); | |
}); | |
})(a, c); | |
for (var l = 0; 50 > l && b(a, !0, c); l++); | |
for (l = 0; 50 > l && b(a, !1, c); l++); | |
return a; | |
} | |
function Lc(a) { | |
Hj.root.getDirectory("netflix.player.namedatapair", Zk, function(c) { | |
a({ | |
o: !0, | |
pqa: c | |
}); | |
}, function() { | |
a({ | |
K: Z.rga | |
}); | |
}); | |
} | |
function Rc(a, c, b) { | |
function f() { | |
b({ | |
K: Z.oga | |
}); | |
} | |
a.getFile(c, $k, function(a) { | |
a.file(function(c) { | |
var l = new al; | |
l.onloadend = function() { | |
b({ | |
o: !0, | |
text: l.result, | |
JN: a | |
}); | |
}; | |
l.onerror = f; | |
l.readAsText(c); | |
}, f); | |
}, f); | |
} | |
function Sc(a, c, b, f, l) { | |
function h() { | |
l && l({ | |
K: Z.qga | |
}); | |
} | |
function g(a) { | |
a.createWriter(function(c) { | |
try { | |
c.onwriteend = function() { | |
c.onwriteend = null; | |
c.onerror = null; | |
c.truncate(c.position); | |
l && l({ | |
o: !0, | |
JN: a | |
}); | |
}, c.onerror = h, c.write(new uj([b])); | |
} catch (Zh) { | |
h(); | |
} | |
}, h); | |
} | |
c.createWriter ? g(c) : a.getFile(c, f ? Um : Zk, g, h); | |
} | |
function Vc(a, c, b) { | |
function f() { | |
b && b({ | |
K: Z.pga | |
}); | |
} | |
function l(a) { | |
a.remove(function() { | |
b && b(xa); | |
}, f); | |
} | |
c.remove ? l(c) : a.getFile(c, $k, l, f); | |
} | |
function Wc(a) { | |
h("Storage"); | |
var c = {}; | |
a({ | |
o: !0, | |
gb: { | |
load: function(a, b) { | |
c.hasOwnProperty(a) ? b({ | |
o: !0, | |
data: c[a], | |
Cu: a | |
}) : b({ | |
K: Z.fi | |
}); | |
}, | |
save: function(a, b, f, l) { | |
f && c.hasOwnProperty(a) ? l({ | |
o: !1 | |
}) : (c[a] = b, l && l({ | |
o: !0, | |
Cu: a | |
})); | |
}, | |
remove: function(a, b) { | |
delete c[a]; | |
b && b(xa); | |
} | |
} | |
}); | |
} | |
function Xc(a) { | |
function c() { | |
c = b; | |
a({ | |
o: !0, | |
gb: { | |
load: function(a, c) { | |
f(a, function(b) { | |
Rc(l, a, function(a) { | |
Ta(b.releaseLock); | |
if (a.o) { | |
var f = a.text, | |
l; | |
try { | |
f && (l = ya.parse(f)); | |
} catch (Do) { | |
c({ | |
K: Z.sga | |
}); | |
return; | |
} | |
l ? c({ | |
o: !0, | |
data: l, | |
Cu: a.JN | |
}) : c({ | |
K: Z.fi | |
}); | |
} else c(a); | |
}); | |
}); | |
}, | |
save: function(a, c, b, h) { | |
var g = a.name || a, | |
n = ya.stringify(c); | |
f(g, function(c) { | |
Sc(l, a, n, b, function(a) { | |
Ta(c.releaseLock); | |
a.o ? h && h({ | |
o: !0, | |
Cu: a.JN | |
}) : h && h(a); | |
}); | |
}); | |
}, | |
remove: function(a, c) { | |
f(a.name || a, function(b) { | |
Vc(l, a, function(a) { | |
Ta(b.releaseLock); | |
c && c(a); | |
}); | |
}); | |
} | |
} | |
}); | |
} | |
function f(a, c) { | |
(g[a] || (g[a] = new Bb)).Fka(!0, c); | |
} | |
U(Hj); | |
h("Storage"); | |
var l, g = {}; | |
Lc(function(b) { | |
b.o ? (l = b.pqa, c()) : a(b); | |
}); | |
} | |
function Yc(a) { | |
wa.get(fj).create().then(function(c) { | |
a({ | |
o: !0, | |
gb: new bl(c, wa.get(ci)) | |
}); | |
})["catch"](function(c) { | |
a(c); | |
}); | |
} | |
function Zc(a) { | |
a({ | |
o: !0, | |
gb: new bl(wa.get(Ui), wa.get(ci)) | |
}); | |
} | |
function $c(a) { | |
function c(a, b) { | |
A(a, function(a, f) { | |
wd(f) ? b[a] = f.call(void 0, b[a]) : Bf(f) && (b[a] = b[a] || {}, c(f, b[a])); | |
}); | |
} | |
function b(a, b) { | |
var c = wj.call(arguments, 1); | |
return function(b) { | |
jb(b) && (c[1] = b); | |
U(wd(a)); | |
return a.apply(void 0, c); | |
}; | |
} | |
function f(a) { | |
a = a.toLowerCase(); | |
r.hasOwnProperty(a) && (S[a] = r[a], aa[a] = r[a]); | |
return a; | |
} | |
function l(a, b, c) { | |
a = a.toLowerCase(); | |
if (S.hasOwnProperty(a)) { | |
var f = S[a]; | |
try { | |
f = c ? c(f) : f; | |
} catch (di) { | |
f = void 0; | |
} | |
if (void 0 !== f) return f; | |
U(!1); | |
Eb.error("Invalid configuration value. Name: " + a); | |
} | |
return b; | |
} | |
function h(a, b, c, f) { | |
return l(a, b, function(a) { | |
sb(a) && (a = P(a)); | |
if (Wm(a, c, f)) return a; | |
}); | |
} | |
function g(a, b, c, f) { | |
return l(a, b, function(a) { | |
sb(a) && (a = P(a)); | |
if (bd(a, c, f)) return a; | |
}); | |
} | |
function n(a, b, c, f) { | |
return l(a, b, function(a) { | |
sb(a) && (a = Nc(a)); | |
if (Ga(a, c, f)) return a; | |
}); | |
} | |
function d(a, b, c) { | |
return l(a, b, function(a) { | |
if (c ? c.test(a) : sb(a)) return a; | |
}); | |
} | |
function k(a, b) { | |
return l(a, b, function(a) { | |
if ("true" == a || !0 === a) return !0; | |
if ("false" == a || !1 === a) return !1; | |
}); | |
} | |
function R(a, b) { | |
return l(a, b, function(a) { | |
if (sb(a)) return ya.parse(cl(a)); | |
if (Bf(a)) return a; | |
}); | |
} | |
function q(a, b, c, f) { | |
a = a.split("|"); | |
for (var g = a.length; g--;) | |
if (a[g] = P(a[g]), !bd(a[g], b, c)) return; | |
if (void 0 === f || a.length >= f) return a; | |
} | |
function v(a, b, c, f, g) { | |
return l(a, b, function(a) { | |
return q(a, c, f, g); | |
}); | |
} | |
function t(a, b, c, f, g, h) { | |
return l(a, b, function(a) { | |
a = a.split(";"); | |
for (var b = a.length; b--;) | |
if (a[b] = q(a[b], c, f), void 0 === a[b] || a[b].length != g) return; | |
if (void 0 === h || a.length >= h) return a; | |
}); | |
} | |
function u(a, b) { | |
a = a.toLowerCase(); | |
if (S.hasOwnProperty(a)) { | |
a = S[a]; | |
a = zf(a) ? a : a.split("|"); | |
for (var c = a.length; c--;) | |
if (sb(a[c])) a[c] = ya.parse(cl(a[c])); | |
else return U(!1), Eb.error("Invalid configuration value."), b; | |
return a; | |
} | |
return b; | |
} | |
function z(a, b, c, f) { | |
return l(a, b, function(a) { | |
a = zf(a) ? a : a.split("|"); | |
for (var b = a.length; b--;) | |
if (c ? !c.test(a[b]) : !cd(a[b])) return; | |
if (void 0 === f || a.length >= f) return a; | |
}); | |
} | |
function K(a, b, c) { | |
return l(a, b, function(a) { | |
var f = {}; | |
m(f, b); | |
if (sb(a)) { | |
a = a.split(";"); | |
for (var g = a.length; g--;) { | |
var l = a[g], | |
h = l.indexOf(":"); | |
if (0 >= h) return; | |
var k = l.substring(0, h); | |
if (l = l.substring(h + 1)) { | |
if (c && !c.test(l)) return; | |
f[k] = l; | |
} else delete f[k]; | |
} | |
} else m(f, a); | |
return f; | |
}); | |
} | |
function p(a) { | |
var b = []; | |
A(a, function(a, c) { | |
var f; | |
try { | |
f = "videoapp" === a.toLowerCase() ? "[object object]" : ya.stringify(c); | |
} catch (Bg) { | |
f = "cantparse"; | |
} | |
b.push(a + "=" + f); | |
}); | |
return b.join("\n"); | |
} | |
var J = /^[0-9-+]+$/, | |
E = /^[0-9]+[%]?$/, | |
M = /^[0-9]*$/, | |
V = /^\S+$/, | |
S, r, aa = {}, | |
ha = !0, | |
ia = !0, | |
pa = wa.get(Th), | |
da = wa.get(Zi); | |
(function() { | |
function b(a) { | |
a.split(",").forEach(function(a) { | |
var b = a.indexOf("="); | |
0 < b && (S[a.substring(0, b).toLowerCase()] = a.substring(b + 1)); | |
}); | |
} | |
S = {}; | |
m(S, Ij); | |
a && a.length && nj.call(a, function(a) { | |
sb(a) ? b(a) : Bf(a) && m(S, a, { | |
Cy: !0 | |
}); | |
}); | |
r = m({}, ba(), { | |
Cy: !0 | |
}); | |
var c = Q().cadmiumconfig; | |
c && (Eb.info("Config cookie loaded", c), b(c)); | |
if (Zm || S.istestaccount) m(S, r), aa = r; | |
"clearkey" != d("drmType") || S.keysystemid || (S.keysystemid = (y.WebKitMediaKeys || Me.prototype.webkitGenerateKeyRequest ? "webkit-" : Me.prototype.msSetMediaKeys ? "ms-" : "") + "org.w3.clearkey"); | |
})(); | |
w = {}; | |
var ra = { | |
i1: function(a) { | |
return k(f("enableDDPlus20"), x(a, !0)); | |
}, | |
h1: function(a) { | |
return k(f("enableDDPlus"), x(a, !0)); | |
}, | |
EMa: function(a) { | |
return ha = k(f("enableLSSDH"), x(a, !0)); | |
}, | |
k1: function(a) { | |
return k(f("enableHEVC"), x(a, !1)); | |
}, | |
MF: function(a) { | |
return k(f("overrideEnableHEVC"), x(a, !1)); | |
}, | |
j1: function(a) { | |
return k(f("enableHDR"), x(a, !1)); | |
}, | |
LF: function(a) { | |
return k(f("overrideEnableHDR"), x(a, !1)); | |
}, | |
Yqa: function(a) { | |
return k(f("enableVP9"), x(a, !1)); | |
}, | |
a6: function(a) { | |
return k(f("overrideEnableVP9"), x(a, !1)); | |
}, | |
m1: function(a) { | |
return k(f("enablePRK"), x(a, !1)); | |
}, | |
Sqa: function(a) { | |
return k(f("enableHWDRM"), x(a, !1)); | |
}, | |
DMa: function(a) { | |
return ia = k(f("enableImageSubs"), x(a, !0)); | |
}, | |
un: function(a) { | |
return z("audioProfiles", x(a, dl)); | |
}, | |
wMa: function(a) { | |
return k("disableHD", x(a, !1)); | |
}, | |
BH: b(g, "videoCapabilityDetectorType", Oh.Po), | |
q_: b(g, "audioCapabilityDetectorType", Ph.Po), | |
Jo: function(a) { | |
return z("videoProfiles", x(a, el)); | |
}, | |
GT: b(d, f("videoCodecs")), | |
or: function(a) { | |
return z("timedTextProfiles", x(a, fl)).filter(function(a) { | |
return a === ed.PH ? ha : a === ed.Jr ? ia : !0; | |
}); | |
}, | |
endpoint: b(k, f("endpoint"), !1), | |
tS: b(k, f("setMediaKeysEarly"), !1), | |
cy: b(k, f("ignoreKeyStatusOutputNotAllowed"), !1), | |
BT: b(k, f("useSetServerCertificateApi"), !1), | |
wu: b(d, "serverCertificate", "Cr0CCAMSEOVEukALwQ8307Y2+LVP+0MYh/HPkwUijgIwggEKAoIBAQDm875btoWUbGqQD8eAGuBlGY+Pxo8YF1LQR+Ex0pDONMet8EHslcZRBKNQ/09RZFTP0vrYimyYiBmk9GG+S0wB3CRITgweNE15cD33MQYyS3zpBd4z+sCJam2+jj1ZA4uijE2dxGC+gRBRnw9WoPyw7D8RuhGSJ95OEtzg3Ho+mEsxuE5xg9LM4+Zuro/9msz2bFgJUjQUVHo5j+k4qLWu4ObugFmc9DLIAohL58UR5k0XnvizulOHbMMxdzna9lwTw/4SALadEV/CZXBmswUtBgATDKNqjXwokohncpdsWSauH6vfS6FXwizQoZJ9TdjSGC60rUB2t+aYDm74cIuxAgMBAAE6EHRlc3QubmV0ZmxpeC5jb20SgAOE0y8yWw2Win6M2/bw7+aqVuQPwzS/YG5ySYvwCGQd0Dltr3hpik98WijUODUr6PxMn1ZYXOLo3eED6xYGM7Riza8XskRdCfF8xjj7L7/THPbixyn4mULsttSmWFhexzXnSeKqQHuoKmerqu0nu39iW3pcxDV/K7E6aaSr5ID0SCi7KRcL9BCUCz1g9c43sNj46BhMCWJSm0mx1XFDcoKZWhpj5FAgU4Q4e6f+S8eX39nf6D6SJRb4ap7Znzn7preIvmS93xWjm75I6UBVQGo6pn4qWNCgLYlGGCQCUm5tg566j+/g5jvYZkTJvbiZFwtjMW5njbSRwB3W4CrKoyxw4qsJNSaZRTKAvSjTKdqVDXV/U5HK7SaBA6iJ981/aforXbd2vZlRXO/2S+Maa2mHULzsD+S5l4/YGpSt7PnkCe25F+nAovtl/ogZgjMeEdFyd/9YMYjOS4krYmwp3yJ7m9ZzYCQ6I8RQN4x/yLlHG5RH/+WNLNUs6JAZ0fFdCmw="), | |
pN: b(g, f("dummyEmeCount"), 0), | |
Lqa: b(k, f("dummyEmePerformLicense"), !0), | |
ppa: b(k, f("createDummySessionOnInit"), !1), | |
LFa: b(k, f("useDummySessionManagerForPrepare"), !1), | |
S0: b(k, f("doNotPerformLdlOnPlaybackCreate"), !1), | |
T0: b(k, f("doNotPerformLdlOnPlaybackStart"), !1), | |
cna: b(k, f("checkHdcpLevelBeforeCreatingManifestRequest"), !1), | |
NFa: b(k, f("useHdcpLevelOnCast"), !1), | |
y6: b(g, f("preCacheMediaKeys"), 0), | |
Uh: b(k, f("prepareCadmium"), !1), | |
Wza: b(k, f("playerPredictionModelV2"), !1), | |
vEa: b(k, f("supportsLimitedDurationLicense"), !1), | |
uN: b(k, f("enableLdlPrefetch"), !1), | |
RD: b(k, f("enableGetHeadersAndMediaPrefetch"), !1), | |
kx: b(k, f("deleteCacheOnPlayback"), !0), | |
mx: b(k, f("deleteOtherManifestCacheOnCreate"), !1), | |
lx: b(k, f("deleteOtherLdlCacheOnCreate"), !1), | |
Kza: b(g, f("periodicPrepareLogsIntervalMilliseconds"), 6E5), | |
mAa: b(g, f("prepareManifestCacheMaxCount"), 50), | |
kAa: b(g, f("prepareLdlCacheMaxCount"), 30), | |
nAa: b(g, f("prepareManifestExpiryMilliseconds"), 12E5), | |
lAa: b(g, f("prepareLdlExpiryMilliseconds"), 78E4), | |
fG: b(d, "prepItemsStorePrefix", "prepitems"), | |
jAa: b(d, f("prepareInsertStrategyPersistentTasks"), "ignore", /^(prepend|append|ignore)$/), | |
OQa: b(k, "waitForSecureStopToTeardownMediaElement", !0), | |
Wu: b(R, "videoApp"), | |
ELa: b(g, f("cacheApiGetRangeTimeoutMilliseconds"), 1), | |
AMa: b(R, "downloaderForOfflineMock"), | |
iva: b(g, f("imageSubsResolution"), 0), | |
hva: b(g, f("imageSubsMaxBuffer"), gl, 0), | |
TL: b(k, f("captureBatteryStatus"), !1), | |
xsa: b(g, f("getBatteryApiTimeoutMilliseconds"), 5E3), | |
Ld: function() { | |
return d(f("keySystemId"), hl, void 0); | |
}, | |
Pma: b(d, f("canHDCP"), $m || "constrict", /^(constrict|ifpresent|never)$/), | |
Ixa: b(g, f("hdcpGlobalTimeout1"), 1E4), | |
Jxa: b(g, f("hdcpGlobalTimeout2"), 1E4), | |
Lxa: b(g, f("hdcpQueryTimeout1"), 1E3), | |
Mxa: b(g, f("hdcpQueryTimeout2"), 1E3), | |
Kxa: b(g, f("hdcpQueryTimeout2"), 100), | |
Nxa: b(k, f("microsoftHwdrmRequiresHevc"), !1), | |
Hxa: b(k, f("microsoftEnableDeviceInfo"), !1), | |
Rwa: b(k, "logMediaPipelineStatus", !1), | |
pG: b(k, f("renderDomDiagnostics"), !0), | |
eOa: function() { | |
return -1; | |
}, | |
vP: b(h, f("logDisplayMaxEntryCount"), il, -1), | |
Xwa: b(h, f("logToConsoleLevel"), -1), | |
fma: b(h, f("bladerunnerCmdHistorySize"), 10), | |
Hh: function() { | |
return da.Hh; | |
}, | |
GFa: b(k, "upgradeNetflixId", !0), | |
xOa: b(d, "netflixIdEsnPrefix"), | |
wP: b(k, "logErrorIfEsnNotProvided", !0), | |
xN: b(k, "enforceSinglePlayback", jl), | |
UD: b(k, "enforceSingleSession", kl), | |
hM: b(k, "closeOtherPlaybacks", !0), | |
qb: b(k, f("useASE"), !0), | |
Mla: b(g, "asyncLoadTimeout", 15E3, 1), | |
gxa: b(g, "mainThreadMonitorPollRate", 0), | |
Bxa: b(g, "mediaBufferCompactionThrottleTimeMs", 500), | |
NOa: b(k, "nrdpAlwaysShowUIOverlay", !1), | |
MOa: b(k, "nrdpAllowSSONetflixIdAssociation", !1), | |
POa: b(k, "nrdpValidateSSOTokens", !0), | |
OOa: b(d, "nrdpConfigServiceApiHostname", "api-global.netflix.com"), | |
cQa: b(k, "showNrdpDebugBadging", !1), | |
wna: b(d, "congestionServiceApiEndpoint", "https://api-global.netflix.com/cbp/html5player/congestion"), | |
xx: b(k, "enableCongestionService", !1), | |
Xl: function() { | |
return da.Xl; | |
}, | |
Il: function() { | |
return da.Il; | |
}, | |
zH: b(g, f("verbosePlaybackInfoDenominator"), 0), | |
lla: b(k, f("allowPleaseCallMessage"), !1), | |
qG: b(k, "renderTimedText", ll), | |
aAa: b(k, "preBufferTimedText", !0), | |
pra: b(k, "fatalOnTimedTextLoadError", !0), | |
T8: b(K, "timedTextStyleDefaults", {}), | |
U8: b(K, "timedTextStyleOverrides", {}), | |
fT: b(K, "timedTextFontFamilyMapping", ml || { | |
"default": "font-family:Arial,Helvetica;font-weight:bolder" | |
}), | |
WEa: b(g, f("timedTextTimeOverride"), 0), | |
jH: b(g, "timedTextSimpleFallbackThreshold", nl), | |
LM: b(d, f("customDfxpUrl")), | |
Wqa: b(k, f("enableSubtitleTrackerLogging"), !1), | |
Yma: b(z, "cdnIdWhiteList", []), | |
Xma: b(z, "cdnIdBlackList", []), | |
Ola: b(k, f("asynchronousCDNSelection"), !0), | |
ON: b(d, f("forceAudioTrack")), | |
fya: b(k, "muteVolumeOnPlaybackClose", !0), | |
QOa: b(d, "nrdpVolumeControlType", "VOLUME_STREAM"), | |
hE: b(d, f("forceTimedTextTrack")), | |
j5: b(g, f("maxRetriesTimedTextDownload"), 0), | |
S8: b(g, f("timedTextRetryInterval"), 8E3), | |
IS: b(g, "storageMinimumSize", ol, 0), | |
ZG: b(d, "storageType", pl, /^(none|fs|idb|ls)$/), | |
Owa: b(g, "lockExpiration", 1E4), | |
Pwa: b(g, "lockRefresh", 3E3), | |
Sma: b(k, "captureUnhandledExceptions", !0), | |
gva: b(k, "ignoreUnhandledExceptionDuringPlayback", !1), | |
rAa: b(k, "preserveLastFrame", !1), | |
Sxa: b(g, "minBufferingTimeInMilliseconds", 4E3), | |
LP: b(g, "maxBufferingTimeInMilliseconds", 0), | |
wAa: b(g, "progressBackwardsGraceTimeMilliseconds", 4E3), | |
xAa: b(g, "progressBackwardsMinPercent", 10), | |
ima: b(d, f("bookmarkIgnoreBeginning"), "0", E), | |
jma: b(d, f("bookmarkIgnoreEnd"), "5%", E), | |
kma: b(k, "bookmarkIgnoreEndForOverride", !1), | |
k0: b(d, "connectionStrategy", "parallel", /^(parallel|single)$/), | |
C_: b(d, f("bandwidthMeterType"), "sliding_window", /^(historical|sliding_window)$/), | |
qva: b(g, "initParallelConnections", 3), | |
sj: b(g, "maxParallelConnections", 3), | |
QR: b(k, "reportThroughputInLogblobs", !0), | |
yza: b(d, "parallelDownloadManagerType", "chunk", /^(subchunk|chunk)$/), | |
zza: b(g, "parallelDownloaderUpdateFrequencyMs", 500), | |
Aza: b(g, "parallelDownloaderUpdateThrottleFrequencyMs", 200), | |
mxa: b(g, "maxChunksInProgressForSubchunking", 3), | |
iEa: b(g, "subchunkLength", fi(2, 17)), | |
f6: b(n, "parallelSafeBufferThreshhold", 40 / 240), | |
Aka: b(n, "abortDownloadBufferThreshhold", 40 / 240), | |
GS: b(g, "slidingWindowWidthMilliseconds", 3E4), | |
i6: b(k, "pingOnConnectTimeout", !1), | |
Pza: b(g, "pingCDNTimeoutMilliseconds", 8E3), | |
rj: b(g, "maxBufferSizeMilliseconds", Jj, 1E4, 145152E5), | |
Oh: b(g, "maxBufferSizeBytes", ql), | |
y_: b(g, "backBufferSizeMilliseconds", 1E4, 0, 145152E5), | |
ama: b(g, "backToFrontBufferRatioPercent", 25, 0, 1E3), | |
Pw: b(g, "audioChunkSizeMilliseconds", 16E3), | |
FT: b(g, "videoChunkSizeMilliseconds", 4004), | |
fQ: b(g, "minAudioMediaRequestSizeBytes", 0), | |
mQ: b(g, "minVideoMediaRequestSizeBytes", 0), | |
Dqa: b(k, "droppedFrameRateFilterEnabled", !1), | |
Eqa: b(g, "droppedFrameRateFilterMaxObservation", 60, 10, 1E3), | |
Gqa: b(t, "droppedFrameRateFilterPolicy", [ | |
[3, 15], | |
[6, 9], | |
[9, 2], | |
[15, 1] | |
], void 0, void 0, 2, 0), | |
Hqa: b(k, "droppedFrameRateFilterWithoutRebufferEnabled", !0), | |
PD: b(g, "droppedFrameRateFilterBasedOnPreviousSession"), | |
a1: b(v, "droppedFrameRateFilterBasedOnPreviousSessionPolicy"), | |
Fqa: b(g, "droppedFrameRateFilterMinHeight", 384), | |
Kqa: b(g, "droppedFramesStorageSessionLimit", 0), | |
Jqa: b(g, "droppedFramesStorageInterval", 6E4), | |
Iqa: b(v, "droppedFramesPercentilesList", []), | |
lva: b(k, "incorrectChunkCountEnabled", !0), | |
E0: b(g, f("defaultVolume"), 100, 0, 100), | |
N0: b(k, "disableVideoRightClickMenu", !0), | |
yk: b(g, "minDecoderBufferMilliseconds", 1E3, 0, 145152E5), | |
HF: b(g, "optimalDecoderBufferMilliseconds", 5E3, 0, 145152E5), | |
NP: b(g, "maxDecoderBufferMilliseconds", rl, 0, 145152E5), | |
C0: b(g, "decoderTimeoutMilliseconds", 1E4, 1), | |
O0: b(k, "disgardMediaOnAppend", !1), | |
sla: b(k, "appendMediaBeforeInit", !1), | |
Iza: b(g, "pauseTimeoutLimitMilliseconds", 18E5), | |
RO: b(g, "inactivityMonitorInterval", 3E4, 0), | |
Eka: b(v, "abrdelLogPointsSeconds", [15, 30, 60, 120], 0, void 0, 4), | |
Aua: b(d, f("heuristicsAlgorithm"), ""), | |
Hra: b(t, f("fixedVideoBitrates"), [], void 0, void 0, 2, 0), | |
MFa: b(k, f("useFilteredInitialBitratesOnly"), !1), | |
K3: b(z, f("initialVideoBitrates"), ["0+", "400+", "900+"], J, 1), | |
xva: b(z, f("initialVideoBitratesForCarreraFallback"), ["0+", "400+", "900+"], J, 1), | |
uva: b(z, f("initialAudioBitrates"), ["0+", "90+", "150+"], J, 1), | |
Qla: b(g, "audioBandwidthDenominator", 15, 1), | |
c8: b(g, "simulationLimitMilliseconds", 12E5, 1E4), | |
Bua: b(g, "highStreamSimulationMilliseconds", 12E4, 1), | |
dAa: b(t, "prebufferBitrate", [ | |
[500, 235], | |
[1E3, 560], | |
[5E3, 1050], | |
[1E4, 1050], | |
[3E4, 3E3] | |
], void 0, void 0, 2, 1), | |
E8: b(t, "switchUpToBitrate", [ | |
[235, 560], | |
[375, 750], | |
[560, 1050], | |
[750, 1400], | |
[1050, 1750], | |
[1750, 3E3], | |
[2350, 1E5] | |
], void 0, void 0, 2, 1), | |
ZF: b(g, "prebufferMinAudioMilliseconds", 6E3), | |
$F: b(g, "prebufferMinVideoMilliseconds", 6E3), | |
eAa: b(g, "prebufferMaxMilliseconds", 3E4), | |
UAa: b(g, "rebufferMaxMilliseconds", 232E3), | |
Xqa: b(k, "enableTrickPlay", !1), | |
NC: b(v, "additionalDownloadSimulationParams", [2E3, 2E3, 100], 0, void 0, 3), | |
mFa: b(g, "trickPlayHighResolutionBitrateThreshold", 1E3), | |
nFa: b(g, "trickPlayHighResolutionThresholdMilliseconds", 1E4), | |
oFa: b(n, "trickplayBufferFactor", .5), | |
f9: b(g, "trickPlayDownloadRetryCount", 1), | |
z6: b(v, "prebufferSimulationParams", [2E3, 2E3, 60], 0, void 0, 3), | |
J_: b(t, "bufferingSimulationParams", [ | |
[6E4, 1E3, 1E3, 100], | |
[12E4, 1E3, 1E3, 20], | |
[18E4, 0, 0, 0] | |
], void 0, void 0, 4, 1), | |
HL: b(t, "bufferingSwitchUpSimulationParams", [ | |
[6E4, 3E3, 3E3, 140], | |
[12E4, 3E3, 3E3, 60], | |
[18E4, 0, 0, 0] | |
], void 0, void 0, 4, 1), | |
U0: b(g, "doNotSwitchDownIfBufferIsAboveMilliseconds", 18E4), | |
l1: b(k, "enableHistorical", !1), | |
IO: b(g, "histAggregationTimeSpanInSeconds", 300), | |
Dua: b(g, "histCompareBitsIPv4", 24), | |
Eua: b(g, "histCompareBitsIPv6", 32), | |
k3: b(d, "histFilterType", "none", /^(none|timeofDay|dayOfWeekAndTimeOfDay)$/), | |
n3: b(g, "histSizeLimit", 1E3), | |
m3: b(g, "histMinSampleSize", 1), | |
l3: b(g, "histMaxSampleSize", 1E3), | |
o3: b(g, "histTimeOfDayRangeInSeconds", 3600), | |
Tma: b(K, "carreraParameters", { | |
1750: 7, | |
1050: 5, | |
750: 4.5, | |
560: 4.5, | |
375: 4.5 | |
}), | |
T_: b(h, "carreraMediaSecondsToDownload", 8E3), | |
R_: b(h, "carreraChunksToAverage", 10), | |
LLa: b(n, "carreraConfidenceThreshold", .7), | |
S_: b(h, "carreraHistoricalPercentileToUse", 50), | |
TO: b(d, "initialBitrateSelectionAlgorithm", "default", /^(default|carrera)$/), | |
EG: b(d, "secondThroughputEstimator", "none"), | |
qz: b(h, "secondThroughputMeasureWindowInMs", Infinity), | |
gOa: b(k, "logSecondEWMA", !1), | |
tQa: b(g, "throughputMeasureWindowForSecondEWMAInMS", 6E4), | |
Hq: b(d, "marginPredictor", "simple", /^(simple|scale|iqr)$/), | |
ff: b(R, "IQRBandwidthFactorConfig", { | |
iur: !0, | |
minr: 8E3, | |
maxr: 2E4, | |
rlaf: 60, | |
flb: .1, | |
fup: .95, | |
fmind: .2, | |
fmaxd: 1, | |
fmintp: .25, | |
fmindp: .75 | |
}), | |
KI: b(R, "HistoricalTDigestConfig", { | |
maxc: 25, | |
rc: "ewma", | |
c: .5, | |
hl: 7200 | |
}), | |
Qr: b(R, "TputTDigestConfig", { | |
maxc: 25, | |
c: .5, | |
b: 5E3, | |
w: 15E3 | |
}), | |
lF: b(h, "maxIQRSamples", Infinity), | |
Jy: b(h, "minIQRSamples", 5), | |
AT: b(k, "useResourceTimingAPI", !1), | |
ira: b(k, "excludeAudioThroughputMeasurements", !1), | |
zN: b(d, "eventToReportThroughputMeasurementDuringWarmUp", "onprogress"), | |
BN: b(k, "excludeHeaderMeasurementDuringWarmUp", !1), | |
NT: b(h, "warmupThroughputMeasurementTime", -Infinity), | |
MT: b(h, "warmupThroughputMeasurementConfidence", 0), | |
Es: { | |
UP: b(g, "maxReservoirSizeMilliseconds", 12E4), | |
lQ: b(g, "minReservoirSizeMilliseconds", 8E3), | |
i5: b(g, "maxOutageProtectionMilliseconds", 6E4), | |
MP: b(g, "maxCushionSizeInBufferPercentage", 90), | |
WR: b(g, "reservoirLookAheadChunks", 60), | |
p8: b(g, "startupPhaseInChunks", 30), | |
rj: b(g, "maxBufferSizeMilliseconds", Jj - 12012, 1E4, 145152E5), | |
q8: b(k, "startupQualityOptimization", !0), | |
c1: b(k, "dynamicReservoir", !0), | |
h4: b(k, "isUsingStrictMaxChunkSize", !0), | |
c9: b(k, "transitFromInitialPhase", !0), | |
r8: b(k, "startupSafeRateCalculationEnabled", !0), | |
s8: b(k, "startupThresholdFunctionOfBufferEnabled", !0), | |
n8: b(k, "startupLookAheadCalculationEnabled", !1), | |
o8: b(g, "startupLookAheadChunks", 120), | |
c4: b(k, "isReservoirManualSet", !1), | |
W4: b(g, "manualReservoirMilliseconds", 9E4), | |
YO: b(k, "isCushionManualSet", !1), | |
HP: b(g, "manualCushionMilliseconds", 126E3), | |
T3: b(k, "isLookingAhead", !1), | |
f4: b(k, "isUsingRateMap", !1) | |
}, | |
dh: b(v, "failedDownloadRetryWaits", [10, 200, 500, 1E3, 2E3, 4E3, 8E3, 16E3]), | |
cE: b(v, "failedDownloadRetryWaitsASE", [10, 200, 500, 1E3, 2E3, 4E3]), | |
KFa: b(k, "useCDNExponentialBackoff", !0), | |
DCa: b(g, "selectCdnDownloadRetryCountBeforeCdnSwitch", 2), | |
FCa: b(g, "selectCdnTimeoutMilliseconds", 1E3), | |
ECa: b(g, "selectCdnSignificantLatency", 300), | |
GG: b(g, "selectCdnBandwidthThresholdKbps", 2E3), | |
GCa: b(d, "selectCdnType", "bandwidth", /^(latency|bandwidth)$/), | |
XC: b(g, "bandwidthTestBytesPerCdn", 204800), | |
PFa: b(k, "useVariableConnectTimeout", !1), | |
Txa: b(g, "minConnectTimeoutMilliseconds", 4E3), | |
Qs: b(g, "connectTimeoutMilliseconds", 8E3, 500), | |
yna: b(g, "connectTimeoutBufferDiscount", 2), | |
zna: b(g, "connectTimeoutoutUpperLimitMultiplier", 1E4), | |
EQ: b(g, "noProgressTimeoutMilliseconds", 8E3, 500), | |
OFa: b(k, "useOnLineApi", !1), | |
wua: b(g, "headerDownloadRetryCountBeforeCdnSwitch", 1), | |
eT: b(g, "timedTextDownloadRetryCountBeforeCdnSwitch", 3), | |
D5: b(g, "netflixRequestExpiryTimeout", !1), | |
ul: b(k, "abortInProgressDownload", !0), | |
Bka: b(k, "abortInProgressAtRebuffer", !1), | |
Cka: b(k, "abortPreemptively", !1), | |
UO: b(g, "initialHeaderDownloadTimeout", 2E3), | |
xua: b(g, "headerDownloadTimeout", 3E3), | |
kGa: b(k, "webkitDecodedFrameCountIncorrectlyReported", !1), | |
wCa: b(g, "seekBackOnAudioTrackChangeMilliseconds", 8E3), | |
z8: b(z, f("supportedAudioTrackTypes"), [], void 0, 1), | |
lQa: b(z, f("supportedAudioBitrates"), [], J), | |
mQa: b(z, f("supportedVideoBitrates"), [], J), | |
I3: b(g, "initialLogFlushTimeout", 5E3), | |
Bk: b(d, "playdataPersistKey", "unsentplaydata"), | |
fr: b(k, "sendPersistedPlaydata", !0), | |
Wq: b(g, "playdataPersistIntervalMilliseconds", 4E3), | |
kR: b(k, "playdataPrepareRequest", sl), | |
q6: b(g, "playdataSendDelayMilliseconds", 1E4), | |
zj: b(k, "usePlaydataServices", !1), | |
JE: b(g, "heartbeatCooldown", 1E4, 1E3), | |
Vwa: b(z, "logPerformanceTiming", "navigationStart redirectStart fetchStart secureConnectionStart requestStart domLoading".split(" ")), | |
Pxa: b(k, "midplayEnabled", !0), | |
q5: b(g, "midplayIntervalMilliseconds", 3E5), | |
Qxa: b(v, "midplayKeyPoints", [15E3, 3E4, 6E4, 12E4]), | |
R0: b(g, f("dlprestartCount"), 0), | |
jN: b(g, "downloadReportDenominator", 0), | |
xqa: b(g, "downloadReportInterval", 3E5), | |
LD: b(z, "downloadReportTcpInfo", []), | |
zMa: b(g, "downloadReportTraceInterval", 1E3), | |
D_: b(K, f("bookmarkByMovieId"), {}), | |
Nt: b(k, f("limitedDurationLicense"), !1), | |
Mt: b(g, f("licenseRenewalRequestDelay"), 0), | |
eR: b(g, f("persistedReleaseDelay"), 1E4), | |
$Na: b(k, f("limitedDurationFlagOverride"), void 0), | |
he: b(k, f("secureStopEnabled"), !1), | |
tCa: b(k, f("secureStopFromPersistedKeySession"), !1), | |
eS: b(g, "secureStopKeyMessageTimeoutMilliseconds", 2E3, 1), | |
FG: b(g, "secureStopKeyAddedTimeoutMilliseconds", 1E3, 1), | |
G7: b(g, f("secureStopPersistedKeyMessageTimeoutMilliseconds"), 2500, 1), | |
H7: b(g, f("secureStopPersistedKeySessionRetries"), 17, 1), | |
F7: b(g, "secureStopPersistedKeyAddedTimeoutUnmatchedSession", 1E3, 1), | |
sCa: b(k, f("secureStopDisplayLogWindowOnError"), !1), | |
uCa: b(k, f("secureStopIgnoreVideoError"), !1), | |
Uu: b(k, f("useCdmId"), !1), | |
sva: b(z, "initSegmentBoxTypeList", ["ftyp", "moov"]), | |
eva: b(z, "ignorePsshList", an || []), | |
w7: b(g, "safariPlayPauseWorkaroundDelay", 100), | |
E9: b(k, "workaroundForMediaSourceDuration", !1), | |
F9: b(g, "workaroundValueForSeekIssue", 0), | |
qGa: b(k, "workaroundSaio", !0), | |
rGa: b(k, "workaroundTenc", !0), | |
DH: b(k, f("workaroundAudioKeyFrame"), tl), | |
QL: b(k, f("callEndOfStream"), ul), | |
Jza: b(k, "performRewindCheck", !0), | |
rra: b(k, "fatalOnUnexpectedSeeking", !0), | |
qra: b(k, "fatalOnUnexpectedSeeked", !0), | |
fM: b(k, f("clipLongVideo"), vl), | |
vDa: b(k, f("setVideoElementSize"), bn), | |
dM: b(k, f("clearVideoSrc"), wl), | |
G0: b(g, f("delayPlayPause"), 0), | |
$la: b(k, f("avoidSBRemove"), !1), | |
Aj: b(k, f("useTypescriptEme"), !1), | |
ux: b(d, f("drmPersistKey"), "unsentDrmData"), | |
fz: b(k, f("promiseBasedEme"), !1), | |
Rma: b(k, "captureKeyStatusData", !1), | |
Hya: b(k, f("nudgeSourceBuffer"), !1), | |
I7: b(h, f("seekDelta"), 1), | |
fAa: b(k, f("preciseSeeking"), !1), | |
ED: b(K, f("delayErrorHandling")), | |
l_: b(k, f("appendInitSegmentAfterLicense"), !1), | |
oH: b(k, "trackingLogEnabled", xl), | |
mT: b(d, "trackingLogUrl", "https://customerevents.netflix.com/track/debug", V), | |
iFa: b(v, "trackingLogStallKeyPoints", [1E4, 3E4, 6E4, 12E4]), | |
yQa: b(k, "trackingLogRegPairRequests", !1), | |
Cg: b(d, "esn", ""), | |
G1: b(d, "fesn", ""), | |
tN: b(k, f("enableEmeVerboseLogging"), !1), | |
Tqa: b(k, "enableLastChunkLogging", !1), | |
Yj: b(d, "appId", "", M), | |
sessionId: b(d, "sessionId", "", M), | |
W_: b(d, "cdnProxyUrl"), | |
Vz: b(k, "usePlayReadyHeaderObject", !1), | |
Gh: { | |
A5: b(d, "mslEndpoint", pa.endpoint + "/msl/", V), | |
d1: b(d, f("edgePath"), "/cbp/cadmium-14"), | |
uPa: b(d, "proxyPath", ""), | |
sFa: b(d, "uiVersion"), | |
NLa: function() { | |
return "0"; | |
}, | |
dz: b(z, "preferredLanguages", lj, /^[a-zA-Z-]{2,5}$/, 1), | |
JPa: b(k, "retryOnNetworkFailures", !0), | |
Nra: b(d, f("forceDebugLogLevel"), void 0, /^(ERROR|WARN|INFO|TRACE)$/), | |
iLa: b(k, "alwaysIncludeIdsInPlaydata", !0), | |
y8: b(k, "supportPreviewContent", !1), | |
sEa: b(k, "supportPreviewContentPin", !0), | |
tEa: b(k, "supportWatermarking", !0), | |
fS: b(k, "secureUrls", yl), | |
Mra: b(k, "forceClearStreams", !1), | |
DT: b(k, "validatePinProtection", zl), | |
FDa: b(k, "showAllSubDubTracks", !1), | |
KOa: b(d, f("nrdjsPath"), "nrdjs/2.4.9/"), | |
LOa: b(g, f("nrdjsVersion"), 2) | |
}, | |
iz: { | |
enabled: b(k, "qcEnabled", !1), | |
lm: b(d, "qcPackageId", "") | |
}, | |
$Fa: { | |
mOa: b(g, f("managerIntervalMilliseconds"), 18E5), | |
oQa: b(g, f("managerIntervalMilliseconds"), 864E5), | |
YNa: b(g, f("licensePolicyIntervalMilliseconds"), 3E4), | |
PDa: b(g, f("startPlayWindowDelayMilliseconds"), 3E4) | |
}, | |
Qw: b(d, "authenticationType", Al), | |
v_: b(K, "authenticationKeyNames", m({ | |
e: "DKE", | |
h: "DKH", | |
w: "DKW", | |
s: "DKS" | |
}, cn)), | |
AEa: b(d, "systemKeyWrapFormat", dn), | |
kva: b(k, "includeNetflixIdUserAuthData", !0), | |
bya: b(k, "mslDeleteStore", !1), | |
cya: b(k, "mslPersistStore", !0), | |
Jna: b(k, "correctNetworkForShortTitles", !0), | |
$za: b(k, "postplayHighInitBitrate", !1), | |
Jra: b(k, "flushHeaderCacheOnAudioTrackChange", !0), | |
A0: b(g, f("debugAseDenominator"), 100), | |
mL: b(g, "aseAudioBufferSizeBytes", Bl), | |
nL: b(g, "aseVideoBufferSizeBytes", Cl), | |
Az: b(v, "streamingFailureRetryWaits", [4E3, 8E3]), | |
gm: b(g, "minInitVideoBitrate", 560), | |
Vt: b(g, "minHCInitVideoBitrate", 560), | |
ko: b(g, "maxInitVideoBitrate", Infinity), | |
iQ: b(g, "minInitAudioBitrate", 0), | |
hQ: b(g, "minHCInitAudioBitrate", 0), | |
mF: b(g, "maxInitAudioBitrate", 65535), | |
Kq: b(g, "minAcceptableVideoBitrate", 235), | |
Ky: b(g, "minRequiredBuffer", 3E4), | |
fg: b(g, "minPrebufSize", 7800), | |
HR: b(n, "rebufferingFactor", 1), | |
jo: b(g, "maxBufferingTime", 2600), | |
zT: b(k, "useMaxPrebufSize", !0), | |
St: b(g, "maxPrebufSize", 45E3), | |
SP: b(g, "maxRebufSize", Infinity), | |
ao: b(u, "initialBitrateSelectionCurve", null), | |
G3: b(g, "initSelectionLowerBound", 560), | |
H3: b(g, "initSelectionUpperBound", 1050), | |
Eo: b(g, "throughputPercentForAudio", 15), | |
wL: b(g, "bandwidthMargin", 10), | |
xL: b(k, "bandwidthMarginContinuous", !1), | |
yL: b(u, "bandwidthMarginCurve", [{ | |
m: 70, | |
b: 8E3 | |
}, { | |
m: 70, | |
b: 3E4 | |
}, { | |
m: 50, | |
b: 6E4 | |
}, { | |
m: 47, | |
b: 9E4 | |
}, { | |
m: 40, | |
b: 12E4 | |
}, { | |
m: 20, | |
b: 18E4 | |
}, { | |
m: 5, | |
b: 24E4 | |
}]), | |
oM: b(g, "conservBandwidthMargin", 20), | |
SS: b(k, "switchConfigBasedOnInSessionTput", !1), | |
dx: b(g, "conservBandwidthMarginTputThreshold", 0), | |
pM: b(u, "conservBandwidthMarginCurve", [{ | |
m: 80, | |
b: 8E3 | |
}, { | |
m: 80, | |
b: 3E4 | |
}, { | |
m: 70, | |
b: 6E4 | |
}, { | |
m: 60, | |
b: 9E4 | |
}, { | |
m: 50, | |
b: 12E4 | |
}, { | |
m: 30, | |
b: 18E4 | |
}, { | |
m: 10, | |
b: 24E4 | |
}]), | |
eH: b(k, "switchAlgoBasedOnHistIQR", !1), | |
RS: b(k, "switchConfigBasedOnHistIQR", !1), | |
RA: b(n, "IQRThreshold", .5), | |
JO: b(d, "histIQRCalcToUse", "simple"), | |
WC: b(n, "bandwidthMarginScaledRatioUpperBound", 2), | |
em: b(g, "maxTotalBufferLevelPerSession", 0), | |
i3: b(g, "highWatermarkLevel", 3E4), | |
iT: b(g, "toStableThreshold", 3E4), | |
jT: b(g, "toUnstableThreshold", 15E3), | |
DS: b(k, "skipBitrateInUpswitch", !0), | |
PT: b(g, "watermarkLevelForSkipStart", 8E3), | |
GO: b(g, "highStreamRetentionWindow", 9E4), | |
HO: b(g, "highStreamTransitionWindow", 3E5), | |
Qt: b(g, "lowestBufForUpswitch", 15E3), | |
uP: b(g, "lockPeriodAfterDownswitch", 15E3), | |
EP: b(g, "lowWatermarkLevel", 25E3), | |
nF: b(g, "maxSimuLength", 6E5), | |
Gq: b(g, "lowestWaterMarkLevel", 2E4), | |
FP: b(k, "lowestWaterMarkLevelBufferRelaxed", !1), | |
pF: b(n, "mediaRate", 1), | |
XP: b(g, "maxTrailingBufferLen", 1E4), | |
qL: b(g, "audioBufferTargetAvailableSize", 262144), | |
ET: b(g, "videoBufferTargetAvailableSize", 1048576), | |
l5: b(g, "maxVideoTrailingBufferSize", 8388608), | |
a5: b(g, "maxAudioTrailingBufferSize", 393216), | |
Bx: b(n, "fastUpswitchFactor", 3), | |
Dy: b(g, "maxMediaBufferAllowed", 24E4), | |
AS: b(k, "simulatePartialBlocks", !0), | |
b8: b(k, "simulateBufferFull", !0), | |
oD: b(k, "considerConnectTime", !1), | |
nM: b(n, "connectTimeMultiplier", 1), | |
R4: b(g, "lowGradeModeEnterThreshold", 12E4), | |
S4: b(g, "lowGradeModeExitThreshold", 9E4), | |
c5: b(g, "maxDomainFailureWaitDuration", 3E4), | |
Y4: b(g, "maxAttemptsOnFailure", 18), | |
y1: b(k, "exhaustAllLocationsForFailure", !0), | |
g5: b(g, "maxNetworkErrorsDuringBuffering", 20), | |
KP: b(g, "maxBufferingTimeAllowedWithNetworkError", 6E4), | |
dE: b(g, "fastDomainSelectionBwThreshold", 2E3), | |
bT: b(g, "throughputProbingEnterThreshold", 4E4), | |
N8: b(g, "throughputProbingExitThreshold", 34E3), | |
I4: b(g, "locationProbingTimeout", 1E4), | |
J1: b(g, "finalLocationSelectionBwThreshold", 1E4), | |
L8: b(n, "throughputHighConfidenceLevel", .75), | |
M8: b(n, "throughputLowConfidenceLevel", .4), | |
sP: b(g, "locationStatisticsUpdateInterval", 6E4), | |
vM: b(k, "countGapInBuffer", !1), | |
Kw: b(k, "allowReissueMediaRequestAfterAbort", !0), | |
nR: b(k, "preciseBufferCalculation", !0), | |
fL: b(k, "allowCallToStreamSelector", !0), | |
CL: b(g, "bufferThresholdForAbort", 1E4), | |
fR: b(g, "pipelineScheduleTimeoutMs", 2), | |
Iq: b(g, "maxPartialBuffersAtBufferingStart", 2), | |
kQ: b(g, "minPendingBufferLen", 6E3), | |
QP: b(g, "maxPendingBufferLen", 12E3), | |
VP: b(g, "maxStreamingSkew", 4E3), | |
RP: b(g, "maxPendingBufferPercentage", 10), | |
TP: b(g, "maxRequestsInBuffer", 60), | |
IE: b(g, "headerRequestSize", 4096), | |
gQ: b(g, "minBufferLenForHeaderDownloading", 1E4), | |
mu: b(g, "reserveForSkipbackBufferMs", 1E4), | |
MQ: b(g, "numExtraFragmentsAllowed", 2), | |
ro: b(k, "pipelineEnabled", !1), | |
e8: b(g, "socketReceiveBufferSize", 0), | |
sL: b(g, "audioSocketReceiveBufferSize", 32768), | |
IT: b(g, "videoSocketReceiveBufferSize", 65536), | |
EO: b(g, "headersSocketReceiveBufferSize", 32768), | |
xT: b(g, "updatePtsIntervalMs", Pa(4004, 16E3) / 2), | |
EL: b(g, "bufferTraceDenominator", 100), | |
Fs: b(g, "bufferLevelNotifyIntervalMs", Pa(4004, 16E3) / 2), | |
g1: b(k, "enableAbortTesting", !1), | |
PZ: b(g, "abortRequestFrequency", 8), | |
MS: b(g, "streamingStatusIntervalMs", 2E3), | |
eu: b(g, "prebufferTimeLimit", 24E4), | |
sF: b(g, "minBufferLevelForTrackSwitch", 2E3), | |
aR: b(g, "penaltyFactorForLongConnectTime", 2), | |
AP: b(g, "longConnectTimeThreshold", 200), | |
dL: b(g, "additionalBufferingLongConnectTime", 2E3), | |
eL: b(g, "additionalBufferingPerFailure", 8E3), | |
mz: b(g, "rebufferCheckDuration", 6E4), | |
Kn: b(k, "enableLookaheadHints", !1), | |
BP: b(g, "lookaheadFragments", 2), | |
m9: b(k, "updateDrmRequestOnNetworkFailure", !1), | |
DD: b(k, "deferAseScheduling", !1), | |
kF: b(g, "maxDiffAudioVideoEndPtsMs", Sa(4004, 16E3)), | |
Vu: b(k, "useHeaderCache", !0), | |
CD: b(g, "defaultHeaderCacheSize", 4), | |
jx: b(g, "defaultHeaderCacheDataCount", 3), | |
BO: b(g, "headerCacheMaxPendingData", 6), | |
aBa: b(k, "recreateHeaderCacheDownloadTracks", !0), | |
CO: b(g, "headerCachePriorityLimit", 5), | |
vt: b(k, "headerCacheFlushForCircularBuffer", !0), | |
yx: b(k, "enableUsingHeaderCount", !1), | |
DO: b(k, "headerCacheTruncateHeaderAfterParsing", !1), | |
Ira: b(k, f("flushHeaderCacheBeforePlayback"), !1), | |
yQ: b(g, "networkFailureResetWaitMs", 2E3), | |
xQ: b(g, "networkFailureAbandonMs", 6E4), | |
WP: b(g, "maxThrottledNetworkFailures", 3), | |
ZS: b(g, "throttledNetworkFailureThresholdMs", 200), | |
Yi: b(k, "abortUnsentBlocks", !1), | |
YP: b(g, "maxUnsentBlocks", 2), | |
VK: b(g, "abortStreamSelectionPeriod", 2E3), | |
DP: b(h, "lowThroughputThreshold", 400), | |
CN: b(k, "excludeSessionWithoutHistoryFromLowThroughputThreshold", !1), | |
vF: b(k, "mp4ParsingInNative", !0), | |
TG: b(k, "sourceBufferInOrderAppend", !1), | |
pz: b(k, "requireAudioStreamToEncompassVideo", !0), | |
g_: b(k, "allowAudioToStreamPastVideo", !0), | |
Jg: b(k, "pruneRequestsFromNative", !0), | |
A6: b(k, "preciseBufferLevel", !1), | |
Tc: b(k, "enableManagerDebugTraces", !1), | |
U4: b(g, "managerDebugMessageInterval", 1E3), | |
T4: b(g, "managerDebugMessageCount", 20), | |
JQ: b(k, "notifyManifestCacheEom", !1), | |
aD: b(g, "bufferThresholdToSwitchToSingleConnMs", 18E4), | |
DL: b(g, "bufferThresholdToSwitchToParallelConnMs", 12E4), | |
SF: b(g, "periodicHistoryPersistMs", 3E5), | |
BG: b(g, "saveVideoBitrateMs", 18E4), | |
lra: b(k, "expandDownloadTime", !0), | |
Yxa: b(g, "minimumMeasurementTime", 500), | |
Xxa: b(g, "minimumMeasurementBytes", 131072), | |
JEa: b(g, "throughputMeasurementTimeout", 2E3), | |
tva: b(g, "initThroughputMeasureDataSize", 262144), | |
IEa: b(g, "throughputMeasureWindow", 5E3), | |
HEa: b(g, "throughputIQRMeasureWindow", 5E3), | |
bda: b(g, "IQRBucketizerWindow", 15E3), | |
iGa: b(g, "waveletBucketSize", 5E3), | |
jGa: b(g, "waveletBucketizerWindow", 15E3), | |
xna: b(g, "connectTimeHalflife", 10), | |
fCa: b(g, "responseTimeHalflife", 10), | |
Jua: b(g, "historicBandwidthUpdateInterval", 2E3), | |
KEa: b(u, "throughputMeasurementWindowCurve", null), | |
QEa: b(g, "throughputWarmupTime", 5E3), | |
PEa: b(d, "throughputWarmupMode", "initialize"), | |
Wxa: b(g, "minimumBufferToStopProbing", 1E4), | |
Rqa: b(k, "enableDecayInThroughputEstimate", !0), | |
MEa: b(d, "throughputPredictor", "ewma"), | |
Pua: b(g, "holtWintersDiscretizeInterval", 500), | |
Qua: b(g, "holtWintersHalfLifeAlpha", 6700), | |
Sua: b(g, "holtWintersHalfLifeGamma", 6700), | |
Tua: b(g, "holtWintersInitialCounts", 3), | |
Uua: b(g, "holtWintersMinInitialCounts", 3), | |
Rua: b(k, "holtWintersHalfLifeCurveEnabled", !1), | |
Vua: b(k, "holtWintersUpperBoundEnabled", !1), | |
zF: b(k, "needMinimumNetworkConfidence", !0), | |
zL: b(k, "biasTowardHistoricalThroughput", !0), | |
Jw: b(k, "addHeaderDataToNetworkMonitor", !1), | |
PP: b(h, "maxFastPlayBufferInMs", Infinity), | |
OP: b(h, "maxFastPlayBitThreshold", Infinity), | |
zla: b(d, "ase_stream_selector", "optimized"), | |
SE: b(d, "initBitrateSelectorAlgorithm", "default"), | |
GL: b(d, "bufferingSelectorAlgorithm", "default"), | |
QM: b(d, "ase_ls_failure_simulation", ""), | |
OM: b(k, "ase_dump_fragments", !1), | |
PM: b(g, "ase_location_history", 0), | |
RM: b(g, "ase_throughput", 0), | |
B0: b(k, "ase_simulate_verbose", !1), | |
DF: b(k, "notifyOpenConnectBlackBox", !0), | |
Yza: b(g, "pollingPeriod", 150), | |
F4: b(g, "loadTimeMs", 18E4), | |
X4: b(g, "marginTimeMs", 1E4), | |
t9: b(k, "useMediaDiskCache", !1), | |
Ix: b(k, "generateHardwareDeviceId", !1), | |
Wya: b(z, "offlineLogCategories", ["VideoCache", "CachedVideoEdgeSession"]), | |
bL: b(k, "addFailedLogBlobsToQueue", !0), | |
EDa: b(k, "shouldSaveLogs", !1), | |
xP: b(z, "logTypesToSave", "startup startplay endplay debug subtitleqoe playbackaborted".split(" ")), | |
Ywa: b(z, "logTypesToSave", "repos resumeplay midplay serversel cdnsel statechanged".split(" ")), | |
tFa: { | |
billboard: { | |
gm: b(g, "billboardMinInitVideoBitrate", 1050), | |
ko: b(g, "billboardMaxInitVideoBitrate", null), | |
fg: b(g, "billboardMinPrebufSize", null), | |
St: b(g, "billboardMaxPrebufSize", null), | |
jo: b(g, "billboardMaxBufferingTime", null), | |
HF: b(g, "billboardOptimalDecoderBufferMilliseconds", null), | |
Iq: b(g, "billboardMaxPartialBuffersAtBufferingStart", null), | |
Gq: b(g, "billboardLowestWaterMarkLevel", 6E3), | |
Qt: b(g, "billboardLowestBufForUpswitch", 25E3) | |
}, | |
preplay: { | |
gm: b(g, "preplayMinInitVideoBitrate", 1050), | |
ko: b(g, "preplayMaxInitVideoBitrate", null), | |
fg: b(g, "preplayMinPrebufSize", null), | |
St: b(g, "preplayMaxPrebufSize", null), | |
jo: b(g, "preplayMaxBufferingTime", null), | |
HF: b(g, "preplayOptimalDecoderBufferMilliseconds", null), | |
Iq: b(g, "preplayMaxPartialBuffersAtBufferingStart", null), | |
Gq: b(g, "preplayLowestWaterMarkLevel", 6E3), | |
Qt: b(g, "preplayLowestBufForUpswitch", 25E3) | |
}, | |
embedded: { | |
gm: b(g, "embeddedMinInitVideoBitrate", 1050), | |
ko: b(g, "embeddedMaxInitVideoBitrate", null), | |
fg: b(g, "embeddedMinPrebufSize", null), | |
St: b(g, "embeddedMaxPrebufSize", null), | |
jo: b(g, "embeddedMaxBufferingTime", null), | |
HF: b(g, "embeddedOptimalDecoderBufferMilliseconds", null), | |
Iq: b(g, "embeddedMaxPartialBuffersAtBufferingStart", null), | |
Gq: b(g, "embeddedLowestWaterMarkLevel", 6E3), | |
Qt: b(g, "embeddedLowestBufForUpswitch", 25E3) | |
} | |
}, | |
SD: b(k, "enablePsd", !1), | |
wR: b(g, "psdCallFrequency", 6E4), | |
yR: b(k, "psdReturnToNormal", !1), | |
hz: b(g, "psdThroughputThresh", 0), | |
rx: b(g, "discardLastNPsdBins", 0), | |
se: b(R, "psdPredictor", { | |
numB: 240, | |
bSizeMs: 1E3, | |
fillS: "last", | |
fillHl: 1E3, | |
bthresh: 100, | |
freqave: 5, | |
numfreq: 26, | |
beta: [-2.57382621685251, 1.00514098612371, -.369357559975733, .00999932810065489, .142934270516382, .162644679552085, -.0566219452189998, .022239120872481, -.0668887810950692, -.179565604901062, -.164944450316777, -.269160823754313, -.353934286812968, .127490861540904, -.30639082364227, -.21647101116447, -.0842995352796247, -.0103329141448779, -.12855537458795, .181738862222313, .263672043403025, .0755588656690725, .400401204107367, -.420677412792809, -1.09035458665828, 1.27111376831522, .561903634898845, -1.17759977644374], | |
thresh: .22, | |
tol: 1E-10, | |
tol2: 1E-4 | |
}), | |
Zqa: b(k, "enableVerbosePlaydelayLogging", !1), | |
Pl: b(k, "enableRl", !1), | |
pu: b(g, "rlLogParam", 5), | |
ah: b(k, "enableBufferingThroughputHistory", !0), | |
Vqa: b(k, "enableSeamless", !1) | |
}, | |
la = !0; | |
Kj = function(a) { | |
y._cad_global || (y._cad_global = {}); | |
y._cad_global.config = w; | |
y._cad_global.platformExtraInfo = ic; | |
U(a); | |
a && (S = m({}, a, { | |
Cy: !0 | |
}), m(S, aa, { | |
Cy: !0 | |
}), c(ra, w), Eb.trace("Config applied for", p(la ? S : a)), la = !1); | |
}; | |
Kj(S); | |
} | |
function ad(a) { | |
var b = m({}, w); | |
a = Uc(a); | |
return m(b, a, { | |
Qq: !0 | |
}); | |
} | |
function Tc(b) { | |
b = Uc(b); | |
return m({}, a(5)(b), { | |
Qq: !0 | |
}); | |
} | |
function Uc(a) { | |
var b = w.tFa; | |
a: { | |
if (a) { | |
if (0 <= a.indexOf("billboard")) { | |
a = "billboard"; | |
break a; | |
} | |
if (0 <= a.toLowerCase().indexOf("preplay")) { | |
a = "preplay"; | |
break a; | |
} | |
if (0 <= a.indexOf("embedded")) { | |
a = "embedded"; | |
break a; | |
} | |
} | |
a = void 0; | |
} | |
return (b = b[a]) ? b : {}; | |
} | |
function nd(a) { | |
var b = a.url.split("?"), | |
c = b[0], | |
f = "bb_reason=" + a.reason, | |
g = a.Gl ? "random=" + (1E17 * xj()).toFixed(0) : "", | |
c = b[1] ? c + ("?" + b[1] + "&" + f) : c + ("?" + f), | |
c = c + (g ? "&" + g : ""); | |
!a.N || c && 0 == c.toLowerCase().indexOf("https") || (a = w && w.W_) && (c = a.replace("{URL}", c).replace("{EURL}", fe(c))); | |
return c; | |
} | |
function od(a, b) { | |
var c = a.url.split("?"), | |
f = c[0], | |
g; | |
g = a.offset; | |
if (void 0 !== g) | |
if (Lj(g), void 0 !== a.length) { | |
var l = a.offset + a.length - 1; | |
Lj(l); | |
U(g <= l); | |
g = g + "-" + l; | |
} | |
else g += "-"; | |
else g = void 0; | |
g && (b.ym = g, f = "/" == f[f.length - 1] ? f + "range/" : f + "/range/", f += g); | |
g = a.Gl ? "random=" + (1E17 * xj()).toFixed(0) : ""; | |
f = c[1] ? f + ("?" + c[1] + (g ? "&" + g : "")) : f + (g ? "?" + g : ""); | |
!a.N || f && 0 == f.toLowerCase().indexOf("https") || (a = w && w.W_) && (f = a.replace("{URL}", f).replace("{EURL}", fe(f))); | |
b.url = f; | |
} | |
function td() { | |
return !1 !== Yb.onLine; | |
} | |
function kd(a, b, c, f) { | |
var g = f.v6, | |
l = f.headers; | |
a.open(g ? "POST" : "GET", b, !c); | |
switch (f.responseType) { | |
case jc: | |
a.responseType = "arraybuffer"; | |
break; | |
case Dl: | |
p(a, "overrideMimeType", void 0, "text/xml"); | |
} | |
g && (b = { | |
"Content-Type": sb(g) ? "text/plain" : "application/x-octet-stream" | |
}, l = l ? m(b, l) : b); | |
l && A(l, function(b, c) { | |
a.setRequestHeader(b, c); | |
}); | |
f.withCredentials && (a.withCredentials = !0); | |
void 0 !== a.msCaching && (a.msCaching = "disabled"); | |
g ? a.send(g) : a.send(); | |
} | |
function ld(a, b) { | |
switch (b.type) { | |
case jc: | |
return a.response || new ArrayBuffer(0); | |
case Dl: | |
return a.responseXML; | |
default: | |
return a.responseText; | |
} | |
} | |
function Cd(a) { | |
function c(a) { | |
c = b; | |
l.onload = null; | |
l.onabort = null; | |
l.onerror = null; | |
var f = l.status; | |
!a && 200 <= f && 299 >= f ? (h.content = ld(l, h), h.o = !0) : (h.K = a ? Z.ci : Z.Fr, h.Se = h.Pa = f, h.o = !1); | |
} | |
var f = /^[a-z]*:\/\/.*/i, | |
g = a.url, | |
l = new Mj, | |
h = { | |
request: a, | |
type: a.responseType | |
}; | |
U(sb(g) && !f.test(g), "Url must be relative"); | |
l.onload = function() { | |
c(); | |
}; | |
l.onerror = function() { | |
c(); | |
}; | |
l.onabort = function() { | |
c(!0); | |
}; | |
kd(l, g, !0, a); | |
en(h.o); | |
return h; | |
} | |
function md(a) { | |
function b(b) { | |
a.fireEvent(ge, b); | |
} | |
return { | |
download: function(c, f) { | |
c.J = a; | |
c = Ob.download(c, f); | |
a.fireEvent(Cg, c); | |
c.ZK(b); | |
return c; | |
} | |
}; | |
} | |
function Dd(a) { | |
return { | |
download: function(b, c) { | |
b.J = a; | |
var f, g; | |
(g = w.qb ? b.N : a.N.value) && w.i6 && (f = { | |
j6: new pd(a.$f), | |
d5: w.sj, | |
LQ: 0, | |
N: g | |
}); | |
b = Ob.download(b, c, f); | |
a.fireEvent(Cg, b); | |
b.ZK(function(b) { | |
a.fireEvent(ge, b); | |
}); | |
return b; | |
} | |
}; | |
} | |
function pd(a) { | |
function b(a, b, c) { | |
if (b.oi[a.id]) return { | |
responseType: jc, | |
url: b.oi[a.id], | |
da: eg, | |
offset: b.O.Da[c ? c.index : 0].offset, | |
length: 8, | |
N: a, | |
track: b.track, | |
stream: b, | |
Fh: c.type + "-" + c.index + "-ping", | |
Gl: !0 | |
}; | |
} | |
this.$f = a; | |
this.ping = function(a) { | |
function c(a) { | |
za(n); | |
f(a); | |
} | |
function f(b) { | |
(b = b && b.o) && a.mEa(); | |
!b && a.C1(); | |
} | |
var g = this.$f, | |
l = a.stream, | |
h = a.Sc, | |
k; | |
if (a.LQ > a.d5) a.C1(); | |
else if (h && !h.media) { | |
(l = b(a.N, l, h)) && (k = g.download(l, c)); | |
var n = Va(function() { | |
f(); | |
k && k.abort(); | |
}, w.Pza); | |
} | |
}; | |
} | |
function qd(a) { | |
var b; | |
a && (b = a[gi]); | |
fn(b); | |
return b; | |
} | |
function Gd(a) { | |
if (cd(a)) { | |
var b = (new sj).parseFromString(a, "text/xml"), | |
c = b.getElementsByTagName("parsererror"); | |
if (c && c[0]) { | |
try { | |
Eb.error("parser error details", { | |
errornode: (new rj).serializeToString(c[0]), | |
xmlData: a.slice(0, 300), | |
fileSize: a.length | |
}); | |
} catch (Hd) {} | |
throw new ub("xml parser error"); | |
} | |
return b; | |
} | |
throw new ub("bad xml text"); | |
} | |
function rd(a) { | |
var b, c, f = {}; | |
f[Nj] = a.localName; | |
var g = {}; | |
f[Fc] = g; | |
var l = []; | |
f[Oj] = l; | |
var h = a.attributes; | |
b = h.length; | |
for (c = 0; c < b; c++) { | |
var k = h[c]; | |
g[k.localName] = k.value; | |
} | |
a = a.childNodes; | |
b = a.length; | |
g = {}; | |
for (c = 0; c < b; c++) switch (h = a[c], h.nodeType) { | |
case gn: | |
h = rd(h); | |
k = h[Nj]; | |
h[hn] = f; | |
l.push(h); | |
f[k] ? g[k][Dg] = h : f[k] = h; | |
g[k] = h; | |
break; | |
case jn: | |
case kn: | |
h = h.text || h.nodeValue, l.push(h), f[gi] || (f[gi] = h); | |
} | |
return f; | |
} | |
function sd(a, b) { | |
var c, f; | |
try { | |
c = Gd(a); | |
} catch (wc) { | |
Eb.error("xml2xmlDoc exception", wc); | |
} | |
Ta(function() { | |
if (c && c.documentElement) try { | |
f = rd(c.nodeType == ln ? c.documentElement : c); | |
} | |
catch (wc) { | |
Eb.error("xmlDoc2js exception", wc); | |
} | |
Ta(function() { | |
f ? b({ | |
o: !0, | |
object: f | |
}) : b({ | |
o: !1, | |
K: Z.Dba | |
}); | |
}); | |
}); | |
} | |
function Sd(a, b, c) { | |
function f(a, b, c) { | |
return new ka(function(f, g) { | |
z.send(a, b, !1, void 0).then(function(a) { | |
c ? f(c(a)) : f({ | |
o: !0 | |
}); | |
})["catch"](function(c) { | |
var f; | |
try { | |
f = ya.stringify(c.Ih); | |
} catch (Pj) {} | |
var l = { | |
method: a.method, | |
success: c.o | |
}; | |
u.Bc(f) && (l.errorData = f); | |
u.Bc(c.K) && (l.errorSubCode = c.K); | |
u.Bc(c.Pa) && (l.errorExternalCode = c.Pa); | |
u.Bc(c.ka) && (l.errorDetails = c.ka); | |
u.Bc(c.Tb) && (l.errorDisplayMessage = c.Tb); | |
b.log.error("Processing EDGE response failed", l); | |
c.__logs && b.log.error(c.__logs); | |
g(c); | |
}); | |
}); | |
} | |
function g(a, b) { | |
var g = { | |
method: J, | |
playbackContextId: a.ob, | |
clientTime: Ka(), | |
licenseType: a.Lc, | |
drmContextIds: a.Ys, | |
challenges: a.cj, | |
xid: a.ba | |
}; | |
a.fm && (g.mdxesn = a.fm); | |
return f(g, b, function(a) { | |
var b = a.licenses, | |
f = !0; | |
b.forEach(function(a) { | |
cd(a.data) || (c.error("no license response"), f = !1); | |
}); | |
return f ? { | |
o: !0, | |
Cb: a.licenseContextId, | |
qj: b | |
} : | |
{ | |
o: !1, | |
K: Z.n$ | |
}; | |
}); | |
} | |
function l(a, b) { | |
b = { | |
method: E, | |
playbackContextId: b.ob, | |
playbackSessionId: b.re, | |
xid: b.ba, | |
mediaId: b.dg, | |
type: aa, | |
position: b.position, | |
playback: b.J.wc ? b.J.wc() : b.J, | |
timestamp: b.timestamp | |
}; | |
return f(b, a, function() { | |
return { | |
o: !0 | |
}; | |
}); | |
} | |
function h(a, b, c) { | |
a = { | |
method: ud, | |
type: b, | |
playbackSessionId: a.re, | |
mediaId: a.dg, | |
position: a.position, | |
timestamp: a.timestamp, | |
playback: a.J.wc ? a.J.wc() : a.J | |
}; | |
return f(a, c); | |
} | |
function k(a) { | |
return f({ | |
method: S | |
}, a); | |
} | |
function n(a) { | |
return f({ | |
method: ba | |
}, a, function() { | |
return { | |
o: !0 | |
}; | |
}); | |
} | |
function d(a, b) { | |
return f({ | |
method: V, | |
targetuuid: a.WS, | |
cticket: a.JM, | |
nonce: a.GQ, | |
controlleruuid: a.sM, | |
pairdatahmac: a.e6 | |
}, b, function(b) { | |
return { | |
o: !0, | |
uNa: { | |
nonce: b.nonce, | |
controlleruuid: a.sM, | |
controlleruserid: b.controllerUserId, | |
controllersharedsecret: b.controllerSharedSecret, | |
targetuuid: a.WS, | |
targetuserid: b.targetUserId, | |
targetsharedsecret: b.targetSharedSecret | |
}, | |
vNa: b.grantDataHmac | |
}; | |
}); | |
} | |
function R(a, b) { | |
n(a).then(function(a) { | |
b(a); | |
})["catch"](function(a) { | |
b(a); | |
}); | |
} | |
function q(a, b, c, f) { | |
h(a, b, c).then(function(a) { | |
f(a); | |
})["catch"](function(a) { | |
f(a); | |
}); | |
} | |
function v(a, b, f) { | |
d({ | |
WS: a.WS, | |
JM: a.JM, | |
GQ: a.GQ, | |
sM: a.sM, | |
e6: a.e6 | |
}, b).then(function(a) { | |
f(a); | |
})["catch"](function(a) { | |
var b, g = ""; | |
if (a.Ih) try { | |
b = ya.parse(a.Ih), b.error_message ? g = b.error_message.replace("com.netflix.streaming.nccp.handlers.mdx.MdxException: ", "") : b.implementingClass && (g = b.implementingClass); | |
} | |
catch (dd) { | |
c.error("Failed to parse Pairing errorData", { | |
Ih: b | |
}); | |
} | |
m(a, t(g)); | |
f(a); | |
}); | |
} | |
function t(a) { | |
switch (a) { | |
case "MDX_ERROR_CONTROLLER_CTICKET_EXPIRED": | |
return { | |
WD: 5, | |
YD: 21, | |
ZD: void 0, | |
Tb: void 0, | |
XD: void 0 | |
}; | |
case "MDX_ERROR_CONTROLLER_REQUEST_HMAC_FAILURE": | |
return { | |
WD: 2, | |
YD: 20, | |
ZD: void 0, | |
Tb: void 0, | |
XD: void 0 | |
}; | |
case "MDX_ERROR_INVALID_CONTROLLER_REQUEST": | |
return { | |
WD: 2, | |
YD: 10, | |
ZD: void 0, | |
Tb: void 0, | |
XD: void 0 | |
}; | |
case "com.netflix.api.service.mdx.MdxPairDependencyCommand": | |
return { | |
WD: 2, | |
YD: 13, | |
ZD: void 0, | |
Tb: void 0, | |
XD: void 0 | |
}; | |
default: | |
return { | |
WD: 4, | |
YD: 30, | |
ZD: void 0, | |
Tb: void 0, | |
XD: void 0 | |
}; | |
} | |
} | |
var x = wa.get(Eg), | |
z = wa.get(Yi), | |
u = fa.nb.get(fa.Wc); | |
m(this, { | |
Fq: function(a) { | |
return f({ | |
method: K | |
}, a, function(a) { | |
return { | |
sn: a.accountGuid, | |
zf: a.profileGuid | |
}; | |
}); | |
}, | |
pq: function(b, c) { | |
return (w.cna ? x.Ez(Qh.WA) : ka.resolve(!0)).then(function() { | |
var g = fa.Oi, | |
l = { | |
method: p, | |
lookupType: g.Fna(b.Q4), | |
viewableIds: b.C9, | |
profiles: b.Jo.concat(b.un).concat(b.XS).concat(b.g9).filter(Boolean), | |
drmSystem: b.$0, | |
appId: b.Yj, | |
sessionParams: b.Cf, | |
sessionId: b.sessionId, | |
trackId: b.Pc, | |
flavor: g.p0(b.O1), | |
secureUrls: a.fS, | |
supportPreviewContent: a.y8, | |
supportPreviewContentPin: a.sEa, | |
supportWatermarking: a.tEa, | |
forceClearStreams: a.Mra, | |
validatePinProtection: a.DT, | |
usePlayReadyHeaderObject: b.Vz, | |
showAllSubDubTracks: a.FDa | |
}; | |
b.lm && (l.packageId = b.lm); | |
return new ka(function(a, b) { | |
El().then(function(a) { | |
a && (l.securityDescriptors = a); | |
return Fl(); | |
}).then(function(g) { | |
g && (l.mediaOutputDescriptors = g); | |
f(l, c, function(a) { | |
return { | |
o: !0, | |
tL: a | |
}; | |
}).then(function(b) { | |
a(b); | |
})["catch"](function(a) { | |
b(a); | |
}); | |
})["catch"](function(a) { | |
b(a); | |
}); | |
}); | |
}); | |
}, | |
Lh: g, | |
start: function(a, b) { | |
var c = { | |
method: Q, | |
playbackContextId: b.ob, | |
mediaId: b.dg, | |
xid: b.ba, | |
appId: b.Yj, | |
sessionId: b.sessionId, | |
sessionParams: function() { | |
var a = {}; | |
b.El && A(b.El, function(b, c) { | |
a[b] = sb(c) ? c : ya.stringify(c); | |
}); | |
b.Cf && A(b.Cf, function(b, c) { | |
a[b] = sb(c) ? c : ya.stringify(c); | |
}); | |
return a; | |
} | |
(), | |
trackId: b.Db, | |
startPosition: b.WG, | |
playbackType: b.Vza | |
}; | |
return f(c, a, function(a) { | |
return { | |
o: !0, | |
re: a.playbackSessionId | |
}; | |
}); | |
}, | |
stop: l, | |
release: function(a, b) { | |
var c = { | |
method: M, | |
xid: b.ba, | |
licenseContextId: b.Cb | |
}; | |
b.uu && (c.secureStopData = b.uu); | |
b.YDa && (c.stopParams = b.YDa); | |
return f(c, a, function(a) { | |
return a.releaseData ? { | |
o: !0, | |
response: { | |
data: a.releaseData | |
} | |
} : | |
{ | |
o: !0 | |
}; | |
}); | |
}, | |
ct: function(a, b) { | |
b = { | |
method: r, | |
type: "engage", | |
playbackSessionId: b.re, | |
mediaId: b.dg, | |
position: b.position, | |
timestamp: b.timestamp, | |
playback: b.J.wc ? b.J.wc() : b.J, | |
action: b.action | |
}; | |
return f(b, a, function() { | |
return { | |
o: !0 | |
}; | |
}); | |
}, | |
Dxa: function(a, b, c) { | |
q(a, ha, b, c); | |
}, | |
AL: n, | |
V0: k, | |
ping: function(a, b) { | |
k(a).then(function(a) { | |
b(a); | |
})["catch"](function(a) { | |
b(a); | |
}); | |
}, | |
vMa: function(a, b) { | |
a = m({}, a); | |
a.profile = void 0; | |
return R(a, b); | |
}, | |
im: R, | |
DPa: function(a, b, c, f) { | |
R(m({ | |
im: b, | |
su: c | |
}, a), f); | |
}, | |
CPa: function(a, b, c, f) { | |
R(m({ | |
fq: b, | |
password: c | |
}, a), f); | |
}, | |
dd: function(a, b, c) { | |
var f = { | |
ob: a.ob, | |
$_: a.$_, | |
Lc: a.Lc, | |
Ys: [a.Nl], | |
$ma: a.$ma, | |
ba: a.ba, | |
Yj: a.Yj, | |
sessionId: a.sessionId, | |
Cf: a.Cf, | |
Pc: a.Pc | |
}; | |
a.fm && (f.fm = a.fm); | |
g(f, b).then(function(a) { | |
c(a); | |
})["catch"](function(a) { | |
c(a); | |
}); | |
}, | |
Th: function(a, b, c) { | |
l(b, a).then(function(a) { | |
c(a); | |
})["catch"](function(a) { | |
c(a); | |
}); | |
}, | |
DM: function(a, b, c) { | |
c && c({ | |
o: !0, | |
method: "playdata", | |
$ua: null | |
}); | |
}, | |
FO: function(a, b, f, g) { | |
var l = ia[b]; | |
l ? q(a, l, f, g) : c.error("heartbeat type " + b + " not recognized"); | |
}, | |
hOa: function(a, c) { | |
U(a); | |
a = a.reduce(function(a, c) { | |
var f = c.data; | |
m(f, { | |
esn: b.Cg, | |
clienttime: 1E3 * c.ina | |
}); | |
a.entries.push(f); | |
return a; | |
}, { | |
entries: [] | |
}); | |
var g = ""; | |
try { | |
g = ya.stringify(a); | |
} catch (Df) { | |
for (var l = (g = a.entries) && g.length, h = 0; h < l; h++) try { | |
ya.stringify(g[h]); | |
} | |
catch (Pj) { | |
var k = g[h], | |
n; | |
A(k, function(a, b) { | |
try { | |
ya.stringify(b); | |
} catch (qc) { | |
n = qc.message, k[a] = n; | |
} | |
}); | |
k.stringifyException = n; | |
k.originalType = k.type; | |
k.type = "debug"; | |
k.sev = "error"; | |
} | |
g = ya.stringify(a); | |
} | |
return f({ | |
method: P, | |
logblobs: g | |
}, c); | |
}, | |
oOa: v, | |
pOa: function(a, b, c) { | |
function f(f) { | |
v(a, b, function(a) { | |
a.o ? (a.im = f.im, a.su = f.su, a.jya = f.jya, a.rCa = f.rCa, c(a)) : c(f); | |
}); | |
} | |
function g(a) { | |
n(l).then(function(a) { | |
a.o ? f(a) : c(a); | |
})["catch"](function(b) { | |
a ? g(!1) : c(b); | |
}); | |
} | |
var l = { | |
n5: a.JM, | |
wxa: a.cPa, | |
vxa: a.GQ, | |
uxa: a.$La, | |
xxa: Zb(a.EPa) | |
}; | |
m(l, b); | |
g(!0); | |
}, | |
fQa: function(a, b, c, f) { | |
nrdp && nrdp.registration && nrdp.registration.deactivateAll(function() { | |
R(m({ | |
im: c.im, | |
su: c.su, | |
Axa: "GOOGLE_JWT", | |
b9: b | |
}, a), f); | |
}); | |
}, | |
nO: function() { | |
return ab() + 0; | |
}, | |
aMa: function(a) { | |
return a + 0; | |
}, | |
nNa: function(a, b) { | |
return f({ | |
method: Xb, | |
dates: a | |
}, b, function(a) { | |
return { | |
o: !0, | |
mPa: a.prefetchKeys | |
}; | |
}); | |
} | |
}); | |
var K = "login", | |
p = "manifest", | |
J = "license", | |
Q = "start", | |
E = "stop", | |
M = "release", | |
ud = "pblifecycle", | |
P = "logblob", | |
ba = "bind", | |
V = "pair", | |
S = "ping", | |
Xb = "secret", | |
r = "engage", | |
aa = "stop", | |
ha = "splice", | |
ia = {}; | |
ia[Qj] = "resume"; | |
ia[Rj] = "suspend"; | |
ia[Jd] = "interval"; | |
} | |
function Td(a, b) { | |
var c = {}; | |
a.forEach(function(a) { | |
var b = a.url; | |
c[b] || (c[b] = []); | |
c[b].push(a); | |
}); | |
var f = []; | |
A(c, function(a, c) { | |
f.push(Vd(c, b)); | |
}); | |
return { | |
urls: f | |
}; | |
} | |
function Vd(a, b) { | |
var c = a[0], | |
f = { | |
url: c.url, | |
bitrate: c.l, | |
cdnid: c.N && c.N.id, | |
dltype: c.uqa, | |
id: c.Bb | |
}, | |
g = {}; | |
a.forEach(function(a) { | |
var b = a.o || void 0 === a.o || a.K === Z.ci || a.K === Z.Wo ? "success" : "fail"; | |
g[b] || (g[b] = []); | |
g[b].push(a); | |
}); | |
A(g, function(a, c) { | |
"fail" === a ? f.failures = ue(c, b) : "success" === a && (f.downloads = Wd(c, b)); | |
}); | |
return f; | |
} | |
function Wd(a, b) { | |
var c = {}; | |
a.forEach(function(a) { | |
var b = a.jna; | |
c[b] || (c[b] = []); | |
c[b].push(a); | |
}); | |
var f = []; | |
A(c, function(a, c) { | |
var g = []; | |
c.forEach(function(a) { | |
g.push(a); | |
(a = a.K === Z.ci || a.K === Z.Wo ? !0 : void 0) && (f.push(Ed(g, b)), g = []); | |
}); | |
0 < g.length && f.push(Ed(g, b)); | |
}); | |
return f; | |
} | |
function Ed(a, b) { | |
for (var c = a.sort(function(a, b) { | |
return a.mb.dc < b.mb.dc ? -1 : a.mb.dc > b.mb.dc ? 1 : 0; | |
}), f = c[0].mb, g = f.requestTime, l = f.dc, f = f.cc, h = 1; h < a.length; h++) { | |
var k = a[h].mb; | |
k.requestTime < g && (g = k.requestTime); | |
k.dc < l && (l = k.dc); | |
k.cc > f && (f = k.cc); | |
} | |
h = Zd(c); | |
k = c[c.length - 1]; | |
b = { | |
time: g - b, | |
tresp: l - g, | |
first: h, | |
ranges: $d(c, h), | |
dur: f - l, | |
trace: de(a), | |
status: se(k) | |
}; | |
w.LD.length && (b.servertcp = Yd(a)); | |
return b; | |
} | |
function Yd(a) { | |
var b = w.LD; | |
return a.reduce(function(a, c) { | |
var f = []; | |
if (c.I8) { | |
var g = {}; | |
c.I8.split(";").forEach(function(a) { | |
a = a.split("="); | |
2 == a.length && (g[a[0]] = a[1]); | |
}); | |
b.forEach(function(a) { | |
f.push(g[a]); | |
}); | |
} | |
a.push(f); | |
return a; | |
}, []); | |
} | |
function Zd(a) { | |
var b = 0; | |
a.forEach(function(a) { | |
a.ym && (b = Pa(b, a.ym[0])); | |
}); | |
return b; | |
} | |
function $d(a, b) { | |
var c = []; | |
a.forEach(function(a) { | |
a.ym ? c.push([a.ym[0] - b, a.ym[1] - b]) : c.push([0, -1]); | |
}); | |
return c; | |
} | |
function de(a) { | |
var b = [], | |
c; | |
a.forEach(function(a) { | |
a = a.mb; | |
if (c) { | |
var f = a.requestTime - c.cc; | |
0 < f && b.push([f, -2]); | |
f = Sa(c.cc, a.requestTime); | |
f = a.dc - f; | |
0 < f && b.push([f, -3]); | |
} | |
b.push([a.cc - a.dc, a.Cd || 0]); | |
c = a; | |
}); | |
return b; | |
} | |
function se(a) { | |
if (a.o) return "complete"; | |
if (a.K === Z.ci) return "abort"; | |
if (a.K === Z.Wo) return "stall"; | |
U(!1, "download status should never be: other"); | |
return "other"; | |
} | |
function ue(a, b) { | |
var c = []; | |
a.forEach(function(a) { | |
var f = a.mb; | |
c.push({ | |
time: f.tb - b, | |
tresp: f.dc - f.requestTime, | |
dur: f.cc - f.dc, | |
range: a.ym, | |
reason: a.Se || a.K === Z.Fr ? "http" : a.K === Z.ov ? "timeout" : "network", | |
httpcode: a.Se, | |
nwerr: Ud(a.K) | |
}); | |
}); | |
return c; | |
} | |
function Ce(a) { | |
var b = a.request, | |
c = b.stream, | |
f = b.track, | |
g = b.url, | |
l = De(f, g), | |
h = void 0; | |
switch (l) { | |
case Jb: | |
case Hb: | |
h = b.stream.Bb; | |
break; | |
case Sj: | |
case Gl: | |
h = f.Bb; | |
} | |
a = { | |
l: c && c.l, | |
uqa: l, | |
Bb: h, | |
mb: a.mb, | |
N: b.N, | |
url: g, | |
Pa: a.Pa, | |
Se: a.Se, | |
K: a.K, | |
o: a.o, | |
I8: a.headers && a.headers["X-TCP-Info"], | |
jna: Fe(a) | |
}; | |
void 0 !== b.offset && void 0 != b.length && (a.ym = [b.offset, b.offset + b.length - 1]); | |
return a; | |
} | |
function De(a, b) { | |
if (a) return a.type; | |
if (0 <= b.indexOf("netflix.com")) { | |
if (0 <= b.indexOf("nccp")) return "nccp"; | |
if (0 <= b.indexOf("api")) return "api"; | |
} | |
return "other"; | |
} | |
function Fe(a) { | |
if (a.headers && (a = a.headers["X-Session-Info"])) return a = (a ? a.split(";") : []).filter(function(a) { | |
return 0 == a.indexOf("port="); | |
}).map(function(a) { | |
return a.split("=")[1]; | |
})[0], P(a); | |
} | |
function Xd(a, b, c) { | |
function f(a, b) { | |
a[b.type] = b.id; | |
return a; | |
} | |
function g(a, b) { | |
var c; | |
for (c = 0; c < a.length; c++) { | |
var f = a[c]; | |
if (f.Db == b) return f; | |
} | |
return null; | |
} | |
var l = [], | |
h = a.defaultMedia, | |
k, n; | |
for (n = 0; n < a.media.length; n++) { | |
var d = a.media[n]; | |
if (d.mediaId == h) { | |
k = d.tracks.reduce(f, {}); | |
break; | |
} | |
} | |
l.push({ | |
Za: g(b, k.AUDIO), | |
vc: g(c, k.TEXT), | |
kPa: 0 | |
}); | |
return l; | |
} | |
function Je(a, b) { | |
function c(a, b) { | |
return a.filter(function(a) { | |
if (a.downloadables && 0 < a.downloadables.length) return !0; | |
b && b(a); | |
return !1; | |
}); | |
} | |
function f(a, c) { | |
var f = []; | |
if (!a) return d.warn("There are no media streams for " + c.type + " track - " + c.Db), f; | |
a.forEach(function(a) { | |
var g; | |
g = new $g(b, c, c.type, a.downloadableId, a.bitrate, a.vmaf, a.size, a.urls, a.contentProfile); | |
g.xDa(a.width, a.height); | |
a.decryptionKey && (g.BD = a.decryptionKey); | |
c.Nl && (g.Nl = c.Nl); | |
if (c.type === Hb || c.type === Jb) J = J ? Pa(J, a.validFor) : a.validFor; | |
c.Z0 && (g.Z0 = c.Z0.map(function(a) { | |
var b = {}; | |
b.pQa = a.systemType; | |
a.bytes && (b.eb = a.bytes); | |
a.checksum && (b.RLa = a.checksum); | |
a.keyId && (b.Jt = a.keyId); | |
return b; | |
})); | |
a.contentProfile && (g.Rf = a.contentProfile); | |
g.UR = !(!a.hdcpVersions || "none" == a.hdcpVersions[0]); | |
g.UR && "never" == w.Pma || f.push(g); | |
}); | |
f.sort(function(a, b) { | |
return a.l - b.l; | |
}); | |
m(f, he); | |
f.sort(function(a, b) { | |
return a.l - b.l; | |
}); | |
m(f, he); | |
return f; | |
} | |
function g(b, c) { | |
return h(b, c, a.orderedAudioTracks); | |
} | |
function l(b, c) { | |
return h(b, c, a.orderedTextTracks); | |
} | |
function h(a, b, c) { | |
if (!c) return 0; | |
if (!a) return -1; | |
if (!b) return 1; | |
b = b.displayName + ("CLOSEDCAPTIONS" === b.yF ? " [CC]" : ""); | |
a = c.indexOf(a.displayName + ("CLOSEDCAPTIONS" === a.yF ? " [CC]" : "")); | |
c = c.indexOf(b); | |
return a - c; | |
} | |
function n(a, b) { | |
var c = 0; | |
a.some(function(a, f) { | |
return a.track_id == b ? (c = f, !0) : !1; | |
}); | |
return c; | |
} | |
var d = k(b, "BladeRunnerParseManifest"), | |
R, q, v, t, A, x, u, z, K, p, J; | |
R = function() { | |
var b = []; | |
a.locations && (b = a.locations.map(function(a) { | |
return { | |
id: a.id, | |
Cc: a.rank, | |
level: a.level, | |
weight: a.weight | |
}; | |
})); | |
d.trace("Transformed locations", { | |
Count: b.length | |
}); | |
return b; | |
} | |
(); | |
q = function(b) { | |
function c(a, b) { | |
var c; | |
b.some(function(b) { | |
if (b.id === a) return c = b, !0; | |
}); | |
return c; | |
} | |
var f = a.cdns, | |
g = w.Yma, | |
l = w.Xma, | |
h = []; | |
f && f.forEach(function(a) { | |
var f = a.id, | |
k = c(a.locationId, b); | |
(!g.length || 0 <= g.indexOf(f)) && 0 > l.indexOf(f) && h.push({ | |
id: a.id, | |
name: a.name, | |
Cc: a.rank, | |
type: a.type, | |
KNa: a.isLowgrade, | |
JNa: a.isExclusive, | |
cOa: a.locationId, | |
location: k | |
}); | |
}); | |
h.sort(function(a, b) { | |
return a.Cc - b.Cc; | |
}); | |
b.forEach(function(a) { | |
var b = h.filter(function(b) { | |
return b.location.id === a.id; | |
}); | |
a.Fb = b; | |
}); | |
b.sort(function(a, b) { | |
return a.Cc - b.Cc; | |
}); | |
d.trace("Transformed cdns", { | |
Count: h.length | |
}); | |
if (!h.length) throw new ub("no valid cdns"); | |
return h; | |
} | |
(R); | |
v = function() { | |
var f = c(a.trickPlayTracks), | |
g = []; | |
0 < f.length ? (f = f[0].downloadables) && (g = f.map(function(a) { | |
return new Ah(b, a.id, a.resHeight, a.resWidth, a.pixHeight, a.pixWidth, a.size, a.urls, a.downloadableId); | |
})) : d.warn("There are no trickplay tracks"); | |
g.sort(function(a, b) { | |
return a.size - b.size; | |
}); | |
d.trace("Transformed trick play tracks", { | |
Count: g.length | |
}); | |
return g; | |
} | |
(); | |
t = function() { | |
function c(a) { | |
a = a.downloadables; | |
var b = []; | |
if (!a || 0 === a.length) return b; | |
a.forEach(function(a) { | |
var c = a.id, | |
f = a.downloadableId, | |
g = a.contentProfile, | |
l = a.size | 0, | |
h = a.contentProfile, | |
k = w.or.indexOf(h), | |
n = a.size, | |
c = { | |
id: c, | |
Bb: f, | |
profile: g, | |
size: l, | |
Pb: 0 < w.jH && h === ed.PH && n > w.jH ? w.or.length + 1 : 0 <= k ? k : w.or.length, | |
offset: a.offset | 0, | |
Qza: a.pixWidth, | |
k6: a.pixHeight, | |
cf: a.urls, | |
type: a.type | |
}; | |
a.decryptionKey && (c.BD = a.decryptionKey); | |
b.push(c); | |
}); | |
b.sort(function(a, b) { | |
return a.Pb - b.Pb; | |
}); | |
return b; | |
} | |
function f(a) { | |
var b = w.iva || g(), | |
c = a.filter(function(a) { | |
return a.profile === ed.Jr || a.profile === ed.cB; | |
}).filter(function(a) { | |
return a.k6 === b; | |
})[0]; | |
if (c) return c; | |
d.warn("none of the downloadables match the intended resolution", { | |
screenHeight: Oe.height, | |
intendedResolution: b | |
}); | |
return a[0]; | |
} | |
function g() { | |
var a = Oe && Oe.height; | |
if (Ga(a)) return 1080 <= a ? 1080 : 720; | |
d.error("screen height not available", fd); | |
return 720; | |
} | |
function h(a) { | |
try { | |
return { | |
isNone: a.isNone, | |
isForced: a.isForced, | |
bcp47: a.bcp47, | |
id: a.id | |
}; | |
} catch (xb) {} | |
} | |
var k = []; | |
a.textTracks.forEach(function(a) { | |
var g, l, n; | |
g = c(a); | |
!1 !== a.isNone || g.length || d.error("track without downloadables", h(a)); | |
!0 !== a.isForced || g.length || d.error("forced track without downloadables", h(a)); | |
if (0 < g.length) { | |
l = g[0]; | |
n = l.profile; | |
if (n == ed.Jr || n == ed.cB) l = f(g); | |
g = l; | |
n = {}; | |
if (g.profile === ed.Jr || g.profile === ed.cB) n.offset = g.offset, n.length = g.size, n.IPa = { | |
width: g.Qza, | |
height: g.k6 | |
}; | |
a = new Tj(b, a.id, l.Bb, l.cf, a.bcp47, a.language, Uj[a.trackType.toLowerCase()] || Pe, a.trackType, l.profile, n, a.isNone, a.isForced, l.BD); | |
} else a = new Tj(b, a.id, void 0, {}, a.bcp47, a.language, Pe, a.trackType, void 0, {}, a.isNone, a.isForced, void 0); | |
k.push(a); | |
d.trace("Transformed timed text track", a); | |
}); | |
k.sort(l); | |
d.trace("Transformed timed text tracks", { | |
Count: k.length | |
}); | |
return k; | |
} | |
(); | |
A = function(b, h) { | |
function k(a, b, c) { | |
return b.filter(function(b) { | |
return 0 < b.tracks.filter(function(b) { | |
return "AUDIO" === b.type && b.id === a; | |
}).length; | |
}).map(function(a) { | |
var b; | |
b = a.tracks.filter(function(a) { | |
return "TEXT" === a.type; | |
})[0]; | |
a = c.filter(function(a) { | |
return a.Db === b.id; | |
}); | |
return 0 < a.length ? a[0] : void 0; | |
}).filter(Boolean).sort(l); | |
} | |
var n = c(a.audioTracks, function(a) { | |
d.warn("Audio track is missing downloadables", { | |
language: a.language, | |
bcp47: a.bcp47 | |
}); | |
}), | |
R = []; | |
n && n.forEach(function(a) { | |
var c = a.trackType; | |
if (0 === w.z8.length || 0 <= w.z8.indexOf(c)) c = { | |
type: Jb, | |
Db: a.id, | |
lT: Uj[c.toLowerCase()] || Pe, | |
yF: c, | |
Of: a.bcp47, | |
displayName: a.language, | |
XL: a.channels, | |
PLa: a.channelsLabel, | |
OLa: a.channelsCount, | |
xj: k(a.id, b, h), | |
fOa: { | |
Bcp47: a.language, | |
TrackId: a.id | |
} | |
}, c.sa = f(a.downloadables, c), d.trace("Transformed audio track", c, { | |
StreamCount: c.sa.length, | |
AllowedTimedTextTracks: c.xj.length | |
}), c.sa.length ? (c.VLa = mn[c.sa[0].Rf], R.push(c)) : d.warn("Audio track has no streams", c); | |
}); | |
if (!R.length) throw new ub("no valid audio tracks"); | |
R.sort(g); | |
d.trace("Transformed audio tracks", { | |
Count: R.length | |
}); | |
return R; | |
} | |
(a.media, t); | |
x = function() { | |
var b = c(a.videoTracks, function(a) { | |
d.warn("Video track is missing downloadables", { | |
trackId: a.id | |
}); | |
}), | |
g = []; | |
b && b.forEach(function(a) { | |
var b = a.trackType, | |
b = { | |
type: Hb, | |
Db: a.id, | |
lT: Uj[b.toLowerCase()] || Pe, | |
yF: b | |
}; | |
b.sa = f(a.downloadables, b); | |
d.trace("Transformed video track", { | |
StreamCount: b.sa.length | |
}); | |
b.sa.length ? g.push(b) : d.warn("Video track has no streams"); | |
}); | |
if (!g.length) throw new ub("No valid video tracks"); | |
d.trace("Transformed video tracks", { | |
Count: g.length | |
}); | |
return g; | |
} | |
(); | |
u = Xd(a, A, t); | |
p = u[0] || {}; | |
K = x[0]; | |
z = function(a) { | |
if (w.ON && (a = a.filter(function(a) { | |
return a.Of == w.ON || a.Db == w.ON; | |
})) && a.length) return a[0]; | |
} | |
(A) || p.Za || A[0]; | |
p = function(a) { | |
if (w.hE && (a = a.filter(function(a) { | |
return a ? a.Of == w.hE || a.Db == w.hE : "none" == w.hE.toLowerCase(); | |
})) && a.length) return a[0]; | |
} | |
(z.xj) || p.vc || z.xj[0]; | |
b.ob = a.playbackContextId; | |
b.ZP = a.media; | |
b.bj = a.cert; | |
b.Nl = a.drmContextId; | |
b.ju = a.psshb64; | |
b.HNa = a.audioEncrypted; | |
b.ONa = a.videoEncrypted; | |
b.Fb = q; | |
b.MLa = R; | |
b.Zi = A; | |
b.B9 = x; | |
b.Op = a.bookmark.position; | |
b.xj = t; | |
b.qr = v; | |
b.x1 = a.runtime; | |
b.N7 = a.clientIpAddress; | |
R = Hl.m0(a); | |
b.Ppa = n(R.audio_tracks, z.Db); | |
b.Tpa = n(R.video_tracks, K.Db); | |
b.Md = R; | |
b.lPa = u; | |
b.Eb.set(K); | |
b.Za.set(z); | |
b.vc.set(p); | |
u = 1E3 * J; | |
1E4 < u ? (b.V4 = oa() + u, a.willExpireOn = oa() + u) : b.nd || d.error("Invalid url expiration, ignoring"); | |
} | |
function Ke(a) { | |
function c(b) { | |
return new ka(function(c, f) { | |
var g = oa(), | |
l = [], | |
h = P.n0(b.Lc); | |
b.cj.forEach(function(a) { | |
l.push({ | |
sessionId: a.sessionId, | |
dataBase64: v(a.data) | |
}); | |
}); | |
h = { | |
ob: a.ob, | |
Lc: cd(b.Lc) ? b.Lc : h, | |
Ys: [a.Nl], | |
cj: l, | |
ba: a.ba, | |
Yj: J, | |
sessionId: Q, | |
Cf: a.yf.Cf, | |
Pc: a.Pc, | |
tc: b.tc | |
}; | |
b.$l && (h.$l = Xh.encode(b.$l)); | |
a.rM && (h.fm = a.rM); | |
Fb.Lh(h, t).then(function(b) { | |
K = oa() - g; | |
try { | |
a.Cb = b.Cb; | |
var l = []; | |
b.qj.forEach(function(a) { | |
l.push({ | |
data: Zb(a.data), | |
sessionId: a.sessionId | |
}); | |
}); | |
c({ | |
o: !0, | |
response: { | |
qj: l | |
} | |
}); | |
d(); | |
} catch (xd) { | |
q.error("Exception processing license response", xd), f({ | |
o: !1, | |
K: Z.sW | |
}); | |
} | |
})["catch"](function(a) { | |
f(a); | |
}); | |
}); | |
} | |
function f() { | |
var b; | |
w.zj && M ? (b = M.create(), b.type = a.nd ? "offline" : "online", b.profileId = a.profile.id, b.ob = a.ob, b.re = a.re, b.Cb = a.Cb, b.ba = a.ba, b.H = a.H, b.dg = l(), b.timestamp = Fb.nO(), b.J.Uf(g())) : (b = { | |
profile: a.profile, | |
ob: a.ob, | |
re: a.re, | |
Cb: a.Cb, | |
ba: a.ba, | |
H: a.H, | |
dg: l(), | |
J: g(), | |
timestamp: Fb.nO() | |
}, p && w.he && (b.ti = p)); | |
(a.nd || a.re) && Ga(a.ta.value) && (b.position = a.ta.value); | |
var c = a.Hd; | |
c && cd(c.bq) && (b.o = !1, b.IMa = c.bq); | |
return b; | |
} | |
function g() { | |
if (x) return { | |
startPosition: m, | |
startEpoch: u, | |
playTimes: a.Ci.Ata() | |
}; | |
if (a.nd) return { | |
startEpoch: Ka(), | |
playTimes: { | |
total: 0 | |
} | |
}; | |
if (a.ob && a.ba) return { | |
playTimes: { | |
total: 0 | |
} | |
}; | |
} | |
function l() { | |
function b(a, b) { | |
return b.type == nn ? a : a && b.id == c[b.type]; | |
} | |
var c = {}, | |
f, g; | |
g = a.Za.value; | |
var l = a.Eb.value, | |
h = a.vc.value; | |
if (g && l && h) { | |
c[on] = g.Db; | |
c[pn] = l.Db; | |
c[qn] = h.Db; | |
for (g = 0; g < a.ZP.length; g++) | |
if (a.ZP[g].tracks.reduce(b, !0)) { | |
f = a.ZP[g].mediaId; | |
break; | |
} | |
return f; | |
} | |
} | |
function h() { | |
var a = f(); | |
a.dg && a.re && Fb.Dxa(a, t, function(b) { | |
b.o ? q.trace("Spliced new mediaId " + a.dg) : q.error("Media splice failed", n(b)); | |
}); | |
} | |
function d() { | |
d = b; | |
ae(a, t, q); | |
a.fireEvent(Ef); | |
} | |
function R() { | |
R = b; | |
a.fireEvent(hi); | |
} | |
var q = k(a, "NccpPlayback"), | |
t = { | |
bd: a.$f, | |
log: k(a, "Nccp"), | |
profile: a.profile | |
}, | |
x, m, u, z, K, p, J = w.Yj || Qe, | |
Q = w.sessionId || Qe, | |
E = wa.get(Eg), | |
M, P = fa.Oi; | |
U(w); | |
U(Fb); | |
U(t.bd); | |
w.zj && (M = fa.nb.get(fa.Lv)); | |
a.addEventListener(Kb, function() { | |
x = !0; | |
m = a.ta.value; | |
u = Ka(); | |
Mc(m); | |
}); | |
a.addEventListener(Il, function(a) { | |
p = a.ti; | |
}); | |
a.vc.addListener(function() { | |
a.yf.gN ? q.trace("stickiness is disabled for timedtext") : h(); | |
}); | |
a.Za.addListener(function() { | |
a.yf.gN ? q.trace("stickiness is disabled for audio") : h(); | |
}); | |
return { | |
vQ: t, | |
uL: function(b) { | |
function c(c) { | |
var f; | |
z = oa() - l; | |
q.trace("Auth Delay: " + z); | |
try { | |
f = c.tL.viewables[0], f.success ? (a.Vb = f, Je(f, a), b(xa), R()) : b(f.result); | |
} catch (Ne) { | |
q.error("Exception processing authorization response", Ne), b({ | |
K: Z.sW | |
}); | |
} | |
} | |
function f() { | |
h.Q4 = w.iz.enabled ? P.UI.rda : P.UI.ei; | |
Fb.pq(h, t).then(function(a) { | |
c(a); | |
})["catch"](function(a) { | |
b(a); | |
}); | |
} | |
function g() { | |
return { | |
o: !0, | |
tL: { | |
viewables: [a.Vb] | |
} | |
}; | |
} | |
Mc(a.H); | |
Mc(a.Pc); | |
var l = oa(), | |
h = { | |
C9: [a.H], | |
get Jo() { | |
return E.O2(); | |
}, | |
get un() { | |
return E.M2(); | |
}, | |
XS: w.or, | |
g9: ["BIF240", "BIF320"], | |
$0: zc(), | |
Yj: J, | |
sessionId: Q, | |
Pc: a.Pc, | |
Cf: function() { | |
var b = {}; | |
a.yf.El && A(a.yf.El, function(a, c) { | |
b[a] = sb(c) ? c : ya.stringify(c); | |
}); | |
a.yf.Cf && A(a.yf.Cf, function(a, c) { | |
b[a] = sb(c) ? c : ya.stringify(c); | |
}); | |
return b; | |
} | |
(), | |
O1: w.iz.enabled ? P.hB.Hfa : P.hB.ei, | |
Vz: w.Vz | |
}; | |
w.Gh.y8 && (Jl && Jl.forEach(function(a) { | |
h.un.push(a); | |
}), Kl && Kl.forEach(function(a) { | |
h.XS.push(a); | |
})); | |
w.iz.enabled && cd(w.iz.lm) && (h.lm = w.iz.lm); | |
if (a.Vb) | |
if (a.Vb.willExpireOn) { | |
var k = a.Vb.willExpireOn - oa(); | |
18E5 < k ? Ta(function() { | |
c(g()); | |
a.fD = !0; | |
}) : (q.error("manifestData is expired", { | |
gap: k | |
}), f()); | |
} | |
else Ta(function() { | |
c(g()); | |
a.fD = !0; | |
}); | |
else a.nd ? (k = kc.pq(a.H)) ? (q.info("manifest consumed from video cache"), a.Vb = k, c(g()), a.fD = !0) : (q.error("video cache can play, but manifest not in video cache", a.H), b({ | |
o: !1, | |
K: Z.Saa | |
})) : w.Uh && ua ? (k = ua.Vf(a.H, "manifest")) && k.then(function(b) { | |
a.Vb = b; | |
c(g()); | |
a.fD = !0; | |
})["catch"](function(a) { | |
q.warn("manifest not in cache", a); | |
f(); | |
}) : f(); | |
}, | |
Lh: c, | |
start: function() { | |
return new ka(function(b, c) { | |
var f = { | |
ob: a.ob, | |
dg: l(), | |
ba: a.ba, | |
Yj: J, | |
sessionId: Q, | |
Cf: a.yf.Cf, | |
El: a.yf.El, | |
Db: a.Pc, | |
WG: m, | |
Vza: "standard" | |
}; | |
Fb.start(t, f).then(function(f) { | |
f.o ? (a.re = f.re, b(xa)) : c(f); | |
})["catch"](function(a) { | |
c(a); | |
}); | |
}); | |
}, | |
iQa: function(b) { | |
return be(x, a, t, b, a.background); | |
}, | |
stop: function(b) { | |
return ce(x, a, t, b, a.background); | |
}, | |
release: function(b) { | |
return Rd(x, a, t, b); | |
}, | |
dd: function(a, b) { | |
c(a).then(function(a) { | |
b(a); | |
})["catch"](function(a) { | |
b(a); | |
}); | |
}, | |
FO: function(a, b) { | |
var c = f(); | |
c.dg && c.re ? Fb.FO(c, a, t, function(a) { | |
b && b(a); | |
}) : b && b({ | |
o: !0 | |
}); | |
}, | |
ct: function(a) { | |
var b = f(); | |
if (!b.dg || !b.re) return ka.resolve({ | |
o: !0 | |
}); | |
b.action = a; | |
return Fb.ct(t, b); | |
}, | |
Th: function(a, b) { | |
Fb.Th(a, t, function(a) { | |
b && b(a); | |
}); | |
}, | |
DM: function(a, b) { | |
Fb.DM(a, t, b); | |
}, | |
Gn: f, | |
rsa: function() { | |
return z; | |
}, | |
kta: function() { | |
return K; | |
} | |
}; | |
} | |
function ae(a, c, f) { | |
ae = b; | |
w.GFa && Fb.AL(c).then(function() { | |
f.trace("Updated NetflixId"); | |
})["catch"](function(a) { | |
f.error("NetflixId upgrade failed", n(a)); | |
}); | |
} | |
function be(a, b, c, f, g) { | |
return new ka(function(l, h) { | |
var k = w.zj ? ka.resolve({ | |
o: !0 | |
}) : ce(a, b, c, f, g), | |
n = Rd(a, b, c, f); | |
ka.all([k, n]).then(function(a) { | |
1 < a.length && a[1].response && a[1].response.data ? l({ | |
MR: a[1].response.data | |
}) : l({ | |
MR: void 0 | |
}); | |
})["catch"](function(a) { | |
h(a); | |
}); | |
}); | |
} | |
function ce(a, b, c, f, g) { | |
return g ? ka.resolve({ | |
o: !0 | |
}) : a || b.ob && b.ba ? Fb.stop(c, m(f, { | |
ob: b.ob, | |
ba: b.ba | |
})) : f.ob && f.ba ? Fb.stop(c, f) : ka.resolve({ | |
o: !0 | |
}); | |
} | |
function Rd(a, b, c, f) { | |
if (b.ba && b.Cb) return Fb.release(c, m(f, { | |
ba: b.ba, | |
Cb: b.Cb | |
})); | |
if (f.ba && f.Cb) return Fb.release(c, f); | |
a && Eb.error("playback started but no licenseContextId"); | |
return ka.resolve({ | |
o: !0 | |
}); | |
} | |
function Fg(a, b, c, f) { | |
f = f || {}; | |
U(void 0 === f.jssid && void 0 === f.client_utc && void 0 === f.type && void 0 === f.sev && void 0 === f.lver && void 0 === f.xid && void 0 === f.mid && void 0 === f.esn && void 0 === f.snum && void 0 === f.lnum); | |
w.Xl && (f.groupname = w.Xl); | |
var g = Ka(); | |
this.timestamp = wa.get(Sh).bh; | |
c = { | |
type: b, | |
sev: c, | |
devmod: Vj | |
}; | |
Ll && (c.nettype = Ll); | |
m(c, f); | |
m(c, { | |
jssid: Qe, | |
jsoffms: oa(), | |
client_utc: g, | |
lver: rn || "2012.2-CAD" | |
}); | |
f = "startup" === b ? "playbackxid" : "xid"; | |
w.Il && (c.groupname = c.groupname ? c.groupname + ("|" + w.Il) : w.Il); | |
a && (m(c, { | |
soffms: a.jj(), | |
mid: a.H, | |
lvpi: a.Eq, | |
uiLabel: a.pb || "" | |
}), c[f] = a.ba, a.xu && (f = a.xu, (a = a.xu.split(".")) && 1 < a.length && "S" !== a[0][0] && (f = "SABTest" + a[0] + ".Cell" + a[1]), c.groupname = c.groupname ? c.groupname + ("|" + f) : f)); | |
this.data = c; | |
this.type = b; | |
this.ina = g; | |
} | |
function cf(c) { | |
function f(a) { | |
var b = { | |
browserua: fd, | |
browserhref: Yh.href, | |
playdelaysdk: S(c.P_()), | |
playdelay: S(c.O_()), | |
trackid: c.Pc, | |
connection_type: "parallel" === w.k0 ? "multi" : "single", | |
bookmark: S(c.Op || 0), | |
pbnum: c.index, | |
endianness: Id() | |
}; | |
w.Zqa && (b.transitiontime = c.Pu, b.uiplaystarttime = c.yf.Sz, b.playbackrequestedat = c.az.na(Ec), b.clockgettime = oa(), b.clockgetpreciseepoch = ab(), b.clockgetpreciseappepoch = Wa(), b.absolutestarttime = c.lE(), b.relativetime = c.jj()); | |
w.endpoint || (b.configendpoint = "error"); | |
c.ob && (b.playbackcontextid = c.ob); | |
c.rM && (b.controllerESN = c.rM); | |
Ga(c.F_) && (b.bookmarkact = S(c.F_)); | |
var f = Ba.rsa(); | |
f && (b.nccpat = f); | |
(f = Ba.kta() || c.iF && c.iF.na(Ec)) && (b.nccplt = f); | |
(f = p()) && (b.downloadables = f); | |
lc && jb(lc.et) && (b.esnSource = lc.et); | |
ic && m(b, ic, { | |
prefix: "pi_" | |
}); | |
w.xx && (b.congested = Kd && Kd.ot() && Kd.ot().isCongested); | |
(f = y.navigator && y.navigator.connection && y.navigator.connection.type) && (b.nettype = f); | |
b.usejsase = w.qb; | |
c.q3 && (b.histdiscbw = c.q3); | |
c.F3 && (b.initSelReason = c.F3); | |
c.Ct && (b.initvbitrate = c.Ct); | |
c.TZ && (b.actualbw = c.TZ); | |
c.p3 && (b.histbw = c.p3, b.histconf = c.Iua); | |
c.KO && (b.histbwstd = Ga(c.KO) ? Number(c.KO).toFixed(2) : void 0); | |
w.ah && (b.histbufbw = c.Fua, b.histbufbwstd = c.Gua, b.histbufconf = c.Hua); | |
c.zo && (b.selector = c.zo); | |
c.R3 && (b.isConserv = c.R3); | |
c.ZE && (b.isLowEnd = c.ZE); | |
c.LO && (b.histniqr = Ga(c.LO) ? Number(c.LO).toFixed(2) : void 0, b.histp75 = Ga(c.w3) ? Number(c.w3).toFixed(2) : void 0, b.histp50 = Ga(c.v3) ? Number(c.v3).toFixed(2) : void 0, b.histp25 = Ga(c.u3) ? Number(c.u3).toFixed(2) : void 0); | |
c.Ve && (b.histtdmax = Ga(c.Ve.max) ? Number(c.Ve.max).toFixed(2) : void 0, b.histtdp90 = Ga(c.Ve.d6) ? Number(c.Ve.d6).toFixed(2) : void 0, b.histtdp75 = Ga(c.Ve.Sh) ? Number(c.Ve.Sh).toFixed(2) : void 0, b.histtdp50 = Ga(c.Ve.Rh) ? Number(c.Ve.Rh).toFixed(2) : void 0, b.histtdp25 = Ga(c.Ve.Qh) ? Number(c.Ve.Qh).toFixed(2) : void 0, b.histtdp10 = Ga(c.Ve.c6) ? Number(c.Ve.c6).toFixed(2) : void 0, b.histtdmin = Ga(c.Ve.min) ? Number(c.Ve.min).toFixed(2) : void 0, b.histtdcs = c.Ve.Zma, b.histtdsample = c.Ve.lGa, b.histtdrc = c.Ve.WAa); | |
c.WO && (b.iqrbffmin = Ga(c.WO) ? Number(c.WO).toFixed(2) : void 0, b.iqrbfbeta = Ga(c.N3) ? Number(c.N3).toFixed(2) : void 0); | |
if (c.x3) | |
for (var f = c.x3, g = f.length ? Ua.min(f.length, 10) : 0, l = 0; l < g; l++) b["histwl" + l] = Ga(f[l]) ? Number(f[l]).toFixed(2) : void 0; | |
c.Vw && (b.bcreason = c.Vw); | |
if (c.state.value >= yb) try { | |
var h = c.Ce(); | |
if (h) { | |
var k = bh(h); | |
Dc = Db(k); | |
fa = ch(h); | |
b.maxbitrate = Dc; | |
b.maxresheight = fa; | |
} | |
} | |
catch (Gf) { | |
ma.error("Exception computing max bitrate", Gf); | |
} | |
try { | |
var n = na(); | |
n && (b.pdltime = n); | |
} catch (Gf) {} | |
try { | |
m(b, c.yb, { | |
prefix: "sm_" | |
}), m(b, c.Vx(), { | |
prefix: "vd_" | |
}); | |
} catch (Gf) {} | |
"undefined" !== typeof nrdp && nrdp.device && (b.firmware_version = nrdp.device.firmwareVersion); | |
a && c.ju && (b.pssh = c.ju); | |
c.Gb && c.Gb.Nc && c.Gb.Nc.keySystem && (b.keysys = c.Gb.Nc.keySystem); | |
if (w.Uh && ua) try { | |
var h = {}, | |
d = ua.getStats(void 0, void 0, c.H), | |
q = c.lE(), | |
v = d.Do.sna; | |
h.attempts = d.C6 || 0; | |
h.num_completed_tasks = v.length; | |
var R = Gg.KN, | |
k = {}, | |
t = Gc.hc.hX, | |
A = Gc.hc.Uk, | |
x = Gc.hc.iA, | |
u = Gc.hc.Zu, | |
z = Gc.hc.hA; | |
d.tf && (k.scheduled = d.tf - q); | |
var K = c.Vb; | |
K && jb(K.sG) && (k.preauthsent = K.sG - c.Nb, k.preauthreceived = K.SR - c.Nb); | |
var J = v.filter(R("type", "manifest")); | |
h.mf_succ = J.filter(R("status", t)).length; | |
h.mf_fail = J.filter(R("status", A)).length; | |
var Q = c.yb; | |
jb(Q.lg) && 0 > Q.lg && c.Nb && (k.ldlsent = Q.lc, k.ldlreceived = Q.lr); | |
var E = v.filter(R("type", "ldl")); | |
h.ldl_succ = E.filter(R("status", t)).length; | |
h.ldl_fail = E.filter(R("status", A)).length; | |
d = !0; | |
if (!k.preauthreceived || 0 <= k.preauthreceived) d = !1; | |
var M = E.filter(R("status", x)).length, | |
P = E.filter(R("status", u)).length, | |
ud = E.filter(R("status", z)).length; | |
w.uN && 0 === M + P + ud && (!k.ldlreceived || 0 <= k.ldlreceived) && (d = !1); | |
if (w.RD) { | |
var r = ua.mE(c.H); | |
if (r) { | |
if (r.gE && (k.headersent = r.gE - c.Nb), r.gF && (k.headerreceived = r.gF - c.Nb), r.fu && (k.prebuffstarted = r.fu - c.Nb), r.bz && (k.prebuffcomplete = r.bz - c.Nb), !k.prebuffcomplete || 0 <= k.prebuffcomplete) d = !1; | |
} else d = !1; | |
} | |
var aa = v.filter(R("type", "getHeadersAndMedia")); | |
h.hm_succ = aa.filter(R("status", t)).length; | |
h.hm_fail = aa.filter(R("status", A)).length; | |
m(b, h, { | |
prefix: "pr_" | |
}); | |
b.eventlist = ya.stringify(k); | |
b.prefetchCompleted = d; | |
ba(b); | |
} | |
catch (Gf) { | |
ma.warn("error in collecting video prepare data", Gf); | |
} | |
b.avtp = ie.Xf().nr; | |
w.qb && c.Ke && ia(b); | |
if (c.vc.value) try { | |
b.ttTrackFields = c.vc.value.cg; | |
} | |
catch (Gf) {} | |
if (v = c.Za && c.Za.value && c.Za.value.sa) { | |
var Hd = {}; | |
v.forEach(function(a) { | |
Hd[a.Rf] = void 0; | |
}); | |
b.audioProfiles = zb.keys(Hd); | |
} | |
if (v = c.Eb && c.Eb.value && c.Eb.value.sa) { | |
var ha = {}; | |
v.forEach(function(a) { | |
ha[a.Rf] = void 0; | |
}); | |
b.videoProfiles = zb.keys(ha); | |
} | |
la(b); | |
V(b); | |
pa(b); | |
da(b); | |
ra(b); | |
xb(b); | |
W("startplay", a, $b | Hf | Pb | ii | If | Hg | Zj, b); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment