Skip to content

Instantly share code, notes, and snippets.

@itseasy21
Last active May 22, 2022 02:30
Show Gist options
  • Save itseasy21/7d09d3daafaabb6c171c11bef8d5be36 to your computer and use it in GitHub Desktop.
Save itseasy21/7d09d3daafaabb6c171c11bef8d5be36 to your computer and use it in GitHub Desktop.
Cadmium Playercore modified to force DDPlus Dolby Atmos / 5.1 MultiChannel on Safari w/ MacOS with Spatial Audio for Netflix
This file has been truncated, but you can view the full file.
function a000() {}
a000.Z1v = function () {
return typeof a000.N1v.g1v === 'function' ? a000.N1v.g1v.apply(a000.N1v, arguments) : a000.N1v.g1v;
};
a000.N1v = (function (W1v) {
return {
R1v: function () {
var b1v,
r1v = arguments;
switch (W1v) {
case 20:
b1v = r1v[1] >= r1v[0];
break;
case 23:
b1v = r1v[0] * r1v[2] - r1v[1];
break;
case 8:
b1v = -r1v[3] - r1v[2] + -r1v[0] + r1v[1];
break;
case 1:
b1v = r1v[1] / r1v[0];
break;
case 22:
b1v = r1v[0] === r1v[1];
break;
case 15:
b1v = r1v[2] / r1v[1] - r1v[3] + r1v[0];
break;
case 5:
b1v = void r1v[0] !== r1v[1];
break;
case 14:
b1v = (r1v[2] / r1v[0]) | r1v[1];
break;
case 0:
b1v = r1v[1] - r1v[0];
break;
case 2:
b1v = (r1v[0] * r1v[1]) / r1v[2];
break;
case 3:
b1v = r1v[1] / r1v[0] / r1v[2];
break;
case 19:
b1v = (((r1v[1] + r1v[4]) * r1v[0]) / r1v[2]) * r1v[3];
break;
case 10:
b1v = (r1v[2] * r1v[4] + r1v[0]) * r1v[3] - r1v[1];
break;
case 13:
b1v = r1v[0] + (r1v[1] / r1v[3]) * r1v[2];
break;
case 17:
b1v = (r1v[2] - r1v[0] / r1v[3]) / r1v[4] + r1v[1] / r1v[5];
break;
case 9:
b1v = r1v[3] / r1v[2] + r1v[1] / r1v[0];
break;
case 21:
b1v = r1v[1] <= r1v[0];
break;
case 7:
b1v = r1v[4] + r1v[0] + r1v[3] + r1v[2] + r1v[1];
break;
case 12:
b1v = ((r1v[0] / r1v[1]) | r1v[2]) * r1v[3];
break;
case 11:
b1v = r1v[0] * r1v[1];
break;
case 18:
b1v = (r1v[1] - r1v[2]) * r1v[0];
break;
case 16:
b1v = r1v[2] * (r1v[0] + r1v[1] + r1v[4]) - r1v[3];
break;
case 6:
b1v = r1v[2] + r1v[0] + r1v[1];
break;
case 4:
b1v = r1v[0] + r1v[1];
break;
}
return b1v;
},
g1v: function (A1v) {
W1v = A1v;
},
};
})();
a000.h1v = function () {
return typeof a000.N1v.g1v === 'function' ? a000.N1v.g1v.apply(a000.N1v, arguments) : a000.N1v.g1v;
};
a000.J1v = function () {
return typeof a000.N1v.R1v === 'function' ? a000.N1v.R1v.apply(a000.N1v, arguments) : a000.N1v.R1v;
};
a000.E1v = function () {
return typeof a000.N1v.R1v === 'function' ? a000.N1v.R1v.apply(a000.N1v, arguments) : a000.N1v.R1v;
};
(function () {
(function (ob, Ab) {
var mc,
vc,
Ob,
id,
Cb,
Fb,
Yb,
qe,
re,
Kb,
Lb,
Dc,
se,
jd,
te,
ue,
Gd,
Ka,
Bb,
Xc,
ve,
Hd,
cb,
tb,
xb,
nc,
fc,
Tb,
ub,
Zb,
Nb,
Fc,
Ib,
Hb,
Jb,
ac,
kd,
oc,
jc,
kc,
ld,
Id,
we,
xc,
yc,
Gc,
Jd,
Oc,
pc,
md,
Cc,
Kd,
xe,
Pc,
Ld,
Md,
Nd,
Od,
qc,
Pd,
Qd,
Rd,
Rc,
rc,
sc,
Sc,
nd,
od,
pd,
dc,
Cf,
Mb,
Ec,
ye,
qd,
hc,
ze,
Df,
lc,
Ae,
Ef,
rd,
Be,
Ff,
Wc,
Ce,
Bf,
Gf,
Sd,
sd,
Hf,
If,
ne,
Jf,
oe,
De,
gc,
Yc,
Ee,
Zc,
Fe,
ic,
Ge,
Td,
He,
Ud,
td,
Ie,
Lf,
pe,
ud,
Fd,
Je,
Kf,
Ke,
Vd,
Le,
Me,
Ne,
Wd,
Bc,
Pe,
Oe,
Mf,
$c,
Qe,
Yd,
ad,
Re,
Xd,
Se,
Te,
Zd,
Ve,
We,
xd,
Jc,
Tc,
Kc,
Xe,
Ye,
Ze,
$e,
af,
bf,
yd,
Nf,
cf,
df,
ae,
ef,
cc,
Hc,
Qc,
Ic,
zc,
tc,
vd,
$b,
wc,
Ue,
bd,
Lc,
ff,
Of,
cd,
gf,
Pf,
Uc,
hf,
zd,
be,
dd,
ce,
jf,
ed,
kf,
lf,
mf,
Qf,
fd,
nf,
Rf,
Sf,
of,
$d,
wd,
pf,
Af,
qf,
Tf,
Vf,
Uf,
Vc,
hd,
Wf,
me,
Xf,
rf;
function Rb(hb, fb) {
if (!fb || 'utf-8' === fb) return Ad(hb);
throw Error('unsupported encoding');
}
function Qb(hb, fb) {
if (!fb || 'utf-8' === fb) return Bd(hb);
throw Error('unsupported encoding');
}
function Ad(hb) {
for (var fb = 0, eb, bb = hb.length, lb = ''; fb < bb; ) {
eb = hb[fb++];
if (eb & 128)
if (192 === (eb & 224)) eb = ((eb & 31) << 6) + (hb[fb++] & 63);
else if (224 === (eb & 240)) eb = ((eb & 15) << 12) + ((hb[fb++] & 63) << 6) + (hb[fb++] & 63);
else throw Error('unsupported character');
lb += String.fromCharCode(eb);
}
return lb;
}
function Bd(hb) {
var fb, eb, bb, lb, pb;
fb = hb.length;
eb = 0;
lb = 0;
for (bb = fb; bb--; ) {
pb = hb.charCodeAt(bb);
128 > pb ? eb++ : (eb = 2048 > pb ? eb + 2 : eb + 3);
}
eb = new Uint8Array(eb);
for (bb = 0; bb < fb; bb++) {
pb = hb.charCodeAt(bb);
128 > pb
? (eb[lb++] = pb)
: (2048 > pb
? (eb[lb++] = 192 | (pb >>> 6))
: ((eb[lb++] = 224 | (pb >>> 12)), (eb[lb++] = 128 | ((pb >>> 6) & 63))),
(eb[lb++] = 128 | (pb & 63)));
}
return eb;
}
function Vb(hb, fb) {
if (hb === fb) return !0;
if (!hb || !fb || hb.length != fb.length) return !1;
for (var eb = 0; eb < hb.length; ++eb) {
if (hb[eb] != fb[eb]) return !1;
}
return !0;
}
function bc(hb) {
var bb;
if (!((hb && hb.constructor == Uint8Array) || Array.isArray(hb)))
throw new TypeError('Cannot compute the hash code of ' + hb);
for (var fb = 1, eb = 0; eb < hb.length; ++eb) {
bb = hb[eb];
if ('number' !== typeof bb)
throw new TypeError('Cannot compute the hash code over non-numeric elements: ' + bb);
fb = (31 * fb + bb) & 4294967295;
}
return fb;
}
function he(hb, fb) {
var kb;
if (hb === fb) return !0;
if (!hb || !fb) return !1;
fb instanceof Array || (fb = [fb]);
for (var eb = 0; eb < fb.length; ++eb) {
for (var bb = fb[eb], lb = !1, pb = 0; pb < hb.length; ++pb) {
kb = hb[pb];
if ((bb.equals && 'function' === typeof bb.equals && bb.equals(kb)) || bb == kb) {
lb = !0;
break;
}
}
if (!lb) return !1;
}
return !0;
}
function ie(hb, fb) {
return he(hb, fb) && (hb.length == fb.length || he(fb, hb));
}
function La(hb, fb, eb) {
var bb, lb;
eb && (bb = eb);
if ('object' !== typeof hb || 'function' !== typeof hb.result || 'function' !== typeof hb.error)
throw new TypeError("callback must be an object with function properties 'result' and 'error'.");
try {
lb = fb.call(bb, hb);
lb !== Ab && hb.result(lb);
} catch (pb) {
try {
hb.error(pb);
} catch (kb) {}
}
}
function db(hb, fb, eb) {
if ('object' !== typeof hb || 'function' !== typeof hb.timeout)
throw new TypeError("callback must be an object with function properties 'result', 'timeout', and 'error'.");
La(hb, fb, eb);
}
function V(hb, fb, eb) {
1e5 > hb && (hb = 1e5 + hb);
Object.defineProperties(this, {
internalCode: { value: hb, writable: !1, configurable: !1 },
responseCode: { value: fb, writable: !1, configurable: !1 },
message: { value: eb, writable: !1, configurable: !1 },
});
}
function Cd(hb) {
switch (hb) {
case Mb.PSK:
case Mb.MGK:
return !0;
default:
return !1;
}
}
function je(hb) {
switch (hb) {
case Mb.PSK:
case Mb.MGK:
case Mb.X509:
case Mb.RSA:
case Mb.NPTICKET:
case Mb.ECC:
return !0;
default:
return !1;
}
}
function xf(hb) {
return hb.toJSON();
}
function ke(hb, fb) {
hd
? fb.result(hd)
: Promise.resolve()
.then(function () {
return Jb.getKeyByName(hb);
})
.catch(function () {
return Jb.generateKey({ name: hb }, !1, ['wrapKey', 'unwrapKey']);
})
.then(function (eb) {
hd = eb;
fb.result(hd);
})
.catch(function (eb) {
fb.error(new cb(V.INTERNAL_EXCEPTION, 'Unable to get system key'));
});
}
function le(hb, fb) {
var eb, bb;
eb = fb.masterToken;
bb = fb.userIdToken;
fb = fb.serviceTokens;
return {
NccpMethod: hb.method,
UserId: hb.userId,
UT: bb && bb.serialNumber,
MT: eb && eb.serialNumber + ':' + eb.sequenceNumber,
STCount: fb && fb.length,
};
}
function yf(hb) {
return hb.uniqueKey();
}
function zf(hb, fb, eb, bb, lb) {
var Qa;
function pb(za, na) {
za.errorCode === Ka.ENTITY_REAUTH || za.errorCode === Ka.ENTITYDATA_REAUTH
? (bb.clearCryptoContexts(), Ma())
: (za.errorCode !== Ka.USER_REAUTH && za.errorCode !== Ka.USERDATA_REAUTH) || kb(na);
}
function kb(za) {
if ((za = bb.getUserIdToken(za))) bb.removeUserIdToken(za), Ma();
}
function Ha(za, na, ha) {
var ba;
ba = [];
(function ia() {
za.read(-1, na, {
result: function (fa) {
La(ha, function () {
var U, Y, sa, pa, ta;
if (fa) ba.push(fa), ia();
else
switch (ba.length) {
case 0:
return new Uint8Array(0);
case 1:
return ba[0];
default:
(sa = ba.length), (pa = 0);
for (Y = U = 0; Y < sa; Y++) {
U += ba[Y].length;
}
U = new Uint8Array(U);
for (Y = 0; Y < sa; Y++) {
ta = ba[Y];
U.set(ta, pa);
pa += ta.length;
}
return U;
}
});
},
timeout: function () {
ha.timeout();
},
error: function (fa) {
ha.error(fa);
},
});
})();
}
function Ma() {
bb.getStoreState({
result: function (za) {
for (var na = Qa.slice(), ha = 0; ha < na.length; ha++) {
na[ha]({ storeState: za });
}
},
timeout: function () {
hb.error('Timeout getting store state', '' + e);
},
error: function (za) {
hb.error('Error getting store state', '' + za);
},
});
}
Qa = [];
this.addEventHandler = function (za, na) {
switch (za) {
case 'shouldpersist':
Qa.push(na);
}
};
this.send = function (za) {
return new Promise(function (na, ha) {
var ba, ca, ia;
ba = za.timeout;
ca = new me(hb, eb, za, bb.getKeyRequestData());
ia = new ne(za.url);
hb.trace('Sending MSL request');
fb.request(eb, ca, ia, ba, {
result: function (fa) {
var U;
hb.trace('Received MSL response', { Method: za.method });
if (fa) {
za.allowTokenRefresh && Ma();
U = fa.getErrorHeader();
U
? (pb(U, za.profileGuid || za.userId), ha({ success: !1, error: U }))
: Ha(fa, ba, {
result: function (Y) {
na({ success: !0, body: Rb(Y) });
},
timeout: function () {
ha({ success: !1, subCode: lb.MSL_READ_TIMEOUT });
},
error: function (Y) {
ha({ success: !1, error: Y });
},
});
} else
ha({
success: !1,
error: new cb(V.INTERNAL_EXCEPTION, 'Null response stream'),
description: 'Null response stream',
});
},
timeout: function () {
ha({ success: !1, subCode: lb.MSL_REQUEST_TIMEOUT });
},
error: function (fa) {
ha({ success: !1, error: fa });
},
});
});
};
this.hasUserIdToken = function (za) {
return !!bb.getUserIdToken(za);
};
this.getUserIdTokenKeys = function () {
return bb.getUserIdTokenKeys();
};
this.removeUserIdToken = kb;
this.clearUserIdTokens = function () {
bb.clearUserIdTokens();
Ma();
};
this.isErrorReauth = function (za) {
return za && za.errorCode == Ka.USERDATA_REAUTH;
};
this.isErrorHeader = function (za) {
return za instanceof Bc;
};
this.getErrorCode = function (za) {
return za && za.errorCode;
};
this.getStateForMdx = function (za) {
var na, ha;
na = bb.getMasterToken();
za = bb.getUserIdToken(za);
ha = bb.getCryptoContext(na);
return { masterToken: na, userIdToken: za, cryptoContext: ha };
};
this.buildPlayDataRequest = function (za, na) {
var ha;
ha = new oe();
fb.request(eb, new me(hb, eb, za), ha, za.timeout, {
result: function () {
na.result(ha.getRequest());
},
error: function () {
na.result(ha.getRequest());
},
timeout: function () {
na.timeout();
},
});
};
this.rekeyUserIdToken = function (za, na) {
bb.rekeyUserIdToken(za, na);
Ma();
};
this.getServiceTokens = function (za) {
var na;
na = bb.getMasterToken();
(za = bb.getUserIdToken(za)) && !za.isBoundTo(na) && (za = Ab);
return bb.getServiceTokens(na, za);
};
this.removeServiceToken = function (za) {
var na;
na = bb.getMasterToken();
bb.getServiceTokens(na).find(function (ha) {
return ha.name === za;
}) && (bb.removeServiceTokens(za, na), Ma());
};
}
function Dd(hb, fb, eb, bb, lb, pb) {
function kb(Ha) {
var Ma;
return Promise.resolve()
.then(function () {
Ma = hb.authenticationKeyNames[Ha];
if (!Ma) throw new cb(V.KEY_IMPORT_ERROR, 'Invalid config keyName ' + Ha);
return Jb.getKeyByName(Ma);
})
.then(function (Qa) {
return new Promise(function (za, na) {
Oc(Qa, {
result: za,
error: function () {
na(new cb(V.KEY_IMPORT_ERROR, 'Unable to create ' + Ma + ' CipherKey'));
},
});
});
})
.catch(function (Qa) {
throw new cb(V.KEY_IMPORT_ERROR, 'Unable to import ' + Ma, Qa);
});
}
return Promise.resolve()
.then(function () {
if (!Jb.getKeyByName) throw new cb(V.INTERNAL_EXCEPTION, 'No WebCrypto cryptokeys');
return Promise.all([kb('e'), kb('h'), kb('w')]);
})
.then(function (Ha) {
var Ma, Qa, za;
Ma = {};
Ma[fb] = new eb(hb.esn, Ha[0], Ha[1], Ha[2]);
Ha = new bb(hb.esn);
Qa = new Af();
Qa = [new lb(Qa)];
za = new pb(fb);
return { entityAuthFactories: Ma, entityAuthData: Ha, keyExchangeFactories: Qa, keyRequestData: za };
});
}
function Ed(hb, fb, eb) {
var pb;
function bb() {
return Promise.resolve()
.then(function () {
return Jb.generateKey(fb, !1, ['wrapKey', 'unwrapKey']);
})
.then(function (kb) {
return lb(kb.publicKey, kb.privateKey);
});
}
function lb(kb, Ha) {
return Promise.all([
new Promise(function (Ma, Qa) {
Cc(kb, {
result: Ma,
error: function (za) {
Qa(new cb(V.INTERNAL_EXCEPTION, 'Unable to create keyx public key', za));
},
});
}),
new Promise(function (Ma, Qa) {
Pc(Ha, {
result: Ma,
error: function (za) {
Qa(new cb(V.INTERNAL_EXCEPTION, 'Unable to create keyx private key', za));
},
});
}),
]).then(function (Ma) {
Ma = new Fd('rsaKeypairId', eb, Ma[0], Ma[1]);
pb && (Ma.storeData = { keyxPublicKey: kb, keyxPrivateKey: Ha });
return Ma;
});
}
pb = !hb.systemKeyWrapFormat;
return Promise.resolve()
.then(function () {
var kb, Ha;
kb = hb.storeState;
Ha = kb && kb.keyxPublicKey;
kb = kb && kb.keyxPrivateKey;
return pb && Ha && kb ? lb(Ha, kb) : bb();
})
.then(function (kb) {
var Ha, Ma, Qa;
Ha = {};
Ha[Mb.NONE] = new Bf();
Ma = new Wc(hb.esn);
Qa = [new pe()];
return {
entityAuthFactories: Ha,
entityAuthData: Ma,
keyExchangeFactories: Qa,
keyRequestData: kb,
createKeyRequestData: pb ? bb : Ab,
};
});
}
vc = ob.nfCrypto || ob.msCrypto || ob.webkitCrypto || ob.crypto;
Ob = vc && (vc.webkitSubtle || vc.subtle);
id = ob.nfCryptokeys || ob.msCryptokeys || ob.webkitCryptokeys || ob.cryptokeys;
(function (hb) {
var fb, eb;
fb = (function () {
function bb(lb, pb) {
lb instanceof fb
? ((this.abv = lb.abv), (this.position = lb.position))
: ((this.abv = lb), (this.position = pb || 0));
}
bb.prototype = {
readByte: function () {
return this.abv[this.position++];
},
writeByte: function (lb) {
this.abv[this.position++] = lb;
},
peekByte: function (lb) {
return this.abv[lb];
},
copyBytes: function (lb, pb, kb) {
var Ha;
Ha = new Uint8Array(this.abv.buffer, this.position, kb);
lb = new Uint8Array(lb.buffer, pb, kb);
Ha.set(lb);
this.position += kb;
},
seek: function (lb) {
this.position = lb;
},
skip: function (lb) {
this.position += lb;
},
getPosition: function () {
return this.position;
},
setPosition: function (lb) {
this.position = lb;
},
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 bb;
})();
eb = {};
(function () {
var fa, U, Y, sa, pa, ta, Ca, ua, qa;
function bb(W, aa) {
var da;
aa.writeByte((W.tagClass << 6) | (W.constructed << 5) | W.tag);
da = W.payloadLen;
if (128 > da) aa.writeByte(da);
else {
for (var oa = da, Ia = 0; oa; ) {
++Ia;
oa >>= 8;
}
aa.writeByte(128 | Ia);
for (oa = 0; oa < Ia; ++oa) {
aa.writeByte((da >> (8 * (Ia - oa - 1))) & 255);
}
}
if (W.child)
for (W.tag == fa.BIT_STRING && aa.writeByte(0), W = W._child; W; ) {
if (!bb(W, aa)) return !1;
W = W.next;
}
else
switch (W.tag) {
case fa.INTEGER:
W.backingStore[W.dataIdx] >> 7 && aa.writeByte(0);
aa.copyBytes(W.backingStore, W.dataIdx, W.dataLen);
break;
case fa.BIT_STRING:
aa.writeByte(0);
aa.copyBytes(W.backingStore, W.dataIdx, W.dataLen);
break;
case fa.OCTET_STRING:
aa.copyBytes(W.backingStore, W.dataIdx, W.dataLen);
break;
case fa.OBJECT_IDENTIFIER:
aa.copyBytes(W.backingStore, W.dataIdx, W.dataLen);
}
return !0;
}
function lb(W) {
var aa, da;
aa = W.readByte();
da = aa & 127;
if (da == aa) return da;
if (3 < da || 0 === da) return -1;
for (var oa = (aa = 0); oa < da; ++oa) {
aa = (aa << 8) | W.readByte();
}
return aa;
}
function pb(W, aa, da) {
var oa, Ia, Fa, Pa, Ra, ka, xa;
oa = W.backingStore;
Ia = new fb(oa, aa);
aa += da;
da = W;
if (8 < pa++) return Ab;
for (; Ia.getPosition() < aa; ) {
Ia.getPosition();
Pa = Ia.readByte();
if (31 == (Pa & 31)) {
for (Fa = 0; Pa & 128; ) {
Fa <<= 8;
Fa |= Pa & 127;
}
Pa = Fa;
}
Ra = Pa;
Fa = Ra & 31;
if (0 > Fa || 30 < Fa) return Ab;
Pa = lb(Ia);
if (0 > Pa || Pa > Ia.getRemaining()) return Ab;
da.constructed = Ra & 32;
da.tagClass = (Ra & 192) >> 6;
da.tag = Fa;
da.dataLen = Pa;
da.dataIdx = Ia.getPosition();
Fa = Ia;
ka = Ra;
Ra = Pa;
if (ka & 32) Fa = !0;
else if (ka < fa.BIT_STRING || ka > fa.OCTET_STRING) Fa = !1;
else {
xa = new fb(Fa);
ka == fa.BIT_STRING && xa.skip(1);
(xa.readByte() >> 6) & 1
? (Fa = !1)
: ((ka = lb(xa)), (Fa = xa.getPosition() - Fa.getPosition() + ka == Ra));
}
Fa &&
((Fa = Ia.getPosition()),
(Ra = Pa),
da.tag == fa.BIT_STRING && (da.dataIdx++, da.dataLen--, Fa++, Ra--),
(da.child = new U(oa, da)),
pb(da.child, Fa, Ra));
da.tag == fa.INTEGER &&
((Fa = Ia.getPosition()),
0 == Ia.peekByte(Fa) && Ia.peekByte(Fa + 1) >> 7 && (da.dataIdx++, da.dataLen--));
Ia.skip(Pa);
Ia.getPosition() < aa && ((da.next = new U(oa, da.parent)), (da = da.next));
}
pa--;
return W;
}
function kb(W, aa, da) {
if (9 != da) return !1;
for (da = 0; 9 > da; ++da) {
if (W[aa++] != ta[da]) return !1;
}
return !0;
}
function Ha(W) {
var aa;
if (!(W && W.child && W.child.next && W.child.child && W.child.next.child)) return !1;
aa = W.child.child;
return kb(aa.backingStore, aa.dataIdx, aa.dataLen) &&
2 == W.nChildren &&
2 == W.child.nChildren &&
2 == W.child.next.child.nChildren
? !0
: !1;
}
function Ma(W) {
var aa;
if (!(W && W.child && W.child.next && W.child.next.child && W.child.next.next && W.child.next.next.child))
return !1;
aa = W.child.next.child;
return kb(aa.backingStore, aa.dataIdx, aa.dataLen) &&
3 == W.nChildren &&
2 == W.child.next.nChildren &&
9 == W.child.next.next.child.nChildren
? !0
: !1;
}
function Qa(W) {
var aa, da;
aa = Y.createSequenceNode();
da = new sa(aa);
da.addChild(Y.createSequenceNode());
da.addChild(Y.createOidNode(ta));
da.addSibling(Y.createNullNode());
da.addToParent(aa, Y.createBitStringNode(null));
da.addChild(Y.createSequenceNode());
da.addChild(Y.createIntegerNode(W.n));
da.addSibling(Y.createIntegerNode(W.e));
return aa;
}
function za(W) {
var aa;
W = W.child.next.child.child;
aa = W.data;
W = W.next;
return new Ca(aa, W.data, null, null);
}
function na(W) {
var aa, da;
aa = Y.createSequenceNode();
da = new sa(aa);
da.addChild(Y.createIntegerNode(new Uint8Array([0])));
da.addSibling(Y.createSequenceNode());
da.addChild(Y.createOidNode(ta));
da.addSibling(Y.createNullNode());
da.addToParent(aa, Y.createOctetStringNode(null));
da.addChild(Y.createSequenceNode());
da.addChild(Y.createIntegerNode(new Uint8Array([0])));
da.addSibling(Y.createIntegerNode(W.n));
da.addSibling(Y.createIntegerNode(W.e));
da.addSibling(Y.createIntegerNode(W.d));
da.addSibling(Y.createIntegerNode(W.p));
da.addSibling(Y.createIntegerNode(W.q));
da.addSibling(Y.createIntegerNode(W.dp));
da.addSibling(Y.createIntegerNode(W.dq));
da.addSibling(Y.createIntegerNode(W.qi));
return aa;
}
function ha(W) {
var aa;
aa = [];
W = W.child.next.next.child.child.next;
for (var da = 0; 8 > da; da++) {
aa.push(W.data);
W = W.next;
}
return new ua(aa[0], aa[1], aa[2], aa[3], aa[4], aa[5], aa[6], aa[7]);
}
function ba(W, aa, da, oa) {
if (!(W instanceof Ca || W instanceof ua)) return Ab;
if (da)
for (var Ia = 0; Ia < da.length; ++Ia) {
if (-1 == qa.indexOf(da[Ia])) return Ab;
}
aa = { kty: 'RSA', alg: aa, key_ops: da || [], ext: oa == Ab ? !1 : oa, n: Cb(W.n, !0), e: Cb(W.e, !0) };
W instanceof ua &&
((aa.d = Cb(W.d, !0)),
(aa.p = Cb(W.p, !0)),
(aa.q = Cb(W.q, !0)),
(aa.dp = Cb(W.dp, !0)),
(aa.dq = Cb(W.dq, !0)),
(aa.qi = Cb(W.qi, !0)));
return aa;
}
function ca(W) {
var aa, da, oa, Ia, Fa, Pa, Ra, ka, xa, ya;
if (!W.kty || 'RSA' != W.kty || !W.n || !W.e) return Ab;
aa = 'RSA1_5 RSA-OAEP RSA-OAEP-256 RSA-OAEP-384 RSA-OAEP-512 RS256 RS384 RS512'.split(' ');
if (W.alg && -1 == aa.indexOf(W.alg)) return Ab;
aa = [];
W.use
? 'enc' == W.use
? (aa = ['encrypt', 'decrypt', 'wrap', 'unwrap'])
: 'sig' == W.use && (aa = ['sign', 'verify'])
: (aa = W.key_ops);
da = W.ext;
oa = Fb(W.n, !0);
Ia = Fb(W.e, !0);
if (W.d) {
Fa = Fb(W.d, !0);
Pa = Fb(W.p, !0);
Ra = Fb(W.q, !0);
ka = Fb(W.dp, !0);
xa = Fb(W.dq, !0);
ya = Fb(W.qi, !0);
return new ua(oa, Ia, Fa, Pa, Ra, ka, xa, ya, W.alg, aa, da);
}
return new Ca(oa, Ia, da, aa);
}
function ia(W, aa, da, oa) {
this.der = W;
this.type = aa;
this.keyOps = da;
this.extractable = oa;
}
fa = {
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,
};
U = function (W, aa, da, oa, Ia, Fa) {
this._data = W;
this._parent = aa || Ab;
this._constructed = da || !1;
this._tagClass = 0;
this._tag = oa || 0;
this._dataIdx = Ia || 0;
this._dataLen = Fa || 0;
};
U.prototype = {
_child: Ab,
_next: Ab,
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(W) {
this._constructed = 0 != W ? !0 : !1;
},
get tagClass() {
return this._tagClass;
},
set tagClass(W) {
this._tagClass = W;
},
get tag() {
return this._tag;
},
set tag(W) {
this._tag = W;
},
get dataIdx() {
return this._dataIdx;
},
set dataIdx(W) {
this._dataIdx = W;
},
get dataLen() {
return this._dataLen;
},
set dataLen(W) {
this._dataLen = W;
},
get child() {
return this._child;
},
set child(W) {
this._child = W;
this._child.parent = this;
},
get next() {
return this._next;
},
set next(W) {
this._next = W;
},
get parent() {
return this._parent;
},
set parent(W) {
this._parent = W;
},
get payloadLen() {
var W;
W = 0;
if (this._child) {
for (var aa = this._child; aa; ) {
W += aa.length;
aa = aa.next;
}
this._tag == fa.BIT_STRING && W++;
} else
switch (this._tag) {
case fa.INTEGER:
W = this._dataLen;
this._data[this._dataIdx] >> 7 && W++;
break;
case fa.BIT_STRING:
W = this._dataLen + 1;
break;
case fa.OCTET_STRING:
W = this._dataLen;
break;
case fa.NULL:
W = 0;
break;
case fa.OBJECT_IDENTIFIER:
kb(this._data, this._dataIdx, this._dataLen) && (W = 9);
}
return W;
},
get length() {
var W, aa;
W = this.payloadLen;
if (127 < W)
for (aa = W; aa; ) {
aa >>= 8;
++W;
}
return W + 2;
},
get der() {
var W, aa;
W = this.length;
if (!W) return Ab;
W = new Uint8Array(W);
aa = new fb(W);
return bb(this, aa) ? W : Ab;
},
get nChildren() {
for (var W = 0, aa = this._child; aa; ) {
W++;
aa = aa.next;
}
return W;
},
};
Y = {
createSequenceNode: function () {
return new U(null, null, !0, fa.SEQUENCE, null, null);
},
createOidNode: function (W) {
return new U(W, null, !1, fa.OBJECT_IDENTIFIER, 0, W ? W.length : 0);
},
createNullNode: function () {
return new U(null, null, !1, fa.NULL, null, null);
},
createBitStringNode: function (W) {
return new U(W, null, !1, fa.BIT_STRING, 0, W ? W.length : 0);
},
createIntegerNode: function (W) {
return new U(W, null, !1, fa.INTEGER, 0, W ? W.length : 0);
},
createOctetStringNode: function (W) {
return new U(W, null, !1, fa.OCTET_STRING, 0, W ? W.length : 0);
},
};
sa = function (W) {
this._currentNode = this._rootNode = W;
};
sa.prototype = {
addChild: function (W) {
this.addTo(this._currentNode, W);
},
addSibling: function (W) {
this.addTo(this._currentNode.parent, W);
},
addTo: function (W, aa) {
this._currentNode = aa;
this._currentNode.parent = W;
if (W.child) {
for (W = W.child; W.next; ) {
W = W.next;
}
W.next = aa;
} else W.child = aa;
},
addToParent: function (W, aa) {
this.findNode(W) && this.addTo(W, aa);
},
findNode: function (W) {
for (var aa = this._currentNode; aa; ) {
if (W == aa) return !0;
aa = aa.parent;
}
return !1;
},
};
pa = 0;
ta = new Uint8Array([42, 134, 72, 134, 247, 13, 1, 1, 1]);
Ca = function (W, aa, da, oa) {
this.n = W;
this.e = aa;
this.ext = da;
this.keyOps = oa;
};
ua = function (W, aa, da, oa, Ia, Fa, Pa, Ra, ka, xa, ya) {
this.n = W;
this.e = aa;
this.d = da;
this.p = oa;
this.q = Ia;
this.dp = Fa;
this.dq = Pa;
this.qi = Ra;
this.alg = ka;
this.keyOps = xa;
this.ext = ya;
};
qa = 'sign verify encrypt decrypt wrapKey unwrapKey deriveKey deriveBits'.split(' ');
ia.prototype.getDer = function () {
return this.der;
};
ia.prototype.getType = function () {
return this.type;
};
ia.prototype.getKeyOps = function () {
return this.keyOps;
};
ia.prototype.getExtractable = function () {
return this.extractable;
};
eb.parse = function (W) {
pa = 0;
return pb(new U(W), 0, W.length);
};
eb.show = function (W, aa) {};
eb.isRsaSpki = Ha;
eb.isRsaPkcs8 = Ma;
eb.NodeFactory = Y;
eb.Builder = sa;
eb.tagVal = fa;
eb.RsaPublicKey = Ca;
eb.RsaPrivateKey = ua;
eb.buildRsaSpki = Qa;
eb.parseRsaSpki = function (W) {
W = eb.parse(W);
return Ha ? za(W) : Ab;
};
eb.buildRsaPkcs8 = na;
eb.parseRsaPkcs8 = function (W) {
W = eb.parse(W);
return Ma(W) ? ha(W) : Ab;
};
eb.buildRsaJwk = ba;
eb.parseRsaJwk = ca;
eb.RsaDer = ia;
eb.rsaDerToJwk = function (W, aa, da, oa) {
W = eb.parse(W);
if (!W) return Ab;
if (Ha(W)) W = za(W);
else if (Ma(W)) W = ha(W);
else return Ab;
return ba(W, aa, da, oa);
};
eb.jwkToRsaDer = function (W) {
var aa, da;
W = ca(W);
if (!W) return Ab;
if (W instanceof Ca) {
aa = 'spki';
da = Qa(W).der;
} else if (W instanceof ua) (aa = 'pkcs8'), (da = na(W).der);
else return Ab;
return new ia(da, aa, W.keyOps, W.ext);
};
eb.webCryptoAlgorithmToJwkAlg = function (W) {
return 'RSAES-PKCS1-v1_5' == W.name
? 'RSA1_5'
: 'RSASSA-PKCS1-v1_5' == W.name
? 'SHA-256' == W.hash.name
? 'RS256'
: 'SHA-384' == W.hash.name
? 'RS384'
: 'SHA-512' == W.hash.name
? 'RS512'
: Ab
: Ab;
};
eb.webCryptoUsageToJwkKeyOps = function (W) {
return W.map(function (aa) {
return 'wrapKey' == aa ? 'wrap' : 'unwrapKey' == aa ? 'unwrap' : aa;
});
};
})();
hb.ASN1 = eb;
})(ob);
(function () {
for (
var hb = {},
fb = {},
eb = { '=': 0, '.': 0 },
bb = { '=': 0, '.': 0 },
lb = /\s+/g,
pb = /^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/_-]*[=]{0,2}$/,
kb = 64;
kb--;
) {
hb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'[kb]] = 262144 * kb;
fb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'[kb]] = 4096 * kb;
eb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'[kb]] = 64 * kb;
bb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'[kb]] = kb;
}
for (
kb = 64;
kb-- &&
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'[kb] !=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'[kb];
) {
hb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'[kb]] = 262144 * kb;
fb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'[kb]] = 4096 * kb;
eb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'[kb]] = 64 * kb;
bb['ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'[kb]] = kb;
}
Cb = function (Ha, Ma) {
for (
var Qa = '',
za = 0,
na = Ha.length,
ha = na - 2,
ba = Ma
? 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'
: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
ca = Ma ? '' : '=';
za < ha;
) {
Ma = 65536 * Ha[za++] + 256 * Ha[za++] + Ha[za++];
Qa += ba[Ma >>> 18] + ba[(Ma >>> 12) & 63] + ba[(Ma >>> 6) & 63] + ba[Ma & 63];
}
za == ha
? ((Ma = 65536 * Ha[za++] + 256 * Ha[za++]),
(Qa += ba[Ma >>> 18] + ba[(Ma >>> 12) & 63] + ba[(Ma >>> 6) & 63] + ca))
: za == na - 1 && ((Ma = 65536 * Ha[za++]), (Qa += ba[Ma >>> 18] + ba[(Ma >>> 12) & 63] + ca + ca));
return Qa;
};
Fb = function (Ha, Ma) {
Ha = Ha.replace(lb, '');
if (Ma && (Ma = Ha.length % 4)) {
Ma = 4 - Ma;
for (var Qa = 0; Qa < Ma; ++Qa) {
Ha += '=';
}
}
Ma = Ha.length;
if (0 != Ma % 4 || !pb.test(Ha)) throw Error('bad base64: ' + Ha);
for (
var za = (Ma / 4) * 3 - ('=' == Ha[Ma - 1] ? 1 : 0) - ('=' == Ha[Ma - 2] ? 1 : 0),
na = new Uint8Array(za),
ha = 0,
ba = 0;
ha < Ma;
) {
Qa = hb[Ha[ha++]] + fb[Ha[ha++]] + eb[Ha[ha++]] + bb[Ha[ha++]];
na[ba++] = Qa >>> 16;
ba < za && ((na[ba++] = (Qa >>> 8) & 255), ba < za && (na[ba++] = Qa & 255));
}
return na;
};
})();
Yb = {};
(function () {
var pb, kb, Ha, Qa;
function hb(za) {
if (!(this instanceof hb)) return new hb(za);
for (var na = 0, ha = kb.length; na < ha; na++) {
this[kb[na]] = '';
}
this.bufferCheckPosition = Yb.MAX_BUFFER_LENGTH;
this.q = this.c = this.p = '';
this.opt = za || {};
this.closed = this.closedRoot = this.sawRoot = !1;
this.tag = this.error = null;
this.state = Ha.BEGIN;
this.stack = new pb();
this.index = this.position = this.column = 0;
this.line = 1;
this.slashed = !1;
this.unicodeI = 0;
this.unicodeS = null;
fb(this, 'onready');
}
function fb(za, na, ha) {
if (za[na]) za[na](ha);
}
function eb(za, na) {
var ha, ba;
ha = za.opt;
ba = za.textNode;
ha.trim && (ba = ba.trim());
ha.normalize && (ba = ba.replace(/\s+/g, ' '));
za.textNode = ba;
za.textNode && fb(za, na ? na : 'onvalue', za.textNode);
za.textNode = '';
}
function bb(za, na) {
eb(za);
na += '\nLine: ' + za.line + '\nColumn: ' + za.column + '\nChar: ' + za.c;
na = Error(na);
za.error = na;
fb(za, 'onerror', na);
return za;
}
function lb(za) {
za.state !== Ha.VALUE && bb(za, 'Unexpected end');
eb(za);
za.c = '';
za.closed = !0;
fb(za, 'onend');
hb.call(za, za.opt);
return za;
}
pb = Array;
Yb.parser = function (za) {
return new hb(za);
};
Yb.CParser = hb;
Yb.MAX_BUFFER_LENGTH = 65536;
Yb.DEBUG = !1;
Yb.INFO = !1;
Yb.EVENTS = 'value string key openobject closeobject openarray closearray error end ready'.split(' ');
kb = ['textNode', 'numberNode'];
Yb.EVENTS.filter(function (za) {
return 'error' !== za && 'end' !== za;
});
Ha = 0;
Yb.STATE = {
BEGIN: Ha++,
VALUE: Ha++,
OPEN_OBJECT: Ha++,
CLOSE_OBJECT: Ha++,
OPEN_ARRAY: Ha++,
CLOSE_ARRAY: Ha++,
TEXT_ESCAPE: Ha++,
STRING: Ha++,
BACKSLASH: Ha++,
END: Ha++,
OPEN_KEY: Ha++,
CLOSE_KEY: Ha++,
TRUE: Ha++,
TRUE2: Ha++,
TRUE3: Ha++,
FALSE: Ha++,
FALSE2: Ha++,
FALSE3: Ha++,
FALSE4: Ha++,
NULL: Ha++,
NULL2: Ha++,
NULL3: Ha++,
NUMBER_DECIMAL_POINT: Ha++,
NUMBER_DIGIT: Ha++,
};
for (var Ma in Yb.STATE) {
Yb.STATE[Yb.STATE[Ma]] = Ma;
}
Ha = Yb.STATE;
Object.getPrototypeOf ||
(Object.getPrototypeOf = function (za) {
return za.__proto__;
});
Qa = /[\\"\n]/g;
hb.prototype = {
end: function () {
lb(this);
},
write: function (za) {
var ba, ca, ia;
if (this.error) throw this.error;
if (this.closed) return bb(this, 'Cannot write after close. Assign an onready handler.');
if (null === za) return lb(this);
for (var na = za[0], ha; na; ) {
ha = na;
this.c = na = za.charAt(this.index++);
ha !== na ? (this.p = ha) : (ha = this.p);
if (!na) break;
this.position++;
'\n' === na ? (this.line++, (this.column = 0)) : this.column++;
switch (this.state) {
case Ha.BEGIN:
'{' === na
? (this.state = Ha.OPEN_OBJECT)
: '[' === na
? (this.state = Ha.OPEN_ARRAY)
: '\r' !== na && '\n' !== na && ' ' !== na && '\t' !== na && bb(this, 'Non-whitespace before {[.');
continue;
case Ha.OPEN_KEY:
case Ha.OPEN_OBJECT:
if ('\r' === na || '\n' === na || ' ' === na || '\t' === na) continue;
if (this.state === Ha.OPEN_KEY) this.stack.push(Ha.CLOSE_KEY);
else if ('}' === na) {
fb(this, 'onopenobject');
fb(this, 'oncloseobject');
this.state = this.stack.pop() || Ha.VALUE;
continue;
} else this.stack.push(Ha.CLOSE_OBJECT);
'"' === na ? (this.state = Ha.STRING) : bb(this, 'Malformed object key should start with "');
continue;
case Ha.CLOSE_KEY:
case Ha.CLOSE_OBJECT:
if ('\r' === na || '\n' === na || ' ' === na || '\t' === na) continue;
':' === na
? (this.state === Ha.CLOSE_OBJECT
? (this.stack.push(Ha.CLOSE_OBJECT), eb(this, 'onopenobject'))
: eb(this, 'onkey'),
(this.state = Ha.VALUE))
: '}' === na
? (eb(this), fb(this, 'oncloseobject', void 0), (this.state = this.stack.pop() || Ha.VALUE))
: ',' === na
? (this.state === Ha.CLOSE_OBJECT && this.stack.push(Ha.CLOSE_OBJECT),
eb(this),
(this.state = Ha.OPEN_KEY))
: bb(this, 'Bad object');
continue;
case Ha.OPEN_ARRAY:
case Ha.VALUE:
if ('\r' === na || '\n' === na || ' ' === na || '\t' === na) continue;
if (this.state === Ha.OPEN_ARRAY)
if ((fb(this, 'onopenarray'), (this.state = Ha.VALUE), ']' === na)) {
fb(this, 'onclosearray');
this.state = this.stack.pop() || Ha.VALUE;
continue;
} else this.stack.push(Ha.CLOSE_ARRAY);
'"' === na
? (this.state = Ha.STRING)
: '{' === na
? (this.state = Ha.OPEN_OBJECT)
: '[' === na
? (this.state = Ha.OPEN_ARRAY)
: 't' === na
? (this.state = Ha.TRUE)
: 'f' === na
? (this.state = Ha.FALSE)
: 'n' === na
? (this.state = Ha.NULL)
: '-' === na
? (this.numberNode += na)
: '0' === na
? ((this.numberNode += na), (this.state = Ha.NUMBER_DIGIT))
: -1 !== '123456789'.indexOf(na)
? ((this.numberNode += na), (this.state = Ha.NUMBER_DIGIT))
: bb(this, 'Bad value');
continue;
case Ha.CLOSE_ARRAY:
if (',' === na) this.stack.push(Ha.CLOSE_ARRAY), eb(this, 'onvalue'), (this.state = Ha.VALUE);
else if (']' === na)
eb(this), fb(this, 'onclosearray', void 0), (this.state = this.stack.pop() || Ha.VALUE);
else if ('\r' === na || '\n' === na || ' ' === na || '\t' === na) continue;
else bb(this, 'Bad array');
continue;
case Ha.STRING:
ha = this.index - 1;
(ba = this.slashed), (ca = this.unicodeI);
a: for (;;) {
if (Yb.DEBUG)
for (; 0 < ca; ) {
if (
((this.unicodeS += na),
(na = za.charAt(this.index++)),
4 === ca
? ((this.textNode += String.fromCharCode(parseInt(this.unicodeS, 16))),
(ca = 0),
(ha = this.index - 1))
: ca++,
!na)
)
break a;
}
if ('"' === na && !ba) {
this.state = this.stack.pop() || Ha.VALUE;
(this.textNode += za.substring(ha, this.index - 1)) || fb(this, 'onvalue', '');
break;
}
if (
'\\' === na &&
!ba &&
((ba = !0),
(this.textNode += za.substring(ha, this.index - 1)),
(na = za.charAt(this.index++)),
!na)
)
break;
if (ba)
if (
((ba = !1),
'n' === na
? (this.textNode += '\n')
: 'r' === na
? (this.textNode += '\r')
: 't' === na
? (this.textNode += '\t')
: 'f' === na
? (this.textNode += '\f')
: 'b' === na
? (this.textNode += '\b')
: 'u' === na
? ((ca = 1), (this.unicodeS = ''))
: (this.textNode += na),
(na = za.charAt(this.index++)),
(ha = this.index - 1),
na)
)
continue;
else break;
Qa.lastIndex = this.index;
ia = Qa.exec(za);
if (null === ia) {
this.index = za.length + 1;
this.textNode += za.substring(ha, this.index - 1);
break;
}
this.index = ia.index + 1;
na = za.charAt(ia.index);
if (!na) {
this.textNode += za.substring(ha, this.index - 1);
break;
}
}
this.slashed = ba;
this.unicodeI = ca;
continue;
case Ha.TRUE:
if ('' === na) continue;
'r' === na ? (this.state = Ha.TRUE2) : bb(this, 'Invalid true started with t' + na);
continue;
case Ha.TRUE2:
if ('' === na) continue;
'u' === na ? (this.state = Ha.TRUE3) : bb(this, 'Invalid true started with tr' + na);
continue;
case Ha.TRUE3:
if ('' === na) continue;
'e' === na
? (fb(this, 'onvalue', !0), (this.state = this.stack.pop() || Ha.VALUE))
: bb(this, 'Invalid true started with tru' + na);
continue;
case Ha.FALSE:
if ('' === na) continue;
'a' === na ? (this.state = Ha.FALSE2) : bb(this, 'Invalid false started with f' + na);
continue;
case Ha.FALSE2:
if ('' === na) continue;
'l' === na ? (this.state = Ha.FALSE3) : bb(this, 'Invalid false started with fa' + na);
continue;
case Ha.FALSE3:
if ('' === na) continue;
's' === na ? (this.state = Ha.FALSE4) : bb(this, 'Invalid false started with fal' + na);
continue;
case Ha.FALSE4:
if ('' === na) continue;
'e' === na
? (fb(this, 'onvalue', !1), (this.state = this.stack.pop() || Ha.VALUE))
: bb(this, 'Invalid false started with fals' + na);
continue;
case Ha.NULL:
if ('' === na) continue;
'u' === na ? (this.state = Ha.NULL2) : bb(this, 'Invalid null started with n' + na);
continue;
case Ha.NULL2:
if ('' === na) continue;
'l' === na ? (this.state = Ha.NULL3) : bb(this, 'Invalid null started with nu' + na);
continue;
case Ha.NULL3:
if ('' === na) continue;
'l' === na
? (fb(this, 'onvalue', null), (this.state = this.stack.pop() || Ha.VALUE))
: bb(this, 'Invalid null started with nul' + na);
continue;
case Ha.NUMBER_DECIMAL_POINT:
'.' === na
? ((this.numberNode += na), (this.state = Ha.NUMBER_DIGIT))
: bb(this, 'Leading zero not followed by .');
continue;
case Ha.NUMBER_DIGIT:
-1 !== '0123456789'.indexOf(na)
? (this.numberNode += na)
: '.' === na
? (-1 !== this.numberNode.indexOf('.') && bb(this, 'Invalid number has two dots'),
(this.numberNode += na))
: 'e' === na || 'E' === na
? ((-1 === this.numberNode.indexOf('e') && -1 === this.numberNode.indexOf('E')) ||
bb(this, 'Invalid number has two exponential'),
(this.numberNode += na))
: '+' === na || '-' === na
? ('e' !== ha && 'E' !== ha && bb(this, 'Invalid symbol in number'), (this.numberNode += na))
: (this.numberNode && fb(this, 'onvalue', parseFloat(this.numberNode)),
(this.numberNode = ''),
this.index--,
(this.state = this.stack.pop() || Ha.VALUE));
continue;
default:
bb(this, 'Unknown state: ' + this.state);
}
}
if (this.position >= this.bufferCheckPosition) {
za = Math.max(Yb.MAX_BUFFER_LENGTH, 10);
ha = na = 0;
for (ba = kb.length; ha < ba; ha++) {
ca = this[kb[ha]].length;
if (ca > za)
switch (kb[ha]) {
case 'text':
break;
default:
bb(this, 'Max buffer length exceeded: ' + kb[ha]);
}
na = Math.max(na, ca);
}
this.bufferCheckPosition = Yb.MAX_BUFFER_LENGTH - na + this.position;
}
return this;
},
resume: function () {
this.error = null;
return this;
},
close: function () {
return this.write(null);
},
};
})();
(function () {
var bb, lb, pb;
function hb(kb, Ha) {
Ha || (Ha = kb.length);
return kb.reduce(function (Ma, Qa, za) {
return za < Ha ? Ma + String.fromCharCode(Qa) : Ma;
}, '');
}
for (var fb = {}, eb = 0; 256 > eb; ++eb) {
bb = hb([eb]);
fb[bb] = eb;
}
lb = Object.keys(fb).length;
pb = [];
for (eb = 0; 256 > eb; ++eb) {
pb[eb] = [eb];
}
qe = function (kb, Ha) {
var U, Y;
function Ma(sa, pa) {
var ta;
for (; 0 < pa; ) {
if (ca >= ba.length) return !1;
if (pa > ia) {
ta = sa;
ta >>>= pa - ia;
ba[ca] |= ta & 255;
pa -= ia;
ia = 8;
++ca;
} else
pa <= ia &&
((ta = sa),
(ta <<= ia - pa),
(ta &= 255),
(ta >>>= 8 - ia),
(ba[ca] |= ta & 255),
(ia -= pa),
(pa = 0),
0 == ia && ((ia = 8), ++ca));
}
return !0;
}
for (var Qa in fb) {
Ha[Qa] = fb[Qa];
}
for (
var za = lb, na = [], ha = 8, ba = new Uint8Array(kb.length), ca = 0, ia = 8, fa = 0;
fa < kb.length;
++fa
) {
U = kb[fa];
na.push(U);
Qa = hb(na);
Y = Ha[Qa];
if (!Y) {
na = hb(na, na.length - 1);
if (!Ma(Ha[na], ha)) return null;
0 != za >> ha && ++ha;
Ha[Qa] = za++;
na = [U];
}
}
return 0 < na.length && ((Qa = hb(na)), (Y = Ha[Qa]), !Ma(Y, ha)) ? null : ba.subarray(0, 8 > ia ? ca + 1 : ca);
};
re = function (kb) {
var fa, U;
for (
var Ha = pb.slice(),
Ma = 0,
Qa = 0,
za = 8,
na = new Uint8Array(Math.ceil(1.5 * kb.length)),
ha = 0,
ba,
ca = [];
Ma < kb.length && !(8 * (kb.length - Ma) - Qa < za);
) {
for (var ia = (ba = 0); ia < za; ) {
fa = Math.min(za - ia, 8 - Qa);
U = kb[Ma];
U <<= Qa;
U &= 255;
U >>>= 8 - fa;
ia += fa;
Qa += fa;
8 == Qa && ((Qa = 0), ++Ma);
ba |= (U & 255) << (za - ia);
}
ia = Ha[ba];
0 == ca.length
? ++za
: (ia ? ca.push(ia[0]) : ca.push(ca[0]),
(Ha[Ha.length] = ca),
(ca = []),
Ha.length == 1 << za && ++za,
ia || (ia = Ha[ba]));
ba = ha + ia.length;
ba >= na.length && ((fa = new Uint8Array(Math.ceil(1.5 * ba))), fa.set(na), (na = fa));
na.set(ia, ha);
ha = ba;
ca = ca.concat(ia);
}
return na.subarray(0, ha);
};
})();
(function () {
var hb, fb, eb;
Kb = 'utf-8';
Lb = 9007199254740992;
hb = Dc = { GZIP: 'GZIP', LZW: 'LZW' };
Object.freeze(Dc);
se = function (bb) {
for (var lb = [hb.GZIP, hb.LZW], pb = 0; pb < lb.length && 0 < bb.length; ++pb) {
for (var kb = lb[pb], Ha = 0; Ha < bb.length; ++Ha) {
if (bb[Ha] == kb) return kb;
}
}
return null;
};
fb = jd = {
AES_CBC_PKCS5Padding: 'AES/CBC/PKCS5Padding',
AESWrap: 'AESWrap',
RSA_ECB_PKCS1Padding: 'RSA/ECB/PKCS1Padding',
};
Object.freeze(jd);
te = function (bb) {
return fb.AES_CBC_PKCS5Padding == bb
? fb.AES_CBC_PKCS5Padding
: fb.RSA_ECB_PKCS1Padding == bb
? fb.RSA_ECB_PKCS1Padding
: fb[bb];
};
eb = ue = { HmacSHA256: 'HmacSHA256', SHA256withRSA: 'SHA256withRSA' };
Object.freeze(ue);
Gd = function (bb) {
return eb[bb];
};
Ka = {
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(Ka);
})();
Bb = {
isObjectLiteral: function (hb) {
return null !== hb && 'object' === typeof hb && hb.constructor === Object;
},
extendDeep: function () {
var hb, fb, eb, bb, lb, pb, kb, Ha;
hb = arguments[0];
fb = 1;
eb = arguments.length;
bb = !1;
'boolean' === typeof hb && ((bb = hb), (hb = arguments[1]), (fb = 2));
for (; fb < eb; fb++) {
if (null != (lb = arguments[fb]))
for (pb in lb) {
if (!(bb && pb in hb)) {
kb = lb[pb];
if (hb !== kb && kb !== Ab) {
Ha = hb[pb];
hb[pb] =
null !== Ha && null !== kb && 'object' === typeof Ha && 'object' === typeof kb
? Bb.extendDeep(bb, {}, Ha, kb)
: kb;
}
}
}
}
return hb;
},
};
(function () {
var kb, Ha;
function hb(Ma, Qa) {
return function () {
var za, na;
za = Ma.base;
Ma.base = Qa;
na = Ma.apply(this, arguments);
Ma.base = za;
return na;
};
}
function fb(Ma, Qa, za) {
var na, ha, ba, ca;
za = za || Ha;
ha = !!za.extendAll;
for (na in Qa) {
ba = Qa.__lookupGetter__(na);
ca = Qa.__lookupSetter__(na);
ba || ca
? (ba && Ma.__defineGetter__(na, ba), ca && Ma.__defineSetter__(na, ca))
: ((ba = Qa[na]),
(ca = Ma[na]),
'function' === typeof ba && 'function' === typeof ca && ba !== ca
? (ba.base !== Function.prototype.base && (ba = hb(ba, ca)), (ba.base = ca))
: (ha || za[na]) &&
Bb.isObjectLiteral(ba) &&
Bb.isObjectLiteral(ca) &&
(ba = Bb.extendDeep({}, ca, ba)),
(Ma[na] = ba));
}
}
function eb() {
var Ma, Qa;
Ma = Array.prototype.slice;
Qa = Ma.call(arguments, 1);
return this.extend({
init: function na() {
var ha;
ha = Ma.call(arguments, 0);
na.base.apply(this, Qa.concat(ha));
},
});
}
function bb(Ma, Qa) {
var za;
za = new this(kb);
fb(za, Ma, Qa);
return pb(za);
}
function lb(Ma, Qa) {
fb(this.prototype, Ma, Qa);
return this;
}
function pb(Ma) {
var Qa;
Qa = function () {
var za;
za = this.init;
za && arguments[0] !== kb && za.apply(this, arguments);
};
Ma && (Qa.prototype = Ma);
Qa.prototype.constructor = Qa;
Qa.extend = bb;
Qa.bind = eb;
Qa.mixin = lb;
return Qa;
}
kb = {};
Ha = { actions: !0 };
Function.prototype.base = function () {};
Bb.Class = {
create: pb,
mixin: fb,
extend: function (Ma, Qa) {
var za;
za = pb();
za.prototype = new Ma();
return za.extend(Qa);
},
};
Bb.mixin = function () {
Bb.log && Bb.log.warn('util.mixin is deprecated. Please change your code to use util.Class.mixin()');
fb.apply(null, arguments);
};
})();
(function () {
var kb, Ha, Ma;
function hb(Qa, za) {
return function () {
var na, ha;
na = Qa.base;
Qa.base = za;
ha = Qa.apply(this, arguments);
Qa.base = na;
return ha;
};
}
function fb(Qa, za, na) {
var ha, ba, ca, ia;
na = na || Ha;
ba = !!na.extendAll;
for (ha in za) {
ca = za.__lookupGetter__(ha);
ia = za.__lookupSetter__(ha);
ca || ia
? (ca && Qa.__defineGetter__(ha, ca), ia && Qa.__defineSetter__(ha, ia))
: ((ca = za[ha]),
(ia = Qa[ha]),
'function' === typeof ca && 'function' === typeof ia && ca !== ia
? (ca.base !== Ma && (ca = hb(ca, ia)), (ca.base = ia))
: (ba || na[ha]) &&
Bb.isObjectLiteral(ca) &&
Bb.isObjectLiteral(ia) &&
(ca = Bb.extendDeep({}, ia, ca)),
(Qa[ha] = ca));
}
}
function eb() {
var Qa, za;
Qa = Array.prototype.slice;
za = Qa.call(arguments, 1);
return this.extend({
init: function ha() {
var ba;
ba = Qa.call(arguments, 0);
ha.base.apply(this, za.concat(ba));
},
});
}
function bb(Qa, za) {
var na;
na = new this(kb);
fb(na, Qa, za);
return pb(na);
}
function lb(Qa, za) {
fb(this.prototype, Qa, za);
return this;
}
function pb(Qa) {
var za;
za = function () {
var na;
na = this.init;
na && arguments[0] !== kb && na.apply(this, arguments);
};
Qa && (za.prototype = Qa);
za.prototype.constructor = za;
za.extend = bb;
za.bind = eb;
za.mixin = lb;
return za;
}
kb = {};
Ha = { actions: !0 };
Ma = function () {};
Function.prototype.base = Ma;
Bb.Class = {
create: pb,
mixin: fb,
extend: function (Qa, za) {
var na;
na = pb();
na.prototype = new Qa();
return na.extend(za);
},
};
Bb.mixin = function () {
Bb.log && Bb.log.warn('util.mixin is deprecated. Please change your code to use util.Class.mixin()');
fb.apply(null, arguments);
};
})();
(function () {
function hb(eb) {
return eb == Lb ? 1 : eb + 1;
}
function fb(eb) {
if (0 === Object.keys(eb._waiters).length) return 0;
for (var bb = hb(eb._nextWaiter); !eb._waiters[bb]; ) {
bb = hb(bb);
}
return bb;
}
Xc = Bb.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 (eb) {
var bb;
if (this._waiters[eb]) {
bb = this._waiters[eb];
delete this._waiters[eb];
eb == this._nextWaiter && (this._nextWaiter = fb(this));
bb.call(this, Ab);
}
},
cancelAll: function () {
for (; 0 !== this._nextWaiter; ) {
this.cancel(this._nextWaiter);
}
},
poll: function (eb, bb) {
var lb, pb;
lb = this;
pb = hb(this._lastWaiter);
this._lastWaiter = pb;
db(
bb,
function () {
var kb, Ha;
if (0 < this._queue.length) {
kb = this._queue.shift();
setTimeout(function () {
bb.result(kb);
}, 0);
} else {
-1 != eb &&
(Ha = setTimeout(function () {
delete lb._waiters[pb];
pb == lb._nextWaiter && (lb._nextWaiter = fb(lb));
bb.timeout();
}, eb));
this._waiters[pb] = function (Ma) {
clearTimeout(Ha);
setTimeout(function () {
bb.result(Ma);
}, 0);
};
this._nextWaiter || (this._nextWaiter = pb);
}
},
lb
);
return pb;
},
add: function (eb) {
var bb;
if (this._nextWaiter) {
bb = this._waiters[this._nextWaiter];
delete this._waiters[this._nextWaiter];
this._nextWaiter = fb(this);
bb.call(this, eb);
} else this._queue.push(eb);
},
});
})();
(function () {
var hb;
hb = 0 - Lb;
ve = Bb.Class.create({
nextBoolean: function () {
var fb;
fb = new Uint8Array(1);
vc.getRandomValues(fb);
return fb[0] & 1 ? !0 : !1;
},
nextInt: function (fb) {
var eb;
if (null !== fb && fb !== Ab) {
if ('number' !== typeof fb) throw new TypeError('n must be of type number');
if (1 > fb) throw new RangeError('n must be greater than zero');
--fb;
eb = new Uint8Array(4);
vc.getRandomValues(eb);
return Math.floor(
((((eb[3] & 127) << 24) | (eb[2] << 16) | (eb[1] << 8) | eb[0]) / 2147483648) * (fb - 0 + 1)
);
}
fb = new Uint8Array(4);
vc.getRandomValues(fb);
eb = ((fb[3] & 127) << 24) | (fb[2] << 16) | (fb[1] << 8) | fb[0];
return fb[3] & 128 ? -eb : eb;
},
nextLong: function () {
var eb;
for (var fb = hb; fb == hb; ) {
fb = new Uint8Array(7);
vc.getRandomValues(fb);
eb =
16777216 * (((fb[6] & 31) << 24) | (fb[5] << 16) | (fb[4] << 8) | fb[3]) +
((fb[2] << 16) | (fb[1] << 8) | fb[0]);
fb = fb[6] & 128 ? -eb - 1 : eb;
}
return fb;
},
nextBytes: function (fb) {
vc.getRandomValues(fb);
},
});
})();
(function () {
function hb(bb) {
return bb == Lb ? 1 : bb + 1;
}
function fb(bb) {
if (0 === Object.keys(bb._waitingReaders).length) return 0;
for (var lb = hb(bb._nextReader); !bb._waitingReaders[lb]; ) {
lb = hb(lb);
}
return lb;
}
function eb(bb) {
if (0 === Object.keys(bb._waitingWriters).length) return 0;
for (var lb = hb(bb._nextWriter); !bb._waitingWriters[lb]; ) {
lb = hb(lb);
}
return lb;
}
Hd = Bb.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 (bb) {
var lb;
if (this._waitingReaders[bb]) {
lb = this._waitingReaders[bb];
delete this._waitingReaders[bb];
bb == this._nextReader && (this._nextReader = fb(this));
lb.call(this, !0);
}
this._waitingWriters[bb] &&
((lb = this._waitingWriters[bb]),
delete this._waitingWriters[bb],
bb == this._nextWriter && (this._nextWriter = eb(this)),
lb.call(this, !0));
},
cancelAll: function () {
for (; 0 !== this._nextWriter; ) {
this.cancel(this._nextWriter);
}
for (; 0 !== this._nextReader; ) {
this.cancel(this._nextReader);
}
},
readLock: function (bb, lb) {
var pb, kb;
pb = this;
kb = hb(this._lastNumber);
this._lastNumber = kb;
db(
lb,
function () {
var Ha;
if (!this._writer && 0 === Object.keys(this._waitingWriters).length) return (this._readers[kb] = !0), kb;
-1 != bb &&
(Ha = setTimeout(function () {
delete pb._waitingReaders[kb];
kb == pb._nextReader && (pb._nextReader = fb(pb));
lb.timeout();
}, bb));
this._waitingReaders[kb] = function (Ma) {
clearTimeout(Ha);
Ma
? setTimeout(function () {
lb.result(Ab);
}, 0)
: ((pb._readers[kb] = !0),
setTimeout(function () {
lb.result(kb);
}, 0));
};
this._nextReader || (this._nextReader = kb);
},
pb
);
return kb;
},
writeLock: function (bb, lb) {
var pb, kb;
pb = this;
kb = hb(this._lastNumber);
this._lastNumber = kb;
db(
lb,
function () {
var Ha;
if (
0 === Object.keys(this._readers).length &&
0 === Object.keys(this._waitingReaders).length &&
!this._writer
)
return (this._writer = kb);
-1 != bb &&
(Ha = setTimeout(function () {
delete pb._waitingWriters[kb];
kb == pb._nextWriter && (pb._nextWriter = eb(pb));
lb.timeout();
}, bb));
this._waitingWriters[kb] = function (Ma) {
clearTimeout(Ha);
Ma
? setTimeout(function () {
lb.result(Ab);
}, 0)
: ((pb._writer = kb),
setTimeout(function () {
lb.result(kb);
}, 0));
};
this._nextWriter || (this._nextWriter = kb);
},
pb
);
return kb;
},
unlock: function (bb) {
if (bb == this._writer) this._writer = null;
else {
if (!this._readers[bb]) throw new ub('There is no reader or writer with ticket number ' + bb + '.');
delete this._readers[bb];
}
if (this._nextWriter)
0 < Object.keys(this._readers).length ||
((bb = this._waitingWriters[this._nextWriter]),
delete this._waitingWriters[this._nextWriter],
(this._nextWriter = eb(this)),
bb.call(this, !1));
else {
for (var lb = this._nextReader; 0 < Object.keys(this._waitingReaders).length; lb = hb(lb)) {
this._waitingReaders[lb] &&
((bb = this._waitingReaders[lb]), delete this._waitingReaders[lb], bb.call(this, !1));
}
this._nextReader = 0;
}
},
});
})();
Bb.Class.mixin(V, {
JSON_PARSE_ERROR: new V(0, Ka.FAIL, 'Error parsing JSON.'),
JSON_ENCODE_ERROR: new V(1, Ka.FAIL, 'Error encoding JSON.'),
ENVELOPE_HASH_MISMATCH: new V(2, Ka.FAIL, 'Computed hash does not match envelope hash.'),
INVALID_PUBLIC_KEY: new V(3, Ka.FAIL, 'Invalid public key provided.'),
INVALID_PRIVATE_KEY: new V(4, Ka.FAIL, 'Invalid private key provided.'),
PLAINTEXT_ILLEGAL_BLOCK_SIZE: new V(5, Ka.FAIL, 'Plaintext is not a multiple of the block size.'),
PLAINTEXT_BAD_PADDING: new V(6, Ka.FAIL, 'Plaintext contains incorrect padding.'),
CIPHERTEXT_ILLEGAL_BLOCK_SIZE: new V(7, Ka.FAIL, 'Ciphertext is not a multiple of the block size.'),
CIPHERTEXT_BAD_PADDING: new V(8, Ka.FAIL, 'Ciphertext contains incorrect padding.'),
ENCRYPT_NOT_SUPPORTED: new V(9, Ka.FAIL, 'Encryption not supported.'),
DECRYPT_NOT_SUPPORTED: new V(10, Ka.FAIL, 'Decryption not supported.'),
ENVELOPE_KEY_ID_MISMATCH: new V(11, Ka.FAIL, 'Encryption envelope key ID does not match crypto context key ID.'),
CIPHERTEXT_ENVELOPE_PARSE_ERROR: new V(12, Ka.FAIL, 'Error parsing ciphertext envelope.'),
CIPHERTEXT_ENVELOPE_ENCODE_ERROR: new V(13, Ka.FAIL, 'Error encoding ciphertext envelope.'),
SIGN_NOT_SUPPORTED: new V(14, Ka.FAIL, 'Sign not supported.'),
VERIFY_NOT_SUPPORTED: new V(15, Ka.FAIL, 'Verify not suppoprted.'),
SIGNATURE_ERROR: new V(16, Ka.FAIL, 'Signature not initialized or unable to process data/signature.'),
HMAC_ERROR: new V(17, Ka.FAIL, 'Error computing HMAC.'),
ENCRYPT_ERROR: new V(18, Ka.FAIL, 'Error encrypting plaintext.'),
DECRYPT_ERROR: new V(19, Ka.FAIL, 'Error decrypting ciphertext.'),
INSUFFICIENT_CIPHERTEXT: new V(20, Ka.FAIL, 'Insufficient ciphertext for decryption.'),
SESSION_KEY_CREATION_FAILURE: new V(21, Ka.FAIL, 'Error when creating session keys.'),
ASN1_PARSE_ERROR: new V(22, Ka.FAIL, 'Error parsing ASN.1.'),
ASN1_ENCODE_ERROR: new V(23, Ka.FAIL, 'Error encoding ASN.1.'),
INVALID_SYMMETRIC_KEY: new V(24, Ka.FAIL, 'Invalid symmetric key provided.'),
INVALID_ENCRYPTION_KEY: new V(25, Ka.FAIL, 'Invalid encryption key.'),
INVALID_HMAC_KEY: new V(26, Ka.FAIL, 'Invalid HMAC key.'),
WRAP_NOT_SUPPORTED: new V(27, Ka.FAIL, 'Wrap not supported.'),
UNWRAP_NOT_SUPPORTED: new V(28, Ka.FAIL, 'Unwrap not supported.'),
UNIDENTIFIED_JWK_TYPE: new V(29, Ka.FAIL, 'Unidentified JSON web key type.'),
UNIDENTIFIED_JWK_USAGE: new V(30, Ka.FAIL, 'Unidentified JSON web key usage.'),
UNIDENTIFIED_JWK_ALGORITHM: new V(31, Ka.FAIL, 'Unidentified JSON web key algorithm.'),
WRAP_ERROR: new V(32, Ka.FAIL, 'Error wrapping plaintext.'),
UNWRAP_ERROR: new V(33, Ka.FAIL, 'Error unwrapping ciphertext.'),
INVALID_JWK: new V(34, Ka.FAIL, 'Invalid JSON web key.'),
INVALID_JWK_KEYDATA: new V(35, Ka.FAIL, 'Invalid JSON web key keydata.'),
UNSUPPORTED_JWK_ALGORITHM: new V(36, Ka.FAIL, 'Unsupported JSON web key algorithm.'),
WRAP_KEY_CREATION_FAILURE: new V(37, Ka.FAIL, 'Error when creating wrapping key.'),
INVALID_WRAP_CIPHERTEXT: new V(38, Ka.FAIL, 'Invalid wrap ciphertext.'),
UNSUPPORTED_JWE_ALGORITHM: new V(39, Ka.FAIL, 'Unsupported JSON web encryption algorithm.'),
JWE_ENCODE_ERROR: new V(40, Ka.FAIL, 'Error encoding JSON web encryption header.'),
JWE_PARSE_ERROR: new V(41, Ka.FAIL, 'Error parsing JSON web encryption header.'),
INVALID_ALGORITHM_PARAMS: new V(42, Ka.FAIL, 'Invalid algorithm parameters.'),
JWE_ALGORITHM_MISMATCH: new V(43, Ka.FAIL, 'JSON web encryption header algorithms mismatch.'),
KEY_IMPORT_ERROR: new V(44, Ka.FAIL, 'Error importing key.'),
KEY_EXPORT_ERROR: new V(45, Ka.FAIL, 'Error exporting key.'),
DIGEST_ERROR: new V(46, Ka.FAIL, 'Error in digest.'),
UNSUPPORTED_KEY: new V(47, Ka.FAIL, 'Unsupported key type or algorithm.'),
UNSUPPORTED_JWE_SERIALIZATION: new V(48, Ka.FAIL, 'Unsupported JSON web encryption serialization.'),
XML_PARSE_ERROR: new V(49, Ka.FAIL, 'Error parsing XML.'),
XML_ENCODE_ERROR: new V(50, Ka.FAIL, 'Error encoding XML.'),
INVALID_WRAPPING_KEY: new V(51, Ka.FAIL, 'Invalid wrapping key.'),
UNIDENTIFIED_CIPHERTEXT_ENVELOPE: new V(52, Ka.FAIL, 'Unidentified ciphertext envelope version.'),
UNIDENTIFIED_SIGNATURE_ENVELOPE: new V(53, Ka.FAIL, 'Unidentified signature envelope version.'),
UNSUPPORTED_CIPHERTEXT_ENVELOPE: new V(54, Ka.FAIL, 'Unsupported ciphertext envelope version.'),
UNSUPPORTED_SIGNATURE_ENVELOPE: new V(55, Ka.FAIL, 'Unsupported signature envelope version.'),
UNIDENTIFIED_CIPHERSPEC: new V(56, Ka.FAIL, 'Unidentified cipher specification.'),
UNIDENTIFIED_ALGORITHM: new V(57, Ka.FAIL, 'Unidentified algorithm.'),
SIGNATURE_ENVELOPE_PARSE_ERROR: new V(58, Ka.FAIL, 'Error parsing signature envelope.'),
SIGNATURE_ENVELOPE_ENCODE_ERROR: new V(59, Ka.FAIL, 'Error encoding signature envelope.'),
INVALID_SIGNATURE: new V(60, Ka.FAIL, 'Invalid signature.'),
WRAPKEY_FINGERPRINT_NOTSUPPORTED: new V(61, Ka.FAIL, 'Wrap key fingerprint not supported'),
UNIDENTIFIED_JWK_KEYOP: new V(62, Ka.FAIL, 'Unidentified JSON web key key operation.'),
MASTERTOKEN_UNTRUSTED: new V(1e3, Ka.ENTITY_REAUTH, 'Master token is not trusted.'),
MASTERTOKEN_KEY_CREATION_ERROR: new V(
1001,
Ka.ENTITY_REAUTH,
'Unable to construct symmetric keys from master token.'
),
MASTERTOKEN_EXPIRES_BEFORE_RENEWAL: new V(
1002,
Ka.ENTITY_REAUTH,
'Master token expiration timestamp is before the renewal window opens.'
),
MASTERTOKEN_SESSIONDATA_MISSING: new V(1003, Ka.ENTITY_REAUTH, 'No master token session data found.'),
MASTERTOKEN_SEQUENCE_NUMBER_OUT_OF_RANGE: new V(
1004,
Ka.ENTITY_REAUTH,
'Master token sequence number is out of range.'
),
MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new V(
1005,
Ka.ENTITY_REAUTH,
'Master token serial number is out of range.'
),
MASTERTOKEN_TOKENDATA_INVALID: new V(1006, Ka.ENTITY_REAUTH, 'Invalid master token data.'),
MASTERTOKEN_SIGNATURE_INVALID: new V(1007, Ka.ENTITY_REAUTH, 'Invalid master token signature.'),
MASTERTOKEN_SESSIONDATA_INVALID: new V(1008, Ka.ENTITY_REAUTH, 'Invalid master token session data.'),
MASTERTOKEN_SEQUENCE_NUMBER_OUT_OF_SYNC: new V(
1009,
Ka.ENTITY_REAUTH,
'Master token sequence number does not have the expected value.'
),
MASTERTOKEN_TOKENDATA_MISSING: new V(1010, Ka.ENTITY_REAUTH, 'No master token data found.'),
MASTERTOKEN_TOKENDATA_PARSE_ERROR: new V(1011, Ka.ENTITY_REAUTH, 'Error parsing master token data.'),
MASTERTOKEN_SESSIONDATA_PARSE_ERROR: new V(1012, Ka.ENTITY_REAUTH, 'Error parsing master token session data.'),
MASTERTOKEN_IDENTITY_REVOKED: new V(1013, Ka.ENTITY_REAUTH, 'Master token entity identity is revoked.'),
MASTERTOKEN_REJECTED_BY_APP: new V(1014, Ka.ENTITY_REAUTH, 'Master token is rejected by the application.'),
USERIDTOKEN_MASTERTOKEN_MISMATCH: new V(
2e3,
Ka.USER_REAUTH,
'User ID token master token serial number does not match master token serial number.'
),
USERIDTOKEN_NOT_DECRYPTED: new V(2001, Ka.USER_REAUTH, 'User ID token is not decrypted or verified.'),
USERIDTOKEN_MASTERTOKEN_NULL: new V(2002, Ka.USER_REAUTH, 'User ID token requires a master token.'),
USERIDTOKEN_EXPIRES_BEFORE_RENEWAL: new V(
2003,
Ka.USER_REAUTH,
'User ID token expiration timestamp is before the renewal window opens.'
),
USERIDTOKEN_USERDATA_MISSING: new V(2004, Ka.USER_REAUTH, 'No user ID token user data found.'),
USERIDTOKEN_MASTERTOKEN_NOT_FOUND: new V(
2005,
Ka.USER_REAUTH,
'User ID token is bound to an unknown master token.'
),
USERIDTOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new V(
2006,
Ka.USER_REAUTH,
'User ID token master token serial number is out of range.'
),
USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new V(
2007,
Ka.USER_REAUTH,
'User ID token serial number is out of range.'
),
USERIDTOKEN_TOKENDATA_INVALID: new V(2008, Ka.USER_REAUTH, 'Invalid user ID token data.'),
USERIDTOKEN_SIGNATURE_INVALID: new V(2009, Ka.USER_REAUTH, 'Invalid user ID token signature.'),
USERIDTOKEN_USERDATA_INVALID: new V(2010, Ka.USER_REAUTH, 'Invalid user ID token user data.'),
USERIDTOKEN_IDENTITY_INVALID: new V(2011, Ka.USER_REAUTH, 'Invalid user ID token user identity.'),
RESERVED_2012: new V(2012, Ka.USER_REAUTH, 'The entity is not associated with the user.'),
USERIDTOKEN_IDENTITY_NOT_FOUND: new V(2013, Ka.USER_REAUTH, 'The user identity was not found.'),
USERIDTOKEN_PASSWORD_VERSION_CHANGED: new V(
2014,
Ka.USER_REAUTH,
'The user identity must be reauthenticated because the password version changed.'
),
USERIDTOKEN_USERAUTH_DATA_MISMATCH: new V(
2015,
Ka.USER_REAUTH,
'The user ID token and user authentication data user identities do not match.'
),
USERIDTOKEN_TOKENDATA_MISSING: new V(2016, Ka.USER_REAUTH, 'No user ID token data found.'),
USERIDTOKEN_TOKENDATA_PARSE_ERROR: new V(2017, Ka.USER_REAUTH, 'Error parsing user ID token data.'),
USERIDTOKEN_USERDATA_PARSE_ERROR: new V(2018, Ka.USER_REAUTH, 'Error parsing user ID token user data.'),
USERIDTOKEN_REVOKED: new V(2019, Ka.USER_REAUTH, 'User ID token is revoked.'),
USERIDTOKEN_REJECTED_BY_APP: new V(2020, Ka.USER_REAUTH, 'User ID token is rejected by the application.'),
SERVICETOKEN_MASTERTOKEN_MISMATCH: new V(
3e3,
Ka.FAIL,
'Service token master token serial number does not match master token serial number.'
),
SERVICETOKEN_USERIDTOKEN_MISMATCH: new V(
3001,
Ka.FAIL,
'Service token user ID token serial number does not match user ID token serial number.'
),
SERVICETOKEN_SERVICEDATA_INVALID: new V(3002, Ka.FAIL, 'Service token data invalid.'),
SERVICETOKEN_MASTERTOKEN_NOT_FOUND: new V(3003, Ka.FAIL, 'Service token is bound to an unknown master token.'),
SERVICETOKEN_USERIDTOKEN_NOT_FOUND: new V(3004, Ka.FAIL, 'Service token is bound to an unknown user ID token.'),
SERVICETOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new V(
3005,
Ka.FAIL,
'Service token master token serial number is out of range.'
),
SERVICETOKEN_USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE: new V(
3006,
Ka.FAIL,
'Service token user ID token serial number is out of range.'
),
SERVICETOKEN_TOKENDATA_INVALID: new V(3007, Ka.FAIL, 'Invalid service token data.'),
SERVICETOKEN_SIGNATURE_INVALID: new V(3008, Ka.FAIL, 'Invalid service token signature.'),
SERVICETOKEN_TOKENDATA_MISSING: new V(3009, Ka.FAIL, 'No service token data found.'),
UNIDENTIFIED_ENTITYAUTH_SCHEME: new V(4e3, Ka.FAIL, 'Unable to identify entity authentication scheme.'),
ENTITYAUTH_FACTORY_NOT_FOUND: new V(4001, Ka.FAIL, 'No factory registered for entity authentication scheme.'),
X509CERT_PARSE_ERROR: new V(4002, Ka.ENTITYDATA_REAUTH, 'Error parsing X.509 certificate data.'),
X509CERT_ENCODE_ERROR: new V(4003, Ka.ENTITYDATA_REAUTH, 'Error encoding X.509 certificate data.'),
X509CERT_VERIFICATION_FAILED: new V(4004, Ka.ENTITYDATA_REAUTH, 'X.509 certificate verification failed.'),
ENTITY_NOT_FOUND: new V(4005, Ka.FAIL, 'Entity not recognized.'),
INCORRECT_ENTITYAUTH_DATA: new V(4006, Ka.FAIL, 'Entity used incorrect entity authentication data type.'),
RSA_PUBLICKEY_NOT_FOUND: new V(4007, Ka.ENTITYDATA_REAUTH, 'RSA public key not found.'),
NPTICKET_GRACE_PERIOD_EXCEEDED: new V(
4008,
Ka.ENTITYDATA_REAUTH,
'Fake NP-Tickets cannot be used after the grace period when the Playstation Network is up.'
),
NPTICKET_SERVICE_ID_MISSING: new V(4009, Ka.ENTITYDATA_REAUTH, 'NP-Ticket service ID is missing.'),
NPTICKET_SERVICE_ID_DISALLOWED: new V(4010, Ka.ENTITYDATA_REAUTH, 'NP-Ticket service ID is not allowed.'),
NPTICKET_NOT_YET_VALID: new V(4011, Ka.ENTITYDATA_REAUTH, 'NP-Ticket issuance date is in the future.'),
NPTICKET_EXPIRED: new V(4012, Ka.ENTITYDATA_REAUTH, 'NP-Ticket has expired.'),
NPTICKET_PRIVATE_KEY_NOT_FOUND: new V(4013, Ka.ENTITYDATA_REAUTH, 'No private key found for NP-Ticket GUID.'),
NPTICKET_COOKIE_VERIFICATION_FAILED: new V(
4014,
Ka.ENTITYDATA_REAUTH,
'NP-Ticket cookie signature verification failed.'
),
NPTICKET_INCORRECT_COOKIE_VERSION: new V(4015, Ka.ENTITYDATA_REAUTH, 'Incorrect NP-Ticket cookie version.'),
NPTICKET_BROKEN: new V(4016, Ka.ENTITYDATA_REAUTH, 'NP-Ticket broken.'),
NPTICKET_VERIFICATION_FAILED: new V(4017, Ka.ENTITYDATA_REAUTH, 'NP-Ticket signature verification failed.'),
NPTICKET_ERROR: new V(4018, Ka.ENTITYDATA_REAUTH, 'Unknown NP-Ticket TCM error.'),
NPTICKET_CIPHER_INFO_NOT_FOUND: new V(4019, Ka.ENTITYDATA_REAUTH, 'No cipher information found for NP-Ticket.'),
NPTICKET_INVALID_CIPHER_INFO: new V(4020, Ka.ENTITYDATA_REAUTH, 'Cipher information for NP-Ticket is invalid.'),
NPTICKET_UNSUPPORTED_VERSION: new V(4021, Ka.ENTITYDATA_REAUTH, 'Unsupported NP-Ticket version.'),
NPTICKET_INCORRECT_KEY_LENGTH: new V(4022, Ka.ENTITYDATA_REAUTH, 'Incorrect NP-Ticket public key length.'),
UNSUPPORTED_ENTITYAUTH_DATA: new V(4023, Ka.FAIL, 'Unsupported entity authentication data.'),
CRYPTEX_RSA_KEY_SET_NOT_FOUND: new V(4024, Ka.FAIL, 'Cryptex RSA key set not found.'),
ENTITY_REVOKED: new V(4025, Ka.FAIL, 'Entity is revoked.'),
ENTITY_REJECTED_BY_APP: new V(4026, Ka.ENTITYDATA_REAUTH, 'Entity is rejected by the application.'),
FORCE_LOGIN: new V(5e3, Ka.USERDATA_REAUTH, 'User must login again.'),
NETFLIXID_COOKIES_EXPIRED: new V(5001, Ka.USERDATA_REAUTH, 'Netflix ID cookie identity has expired.'),
NETFLIXID_COOKIES_BLANK: new V(5002, Ka.USERDATA_REAUTH, 'Netflix ID or Secure Netflix ID cookie is blank.'),
UNIDENTIFIED_USERAUTH_SCHEME: new V(5003, Ka.FAIL, 'Unable to identify user authentication scheme.'),
USERAUTH_FACTORY_NOT_FOUND: new V(5004, Ka.FAIL, 'No factory registered for user authentication scheme.'),
EMAILPASSWORD_BLANK: new V(5005, Ka.USERDATA_REAUTH, 'Email or password is blank.'),
AUTHMGR_COMMS_FAILURE: new V(5006, Ka.TRANSIENT_FAILURE, 'Error communicating with authentication manager.'),
EMAILPASSWORD_INCORRECT: new V(5007, Ka.USERDATA_REAUTH, 'Email or password is incorrect.'),
UNSUPPORTED_USERAUTH_DATA: new V(5008, Ka.FAIL, 'Unsupported user authentication data.'),
SSOTOKEN_BLANK: new V(5009, Ka.SSOTOKEN_REJECTED, 'SSO token is blank.'),
SSOTOKEN_NOT_ASSOCIATED: new V(5010, Ka.USERDATA_REAUTH, 'SSO token is not associated with a Netflix user.'),
USERAUTH_USERIDTOKEN_INVALID: new V(
5011,
Ka.USERDATA_REAUTH,
'User authentication data user ID token is invalid.'
),
PROFILEID_BLANK: new V(5012, Ka.USERDATA_REAUTH, 'Profile ID is blank.'),
UNIDENTIFIED_USERAUTH_MECHANISM: new V(5013, Ka.FAIL, 'Unable to identify user authentication mechanism.'),
UNSUPPORTED_USERAUTH_MECHANISM: new V(5014, Ka.FAIL, 'Unsupported user authentication mechanism.'),
SSOTOKEN_INVALID: new V(5015, Ka.SSOTOKEN_REJECTED, 'SSO token invalid.'),
USERAUTH_MASTERTOKEN_MISSING: new V(
5016,
Ka.USERDATA_REAUTH,
'User authentication required master token is missing.'
),
ACCTMGR_COMMS_FAILURE: new V(5017, Ka.TRANSIENT_FAILURE, 'Error communicating with the account manager.'),
SSO_ASSOCIATION_FAILURE: new V(5018, Ka.TRANSIENT_FAILURE, 'SSO user association failed.'),
SSO_DISASSOCIATION_FAILURE: new V(5019, Ka.TRANSIENT_FAILURE, 'SSO user disassociation failed.'),
MDX_USERAUTH_VERIFICATION_FAILED: new V(
5020,
Ka.USERDATA_REAUTH,
'MDX user authentication data verification failed.'
),
USERAUTH_USERIDTOKEN_NOT_DECRYPTED: new V(
5021,
Ka.USERDATA_REAUTH,
'User authentication data user ID token is not decrypted or verified.'
),
MDX_USERAUTH_ACTION_INVALID: new V(5022, Ka.USERDATA_REAUTH, 'MDX user authentication data action is invalid.'),
CTICKET_DECRYPT_ERROR: new V(5023, Ka.USERDATA_REAUTH, 'CTicket decryption failed.'),
USERAUTH_MASTERTOKEN_INVALID: new V(
5024,
Ka.USERDATA_REAUTH,
'User authentication data master token is invalid.'
),
USERAUTH_MASTERTOKEN_NOT_DECRYPTED: new V(
5025,
Ka.USERDATA_REAUTH,
'User authentication data master token is not decrypted or verified.'
),
CTICKET_CRYPTOCONTEXT_ERROR: new V(5026, Ka.USERDATA_REAUTH, 'Error creating CTicket crypto context.'),
MDX_PIN_BLANK: new V(5027, Ka.USERDATA_REAUTH, 'MDX controller or target PIN is blank.'),
MDX_PIN_MISMATCH: new V(5028, Ka.USERDATA_REAUTH, 'MDX controller and target PIN mismatch.'),
MDX_USER_UNKNOWN: new V(
5029,
Ka.USERDATA_REAUTH,
'MDX controller user ID token or CTicket is not decrypted or verified.'
),
USERAUTH_USERIDTOKEN_MISSING: new V(
5030,
Ka.USERDATA_REAUTH,
'User authentication required user ID token is missing.'
),
MDX_CONTROLLERDATA_INVALID: new V(5031, Ka.USERDATA_REAUTH, 'MDX controller authentication data is invalid.'),
USERAUTH_ENTITY_MISMATCH: new V(
5032,
Ka.USERDATA_REAUTH,
'User authentication data does not match entity identity.'
),
USERAUTH_INCORRECT_DATA: new V(5033, Ka.FAIL, 'Entity used incorrect key request data type'),
SSO_ASSOCIATION_WITH_NONMEMBER: new V(
5034,
Ka.USERDATA_REAUTH,
'SSO user association failed because the customer is not a member.'
),
SSO_ASSOCIATION_WITH_FORMERMEMBER: new V(
5035,
Ka.USERDATA_REAUTH,
'SSO user association failed because the customer is a former member.'
),
SSO_ASSOCIATION_CONFLICT: new V(
5036,
Ka.USERDATA_REAUTH,
'SSO user association failed because the token identifies a different member.'
),
USER_REJECTED_BY_APP: new V(5037, Ka.USERDATA_REAUTH, 'User is rejected by the application.'),
PROFILE_SWITCH_DISALLOWED: new V(5038, Ka.TRANSIENT_FAILURE, 'Unable to switch user profile.'),
MEMBERSHIPCLIENT_COMMS_FAILURE: new V(
5039,
Ka.TRANSIENT_FAILURE,
'Error communicating with the membership manager.'
),
USERIDTOKEN_IDENTITY_NOT_ASSOCIATED_WITH_ENTITY: new V(
5040,
Ka.USER_REAUTH,
'The entity is not associated with the user.'
),
UNSUPPORTED_COMPRESSION: new V(6e3, Ka.FAIL, 'Unsupported compression algorithm.'),
COMPRESSION_ERROR: new V(6001, Ka.FAIL, 'Error compressing data.'),
UNCOMPRESSION_ERROR: new V(6002, Ka.FAIL, 'Error uncompressing data.'),
MESSAGE_ENTITY_NOT_FOUND: new V(
6003,
Ka.FAIL,
'Message header entity authentication data or master token not found.'
),
PAYLOAD_MESSAGE_ID_MISMATCH: new V(6004, Ka.FAIL, 'Payload chunk message ID does not match header message ID .'),
PAYLOAD_SEQUENCE_NUMBER_MISMATCH: new V(
6005,
Ka.FAIL,
'Payload chunk sequence number does not match expected sequence number.'
),
PAYLOAD_VERIFICATION_FAILED: new V(6006, Ka.FAIL, 'Payload chunk payload signature verification failed.'),
MESSAGE_DATA_MISSING: new V(6007, Ka.FAIL, 'No message data found.'),
MESSAGE_FORMAT_ERROR: new V(6008, Ka.FAIL, 'Malformed message data.'),
MESSAGE_VERIFICATION_FAILED: new V(6009, Ka.FAIL, 'Message header/error data signature verification failed.'),
HEADER_DATA_MISSING: new V(6010, Ka.FAIL, 'No header data found.'),
PAYLOAD_DATA_MISSING: new V(6011, Ka.FAIL, 'No payload data found in non-EOM payload chunk.'),
PAYLOAD_DATA_CORRUPT: new V(6012, Ka.FAIL, 'Corrupt payload data found in non-EOM payload chunk.'),
UNIDENTIFIED_COMPRESSION: new V(6013, Ka.FAIL, 'Unidentified compression algorithm.'),
MESSAGE_EXPIRED: new V(6014, Ka.EXPIRED, 'Message expired and not renewable. Rejected.'),
MESSAGE_ID_OUT_OF_RANGE: new V(6015, Ka.FAIL, 'Message ID is out of range.'),
INTERNAL_CODE_NEGATIVE: new V(6016, Ka.FAIL, 'Error header internal code is negative.'),
UNEXPECTED_RESPONSE_MESSAGE_ID: new V(6017, Ka.FAIL, 'Unexpected response message ID. Possible replay.'),
RESPONSE_REQUIRES_ENCRYPTION: new V(6018, Ka.KEYX_REQUIRED, 'Message response requires encryption.'),
PAYLOAD_SEQUENCE_NUMBER_OUT_OF_RANGE: new V(6019, Ka.FAIL, 'Payload chunk sequence number is out of range.'),
PAYLOAD_MESSAGE_ID_OUT_OF_RANGE: new V(6020, Ka.FAIL, 'Payload chunk message ID is out of range.'),
MESSAGE_REPLAYED: new V(6021, Ka.REPLAYED, 'Non-replayable message replayed.'),
INCOMPLETE_NONREPLAYABLE_MESSAGE: new V(
6022,
Ka.FAIL,
'Non-replayable message sent non-renewable or without key request data or without a master token.'
),
HEADER_SIGNATURE_INVALID: new V(6023, Ka.FAIL, 'Invalid Header signature.'),
HEADER_DATA_INVALID: new V(6024, Ka.FAIL, 'Invalid header data.'),
PAYLOAD_INVALID: new V(6025, Ka.FAIL, 'Invalid payload.'),
PAYLOAD_SIGNATURE_INVALID: new V(6026, Ka.FAIL, 'Invalid payload signature.'),
RESPONSE_REQUIRES_MASTERTOKEN: new V(6027, Ka.KEYX_REQUIRED, 'Message response requires a master token.'),
RESPONSE_REQUIRES_USERIDTOKEN: new V(6028, Ka.USER_REAUTH, 'Message response requires a user ID token.'),
REQUEST_REQUIRES_USERAUTHDATA: new V(6029, Ka.FAIL, 'User-associated message requires user authentication data.'),
UNEXPECTED_MESSAGE_SENDER: new V(
6030,
Ka.FAIL,
'Message sender is equal to the local entity or not the master token entity.'
),
NONREPLAYABLE_MESSAGE_REQUIRES_MASTERTOKEN: new V(
6031,
Ka.FAIL,
'Non-replayable message requires a master token.'
),
NONREPLAYABLE_ID_OUT_OF_RANGE: new V(6032, Ka.FAIL, 'Non-replayable message non-replayable ID is out of range.'),
MESSAGE_SERVICETOKEN_MISMATCH: new V(
6033,
Ka.FAIL,
'Service token master token or user ID token serial number does not match the message token serial numbers.'
),
MESSAGE_PEER_SERVICETOKEN_MISMATCH: new V(
6034,
Ka.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 V(
6035,
Ka.KEYX_REQUIRED,
'Message response requires integrity protection.'
),
HANDSHAKE_DATA_MISSING: new V(
6036,
Ka.FAIL,
'Handshake message is not renewable or does not contain key request data.'
),
MESSAGE_RECIPIENT_MISMATCH: new V(6037, Ka.FAIL, 'Message recipient does not match local identity.'),
UNIDENTIFIED_KEYX_SCHEME: new V(7e3, Ka.FAIL, 'Unable to identify key exchange scheme.'),
KEYX_FACTORY_NOT_FOUND: new V(7001, Ka.FAIL, 'No factory registered for key exchange scheme.'),
KEYX_REQUEST_NOT_FOUND: new V(7002, Ka.FAIL, 'No key request found matching header key response data.'),
UNIDENTIFIED_KEYX_KEY_ID: new V(7003, Ka.FAIL, 'Unable to identify key exchange key ID.'),
UNSUPPORTED_KEYX_KEY_ID: new V(7004, Ka.FAIL, 'Unsupported key exchange key ID.'),
UNIDENTIFIED_KEYX_MECHANISM: new V(7005, Ka.FAIL, 'Unable to identify key exchange mechanism.'),
UNSUPPORTED_KEYX_MECHANISM: new V(7006, Ka.FAIL, 'Unsupported key exchange mechanism.'),
KEYX_RESPONSE_REQUEST_MISMATCH: new V(7007, Ka.FAIL, 'Key exchange response does not match request.'),
KEYX_PRIVATE_KEY_MISSING: new V(7008, Ka.FAIL, 'Key exchange private key missing.'),
UNKNOWN_KEYX_PARAMETERS_ID: new V(7009, Ka.FAIL, 'Key exchange parameters ID unknown or invalid.'),
KEYX_MASTER_TOKEN_MISSING: new V(7010, Ka.FAIL, 'Master token required for key exchange is missing.'),
KEYX_INVALID_PUBLIC_KEY: new V(7011, Ka.FAIL, 'Key exchange public key is invalid.'),
KEYX_PUBLIC_KEY_MISSING: new V(7012, Ka.FAIL, 'Key exchange public key missing.'),
KEYX_WRAPPING_KEY_MISSING: new V(7013, Ka.FAIL, 'Key exchange wrapping key missing.'),
KEYX_WRAPPING_KEY_ID_MISSING: new V(7014, Ka.FAIL, 'Key exchange wrapping key ID missing.'),
KEYX_INVALID_WRAPPING_KEY: new V(7015, Ka.FAIL, 'Key exchange wrapping key is invalid.'),
KEYX_INCORRECT_DATA: new V(7016, Ka.FAIL, 'Entity used incorrect wrapping key data type'),
CRYPTEX_ENCRYPTION_ERROR: new V(8e3, Ka.FAIL, 'Error encrypting data with cryptex.'),
CRYPTEX_DECRYPTION_ERROR: new V(8001, Ka.FAIL, 'Error decrypting data with cryptex.'),
CRYPTEX_MAC_ERROR: new V(8002, Ka.FAIL, 'Error computing MAC with cryptex.'),
CRYPTEX_VERIFY_ERROR: new V(8003, Ka.FAIL, 'Error verifying MAC with cryptex.'),
CRYPTEX_CONTEXT_CREATION_FAILURE: new V(8004, Ka.FAIL, 'Error creating cryptex cipher or MAC context.'),
DATAMODEL_DEVICE_ACCESS_ERROR: new V(8005, Ka.TRANSIENT_FAILURE, 'Error accessing data model device.'),
DATAMODEL_DEVICETYPE_NOT_FOUND: new V(8006, Ka.FAIL, 'Data model device type not found.'),
CRYPTEX_KEYSET_UNSUPPORTED: new V(8007, Ka.FAIL, 'Cryptex key set not supported.'),
CRYPTEX_PRIVILEGE_EXCEPTION: new V(8008, Ka.FAIL, 'Insufficient privileges for cryptex operation.'),
CRYPTEX_WRAP_ERROR: new V(8009, Ka.FAIL, 'Error wrapping data with cryptex.'),
CRYPTEX_UNWRAP_ERROR: new V(8010, Ka.FAIL, 'Error unwrapping data with cryptex.'),
CRYPTEX_COMMS_FAILURE: new V(8011, Ka.TRANSIENT_FAILURE, 'Error comunicating with cryptex.'),
CRYPTEX_SIGN_ERROR: new V(8012, Ka.FAIL, 'Error computing signature with cryptex.'),
INTERNAL_EXCEPTION: new V(9e3, Ka.TRANSIENT_FAILURE, 'Internal exception.'),
MSL_COMMS_FAILURE: new V(9001, Ka.FAIL, 'Error communicating with MSL entity.'),
NONE: new V(9999, Ka.FAIL, 'Special unit test error.'),
});
Object.freeze(V);
(function () {
cb = Bb.Class.create(Error());
cb.mixin({
init: function (hb, fb, eb) {
var lb, pb, kb;
function bb() {
return pb ? pb : this.cause && this.cause instanceof cb ? this.cause.messageId : Ab;
}
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
lb = hb.message;
fb && (lb += ' [' + fb + ']');
kb = this.stack;
Object.defineProperties(this, {
message: { value: lb, writable: !1, configurable: !0 },
error: { value: hb, writable: !1, configurable: !0 },
cause: { value: eb, 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: bb,
set: function (Ha) {
if (0 > Ha || Ha > Lb) throw new RangeError('Message ID ' + Ha + ' is outside the valid range.');
bb() || (pb = Ha);
},
configurable: !0,
},
stack: {
get: function () {
var Ha;
Ha = this.toString();
kb && (Ha += '\n' + kb);
eb && eb.stack && (Ha += '\nCaused by ' + eb.stack);
return Ha;
},
configurable: !0,
},
});
},
setEntity: function (hb) {
!hb ||
this.masterToken ||
this.entityAuthenticationData ||
(hb instanceof cc ? (this.masterToken = hb) : hb instanceof Ec && (this.entityAuthenticationData = hb));
return this;
},
setUser: function (hb) {
!hb ||
this.userIdToken ||
this.userAuthenticationData ||
(hb instanceof Qc ? (this.userIdToken = hb) : hb instanceof wc && (this.userAuthenticationData = hb));
return this;
},
setMessageId: function (hb) {
this.messageId = hb;
return this;
},
toString: function () {
return this.name + ': ' + this.message;
},
});
})();
tb = cb.extend({
init: function lb(fb, eb, bb) {
lb.base.call(this, fb, eb, bb);
Object.defineProperties(this, { name: { value: 'MslCryptoException', writable: !1, configurable: !0 } });
},
});
xb = cb.extend({
init: function pb(eb, bb, lb) {
pb.base.call(this, eb, bb, lb);
Object.defineProperties(this, { name: { value: 'MslEncodingException', writable: !1, configurable: !0 } });
},
});
nc = cb.extend({
init: function kb(bb, lb, pb) {
kb.base.call(this, bb, lb, pb);
Object.defineProperties(this, { name: { value: 'MslEntityAuthException', writable: !1, configurable: !0 } });
},
});
(function () {
fc = Bb.Class.create(Error());
fc.mixin({
init: function (bb, lb, pb) {
var kb;
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
kb = this.stack;
Object.defineProperties(this, {
message: { value: bb, writable: !1, configurable: !1 },
cause: { value: lb, writable: !1, configurable: !1 },
requestCause: { value: pb, writable: !1, configurable: !1 },
name: { value: 'MslErrorResponseException', writable: !1, configurable: !0 },
stack: {
get: function () {
var Ha;
Ha = this.toString();
kb && (Ha += '\n' + kb);
lb && lb.stack && (Ha += '\nCaused by ' + lb.stack);
return Ha;
},
configurable: !0,
},
});
},
toString: function () {
return this.name + ': ' + this.message;
},
});
})();
(function () {
Tb = Bb.Class.create(Error());
Tb.mixin({
init: function (bb, lb) {
var pb;
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
pb = this.stack;
Object.defineProperties(this, {
message: { value: bb, writable: !1, configurable: !1 },
cause: { value: lb, writable: !1, configurable: !1 },
name: { value: 'MslIoException', writable: !1, configurable: !0 },
stack: {
get: function () {
var kb;
kb = this.toString();
pb && (kb += '\n' + pb);
lb && lb.stack && (kb += '\nCaused by ' + lb.stack);
return kb;
},
configurable: !0,
},
});
},
toString: function () {
return this.name + ': ' + this.message;
},
});
})();
(function () {
ub = Bb.Class.create(Error());
ub.mixin({
init: function (bb, lb) {
var pb;
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
pb = this.stack;
Object.defineProperties(this, {
message: { value: bb, writable: !1, configurable: !1 },
cause: { value: lb, writable: !1, configurable: !1 },
name: { value: 'MslInternalException', writable: !1, configurable: !0 },
stack: {
get: function () {
var kb;
kb = this.toString();
pb && (kb += '\n' + pb);
lb && lb.stack && (kb += '\nCaused by ' + lb.stack);
return kb;
},
configurable: !0,
},
});
},
toString: function () {
return this.name + ': ' + this.message;
},
});
})();
(function () {
Zb = Bb.Class.create(Error());
Zb.mixin({
init: function (bb, lb) {
var pb;
Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
pb = this.stack;
Object.defineProperties(this, {
message: { value: bb, writable: !1, configurable: !1 },
cause: { value: lb, writable: !1, configurable: !1 },
name: { value: 'MslInterruptedException', writable: !1, configurable: !0 },
stack: {
get: function () {
var kb;
kb = this.toString();
pb && (kb += '\n' + pb);
lb && lb.stack && (kb += '\nCaused by ' + lb.stack);
return kb;
},
configurable: !0,
},
});
},
toString: function () {
return this.name + ': ' + this.message;
},
});
})();
Nb = cb.extend({
init: function Ha(lb, pb, kb) {
Ha.base.call(this, lb, pb, kb);
Object.defineProperties(this, { name: { value: 'MslKeyExchangeException', writable: !1, configurable: !0 } });
},
});
Fc = cb.extend({
init: function Ha(pb, kb) {
Ha.base.call(this, pb);
Object.defineProperties(this, {
masterToken: { value: kb, writable: !1, configurable: !1 },
name: { value: 'MslMasterTokenException', writable: !1, configurable: !0 },
});
},
});
Ib = cb.extend({
init: function Qa(kb, Ha, Ma) {
Qa.base.call(this, kb, Ha, Ma);
Object.defineProperties(this, { name: { value: 'MslMessageException', writable: !1, configurable: !0 } });
},
});
Hb = cb.extend({
init: function za(Ha, Ma, Qa) {
za.base.call(this, Ha, Ma, Qa);
Object.defineProperties(this, { name: { value: 'MslUserAuthException', writable: !1, configurable: !0 } });
},
});
(function () {
var na;
function Ha(ha) {
return 'undefined' === typeof ha ? !1 : ha;
}
function Ma(ha) {
return ha && ha.length
? (ac === na.V2014_02 &&
(ha = ha.map(function (ba) {
return 'wrap' == ba ? 'wrapKey' : 'unwrap' == ba ? 'unwrapKey' : ba;
})),
ha)
: ac === na.V2014_02
? 'encrypt decrypt sign verify deriveKey wrapKey unwrapKey'.split(' ')
: 'encrypt decrypt sign verify deriveKey wrap unwrap'.split(' ');
}
function Qa(ha, ba, ca, ia, fa) {
return Promise.resolve()
.then(function () {
return Ob.importKey(ha, ba, ca, ia, fa);
})
.catch(function (U) {
var Y;
if ('spki' !== ha && 'pkcs8' !== ha) throw U;
U = ASN1.webCryptoAlgorithmToJwkAlg(ca);
Y = ASN1.webCryptoUsageToJwkKeyOps(fa);
U = ASN1.rsaDerToJwk(ba, U, Y, ia);
if (!U) throw Error('Could not make valid JWK from DER input');
U = JSON.stringify(U);
return Ob.importKey('jwk', Bd(U), ca, ia, fa);
});
}
function za(ha, ba) {
return Promise.resolve()
.then(function () {
return Ob.exportKey(ha, ba);
})
.catch(function (ca) {
if ('spki' !== ha && 'pkcs8' !== ha) throw ca;
return Ob.exportKey('jwk', ba).then(function (ia) {
ia = JSON.parse(Ad(new Uint8Array(ia)));
ia = ASN1.jwkToRsaDer(ia);
if (!ia) throw Error('Could not make valid DER from JWK input');
return ia.getDer().buffer;
});
});
}
na = kd = { LEGACY: 1, V2014_01: 2, V2014_02: 3, LATEST: 3 };
Object.freeze(kd);
ac = na.LATEST;
Jb = {
encrypt: function (ha, ba, ca) {
switch (ac) {
case na.LEGACY:
return new Promise(function (ia, fa) {
var U;
U = Ob.encrypt(ha, ba, ca);
U.oncomplete = function (Y) {
ia(Y.target.result);
};
U.onerror = function (Y) {
fa(Y);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.encrypt(ha, ba, ca).then(function (ia) {
return new Uint8Array(ia);
});
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
decrypt: function (ha, ba, ca) {
switch (ac) {
case na.LEGACY:
return new Promise(function (ia, fa) {
var U;
U = Ob.decrypt(ha, ba, ca);
U.oncomplete = function (Y) {
ia(Y.target.result);
};
U.onerror = function (Y) {
fa(Y);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.decrypt(ha, ba, ca).then(function (ia) {
return new Uint8Array(ia);
});
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
sign: function (ha, ba, ca) {
switch (ac) {
case na.LEGACY:
return new Promise(function (ia, fa) {
var U;
U = Ob.sign(ha, ba, ca);
U.oncomplete = function (Y) {
ia(Y.target.result);
};
U.onerror = function (Y) {
fa(Y);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.sign(ha, ba, ca).then(function (ia) {
return new Uint8Array(ia);
});
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
verify: function (ha, ba, ca, ia) {
switch (ac) {
case na.LEGACY:
return new Promise(function (fa, U) {
var Y;
Y = Ob.verify(ha, ba, ca, ia);
Y.oncomplete = function (sa) {
fa(sa.target.result);
};
Y.onerror = function (sa) {
U(sa);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.verify(ha, ba, ca, ia);
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
digest: function (ha, ba) {
switch (ac) {
case na.LEGACY:
return new Promise(function (ca, ia) {
var fa;
fa = Ob.digest(ha, ba);
fa.oncomplete = function (U) {
ca(U.target.result);
};
fa.onerror = function (U) {
ia(U);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.digest(ha, ba).then(function (ca) {
return new Uint8Array(ca);
});
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
generateKey: function (ha, ba, ca) {
var ia, fa;
ia = Ha(ba);
fa = Ma(ca);
switch (ac) {
case na.LEGACY:
return new Promise(function (U, Y) {
var sa;
sa = Ob.generateKey(ha, ia, fa);
sa.oncomplete = function (pa) {
U(pa.target.result);
};
sa.onerror = function (pa) {
Y(pa);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.generateKey(ha, ia, fa);
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
deriveKey: function (ha, ba, ca, ia, fa) {
var U, Y;
U = Ha(ia);
Y = Ma(fa);
switch (ac) {
case na.LEGACY:
return new Promise(function (sa, pa) {
var ta;
ta = Ob.deriveKey(ha, ba, ca, U, Y);
ta.oncomplete = function (Ca) {
sa(Ca.target.result);
};
ta.onerror = function (Ca) {
pa(Ca);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.deriveKey(ha, ba, ca, U, Y);
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
importKey: function (ha, ba, ca, ia, fa) {
var U, Y;
U = Ha(ia);
Y = Ma(fa);
switch (ac) {
case na.LEGACY:
return new Promise(function (sa, pa) {
var ta;
ta = Ob.importKey(ha, ba, ca, U, Y);
ta.oncomplete = function (Ca) {
sa(Ca.target.result);
};
ta.onerror = function (Ca) {
pa(Ca);
};
});
case na.V2014_01:
case na.V2014_02:
return Qa(ha, ba, ca, U, Y);
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
exportKey: function (ha, ba) {
switch (ac) {
case na.LEGACY:
return new Promise(function (ca, ia) {
var fa;
fa = Ob.exportKey(ha, ba);
fa.oncomplete = function (U) {
ca(U.target.result);
};
fa.onerror = function (U) {
ia(U);
};
});
case na.V2014_01:
case na.V2014_02:
return za(ha, ba).then(function (ca) {
return new Uint8Array(ca);
});
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
wrapKey: function (ha, ba, ca, ia) {
switch (ac) {
case na.LEGACY:
return new Promise(function (fa, U) {
var Y;
Y = Ob.wrapKey(ba, ca, ia);
Y.oncomplete = function (sa) {
fa(sa.target.result);
};
Y.onerror = function (sa) {
U(sa);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.wrapKey(ha, ba, ca, ia).then(function (fa) {
return new Uint8Array(fa);
});
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
unwrapKey: function (ha, ba, ca, ia, fa, U, Y) {
switch (ac) {
case na.LEGACY:
return new Promise(function (sa, pa) {
var ta;
ta = Ob.unwrapKey(ba, fa, ca);
ta.oncomplete = function (Ca) {
sa(Ca.target.result);
};
ta.onerror = function (Ca) {
pa(Ca);
};
});
case na.V2014_01:
case na.V2014_02:
return Ob.unwrapKey(ha, ba, ca, ia, fa, Ha(U), Ma(Y));
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
},
};
id &&
id.getKeyByName &&
(Jb.getKeyByName = function (ha) {
switch (ac) {
case na.LEGACY:
return new Promise(function (ba, ca) {
var ia;
ia = id.getKeyByName(ha);
ia.oncomplete = function (fa) {
ba(fa.target.result);
};
ia.onerror = function (fa) {
ca(fa);
};
});
case na.V2014_01:
case na.V2014_02:
return id.getKeyByName(ha);
default:
throw Error('Unsupported Web Crypto version ' + WEB_CRYPTO_VERSION + '.');
}
});
ob.netflix = ob.netflix || {};
ob.netflix.crypto = Jb;
})();
oc = { name: 'AES-KW' };
jc = { name: 'AES-CBC' };
kc = { name: 'HMAC', hash: { name: 'SHA-256' } };
ld = { name: 'RSA-OAEP', hash: { name: 'SHA-1' } };
Id = { name: 'RSAES-PKCS1-v1_5' };
we = { name: 'RSASSA-PKCS1-v1_5', hash: { name: 'SHA-256' } };
xc = ['encrypt', 'decrypt'];
yc = ['wrap', 'unwrap'];
Gc = ['sign', 'verify'];
(function () {
Jd = Bb.Class.create({
init: function (Ha, Ma, Qa) {
var na;
function za(ha) {
La(
Ma,
function () {
var ba;
ba = ha ? Cb(ha) : Ab;
Object.defineProperties(na, {
rawKey: { value: Ha, writable: !1, configurable: !1 },
keyData: { value: ha, writable: !1, configurable: !1 },
keyDataB64: { value: ba, writable: !1, configurable: !1 },
});
return this;
},
na
);
}
na = this;
La(
Ma,
function () {
if (!Ha || 'object' != typeof Ha) throw new tb(V.INVALID_SYMMETRIC_KEY);
!Qa && Ha.extractable
? Jb.exportKey('raw', Ha).then(
function (ha) {
za(new Uint8Array(ha));
},
function (ha) {
Ma.error(new tb(V.KEY_EXPORT_ERROR, 'raw'));
}
)
: za(Qa);
},
na
);
},
size: function () {
return this.keyData.length;
},
toByteArray: function () {
return this.keyData;
},
toBase64: function () {
return this.keyDataB64;
},
});
Oc = function (Ha, Ma) {
new Jd(Ha, Ma);
};
pc = function (Ha, Ma, Qa, za) {
La(za, function () {
try {
Ha = 'string' == typeof Ha ? Fb(Ha) : Ha;
} catch (na) {
throw new tb(V.INVALID_SYMMETRIC_KEY, 'keydata ' + Ha, na);
}
Jb.importKey('raw', Ha, Ma, !0, Qa).then(
function (na) {
new Jd(na, za, Ha);
},
function (na) {
za.error(new tb(V.INVALID_SYMMETRIC_KEY));
}
);
});
};
})();
(function () {
md = Bb.Class.create({
init: function (Ha, Ma, Qa) {
var na;
function za(ha) {
La(
Ma,
function () {
Object.defineProperties(na, {
rawKey: { value: Ha, writable: !1, configurable: !1 },
encoded: { value: ha, writable: !1, configurable: !1 },
});
return this;
},
na
);
}
na = this;
La(Ma, function () {
if (!Ha || 'object' != typeof Ha || 'public' != Ha.type)
throw new TypeError('Only original public crypto keys are supported.');
!Qa && Ha.extractable
? Jb.exportKey('spki', Ha).then(
function (ha) {
za(new Uint8Array(ha));
},
function (ha) {
Ma.error(new tb(V.KEY_EXPORT_ERROR, 'spki'));
}
)
: za(Qa);
});
},
getEncoded: function () {
return this.encoded;
},
});
Cc = function (Ha, Ma) {
new md(Ha, Ma);
};
Kd = function (Ha, Ma, Qa, za) {
La(za, function () {
try {
Ha = 'string' == typeof Ha ? Fb(Ha) : Ha;
} catch (na) {
throw new tb(V.INVALID_PUBLIC_KEY, 'spki ' + Ha, na);
}
Jb.importKey('spki', Ha, Ma, !0, Qa).then(
function (na) {
new md(na, za, Ha);
},
function (na) {
za.error(new tb(V.INVALID_PUBLIC_KEY));
}
);
});
};
})();
(function () {
xe = Bb.Class.create({
init: function (Ha, Ma, Qa) {
var na;
function za(ha) {
La(
Ma,
function () {
Object.defineProperties(na, {
rawKey: { value: Ha, writable: !1, configurable: !1 },
encoded: { value: ha, writable: !1, configurable: !1 },
});
return this;
},
na
);
}
na = this;
La(Ma, function () {
if (!Ha || 'object' != typeof Ha || 'private' != Ha.type)
throw new TypeError('Only original private crypto keys are supported.');
!Qa && Ha.extractable
? Jb.exportKey('pkcs8', Ha).then(
function (ha) {
za(new Uint8Array(ha));
},
function (ha) {
Ma.error(new tb(V.KEY_EXPORT_ERROR, 'pkcs8'));
}
)
: za(Qa);
});
},
getEncoded: function () {
return this.encoded;
},
});
Pc = function (Ha, Ma) {
new xe(Ha, Ma);
};
})();
(function () {
var Ha;
Ha = Od = { V1: 1, V2: 2 };
Ld = Bb.Class.create({
init: function (Ma, Qa, za, na) {
La(
na,
function () {
var ha, ba, ca, ia;
ha = Ha.V1;
ba = Ma;
ca = null;
for (ia in jd) {
if (jd[ia] == Ma) {
ha = Ha.V2;
ba = null;
ca = Ma;
break;
}
}
Object.defineProperties(this, {
version: { value: ha, writable: !1, enumerable: !1, configurable: !1 },
keyId: { value: ba, writable: !1, configurable: !1 },
cipherSpec: { value: ca, writable: !1, configurable: !1 },
iv: { value: Qa, writable: !1, configurable: !1 },
ciphertext: { value: za, writable: !1, configurable: !1 },
});
return this;
},
this
);
},
toJSON: function () {
var Ma;
Ma = {};
switch (this.version) {
case Ha.V1:
Ma.keyid = this.keyId;
this.iv && (Ma.iv = Cb(this.iv));
Ma.ciphertext = Cb(this.ciphertext);
Ma.sha256 = 'AA==';
break;
case Ha.V2:
Ma.version = this.version;
Ma.cipherspec = this.cipherSpec;
this.iv && (Ma.iv = Cb(this.iv));
Ma.ciphertext = Cb(this.ciphertext);
break;
default:
throw new ub('Ciphertext envelope version ' + this.version + ' encoding unsupported.');
}
return Ma;
},
});
Md = function (Ma, Qa, za, na) {
new Ld(Ma, Qa, za, na);
};
Nd = function (Ma, Qa, za) {
La(za, function () {
var na, ha, ba, ca, ia, fa, U;
na = Ma.keyid;
ha = Ma.cipherspec;
ba = Ma.iv;
ca = Ma.ciphertext;
ia = Ma.sha256;
if (!Qa)
if ((Qa = Ma.version) && 'number' === typeof Qa && Qa === Qa) {
fa = !1;
for (U in Ha) {
if (Ha[U] == Qa) {
fa = !0;
break;
}
}
if (!fa) throw new tb(V.UNIDENTIFIED_CIPHERTEXT_ENVELOPE, 'ciphertext envelope ' + JSON.stringify(Ma));
} else Qa = Ha.V1;
switch (Qa) {
case Ha.V1:
if (
'string' !== typeof na ||
(ba && 'string' !== typeof ba) ||
'string' !== typeof ca ||
'string' !== typeof ia
)
throw new xb(V.JSON_PARSE_ERROR, 'ciphertext envelope ' + JSON.stringify(Ma));
break;
case Ha.V2:
U = Ma.version;
if (U != Ha.V2)
throw new tb(V.UNIDENTIFIED_CIPHERTEXT_ENVELOPE, 'ciphertext envelope ' + JSON.stringify(Ma));
if ('string' !== typeof ha || (ba && 'string' !== typeof ba) || 'string' !== typeof ca)
throw new xb(V.JSON_PARSE_ERROR, 'ciphertext envelope ' + JSON.stringify(Ma));
ha = te(ha);
if (!ha) throw new tb(V.UNIDENTIFIED_CIPHERSPEC, 'ciphertext envelope ' + JSON.stringify(Ma));
na = ha;
break;
default:
throw new tb(V.UNSUPPORTED_CIPHERTEXT_ENVELOPE, 'ciphertext envelope ' + JSON.stringify(Ma));
}
try {
ba && (ba = Fb(ba));
ca = Fb(ca);
} catch (Y) {
throw new tb(V.CIPHERTEXT_ENVELOPE_PARSE_ERROR, 'encryption envelope ' + JSON.stringify(Ma), Y);
}
new Ld(na, ba, ca, za);
});
};
})();
(function () {
var Ha;
Ha = Rd = { V1: 1, V2: 2 };
qc = Bb.Class.create({
init: function (Ma, Qa, za) {
var na;
switch (Ma) {
case Ha.V1:
na = za;
break;
case Ha.V2:
na = {};
na.version = Ma;
na.algorithm = Qa;
na.signature = Cb(za);
na = Qb(JSON.stringify(na), Kb);
break;
default:
throw new ub('Signature envelope version ' + Ma + ' encoding unsupported.');
}
Object.defineProperties(this, {
version: { value: Ma, writable: !1, enumerable: !1, configurable: !1 },
algorithm: { value: Qa, writable: !1, configurable: !1 },
signature: { value: za, writable: !1, configurable: !1 },
bytes: { value: na, writable: !1, configurable: !1 },
});
},
});
Pd = function () {
var Ma, Qa, za, na;
if (2 == arguments.length) {
Ma = Ha.V1;
Qa = arguments[0];
za = null;
na = arguments[1];
} else 3 == arguments.length && ((Ma = Ha.V2), (za = arguments[0]), (Qa = arguments[1]), (na = arguments[2]));
La(na, function () {
return new qc(Ma, za, Qa);
});
};
Qd = function (Ma, Qa, za) {
La(za, function () {
var na, ha, ba, ca, ia, fa, U;
if (Qa)
switch (Qa) {
case Ha.V1:
return new qc(Ha.V1, null, Ma);
case Ha.V2:
try {
na = Rb(Ma, Kb);
ha = JSON.parse(na);
ba = parseInt(ha.version);
ca = ha.algorithm;
ia = ha.signature;
if (!ba || 'number' !== typeof ba || ba != ba || 'string' !== typeof ca || 'string' !== typeof ia)
throw new xb(V.JSON_PARSE_ERROR, 'signature envelope ' + Cb(Ma));
if (Ha.V2 != ba) throw new tb(V.UNSUPPORTED_SIGNATURE_ENVELOPE, 'signature envelope ' + Cb(Ma));
fa = Gd(ca);
if (!fa) throw new tb(V.UNIDENTIFIED_ALGORITHM, 'signature envelope ' + Cb(Ma));
U = Fb(ia);
if (!U) throw new tb(V.INVALID_SIGNATURE, 'signature envelope ' + Base64Util.encode(Ma));
return new qc(Ha.V2, fa, U);
} catch (Y) {
if (Y instanceof SyntaxError) throw new xb(V.JSON_PARSE_ERROR, 'signature envelope ' + Cb(Ma), Y);
throw Y;
}
default:
throw new tb(V.UNSUPPORTED_SIGNATURE_ENVELOPE, 'signature envelope ' + Cb(Ma));
}
try {
na = Rb(Ma, Kb);
ha = JSON.parse(na);
} catch (Y) {
ha = null;
}
if (ha && ha.version) {
if (((na = ha.version), 'number' !== typeof na || na !== na)) na = Ha.V1;
} else na = Ha.V1;
switch (na) {
case Ha.V1:
return new qc(na, null, Ma);
case Ha.V2:
fa = ha.algorithm;
ia = ha.signature;
if ('string' !== typeof fa || 'string' !== typeof ia) return new qc(Ha.V1, null, Ma);
fa = Gd(fa);
if (!fa) return new qc(Ha.V1, null, Ma);
try {
U = Fb(ia);
} catch (Y) {
return new qc(Ha.V1, null, Ma);
}
return new qc(na, fa, U);
default:
throw new tb(V.UNSUPPORTED_SIGNATURE_ENVELOPE, 'signature envelope ' + Ma);
}
});
};
})();
Rc = Bb.Class.create({
encrypt: function (Ha, Ma) {},
decrypt: function (Ha, Ma) {},
wrap: function (Ha, Ma) {},
unwrap: function (Ha, Ma, Qa, za) {},
sign: function (Ha, Ma) {},
verify: function (Ha, Ma, Qa) {},
});
(function () {
var Ha;
Ha = sc = { RSA_OAEP: ld.name, A128KW: oc.name };
mc = 'A128GCM';
rc = Bb.Class.create({
init: function (Ma, Qa, za, na, ha) {
switch (Qa) {
case Ha.RSA_OAEP:
ha = ha && (ha.rawKey || ha);
na = na && (na.rawKey || na);
break;
case Ha.A128KW:
ha = na = na && (na.rawKey || na);
break;
default:
throw new ub('Unsupported algorithm: ' + Qa);
}
Object.defineProperties(this, {
_ctx: { value: Ma, writable: !1, enumerable: !1, configurable: !1 },
_algo: { value: Qa, writable: !1, enumerable: !1, configurable: !1 },
_enc: { value: za, writable: !1, enumerable: !1, configurable: !1 },
_wrapKey: { value: ha, writable: !1, enumerable: !1, configurable: !1 },
_unwrapKey: { value: na, writable: !1, enumerable: !1, configurable: !1 },
});
},
encrypt: function (Ma, Qa) {
Qa.error(new tb(V.ENCRYPT_NOT_SUPPORTED));
},
decrypt: function (Ma, Qa) {
Qa.error(new tb(V.DECRYPT_NOT_SUPPORTED));
},
wrap: function (Ma, Qa) {
La(
Qa,
function () {
Jb.wrapKey('jwe+jwk', Ma.rawKey, this._wrapKey, this._wrapKey.algorithm).then(
function (za) {
Qa.result(za);
},
function (za) {
Qa.error(new tb(V.WRAP_ERROR));
}
);
},
this
);
},
unwrap: function (Ma, Qa, za, na) {
function ha(ba) {
La(na, function () {
switch (ba.type) {
case 'secret':
Oc(ba, na);
break;
case 'public':
Cc(ba, na);
break;
case 'private':
Pc(ba, na);
break;
default:
throw new tb(V.UNSUPPORTED_KEY, 'type: ' + ba.type);
}
});
}
La(
na,
function () {
Jb.unwrapKey('jwe+jwk', Ma, this._unwrapKey, this._unwrapKey.algorithm, Qa, !1, za).then(
function (ba) {
ha(ba);
},
function () {
na.error(new tb(V.UNWRAP_ERROR));
}
);
},
this
);
},
sign: function (Ma, Qa) {
Qa.error(new tb(V.SIGN_NOT_SUPPORTED));
},
verify: function (Ma, Qa, za) {
za.error(new tb(V.VERIFY_NOT_SUPPORTED));
},
});
})();
Sc = Rc.extend({
encrypt: function (Ha, Ma) {
Ma.result(Ha);
},
decrypt: function (Ha, Ma) {
Ma.result(Ha);
},
wrap: function (Ha, Ma) {
Ma.result(Ha);
},
unwrap: function (Ha, Ma, Qa, za) {
za.result(Ha);
},
sign: function (Ha, Ma) {
Ma.result(new Uint8Array(0));
},
verify: function (Ha, Ma, Qa) {
Qa.result(!0);
},
});
(function () {
var Ha;
Ha = od = {
ENCRYPT_DECRYPT_OAEP: 1,
ENCRYPT_DECRYPT_PKCS1: 2,
WRAP_UNWRAP_OAEP: 3,
WRAP_UNWRAP_PKCS1: 4,
SIGN_VERIFY: 5,
};
nd = Rc.extend({
init: function ca(Qa, za, na, ha, ba) {
ca.base.call(this);
na && (na = na.rawKey);
ha && (ha = ha.rawKey);
Object.defineProperties(this, {
id: { value: za, writable: !1, enumerable: !1, configurable: !1 },
privateKey: { value: na, writable: !1, enumerable: !1, configurable: !1 },
publicKey: { value: ha, writable: !1, enumerable: !1, configurable: !1 },
transform: {
value: ba == Ha.ENCRYPT_DECRYPT_PKCS1 ? Id : ba == Ha.ENCRYPT_DECRYPT_OAEP ? ld : 'nullOp',
writable: !1,
enumerable: !1,
configurable: !1,
},
wrapTransform: {
value: ba == Ha.WRAP_UNWRAP_PKCS1 ? Id : ba == Ha.WRAP_UNWRAP_OAEP ? ld : 'nullOp',
writable: !1,
enumerable: !1,
configurable: !1,
},
algo: { value: ba == Ha.SIGN_VERIFY ? we : 'nullOp', writable: !1, enumerable: !1, configurable: !1 },
});
},
encrypt: function (Qa, za) {
var na;
na = this;
La(
za,
function () {
if ('nullOp' == this.transform) return Qa;
if (!this.publicKey) throw new tb(V.ENCRYPT_NOT_SUPPORTED, 'no public key');
if (0 == Qa.length) return Qa;
Jb.encrypt(na.transform, na.publicKey, Qa).then(
function (ha) {
Md(na.id, null, ha, {
result: function (ba) {
var ca;
try {
ca = JSON.stringify(ba);
za.result(Qb(ca, Kb));
} catch (ia) {
za.error(new tb(V.ENCRYPT_ERROR, null, ia));
}
},
error: function (ba) {
ba instanceof cb || (ba = new tb(V.ENCRYPT_ERROR, null, ba));
za.error(ba);
},
});
},
function (ha) {
za.error(new tb(V.ENCRYPT_ERROR));
}
);
},
this
);
},
decrypt: function (Qa, za) {
var na;
na = this;
La(
za,
function () {
var ha, ba;
if ('nullOp' == this.transform) return Qa;
if (!this.privateKey) throw new tb(V.DECRYPT_NOT_SUPPORTED, 'no private key');
if (0 == Qa.length) return Qa;
try {
ha = Rb(Qa, Kb);
ba = JSON.parse(ha);
} catch (ca) {
if (ca instanceof SyntaxError) throw new tb(V.CIPHERTEXT_ENVELOPE_PARSE_ERROR, null, ca);
throw new tb(V.DECRYPT_ERROR, null, ca);
}
Nd(ba, Od.V1, {
result: function (ca) {
var ia;
try {
if (ca.keyId != na.id) throw new tb(V.ENVELOPE_KEY_ID_MISMATCH);
ia = za.result;
Jb.decrypt(na.transform, na.privateKey, ca.ciphertext).then(ia, function (fa) {
za.error(new tb(V.DECRYPT_ERROR));
});
} catch (fa) {
fa instanceof cb ? za.error(fa) : za.error(new tb(V.DECRYPT_ERROR, null, fa));
}
},
error: function (ca) {
ca instanceof xb && (ca = new tb(V.CIPHERTEXT_ENVELOPE_ENCODE_ERROR, null, ca));
ca instanceof cb || (ca = new tb(V.DECRYPT_ERROR, null, ca));
za.error(ca);
},
});
},
this
);
},
wrap: function (Qa, za) {
La(
za,
function () {
var na;
if ('nullOp' == this.wrapTransform || !this.publicKey)
throw new tb(V.WRAP_NOT_SUPPORTED, 'no public key');
na = za.result;
Jb.wrapKey('jwk', Qa.rawKey, this.publicKey, this.wrapTransform).then(na, function (ha) {
za.error(new tb(V.WRAP_ERROR));
});
},
this
);
},
unwrap: function (Qa, za, na, ha) {
function ba(ca) {
La(ha, function () {
switch (ca.type) {
case 'secret':
Oc(ca, ha);
break;
case 'public':
Cc(ca, ha);
break;
case 'private':
Pc(ca, ha);
break;
default:
throw new tb(V.UNSUPPORTED_KEY, 'type: ' + ca.type);
}
});
}
La(
ha,
function () {
if ('nullOp' == this.wrapTransform || !this.privateKey)
throw new tb(V.UNWRAP_NOT_SUPPORTED, 'no private key');
Jb.unwrapKey(
'jwk',
Qa,
this.privateKey,
{ name: this.privateKey.algorithm.name, hash: { name: 'SHA-1' } },
za,
!1,
na
).then(ba, function (ca) {
ha.error(new tb(V.UNWRAP_ERROR));
});
},
this
);
},
sign: function (Qa, za) {
La(
za,
function () {
if ('nullOp' == this.algo) return new Uint8Array(0);
if (!this.privateKey) throw new tb(V.SIGN_NOT_SUPPORTED, 'no private key');
Jb.sign(this.algo, this.privateKey, Qa).then(
function (na) {
Pd(na, {
result: function (ha) {
za.result(ha.bytes);
},
error: za.error,
});
},
function (na) {
za.error(new tb(V.SIGNATURE_ERROR));
}
);
},
this
);
},
verify: function (Qa, za, na) {
var ha;
ha = this;
La(
na,
function () {
if ('nullOp' == this.algo) return !0;
if (!this.publicKey) throw new tb(V.VERIFY_NOT_SUPPORTED, 'no public key');
Qd(za, Rd.V1, {
result: function (ba) {
La(
na,
function () {
var ca;
ca = na.result;
Jb.verify(this.algo, this.publicKey, ba.signature, Qa).then(ca, function (ia) {
na.error(new tb(V.SIGNATURE_ERROR));
});
},
ha
);
},
error: na.error,
});
},
this
);
},
});
})();
(function () {
pd = Rc.extend({
init: function ba(Ma, Qa, za, na, ha) {
ba.base.call(this);
za = za && za.rawKey;
na = na && na.rawKey;
ha = ha && ha.rawKey;
Object.defineProperties(this, {
ctx: { value: Ma, writable: !1, enumerable: !1, configurable: !1 },
id: { value: Qa, writable: !1, enumerable: !1, configurable: !1 },
encryptionKey: { value: za, writable: !1, enumerable: !1, configurable: !1 },
hmacKey: { value: na, writable: !1, enumerable: !1, configurable: !1 },
wrapKey: { value: ha, writable: !1, enumerable: !1, configurable: !1 },
});
},
encrypt: function (Ma, Qa) {
var za;
za = this;
La(
Qa,
function () {
var na;
if (!this.encryptionKey) throw new tb(V.ENCRYPT_NOT_SUPPORTED, 'no encryption/decryption key');
if (0 == Ma.length) return Ma;
na = new Uint8Array(16);
this.ctx.getRandom().nextBytes(na);
Jb.encrypt({ name: jc.name, iv: na }, za.encryptionKey, Ma).then(
function (ha) {
ha = new Uint8Array(ha);
Md(za.id, na, ha, {
result: function (ba) {
var ca;
try {
ca = JSON.stringify(ba);
Qa.result(Qb(ca, Kb));
} catch (ia) {
Qa.error(new tb(V.ENCRYPT_ERROR, null, ia));
}
},
error: function (ba) {
ba instanceof cb || (ba = new tb(V.ENCRYPT_ERROR, null, ba));
Qa.error(ba);
},
});
},
function (ha) {
Qa.error(new tb(V.ENCRYPT_ERROR));
}
);
},
this
);
},
decrypt: function (Ma, Qa) {
var za;
za = this;
La(
Qa,
function () {
var na, ha;
if (!this.encryptionKey) throw new tb(V.DECRYPT_NOT_SUPPORTED, 'no encryption/decryption key');
if (0 == Ma.length) return Ma;
try {
na = Rb(Ma, Kb);
ha = JSON.parse(na);
} catch (ba) {
if (ba instanceof SyntaxError) throw new tb(V.CIPHERTEXT_ENVELOPE_PARSE_ERROR, null, ba);
throw new tb(V.DECRYPT_ERROR, null, ba);
}
Nd(ha, Od.V1, {
result: function (ba) {
try {
if (ba.keyId != za.id) throw new tb(V.ENVELOPE_KEY_ID_MISMATCH);
Jb.decrypt({ name: jc.name, iv: ba.iv }, za.encryptionKey, ba.ciphertext).then(
function (ca) {
ca = new Uint8Array(ca);
Qa.result(ca);
},
function () {
Qa.error(new tb(V.DECRYPT_ERROR));
}
);
} catch (ca) {
ca instanceof cb ? Qa.error(ca) : Qa.error(new tb(V.DECRYPT_ERROR, null, ca));
}
},
error: function (ba) {
ba instanceof xb && (ba = new tb(V.CIPHERTEXT_ENVELOPE_ENCODE_ERROR, null, ba));
ba instanceof cb || (ba = new tb(V.DECRYPT_ERROR, null, ba));
Qa.error(ba);
},
});
},
this
);
},
wrap: function (Ma, Qa) {
La(
Qa,
function () {
if (!this.wrapKey) throw new tb(V.WRAP_NOT_SUPPORTED, 'no wrap/unwrap key');
Jb.wrapKey('raw', Ma.rawKey, this.wrapKey, this.wrapKey.algorithm).then(
function (za) {
Qa.result(za);
},
function (za) {
Qa.error(new tb(V.WRAP_ERROR));
}
);
},
this
);
},
unwrap: function (Ma, Qa, za, na) {
function ha(ba) {
La(na, function () {
switch (ba.type) {
case 'secret':
Oc(ba, na);
break;
case 'public':
Cc(ba, na);
break;
case 'private':
Pc(ba, na);
break;
default:
throw new tb(V.UNSUPPORTED_KEY, 'type: ' + ba.type);
}
});
}
La(
na,
function () {
if (!this.wrapKey) throw new tb(V.UNWRAP_NOT_SUPPORTED, 'no wrap/unwrap key');
Jb.unwrapKey('raw', Ma, this.wrapKey, this.wrapKey.algorithm, Qa, !1, za).then(
function (ba) {
ha(ba);
},
function (ba) {
na.error(new tb(V.UNWRAP_ERROR));
}
);
},
this
);
},
sign: function (Ma, Qa) {
var za;
za = this;
La(
Qa,
function () {
if (!this.hmacKey) throw new tb(V.SIGN_NOT_SUPPORTED, 'no HMAC key.');
Jb.sign(kc, this.hmacKey, Ma).then(
function (na) {
La(
Qa,
function () {
var ha;
ha = new Uint8Array(na);
Pd(ha, {
result: function (ba) {
Qa.result(ba.bytes);
},
error: Qa.error,
});
},
za
);
},
function () {
Qa.error(new tb(V.HMAC_ERROR));
}
);
},
this
);
},
verify: function (Ma, Qa, za) {
var na;
na = this;
La(
za,
function () {
if (!this.hmacKey) throw new tb(V.VERIFY_NOT_SUPPORTED, 'no HMAC key.');
Qd(Qa, Rd.V1, {
result: function (ha) {
La(
za,
function () {
Jb.verify(kc, this.hmacKey, ha.signature, Ma).then(
function (ba) {
za.result(ba);
},
function (ba) {
za.error(new tb(V.HMAC_ERROR));
}
);
},
na
);
},
error: za.error,
});
},
this
);
},
});
})();
dc = pd.extend({
init: function ba(Ma, Qa, za, na, ha) {
if (za || na || ha) ba.base.call(this, Ma, za + '_' + Qa.sequenceNumber, na, ha, null);
else {
if (!Qa.isDecrypted()) throw new Fc(V.MASTERTOKEN_UNTRUSTED, Qa);
ba.base.call(this, Ma, Qa.identity + '_' + Qa.sequenceNumber, Qa.encryptionKey, Qa.hmacKey, null);
}
},
});
Cf = Rc.extend({
encrypt: function (Ma, Qa) {
Qa.result(Ma);
},
decrypt: function (Ma, Qa) {
Qa.result(Ma);
},
wrap: function (Ma, Qa) {
Qa.error(new ub('Wrap is unsupported by the MSL token crypto context.'));
},
unwrap: function (Ma, Qa, za, na) {
na.error(new ub('Unwrap is unsupported by the MSL token crypto context.'));
},
sign: function (Ma, Qa) {
Qa.result(new Uint8Array(0));
},
verify: function (Ma, Qa, za) {
za.result(!1);
},
});
Mb = { PSK: 'PSK', MGK: 'MGK', X509: 'X509', RSA: 'RSA', NPTICKET: 'NPTICKET', ECC: 'ECC', NONE: 'NONE' };
Object.freeze(Mb);
(function () {
Ec = Bb.Class.create({
init: function (Ma) {
Object.defineProperties(this, { scheme: { value: Ma, writable: !1, configurable: !1 } });
},
getIdentity: function () {},
getAuthData: function () {},
equals: function (Ma) {
return this === Ma ? !0 : Ma instanceof Ec ? this.scheme == Ma.scheme : !1;
},
toJSON: function () {
var Ma;
Ma = {};
Ma.scheme = this.scheme;
Ma.authdata = this.getAuthData();
return Ma;
},
});
ye = function (Ma, Qa) {
var za, na;
za = Qa.scheme;
na = Qa.authdata;
if (!za || !na) throw new xb(V.JSON_PARSE_ERROR, 'entityauthdata ' + JSON.stringify(Qa));
if (!Mb[za]) throw new nc(V.UNIDENTIFIED_ENTITYAUTH_SCHEME, za);
Qa = Ma.getEntityAuthenticationFactory(za);
if (!Qa) throw new nc(V.ENTITYAUTH_FACTORY_NOT_FOUND, za);
return Qa.createData(Ma, na);
};
})();
qd = Bb.Class.create({
init: function (Ma) {
Object.defineProperties(this, { scheme: { value: Ma, writable: !1, configurable: !1 } });
},
createData: function (Ma, Qa) {},
getCryptoContext: function (Ma, Qa) {},
});
(function () {
hc = Ec.extend({
init: function za(Qa) {
za.base.call(this, Mb.MGK);
Object.defineProperties(this, { identity: { value: Qa, writable: !1, configurable: !1 } });
},
getIdentity: function () {
return this.identity;
},
getAuthData: function () {
var Qa;
Qa = {};
Qa.identity = this.identity;
return Qa;
},
equals: function na(za) {
return this === za
? !0
: za instanceof hc
? na.base.call(this, this, za) && this.identity == za.identity
: !1;
},
});
ze = function (za) {
var na;
na = za.identity;
if (!na) throw new xb(V.JSON_PARSE_ERROR, 'mgk authdata' + JSON.stringify(za));
return new hc(na);
};
})();
Df = qd.extend({
init: function za(Qa) {
za.base.call(this, Mb.MGK);
Object.defineProperties(this, { localIdentity: { value: Qa, writable: !1, enumerable: !1, configurable: !1 } });
},
createData: function (Qa, za) {
return ze(za);
},
getCryptoContext: function (Qa, za) {
if (!(za instanceof hc)) throw new ub('Incorrect authentication data type ' + JSON.stringify(za) + '.');
if (za.identity != this.localIdentity) throw new nc(V.ENTITY_NOT_FOUND, 'mgk ' + za.identity).setEntity(za);
return new Sc();
},
});
(function () {
lc = Ec.extend({
init: function na(za) {
na.base.call(this, Mb.PSK);
Object.defineProperties(this, { identity: { value: za, writable: !1 } });
},
getIdentity: function () {
return this.identity;
},
getAuthData: function () {
var za;
za = {};
za.identity = this.identity;
return za;
},
equals: function ha(na) {
return this === na
? !0
: na instanceof lc
? ha.base.call(this, this, na) && this.identity == na.identity
: !1;
},
});
Ae = function (na) {
var ha;
ha = na.identity;
if (!ha) throw new xb(V.JSON_PARSE_ERROR, 'psk authdata' + JSON.stringify(na));
return new lc(ha);
};
})();
Ef = qd.extend({
init: function na(za) {
na.base.call(this, Mb.PSK);
Object.defineProperties(this, { localIdentity: { value: za, writable: !1, enumerable: !1, configurable: !1 } });
},
createData: function (za, na) {
return Ae(na);
},
getCryptoContext: function (za, na) {
if (!(na instanceof lc)) throw new ub('Incorrect authentication data type ' + JSON.stringify(na) + '.');
if (na.getIdentity() != this.localIdentity)
throw new nc(V.ENTITY_NOT_FOUND, 'psk ' + na.identity).setEntity(na);
return new Sc();
},
});
(function () {
rd = Ec.extend({
init: function ba(na, ha) {
ba.base.call(this, Mb.RSA);
Object.defineProperties(this, {
identity: { value: na, writable: !1, configurable: !1 },
publicKeyId: { value: ha, writable: !1, configurable: !1 },
});
},
getIdentity: function () {
return this.identity;
},
getAuthData: function () {
var na;
na = {};
na.identity = this.identity;
na.pubkeyid = this.publicKeyId;
return na;
},
equals: function ba(ha) {
return this === ha
? !0
: ha instanceof rd
? ba.base.call(this, this, ha) && this.identity == ha.identity && this.publicKeyId == ha.publicKeyId
: !1;
},
});
Be = function (ha) {
var ba, ca;
ba = ha.identity;
ca = ha.pubkeyid;
if (!ba || 'string' !== typeof ba || !ca || 'string' !== typeof ca)
throw new xb(V.JSON_PARSE_ERROR, 'RSA authdata' + JSON.stringify(ha));
return new rd(ba, ca);
};
})();
Ff = qd.extend({
init: function ha(na) {
ha.base.call(this, Mb.RSA);
Object.defineProperties(this, { store: { value: na, writable: !1, enumerable: !1, configurable: !1 } });
},
createData: function (na, ha) {
return Be(ha);
},
getCryptoContext: function (na, ha) {
var ba, ca, ia;
if (!(ha instanceof rd)) throw new ub('Incorrect authentication data type ' + ha + '.');
ba = ha.identity;
ca = ha.publicKeyId;
ia = this.store.getPublicKey(ca);
if (!ia) throw new nc(V.RSA_PUBLICKEY_NOT_FOUND, ca).setEntity(ha);
return new nd(na, ba, null, ia, od.SIGN_VERIFY);
},
});
(function () {
Wc = Ec.extend({
init: function ba(ha) {
ba.base.call(this, Mb.NONE);
Object.defineProperties(this, { identity: { value: ha, writable: !1 } });
},
getIdentity: function () {
return this.identity;
},
getAuthData: function () {
var ha;
ha = {};
ha.identity = this.identity;
return ha;
},
equals: function ca(ba) {
return this === ba
? !0
: ba instanceof Wc
? ca.base.call(this, this, ba) && this.identity == ba.identity
: !1;
},
});
Ce = function (ba) {
var ca;
ca = ba.identity;
if (!ca) throw new xb(V.JSON_PARSE_ERROR, 'Unauthenticated authdata' + JSON.stringify(ba));
return new Wc(ca);
};
})();
Bf = qd.extend({
init: function ha() {
ha.base.call(this, Mb.NONE);
},
createData: function (ha, ba) {
return Ce(ba);
},
getCryptoContext: function (ha, ba) {
if (!(ba instanceof Wc)) throw new ub('Incorrect authentication data type ' + JSON.stringify(ba) + '.');
return new Sc();
},
});
Gf = Bb.Class.create({
init: function () {
Object.defineProperties(this, { rsaKeys: { value: {}, writable: !1, enumerable: !1, configurable: !1 } });
},
addPublicKey: function (ha, ba) {
if (!(ba instanceof md)) throw new ub('Incorrect key data type ' + ba + '.');
this.rsaKeys[ha] = ba;
},
getIdentities: function () {
return Object.keys(this.rsaKeys);
},
removePublicKey: function (ha) {
delete this.rsaKeys[ha];
},
getPublicKey: function (ha) {
return this.rsaKeys[ha];
},
});
Sd = Bb.Class.create({
abort: function () {},
close: function () {},
mark: function () {},
reset: function () {},
markSupported: function () {},
read: function (ha, ba, ca) {},
});
sd = Bb.Class.create({
abort: function () {},
close: function (ha, ba) {},
write: function (ha, ba, ca, ia, fa) {},
flush: function (ha, ba) {},
});
Hf = Bb.Class.create({
init: function (ha) {
Object.defineProperties(this, {
_data: { value: ha, 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 Tb('Stream has not been marked.');
this._currentPosition = this._mark;
},
markSupported: function () {
return !0;
},
read: function (ha, ba, ca) {
db(
ca,
function () {
var ia;
if (this._closed) throw new Tb('Stream is already closed.');
if (this._currentPosition == this._data.length) return null;
-1 == ha && (ha = this._data.length - this._currentPosition);
ia = this._data.subarray(this._currentPosition, this._currentPosition + ha);
this._currentPosition += ia.length;
return ia;
},
this
);
},
});
If = Bb.Class.create({
init: function () {
var ha;
ha = {
_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, ha);
},
abort: function () {},
close: function (ha, ba) {
this._closed = !0;
ba.result(!0);
},
write: function (ha, ba, ca, ia, fa) {
db(
fa,
function () {
var U;
if (this._closed) throw new Tb('Stream is already closed.');
if (0 > ba) throw new RangeError('Offset cannot be negative.');
if (0 > ca) throw new RangeError('Length cannot be negative.');
if (ba + ca > ha.length)
throw new RangeError('Offset plus length cannot be greater than the array length.');
U = ha.subarray(ba, ca);
this._buffered.push(U);
return U.length;
},
this
);
},
flush: function (ha, ba) {
var ca;
for (; 0 < this._buffered.length; ) {
if (((ha = this._buffered.shift()), this._result)) {
ca = new Uint8Array(this._result.length + ha.length);
ca.set(this._result);
ca.set(ha, this._result.length);
this._result = ca;
} else this._result = new Uint8Array(ha);
}
ba.result(!0);
},
size: function () {
this.flush(1, { result: function () {} });
return this._result.length;
},
toByteArray: function () {
this.flush(1, { result: function () {} });
return this._result;
},
});
Jf = Bb.Class.create({ getResponse: function (ha, ba, ca) {} });
(function () {
var ha, ba;
ha = sd.extend({
init: function (ca, ia) {
ca = {
_httpLocation: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
_timeout: { value: ia, writable: !0, enumerable: !1, configurable: !1 },
_buffer: { value: new If(), writable: !1, enumerable: !1, configurable: !1 },
_response: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
_abortToken: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
_responseQueue: { value: new Xc(), writable: !0, enumerable: !1, configurable: !1 },
};
Object.defineProperties(this, ca);
},
setTimeout: function (ca) {
this._timeout = ca;
},
getResponse: function (ca, ia) {
var fa;
fa = this;
this._responseQueue.poll(ca, {
result: function (U) {
db(
ia,
function () {
U && this._responseQueue.add(U);
return U;
},
fa
);
},
timeout: function () {
db(
ia,
function () {
this._response = { isTimeout: !0 };
this._responseQueue.add(this._response);
this.abort();
ia.timeout();
},
fa
);
},
error: function (U) {
db(
ia,
function () {
this._response = { isError: !0 };
this._responseQueue.add(this._response);
throw U;
},
fa
);
},
});
},
abort: function () {
this._abortToken && this._abortToken.abort();
},
close: function (ca, ia) {
var fa;
fa = this;
db(
ia,
function () {
var U;
if (this._response) return !0;
U = this._buffer.toByteArray();
0 < U.length &&
(this._abortToken = this._httpLocation.getResponse({ body: U }, this._timeout, {
result: function (Y) {
fa._response = { response: Y };
fa._responseQueue.add(fa._response);
},
timeout: function () {
fa._response = { isTimeout: !0 };
fa._responseQueue.add(fa._response);
},
error: function (Y) {
fa._response = { isError: !0, error: Y };
fa._responseQueue.add(fa._response);
},
}));
return !0;
},
this
);
},
write: function (ca, ia, fa, U, Y) {
db(
Y,
function () {
if (this._response) throw new Tb('HttpOutputStream already closed.');
this._buffer.write(ca, ia, fa, U, Y);
},
this
);
},
flush: function (ca, ia) {
db(
ia,
function () {
if (this._response) return !0;
this._buffer.flush(ca, ia);
},
this
);
},
});
ba = Sd.extend({
init: function (ca) {
Object.defineProperties(this, {
_out: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
_buffer: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
_exception: { value: Ab, 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: Ab, 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 (ca, ia, fa) {
var Y;
function U(sa) {
db(
fa,
function () {
if (!sa) return new Uint8Array(0);
this._out.getResponse(ia, {
result: function (pa) {
db(
fa,
function () {
var ta;
if (pa.isTimeout) (this._timedout = !0), fa.timeout();
else {
if (pa.isError)
throw ((this._exception = pa.error || new Tb('Unknown HTTP exception.')), this._exception);
if (!pa.response)
throw ((this._exception = new Tb('Missing HTTP response.')), this._exception);
pa.response.json !== Ab &&
((this._json = pa.response.json),
(this.getJSON = function () {
return Y._json;
}));
ta =
pa.response.content ||
Bd('string' === typeof pa.response.body ? pa.response.body : JSON.stringify(this._json));
this._buffer = new Hf(ta);
this._buffer.read(ca, ia, fa);
}
},
Y
);
},
timeout: function () {
fa.timeout();
},
error: function (pa) {
fa.error(pa);
},
});
},
Y
);
}
Y = this;
db(
fa,
function () {
if (this._exception) throw this._exception;
if (this._timedout) fa.timeout();
else {
if (this._aborted) return new Uint8Array(0);
this._buffer
? this._buffer.read(ca, ia, fa)
: this._out.close(ia, {
result: function (sa) {
U(sa);
},
timeout: function () {
fa.timeout();
},
error: function (sa) {
fa.error(sa);
},
});
}
},
Y
);
},
});
ne = Bb.Class.create({
init: function (ca, ia) {
Object.defineProperties(this, {
_httpLocation: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
_timeout: { value: ia, writable: !0, enumerable: !1, configurable: !1 },
});
},
setTimeout: function (ca) {
this._timeout = ca;
},
openConnection: function () {
var ca;
ca = new ha(this._httpLocation, this._timeout);
return { input: new ba(ca), output: ca };
},
});
})();
(function () {
var ha, ba;
ha = sd.extend({
init: function () {
var ca;
ca = { _buffer: { value: new Uint8Array(), writable: !0, enumerable: !1, configurable: !1 } };
Object.defineProperties(this, ca);
},
setTimeout: function () {},
getResponse: function (ca, ia) {
ia.result({ success: !1, content: null, errorHttpCode: Ab, errorSubCode: Ab });
},
abort: function () {},
close: function (ca, ia) {
ia.result(!0);
},
write: function (ca, ia, fa, U, Y) {
var sa, pa;
try {
if (0 > ia) throw new RangeError('Offset cannot be negative.');
if (0 > fa) throw new RangeError('Length cannot be negative.');
if (ia + fa > ca.length)
throw new RangeError('Offset plus length cannot be greater than the array length.');
sa = ca.subarray(ia, fa);
pa = new Uint8Array(this._buffer.length + sa.length);
pa.set(this._buffer);
pa.set(sa, this._buffer.length);
this._buffer = pa;
Y.result(sa.length);
} catch (ta) {
Y.error(ta);
}
},
flush: function (ca, ia) {
ia.result(!0);
},
request: function () {
return this._buffer;
},
});
ba = Sd.extend({
init: function () {},
abort: function () {},
close: function () {},
mark: function () {},
reset: function () {},
markSupported: function () {},
read: function (ca, ia, fa) {
fa.result(new Uint8Array(16));
},
});
oe = Bb.Class.create({
init: function () {
var ca;
ca = {
output: { value: new ha(), writable: !1, enumerable: !1, configurable: !1 },
input: { value: new ba(), writable: !0, enumerable: !1, configurable: !1 },
};
Object.defineProperties(this, ca);
},
setTimeout: function () {},
openConnection: function () {
return { input: this.input, output: this.output };
},
getRequest: function () {
return Ad(this.output.request());
},
});
})();
De = function (ha, ba, ca) {
(function (ia, fa, U) {
ia.read(-1, fa, {
result: function (Y) {
Y && Y.length ? U(null, Y) : U(null, null);
},
timeout: function () {
ca.timeout();
},
error: function (Y) {
U(Y, null);
},
});
})(ha, ba, function (ia, fa) {
var U, Y;
if (ia) ca.error(ia);
else if (fa) {
if (ha.getJSON !== Ab && 'function' === typeof ha.getJSON) ca.result(ha.getJSON());
else {
ia = ca.result;
fa = new Kf(Rb(fa, 'utf-8'));
U = [];
for (Y = fa.nextValue(); Y !== Ab; ) {
U.push(Y);
Y = fa.nextValue();
}
ia.call(ca, U);
}
} else ca.result(null);
});
};
gc = {
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(gc);
(function () {
Yc = Bb.Class.create({
init: function (ha) {
Object.defineProperties(this, { keyExchangeScheme: { value: ha, writable: !1, configurable: !1 } });
},
getKeydata: function () {},
toJSON: function () {
var ha;
ha = {};
ha.scheme = this.keyExchangeScheme;
ha.keydata = this.getKeydata();
return ha;
},
equals: function (ha) {
return this === ha ? !0 : ha instanceof Yc ? this.keyExchangeScheme == ha.keyExchangeScheme : !1;
},
uniqueKey: function () {
return this.keyExchangeScheme;
},
});
Ee = function (ha, ba, ca) {
La(ca, function () {
var ia, fa, U;
ia = ba.scheme;
fa = ba.keydata;
if (!ia || !fa || 'object' !== typeof fa)
throw new xb(V.JSON_PARSE_ERROR, 'keyrequestdata ' + JSON.stringify(ba));
if (!gc[ia]) throw new Nb(V.UNIDENTIFIED_KEYX_SCHEME, ia);
U = ha.getKeyExchangeFactory(ia);
if (!U) throw new Nb(V.KEYX_FACTORY_NOT_FOUND, ia);
U.createRequestData(ha, fa, ca);
});
};
})();
(function () {
Zc = Bb.Class.create({
init: function (ha, ba) {
Object.defineProperties(this, {
masterToken: { value: ha, writable: !1, configurable: !1 },
keyExchangeScheme: { value: ba, wrtiable: !1, configurable: !1 },
});
},
getKeydata: function () {},
toJSON: function () {
var ha;
ha = {};
ha.mastertoken = this.masterToken;
ha.scheme = this.keyExchangeScheme;
ha.keydata = this.getKeydata();
return ha;
},
equals: function (ha) {
return this === ha
? !0
: ha instanceof Zc
? this.masterToken.equals(ha.masterToken) && this.keyExchangeScheme == ha.keyExchangeScheme
: !1;
},
uniqueKey: function () {
return this.masterToken.uniqueKey() + ':' + this.keyExchangeScheme;
},
});
Fe = function (ha, ba, ca) {
La(ca, function () {
var ia, fa, U;
ia = ba.mastertoken;
fa = ba.scheme;
U = ba.keydata;
if (!fa || !ia || 'object' !== typeof ia || !U || 'object' !== typeof U)
throw new xb(V.JSON_PARSE_ERROR, 'keyresponsedata ' + JSON.stringify(ba));
if (!gc[fa]) throw new Nb(V.UNIDENTIFIED_KEYX_SCHEME, fa);
Hc(ha, ia, {
result: function (Y) {
La(ca, function () {
var sa;
sa = ha.getKeyExchangeFactory(fa);
if (!sa) throw new Nb(V.KEYX_FACTORY_NOT_FOUND, fa);
return sa.createResponseData(ha, Y, U);
});
},
error: function (Y) {
ca.error(Y);
},
});
});
};
})();
(function () {
var ha;
ha = Bb.Class.create({
init: function (ba, ca) {
Object.defineProperties(this, {
keyResponseData: { value: ba, writable: !1, configurable: !1 },
cryptoContext: { value: ca, writable: !1, configurable: !1 },
});
},
});
ic = Bb.Class.create({
init: function (ba) {
Object.defineProperties(this, { scheme: { value: ba, writable: !1, configurable: !1 } });
},
createRequestData: function (ba, ca, ia) {},
createResponseData: function (ba, ca, ia) {},
generateResponse: function (ba, ca, ia, fa) {},
getCryptoContext: function (ba, ca, ia, fa, U) {},
generateSessionKeys: function (ba, ca) {
La(ca, function () {
var ia, fa;
ia = new Uint8Array(16);
fa = new Uint8Array(32);
ba.getRandom().nextBytes(ia);
ba.getRandom().nextBytes(fa);
pc(ia, jc, xc, {
result: function (U) {
pc(fa, kc, Gc, {
result: function (Y) {
ca.result({ encryptionKey: U, hmacKey: Y });
},
error: function (Y) {
ca.error(new tb(V.SESSION_KEY_CREATION_FAILURE, null, Y));
},
});
},
error: function (U) {
ca.error(new tb(V.SESSION_KEY_CREATION_FAILURE, null, U));
},
});
});
},
importSessionKeys: function (ba, ca, ia) {
pc(ba, jc, xc, {
result: function (fa) {
pc(ca, kc, Gc, {
result: function (U) {
ia.result({ encryptionKey: fa, hmacKey: U });
},
error: function (U) {
ia.error(U);
},
});
},
error: function (fa) {
ia.error(fa);
},
});
},
});
ic.KeyExchangeData = ha;
})();
(function () {
var ba, ca, ia;
function ha(fa, U, Y, sa, pa) {
La(pa, function () {
var ta, Ca;
switch (U) {
case ba.PSK:
(ta = new lc(sa)), (Ca = fa.getEntityAuthenticationFactory(Mb.PSK));
if (!Ca) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, U);
ta = Ca.getCryptoContext(fa, ta);
return new rc(fa, sc.A128KW, mc, Ab);
case ba.MGK:
ta = new hc(sa);
Ca = fa.getEntityAuthenticationFactory(Mb.MGK);
if (!Ca) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, U);
ta = Ca.getCryptoContext(fa, ta);
return new rc(fa, sc.A128KW, mc, Ab);
case ba.WRAP:
ta = fa.getMslCryptoContext();
ta.unwrap(Y, oc, yc, {
result: function (ua) {
La(pa, function () {
return new rc(fa, sc.A128KW, mc, ua);
});
},
error: pa.error,
});
break;
default:
throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, U);
}
});
}
ba = { PSK: 'PSK', MGK: 'MGK', WRAP: 'WRAP' };
ca = Td = Yc.extend({
init: function sa(U, Y) {
sa.base.call(this, gc.JWE_LADDER);
switch (U) {
case ba.WRAP:
if (!Y)
throw new ub(
'Previous wrapping key based key exchange requires the previous wrapping key data and ID.'
);
break;
default:
Y = null;
}
Object.defineProperties(this, {
mechanism: { value: U, writable: !1, configurable: !1 },
wrapdata: { value: Y, writable: !1, configurable: !1 },
});
},
getKeydata: function () {
var U;
U = {};
U.mechanism = this.mechanism;
this.wrapdata && (U.wrapdata = Cb(this.wrapdata));
return U;
},
equals: function sa(Y) {
return Y === this
? !0
: Y instanceof Td
? sa.base.call(this, Y) && this.mechanism == Y.mechanism && Vb(this.wrapdata, Y.wrapdata)
: !1;
},
uniqueKey: function sa() {
var pa;
pa = sa.base.call(this) + ':' + this.mechanism;
this.wrapdata && (pa += ':' + bc(this.wrapdata));
return pa;
},
});
ia = He = Zc.extend({
init: function W(pa, ta, Ca, ua, qa) {
W.base.call(this, pa, gc.JWE_LADDER);
Object.defineProperties(this, {
wrapKey: { value: ta, writable: !1, configurable: !1 },
wrapdata: { value: Ca, writable: !1, configurable: !1 },
encryptionKey: { value: ua, writable: !1, configurable: !1 },
hmacKey: { value: qa, writable: !1, configurable: !1 },
});
},
getKeydata: function () {
var pa;
pa = {};
pa.wrapkey = Cb(this.wrapKey);
pa.wrapdata = Cb(this.wrapdata);
pa.encryptionkey = Cb(this.encryptionKey);
pa.hmackey = Cb(this.hmacKey);
return pa;
},
equals: function Ca(ta) {
return this === ta
? !0
: ta instanceof He
? Ca.base.call(this, ta) &&
Vb(this.wrapKey, ta.wrapKey) &&
Vb(this.wrapdata, ta.wrapdata) &&
Vb(this.encryptionKey, ta.encryptionKey) &&
Vb(this.hmacKey, ta.hmacKey)
: !1;
},
uniqueKey: function Ca() {
return (
Ca.base.call(this) +
':' +
bc(this.wrapKey) +
':' +
bc(this.wrapdata) +
':' +
bc(this.encryptionKey) +
':' +
bc(this.hmacKey)
);
},
});
Ge = ic.extend({
init: function qa(ua) {
qa.base.call(this, gc.JWE_LADDER);
Object.defineProperties(this, { repository: { value: ua, writable: !1, enumerable: !1, configurable: !1 } });
},
createRequestData: function (ua, qa, W) {
La(W, function () {
var aa, da, oa;
aa = qa.mechanism;
da = qa.wrapdata;
if (!aa || (aa == ba.WRAP && (!da || 'string' !== typeof da)))
throw new xb(V.JSON_PARSE_ERROR, 'keydata ' + JSON.stringify(qa));
if (!ba[aa]) throw new Nb(V.UNIDENTIFIED_KEYX_MECHANISM, aa);
switch (aa) {
case ba.WRAP:
try {
oa = Fb(da);
} catch (Ia) {
throw new Nb(V.KEYX_WRAPPING_KEY_MISSING, 'keydata ' + qa.toString());
}
if (null == oa || 0 == oa.length) throw new Nb(V.KEYX_WRAPPING_KEY_MISSING, 'keydata ' + qa.toString());
break;
default:
oa = null;
}
return new ca(aa, oa);
});
},
createResponseData: function (ua, qa, W) {
var aa, da, oa, Ia, Fa, Pa, Ra;
ua = W.wrapkey;
aa = W.wrapdata;
da = W.encryptionkey;
oa = W.hmackey;
if (
!(ua && 'string' === typeof ua && aa && 'string' === typeof aa && da && 'string' === typeof da && oa) ||
'string' !== typeof oa
)
throw new xb(V.JSON_PARSE_ERROR, 'keydata ' + JSON.stringify(W));
try {
Ia = Fb(ua);
Fa = Fb(aa);
} catch (ka) {
throw new tb(V.INVALID_SYMMETRIC_KEY, 'keydata ' + JSON.stringify(W), ka);
}
try {
Pa = Fb(da);
} catch (ka) {
throw new tb(V.INVALID_ENCRYPTION_KEY, 'keydata ' + JSON.stringify(W), ka);
}
try {
Ra = Fb(oa);
} catch (ka) {
throw new tb(V.INVALID_HMAC_KEY, 'keydata ' + JSON.stringify(W), ka);
}
return new ia(qa, Ia, Fa, Pa, Ra);
},
generateResponse: function (ua, qa, W, aa) {
var Pa, Ra;
function da(ka, xa, ya) {
Pa.generateSessionKeys(ua, {
result: function (Ja) {
La(
aa,
function () {
oa(ka, xa, ya, Ja.encryptionKey, Ja.hmacKey);
},
Pa
);
},
error: function (Ja) {
La(aa, function () {
Ja instanceof cb && Ja.setEntity(Ra);
throw Ja;
});
},
});
}
function oa(ka, xa, ya, Ja, Ba) {
La(
aa,
function () {
ha(ua, qa.mechanism, qa.wrapdata, ka, {
result: function (Oa) {
Oa.wrap(xa, {
result: function (Ga) {
Ia(xa, ya, Ja, Ba, Ga);
},
error: function (Ga) {
La(aa, function () {
Ga instanceof cb && Ga.setEntity(Ra);
throw Ga;
});
},
});
},
error: function (Oa) {
La(aa, function () {
Oa instanceof cb && Oa.setEntity(Ra);
throw Oa;
});
},
});
},
Pa
);
}
function Ia(ka, xa, ya, Ja, Ba) {
La(
aa,
function () {
var Oa;
Oa = new rc(ua, sc.A128KW, mc, ka);
Oa.wrap(ya, {
result: function (Ga) {
Oa.wrap(Ja, {
result: function (Ua) {
Fa(xa, Ba, ya, Ga, Ja, Ua);
},
error: function (Ua) {
La(aa, function () {
Ua instanceof cb && Ua.setEntity(Ra);
throw Ua;
});
},
});
},
error: function (Ga) {
La(aa, function () {
Ga instanceof cb && Ga.setEntity(Ra);
throw Ga;
});
},
});
},
Pa
);
}
function Fa(ka, xa, ya, Ja, Ba, Oa) {
La(
aa,
function () {
var Ga;
Ga = ua.getTokenFactory();
Ra
? Ga.renewMasterToken(ua, Ra, ya, Ba, {
result: function (Ua) {
La(
aa,
function () {
var ab, Xa;
ab = new dc(ua, Ua);
Xa = new ia(Ua, xa, ka, Ja, Oa);
return new ic.KeyExchangeData(Xa, ab, aa);
},
Pa
);
},
error: function (Ua) {
La(aa, function () {
Ua instanceof cb && Ua.setEntity(Ra);
throw Ua;
});
},
})
: Ga.createMasterToken(ua, W, ya, Ba, {
result: function (Ua) {
La(
aa,
function () {
var ab, Xa;
ab = new dc(ua, Ua);
Xa = new ia(Ua, xa, ka, Ja, Oa);
return new ic.KeyExchangeData(Xa, ab, aa);
},
Pa
);
},
error: aa.error,
});
},
Pa
);
}
Pa = this;
La(
aa,
function () {
var ka, xa;
if (!(qa instanceof ca))
throw new ub('Key request data ' + JSON.stringify(qa) + ' was not created by this factory.');
ka = W;
if (W instanceof cc) {
if (!W.isVerified()) throw new Fc(V.MASTERTOKEN_UNTRUSTED, W);
Ra = W;
ka = W.identity;
}
xa = new Uint8Array(16);
ua.getRandom().nextBytes(xa);
pc(xa, oc, yc, {
result: function (ya) {
La(
aa,
function () {
ua.getMslCryptoContext().wrap(ya, {
result: function (Ja) {
da(ka, ya, Ja);
},
error: function (Ja) {
La(
aa,
function () {
Ja instanceof cb && Ja.setEntity(Ra);
throw Ja;
},
Pa
);
},
});
},
Pa
);
},
error: function (ya) {
La(
aa,
function () {
throw new tb(V.WRAP_KEY_CREATION_FAILURE, null, ya).setEntity(Ra);
},
Pa
);
},
});
},
Pa
);
},
getCryptoContext: function (ua, qa, W, aa, da) {
var Ia;
function oa(Fa, Pa, Ra, ka, xa) {
La(
da,
function () {
var ya;
ya = new rc(ua, sc.A128KW, mc, xa);
ya.unwrap(Pa.encryptionKey, jc, xc, {
result: function (Ja) {
ya.unwrap(Pa.hmacKey, kc, Gc, {
result: function (Ba) {
La(
da,
function () {
this.repository.addCryptoContext(Pa.wrapdata, ya);
this.repository.removeCryptoContext(Ra);
return new dc(ua, Pa.masterToken, ka, Ja, Ba);
},
Ia
);
},
error: function (Ba) {
La(da, function () {
Ba instanceof cb && Ba.setEntity(Fa);
throw Ba;
});
},
});
},
error: function (Ja) {
La(da, function () {
Ja instanceof cb && Ja.setEntity(Fa);
throw Ja;
});
},
});
},
Ia
);
}
Ia = this;
La(
da,
function () {
var Fa, Pa;
if (!(qa instanceof ca))
throw new ub('Key request data ' + JSON.stringify(qa) + ' was not created by this factory.');
if (!(W instanceof ia))
throw new ub('Key response data ' + JSON.stringify(W) + ' was not created by this factory.');
Fa = qa.mechanism;
Pa = qa.wrapdata;
ua.getEntityAuthenticationData(null, {
result: function (Ra) {
La(
da,
function () {
var ka, xa, ya;
ka = Ra.getIdentity();
switch (Fa) {
case ba.PSK:
xa = new lc(ka);
ya = ua.getEntityAuthenticationFactory(Mb.PSK);
if (!ya) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Fa).setEntity(Ra);
xa = ya.getCryptoContext(ua, xa);
xa = new rc(ua, sc.A128KW, mc, Ab);
break;
case ba.MGK:
xa = new hc(ka);
ya = ua.getEntityAuthenticationFactory(Mb.MGK);
if (!ya) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Fa).setEntity(Ra);
xa = ya.getCryptoContext(ua, xa);
xa = new rc(ua, sc.A128KW, mc, xa.wrapKey);
break;
case ba.WRAP:
xa = this.repository.getCryptoContext(Pa);
if (!xa) throw new Nb(V.KEYX_WRAPPING_KEY_MISSING, Cb(Pa)).setEntity(Ra);
break;
default:
throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Fa).setEntity(Ra);
}
xa.unwrap(W.wrapKey, oc, yc, {
result: function (Ja) {
oa(Ra, W, Pa, ka, Ja);
},
error: function (Ja) {
La(da, function () {
Ja instanceof cb && Ja.setEntity(Ra);
throw Ja;
});
},
});
},
Ia
);
},
error: da.error,
});
},
Ia
);
},
});
})();
(function () {
var ba, ca, ia, fa;
function ha(U, Y, sa, pa, ta) {
La(ta, function () {
var Ca, ua;
switch (Y) {
case ba.PSK:
(Ca = new lc(pa)), (ua = U.getEntityAuthenticationFactory(Mb.PSK));
if (!ua) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Y);
Ca = ua.getCryptoContext(U, Ca);
return new fa(Ab);
case ba.MGK:
Ca = new hc(pa);
ua = U.getEntityAuthenticationFactory(Mb.MGK);
if (!ua) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Y);
Ca = ua.getCryptoContext(U, Ca);
return new fa(Ab);
case ba.WRAP:
Ca = U.getMslCryptoContext();
Ca.unwrap(sa, oc, yc, {
result: function (qa) {
La(ta, function () {
return new fa(qa);
});
},
error: ta.error,
});
break;
default:
throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Y);
}
});
}
ba = { PSK: 'PSK', MGK: 'MGK', WRAP: 'WRAP' };
ca = td = Yc.extend({
init: function pa(Y, sa) {
pa.base.call(this, gc.JWK_LADDER);
switch (Y) {
case ba.WRAP:
if (!sa)
throw new ub(
'Previous wrapping key based key exchange requires the previous wrapping key data and ID.'
);
break;
default:
sa = null;
}
Object.defineProperties(this, {
mechanism: { value: Y, writable: !1, configurable: !1 },
wrapdata: { value: sa, writable: !1, configurable: !1 },
});
},
getKeydata: function () {
var Y;
Y = {};
Y.mechanism = this.mechanism;
this.wrapdata && (Y.wrapdata = Cb(this.wrapdata));
return Y;
},
equals: function pa(sa) {
return sa === this
? !0
: sa instanceof td
? pa.base.call(this, sa) && this.mechanism == sa.mechanism && Vb(this.wrapdata, sa.wrapdata)
: !1;
},
uniqueKey: function pa() {
var ta;
ta = pa.base.call(this) + ':' + this.mechanism;
this.wrapdata && (ta += ':' + bc(this.wrapdata));
return ta;
},
});
ia = Ie = Zc.extend({
init: function aa(ta, Ca, ua, qa, W) {
aa.base.call(this, ta, gc.JWK_LADDER);
Object.defineProperties(this, {
wrapKey: { value: Ca, writable: !1, configurable: !1 },
wrapdata: { value: ua, writable: !1, configurable: !1 },
encryptionKey: { value: qa, writable: !1, configurable: !1 },
hmacKey: { value: W, writable: !1, configurable: !1 },
});
},
getKeydata: function () {
var ta;
ta = {};
ta.wrapkey = Cb(this.wrapKey);
ta.wrapdata = Cb(this.wrapdata);
ta.encryptionkey = Cb(this.encryptionKey);
ta.hmackey = Cb(this.hmacKey);
return ta;
},
equals: function ua(Ca) {
return this === Ca
? !0
: Ca instanceof Ie
? ua.base.call(this, Ca) &&
Vb(this.wrapKey, Ca.wrapKey) &&
Vb(this.wrapdata, Ca.wrapdata) &&
Vb(this.encryptionKey, Ca.encryptionKey) &&
Vb(this.hmacKey, Ca.hmacKey)
: !1;
},
uniqueKey: function ua() {
return (
ua.base.call(this) +
':' +
bc(this.wrapKey) +
':' +
bc(this.wrapdata) +
':' +
bc(this.encryptionKey) +
':' +
bc(this.hmacKey)
);
},
});
fa = Rc.extend({
init: function (ua) {
ua && ua.rawKey && (ua = ua.rawKey);
Object.defineProperties(this, { _wrapKey: { value: ua, writable: !1, enumerable: !1, configurable: !1 } });
},
encrypt: function (ua, qa) {
qa.error(new tb(V.ENCRYPT_NOT_SUPPORTED));
},
decrypt: function (ua, qa) {
qa.error(new tb(V.DECRYPT_NOT_SUPPORTED));
},
wrap: function (ua, qa) {
La(
qa,
function () {
Jb.wrapKey('jwk', ua.rawKey, this._wrapKey, oc).then(
function (W) {
qa.result(W);
},
function (W) {
qa.error(new tb(V.WRAP_ERROR));
}
);
},
this
);
},
unwrap: function (ua, qa, W, aa) {
function da(oa) {
La(aa, function () {
switch (oa.type) {
case 'secret':
Oc(oa, aa);
break;
case 'public':
Cc(oa, aa);
break;
case 'private':
Pc(oa, aa);
break;
default:
throw new tb(V.UNSUPPORTED_KEY, 'type: ' + oa.type);
}
});
}
La(
aa,
function () {
Jb.unwrapKey('jwk', ua, this._wrapKey, oc, qa, !1, W).then(
function (oa) {
da(oa);
},
function (oa) {
aa.error(new tb(V.UNWRAP_ERROR));
}
);
},
this
);
},
sign: function (ua, qa) {
qa.error(new tb(V.SIGN_NOT_SUPPORTED));
},
verify: function (ua, qa, W) {
W.error(new tb(V.VERIFY_NOT_SUPPORTED));
},
});
Ud = ic.extend({
init: function W(qa) {
W.base.call(this, gc.JWK_LADDER);
Object.defineProperties(this, { repository: { value: qa, writable: !1, enumerable: !1, configurable: !1 } });
},
createRequestData: function (qa, W, aa) {
La(aa, function () {
var da, oa, Ia;
da = W.mechanism;
oa = W.wrapdata;
if (!da || (da == ba.WRAP && (!oa || 'string' !== typeof oa)))
throw new xb(V.JSON_PARSE_ERROR, 'keydata ' + JSON.stringify(W));
if (!ba[da]) throw new Nb(V.UNIDENTIFIED_KEYX_MECHANISM, da);
switch (da) {
case ba.WRAP:
try {
Ia = Fb(oa);
} catch (Fa) {
throw new Nb(V.KEYX_WRAPPING_KEY_MISSING, 'keydata ' + W.toString());
}
if (null == Ia || 0 == Ia.length) throw new Nb(V.KEYX_WRAPPING_KEY_MISSING, 'keydata ' + W.toString());
break;
default:
Ia = null;
}
return new ca(da, Ia);
});
},
createResponseData: function (qa, W, aa) {
var da, oa, Ia, Fa, Pa, Ra, ka;
qa = aa.wrapkey;
da = aa.wrapdata;
oa = aa.encryptionkey;
Ia = aa.hmackey;
if (
!(qa && 'string' === typeof qa && da && 'string' === typeof da && oa && 'string' === typeof oa && Ia) ||
'string' !== typeof Ia
)
throw new xb(V.JSON_PARSE_ERROR, 'keydata ' + JSON.stringify(aa));
try {
Fa = Fb(qa);
Pa = Fb(da);
} catch (xa) {
throw new tb(V.INVALID_SYMMETRIC_KEY, 'keydata ' + JSON.stringify(aa), xa);
}
try {
Ra = Fb(oa);
} catch (xa) {
throw new tb(V.INVALID_ENCRYPTION_KEY, 'keydata ' + JSON.stringify(aa), xa);
}
try {
ka = Fb(Ia);
} catch (xa) {
throw new tb(V.INVALID_HMAC_KEY, 'keydata ' + JSON.stringify(aa), xa);
}
return new ia(W, Fa, Pa, Ra, ka);
},
generateResponse: function (qa, W, aa, da) {
var Ra, ka;
function oa(xa, ya, Ja) {
Ra.generateSessionKeys(qa, {
result: function (Ba) {
La(
da,
function () {
Ia(xa, ya, Ja, Ba.encryptionKey, Ba.hmacKey);
},
Ra
);
},
error: function (Ba) {
La(da, function () {
Ba instanceof cb && Ba.setEntity(ka);
throw Ba;
});
},
});
}
function Ia(xa, ya, Ja, Ba, Oa) {
La(
da,
function () {
ha(qa, W.mechanism, W.wrapdata, xa, {
result: function (Ga) {
Ga.wrap(ya, {
result: function (Ua) {
Fa(ya, Ja, Ba, Oa, Ua);
},
error: function (Ua) {
La(da, function () {
Ua instanceof cb && Ua.setEntity(ka);
throw Ua;
});
},
});
},
error: function (Ga) {
La(da, function () {
Ga instanceof cb && Ga.setEntity(ka);
throw Ga;
});
},
});
},
Ra
);
}
function Fa(xa, ya, Ja, Ba, Oa) {
La(
da,
function () {
var Ga;
Ga = new fa(xa);
Ga.wrap(Ja, {
result: function (Ua) {
Ga.wrap(Ba, {
result: function (ab) {
Pa(ya, Oa, Ja, Ua, Ba, ab);
},
error: function (ab) {
La(da, function () {
ab instanceof cb && ab.setEntity(ka);
throw ab;
});
},
});
},
error: function (Ua) {
La(da, function () {
Ua instanceof cb && Ua.setEntity(ka);
throw Ua;
});
},
});
},
Ra
);
}
function Pa(xa, ya, Ja, Ba, Oa, Ga) {
La(
da,
function () {
var Ua;
Ua = qa.getTokenFactory();
ka
? Ua.renewMasterToken(qa, ka, Ja, Oa, {
result: function (ab) {
La(
da,
function () {
var Xa, jb;
Xa = new dc(qa, ab);
jb = new ia(ab, ya, xa, Ba, Ga);
return new ic.KeyExchangeData(jb, Xa, da);
},
Ra
);
},
error: function (ab) {
La(da, function () {
ab instanceof cb && ab.setEntity(ka);
throw ab;
});
},
})
: Ua.createMasterToken(qa, aa, Ja, Oa, {
result: function (ab) {
La(
da,
function () {
var Xa, jb;
Xa = new dc(qa, ab);
jb = new ia(ab, ya, xa, Ba, Ga);
return new ic.KeyExchangeData(jb, Xa, da);
},
Ra
);
},
error: da.error,
});
},
Ra
);
}
Ra = this;
La(
da,
function () {
var xa, ya;
if (!(W instanceof ca))
throw new ub('Key request data ' + JSON.stringify(W) + ' was not created by this factory.');
xa = aa;
if (aa instanceof cc) {
if (!aa.isVerified()) throw new Fc(V.MASTERTOKEN_UNTRUSTED, aa);
ka = aa;
xa = aa.identity;
}
ya = new Uint8Array(16);
qa.getRandom().nextBytes(ya);
pc(ya, oc, yc, {
result: function (Ja) {
La(
da,
function () {
qa.getMslCryptoContext().wrap(Ja, {
result: function (Ba) {
oa(xa, Ja, Ba);
},
error: function (Ba) {
La(
da,
function () {
Ba instanceof cb && Ba.setEntity(ka);
throw Ba;
},
Ra
);
},
});
},
Ra
);
},
error: function (Ja) {
La(
da,
function () {
throw new tb(V.WRAP_KEY_CREATION_FAILURE, null, Ja).setEntity(ka);
},
Ra
);
},
});
},
Ra
);
},
getCryptoContext: function (qa, W, aa, da, oa) {
var Fa;
function Ia(Pa, Ra, ka, xa, ya) {
La(
oa,
function () {
var Ja;
Ja = new fa(ya);
Ja.unwrap(Ra.encryptionKey, jc, xc, {
result: function (Ba) {
Ja.unwrap(Ra.hmacKey, kc, Gc, {
result: function (Oa) {
La(
oa,
function () {
this.repository.addCryptoContext(Ra.wrapdata, Ja);
this.repository.removeCryptoContext(ka);
return new dc(qa, Ra.masterToken, xa, Ba, Oa);
},
Fa
);
},
error: function (Oa) {
La(oa, function () {
Oa instanceof cb && Oa.setEntity(Pa);
throw Oa;
});
},
});
},
error: function (Ba) {
La(oa, function () {
Ba instanceof cb && Ba.setEntity(Pa);
throw Ba;
});
},
});
},
Fa
);
}
Fa = this;
La(
oa,
function () {
var Pa, Ra;
if (!(W instanceof ca))
throw new ub('Key request data ' + JSON.stringify(W) + ' was not created by this factory.');
if (!(aa instanceof ia))
throw new ub('Key response data ' + JSON.stringify(aa) + ' was not created by this factory.');
Pa = W.mechanism;
Ra = W.wrapdata;
qa.getEntityAuthenticationData(null, {
result: function (ka) {
La(
oa,
function () {
var xa, ya, Ja;
xa = ka.getIdentity();
switch (Pa) {
case ba.PSK:
ya = new lc(xa);
Ja = qa.getEntityAuthenticationFactory(Mb.PSK);
if (!Ja) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Pa).setEntity(ka);
ya = Ja.getCryptoContext(qa, ya);
ya = new fa(ya.wrapKey);
break;
case ba.MGK:
ya = new hc(xa);
Ja = qa.getEntityAuthenticationFactory(Mb.MGK);
if (!Ja) throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Pa).setEntity(ka);
ya = Ja.getCryptoContext(qa, ya);
ya = new fa(ya.wrapKey);
break;
case ba.WRAP:
ya = this.repository.getCryptoContext(Ra);
if (!ya) throw new Nb(V.KEYX_WRAPPING_KEY_MISSING, Cb(Ra)).setEntity(ka);
break;
default:
throw new Nb(V.UNSUPPORTED_KEYX_MECHANISM, Pa).setEntity(ka);
}
ya.unwrap(aa.wrapKey, oc, yc, {
result: function (Ba) {
Ia(ka, aa, Ra, xa, Ba);
},
error: function (Ba) {
La(oa, function () {
Ba instanceof cb && Ba.setEntity(ka);
throw Ba;
});
},
});
},
Fa
);
},
error: oa.error,
});
},
Fa
);
},
});
})();
Lf = Bb.Class.create({
addCryptoContext: function (ha, ba) {},
getCryptoContext: function (ha) {},
removeCryptoContext: function (ha) {},
});
(function () {
var ba, ca, ia, fa;
function ha(U, Y, sa, pa, ta) {
switch (sa) {
case ba.JWE_RSA:
case ba.JWEJS_RSA:
return new rc(U, sc.RSA_OAEP, mc, pa, ta);
case ba.JWK_RSA:
return new nd(U, Y, pa, ta, od.WRAP_UNWRAP_OAEP);
case ba.JWK_RSAES:
return new nd(U, Y, pa, ta, od.WRAP_UNWRAP_PKCS1);
default:
throw new tb(V.UNSUPPORTED_KEYX_MECHANISM, sa);
}
}
ba = ud = {
RSA: 'RSA',
ECC: 'ECC',
JWE_RSA: 'JWE_RSA',
JWEJS_RSA: 'JWEJS_RSA',
JWK_RSA: 'JWK_RSA',
JWK_RSAES: 'JWK_RSAES',
};
ca = Fd = Yc.extend({
init: function Ca(Y, sa, pa, ta) {
Ca.base.call(this, gc.ASYMMETRIC_WRAPPED);
Object.defineProperties(this, {
keyPairId: { value: Y, writable: !1, configurable: !1 },
mechanism: { value: sa, writable: !1, configurable: !1 },
publicKey: { value: pa, writable: !1, configurable: !1 },
privateKey: { value: ta, writable: !1, configurable: !1 },
});
},
getKeydata: function () {
var Y;
Y = {};
Y.keypairid = this.keyPairId;
Y.mechanism = this.mechanism;
Y.publickey = Cb(this.publicKey.getEncoded());
return Y;
},
equals: function pa(sa) {
var ta;
if (sa === this) return !0;
if (!(sa instanceof Fd)) return !1;
ta =
this.privateKey === sa.privateKey ||
(this.privateKey && sa.privateKey && Vb(this.privateKey.getEncoded(), sa.privateKey.getEncoded()));
return (
pa.base.call(this, sa) &&
this.keyPairId == sa.keyPairId &&
this.mechanism == sa.mechanism &&
Vb(this.publicKey.getEncoded(), sa.publicKey.getEncoded()) &&
ta
);
},
uniqueKey: function pa() {
var ta, Ca;
ta = this.publicKey.getEncoded();
Ca = this.privateKey && this.privateKey.getEncoded();
ta = pa.base.call(this) + ':' + this.keyPairId + ':' + this.mechanism + ':' + bc(ta);
Ca && (ta += ':' + bc(Ca));
return ta;
},
});
ia = function (pa, ta) {
La(ta, function () {
var Ca, ua, qa, W;
Ca = pa.keypairid;
ua = pa.mechanism;
qa = pa.publickey;
if (!Ca || 'string' !== typeof Ca || !ua || !qa || 'string' !== typeof qa)
throw new xb(V.JSON_PARSE_ERROR, 'keydata ' + JSON.stringify(pa));
if (!ba[ua]) throw new Nb(V.UNIDENTIFIED_KEYX_MECHANISM, ua);
try {
W = Fb(qa);
switch (ua) {
case ba.JWE_RSA:
case ba.JWEJS_RSA:
case ba.JWK_RSA:
Kd(W, ld, yc, {
result: function (aa) {
ta.result(new ca(Ca, ua, aa, null));
},
error: function (aa) {
ta.error(aa);
},
});
break;
case ba.JWK_RSAES:
Kd(W, Id, yc, {
result: function (aa) {
ta.result(new ca(Ca, ua, aa, null));
},
error: function (aa) {
ta.error(aa);
},
});
break;
default:
throw new tb(V.UNSUPPORTED_KEYX_MECHANISM, ua);
}
} catch (aa) {
if (!(aa instanceof cb)) throw new tb(V.INVALID_PUBLIC_KEY, 'keydata ' + JSON.stringify(pa), aa);
throw aa;
}
});
};
fa = Je = Zc.extend({
init: function W(ta, Ca, ua, qa) {
W.base.call(this, ta, gc.ASYMMETRIC_WRAPPED);
Object.defineProperties(this, {
keyPairId: { value: Ca, writable: !1, configurable: !1 },
encryptionKey: { value: ua, writable: !1, configurable: !1 },
hmacKey: { value: qa, writable: !1, configurable: !1 },
});
},
getKeydata: function () {
var ta;
ta = {};
ta.keypairid = this.keyPairId;
ta.encryptionkey = Cb(this.encryptionKey);
ta.hmackey = Cb(this.hmacKey);
return ta;
},
equals: function ua(Ca) {
return this === Ca
? !0
: Ca instanceof Je
? ua.base.call(this, Ca) &&
this.keyPairId == Ca.keyPairId &&
Vb(this.encryptionKey, Ca.encryptionKey) &&
Vb(this.hmacKey, Ca.hmacKey)
: !1;
},
uniqueKey: function ua() {
return ua.base.call(this) + ':' + this.keyPairId + ':' + bc(this.encryptionKey) + ':' + bc(this.hmacKey);
},
});
pe = ic.extend({
init: function qa() {
qa.base.call(this, gc.ASYMMETRIC_WRAPPED);
},
createRequestData: function (qa, W, aa) {
ia(W, aa);
},
createResponseData: function (qa, W, aa) {
var da, oa, Ia, Fa;
qa = aa.keypairid;
da = aa.encryptionkey;
oa = aa.hmackey;
if (!qa || 'string' !== typeof qa || !da || 'string' !== typeof da || !oa || 'string' !== typeof oa)
throw new xb(V.JSON_PARSE_ERROR, 'keydata ' + JSON.stringify(aa));
try {
Ia = Fb(da);
} catch (Pa) {
throw new tb(V.INVALID_ENCRYPTION_KEY, 'keydata ' + JSON.stringify(aa), Pa);
}
try {
Fa = Fb(oa);
} catch (Pa) {
throw new tb(V.INVALID_HMAC_KEY, 'keydata ' + JSON.stringify(aa), Pa);
}
return new fa(W, qa, Ia, Fa);
},
generateResponse: function (qa, W, aa, da) {
var Fa;
function oa(Pa, Ra) {
La(
da,
function () {
var ka;
ka = ha(qa, W.keyPairId, W.mechanism, null, W.publicKey);
ka.wrap(Pa, {
result: function (xa) {
La(
da,
function () {
ka.wrap(Ra, {
result: function (ya) {
Ia(Pa, xa, Ra, ya);
},
error: function (ya) {
La(
da,
function () {
ya instanceof cb && aa instanceof cc && ya.setEntity(aa);
throw ya;
},
Fa
);
},
});
},
Fa
);
},
error: function (xa) {
La(
da,
function () {
xa instanceof cb && aa instanceof cc && xa.setEntity(aa);
throw xa;
},
Fa
);
},
});
},
Fa
);
}
function Ia(Pa, Ra, ka, xa) {
La(
da,
function () {
var ya;
ya = qa.getTokenFactory();
aa instanceof cc
? ya.renewMasterToken(qa, aa, Pa, ka, {
result: function (Ja) {
La(
da,
function () {
var Ba, Oa;
Ba = new dc(qa, Ja);
Oa = new fa(Ja, W.keyPairId, Ra, xa);
return new ic.KeyExchangeData(Oa, Ba, da);
},
Fa
);
},
error: function (Ja) {
La(
da,
function () {
Ja instanceof cb && Ja.setEntity(aa);
throw Ja;
},
Fa
);
},
})
: ya.createMasterToken(qa, aa, Pa, ka, {
result: function (Ja) {
La(
da,
function () {
var Ba, Oa;
Ba = new dc(qa, Ja);
Oa = new fa(Ja, W.keyPairId, Ra, xa);
return new ic.KeyExchangeData(Oa, Ba, da);
},
Fa
);
},
error: da.error,
});
},
Fa
);
}
Fa = this;
La(
da,
function () {
if (!(W instanceof ca))
throw new ub('Key request data ' + JSON.stringify(W) + ' was not created by this factory.');
this.generateSessionKeys(qa, {
result: function (Pa) {
oa(Pa.encryptionKey, Pa.hmacKey);
},
error: function (Pa) {
La(
da,
function () {
Pa instanceof cb && aa instanceof cc && Pa.setEntity(aa);
throw Pa;
},
Fa
);
},
});
},
Fa
);
},
getCryptoContext: function (qa, W, aa, da, oa) {
var Ia;
Ia = this;
La(
oa,
function () {
var Fa, Pa, Ra;
if (!(W instanceof ca))
throw new ub('Key request data ' + JSON.stringify(W) + ' was not created by this factory.');
if (!(aa instanceof fa))
throw new ub('Key response data ' + JSON.stringify(aa) + ' was not created by this factory.');
Fa = W.keyPairId;
Pa = aa.keyPairId;
if (Fa != Pa)
throw new Nb(V.KEYX_RESPONSE_REQUEST_MISMATCH, 'request ' + Fa + '; response ' + Pa).setEntity(da);
Pa = W.privateKey;
if (!Pa) throw new Nb(V.KEYX_PRIVATE_KEY_MISSING, 'request Asymmetric private key').setEntity(da);
Ra = ha(qa, Fa, W.mechanism, Pa, null);
Ra.unwrap(aa.encryptionKey, jc, xc, {
result: function (ka) {
Ra.unwrap(aa.hmacKey, kc, Gc, {
result: function (xa) {
qa.getEntityAuthenticationData(null, {
result: function (ya) {
La(
oa,
function () {
var Ja;
Ja = ya.getIdentity();
return new dc(qa, aa.masterToken, Ja, ka, xa);
},
Ia
);
},
error: function (ya) {
La(
oa,
function () {
ya instanceof cb && ya.setEntity(da);
throw ya;
},
Ia
);
},
});
},
error: function (xa) {
La(
oa,
function () {
xa instanceof cb && xa.setEntity(da);
throw xa;
},
Ia
);
},
});
},
error: function (ka) {
La(
oa,
function () {
ka instanceof cb && ka.setEntity(da);
throw ka;
},
Ia
);
},
});
},
Ia
);
},
});
})();
Kf = Bb.Class.create({
init: function (ha) {
var ba, ca, ia, fa, U, Y, sa, pa;
ba = Yb.parser();
ca = [];
ia = [];
sa = 0;
pa = !1;
ba.onerror = function (ta) {
pa || ((pa = !0), ba.end());
};
ba.onopenobject = function (ta) {
var Ca;
if (fa) (fa[Y] = {}), ia.push(fa), (fa = fa[Y]);
else if (U) {
Ca = {};
ia.push(U);
U.push(Ca);
fa = Ca;
U = Ab;
} else fa = {};
Y = ta;
};
ba.oncloseobject = function () {
var ta;
ta = ia.pop();
ta ? ('object' === typeof ta ? (fa = ta) : ((fa = Ab), (U = ta))) : (ca.push(fa), (sa = ba.index), (fa = Ab));
};
ba.onopenarray = function () {
var ta;
if (fa) (fa[Y] = []), ia.push(fa), (U = fa[Y]), (fa = Ab);
else if (U) {
ta = [];
ia.push(U);
U.push(ta);
U = ta;
} else U = [];
};
ba.onclosearray = function () {
var ta;
ta = ia.pop();
ta ? ('object' === typeof ta ? ((fa = ta), (U = Ab)) : (U = ta)) : (ca.push(U), (sa = ba.index), (U = Ab));
};
ba.onkey = function (ta) {
Y = ta;
};
ba.onvalue = function (ta) {
fa ? (fa[Y] = ta) : U ? U.push(ta) : (ca.push(ta), (sa = ba.index));
};
ba.write(ha).close();
Object.defineProperties(this, {
_values: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
_lastIndex: { value: sa, writable: !0, enumerable: !1, configurable: !1 },
});
},
more: function () {
return 0 < this._values.length;
},
nextValue: function () {
return 0 == this._values.length ? Ab : this._values.shift();
},
lastIndex: function () {
return this._lastIndex;
},
});
(function () {
var ha, ba, ca, ia, fa;
ha = Vd = 'entityauthdata';
ba = Le = 'mastertoken';
ca = Me = 'headerdata';
ia = Ne = 'errordata';
fa = Wd = 'signature';
Ke = function (U, Y, sa, pa) {
La(pa, function () {
var ta, Ca, ua, qa, W, aa;
ta = Y[ha];
Ca = Y[ba];
ua = Y[fa];
if ((ta && 'object' !== typeof ta) || (Ca && 'object' !== typeof Ca) || 'string' !== typeof ua)
throw new xb(V.JSON_PARSE_ERROR, 'header/errormsg ' + JSON.stringify(Y));
try {
qa = Fb(ua);
} catch (da) {
throw new Ib(V.HEADER_SIGNATURE_INVALID, 'header/errormsg ' + JSON.stringify(Y), da);
}
W = null;
ta && (W = ye(U, ta));
aa = Y[ca];
if (aa != Ab && null != aa) {
if ('string' !== typeof aa) throw new xb(V.JSON_PARSE_ERROR, 'header/errormsg ' + JSON.stringify(Y));
Ca
? Hc(U, Ca, {
result: function (da) {
Xd(U, aa, W, da, qa, sa, pa);
},
error: function (da) {
pa.error(da);
},
})
: Xd(U, aa, W, null, qa, sa, pa);
} else if (((ta = Y[ia]), ta != Ab && null != ta)) {
if ('string' !== typeof ta) throw new xb(V.JSON_PARSE_ERROR, 'header/errormsg ' + JSON.stringify(Y));
Oe(U, ta, W, qa, pa);
} else throw new xb(V.JSON_PARSE_ERROR, JSON.stringify(Y));
});
};
})();
(function () {
function ha(ba, ca) {
this.errordata = ba;
this.signature = ca;
}
Bc = Bb.Class.create({
init: function (ba, ca, ia, fa, U, Y, sa, pa, ta, Ca) {
var ua;
ua = this;
La(
Ca,
function () {
var qa, W;
0 > Y && (Y = -1);
if (0 > fa || fa > Lb) throw new ub('Message ID ' + fa + ' is out of range.');
if (!ca) throw new Ib(V.MESSAGE_ENTITY_NOT_FOUND);
if (ta)
return (
Object.defineProperties(this, {
entityAuthenticationData: { value: ca, writable: !1, configurable: !1 },
recipient: { value: ia, writable: !1, configurable: !1 },
messageId: { value: fa, writable: !1, configurable: !1 },
errorCode: { value: U, writable: !1, configurable: !1 },
internalCode: { value: Y, writable: !1, configurable: !1 },
errorMessage: { value: sa, writable: !1, configurable: !1 },
userMessage: { value: pa, writable: !1, configurable: !1 },
errordata: { value: ta.errordata, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: ta.signature, writable: !1, enumerable: !1, configurable: !1 },
}),
this
);
qa = {};
ia && (qa.recipient = ia);
qa.messageid = fa;
qa.errorcode = U;
0 < Y && (qa.internalcode = Y);
sa && (qa.errormsg = sa);
pa && (qa.usermsg = pa);
try {
W = ba.getEntityAuthenticationFactory(ca.scheme).getCryptoContext(ba, ca);
} catch (aa) {
throw (aa instanceof cb && (aa.setEntity(ca), aa.setMessageId(fa)), aa);
}
qa = Qb(JSON.stringify(qa), Kb);
W.encrypt(qa, {
result: function (aa) {
La(
Ca,
function () {
W.sign(aa, {
result: function (da) {
La(
Ca,
function () {
Object.defineProperties(this, {
entityAuthenticationData: { value: ca, writable: !1, configurable: !1 },
recipient: { value: ia, writable: !1, configurable: !1 },
messageId: { value: fa, writable: !1, configurable: !1 },
errorCode: { value: U, writable: !1, configurable: !1 },
internalCode: { value: Y, writable: !1, configurable: !1 },
errorMessage: { value: sa, writable: !1, configurable: !1 },
userMessage: { value: pa, writable: !1, configurable: !1 },
errordata: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: da, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
ua
);
},
error: function (da) {
La(
Ca,
function () {
da instanceof cb && (da.setEntity(ca), da.setMessageId(fa));
throw da;
},
ua
);
},
});
},
ua
);
},
error: function (aa) {
La(
Ca,
function () {
aa instanceof cb && (aa.setEntity(ca), aa.setMessageId(fa));
throw aa;
},
ua
);
},
});
},
ua
);
},
toJSON: function () {
var ba;
ba = {};
ba[Vd] = this.entityAuthenticationData;
ba[Ne] = Cb(this.errordata);
ba[Wd] = Cb(this.signature);
return ba;
},
});
Pe = function (ba, ca, ia, fa, U, Y, sa, pa, ta) {
new Bc(ba, ca, ia, fa, U, Y, sa, pa, null, ta);
};
Oe = function (ba, ca, ia, fa, U) {
La(U, function () {
var Y, sa, pa;
if (!ia) throw new Ib(V.MESSAGE_ENTITY_NOT_FOUND);
try {
Y = ia.scheme;
sa = ba.getEntityAuthenticationFactory(Y);
if (!sa) throw new nc(V.ENTITYAUTH_FACTORY_NOT_FOUND, Y);
pa = sa.getCryptoContext(ba, ia);
} catch (ta) {
throw (ta instanceof cb && ta.setEntity(ia), ta);
}
try {
ca = Fb(ca);
} catch (ta) {
throw new Ib(V.HEADER_DATA_INVALID, ca, ta).setEntity(ia);
}
if (!ca || 0 == ca.length) throw new Ib(V.HEADER_DATA_MISSING, ca).setEntity(ia);
pa.verify(ca, fa, {
result: function (ta) {
La(U, function () {
if (!ta) throw new tb(V.MESSAGE_VERIFICATION_FAILED).setEntity(ia);
pa.decrypt(ca, {
result: function (Ca) {
La(U, function () {
var ua, qa, W, aa, da, oa, Ia, Fa;
ua = Rb(Ca, Kb);
try {
qa = JSON.parse(ua);
} catch (Ra) {
if (Ra instanceof SyntaxError)
throw new xb(V.JSON_PARSE_ERROR, 'errordata ' + ua, Ra).setEntity(ia);
throw Ra;
}
W = qa.recipient !== Ab ? qa.recipient : null;
aa = parseInt(qa.messageid);
da = parseInt(qa.errorcode);
oa = parseInt(qa.internalcode);
Ia = qa.errormsg;
Fa = qa.usermsg;
if (
(W && 'string' !== typeof W) ||
!aa ||
aa != aa ||
!da ||
da != da ||
(qa.internalcode && oa != oa) ||
(Ia && 'string' !== typeof Ia) ||
(Fa && 'string' !== typeof Fa)
)
throw new xb(V.JSON_PARSE_ERROR, 'errordata ' + ua).setEntity(ia);
if (0 > aa || aa > Lb) throw new Ib(V.MESSAGE_ID_OUT_OF_RANGE, 'errordata ' + ua).setEntity(ia);
qa = !1;
for (var Pa in Ka) {
if (Ka[Pa] == da) {
qa = !0;
break;
}
}
qa || (da = Ka.FAIL);
if (oa) {
if (0 > oa)
throw new Ib(V.INTERNAL_CODE_NEGATIVE, 'errordata ' + ua).setEntity(ia).setMessageId(aa);
} else oa = -1;
ua = new ha(ca, fa);
new Bc(ba, ia, W, aa, da, oa, Ia, Fa, ua, U);
});
},
error: function (Ca) {
La(U, function () {
Ca instanceof cb && Ca.setEntity(ia);
throw Ca;
});
},
});
});
},
error: function (ta) {
La(U, function () {
ta instanceof cb && ta.setEntity(ia);
throw ta;
});
},
});
});
};
})();
Mf = Bb.Class.create({ getUserMessage: function (ha, ba) {} });
(function () {
Yd = function (ha, ba) {
var ca;
if (!ha || !ba) return null;
ca = ha.compressionAlgorithms.filter(function (ia) {
for (var fa = 0; fa < ba.compressionAlgorithms.length; ++fa) {
if (ia == ba.compressionAlgorithms[fa]) return !0;
}
return !1;
});
ha = ha.languages.filter(function (ia) {
for (var fa = 0; fa < ba.languages.length; ++fa) {
if (ia == ba.languages[fa]) return !0;
}
return !1;
});
return new $c(ca, ha);
};
$c = Bb.Class.create({
init: function (ha, ba) {
ha || (ha = []);
ba || (ba = []);
ha.sort();
Object.defineProperties(this, {
compressionAlgorithms: { value: ha, writable: !1, enumerable: !0, configurable: !1 },
languages: { value: ba, writable: !1, enumerable: !0, configurable: !1 },
});
},
toJSON: function () {
var ha;
ha = {};
ha.compressionalgos = this.compressionAlgorithms;
ha.languages = this.languages;
return ha;
},
equals: function (ha) {
return this === ha
? !0
: ha instanceof $c
? ie(this.compressionAlgorithms, ha.compressionAlgorithms) && ie(this.languages, ha.languages)
: !1;
},
uniqueKey: function () {
return this.compressionAlgorithms.join(':') + '|' + this.languages.join(':');
},
});
Qe = function (ha) {
var ba, ca, fa;
ba = ha.compressionalgos;
ca = ha.languages;
if ((ba && !(ba instanceof Array)) || (ca && !(ca instanceof Array)))
throw new xb(V.JSON_PARSE_ERROR, 'capabilities ' + JSON.stringify(ha));
ha = [];
for (var ia = 0; ba && ia < ba.length; ++ia) {
fa = ba[ia];
Dc[fa] && ha.push(fa);
}
return new $c(ha, ca);
};
})();
(function () {
var Ca, ua;
function ha(qa, W, aa, da, oa) {
this.customer = qa;
this.sender = W;
this.messageCryptoContext = aa;
this.headerdata = da;
this.signature = oa;
}
function ba(qa, W, aa, da, oa, Ia, Fa, Pa, Ra, ka, xa, ya, Ja, Ba, Oa, Ga, Ua, ab, Xa, jb) {
return {
cryptoContext: { value: W, writable: !1, configurable: !1 },
customer: { value: aa, writable: !1, configurable: !1 },
entityAuthenticationData: { value: da, writable: !1, configurable: !1 },
masterToken: { value: oa, writable: !1, configurable: !1 },
sender: { value: Ia, writable: !1, configurable: !1 },
messageId: { value: Fa, writable: !1, configurable: !1 },
nonReplayableId: { value: Ga, writable: !1, configurable: !1 },
keyRequestData: { value: Pa, writable: !1, configurable: !1 },
keyResponseData: { value: Ra, writable: !1, configurable: !1 },
userAuthenticationData: { value: ka, writable: !1, configurable: !1 },
userIdToken: { value: xa, writable: !1, configurable: !1 },
serviceTokens: { value: ya, writable: !1, configurable: !1 },
peerMasterToken: { value: Ja, writable: !1, configurable: !1 },
peerUserIdToken: { value: Ba, writable: !1, configurable: !1 },
peerServiceTokens: { value: Oa, writable: !1, configurable: !1 },
messageCapabilities: { value: ab, writable: !1, configurable: !1 },
renewable: { value: Ua, writable: !1, enumerable: !1, configurable: !1 },
headerdata: { value: Xa, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: jb, writable: !1, enumerable: !1, configurable: !1 },
};
}
function ca(qa, W, aa) {
var da;
if (aa) {
if ((W = qa.getMslStore().getCryptoContext(aa))) return W;
if (!aa.isVerified() || !aa.isDecrypted()) throw new Fc(V.MASTERTOKEN_UNTRUSTED, aa);
return new dc(qa, aa);
}
aa = W.scheme;
da = qa.getEntityAuthenticationFactory(aa);
if (!da) throw new nc(V.ENTITYAUTH_FACTORY_NOT_FOUND, aa);
return da.getCryptoContext(qa, W);
}
function ia(qa, W, aa, da, oa) {
La(oa, function () {
W.verify(aa, da, {
result: function (Ia) {
La(oa, function () {
if (!Ia) throw new tb(V.MESSAGE_VERIFICATION_FAILED);
W.decrypt(aa, {
result: function (Fa) {
La(oa, function () {
return Rb(Fa, Kb);
});
},
error: function (Fa) {
oa.error(Fa);
},
});
});
},
error: function (Ia) {
oa.error(Ia);
},
});
});
}
function fa(qa, W, aa) {
La(aa, function () {
if (W) Fe(qa, W, aa);
else return null;
});
}
function U(qa, W, aa, da) {
La(da, function () {
if (W) Ic(qa, W, aa, da);
else return null;
});
}
function Y(qa, W, aa, da) {
La(da, function () {
if (aa) Ue(qa, W, aa, da);
else return null;
});
}
function sa(qa, W, aa, da, oa, Ia, Fa) {
var Ra;
function Pa(ka, xa, ya) {
var Ja, Ba;
if (xa >= ka.length) {
Ja = [];
for (Ba in Ra) {
Ja.push(Ra[Ba]);
}
ya.result(Ja);
} else {
Ja = ka[xa];
if ('object' !== typeof Ja) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + Ia);
vd(qa, Ja, aa, da, oa, {
result: function (Oa) {
La(ya, function () {
Ra[Oa.uniqueKey()] = Oa;
Pa(ka, xa + 1, ya);
});
},
error: function (Oa) {
ya.error(Oa);
},
});
}
}
Ra = {};
La(Fa, function () {
if (W) {
if (!(W instanceof Array)) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + Ia);
Pa(W, 0, Fa);
} else return [];
});
}
function pa(qa, W, aa, da, oa, Ia) {
function Fa(Ra, ka, xa) {
La(xa, function () {
var ya;
ya = ka.peermastertoken;
if (ya && 'object' !== typeof ya) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + oa);
if (!ya) return null;
Hc(Ra, ya, xa);
});
}
function Pa(Ra, ka, xa, ya) {
La(ya, function () {
var Ja;
Ja = ka.peeruseridtoken;
if (Ja && 'object' !== typeof Ja) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + oa);
if (!Ja) return null;
Ic(Ra, Ja, xa, ya);
});
}
La(Ia, function () {
if (!qa.isPeerToPeer()) return { peerMasterToken: null, peerUserIdToken: null, peerServiceTokens: [] };
Fa(qa, W, {
result: function (Ra) {
La(Ia, function () {
var ka;
ka = aa ? aa.masterToken : Ra;
Pa(qa, W, ka, {
result: function (xa) {
La(Ia, function () {
sa(qa, W.peerservicetokens, ka, xa, da, oa, {
result: function (ya) {
La(Ia, function () {
return { peerMasterToken: Ra, peerUserIdToken: xa, peerServiceTokens: ya };
});
},
error: function (ya) {
La(Ia, function () {
ya instanceof cb && (ya.setEntity(ka), ya.setUser(xa));
throw ya;
});
},
});
});
},
error: function (xa) {
La(Ia, function () {
xa instanceof cb && xa.setEntity(ka);
throw xa;
});
},
});
});
},
error: Ia.error,
});
});
}
function ta(qa, W, aa, da) {
var Ia;
function oa(Fa, Pa) {
La(da, function () {
if (Pa >= Fa.length) return Ia;
Ee(qa, Fa[Pa], {
result: function (Ra) {
La(da, function () {
Ia.push(Ra);
oa(Fa, Pa + 1);
});
},
error: function (Ra) {
da.error(Ra);
},
});
});
}
Ia = [];
La(da, function () {
var Fa;
Fa = W.keyrequestdata;
if (!Fa) return Ia;
if (!(Fa instanceof Array)) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + aa);
oa(Fa, 0);
});
}
Ca = Se = Bb.Class.create({
init: function (qa, W, aa, da, oa, Ia, Fa, Pa, Ra) {
Object.defineProperties(this, {
messageId: { value: qa, writable: !1, configurable: !1 },
nonReplayableId: { value: W, writable: !1, configurable: !1 },
renewable: { value: aa, writable: !1, configurable: !1 },
capabilities: { value: da, writable: !1, configurable: !1 },
keyRequestData: { value: oa, writable: !1, configurable: !1 },
keyResponseData: { value: Ia, writable: !1, configurable: !1 },
userAuthData: { value: Fa, writable: !1, configurable: !1 },
userIdToken: { value: Pa, writable: !1, configurable: !1 },
serviceTokens: { value: Ra, writable: !1, configurable: !1 },
});
},
});
ua = Te = Bb.Class.create({
init: function (qa, W, aa) {
Object.defineProperties(this, {
peerMasterToken: { value: qa, writable: !1, configurable: !1 },
peerUserIdToken: { value: W, writable: !1, configurable: !1 },
peerServiceTokens: { value: aa, writable: !1, configurable: !1 },
});
},
});
ad = Bb.Class.create({
init: function (qa, W, aa, da, oa, Ia, Fa) {
var Ra;
function Pa(ka) {
La(
Fa,
function () {
var xa, ya, Ja, Ba, Oa, Ga, Ua, ab, Xa, jb, mb, nb, qb, rb, zb, wb, u;
W = aa ? null : W;
xa = da.nonReplayableId;
ya = da.renewable;
Ja = da.capabilities;
Ba = da.messageId;
Oa = da.keyRequestData ? da.keyRequestData : [];
Ga = da.keyResponseData;
Ua = da.userAuthData;
ab = da.userIdToken;
Xa = da.serviceTokens ? da.serviceTokens : [];
if (qa.isPeerToPeer()) {
jb = oa.peerMasterToken;
mb = oa.peerUserIdToken;
nb = oa.peerServiceTokens ? oa.peerServiceTokens : [];
} else (mb = jb = null), (nb = []);
if (0 > Ba || Ba > Lb) throw new ub('Message ID ' + Ba + ' is out of range.');
if (!W && !aa) throw new ub('Message entity authentication data or master token must be provided.');
if (Ga) {
if (qa.isPeerToPeer()) {
qb = aa;
rb = Ga.masterToken;
} else (qb = Ga.masterToken), (rb = jb);
} else (qb = aa), (rb = jb);
if (ab && (!qb || !ab.isBoundTo(qb))) throw new ub('User ID token must be bound to a master token.');
if (mb && (!rb || !mb.isBoundTo(rb)))
throw new ub('Peer user ID token must be bound to a peer master token.');
Xa.forEach(function (b) {
if (b.isMasterTokenBound() && (!qb || !b.isBoundTo(qb)))
throw new ub('Master token bound service tokens must be bound to the provided master token.');
if (b.isUserIdTokenBound() && (!ab || !b.isBoundTo(ab)))
throw new ub('User ID token bound service tokens must be bound to the provided user ID token.');
}, this);
nb.forEach(function (b) {
if (b.isMasterTokenBound() && (!rb || !b.isBoundTo(rb)))
throw new ub(
'Master token bound peer service tokens must be bound to the provided peer master token.'
);
if (b.isUserIdTokenBound() && (!mb || !b.isBoundTo(mb)))
throw new ub(
'User ID token bound peer service tokens must be bound to the provided peer user ID token.'
);
}, this);
if (Ia) {
u = Ia.customer;
zb = Ia.messageCryptoContext;
wb = ba(
qa,
zb,
u,
W,
aa,
ka,
Ba,
Oa,
Ga,
Ua,
ab,
Xa,
jb,
mb,
nb,
xa,
ya,
Ja,
Ia.headerdata,
Ia.signature
);
Object.defineProperties(this, wb);
return this;
}
u = ab ? ab.customer : null;
wb = {};
ka && (wb.sender = ka);
wb.messageid = Ba;
'number' === typeof xa && (wb.nonreplayableid = xa);
wb.renewable = ya;
Ja && (wb.capabilities = Ja);
0 < Oa.length && (wb.keyrequestdata = Oa);
Ga && (wb.keyresponsedata = Ga);
Ua && (wb.userauthdata = Ua);
ab && (wb.useridtoken = ab);
0 < Xa.length && (wb.servicetokens = Xa);
jb && (wb.peermastertoken = jb);
mb && (wb.peeruseridtoken = mb);
0 < nb.length && (wb.peerservicetokens = nb);
try {
zb = ca(qa, W, aa);
} catch (b) {
throw (
(b instanceof cb &&
(b.setEntity(aa), b.setEntity(W), b.setUser(ab), b.setUser(Ua), b.setMessageId(Ba)),
b)
);
}
wb = Qb(JSON.stringify(wb), Kb);
zb.encrypt(wb, {
result: function (b) {
La(
Fa,
function () {
zb.sign(b, {
result: function (a) {
La(
Fa,
function () {
var c;
c = ba(qa, zb, u, W, aa, ka, Ba, Oa, Ga, Ua, ab, Xa, jb, mb, nb, xa, ya, Ja, b, a);
Object.defineProperties(this, c);
return this;
},
Ra
);
},
error: function (a) {
La(
Fa,
function () {
a instanceof cb &&
(a.setEntity(aa), a.setEntity(W), a.setUser(ab), a.setUser(Ua), a.setMessageId(Ba));
throw a;
},
Ra
);
},
});
},
Ra
);
},
error: function (b) {
La(
Fa,
function () {
b instanceof cb &&
(b.setEntity(aa), b.setEntity(W), b.setUser(ab), b.setUser(Ua), b.setMessageId(Ba));
throw b;
},
Ra
);
},
});
},
Ra
);
}
Ra = this;
La(
Fa,
function () {
Ia
? Pa(Ia.sender)
: aa
? qa.getEntityAuthenticationData(null, {
result: function (ka) {
ka = ka.getIdentity();
Pa(ka);
},
error: Fa.error,
})
: Pa(null);
},
Ra
);
},
isEncrypting: function () {
return this.masterToken || Cd(this.entityAuthenticationData.scheme);
},
isRenewable: function () {
return this.renewable;
},
toJSON: function () {
var qa;
qa = {};
this.masterToken ? (qa[Le] = this.masterToken) : (qa[Vd] = this.entityAuthenticationData);
qa[Me] = Cb(this.headerdata);
qa[Wd] = Cb(this.signature);
return qa;
},
});
Re = function (qa, W, aa, da, oa, Ia) {
new ad(qa, W, aa, da, oa, null, Ia);
};
Xd = function (qa, W, aa, da, oa, Ia, Fa) {
La(Fa, function () {
var Pa, Ra;
aa = da ? null : aa;
if (!aa && !da) throw new Ib(V.MESSAGE_ENTITY_NOT_FOUND);
Pa = W;
try {
W = Fb(Pa);
} catch (ka) {
throw new Ib(V.HEADER_DATA_INVALID, Pa, ka);
}
if (!W || 0 == W.length) throw new Ib(V.HEADER_DATA_MISSING, Pa);
try {
Ra = ca(qa, aa, da);
} catch (ka) {
throw (ka instanceof cb && (ka.setEntity(da), ka.setEntity(aa)), ka);
}
ia(qa, Ra, W, oa, {
result: function (ka) {
La(Fa, function () {
var xa, ya, Ja, Ba, Oa;
try {
xa = JSON.parse(ka);
} catch (Ga) {
if (Ga instanceof SyntaxError)
throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka, Ga).setEntity(da).setEntity(aa);
throw Ga;
}
ya = parseInt(xa.messageid);
if (!ya || ya != ya) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka).setEntity(da).setEntity(aa);
if (0 > ya || ya > Lb)
throw new Ib(V.MESSAGE_ID_OUT_OF_RANGE, 'headerdata ' + ka).setEntity(da).setEntity(aa);
Ja = da ? xa.sender : null;
if (da && (!Ja || 'string' !== typeof Ja))
throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka).setEntity(da).setEntity(aa).setMessageId(ya);
Ba = xa.keyresponsedata;
if (Ba && 'object' !== typeof Ba)
throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka).setEntity(da).setEntity(aa).setMessageId(ya);
Oa = Fa;
Fa = {
result: function (Ga) {
Oa.result(Ga);
},
error: function (Ga) {
Ga instanceof cb && (Ga.setEntity(da), Ga.setEntity(aa), Ga.setMessageId(ya));
Oa.error(Ga);
},
};
fa(qa, Ba, {
result: function (Ga) {
La(Fa, function () {
var Ua, ab;
Ua = !qa.isPeerToPeer() && Ga ? Ga.masterToken : da;
ab = xa.useridtoken;
if (ab && 'object' !== typeof ab) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka);
U(qa, ab, Ua, {
result: function (Xa) {
La(Fa, function () {
var jb;
jb = xa.userauthdata;
if (jb && 'object' !== typeof jb) throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka);
Y(qa, Ua, jb, {
result: function (mb) {
La(Fa, function () {
var nb, qb, rb;
if (mb) {
nb = mb.scheme;
qb = qa.getUserAuthenticationFactory(nb);
if (!qb) throw new Hb(V.USERAUTH_FACTORY_NOT_FOUND, nb).setUser(Xa).setUser(mb);
nb = da ? da.identity : aa.getIdentity();
rb = qb.authenticate(qa, nb, mb, Xa);
} else rb = Xa ? Xa.customer : null;
sa(qa, xa.servicetokens, Ua, Xa, Ia, ka, {
result: function (zb) {
La(Fa, function () {
var wb, u, b, a;
wb = xa.nonreplayableid !== Ab ? parseInt(xa.nonreplayableid) : null;
u = xa.renewable;
if (wb != wb || 'boolean' !== typeof u)
throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka);
if (0 > wb || wb > Lb)
throw new Ib(V.NONREPLAYABLE_ID_OUT_OF_RANGE, 'headerdata ' + ka);
b = null;
a = xa.capabilities;
if (a) {
if ('object' !== typeof a)
throw new xb(V.JSON_PARSE_ERROR, 'headerdata ' + ka);
b = Qe(a);
}
ta(qa, xa, ka, {
result: function (c) {
pa(qa, xa, Ga, Ia, ka, {
result: function (h) {
La(Fa, function () {
var k, l, d, f;
k = h.peerMasterToken;
l = h.peerUserIdToken;
d = h.peerServiceTokens;
f = new Ca(ya, wb, u, b, c, Ga, mb, Xa, zb);
k = new ua(k, l, d);
l = new ha(rb, Ja, Ra, W, oa);
new ad(qa, aa, da, f, k, l, Fa);
});
},
error: Fa.error,
});
},
error: function (c) {
La(Fa, function () {
c instanceof cb && (c.setUser(Xa), c.setUser(mb));
throw c;
});
},
});
});
},
error: function (zb) {
La(Fa, function () {
zb instanceof cb && (zb.setEntity(Ua), zb.setUser(Xa), zb.setUser(mb));
throw zb;
});
},
});
});
},
error: Fa.error,
});
});
},
error: Fa.error,
});
});
},
error: Fa.error,
});
});
},
error: Fa.error,
});
});
};
})();
(function () {
function ha(ba, ca) {
this.payload = ba;
this.signature = ca;
}
Zd = Bb.Class.create({
init: function (ba, ca, ia, fa, U, Y, sa, pa) {
var ta;
ta = this;
La(
pa,
function () {
var Ca, ua;
if (0 > ba || ba > Lb) throw new ub('Sequence number ' + ba + ' is outside the valid range.');
if (0 > ca || ca > Lb) throw new ub('Message ID ' + ca + ' is outside the valid range.');
if (sa)
return (
Object.defineProperties(this, {
sequenceNumber: { value: ba, writable: !1, configurable: !1 },
messageId: { value: ca, writable: !1, configurable: !1 },
compressionAlgo: { value: fa, writable: !1, configurable: !1 },
data: { value: U, writable: !1, configurable: !1 },
endofmsg: { value: ia, writable: !1, enumerable: !1, configurable: !1 },
payload: { value: sa.payload, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: sa.signature, writable: !1, enumerable: !1, configurable: !1 },
}),
this
);
if (fa) {
Ca = $d(fa, U);
Ca || ((fa = null), (Ca = U));
} else (fa = null), (Ca = U);
ua = {};
ua.sequencenumber = ba;
ua.messageid = ca;
ia && (ua.endofmsg = ia);
fa && (ua.compressionalgo = fa);
ua.data = Cb(Ca);
Ca = Qb(JSON.stringify(ua), Kb);
Y.encrypt(Ca, {
result: function (qa) {
La(
pa,
function () {
Y.sign(qa, {
result: function (W) {
La(
pa,
function () {
Object.defineProperties(this, {
sequenceNumber: { value: ba, writable: !1, configurable: !1 },
messageId: { value: ca, writable: !1, configurable: !1 },
compressionAlgo: { value: fa, writable: !1, configurable: !1 },
data: { value: U, writable: !1, configurable: !1 },
endofmsg: { value: ia, writable: !1, enumerable: !1, configurable: !1 },
payload: { value: qa, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: W, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
ta
);
},
error: function (W) {
pa.error(W);
},
});
},
ta
);
},
error: function (qa) {
pa.error(qa);
},
});
},
ta
);
},
isEndOfMessage: function () {
return this.endofmsg;
},
toJSON: function () {
var ba;
ba = {};
ba.payload = Cb(this.payload);
ba.signature = Cb(this.signature);
return ba;
},
});
Ve = function (ba, ca, ia, fa, U, Y, sa) {
new Zd(ba, ca, ia, fa, U, Y, null, sa);
};
We = function (ba, ca, ia) {
La(ia, function () {
var fa, U, Y, sa;
fa = ba.payload;
U = ba.signature;
if (!fa || 'string' !== typeof fa || 'string' !== typeof U)
throw new xb(V.JSON_PARSE_ERROR, 'payload chunk ' + JSON.stringify(ba));
try {
Y = Fb(fa);
} catch (pa) {
throw new Ib(V.PAYLOAD_INVALID, 'payload chunk ' + JSON.stringify(ba), pa);
}
try {
sa = Fb(U);
} catch (pa) {
throw new Ib(V.PAYLOAD_SIGNATURE_INVALID, 'payload chunk ' + JSON.stringify(ba), pa);
}
ca.verify(Y, sa, {
result: function (pa) {
La(ia, function () {
if (!pa) throw new tb(V.PAYLOAD_VERIFICATION_FAILED);
ca.decrypt(Y, {
result: function (ta) {
La(ia, function () {
var Ca, ua, qa, W, aa, da, oa;
Ca = Rb(ta, Kb);
try {
ua = JSON.parse(Ca);
} catch (Ia) {
if (Ia instanceof SyntaxError)
throw new xb(V.JSON_PARSE_ERROR, 'payload chunk payload ' + Ca, Ia);
throw Ia;
}
qa = parseInt(ua.sequencenumber);
W = parseInt(ua.messageid);
aa = ua.endofmsg;
da = ua.compressionalgo;
ua = ua.data;
if (
!qa ||
qa != qa ||
!W ||
W != W ||
(aa && 'boolean' !== typeof aa) ||
(da && 'string' !== typeof da) ||
'string' !== typeof ua
)
throw new xb(V.JSON_PARSE_ERROR, 'payload chunk payload ' + Ca);
if (0 > qa || qa > Lb)
throw new cb(V.PAYLOAD_SEQUENCE_NUMBER_OUT_OF_RANGE, 'payload chunk payload ' + Ca);
if (0 > W || W > Lb)
throw new cb(V.PAYLOAD_MESSAGE_ID_OUT_OF_RANGE, 'payload chunk payload ' + Ca);
aa || (aa = !1);
if (da && !Dc[da]) throw new Ib(V.UNIDENTIFIED_COMPRESSION, da);
try {
oa = Fb(ua);
} catch (Ia) {
throw new Ib(V.PAYLOAD_DATA_CORRUPT, ua, Ia);
}
if (oa && 0 != oa.length) Ca = da ? wd(da, oa) : oa;
else {
if (0 < ua.length) throw new Ib(V.PAYLOAD_DATA_CORRUPT, ua);
if (aa) Ca = new Uint8Array(0);
else throw new Ib(V.PAYLOAD_DATA_MISSING, ua);
}
oa = new ha(Y, sa);
new Zd(qa, W, aa, da, Ca, ca, oa, ia);
});
},
error: function (ta) {
ia.error(ta);
},
});
});
},
error: function (pa) {
ia.error(pa);
},
});
});
};
})();
(function () {
var ia, fa;
function ha(U, Y, sa, pa, ta) {
var ua, qa, W, aa, da;
function Ca() {
La(ta, function () {
var oa, Ia;
qa >= Y.length && ((qa = 0), ++ua);
if (ua >= W.length) {
if (aa) throw aa;
throw new Nb(V.KEYX_FACTORY_NOT_FOUND, JSON.stringify(Y));
}
oa = W[ua];
Ia = Y[qa];
oa.scheme != Ia.keyExchangeScheme
? (++qa, Ca())
: oa.generateResponse(U, Ia, da, {
result: function (Fa) {
ta.result(Fa);
},
error: function (Fa) {
La(ta, function () {
if (!(Fa instanceof cb)) throw Fa;
aa = Fa;
++qa;
Ca();
});
},
});
});
}
ua = 0;
qa = 0;
W = U.getKeyExchangeFactories();
da = sa ? sa : pa;
Ca();
}
function ba(U, Y, sa, pa, ta) {
La(ta, function () {
var Ca;
Ca = Y.keyRequestData;
if (Y.isRenewable() && 0 < Ca.length)
pa
? pa.isRenewable() || pa.isExpired()
? ha(U, Ca, pa, null, ta)
: U.getTokenFactory().isNewestMasterToken(U, pa, {
result: function (ua) {
La(ta, function () {
if (ua) return null;
ha(U, Ca, pa, null, ta);
});
},
error: ta.error,
})
: ha(U, Ca, null, sa.getIdentity(), ta);
else return null;
});
}
function ca(U, Y, sa, pa) {
La(pa, function () {
var ta, Ca, ua, qa;
ta = Y.userIdToken;
Ca = Y.userAuthenticationData;
ua = Y.messageId;
if (ta && ta.isVerified()) {
if ((ta.isRenewable() && Y.isRenewable()) || ta.isExpired() || !ta.isBoundTo(sa)) {
Ca = U.getTokenFactory();
Ca.renewUserIdToken(U, ta, sa, pa);
return;
}
} else if (Y.isRenewable() && sa && Ca) {
ta = Y.customer;
if (!ta) {
ta = Ca.scheme;
qa = U.getUserAuthenticationFactory(ta);
if (!qa) throw new Hb(V.USERAUTH_FACTORY_NOT_FOUND, ta).setEntity(sa).setUser(Ca).setMessageId(ua);
ta = qa.authenticate(U, sa.identity, Ca, null);
}
Ca = U.getTokenFactory();
Ca.createUserIdToken(U, ta, sa, pa);
return;
}
return ta;
});
}
ia = new Uint8Array(0);
fa = Jc = function (U) {
if (0 > U || U > Lb) throw new ub('Message ID ' + U + ' is outside the valid range.');
return U == Lb ? 0 : U + 1;
};
Tc = function (U) {
if (0 > U || U > Lb) throw new ub('Message ID ' + U + ' is outside the valid range.');
return 0 == U ? Lb : U - 1;
};
Kc = function (U, Y, sa, pa, ta) {
La(ta, function () {
var Ca;
if (pa == Ab || null == pa) {
Ca = U.getRandom();
do {
pa = Ca.nextLong();
} while (0 > pa || pa > Lb);
} else if (0 > pa || pa > Lb) throw new ub('Message ID ' + pa + ' is outside the valid range.');
U.getEntityAuthenticationData(null, {
result: function (ua) {
La(ta, function () {
var qa;
qa = U.getMessageCapabilities();
return new xd(U, pa, qa, ua, Y, sa, null, null, null, null, null);
});
},
error: function (ua) {
ta.error(ua);
},
});
});
};
Xe = function (U, Y, sa) {
La(sa, function () {
var ta, Ca, ua, qa, W, aa;
function pa(da) {
La(sa, function () {
da instanceof cb &&
(da.setEntity(ta), da.setEntity(Ca), da.setUser(ua), da.setUser(qa), da.setMessageId(W));
throw da;
});
}
ta = Y.masterToken;
Ca = Y.entityAuthenticationData;
ua = Y.userIdToken;
qa = Y.userAuthenticationData;
W = Y.messageId;
aa = fa(W);
ba(U, Y, Ca, ta, {
result: function (da) {
La(sa, function () {
var oa;
oa = da ? da.keyResponseData.masterToken : (oa = ta);
U.getEntityAuthenticationData(null, {
result: function (Ia) {
La(sa, function () {
ca(U, Y, oa, {
result: function (Fa) {
La(sa, function () {
var Pa, Ra, ka;
ua = Fa;
Pa = Yd(Y.messageCapabilities, U.getMessageCapabilities());
Ra = Y.keyResponseData;
ka = Y.serviceTokens;
return U.isPeerToPeer()
? new xd(
U,
aa,
Pa,
Ia,
Ra ? Ra.masterToken : Y.peerMasterToken,
Y.peerUserIdToken,
Y.peerServiceTokens,
ta,
ua,
ka,
da
)
: new xd(U, aa, Pa, Ia, Ra ? Ra.masterToken : ta, ua, ka, null, null, null, da);
});
},
error: pa,
});
});
},
error: pa,
});
});
},
error: pa,
});
});
};
Ye = function (U, Y, sa, pa, ta) {
La(ta, function () {
U.getEntityAuthenticationData(null, {
result: function (Ca) {
La(ta, function () {
var ua, qa;
if (Y != Ab && null != Y) ua = fa(Y);
else {
qa = U.getRandom();
do {
ua = qa.nextInt();
} while (0 > ua || ua > Lb);
}
Pe(U, Ca, ua, sa.responseCode, sa.internalCode, sa.message, pa, ta);
});
},
error: function (Ca) {
ta.error(Ca);
},
});
});
};
xd = Bb.Class.create({
init: function (U, Y, sa, pa, ta, Ca, ua, qa, W, aa, da) {
var oa, Ia, Fa, Pa, Ra;
if (!U.isPeerToPeer() && (qa || W))
throw new ub('Cannot set peer master token or peer user ID token when not in peer-to-peer mode.');
oa = da && !U.isPeerToPeer() ? da.keyResponseData.masterToken : ta;
Ia = [];
oa = U.getMslStore().getServiceTokens(oa, Ca);
Ia.push.apply(Ia, oa);
ua &&
ua.forEach(function (ka) {
Ia.push(ka);
}, this);
Fa = [];
if (U.isPeerToPeer()) {
Pa = qa;
Ra = W;
ua = da ? da.keyResponseData.masterToken : qa;
W = U.getMslStore().getServiceTokens(ua, W);
Fa.push.apply(Fa, W);
aa &&
aa.forEach(function (ka) {
Fa.push(ka);
}, this);
}
Object.defineProperties(this, {
_ctx: { value: U, writable: !1, enumerable: !1, configurable: !1 },
_entityAuthData: { value: pa, writable: !1, enumerable: !1, configurable: !1 },
_masterToken: { value: ta, writable: !0, enumerable: !1, configurable: !1 },
_messageId: { value: Y, writable: !1, enumerable: !1, configurable: !1 },
_capabilities: { value: sa, writable: !1, enumerable: !1, configurable: !1 },
_keyExchangeData: { value: da, 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: Ca, writable: !0, enumerable: !1, configurable: !1 },
_serviceTokens: { value: Ia, writable: !1, enumerable: !1, configurable: !1 },
_peerMasterToken: { value: Pa, writable: !0, enumerable: !1, configurable: !1 },
_peerUserIdToken: { value: Ra, writable: !0, enumerable: !1, configurable: !1 },
_peerServiceTokens: { value: Fa, 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 || Cd(this._entityAuthData.scheme);
},
willEncryptPayloads: function () {
return (
this._masterToken || (!this._ctx.isPeerToPeer() && this._keyExchangeData) || Cd(this._entityAuthData.scheme)
);
},
willIntegrityProtectHeader: function () {
return this._masterToken || je(this._entityAuthData.scheme);
},
willIntegrityProtectPayloads: function () {
return (
this._masterToken || (!this._ctx.isPeerToPeer() && this._keyExchangeData) || je(this._entityAuthData.scheme)
);
},
getHeader: function (U) {
La(
U,
function () {
var Y, sa, pa;
Y = this._keyExchangeData ? this._keyExchangeData.keyResponseData : null;
sa = [];
for (pa in this._keyRequestData) {
sa.push(this._keyRequestData[pa]);
}
if (this._nonReplayable) {
if (!this._masterToken) throw new Ib(V.NONREPLAYABLE_MESSAGE_REQUIRES_MASTERTOKEN);
pa = this._ctx.getMslStore().getNonReplayableId(this._masterToken);
} else pa = null;
Y = new Se(
this._messageId,
pa,
this._renewable,
this._capabilities,
sa,
Y,
this._userAuthData,
this._userIdToken,
this._serviceTokens
);
sa = new Te(this._peerMasterToken, this._peerUserIdToken, this._peerServiceTokens);
Re(this._ctx, this._entityAuthData, this._masterToken, Y, sa, U);
},
this
);
},
isNonReplayable: function () {
return this._nonReplayable;
},
setNonReplayable: function (U) {
this._nonReplayable = U;
return this;
},
isRenewable: function () {
return this._renewable;
},
setRenewable: function (U) {
this._renewable = U;
return this;
},
setAuthTokens: function (U, Y) {
var sa, ta;
if (Y && !Y.isBoundTo(U)) throw new ub('User ID token must be bound to master token.');
if (this._keyExchangeData && !this._ctx.isPeerToPeer())
throw new ub(
'Attempt to set message builder master token when key exchange data exists as a trusted network server.'
);
try {
sa = this._ctx.getMslStore().getServiceTokens(U, Y);
} catch (Ca) {
if (Ca instanceof cb)
throw new ub('Invalid master token and user ID token combination despite checking above.', Ca);
throw Ca;
}
for (var pa = this._serviceTokens.length - 1; 0 <= pa; --pa) {
ta = this._serviceTokens[pa];
((ta.isUserIdTokenBound() && !ta.isBoundTo(Y)) || (ta.isMasterTokenBound() && !ta.isBoundTo(U))) &&
this._serviceTokens.splice(pa, 1);
}
sa.forEach(function (Ca) {
this.excludeServiceToken(Ca.name, Ca.isMasterTokenBound(), Ca.isUserIdTokenBound());
this._serviceTokens.push(Ca);
}, this);
this._masterToken = U;
this._userIdToken = Y;
},
setUserAuthenticationData: function (U) {
this._userAuthData = U;
return this;
},
setCustomer: function (U, Y) {
var sa;
sa = this;
La(
Y,
function () {
var pa;
if (
(!this._ctx.isPeerToPeer() && null != this._userIdToken) ||
(this._ctx.isPeerToPeer() && null != this._peerUserIdToken)
)
throw new ub('User ID token or peer user ID token already exists for the remote user.');
pa = this._keyExchangeData
? this._keyExchangeData.keyResponseData.masterToken
: this._ctx.isPeerToPeer()
? this._peerMasterToken
: this._masterToken;
if (!pa)
throw new ub(
'User ID token or peer user ID token cannot be created because no corresponding master token exists.'
);
this._ctx.getTokenFactory().createUserIdToken(this._ctx, U, pa, {
result: function (ta) {
La(
Y,
function () {
this._ctx.isPeerToPeer()
? (this._peerUserIdToken = ta)
: ((this._userIdToken = ta), (this._userAuthData = null));
return !0;
},
sa
);
},
error: function (ta) {
Y.error(ta);
},
});
},
sa
);
},
addKeyRequestData: function (U) {
this._keyRequestData[U.uniqueKey()] = U;
return this;
},
removeKeyRequestData: function (U) {
delete this._keyRequestData[U.uniqueKey()];
return this;
},
addServiceToken: function (U) {
var Y;
Y =
this._keyExchangeData && !this._ctx.isPeerToPeer()
? this._keyExchangeData.keyResponseData.masterToken
: this._masterToken;
if (U.isMasterTokenBound() && !U.isBoundTo(Y))
throw new Ib(
V.SERVICETOKEN_MASTERTOKEN_MISMATCH,
'st ' + JSON.stringify(U) + '; mt ' + JSON.stringify(Y)
).setEntity(Y);
if (U.isUserIdTokenBound() && !U.isBoundTo(this._userIdToken))
throw new Ib(
V.SERVICETOKEN_USERIDTOKEN_MISMATCH,
'st ' + JSON.stringify(U) + '; uit ' + JSON.stringify(this._userIdToken)
)
.setEntity(Y)
.setUser(this._userIdToken);
this.excludeServiceToken(U.name, U.isMasterTokenBound(), U.isUserIdTokenBound());
this._serviceTokens.push(U);
return this;
},
addServiceTokenIfAbsent: function (U) {
var sa;
for (var Y = this._serviceTokens.length - 1; 0 <= Y; --Y) {
sa = this._serviceTokens[Y];
if (
sa.name == U.name &&
sa.isMasterTokenBound() == U.isMasterTokenBound() &&
sa.isUserIdTokenBound() == U.isUserIdTokenBound()
)
return this;
}
this.addServiceToken(U);
return this;
},
excludeServiceToken: function () {
var U, Y, sa, ta;
if (1 == arguments.length) {
U = arguments[0];
Y = U.name;
sa = U.isMasterTokenBound();
U = U.isUserIdTokenBound();
} else (arguments.length = 3), (Y = arguments[0]), (sa = arguments[1]), (U = arguments[2]);
for (var pa = this._serviceTokens.length - 1; 0 <= pa; --pa) {
ta = this._serviceTokens[pa];
ta.name == Y &&
ta.isMasterTokenBound() == sa &&
ta.isUserIdTokenBound() == U &&
this._serviceTokens.splice(pa, 1);
}
return this;
},
deleteServiceToken: function () {
var U, Y, sa, pa;
if (2 == arguments.length) {
U = arguments[0];
Y = U.name;
U.isMasterTokenBound();
U.isUserIdTokenBound();
sa = arguments[1];
} else (arguments.length = 4), (Y = arguments[0]), (sa = arguments[3]);
pa = this;
La(
sa,
function () {
var ta, Ca;
ta = originalToken.isMasterTokenBound() ? this._masterToken : null;
Ca = originalToken.isUserIdTokenBound() ? this._userIdToken : null;
tc(this._ctx, Y, ia, ta, Ca, !1, null, new Sc(), {
result: function (ua) {
La(
sa,
function () {
return this.addServiceToken(ua);
},
pa
);
},
error: function (ua) {
ua instanceof cb && (ua = new ub('Failed to create and add empty service token to message.', ua));
sa.error(ua);
},
});
},
pa
);
},
getServiceTokens: function () {
var U;
U = [];
U.push.apply(U, this._serviceTokens);
return U;
},
getPeerMasterToken: function () {
return this._peerMasterToken;
},
getPeerUserIdToken: function () {
return this._peerUserIdToken;
},
setPeerAuthTokens: function (U, Y) {
var sa, ta;
if (!this._ctx.isPeerToPeer())
throw new ub('Cannot set peer master token or peer user ID token when not in peer-to-peer mode.');
if (Y && !U) throw new ub('Peer master token cannot be null when setting peer user ID token.');
if (Y && !Y.isBoundTo(U))
throw new Ib(V.USERIDTOKEN_MASTERTOKEN_MISMATCH, 'uit ' + Y + '; mt ' + U).setEntity(U).setUser(Y);
try {
sa = this._ctx.getMslStore().getServiceTokens(U, Y);
} catch (Ca) {
if (Ca instanceof cb)
throw new ub('Invalid peer master token and user ID token combination despite proper check.', Ca);
throw Ca;
}
for (var pa = this._peerServiceTokens.length - 1; 0 <= pa; --pa) {
ta = this._peerServiceTokens[pa];
((ta.isUserIdTokenBound() && !ta.isBoundTo(Y)) || (ta.isMasterTokenBound() && !ta.isBoundTo(U))) &&
this._peerServiceTokens.slice(pa, 1);
}
sa.forEach(function (Ca) {
this.excludePeerServiceToken(Ca.name, Ca.isMasterTokenBound(), Ca.isUserIdTokenBound());
this._peerServiceTokens.push(Ca);
}, this);
this._peerUserIdToken = Y;
this._peerMasterToken = U;
return this;
},
addPeerServiceToken: function (U) {
if (!this._ctx.isPeerToPeer()) throw new ub('Cannot set peer service tokens when not in peer-to-peer mode.');
if (U.isMasterTokenBound() && !U.isBoundTo(this._peerMasterToken))
throw new Ib(
V.SERVICETOKEN_MASTERTOKEN_MISMATCH,
'st ' + JSON.stringify(U) + '; mt ' + JSON.stringify(this._peerMasterToken)
).setEntity(this._peerMasterToken);
if (U.isUserIdTokenBound() && !U.isBoundTo(this._peerUserIdToken))
throw new Ib(
V.SERVICETOKEN_USERIDTOKEN_MISMATCH,
'st ' + JSON.stringify(U) + '; uit ' + JSON.stringify(this._peerUserIdToken)
)
.setEntity(this._peerMasterToken)
.setUser(this._peerUserIdToken);
this.excludePeerServiceToken(U.name, U.isMasterTokenBound(), U.isUserIdTokenBound());
this._peerServiceTokens.push(U);
return this;
},
addPeerServiceTokenIfAbsent: function (U) {
var sa;
for (var Y = this._peerServiceTokens.length - 1; 0 <= Y; --Y) {
sa = this._peerServiceTokens[Y];
if (
sa.name == U.name &&
sa.isMasterTokenBound() == U.isMasterTokenBound() &&
sa.isUserIdTokenBound() == U.isUserIdTokenBound()
)
return this;
}
this.addPeerServiceToken(U);
return this;
},
excludePeerServiceToken: function () {
var U, Y, sa, ta;
if (1 == arguments.length) {
U = arguments[0];
Y = U.name;
sa = U.isMasterTokenBound();
U = U.isUserIdTokenBound();
} else (arguments.length = 3), (Y = arguments[0]), (sa = arguments[1]), (U = arguments[2]);
for (var pa = this._peerServiceTokens.length - 1; 0 <= pa; --pa) {
ta = this._peerServiceTokens[pa];
ta.name == Y &&
ta.isMasterTokenBound() == sa &&
ta.isUserIdTokenBound() == U &&
this._peerServiceTokens.splice(pa, 1);
}
return this;
},
deletePeerServiceToken: function () {
var U, Y, sa, pa, ta, Ca;
if (2 == arguments.length) {
U = arguments[0];
Y = U.name;
sa = U.isMasterTokenBound();
pa = U.isUserIdTokenBound();
ta = arguments[1];
} else
(arguments.length = 4), (Y = arguments[0]), (sa = arguments[1]), (pa = arguments[2]), (ta = arguments[3]);
Ca = this;
La(
ta,
function () {
tc(
this._ctx,
Y,
ia,
sa ? this._peerMasterToken : null,
pa ? this._peerUserIdToken : null,
!1,
null,
new Sc(),
{
result: function (ua) {
La(
ta,
function () {
return this.addPeerServiceToken(ua);
},
Ca
);
},
error: function (ua) {
ua instanceof cb &&
(ua = new ub('Failed to create and add empty peer service token to message.', ua));
ta.error(ua);
},
}
);
},
Ca
);
},
getPeerServiceTokens: function () {
var U;
U = [];
U.push.apply(U, this._peerServiceTokens);
return U;
},
});
})();
(function () {
function ha(ca, ia) {
return ia[ca] ? ia[ca] : ia[''];
}
function ba(ca) {
var ia;
ia = ca.builder.getKeyExchangeData();
return ia && !ca.ctx.isPeerToPeer() ? ia.keyResponseData.masterToken : ca.builder.getMasterToken();
}
Ze = Bb.Class.create({
init: function (ca, ia, fa) {
ca = {
ctx: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
cryptoContexts: { value: ia.getCryptoContexts(), writable: !1, enumerable: !1, configurable: !1 },
builder: { value: fa, writable: !1, enumerable: !1, configurable: !1 },
};
Object.defineProperties(this, ca);
},
isPrimaryMasterTokenAvailable: function () {
return ba(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 (ca) {
try {
return this.builder.addServiceToken(ca), !0;
} catch (ia) {
if (ia instanceof Ib) return !1;
throw ia;
}
},
addPeerServiceToken: function (ca) {
try {
return this.builder.addPeerServiceToken(ca), !0;
} catch (ia) {
if (ia instanceof Ib) return !1;
throw ia;
}
},
addUnboundPrimaryServiceToken: function (ca, ia, fa, U, Y) {
var sa;
sa = this;
La(
Y,
function () {
var pa;
pa = ha(ca, this.cryptoContexts);
if (!pa) return !1;
tc(this.ctx, ca, ia, null, null, fa, U, pa, {
result: function (ta) {
La(
Y,
function () {
try {
this.builder.addServiceToken(ta);
} catch (Ca) {
if (Ca instanceof Ib)
throw new ub(
'Service token bound to incorrect authentication tokens despite being unbound.',
Ca
);
throw Ca;
}
return !0;
},
sa
);
},
error: function (ta) {
Y.error(ta);
},
});
},
sa
);
},
addUnboundPeerServiceToken: function (ca, ia, fa, U, Y) {
var sa;
sa = this;
La(
Y,
function () {
var pa;
pa = ha(ca, this.cryptoContexts);
if (!pa) return !1;
tc(this.ctx, ca, ia, null, null, fa, U, pa, {
result: function (ta) {
La(
Y,
function () {
try {
this.builder.addPeerServiceToken(ta);
} catch (Ca) {
if (Ca instanceof Ib)
throw new ub(
'Service token bound to incorrect authentication tokens despite being unbound.',
Ca
);
throw Ca;
}
return !0;
},
sa
);
},
error: function (ta) {
Y.error(ta);
},
});
},
sa
);
},
addMasterBoundPrimaryServiceToken: function (ca, ia, fa, U, Y) {
var sa;
sa = this;
La(
Y,
function () {
var pa, ta;
pa = ba(this);
if (!pa) return !1;
ta = ha(ca, this.cryptoContexts);
if (!ta) return !1;
tc(this.ctx, ca, ia, pa, null, fa, U, ta, {
result: function (Ca) {
La(
Y,
function () {
try {
this.builder.addServiceToken(Ca);
} catch (ua) {
if (ua instanceof Ib)
throw new ub(
'Service token bound to incorrect authentication tokens despite setting correct master token.',
ua
);
throw ua;
}
return !0;
},
sa
);
},
error: function (Ca) {
Y.error(Ca);
},
});
},
sa
);
},
addMasterBoundPeerServiceToken: function (ca, ia, fa, U, Y) {
var sa;
sa = this;
La(
Y,
function () {
var pa, ta;
pa = this.builder.getPeerMasterToken();
if (!pa) return !1;
ta = ha(ca, this.cryptoContexts);
if (!ta) return !1;
tc(this.ctx, ca, ia, pa, null, fa, U, ta, {
result: function (Ca) {
La(
Y,
function () {
try {
this.builder.addPeerServiceToken(Ca);
} catch (ua) {
if (ua instanceof Ib)
throw new ub(
'Service token bound to incorrect authentication tokens despite setting correct master token.',
ua
);
throw ua;
}
return !0;
},
sa
);
},
error: function (Ca) {
Y.error(Ca);
},
});
},
sa
);
},
addUserBoundPrimaryServiceToken: function (ca, ia, fa, U, Y) {
var sa;
sa = this;
La(
Y,
function () {
var pa, ta, Ca;
pa = ba(this);
if (!pa) return !1;
ta = this.builder.getUserIdToken();
if (!ta) return !1;
Ca = ha(ca, this.cryptoContexts);
if (!Ca) return !1;
tc(this.ctx, ca, ia, pa, ta, fa, U, Ca, {
result: function (ua) {
La(
Y,
function () {
try {
this.builder.addServiceToken(ua);
} catch (qa) {
if (qa instanceof Ib)
throw new ub(
'Service token bound to incorrect authentication tokens despite setting correct master token and user ID token.',
qa
);
throw qa;
}
return !0;
},
sa
);
},
error: function (ua) {
Y.error(ua);
},
});
},
sa
);
},
addUserBoundPeerServiceToken: function (ca, ia, fa, U, Y) {
var sa;
sa = this;
La(
Y,
function () {
var pa, ta, Ca;
pa = this.builder.getPeerMasterToken();
if (!pa) return !1;
ta = this.builder.getPeerUserIdToken();
if (!ta) return !1;
Ca = ha(ca, this.cryptoContexts);
if (!Ca) return !1;
tc(this.ctx, ca, ia, pa, ta, fa, U, Ca, {
result: function (ua) {
La(
Y,
function () {
try {
this.builder.addPeerServiceToken(ua);
} catch (qa) {
if (qa instanceof Ib)
throw new ub(
'Service token bound to incorrect authentication tokens despite setting correct master token and user ID token.',
qa
);
throw qa;
}
return !0;
},
sa
);
},
error: function (ua) {
Y.error(ua);
},
});
},
sa
);
},
excludePrimaryServiceToken: function () {
var ca, ia, fa, U;
if (1 == arguments.length) {
ca = arguments[0];
ia = ca.name;
fa = ca.isMasterTokenBound();
U = ca.isUserIdTokenBound();
} else (arguments.length = 3), (ia = arguments[0]), (fa = arguments[1]), (U = arguments[2]);
for (var Y = this.builder.getServiceTokens(), sa = 0; sa < Y.length; ++sa) {
if (((ca = Y[sa]), ca.name == ia && ca.isMasterTokenBound() == fa && ca.isUserIdTokenBound() == U))
return this.builder.excludeServiceToken(ia, fa, U), !0;
}
return !1;
},
excludePeerServiceToken: function () {
var ca, ia, fa, U;
if (1 == arguments.length) {
ca = arguments[0];
ia = ca.name;
fa = ca.isMasterTokenBound();
U = ca.isUserIdTokenBound();
} else (arguments.length = 3), (ia = arguments[0]), (fa = arguments[1]), (U = arguments[2]);
for (var Y = this.builder.getPeerServiceTokens(), sa = 0; sa < Y.length; ++sa) {
if (((ca = Y[sa]), ca.name == ia && ca.isMasterTokenBound() == fa && ca.isUserIdTokenBound() == U))
return this.builder.excludePeerServiceToken(ia, fa, U), !0;
}
return !1;
},
deletePrimaryServiceToken: function () {
var ca, ia, fa, U, Y;
if (2 == arguments.length) {
ca = arguments[0];
ia = ca.name;
fa = ca.isMasterTokenBound();
U = ca.isUserIdTokenBound();
Y = arguments[1];
} else
4 == arguments.length && ((ia = arguments[0]), (fa = arguments[1]), (U = arguments[2]), (Y = arguments[3]));
La(
Y,
function () {
var ta;
for (var sa = this.builder.getServiceTokens(), pa = 0; pa < sa.length; ++pa) {
ta = sa[pa];
if (ta.name == ia && ta.isMasterTokenBound() == fa && ta.isUserIdTokenBound() == U) {
this.builder.deleteServiceToken(ia, fa, U, {
result: function () {
Y.result(!0);
},
error: function (Ca) {
Y.error(Ca);
},
});
return;
}
}
return !1;
},
this
);
},
deletePeerServiceToken: function () {
var ca, ia, fa, U, Y;
if (2 == arguments.length) {
ca = arguments[0];
ia = ca.name;
fa = ca.isMasterTokenBound();
U = ca.isUserIdTokenBound();
Y = arguments[1];
} else
4 == arguments.length && ((ia = arguments[0]), (fa = arguments[1]), (U = arguments[2]), (Y = arguments[3]));
La(
Y,
function () {
var ta;
for (var sa = this.builder.getPeerServiceTokens(), pa = 0; pa < sa.length; ++pa) {
ta = sa[pa];
if (ta.name == ia && ta.isMasterTokenBound() == fa && ta.isUserIdTokenBound() == U) {
this.builder.deletePeerServiceToken(ia, fa, U, {
result: function () {
Y.result(!0);
},
error: function (Ca) {
Y.error(Ca);
},
});
return;
}
}
return !1;
},
this
);
},
});
})();
(function () {
function ha(ba, ca, ia, fa) {
La(fa, function () {
var Y, sa, pa, ta, Ca, ua;
function U() {
La(fa, function () {
var qa;
if (ua >= ia.length) {
if (Ca) throw Ca;
throw new Nb(V.KEYX_RESPONSE_REQUEST_MISMATCH, JSON.stringify(ia));
}
qa = ia[ua];
pa != qa.keyExchangeScheme
? (++ua, U())
: ta.getCryptoContext(ba, qa, sa, Y, {
result: fa.result,
error: function (W) {
La(fa, function () {
if (!(W instanceof cb)) throw W;
Ca = W;
++ua;
U();
});
},
});
});
}
Y = ca.masterToken;
sa = ca.keyResponseData;
if (!sa) return null;
pa = sa.keyExchangeScheme;
ta = ba.getKeyExchangeFactory(pa);
if (!ta) throw new Nb(V.KEYX_FACTORY_NOT_FOUND, pa);
ua = 0;
U();
});
}
$e = Sd.extend({
init: function (ba, ca, ia, fa, U, Y, sa) {
var pa;
pa = this;
db(
sa,
function () {
var aa;
function ta() {
pa._ready = !0;
pa._readyQueue.add(!0);
}
function Ca(da, oa) {
var Ia;
try {
Ia = oa.masterToken;
da.getTokenFactory().isMasterTokenRevoked(da, Ia, {
result: function (Fa) {
Fa
? ((pa._errored = new Fc(Fa, Ia)
.setUser(oa.userIdToken)
.setUser(oa.userAuthenticationData)
.setMessageId(oa.messageId)),
ta())
: ua(da, oa);
},
error: function (Fa) {
Fa instanceof cb &&
(Fa.setEntity(oa.masterToken),
Fa.setUser(oa.userIdToken),
Fa.setUser(oa.userAuthenticationData),
Fa.setMessageId(oa.messageId));
pa._errored = Fa;
ta();
},
});
} catch (Fa) {
Fa instanceof cb &&
(Fa.setEntity(oa.masterToken),
Fa.setUser(oa.userIdToken),
Fa.setUser(oa.userAuthenticationData),
Fa.setMessageId(oa.messageId));
pa._errored = Fa;
ta();
}
}
function ua(da, oa) {
var Ia, Fa;
try {
Ia = oa.masterToken;
Fa = oa.userIdToken;
Fa
? da.getTokenFactory().isUserIdTokenRevoked(da, Ia, Fa, {
result: function (Pa) {
Pa
? ((pa._errored = new MslUserIdTokenException(Pa, Fa)
.setEntity(Ia)
.setUser(Fa)
.setMessageId(oa.messageId)),
ta())
: qa(da, oa);
},
error: function (Pa) {
Pa instanceof cb &&
(Pa.setEntity(oa.masterToken),
Pa.setUser(oa.userIdToken),
Pa.setUser(oa.userAuthenticationData),
Pa.setMessageId(oa.messageId));
pa._errored = Pa;
ta();
},
})
: qa(da, oa);
} catch (Pa) {
Pa instanceof cb &&
(Pa.setEntity(oa.masterToken),
Pa.setUser(oa.userIdToken),
Pa.setUser(oa.userAuthenticationData),
Pa.setMessageId(oa.messageId));
pa._errored = Pa;
ta();
}
}
function qa(da, oa) {
var Ia;
try {
Ia = oa.masterToken;
Ia.isExpired()
? oa.isRenewable() && 0 != oa.keyRequestData.length
? da.getTokenFactory().isMasterTokenRenewable(da, Ia, {
result: function (Fa) {
Fa
? ((pa._errored = new Ib(Fa, 'Master token is expired and not renewable.')
.setEntity(Ia)
.setUser(oa.userIdToken)
.setUser(oa.userAuthenticationData)
.setMessageId(oa.messageId)),
ta())
: W(da, oa);
},
error: function (Fa) {
Fa instanceof cb &&
(Fa.setEntity(oa.masterToken),
Fa.setUser(oa.userIdToken),
Fa.setUser(oa.userAuthenticationData),
Fa.setMessageId(oa.messageId));
pa._errored = Fa;
ta();
},
})
: ((pa._errored = new Ib(V.MESSAGE_EXPIRED, JSON.stringify(oa))
.setEntity(Ia)
.setUser(oa.userIdToken)
.setUser(oa.userAuthenticationData)
.setMessageId(oa.messageId)),
ta())
: W(da, oa);
} catch (Fa) {
Fa instanceof cb &&
(Fa.setEntity(oa.masterToken),
Fa.setUser(oa.userIdToken),
Fa.setUser(oa.userAuthenticationData),
Fa.setMessageId(oa.messageId));
pa._errored = Fa;
ta();
}
}
function W(da, oa) {
var Ia, Fa;
try {
Ia = oa.masterToken;
Fa = oa.nonReplayableId;
'number' === typeof Fa
? Ia
? da.getTokenFactory().acceptNonReplayableId(da, Ia, Fa, {
result: function (Pa) {
Pa ||
(pa._errored = new Ib(V.MESSAGE_REPLAYED, JSON.stringify(oa))
.setEntity(Ia)
.setUser(oa.userIdToken)
.setUser(oa.userAuthenticationData)
.setMessageId(oa.messageId));
ta();
},
error: function (Pa) {
Pa instanceof cb &&
(Pa.setEntity(Ia),
Pa.setUser(oa.userIdToken),
Pa.setUser(oa.userAuthenticationData),
Pa.setMessageId(oa.messageId));
pa._errored = Pa;
ta();
},
})
: ((pa._errored = new Ib(V.INCOMPLETE_NONREPLAYABLE_MESSAGE, JSON.stringify(oa))
.setEntity(oa.entityAuthenticationData)
.setUser(oa.userIdToken)
.setUser(oa.userAuthenticationData)
.setMessageId(oa.messageId)),
ta())
: ta();
} catch (Pa) {
Pa instanceof cb &&
(Pa.setEntity(oa.masterToken),
Pa.setEntity(oa.entityAuthenticationData),
Pa.setUser(oa.userIdToken),
Pa.setUser(oa.userAuthenticationData),
Pa.setMessageId(oa.messageId));
pa._errored = Pa;
ta();
}
}
aa = {
_source: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
_parser: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
_charset: { value: ia, writable: !1, enumerable: !1, configurable: !1 },
_remainingData: { value: '', writable: !0, enumerable: !1, configurable: !1 },
_timeout: { value: Y, writable: !1, enumerable: !1, configurable: !1 },
_header: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
_cryptoContext: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
_keyxCryptoContext: { value: Ab, 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 Xc(), 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, aa);
De(pa._source, Y, {
result: function (da) {
pa._json = da;
pa._jsonIndex = 0;
null === pa._json
? ((pa._errored = new xb(V.MESSAGE_DATA_MISSING)), ta())
: Ke(ba, pa._json[pa._jsonIndex++], U, {
result: function (oa) {
var Ia;
pa._header = oa;
if (pa._header instanceof Bc)
(pa._keyxCryptoContext = null), (pa._cryptoContext = null), ta();
else {
Ia = pa._header;
ha(ba, Ia, fa, {
result: function (Fa) {
var Pa;
try {
pa._keyxCryptoContext = Fa;
ba.isPeerToPeer() || !pa._keyxCryptoContext
? (pa._cryptoContext = Ia.cryptoContext)
: (pa._cryptoContext = pa._keyxCryptoContext);
try {
Pa = Ia.masterToken;
Pa && (ba.isPeerToPeer() || Pa.isVerified()) ? Ca(ba, Ia) : W(ba, Ia);
} catch (Ra) {
Ra instanceof cb &&
(Ra.setEntity(Ia.masterToken),
Ra.setUser(Ia.userIdToken),
Ra.setUser(Ia.userAuthenticationData),
Ra.setMessageId(Ia.messageId));
pa._errored = Ra;
ta();
}
} catch (Ra) {
Ra instanceof cb &&
(Ra.setEntity(Ia.masterToken),
Ra.setEntity(Ia.entityAuthenticationData),
Ra.setUser(Ia.userIdToken),
Ra.setUser(Ia.userAuthenticationData),
Ra.setMessageId(Ia.messageId));
pa._errored = Ra;
ta();
}
},
error: function (Fa) {
Fa instanceof cb &&
(Fa.setEntity(Ia.masterToken),
Fa.setEntity(Ia.entityAuthenticationData),
Fa.setUser(Ia.userIdToken),
Fa.setUser(Ia.userAuthenticationData),
Fa.setMessageId(Ia.messageId));
pa._errored = Fa;
ta();
},
});
}
},
error: function (oa) {
pa._errored = oa;
ta();
},
});
},
timeout: function () {
pa._timedout = !0;
ta();
},
error: function (da) {
pa._errored = da;
ta();
},
});
return this;
},
pa
);
},
nextData: function (ba, ca) {
var ia;
ia = this;
db(
ca,
function () {
var U;
function fa(Y) {
db(
Y,
function () {
var sa;
if (this._jsonIndex < this._json.length) return (sa = this._json[this._jsonIndex++]);
De(this._source, this._timeout, {
result: function (pa) {
pa && pa.length && 0 < pa.length
? (pa.forEach(function (ta) {
this._json.push(ta);
}),
fa(Y))
: ((this._eom = !0), Y.result(null));
},
timeout: function () {
Y.timeout();
},
error: function (pa) {
Y.error(pa);
},
});
},
ia
);
}
U = this.getMessageHeader();
if (!U) throw new ub('Read attempted with error message.');
if (-1 != this._payloadIndex && this._payloadIndex < this._payloads.length)
return this._payloads[this._payloadIndex++];
if (this._eom) return null;
fa({
result: function (Y) {
db(
ca,
function () {
if (!Y) return null;
if ('object' !== typeof Y) throw new xb(V.MESSAGE_FORMAT_ERROR);
We(Y, this._cryptoContext, {
result: function (sa) {
db(
ca,
function () {
var pa, ta, Ca, ua;
pa = U.masterToken;
ta = U.entityAuthenticationData;
Ca = U.userIdToken;
ua = U.getUserAuthenticationData;
if (sa.messageId != U.messageId)
throw new Ib(
V.PAYLOAD_MESSAGE_ID_MISMATCH,
'payload mid ' + sa.messageId + ' header mid ' + U.messageId
)
.setEntity(pa)
.setEntity(ta)
.setUser(Ca)
.setUser(ua);
if (sa.sequenceNumber != this._payloadSequenceNumber)
throw new Ib(
V.PAYLOAD_SEQUENCE_NUMBER_MISMATCH,
'payload seqno ' +
sa.sequenceNumber +
' expected seqno ' +
this._payloadSequenceNumber
)
.setEntity(pa)
.setEntity(ta)
.setUser(Ca)
.setUser(ua);
++this._payloadSequenceNumber;
sa.isEndOfMessage() && (this._eom = !0);
pa = sa.data;
this._payloads.push(pa);
this._payloadIndex = -1;
return pa;
},
ia
);
},
error: function (sa) {
sa instanceof SyntaxError && (sa = new xb(V.JSON_PARSE_ERROR, 'payloadchunk', sa));
ca.error(sa);
},
});
},
ia
);
},
timeout: function () {
ca.timeout();
},
error: function (Y) {
ca.error(Y);
},
});
},
ia
);
},
isReady: function (ba, ca) {
var fa;
function ia() {
db(
ca,
function () {
if (this._aborted) return !1;
if (this._timedout) ca.timeout();
else {
if (this._errored) throw this._errored;
return !0;
}
},
fa
);
}
fa = this;
db(
ca,
function () {
this._ready
? ia()
: this._readyQueue.poll(ba, {
result: function (U) {
db(
ca,
function () {
if (U === Ab) return !1;
ia();
},
fa
);
},
timeout: function () {
ca.timeout();
},
error: function (U) {
ca.error(U);
},
});
},
fa
);
},
getMessageHeader: function () {
return this._header instanceof ad ? this._header : null;
},
getErrorHeader: function () {
return this._header instanceof Bc ? this._header : null;
},
getIdentity: function () {
var ba, ca;
ba = this.getMessageHeader();
if (ba) {
ca = ba.masterToken;
return ca ? ca.identity : ba.entityAuthenticationData.getIdentity();
}
return this.getErrorHeader().entityAuthenticationData.getIdentity();
},
getCustomer: function () {
var ba;
ba = this.getMessageHeader();
return ba ? ba.customer : null;
},
getPayloadCryptoContext: function () {
return this._cryptoContext;
},
getKeyExchangeCryptoContext: function () {
return this._keyxCryptoContext;
},
closeSource: function (ba) {
this._closeSource = ba;
},
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 (ba, ca, ia) {
var U;
function fa() {
db(
ia,
function () {
var sa, pa, ta, Ca;
function Y(ua) {
db(
ua,
function () {
var qa, W, aa;
if (pa && Ca >= pa.length) return pa.subarray(0, Ca);
qa = -1;
if (this._currentPayload) {
W = this._currentPayload.length - this._payloadOffset;
if (!pa) {
aa = W;
if (-1 != this._payloadIndex)
for (var da = this._payloadIndex; da < this._payloads.length; ++da) {
aa += this._payloads[da].length;
}
0 < aa && (pa = new Uint8Array(aa));
}
W = Math.min(W, pa ? pa.length - Ca : 0);
0 < W &&
((qa = this._currentPayload.subarray(this._payloadOffset, this._payloadOffset + W)),
pa.set(qa, ta),
(qa = W),
(ta += W),
(this._payloadOffset += W));
}
-1 != qa
? ((Ca += qa), Y(ua))
: this.nextData(ca, {
result: function (oa) {
db(
ua,
function () {
if (this._aborted) return pa ? pa.subarray(0, Ca) : new Uint8Array(0);
this._currentPayload = oa;
this._payloadOffset = 0;
if (this._currentPayload) Y(ua);
else return 0 == Ca && 0 != ba ? null : pa ? pa.subarray(0, Ca) : new Uint8Array(0);
},
U
);
},
timeout: function () {
ua.timeout(pa ? pa.subarray(0, Ca) : new Uint8Array(0));
},
error: function (oa) {
db(
ua,
function () {
oa instanceof cb && (oa = new Tb('Error reading the payload chunk.', oa));
if (0 < Ca) return (U._readException = oa), pa.subarray(0, Ca);
throw oa;
},
U
);
},
});
},
U
);
}
if (this._aborted) return new Uint8Array(0);
if (this._timedout) ia.timeout(new Uint8Array(0));
else {
if (this._errored) throw this._errored;
if (null != this._readException) {
sa = this._readException;
this._readException = null;
throw sa;
}
pa = -1 != ba ? new Uint8Array(ba) : Ab;
ta = 0;
Ca = 0;
Y(ia);
}
},
U
);
}
U = this;
db(
ia,
function () {
if (-1 > ba) throw new RangeError('read requested with illegal length ' + ba);
this._ready
? fa()
: this._readyQueue.poll(ca, {
result: function (Y) {
Y === Ab ? ia.result(!1) : fa();
},
timeout: function () {
ia.timeout(new Uint8Array(0));
},
error: function (Y) {
ia.error(Y);
},
});
},
U
);
},
reset: function () {
this._payloadIndex = 0;
0 < this._payloads.length
? ((this._currentPayload = this._payloads[this._payloadIndex++]), (this._payloadOffset = this._markOffset))
: (this._currentPayload = null);
},
});
af = function (ba, ca, ia, fa, U, Y, sa) {
new $e(ba, ca, ia, fa, U, Y, sa);
};
})();
(function () {
bf = sd.extend({
init: function (ha, ba, ca, ia, fa, U, Y) {
var sa;
sa = this;
db(
Y,
function () {
var ta, Ca, ua;
function pa() {
sa._ready = !0;
sa._readyQueue.add(!0);
}
ta = Yd(ha.getMessageCapabilities(), ia.messageCapabilities);
Ca = null;
ta && (Ca = se(ta.compressionAlgorithms));
ta = {
_destination: { value: ba, writable: !1, enumerable: !1, configurable: !1 },
_charset: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
_capabilities: { value: ta, writable: !1, enumerable: !1, configurable: !1 },
_header: { value: ia, writable: !1, enumerable: !1, configurable: !1 },
_compressionAlgo: { value: Ca, writable: !0, enumerable: !1, configurable: !1 },
_cryptoContext: { value: fa, 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 Xc(), 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, ta);
ua = Qb(JSON.stringify(ia), ca);
ba.write(ua, 0, ua.length, U, {
result: function (qa) {
try {
sa._aborted
? pa()
: qa < ua.length
? ((sa._timedout = !0), pa())
: ba.flush(U, {
result: function (W) {
sa._aborted || (sa._timedout = !W);
pa();
},
timeout: function () {
sa._timedout = !0;
pa();
},
error: function (W) {
sa._errored = W;
pa();
},
});
} catch (W) {
sa._errored = W;
pa();
}
},
timeout: function () {
sa._timedout = !0;
pa();
},
error: function (qa) {
sa._errored = qa;
pa();
},
});
return this;
},
sa
);
},
setCompressionAlgorithm: function (ha, ba, ca) {
var fa;
function ia() {
fa.flush(ba, {
result: function (U) {
db(
ca,
function () {
if (!U) throw new Tb('flush() aborted');
this._compressionAlgo = ha;
return !0;
},
fa
);
},
timeout: function () {
ca.timeout();
},
error: function (U) {
ca.error(U);
},
});
}
fa = this;
db(
ca,
function () {
if (!this.getMessageHeader()) throw new ub('Cannot write payload data for an error message.');
if (this._compressionAlgo == ha) return !0;
if (ha) {
if (!this._capabilities) return !1;
for (var U = this._capabilities.compressionAlgorithms, Y = 0; Y < U.length; ++Y) {
if (U[Y] == ha) {
ia();
return;
}
}
return !1;
}
ia();
},
fa
);
},
getMessageHeader: function () {
return this._header instanceof ad ? this._header : null;
},
getErrorMessage: function () {
return this._header instanceof Bc ? this._header : null;
},
getPayloads: function () {
return this._payloads;
},
abort: function () {
this._aborted = !0;
this._destination.abort();
this._readyQueue.cancelAll();
},
close: function (ha, ba) {
var ca;
ca = this;
db(
ba,
function () {
if (this._aborted) return !1;
if (this._timedout) ba.timeout();
else {
if (this._errored) throw this._errored;
if (this._closed) return !0;
this._closed = !0;
this.flush(ha, {
result: function (ia) {
db(
ba,
function () {
ia && (this._currentPayload = null);
return ia;
},
ca
);
},
timeout: function () {
ba.timeout();
},
error: function (ia) {
ba.error(ia);
},
});
}
},
ca
);
},
flush: function (ha, ba) {
var ia;
function ca() {
db(
ba,
function () {
var fa, U, ta;
if (this._aborted) return !1;
if (this._timedout) ba.timeout();
else {
if (this._errored) throw this._errored;
if (!this._currentPayload || (!this._closed && 0 == this._currentPayload.length)) return !0;
fa = this.getMessageHeader();
if (!fa) return !0;
U = 0;
this._currentPayload &&
this._currentPayload.forEach(function (Ca) {
U += Ca.length;
});
for (
var Y = new Uint8Array(U), sa = 0, pa = 0;
this._currentPayload && pa < this._currentPayload.length;
++pa
) {
ta = this._currentPayload[pa];
Y.set(ta, sa);
sa += ta.length;
}
Ve(
this._payloadSequenceNumber,
fa.messageId,
this._closed,
this._compressionAlgo,
Y,
this._cryptoContext,
{
result: function (Ca) {
db(
ba,
function () {
var ua;
this._payloads.push(Ca);
ua = Qb(JSON.stringify(Ca), this._charset);
this._destination.write(ua, 0, ua.length, ha, {
result: function (qa) {
db(
ba,
function () {
if (this._aborted) return !1;
qa < Ca.length
? ba.timeout()
: this._destination.flush(ha, {
result: function (W) {
db(
ba,
function () {
if (this._aborted) return !1;
if (W)
return (
++this._payloadSequenceNumber,
(this._currentPayload = this._closed ? null : []),
!0
);
ba.timeout();
},
ia
);
},
timeout: function () {
ba.timeout();
},
error: function (W) {
W instanceof cb &&
(W = new Tb(
'Error encoding payload chunk [sequence number ' +
ia._payloadSequenceNumber +
'].',
W
));
ba.error(W);
},
});
},
ia
);
},
timeout: function (qa) {
ba.timeout();
},
error: function (qa) {
qa instanceof cb &&
(qa = new Tb(
'Error encoding payload chunk [sequence number ' + ia._payloadSequenceNumber + '].',
qa
));
ba.error(qa);
},
});
},
ia
);
},
error: function (Ca) {
Ca instanceof cb &&
(Ca = new Tb(
'Error encoding payload chunk [sequence number ' + ia._payloadSequenceNumber + '].',
Ca
));
ba.error(Ca);
},
}
);
}
},
ia
);
}
ia = this;
db(
ba,
function () {
this._ready
? ca()
: this._readyQueue.poll(ha, {
result: function (fa) {
fa === Ab ? ba.result(!1) : ca();
},
timeout: function () {
ba.timeout();
},
error: function (fa) {
ba.error(fa);
},
});
},
ia
);
},
write: function (ha, ba, ca, ia, fa) {
db(
fa,
function () {
var U;
if (this._aborted) return !1;
if (this._timedout) fa.timeout();
else {
if (this._errored) throw this._errored;
if (this._closed) throw new Tb('Message output stream already closed.');
if (0 > ba) throw new RangeError('Offset cannot be negative.');
if (0 > ca) throw new RangeError('Length cannot be negative.');
if (ba + ca > ha.length)
throw new RangeError('Offset plus length cannot be greater than the array length.');
if (!this.getMessageHeader()) throw new ub('Cannot write payload data for an error message.');
U = ha.subarray(ba, ba + ca);
this._currentPayload.push(U);
return U.length;
}
},
this
);
},
});
yd = function (ha, ba, ca, ia, fa, U, Y) {
new bf(ha, ba, ca, ia, fa, U, Y);
};
})();
Nf = Bb.Class.create({ sentHeader: function (ha) {}, receivedHeader: function (ha) {} });
Object.freeze({ USERDATA_REAUTH: Ka.USERDATA_REAUTH, SSOTOKEN_REJECTED: Ka.SSOTOKEN_REJECTED });
cf = Bb.Class.create({
getCryptoContexts: function () {},
getRecipient: function () {},
isEncrypted: function () {},
isIntegrityProtected: function () {},
isNonReplayable: function () {},
isRequestingTokens: function () {},
getUserId: function () {},
getUserAuthData: function (ha, ba, ca, ia) {},
getCustomer: function () {},
getKeyRequestData: function (ha) {},
updateServiceTokens: function (ha, ba, ca) {},
write: function (ha, ba, ca) {},
getDebugContext: function () {},
});
Bb.Class.create({ getInputStream: function (ha) {}, getOutputStream: function (ha) {} });
(function () {
var sa, pa, ta, Ca, ua, qa, W, aa, da, oa, Ia, Fa;
function ha(Pa) {
return function () {
Pa.abort();
};
}
function ba(Pa, Ra) {
Object.defineProperties(this, {
masterToken: { value: Pa, writable: !1, configurable: !1 },
ticket: { value: Ra, writable: !1, configurable: !1 },
});
}
function ca(Pa, Ra) {
Object.defineProperties(this, {
builder: { value: Pa, writable: !1, configurable: !1 },
msgCtx: { value: Ra, writable: !1, configurable: !1 },
});
}
function ia(Pa, Ra, ka) {
Object.defineProperties(this, {
requestHeader: { value: Pa, writable: !1, configurable: !1 },
payloads: { value: Ra, writable: !1, configurable: !1 },
handshake: { value: ka, writable: !1, configurable: !1 },
});
}
function fa(Pa, Ra) {
Object.defineProperties(this, {
requestHeader: { value: Ra.requestHeader, writable: !1, configurable: !1 },
payloads: { value: Ra.payloads, writable: !1, configurable: !1 },
handshake: { value: Ra.handshake, writable: !1, configurable: !1 },
response: { value: Pa, writable: !1, configurable: !1 },
});
}
function U(Pa) {
for (; Pa; ) {
if (Pa instanceof Zb) return !0;
Pa = Pa instanceof cb ? Pa.cause : Ab;
}
return !1;
}
function Y(Pa, Ra, ka, xa, ya, Ja, Ba, Oa, Ga) {
Ye(Ra, xa, ya, Ja, {
result: function (Ua) {
ka && ka.sentHeader(Ua);
yd(Ra, Ba, Kb, Ua, null, null, Oa, {
result: function (ab) {
Pa.setAbort(function () {
ab.abort();
});
ab.close(Oa, {
result: function (Xa) {
db(Ga, function () {
if (!Xa) throw new Zb('sendError aborted.');
return Xa;
});
},
timeout: function () {
Ga.timeout();
},
error: function (Xa) {
Ga.error(Xa);
},
});
},
timeout: function () {},
error: function (ab) {
Ga.error(ab);
},
});
},
error: function (Ua) {
Ga.error(Ua);
},
});
}
sa = sd.extend({
close: function (Pa, Ra) {
Ra.result(!0);
},
write: function (Pa, Ra, ka, xa, ya) {
La(ya, function () {
return Math.min(Pa.length - Ra, ka);
});
},
flush: function (Pa, Ra) {
Ra.result(!0);
},
});
pa = Mf.extend({
getUserMessage: function (Pa, Ra) {
return null;
},
});
ta = cf.extend({
init: function (Pa) {
Object.defineProperties(this, { _appCtx: { value: Pa, 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 (Pa, Ra, ka, xa) {
this._appCtx.getUserAuthData(Pa, Ra, ka, xa);
},
getCustomer: function () {
return this._appCtx.getCustomer();
},
getKeyRequestData: function (Pa) {
this._appCtx.getKeyRequestData(Pa);
},
updateServiceTokens: function (Pa, Ra, ka) {
this._appCtx.updateServiceTokens(Pa, Ra, ka);
},
write: function (Pa, Ra, ka) {
this._appCtx.write(Pa, Ra, ka);
},
getDebugContext: function () {
return this._appCtx.getDebugContext();
},
});
Ca = ta.extend({
init: function xa(Ra, ka) {
xa.base.call(this, ka);
Object.defineProperties(this, { _payloads: { value: Ra, writable: !1, enumerable: !1, configurable: !1 } });
},
write: function (Ra, ka, xa) {
var Ja;
function ya(Ba, Oa) {
var Ga;
if (Ba == Ja._payloads.length) xa.result(!0);
else {
Ga = Ja._payloads[Ba];
Ra.setCompressionAlgorithm(Ga.compressionAlgo, ka, {
result: function (Ua) {
Ra.write(Ga.data, 0, Ga.data.length, ka, {
result: function (ab) {
db(
xa,
function () {
Ga.isEndOfMessage()
? ya(Ba + 1, Oa)
: Ra.flush(ka, {
result: function (Xa) {
xa.result(Xa);
},
timeout: function () {
xa.timeout();
},
error: function (Xa) {
xa.error(Xa);
},
});
},
Ja
);
},
timeout: function (ab) {
xa.timeout(ab);
},
error: function (ab) {
xa.error(ab);
},
});
},
timeout: function () {},
error: function (Ua) {
xa.error(Ua);
},
});
}
}
Ja = this;
ya(0);
},
});
ua = ta.extend({
init: function xa(ka) {
xa.base.call(this, ka);
},
isEncrypted: function () {
return !1;
},
isNonReplayable: function () {
return !1;
},
write: function (ka, xa, ya) {
ya.result(!0);
},
});
qa = {};
W = Bb.Class.create({
init: function (ka) {
ka || (ka = new pa());
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: ka, writable: !1, enumerable: !1, configurable: !1 },
});
},
setFilterFactory: function (ka) {
this._filterFactory = ka;
},
getNewestMasterToken: function (ka, xa, ya, Ja) {
var Ba;
Ba = this;
db(
Ja,
function () {
var Oa, Ga, Ua, ab, Xa;
Oa = xa.getMslStore();
Ga = Oa.getMasterToken();
if (!Ga) return null;
Ua = Ga.uniqueKey();
ab = this._masterTokenLocks[Ua];
ab || ((ab = new Hd()), (this._masterTokenLocks[Ua] = ab));
Xa = ab.readLock(ya, {
result: function (jb) {
db(
Ja,
function () {
var mb;
if (jb === Ab) throw new Zb('getNewestMasterToken aborted.');
mb = Oa.getMasterToken();
if (Ga.equals(mb)) return new ba(Ga, jb);
ab.unlock(jb);
ab.writeLock(ya, {
result: function (nb) {
db(
Ja,
function () {
if (nb === Ab) throw new Zb('getNewestMasterToken aborted.');
delete this._masterTokenLocks[Ua];
ab.unlock(nb);
return this.getNewestMasterToken(ka, xa, ya, Ja);
},
Ba
);
},
timeout: function () {
Ja.timeout();
},
error: function (nb) {
Ja.error(nb);
},
});
},
Ba
);
},
timeout: function () {
Ja.timeout();
},
error: function (jb) {
Ja.error(jb);
},
});
ka.setAbort(function () {
Xa && (ab.cancel(Xa), (Xa = Ab));
});
},
Ba
);
},
deleteMasterToken: function (ka, xa) {
var ya;
if (xa) {
ya = this;
setTimeout(function () {
var Ja, Ba;
Ja = xa.uniqueKey();
Ba = ya._masterTokenLocks[Ja];
Ba || ((Ba = new Hd()), (ya._masterTokenLocks[Ja] = Ba));
Ba.writeLock(-1, {
result: function (Oa) {
ka.getMslStore().removeCryptoContext(xa);
delete ya._masterTokenLocks[Ja];
Ba.unlock(Oa);
},
timeout: function () {
throw new ub('Unexpected timeout received.');
},
error: function (Oa) {
throw Oa;
},
});
}, 0);
}
},
releaseMasterToken: function (ka) {
var xa;
if (ka && ka.masterToken) {
xa = ka.masterToken.uniqueKey();
xa = this._masterTokenLocks[xa];
if (!xa) throw new ub('Master token read/write lock does not exist when it should.');
xa.unlock(ka.ticket);
}
},
updateOutgoingCryptoContexts: function (ka, xa, ya) {
var Ja;
Ja = ka.getMslStore();
!ka.isPeerToPeer() &&
ya &&
(Ja.setCryptoContext(ya.keyResponseData.masterToken, ya.cryptoContext),
this.deleteMasterToken(ka, xa.masterToken));
},
updateIncomingCryptoContexts: function (ka, xa, ya) {
var Ja, Ba;
Ja = ya.getMessageHeader();
if (Ja) {
Ba = ka.getMslStore();
if ((Ja = Ja.keyResponseData))
Ba.setCryptoContext(Ja.masterToken, ya.getKeyExchangeCryptoContext()),
this.deleteMasterToken(ka, xa.masterToken);
}
},
storeServiceTokens: function (ka, xa, ya, Ja) {
var Ga, Ua;
ka = ka.getMslStore();
for (var Ba = [], Oa = 0; Oa < Ja.length; ++Oa) {
Ga = Ja[Oa];
if (!Ga.isBoundTo(xa) || !xa.isVerified()) {
Ua = Ga.data;
Ua && 0 == Ua.length
? ka.removeServiceTokens(
Ga.name,
Ga.isMasterTokenBound() ? xa : null,
Ga.isUserIdTokenBound() ? ya : null
)
: Ba.push(Ga);
}
}
0 < Ba.length && ka.addServiceTokens(Ba);
},
buildRequest: function (ka, xa, ya, Ja, Ba) {
var Oa;
Oa = this;
this.getNewestMasterToken(ka, xa, Ja, {
result: function (Ga) {
La(
Ba,
function () {
var Ua, ab, Xa;
Ua = Ga && Ga.masterToken;
if (Ua) {
ab = ya.getUserId();
Xa = xa.getMslStore();
ab = (ab = ab ? Xa.getUserIdToken(ab) : null) && ab.isBoundTo(Ua) ? ab : null;
} else ab = null;
Kc(xa, Ua, ab, null, {
result: function (jb) {
La(Ba, function () {
jb.setNonReplayable(ya.isNonReplayable());
return { builder: jb, tokenTicket: Ga };
});
},
error: function (jb) {
La(
Ba,
function () {
this.releaseMasterToken(Ga);
jb instanceof cb &&
(jb = new ub('User ID token not bound to master token despite internal check.', jb));
throw jb;
},
Oa
);
},
});
},
Oa
);
},
timeout: function () {
Ba.timeout();
},
error: function (Ga) {
Ba.error(Ga);
},
});
},
buildResponse: function (ka, xa, ya, Ja, Ba, Oa) {
var Ga;
Ga = this;
Xe(xa, Ja, {
result: function (Ua) {
db(
Oa,
function () {
Ua.setNonReplayable(ya.isNonReplayable());
if (!xa.isPeerToPeer() && !Ja.keyResponseData) return { builder: Ua, tokenTicket: null };
this.getNewestMasterToken(ka, xa, Ba, {
result: function (ab) {
db(
Oa,
function () {
var Xa, jb, mb;
Xa = ab && ab.masterToken;
if (Xa) {
jb = ya.getUserId();
mb = xa.getMslStore();
jb = (jb = jb ? mb.getUserIdToken(jb) : null) && jb.isBoundTo(Xa) ? jb : null;
} else jb = null;
Ua.setAuthTokens(Xa, jb);
return { builder: Ua, tokenTicket: ab };
},
Ga
);
},
timeout: function () {
Oa.timeout();
},
error: function (ab) {
Oa.error(ab);
},
});
},
Ga
);
},
error: function (Ua) {
Oa.error(Ua);
},
});
},
buildErrorResponse: function (ka, xa, ya, Ja, Ba, Oa, Ga) {
var Xa;
function Ua(jb, mb) {
db(
Ga,
function () {
var nb, qb;
nb = Jc(Ba.messageId);
qb = new Ca(mb, ya);
Kc(xa, null, null, nb, {
result: function (rb) {
db(
Ga,
function () {
xa.isPeerToPeer() && rb.setPeerAuthTokens(jb.peerMasterToken, jb.peerUserIdToken);
rb.setNonReplayable(qb.isNonReplayable());
return { errorResult: new ca(rb, qb), tokenTicket: null };
},
Xa
);
},
error: function (rb) {
Ga.error(rb);
},
});
},
Xa
);
}
function ab(jb, mb) {
Xa.getNewestMasterToken(ka, xa, Oa, {
result: function (nb) {
db(
Ga,
function () {
var qb, rb, zb;
qb = nb && nb.masterToken;
rb = Jc(Ba.messageId);
zb = new Ca(mb, ya);
Kc(xa, qb, null, rb, {
result: function (wb) {
db(
Ga,
function () {
xa.isPeerToPeer() && wb.setPeerAuthTokens(jb.peerMasterToken, jb.peerUserIdToken);
wb.setNonReplayable(zb.isNonReplayable());
return { errorResult: new ca(wb, zb), tokenTicket: nb };
},
Xa
);
},
error: function (wb) {
Ga.error(wb);
},
});
},
Xa
);
},
timeout: function () {
Ga.timeout();
},
error: function (nb) {
Ga.error(nb);
},
});
}
Xa = this;
db(
Ga,
function () {
var jb, mb, nb, qb;
jb = Ja.requestHeader;
mb = Ja.payloads;
nb = Ba.errorCode;
switch (nb) {
case Ka.ENTITYDATA_REAUTH:
case Ka.ENTITY_REAUTH:
xa.getEntityAuthenticationData(nb, {
result: function (rb) {
db(
Ga,
function () {
if (!rb) return null;
Ua(jb, mb);
},
Xa
);
},
error: function (rb) {
Ga.error(rb);
},
});
break;
case Ka.USERDATA_REAUTH:
case Ka.SSOTOKEN_REJECTED:
ya.getUserAuthData(nb, !1, !0, {
result: function (rb) {
db(
Ga,
function () {
if (!rb) return null;
ab(jb, mb);
},
Xa
);
},
error: function (rb) {
Ga.error(rb);
},
});
break;
case Ka.USER_REAUTH:
ab(jb, mb);
break;
case Ka.KEYX_REQUIRED:
nb = Jc(Ba.messageId);
qb = new Ca(mb, ya);
Kc(xa, null, null, nb, {
result: function (rb) {
db(
Ga,
function () {
xa.isPeerToPeer() && rb.setPeerAuthTokens(jb.peerMasterToken, jb.peerUserIdToken);
rb.setRenewable(!0);
rb.setNonReplayable(qb.isNonReplayable());
return { errorResult: new ca(rb, qb), tokenTicket: null };
},
Xa
);
},
error: function (rb) {
Ga.error(rb);
},
});
break;
case Ka.EXPIRED:
this.getNewestMasterToken(ka, xa, Oa, {
result: function (rb) {
db(
Ga,
function () {
var zb, wb, u, b;
zb = rb && rb.masterToken;
wb = jb.userIdToken;
u = Jc(Ba.messageId);
b = new Ca(mb, ya);
Kc(
xa,
zb,
wb,
u,
{
result: function (a) {
db(
Ga,
function () {
xa.isPeerToPeer() && a.setPeerAuthTokens(jb.peerMasterToken, jb.peerUserIdToken);
jb.masterToken.equals(zb) && a.setRenewable(!0);
a.setNonReplayable(b.isNonReplayable());
return { errorResult: new ca(a, b), tokenTicket: rb };
},
Xa
);
},
error: function (a) {
Ga.error(a);
},
},
Xa
);
},
Xa
);
},
timeout: function () {
Ga.timeout();
},
error: function (rb) {
Ga.error(rb);
},
});
break;
case Ka.REPLAYED:
this.getNewestMasterToken(ka, xa, Oa, {
result: function (rb) {
db(
Ga,
function () {
var zb, wb, u, b;
zb = rb && rb.masterToken;
wb = jb.userIdToken;
u = Jc(Ba.messageId);
b = new Ca(mb, ya);
Kc(xa, zb, wb, u, {
result: function (a) {
db(
Ga,
function () {
xa.isPeerToPeer() && a.setPeerAuthTokens(jb.peerMasterToken, jb.peerUserIdToken);
jb.masterToken.equals(zb)
? (a.setRenewable(!0), a.setNonReplayable(!1))
: a.setNonReplayable(b.isNonReplayable());
return { errorResult: new ca(a, b), tokenTicket: rb };
},
Xa
);
},
error: function (a) {
Ga.error(a);
},
});
},
Xa
);
},
timeout: function () {
Ga.timeout();
},
error: function (rb) {
Ga.error(rb);
},
});
break;
default:
return null;
}
},
Xa
);
},
cleanupContext: function (ka, xa, ya) {
switch (ya.errorCode) {
case Ka.ENTITY_REAUTH:
this.deleteMasterToken(ka, xa.masterToken);
break;
case Ka.USER_REAUTH:
(ya = xa.userIdToken), xa.masterToken && ya && ka.getMslStore().removeUserIdToken(ya);
}
},
send: function (ka, xa, ya, Ja, Ba, Oa, Ga) {
var nb;
function Ua(qb, rb, zb) {
db(
Ga,
function () {
var wb;
wb = Ba.getPeerUserIdToken();
(!xa.isPeerToPeer() && !rb) || (xa.isPeerToPeer() && !wb)
? (wb = ya.getCustomer())
? Ba.setCustomer(wb, {
result: function (u) {
db(
Ga,
function () {
rb = Ba.getUserIdToken();
ab(qb, rb, zb);
},
nb
);
},
error: function (u) {
Ga.error(u);
},
})
: ab(qb, rb, zb)
: ab(qb, rb, zb);
},
nb
);
}
function ab(qb, rb, zb) {
db(
Ga,
function () {
var wb, u;
wb =
!zb &&
(!ya.isEncrypted() || Ba.willEncryptPayloads()) &&
(!ya.isIntegrityProtected() || Ba.willIntegrityProtectPayloads()) &&
(!ya.isNonReplayable() || (Ba.isNonReplayable() && qb));
wb || Ba.setNonReplayable(!1);
u = [];
Ba.isRenewable() && (!qb || qb.isRenewable() || ya.isNonReplayable())
? ya.getKeyRequestData({
result: function (b) {
db(
Ga,
function () {
var c;
for (var a = 0; a < b.length; ++a) {
c = b[a];
u.push(c);
Ba.addKeyRequestData(c);
}
Xa(qb, rb, wb, u);
},
nb
);
},
error: function (b) {
Ga.error(b);
},
})
: Xa(qb, rb, wb, u);
},
nb
);
}
function Xa(qb, rb, zb, wb) {
db(
Ga,
function () {
var u;
u = new Ze(xa, ya, Ba);
ya.updateServiceTokens(u, !zb, {
result: function (b) {
Ba.getHeader({
result: function (a) {
db(
Ga,
function () {
var c, h;
c = ya.getDebugContext();
c && c.sentHeader(a);
c = Ba.getKeyExchangeData();
this.updateOutgoingCryptoContexts(xa, a, c);
this.storeServiceTokens(xa, qb, rb, a.serviceTokens);
c = !xa.isPeerToPeer() && c ? c.cryptoContext : a.cryptoContext;
if (ka.isAborted()) throw new Zb('send aborted.');
h = null != this._filterFactory ? this._filterFactory.getOutputStream(Ja) : Ja;
yd(xa, h, Kb, a, c, Oa, {
result: function (k) {
ka.setAbort(function () {
k.abort();
});
jb(k, a, zb);
},
timeout: function () {
Ga.timeout();
},
error: function (k) {
Ga.error(k);
},
});
},
nb
);
},
timeout: function () {
Ga.timeout();
},
error: function (a) {
Ga.error(a);
},
});
},
error: function (b) {
Ga.error(b);
},
});
},
nb
);
}
function jb(qb, rb, zb) {
var wb, u;
if (zb)
ya.write(qb, Oa, {
result: function (b) {
db(
Ga,
function () {
if (ka.isAborted()) throw new Zb('MessageOutputStream write aborted.');
mb(qb, rb, zb);
},
nb
);
},
timeout: function () {
Ga.timeout();
},
error: function (b) {
Ga.error(b);
},
});
else {
wb = new sa();
u = new Sc();
yd(xa, wb, Kb, rb, u, Oa, {
result: function (b) {
ya.write(b, Oa, {
result: function (a) {
db(
Ga,
function () {
if (ka.isAborted()) throw new Zb('MessageOutputStream proxy write aborted.');
b.close(Oa, {
result: function (c) {
db(
Ga,
function () {
var h;
if (!c) throw new Zb('MessageOutputStream proxy close aborted.');
h = b.getPayloads();
mb(qb, rb, zb, h);
},
nb
);
},
timeout: function () {
Ga.timeout();
},
error: function (c) {
Ga.error(c);
},
});
},
nb
);
},
timeout: function () {
Ga.timeout();
},
error: function (a) {
Ga.error(a);
},
});
},
timeout: function () {
Ga.timeout();
},
error: function (b) {
Ga.error(b);
},
});
}
}
function mb(qb, rb, zb, wb) {
qb.close(Oa, {
result: function (u) {
db(
Ga,
function () {
if (!u) throw new Zb('MessageOutputStream close aborted.');
wb || (wb = qb.getPayloads());
return new ia(rb, wb, !zb);
},
nb
);
},
timeout: function () {
Ga.timeout();
},
error: function (u) {
Ga.error(u);
},
});
}
nb = this;
db(
Ga,
function () {
var qb, rb, zb, wb;
qb = Ba.getMasterToken();
rb = Ba.getUserIdToken();
zb = !1;
if (ya.getUserId()) {
wb = !rb;
ya.getUserAuthData(null, Ba.isRenewable(), wb, {
result: function (u) {
db(
Ga,
function () {
u &&
(Ba.willEncryptHeader() && Ba.willIntegrityProtectHeader()
? Ba.setUserAuthenticationData(u)
: (zb = !0));
Ua(qb, rb, zb);
},
nb
);
},
error: function (u) {
Ga.error(u);
},
});
} else Ua(qb, rb, zb);
},
nb
);
},
receive: function (ka, xa, ya, Ja, Ba, Oa, Ga) {
var Ua;
Ua = this;
db(
Ga,
function () {
var ab, Xa, jb;
if (ka.isAborted()) throw new Zb('receive aborted.');
ab = [];
Ba &&
(ab = Ba.keyRequestData.filter(function () {
return !0;
}));
Xa = ya.getCryptoContexts();
jb = this._filterFactory ? this._filterFactory.getInputStream(Ja) : Ja;
af(xa, jb, Kb, ab, Xa, Oa, {
result: function (mb) {
ka.setAbort(function () {
mb.abort();
});
mb.isReady(Oa, {
result: function (nb) {
db(
Ga,
function () {
var qb, rb, zb, wb;
if (!nb) throw new Zb('MessageInputStream aborted.');
qb = mb.getMessageHeader();
rb = mb.getErrorHeader();
zb = ya.getDebugContext();
zb && zb.receivedHeader(qb ? qb : rb);
if (
Ba &&
((zb = rb ? rb.errorCode : null),
qb ||
(zb != Ka.FAIL &&
zb != Ka.TRANSIENT_FAILURE &&
zb != Ka.ENTITY_REAUTH &&
zb != Ka.ENTITYDATA_REAUTH))
) {
zb = qb ? qb.messageId : rb.messageId;
wb = Jc(Ba.messageId);
if (zb != wb)
throw new Ib(V.UNEXPECTED_RESPONSE_MESSAGE_ID, 'expected ' + wb + '; received ' + zb);
}
xa.getEntityAuthenticationData(null, {
result: function (u) {
db(
Ga,
function () {
var b, a, c, h;
b = u.getIdentity();
if (qb) {
a = qb.entityAuthenticationData;
c = qb.masterToken;
a = c ? qb.sender : a.getIdentity();
if ((c && c.isDecrypted() && c.identity != a) || b == a)
throw new Ib(V.UNEXPECTED_MESSAGE_SENDER, a);
Ba && this.updateIncomingCryptoContexts(xa, Ba, mb);
b = qb.keyResponseData;
xa.isPeerToPeer()
? ((b = b ? b.masterToken : qb.peerMasterToken),
(c = qb.peerUserIdToken),
(a = qb.peerServiceTokens))
: ((b = b ? b.masterToken : qb.masterToken),
(c = qb.userIdToken),
(a = qb.serviceTokens));
h = ya.getUserId();
h && c && !c.isVerified() && xa.getMslStore().addUserIdToken(h, c);
this.storeServiceTokens(xa, b, c, a);
} else if (((a = rb.entityAuthenticationData.getIdentity()), b == a))
throw new Ib(V.UNEXPECTED_MESSAGE_SENDER, a);
return mb;
},
Ua
);
},
error: Ga.error,
});
},
Ua
);
},
timeout: function () {
Ga.timeout();
},
error: function (nb) {
Ga.error(nb);
},
});
},
timeout: function () {
Ga.timeout();
},
error: function (mb) {
Ga.error(mb);
},
});
},
Ua
);
},
sendReceive: function (ka, xa, ya, Ja, Ba, Oa, Ga, Ua, ab) {
var jb;
function Xa(mb, nb) {
db(
ab,
function () {
Oa.setRenewable(nb);
this.send(ka, xa, ya, Ba, Oa, Ga, {
result: function (qb) {
db(
ab,
function () {
var rb;
rb = qb.requestHeader.keyRequestData;
Ua || qb.handshake || !rb.isEmpty()
? this.receive(ka, xa, ya, Ja, qb.requestHeader, Ga, {
result: function (zb) {
db(
ab,
function () {
nb && this.releaseRenewalLock(xa, mb, zb);
return new fa(zb, qb);
},
jb
);
},
timeout: function () {
db(
ab,
function () {
nb && this.releaseRenewalLock(xa, mb, null);
ab.timeout();
},
jb
);
},
error: function (zb) {
db(
ab,
function () {
nb && this.releaseRenewalLock(xa, mb, null);
throw zb;
},
jb
);
},
})
: db(
ab,
function () {
nb && this.releaseRenewalLock(xa, mb, null);
return new fa(null, qb);
},
jb
);
},
jb
);
},
timeout: function () {
db(
ab,
function () {
nb && this.releaseRenewalLock(xa, mb, null);
ab.timeout();
},
jb
);
},
error: function (qb) {
db(
ab,
function () {
nb && this.releaseRenewalLock(xa, mb, null);
throw qb;
},
jb
);
},
});
},
jb
);
}
jb = this;
db(
ab,
function () {
var mb;
mb = new Xc();
this.acquireRenewalLock(ka, xa, ya, mb, Oa, Ga, {
result: function (nb) {
Xa(mb, nb);
},
timeout: function () {
ab.timeout();
},
error: function (nb) {
nb instanceof Zb ? ab.result(null) : ab.error(nb);
},
});
},
jb
);
},
acquireRenewalLock: function (ka, xa, ya, Ja, Ba, Oa, Ga) {
var Xa;
function Ua(jb, mb, nb) {
db(
Ga,
function () {
var zb, wb;
if (ka.isAborted()) throw new Zb('acquireRenewalLock aborted.');
for (var qb = null, rb = 0; rb < this._renewingContexts.length; ++rb) {
zb = this._renewingContexts[rb];
if (zb.ctx === xa) {
qb = zb.queue;
break;
}
}
if (!qb) return this._renewingContexts.push({ ctx: xa, queue: Ja }), !0;
wb = qb.poll(Oa, {
result: function (u) {
db(
Ga,
function () {
var b;
if (u === Ab) throw new Zb('acquireRenewalLock aborted.');
qb.add(u);
if (u === qa || u.isExpired()) Ua(u, mb, nb);
else {
if ((nb && !mb) || (mb && !mb.isBoundTo(u))) {
b = xa.getMslStore().getUserIdToken(nb);
mb = b && b.isBoundTo(u) ? b : null;
}
Ba.setAuthTokens(u, mb);
Ba.isRenewable() && u.equals(jb)
? Ua(u, mb, nb)
: ya.isRequestingTokens() && !mb
? Ua(u, mb, nb)
: ab(u, mb);
}
},
Xa
);
},
timeout: function () {},
error: function (u) {},
});
ka.setAbort(function () {
wb && (qb.cancel(wb), (wb = Ab));
});
},
Xa
);
}
function ab(jb, mb) {
db(
Ga,
function () {
var rb;
if (ka.isAborted()) throw new Zb('acquireRenewalLock aborted.');
if (!jb || jb.isRenewable() || (!mb && ya.getUserId()) || (mb && mb.isRenewable())) {
for (var nb = null, qb = 0; qb < this._renewingContexts.length; ++qb) {
rb = this._renewingContexts[qb];
if (rb.ctx === xa) {
nb = rb.queue;
break;
}
}
if (!nb) return this._renewingContexts.push({ ctx: xa, queue: Ja }), !0;
}
return !1;
},
Xa
);
}
Xa = this;
db(
Ga,
function () {
var jb, mb, nb;
jb = Ba.getMasterToken();
mb = Ba.getUserIdToken();
nb = ya.getUserId();
(ya.isEncrypted() && !Ba.willEncryptPayloads()) ||
(ya.isIntegrityProtected() && !Ba.willIntegrityProtectPayloads()) ||
Ba.isRenewable() ||
(!jb && ya.isNonReplayable()) ||
(jb && jb.isExpired()) ||
!(mb || !nb || (Ba.willEncryptHeader() && Ba.willIntegrityProtectHeader())) ||
(ya.isRequestingTokens() && (!jb || (nb && !mb)))
? Ua(jb, mb, nb)
: ab(jb, mb);
},
Xa
);
},
releaseRenewalLock: function (ka, xa, ya) {
var Ga;
for (var Ja, Ba, Oa = 0; Oa < this._renewingContexts.length; ++Oa) {
Ga = this._renewingContexts[Oa];
if (Ga.ctx === ka) {
Ja = Oa;
Ba = Ga.queue;
break;
}
}
if (Ba !== xa) throw new ub('Attempt to release renewal lock that is not owned by this queue.');
ya
? (ya = ya.messageHeader)
? (Ba = ya.keyResponseData)
? xa.add(Ba.masterToken)
: (ka = ka.isPeerToPeer() ? ya.peerMasterToken : ya.masterToken)
? xa.add(ka)
: xa.add(qa)
: xa.add(qa)
: xa.add(qa);
this._renewingContexts.splice(Ja, 1);
},
});
df = Bb.Class.create({
init: function () {
var ka;
ka = {
_impl: { value: new W(), writable: !1, enumerable: !1, configurable: !1 },
_shutdown: { value: !1, writable: !1, enumerable: !1, configurable: !1 },
};
Object.defineProperties(this, ka);
},
setFilterFactory: function (ka) {
this._impl.setFilterFactory(ka);
},
shutdown: function () {
this._shutdown = !0;
},
receive: function (ka, xa, ya, Ja, Ba, Oa) {
var Ga;
if (this._shutdown) throw new cb('MslControl is shutdown.');
Ga = new aa(this._impl, ka, xa, ya, Ja, Ba);
setTimeout(function () {
Ga.call(Oa);
}, 0);
return ha(Ga);
},
respond: function (ka, xa, ya, Ja, Ba, Oa, Ga) {
var Ua;
if (this._shutdown) throw new cb('MslControl is shutdown.');
Ua = new da(this._impl, ka, xa, ya, Ja, Ba, Oa);
setTimeout(function () {
Ua.call(Ga);
}, 0);
return ha(Ua);
},
error: function ya(ka, xa, ya, Ja, Ba, Oa, Ga) {
var Ua;
if (this._shutdown) throw new cb('MslControl is shutdown.');
Ua = new oa(this._impl, ka, xa, ya, Ja, Ba, Oa);
setTimeout(function () {
Ua.call(Ga);
}, 0);
return ha(Ua);
},
request: function (ka, xa) {
var ya, Ja, Ba, Oa, Ga, Ua;
if (this._shutdown) throw new cb('MslControl is shutdown.');
if (5 == arguments.length) {
Ja = arguments[2];
Ba = ya = null;
Oa = arguments[3];
Ga = arguments[4];
if (ka.isPeerToPeer()) {
Ga.error(new ub('This method cannot be used in peer-to-peer mode.'));
return;
}
} else if (
6 == arguments.length &&
((Ja = null),
(ya = arguments[2]),
(Ba = arguments[3]),
(Oa = arguments[4]),
(Ga = arguments[5]),
!ka.isPeerToPeer())
) {
Ga.error(new ub('This method cannot be used in trusted network mode.'));
return;
}
Ua = new Fa(this._impl, ka, xa, Ja, ya, Ba, null, 0, Oa);
setTimeout(function () {
Ua.call(Ga);
}, 0);
return ha(Ua);
},
});
aa = Bb.Class.create({
init: function (ka, xa, ya, Ja, Ba, Oa) {
Object.defineProperties(this, {
_ctrl: { value: ka, writable: !1, enumerable: !1, configurable: !1 },
_ctx: { value: xa, writable: !1, enumerable: !1, configurable: !1 },
_msgCtx: { value: ya, writable: !1, enumerable: !1, configurable: !1 },
_input: { value: Ja, writable: !1, enumerable: !1, configurable: !1 },
_output: { value: Ba, writable: !1, enumerable: !1, configurable: !1 },
_timeout: { value: Oa, writable: !1, enumerable: !1, configurable: !1 },
_aborted: { value: !1, writable: !0, enumerable: !1, configurable: !1 },
_abortFunc: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
});
},
isAborted: function () {
return this._aborted;
},
abort: function () {
this._aborted = !0;
this._abortFunc && this._abortFunc.call(this);
},
setAbort: function (ka) {
this._abortFunc = ka;
},
call: function (ka) {
var Ba;
function xa(Oa) {
db(
ka,
function () {
var Ga;
Ga = Oa.messageHeader;
if (!Ga) return Oa;
this.setAbort(function () {
Oa.abort();
});
Oa.mark(Number.MAX_VALUE);
Oa.read(1, Ba._timeout, {
result: function (Ua) {
db(
ka,
function () {
if (Ua && 0 == Ua.length) return null;
if (Ua) return Oa.reset(), Oa;
ya(Oa);
},
Ba
);
},
timeout: function () {
ka.timeout();
},
error: function (Ua) {
db(
ka,
function () {
var ab, Xa, jb;
if (U(Ua)) return null;
ab = Ga ? Ga.messageId : null;
if (Ua instanceof Tb) {
Xa = V.MSL_COMMS_FAILURE;
jb = Ua;
} else (Xa = V.INTERNAL_EXCEPTION), (jb = new ub('Error peeking into the message payloads.'));
Y(this, this._ctx, this._msgCtx.getDebugContext(), ab, Xa, null, this._output, this._timeout, {
result: function (mb) {
ka.error(jb);
},
timeout: function () {
ka.timeout();
},
error: function (mb) {
db(
ka,
function () {
if (U(mb)) return null;
throw new fc('Error peeking into the message payloads.', mb, Ua);
},
Ba
);
},
});
},
Ba
);
},
});
},
Ba
);
}
function ya(Oa) {
db(
ka,
function () {
Oa.close();
this._ctrl.buildResponse(this, this._ctx, this._msgCtx, Oa.messageHeader, this._timeout, {
result: function (Ga) {
db(
ka,
function () {
var Ua, ab, Xa, jb, mb;
Ua = Ga.builder;
ab = Ga.tokenTicket;
Xa = Oa.messageHeader;
jb = new ua(this._msgCtx);
if (!this._ctx.isPeerToPeer() || Xa.isEncrypting() || Xa.keyResponseData) Ja(Xa, Ua, jb, ab);
else {
mb = new Fa(this._ctrl, this._ctx, jb, null, this._input, this._output, Ga, 1, this._timeout);
this.setAbort(function () {
mb.abort();
});
mb.call(ka);
}
},
Ba
);
},
timeout: function () {
ka.timeout();
},
error: function (Ga) {
db(
ka,
function () {
var Ua, ab, Xa, jb;
if (U(Ga)) return null;
if (Ga instanceof cb) {
Ua = Ga.messageId;
ab = Ga.error;
Xa = Oa.messageHeader.messageCapabilities;
Xa = this._ctrl.messageRegistry.getUserMessage(ab, Xa ? Xa.languages : null);
jb = Ga;
} else
(Ua = requestHeader ? requestHeader.messageId : null),
(ab = V.INTERNAL_EXCEPTION),
(Xa = null),
(jb = new ub('Error creating an automatic handshake response.', Ga));
Y(this, this._ctx, this._msgCtx.getDebugContext(), Ua, ab, Xa, this._output, this._timeout, {
result: function (mb) {
ka.error(jb);
},
timeout: function () {
ka.timeout();
},
error: function (mb) {
db(
ka,
function () {
if (U(mb)) return null;
throw new fc('Error creating an automatic handshake response.', mb, Ga);
},
Ba
);
},
});
},
Ba
);
},
});
},
Ba
);
}
function Ja(Oa, Ga, Ua, ab) {
db(
ka,
function () {
Ga.setRenewable(!1);
this._ctrl.send(this._ctx, Ua, this._output, Ga, this._timeout, {
result: function (Xa) {
db(
ka,
function () {
this._ctx.isPeerToPeer() && this._ctrl.releaseMasterToken(ab);
return null;
},
Ba
);
},
timeout: function () {
db(
ka,
function () {
this._ctx.isPeerToPeer() && this._ctrl.releaseMasterToken(ab);
ka.timeout();
},
Ba
);
},
error: function (Xa) {
db(
ka,
function () {
var jb, mb, nb, qb;
this._ctx.isPeerToPeer() && this._ctrl.releaseMasterToken(ab);
if (U(Xa)) return null;
if (Xa instanceof cb) {
jb = Xa.messageId;
mb = Xa.error;
nb = Oa ? Oa.messageCapabilities : null;
nb = this._ctrl.messageRegistry.getUserMessage(mb, nb ? nb.languages : null);
qb = Xa;
} else
Xa instanceof Tb
? ((jb = Oa ? Oa.messageId : null), (mb = V.MSL_COMMS_FAILURE), (nb = null), (qb = Xa))
: ((jb = Oa ? Oa.messageId : null),
(mb = V.INTERNAL_EXCEPTION),
(nb = null),
(qb = new ub('Error sending an automatic handshake response.', Xa)));
Y(this, this._ctx, this._msgCtx.getDebugContext(), jb, mb, nb, this._output, this._timeout, {
result: function (rb) {
ka.error(qb);
},
timeout: function () {
ka.timeout();
},
error: function (rb) {
db(
ka,
function () {
if (U(rb)) return null;
throw new fc('Error sending an automatic handshake response.', rb, Xa);
},
Ba
);
},
});
},
Ba
);
},
});
},
Ba
);
}
Ba = this;
db(
ka,
function () {
this._ctrl.receive(this, this._ctx, this._msgCtx, this._input, null, this._timeout, {
result: function (Oa) {
xa(Oa);
},
timeout: function () {
ka.timeout();
},
error: function (Oa) {
db(
ka,
function () {
var Ga, Ua, ab, Xa;
if (U(Oa)) return null;
if (Oa instanceof cb) {
Ga = Oa.messageId;
Ua = Oa.error;
ab = this._ctrl.messageRegistry.getUserMessage(Ua, null);
Xa = Oa;
} else
(Ga = null),
(Ua = V.INTERNAL_EXCEPTION),
(ab = null),
(Xa = new ub('Error receiving the message header.', Oa));
Y(this, this._ctx, this._msgCtx.getDebugContext(), Ga, Ua, ab, this._output, this._timeout, {
result: function (jb) {
ka.error(Xa);
},
timeout: function () {
ka.timeout();
},
error: function (jb) {
db(
ka,
function () {
if (U(jb)) return null;
throw new fc('Error receiving the message header.', jb, Oa);
},
Ba
);
},
});
},
Ba
);
},
});
},
Ba
);
},
});
da = Bb.Class.create({
init: function (ka, xa, ya, Ja, Ba, Oa, Ga) {
Object.defineProperties(this, {
_ctrl: { value: ka, writable: !1, enumerable: !1, configurable: !1 },
_ctx: { value: xa, writable: !1, enumerable: !1, configurable: !1 },
_msgCtx: { value: ya, writable: !1, enumerable: !1, configurable: !1 },
_input: { value: Ja, writable: !1, enumerable: !1, configurable: !1 },
_output: { value: Ba, writable: !1, enumerable: !1, configurable: !1 },
_request: { value: Oa, writable: !1, enumerable: !1, configurable: !1 },
_timeout: { value: Ga, writable: !1, enumerable: !1, configurable: !1 },
_aborted: { value: !1, writable: !0, enumerable: !1, configurable: !1 },
_abortFunc: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
});
},
isAborted: function () {
return this._aborted;
},
abort: function () {
this._aborted = !0;
this._abortFunc && this._abortFunc.call(this);
},
setAbort: function (ka) {
this._abortFunc = ka;
},
trustedNetworkExecute: function (ka, xa, ya) {
var Ja;
Ja = this;
db(
ya,
function () {
var Ba, Oa;
if (12 < xa + 1) return !1;
if (
(Ba =
this._msgCtx.isIntegrityProtected() && !ka.willIntegrityProtectHeader()
? V.RESPONSE_REQUIRES_INTEGRITY_PROTECTION
: this._msgCtx.isEncrypted() && !ka.willEncryptPayloads()
? V.RESPONSE_REQUIRES_ENCRYPTION
: null)
) {
Oa = Tc(ka.getMessageId());
Y(this, this._ctx, this._msgCtx.getDebugContext(), Oa, Ba, null, this._output, this._timeout, {
result: function (Ga) {
ya.result(!1);
},
timeout: function () {
ya.timeout();
},
error: function (Ga) {
db(
ya,
function () {
if (U(Ga)) return !1;
throw new fc(
'Response requires encryption or integrity protection but cannot be protected: ' + Ba,
Ga,
null
);
},
Ja
);
},
});
} else
!this._msgCtx.getCustomer() || ka.getMasterToken() || ka.getKeyExchangeData()
? (ka.setRenewable(!1),
this._ctrl.send(this._ctx, this._msgCtx, this._output, ka, this._timeout, {
result: function (Ga) {
ya.result(!0);
},
timeout: function () {
ya.timeout();
},
error: function (Ga) {
ya.error(Ga);
},
}))
: ((Oa = Tc(ka.getMessageId())),
Y(
this,
this._ctx,
this._msgCtx.getDebugContext(),
Oa,
V.RESPONSE_REQUIRES_MASTERTOKEN,
null,
this._output,
this._timeout,
{
result: function (Ga) {
ya.result(!1);
},
timeout: function () {
ya.timeout();
},
error: function (Ga) {
db(
ya,
function () {
if (U(Ga)) return !1;
throw new fc(
'Response wishes to attach a user ID token but there is no master token.',
Ga,
null
);
},
Ja
);
},
}
));
},
Ja
);
},
peerToPeerExecute: function (ka, xa, ya, Ja) {
var Oa;
function Ba(Ga) {
db(
Ja,
function () {
var Ua;
Ua = Ga.response;
Ua.close();
Ua = Ua.getErrorHeader();
this._ctrl.cleanupContext(this._ctx, Ga.requestHeader, Ua);
this._ctrl.buildErrorResponse(this, this._ctx, ka, Ga, Ua, {
result: function (ab) {
db(
Ja,
function () {
var Xa, jb;
if (!ab) return !1;
Xa = ab.errorResult;
jb = ab.tokenTicket;
this.peerToPeerExecute(Xa.msgCtx, Xa.builder, ya, {
result: function (mb) {
db(
Ja,
function () {
this._ctrl.releaseMasterToken(jb);
return mb;
},
Oa
);
},
timeout: function () {
db(
Ja,
function () {
this._ctrl.releaseMasterToken(jb);
Ja.timeout();
},
Oa
);
},
error: function (mb) {
db(
Ja,
function () {
this._ctrl.releaseMasterToken(jb);
throw mb;
},
Oa
);
},
});
},
Oa
);
},
});
},
Oa
);
}
Oa = this;
db(
Ja,
function () {
var Ga;
if (12 < ya + 2) return !1;
if (null != ka.getCustomer() && null == xa.getPeerMasterToken() && null == xa.getKeyExchangeData()) {
Ga = Tc(xa.getMessageId());
Y(
this,
this._ctx,
ka.getDebugContext(),
Ga,
V.RESPONSE_REQUIRES_MASTERTOKEN,
null,
this._output,
this._timeout,
{
result: function (Ua) {
Ja.result(!1);
},
timeout: function () {
Ja.timeout();
},
error: function (Ua) {
db(
Ja,
function () {
if (U(Ua)) return !1;
throw new fc(
'Response wishes to attach a user ID token but there is no master token.',
Ua,
null
);
},
Oa
);
},
}
);
} else
this._ctrl.sendReceive(this._ctx, ka, this._input, this._output, xa, this._timeout, !1, {
result: function (Ua) {
db(
Ja,
function () {
var jb, mb, nb;
function ab() {
jb.read(32768, Oa._timeout, {
result: function (qb) {
db(
Ja,
function () {
qb ? ab() : Xa();
},
Oa
);
},
timeout: function () {
Ja.timeout();
},
error: function (qb) {
Ja.error(qb);
},
});
}
function Xa() {
db(
Ja,
function () {
var qb;
qb = new Ca(Ua.payloads, ka);
this._ctrl.buildResponse(this, this._ctx, qb, mb, this._timeout, {
result: function (rb) {
db(
Ja,
function () {
var zb;
zb = rb.tokenTicket;
this.peerToPeerExecute(qb, rb.builder, ya, {
result: function (wb) {
db(
Ja,
function () {
this._ctrl.releaseMasterToken(zb);
return wb;
},
Oa
);
},
timeout: function () {
db(
Ja,
function () {
this._ctrl.releaseMasterToken(zb);
Ja.timeout();
},
Oa
);
},
error: function (wb) {
db(
Ja,
function () {
this._ctrl.releaseMasterToken(zb);
throw wb;
},
Oa
);
},
});
},
Oa
);
},
timeout: function () {
Ja.timeout();
},
error: function (rb) {
Ja.error(rb);
},
});
},
Oa
);
}
jb = Ua.response;
ya += 2;
if (!jb) return !0;
mb = jb.getMessageHeader();
if (mb) {
nb = Ua.payloads;
nb = 0 < nb.length && 0 < nb[0].data.length;
if (Ua.handshake && nb) ab();
else return !0;
} else Ba(Ua);
},
Oa
);
},
timeout: function () {
Ja.timeout();
},
error: function (Ua) {
Ja.error(Ua);
},
});
},
Oa
);
},
call: function (ka) {
var xa;
xa = this;
this._ctrl.buildResponse(this, this._ctx, this._msgCtx, this._request, this._timeout, {
result: function (ya) {
db(
ka,
function () {
var Ja, Ba;
Ja = ya.builder;
Ba = ya.tokenTicket;
this._ctx.isPeerToPeer()
? this.peerToPeerExecute(this._msgCtx, Ja, 3, {
result: function (Oa) {
db(
ka,
function () {
this._ctx.isPeerToPeer() && this.releaseMasterToken(Ba);
return Oa;
},
xa
);
},
timeout: function () {
db(
ka,
function () {
this._ctx.isPeerToPeer() && this.releaseMasterToken(Ba);
ka.timeout();
},
xa
);
},
error: function (Oa) {
db(
ka,
function () {
var Ga, Ua, ab, Xa;
this._ctx.isPeerToPeer() && this.releaseMasterToken(Ba);
if (U(Oa)) return !1;
Ga = Tc(Ja.getMessageId());
if (Oa instanceof cb) {
Ua = Oa.error;
ab = this._request.messageCapabilities;
ab = this._ctrl.messageRegistry.getUserMessage(Ua, ab ? ab.languages : null);
Xa = Oa;
} else
Oa instanceof Tb
? ((Ua = V.MSL_COMMS_FAILURE), (ab = null), (Xa = Oa))
: ((Ua = V.INTERNAL_EXCEPTION),
(ab = null),
(Xa = new ub('Error sending the response.', Oa)));
Y(
this,
this._ctx,
this._msgCtx.getDebugContext(),
Ga,
Ua,
ab,
this._output,
this._timeout,
{
result: function (jb) {
ka.error(Xa);
},
timeout: function () {
ka.timeout();
},
error: function (jb) {
db(
ka,
function () {
if (U(jb)) return !1;
throw new fc('Error sending the response.', jb, null);
},
xa
);
},
}
);
},
xa
);
},
})
: this.trustedNetworkExecute(Ja, 3, {
result: function (Oa) {
db(
ka,
function () {
this._ctx.isPeerToPeer() && this.releaseMasterToken(Ba);
return Oa;
},
xa
);
},
timeout: function () {
db(
ka,
function () {
this._ctx.isPeerToPeer() && this.releaseMasterToken(Ba);
ka.timeout();
},
xa
);
},
error: function (Oa) {
db(
ka,
function () {
var Ga, Ua, ab, Xa;
this._ctx.isPeerToPeer() && this.releaseMasterToken(Ba);
if (U(Oa)) return !1;
Ga = Tc(Ja.getMessageId());
if (Oa instanceof cb) {
Ua = Oa.error;
ab = this._request.messageCapabilities;
ab = this._ctrl.messageRegistry.getUserMessage(Ua, ab ? ab.languages : null);
Xa = Oa;
} else
Oa instanceof Tb
? ((Ua = V.MSL_COMMS_FAILURE), (ab = null), (Xa = Oa))
: ((Ua = V.INTERNAL_EXCEPTION),
(ab = null),
(Xa = new ub('Error sending the response.', Oa)));
Y(
this,
this._ctx,
this._msgCtx.getDebugContext(),
Ga,
Ua,
ab,
this._output,
this._timeout,
{
result: function (jb) {
ka.error(Xa);
},
timeout: function () {
ka.timeout();
},
error: function (jb) {
db(
ka,
function () {
if (U(jb)) return !1;
throw new fc('Error sending the response.', jb, null);
},
xa
);
},
}
);
},
xa
);
},
});
},
xa
);
},
timeout: function () {
ka.timeout();
},
error: function (ya) {
db(
ka,
function () {
var Ja, Ba, Oa, Ga;
if (U(ya)) return !1;
if (ya instanceof cb) {
Ja = ya.messageId;
Ba = ya.error;
Oa = this._request.messageCapabilities;
Oa = this._ctrl.messageRegistry.getUserMessage(Ba, Oa ? Oa.languages : null);
Ga = ya;
} else
(Ja = null),
(Ba = V.INTERNAL_EXCEPTION),
(Oa = null),
(Ga = new ub('Error building the response.', ya));
Y(this, this._ctx, this._msgCtx.getDebugContext(), Ja, Ba, Oa, this._output, this._timeout, {
result: function (Ua) {
ka.error(Ga);
},
timeout: function () {
ka.timeout();
},
error: function (Ua) {
db(
ka,
function () {
if (U(Ua)) return null;
throw new fc('Error building the response.', Ua, ya);
},
xa
);
},
});
},
xa
);
},
});
},
});
oa = Bb.Class.create({
init: function (ka, xa, ya, Ja, Ba, Oa, Ga) {
Object.defineProperties(this, {
_ctrl: { value: ka, writable: !1, enumerable: !1, configurable: !1 },
_ctx: { value: xa, writable: !1, enumerable: !1, configurable: !1 },
_msgCtx: { value: ya, writable: !1, enumerable: !1, configurable: !1 },
_appError: { value: Ja, writable: !1, enumerable: !1, configurable: !1 },
_output: { value: output, writable: !1, enumerable: !1, configurable: !1 },
_request: { value: Oa, writable: !1, enumerable: !1, configurable: !1 },
_timeout: { value: Ga, writable: !1, enumerable: !1, configurable: !1 },
_aborted: { value: !1, writable: !0, enumerable: !1, configurable: !1 },
_abortFunc: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
});
},
isAborted: function () {
return this._aborted;
},
abort: function () {
this._aborted = !0;
this._abortFunc && this._abortFunc.call(this);
},
setAbort: function (ka) {
this._abortFunc = ka;
},
call: function (ka) {
var xa;
xa = this;
db(
ka,
function () {
var ya, Ja;
if (this._appError == ENTITY_REJECTED)
ya = this._request.masterToken ? V.MASTERTOKEN_REJECTED_BY_APP : V.ENTITY_REJECTED_BY_APP;
else if (this._appError == USER_REJECTED)
ya = this._request.userIdToken ? V.USERIDTOKEN_REJECTED_BY_APP : V.USER_REJECTED_BY_APP;
else throw new ub('Unhandled application error ' + this._appError + '.');
Ja = this._request.messageCapabilities;
Ja = this._ctrl.messageRegistry.getUserMessage(ya, Ja ? Ja.languages : null);
Y(
this,
this._ctx,
this._msgCtx.getDebugContext(),
this._request.messageId,
ya,
Ja,
this._output,
this._timeout,
{
result: function (Ba) {
ka.result(Ba);
},
timeout: ka.timeout,
error: function (Ba) {
db(
ka,
function () {
if (U(Ba)) return !1;
if (Ba instanceof cb) throw Ba;
throw new ub('Error building the error response.', Ba);
},
xa
);
},
}
);
},
xa
);
},
});
Ia = { result: function () {}, timeout: function () {}, error: function () {} };
Fa = Bb.Class.create({
init: function (ka, xa, ya, Ja, Ba, Oa, Ga, Ua, ab) {
var Xa;
if (Ga) {
Xa = Ga.builder;
Ga = Ga.tokenTicket;
} else Ga = Xa = null;
Object.defineProperties(this, {
_ctrl: { value: ka, writable: !1, enumerable: !1, configurable: !1 },
_ctx: { value: xa, writable: !1, enumerable: !1, configurable: !1 },
_msgCtx: { value: ya, writable: !1, enumerable: !1, configurable: !1 },
_remoteEntity: { value: Ja, writable: !1, enumerable: !1, configurable: !1 },
_input: { value: Ba, writable: !0, enumerable: !1, configurable: !1 },
_output: { value: Oa, writable: !0, enumerable: !1, configurable: !1 },
_openedStreams: { value: !1, writable: !0, enumerable: !1, configurable: !1 },
_builder: { value: Xa, writable: !0, enumerable: !1, configurable: !1 },
_tokenTicket: { value: Ga, writable: !0, enumerable: !1, configurable: !1 },
_timeout: { value: ab, writable: !1, enumerable: !1, configurable: !1 },
_msgCount: { value: Ua, writable: !1, enumerable: !1, configurable: !1 },
_aborted: { value: !1, writable: !0, enumerable: !1, configurable: !1 },
_abortFunc: { value: Ab, writable: !0, enumerable: !1, configurable: !1 },
});
},
isAborted: function () {
return this._aborted;
},
abort: function () {
this._aborted = !0;
this._abortFunc && this._abortFunc.call(this);
},
setAbort: function (ka) {
this._abortFunc = ka;
},
execute: function (ka, xa, ya, Ja, Ba) {
var Ua;
function Oa(ab) {
function Xa(jb) {
db(
Ba,
function () {
var mb;
mb = ab.response;
return jb ? jb : mb;
},
Ua
);
}
db(
Ba,
function () {
var jb, mb;
jb = ab.response;
jb.close();
mb = jb.getErrorHeader();
this._ctrl.cleanupContext(this._ctx, ab.requestHeader, mb);
this._ctrl.buildErrorResponse(this, this._ctx, ka, ab, mb, ya, {
result: function (nb) {
db(
Ba,
function () {
var qb, rb, zb, wb;
if (!nb) return jb;
qb = nb.errorResult;
rb = nb.tokenTicket;
zb = qb.builder;
qb = qb.msgCtx;
if (this._ctx.isPeerToPeer())
this.execute(qb, zb, this._timeout, Ja, {
result: function (u) {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(rb);
Xa(u);
},
Ua
);
},
timeout: function () {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(rb);
Ba.timeout();
},
Ua
);
},
error: function (u) {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(rb);
Ba.error(u);
},
Ua
);
},
});
else {
this._openedStreams && (this._input.close(), this._output.close(ya, Ia));
wb = new Fa(
this._ctrl,
this._ctx,
qb,
this._remoteEntity,
null,
null,
{ builder: zb, tokenTicket: rb },
Ja,
this._timeout
);
this.setAbort(function () {
wb.abort();
});
wb.call({
result: function (u) {
Xa(u);
},
timeout: function () {
Ba.timeout();
},
error: function (u) {
Ba.error(u);
},
});
}
},
Ua
);
},
timeout: function () {
Ba.timeout();
},
error: function (nb) {
Ba.error(nb);
},
});
},
Ua
);
}
function Ga(ab) {
db(
Ba,
function () {
var mb, nb, qb, rb, zb;
function Xa() {
mb.read(32768, Ua._timeout, {
result: function (wb) {
wb ? Xa() : jb();
},
timeout: function () {
Ba.timeout();
},
error: function (wb) {
Ba.error(wb);
},
});
}
function jb() {
db(
Ba,
function () {
var wb;
wb = new Ca(ab.payloads, ka);
this._ctrl.buildResponse(this, this._ctx, ka, nb, ya, {
result: function (u) {
db(
Ba,
function () {
var b;
b = u.tokenTicket;
this.execute(wb, u.builder, this._timeout, Ja, {
result: function (a) {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(b);
return a;
},
Ua
);
},
timeout: function () {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(b);
Ba.timeout();
},
Ua
);
},
error: function (a) {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(b);
throw a;
},
Ua
);
},
});
},
Ua
);
},
timeout: function () {
Ba.timeout();
},
error: function (u) {
Ba.error(u);
},
});
},
Ua
);
}
mb = ab.response;
nb = mb.getMessageHeader();
qb = ab.payloads;
qb = 0 < qb.length && 0 < qb[0].data.length;
if (!this._ctx.isPeerToPeer()) {
if (!ab.handshake || !qb) return mb;
this._openedStreams && (this._input.close(), this._output.close(ya, Ia));
rb = new Ca(ab.payloads, ka);
this._ctrl.buildResponse(this, this._ctx, ka, nb, ya, {
result: function (wb) {
db(
Ba,
function () {
var u;
u = new Fa(this._ctrl, this._ctx, rb, this._remoteEntity, null, null, wb, Ja, this._timeout);
this.setAbort(function () {
u.abort();
});
u.call(Ba);
},
Ua
);
},
timeout: function () {
Ba.timeout();
},
error: function (wb) {
Ba.error(wb);
},
});
} else if (ab.handshake && qb) Xa();
else if (0 < nb.keyRequestData.length) {
zb = new ua(ka);
this._ctrl.buildResponse(this, this._ctx, zb, nb, ya, {
result: function (wb) {
db(
Ba,
function () {
var u, b;
u = wb.builder;
b = wb.tokenTicket;
mb.mark();
mb.read(1, this._timeout, {
result: function (a) {
db(
Ba,
function () {
function c() {
mb.read(32768, Ua._timeout, {
result: function (k) {
k ? c() : h();
},
timeout: function () {
Ba.timeout();
},
error: function (k) {
Ba.error(k);
},
});
}
function h() {
Ua.execute(zb, u, Ua._timeout, Ja, {
result: function (k) {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(b);
return k;
},
Ua
);
},
timeout: function () {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(b);
Ba.timeout();
},
Ua
);
},
error: function (k) {
db(
Ba,
function () {
this._ctrl.releaseMasterToken(b);
throw k;
},
Ua
);
},
});
}
if (a) {
if ((mb.reset(), 12 >= Ja + 1))
u.setRenewable(!1),
this._ctrl.send(this, this._ctx, zb, this._output, u, this._timeout, {
result: function (k) {
db(
Ba,
function () {
this.releaseMasterToken(b);
return mb;
},
Ua
);
},
timeout: function () {
Ba.timeout();
},
error: function (k) {
Ba.error(k);
},
});
else return this.releaseMasterToken(b), mb;
} else c();
},
Ua
);
},
timeout: function () {
db(
Ba,
function () {
this.releaseMasterToken(b);
Ba.timeout();
},
Ua
);
},
error: function (a) {
db(
Ba,
function () {
this.releaseMasterToken(b);
throw a;
},
Ua
);
},
});
},
Ua
);
},
timeout: function () {
Ba.timeout();
},
error: function (wb) {
Ba.error(wb);
},
});
}
},
Ua
);
}
Ua = this;
db(
Ba,
function () {
if (12 < Ja + 2) return null;
this._ctrl.sendReceive(this, this._ctx, ka, this._input, this._output, xa, ya, !0, {
result: function (ab) {
db(
Ba,
function () {
var Xa;
if (!ab) return null;
Xa = ab.response;
Ja += 2;
Xa.getMessageHeader() ? Ga(ab) : Oa(ab);
},
Ua
);
},
timeout: function () {
Ba.timeout();
},
error: function (ab) {
Ba.error(ab);
},
});
},
Ua
);
},
call: function (ka) {
var ya;
function xa(Ja, Ba, Oa) {
db(
ka,
function () {
this.execute(this._msgCtx, Ja, Oa, this._msgCount, {
result: function (Ga) {
db(
ka,
function () {
this._ctrl.releaseMasterToken(Ba);
this._openedStreams && this._output.close(Oa, Ia);
Ga && Ga.closeSource(this._openedStreams);
return Ga;
},
ya
);
},
timeout: function () {
db(
ka,
function () {
this._ctrl.releaseMasterToken(Ba);
this._openedStreams && (this._output.close(Oa, Ia), this._input.close());
ka.timeout();
},
ya
);
},
error: function (Ga) {
db(
ka,
function () {
this._ctrl.releaseMasterToken(Ba);
this._openedStreams && (this._output.close(Oa, Ia), this._input.close());
if (U(Ga)) return null;
throw Ga;
},
ya
);
},
});
},
ya
);
}
ya = this;
db(
ka,
function () {
var Ja, Ba, Oa;
Ja = this._timeout;
if (!this._input || !this._output)
try {
this._remoteEntity.setTimeout(this._timeout);
Ba = Date.now();
Oa = this._remoteEntity.openConnection();
this._output = Oa.output;
this._input = Oa.input;
-1 != Ja && (Ja = this._timeout - (Date.now() - Ba));
this._openedStreams = !0;
} catch (Ga) {
this._builder && this._ctrl.releaseMasterToken(this._tokenTicket);
this._output && this._output.close(this._timeout, Ia);
this._input && this._input.close();
if (U(Ga)) return null;
throw Ga;
}
this._builder
? xa(this._builder, this._tokenTicket, Ja)
: this._ctrl.buildRequest(this, this._ctx, this._msgCtx, this._timeout, {
result: function (Ga) {
db(
ka,
function () {
xa(Ga.builder, Ga.tokenTicket, Ja);
},
ya
);
},
timeout: function () {
db(
ka,
function () {
this._openedStreams && (this._output.close(this._timeout, Ia), this._input.close());
ka.timeout();
},
ya
);
},
error: function (Ga) {
db(
ka,
function () {
this._openedStreams && (this._output.close(this._timeout, Ia), this._input.close());
if (U(Ga)) return null;
throw Ga;
},
ya
);
},
});
},
ya
);
},
});
})();
(function () {
ae = Bb.Class.create({
init: function (ha) {
Object.defineProperties(this, { id: { value: ha, writable: !1, configurable: !1 } });
},
toJSON: function () {
var ha;
ha = {};
ha.id = this.id;
return ha;
},
equals: function (ha) {
return this === ha ? !0 : ha instanceof ae ? this.id == ha.id : !1;
},
uniqueKey: function () {
return this.id;
},
});
ef = function (ha) {
var ba;
ba = ha.id;
if (!ba) throw new xb(V.JSON_PARSE_ERROR, JSON.stringify(ha));
return new ae(ba);
};
})();
Bb.Class.create({
isNewestMasterToken: function (ha, ba, ca) {},
isMasterTokenRevoked: function (ha, ba) {},
acceptNonReplayableId: function (ha, ba, ca, ia) {},
createMasterToken: function (ha, ba, ca, ia, fa) {},
isMasterTokenRenewable: function (ha, ba, ca) {},
renewMasterToken: function (ha, ba, ca, ia, fa) {},
isUserIdTokenRevoked: function (ha, ba, ca, ia) {},
createUserIdToken: function (ha, ba, ca, ia) {},
renewUserIdToken: function (ha, ba, ca, ia) {},
});
(function () {
function ha(ba, ca, ia, fa) {
this.sessiondata = ba;
this.tokendata = ca;
this.signature = ia;
this.verified = fa;
}
cc = Bb.Class.create({
init: function (ba, ca, ia, fa, U, Y, sa, pa, ta, Ca, ua) {
var qa;
qa = this;
La(
ua,
function () {
var W, aa, da, oa, Ia;
if (ia.getTime() < ca.getTime())
throw new ub('Cannot construct a master token that expires before its renewal window opens.');
if (0 > fa || fa > Lb) throw new ub('Sequence number ' + fa + ' is outside the valid range.');
if (0 > U || U > Lb) throw new ub('Serial number ' + U + ' is outside the valid range.');
W = Math.floor(ca.getTime() / 1e3);
aa = Math.floor(ia.getTime() / 1e3);
if (Ca) da = Ca.sessiondata;
else {
oa = {};
Y && (oa.issuerdata = Y);
oa.identity = sa;
oa.encryptionkey = Cb(pa.toByteArray());
oa.hmackey = Cb(ta.toByteArray());
da = Qb(JSON.stringify(oa), Kb);
}
if (Ca)
return (
Object.defineProperties(this, {
ctx: { value: ba, writable: !1, enumerable: !1, configurable: !1 },
renewalWindowSeconds: { value: W, writable: !1, enumerable: !1, configurable: !1 },
expirationSeconds: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
sequenceNumber: { value: fa, writable: !1, configurable: !1 },
serialNumber: { value: U, writable: !1, configurable: !1 },
issuerData: { value: Y, writable: !1, configurable: !1 },
identity: { value: sa, writable: !1, configurable: !1 },
encryptionKey: { value: pa, writable: !1, configurable: !1 },
hmacKey: { value: ta, writable: !1, configurable: !1 },
sessiondata: { value: da, writable: !1, enumerable: !1, configurable: !1 },
verified: { value: Ca.verified, writable: !1, enumerable: !1, configurable: !1 },
tokendata: { value: Ca.tokendata, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: Ca.signature, writable: !1, enumerable: !1, configurable: !1 },
}),
this
);
Ia = ba.getMslCryptoContext();
Ia.encrypt(da, {
result: function (Fa) {
La(
ua,
function () {
var Pa, Ra;
Pa = {};
Pa.renewalwindow = W;
Pa.expiration = aa;
Pa.sequencenumber = fa;
Pa.serialnumber = U;
Pa.sessiondata = Cb(Fa);
Ra = Qb(JSON.stringify(Pa), Kb);
Ia.sign(Ra, {
result: function (ka) {
La(
ua,
function () {
Object.defineProperties(this, {
ctx: { value: ba, writable: !1, enumerable: !1, configurable: !1 },
renewalWindowSeconds: { value: W, writable: !1, enumerable: !1, configurable: !1 },
expirationSeconds: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
sequenceNumber: { value: fa, writable: !1, enumerable: !1, configurable: !1 },
serialNumber: { value: U, writable: !1, enumerable: !1, configurable: !1 },
issuerData: { value: Y, writable: !1, configurable: !1 },
identity: { value: sa, writable: !1, configurable: !1 },
encryptionKey: { value: pa, writable: !1, configurable: !1 },
hmacKey: { value: ta, writable: !1, configurable: !1 },
sessiondata: { value: da, writable: !1, enumerable: !1, configurable: !1 },
verified: { value: !0, writable: !1, enumerable: !1, configurable: !1 },
tokendata: { value: Ra, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: ka, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
qa
);
},
error: function (ka) {
ua.error(ka);
},
});
},
qa
);
},
error: function (Fa) {
ua.error(Fa);
},
});
},
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 (ba) {
return this.isVerified() ? this.renewalWindow.getTime() <= this.ctx.getTime() : !0;
},
isExpired: function (ba) {
return this.isVerified() ? this.expiration.getTime() <= this.ctx.getTime() : !1;
},
isNewerThan: function (ba) {
var ca;
if (this.sequenceNumber == ba.sequenceNumber) return this.expiration > ba.expiration;
if (this.sequenceNumber > ba.sequenceNumber) {
ca = this.sequenceNumber - Lb + 127;
return ba.sequenceNumber >= ca;
}
ca = ba.sequenceNumber - Lb + 127;
return this.sequenceNumber < ca;
},
toJSON: function () {
var ba;
ba = {};
ba.tokendata = Cb(this.tokendata);
ba.signature = Cb(this.signature);
return ba;
},
equals: function (ba) {
return this === ba
? !0
: ba instanceof cc
? this.serialNumber == ba.serialNumber &&
this.sequenceNumber == ba.sequenceNumber &&
this.expiration.getTime() == ba.expiration.getTime()
: !1;
},
uniqueKey: function () {
return this.serialNumber + ':' + this.sequenceNumber + this.expiration.getTime();
},
});
Hc = function (ba, ca, ia) {
La(ia, function () {
var fa, U, Y, sa, pa;
fa = ba.getMslCryptoContext();
U = ca.tokendata;
Y = ca.signature;
if ('string' !== typeof U || 'string' !== typeof Y)
throw new xb(V.JSON_PARSE_ERROR, 'mastertoken ' + JSON.stringify(ca));
try {
sa = Fb(U);
} catch (ta) {
throw new cb(V.MASTERTOKEN_TOKENDATA_INVALID, 'mastertoken ' + JSON.stringify(ca), ta);
}
if (!sa || 0 == sa.length) throw new xb(V.MASTERTOKEN_TOKENDATA_MISSING, 'mastertoken ' + JSON.stringify(ca));
try {
pa = Fb(Y);
} catch (ta) {
throw new cb(V.MASTERTOKEN_SIGNATURE_INVALID, 'mastertoken ' + JSON.stringify(ca), ta);
}
fa.verify(sa, pa, {
result: function (ta) {
La(ia, function () {
var Ca, ua, qa, W, aa, da, oa, Ia, Fa, Pa;
Ca = Rb(sa, Kb);
try {
ua = JSON.parse(Ca);
qa = parseInt(ua.renewalwindow);
W = parseInt(ua.expiration);
aa = parseInt(ua.sequencenumber);
da = parseInt(ua.serialnumber);
oa = ua.sessiondata;
} catch (Ra) {
if (Ra instanceof SyntaxError)
throw new xb(V.MASTERTOKEN_TOKENDATA_PARSE_ERROR, 'mastertokendata ' + Ca, Ra);
throw Ra;
}
if (
!qa ||
qa != qa ||
!W ||
W != W ||
'number' !== typeof aa ||
aa != aa ||
'number' !== typeof da ||
da != da ||
'string' !== typeof oa
)
throw new xb(V.MASTERTOKEN_TOKENDATA_PARSE_ERROR, 'mastertokendata ' + Ca);
if (W < qa) throw new cb(V.MASTERTOKEN_EXPIRES_BEFORE_RENEWAL, 'mastertokendata ' + Ca);
if (0 > aa || aa > Lb)
throw new cb(V.MASTERTOKEN_SEQUENCE_NUMBER_OUT_OF_RANGE, 'mastertokendata ' + Ca);
if (0 > da || da > Lb) throw new cb(V.MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, 'mastertokendata ' + Ca);
Ia = new Date(1e3 * qa);
Fa = new Date(1e3 * W);
try {
Pa = Fb(oa);
} catch (Ra) {
throw new cb(V.MASTERTOKEN_SESSIONDATA_INVALID, oa, Ra);
}
if (!Pa || 0 == Pa.length) throw new cb(V.MASTERTOKEN_SESSIONDATA_MISSING, oa);
ta
? fa.decrypt(Pa, {
result: function (Ra) {
La(ia, function () {
var ka, xa, ya, Ja, Ba, Oa;
ka = Rb(Ra, Kb);
try {
xa = JSON.parse(ka);
ya = xa.issuerdata;
Ja = xa.identity;
Ba = xa.encryptionkey;
Oa = xa.hmackey;
} catch (Ga) {
if (Ga instanceof SyntaxError)
throw new xb(V.MASTERTOKEN_SESSIONDATA_PARSE_ERROR, 'sessiondata ' + ka, Ga);
throw Ga;
}
if ((ya && 'object' !== typeof ya) || !Ja || 'string' !== typeof Ba || 'string' !== typeof Oa)
throw new xb(V.MASTERTOKEN_SESSIONDATA_PARSE_ERROR, 'sessiondata ' + ka);
pc(Ba, jc, xc, {
result: function (Ga) {
pc(Oa, kc, Gc, {
result: function (Ua) {
La(ia, function () {
var ab;
ab = new ha(Ra, sa, pa, ta);
new cc(ba, Ia, Fa, aa, da, ya, Ja, Ga, Ua, ab, ia);
});
},
error: function (Ua) {
ia.error(new tb(V.MASTERTOKEN_KEY_CREATION_ERROR, Ua));
},
});
},
error: function (Ga) {
ia.error(new tb(V.MASTERTOKEN_KEY_CREATION_ERROR, Ga));
},
});
});
},
error: function (Ra) {
ia.error(Ra);
},
})
: ((qa = new ha(null, sa, pa, ta)), new cc(ba, Ia, Fa, aa, da, null, null, null, null, qa, ia));
});
},
error: function (ta) {
ia.error(ta);
},
});
});
};
})();
(function () {
function ha(ba, ca, ia) {
this.tokendata = ba;
this.signature = ca;
this.verified = ia;
}
Qc = Bb.Class.create({
init: function (ba, ca, ia, fa, U, Y, sa, pa, ta) {
var Ca;
Ca = this;
La(
ta,
function () {
var ua, qa, W, aa, da, oa, Ia;
if (ia.getTime() < ca.getTime())
throw new ub('Cannot construct a user ID token that expires before its renewal window opens.');
if (!fa) throw new ub('Cannot construct a user ID token without a master token.');
if (0 > U || U > Lb) throw new ub('Serial number ' + U + ' is outside the valid range.');
ua = Math.floor(ca.getTime() / 1e3);
qa = Math.floor(ia.getTime() / 1e3);
W = fa.serialNumber;
if (pa) {
aa = pa.tokendata;
da = pa.signature;
oa = pa.verified;
W = fa.serialNumber;
Object.defineProperties(this, {
ctx: { value: ba, writable: !1, enumerable: !1, configurable: !1 },
renewalWindowSeconds: { value: ua, writable: !1, enumerable: !1, configurable: !1 },
expirationSeconds: { value: qa, writable: !1, enumerable: !1, configurable: !1 },
mtSerialNumber: { value: W, writable: !1, configurable: !1 },
serialNumber: { value: U, writable: !1, configurable: !1 },
issuerData: { value: Y, writable: !1, configurable: !1 },
customer: { value: sa, writable: !1, configurable: !1 },
verified: { value: oa, writable: !1, enumerable: !1, configurable: !1 },
tokendata: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: da, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
}
aa = {};
Y && (aa.issuerdata = Y);
aa.identity = sa;
aa = Qb(JSON.stringify(aa), Kb);
Ia = ba.getMslCryptoContext();
Ia.encrypt(aa, {
result: function (Fa) {
La(
ta,
function () {
var Pa, Ra;
Pa = {};
Pa.renewalwindow = ua;
Pa.expiration = qa;
Pa.mtserialnumber = W;
Pa.serialnumber = U;
Pa.userdata = Cb(Fa);
Ra = Qb(JSON.stringify(Pa), Kb);
Ia.sign(Ra, {
result: function (ka) {
La(
ta,
function () {
Object.defineProperties(this, {
ctx: { value: ba, writable: !1, enumerable: !1, configurable: !1 },
renewalWindowSeconds: { value: ua, writable: !1, enumerable: !1, configurable: !1 },
expirationSeconds: { value: qa, writable: !1, enumerable: !1, configurable: !1 },
mtSerialNumber: { value: fa.serialNumber, writable: !1, configurable: !1 },
serialNumber: { value: U, writable: !1, configurable: !1 },
issuerData: { value: Y, writable: !1, configurable: !1 },
customer: { value: sa, writable: !1, configurable: !1 },
verified: { value: !0, writable: !1, enumerable: !1, configurable: !1 },
tokendata: { value: Ra, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: ka, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
Ca
);
},
error: function (ka) {
La(
ta,
function () {
ka instanceof cb && ka.setEntity(fa);
throw ka;
},
Ca
);
},
});
},
Ca
);
},
error: function (Fa) {
La(
ta,
function () {
Fa instanceof cb && Fa.setEntity(fa);
throw Fa;
},
Ca
);
},
});
},
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 (ba) {
return ba && ba.serialNumber == this.mtSerialNumber;
},
toJSON: function () {
var ba;
ba = {};
ba.tokendata = Cb(this.tokendata);
ba.signature = Cb(this.signature);
return ba;
},
equals: function (ba) {
return this === ba
? !0
: ba instanceof Qc
? this.serialNumber == ba.serialNumber && this.mtSerialNumber == ba.mtSerialNumber
: !1;
},
uniqueKey: function () {
return this.serialNumber + ':' + this.mtSerialNumber;
},
});
Ic = function (ba, ca, ia, fa) {
La(fa, function () {
var U, Y, sa, pa, ta;
U = ba.getMslCryptoContext();
Y = ca.tokendata;
sa = ca.signature;
if ('string' !== typeof Y || 'string' !== typeof sa)
throw new xb(V.JSON_PARSE_ERROR, 'useridtoken ' + JSON.stringify(ca)).setEntity(ia);
try {
pa = Fb(Y);
} catch (Ca) {
throw new cb(V.USERIDTOKEN_TOKENDATA_INVALID, 'useridtoken ' + JSON.stringify(ca), Ca).setEntity(ia);
}
if (!pa || 0 == pa.length)
throw new xb(V.USERIDTOKEN_TOKENDATA_MISSING, 'useridtoken ' + JSON.stringify(ca)).setEntity(ia);
try {
ta = Fb(sa);
} catch (Ca) {
throw new cb(V.USERIDTOKEN_TOKENDATA_INVALID, 'useridtoken ' + JSON.stringify(ca), Ca).setEntity(ia);
}
U.verify(pa, ta, {
result: function (Ca) {
La(fa, function () {
var ua, qa, W, aa, da, oa, Ia, Fa, Pa, Ra;
ua = Rb(pa, Kb);
try {
qa = JSON.parse(ua);
W = parseInt(qa.renewalwindow);
aa = parseInt(qa.expiration);
da = parseInt(qa.mtserialnumber);
oa = parseInt(qa.serialnumber);
Ia = qa.userdata;
} catch (ka) {
if (ka instanceof SyntaxError)
throw new xb(V.USERIDTOKEN_TOKENDATA_PARSE_ERROR, 'usertokendata ' + ua, ka).setEntity(ia);
throw ka;
}
if (
!W ||
W != W ||
!aa ||
aa != aa ||
'number' !== typeof da ||
da != da ||
'number' !== typeof oa ||
oa != oa ||
'string' !== typeof Ia
)
throw new xb(V.USERIDTOKEN_TOKENDATA_PARSE_ERROR, 'usertokendata ' + ua).setEntity(ia);
if (aa < W) throw new cb(V.USERIDTOKEN_EXPIRES_BEFORE_RENEWAL, 'mastertokendata ' + ua).setEntity(ia);
if (0 > da || da > Lb)
throw new cb(V.USERIDTOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, 'usertokendata ' + ua).setEntity(
ia
);
if (0 > oa || oa > Lb)
throw new cb(V.USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, 'usertokendata ' + ua).setEntity(ia);
Fa = new Date(1e3 * W);
Pa = new Date(1e3 * aa);
if (!ia || da != ia.serialNumber)
throw new cb(
V.USERIDTOKEN_MASTERTOKEN_MISMATCH,
'uit mtserialnumber ' + da + '; mt ' + JSON.stringify(ia)
).setEntity(ia);
try {
Ra = Fb(Ia);
} catch (ka) {
throw new cb(V.USERIDTOKEN_USERDATA_INVALID, Ia, ka).setEntity(ia);
}
if (!Ra || 0 == Ra.length) throw new cb(V.USERIDTOKEN_USERDATA_MISSING, Ia).setEntity(ia);
Ca
? U.decrypt(Ra, {
result: function (ka) {
La(fa, function () {
var xa, ya, Ja, Ba, Oa;
xa = Rb(ka, Kb);
try {
ya = JSON.parse(xa);
Ja = ya.issuerdata;
Ba = ya.identity;
} catch (Ga) {
if (Ga instanceof SyntaxError)
throw new xb(V.USERIDTOKEN_USERDATA_PARSE_ERROR, 'userdata ' + xa).setEntity(ia);
throw Ga;
}
if ((Ja && 'object' !== typeof Ja) || 'object' !== typeof Ba)
throw new xb(V.USERIDTOKEN_USERDATA_PARSE_ERROR, 'userdata ' + xa).setEntity(ia);
try {
Oa = ef(Ba);
} catch (Ga) {
throw new cb(V.USERIDTOKEN_IDENTITY_INVALID, 'userdata ' + xa, Ga).setEntity(ia);
}
Ba = new ha(pa, ta, Ca);
new Qc(ba, Fa, Pa, ia, oa, Ja, Oa, Ba, fa);
});
},
error: function (ka) {
La(fa, function () {
ka instanceof cb && ka.setEntity(ia);
throw ka;
});
},
})
: ((W = new ha(pa, ta, Ca)), new Qc(ba, Fa, Pa, ia, oa, null, null, W, fa));
});
},
error: function (Ca) {
La(fa, function () {
Ca instanceof cb && Ca.setEntity(ia);
throw Ca;
});
},
});
});
};
})();
(function () {
function ha(ca, ia) {
var fa, U, Y;
fa = ca.tokendata;
if ('string' !== typeof fa) throw new xb(V.JSON_PARSE_ERROR, 'servicetoken ' + JSON.stringify(ca));
try {
U = Fb(fa);
} catch (sa) {
throw new cb(V.SERVICETOKEN_TOKENDATA_INVALID, 'servicetoken ' + JSON.stringify(ca), sa);
}
if (!U || 0 == U.length) throw new xb(V.SERVICETOKEN_TOKENDATA_MISSING, 'servicetoken ' + JSON.stringify(ca));
try {
Y = JSON.parse(Rb(U, Kb)).name;
} catch (sa) {
if (sa instanceof SyntaxError) throw new xb(V.JSON_PARSE_ERROR, 'servicetoken ' + JSON.stringify(ca), sa);
throw sa;
}
if (!Y) throw new xb(V.JSON_PARSE_ERROR, 'servicetoken ' + JSON.stringify(ca));
return ia[Y] ? ia[Y] : ia[''];
}
function ba(ca, ia, fa) {
this.tokendata = ca;
this.signature = ia;
this.verified = fa;
}
zc = Bb.Class.create({
init: function (ca, ia, fa, U, Y, sa, pa, ta, Ca, ua) {
var qa;
qa = this;
La(
ua,
function () {
var W, aa, da, oa, Ia;
if (U && Y && !Y.isBoundTo(U))
throw new ub(
'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.'
);
W = U ? U.serialNumber : -1;
aa = Y ? Y.serialNumber : -1;
if (Ca)
return (
(Ia = Ca.tokendata),
Object.defineProperties(this, {
ctx: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
name: { value: ia, writable: !1, configurable: !1 },
mtSerialNumber: { value: W, writable: !1, configurable: !1 },
uitSerialNumber: { value: aa, writable: !1, configurable: !1 },
data: { value: fa, writable: !1, configurable: !1 },
encrypted: { value: sa, writable: !1, enumerable: !1, configurable: !1 },
compressionAlgo: { value: pa, writable: !1, configurable: !1 },
verified: { value: Ca.verified, writable: !1, enumerable: !1, configurable: !1 },
tokendata: { value: Ia, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: Ca.signature, writable: !1, enumerable: !1, configurable: !1 },
}),
this
);
if (pa) {
da = $d(pa, fa);
da.length < fa.length || ((pa = null), (da = fa));
} else (pa = null), (da = fa);
oa = {};
oa.name = ia;
-1 != W && (oa.mtserialnumber = W);
-1 != aa && (oa.uitserialnumber = aa);
oa.encrypted = sa;
pa && (oa.compressionalgo = pa);
if (sa && 0 < da.length)
ta.encrypt(da, {
result: function (Fa) {
La(
ua,
function () {
var Pa;
oa.servicedata = Cb(Fa);
Pa = Qb(JSON.stringify(oa), Kb);
ta.sign(Pa, {
result: function (Ra) {
La(
ua,
function () {
Object.defineProperties(this, {
ctx: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
name: { value: ia, writable: !1, configurable: !1 },
mtSerialNumber: { value: W, writable: !1, configurable: !1 },
uitSerialNumber: { value: aa, writable: !1, configurable: !1 },
data: { value: fa, writable: !1, configurable: !1 },
encrypted: { value: sa, writable: !1, enumerable: !1, configurable: !1 },
compressionAlgo: { value: pa, writable: !1, configurable: !1 },
verified: { value: !0, writable: !1, enumerable: !1, configurable: !1 },
tokendata: { value: Pa, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: Ra, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
qa
);
},
error: function (Ra) {
La(ua, function () {
Ra instanceof cb && (Ra.setEntity(U), Ra.setUser(Y));
throw Ra;
});
},
});
},
qa
);
},
error: function (Fa) {
La(ua, function () {
Fa instanceof cb && (Fa.setEntity(U), Fa.setUser(Y));
throw Fa;
});
},
});
else {
oa.servicedata = Cb(da);
Ia = Qb(JSON.stringify(oa), Kb);
ta.sign(Ia, {
result: function (Fa) {
La(
ua,
function () {
Object.defineProperties(this, {
ctx: { value: ca, writable: !1, enumerable: !1, configurable: !1 },
name: { value: ia, writable: !1, configurable: !1 },
mtSerialNumber: { value: W, writable: !1, configurable: !1 },
uitSerialNumber: { value: aa, writable: !1, configurable: !1 },
data: { value: fa, writable: !1, configurable: !1 },
encrypted: { value: sa, writable: !1, enumerable: !1, configurable: !1 },
compressionAlgo: { value: pa, writable: !1, configurable: !1 },
verified: { value: !0, writable: !1, enumerable: !1, configurable: !1 },
tokendata: { value: Ia, writable: !1, enumerable: !1, configurable: !1 },
signature: { value: Fa, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
qa
);
},
error: function (Fa) {
La(ua, function () {
Fa instanceof cb && (Fa.setEntity(U), Fa.setUser(Y));
throw Fa;
});
},
});
}
},
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 (ca) {
return ca
? ca instanceof cc
? ca.serialNumber == this.mtSerialNumber
: ca instanceof Qc
? ca.serialNumber == this.uitSerialNumber
: !1
: !1;
},
isUserIdTokenBound: function () {
return -1 != this.uitSerialNumber;
},
isUnbound: function () {
return -1 == this.mtSerialNumber && -1 == this.uitSerialNumber;
},
toJSON: function () {
var ca;
ca = {};
ca.tokendata = Cb(this.tokendata);
ca.signature = Cb(this.signature);
return ca;
},
equals: function (ca) {
return this === ca
? !0
: ca instanceof zc
? this.name == ca.name &&
this.mtSerialNumber == ca.mtSerialNumber &&
this.uitSerialNumber == ca.uitSerialNumber
: !1;
},
uniqueKey: function () {
return this.name + ':' + this.mtSerialNumber + ':' + this.uitSerialNumber;
},
});
tc = function (ca, ia, fa, U, Y, sa, pa, ta, Ca) {
new zc(ca, ia, fa, U, Y, sa, pa, ta, null, Ca);
};
vd = function (ca, ia, fa, U, Y, sa) {
La(sa, function () {
var pa, ta, Ca, ua, qa, W, aa, da, oa, Ia, Fa, Pa, Ra;
!Y || Y instanceof Rc || (Y = ha(ia, Y));
pa = ia.tokendata;
ta = ia.signature;
if ('string' !== typeof pa || 'string' !== typeof ta)
throw new xb(V.JSON_PARSE_ERROR, 'servicetoken ' + JSON.stringify(ia)).setEntity(fa).setEntity(U);
try {
Ca = Fb(pa);
} catch (ka) {
throw new cb(V.SERVICETOKEN_TOKENDATA_INVALID, 'servicetoken ' + JSON.stringify(ia), ka)
.setEntity(fa)
.setEntity(U);
}
if (!Ca || 0 == Ca.length)
throw new xb(V.SERVICETOKEN_TOKENDATA_MISSING, 'servicetoken ' + JSON.stringify(ia))
.setEntity(fa)
.setEntity(U);
try {
ua = Fb(ta);
} catch (ka) {
throw new cb(V.SERVICETOKEN_SIGNATURE_INVALID, 'servicetoken ' + JSON.stringify(ia), ka)
.setEntity(fa)
.setEntity(U);
}
qa = Rb(Ca, Kb);
try {
W = JSON.parse(qa);
aa = W.name;
da = W.mtserialnumber ? parseInt(W.mtserialnumber) : -1;
oa = W.uitserialnumber ? parseInt(W.uitserialnumber) : -1;
Ia = W.encrypted;
Fa = W.compressionalgo;
Pa = W.servicedata;
} catch (ka) {
if (ka instanceof SyntaxError)
throw new xb(V.JSON_PARSE_ERROR, 'servicetokendata ' + qa, ka).setEntity(fa).setEntity(U);
throw ka;
}
if (
!aa ||
'number' !== typeof da ||
da != da ||
'number' !== typeof oa ||
oa != oa ||
'boolean' !== typeof Ia ||
(Fa && 'string' !== typeof Fa) ||
'string' !== typeof Pa
)
throw new xb(V.JSON_PARSE_ERROR, 'servicetokendata ' + qa).setEntity(fa).setEntity(U);
if ((W.mtserialnumber && 0 > da) || da > Lb)
throw new cb(V.SERVICETOKEN_MASTERTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, 'servicetokendata ' + qa)
.setEntity(fa)
.setEntity(U);
if ((W.uitserialnumber && 0 > oa) || oa > Lb)
throw new cb(V.SERVICETOKEN_USERIDTOKEN_SERIAL_NUMBER_OUT_OF_RANGE, 'servicetokendata ' + qa)
.setEntity(fa)
.setEntity(U);
if (-1 != da && (!fa || da != fa.serialNumber))
throw new cb(V.SERVICETOKEN_MASTERTOKEN_MISMATCH, 'st mtserialnumber ' + da + '; mt ' + fa)
.setEntity(fa)
.setEntity(U);
if (-1 != oa && (!U || oa != U.serialNumber))
throw new cb(V.SERVICETOKEN_USERIDTOKEN_MISMATCH, 'st uitserialnumber ' + oa + '; uit ' + U)
.setEntity(fa)
.setEntity(U);
Ia = !0 === Ia;
if (Fa) {
if (!Dc[Fa]) throw new cb(V.UNIDENTIFIED_COMPRESSION, Fa);
Ra = Fa;
} else Ra = null;
Y
? Y.verify(Ca, ua, {
result: function (ka) {
La(sa, function () {
var xa, ya;
if (ka) {
try {
xa = Fb(Pa);
} catch (Ja) {
throw new cb(V.SERVICETOKEN_SERVICEDATA_INVALID, 'servicetokendata ' + qa, Ja)
.setEntity(fa)
.setEntity(U);
}
if (!xa || (0 != Pa.length && 0 == xa.length))
throw new cb(V.SERVICETOKEN_SERVICEDATA_INVALID, 'servicetokendata ' + qa)
.setEntity(fa)
.setEntity(U);
if (Ia && 0 < xa.length)
Y.decrypt(xa, {
result: function (Ja) {
La(sa, function () {
var Ba, Oa;
Ba = Ra ? wd(Ra, Ja) : Ja;
Oa = new ba(Ca, ua, ka);
new zc(ca, aa, Ba, -1 != da ? fa : null, -1 != oa ? U : null, Ia, Ra, Y, Oa, sa);
});
},
error: function (Ja) {
La(sa, function () {
Ja instanceof cb && (Ja.setEntity(fa), Ja.setUser(U));
throw Ja;
});
},
});
else {
xa = Ra ? wd(Ra, xa) : xa;
ya = new ba(Ca, ua, ka);
new zc(ca, aa, xa, -1 != da ? fa : null, -1 != oa ? U : null, Ia, Ra, Y, ya, sa);
}
} else (xa = '' == Pa ? new Uint8Array(0) : null), (ya = new ba(Ca, ua, ka)), new zc(ca, aa, xa, -1 != da ? fa : null, -1 != oa ? U : null, Ia, Ra, Y, ya, sa);
});
},
error: function (ka) {
La(sa, function () {
ka instanceof cb && (ka.setEntity(fa), ka.setUser(U));
throw ka;
});
},
})
: ((pa = '' == Pa ? new Uint8Array(0) : null),
(ta = new ba(Ca, ua, !1)),
new zc(ca, aa, pa, -1 != da ? fa : null, -1 != oa ? U : null, Ia, Ra, Y, ta, sa));
});
};
})();
$b = {
EMAIL_PASSWORD: 'EMAIL_PASSWORD',
NETFLIXID: 'NETFLIXID',
SSO: 'SSO',
SWITCH_PROFILE: 'SWITCH_PROFILE',
MDX: 'MDX',
};
Object.freeze($b);
(function () {
wc = Bb.Class.create({
init: function (ha) {
Object.defineProperties(this, { scheme: { value: ha, writable: !1, configurable: !1 } });
},
getAuthData: function () {},
equals: function (ha) {
return this === ha ? !0 : ha instanceof wc ? this.scheme == ha.scheme : !1;
},
toJSON: function () {
var ha;
ha = {};
ha.scheme = this.scheme;
ha.authdata = this.getAuthData();
return ha;
},
});
Ue = function (ha, ba, ca, ia) {
La(ia, function () {
var fa, U, Y;
fa = ca.scheme;
U = ca.authdata;
if (!fa || !U) throw new xb(V.JSON_PARSE_ERROR, 'userauthdata ' + JSON.stringify(ca));
if (!$b[fa]) throw new Hb(V.UNIDENTIFIED_USERAUTH_SCHEME, fa);
Y = ha.getUserAuthenticationFactory(fa);
if (!Y) throw new Hb(V.USERAUTH_FACTORY_NOT_FOUND, fa);
Y.createData(ha, ba, U, ia);
});
};
})();
bd = Bb.Class.create({
init: function (ha) {
Object.defineProperties(this, { scheme: { value: ha, writable: !1, configurable: !1 } });
},
createData: function (ha, ba, ca, ia) {},
authenticate: function (ha, ba, ca, ia) {},
});
(function () {
Lc = wc.extend({
init: function ia(ba, ca) {
ia.base.call(this, $b.NETFLIXID);
Object.defineProperties(this, {
netflixId: { value: ba, writable: !1, configurable: !1 },
secureNetflixId: { value: ca, writable: !1, configurable: !1 },
});
},
getAuthData: function () {
var ba;
ba = {};
ba.netflixid = this.netflixId;
this.secureNetflixId && (ba.securenetflixid = this.secureNetflixId);
return ba;
},
equals: function ia(ca) {
return this === ca
? !0
: ca instanceof Lc
? ia.base.call(this, ca) && this.netflixId == ca.netflixId && this.secureNetflixId == ca.secureNetflixId
: !1;
},
});
ff = function (ca) {
var ia, fa;
ia = ca.netflixid;
fa = ca.securenetflixid;
if (!ia) throw new xb(V.JSON_PARSE_ERROR, 'NetflixId authdata ' + JSON.stringify(ca));
return new Lc(ia, fa);
};
})();
Of = bd.extend({
init: function ba() {
ba.base.call(this, $b.NETFLIXID);
},
createData: function (ba, ca, ia, fa) {
La(fa, function () {
return ff(ia);
});
},
authenticate: function (ba, ca, ia, fa) {
if (!(ia instanceof Lc)) throw new ub('Incorrect authentication data type ' + ia + '.');
ba = ia.secureNetflixId;
if (!ia.netflixId || !ba) throw new Hb(V.NETFLIXID_COOKIES_BLANK).setUser(ia);
throw new Hb(V.UNSUPPORTED_USERAUTH_DATA, this.scheme).setUser(ia);
},
});
(function () {
cd = wc.extend({
init: function fa(ca, ia) {
fa.base.call(this, $b.EMAIL_PASSWORD);
Object.defineProperties(this, {
email: { value: ca, writable: !1, configurable: !1 },
password: { value: ia, writable: !1, configurable: !1 },
});
},
getAuthData: function () {
var ca;
ca = {};
ca.email = this.email;
ca.password = this.password;
return ca;
},
equals: function fa(ia) {
return this === ia
? !0
: ia instanceof cd
? fa.base.call(this, this, ia) && this.email == ia.email && this.password == ia.password
: !1;
},
});
gf = function (ia) {
var fa, U;
fa = ia.email;
U = ia.password;
if (!fa || !U) throw new xb(V.JSON_PARSE_ERROR, 'email/password authdata ' + JSON.stringify(ia));
return new cd(fa, U);
};
})();
Pf = bd.extend({
init: function ca() {
ca.base.call(this, $b.EMAIL_PASSWORD);
},
createData: function (ca, ia, fa, U) {
La(U, function () {
return gf(fa);
});
},
authenticate: function (ca, ia, fa, U) {
if (!(fa instanceof cd)) throw new ub('Incorrect authentication data type ' + fa + '.');
ca = fa.password;
if (!fa.email || !ca) throw new Hb(V.EMAILPASSWORD_BLANK).setUser(fa);
throw new Hb(V.UNSUPPORTED_USERAUTH_DATA, this.scheme).setUser(fa);
},
});
(function () {
var U, Y, sa, pa, ta, Ca, ua, qa;
function ca(W, aa) {
return '<' + W + '>' + aa + '</' + W + '>';
}
function ia(W) {
return W.replace(/[<>&"']/g, function (aa) {
return ta[aa];
});
}
function fa(W) {
return encodeURIComponent(W)
.replace('%20', '+')
.replace(/[!'()]/g, escape)
.replace(/\*/g, '%2A');
}
U = zd = { MSL: 'MSL', NTBA: 'NTBA', MSL_LEGACY: 'MSL_LEGACY' };
Y = Bb.Class.create({
getAction: function () {},
getNonce: function () {},
getPin: function () {},
getSignature: function () {},
getEncoding: function () {},
equals: function () {},
});
sa = be = Y.extend({
init: function (W, aa, da, oa, Ia, Fa, Pa) {
var xa;
function Ra(ya) {
La(
Pa,
function () {
var Ja, Ba;
try {
Ja = {};
Ja.useridtoken = W;
Ja.action = aa;
Ja.nonce = da;
Ja.pin = Cb(ya);
Ba = Qb(JSON.stringify(Ja), Kb);
} catch (Oa) {
throw new xb(V.JSON_ENCODE_ERROR, 'MSL-based MDX authdata', Oa);
}
Ia.sign(Ba, {
result: function (Oa) {
ka(Ba, Oa);
},
error: Pa.error,
});
},
xa
);
}
function ka(ya, Ja) {
La(
Pa,
function () {
Object.defineProperties(this, {
_userIdToken: { value: W, writable: !1, enumerable: !1, configurable: !1 },
_action: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
_nonce: { value: da, writable: !1, enumerable: !1, configurable: !1 },
_pin: { value: oa, writable: !1, enumerable: !1, configurable: !1 },
_encoding: { value: ya, writable: !1, enumerable: !1, configurable: !1 },
_signature: { value: Ja, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
xa
);
}
xa = this;
La(
Pa,
function () {
Fa
? ka(Fa.encoding, Fa.signature)
: Ia.encrypt(Qb(oa, Kb), {
result: function (ya) {
Ra(ya);
},
error: Pa.error,
});
},
xa
);
},
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 (W) {
return this === W
? !0
: W instanceof sa
? this._action == W._action &&
this._nonce == W._nonce &&
this._pin == W._pin &&
this._userIdToken.equals(W._userIdToken)
: !1;
},
});
be.ACTION = 'userauth';
pa = function (W, aa, da, oa, Ia) {
function Fa(Ra) {
La(Ia, function () {
var ka, xa, ya, Ja, Ba, Oa;
ka = Rb(da, Kb);
try {
xa = JSON.parse(ka);
ya = xa.useridtoken;
Ja = xa.action;
Ba = xa.nonce;
Oa = xa.pin;
} catch (Ga) {
if (Ga instanceof SyntaxError) throw new xb(V.JSON_PARSE_ERROR, 'MDX authdata ' + ka, Ga);
throw Ga;
}
if (
!(ya && 'object' === typeof ya && Ja && 'string' === typeof Ja && Ba && 'number' === typeof Ba && Oa) ||
'string' !== typeof Oa
)
throw new xb(V.JSON_PARSE_ERROR, 'MDX authdata ' + ka);
Ic(W, ya, aa, {
result: function (Ga) {
La(Ia, function () {
if (!Ga.isDecrypted()) throw new Hb(V.USERAUTH_USERIDTOKEN_NOT_DECRYPTED, 'MDX authdata ' + ka);
Pa(Ra, Ga, Ja, Ba, Oa);
});
},
error: function (Ga) {
La(Ia, function () {
if (Ga instanceof cb) throw new Hb(V.USERAUTH_USERIDTOKEN_INVALID, 'MDX authdata ' + ka, Ga);
throw Ga;
});
},
});
});
}
function Pa(Ra, ka, xa, ya, Ja) {
La(Ia, function () {
var Ba;
Ba = Fb(Ja);
Ra.decrypt(Ba, {
result: function (Oa) {
La(Ia, function () {
var Ga;
Ga = Rb(Oa, Kb);
new sa(ka, xa, ya, Ga, null, { encoding: da, signature: oa }, Ia);
});
},
error: Ia.error,
});
});
}
La(Ia, function () {
var Ra, ka;
try {
Ra = W.getMslStore().getCryptoContext(aa);
ka = Ra ? Ra : new dc(W, aa);
} catch (xa) {
if (xa instanceof Fc) throw new Hb(V.USERAUTH_MASTERTOKEN_NOT_DECRYPTED, 'MDX authdata ' + Cb(da));
throw xa;
}
ka.verify(da, oa, {
result: function (xa) {
La(Ia, function () {
if (!xa) throw new tb(V.MDX_USERAUTH_VERIFICATION_FAILED, 'MDX authdata ' + Cb(da));
Fa(ka);
});
},
error: Ia.error,
});
});
};
ta = { '<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;', "'": '&apos;' };
Ca = dd = Y.extend({
init: function (W, aa, da, oa) {
var Ia, Fa;
Ia = ca('action', ia(W));
Fa = ca('nonce', aa.toString());
da = ca('pin', da);
Ia = ca('registerdata', Ia + Fa + da);
Ia = Qb(Ia, 'utf-8');
Object.defineProperties(this, {
_action: { value: W, writable: !1, enumerable: !1, configurable: !1 },
_nonce: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
_pin: { value: null, writable: !1, enumerable: !1, configurable: !1 },
_encoding: { value: Ia, writable: !1, enumerable: !1, configurable: !1 },
_signature: { value: oa, 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 (W) {
return this === W
? !0
: W instanceof Ca
? this._action == W._action && this._nonce == W._nonce && this._pin == W._pin
: !1;
},
});
dd.ACTION = 'regpairrequest';
ua = ce = Y.extend({
init: function (W, aa, da, oa, Ia, Fa) {
var ka;
function Pa(xa) {
La(
Fa,
function () {
var ya, Ja, Ba, Oa, Ga;
ya = Cb(xa);
Ja = ca('action', ia(W));
Ba = ca('nonce', aa.toString());
Oa = ca('pin', ya);
Ja = ca('registerdata', Ja + Ba + Oa);
Ga = Qb(Ja, 'utf-8');
ya = 'action=' + fa(W) + '&nonce=' + fa(aa.toString()) + '&pin=' + fa(ya);
oa.sign(Qb(ya, 'utf-8'), {
result: function (Ua) {
Ra(Ga, Ua);
},
error: Fa.error,
});
},
ka
);
}
function Ra(xa, ya) {
La(
Fa,
function () {
Object.defineProperties(this, {
_action: { value: W, writable: !1, enumerable: !1, configurable: !1 },
_nonce: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
_pin: { value: da, writable: !1, enumerable: !1, configurable: !1 },
_encoding: { value: xa, writable: !1, enumerable: !1, configurable: !1 },
_signature: { value: ya, writable: !1, enumerable: !1, configurable: !1 },
});
return this;
},
ka
);
}
ka = this;
La(
Fa,
function () {
Ia
? Ra(Ia.encoding, Ia.signature)
: oa.encrypt(Qb(da, 'utf-8'), {
result: function (xa) {
Pa(xa);
},
error: Fa.error,
});
},
ka
);
},
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 (W) {
return this === W
? !0
: W instanceof ua
? this._action == W._action && this._nonce == W._nonce && this._pin == W._pin
: !1;
},
});
ce.ACTION = dd.ACTION;
qa = function (W, aa, da, oa, Ia) {
La(Ia, function () {
var Fa, Pa, Ra, ka, xa, ya, Ja;
Fa = W.getMslStore().getCryptoContext(aa);
Pa = Fa ? Fa : new dc(W, aa);
Fa = Rb(da, 'utf-8');
Ra = new DOMParser().parseFromString(Fa, 'application/xml');
Fa = Ra.getElementsByTagName('action');
ka = Ra.getElementsByTagName('nonce');
Ra = Ra.getElementsByTagName('pin');
xa = Fa && 1 == Fa.length && Fa[0].firstChild ? Fa[0].firstChild.nodeValue : null;
ya = ka && 1 == ka.length && ka[0].firstChild ? parseInt(ka[0].firstChild.nodeValue) : null;
Ja = Ra && 1 == Ra.length && Ra[0].firstChild ? Ra[0].firstChild.nodeValue : null;
if (!xa || !ya || !Ja) throw new xb(V.XML_PARSE_ERROR, 'MDX authdata ' + Cb(da));
Fa = 'action=' + fa(xa) + '&nonce=' + fa(ya.toString()) + '&pin=' + fa(Ja);
Pa.verify(Qb(Fa, 'utf-8'), oa, {
result: function (Ba) {
La(Ia, function () {
var Oa;
if (!Ba) throw new tb(V.MDX_USERAUTH_VERIFICATION_FAILED, 'MDX authdata ' + Cb(da));
Oa = Fb(Ja);
Pa.decrypt(Oa, {
result: function (Ga) {
La(Ia, function () {
var Ua;
Ua = Rb(Ga, 'utf-8');
new ua(xa, ya, Ua, null, { encoding: da, signature: oa }, Ia);
});
},
error: Ia.error,
});
});
},
error: Ia.error,
});
});
};
Uc = wc.extend({
init: function Ra(aa, da, oa, Ia, Fa, Pa) {
var ka, xa, ya, Ja, Ba, Oa;
Ra.base.call(this, $b.MDX);
ka = null;
xa = null;
ya = null;
if ('string' === typeof oa) (aa = U.MSL_LEGACY), (ya = oa);
else if (oa instanceof Uint8Array) (aa = U.NTBA), (xa = oa);
else if (oa instanceof cc) (aa = U.MSL), (ka = oa);
else
throw new TypeError(
'Controller token ' + oa + ' is not a master token, encrypted CTicket, or MSL token construct.'
);
Ja = oa = null;
Ba = null;
if (Pa) {
Oa = Pa.controllerAuthData;
oa = Oa.getAction();
Ja = Oa.getPin();
Pa = Pa.userIdToken;
Oa instanceof sa ? (Ba = Oa.getUserIdToken().customer) : Pa && (Ba = Pa.customer);
}
Object.defineProperties(this, {
mechanism: { value: aa, writable: !1, configurable: !1 },
action: { value: oa, writable: !1, configurable: !1 },
targetPin: { value: da, writable: !1, configurable: !1 },
controllerPin: { value: Ja, writable: !1, configurable: !1 },
customer: { value: Ba, writable: !1, configurable: !1 },
_masterToken: { value: ka, writable: !1, enumerable: !1, configurable: !1 },
_encryptedCTicket: { value: xa, writable: !1, enumerable: !1, configurable: !1 },
_mslTokens: { value: ya, writable: !1, enumerable: !1, configurable: !1 },
_controllerEncoding: { value: Ia, writable: !1, enumerable: !1, configurable: !1 },
_signature: { value: Fa, writable: !1, enumerable: !1, configurable: !1 },
});
},
getAuthData: function () {
var aa, da;
aa = {};
switch (this.mechanism) {
case U.MSL:
da = JSON.parse(JSON.stringify(this._masterToken));
aa.mastertoken = da;
break;
case U.NTBA:
da = Rb(this._encryptedCTicket, 'utf-8');
aa.cticket = da;
break;
case U.MSL_LEGACY:
aa.cticket = this._mslTokens;
break;
default:
throw new ub('Unsupported MDX mechanism.');
}
aa.pin = this.targetPin;
aa.mdxauthdata = Cb(this._controllerEncoding);
aa.signature = Cb(this._signature);
return aa;
},
equals: function oa(da) {
return this === da
? !0
: da instanceof Uc
? oa.base.call(this, da) &&
(this._masterToken == da._masterToken ||
(this._masterToken && this._masterToken.equals(da._masterToken))) &&
(this._encryptedCTicket == da._encryptedCTicket ||
(this._encryptedCTicket && Vb(this._encryptedCTicket, da._encryptedCTicket))) &&
this._mslTokens == da._mslTokens &&
Vb(this._controllerEncoding, da._controllerEncoding) &&
Vb(this._signature, da._signature)
: !1;
},
});
hf = function (da, oa, Ia) {
function Fa(ka, xa, ya, Ja) {
Hc(da, xa, {
result: function (Ba) {
La(Ia, function () {
if (!Ba.isDecrypted())
throw new Hb(V.USERAUTH_MASTERTOKEN_NOT_DECRYPTED, 'MDX authdata ' + oa.toString());
pa(da, Ba, ya, Ja, {
result: function (Oa) {
La(Ia, function () {
var Ga, Ua;
Ga = Oa.getEncoding();
Ua = Oa.getSignature();
return new Uc(da, ka, Ba, Ga, Ua, { controllerAuthData: Oa, userIdToken: null });
});
},
error: Ia.error,
});
});
},
error: function (Ba) {
La(Ia, function () {
if (Ba instanceof cb)
throw new Hb(V.USERAUTH_MASTERTOKEN_INVALID, 'MDX authdata ' + JSON.stringify(oa), Ba);
throw Ba;
});
},
});
}
function Pa(ka, xa, ya, Ja) {
La(Ia, function () {
throw new Hb(V.UNSUPPORTED_USERAUTH_MECHANISM, 'NtbaControllerData$parse');
});
}
function Ra(ka, xa, ya, Ja) {
function Ba(Ga, Ua) {
La(Ua, function () {
var ab, Xa;
try {
ab = Fb(Ga);
} catch (jb) {
throw new Hb(V.USERAUTH_MASTERTOKEN_INVALID, 'MDX authdata ' + JSON.stringify(oa), jb);
}
if (!ab || 0 == ab.length)
throw new Hb(V.USERAUTH_MASTERTOKEN_MISSING, 'MDX authdata ' + JSON.stringify(oa));
try {
Xa = JSON.parse(Rb(ab, 'utf-8'));
Hc(da, Xa, {
result: function (jb) {
La(Ua, function () {
if (!jb.isDecrypted())
throw new Hb(V.USERAUTH_MASTERTOKEN_NOT_DECRYPTED, 'MDX authdata ' + oa.toString());
return jb;
});
},
error: function (jb) {
La(Ua, function () {
if (jb instanceof cb)
throw new Hb(V.USERAUTH_MASTERTOKEN_INVALID, 'MDX authdata ' + JSON.stringify(oa), jb);
throw jb;
});
},
});
} catch (jb) {
if (jb instanceof SyntaxError)
throw new xb(V.JSON_PARSE_ERROR, 'MDX authdata ' + JSON.stringify(oa), jb);
throw jb;
}
});
}
function Oa(Ga, Ua, ab) {
La(ab, function () {
var Xa, jb;
try {
Xa = Fb(Ga);
} catch (mb) {
throw new Hb(V.USERAUTH_USERIDTOKEN_INVALID, 'MDX authdata ' + JSON.stringify(oa), mb);
}
if (!Xa || 0 == Xa.length)
throw new Hb(V.USERAUTH_USERIDTOKEN_MISSING, 'MDX authdata ' + JSON.stringify(oa));
try {
jb = JSON.parse(Rb(Xa, 'utf-8'));
Ic(da, jb, Ua, {
result: function (mb) {
La(ab, function () {
if (!mb.isDecrypted())
throw new Hb(V.USERAUTH_USERIDTOKEN_NOT_DECRYPTED, 'MDX authdata ' + JSON.stringify(oa));
return mb;
});
},
error: function (mb) {
La(ab, function () {
if (mb instanceof cb)
throw new Hb(V.USERAUTH_USERIDTOKEN_INVALID, 'MDX authdata ' + JSON.stringify(oa), mb);
throw mb;
});
},
});
} catch (mb) {
if (mb instanceof SyntaxError)
throw new xb(V.JSON_PARSE_ERROR, 'MDX authdata ' + JSON.stringify(oa), mb);
throw mb;
}
});
}
La(Ia, function () {
var Ga;
Ga = xa.split(',');
if (3 != Ga.length || '1' != Ga[0])
throw new Hb(V.UNIDENTIFIED_USERAUTH_MECHANISM, 'MDX authdata ' + JSON.stringify(oa));
Ba(Ga[1], {
result: function (Ua) {
Oa(Ga[2], Ua, {
result: function (ab) {
qa(da, Ua, ya, Ja, {
result: function (Xa) {
La(Ia, function () {
return new Uc(da, ka, xa, ya, Ja, { controllerAuthData: Xa, userIdToken: ab });
});
},
error: function (Xa) {
La(Ia, function () {
if (Xa instanceof Fc)
throw new Hb(
V.USERAUTH_MASTERTOKEN_NOT_DECRYPTED,
'MDX authdata ' + JSON.stringify(oa),
Xa
);
throw Xa;
});
},
});
},
error: Ia.error,
});
},
error: Ia.error,
});
});
}
La(Ia, function () {
var ka, xa, ya, Ja, Ba;
ka = oa.pin;
xa = oa.mdxauthdata;
ya = oa.signature;
if (!ka || 'string' !== typeof ka || !xa || 'string' !== typeof xa || !ya || 'string' !== typeof ya)
throw new xb(V.JSON_PARSE_ERROR, 'MDX authdata ' + JSON.stringify(oa));
try {
Ja = Fb(xa);
Ba = Fb(ya);
} catch (Oa) {
throw new Hb(V.MDX_CONTROLLERDATA_INVALID, 'MDX authdata ' + JSON.stringify(oa), Oa);
}
if (oa.mastertoken) {
xa = oa.mastertoken;
if (!xa || 'object' !== typeof xa) throw new xb(V.JSON_PARSE_ERROR, 'MDX authdata ' + JSON.stringify(oa));
Fa(ka, xa, Ja, Ba);
} else if (oa.cticket) {
xa = oa.cticket;
if (!xa || 'string' !== typeof xa) throw new xb(V.JSON_PARSE_ERROR, 'MDX authdata ' + JSON.stringify(oa));
-1 == xa.indexOf(',') ? Pa(ka, xa, Ja, Ba) : Ra(ka, xa, Ja, Ba);
} else throw new Hb(V.UNIDENTIFIED_USERAUTH_MECHANISM, 'MDX authdata ' + JSON.stringify(oa));
});
};
})();
(function () {
var ca, ia, fa;
ca = be.ACTION;
ia = dd.ACTION;
fa = ce.ACTION;
jf = bd.extend({
init: function Y() {
Y.base.call(this, $b.MDX);
},
createData: function (Y, sa, pa, ta) {
hf(Y, pa, ta);
},
authenticate: function (Y, sa, pa, ta) {
if (!(pa instanceof Uc)) throw new ub('Incorrect authentication data type ' + pa.getClass().getName() + '.');
Y = pa.action;
switch (pa.mechanism) {
case zd.MSL:
if (ca != Y) throw new Hb(V.MDX_USERAUTH_ACTION_INVALID).setUser(pa);
break;
case zd.NTBA:
if (ia != Y) throw new Hb(V.MDX_USERAUTH_ACTION_INVALID).setUser(pa);
break;
case zd.MSL_LEGACY:
if (fa != Y) throw new Hb(V.MDX_USERAUTH_ACTION_INVALID).setUser(pa);
}
Y = pa.controllerPin;
sa = pa.targetPin;
if (!Y || !sa) throw new Hb(V.MDX_PIN_BLANK).setUser(pa);
if (Y != sa) throw new Hb(V.MDX_PIN_MISMATCH).setUser(pa);
Y = pa.customer;
if (!Y) throw new Hb(V.MDX_USER_UNKNOWN).setUser(pa);
if (ta && ((ta = ta.customer), !Y.equals(ta)))
throw new Hb(V.USERIDTOKEN_USERAUTH_DATA_MISMATCH, 'uad customer ' + Y + '; uit customer ' + ta).setUser(
pa
);
return Y;
},
});
})();
(function () {
var ca, ia, fa;
ca = {
MICROSOFT_SAML: 'MICROSOFT_SAML',
SAMSUNG: 'SAMSUNG',
MICROSOFT_JWT: 'MICROSOFT_JWT',
GOOGLE_JWT: 'GOOGLE_JWT',
};
ia = lf = Bb.Class.create({
init: function (U, Y) {
Object.defineProperties(this, {
email: { value: U, writable: !1, enumerable: !0, configurable: !1 },
password: { value: Y, writable: !1, enumerable: !0, configurable: !1 },
});
},
});
fa = mf = Bb.Class.create({
init: function (U, Y) {
Object.defineProperties(this, {
netflixId: { value: U, writable: !1, enumerable: !0, configurable: !1 },
secureNetflixId: { value: Y, writable: !1, enumerable: !0, configurable: !1 },
});
},
});
ed = wc.extend({
init: function Ca(Y, sa, pa, ta) {
var ua, qa, W, aa;
Ca.base.call(this, $b.SSO);
ua = null;
qa = null;
W = null;
aa = null;
pa instanceof ia
? ((ua = pa.email), (qa = pa.password))
: pa instanceof fa && ((W = pa.netflixId), (aa = pa.secureNetflixId));
Object.defineProperties(this, {
mechanism: { value: Y, writable: !1, configurable: !1 },
token: { value: sa, writable: !1, configurable: !1 },
email: { value: ua, writable: !1, configurable: !1 },
password: { value: qa, writable: !1, configurable: !1 },
netflixId: { value: W, writable: !1, configurable: !1 },
secureNetflixId: { value: aa, writable: !1, configurable: !1 },
profileGuid: { value: 'undefined' === typeof ta ? null : ta, writable: !1, configurable: !1 },
});
},
getAuthData: function () {
var Y;
Y = {};
Y.mechanism = this.mechanism;
Y.token = Cb(this.token);
this.email && this.password
? ((Y.email = this.email), (Y.password = this.password))
: this.netflixId &&
this.secureNetflixId &&
((Y.netflixid = this.netflixId), (Y.securenetflixid = this.secureNetflixId));
this.profileGuid && (Y.profileguid = this.profileGuid);
return Y;
},
equals: function pa(sa) {
return this === sa
? !0
: sa instanceof ed
? pa.base.call(this, sa) &&
this.mechanism == sa.mechanism &&
Vb(this.token, sa.token) &&
this.email == sa.email &&
this.password == sa.password &&
this.netflixId == sa.netflixId &&
this.secureNetflixId == sa.secureNetflixId &&
this.profileGuid == sa.profileGuid
: !1;
},
});
kf = function (sa) {
var pa, ta, Ca, ua, qa, W, aa, da, oa;
pa = sa.mechanism;
ta = sa.token;
if (!pa || !ta || 'string' !== typeof ta)
throw new xb(V.JSON_PARSE_ERROR, 'SSO authdata ' + JSON.stringify(sa));
if (!ca[pa]) throw new Hb(V.UNIDENTIFIED_USERAUTH_MECHANISM, 'SSO authdata ' + JSON.stringify(sa));
Ca = sa.email;
ua = sa.password;
qa = sa.netflixid;
W = sa.securenetflixid;
aa = sa.profileguid;
if ((Ca && !ua) || (!Ca && ua) || (qa && !W) || (!qa && W) || (Ca && qa))
throw new xb(V.JSON_PARSE_ERROR, 'SSO authdata ' + JSON.stringify(sa));
try {
da = Fb(ta);
} catch (Ia) {
throw new Hb(V.SSOTOKEN_INVALID, 'SSO authdata ' + JSON.stringify(sa), Ia);
}
Ca && ua ? (oa = new ia(Ca, ua)) : qa && W && (oa = new fa(qa, W));
return new ed(pa, da, oa, aa);
};
})();
Qf = bd.extend({
init: function ia() {
ia.base.call(this, $b.SSO);
},
createData: function (ia, fa, U, Y) {
La(Y, function () {
return kf(U);
});
},
authenticate: function (ia, fa, U, Y) {
var sa, pa;
if (!(U instanceof ed)) throw new ub('Incorrect authentication data type ' + U + '.');
ia = U.token;
fa = U.email;
Y = U.password;
sa = U.netflixId;
pa = U.secureNetflixId;
if (!ia || 0 == ia.length) throw new Hb(V.SSOTOKEN_BLANK);
if (!((null === fa && null === Y) || (fa && Y))) throw new Hb(V.EMAILPASSWORD_BLANK);
if (!((null === sa && null === pa) || (sa && pa))) throw new Hb(V.NETFLIXID_COOKIES_BLANK).setUser(U);
throw new Hb(V.UNSUPPORTED_USERAUTH_DATA, this.scheme).setUser(U);
},
});
(function () {
fd = wc.extend({
init: function Y(fa, U) {
Y.base.call(this, $b.SWITCH_PROFILE);
Object.defineProperties(this, {
userIdToken: { value: fa, writable: !1, configurable: !1 },
profileGuid: { value: U, writable: !1, configurable: !1 },
});
},
getAuthData: function () {
var fa;
fa = {};
fa.useridtoken = JSON.parse(JSON.stringify(this.userIdToken));
fa.profileguid = this.profileGuid;
return fa;
},
equals: function Y(U) {
return this == U
? !0
: U instanceof fd
? Y.base.call(this, U) && this.userIdToken.equals(U.userIdToken) && this.profileGuid == U.profileGuid
: !1;
},
});
nf = function (U, Y, sa, pa) {
La(pa, function () {
var ta, Ca;
if (!Y) throw new Hb(V.USERAUTH_MASTERTOKEN_MISSING);
ta = sa.useridtoken;
Ca = sa.profileguid;
if ('object' !== typeof ta || 'string' !== typeof Ca)
throw new xb(V.JSON_PARSE_ERROR, 'switch profile authdata ' + JSON.stringify(sa));
Ic(U, ta, Y, {
result: function (ua) {
La(pa, function () {
if (!ua.isDecrypted())
throw new Hb(V.USERAUTH_USERIDTOKEN_NOT_DECRYPTED, 'switch profile authdata ' + JSON.stringify(sa));
return new fd(ua, Ca);
});
},
error: function (ua) {
pa.error(new Hb(V.USERAUTH_USERIDTOKEN_INVALID, 'switch profile authdata ' + JSON.stringify(sa), ua));
},
});
});
};
})();
Rf = bd.extend({
init: function U(fa) {
U.base.call(this, $b.SWITCH_PROFILE);
Object.defineProperties(this, { _store: { value: fa, writable: !1, enumerable: !1, configurable: !1 } });
},
createData: function (fa, U, Y, sa) {
nf(fa, U, Y, sa);
},
authenticate: function (fa, U, Y, sa) {
if (!(Y instanceof fd)) throw new ub('Incorrect authentication data type ' + Y + '.');
U = Y.userIdToken;
fa = Y.profileGuid;
if (!fa) throw new Hb(NetflixMslError.PROFILEGUID_BLANK).setUserAuthenticationData(Y);
U = U.user;
if (!U) throw new Hb(V.USERAUTH_USERIDTOKEN_NOT_DECRYPTED).setUserAuthenticationData(Y);
fa = this._store.switchUsers(U, fa);
if (!fa) throw new Hb(NetflixMslError.PROFILE_SWITCH_DISALLOWED).setUserAuthenticationData(Y);
if (sa && ((sa = sa.user), !fa.equals(sa)))
throw new Hb(
V.USERIDTOKEN_USERAUTH_DATA_MISMATCH,
'uad user ' + fa + '; uit user ' + sa
).setUserAuthenticationData(Y);
return fa;
},
});
Object.freeze({ ENTITY_REAUTH: Ka.ENTITY_REAUTH, ENTITYDATA_REAUTH: Ka.ENTITYDATA_REAUTH });
Sf = Bb.Class.create({
getTime: function () {},
getRandom: function () {},
isPeerToPeer: function () {},
getMessageCapabilities: function () {},
getEntityAuthenticationData: function (fa, U) {},
getMslCryptoContext: function () {},
getEntityAuthenticationFactory: function (fa) {},
getUserAuthenticationFactory: function (fa) {},
getTokenFactory: function () {},
getKeyExchangeFactory: function (fa) {},
getKeyExchangeFactories: function () {},
getMslStore: function () {},
});
of = Bb.Class.create({
setCryptoContext: function (fa, U) {},
getMasterToken: function () {},
getNonReplayableId: function (fa) {},
getCryptoContext: function (fa) {},
removeCryptoContext: function (fa) {},
clearCryptoContexts: function () {},
addUserIdToken: function (fa, U) {},
getUserIdToken: function (fa) {},
removeUserIdToken: function (fa) {},
clearUserIdTokens: function () {},
addServiceTokens: function (fa) {},
getServiceTokens: function (fa, U) {},
removeServiceTokens: function (fa, U, Y) {},
clearServiceTokens: function () {},
});
(function () {
var fa;
fa = Dc;
$d = function (U, Y) {
var sa;
sa = {};
switch (U) {
case fa.LZW:
return qe(Y, sa);
case fa.GZIP:
return gzip$compress(Y);
default:
throw new cb(V.UNSUPPORTED_COMPRESSION, U);
}
};
wd = function (U, Y, sa) {
switch (U) {
case fa.LZW:
return re(Y);
case fa.GZIP:
return gzip$uncompress(Y);
default:
throw new cb(V.UNSUPPORTED_COMPRESSION, U.name());
}
};
})();
of.extend({
setCryptoContext: function (fa, U) {},
getMasterToken: function () {
return null;
},
getNonReplayableId: function (fa) {
return 1;
},
getCryptoContext: function (fa) {
return null;
},
removeCryptoContext: function (fa) {},
clearCryptoContexts: function () {},
addUserIdToken: function (fa, U) {},
getUserIdToken: function (fa) {
return null;
},
removeUserIdToken: function (fa) {},
clearUserIdTokens: function () {},
addServiceTokens: function (fa) {},
getServiceTokens: function (fa, U) {
if (U) {
if (!fa) throw new cb(V.USERIDTOKEN_MASTERTOKEN_NULL);
if (!U.isBoundTo(fa))
throw new cb(
V.USERIDTOKEN_MASTERTOKEN_MISMATCH,
'uit mtserialnumber ' + U.mtSerialNumber + '; mt ' + fa.serialNumber
);
}
return [];
},
removeServiceTokens: function (fa, U, Y) {
if (Y && U && !Y.isBoundTo(U))
throw new cb(
V.USERIDTOKEN_MASTERTOKEN_MISMATCH,
'uit mtserialnumber ' + Y.masterTokenSerialNumber + '; mt ' + U.serialNumber
);
},
clearServiceTokens: function () {},
});
(function () {
pf = of.extend({
init: function U() {
U.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 (U, Y) {
var sa;
if (Y) {
sa = U.uniqueKey();
this.masterTokens[sa] = U;
this.cryptoContexts[sa] = Y;
} else this.removeCryptoContext(U);
},
getMasterToken: function () {
var U, Y, sa;
U = null;
for (Y in this.masterTokens) {
sa = this.masterTokens[Y];
if (!U || sa.isNewerThan(U)) U = sa;
}
return U;
},
getNonReplayableId: function (U) {
var Y;
U = U.serialNumber;
Y = this.nonReplayableIds[U] !== Ab ? this.nonReplayableIds[U] : 0;
if (0 > Y || Y > Lb) throw new ub('Non-replayable ID ' + Y + ' is outside the valid range.');
Y = Y == Lb ? 0 : Y + 1;
return (this.nonReplayableIds[U] = Y);
},
getCryptoContext: function (U) {
return this.cryptoContexts[U.uniqueKey()];
},
removeCryptoContext: function (U) {
var Y, sa, pa, ta;
Y = U.uniqueKey();
if (this.masterTokens[Y]) {
sa = U.serialNumber;
for (pa in this.masterTokens) {
ta = this.masterTokens[pa];
if (!ta.equals(U) && ta.serialNumber == sa) {
delete this.masterTokens[Y];
delete this.cryptoContexts[Y];
return;
}
}
Object.keys(this.userIdTokens).forEach(function (Ca) {
Ca = this.userIdTokens[Ca];
Ca.isBoundTo(U) && this.removeUserIdToken(Ca);
}, this);
try {
this.removeServiceTokens(null, U, null);
} catch (Ca) {
if (Ca instanceof cb)
throw new ub('Unexpected exception while removing master token bound service tokens.', Ca);
throw Ca;
}
delete this.nonReplayableIds[sa];
delete this.masterTokens[Y];
delete this.cryptoContexts[Y];
}
},
clearCryptoContexts: function () {
[
this.masterTokens,
this.cryptoContexts,
this.nonReplayableIds,
this.userIdTokens,
this.uitServiceTokens,
this.mtServiceTokens,
].forEach(function (U) {
for (var Y in U) {
delete U[Y];
}
}, this);
},
addUserIdToken: function (U, Y) {
var sa, pa;
sa = !1;
for (pa in this.masterTokens) {
if (Y.isBoundTo(this.masterTokens[pa])) {
sa = !0;
break;
}
}
if (!sa) throw new cb(V.USERIDTOKEN_MASTERTOKEN_NOT_FOUND, 'uit mtserialnumber ' + Y.mtSerialNumber);
this.userIdTokens[U] = Y;
},
getUserIdToken: function (U) {
return this.userIdTokens[U];
},
removeUserIdToken: function (U) {
var Y, sa, pa;
Y = null;
for (sa in this.masterTokens) {
pa = this.masterTokens[sa];
if (U.isBoundTo(pa)) {
Y = pa;
break;
}
}
Object.keys(this.userIdTokens).forEach(function (ta) {
if (this.userIdTokens[ta].equals(U)) {
try {
this.removeServiceTokens(null, Y, U);
} catch (Ca) {
if (Ca instanceof cb)
throw new ub('Unexpected exception while removing user ID token bound service tokens.', Ca);
throw Ca;
}
delete this.userIdTokens[ta];
}
}, this);
},
clearUserIdTokens: function () {
for (var U in this.userIdTokens) {
this.removeUserIdToken(this.userIdTokens[U]);
}
},
addServiceTokens: function (U) {
U.forEach(function (Y) {
var sa, pa;
if (Y.isMasterTokenBound()) {
sa = !1;
for (pa in this.masterTokens) {
if (Y.isBoundTo(this.masterTokens[pa])) {
sa = !0;
break;
}
}
if (!sa) throw new cb(V.SERVICETOKEN_MASTERTOKEN_NOT_FOUND, 'st mtserialnumber ' + Y.mtSerialNumber);
}
if (Y.isUserIdTokenBound()) {
sa = !1;
for (var ta in this.userIdTokens) {
if (Y.isBoundTo(this.userIdTokens[ta])) {
sa = !0;
break;
}
}
if (!sa) throw new cb(V.SERVICETOKEN_USERIDTOKEN_NOT_FOUND, 'st uitserialnumber ' + Y.uitSerialNumber);
}
}, this);
U.forEach(function (Y) {
var sa;
if (Y.isUnbound()) this.unboundServiceTokens[Y.uniqueKey()] = Y;
else {
if (Y.isMasterTokenBound()) {
sa = this.mtServiceTokens[Y.mtSerialNumber];
sa || (sa = {});
sa[Y.uniqueKey()] = Y;
this.mtServiceTokens[Y.mtSerialNumber] = sa;
}
Y.isUserIdTokenBound() &&
((sa = this.uitServiceTokens[Y.uitSerialNumber]) || (sa = {}),
(sa[Y.uniqueKey()] = Y),
(this.uitServiceTokens[Y.uitSerialNumber] = sa));
}
}, this);
},
getServiceTokens: function (U, Y) {
var sa, pa, ta;
if (Y) {
if (!U) throw new cb(V.USERIDTOKEN_MASTERTOKEN_NULL);
if (!Y.isBoundTo(U))
throw new cb(
V.USERIDTOKEN_MASTERTOKEN_MISMATCH,
'uit mtserialnumber ' + Y.mtSerialNumber + '; mt ' + U.serialNumber
);
}
sa = {};
for (pa in this.unboundServiceTokens) {
ta = this.unboundServiceTokens[pa];
sa[ta.uniqueKey()] = ta;
}
if (U && (pa = this.mtServiceTokens[U.serialNumber]))
for (var Ca in pa) {
ta = pa[Ca];
ta.isUserIdTokenBound() || (sa[Ca] = ta);
}
if (Y && (Y = this.uitServiceTokens[Y.serialNumber]))
for (var ua in Y) {
Ca = Y[ua];
Ca.isBoundTo(U) && (sa[ua] = Ca);
}
U = [];
for (var qa in sa) {
U.push(sa[qa]);
}
return U;
},
removeServiceTokens: function (U, Y, sa) {
var pa, ta, Ca;
if (sa && Y && !sa.isBoundTo(Y))
throw new cb(
V.USERIDTOKEN_MASTERTOKEN_MISMATCH,
'uit mtserialnumber ' + sa.mtSerialNumber + '; mt ' + Y.serialNumber
);
!U ||
Y ||
sa ||
Object.keys(this.unboundServiceTokens).forEach(function (ua) {
this.unboundServiceTokens[ua].name == U && delete this.unboundServiceTokens[ua];
}, this);
if (Y && !sa && (pa = this.mtServiceTokens[Y.serialNumber])) {
Ca = Object.keys(pa);
Ca.forEach(function (ua) {
var qa;
qa = pa[ua];
(U && qa.name != U) || delete pa[ua];
}, this);
this.mtServiceTokens[Y.serialNumber] = pa;
}
sa &&
(ta = this.uitServiceTokens[sa.serialNumber]) &&
((Y = Object.keys(ta)),
Y.forEach(function (ua) {
var qa;
qa = ta[ua];
(U && qa.name != U) || delete ta[ua];
}, this),
(this.uitServiceTokens[sa.serialNumber] = ta));
},
clearServiceTokens: function () {
[this.unboundServiceTokens, this.mtServiceTokens, this.uitServiceTokens].forEach(function (U) {
for (var Y in U) {
delete U[Y];
}
}, this);
},
});
})();
Af = Lf.extend({
init: function U() {
U.base.call(this);
Object.defineProperties(this, { _contextMap: { value: {}, writable: !1, enumerable: !1, configurable: !1 } });
},
addCryptoContext: function (U, Y) {
Y && U && U.length && ((U = Cb(U)), (this._contextMap[U] = Y));
},
getCryptoContext: function (U) {
return U && U.length ? ((U = Cb(U)), this._contextMap[U] || null) : null;
},
removeCryptoContext: function (U) {
U && U.length && ((U = Cb(U)), delete this._contextMap[U]);
},
});
qf = Df.extend({
init: function Ca(Y, sa, pa, ta) {
Ca.base.call(this, Y);
Object.defineProperties(this, {
_kde: { value: sa, writable: !1, enumerable: !1, configurable: !1 },
_kdh: { value: pa, writable: !1, enumerable: !1, configurable: !1 },
_kdw: { value: ta, writable: !1, enumerable: !1, configurable: !1 },
});
},
getCryptoContext: function (Y, sa) {
if (!(sa instanceof hc)) throw new ub('Incorrect authentication data type ' + JSON.stringify(sa) + '.');
if (sa.identity != this.localIdentity) throw new nc(V.ENTITY_NOT_FOUND, 'mgk ' + sa.identity);
return new pd(Y, this.localIdentity, this._kde, this._kdh, this._kdw);
},
});
Tf = Ef.extend({
init: function ua(sa, pa, ta, Ca) {
ua.base.call(this, sa);
Object.defineProperties(this, {
_kpe: { value: pa, writable: !1, enumerable: !1, configurable: !1 },
_kph: { value: ta, writable: !1, enumerable: !1, configurable: !1 },
_kpw: { value: Ca, writable: !1, enumerable: !1, configurable: !1 },
});
},
getCryptoContext: function (sa, pa) {
if (!(pa instanceof lc)) throw new ub('Incorrect authentication data type ' + JSON.stringify(pa) + '.');
if (pa.identity != this.localIdentity) throw new nc(V.ENTITY_NOT_FOUND, 'psk ' + pa.identity);
return new pd(sa, this.localIdentity, this._kpe, this._kph, this._kpw);
},
});
Vf = pf.extend({
init: function aa(pa, ta, Ca, ua, qa, W) {
aa.base.call(this);
this._log = pa;
this._esn = ta;
this._keyRequestData = Ca;
this._createKeyRequestData = ua;
this._systemKeyName = qa;
this._systemKeyWrapFormat = W;
},
setCryptoContext: function qa(ta, Ca, ua) {
var W;
W = this;
W._log.trace('Adding MasterToken', {
SequenceNumber: ta.sequenceNumber,
SerialNumber: ta.serialNumber,
Expiration: ta.expiration.getTime(),
});
qa.base.call(this, ta, Ca);
!ua &&
(ta = W._createKeyRequestData) &&
(W._log.trace('Generating new keyx request data'),
ta().then(
function (aa) {
W._keyRequestData = aa;
},
function (aa) {
W._log.error('Unable to generate new keyx request data', '' + aa);
}
));
},
addUserIdToken: function qa(Ca, ua) {
this._log.trace('Adding UserIdToken', {
UserId: Ca,
SerialNumber: ua.serialNumber,
MTSerialNumber: ua.mtSerialNumber,
Expiration: ua.expiration.getTime(),
});
qa.base.call(this, Ca, ua);
},
addServiceTokens: function qa(ua) {
qa.base.call(
this,
ua.filter(function (W) {
return !Uf[W.name];
})
);
},
getUserIdTokenKeys: function () {
var ua, qa;
ua = [];
for (qa in this.userIdTokens) {
ua.push(qa);
}
return ua;
},
rekeyUserIdToken: function (ua, qa) {
this.userIdTokens[ua] && ((this.userIdTokens[qa] = this.userIdTokens[ua]), delete this.userIdTokens[ua]);
},
getKeyRequestData: function () {
return this._keyRequestData;
},
getStoreState: function (ua) {
var qa;
qa = this;
La(ua, function () {
var W;
W = qa.getMasterToken();
W
? qa.getKeysForStore(W, {
result: function (aa) {
La(ua, function () {
var da, oa, Ia;
da = qa.userIdTokens;
oa = Object.keys(da).map(function (Fa) {
var Pa;
Pa = da[Fa];
return {
userId: Fa,
userIdTokenJSON: da[Fa].toJSON(),
serviceTokenJSONList: qa.getServiceTokens(W, Pa).map(xf),
};
});
aa.esn = qa._esn;
aa.masterTokenJSON = W.toJSON();
aa.userList = oa;
Ia = qa._keyRequestData.storeData;
Ia &&
Object.keys(Ia).forEach(function (Fa) {
aa[Fa] = Ia[Fa];
});
return aa;
});
},
timeout: ua.timeout,
error: ua.error,
})
: ua.result(null);
});
},
getKeysForStore: function (ua, qa) {
var W;
W = this;
La(qa, function () {
var aa;
aa = W.getCryptoContext(ua);
aa = { encryptionKey: aa.encryptionKey, hmacKey: aa.hmacKey };
if (aa.encryptionKey && aa.hmacKey) {
if (W._systemKeyWrapFormat) W.wrapKeysWithSystemKey(aa, qa);
else return aa;
} else throw new cb(V.INTERNAL_EXCEPTION, 'Unable to get CryptoContext keys');
});
},
wrapKeysWithSystemKey: function (ua, qa) {
var W;
W = this;
ke(this._systemKeyName, {
result: function (aa) {
La(qa, function () {
var da, oa, Ia, Fa;
da = ua.encryptionKey;
oa = ua.hmacKey;
Ia = da[Vc];
Fa = oa[Vc];
if (Ia && Fa) return { wrappedEncryptionKey: Ia, wrappedHmacKey: Fa };
Promise.resolve()
.then(function () {
return Promise.all([
Jb.wrapKey(W._systemKeyWrapFormat, da, aa, aa.algorithm),
Jb.wrapKey(W._systemKeyWrapFormat, oa, aa, aa.algorithm),
]);
})
.then(function (Pa) {
Ia = Cb(Pa[0]);
da[Vc] = Ia;
Fa = Cb(Pa[1]);
oa[Vc] = Fa;
qa.result({ wrappedEncryptionKey: Ia, wrappedHmacKey: Fa });
})
.catch(function (Pa) {
qa.error(new cb(V.INTERNAL_EXCEPTION, 'Error wrapping key with SYSTEM key', Pa));
});
});
},
timeout: qa.timeout,
error: qa.error,
});
},
unwrapKeysWithSystemKey: function (ua, qa) {
var W;
W = this;
ke(this._systemKeyName, {
result: function (aa) {
La(qa, function () {
var da, oa;
da = Fb(ua.wrappedEncryptionKey);
oa = Fb(ua.wrappedHmacKey);
Promise.resolve()
.then(function () {
return Promise.all([
Jb.unwrapKey(W._systemKeyWrapFormat, da, aa, aa.algorithm, jc, !1, xc),
Jb.unwrapKey(W._systemKeyWrapFormat, oa, aa, aa.algorithm, kc, !1, Gc),
]);
})
.then(function (Ia) {
var Fa;
Fa = Ia[0];
Ia = Ia[1];
Fa[Vc] = ua.wrappedEncryptionKey;
Ia[Vc] = ua.wrappedHmacKey;
qa.result({ encryptionKey: Fa, hmacKey: Ia });
})
.catch(function (Ia) {
qa.error(new cb(V.INTERNAL_EXCEPTION, 'Error unwrapping with SYSTEM key', Ia));
});
});
},
timeout: qa.timeout,
error: qa.error,
});
},
loadStoreState: function (ua, qa, W, aa) {
var Ia, Fa;
function da(Pa, Ra) {
var ka;
try {
ka = W.userList.slice();
} catch (xa) {}
ka
? (function ya() {
var Ja;
Ja = ka.shift();
Ja
? Ic(qa, Ja.userIdTokenJSON, Pa, {
result: function (Ba) {
try {
Ia.addUserIdToken(Ja.userId, Ba);
oa(Pa, Ba, Ja.serviceTokenJSONList, { result: ya, timeout: ya, error: ya });
} catch (Oa) {
ya();
}
},
timeout: ya,
error: ya,
})
: Ra.result();
})()
: Ra.result();
}
function oa(Pa, Ra, ka, xa) {
var ya, Ja;
try {
ya = ka.slice();
} catch (Ba) {}
if (ya) {
Ja = Ia.getCryptoContext(Pa);
(function Oa() {
var Ga;
Ga = ya.shift();
Ga
? vd(qa, Ga, Pa, Ra, Ja, {
result: function (Ua) {
Ia.addServiceTokens([Ua]);
Oa();
},
timeout: function () {
Oa();
},
error: function () {
Oa();
},
})
: xa.result();
})();
} else xa.result();
}
Ia = this;
Fa = Ia._log;
W.esn != Ia._esn
? (Fa.error('Esn mismatch, starting fresh'), aa.error())
: (function (Pa) {
var xa, ya, Ja, Ba;
function Ra() {
var Oa;
if (!xa && ya && Ja && Ba) {
xa = !0;
Oa = new dc(qa, ya, ua.esn, { rawKey: Ja }, { rawKey: Ba });
Ia.setCryptoContext(ya, Oa, !0);
Pa.result(ya);
}
}
function ka(Oa, Ga) {
Fa.error(Oa, Ga && '' + Ga);
xa || ((xa = !0), Pa.error());
}
W.masterTokenJSON
? (Hc(qa, W.masterTokenJSON, {
result: function (Oa) {
ya = Oa;
Ra();
},
timeout: function () {
ka('Timeout parsing MasterToken');
},
error: function (Oa) {
ka('Error parsing MasterToken', Oa);
},
}),
Ia._systemKeyWrapFormat
? Ia.unwrapKeysWithSystemKey(W, {
result: function (Oa) {
Ja = Oa.encryptionKey;
Ba = Oa.hmacKey;
Ra();
},
timeout: function () {
ka('Timeout unwrapping keys');
},
error: function (Oa) {
ka('Error unwrapping keys', Oa);
},
})
: Promise.resolve()
.then(function () {
return Jb.encrypt(
{ name: jc.name, iv: new Uint8Array(16) },
W.encryptionKey,
new Uint8Array(1)
);
})
.then(function (Oa) {
Ja = W.encryptionKey;
})
.catch(function (Oa) {
ka('Error loading encryptionKey');
})
.then(function () {
return Jb.sign(kc, W.hmacKey, new Uint8Array(1));
})
.then(function (Oa) {
Ba = W.hmacKey;
Ra();
})
.catch(function (Oa) {
ka('Error loading hmacKey');
}))
: ka('Persisted store is corrupt');
})({
result: function (Pa) {
da(Pa, aa);
},
timeout: aa.timeout,
error: aa.error,
});
},
});
Uf = { 'streaming.servicetokens.movie': !0, 'streaming.servicetokens.license': !0 };
Vc = '$netflix$msl$wrapsys';
Wf = Sf.extend({
init: function (ua, qa, W, aa, da, oa) {
var Ia, Fa;
Ia = new $c([Dc.LZW]);
Fa = new Gf();
Fa.addPublicKey(qa, W);
aa[Mb.RSA] = new Ff(Fa);
qa = {};
qa[$b.EMAIL_PASSWORD] = new Pf();
qa[$b.NETFLIXID] = new Of();
qa[$b.MDX] = new jf();
qa[$b.SSO] = new Qf();
qa[$b.SWITCH_PROFILE] = new Rf();
ua = {
_mslCryptoContext: { value: new Cf(), writable: !0, enumerable: !1, configurable: !1 },
_capabilities: { value: Ia, writable: !1, enumerable: !1, configurable: !1 },
_entityAuthData: { value: da, writable: !0, enumerable: !1, configurable: !1 },
_entityAuthFactories: { value: aa, writable: !1, enumerable: !1, configurable: !1 },
_userAuthFactories: { value: qa, writable: !1, enumerable: !1, configurable: !1 },
_keyExchangeFactories: { value: oa, writable: !1, enumerable: !1, configurable: !1 },
_store: { value: ua, writable: !1, enumerable: !1, configurable: !1 },
};
Object.defineProperties(this, ua);
},
getTime: function () {
return Date.now();
},
getRandom: function () {
return new ve();
},
isPeerToPeer: function () {
return !1;
},
getMessageCapabilities: function () {
return this._capabilities;
},
getEntityAuthenticationData: function (ua, qa) {
qa.result(this._entityAuthData);
},
getMslCryptoContext: function () {
return this._mslCryptoContext;
},
getEntityAuthenticationFactory: function (ua) {
return this._entityAuthFactories[ua];
},
getUserAuthenticationFactory: function (ua) {
return this._userAuthFactories[ua];
},
getTokenFactory: function () {
return null;
},
getKeyExchangeFactory: function (ua) {
return this._keyExchangeFactories.filter(function (qa) {
return qa.scheme == ua;
})[0];
},
getKeyExchangeFactories: function () {
return this._keyExchangeFactories;
},
getMslStore: function () {
return this._store;
},
});
me = cf.extend({
init: function (ua, qa, W, aa) {
this._log = ua;
this._mslContext = qa;
this._mslRequest = W;
this._keyRequestData = aa;
},
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 (ua, qa, W, aa) {
var da, oa;
da = this._mslRequest;
oa = this._mslContext;
La(aa, function () {
var Ia, Fa;
if (ua || !da.shouldSendUserAuthData) return null;
if (da.token) {
da.email
? (Ia = new lf(da.email, da.password))
: da.netflixId && (Ia = new mf(da.netflixId, da.secureNetflixId));
Fa = 'undefined' === typeof da.profileGuid ? null : da.profileGuid;
return new ed(da.mechanism, Qb(da.token), Ia, Fa);
}
return da.email
? new cd(da.email, da.password)
: da.netflixId
? new Lc(da.netflixId, da.secureNetflixId)
: da.mdxControllerToken
? ((Ia = new dd('regpairrequest', da.mdxNonce, da.mdxEncryptedPinB64, da.mdxSignature).getEncoding()),
new Uc(oa, da.mdxPin, da.mdxControllerToken, Ia, da.mdxSignature))
: da.useNetflixUserAuthData
? new Lc()
: da.profileGuid
? ((Ia = da.userId), (Ia = oa.getMslStore().userIdTokens[Ia]), new fd(Ia, da.profileGuid))
: W && da.sendUserAuthIfRequired
? new Lc()
: null;
});
},
getCustomer: function () {
return null;
},
getKeyRequestData: function (ua) {
ua.result(this._mslRequest.allowTokenRefresh ? [this._keyRequestData] : []);
},
updateServiceTokens: function (ua, qa, W) {
var aa, da, oa, Ia, Fa, Pa;
aa = this._log;
da = (this._mslRequest.serviceTokens || []).slice();
oa = this._mslContext;
qa = oa.getMslStore();
Ia = ua.builder.getMasterToken();
Fa = this.getUserId();
Pa = qa.getUserIdToken(Fa);
(function ka() {
var xa;
xa = da.shift();
if (xa)
try {
xa instanceof zc
? (ua.addPrimaryServiceToken(xa), ka())
: vd(oa, xa, Ia, Pa, null, {
result: function (ya) {
try {
ua.addPrimaryServiceToken(ya);
} catch (Ja) {
aa.warn('Exception adding service token', '' + Ja);
}
ka();
},
timeout: function () {
aa.warn('Timeout parsing service token');
ka();
},
error: function (ya) {
aa.warn('Error parsing service token', '' + ya);
ka();
},
});
} catch (ya) {
aa.warn('Exception processing service token', '' + ya);
ka();
}
else W.result(!0);
})();
},
write: function (ua, qa, W) {
var aa;
aa = Qb(this._mslRequest.body);
ua.write(aa, 0, aa.length, qa, {
result: function (da) {
da != aa.length
? W.error(new Tb('Not all data was written to output.'))
: ua.flush(qa, {
result: function () {
W.result(!0);
},
timeout: function () {
W.timeout();
},
error: function (oa) {
W.error(oa);
},
});
},
timeout: function () {
W.timeout();
},
error: function (da) {
W.error(da);
},
});
},
getDebugContext: function () {
this._dc || (this._dc = new Xf(this._log, this._mslRequest));
return this._dc;
},
});
Xf = Nf.extend({
init: function (ua, qa) {
this._log = ua;
this._mslRequest = qa;
},
sentHeader: function (ua) {
this._log.trace(
'Sent MSL header',
le(this._mslRequest, ua),
ua.serviceTokens && ua.serviceTokens.map(yf).join('\n')
);
},
receivedHeader: function (ua) {
var qa, W;
qa = le(this._mslRequest, ua);
W = ua.errorCode;
W
? this._log.warn('Received MSL error header', qa, {
errorCode: W,
errorMessage: ua.errorMessage,
internalCode: ua.internalCode,
})
: this._log.trace('Received MSL header', qa);
},
});
rf = {
PSK: function (ua) {
return Dd(ua, Mb.PSK, Tf, lc, Ud, td);
},
MGK: function (ua) {
return Dd(ua, Mb.MGK, qf, hc, Ud, td);
},
MGK_WITH_FALLBACK: function (ua) {
var qa, W;
switch (ua.esnPrefix) {
case 'GOOGEUR001':
case 'GOOGLEXX01':
case 'GOOGEST001':
case 'GOOGNEW001':
qa = 'PSK';
break;
default:
qa = 'MGK';
}
W = rf[qa];
if (!W) throw new cb(V.INTERNAL_EXCEPTION, 'Invalid fallback authenticationType: ' + qa);
return W(ua);
},
MGK_JWE: function (ua) {
return Dd(ua, Mb.MGK, qf, hc, Ge, Td);
},
JWK_RSA: function (ua) {
return Ed(
ua,
{ name: 'RSA-OAEP', modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]), hash: { name: 'SHA-1' } },
ud.JWK_RSA
);
},
JWK_RSAES: function (ua) {
return Ed(
ua,
{ name: 'RSAES-PKCS1-v1_5', modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]) },
ud.JWK_RSAES
);
},
JWEJS_RSA: function (ua) {
return Ed(
ua,
{ name: 'RSA-OAEP', modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]) },
ud.JWEJS_RSA
);
},
};
ob.netflix = ob.netflix || {};
ob.netflix.msl = {
createMslClient: function (ua, qa) {
var W, aa, da, oa, Ia;
W = ua.log;
Ia = ua.notifyMilestone || function () {};
Promise.resolve()
.then(function () {
if (!(Ob && Ob.generateKey && Ob.importKey && Ob.unwrapKey))
throw new cb(V.INTERNAL_EXCEPTION, 'No WebCrypto');
ac = Ob.generateKey({ name: 'AES-CBC', length: 128 }, !0, xc).then ? kd.V2014_02 : kd.LEGACY;
Ia('mslisik');
return Jb.importKey('spki', ua.serverIdentityKeyData, we, !1, ['verify']);
})
.then(function (Fa) {
return new Promise(function (Pa, Ra) {
Cc(Fa, {
result: Pa,
error: function () {
Ra(new cb(V.KEY_IMPORT_ERROR, 'Unable to create server identity verification key'));
},
});
});
})
.then(function (Fa) {
aa = Fa;
if ((Fa = rf[ua.authenticationType])) return Ia('mslcc'), Fa(ua);
throw new cb(V.INTERNAL_EXCEPTION, 'Invalid authenticationType: ' + ua.authenticationType);
})
.then(function (Fa) {
var Pa;
da = new Vf(
W,
ua.esn,
Fa.keyRequestData,
Fa.createKeyRequestData,
ua.authenticationKeyNames.s,
ua.systemKeyWrapFormat
);
oa = new Wf(
da,
ua.serverIdentityId,
aa,
Fa.entityAuthFactories,
Fa.entityAuthData,
Fa.keyExchangeFactories
);
Pa = ua.storeState;
if (Pa)
return (
Ia('mslss'),
W.info('Loading store state'),
new Promise(function (Ra, ka) {
da.loadStoreState(ua, oa, Pa, { result: Ra, timeout: Ra, error: Ra });
})
);
W.info('No store state, starting fresh');
})
.then(function () {
var Fa;
Fa = new df();
Ia('msldone');
qa.result(new zf(W, Fa, oa, da, ua.ErrorSubCodes));
})
.catch(function (Fa) {
qa.error(Fa);
});
},
IHttpLocation: Jf,
MslIoException: Tb,
};
(function () {
var ab, Xa, jb, mb, nb, qb, rb, zb, wb;
function ua(u) {
var b;
b = 0;
return function () {
return b < u.length ? { done: !1, value: u[b++] } : { done: !0 };
};
}
function qa(u, b) {
var a, h;
if (b)
a: {
a = Xa;
u = u.split('.');
for (var c = 0; c < u.length - 1; c++) {
h = u[c];
if (!(h in a)) break a;
a = a[h];
}
u = u[u.length - 1];
c = a[u];
b = b(c);
b != c && null != b && ab(a, u, { configurable: !0, writable: !0, value: b });
}
}
function W(u) {
u = { next: u };
u[Symbol.iterator] = function () {
return this;
};
return u;
}
function aa(u) {
var b;
b = 'undefined' != typeof Symbol && Symbol.iterator && u[Symbol.iterator];
return b ? b.call(u) : { next: ua(u) };
}
function da(u) {
if (!(u instanceof Array)) {
u = aa(u);
for (var b, a = []; !(b = u.next()).done; ) {
a.push(b.value);
}
u = a;
}
return u;
}
function oa(u, b) {
var c;
u.prototype = jb(b.prototype);
u.prototype.constructor = u;
if (zb) zb(u, b);
else
for (var a in b) {
if ('prototype' != a)
if (Object.defineProperties) {
c = Object.getOwnPropertyDescriptor(b, a);
c && Object.defineProperty(u, a, c);
} else u[a] = b[a];
}
u.Scc = b.prototype;
}
function Ia() {
this.uW = !1;
this.IE = null;
this.mza = void 0;
this.hI = 1;
this.gXa = this.Qub = 0;
this.sT = null;
}
function Fa(u) {
if (u.uW) throw new TypeError('Generator is already running');
u.uW = !0;
}
function Pa(u) {
this.Df = new Ia();
this.gVb = u;
}
function Ra(u, b) {
var a;
Fa(u.Df);
a = u.Df.IE;
if (a)
return ka(
u,
'return' in a
? a['return']
: function (c) {
return { value: c, done: !0 };
},
b,
u.Df.return
);
u.Df.return(b);
return xa(u);
}
function ka(u, b, a, c) {
var h, k;
try {
h = b.call(u.Df.IE, a);
if (!(h instanceof Object)) throw new TypeError('Iterator result ' + h + ' is not an object');
if (!h.done) return (u.Df.uW = !1), h;
k = h.value;
} catch (l) {
return (u.Df.IE = null), u.Df.KZ(l), xa(u);
}
u.Df.IE = null;
c.call(u.Df, k);
return xa(u);
}
function xa(u) {
var b;
for (; u.Df.hI; ) {
try {
b = u.gVb(u.Df);
if (b) return (u.Df.uW = !1), { value: b.value, done: !1 };
} catch (a) {
u.Df.mza = void 0;
u.Df.KZ(a);
}
}
u.Df.uW = !1;
if (u.Df.sT) {
b = u.Df.sT;
u.Df.sT = null;
if (b.CLb) throw b.ZM;
return { value: b.return, done: !0 };
}
return { value: void 0, done: !0 };
}
function ya(u) {
this.next = function (b) {
return u.uX(b);
};
this.throw = function (b) {
return u.KZ(b);
};
this.return = function (b) {
return Ra(u, b);
};
this[Symbol.iterator] = function () {
return this;
};
}
function Ja(u, b) {
b = new ya(new Pa(b));
zb && u.prototype && zb(b, u.prototype);
return b;
}
function Ba(u, b) {
return Object.prototype.hasOwnProperty.call(u, b);
}
function Oa(u, b) {
var a, c, h;
u instanceof String && (u += '');
a = 0;
c = !1;
h = {
next: function () {
var k;
if (!c && a < u.length) {
k = a++;
return { value: b(k, u[k]), done: !1 };
}
c = !0;
return { done: !0, value: void 0 };
},
};
h[Symbol.iterator] = function () {
return h;
};
return h;
}
function Ga(u, b, a) {
var k;
u instanceof String && (u = String(u));
for (var c = u.length, h = 0; h < c; h++) {
k = u[h];
if (b.call(a, k, h, u)) return { Npa: h, EE: k };
}
return { Npa: -1, EE: void 0 };
}
function Ua(u, b, a) {
if (null == u)
throw new TypeError("The 'this' value for String.prototype." + a + ' must not be null or undefined');
if (b instanceof RegExp)
throw new TypeError('First argument to String.prototype.' + a + ' must not be a regular expression');
return u + '';
}
ab =
'function' == typeof Object.defineProperties
? Object.defineProperty
: function (u, b, a) {
if (u == Array.prototype || u == Object.prototype) return u;
u[b] = a.value;
return u;
};
Xa = (function (u) {
var a;
u = [
'object' == typeof globalThis && globalThis,
u,
'object' == typeof ob && ob,
'object' == typeof self && self,
'object' == typeof global && global,
];
for (var b = 0; b < u.length; ++b) {
a = u[b];
if (a && a.Math == Math) return a;
}
throw Error('Cannot find global object');
})(this);
qa('Symbol', function (u) {
var c;
function b(h) {
if (this instanceof b) throw new TypeError('Symbol is not a constructor');
return new a('jscomp_symbol_' + (h || '') + '_' + c++, h);
}
function a(h, k) {
this.wdb = h;
ab(this, 'description', { configurable: !0, writable: !0, value: k });
}
if (u) return u;
a.prototype.toString = function () {
return this.wdb;
};
c = 0;
return b;
});
qa('Symbol.iterator', function (u) {
var c;
if (u) return u;
u = Symbol('Symbol.iterator');
for (
var b =
'Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(
' '
),
a = 0;
a < b.length;
a++
) {
c = Xa[b[a]];
'function' === typeof c &&
'function' != typeof c.prototype[u] &&
ab(c.prototype, u, {
configurable: !0,
writable: !0,
value: function () {
return W(ua(this));
},
});
}
return u;
});
jb =
'function' == typeof Object.create
? Object.create
: function (u) {
function b() {}
b.prototype = u;
return new b();
};
mb = (function () {
var b;
function u() {
function a() {}
new a();
Reflect.construct(a, [], function () {});
return new a() instanceof a;
}
if ('undefined' != typeof Reflect && Reflect.construct) {
if (u()) return Reflect.construct;
b = Reflect.construct;
return function (a, c, h) {
a = b(a, c);
h && Reflect.setPrototypeOf(a, h.prototype);
return a;
};
}
return function (a, c, h) {
void 0 === h && (h = a);
h = jb(h.prototype || Object.prototype);
return Function.prototype.apply.call(a, h, c) || h;
};
})();
if ('function' == typeof Object.setPrototypeOf) nb = Object.setPrototypeOf;
else {
a: {
qb = { a: !0 };
rb = {};
try {
rb.__proto__ = qb;
nb = rb.a;
break a;
} catch (u) {}
nb = !1;
}
nb = nb
? function (u, b) {
u.__proto__ = b;
if (u.__proto__ !== b) throw new TypeError(u + ' is not extensible');
return u;
}
: null;
}
zb = nb;
Ia.prototype.uX = function (u) {
this.mza = u;
};
Ia.prototype.KZ = function (u) {
this.sT = { ZM: u, CLb: !0 };
this.hI = this.Qub || this.gXa;
};
Ia.prototype.return = function (u) {
this.sT = { return: u };
this.hI = this.gXa;
};
Pa.prototype.uX = function (u) {
Fa(this.Df);
if (this.Df.IE) return ka(this, this.Df.IE.next, u, this.Df.uX);
this.Df.uX(u);
return xa(this);
};
Pa.prototype.KZ = function (u) {
Fa(this.Df);
if (this.Df.IE) return ka(this, this.Df.IE['throw'], u, this.Df.uX);
this.Df.KZ(u);
return xa(this);
};
qa('Reflect', function (u) {
return u ? u : {};
});
qa('Reflect.construct', function () {
return mb;
});
qa('Reflect.setPrototypeOf', function (u) {
return u
? u
: zb
? function (b, a) {
try {
return zb(b, a), !0;
} catch (c) {
return !1;
}
}
: null;
});
qa('Object.setPrototypeOf', function (u) {
return u || zb;
});
wb =
'function' == typeof Object.assign
? Object.assign
: function (u, b) {
var c;
for (var a = 1; a < arguments.length; a++) {
c = arguments[a];
if (c)
for (var h in c) {
Ba(c, h) && (u[h] = c[h]);
}
}
return u;
};
qa('Object.assign', function (u) {
return u || wb;
});
qa('Promise', function (u) {
var h, k;
function b(l) {
var d;
this.JP = 0;
this.PY = void 0;
this.yO = [];
this.z1a = !1;
d = this.gla();
try {
l(d.resolve, d.reject);
} catch (f) {
d.reject(f);
}
}
function a() {
this.BC = null;
}
function c(l) {
return l instanceof b
? l
: new b(function (d) {
d(l);
});
}
if (u) return u;
a.prototype.ERa = function (l) {
var d;
if (null == this.BC) {
this.BC = [];
d = this;
this.FRa(function () {
d.fDb();
});
}
this.BC.push(l);
};
h = Xa.setTimeout;
a.prototype.FRa = function (l) {
h(l, 0);
};
a.prototype.fDb = function () {
var l, f;
for (; this.BC && this.BC.length; ) {
l = this.BC;
this.BC = [];
for (var d = 0; d < l.length; ++d) {
f = l[d];
l[d] = null;
try {
f();
} catch (g) {
this.Isb(g);
}
}
}
this.BC = null;
};
a.prototype.Isb = function (l) {
this.FRa(function () {
throw l;
});
};
b.prototype.gla = function () {
var d, f;
function l(g) {
return function (m) {
f || ((f = !0), g.call(d, m));
};
}
d = this;
f = !1;
return { resolve: l(this.oXb), reject: l(this.yva) };
};
b.prototype.oXb = function (l) {
var d;
if (l === this) this.yva(new TypeError('A Promise cannot resolve to itself'));
else if (l instanceof b) this.mZb(l);
else {
a: switch (typeof l) {
case 'object':
d = null != l;
break a;
case 'function':
d = !0;
break a;
default:
d = !1;
}
d ? this.nXb(l) : this.RXa(l);
}
};
b.prototype.nXb = function (l) {
var d;
d = void 0;
try {
d = l.then;
} catch (f) {
this.yva(f);
return;
}
'function' == typeof d ? this.nZb(d, l) : this.RXa(l);
};
b.prototype.yva = function (l) {
this.q$a(2, l);
};
b.prototype.RXa = function (l) {
this.q$a(1, l);
};
b.prototype.q$a = function (l, d) {
if (0 != this.JP)
throw Error('Cannot settle(' + l + ', ' + d + '): Promise already settled in state' + this.JP);
this.JP = l;
this.PY = d;
2 === this.JP && this.UXb();
this.gDb();
};
b.prototype.UXb = function () {
var l;
l = this;
h(function () {
var d;
if (l.$Qb()) {
d = Xa.console;
'undefined' !== typeof d && d.error(l.PY);
}
}, 1);
};
b.prototype.$Qb = function () {
var l, d, f;
if (this.z1a) return !1;
l = Xa.CustomEvent;
d = Xa.Event;
f = Xa.dispatchEvent;
if ('undefined' === typeof f) return !0;
'function' === typeof l
? (l = new l('unhandledrejection', { cancelable: !0 }))
: 'function' === typeof d
? (l = new d('unhandledrejection', { cancelable: !0 }))
: ((l = Xa.document.createEvent('CustomEvent')), l.initCustomEvent('unhandledrejection', !1, !0, l));
l.promise = this;
l.reason = this.PY;
return f(l);
};
b.prototype.gDb = function () {
if (null != this.yO) {
for (var l = 0; l < this.yO.length; ++l) {
k.ERa(this.yO[l]);
}
this.yO = null;
}
};
k = new a();
b.prototype.mZb = function (l) {
var d;
d = this.gla();
l.w4(d.resolve, d.reject);
};
b.prototype.nZb = function (l, d) {
var f;
f = this.gla();
try {
l.call(d, f.resolve, f.reject);
} catch (g) {
f.reject(g);
}
};
b.prototype.then = function (l, d) {
var g, m, n;
function f(p, q) {
return 'function' == typeof p
? function (v) {
try {
g(p(v));
} catch (r) {
m(r);
}
}
: q;
}
n = new b(function (p, q) {
g = p;
m = q;
});
this.w4(f(l, g), f(d, m));
return n;
};
b.prototype.catch = function (l) {
return this.then(void 0, l);
};
b.prototype.w4 = function (l, d) {
var g;
function f() {
switch (g.JP) {
case 1:
l(g.PY);
break;
case 2:
d(g.PY);
break;
default:
throw Error('Unexpected state: ' + g.JP);
}
}
g = this;
null == this.yO ? k.ERa(f) : this.yO.push(f);
this.z1a = !0;
};
b.resolve = c;
b.reject = function (l) {
return new b(function (d, f) {
f(l);
});
};
b.race = function (l) {
return new b(function (d, f) {
for (var g = aa(l), m = g.next(); !m.done; m = g.next()) {
c(m.value).w4(d, f);
}
});
};
b.all = function (l) {
var d, f;
d = aa(l);
f = d.next();
return f.done
? c([])
: new b(function (g, m) {
var p, q;
function n(v) {
return function (r) {
p[v] = r;
q--;
0 == q && g(p);
};
}
p = [];
q = 0;
do {
p.push(void 0);
q++;
c(f.value).w4(n(p.length - 1), m);
f = d.next();
} while (!f.done);
});
};
return b;
});
qa('Array.prototype.keys', function (u) {
return u
? u
: function () {
return Oa(this, function (b) {
return b;
});
};
});
qa('Array.prototype.find', function (u) {
return u
? u
: function (b, a) {
return Ga(this, b, a).EE;
};
});
qa('Math.tanh', function (u) {
return u
? u
: function (b) {
var a;
b = Number(b);
if (0 === b) return b;
a = Math.exp(-2 * Math.abs(b));
a = (1 - a) / (1 + a);
return 0 > b ? -a : a;
};
});
qa('Object.is', function (u) {
return u
? u
: function (b, a) {
return b === a ? 0 !== b || 1 / b === 1 / a : b !== b && a !== a;
};
});
qa('Array.prototype.includes', function (u) {
return u
? u
: function (b, a) {
var c, h, k;
c = this;
c instanceof String && (c = String(c));
h = c.length;
a = a || 0;
for (0 > a && (a = Math.max(a + h, 0)); a < h; a++) {
k = c[a];
if (k === b || Object.is(k, b)) return !0;
}
return !1;
};
});
qa('String.prototype.includes', function (u) {
return u
? u
: function (b, a) {
return -1 !== Ua(this, b, 'includes').indexOf(b, a || 0);
};
});
qa('Number.isNaN', function (u) {
return u
? u
: function (b) {
return 'number' === typeof b && isNaN(b);
};
});
qa('Array.prototype.entries', function (u) {
return u
? u
: function () {
return Oa(this, function (b, a) {
return [b, a];
});
};
});
qa('WeakMap', function (u) {
var l, d;
function b(f) {
this.eW = (d += Math.random() + 1).toString();
if (f) {
f = aa(f);
for (var g; !(g = f.next()).done; ) {
g = g.value;
this.set(g[0], g[1]);
}
}
}
function a() {}
function c(f) {
var g;
g = typeof f;
return ('object' === g && null !== f) || 'function' === g;
}
function h(f) {
var g;
if (!Ba(f, l)) {
g = new a();
ab(f, l, { value: g });
}
}
function k(f) {
var g;
g = Object[f];
g &&
(Object[f] = function (m) {
if (m instanceof a) return m;
Object.isExtensible(m) && h(m);
return g(m);
});
}
if (
(function () {
var f, g, m;
if (!u || !Object.seal) return !1;
try {
f = Object.seal({});
g = Object.seal({});
m = new u([
[f, 2],
[g, 3],
]);
if (2 != m.get(f) || 3 != m.get(g)) return !1;
m.delete(f);
m.set(g, 4);
return !m.has(f) && 4 == m.get(g);
} catch (n) {
return !1;
}
})()
)
return u;
l = '$jscomp_hidden_' + Math.random();
k('freeze');
k('preventExtensions');
k('seal');
d = 0;
b.prototype.set = function (f, g) {
if (!c(f)) throw Error('Invalid WeakMap key');
h(f);
if (!Ba(f, l)) throw Error('WeakMap key fail: ' + f);
f[l][this.eW] = g;
return this;
};
b.prototype.get = function (f) {
return c(f) && Ba(f, l) ? f[l][this.eW] : void 0;
};
b.prototype.has = function (f) {
return c(f) && Ba(f, l) && Ba(f[l], this.eW);
};
b.prototype.delete = function (f) {
return c(f) && Ba(f, l) && Ba(f[l], this.eW) ? delete f[l][this.eW] : !1;
};
return b;
});
qa('Map', function (u) {
var k, l;
function b() {
var d;
d = {};
return (d.PA = d.next = d.head = d);
}
function a(d, f) {
var g;
g = d.$z;
return W(function () {
if (g) {
for (; g.head != d.$z; ) {
g = g.PA;
}
for (; g.next != g.head; ) {
return (g = g.next), { done: !1, value: f(g) };
}
g = null;
}
return { done: !0, value: void 0 };
});
}
function c(d, f) {
var g, m, n;
g = f && typeof f;
'object' == g || 'function' == g
? k.has(f)
? (g = k.get(f))
: ((g = '' + ++l), k.set(f, g))
: (g = 'p_' + f);
m = d.rz[g];
if (m && Ba(d.rz, g))
for (d = 0; d < m.length; d++) {
n = m[d];
if ((f !== f && n.key !== n.key) || f === n.key) return { id: g, list: m, index: d, entry: n };
}
return { id: g, list: m, index: -1, entry: void 0 };
}
function h(d) {
this.rz = {};
this.$z = b();
this.size = 0;
if (d) {
d = aa(d);
for (var f; !(f = d.next()).done; ) {
f = f.value;
this.set(f[0], f[1]);
}
}
}
if (
(function () {
var d, f, g, m;
if (!u || 'function' != typeof u || !u.prototype.entries || 'function' != typeof Object.seal) return !1;
try {
d = Object.seal({ x: 4 });
f = new u(aa([[d, 's']]));
if ('s' != f.get(d) || 1 != f.size || f.get({ x: 4 }) || f.set({ x: 4 }, 't') != f || 2 != f.size)
return !1;
g = f.entries();
m = g.next();
if (m.done || m.value[0] != d || 's' != m.value[1]) return !1;
m = g.next();
return m.done || 4 != m.value[0].x || 't' != m.value[1] || !g.next().done ? !1 : !0;
} catch (n) {
return !1;
}
})()
)
return u;
k = new WeakMap();
h.prototype.set = function (d, f) {
var g;
d = 0 === d ? 0 : d;
g = c(this, d);
g.list || (g.list = this.rz[g.id] = []);
g.entry
? (g.entry.value = f)
: ((g.entry = { next: this.$z, PA: this.$z.PA, head: this.$z, key: d, value: f }),
g.list.push(g.entry),
(this.$z.PA.next = g.entry),
(this.$z.PA = g.entry),
this.size++);
return this;
};
h.prototype.delete = function (d) {
d = c(this, d);
return d.entry && d.list
? (d.list.splice(d.index, 1),
d.list.length || delete this.rz[d.id],
(d.entry.PA.next = d.entry.next),
(d.entry.next.PA = d.entry.PA),
(d.entry.head = null),
this.size--,
!0)
: !1;
};
h.prototype.clear = function () {
this.rz = {};
this.$z = this.$z.PA = b();
this.size = 0;
};
h.prototype.has = function (d) {
return !!c(this, d).entry;
};
h.prototype.get = function (d) {
return (d = c(this, d).entry) && d.value;
};
h.prototype.entries = function () {
return a(this, function (d) {
return [d.key, d.value];
});
};
h.prototype.keys = function () {
return a(this, function (d) {
return d.key;
});
};
h.prototype.values = function () {
return a(this, function (d) {
return d.value;
});
};
h.prototype.forEach = function (d, f) {
for (var g = this.entries(), m; !(m = g.next()).done; ) {
m = m.value;
d.call(f, m[1], m[0], this);
}
};
h.prototype[Symbol.iterator] = h.prototype.entries;
l = 0;
return h;
});
qa('Set', function (u) {
function b(a) {
this.Uw = new Map();
if (a) {
a = aa(a);
for (var c; !(c = a.next()).done; ) {
this.add(c.value);
}
}
this.size = this.Uw.size;
}
if (
(function () {
var a, c, h, k;
if (!u || 'function' != typeof u || !u.prototype.entries || 'function' != typeof Object.seal) return !1;
try {
a = Object.seal({ x: 4 });
c = new u(aa([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;
h = c.entries();
k = h.next();
if (k.done || k.value[0] != a || k.value[1] != a) return !1;
k = h.next();
return k.done || k.value[0] == a || 4 != k.value[0].x || k.value[1] != k.value[0] ? !1 : h.next().done;
} catch (l) {
return !1;
}
})()
)
return u;
b.prototype.add = function (a) {
a = 0 === a ? 0 : a;
this.Uw.set(a, a);
this.size = this.Uw.size;
return this;
};
b.prototype.delete = function (a) {
a = this.Uw.delete(a);
this.size = this.Uw.size;
return a;
};
b.prototype.clear = function () {
this.Uw.clear();
this.size = 0;
};
b.prototype.has = function (a) {
return this.Uw.has(a);
};
b.prototype.entries = function () {
return this.Uw.entries();
};
b.prototype.values = function () {
return this.Uw.values();
};
b.prototype.keys = b.prototype.values;
b.prototype[Symbol.iterator] = b.prototype.values;
b.prototype.forEach = function (a, c) {
var h;
h = this;
this.Uw.forEach(function (k) {
return a.call(c, k, k, h);
});
};
return b;
});
qa('Object.entries', function (u) {
return u
? u
: function (b) {
var a, c;
a = [];
for (c in b) {
Ba(b, c) && a.push([c, b[c]]);
}
return a;
};
});
qa('String.prototype.endsWith', function (u) {
return u
? u
: function (b, a) {
var c;
c = Ua(this, b, 'endsWith');
b += '';
void 0 === a && (a = c.length);
a = Math.max(0, Math.min(a | 0, c.length));
for (var h = b.length; 0 < h && 0 < a; ) {
if (c[--a] != b[--h]) return !1;
}
return 0 >= h;
};
});
qa('String.prototype.repeat', function (u) {
return u
? u
: function (b) {
var a;
a = Ua(this, null, 'repeat');
if (0 > b || 1342177279 < b) throw new RangeError('Invalid count value');
b |= 0;
for (var c = ''; b; ) {
if ((b & 1 && (c += a), (b >>>= 1))) a += a;
}
return c;
};
});
qa('Number.MAX_SAFE_INTEGER', function () {
return 9007199254740991;
});
qa('Array.prototype.values', function (u) {
return u
? u
: function () {
return Oa(this, function (b, a) {
return a;
});
};
});
qa('Object.values', function (u) {
return u
? u
: function (b) {
var a, c;
a = [];
for (c in b) {
Ba(b, c) && a.push(b[c]);
}
return a;
};
});
qa('String.prototype.startsWith', function (u) {
return u
? u
: function (b, a) {
var c, h, k;
c = Ua(this, b, 'startsWith');
b += '';
h = c.length;
k = b.length;
a = Math.max(0, Math.min(a | 0, c.length));
for (var l = 0; l < k && a < h; ) {
if (c[a++] != b[l++]) return !1;
}
return l >= k;
};
});
qa('Array.prototype.findIndex', function (u) {
return u
? u
: function (b, a) {
return Ga(this, b, a).Npa;
};
});
qa('String.fromCodePoint', function (u) {
return u
? u
: function (b) {
var h;
for (var a = '', c = 0; c < arguments.length; c++) {
h = Number(arguments[c]);
if (0 > h || 1114111 < h || h !== Math.floor(h)) throw new RangeError('invalid_code_point ' + h);
65535 >= h
? (a += String.fromCharCode(h))
: ((h -= 65536),
(a += String.fromCharCode(((h >>> 10) & 1023) | 55296)),
(a += String.fromCharCode((h & 1023) | 56320)));
}
return a;
};
});
qa('Number.parseInt', function (u) {
return u || parseInt;
});
qa('Number.isFinite', function (u) {
return u
? u
: function (b) {
return 'number' !== typeof b ? !1 : !isNaN(b) && Infinity !== b && -Infinity !== b;
};
});
(function (u) {
var a;
function b(c) {
var h;
if (a[c]) return a[c].exports;
h = a[c] = { Npa: c, NMb: !1, exports: {} };
u[c].call(h.exports, h, h.exports, b);
h.NMb = !0;
return h.exports;
}
a = {};
b.Oac = u;
b.c = a;
b.d = function (c, h, k) {
b.kRb(c, h) || Object.defineProperty(c, h, { enumerable: !0, get: k });
};
b.r = function (c) {
'undefined' !== typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(c, Symbol.toStringTag, { value: 'Module' });
Object.defineProperty(c, '__esModule', { value: !0 });
};
b.t = function (c, h) {
var k;
h & 1 && (c = b(c));
if (h & 8 || (h & 4 && 'object' === typeof c && c && c.__esModule)) return c;
k = Object.create(null);
b.r(k);
Object.defineProperty(k, 'default', { enumerable: !0, value: c });
if (h & 2 && 'string' != typeof c)
for (var l in c) {
b.d(
k,
l,
function (d) {
return c[d];
}.bind(null, l)
);
}
return k;
};
b.n = function (c) {
var h;
h =
c && c.__esModule
? function () {
return c['default'];
}
: function () {
return c;
};
b.d(h, 'a', h);
return h;
};
b.kRb = function (c, h) {
return Object.prototype.hasOwnProperty.call(c, h);
};
b.p = '';
return b((b.HXb = 564));
})([
function (u, b, a) {
Object.defineProperty(b, '__esModule', { value: !0 });
u = a(42);
b.B6b = u;
u = a(567);
b.X_ = u.X_;
u = a(72);
b.et = u.et;
b.Rj = u.Rj;
b.my = u.my;
u = a(583);
b.Yza = u.Yza;
b.ud = u.ud;
u = a(584);
b.T = u.T;
u = a(585);
b.Iab = u.Iab;
u = a(586);
b.I4a = u.I4a;
u = a(311);
b.l = u.l;
b.Gda = u.Gda;
u = a(587);
b.optional = u.optional;
u = a(588);
b.Vm = u.Vm;
u = a(589);
b.dI = u.dI;
u = a(590);
b.GZ = u.GZ;
u = a(591);
b.V6a = u.V6a;
u = a(309);
b.cea = u.cea;
u = a(107);
b.id = u.id;
u = a(91);
b.Ur = u.Ur;
u = a(314);
b.ybb = u.ybb;
b.Jab = u.Jab;
b.J4a = u.J4a;
b.Gbb = u.Gbb;
u = a(134);
b.vN = u.vN;
a = a(592);
b.E4a = a.E4a;
},
function (u, b, a) {
var D, I;
function c() {
c =
Object.assign ||
function (J) {
for (var P, H = 1, R = arguments.length; H < R; H++) {
P = arguments[H];
for (var L in P) {
Object.prototype.hasOwnProperty.call(P, L) && (J[L] = P[L]);
}
}
return J;
};
return c.apply(this, arguments);
}
function h(J, P) {
h =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (H, R) {
H.__proto__ = R;
}) ||
function (H, R) {
for (var L in R) {
Object.prototype.hasOwnProperty.call(R, L) && (H[L] = R[L]);
}
};
return h(J, P);
}
function k(J, P) {
function H() {
this.constructor = J;
}
if ('function' !== typeof P && null !== P)
throw new TypeError('Class extends value ' + String(P) + ' is not a constructor or null');
h(J, P);
J.prototype = null === P ? Object.create(P) : ((H.prototype = P.prototype), new H());
}
function l(J, P) {
var H, R, L;
H = {};
for (R in J) {
Object.prototype.hasOwnProperty.call(J, R) && 0 > P.indexOf(R) && (H[R] = J[R]);
}
if (null != J && 'function' === typeof Object.getOwnPropertySymbols) {
L = 0;
for (R = Object.getOwnPropertySymbols(J); L < R.length; L++) {
0 > P.indexOf(R[L]) && Object.prototype.propertyIsEnumerable.call(J, R[L]) && (H[R[L]] = J[R[L]]);
}
}
return H;
}
function d(J, P, H, R) {
var L, K, O;
L = arguments.length;
K = 3 > L ? P : null === R ? (R = Object.getOwnPropertyDescriptor(P, H)) : R;
if ('object' === typeof Reflect && 'function' === typeof Reflect.Ur) K = Reflect.Ur(J, P, H, R);
else
for (var M = J.length - 1; 0 <= M; M--) {
if ((O = J[M])) K = (3 > L ? O(K) : 3 < L ? O(P, H, K) : O(P, H)) || K;
}
return 3 < L && K && Object.defineProperty(P, H, K), K;
}
function f(J, P) {
return function (H, R) {
P(H, R, J);
};
}
function g(J, P) {
if ('object' === typeof Reflect && 'function' === typeof Reflect.Jc) return Reflect.Jc(J, P);
}
function m(J, P, H, R) {
function L(K) {
return K instanceof H
? K
: new H(function (O) {
O(K);
});
}
return new (H || (H = Promise))(function (K, O) {
function M(X) {
try {
S(R.next(X));
} catch (ea) {
O(ea);
}
}
function Q(X) {
try {
S(R['throw'](X));
} catch (ea) {
O(ea);
}
}
function S(X) {
X.done ? K(X.value) : L(X.value).then(M, Q);
}
S((R = R.apply(J, P || [])).next());
});
}
function n(J, P) {
var L, K, O, M, Q;
function H(S) {
return function (X) {
return R([S, X]);
};
}
function R(S) {
if (K) throw new TypeError('Generator is already executing.');
for (; L; ) {
try {
if (
((K = 1),
O &&
(M =
S[0] & 2 ? O['return'] : S[0] ? O['throw'] || ((M = O['return']) && M.call(O), 0) : O.next) &&
!(M = M.call(O, S[1])).done)
)
return M;
if (((O = 0), M)) S = [S[0] & 2, M.value];
switch (S[0]) {
case 0:
case 1:
M = S;
break;
case 4:
return L.label++, { value: S[1], done: !1 };
case 5:
L.label++;
O = S[1];
S = [0];
continue;
case 7:
S = L.bo.pop();
L.Wl.pop();
continue;
default:
if (!((M = L.Wl), (M = 0 < M.length && M[M.length - 1])) && (6 === S[0] || 2 === S[0])) {
L = 0;
continue;
}
if (3 === S[0] && (!M || (S[1] > M[0] && S[1] < M[3]))) L.label = S[1];
else if (6 === S[0] && L.label < M[1]) (L.label = M[1]), (M = S);
else if (M && L.label < M[2]) (L.label = M[2]), L.bo.push(S);
else {
M[2] && L.bo.pop();
L.Wl.pop();
continue;
}
}
S = P.call(J, L);
} catch (X) {
S = [6, X];
O = 0;
} finally {
K = M = 0;
}
}
if (S[0] & 5) throw S[1];
return { value: S[0] ? S[1] : void 0, done: !0 };
}
L = {
label: 0,
xc: function () {
if (M[0] & 1) throw M[1];
return M[1];
},
Wl: [],
bo: [],
};
return (
(Q = { next: H(0), throw: H(1), return: H(2) }),
'function' === typeof Symbol &&
(Q[Symbol.iterator] = function () {
return this;
}),
Q
);
}
function p(J, P) {
for (var H in J) {
'default' === H || Object.prototype.hasOwnProperty.call(P, H) || D(P, J, H);
}
}
function q(J) {
var P, H, R;
P = 'function' === typeof Symbol && Symbol.iterator;
H = P && J[P];
R = 0;
if (H) return H.call(J);
if (J && 'number' === typeof J.length)
return {
next: function () {
J && R >= J.length && (J = void 0);
return { value: J && J[R++], done: !J };
},
};
throw new TypeError(P ? 'Object is not iterable.' : 'Symbol.iterator is not defined.');
}
function v(J, P) {
var H, R, L;
H = 'function' === typeof Symbol && J[Symbol.iterator];
if (!H) return J;
J = H.call(J);
L = [];
try {
for (; (void 0 === P || 0 < P--) && !(R = J.next()).done; ) {
L.push(R.value);
}
} catch (O) {
var K;
K = { error: O };
} finally {
try {
R && !R.done && (H = J['return']) && H.call(J);
} finally {
if (K) throw K.error;
}
}
return L;
}
function r() {
for (var J = [], P = 0; P < arguments.length; P++) {
J = J.concat(v(arguments[P]));
}
return J;
}
function t() {
var R;
for (var J = 0, P = 0, H = arguments.length; P < H; P++) {
J += arguments[P].length;
}
J = Array(J);
R = 0;
for (P = 0; P < H; P++) {
for (var L = arguments[P], K = 0, O = L.length; K < O; K++, R++) {
J[R] = L[K];
}
}
return J;
}
function w(J, P, H) {
if (H || 2 === arguments.length)
for (var R = 0, L = P.length, K; R < L; R++) {
(!K && R in P) || (K || (K = Array.prototype.slice.call(P, 0, R)), (K[R] = P[R]));
}
return J.concat(K || Array.prototype.slice.call(P));
}
function x(J) {
return this instanceof x ? ((this.EE = J), this) : new x(J);
}
function y(J, P, H) {
var Q, S, X;
function R(ea) {
Q[ea] &&
(S[ea] = function (la) {
return new Promise(function (Da, va) {
1 < X.push([ea, la, Da, va]) || L(ea, la);
});
});
}
function L(ea, la) {
var Da;
try {
Da = Q[ea](la);
Da.value instanceof x ? Promise.resolve(Da.value.EE).then(K, O) : M(X[0][2], Da);
} catch (va) {
M(X[0][3], va);
}
}
function K(ea) {
L('next', ea);
}
function O(ea) {
L('throw', ea);
}
function M(ea, la) {
(ea(la), X.shift(), X.length) && L(X[0][0], X[0][1]);
}
if (!Symbol.asyncIterator) throw new TypeError('Symbol.asyncIterator is not defined.');
Q = H.apply(J, P || []);
X = [];
return (
(S = {}),
R('next'),
R('throw'),
R('return'),
(S[Symbol.asyncIterator] = function () {
return this;
}),
S
);
}
function z(J) {
var H, R;
function P(L, K) {
H[L] = J[L]
? function (O) {
return (R = !R) ? { value: x(J[L](O)), done: 'return' === L } : K ? K(O) : O;
}
: K;
}
return (
(H = {}),
P('next'),
P('throw', function (L) {
throw L;
}),
P('return'),
(H[Symbol.iterator] = function () {
return this;
}),
H
);
}
function A(J) {
var R, L;
function P(K) {
L[K] =
J[K] &&
function (O) {
return new Promise(function (M, Q) {
O = J[K](O);
H(M, Q, O.done, O.value);
});
};
}
function H(K, O, M, Q) {
Promise.resolve(Q).then(function (S) {
K({ value: S, done: M });
}, O);
}
if (!Symbol.asyncIterator) throw new TypeError('Symbol.asyncIterator is not defined.');
R = J[Symbol.asyncIterator];
return R
? R.call(J)
: ((J = 'function' === typeof q ? q(J) : J[Symbol.iterator]()),
(L = {}),
P('next'),
P('throw'),
P('return'),
(L[Symbol.asyncIterator] = function () {
return this;
}),
L);
}
function B(J, P) {
Object.defineProperty ? Object.defineProperty(J, 'raw', { value: P }) : (J.raw = P);
return J;
}
function E(J) {
var P;
if (J && J.__esModule) return J;
P = {};
if (null != J)
for (var H in J) {
'default' !== H && Object.prototype.hasOwnProperty.call(J, H) && D(P, J, H);
}
I(P, J);
return P;
}
function C(J) {
return J && J.__esModule ? J : { default: J };
}
function F(J, P, H, R) {
if ('a' === H && !R) throw new TypeError('Private accessor was defined without a getter');
if ('function' === typeof P ? J !== P || !R : !P.has(J))
throw new TypeError('Cannot read private member from an object whose class did not declare it');
return 'm' === H ? R : 'a' === H ? R.call(J) : R ? R.value : P.get(J);
}
function G(J, P, H, R, L) {
if ('m' === R) throw new TypeError('Private method is not writable');
if ('a' === R && !L) throw new TypeError('Private accessor was defined without a setter');
if ('function' === typeof P ? J !== P || !L : !P.has(J))
throw new TypeError('Cannot write private member to an object whose class did not declare it');
return 'a' === R ? L.call(J, H) : L ? (L.value = H) : P.set(J, H), H;
}
a.r(b);
a.d(b, '__extends', function () {
return k;
});
a.d(b, '__assign', function () {
return c;
});
a.d(b, '__rest', function () {
return l;
});
a.d(b, '__decorate', function () {
return d;
});
a.d(b, '__param', function () {
return f;
});
a.d(b, '__metadata', function () {
return g;
});
a.d(b, '__awaiter', function () {
return m;
});
a.d(b, '__generator', function () {
return n;
});
a.d(b, '__createBinding', function () {
return D;
});
a.d(b, '__exportStar', function () {
return p;
});
a.d(b, '__values', function () {
return q;
});
a.d(b, '__read', function () {
return v;
});
a.d(b, '__spread', function () {
return r;
});
a.d(b, '__spreadArrays', function () {
return t;
});
a.d(b, '__spreadArray', function () {
return w;
});
a.d(b, '__await', function () {
return x;
});
a.d(b, '__asyncGenerator', function () {
return y;
});
a.d(b, '__asyncDelegator', function () {
return z;
});
a.d(b, '__asyncValues', function () {
return A;
});
a.d(b, '__makeTemplateObject', function () {
return B;
});
a.d(b, '__importStar', function () {
return E;
});
a.d(b, '__importDefault', function () {
return C;
});
a.d(b, '__classPrivateFieldGet', function () {
return F;
});
a.d(b, '__classPrivateFieldSet', function () {
return G;
});
D = Object.create
? function (J, P, H, R) {
void 0 === R && (R = H);
Object.defineProperty(J, R, {
enumerable: !0,
get: function () {
return P[H];
},
});
}
: function (J, P, H, R) {
void 0 === R && (R = H);
J[R] = P[H];
};
I = Object.create
? function (J, P) {
Object.defineProperty(J, 'default', { enumerable: !0, value: P });
}
: function (J, P) {
J['default'] = P;
};
},
function (u, b, a) {
function c() {
c =
Object.assign ||
function (D) {
for (var I, J = 1, P = arguments.length; J < P; J++) {
I = arguments[J];
for (var H in I) {
Object.prototype.hasOwnProperty.call(I, H) && (D[H] = I[H]);
}
}
return D;
};
return c.apply(this, arguments);
}
function h(D, I) {
h =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (J, P) {
J.__proto__ = P;
}) ||
function (J, P) {
for (var H in P) {
P.hasOwnProperty(H) && (J[H] = P[H]);
}
};
return h(D, I);
}
function k(D, I) {
function J() {
this.constructor = D;
}
h(D, I);
D.prototype = null === I ? Object.create(I) : ((J.prototype = I.prototype), new J());
}
function l(D, I) {
var J, P, H;
J = {};
for (P in D) {
Object.prototype.hasOwnProperty.call(D, P) && 0 > I.indexOf(P) && (J[P] = D[P]);
}
if (null != D && 'function' === typeof Object.getOwnPropertySymbols) {
H = 0;
for (P = Object.getOwnPropertySymbols(D); H < P.length; H++) {
0 > I.indexOf(P[H]) && Object.prototype.propertyIsEnumerable.call(D, P[H]) && (J[P[H]] = D[P[H]]);
}
}
return J;
}
function d(D, I, J, P) {
var H, R, L;
H = arguments.length;
R = 3 > H ? I : null === P ? (P = Object.getOwnPropertyDescriptor(I, J)) : P;
if ('object' === typeof Reflect && 'function' === typeof Reflect.Ur) R = Reflect.Ur(D, I, J, P);
else
for (var K = D.length - 1; 0 <= K; K--) {
if ((L = D[K])) R = (3 > H ? L(R) : 3 < H ? L(I, J, R) : L(I, J)) || R;
}
return 3 < H && R && Object.defineProperty(I, J, R), R;
}
function f(D, I) {
return function (J, P) {
I(J, P, D);
};
}
function g(D, I) {
if ('object' === typeof Reflect && 'function' === typeof Reflect.Jc) return Reflect.Jc(D, I);
}
function m(D, I, J, P) {
function H(R) {
return R instanceof J
? R
: new J(function (L) {
L(R);
});
}
return new (J || (J = Promise))(function (R, L) {
function K(Q) {
try {
M(P.next(Q));
} catch (S) {
L(S);
}
}
function O(Q) {
try {
M(P['throw'](Q));
} catch (S) {
L(S);
}
}
function M(Q) {
Q.done ? R(Q.value) : H(Q.value).then(K, O);
}
M((P = P.apply(D, I || [])).next());
});
}
function n(D, I) {
var H, R, L, K, O;
function J(M) {
return function (Q) {
return P([M, Q]);
};
}
function P(M) {
if (R) throw new TypeError('Generator is already executing.');
for (; H; ) {
try {
if (
((R = 1),
L &&
(K =
M[0] & 2 ? L['return'] : M[0] ? L['throw'] || ((K = L['return']) && K.call(L), 0) : L.next) &&
!(K = K.call(L, M[1])).done)
)
return K;
if (((L = 0), K)) M = [M[0] & 2, K.value];
switch (M[0]) {
case 0:
case 1:
K = M;
break;
case 4:
return H.label++, { value: M[1], done: !1 };
case 5:
H.label++;
L = M[1];
M = [0];
continue;
case 7:
M = H.bo.pop();
H.Wl.pop();
continue;
default:
if (!((K = H.Wl), (K = 0 < K.length && K[K.length - 1])) && (6 === M[0] || 2 === M[0])) {
H = 0;
continue;
}
if (3 === M[0] && (!K || (M[1] > K[0] && M[1] < K[3]))) H.label = M[1];
else if (6 === M[0] && H.label < K[1]) (H.label = K[1]), (K = M);
else if (K && H.label < K[2]) (H.label = K[2]), H.bo.push(M);
else {
K[2] && H.bo.pop();
H.Wl.pop();
continue;
}
}
M = I.call(D, H);
} catch (Q) {
M = [6, Q];
L = 0;
} finally {
R = K = 0;
}
}
if (M[0] & 5) throw M[1];
return { value: M[0] ? M[1] : void 0, done: !0 };
}
H = {
label: 0,
xc: function () {
if (K[0] & 1) throw K[1];
return K[1];
},
Wl: [],
bo: [],
};
return (
(O = { next: J(0), throw: J(1), return: J(2) }),
'function' === typeof Symbol &&
(O[Symbol.iterator] = function () {
return this;
}),
O
);
}
function p(D, I, J, P) {
void 0 === P && (P = J);
D[P] = I[J];
}
function q(D, I) {
for (var J in D) {
'default' === J || I.hasOwnProperty(J) || (I[J] = D[J]);
}
}
function v(D) {
var I, J, P;
I = 'function' === typeof Symbol && Symbol.iterator;
J = I && D[I];
P = 0;
if (J) return J.call(D);
if (D && 'number' === typeof D.length)
return {
next: function () {
D && P >= D.length && (D = void 0);
return { value: D && D[P++], done: !D };
},
};
throw new TypeError(I ? 'Object is not iterable.' : 'Symbol.iterator is not defined.');
}
function r(D, I) {
var J, P, H;
J = 'function' === typeof Symbol && D[Symbol.iterator];
if (!J) return D;
D = J.call(D);
H = [];
try {
for (; (void 0 === I || 0 < I--) && !(P = D.next()).done; ) {
H.push(P.value);
}
} catch (L) {
var R;
R = { error: L };
} finally {
try {
P && !P.done && (J = D['return']) && J.call(D);
} finally {
if (R) throw R.error;
}
}
return H;
}
function t() {
for (var D = [], I = 0; I < arguments.length; I++) {
D = D.concat(r(arguments[I]));
}
return D;
}
function w() {
var P;
for (var D = 0, I = 0, J = arguments.length; I < J; I++) {
D += arguments[I].length;
}
D = Array(D);
P = 0;
for (I = 0; I < J; I++) {
for (var H = arguments[I], R = 0, L = H.length; R < L; R++, P++) {
D[P] = H[R];
}
}
return D;
}
function x(D) {
return this instanceof x ? ((this.EE = D), this) : new x(D);
}
function y(D, I, J) {
var O, M, Q;
function P(S) {
O[S] &&
(M[S] = function (X) {
return new Promise(function (ea, la) {
1 < Q.push([S, X, ea, la]) || H(S, X);
});
});
}
function H(S, X) {
var ea;
try {
ea = O[S](X);
ea.value instanceof x ? Promise.resolve(ea.value.EE).then(R, L) : K(Q[0][2], ea);
} catch (la) {
K(Q[0][3], la);
}
}
function R(S) {
H('next', S);
}
function L(S) {
H('throw', S);
}
function K(S, X) {
(S(X), Q.shift(), Q.length) && H(Q[0][0], Q[0][1]);
}
if (!Symbol.asyncIterator) throw new TypeError('Symbol.asyncIterator is not defined.');
O = J.apply(D, I || []);
Q = [];
return (
(M = {}),
P('next'),
P('throw'),
P('return'),
(M[Symbol.asyncIterator] = function () {
return this;
}),
M
);
}
function z(D) {
var J, P;
function I(H, R) {
J[H] = D[H]
? function (L) {
return (P = !P) ? { value: x(D[H](L)), done: 'return' === H } : R ? R(L) : L;
}
: R;
}
return (
(J = {}),
I('next'),
I('throw', function (H) {
throw H;
}),
I('return'),
(J[Symbol.iterator] = function () {
return this;
}),
J
);
}
function A(D) {
var P, H;
function I(R) {
H[R] =
D[R] &&
function (L) {
return new Promise(function (K, O) {
L = D[R](L);
J(K, O, L.done, L.value);
});
};
}
function J(R, L, K, O) {
Promise.resolve(O).then(function (M) {
R({ value: M, done: K });
}, L);
}
if (!Symbol.asyncIterator) throw new TypeError('Symbol.asyncIterator is not defined.');
P = D[Symbol.asyncIterator];
return P
? P.call(D)
: ((D = 'function' === typeof v ? v(D) : D[Symbol.iterator]()),
(H = {}),
I('next'),
I('throw'),
I('return'),
(H[Symbol.asyncIterator] = function () {
return this;
}),
H);
}
function B(D, I) {
Object.defineProperty ? Object.defineProperty(D, 'raw', { value: I }) : (D.raw = I);
return D;
}
function E(D) {
var I;
if (D && D.__esModule) return D;
I = {};
if (null != D)
for (var J in D) {
Object.hasOwnProperty.call(D, J) && (I[J] = D[J]);
}
I.default = D;
return I;
}
function C(D) {
return D && D.__esModule ? D : { default: D };
}
function F(D, I) {
if (!I.has(D)) throw new TypeError('attempted to get private field on non-instance');
return I.get(D);
}
function G(D, I, J) {
if (!I.has(D)) throw new TypeError('attempted to set private field on non-instance');
I.set(D, J);
return J;
}
a.r(b);
a.d(b, '__extends', function () {
return k;
});
a.d(b, '__assign', function () {
return c;
});
a.d(b, '__rest', function () {
return l;
});
a.d(b, '__decorate', function () {
return d;
});
a.d(b, '__param', function () {
return f;
});
a.d(b, '__metadata', function () {
return g;
});
a.d(b, '__awaiter', function () {
return m;
});
a.d(b, '__generator', function () {
return n;
});
a.d(b, '__createBinding', function () {
return p;
});
a.d(b, '__exportStar', function () {
return q;
});
a.d(b, '__values', function () {
return v;
});
a.d(b, '__read', function () {
return r;
});
a.d(b, '__spread', function () {
return t;
});
a.d(b, '__spreadArrays', function () {
return w;
});
a.d(b, '__await', function () {
return x;
});
a.d(b, '__asyncGenerator', function () {
return y;
});
a.d(b, '__asyncDelegator', function () {
return z;
});
a.d(b, '__asyncValues', function () {
return A;
});
a.d(b, '__makeTemplateObject', function () {
return B;
});
a.d(b, '__importStar', function () {
return E;
});
a.d(b, '__importDefault', function () {
return C;
});
a.d(b, '__classPrivateFieldGet', function () {
return F;
});
a.d(b, '__classPrivateFieldSet', function () {
return G;
});
},
function (u, b) {
var a, c;
Object.defineProperty(b, '__esModule', { value: !0 });
b.Ux = b.kDa = b.jDa = b.Yca = b.iDa = b.Xca = b.g1 = b.X0 = b.hDa = b.N = b.S = void 0;
(function (h) {
h[(h.jn = 7001)] = 'UNKNOWN';
h[(h.AMa = 7002)] = 'UNHANDLED_EXCEPTION';
h[(h.Ehb = 7003)] = 'INIT_COMPONENT_LOG_TO_REMOTE';
h[(h.dhb = 7004)] = 'HLS_NOT_SUPPORTED';
h[(h.uda = 7010)] = 'INIT_ASYNCCOMPONENT';
h[(h.KEa = 7011)] = 'INIT_HTTP';
h[(h.Chb = 7014)] = 'INIT_BADMOVIEID';
h[(h.LEa = 7020)] = 'INIT_PLAYBACK_LOCK';
h[(h.MEa = 7022)] = 'INIT_SESSION_LOCK';
h[(h.Ihb = 7029)] = 'INIT_POSTAUTHORIZE';
h[(h.JEa = 7031)] = 'INIT_HEADER_MEDIA';
h[(h.Jhb = 7034)] = 'INIT_TIMEDTEXT_TRACK';
h[(h.Edb = 7037)] = 'ASE_SESSION_ERROR';
h[(h.Ddb = 7038)] = 'ASE_SEEK_THREW';
h[(h.Fdb = 7039)] = 'ASE_SKIPPED_THREW';
h[(h.Fhb = 7041)] = 'INIT_CORE_OBJECTS1';
h[(h.Ghb = 7042)] = 'INIT_CORE_OBJECTS2';
h[(h.Hhb = 7043)] = 'INIT_CORE_OBJECTS3';
h[(h.DEa = 7053)] = 'INIT_COMPONENT_STORAGE';
h[(h.EEa = 7054)] = 'INIT_COMPONENT_STORAGELOCK';
h[(h.AEa = 7058)] = 'INIT_COMPONENT_MAINTHREADMONITOR';
h[(h.vda = 7059)] = 'INIT_COMPONENT_DEVICE';
h[(h.BEa = 7063)] = 'INIT_COMPONENT_MSL';
h[(h.zEa = 7066)] = 'INIT_COMPONENT_LOGBLOBBATCHER';
h[(h.JB = 7067)] = 'INIT_COMPONENT_PERSISTEDPLAYDATA';
h[(h.IEa = 7083)] = 'INIT_COMPONENT_WEBCRYPTO';
h[(h.yEa = 7086)] = 'INIT_COMPONENT_IDB_VIEWER_TOOL';
h[(h.wEa = 7088)] = 'INIT_COMPONENT_BATTERY_MANAGER';
h[(h.vEa = 7089)] = 'INIT_COMPONENT_ASE';
h[(h.iK = 7091)] = 'INIT_COMPONENT_DRM_CACHE';
h[(h.Dhb = 7092)] = 'INIT_COMPONENT_DRM';
h[(h.xEa = 7094)] = 'INIT_COMPONENT_FTL';
h[(h.CEa = 7095)] = 'INIT_COMPONENT_PREPARE_MODEL';
h[(h.FEa = 7096)] = 'INIT_COMPONENT_VIDEO_SESSION_EDGE';
h[(h.GEa = 7097)] = 'INIT_COMPONENT_VIDEO_SESSION_MDX';
h[(h.HEa = 7098)] = 'INIT_COMPONENT_VIDEO_SESSION_TEST';
h[(h.oK = 7111)] = 'MANIFEST';
h[(h.$Fa = 7117)] = 'MANIFEST_VERIFY';
h[(h.Kkb = 7120)] = 'START';
h[(h.lK = 7121)] = 'LICENSE';
h[(h.efa = 7122)] = 'RELEASE';
h[(h.Lkb = 7123)] = 'STOP';
h[(h.Dda = 7125)] = 'KEEPALIVE';
h[(h.Ejb = 7131)] = 'PING';
h[(h.Pgb = 7134)] = 'ENGAGE';
h[(h.fib = 7137)] = 'LOGBLOB';
h[(h.z7b = 7138)] = 'PAUSE';
h[(h.O7b = 7139)] = 'RESUME';
h[(h.UKa = 7140)] = 'SPLICE';
h[(h.ceb = 7142)] = 'BIND';
h[(h.deb = 7144)] = 'BIND_DEVICE';
h[(h.$gb = 7145)] = 'GENERATE_SCREENSHOTS';
h[(h.Ijb = 7202)] = 'PLAY_INIT_EXCEPTION';
h[(h.sea = 7332)] = 'PLAY_MSE_EME_KEY_STATUS_CHANGE_EXPIRED';
h[(h.Ojb = 7333)] = 'PLAY_MSE_EME_KEY_STATUS_CHANGE_INTERNAL_ERROR';
h[(h.UHa = 7334)] = 'PLAY_MSE_EME_KEY_STATUS_CHANGE_OUTPUT_NOT_ALLOWED';
h[(h.Pjb = 7335)] = 'PLAY_MSE_EME_KEY_STATUS_EXCEPTION';
h[(h.tea = 7336)] = 'PLAY_MSE_EME_KEY_STATUS_CHANGE_OUTPUT_RESTRICTED';
h[(h.Njb = 7338)] = 'PLAY_MSE_EME_KEY_MAPPING_EXCEPTION';
h[(h.YHa = 7351)] = 'PLAY_MSE_NOTSUPPORTED';
h[(h.THa = 7353)] = 'PLAY_MSE_DECODER_TIMEOUT';
h[(h.uea = 7355)] = 'PLAY_MSE_SOURCEADD';
h[(h.SHa = 7356)] = 'PLAY_MSE_CREATE_MEDIAKEYS';
h[(h.GR = 7357)] = 'PLAY_MSE_GENERATEKEYREQUEST';
h[(h.XHa = 7361)] = 'PLAY_MSE_EVENT_ERROR';
h[(h.AK = 7362)] = 'PLAY_MSE_SETMEDIAKEYS';
h[(h.wr = 7363)] = 'PLAY_MSE_EVENT_KEYERROR';
h[(h.Rjb = 7364)] = 'PLAY_MSE_EME_SESSION_CLOSE';
h[(h.Sjb = 7365)] = 'PLAY_MSE_GETCURRENTTIME';
h[(h.Tjb = 7367)] = 'PLAY_MSE_SETCURRENTTIME';
h[(h.Ujb = 7371)] = 'PLAY_MSE_SOURCEAPPEND';
h[(h.Yjb = 7375)] = 'PLAY_MSE_UNEXPECTED_SEEKING';
h[(h.Xjb = 7376)] = 'PLAY_MSE_UNEXPECTED_SEEKED';
h[(h.Wjb = 7377)] = 'PLAY_MSE_UNEXPECTED_REWIND';
h[(h.Vjb = 7381)] = 'PLAY_MSE_SOURCEBUFFER_ERROR';
h[(h.ZHa = 7382)] = 'PLAY_MSE_SOURCEBUFFER_CHANGETYPE';
h[(h.Jjb = 7391)] = 'PLAY_MSE_CREATE_MEDIASOURCE';
h[(h.Kjb = 7392)] = 'PLAY_MSE_CREATE_MEDIASOURCE_OBJECTURL';
h[(h.Ljb = 7393)] = 'PLAY_MSE_CREATE_MEDIASOURCE_OPEN';
h[(h.VHa = 7394)] = 'PLAY_MSE_EME_MISSING_DRMHEADER';
h[(h.Qjb = 7395)] = 'PLAY_MSE_EME_MISSING_PSSH';
h[(h.WHa = 7397)] = 'PLAY_MSE_EME_NO_PRK_SUPPORT';
h[(h.Mjb = 7398)] = 'PLAY_MSE_DURATIONCHANGE_ERROR';
h[(h.r1 = 7399)] = 'PLAY_MSE_SET_LICENSE_ERROR';
h[(h.UCa = 7400)] = 'EXTERNAL';
h[(h.q1 = 7500)] = 'PAUSE_TIMEOUT';
h[(h.Y0 = 7502)] = 'INACTIVITY_TIMEOUT';
h[(h.Odb = 7510)] = 'AUTHORIZATION_EXPIRED';
h[(h.Hgb = 7700)] = 'EME_INVALID_KEYSYSTEM';
h[(h.FCa = 7701)] = 'EME_CREATE_MEDIAKEYS_SYSTEMACCESS_FAILED';
h[(h.SQ = 7702)] = 'EME_CREATE_MEDIAKEYS_FAILED';
h[(h.q0 = 7703)] = 'EME_GENERATEREQUEST_FAILED';
h[(h.OCa = 7704)] = 'EME_UPDATE_FAILED';
h[(h.LCa = 7705)] = 'EME_KEYSESSION_ERROR';
h[(h.KCa = 7706)] = 'EME_KEYMESSAGE_EMPTY';
h[(h.Lgb = 7707)] = 'EME_REMOVE_FAILED';
h[(h.Jgb = 7708)] = 'EME_LOAD_FAILED';
h[(h.Dgb = 7709)] = 'EME_CREATE_SESSION_FAILED';
h[(h.Uca = 7710)] = 'EME_LDL_RENEWAL_ERROR';
h[(h.ICa = 7711)] = 'EME_INVALID_INITDATA_DATA';
h[(h.JCa = 7712)] = 'EME_INVALID_LICENSE_DATA';
h[(h.Igb = 7713)] = 'EME_LDL_KEYSSION_ALREADY_CLOSED';
h[(h.ECa = 7716)] = 'EME_CLOSE_FAILED';
h[(h.MCa = 7717)] = 'EME_SESSION_CLOSED_UNEXPECTEDLY';
h[(h.Ngb = 7718)] = 'EME_SET_SERVER_CERTIFICATE';
h[(h.Fjb = 7800)] = 'PLAYDATA_STORE_FAILURE';
h[(h.yQ = 7900)] = 'BRANCH_PLAY_FAILURE';
h[(h.zQ = 7901)] = 'BRANCH_QUEUE_FAILURE';
h[(h.eAa = 7902)] = 'BRANCH_UPDATE_NEXT_SEGMENT_WEIGHTS_FAILURE';
h[(h.keb = 7903)] = 'BRANCH_CHOICE_MAP_MISSING';
h[(h.rjb = 8100)] = 'PBO_EVENTLOOKUP_FAILURE';
})((a = b.S || (b.S = {})));
(function (h) {
h[(h.jn = 1001)] = 'UNKNOWN';
h[(h.Yl = 1003)] = 'EXCEPTION';
h[(h.Mhb = 1004)] = 'INVALID_DI';
h[(h.Idb = 1011)] = 'ASYNCLOAD_EXCEPTION';
h[(h.Jdb = 1013)] = 'ASYNCLOAD_TIMEOUT';
h[(h.h4b = 1015)] = 'ASYNCLOAD_BADCONFIG';
h[(h.Gdb = 1016)] = 'ASYNCLOAD_COMPONENT_DUPLICATE';
h[(h.Hdb = 1017)] = 'ASYNCLOAD_COMPONENT_MISSING';
h[(h.gR = 1101)] = 'HTTP_UNKNOWN';
h[(h.pda = 1102)] = 'HTTP_XHR';
h[(h.dR = 1103)] = 'HTTP_PROTOCOL';
h[(h.cR = 1104)] = 'HTTP_OFFLINE';
h[(h.fR = 1105)] = 'HTTP_TIMEOUT';
h[(h.YE = 1106)] = 'HTTP_READTIMEOUT';
h[(h.IB = 1107)] = 'HTTP_ABORT';
h[(h.YDa = 1108)] = 'HTTP_PARSE';
h[(h.UDa = 1110)] = 'HTTP_BAD_URL';
h[(h.eR = 1111)] = 'HTTP_PROXY';
h[(h.Wda = 1203)] = 'MSE_AUDIO';
h[(h.Xda = 1204)] = 'MSE_VIDEO';
h[(h.sib = 1250)] = 'MSE_MEDIA_ERR_BASE';
h[(h.D6b = 1251)] = 'MSE_MEDIA_ERR_ABORTED';
h[(h.G6b = 1252)] = 'MSE_MEDIA_ERR_NETWORK';
h[(h.E6b = 1253)] = 'MSE_MEDIA_ERR_DECODE';
h[(h.H6b = 1254)] = 'MSE_MEDIA_ERR_SRC_NOT_SUPPORTED';
h[(h.F6b = 1255)] = 'MSE_MEDIA_ERR_ENCRYPTED';
h[(h.ht = 1260)] = 'EME_MEDIA_KEYERR_BASE';
h[(h.B5b = 1261)] = 'EME_MEDIA_KEYERR_UNKNOWN';
h[(h.w5b = 1262)] = 'EME_MEDIA_KEYERR_CLIENT';
h[(h.A5b = 1263)] = 'EME_MEDIA_KEYERR_SERVICE';
h[(h.z5b = 1264)] = 'EME_MEDIA_KEYERR_OUTPUT';
h[(h.y5b = 1265)] = 'EME_MEDIA_KEYERR_HARDWARECHANGE';
h[(h.x5b = 1266)] = 'EME_MEDIA_KEYERR_DOMAIN';
h[(h.C5b = 1269)] = 'EME_MEDIA_UNAVAILABLE_CDM';
h[(h.Ggb = 1270)] = 'EME_INTERNAL_ERROR';
h[(h.Cgb = 1271)] = 'EME_CLOSED_BY_APPLICATION';
h[(h.Kgb = 1272)] = 'EME_RELEASE_ACKNOWLEDGED';
h[(h.HCa = 1273)] = 'EME_HARDWARE_CONTEXT_RESET';
h[(h.Mgb = 1274)] = 'EME_RESOURCE_EVICTED';
h[(h.Fgb = 1280)] = 'EME_ERROR_NODRMSESSSION';
h[(h.Egb = 1281)] = 'EME_ERROR_NODRMREQUESTS';
h[(h.t5b = 1282)] = 'EME_ERROR_INDIV_FAILED';
h[(h.u5b = 1283)] = 'EME_ERROR_UNSUPPORTED_MESSAGETYPE';
h[(h.Ogb = 1284)] = 'EME_TIMEOUT_MESSAGE';
h[(h.D5b = 1285)] = 'EME_TIMEOUT_KEYCHANGE';
h[(h.NCa = 1286)] = 'EME_UNDEFINED_DATA';
h[(h.bK = 1287)] = 'EME_INVALID_STATE';
h[(h.v5b = 1288)] = 'EME_LDL_DOES_NOT_SUPPORT_PRK';
h[(h.GCa = 1289)] = 'EME_EMPTY_DATA';
h[(h.TQ = 1290)] = 'EME_TIMEOUT';
h[(h.T6b = 1303)] = 'NCCP_METHOD_NOT_SUPPORTED';
h[(h.W6b = 1305)] = 'NCCP_PARSEXML';
h[(h.akb = 1309)] = 'PROCESS_EXCEPTION';
h[(h.V6b = 1311)] = 'NCCP_NETFLIXID_MISSING';
h[(h.X6b = 1312)] = 'NCCP_SECURENETFLIXID_MISSING';
h[(h.Q6b = 1313)] = 'NCCP_HMAC_MISSING';
h[(h.P6b = 1315)] = 'NCCP_HMAC_MISMATCH';
h[(h.O6b = 1317)] = 'NCCP_HMAC_FAILED';
h[(h.N6b = 1321)] = 'NCCP_CLIENTTIME_MISSING';
h[(h.M6b = 1323)] = 'NCCP_CLIENTTIME_MISMATCH';
h[(h.EDa = 1331)] = 'GENERIC';
h[(h.Mib = 1333)] = 'NCCP_PROTOCOL_INVALIDDEVICECREDENTIALS';
h[(h.Nib = 1337)] = 'NCCP_PROTOCOL_REDIRECT_LOOP';
h[(h.Y6b = 1341)] = 'NCCP_TRANSACTION';
h[(h.R6b = 1343)] = 'NCCP_INVALID_DRMTYPE';
h[(h.S6b = 1344)] = 'NCCP_INVALID_LICENCE_RESPONSE';
h[(h.U6b = 1345)] = 'NCCP_MISSING_PAYLOAD';
h[(h.E7b = 1346)] = 'PROTOCOL_NOT_INITIALIZED';
h[(h.D7b = 1347)] = 'PROTOCOL_MISSING_FIELD';
h[(h.C7b = 1348)] = 'PROTOCOL_MISMATCHED_PROFILEGUID';
h[(h.UB = 1402)] = 'STORAGE_NODATA';
h[(h.Y7b = 1403)] = 'STORAGE_EXCEPTION';
h[(h.f8b = 1405)] = 'STORAGE_QUOTA_NOT_GRANTED';
h[(h.g8b = 1407)] = 'STORAGE_QUOTA_TO_SMALL';
h[(h.XKa = 1411)] = 'STORAGE_LOAD_ERROR';
h[(h.Nkb = 1412)] = 'STORAGE_LOAD_TIMEOUT';
h[(h.YKa = 1414)] = 'STORAGE_SAVE_ERROR';
h[(h.Qkb = 1415)] = 'STORAGE_SAVE_TIMEOUT';
h[(h.nfa = 1417)] = 'STORAGE_DELETE_ERROR';
h[(h.WKa = 1418)] = 'STORAGE_DELETE_TIMEOUT';
h[(h.e8b = 1421)] = 'STORAGE_FS_REQUESTFILESYSTEM';
h[(h.b8b = 1423)] = 'STORAGE_FS_GETDIRECTORY';
h[(h.d8b = 1425)] = 'STORAGE_FS_READENTRIES';
h[(h.Z7b = 1427)] = 'STORAGE_FS_FILEREAD';
h[(h.a8b = 1429)] = 'STORAGE_FS_FILEWRITE';
h[(h.$7b = 1431)] = 'STORAGE_FS_FILEREMOVE';
h[(h.c8b = 1432)] = 'STORAGE_FS_PARSEJSON';
h[(h.Pkb = 1451)] = 'STORAGE_NO_LOCALSTORAGE';
h[(h.Okb = 1453)] = 'STORAGE_LOCALSTORAGE_ACCESS_EXCEPTION';
h[(h.g7b = 1501)] = 'NTBA_UNKNOWN';
h[(h.f7b = 1502)] = 'NTBA_EXCEPTION';
h[(h.b7b = 1504)] = 'NTBA_CRYPTO_KEY';
h[(h.d7b = 1506)] = 'NTBA_CRYPTO_OPERATION';
h[(h.c7b = 1508)] = 'NTBA_CRYPTO_KEYEXCHANGE';
h[(h.e7b = 1515)] = 'NTBA_DECRYPT_UNSUPPORTED';
h[(h.DBa = 1553)] = 'DEVICE_NO_ESN';
h[(h.Nfb = 1555)] = 'DEVICE_ERROR_GETTING_ESN';
h[(h.e6b = 1701)] = 'FORMAT_UNKNOWN';
h[(h.Tgb = 1713)] = 'FORMAT_XML';
h[(h.f6b = 1715)] = 'FORMAT_XML_CONTENT';
h[(h.c6b = 1721)] = 'FORMAT_BASE64';
h[(h.d6b = 1723)] = 'FORMAT_DFXP';
h[(h.ohb = 1801)] = 'INDEXDB_OPEN_EXCEPTION';
h[(h.tEa = 1802)] = 'INDEXDB_NOT_SUPPORTED';
h[(h.nhb = 1803)] = 'INDEXDB_OPEN_ERROR';
h[(h.uEa = 1804)] = 'INDEXDB_OPEN_NULL';
h[(h.mhb = 1805)] = 'INDEXDB_OPEN_BLOCKED';
h[(h.phb = 1807)] = 'INDEXDB_OPEN_TIMEOUT';
h[(h.lhb = 1808)] = 'INDEXDB_INVALID_STORE_STATE';
h[(h.Z0 = 1809)] = 'INDEXDB_ACCESS_EXCEPTION';
h[(h.Cib = 1901)] = 'MSL_UNKNOWN';
h[(h.vib = 1911)] = 'MSL_INIT_NO_MSL';
h[(h.kGa = 1913)] = 'MSL_INIT_ERROR';
h[(h.wib = 1915)] = 'MSL_INIT_NO_WEBCRYPTO';
h[(h.tib = 1931)] = 'MSL_ERROR';
h[(h.Bib = 1933)] = 'MSL_REQUEST_TIMEOUT';
h[(h.Aib = 1934)] = 'MSL_READ_TIMEOUT';
h[(h.uib = 1935)] = 'MSL_ERROR_HEADER';
h[(h.I6b = 1936)] = 'MSL_ERROR_ENVELOPE';
h[(h.J6b = 1937)] = 'MSL_ERROR_MISSING_PAYLOAD';
h[(h.jGa = 1957)] = 'MSL_ERROR_REAUTH';
h[(h.Lfa = 2103)] = 'WEBCRYPTO_MISSING';
h[(h.L8b = 2105)] = 'WEBCRYPTOKEYS_MISSING';
h[(h.olb = 2107)] = 'WEBCRYPTO_IFRAME_LOAD_ERROR';
h[(h.Q4b = 2200)] = 'CACHEDDATA_PARSEJSON';
h[(h.BAa = 2201)] = 'CACHEDDATA_UNSUPPORTED_VERSION';
h[(h.R4b = 2202)] = 'CACHEDDATA_UPGRADE_FAILED';
h[(h.GB = 2203)] = 'CACHEDDATA_INVALID_FORMAT';
h[(h.f4b = 3e3)] = 'ACCOUNT_CHANGE_INFLIGHT';
h[(h.g4b = 3001)] = 'ACCOUNT_INVALID';
h[(h.m5b = 3100)] = 'DOWNLOADED_MANIFEST_UNAVAILABLE';
h[(h.l5b = 3101)] = 'DOWNLOADED_MANIFEST_PARSE_EXCEPTION';
h[(h.j5b = 3200)] = 'DOWNLOADED_LICENSE_UNAVAILABLE';
h[(h.k5b = 3201)] = 'DOWNLOADED_LICENSE_UNUSEABLE';
h[(h.i5b = 3202)] = 'DOWNLOADED_LICENSE_EXCEPTION';
h[(h.h8b = 3300)] = 'STORAGE_VA_LOAD_ERROR';
h[(h.i8b = 3301)] = 'STORAGE_VA_LOAD_TIMEOUT';
h[(h.l8b = 3302)] = 'STORAGE_VA_SAVE_ERROR';
h[(h.m8b = 3303)] = 'STORAGE_VA_SAVE_TIMEOUT';
h[(h.j8b = 3304)] = 'STORAGE_VA_REMOVE_ERROR';
h[(h.k8b = 3305)] = 'STORAGE_VA_REMOVE_TIMEOUT';
h[(h.pea = 3077)] = 'PBO_DEVICE_EOL_WARNING';
h[(h.MHa = 3078)] = 'PBO_DEVICE_EOL_FINAL';
h[(h.PHa = 3100)] = 'PBO_DEVICE_RESET';
h[(h.OHa = 3101)] = 'PBO_DEVICE_RELOAD';
h[(h.NHa = 3102)] = 'PBO_DEVICE_EXIT';
h[(h.Cjb = 5003)] = 'PBO_VIEWABLE_OUT_OF_AVAILABILITY_WINDOW';
h[(h.mjb = 5005)] = 'PBO_ACCOUNT_ON_HOLD';
h[(h.qjb = 5006)] = 'PBO_CONCURRENT_STREAM_QUOTA_EXCEEDED';
h[(h.QHa = 5007)] = 'PBO_INCORRECT_PIN';
h[(h.zjb = 5008)] = 'PBO_MOBILE_ONLY';
h[(h.Djb = 5009)] = 'PBO_VIEWABLE_RESTRICTED_BY_PROFILE';
h[(h.vjb = 5033)] = 'PBO_INSUFFICIENT_MATURITY_LEVEL';
h[(h.ojb = 5059)] = 'PBO_BLACKLISTED_IP';
h[(h.njb = 5070)] = 'PBO_AGE_VERIFICATION_REQUIRED';
h[(h.pjb = 5080)] = 'PBO_CHOICE_MAP_ERROR';
h[(h.Ajb = 5090)] = 'PBO_RESTRICTED_TO_TESTERS';
h[(h.xjb = 5091)] = 'PBO_MALFORMED_REQUEST';
h[(h.wjb = 5092)] = 'PBO_INVALID_SERVICE_VERSION';
h[(h.yjb = 5093)] = 'PBO_MDX_INVALID_CTICKET';
h[(h.ujb = 5094)] = 'PBO_FREE_PREVIEW_ENDED';
h[(h.Bjb = 5095)] = 'PBO_STREAMING_LOCATION_DISALLOWED';
h[(h.tjb = 5096)] = 'PBO_EXTRA_MEMBER_STREAM_HOLD';
h[(h.sjb = 5097)] = 'PBO_EXTRA_MEMBER_REMOVED_STREAM_HOLD';
h[(h.vfb = 5100)] = 'DECODER_TIMEOUT_BUFFERING';
h[(h.xfb = 5101)] = 'DECODER_TIMEOUT_PRESENTING';
h[(h.wfb = 5102)] = 'DECODER_TIMEOUT_PLAYING';
h[(h.ngb = 5200)] = 'DOWNLOADER_IO_ERROR';
h[(h.dAa = 5300)] = 'BRANCHING_SEGMENT_NOTFOUND';
h[(h.geb = 5301)] = 'BRANCHING_PRESENTER_UNINITIALIZED';
h[(h.u4b = 5302)] = 'BRANCHING_SEGMENT_STREAMING_NOT_STARTED';
h[(h.tca = 5303)] = 'BRANCHING_ASE_UNINITIALIZED';
h[(h.q4b = 5304)] = 'BRANCHING_ASE_FAILURE';
h[(h.r4b = 5305)] = 'BRANCHING_MOMENT_FAILURE';
h[(h.eeb = 5306)] = 'BRANCHING_CURRENT_SEGMENT_UNINITIALIZED';
h[(h.t4b = 5307)] = 'BRANCHING_SEGMENT_LASTPTS_UNINIITALIZED';
h[(h.heb = 5308)] = 'BRANCHING_SEEK_THREW';
h[(h.s4b = 5309)] = 'BRANCHING_PLAY_NOTENOUGHNEXTSEGMENTS';
h[(h.feb = 5310)] = 'BRANCHING_PLAY_TIMEDOUT';
h[(h.ieb = 5311)] = 'BRANCHING_SEGMENT_ALREADYQUEUED';
h[(h.jeb = 5312)] = 'BRANCHING_UPDATE_NEXT_SEGMENT_WEIGHTS_THREW';
h[(h.Rkb = 5500)] = 'STUDIO_MUXED_MANIFEST';
h[(h.Rda = 5600)] = 'MANIFEST_HYDRATION_FAILURE';
h[(h.Pdb = 5700)] = 'AUXILIARY_MANIFEST_ERROR_RETRIEVING_PARENT_MANIFEST';
h[(h.Qdb = 5701)] = 'AUXILIARY_MANIFEST_NO_MATCHING_HEACC_AUDIO_STREAM_FOUND';
})((c = b.N || (b.N = {})));
(function (h) {
h[(h.F4b = 5003)] = 'BR_VIEWABLE_OUT_OF_AVAILABILITY_WINDOW';
h[(h.v4b = 5005)] = 'BR_ACCOUNT_ON_HOLD';
h[(h.z4b = 5006)] = 'BR_CONCURRENT_STREAM_QUOTA_EXCEEDED';
h[(h.C4b = 5033)] = 'BR_INSUFFICIENT_MATURITY_LEVEL';
h[(h.y4b = 5059)] = 'BR_BLACKLISTED_IP';
h[(h.w4b = 5070)] = 'BR_AGE_VERIFICATION_REQUIRED';
h[(h.D4b = 2204)] = 'BR_PLAYBACK_CONTEXT_CREATION';
h[(h.A4b = 2205)] = 'BR_DRM_LICENSE_AQUISITION';
h[(h.E4b = 2206)] = 'BR_PLAYBACK_SERVICE_ERROR';
h[(h.B4b = 2207)] = 'BR_ENDPOINT_ERROR';
h[(h.x4b = 2208)] = 'BR_AUTHORIZATION_ERROR';
})(b.hDa || (b.hDa = {}));
b.X0 = { reb: '400', G8b: '401', eIa: '413' };
b.g1 = { a6b: 1, z8b: 2, G5b: 3, F8b: 4, u6b: 5, F5b: 6, Dfa: 7, I5b: 8, M7b: 9, V7b: 10 };
b.Xca = function (h, k) {
return h == a.q1 || h == a.Y0 || (h == a.sea && 432e5 <= k);
};
b.iDa = function (h) {
return 1100 <= h && 1199 >= h;
};
b.Yca = function (h, k) {
return 1 <= h && 9 >= h ? k + h : k;
};
b.jDa = function (h) {
return (0, b.Yca)(h, c.sib);
};
b.kDa = function (h) {
return (0, b.Yca)(h, c.ht);
};
b.Ux = function (h) {
var k, l, d;
k = {};
l = h.errorExternalCode || h.qf;
d = h.errorDetails || h.Qb;
k.ErrorSubCode = h.errorSubCode || h.va || c.jn;
l && (k.ErrorExternalCode = l);
d && (k.ErrorDetails = d);
return k;
};
},
function (u, b, a) {
var k;
function c() {
return k.YR.apply(this, arguments) || this;
}
function h(l) {
return new k.mt(l, b.ma);
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.fb =
b.jEa =
b.eea =
b.xo =
b.ma =
b.hF =
b.timestamp =
b.XJb =
b.t9 =
b.Ch =
b.Oc =
b.Y6a =
b.DPb =
b.dlb =
void 0;
k = a(315);
oa(c, k.YR);
b.dlb = c;
b.DPb = function (l) {
return new k.mt(l, b.hF);
};
b.Y6a = function (l) {
return new k.mt(l * b.xo.ug, b.hF);
};
b.Oc = h;
b.Ch = function (l) {
return new k.mt(l, b.xo);
};
b.t9 = function (l) {
return new k.mt(l, b.eea);
};
b.XJb = function (l) {
return new k.mt(l, b.jEa);
};
b.timestamp = function (l) {
return h(l);
};
b.hF = new c(1, '\u03bcs');
b.ma = new c(1e3, 'ms', b.hF);
b.xo = new c(1e3 * b.ma.ug, 's', b.hF);
b.eea = new c(60 * b.xo.ug, 'min', b.hF);
b.jEa = new c(60 * b.eea.ug, 'hr', b.hF);
b.fb = h(0);
},
function (u, b, a) {
var c, h, k;
Object.defineProperties(b, { __esModule: { value: !0 } });
b.assert = void 0;
c = a(2);
h = a(141);
k = (function (l) {
function d() {
return (null !== l && l.apply(this, arguments)) || this;
}
c.__extends(d, l);
return d;
})(Error);
b.assert = function (l, d) {
if (!l)
try {
throw new k(d || 'Assertion failed');
} catch (f) {
throw (h.Zm.I.error('Assertion failed', { value: l, message: d, stack: f.stack }), f);
}
};
},
function (u, b) {
Object.defineProperties(b, { __esModule: { value: !0 } });
b.default = {
hW: function (a) {
for (var c in a) {
a.hasOwnProperty(c) && (this[c] = a[c]);
}
},
reset: function () {},
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.RQ = b.yb = b.Lda = b.Sj = void 0;
u = b.Sj || (b.Sj = {});
u[(u.Sgb = 0)] = 'FATAL';
u[(u.Pf = 1)] = 'ERROR';
u[(u.Kfa = 2)] = 'WARN';
u[(u.tda = 3)] = 'INFO';
u[(u.ULa = 4)] = 'TRACE';
u[(u.ia = 5)] = 'DEBUG';
b.Lda = 'LogFieldBuilderFactorySymbol';
b.yb = 'LoggerFactorySymbol';
b.RQ = {};
},
function (u, b, a) {
var c, h, k, l, d, f, g, m;
Object.defineProperty(b, '__esModule', { value: !0 });
b.xa =
b.EJa =
b.wV =
b.wi =
b.rj =
b.log =
b.If =
b.nN =
b.aSa =
b.Or =
b.zC =
b.Hc =
b.utb =
b.vja =
b.stb =
b.ttb =
b.pj =
b.bQ =
b.g_ =
b.bi =
b.Pc =
b.Ba =
void 0;
c = a(196);
u = a(7);
h = a(28);
k = a(74);
l = a(73);
d = a(35);
f = a(13);
g = a(140);
m = a(37);
a = a(48);
b.Ba = c.cc.get(m.ei);
b.Pc = c.cc.get(a.Vj);
b.bi = c.cc.get(k.Qv);
b.g_ = b.bi.encode.bind(b.bi);
b.bQ = b.bi.decode.bind(b.bi);
b.pj = c.cc.get(l.Kx);
b.ttb = b.pj.encode.bind(b.pj);
b.stb = b.pj.decode.bind(b.pj);
b.vja = b.pj.cH.bind(b.pj);
b.utb = b.pj.nbb.bind(b.pj);
b.Hc = c.cc.get(d.Ii);
b.zC = function (n) {
n = (0, f.Gf)(n) ? (0, b.bQ)(n) : n;
return b.Hc.encode(n);
};
b.Or = b.Hc.decode.bind(b.Hc);
b.aSa = function (n) {
return (0, b.g_)((0, b.Or)(n));
};
b.nN = function () {
return c.cc.get(h.Px);
};
b.If = c.cc.get(u.yb);
b.log = b.If.mb('General');
b.rj = function (n, p) {
return b.If.mb(n, void 0, p);
};
b.wi = function (n, p, q) {
return b.If.mb(p, n, q);
};
b.wV = function (n, p, q, v) {
return b.If.mb(n, void 0, v, p, q);
};
b.EJa = function (n, p, q) {
return c.cc.get(g.KR)(n, p, q).RZ();
};
b.xa = c.cc;
},
function (u, b, a) {
var c;
Object.defineProperties(b, { __esModule: { value: !0 } });
b.JR = b.FDa = b.dNa = void 0;
u = a(2);
u.__exportStar(a(352), b);
u.__exportStar(a(97), b);
u.__exportStar(a(21), b);
u.__exportStar(a(750), b);
u.__exportStar(a(751), b);
u.__exportStar(a(752), b);
u.__exportStar(a(753), b);
u.__exportStar(a(754), b);
u.__exportStar(a(755), b);
u.__exportStar(a(756), b);
c = u.__importDefault(a(757));
b.dNa = c.default;
c = u.__importDefault(a(758));
b.FDa = c.default;
a = u.__importDefault(a(362));
b.JR = a.default;
},
function (u) {
var b;
b = {
Ga: function (a) {
return 'number' === typeof a;
},
sj: function (a) {
return 'object' === typeof a;
},
Gf: function (a) {
return 'string' === typeof a;
},
la: function (a) {
return 'undefined' === typeof a;
},
vac: function (a) {
return 'boolean' === typeof a;
},
ed: function (a) {
return 'function' === typeof a;
},
Fb: function (a) {
return null === a;
},
isArray: function (a) {
return '[object Array]' === Object.prototype.toString.call(a);
},
isFinite: function (a) {
return isFinite(a) && !isNaN(parseFloat(a));
},
has: function (a, c) {
return null !== a && 'undefined' !== typeof a && Object.prototype.hasOwnProperty.call(a, c);
},
OSb: function (a) {
var c, h;
h = [];
if (!b.sj(a)) throw new TypeError('Object.pairs called on non-object');
for (c in a) {
a.hasOwnProperty(c) && h.push([c, a[c]]);
}
return h;
},
};
b.pf = b.forEach = function (a, c, h) {
if (null === a || 'undefined' === typeof a) return a;
if (a.length === +a.length)
for (var k = 0, l = a.length; k < l; k++) {
c.call(h, a[k], k, a);
}
else
for (k in a) {
b.has(a, k) && c.call(h, a[k], k, a);
}
return a;
};
u.exports = b;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.ura =
b.localStorage =
b.LKb =
b.indexedDB =
b.mHa =
b.cq =
b.OB =
b.NB =
b.URL =
b.j1 =
b.Qib =
b.AGa =
b.zGa =
b.e1 =
b.tR =
b.by =
b.kt =
b.en =
b.Fib =
b.sK =
b.NLa =
b.NBa =
b.ijb =
b.pop =
b.forEach =
b.filter =
b.reduce =
b.every =
b.slice =
b.map =
b.sort =
b.Zy =
b.Pib =
b.ye =
b.Hv =
b.nHa =
b.Iv =
b.i1 =
b.mF =
void 0;
u = ob;
b.re = u.navigator;
b.mF = null === b.re || void 0 === b.re ? void 0 : b.re.userAgent;
b.i1 = u.location;
b.Iv = u.screen;
b.nHa = u.devicePixelRatio;
b.Hv = u.performance;
b.ye = u.document;
b.Pib = b.ye.documentElement;
b.Zy = Array.prototype;
b.sort = b.Zy.sort;
b.map = b.Zy.map;
b.slice = b.Zy.slice;
b.every = b.Zy.every;
b.reduce = b.Zy.reduce;
b.filter = b.Zy.filter;
b.forEach = b.Zy.forEach;
b.pop = b.Zy.pop;
b.ijb = Object.create;
b.NBa = Date.now;
b.NLa = String.fromCharCode;
b.sK = Math.floor;
b.Fib = Math.ceil;
b.en = Math.round;
b.kt = Math.max;
b.by = Math.min;
b.tR = Math.random;
b.e1 = Math.abs;
b.zGa = Math.pow;
b.AGa = Math.sqrt;
b.Qib = u.escape;
b.j1 = u.unescape;
b.URL = u.URL || u.webkitURL;
b.NB = u.MediaSource || u.WebKitMediaSource;
b.OB = u.webkitCrypto || u.msCrypto || u.crypto;
b.cq = b.OB && (b.OB.webkitSubtle || b.OB.subtle);
b.mHa = u.webkitCryptokeys || u.msCryptokeys || u.cryptokeys;
try {
b.indexedDB = u.indexedDB;
} catch (a) {
b.LKb = a || 'noex';
}
try {
b.localStorage = u.localStorage;
} catch (a) {
b.ura = a || 'noex';
}
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.bn = {
K9b: 'casttv',
rka: 'chrome',
O9b: 'chromecast',
iq: 'edge',
ZVa: 'edgeoss',
vXa: 'firefox',
oac: 'ie',
opera: 'opera',
g9a: 'safari',
Mab: 'tesla',
};
b.so = { N3: 'android', Y0a: 'ios', dTa: 'chromeos', x2a: 'linux', Z2a: 'mac', fza: 'windows' };
b.W0 = { rwb: 'computer', phone: 'phone', s0b: 'tablet' };
b.Vc = 'ConfigSymbol';
},
function (u, b, a) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.ed =
b.a1a =
b.VN =
b.Gf =
b.Pqa =
b.GLb =
b.uLb =
b.Eqa =
b.BD =
b.m1a =
b.Ga =
b.Nqa =
b.isArray =
b.K1a =
b.sj =
b.od =
b.is =
void 0;
u = a(195);
b.is = u.$E;
b.od = function (c) {
return b.is.Jg(c);
};
b.sj = function (c) {
return b.is.WL(c);
};
b.K1a = function (c) {
return b.is.iia(c);
};
b.isArray = function (c) {
return b.is.Wy(c);
};
b.Nqa = function (c) {
return b.is.cRa(c);
};
b.Ga = function (c, h, k) {
return b.is.Ni(c, h, k);
};
b.m1a = function (c, h, k) {
return b.is.Pia(c, h, k);
};
b.BD = function (c, h, k) {
return b.is.yT(c, h, k);
};
b.Eqa = function (c) {
return b.is.qT(c);
};
b.uLb = function (c) {
return b.is.Rqb(c);
};
b.GLb = function (c) {
return b.is.Sqb(c);
};
b.Pqa = function (c) {
return b.is.dRa(c);
};
b.Gf = function (c) {
return b.is.Jr(c);
};
b.VN = function (c) {
return b.is.wn(c);
};
b.a1a = function (c) {
return b.is.pT(c);
};
b.ed = function (c) {
return b.is.D3(c);
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.sR =
b.d1 =
b.Ceb =
b.xeb =
b.zeb =
b.Aeb =
b.rAa =
b.web =
b.yeb =
b.qAa =
b.Beb =
b.Ieb =
b.Geb =
b.Heb =
b.Feb =
b.ygb =
b.xgb =
b.wgb =
b.kib =
b.lib =
b.qK =
b.fGa =
b.gGa =
b.pK =
b.wCa =
b.Agb =
b.Sca =
b.p0 =
b.djb =
b.Gkb =
b.bGa =
b.qeb =
b.ABa =
b.p1 =
b.zK =
b.o1 =
b.aGa =
b.ay =
b.peb =
b.cAa =
b.aib =
b.llb =
b.jib =
b.iib =
b.zkb =
b.ykb =
b.jt =
b.hg =
b.wKa =
b.ur =
void 0;
b.ffa = void 0;
b.ur = function () {};
b.wKa = function () {
return !0;
};
b.hg = { fa: !0 };
b.jt = 1e3;
b.ykb = 86400;
b.zkb = 604800;
b.iib = 1e4;
b.jib = 1e7;
b.llb = 1.5;
b.aib = 0.128;
b.cAa = 7.8125;
b.peb = 128;
b.ay = 145152e5;
b.aGa = 1e5;
b.o1 = '$netflix$player$order';
b.zK = -1;
b.p1 = 1;
b.ABa = ['en-US'];
b.qeb = 8;
b.bGa = 65535;
b.Gkb = 65536;
b.djb = Number.MAX_VALUE;
b.p0 = 'playready';
b.Sca = 'widevine';
b.Agb = 'fps';
b.wCa = 'clearkey';
b.pK = 'audio/mp4; codecs="mp4a.40.5"';
b.gGa = 'audio/mp4; codecs="mp4a.40.42"';
b.fGa = 'audio/mp4; codecs="mp4a.a6"';
b.qK = 'video/mp4; codecs="avc1.640028"';
b.lib = 'video/mp4; codecs="hev1.2.6.L153.B0"';
b.kib = 'video/mp4; codecs="dvhe.01000000"';
b.wgb = '9A04F079-9840-4286-AB92-E65BE0885F95';
b.xgb = '29701FE4-3CC7-4A34-8C5B-AE90C7439A47';
b.ygb = 'EDEF8BA9-79D6-4ACE-A3C8-27DCD51D21ED';
b.Feb = ['4E657466-6C69-7850-6966-665374726D21', '4E657466-6C69-7848-6165-6465722E7632'];
b.Heb = 'A2394F52-5A9B-4F14-A244-6C427C648DF4';
b.Geb = '4E657466-6C69-7846-7261-6D6552617465';
b.Ieb = '8974DBCE-7BE7-4C51-84F9-7148F9882554';
b.Beb = 'mp4a';
b.qAa = 'enca';
b.yeb = 'ec-3';
b.web = 'avc1';
b.rAa = 'encv';
b.Aeb = 'hvcC';
b.zeb = 'hev1';
b.xeb = 'dvhe';
b.Ceb = 'vp09';
b.d1 = 0;
b.sR = 1;
b.ffa = 'position:relative;width:100%;height:100%;overflow:hidden';
},
function (u, b) {
function a() {}
Object.defineProperty(b, '__esModule', { value: !0 });
b.Pe = b.ib = b.yf = b.ac = b.ga = b.zda = b.tF = b.Ia = void 0;
(function (c) {
c.F2a = 'loadedtracks';
c.E2a = 'loadedmetadata';
c.loaded = 'loaded';
c.error = 'error';
c.closed = 'closed';
c.fq = 'currenttimechanged';
c.Qbb = 'unthrottledcurrenttimechanged';
c.Ija = 'bufferedtimechanged';
c.WVa = 'durationchanged';
c.Scb = 'videosizechanged';
c.l6a = 'pausedchanged';
c.vua = 'playingchanged';
c.BWa = 'endedchanged';
c.gM = 'busychanged';
c.b4 = 'audiotracklistchanged';
c.lm = 'audiotrackchanged';
c.pv = 'timedtexttracklistchanged';
c.Sl = 'timedtexttrackchanged';
c.WZ = 'trickplayframeschanged';
c.G4a = 'mutedchanged';
c.Xcb = 'volumechanged';
c.axa = 'showsubtitle';
c.Dva = 'removesubtitle';
c.N3b = 'watermark';
c.Iqa = 'isReadyToTransition';
c.HN = 'inactivated';
c.T0a = 'internalPlaybackError';
c.eYb = 'segmentmaploaded';
c.fYb = 'segmentpresenting';
c.SRa = 'autoplaywasallowed';
c.e4 = 'autoplaywasblocked';
})(b.Ia || (b.Ia = {}));
(b.tF || (b.tF = {})).WY = 'playgraphsegmenttransition';
b.zda = a;
a.E9a = 'serverTimeChanged';
(function (c) {
c.ZL = 'aseReport';
c.mja = 'autoplayWasAllowed';
c.ri = 'autoplayWasBlocked';
c.dz = 'bufferUnderrun';
c.closed = 'closed';
c.Xg = 'closing';
c.fq = 'currentTimeChanged';
c.OG = 'downloadComplete';
c.HN = 'inactivated';
c.r2a = 'licenseAdded';
c.MW = 'licensed';
c.PW = 'locationSelected';
c.Vra = 'manifestClosing';
c.RH = 'manifestPresenting';
c.Y8 = 'mediaBufferChanged';
c.G9 = 'nextBranchingSegmentChosen';
c.Ju = 'playbackStart';
c.Jm = 'playbackReady';
c.Bk = 'repositioned';
c.JI = 'repositioning';
c.i9a = 'safePlayRequested';
c.WI = 'segmentPresenting';
c.$Y = 'serverSwitch';
c.y$a = 'shouldUpdateVideoDiagInfo';
c.MP = 'subtitleError';
c.Wxa = 'throttledMediaTimeChanged';
c.Rbb = 'unthrottledMediaTimeChanged';
c.SP = 'timedTextRebuffer';
c.pv = 'timedTextTrackListChanged';
c.WZ = 'trickPlayFramesChanged';
c.Cya = 'updateNextBranchingSegmentWeights';
c.a3b = 'userInitiatedPause';
c.Gcb = 'userInitiatedResume';
c.sbb = 'tracksHydrated';
})(b.ga || (b.ga = {}));
(function (c) {
c[(c.xK = 0)] = 'NOTLOADED';
c[(c.LOADING = 1)] = 'LOADING';
c[(c.se = 2)] = 'NORMAL';
c[(c.CLOSING = 3)] = 'CLOSING';
c[(c.CLOSED = 4)] = 'CLOSED';
})(b.ac || (b.ac = {}));
(function (c) {
c[(c.se = 1)] = 'NORMAL';
c[(c.sd = 2)] = 'BUFFERING';
c[(c.VKa = 3)] = 'STALLED';
})(b.yf || (b.yf = {}));
(function (c) {
c[(c.Rf = 1)] = 'WAITING';
c[(c.Mc = 2)] = 'PLAYING';
c[(c.ph = 3)] = 'PAUSED';
c[(c.hr = 4)] = 'ENDED';
})(b.ib || (b.ib = {}));
(function (c) {
c[(c.Xx = 0)] = 'INITIAL';
c[(c.vF = 1)] = 'SEEK';
c[(c.S1 = 2)] = 'TRACK_CHANGED';
c[(c.GK = 3)] = 'SEGMENT_CHANGED';
c[(c.t0 = 4)] = 'FORCE_REBUFFER';
})(b.Pe || (b.Pe = {}));
},
function (u, b, a) {
Object.defineProperties(b, { __esModule: { value: !0 } });
a(2).__exportStar(a(348), b);
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.gd = 'ApplicationSymbol';
},
function (u, b, a) {
var k, l, d, f, g, m, n, p, q, v, r, t, w, x, y, z, A, B, E;
function c(C) {
return (C = b.config.O1b[h(C)]) ? C : {};
}
function h(C) {
if (C)
return 0 <= C.indexOf('billboard')
? 'billboard'
: 0 <= C.toLowerCase().indexOf('preplay')
? 'preplay'
: 0 <= C.indexOf('embedded')
? 'embedded'
: 0 <= C.indexOf('content-sampling')
? 'content-sampling'
: 0 <= C.indexOf('video-merch-bob-horizontal')
? 'video-merch-bob-horizontal'
: 0 <= C.indexOf('mini-modal-horizontal')
? 'mini-modal-horizontal'
: 0 <= C.indexOf('standard')
? 'standard'
: 0 <= C.indexOf('branching')
? 'branching'
: C;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.vwb = b.wwb = b.NTa = b.Pka = b.uwb = b.OTa = b.twb = b.PTa = b.Oka = b.config = void 0;
k = a(14);
l = a(43);
d = a(8);
f = a(40);
g = a(24);
m = a(28);
n = a(45);
p = a(23);
a(7);
q = a(11);
v = a(13);
r = a(168);
t = a(49);
w = a(83);
x = a(108);
y = a(50);
z = a(4);
A = a(44);
B = a(17);
E = a(119);
b.PTa = function (C, F) {
var va, Z, ra, N, T, ma, ja, Aa, Sa;
function G(Wa, Ya) {
(0, p.pg)(Wa, function ($a, Za) {
(0, v.ed)(Za)
? (Ya[$a] = Za.call(void 0, Ya[$a]))
: (0, v.sj)(Za) && ((Ya[$a] = Ya[$a] || {}), G(Za, Ya[$a]));
});
}
function D(Wa, Ya, $a, Za) {
for (var gb = [], Va = 3; Va < arguments.length; ++Va) {
gb[Va - 3] = arguments[Va];
}
return function (wa) {
(0, v.od)(wa) && ($a = wa);
(0, g.wb)((0, v.ed)(Wa));
return Wa.apply(void 0, [Ya, $a].concat(da(gb)));
};
}
function I(Wa) {
Wa = Wa.toLowerCase();
N.hasOwnProperty(Wa) && ((ra[Wa] = N[Wa]), (T[Wa] = N[Wa]));
return Wa;
}
function J(Wa, Ya, $a) {
var Za;
Wa = Wa.toLowerCase();
if (ra.hasOwnProperty(Wa)) {
Za = ra[Wa];
try {
Za = $a ? $a(Za) : Za;
} catch (gb) {
Za = void 0;
}
if (void 0 !== Za) return Za;
(0, g.wb)(!1);
d.log.error('Invalid configuration value. Name: ' + Wa);
}
return Ya;
}
function P(Wa, Ya, $a, Za) {
return J(Wa, Ya, function (gb) {
(0, v.Gf)(gb) && (gb = (0, p.Cj)(gb));
if ((0, v.m1a)(gb, $a, Za)) return gb;
});
}
function H(Wa, Ya, $a, Za) {
return J(Wa, Ya, function (gb) {
(0, v.Gf)(gb) && (gb = (0, p.Cj)(gb));
if ((0, v.BD)(gb, $a, Za)) return gb;
});
}
function R(Wa, Ya, $a, Za) {
return J(Wa, Ya, function (gb) {
(0, v.Gf)(gb) && (gb = parseFloat(gb));
if ((0, v.Ga)(gb, $a, Za)) return gb;
});
}
function L(Wa, Ya, $a) {
return J(Wa, Ya, function (Za) {
if ($a ? $a.test(Za) : (0, v.Gf)(Za)) return Za;
});
}
function K(Wa, Ya) {
return J(Wa, Ya, function ($a) {
if ('true' == $a || !0 === $a) return !0;
if ('false' == $a || !1 === $a) return !1;
});
}
function O(Wa, Ya) {
return J(Wa, Ya, function ($a) {
if ((0, v.Gf)($a)) return JSON.parse((0, q.j1)($a));
if ((0, v.sj)($a)) return $a;
});
}
function M(Wa, Ya, $a, Za, gb, Va) {
var wa;
Wa = Wa.toLowerCase();
ra.hasOwnProperty(Wa) && (wa = ra[Wa]);
if (!(0, v.od)(wa)) return Ya;
if ((0, v.Gf)(wa))
if (wa[0] !== $a) wa = Za(wa);
else
try {
wa = JSON.parse((0, q.j1)(wa));
} catch (Ea) {
wa = void 0;
}
if (void 0 === wa) return Ya;
for (Wa = 0; Wa < gb.length; Wa++) {
if (!gb[Wa](wa)) return Ya;
}
return Va ? Va(wa) : wa;
}
function Q(Wa, Ya, $a, Za, gb) {
return M(
Wa,
Ya,
'[',
function (Va) {
Va = Va.split('|');
for (var wa = Va.length; wa--; ) {
Va[wa] = (0, p.Cj)(Va[wa]);
}
return Va;
},
[
function (Va) {
return (0, v.isArray)(Va) && 0 < Va.length;
},
function (Va) {
for (var wa = Va.length; wa--; ) {
if (!(0, v.BD)(Va[wa], $a, Za)) return !1;
}
return !0;
},
function (Va) {
return void 0 === gb || Va.length >= gb;
},
]
);
}
function S(Wa, Ya) {
return M(
Wa,
Ya,
'[',
function ($a) {
$a = (0, v.isArray)($a) ? $a : $a.split('|');
for (var Za = $a.length; Za--; ) {
try {
$a[Za] = JSON.parse((0, q.j1)($a[Za]));
} catch (gb) {
$a = void 0;
break;
}
}
return $a;
},
[
function ($a) {
return (0, v.isArray)($a) && 0 < $a.length;
},
function ($a) {
for (var Za = $a.length; Za--; ) {
if (!(0, v.od)($a[Za]) || !(0, v.sj)($a[Za])) return !1;
}
return !0;
},
]
);
}
function X(Wa, Ya) {
var $a;
$a = ea(Wa, []);
return $a && 0 < $a.length ? (0, E.fo)($a) : S(Wa, Ya);
}
function ea(Wa, Ya, $a, Za) {
return M(
Wa,
Ya,
'[',
function (gb) {
return (0, v.isArray)(gb) ? gb : gb.split('|');
},
[
function (gb) {
return (0, v.isArray)(gb) && 0 < gb.length;
},
function (gb) {
for (var Va = gb.length; Va--; ) {
if ($a ? !$a.test(gb[Va]) : !(0, v.VN)(gb[Va])) return !1;
}
return !0;
},
function (gb) {
return void 0 === Za || gb.length >= Za;
},
]
);
}
function la(Wa, Ya, $a) {
return M(
Wa,
Ya,
'{',
function (Za) {
var gb, wa, Ea;
gb = {};
Za = Za.split(';');
for (var Va = Za.length; Va--; ) {
wa = Za[Va];
Ea = wa.indexOf(':');
if (0 >= Ea) return;
gb[wa.substring(0, Ea)] = wa.substring(Ea + 1);
}
return gb;
},
[
function (Za) {
return (0, v.sj)(Za) && 0 < Object.keys(Za).length;
},
function (Za) {
if ($a)
for (var gb in Za) {
if (!$a.test(Za[gb])) return !1;
}
return !0;
},
],
function (Za) {
var gb;
gb = {};
(0, p.Dd)(gb, Ya);
(0, p.Dd)(gb, Za);
return gb;
}
);
}
function Da(Wa) {
var Ya;
Ya = [];
(0, p.pg)(Wa, function ($a, Za) {
var gb;
try {
gb = 'videoapp' === $a.toLowerCase() ? '[object object]' : JSON.stringify(Za);
} catch (Va) {
gb = 'cantparse';
}
Ya.push($a + '=' + gb);
});
return Ya.join('\n');
}
va = /^[0-9]+[%]?$/;
Z = /^[0-9]*$/;
T = {};
ma = d.xa.get(f.qo);
ja = d.xa.get(x.qF);
(function (Wa) {
function Ya($a) {
$a.split(',').forEach(function (Za) {
var gb;
gb = Za.indexOf('=');
0 < gb && (ra[Za.substring(0, gb).toLowerCase()] = Za.substring(gb + 1));
});
}
ra = {};
(0, p.Dd)(ra, Wa);
C &&
C.length &&
q.forEach.call(C, function ($a) {
(0, v.Gf)($a) ? Ya($a) : (0, v.sj)($a) && (0, p.Dd)(ra, $a, { UW: !0 });
});
N = (0, p.Dd)({}, (0, l.U6)(), { UW: !0 });
if ((Wa = (0, l.J7a)().cadmiumconfig)) d.log.info('Config cookie loaded', Wa), Ya(Wa);
if (d.xa.get(A.vo).L3 || ra.istestaccount) (0, p.Dd)(ra, N), (T = N);
})(F);
b.config = {};
Aa = {
LCb: D(K, I('enableXHEAAC'), !1),
jWa: D(K, I('enableDDPlus20'), !0),
iWa: D(K, I('enableDDPlus'), !0),
SM: D(K, I('enableDDPlusAtmos'), !0),
sCb: D(K, I('enableLSSDH'), !0),
mCb: D(K, I('enableHEVC'), !1),
Z5a: D(K, I('overrideEnableHEVC'), !1),
kma: D(K, I('enableHDR'), !1),
Y5a: D(K, I('overrideEnableHDR'), !1),
X5a: D(K, I('overrideEnableDV'), !1),
PM: D(K, I('enableAVCHigh'), ja.PM),
qI: D(K, I('overrideEnableAVCHigh'), ja.qI),
JCb: D(K, I('enableVP9'), !1),
$5a: D(K, I('overrideEnableVP9'), !1),
fCb: D(K, I('enableAV1'), !1),
W5a: D(K, I('overrideEnableAV1'), !1),
KSb: D(K, I('overrideEnableXHEAAC'), !1),
ISb: D(K, 'overrideEnableAllAudioProfiles', !1),
JSb: D(K, 'overrideEnableAllVideoProfiles', !1),
zCb: D(K, I('enablePRK'), !1),
kCb: D(K, I('enableDV'), !1),
mWa: D(K, I('enableHWDRM'), !1),
pCb: D(K, I('enableImageSubs'), !0),
pG: D(X, I('audioProfiles'), ja.pG),
f$b: D(K, I('disableHD'), !1),
HCb: D(K, I('enableUHD'), !0),
Eba: D(H, 'videoCapabilityDetectorType', m.zl.zv),
gja: D(H, 'audioCapabilityDetectorType', m.vv.zv),
Ym: D(X, I('videoProfiles'), ja.Ym),
RQa: D(X, I('additionalVideoProfiles'), []),
xqb: D(ea, I('timedTextProfiles'), ja.ov),
ov: function () {
return Aa.xqb().filter(function (Wa) {
return Wa === n.$l.Kca ? Aa.sCb() : Wa === n.$l.wK ? Aa.pCb() : !0;
});
},
endpoint: D(K, I('endpoint'), !1),
version: D(L, 'version', 'unknown'),
nCb: D(K, I('enableHdcp'), !1),
Uu: D(K, I('prepareCadmium'), !1),
Wqb: D(K, I('acceptManifestOnPrepareItemParams'), !0),
gUb: D(O, 'ppmconfig', { maxNumberTitlesScheduled: 1 }),
XU: D(K, I('enableLdlPrefetch'), !1),
qWa: D(K, I('enableMediaPrefetch'), !1),
tCb: D(K, I('enableManifestCache'), !0),
EAb: D(K, I('deleteCachedManifestOnPlayback'), !1),
DAb: D(K, I('deleteCachedManifestOnCreate'), !1),
IAb: D(K, I('deleteOtherManifestCacheOnCreate'), !1),
HAb: D(K, I('deleteOtherLdlCacheOnCreate'), !1),
Vbc: D(H, I('periodicPrepareLogsIntervalMilliseconds'), 36e5),
DUb: D(H, I('prepareManifestCacheMaxCount'), 50),
BUb: D(H, I('prepareLdlCacheMaxCount'), 30),
b7a: D(H, I('prepareManifestExpiryMilliseconds'), 12e5),
CUb: D(H, I('prepareLdlExpiryMilliseconds'), 78e4),
vUb: D(H, I('prefetcherMaxWishlistSize'), 10),
uUb: D(H, I('prefetcherBudgetInBytes'), Infinity),
wUb: D(K, I('prefetcherOverrideItemPriority'), !0),
AUb: D(L, I('prepareInsertStrategyPersistentTasks'), 'append', /^(prepend|append|ignore)$/),
qdc: D(O, 'videoApp'),
wE: D(O, 'storageRules'),
l6: D(K, 'ftlEnabled', ja.l6),
Ppa: D(H, I('imageSubsResolution'), 0),
vKb: D(H, I('imageSubsMaxBuffer'), ja.TOb.ca(y.wv), 0),
cU: D(K, I('captureBatteryStatus'), !1),
xFb: D(H, I('getBatteryApiTimeoutMilliseconds'), 5e3),
Cm: D(L, I('keySystemId'), ja.Cm),
c2a: D(ea, I('keySystemList'), void 0, void 0),
Tya: D(K, I('validateKeySystemAccess'), !1),
HPb: D(H, I('hdcpGlobalTimeout1'), 1e4),
IPb: D(H, I('hdcpGlobalTimeout2'), 1e4),
mbc: D(H, I('hdcpQueryTimeout1'), 1e3),
nbc: D(H, I('hdcpQueryTimeout2'), 1e3),
f4a: D(H, I('hdcpQueryTimeout2'), 100),
JPb: D(K, I('microsoftHwdrmRequiresHevc'), !1),
Asa: D(K, I('microsoftClearLeadRequiresSwdrm'), !1),
EPb: D(K, I('microsoftEnableDeviceInfo'), !1),
FPb: D(K, I('microsoftEnableHardwareInfo'), !1),
GPb: D(K, I('microsoftEnableHardwareReset'), !1),
N2b: D(K, I('useHevcCodecForDolbyVision'), !1),
vCb: D(K, I('enableMediaCapabilities'), !1),
fUb: D(K, I('powerEfficientForVideo'), !1),
wCb: D(K, I('enableMediaCapabilitiesSourceBufferCheck'), !1),
WNb: D(K, 'logMediaPipelineStatus', !1),
EY: D(K, I('renderDomDiagnostics'), !0),
N2a: function () {
return -1;
},
aO: D(P, I('logDisplayMaxEntryCount'), ja.aO, -1),
bOb: D(P, I('logToConsoleLevel'), -1),
B9b: D(P, I('bladerunnerCmdHistorySize'), 10),
Bw: function () {
return ma.Bw;
},
zra: D(K, 'logErrorIfEsnNotProvided', !0),
rma: D(K, 'enforceSinglePlayback', ja.rma),
C5: D(K, 'enforceSingleSession', ja.C5),
Dka: D(K, 'closeOtherPlaybacks', !0),
Hsb: D(H, 'asyncLoadTimeout', 15e3, 1),
jOb: D(H, 'mainThreadMonitorPollRate', 0),
sH: function () {
return ma.sH;
},
kM: function () {
return ma.kM;
},
$Z: function () {
return ma.$Z;
},
Mcb: D(H, I('verbosePlaybackInfoDenominator'), 0),
U$: D(K, 'renderTimedText', !0),
hUb: D(K, 'preBufferTimedText', !0),
DDb: D(K, 'fatalOnTimedTextLoadError', !0),
ebb: D(la, 'timedTextStyleDefaults', {}),
aya: D(la, 'timedTextStyleOverrides', {}),
$xa: D(
la,
'timedTextFontFamilyMapping',
ja.$xa || { default: 'font-family:Arial,Helvetica;font-weight:bolder' }
),
TP: D(H, 'timedTextSimpleFallbackThreshold', ja.TP.ca(y.wv)),
GN: D(ea, I('imscLanguageList'), ja.GN, []),
qla: D(L, I('customDfxpUrl')),
GCb: D(K, I('enableSubtitleTrackerLogging'), !1),
qYb: D(K, I('sendSubtitleQoeLogblobOnMidplay'), !1),
dka: D(Q, 'cdnIdWhiteList', []),
cka: D(Q, 'cdnIdBlackList', []),
mna: D(L, I('forceAudioTrack')),
qna: D(L, I('forceTimedTextTrack')),
aPb: D(H, I('maxRetriesTimedTextDownload'), 0),
P0b: D(H, I('timedTextRetryInterval'), 8e3),
x_b: D(L, 'storageType', 'idb', /^(none|fs|idb|ls)$/),
J2a: D(H, 'lockExpiration', 1e4),
UNb: D(H, 'lockRefresh', 3e3),
Pub: D(K, 'captureUnhandledExceptions', !0),
uKb: D(K, 'ignoreUnhandledExceptionDuringPlayback', !0),
R1b: D(K, 'unhandledExceptionsArePlaybackErrors', !1),
Lbb: D(L, 'unhandledExceptionSource', ''),
MUb: D(K, 'preserveLastFrame', !1),
QPb: D(H, 'minBufferingTimeInMilliseconds', 4e3),
hVb: D(H, 'progressBackwardsGraceTimeMilliseconds', 4e3),
iVb: D(H, 'progressBackwardsMinPercent', 10),
Ftb: D(L, I('bookmarkIgnoreBeginning'), '0', va),
Gtb: D(L, I('bookmarkIgnoreEnd'), '5%', va),
Htb: D(L, I('bookmarkIgnoreEndForBranching'), '60000', va),
eO: D(H, 'maxParallelConnections', 3),
Nva: D(K, 'reportThroughputInLogblobs', !0),
Zw: D(H, 'minAudioMediaRequestDuration', 16e3),
OPb: D(H, 'minAudioMediaRequestDurationBranching', 0),
DA: D(H, 'minVideoMediaRequestDuration', 4e3),
XPb: D(H, 'minVideoMediaRequestDurationVariableGOP', 0),
VPb: D(H, 'minVideoMediaRequestDurationBranching', 0),
i9: D(H, 'minAudioMediaRequestSizeBytes', 0),
r9: D(H, 'minVideoMediaRequestSizeBytes', 0),
NBb: D(K, 'droppedFrameRateFilterEnabled', !1),
OBb: D(H, 'droppedFrameRateFilterMaxObservation', 60, 10, 1e3),
QBb: D(
function (Wa, Ya, $a, Za, gb, Va) {
return M(
Wa,
Ya,
'[',
function (wa) {
wa = wa.split(';');
for (var Ea = wa.length; Ea--; ) {
wa[Ea] = wa[Ea].split('|');
for (var Na = wa[Ea].length; Na--; ) {
wa[Ea][Na] = (0, p.Cj)(wa[Ea][Na]);
}
}
return wa;
},
[
function (wa) {
return (0, v.isArray)(wa) && 0 < wa.length;
},
function (wa) {
for (var Ea = wa.length; Ea-- && void 0 !== wa; ) {
if (!(0, v.isArray)(wa[Ea])) return !1;
for (var Na = wa[Ea].length; Na--; ) {
if (!(0, v.BD)(wa[Ea][Na], $a, Za)) return !1;
}
}
return !0;
},
function (wa) {
if (void 0 !== gb)
for (var Ea = wa.length; Ea--; ) {
if (gb !== wa[Ea].length) return !1;
}
return !0;
},
function (wa) {
return void 0 === Va || wa.length >= Va;
},
]
);
},
'droppedFrameRateFilterPolicy',
[
[3, 15],
[6, 9],
[9, 2],
[15, 1],
],
void 0,
void 0,
2,
0
),
PBb: D(H, 'droppedFrameRateFilterMinHeight', 384),
RBb: D(Q, 'droppedFramesPercentilesList', []),
KPb: D(K, 'microsoftScreenSizeFilterEnabled', !1),
GMb: D(K, 'keyStatusFilterEnabled', !1),
N_a: D(H, 'hdcpEngagementWaitTime', 0),
N1b: D(K, 'uiLabelFilterEnabled', !0),
M1b: D(O, 'uiLabelFilter', {}),
yAb: D(H, I('defaultVolume'), 100, 0, 100),
isa: D(H, I('maxPlaybackRate'), 2, 0, 16),
xVa: D(K, 'disableVideoRightClickMenu', !1),
m9: D(H, 'minDecoderBufferMilliseconds', 1e3, 0, k.ay),
pI: D(H, 'optimalDecoderBufferMilliseconds', 5e3, 0, k.ay),
L5a: D(H, 'optimalDecoderBufferMillisecondsBranching', 3e3, 0, k.ay),
PD: D(H, 'minimumTimeBeforeBranchDecision', 3e3, 0, k.ay),
u4a: D(H, 'minimumTimeBeforeDelayedSeekToQueuedSegment', 500, 0, k.ay),
tA: D(H, 'maxDecoderBufferMilliseconds', ja.tA.ca(z.ma), 0, k.ay),
$Ua: D(H, 'decoderTimeoutMilliseconds', 1e4, 1),
V4a: D(H, 'noRenderTimeoutMilliseconds', 0),
cTb: D(H, 'pauseTimeoutLimitMilliseconds', 18e5),
Rpa: D(H, 'inactivityMonitorInterval', 3e4, 0),
Vqb: D(Q, 'abrdelLogPointsSeconds', [15, 30, 60, 120], 0, void 0, 4),
UM: D(K, 'enableTrickPlay', !1),
Nrb: D(Q, 'additionalDownloadSimulationParams', [2e3, 2e3, 100], 0, void 0, 3),
x1b: D(H, 'trickPlayHighResolutionBitrateThreshold', 1e3),
y1b: D(H, 'trickPlayHighResolutionThresholdMilliseconds', 1e4),
B1b: D(R, 'trickplayBufferFactor', 0.5),
w1b: D(H, 'trickPlayDownloadRetryCount', 1),
Zra: D(L, 'marginPredictor', 'simple', /^(simple|scale|iqr|percentile)$/),
Usa: D(L, 'networkMeasurementGranularity', 'video_location', /^(location|video_location)$/),
hEa: D(O, 'HistoricalTDigestConfig', { maxc: 25, rc: 'ewma', c: 0.5, hl: 7200 }),
C3a: D(P, 'maxIQRSamples', Infinity),
o4a: D(P, 'minIQRSamples', 5),
Ccb: D(K, 'useResourceTimingAPI', !1),
qKb: D(K, 'ignoreFirstByte', !0),
ssa: D(K, 'mediaRequestAsyncLoadStart', ja.ssa),
W2b: D(K, 'useXHROnLoadStart', !1),
Kma: D(Q, 'failedDownloadRetryWaitsASE', [10, 200, 500, 1e3, 2e3, 4e3]),
H4: D(H, 'connectTimeoutMilliseconds', 8e3, 500),
$sa: D(H, 'noProgressTimeoutMilliseconds', 8e3, 500),
P2b: D(K, 'useOnLineApi', !1),
dbb: D(H, 'timedTextDownloadRetryCountBeforeCdnSwitch', 3),
zbc: D(H, 'netflixRequestExpiryTimeout', 0),
O3b: D(K, 'webkitDecodedFrameCountIncorrectlyReported', !1),
ZXb: D(H, 'seekBackOnAudioTrackChangeMilliseconds', 8e3),
Taa: D(ea, I('supportedAudioTrackTypes'), [], void 0, 1),
K7: D(H, 'initialLogFlushTimeout', 5e3),
J6a: D(L, 'playdataPersistKey', ma.Bw ? 'unsentplaydatatest' : 'unsentplaydata'),
Acc: D(K, 'sendPersistedPlaydata', !0),
JTb: D(H, 'playdataPersistIntervalMilliseconds', 4e3),
Wbc: D(H, 'playdataSendDelayMilliseconds', 1e4),
Bcc: D(K, 'sendPlaydataBackupOnInit', !0),
ZNb: D(
ea,
'logPerformanceTiming',
'navigationStart redirectStart fetchStart secureConnectionStart requestStart domLoading'.split(' ')
),
g4a: D(K, 'midplayEnabled', !0),
g9: D(H, 'midplayIntervalMilliseconds', 3e5),
h4a: D(Q, 'midplayKeyPoints', [15e3, 3e4, 6e4, 12e4]),
t5: D(H, 'downloadReportDenominator', 0),
BBb: D(H, 'downloadReportInterval', 3e5),
M2a: D(H, 'logConfigApplyDenominator', 0),
jSa: D(la, I('bookmarkByMovieId'), {}),
qV: D(K, I('forceLimitedDurationLicense'), !1),
FD: D(H, I('licenseRenewalRequestDelay'), 0),
fua: D(H, I('persistedReleaseDelay'), 1e4),
Hac: D(K, I('limitedDurationFlagOverride'), void 0),
h9a: D(H, 'safariPlayPauseWorkaroundDelay', 100),
Z3b: D(H, 'workaroundValueForSeekIssue', 1200),
Zja: D(K, I('callEndOfStream'), ja.Zja),
mTb: D(K, 'performRewindCheck', !0),
FDb: D(K, 'fatalOnUnexpectedSeeking', !0),
EDb: D(K, 'fatalOnUnexpectedSeeked', !0),
kZb: D(K, I('setVideoElementSize')),
Svb: D(K, I('clearVideoSrc'), !0),
jVa: D(H, I('delayPlayPause'), 0),
ar: D(K, I('useTypescriptEme'), !1),
ucb: D(K, I('useEncryptedEvent'), !0),
RU: D(L, I('drmPersistKey'), 'unsentDrmData'),
p7a: D(K, I('promiseBasedEme'), !1),
Oub: D(K, 'captureKeyStatusData', !1),
cRb: D(K, I('nudgeSourceBuffer'), !1),
qwa: D(P, I('seekDelta'), 1),
bY: D(K, I('preciseSeeking'), !1),
kUb: D(K, I('preciseSeekingOnTwoCoreDevice'), !1),
iVa: D(la, I('delayErrorHandling')),
$k: D(L, 'esn', ''),
bXa: D(L, 'fesn', ''),
BCb: D(K, I('enablePerformanceLogging'), !1),
lWa: D(K, I('enableEmeVerboseLogging'), !1),
appId: D(L, 'appId', '', Z),
sessionId: D(L, 'sessionId', '', Z),
eka: D(L, 'cdnProxyUrl'),
T2b: D(K, 'usePlayReadyHeaderObject', !1),
EXa: D(H, 'forceXhrErrorResponseCode', void 0),
iq: {
wbc: D(L, 'mslApiPath', '/msl/'),
acc: D(L, 'proxyPath', ''),
Ax: D(L, 'uiVersion'),
qba: D(L, 'uiPlatform'),
L9b: function () {
return '0';
},
Cua: D(ea, 'preferredLanguages', k.ABa, /^[a-zA-Z-]{2,5}$/, 1),
AEb: D(L, I('forceDebugLogLevel'), void 0, /^(ERROR|WARN|INFO|TRACE)$/),
d0b: D(K, 'supportPreviewContentPin', !0),
e0b: D(K, 'supportWatermarking', !0),
LZb: D(K, 'showAllSubDubTracks', !1),
D$b: D(K, I('failOnGuidMismatch'), !1),
},
M$: { enabled: D(K, 'qcEnabled', !1), kp: D(L, 'qcPackageId', '') },
Ys: D(K, 'useRangeHeader', !1),
YU: D(K, 'enableMilestoneEventList', !0),
d4: D(L, 'authenticationType', ma.Bw ? ja.PRa : ja.d4),
dtb: D(la, 'authenticationKeyNames', (0, p.Dd)({ e: 'DKE', h: 'DKH', w: 'DKW', s: 'DKS' })),
p0b: D(L, 'systemKeyWrapFormat'),
FZb: D(K, 'shouldSendUserAuthData', !0),
Cwa: D(K, 'sendUserAuthIfRequired', ja.Cwa),
BZb: D(K, 'shouldClearUserData', !1),
aQ: D(K, 'usesMsl', !0),
nQb: D(K, 'mslDeleteStore', !1),
pQb: D(K, 'mslPersistStore', !0),
Uwb: D(K, 'correctNetworkForShortTitles', !0),
eUb: D(K, 'postplayHighInitBitrate', !1),
j0b: D(K, 'supportsUnequalizedDownloadables', !0),
UUa: D(H, I('debugAseDenominator'), 100),
S3: D(H, 'aseAudioBufferSizeBytes', ja.S3.ca(y.wv)),
V3: D(H, 'aseVideoBufferSizeBytes', ja.V3.ca(y.wv)),
$w: D(H, 'minInitVideoBitrate', 560),
Fsa: D(H, 'minHCInitVideoBitrate', 560),
vA: D(H, 'maxInitVideoBitrate', Infinity),
lX: D(H, 'minInitAudioBitrate', 0),
jX: D(H, 'minHCInitAudioBitrate', 0),
XW: D(H, 'maxInitAudioBitrate', 65535),
h9: D(H, 'minAcceptableVideoBitrate', 235),
$H: D(H, 'minRequiredBuffer', 3e4),
yj: D(H, 'minPrebufSize', 7800),
l9: D(H, 'minCheckBufferingCompleteInterval', 999999),
ova: D(R, 'rebufferingFactor', 1),
ws: D(H, 'maxBufferingTime', 2600),
Nya: D(K, 'useMaxPrebufSize', !0),
LD: D(H, 'maxPrebufSize', 45e3),
ksa: D(H, 'maxRebufSize', Infinity),
H7: D(S, 'initialBitrateSelectionCurve', null),
D0a: D(H, 'initSelectionLowerBound', 560),
E0a: D(H, 'initSelectionUpperBound', 1050),
JZ: D(H, 'throughputPercentForAudio', 15),
sja: D(H, 'bandwidthMargin', 10),
tja: D(K, 'bandwidthMarginContinuous', !1),
uja: D(S, 'bandwidthMarginCurve', [
{ m: 65, b: 8e3 },
{ m: 65, b: 3e4 },
{ m: 50, b: 6e4 },
{ m: 45, b: 9e4 },
{ m: 40, b: 12e4 },
{ m: 20, b: 18e4 },
{ m: 5, b: 24e4 },
]),
Rka: D(H, 'conservBandwidthMargin', 20),
Qxa: D(K, 'switchConfigBasedOnInSessionTput', !1),
mU: D(H, 'conservBandwidthMarginTputThreshold', 0),
Ska: D(S, '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 },
]),
Fab: D(K, 'switchAlgoBasedOnHistIQR', !1),
yE: D(L, 'switchConfigBasedOnThroughputHistory', 'none', /^(none|iqr|avg)$/),
jsa: D(P, 'maxPlayerStateToSwitchConfig', -1),
Kra: D(L, 'lowEndMarkingCriteria', 'none', /^(none|iqr|avg)$/),
wda: D(R, 'IQRThreshold', 0.5),
Fpa: D(L, 'histIQRCalcToUse', 'simple'),
Du: D(H, 'maxTotalBufferLevelPerSession', 0),
y5: D(K, 'enableCombinedPlaygraphs', !0),
Fma: D(ea, 'excludedContentPlaygraphIds', []),
z5: D(K, 'enableDiscontiguousBuffering', !1),
ona: D(Q, 'forceImmediateTransitionTypeForTitles', []),
nna: D(H, 'forceImmediateTransitionExitZone', 0),
Jya: D(K, 'useBufferSizeLimiter', !1),
Mya: D(K, 'useLegacyFragmentRounding', !1),
$ya: D(K, 'waitForDrmToAppendHeadersWhenClearAndEncryptedContent', !0),
V_a: D(H, 'highWatermarkLevel', 3e4),
mbb: D(H, 'toStableThreshold', 3e4),
dba: D(H, 'toUnstableThreshold', ja.dba.ca(z.ma)),
hxa: D(K, 'skipBitrateInUpswitch', !0),
eza: D(H, 'watermarkLevelForSkipStart', 8e3),
zpa: D(H, 'highStreamRetentionWindow', 9e4),
Lra: D(H, 'lowStreamTransitionWindow', 51e4),
Bpa: D(H, 'highStreamRetentionWindowUp', 3e5),
Nra: D(H, 'lowStreamTransitionWindowUp', 3e5),
Apa: D(H, 'highStreamRetentionWindowDown', 6e5),
Mra: D(H, 'lowStreamTransitionWindowDown', 0),
ypa: D(R, 'highStreamInfeasibleBitrateFactor', 0.5),
oA: D(H, 'lowestBufForUpswitch', 15e3),
C8: D(H, 'lockPeriodAfterDownswitch', 15e3),
Pra: D(H, 'lowWatermarkLevel', 25e3),
pA: D(H, 'lowestWaterMarkLevel', 2e4),
Qra: D(K, 'lowestWaterMarkLevelBufferRelaxed', !1),
rsa: D(R, 'mediaRate', 1),
S8: D(H, 'maxTrailingBufferLen', 1e4),
ET: D(H, 'audioBufferTargetAvailableSize', 262144),
j_: D(H, 'videoBufferTargetAvailableSize', 1048576),
P3a: D(H, 'maxVideoTrailingBufferSize', 8388608),
x3a: D(H, 'maxAudioTrailingBufferSize', 393216),
S5: D(R, 'fastUpswitchFactor', 3),
Lma: D(R, 'fastDownswitchFactor', 1),
wA: D(H, 'maxMediaBufferAllowed', 24e4),
fxa: D(K, 'simulatePartialBlocks', !0),
D$a: D(K, 'simulateBufferFull', !0),
Tka: D(K, 'considerConnectTime', !1),
Qka: D(R, 'connectTimeMultiplier', 1),
T2a: D(H, 'lowGradeModeEnterThreshold', 12e4),
U2a: D(H, 'lowGradeModeExitThreshold', 9e4),
z3a: D(H, 'maxDomainFailureWaitDuration', 3e4),
w3a: D(H, 'maxAttemptsOnFailure', 18),
RWa: D(K, 'exhaustAllLocationsForFailure', !0),
F3a: D(H, 'maxNetworkErrorsDuringBuffering', 20),
K8: D(H, 'maxBufferingTimeAllowedWithNetworkError', 12e4),
YWa: D(H, 'fastDomainSelectionBwThreshold', 2e3),
Rab: D(H, 'throughputProbingEnterThreshold', 4e4),
Sab: D(H, 'throughputProbingExitThreshold', 34e3),
H2a: D(H, 'locationProbingTimeout', 1e4),
eXa: D(H, 'finalLocationSelectionBwThreshold', 1e4),
Pab: D(R, 'throughputHighConfidenceLevel', 0.75),
Qab: D(R, 'throughputLowConfidenceLevel', 0.4),
sWa: D(K, 'enablePerfBasedLocationSwitch', !1),
Xu: D(K, 'probeServerWhenError', !0),
Lua: D(H, 'probeRequestTimeoutMilliseconds', 8e3),
Vy: D(K, 'allowSwitchback', !0),
CI: D(H, 'probeDetailDenominator', 100),
L8: D(H, 'maxDelayToReportFailure', 300),
wra: D(H, 'locationStatisticsUpdateInterval', 6e4),
hUa: D(K, 'countGapInBuffer', !1),
XQa: D(K, 'allowCallToStreamSelector', !0),
rSa: D(H, 'bufferThresholdForAbort', 1e4),
$Ob: D(H, 'maxResponsesInitialTput', 6),
nWa: D(K, 'enableInitialTputLogging', !1),
iua: D(H, 'pipelineScheduleTimeoutMs', 2),
xA: D(H, 'maxPartialBuffersAtBufferingStart', 2),
lsa: D(H, 'maxStreamingSkew', 4e3),
hsa: D(H, 'maxPendingBufferPercentage', 10),
q7: D(H, 'headerRequestSize', 4096),
yma: D(K, 'estimateHeaderSize', !1),
hX: D(H, 'minBufferLenForHeaderDownloading', 1e4),
MY: D(H, 'reserveForSkipbackBufferMs', 1e4),
kta: D(H, 'numExtraFragmentsAllowed', 2),
Hq: D(K, 'pipelineEnabled', !1),
M$a: D(H, 'socketReceiveBufferSize', 0),
Z3: D(H, 'audioSocketReceiveBufferSize', 32768),
gQ: D(H, 'videoSocketReceiveBufferSize', 65536),
wpa: D(H, 'headersSocketReceiveBufferSize', 32768),
vba: D(H, 'updatePtsIntervalMs', 1e3),
Fja: D(H, 'bufferTraceDenominator', 100),
eM: D(H, 'bufferLevelNotifyIntervalMs', 2e3),
$L: D(H, 'aseReportDenominator', 0),
T3: D(H, 'aseReportIntervalMs', 3e5),
gCb: D(K, 'enableAbortTesting', !1),
Tqb: D(H, 'abortRequestFrequency', 8),
Hxa: D(H, 'streamingStatusIntervalMs', 2e3),
NA: D(H, 'prebufferTimeLimit', 24e4),
k9: D(H, 'minBufferLevelForTrackSwitch', 2e3),
bua: D(H, 'penaltyFactorForLongConnectTime', 2),
Ira: D(H, 'longConnectTimeThreshold', 200),
Fia: D(H, 'additionalBufferingLongConnectTime', 2e3),
Gia: D(H, 'additionalBufferingPerFailure', 8e3),
vY: D(H, 'rebufferCheckDuration', 6e4),
pWa: D(K, 'enableLookaheadHints', !1),
Q2a: D(H, 'lookaheadFragments', 2),
Fz: D(K, 'enableOCSideChannel', !0),
m1: D(O, 'OCSCBufferQuantizationConfig', { lv: 5, mx: 240 }),
Ybb: D(K, 'updateDrmRequestOnNetworkFailure', !1),
hVa: D(K, 'deferAseScheduling', !1),
y3a: D(H, 'maxDiffAudioVideoEndPtsMs', 16e3),
e5: D(H, 'defaultHeaderCacheSize', 4),
d5: D(H, 'defaultHeaderCacheDataPrefetchMs', 8e3),
gI: D(K, 'neverWipeHeaderCache', !0),
Tsa: D(H, 'networkFailureResetWaitMs', 2e3),
Ssa: D(H, 'networkFailureAbandonMs', 6e4),
Q8: D(H, 'maxThrottledNetworkFailures', 3),
Yaa: D(H, 'throttledNetworkFailureThresholdMs', 200),
Ora: D(P, 'lowThroughputThreshold', 400),
Ema: D(K, 'excludeSessionWithoutHistoryFromLowThroughputThreshold', !1),
B4a: D(K, 'mp4ParsingInNative', !1),
O$a: D(K, 'sourceBufferInOrderAppend', !0),
iE: D(K, 'requireAudioStreamToEncompassVideo', !0),
WQa: D(K, 'allowAudioToStreamPastVideo', !0),
vi: D(K, 'enableManagerDebugTraces', !1),
f3a: D(H, 'managerDebugMessageInterval', 1e3),
e3a: D(H, 'managerDebugMessageCount', 20),
h5a: D(K, 'notifyManifestCacheEom', !1),
Eja: D(H, 'bufferThresholdToSwitchToSingleConnMs', 18e4),
Dja: D(H, 'bufferThresholdToSwitchToParallelConnMs', 12e4),
o$: D(H, 'periodicHistoryPersistMs', 3e5),
jaa: D(H, 'saveVideoBitrateMs', 18e4),
mRa: D(K, 'appendMediaRequestOnComplete', !0),
Jba: D(K, 'waitForDrmToAppendMedia', !1),
d6: D(K, I('forceAppendHeadersAfterDrm'), !1),
FVb: D(K, I('reappendRequestsOnSkip'), !1),
tQb: D(H, 'netIntrStoreWindow', 36e3),
SPb: D(H, 'minNetIntrDuration', 8e3),
ADb: D(H, 'fastHistoricBandwidthExpirationTime', 10368e3),
ntb: D(H, 'bandwidthExpirationTime', 5184e3),
xDb: D(H, 'failureExpirationTime', 86400),
RJb: D(H, 'historyTimeOfDayGranularity', 4),
iDb: D(K, 'expandDownloadTime', !1),
dQb: D(H, 'minimumMeasurementTime', 500),
cQb: D(H, 'minimumMeasurementBytes', 131072),
G0b: D(H, 'throughputMeasurementTimeout', 2e3),
QKb: D(H, 'initThroughputMeasureDataSize', 262144),
H0b: D(L, 'throughputPredictor', 'ewma'),
F0b: D(H, 'throughputMeasureWindow', 5e3),
K0b: D(H, 'throughputWarmupTime', 5e3),
E0b: D(H, 'throughputIQRMeasureWindow', 5e3),
Yhb: D(H, 'IQRBucketizerWindow', 15e3),
ywb: D(H, 'connectTimeHalflife', 10),
pXb: D(H, 'responseTimeHalflife', 10),
QJb: D(H, 'historicBandwidthUpdateInterval', 2e3),
bQb: D(H, 'minimumBufferToStopProbing', 1e4),
pwa: D(L, 'secondThroughputEstimator', 'none'),
p9a: D(P, 'secondThroughputMeasureWindowInMs', Infinity),
lCb: D(
ea,
'enableFilters',
'throughput-ewma throughput-sw throughput-iqr throughput-tdigest avtp entropy'.split(' ')
),
RDb: D(O, 'filterDefinitionOverrides', {}),
oAb: D(L, 'defaultFilter', 'throughput-ewma'),
XXb: D(L, 'secondaryFilter', 'none'),
pAb: D(O, 'defaultFilterDefinitions', {
'throughput-ewma': { type: 'discontiguous-ewma', mw: 5e3, wt: 5e3 },
'throughput-sw': { type: 'slidingwindow', mw: 5e3 },
'throughput-iqr': { type: 'iqr', mx: Infinity, mn: 5, bw: 15e3, iv: 1e3 },
'throughput-iqr-history': { type: 'iqr-history' },
'throughput-location-history': { type: 'discrete-ewma', hl: 14400, in: 3600 },
'respconn-location-history': { type: 'discrete-ewma', hl: 100, in: 25 },
'throughput-tdigest': { type: 'tdigest', maxc: 25, c: 0.5, b: 1e3, w: 15e3, mn: 6 },
'throughput-tdigest-history': { type: 'tdigest-history', maxc: 25, rc: 'ewma', c: 0.5, hl: 7200 },
'respconn-ewma': { type: 'discrete-ewma', hl: 10, in: 10 },
avtp: { type: 'avtp' },
entropy: {
type: 'entropy',
mw: 2e3,
sw: 6e4,
in: 'none',
mins: 1,
hdl: [150, 230, 352, 539, 825, 1264, 1936, 2966, 4543, 6958],
uhdl: [150, 230, 352, 539, 825, 1264, 1936, 2966, 4543, 6958, 10657, 16322, 25e3],
},
}),
qX: D(K, 'needMinimumNetworkConfidence', !0),
xja: D(K, 'biasTowardHistoricalThroughput', !0),
uia: D(K, 'addHeaderDataToNetworkMonitor', !1),
qxa: D(K, 'startMonitorOnLoadStart', !1),
Mva: D(K, 'reportFailedRequestsToNetworkMonitor', !1),
M8: D(P, 'maxFastPlayBufferInMs', Infinity),
fsa: D(P, 'maxFastPlayBitThreshold', Infinity),
Ria: D(K, 'appendFirstHeaderOnComplete', !0),
usb: D(L, 'ase_stream_selector', 'optimized'),
aqa: D(L, 'initBitrateSelectorAlgorithm', 'default'),
Kja: D(L, 'bufferingSelectorAlgorithm', 'default'),
VUa: D(L, 'ase_ls_failure_simulation', ''),
tla: D(K, 'ase_dump_fragments', !1),
vla: D(H, 'ase_location_history', 0),
WUa: D(H, 'ase_throughput', 0),
YUa: D(K, 'ase_simulate_verbose', !1),
aUb: D(H, 'pollingPeriod', 150),
NNb: D(H, 'loadTimeMs', 18e4),
BOb: D(H, 'marginTimeMs', 1e4),
Una: D(K, 'getDeviceIdFromBindDevice', !1),
tia: D(K, 'addFailedLogBlobsToQueue', !0),
O1b: {
'content-sampling': {
ws: D(H, 'contentSamplingMaxBufferingTime', 3e3),
mP: D(L, 'contentSamplingSelectStartingVMAFMethod', 'fallback'),
uT: D(K, 'contentSamplingActivateSelectStartingVMAF', !0),
Gu: D(H, 'contentSamplingMinStartingVideoVMAF', 80),
gX: D(H, 'contentSamplingMinAcceptableVMAF', 70),
ZH: D(H, 'contentSamplingMinAllowedVmaf', 60),
},
billboard: {
$w: D(H, 'billboardMinInitVideoBitrate', 1050),
vA: D(H, 'billboardMaxInitVideoBitrate', null),
yj: D(H, 'billboardMinPrebufSize', null),
LD: D(H, 'billboardMaxPrebufSize', null),
ws: D(H, 'billboardMaxBufferingTime', null),
xA: D(H, 'billboardMaxPartialBuffersAtBufferingStart', null),
pA: D(H, 'billboardLowestWaterMarkLevel', 6e3),
oA: D(H, 'billboardLowestBufForUpswitch', 25e3),
yE: D(L, 'billboardSwitchConfigBasedOnThroughputHistory', 'none', /^(none|iqr|avg)$/),
},
preplay: {
$w: D(H, 'preplayMinInitVideoBitrate', 1050),
vA: D(H, 'preplayMaxInitVideoBitrate', null),
yj: D(H, 'preplayMinPrebufSize', null),
LD: D(H, 'preplayMaxPrebufSize', null),
ws: D(H, 'preplayMaxBufferingTime', null),
xA: D(H, 'preplayMaxPartialBuffersAtBufferingStart', null),
pA: D(H, 'preplayLowestWaterMarkLevel', 6e3),
oA: D(H, 'preplayLowestBufForUpswitch', 25e3),
},
embedded: {
$w: D(H, 'embeddedMinInitVideoBitrate', 1050),
vA: D(H, 'embeddedMaxInitVideoBitrate', null),
yj: D(H, 'embeddedMinPrebufSize', null),
LD: D(H, 'embeddedMaxPrebufSize', null),
ws: D(H, 'embeddedMaxBufferingTime', null),
xA: D(H, 'embeddedMaxPartialBuffersAtBufferingStart', null),
pA: D(H, 'embeddedLowestWaterMarkLevel', 6e3),
oA: D(H, 'embeddedLowestBufForUpswitch', 25e3),
},
'video-merch-bob-horizontal': {
$w: D(H, 'videoMerchBobHorizontalMinInitVideoBitrate', null),
vA: D(H, 'videoMerchBobHorizontalMaxInitVideoBitrate', null),
yj: D(H, 'videoMerchBobHorizontalMinPrebufSize', null),
LD: D(H, 'videoMerchBobHorizontalMaxPrebufSize', null),
ws: D(H, 'videoMerchBobHorizontalMaxBufferingTime', null),
xA: D(H, 'videoMerchBobHorizontalMaxPartialBuffersAtBufferingStart', null),
pA: D(H, 'videoMerchBobHorizontalLowestWaterMarkLevel', null),
oA: D(H, 'videoMerchBobHorizontalLowestBufForUpswitch', null),
},
'mini-modal-horizontal': {
$w: D(H, 'miniModalHorizontalMinInitVideoBitrate', null),
vA: D(H, 'miniModalHorizontalMaxInitVideoBitrate', null),
yj: D(H, 'miniModalHorizontalMinPrebufSize', null),
LD: D(H, 'miniModalHorizontalMaxPrebufSize', null),
ws: D(H, 'miniModalHorizontalMaxBufferingTime', 500),
xA: D(H, 'miniModalHorizontalMaxPartialBuffersAtBufferingStart', null),
pA: D(H, 'miniModalHorizontalLowestWaterMarkLevel', null),
oA: D(H, 'miniModalHorizontalLowestBufForUpswitch', null),
},
},
KCb: D(K, 'enableVerbosePlaydelayLogging', !1),
ECb: D(K, 'enableSeamless', !1),
Epa: D(H, 'hindsightDenominator', 0),
Dpa: D(H, 'hindsightDebugDenominator', 0),
u7: D(O, 'hindsightParam', { numB: Infinity, bSizeMs: 1e3, fillS: 'last', fillHl: 1e3 }),
ZU: D(K, 'enableSessionHistoryReport', !1),
gma: D(H, 'earlyStageEstimatePeriod', 1e4),
p2a: D(H, 'lateStageEstimatePeriod', 3e4),
O8: D(H, 'maxNumSessionHistoryStored', 30),
q9: D(H, 'minSessionHistoryDuration', 3e4),
Vw: D(H, 'maxActiveRequestsPerSession', 3),
I8: D(H, 'maxActiveRequestsSABCell100', 2),
rra: D(K, 'limitAudioDiscountByMaxAudioBitrate', !0),
Ee: D(O, 'browserInfo', {}),
aub: D(H, I('busyGracePeriod'), 199),
rYb: D(K, I('sendTransitionLogblob'), !0),
XBb: D(K, I('editVideoFragments'), !0),
w5: D(K, I('earlyAppendSingleChildBranch'), !0),
DKb: D(K, I('includeSegmentInfoOnLogblobs'), !0),
oDb: D(K, 'exposeTestData', !1),
nDb: D(K, I('exposeErrorData'), !1),
wla: D(K, 'declareBufferingCompleteAtSegmentEnd', !0),
oG: D(K, 'applyProfileTimestampOffset', !1),
km: D(K, 'applyProfileStreamingOffset', !1),
$rb: D(K, I('allowSmallSeekDelta'), !1),
ZZb: D(H, I('smallSeekDeltaThresholdMilliseconds'), r.H1),
jCb: D(K, 'enableCDMAttestedDescriptors', !1),
Y$: D(K, 'requireDownloadDataAtBuffering', !1),
Z$: D(K, 'requireSetupConnectionDuringBuffering', !1),
rva: D(K, 'recordFirstFragmentOnSubBranchCreate', !1),
Otb: D(K, 'branchingAudioTrackFrameDropSmallSeekFix', !0),
xcb: D(K, 'useMobileVMAF', !1),
qVa: D(L, 'desiredVMAFTypeMobile', 'phone_plus_lts'),
rVa: D(L, 'desiredVMAFTypeNonMobile', 'plus_lts'),
uT: D(K, 'activateSelectStartingVMAF', !1),
Gu: D(H, 'minStartingVideoVMAF', 1),
gX: D(H, 'minAcceptableVMAF', 1),
ZH: D(H, 'minAllowedVmaf', 1),
esb: D(K, 'alwaysNotifyEOSForPlaygraph', !0),
TM: D(K, 'enableNewAse', !0),
f_: D(K, 'useNewApi', !0),
oCb: D(K, 'enableHudsonFieldTest', !1),
fKb: D(ea, 'hudsonTitles', ['81127954', '70125931', '80158148']),
YOb: D(H, 'maxPartialBuffersAtHudson', 1),
iRb: D(H, 'numberOfChunksPerSegment', 4),
t0b: D(H, 'targetContentLatency', 1e4),
u0b: D(H, 'targetLongContentLatency', 3e4),
eQb: D(H, 'minimumTimeDelay', 1),
mma: D(K, 'enableWsslEstimate', !1),
J8: D(H, 'maxAllowedOutstandingRequests', 4),
VL: D(K, 'alwaysRunUnderflowTimer', !0),
Gsa: D(H, 'minStreamableConcurrencyWindow', 3e3),
Exa: D(R, 'streamableConcurrencyFactor', 0.3),
YT: D(H, 'bufferingConcurrencyWindow', 7800),
TZb: D(K, 'singleStreamablePerBranch', !0),
B5: D(K, 'enableResolutionVMAFStreamFilter', !1),
caa: D(O, 'resolutionVMAFCappingRuleList', {}),
dua: D(P, 'percentCapTitlesForResolutionVMAFStreamFilter', 100),
gBb: D(K, 'disableSkipping', !1),
yba: D(K, 'useHLSPlayer', ja.yba),
Kya: D(K, I('useExitZones'), !0),
aXb: D(K, 'requestSegmentVmaf', !1),
GO: D(O, 'perFragmentVMAFConfig', { enabled: !1 }),
};
Sa = !0;
b.Oka = function (Wa) {
var Ya, $a, Za;
Ya = d.xa.get(B.gd).id;
if (0 < b.config.M2a && 0 === Ya % b.config.M2a)
try {
$a = d.xa.get(t.cn);
Za = d.xa.get(w.$x).Tt('config', 'info', { params: Wa });
$a.Kc(Za);
} catch (gb) {
d.log.error('Failed to log config$apply', gb);
}
ob._cad_global.config = b.config;
(0, g.wb)(Wa);
Wa &&
((ra = (0, p.Dd)({}, Wa, { UW: !0 })),
(0, p.Dd)(ra, T, { UW: !0 }),
G(Aa, b.config),
ra.istestaccount && d.log.trace('Config applied for', Da(Sa ? ra : Wa)),
(Sa = !1));
};
(0, b.Oka)(ra);
};
b.twb = function (C, F) {
return (0, v.Gf)(C) && '%' == C[C.length - 1] ? (0, q.en)((parseFloat(C) * F) / 100) : C | 0;
};
b.OTa = function (C) {
var F;
if (C) {
C = (0, p.Dd)({}, b.config);
F = { pI: b.config.L5a };
return (0, p.Dd)(C, F, { AO: !0 });
}
return b.config;
};
b.uwb = function (C) {
var F;
F = (0, p.Dd)({}, b.config);
C = c(C);
return (0, p.Dd)(F, C, { AO: !0 });
};
b.Pka = function (C) {
C = c(C);
return (0, p.Dd)({}, a(180)(C), { AO: !0 });
};
b.NTa = function (C, F, G) {
G = !!G && (0 <= G.indexOf('h264hpl') || 0 <= G.indexOf('vp9') || 0 <= G.indexOf('av1'));
C = { Zw: C ? b.config.OPb : b.config.Zw, DA: C ? b.config.VPb : G ? b.config.XPb : b.config.DA, w5: !F };
return (0, p.Dd)({}, a(180)(C), { AO: !0 });
};
b.wwb = c;
b.vwb = h;
},
function (u, b) {
Object.defineProperties(b, { __esModule: { value: !0 } });
b.ia = !1;
},
function (u, b, a) {
b = a(113);
b.qAb = 0;
u.exports = { EventEmitter: b, hi: a(746) };
},
function (u, b) {
function a(c, h) {
var k, l, d, f, g;
if (c && h) {
k = Math;
l = k.abs;
f = Math.abs(c);
for (d = Math.abs(h); d; ) {
g = d;
d = f % d;
f = g;
}
c = l.call(k, (c * h) / f);
} else c = 0;
return c;
}
Object.defineProperties(b, { __esModule: { value: !0 } });
b.P = void 0;
u = (function () {
function c(h, k) {
'object' === typeof h ? ((this.mc = h.pc), (this.nb = h.X)) : ((this.mc = h), (this.nb = k));
isFinite(this.mc) || (this.nb = 1);
}
c.compare = function (h, k) {
return h.Gl(k);
};
c.abs = function (h) {
return new c(Math.abs(h.mc), h.nb);
};
c.Pa = function (h) {
return 0 === h ? c.fb : new c(h, 1e3);
};
c.PZ = function (h, k) {
return Math.floor((1e3 * h) / k);
};
c.Osa = function (h, k) {
return Math.floor((h * k) / 1e3);
};
c.max = function () {
for (var h = [], k = 0; k < arguments.length; k++) {
h[k] = arguments[k];
}
return h.reduce(function (l, d) {
return l.greaterThan(d) ? l : d;
});
};
c.min = function () {
for (var h = [], k = 0; k < arguments.length; k++) {
h[k] = arguments[k];
}
return h.reduce(function (l, d) {
return l.lessThan(d) ? l : d;
});
};
Object.defineProperties(c.prototype, {
pc: {
get: function () {
return this.mc;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(c.prototype, {
X: {
get: function () {
return this.nb;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(c.prototype, {
V: {
get: function () {
return c.PZ(this.mc, this.nb);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(c.prototype, {
xI: {
get: function () {
return (1e3 * this.mc) / this.nb;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(c.prototype, {
RI: {
get: function () {
var h;
h = this.xI;
return 0 > h ? Math.ceil(h) : Math.floor(h);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(c.prototype, {
Ch: {
get: function () {
return this.mc / this.nb;
},
enumerable: !1,
configurable: !0,
},
});
c.prototype.bg = function (h) {
h /= this.nb;
return new c(Math.floor(this.mc * h), Math.floor(this.nb * h));
};
c.prototype.add = function (h) {
var k;
if (this.nb === h.nb) return new c(this.mc + h.mc, this.nb);
k = a(this.nb, h.nb);
return new c((this.mc * k) / this.nb + (h.mc * k) / h.nb, k);
};
c.prototype.La = function (h) {
var k;
if (this.nb === h.nb) return new c(this.mc - h.mc, this.nb);
k = a(this.nb, h.nb);
return new c((this.mc * k) / this.nb - (h.mc * k) / h.nb, k);
};
c.prototype.eI = function (h) {
return new c(this.mc * h, this.nb);
};
c.prototype.Il = function (h) {
var k;
if ('number' === typeof h) {
k = a(this.mc, h);
return k !== this.mc ? this.bg((k / this.mc) * this.nb).Il(h) : new c(this.mc / h, this.nb);
}
if (this.nb === h.nb) return this.mc / h.mc;
k = a(this.nb, h.nb);
return (this.mc * k) / this.nb / ((h.mc * k) / h.nb);
};
c.prototype.wVa = function (h) {
var k;
if (this.nb === h.nb) return new c(Math.abs(this.mc - h.mc), this.nb);
k = a(this.nb, h.nb);
return new c(Math.abs((this.mc * k) / this.nb - (h.mc * k) / h.nb), k);
};
c.prototype.qva = function () {
return new c(this.nb, this.mc);
};
c.prototype.compare = function (h, k) {
var l;
if (this.nb === k.nb) return h(this.mc, k.mc);
l = a(this.nb, k.nb);
return h((this.mc * l) / this.nb, (k.mc * l) / k.nb);
};
c.prototype.Gl = function (h) {
var k;
if (this.nb === h.nb) return this.pc === h.mc ? 0 : this.mc - h.mc;
k = a(this.nb, h.nb);
return (this.mc * k) / this.nb - (h.mc * k) / h.nb;
};
c.prototype.equal = function (h) {
return this.compare(function (k, l) {
return k === l;
}, h);
};
c.prototype.M9 = function (h) {
return this.compare(function (k, l) {
return k !== l;
}, h);
};
c.prototype.lessThan = function (h) {
return this.compare(function (k, l) {
return k < l;
}, h);
};
c.prototype.greaterThan = function (h) {
return this.compare(function (k, l) {
return k > l;
}, h);
};
c.prototype.YN = function (h) {
return this.compare(function (k, l) {
return k <= l;
}, h);
};
c.prototype.fs = function (h) {
return this.compare(function (k, l) {
return k >= l;
}, h);
};
c.prototype.isFinite = function () {
return !!this.nb && isFinite(this.mc);
};
c.prototype.a7 = function (h) {
return a(this.X, h);
};
c.prototype.toJSON = function () {
return { ticks: this.mc, timescale: this.nb };
};
c.prototype.toString = function () {
return this.mc + '/' + this.nb;
};
c.prototype.Xd = function () {
return this.mc + '/' + this.nb + ' (' + this.V + 'ms)';
};
c.fb = new c(0, 1e3);
c.cx = new c(1, 1e3);
c.tD = new c(Infinity, 1);
return c;
})();
b.P = u;
},
function (u, b, a) {
function c() {
c =
Object.assign ||
function (D) {
for (var I, J = 1, P = arguments.length; J < P; J++) {
I = arguments[J];
for (var H in I) {
Object.prototype.hasOwnProperty.call(I, H) && (D[H] = I[H]);
}
}
return D;
};
return c.apply(this, arguments);
}
function h(D, I) {
h =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (J, P) {
J.__proto__ = P;
}) ||
function (J, P) {
for (var H in P) {
P.hasOwnProperty(H) && (J[H] = P[H]);
}
};
return h(D, I);
}
function k(D, I) {
function J() {
this.constructor = D;
}
h(D, I);
D.prototype = null === I ? Object.create(I) : ((J.prototype = I.prototype), new J());
}
function l(D, I) {
var J, P, H;
J = {};
for (P in D) {
Object.prototype.hasOwnProperty.call(D, P) && 0 > I.indexOf(P) && (J[P] = D[P]);
}
if (null != D && 'function' === typeof Object.getOwnPropertySymbols) {
H = 0;
for (P = Object.getOwnPropertySymbols(D); H < P.length; H++) {
0 > I.indexOf(P[H]) && Object.prototype.propertyIsEnumerable.call(D, P[H]) && (J[P[H]] = D[P[H]]);
}
}
return J;
}
function d(D, I, J, P) {
var H, R, L;
H = arguments.length;
R = 3 > H ? I : null === P ? (P = Object.getOwnPropertyDescriptor(I, J)) : P;
if ('object' === typeof Reflect && 'function' === typeof Reflect.Ur) R = Reflect.Ur(D, I, J, P);
else
for (var K = D.length - 1; 0 <= K; K--) {
if ((L = D[K])) R = (3 > H ? L(R) : 3 < H ? L(I, J, R) : L(I, J)) || R;
}
return 3 < H && R && Object.defineProperty(I, J, R), R;
}
function f(D, I) {
return function (J, P) {
I(J, P, D);
};
}
function g(D, I) {
if ('object' === typeof Reflect && 'function' === typeof Reflect.Jc) return Reflect.Jc(D, I);
}
function m(D, I, J, P) {
function H(R) {
return R instanceof J
? R
: new J(function (L) {
L(R);
});
}
return new (J || (J = Promise))(function (R, L) {
function K(Q) {
try {
M(P.next(Q));
} catch (S) {
L(S);
}
}
function O(Q) {
try {
M(P['throw'](Q));
} catch (S) {
L(S);
}
}
function M(Q) {
Q.done ? R(Q.value) : H(Q.value).then(K, O);
}
M((P = P.apply(D, I || [])).next());
});
}
function n(D, I) {
var H, R, L, K, O;
function J(M) {
return function (Q) {
return P([M, Q]);
};
}
function P(M) {
if (R) throw new TypeError('Generator is already executing.');
for (; H; ) {
try {
if (
((R = 1),
L &&
(K =
M[0] & 2 ? L['return'] : M[0] ? L['throw'] || ((K = L['return']) && K.call(L), 0) : L.next) &&
!(K = K.call(L, M[1])).done)
)
return K;
if (((L = 0), K)) M = [M[0] & 2, K.value];
switch (M[0]) {
case 0:
case 1:
K = M;
break;
case 4:
return H.label++, { value: M[1], done: !1 };
case 5:
H.label++;
L = M[1];
M = [0];
continue;
case 7:
M = H.bo.pop();
H.Wl.pop();
continue;
default:
if (!((K = H.Wl), (K = 0 < K.length && K[K.length - 1])) && (6 === M[0] || 2 === M[0])) {
H = 0;
continue;
}
if (3 === M[0] && (!K || (M[1] > K[0] && M[1] < K[3]))) H.label = M[1];
else if (6 === M[0] && H.label < K[1]) (H.label = K[1]), (K = M);
else if (K && H.label < K[2]) (H.label = K[2]), H.bo.push(M);
else {
K[2] && H.bo.pop();
H.Wl.pop();
continue;
}
}
M = I.call(D, H);
} catch (Q) {
M = [6, Q];
L = 0;
} finally {
R = K = 0;
}
}
if (M[0] & 5) throw M[1];
return { value: M[0] ? M[1] : void 0, done: !0 };
}
H = {
label: 0,
xc: function () {
if (K[0] & 1) throw K[1];
return K[1];
},
Wl: [],
bo: [],
};
return (
(O = { next: J(0), throw: J(1), return: J(2) }),
'function' === typeof Symbol &&
(O[Symbol.iterator] = function () {
return this;
}),
O
);
}
function p(D, I, J, P) {
void 0 === P && (P = J);
D[P] = I[J];
}
function q(D, I) {
for (var J in D) {
'default' === J || I.hasOwnProperty(J) || (I[J] = D[J]);
}
}
function v(D) {
var I, J, P;
I = 'function' === typeof Symbol && Symbol.iterator;
J = I && D[I];
P = 0;
if (J) return J.call(D);
if (D && 'number' === typeof D.length)
return {
next: function () {
D && P >= D.length && (D = void 0);
return { value: D && D[P++], done: !D };
},
};
throw new TypeError(I ? 'Object is not iterable.' : 'Symbol.iterator is not defined.');
}
function r(D, I) {
var J, P, H;
J = 'function' === typeof Symbol && D[Symbol.iterator];
if (!J) return D;
D = J.call(D);
H = [];
try {
for (; (void 0 === I || 0 < I--) && !(P = D.next()).done; ) {
H.push(P.value);
}
} catch (L) {
var R;
R = { error: L };
} finally {
try {
P && !P.done && (J = D['return']) && J.call(D);
} finally {
if (R) throw R.error;
}
}
return H;
}
function t() {
for (var D = [], I = 0; I < arguments.length; I++) {
D = D.concat(r(arguments[I]));
}
return D;
}
function w() {
var P;
for (var D = 0, I = 0, J = arguments.length; I < J; I++) {
D += arguments[I].length;
}
D = Array(D);
P = 0;
for (I = 0; I < J; I++) {
for (var H = arguments[I], R = 0, L = H.length; R < L; R++, P++) {
D[P] = H[R];
}
}
return D;
}
function x(D) {
return this instanceof x ? ((this.EE = D), this) : new x(D);
}
function y(D, I, J) {
var O, M, Q;
function P(S) {
O[S] &&
(M[S] = function (X) {
return new Promise(function (ea, la) {
1 < Q.push([S, X, ea, la]) || H(S, X);
});
});
}
function H(S, X) {
var ea;
try {
ea = O[S](X);
ea.value instanceof x ? Promise.resolve(ea.value.EE).then(R, L) : K(Q[0][2], ea);
} catch (la) {
K(Q[0][3], la);
}
}
function R(S) {
H('next', S);
}
function L(S) {
H('throw', S);
}
function K(S, X) {
(S(X), Q.shift(), Q.length) && H(Q[0][0], Q[0][1]);
}
if (!Symbol.asyncIterator) throw new TypeError('Symbol.asyncIterator is not defined.');
O = J.apply(D, I || []);
Q = [];
return (
(M = {}),
P('next'),
P('throw'),
P('return'),
(M[Symbol.asyncIterator] = function () {
return this;
}),
M
);
}
function z(D) {
var J, P;
function I(H, R) {
J[H] = D[H]
? function (L) {
return (P = !P) ? { value: x(D[H](L)), done: 'return' === H } : R ? R(L) : L;
}
: R;
}
return (
(J = {}),
I('next'),
I('throw', function (H) {
throw H;
}),
I('return'),
(J[Symbol.iterator] = function () {
return this;
}),
J
);
}
function A(D) {
var P, H;
function I(R) {
H[R] =
D[R] &&
function (L) {
return new Promise(function (K, O) {
L = D[R](L);
J(K, O, L.done, L.value);
});
};
}
function J(R, L, K, O) {
Promise.resolve(O).then(function (M) {
R({ value: M, done: K });
}, L);
}
if (!Symbol.asyncIterator) throw new TypeError('Symbol.asyncIterator is not defined.');
P = D[Symbol.asyncIterator];
return P
? P.call(D)
: ((D = 'function' === typeof v ? v(D) : D[Symbol.iterator]()),
(H = {}),
I('next'),
I('throw'),
I('return'),
(H[Symbol.asyncIterator] = function () {
return this;
}),
H);
}
function B(D, I) {
Object.defineProperty ? Object.defineProperty(D, 'raw', { value: I }) : (D.raw = I);
return D;
}
function E(D) {
var I;
if (D && D.__esModule) return D;
I = {};
if (null != D)
for (var J in D) {
Object.hasOwnProperty.call(D, J) && (I[J] = D[J]);
}
I.default = D;
return I;
}
function C(D) {
return D && D.__esModule ? D : { default: D };
}
function F(D, I) {
if (!I.has(D)) throw new TypeError('attempted to get private field on non-instance');
return I.get(D);
}
function G(D, I, J) {
if (!I.has(D)) throw new TypeError('attempted to set private field on non-instance');
I.set(D, J);
return J;
}
a.r(b);
a.d(b, '__extends', function () {
return k;
});
a.d(b, '__assign', function () {
return c;
});
a.d(b, '__rest', function () {
return l;
});
a.d(b, '__decorate', function () {
return d;
});
a.d(b, '__param', function () {
return f;
});
a.d(b, '__metadata', function () {
return g;
});
a.d(b, '__awaiter', function () {
return m;
});
a.d(b, '__generator', function () {
return n;
});
a.d(b, '__createBinding', function () {
return p;
});
a.d(b, '__exportStar', function () {
return q;
});
a.d(b, '__values', function () {
return v;
});
a.d(b, '__read', function () {
return r;
});
a.d(b, '__spread', function () {
return t;
});
a.d(b, '__spreadArrays', function () {
return w;
});
a.d(b, '__await', function () {
return x;
});
a.d(b, '__asyncGenerator', function () {
return y;
});
a.d(b, '__asyncDelegator', function () {
return z;
});
a.d(b, '__asyncValues', function () {
return A;
});
a.d(b, '__makeTemplateObject', function () {
return B;
});
a.d(b, '__importStar', function () {
return E;
});
a.d(b, '__importDefault', function () {
return C;
});
a.d(b, '__classPrivateFieldGet', function () {
return F;
});
a.d(b, '__classPrivateFieldSet', function () {
return G;
});
},
function (u, b, a) {
var c, h, k;
Object.defineProperty(b, '__esModule', { value: !0 });
b.Qwb =
b.FXa =
b.Uo =
b.Wf =
b.awb =
b.Ge =
b.Sw =
b.trim =
b.Hpa =
b.sab =
b.D7a =
b.QSb =
b.Cj =
b.yRa =
b.OSa =
b.Dd =
b.pg =
void 0;
c = a(24);
h = a(11);
k = a(13);
b.pg = function (l, d) {
for (var f in l) {
l.hasOwnProperty(f) && d(f, l[f]);
}
};
b.Dd =
b.Dd ||
function (l, d, f) {
var g, m, n;
if (d)
if (f) {
g = f.UW;
m = f.prefix;
n = f.AO;
(0, b.pg)(d, function (p, q) {
if (!n || (0, k.od)(q)) l[(m || '') + (g ? p.toLowerCase() : p)] = q;
});
} else
(0, b.pg)(d, function (p, q) {
l[p] = q;
});
return l;
};
b.OSa = function (l, d, f, g) {
var m;
if (l) {
m = l[d];
(0, k.ed)(m) && (f = m.apply(l, h.slice.call(arguments, 3)));
}
return f;
};
b.yRa = function (l) {
for (var d = {}, f = l.length; f--; ) {
d[l[f]] = !0;
}
return d;
};
b.Cj =
b.Cj ||
function (l) {
return parseInt(l, 10);
};
b.QSb = function (l) {
return /^true$/i.test(l);
};
b.D7a = function (l, d) {
return (0, h.en)(l + (0, h.tR)() * (d - l));
};
b.sab = function (l) {
return JSON.stringify(l, null, ' ');
};
b.Hpa = (function () {
var d, f;
function l(g) {
(0, c.wb)(void 0 !== d[g]);
return d[g];
}
d = { '&': '&amp;', "'": '&#39;', '"': '&quot;', '<': '&lt;', '>': '&gt;' };
f = /[&'"<>]/g;
return function (g) {
return g.replace(f, l);
};
})();
b.trim = (function () {
var l;
l = /^\s+|\s+$/gm;
return function (d) {
return d.replace(l, '');
};
})();
b.Sw = function (l) {
return Array.isArray(l) ? l : [l];
};
b.Ge =
b.Ge ||
function (l) {
var d, f, g;
if (l) {
d = l.stack;
f = l.number;
g = l.message;
g || (g = '' + l);
d ? ((l = '' + d), 0 != l.indexOf(g) && (l = g + '\n' + l)) : (l = g);
f && (l += '\nnumber:' + f);
return l;
}
};
b.awb = function (l) {
var g;
for (var d = 0; d < arguments.length; ++d) {}
d = 0;
for (var f = arguments.length; d < f; ) {
g = arguments[d++];
if ((0, k.od)(g)) return g;
}
};
b.Wf = function (l) {
return (0, k.Ga)(l) ? l.toFixed(0) : '';
};
b.Uo = function (l) {
return (0, k.Ga)(l) ? (l / 1e3).toFixed(0) : '';
};
b.FXa = function (l) {
return (0, k.Ga)(l) ? l.toFixed() : '';
};
b.Qwb = function (l) {
for (var d = [], f = 0; f < l.length; f++) {
d[f] = l[f];
}
return d;
};
},
function (u, b, a) {
var k, l, d;
function c() {
d || (d = k.xa.get(l.Ox));
return d;
}
function h(f, g) {
return c().assert(f, g);
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.$zb =
b.sla =
b.Tzb =
b.Xzb =
b.BM =
b.yU =
b.Wzb =
b.Yzb =
b.zU =
b.TUa =
b.Vzb =
b.Uzb =
b.wb =
b.Zzb =
b.$db =
void 0;
k = a(8);
l = a(110);
b.$db = function () {
h(!1);
};
b.Zzb = !0;
d = void 0;
b.wb = h;
b.Uzb = function (f, g) {
return c().ysb(f, g);
};
b.Vzb = function (f, g) {
return c().zsb(f, g);
};
b.TUa = function (f, g) {
return c().W3(f, g);
};
b.zU = function (f, g) {
return c().Fsb(f, g);
};
b.Yzb = function (f, g) {
return c().Dsb(f, g);
};
b.Wzb = function (f, g) {
return c().bja(f, g);
};
b.yU = function (f, g) {
return c().Bsb(f, g);
};
b.BM = function (f, g) {
return c().Esb(f, g);
};
b.Xzb = function (f, g) {
return c().Csb(f, g);
};
b.Tzb = function (f, g) {
return c().xsb(f, g);
};
b.sla = function (f, g) {
return c().Asb(f, g);
};
b.$zb = function () {
return c().jLb();
};
},
function (u, b, a) {
var h;
function c(k) {
return k.filter(function (l, d) {
return k.indexOf(l) === d;
});
}
Object.defineProperties(b, { __esModule: { value: !0 } });
b.L9 =
b.XIb =
b.Vwb =
b.flatten =
b.l4a =
b.gwb =
b.R3 =
b.It =
b.xRa =
b.uRa =
b.vRa =
b.Vp =
b.wRa =
b.te =
void 0;
h = a(2);
b.te = function (k, l) {
for (var d = 0; d < k.length; d++) {
if (l(k[d], d, k)) return k[d];
}
};
b.wRa = function (k, l) {
for (var d = k.length - 1; 0 <= d; --d) {
if (l(k[d], d, k)) return k[d];
}
};
b.Vp = function (k, l) {
var d;
d = -1;
return k.some(function (f, g, m) {
d = g;
return l(f, g, m);
})
? d
: -1;
};
b.vRa = function (k, l) {
for (var d = k.length - 1; 0 <= d; d--) {
if (l(k[d], d, k)) return d;
}
return -1;
};
b.uRa = c;
b.xRa = function (k, l) {
l = k.indexOf(l);
if (-1 === l) return !1;
k.splice(l, 1);
return !0;
};
b.It = function (k, l, d) {
return d
? k.filter(function (f) {
return !l.some(function (g) {
return d(f, g);
});
})
: k.filter(function (f) {
return -1 === l.indexOf(f);
});
};
b.R3 = function (k, l) {
return c(k.concat(l));
};
b.gwb = function (k) {
return function (l, d) {
return k(l) - k(d);
};
};
b.l4a = function (k) {
return function (l, d) {
return k(l) < k(d) ? l : d;
};
};
b.flatten = function (k) {
var l;
return (l = []).concat.apply(l, h.__spread(k));
};
b.Vwb = function (k, l) {
void 0 === l &&
(l = function (d) {
return d;
});
return k.reduce(function (d, f) {
f = l(f);
return void 0 === d[f] ? (d[f] = 1) : ++d[f], d;
}, {});
};
b.XIb = function (k, l) {
return k.reduce(function (d, f) {
var g;
g = l(f);
return void 0 === d[g] ? (d[g] = [f]) : d[g].push(f), d;
}, {});
};
b.L9 = function (k) {
return null !== k && void 0 !== k;
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.fg = 'IsTypeSymbol';
},
function (u, b) {
Object.defineProperties(b, { __esModule: { value: !0 } });
b.default = {
G4b: { Mv: 0, X7b: 1, name: ['STARTUP', 'STEADY'] },
J0: { qh: 0, W7b: 1, ilb: 2, name: ['STARTING', 'STABLE', 'UNSTABLE'] },
Xa: { Yb: 0, Pb: 1, name: ['AUDIO', 'VIDEO'] },
xl: { Yb: 0, Pb: 1, name: ['AUDIO', 'VIDEO'] },
Hh: { URL: 0, wF: 1, LOCATION: 2, fy: 3, name: ['URL', 'SERVER', 'LOCATION', 'NETWORK'] },
gg: {
HAVE_NOTHING: 0,
HB: 1,
Wx: 2,
ZQ: 3,
name: ['HAVE_NOTHING', 'HAVE_SOMETHING', 'HAVE_MINIMUM', 'HAVE_ENOUGH'],
},
ky: {
m4b: 0,
b6b: 1,
B7b: 2,
Z6b: 3,
v7b: 4,
x8b: 5,
g6b: 6,
A6b: 7,
Mv: 8,
Pf: 9,
vea: 10,
$jb: 11,
sca: 12,
eib: 13,
dib: 14,
Dkb: 15,
Ckb: 16,
hib: 17,
name: 'maxweightedbw fastselection reuseprevious nextdomain onlychoice tolowgrade fromlowgrade mcqueen startup error probeswitchback probeswitchaway bitrate locswitchback locswitchaway serverswitchback serverswitchaway manifestadded'.split(
' '
),
},
E5b: { fy: 0, f5b: 1, name: ['NETWORK', 'DECODE'] },
U7b: { g5b: 'delayedSeamless', o6b: 'hideLongTransition' },
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Px = b.SMa = b.mlb = b.Bp = b.$e = b.zl = b.vv = b.Uj = void 0;
(function (a) {
a[(a.Audio = 0)] = 'Audio';
a[(a.LMa = 1)] = 'Video';
})(b.Uj || (b.Uj = {}));
(function (a) {
a[(a.zv = 0)] = 'Default';
a[(a.cy = 1)] = 'Microsoft';
})(b.vv || (b.vv = {}));
(function (a) {
a[(a.zv = 0)] = 'Default';
a[(a.WJ = 1)] = 'Chrome';
a[(a.cy = 2)] = 'Microsoft';
})(b.zl || (b.zl = {}));
(function (a) {
a[(a.QR = 0)] = 'SD';
a[(a.w0 = 1)] = 'HD';
a[(a.WR = 2)] = 'UHD';
a[(a.yv = 3)] = 'DV';
a[(a.gK = 4)] = 'HDR10';
a[(a.CB = 5)] = 'AVCHigh';
a[(a.WB = 6)] = 'VP9';
a[(a.wl = 7)] = 'AV1';
})(b.$e || (b.$e = {}));
(function (a) {
a[(a.c1 = 0)] = 'Level_1_4';
a[(a.cF = 1)] = 'Level_2_2';
})(b.Bp || (b.Bp = {}));
b.mlb = function () {};
(function (a) {
a[(a.J7b = 0)] = 'Platform';
a[(a.e5b = 1)] = 'CurrentTitle';
})(b.SMa || (b.SMa = {}));
b.Px = 'DeviceCapabilitiesSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.yg = 'UtilitiesSymbol';
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
c = a(144);
b.ia = !1;
u = (function () {
function h(k, l, d, f, g) {
this.pa = k;
this.type = l;
this.byteOffset = d;
this.byteLength = f;
this.parent = g;
this.Ya = {};
this.eo = f;
}
h.Jn = function (k, l) {
var f, m;
function d(n) {
n && n.Jn && ((n = n.Jn(l)), n.length && (f = f.concat(n)));
}
f = [];
k.type === l && f.push(k);
if (k.Ya)
for (var g in k.Ya) {
m = k.Ya[g];
Array.isArray(m) && m.forEach(d);
}
return f;
};
h.Gt = function (k, l) {
void 0 === k.Ya[l.type] && (k.Ya[l.type] = []);
k.Ya[l.type].push(l);
};
h.Jl = function (k, l) {
return h.Jn(k, l)[0];
};
Object.defineProperties(h.prototype, {
startOffset: {
get: function () {
return this.byteOffset;
},
enumerable: !0,
configurable: !0,
},
});
Object.defineProperties(h.prototype, {
length: {
get: function () {
return this.byteLength;
},
enumerable: !0,
configurable: !0,
},
});
Object.defineProperties(h.prototype, {
u: {
get: function () {
return this.pa;
},
enumerable: !0,
configurable: !0,
},
});
h.prototype.Bc = function () {
var k;
k = this.pa.Da();
this.version = k >> 24;
this.flags = k & 16777215;
};
h.prototype.Gt = function (k) {
h.Gt(this, k);
};
h.prototype.Jn = function (k) {
return h.Jn(this, k);
};
h.prototype.Jl = function (k) {
return h.Jl(this, k);
};
h.prototype.parse = function () {
return !0;
};
h.prototype.cu = function () {
return !0;
};
h.prototype.ai = function (k) {
if ((k = this.Ya[k]) && Array.isArray(k) && 1 === k.length) return k[0];
};
h.prototype.Je = function (k, l) {
l = void 0 === l ? this.pa.offset : l;
c.assert(
l >= this.startOffset + 8 && l + k <= this.startOffset + this.eo,
'Removal range [0x' +
l.toString(16) +
'-0x' +
(l + k).toString(16) +
') must be in box [0x' +
this.startOffset.toString(16) +
'-0x' +
(this.startOffset + this.eo).toString(16) +
')'
);
this.pa.Je(k, l, this);
};
h.prototype.bv = function (k, l, d) {
d = void 0 === d ? this.pa.offset : d;
c.assert(
d >= this.startOffset + 8 && d + k <= this.startOffset + this.eo,
'Removal range [0x' +
d.toString(16) +
'-0x' +
(d + k).toString(16) +
') must be in box [0x' +
this.startOffset.toString(16) +
'-0x' +
(this.startOffset + this.eo).toString(16) +
')'
);
this.pa.bv(k, l, d, this);
};
h.prototype.uY = function (k, l, d) {
if (1 < d) {
for (var f = []; 0 < d--; ) {
f.push(this.$S(k, l));
}
return f;
}
return this.$S(k, l);
};
h.prototype.bj = function (k) {
var l, d;
d = this;
void 0 === l && (l = {});
k.forEach(function (f) {
var g, m;
if ('offset' === f.type) {
g = f.offset;
if (0 < g % 8) throw Error('Requested offset ' + f.offset + 'is not an even byte multiple');
d.pa.offset += g / 8;
} else
for (g in f) {
m = f[g];
l[g] = 'string' === typeof m ? d.uY(m) : d.uY(m.type, m.length, m.Yia);
}
});
return l;
};
h.prototype.$S = function (k, l) {
var d;
d = this.byteLength - this.pa.offset + this.startOffset;
'undefined' === typeof l && (l = d);
switch (k) {
case 'int8':
k = this.pa.sb();
break;
case 'int64':
k = this.pa.Ud();
break;
case 'int32':
k = this.pa.Da();
break;
case 'int16':
k = this.pa.$c();
break;
case 'string':
k = this.pa.fva(Math.min(l, d));
break;
default:
throw Error('Invalid type: ' + k);
}
return k;
};
h.Sa = !1;
return h;
})();
b.Fc = u;
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
c = a(151);
b.ia = !1;
u = (function () {
function h(k, l, d, f, g) {
this.pa = k;
this.type = l;
this.byteOffset = d;
this.byteLength = f;
this.parent = g;
this.Ya = {};
this.eo = f;
}
h.Jn = function (k, l) {
var f, m;
function d(n) {
n && n.Jn && ((n = n.Jn(l)), n.length && (f = f.concat(n)));
}
f = [];
k.type === l && f.push(k);
if (k.Ya)
for (var g in k.Ya) {
m = k.Ya[g];
Array.isArray(m) && m.forEach(d);
}
return f;
};
h.Gt = function (k, l) {
void 0 === k.Ya[l.type] && (k.Ya[l.type] = []);
k.Ya[l.type].push(l);
};
h.Jl = function (k, l) {
return h.Jn(k, l)[0];
};
Object.defineProperties(h.prototype, {
startOffset: {
get: function () {
return this.byteOffset;
},
enumerable: !0,
configurable: !0,
},
});
Object.defineProperties(h.prototype, {
length: {
get: function () {
return this.byteLength;
},
enumerable: !0,
configurable: !0,
},
});
Object.defineProperties(h.prototype, {
u: {
get: function () {
return this.pa;
},
enumerable: !0,
configurable: !0,
},
});
h.prototype.Bc = function () {
var k;
k = this.pa.Da();
this.version = k >> 24;
this.flags = k & 16777215;
};
h.prototype.Gt = function (k) {
h.Gt(this, k);
};
h.prototype.Jn = function (k) {
return h.Jn(this, k);
};
h.prototype.Jl = function (k) {
return h.Jl(this, k);
};
h.prototype.parse = function () {
return !0;
};
h.prototype.cu = function () {
return !0;
};
h.prototype.ai = function (k) {
if ((k = this.Ya[k]) && Array.isArray(k) && 1 === k.length) return k[0];
};
h.prototype.Je = function (k, l) {
l = void 0 === l ? this.pa.offset : l;
c.assert(
l >= this.startOffset + 8 && l + k <= this.startOffset + this.eo,
'Removal range [0x' +
l.toString(16) +
'-0x' +
(l + k).toString(16) +
') must be in box [0x' +
this.startOffset.toString(16) +
'-0x' +
(this.startOffset + this.eo).toString(16) +
')'
);
this.pa.Je(k, l, this);
};
h.prototype.bv = function (k, l, d) {
d = void 0 === d ? this.pa.offset : d;
c.assert(
d >= this.startOffset + 8 && d + k <= this.startOffset + this.eo,
'Removal range [0x' +
d.toString(16) +
'-0x' +
(d + k).toString(16) +
') must be in box [0x' +
this.startOffset.toString(16) +
'-0x' +
(this.startOffset + this.eo).toString(16) +
')'
);
this.pa.bv(k, l, d, this);
};
h.prototype.uY = function (k, l, d) {
if (1 < d) {
for (var f = []; 0 < d--; ) {
f.push(this.$S(k, l));
}
return f;
}
return this.$S(k, l);
};
h.prototype.bj = function (k) {
var l, d;
d = this;
void 0 === l && (l = {});
k.forEach(function (f) {
var g, m;
if ('offset' === f.type) {
g = f.offset;
if (0 < g % 8) throw Error('Requested offset ' + f.offset + 'is not an even byte multiple');
d.pa.offset += g / 8;
} else
for (g in f) {
m = f[g];
l[g] = 'string' === typeof m ? d.uY(m) : d.uY(m.type, m.length, m.Yia);
}
});
return l;
};
h.prototype.$S = function (k, l) {
var d;
d = this.byteLength - this.pa.offset + this.startOffset;
'undefined' === typeof l && (l = d);
switch (k) {
case 'int8':
k = this.pa.sb();
break;
case 'int64':
k = this.pa.Ud();
break;
case 'int32':
k = this.pa.Da();
break;
case 'int16':
k = this.pa.$c();
break;
case 'string':
k = this.pa.fva(Math.min(l, d));
break;
default:
throw Error('Invalid type: ' + k);
}
return k;
};
h.Sa = !1;
return h;
})();
b.Fc = u;
},
function (u, b, a) {
var c, h, k, l, d, f;
Object.defineProperties(b, { __esModule: { value: !0 } });
b.kQb =
b.platform =
b.vh =
b.Ub =
b.$Gb =
b.NV =
b.kH =
b.kOb =
b.zF =
b.ce =
b.oo =
b.Pj =
b.tK =
b.st =
b.BF =
void 0;
c = a(2);
c.__exportStar(a(169), b);
c.__exportStar(a(348), b);
c.__exportStar(a(718), b);
c.__exportStar(a(719), b);
c.__exportStar(a(720), b);
h = a(96);
Object.defineProperties(b, {
BF: {
enumerable: !0,
get: function () {
return h.BF;
},
},
});
Object.defineProperties(b, {
st: {
enumerable: !0,
get: function () {
return h.st;
},
},
});
Object.defineProperties(b, {
tK: {
enumerable: !0,
get: function () {
return h.tK;
},
},
});
c.__exportStar(a(731), b);
c.__exportStar(a(352), b);
c.__exportStar(a(215), b);
c.__exportStar(a(21), b);
c.__exportStar(a(353), b);
k = a(354);
Object.defineProperties(b, {
Pj: {
enumerable: !0,
get: function () {
return k.Pj;
},
},
});
Object.defineProperties(b, {
oo: {
enumerable: !0,
get: function () {
return k.oo;
},
},
});
l = a(54);
Object.defineProperties(b, {
ce: {
enumerable: !0,
get: function () {
return l.ce;
},
},
});
d = a(217);
Object.defineProperties(b, {
zF: {
enumerable: !0,
get: function () {
return d.zF;
},
},
});
c.__exportStar(a(218), b);
b.kOb = function (g) {
b.platform.hW(g);
return a(745).mGa;
};
b.kH = function (g) {
b.platform.hW(g);
return Promise.resolve()
.then(function () {
return c.__importStar(a(252));
})
.then(function (m) {
return m.kH();
});
};
b.NV = function (g, m) {
b.platform.hW(g);
return Promise.resolve()
.then(function () {
return c.__importStar(a(419));
})
.then(function (n) {
return n.NV(m);
});
};
b.$Gb = function () {
return a(221);
};
u = c.__importDefault(a(27));
b.Ub = u.default;
u = a(968);
b.vh = u.vh;
u = c.__importDefault(a(6));
b.platform = u.default;
f = a(969);
b.kQb = function () {
return { sr: f.sr };
};
},
function (u, b, a) {
var l, d;
function c(f, g) {
return f && f.zu && (g || !1 !== f.eu);
}
function h(f, g, m) {
return !l.Ga(f) || f < g ? g : f > m ? m : f;
}
function k(f) {
if (!(this instanceof k)) return new k(f);
this.Ke = l.Ga(f) ? f : void 0;
}
l = a(10);
d = new (a(6).default.Console)('ASEJS_STREAM_SELECTOR', 'media|asejs');
u.exports = {
console: d,
debug: !1,
assert: function (f, g) {
if (!f)
throw (
((f = g ? ' : ' + g : ''),
d.error('Assertion failed' + f),
Error('ASEJS_STREAM_SELECTOR assertion failed' + f))
);
},
HH: c,
ana: function (f, g, m) {
var p, q, v, r;
function n(t) {
var w;
w = f[t];
if (!w.zu || (m && !m(w, t))) return !1;
r = t;
return !0;
}
p = f.length;
q = 0;
v = p;
l.isArray(g) && ((q = h(g[0], 0, p)), (v = h(g[1], 0, p)), (g = g[2]));
g = h(g, q - 1, v);
for (p = g - 1; p >= q; --p) {
if (n(p)) return r;
}
for (p = g + 1; p < v; ++p) {
if (n(p)) return r;
}
return -1;
},
lQb: function (f, g) {
return Math.floor((f / (125 * g)) * 1e3);
},
cub: function (f, g) {
return Math.ceil((f / 1e3) * g * 125);
},
wac: function (f, g) {
return !f.slice(g + 1).some(c);
},
Ep: k,
te: function (f, g) {
var m;
return f.some(function (n, p, q) {
m = n;
return g(n, p, q);
})
? m
: void 0;
},
Vp: function (f, g) {
var m;
return f.some(function (n, p, q) {
m = p;
return g(n, p, q);
})
? m
: -1;
},
y4: h,
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.di = 'AsyncComponentLoaderSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Ii = 'Base64EncoderSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Ica = 'ConfigurableInputsSymbol';
b.am = 'ValidatingConfigurableInputsSymbol';
b.W_ = 'ConfigNameSymbol';
b.iR = 'InitParamsSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.ei = 'ClockSymbol';
},
function (u, b, a) {
var h;
function c(k, l, d, f, g, m, n, p, q, v, r, t) {
this.code = void 0 === k ? h.S.jn : k;
this.Ec = l;
this.Ld = d;
this.Hn = f;
this.EA = g;
this.message = m;
this.details = n;
this.data = p;
this.pk = q;
this.HTb = v;
this.alert = r;
this.Kia = t;
this.fa = !1;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.jd = void 0;
h = a(3);
c.Ge = function (k) {
var l, d, f;
if (k) {
l = k.stack;
d = k.number;
f = k.message;
f || (f = '' + k);
l ? ((k = '' + l), 0 !== k.indexOf(f) && (k = f + '\n' + k)) : (k = f);
d && (k += '\nnumber:' + d);
return k;
}
return '';
};
c.prototype.GU = function (k) {
this.details = c.Ge(k);
this.data = k;
};
c.prototype.toString = function () {
return JSON.stringify(this.toJSON);
};
c.prototype.toJSON = function () {
return {
code: this.code,
subCode: this.Ec,
extCode: this.Ld,
edgeCode: this.Hn,
mslCode: this.EA,
message: this.message,
details: this.details,
data: this.data,
errorDisplayMessage: this.pk,
playbackServiceError: this.HTb,
};
};
c.vna = function (k, l) {
return new c(k, h.N.Yl, void 0, void 0, void 0, void 0, l.message, l.stack);
};
c.fdb = function (k, l) {
return new c(k, l, void 0, void 0, void 0, void 0, void 0, void 0);
};
c.W3b = function (k, l, d) {
return new c(k, l, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, d);
};
b.jd = c;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.$Ma = 'WindowTimersSymbol';
b.aF = 'JSONSymbol';
b.EMa = 'UserAgentSymbol';
b.yK = 'NavigatorSymbol';
b.Hib = 'MediaSourceSymbol';
b.EFa = 'LocationSymbol';
b.OBa = 'DateSymbol';
b.Eea = 'PerformanceSymbol';
b.u1 = 'PlatformExtraInfoSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.qo = b.Gv = b.Tx = void 0;
(function (a) {
a[(a.XLa = 0)] = 'Test';
a[(a.aFa = 1)] = 'Int';
a[(a.Skb = 2)] = 'Staging';
a[(a.lkb = 3)] = 'Prod';
})(b.Tx || (b.Tx = {}));
(function (a) {
a[(a.LR = 0)] = 'PreferMsl';
a[(a.fKa = 1)] = 'PreferNoMsl';
a[(a.cjb = 2)] = 'NoMsl';
})(b.Gv || (b.Gv = {}));
b.qo = 'GeneralConfigSymbol';
},
function (u, b, a) {
var l, d, f;
function c(g) {
var m, n, p, r;
p = Object.getOwnPropertyNames(g);
for (g = Object.getPrototypeOf(g); g !== Object.prototype; ) {
try {
for (
var q = ((m = void 0), l.__values(Object.getOwnPropertyNames(g))), v = q.next();
!v.done;
v = q.next()
) {
r = v.value;
-1 === p.indexOf(r) && p.push(r);
}
} catch (t) {
m = { error: t };
} finally {
try {
v && !v.done && (n = q.return) && n.call(q);
} finally {
if (m) throw m.error;
}
}
g = Object.getPrototypeOf(g);
}
return p;
}
function h(g, m, n, p, q) {
var v;
Object.getOwnPropertyNames(g)
.filter(function (r) {
return q(r) && (n || !Object.prototype.hasOwnProperty.call(m, r)) && (p || !(r in m));
})
.forEach(function (r) {
v = Object.getOwnPropertyDescriptor(g, r);
void 0 !== v && Object.defineProperty(m, r, v);
});
}
function k(g, m, n, p) {
var q, v;
q = [];
n || (q = Object.getOwnPropertyNames(m));
p || (q = c(m));
v = Object.getPrototypeOf(g);
null !== v && v !== Object.prototype && k(v, m, n, p);
h(g, m, !0, !0, function (r) {
return 'constructor' !== r && -1 === q.indexOf(r);
});
}
Object.defineProperties(b, { __esModule: { value: !0 } });
b.xf = b.Twb = void 0;
l = a(2);
d = a(5);
b.Twb = k;
f = Object.getOwnPropertyNames(Function);
b.xf = function (g, m, n, p) {
void 0 === n && (n = !0);
void 0 === p && (p = !0);
p || d.assert(!n);
g.prototype
? (k(g.prototype, m.prototype, n, p),
h(g, m, n, p, function (q) {
return -1 === f.indexOf(q);
}))
: h(g, m.prototype, n, p, function (q) {
return -1 === f.indexOf(q);
});
return m;
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.MB = 'named';
b.h1 = 'name';
b.XR = 'unmanaged';
b.FHa = 'optional';
b.hR = 'inject';
b.fF = 'multi_inject';
b.RLa = 'inversify:tagged';
b.SLa = 'inversify:tagged_props';
b.oea = 'inversify:paramtypes';
b.Mfb = 'design:paramtypes';
b.HR = 'post_construct';
},
function (u, b, a) {
var g, m, n, p, q, v;
function c() {
var r, t;
if ((r = b.U6.vPa)) return r;
r = p.i1.search.substr(1);
t = r.indexOf('#');
0 <= t && (r = r.substr(0, t));
r = h(r);
return (b.U6.vPa = r);
}
function h(r) {
for (var t = /[+]/g, w = (r || '').split('&'), x = {}, y, z = 0; z < w.length; z++) {
r = (0, n.trim)(w[z]);
y = r.indexOf('=');
0 <= y
? (x[decodeURIComponent(r.substr(0, y).replace(t, '%20')).toLowerCase()] = decodeURIComponent(
r.substr(y + 1).replace(t, '%20')
))
: (x[r.toLowerCase()] = null);
}
return x;
}
function k(r) {
return (r = /function (.{1,})\(/.exec(r.toString())) && 1 < r.length ? r[1] : '';
}
function l(r) {
return k(r.constructor);
}
function d(r) {
return p.sort.call(r, function (t, w) {
return t - w;
});
}
function f(r) {
for (var t = 0, w = r.length; w--; ) {
t += r[w];
}
return t;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.cUb =
b.nH =
b.LYa =
b.h8 =
b.ZTb =
b.x1a =
b.Deb =
b.Eeb =
b.vEb =
b.Ot =
b.qwb =
b.b6 =
b.ODb =
b.oI =
b.Tdb =
b.tQ =
b.Udb =
b.J_ =
b.Sdb =
b.fLb =
b.createElement =
b.pU =
b.GUb =
b.ota =
b.Ona =
b.getFunctionName =
b.OX =
b.U6 =
b.UHb =
b.J7a =
b.LQa =
b.XTa =
b.yVb =
b.LC =
b.DTa =
void 0;
g = a(14);
m = a(8);
n = a(23);
p = a(11);
q = a(13);
v = a(53);
b.DTa = function (r, t) {
if (r === t) return !0;
if (!r || !t) return !1;
for (var w in r) {
if (r.hasOwnProperty(w) && (!t.hasOwnProperty(w) || r[w] !== t[w])) return !1;
}
return !0;
};
b.LC =
b.LC ||
function (r, t) {
if (r.length == t.length) {
for (var w = r.length; w--; ) {
if (r[w] != t[w]) return !1;
}
return !0;
}
return !1;
};
b.yVb = function (r) {
var t;
if (r) {
t = r.length;
if (t) return (t = (0, n.D7a)(0, t - 1)), r[t];
}
};
b.XTa = function (r, t) {
if (r.length != t.length) return !1;
r.sort();
t.sort();
for (var w = r.length; w--; ) {
if (r[w] !== t[w]) return !1;
}
return !0;
};
b.LQa = function (r, t, w) {
function x() {
r.removeEventListener(t, x);
w.apply(this, arguments);
}
r.addEventListener(t, x);
};
b.J7a = function () {
var r, t, w, x, y, z;
r = p.ye.cookie.split('; ');
t = r.length;
y = {};
for (w = 0; w < t; w++) {
if ((x = (0, n.trim)(r[w]))) {
z = x.indexOf('=');
0 < z && (y[x.substr(0, z)] = x.substr(z + 1));
}
}
return y;
};
b.UHb = c;
b.U6 = Object.assign(c, { vPa: void 0 });
b.OX = h;
b.getFunctionName = k;
b.Ona = l;
b.ota = function (r) {
var t;
t = '';
(0, q.isArray)(r) || (0, q.Nqa)(r)
? (t = p.reduce.call(
r,
function (w, x) {
return w + (32 <= x && 128 > x ? (0, p.NLa)(x) : '.');
},
''
))
: (0, q.Gf)(r)
? (t = r)
: (0, n.pg)(r, function (w, x) {
t += (t ? ', ' : '') + '{' + w + ': ' + ((0, q.ed)(x) ? k(x) || 'function' : x) + '}';
});
return '[' + l(r) + ' ' + t + ']';
};
b.GUb = function (r, t) {
r.firstChild ? r.insertBefore(t, r.firstChild) : r.appendChild(t);
};
b.pU =
b.pU ||
function (r) {
var t;
t = '';
(0, n.pg)(r, function (w, x) {
t += (t ? ';' : '') + w + ':' + x;
});
return t;
};
b.createElement =
b.createElement ||
function (r, t, w, x) {
var y;
y = p.ye.createElement(r);
t && (y.style.cssText = t);
w && (y.innerHTML = w);
x &&
(0, n.pg)(x, function (z, A) {
y.setAttribute(z, A);
});
return y;
};
b.fLb = function (r, t) {
var w;
w = r[0];
if (t <= w[0]) return w.slice(1);
for (var x = 1, y; (y = r[x++]); ) {
if (t <= y[0]) {
r = (t - w[0]) / (y[0] - w[0]);
t = [];
for (x = 1; x < w.length; x++) {
t.push((w[x] || 0) + r * ((y[x] || 0) - (w[x] || 0)));
}
return t;
}
w = y;
}
return w.slice(1);
};
b.Sdb = function (r, t) {
var y;
for (var w = {}, x = 0; x < t.length; x++) {
y = t[x];
if ('string' != typeof y && 'number' != typeof y) return !1;
w[t[x]] = 1;
}
for (x = 0; x < r.length; x++) {
if (((y = r[x]), !w[y])) return !1;
}
return !0;
};
b.J_ = d;
b.Udb = f;
b.tQ = function (r, t) {
var w, x, y, z;
w = -1;
x = r.length;
if (1 === arguments.length) {
for (; ++w < x && !(null != (y = r[w]) && y <= y); ) {
y = void 0;
}
for (; ++w < x; ) {
null != (z = r[w]) && z > y && (y = z);
}
} else {
for (; ++w < x && !(null != (y = t.call(r, r[w], w)) && y <= y); ) {
y = void 0;
}
for (; ++w < x; ) {
null != (z = t.call(r, r[w], w)) && z > y && (y = z);
}
}
return y;
};
b.Tdb = function (r, t) {
var w, x, y, z;
w = -1;
x = r.length;
if (1 === arguments.length) {
for (; ++w < x && !(null != (y = r[w]) && y <= y); ) {
y = void 0;
}
for (; ++w < x; ) {
null != (z = r[w]) && y > z && (y = z);
}
} else {
for (; ++w < x && !(null != (y = t.call(r, r[w], w)) && y <= y); ) {
y = void 0;
}
for (; ++w < x; ) {
null != (z = t.call(r, r[w], w)) && y > z && (y = z);
}
}
return y;
};
b.oI = function (r) {
return (0, q.ed)(r.then)
? r
: new Promise(function (t, w) {
r.oncomplete = function () {
t(r.result);
};
r.onerror = function () {
w(r.error);
};
});
};
b.ODb = function (r, t) {
var x, y, z, A, B, E;
function w(C) {
0 > x.indexOf(C) && (0, q.Ga)(C) && x.push(C);
}
r = r.slice();
d(r);
x = [];
if (!t || !t.length) return r;
if (!r.length) return [];
y = t.length;
try {
for (; y--; ) {
A = '' + t[y];
B = (0, n.Cj)(A);
switch (A[A.length - 1]) {
case '-':
for (z = r.length; z--; ) {
E = r[z];
if (E < B) {
w(E);
break;
}
}
break;
case '+':
for (z = 0; z < r.length; z++) {
if (((E = r[z]), E > B)) {
w(E);
break;
}
}
break;
default:
0 <= r.indexOf(B) && w(B);
}
}
} catch (C) {}
x.length || x.push(r[0]);
d(x);
return x;
};
b.b6 =
b.b6 ||
function (r, t, w) {
var x;
if (r / t > w) {
x = (0, p.en)(t * w);
r = t;
} else (x = r), (r = (0, p.en)(r / w));
return { width: x, height: r };
};
b.qwb = function (r, t, w) {
for (var x = [], y = 0; y < t; y++) {
x.push((0, p.zGa)(r[y] - w, 2));
}
return (0, p.AGa)(f(x) / x.length);
};
b.Ot = function (r, t) {
var w;
w = r.length;
t = (w - 1) * t + 1;
if (1 === t) return r[0];
if (t == w) return r[w - 1];
w = (0, p.sK)(t);
return r[w - 1] + (t - w) * (r[w] - r[w - 1]);
};
b.vEb = function (r, t) {
if (!(0, q.isArray)(r)) throw Error('boxes is not an array');
if (0 >= r.length) throw Error('There are no boxes in boxes');
t = (0, q.isArray)(t) ? t : [t];
for (var w = r.length, x = 0; x < w; x++) {
for (var y = 0; y < t.length; y++) {
if (r[x].type == t[y]) return r[x];
}
}
throw Error('Box not found ' + t);
};
b.Eeb = function (r) {
return r
.$Fb('trak/mdia/minf/stbl/stsd/' + g.qAa + '|' + g.rAa)
.children.filter(function (t) {
return 'sinf' == t.type && t.E$b.schm.qcc == v.xv;
})[0]
.$Fb('schi/tenc').tj;
};
b.Deb = function (r) {
var w;
function t(x, y) {
var z;
z = w[x];
w[x] = w[y];
w[y] = z;
}
w = new Uint8Array(r);
t(0, 3);
t(1, 2);
t(4, 5);
t(6, 7);
return w;
};
b.x1a = function () {
return (0, q.ed)(p.re.requestMediaKeySystemAccess);
};
b.ZTb = function (r) {
return function (t) {
return t && t[r];
};
};
(0, q.ed)(ArrayBuffer.prototype.slice) ||
(ArrayBuffer.prototype.slice = function (r, t) {
var w, x;
void 0 === r && (r = 0);
void 0 === t && (t = this.byteLength);
r = Math.floor(r);
t = Math.floor(t);
0 > r && (r += this.byteLength);
0 > t && (t += this.byteLength);
r = Math.min(Math.max(0, r), this.byteLength);
t = Math.min(Math.max(0, t), this.byteLength);
if (0 >= t - r) return new ArrayBuffer(0);
w = new ArrayBuffer(t - r);
x = new Uint8Array(w);
r = new Uint8Array(this, r, t - r);
x.set(r);
return w;
});
b.h8 = function (r) {
return r && 0 == r.toLowerCase().indexOf('https');
};
b.LYa = function () {
var r, t;
r = new ArrayBuffer(4);
t = new Uint8Array(r);
r = new Uint32Array(r);
t[0] = 161;
t[1] = 178;
t[2] = 195;
t[3] = 212;
return 3569595041 == r[0] ? 'LE' : 2712847316 == r[0] ? 'BE' : 'undefined';
};
b.nH = function () {
var r, t, w;
try {
r = /playercore.*js/;
t = p.Hv.getEntries('resource').filter(function (x) {
return null !== r.exec(x.name);
});
if (t && 0 < t.length) {
w = (0, p.en)(t[0].duration);
return JSON.stringify(w);
}
} catch (x) {}
};
b.cUb = function (r, t, w) {
if (r && r.length) {
if (w && w.zvb)
try {
r.forEach(function (x, y) {
var z;
z = (y = w.zvb[y]) && y.media;
z && (0, q.Gf)(z)
? (!1,
(z = (0, m.Or)(z).buffer),
(x.media = { arrayBuffer: z, length: z.byteLength, stream: t, uc: y.cdn }))
: m.log.warn('chunk not in cache', x.Uh);
});
} catch (x) {
m.log.error('error reading cached chunks', x);
}
else m.log.warn('chunks not available in cached stream', w.type);
} else m.log.warn('chunks not available in mediabuffer', w.type);
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.vo = 'PlatformSymbol';
b.v1 = 'PlatformMutableSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.M = {
fK: 'playready-h264mpl30-dash',
VE: 'playready-h264mpl31-dash',
eda: 'playready-h264mpl40-dash',
LDa: 'playready-h264hpl22-dash',
XQ: 'playready-h264hpl30-dash',
YQ: 'playready-h264hpl31-dash',
dda: 'playready-h264hpl40-dash',
Ffa: 'vp9-profile0-L21-dash-cenc',
$R: 'vp9-profile0-L30-dash-cenc',
aS: 'vp9-profile0-L31-dash-cenc',
Y1: 'vp9-profile0-L40-dash-cenc',
hda: 'hevc-main10-L30-dash-cenc',
ida: 'hevc-main10-L31-dash-cenc',
jda: 'hevc-main10-L40-dash-cenc',
kda: 'hevc-main10-L41-dash-cenc',
aR: 'hevc-main10-L50-dash-cenc',
bR: 'hevc-main10-L51-dash-cenc',
K0: 'hevc-main10-L30-dash-cenc-prk',
M0: 'hevc-main10-L31-dash-cenc-prk',
O0: 'hevc-main10-L40-dash-cenc-prk',
Q0: 'hevc-main10-L41-dash-cenc-prk',
L0: 'hevc-main10-L30-dash-cenc-prk-do',
N0: 'hevc-main10-L31-dash-cenc-prk-do',
P0: 'hevc-main10-L40-dash-cenc-prk-do',
R0: 'hevc-main10-L41-dash-cenc-prk-do',
S0: 'hevc-main10-L50-dash-cenc-prk-do',
T0: 'hevc-main10-L51-dash-cenc-prk-do',
$_: 'hevc-dv5-main10-L30-dash-cenc-prk',
b0: 'hevc-dv5-main10-L31-dash-cenc-prk',
MQ: 'hevc-dv5-main10-L40-dash-cenc-prk',
e0: 'hevc-dv5-main10-L41-dash-cenc-prk',
g0: 'hevc-dv5-main10-L50-dash-cenc-prk',
i0: 'hevc-dv5-main10-L51-dash-cenc-prk',
a0: 'hevc-dv5-main10-L30-dash-cenc-prk-do',
c0: 'hevc-dv5-main10-L31-dash-cenc-prk-do',
d0: 'hevc-dv5-main10-L40-dash-cenc-prk-do',
f0: 'hevc-dv5-main10-L41-dash-cenc-prk-do',
h0: 'hevc-dv5-main10-L50-dash-cenc-prk-do',
j0: 'hevc-dv5-main10-L51-dash-cenc-prk-do',
x0: 'hevc-hdr-main10-L30-dash-cenc-prk',
z0: 'hevc-hdr-main10-L31-dash-cenc-prk',
$Q: 'hevc-hdr-main10-L40-dash-cenc-prk',
C0: 'hevc-hdr-main10-L41-dash-cenc-prk',
E0: 'hevc-hdr-main10-L50-dash-cenc-prk',
G0: 'hevc-hdr-main10-L51-dash-cenc-prk',
y0: 'hevc-hdr-main10-L30-dash-cenc-prk-do',
A0: 'hevc-hdr-main10-L31-dash-cenc-prk-do',
B0: 'hevc-hdr-main10-L40-dash-cenc-prk-do',
D0: 'hevc-hdr-main10-L41-dash-cenc-prk-do',
F0: 'hevc-hdr-main10-L50-dash-cenc-prk-do',
H0: 'hevc-hdr-main10-L51-dash-cenc-prk-do',
rza: 'av1-main-L20-dash-cbcs-prk',
sza: 'av1-main-L21-dash-cbcs-prk',
AB: 'av1-main-L30-dash-cbcs-prk',
BB: 'av1-main-L31-dash-cbcs-prk',
E_: 'av1-main-L40-dash-cbcs-prk',
F_: 'av1-main-L41-dash-cbcs-prk',
G_: 'av1-main-L50-dash-cbcs-prk',
H_: 'av1-main-L51-dash-cbcs-prk',
};
b.Qg = {
zca: [b.M.fK, b.M.VE, b.M.eda],
Tba: [b.M.XQ, b.M.YQ, b.M.dda],
nza: [b.M.$R, b.M.aS, b.M.Y1],
T4b: [b.M.hda, b.M.ida, b.M.jda, b.M.kda, b.M.aR, b.M.bR],
Cca: [b.M.K0, b.M.M0, b.M.O0, b.M.Q0, b.M.aR, b.M.bR],
Dca: [b.M.L0, b.M.N0, b.M.P0, b.M.R0, b.M.S0, b.M.T0],
Aca: [b.M.x0, b.M.z0, b.M.$Q, b.M.C0, b.M.E0, b.M.G0],
Bca: [b.M.y0, b.M.A0, b.M.B0, b.M.D0, b.M.F0, b.M.H0],
HAa: [b.M.$_, b.M.MQ, b.M.g0, b.M.b0, b.M.e0, b.M.i0],
IAa: [b.M.a0, b.M.d0, b.M.h0, b.M.c0, b.M.f0, b.M.j0],
Seb: [b.M.AB, b.M.BB, b.M.E_, b.M.F_, b.M.G_, b.M.H_],
};
b.Pd = {
WE: 'ddplus-atmos-dash', //swap as needed: ddplus-5.1-dash or ddplus-atmos-dash
I0: 'heaac-5.1-dash',
XE: 'heaac-2hq-dash',
oy: 'xheaac-dash',
JQ: 'ddplus-2.0-dash',
Y_: 'ddplus-5.1-dash',
KQ: 'ddplus-atmos-dash',
};
b.$l = { Fkb: 'simplesdh', Kca: 'dfxp-ls-sdh', sEa: 'imsc1.1', a2: 'webvtt-lssdh-ios8', wK: 'nflx-cmisc' };
},
function (u, b, a) {
var l, d, f;
function c(g) {
return function (m, n) {
return m.lva(n, g);
};
}
function h(g, m) {
return g.N$.sVb[m] || k(g, m);
}
function k(g, m) {
g = g.cA.data[m];
switch (typeof g) {
case 'undefined':
break;
case 'string':
case 'number':
case 'boolean':
return g.toString();
default:
return JSON.stringify(g);
}
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.Yy =
b.uva =
b.object =
b.ZCb =
b.url =
b.da =
b.il =
b.qya =
b.iLb =
b.mJ =
b.string =
b.qB =
b.zd =
b.vD =
b.config =
void 0;
l = a(50);
d = a(4);
f = a(138);
b.config = function (g, m, n) {
n = void 0 === n ? !1 : n;
return function (p, q, v) {
var r, t;
r = void 0 !== m ? m : q;
t = v.get;
void 0 !== t &&
(v.get = function () {
var w;
if (!this.aMb(q)) return this.bIb(q);
a: {
w = (this.Yrb || n ? h : k)(this, r.toString());
if (void 0 !== w)
if (((w = g(this.xX, w)), w instanceof f.Cp)) this.IXa(r, w);
else break a;
w = t.bind(this)();
}
this.W8a(q, w);
return w;
});
return v;
};
};
b.vD = function (g, m) {
return g.M7a(m);
};
b.zd = function (g, m) {
return g.eva(m);
};
b.qB = function (g, m) {
return g.Mq(m);
};
b.string = function (g, m) {
return g.lva(m);
};
b.mJ = function (g, m) {
return g.Xh(m, b.string);
};
b.iLb = function (g, m) {
return g.Xh(m, b.vD);
};
b.qya = function (g, m) {
return g.Xh(m, b.qB);
};
b.il = function (g, m) {
g = g.Mq(m);
return g instanceof f.Cp ? g : (0, d.Oc)(g);
};
b.da = function (g, m) {
g = g.Mq(m);
return g instanceof f.Cp ? g : (0, l.da)(g);
};
b.url = c(/^\S+$/);
b.ZCb = function (g) {
return function (m, n) {
return m.L7a(n, g);
};
};
b.object = function () {
return function (g, m) {
return g.N7a(m);
};
};
b.uva = c;
b.Yy = function (g, m) {
return function (n, p) {
return n.Xh(p, g, m);
};
};
},
function (u, b, a) {
var k, l, d, f;
function c(g, m) {
var n;
n = f.call(this, g, m) || this;
n.QTa = m;
n.debug = g.debug;
n.ya = g.If.mb(n.QTa);
return n;
}
function h(g, m) {
this.QTa = m;
this.Tua = {};
this.cA = g.cA;
this.xX = g.xX;
this.N$ = g.N$;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.Ze = b.AQ = b.TLa = void 0;
u = a(1);
k = a(612);
l = a(0);
d = a(138);
b.TLa = 'isTestAccount';
h.prototype.IXa = function () {};
h.prototype.W8a = function (g, m) {
this.Tua[g] = [m, this.cA.eaa];
};
h.prototype.aMb = function (g) {
return (
k.nea
.of(this.Tua[g])
.map(function (m) {
return m[1];
})
.or(-1) < this.cA.eaa
);
};
h.prototype.bIb = function (g) {
return k.nea
.of(this.Tua[g])
.map(function (m) {
return m[0];
})
.or(function () {
throw Error('Invalid State Error');
});
};
Xa.Object.defineProperties(h.prototype, {
Yrb: {
configurable: !0,
enumerable: !0,
get: function () {
var g, m;
if (this && this.cA && this.cA.data) {
g = this.cA.data[b.TLa];
'undefined' !== typeof g && (m = g.toString());
g = this.xX.eva(m);
g = g instanceof d.Cp ? !1 : g;
} else g = !1;
return g;
},
},
});
f = h;
f = u.__decorate([(0, l.T)(), u.__param(0, (0, l.Vm)()), u.__param(1, (0, l.Vm)())], f);
b.AQ = f;
oa(c, f);
c.prototype.IXa = function (g, m) {
this.ya.error('Invalid configuration value.', { name: g }, m);
this.debug.assert(!1);
};
a = c;
a = u.__decorate([u.__param(0, (0, l.Vm)()), u.__param(1, (0, l.Vm)())], a);
b.Ze = a;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Vj = 'SchedulerSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Jda = 'LogBatcherConfigSymbol';
b.cn = 'LogBatcherSymbol';
b.HFa = 'LogBatcherProviderSymbol';
},
function (u, b, a) {
var k;
function c() {
return k.YR.apply(this, arguments) || this;
}
function h(l) {
return new k.mt(l, b.ME);
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.fb = b.XGa = b.Eda = b.wv = b.ME = b.uPb = b.MMb = b.da = b.bz = b.Qeb = void 0;
k = a(315);
oa(c, k.YR);
b.Qeb = c;
b.bz = h;
b.da = function (l) {
return new k.mt(l, b.wv);
};
b.MMb = function (l) {
return new k.mt(l, b.Eda);
};
b.uPb = function (l) {
return new k.mt(l, b.XGa);
};
b.ME = new c(1, 'b');
b.wv = new c(8 * b.ME.ug, 'B', b.ME);
b.Eda = new c(1024 * b.wv.ug, 'KB', b.ME);
b.XGa = new c(1024 * b.Eda.ug, 'MB', b.ME);
b.fb = h(0);
},
function (u, b, a) {
var c, h;
c = a(128);
h = a(181);
u.exports = function (k) {
return function g(d, f) {
switch (arguments.length) {
case 0:
return g;
case 1:
return h(d)
? g
: c(function (m) {
return k(d, m);
});
default:
return h(d) && h(f)
? g
: h(d)
? c(function (m) {
return k(m, f);
})
: h(f)
? c(function (m) {
return k(d, m);
})
: k(d, f);
}
};
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.flatten = b.gp = b.J_b = b.s5a = void 0;
b.s5a = function (a, c) {
return a - c;
};
b.J_b = function (a, c) {
return a.localeCompare(c);
};
b.gp = function (a, c) {
var h;
h = Object.getOwnPropertyDescriptor(a, c);
h &&
Object.defineProperty(a, c, {
configurable: h.configurable,
enumerable: !1,
value: h.value,
writable: h.writable,
});
};
b.flatten = function (a) {
return [].concat.apply([], da(a));
};
},
function (u, b, a) {
var h;
function c(k) {
var l;
l = k.getConfiguration();
return [b.hK, b.L1, b.K1].find(function (d) {
var f;
return null === (f = l.videoCapabilities) || void 0 === f
? void 0
: f.some(function (g) {
return g.robustness === d;
});
});
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.yoa =
b.koa =
b.ooa =
b.hK =
b.jhb =
b.L1 =
b.K1 =
b.VMa =
b.WMa =
b.RHa =
b.s0 =
b.TEMPORARY =
b.xv =
void 0;
h = a(13);
b.xv = 'cenc';
b.TEMPORARY = 'temporary';
b.s0 =
'MIIE2jCCA8KgAwIBAgIIBRGnbPd8z1YwDQYJKoZIhvcNAQEFBQAwfzELMAkGA1UEBhMCVVMxEzARBgNVBAoMCkFwcGxlIEluYy4xJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MTMwMQYDVQQDDCpBcHBsZSBLZXkgU2VydmljZXMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTMwMzI3MjEyNjU2WhcNMTUwMzI4MjEyNjU2WjBjMQswCQYDVQQGEwJVUzEUMBIGA1UECgwLTmV0ZmxpeC5jb20xDDAKBgNVBAsMA0VEUzEwMC4GA1UEAwwnRlBTIEFwcGxpY2F0aW9uIENlcnRpZmljYXRlICgyMDEzIHYxLjApMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfaIdDptThILsQcAbDMvT5FpK4JNn/BnHAY++rS9OFfhg5R4pV7CI+UMZeC64TFJJZciq6dX4/Vh7JDDULooAeZxlOLqJB4v+KDMpFS6VsRPweeMRSCE5rQffF5HoRKx682Kw4Ltv2PTxE3M16ktYCOxq+/7fxevMt3uII+2V0tQIDAQABo4IB+DCCAfQwHQYDVR0OBBYEFDuQUJCSl+l2UeybrEfNbUR1JcwSMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUY+RHVMuFcVlGLIOszEQxZGcDLL4wgeIGA1UdIASB2jCB1zCB1AYJKoZIhvdjZAUBMIHGMIHDBggrBgEFBQcCAjCBtgyBs1JlbGlhbmNlIG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJkIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5IGFuZCBjZXJ0aWZpY2F0aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMDUGA1UdHwQuMCwwKqAooCaGJGh0dHA6Ly9jcmwuYXBwbGUuY29tL2tleXNlcnZpY2VzLmNybDAOBgNVHQ8BAf8EBAMCBSAwLQYLKoZIhvdjZAYNAQMBAf8EGwGcLBpLUU8iNtuBsGfgldUUE/I42u6RKyl8uzBJBgsqhkiG92NkBg0BBAEB/wQ3AV+LX+Xo3O4lI5WzFXfxVrna5jJD1GHioNsMHMKUv97Kx9dCozZVRhmiGdTREdjOptDoUjj2ODANBgkqhkiG9w0BAQUFAAOCAQEAmkGc6tT450ENeFTTmvhyTHfntjWyEpEvsvoubGpqPnbPXhYsaz6U1RuoLkf5q4BkaXVE0yekfKiPa5lOSIYOebyWgDkWBuJDPrQFw8QYreq5T/rteSNQnJS1lAbg5vyLzexLMH7kq47OlCAnUlrI20mvGM71RuU6HlKJIlWIVlId5JZQF2ae0/A6BVZWh35+bQu+iPI1PXjrTVYqtmrV6N+vV8UaHRdKV6rCD648iJebynWZj4Gbgzqw7AX4RE6UwiX0Rgz9ZMM5Vzfgrgk8KxOmsuaP8Kgqf5KWeH/LDa+ocftU7zGz1jO5L999JptFIatsdPyZXnA3xM+QjzBW8w==';
b.RHa =
'Q0hBSQAAAAEAAAUMAAAAAAAAAAJDRVJUAAAAAQAAAfwAAAFsAAEAAQAAAFhr+y4Ydms5rTmj6bCCteW2AAAAAAAAAAAAAAAJzZtwNxHterM9CAoJYOM3CF9Tj0d9KND413a+UtNzRTb/////AAAAAAAAAAAAAAAAAAAAAAABAAoAAABU8vU0ozkqocBJMVIX2K4dugAAADZodHRwOi8vbnJkcC5uY2NwLm5ldGZsaXguY29tL3Jtc2RrL3JpZ2h0c21hbmFnZXIuYXNteAAAAAABAAUAAAAMAAAAAAABAAYAAABcAAAAAQABAgAAAAAAglDQ2GehCoNSsOaaB8zstNK0cCnf1+9gX8wM+2xwLlqJ1kyokCjt3F8P2NqXHM4mEU/G1T0HBBSI3j6XpKqzgAAAAAEAAAACAAAABwAAAEgAAAAAAAAACE5ldGZsaXgAAAAAH1BsYXlSZWFkeSBNZXRlcmluZyBDZXJ0aWZpY2F0ZQAAAAAABjIwMjQ4AAAAAAEACAAAAJAAAQBAU73up7T8eJYVK4UHuKYgMQIRbo0yf27Y5EPZRPmzkx1ZDMor7Prs77CAOU9S9k0RxpxPnqUwAKRPIVCe0aX2+AAAAgBb65FSx1oKG2r8AxQjio+UrYGLhvA7KMlxJBbPXosAV/CJufnIdUMSA0DhxD2W3eRLh2vHukIL4VH9guUcEBXsQ0VSVAAAAAEAAAL8AAACbAABAAEAAABYyTlnSi+jZfRvYL0rk9sVfwAAAAAAAAAAAAAABFNh3USSkWi88BlSM6PZ2gMuceJFJ9hzz0WzuCiwF9qv/////wAAAAAAAAAAAAAAAAAAAAAAAQAFAAAADAAAAAAAAQAGAAAAYAAAAAEAAQIAAAAAAFvrkVLHWgobavwDFCOKj5StgYuG8DsoyXEkFs9eiwBX8Im5+ch1QxIDQOHEPZbd5EuHa8e6QgvhUf2C5RwQFewAAAACAAAAAQAAAAwAAAAHAAABmAAAAAAAAACATWljcm9zb2Z0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAUGxheVJlYWR5IFNMMCBNZXRlcmluZyBSb290IENBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAMS4wLjAuMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAIAAAAkAABAECsAomwQgNY0bm6U6Au9JRvwjbNnRzmVkZi+kg7npnRQ2T+4LgyrePBdBRQ3qb/jxXkn++4sOFa7vjRpFBzV0MMAAACAIZNYc/yJW5CLFaLPCgAHPs+FSdlhYS6BSG3mxgo2TbeHYJqj8Pm5/p6kNXKKUbx9kou+59dz/5+Q060QpP6xas=';
b.WMa =
'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=';
b.VMa =
'CAUSwwUKvQIIAxIQ5US6QAvBDzfTtjb4tU/7QxiH8c+TBSKOAjCCAQoCggEBAObzvlu2hZRsapAPx4Aa4GUZj4/GjxgXUtBH4THSkM40x63wQeyVxlEEo1D/T1FkVM/S+tiKbJiIGaT0Yb5LTAHcJEhODB40TXlwPfcxBjJLfOkF3jP6wIlqbb6OPVkDi6KMTZ3EYL6BEFGfD1ag/LDsPxG6EZIn3k4S3ODcej6YSzG4TnGD0szj5m6uj/2azPZsWAlSNBRUejmP6Tiota7g5u6AWZz0MsgCiEvnxRHmTRee+LO6U4dswzF3Odr2XBPD/hIAtp0RX8JlcGazBS0GABMMo2qNfCiSiGdyl2xZJq4fq99LoVfCLNChkn1N2NIYLrStQHa35pgObvhwi7ECAwEAAToQdGVzdC5uZXRmbGl4LmNvbRKAA4TTLzJbDZaKfozb9vDv5qpW5A/DNL9gbnJJi/AIZB3QOW2veGmKT3xaKNQ4NSvo/EyfVlhc4ujd4QPrFgYztGLNrxeyRF0J8XzGOPsvv9Mc9uLHKfiZQuy21KZYWF7HNedJ4qpAe6gqZ6uq7Se7f2JbelzENX8rsTpppKvkgPRIKLspFwv0EJQLPWD1zjew2PjoGEwJYlKbSbHVcUNygplaGmPkUCBThDh7p/5Lx5ff2d/oPpIlFvhqntmfOfumt4i+ZL3fFaObvkjpQFVAajqmfipY0KAtiUYYJAJSbm2DnrqP7+DmO9hmRMm9uJkXC2MxbmeNtJHAHdbgKsqjLHDiqwk1JplFMoC9KNMp2pUNdX9TkcrtJoEDqIn3zX9p+itdt3a9mVFc7/ZL4xpraYdQvOwP5LmXj9galK3s+eQJ7bkX6cCi+2X+iBmCMx4R0XJ3/1gxiM5LiStibCnfInub1nNgJDojxFA3jH/IuUcblEf/5Y0s1SzokBnR8V0KbA==';
b.K1 = 'SW_SECURE_CRYPTO';
b.L1 = 'SW_SECURE_DECODE';
b.jhb = 'HW_SECURE_DECODE';
b.hK = 'HW_SECURE_ALL';
b.ooa = c;
b.koa = function (k) {
var l;
if (k) {
l = null === k || void 0 === k ? void 0 : k.keySystem;
(k = c(k)) && (l += '.' + k);
return l;
}
return 'n/a';
};
b.yoa = function (k) {
var l, g;
try {
for (var d = /\((\d[^)]+)\)/g, f; (f = d.exec(k)); ) {
g = Number(f[1]);
(0, h.Ga)(g) && (l = g);
}
} catch (m) {}
return l;
};
},
function (u, b, a) {
var c, h;
Object.defineProperties(b, { __esModule: { value: !0 } });
b.ifa = b.ce = void 0;
c = a(2);
h = a(738);
(function (k) {
k[(k.pp = 0)] = 'startPlayback';
k[(k.kq = 1)] = 'endPlayback';
k[(k.mo = 2)] = 'underflow';
})(b.ce || (b.ce = {}));
u = (function () {
function k(l) {
this.config = l;
this.ZO = [];
}
k.prototype.sh = function (l) {
var d, f;
f = c.__read(
this.config.k5.filter(function (g) {
return g.Yg === l.Yg;
}),
1
)[0];
(null !== (d = null === f || void 0 === f ? void 0 : f.enabled) && void 0 !== d ? d : l.enabled)
? this.ZO.push(l)
: l.Kb && l.Kb();
};
k.prototype.Mn = function (l) {
var d, f, g, p, q;
f = {};
g = [];
try {
for (var m = c.__values(this.ZO), n = m.next(); !n.done; n = m.next()) {
p = n.value;
try {
q = p.Mn({ Yi: l });
q && (p.SD ? (f[p.SD] = q) : (f = c.__assign(c.__assign({}, f), q)));
} catch (r) {
g.push(Error(p.Yg + '::' + r));
}
}
} catch (r) {
var v;
v = { error: r };
} finally {
try {
n && !n.done && (d = m.return) && d.call(m);
} finally {
if (v) throw v.error;
}
}
g.length && (f['rpt-error'] = new h.wza('Reporting error', g));
return f;
};
return k;
})();
b.ifa = u;
},
function (u, b, a) {
Object.defineProperty(b, '__esModule', { value: !0 });
u = a(1);
u.__exportStar(a(739), b);
u.__exportStar(a(170), b);
u.__exportStar(a(740), b);
u.__exportStar(a(741), b);
u.__exportStar(a(742), b);
u.__exportStar(a(743), b);
u.__exportStar(a(358), b);
u.__exportStar(a(744), b);
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.uo = 'PboCommandContextSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.ogb = 'Cannot apply @injectable decorator multiple times.';
b.pgb = 'Metadata key was used more than once in a parameter:';
b.BR = 'NULL argument';
b.gFa = 'Key Not Found';
b.ydb = 'Ambiguous match found for serviceIdentifier:';
b.Reb = 'Could not unbind serviceIdentifier:';
b.Tib = 'No matching bindings found for serviceIdentifier:';
b.pib = 'Missing required @injectable annotation in:';
b.qib = 'Missing required @inject or @multiInject annotation in:';
b.hlb = function (a) {
return (
'@inject called with undefined this could mean that the class ' +
a +
' has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation.'
);
};
b.Ueb = 'Circular dependency found:';
b.$6b = 'Sorry, this feature is not fully implemented yet.';
b.Khb = 'Invalid binding type:';
b.Vib = 'No snapshot available to restore.';
b.Ohb = 'Invalid return type in middleware. Middleware must return!';
b.Nhb = 'Value provided to function binding must be a function!';
b.Qhb = 'The toSelf function can only be applied when a constructor is used as service identifier';
b.Lhb =
'The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.';
b.Adb = function () {
for (var a = [], c = 0; c < arguments.length; c++) {
a[c] = arguments[c];
}
return (
'The number of constructor arguments in the derived class ' +
(a[0] + ' must be >= than the number of constructor arguments of its base class.')
);
};
b.ifb = 'Invalid Container constructor argument. Container options must be an object.';
b.gfb = "Invalid Container option. Default scope must be a string ('singleton' or 'transient').";
b.ffb = 'Invalid Container option. Auto bind injectable must be a boolean';
b.hfb = 'Invalid Container option. Skip base check must be a boolean';
b.Dib = 'Cannot apply @postConstruct decorator multiple times in the same class';
b.Zjb = function () {
for (var a = [], c = 0; c < arguments.length; c++) {
a[c] = arguments[c];
}
return '@postConstruct error in class ' + a[0] + ': ' + a[1];
};
b.Veb = function () {
for (var a = [], c = 0; c < arguments.length; c++) {
a[c] = arguments[c];
}
return (
"It looks like there is a circular dependency in one of the '" +
(a[0] + "' bindings. Please investigate bindings withservice identifier '") +
(a[1] + "'.")
);
};
b.Jkb = 'Maximum call stack size exceeded';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.qra = b.ii = void 0;
(function (a) {
a[(a.Dp = 0)] = 'STANDARD';
a[(a.ro = 1)] = 'LIMITED';
})(b.ii || (b.ii = {}));
b.qra = function (a) {
return ['STANDARD', 'LIMITED'][a];
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Vf = void 0;
b.Vf = function (a) {
return setTimeout(a, 0);
};
},
function (u, b, a) {
var h, k, l, d, f;
function c() {
return h.cc.get(l.gd).lA.ca(f.ma);
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.Xvb = b.B4 = b.qTa = b.Vvb = b.Wvb = b.Bka = b.Bn = void 0;
h = a(196);
k = a(37);
l = a(17);
d = a(77);
f = a(4);
b.Bn = function () {
return h.cc.get(l.gd).Wb().ca(f.ma);
};
b.Bka = function () {
return h.cc.get(k.ei).hf.ca(f.xo);
};
b.Wvb = function () {
return h.cc.get(l.gd).lA.ca(f.xo);
};
b.Vvb = function () {
return h.cc.get(d.Yx).pz();
};
b.qTa = c;
b.B4 = function () {
return h.cc.get(k.ei).hf.ca(f.ma);
};
b.Xvb = function () {
return c();
};
},
function (u, b) {
var c, h;
function a() {}
Object.defineProperty(b, '__esModule', { value: !0 });
b.po = b.Na = b.Wj = void 0;
(function (k) {
k[(k.Dp = 0)] = 'STANDARD';
k[(k.ro = 1)] = 'LIMITED';
k[(k.A7b = 2)] = 'PREVIEW';
})(c || (c = {}));
(function (k) {
k[(k.HAVE_NOTHING = 0)] = 'HAVE_NOTHING';
k[(k.HAVE_METADATA = 1)] = 'HAVE_METADATA';
k[(k.HAVE_CURRENT_DATA = 2)] = 'HAVE_CURRENT_DATA';
k[(k.HAVE_FUTURE_DATA = 3)] = 'HAVE_FUTURE_DATA';
k[(k.HAVE_ENOUGH_DATA = 4)] = 'HAVE_ENOUGH_DATA';
})(h || (h = {}));
(function (k) {
k.Mdb = 'asl_start';
k.Kdb = 'asl_comp';
k.i4b = 'asl_exc';
k.Ldb = 'asl_fail';
k.Mkb = 'stf_creat';
k.thb = 'idb_open';
k.qhb = 'idb_block';
k.Ahb = 'idb_upgr';
k.zhb = 'idb_succ';
k.rhb = 'idb_error';
k.shb = 'idb_invalid_state';
k.vhb = 'idb_open_timeout';
k.xhb = 'idb_open_wrkarnd';
k.yhb = 'idb_storelen_exc';
k.uhb = 'idb_open_exc';
k.whb = 'idb_timeout_invalid_storelen';
k.xib = 'msl_load_data';
k.zib = 'msl_load_no_data';
k.yib = 'msl_load_failed';
})((u = b.Wj || (b.Wj = {})));
(function (k) {
k.rea = 'PlaybackRequestStart';
k.qea = 'PlaybackRequestEnd';
k.D1 = 'RequestPrefetchManifestStart';
k.C1 = 'RequestPrefetchManifestEnd';
k.B1 = 'RequestManifestStart';
k.A1 = 'RequestManifestEnd';
k.z1 = 'RequestLicenseStart';
k.y1 = 'RequestLicenseEnd';
k.FQ = 'RequestTimedTextUrlStart';
k.EQ = 'RequestTimedTextUrlEnd';
k.DQ = 'RequestAudioUrlStart';
k.CQ = 'RequestAudioUrlEnd';
k.HQ = 'RequestVideoUrlStart';
k.GQ = 'RequestVideoUrlEnd';
k.Vba = 'AppendBufferStart';
k.Uba = 'AppendBufferEnd';
k.kfa = 'SetMediaKeysStart';
k.jfa = 'SetMediaKeysEnd';
k.v0 = 'GenerateChallengeStart';
k.u0 = 'GenerateChallengeEnd';
k.C_ = 'ApplyLicenseStart';
k.B_ = 'ApplyLicenseEnd';
})(b.Na || (b.Na = {}));
b.po = a;
a.Fda = c;
a.fUa = function (k) {
return ['STANDARD', 'LIMITED', 'PREVIEW'][k];
};
a.Wj = u;
a.U0 = h;
},
function (u, b, a) {
var h, k;
function c(l, d) {
var f;
f = b.wo[0];
f == d && (f = b.wo[1]);
f
? f.close(function () {
c(l, d);
})
: l && l(h.hg);
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.mJa = b.kJa = b.Kea = b.Lea = b.QB = b.Mea = b.lJa = b.Pea = b.Oea = b.wo = b.oJa = b.Nea = void 0;
h = a(14);
k = a(24);
b.Nea = c;
b.oJa = function (l, d) {
switch (l) {
case b.lJa:
b.Oea.push(d);
return;
case b.Mea:
b.Pea.push(d);
return;
}
(0, k.wb)(!1);
};
b.wo = [];
b.Oea = [];
b.Pea = [];
b.lJa = 1;
b.Mea = 3;
b.QB = { index: 0, A4a: void 0, fna: void 0 };
b.Lea = 'network';
b.Kea = 'media';
b.kJa = 'timedtext';
b.mJa = 'playback';
},
function (u, b, a) {
var c, h;
Object.defineProperty(b, '__esModule', { value: !0 });
b.g7 = b.ds = b.h7 = b.mD = b.Rn = b.Ve = void 0;
u = a(70);
c = a(59);
h = a(11);
b.Ve = new u.Lk();
b.Rn = 1;
b.mD = 2;
b.h7 = 3;
b.ds = 4;
b.g7 = 5;
(0, c.Vf)(function () {
var l, d, f;
function k(g, m) {
if (d) d.on(g, m);
else ob.addEventListener(g, m);
}
l = ob.jQuery;
d = l && l(ob);
l = (l = ob.netflix) && l.cadmium && l.cadmium.addBeforeUnloadHandler;
f = h.ye.hidden;
l
? l(function (g) {
b.Ve.Ic(b.Rn, g);
})
: k('beforeunload', function (g) {
b.Ve.Ic(b.Rn, g);
});
k('keydown', function (g) {
b.Ve.Ic(b.mD, g);
});
k('resize', function () {
b.Ve.Ic(b.h7);
});
h.ye.addEventListener('visibilitychange', function () {
f !== h.ye.hidden && ((f = h.ye.hidden), b.Ve.Ic(b.ds));
});
});
(function () {
ob.addEventListener('error', function (k) {
b.Ve.Ic(b.g7, k);
return !0;
});
})();
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
c = a(42);
u = (function () {
function h(k, l) {
this.key = k;
this.value = l;
}
h.prototype.toString = function () {
return this.key === c.MB
? 'named: ' + this.value.toString() + ' '
: 'tagged: { key:' + this.key.toString() + ', value: ' + this.value + ' }';
};
return h;
})();
b.Metadata = u;
},
function (u, b) {
function a(c) {
var h;
h = Error.call(this, 'TimeoutError');
this.message = h.message;
'stack' in h && (this.stack = h.stack);
this.interval = c;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.RB = b.yr = void 0;
oa(a, Error);
b.yr = a;
b.RB = 'PromiseTimerSymbol';
},
function (u, b, a) {
Object.defineProperties(b, { __esModule: { value: !0 } });
u = a(2);
u.__exportStar(a(147), b);
u.__exportStar(a(819), b);
u.__exportStar(a(174), b);
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Cv = 'EmeConfigSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.ot = 'MediaKeySystemAccessServicesSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Jv = 'PboConfigSymbol';
},
function (u, b, a) {
var h, k;
function c() {
var l, d;
l = this;
this.xt = {};
this.on = function (f, g, m) {
l.addListener(f, g, m);
};
this.addListener = function (f, g, m) {
l.xt && (l.xt[f] = l.xt[f] || new k.Zea(!0)).add(g, m);
};
this.removeListener = function (f, g) {
l.xt && l.xt[f] && l.xt[f].removeAll(g);
};
this.boa = function (f) {
return l.xt && l.xt[f] ? l.xt[f].flatten() : [];
};
d = this;
this.Ic = function (f, g, m) {
var n;
if (d.xt) {
n = d.boa(f);
for (f = { PJ: 0 }; f.PJ < n.length; f = { PJ: f.PJ }, f.PJ++) {
m
? (function (p) {
return function () {
var q;
q = n[p.PJ];
(0, h.Vf)(function () {
q(g);
});
};
})(f)()
: n[f.PJ].call(this, g);
}
}
};
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.Lk = void 0;
h = a(59);
k = a(336);
c.prototype.Oh = function () {
this.xt = void 0;
};
b.Lk = c;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Ih = {
Fra: 'logblob',
oa: 'manifest',
kNb: 'licensedmanifest',
bh: 'license',
events: 'events',
bind: 'bind',
ping: 'ping',
config: 'config',
};
b.SB = {
ukb: 'reqAttempt',
vkb: 'reqName',
Jeb: 'browsername',
Oeb: 'browserversion',
gjb: 'osname',
hjb: 'osversion',
nfb: 'clienttype',
glb: 'uiversion',
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.et = { Request: 'Request', rfa: 'Singleton', W1: 'Transient' };
b.Rj = {
nBa: 'ConstantValue',
oBa: 'Constructor',
DCa: 'DynamicValue',
bda: 'Factory',
Function: 'Function',
Instance: 'Instance',
$hb: 'Invalid',
tKa: 'Provider',
};
b.my = { hBa: 'ClassProperty', pBa: 'ConstructorArgument', Gfa: 'Variable' };
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Kx = 'Base16EncoderSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Qv = 'Utf8EncoderSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.KK = 'TimingApiSymbol';
b.xR = 'MilestoneTimingApiSymbol';
},
function (u, b, a) {
var h, k, l;
function c(d, f) {
this.$v = f ? [f] : [];
this.Rga = '$op$' + l++;
this.G = d;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.ec = void 0;
h = a(14);
k = a(24);
l = 0;
c.prototype.addListener = function (d, f) {
var g;
g = this;
(0, k.sla)(d);
(0, k.wb)(0 > this.$v.indexOf(d));
d[h.o1 + this.Rga] = f;
this.$v = this.$v.slice();
this.$v.push(d);
this.$v.sort(function (m, n) {
return g.a_b(m, n);
});
};
c.prototype.removeListener = function (d) {
var f;
(0, k.sla)(d);
this.$v = this.$v.slice();
0 <= (f = this.$v.indexOf(d)) && this.$v.splice(f, 1);
};
c.prototype.set = function (d, f) {
if (this.G !== d) {
f = { oldValue: this.G, newValue: d, wm: f };
this.G = d;
d = this.$v;
for (var g = d.length, m = 0; m < g; m++) {
d[m](f);
}
}
};
c.prototype.when = function (d) {
var f;
f = this;
return new Promise(function (g) {
function m(n) {
if (d(n.newValue)) return f.removeListener(m), g(n.newValue);
}
if (d(f.G)) return g(f.G);
f.addListener(m);
});
};
c.prototype.a_b = function (d, f) {
return (d[h.o1 + this.Rga] || 0) - (f[h.o1 + this.Rga] || 0);
};
Xa.Object.defineProperties(c.prototype, {
value: {
configurable: !0,
enumerable: !0,
get: function () {
return this.G;
},
},
});
b.ec = c;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Yx = 'IdProviderSymbol';
},
function (u, b) {
Object.defineProperties(b, { __esModule: { value: !0 } });
b.tv = void 0;
u = (function () {
function a(c) {
this.bf = c;
}
a.prototype.Pwa = function (c) {
this.bf = c;
};
a.prototype.iTa = function () {
this.bf = void 0;
};
a.prototype.rV = function (c) {
return this.bf && this.bf.c$ && this.bf.c$(c);
};
a.prototype.fN = function (c) {
this.bf && this.bf.IA && this.bf.IA(c);
};
a.prototype.aD = function (c) {
this.bf && this.bf.mI && this.bf.mI(c);
};
a.prototype.bH = function (c) {
this.bf && this.bf.nI && this.bf.nI(c);
};
a.prototype.GXa = function (c) {
this.bf && this.bf.Mta && this.bf.Mta(c);
};
a.prototype.gu = function (c) {
this.bf && this.bf.Ak && this.bf.Ak(c);
};
a.prototype.h6 = function (c) {
this.bf && this.bf.IX && this.bf.IX(c);
};
a.prototype.eN = function (c, h, k) {
this.bf && this.bf.HX && this.bf.HX(c, h, k);
};
return a;
})();
b.tv = u;
u.prototype.c$ = u.prototype.rV;
u.prototype.IA = u.prototype.fN;
u.prototype.mI = u.prototype.aD;
u.prototype.nI = u.prototype.bH;
u.prototype.Ak = u.prototype.gu;
u.prototype.IX = u.prototype.h6;
u.prototype.HX = u.prototype.eN;
u.prototype.Mta = u.prototype.GXa;
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
c = a(144);
b.zo = function (h) {
c.assert('number' === typeof h);
return (
String.fromCharCode((h >>> 24) & 255) +
String.fromCharCode((h >>> 16) & 255) +
String.fromCharCode((h >>> 8) & 255) +
String.fromCharCode(h & 255)
);
};
b.oS = function (h) {
return h.charCodeAt(3) + (h.charCodeAt(2) << 8) + (h.charCodeAt(1) << 16) + (h.charCodeAt(0) << 24);
};
b.lmb = function (h, k) {
return Math.floor((1e3 * h) / k);
};
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
c = a(2);
u = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.prototype.parse = function (l) {
h.prototype.parse.call(this, l);
this.jc = this.bj([
{ offset: 16, type: 'offset' },
{ offset: 16, type: 'offset' },
{ offset: 96, type: 'offset' },
{ width: 'int16' },
{ height: 'int16' },
{ VJb: 'int32' },
{ o3b: 'int32' },
{ offset: 32, type: 'offset' },
{ KEb: 'int16' },
{ owb: { type: 'int8', Yia: 32 } },
{ depth: 'int16' },
{ offset: 16, type: 'offset' },
]);
return !0;
};
k.Sa = !0;
return k;
})(a(227).default);
b.default = u;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc1';
return k;
})(u);
b.bca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc2';
return k;
})(u);
b.cca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc3';
return k;
})(u);
b.dca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc4';
return k;
})(u);
b.eca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'hvc1';
return k;
})(u);
b.qda = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'hev1';
return k;
})(u);
b.gda = a;
u = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'av01';
return k;
})(u);
b.Rdb = u;
},
function (u) {
u.exports = function (b, a) {
for (var c in b) {
b.hasOwnProperty(c) && (a[c] = b[c]);
}
return a;
};
},
function (u, b, a) {
var h, k, l, d;
function c(f, g, m) {
var n, p, r;
g = h.__assign(
{},
null === (p = null === f || void 0 === f ? void 0 : f.context) || void 0 === p
? void 0
: p.call(f, { u5a: g, Lo: m })
);
if ((null === f || void 0 === f ? 0 : f.Lo) && m)
if (!0 === f.Lo) g.args = m;
else {
p = {};
g.args = p;
try {
for (var q = h.__values(f.Lo), v = q.next(); !v.done; v = q.next()) {
r = v.value;
p[r] = m[r];
}
} catch (w) {
var t;
t = { error: w };
} finally {
try {
v && !v.done && (n = q.return) && n.call(q);
} finally {
if (t) throw t.error;
}
}
}
return g;
}
Object.defineProperties(b, { __esModule: { value: !0 } });
b.Ov = b.cpa = b.Sb = void 0;
h = a(2);
k = a(19);
l = h.__importDefault(a(6));
d = a(9);
b.Sb = function (f) {
return function (g, m, n) {
var p;
p = n.value;
n.value = function () {
var q, v, r, t, w, x;
v = b.cpa(this);
if (v)
(r = c(f, this, arguments)),
(t =
null !== (q = null === f || void 0 === f ? void 0 : f.methodName) && void 0 !== q
? q
: String(m)),
(w = v.xT(
t,
r,
null === f || void 0 === f ? void 0 : f.Xk,
null === f || void 0 === f ? void 0 : f.jac
));
q = null === v || void 0 === v ? void 0 : v.ola;
v && (v.ola = w);
try {
x = null === p || void 0 === p ? void 0 : p.apply(this, arguments);
d.Hqa(x) &&
(x = x.then(
function (z) {
w && (null === f || void 0 === f ? 0 : f.return) && (w.data.resolve = z);
return z;
},
function (z) {
w && (w.data.reject = '' + z);
return Promise.reject(z);
}
));
return x;
} catch (z) {
var y;
y = z;
throw z;
} finally {
v && (v.ola = q);
w &&
(w.data || (w.data = {}),
y
? ((w.data.error = '' + y), null === v || void 0 === v ? void 0 : v.zwb(w))
: (null === f || void 0 === f ? 0 : f.return) && !d.Hqa(x) && (w.data.lRet = x));
}
};
};
};
b.cpa = function (f) {
if (null === f || void 0 === f ? 0 : f.Pfa) return f.Pfa;
};
u = (function () {
function f(g) {
this.zq = [];
this.O2 = !1;
this.Qga = {};
this.J = h.__assign({ zA: 10 }, g);
Object.defineProperties(g.Gq, { Pfa: { enumerable: !1, value: this, configurable: !0 } });
}
Object.defineProperties(f.prototype, {
source: {
get: function () {
return this.J.source;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
enabled: {
get: function () {
return !this.O2;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
zMb: {
get: function () {
return h.__spread(this.zq);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
SJb: {
get: function () {
return this.Qga;
},
enumerable: !1,
configurable: !0,
},
});
f.prototype.Ft = function (g) {
var m, n;
if (!this.O2) {
n = null === (m = b.cpa(this.J.Gq)) || void 0 === m ? void 0 : m.ola;
n && (n.data = h.__assign(h.__assign({}, n.data), g));
}
};
f.prototype.xT = function (g, m, n, p) {
var q, v, r, t;
if (!this.O2) {
r = !1;
t = null === (v = (q = this.J).Hia) || void 0 === v ? void 0 : v.call(q, this.J.Gq);
q = c({}, this.J.Gq);
m = h.__assign(h.__assign(h.__assign({}, t), q), m);
t = 0 < Object.keys(m).length;
m = { methodName: g, data: t ? m : void 0, time: l.default.time.ha() };
p && this.Qga[g]++;
n &&
this.zq.length &&
((n = this.zq[this.zq.length - 1]),
n.methodName === g &&
((n.data = n.data || {}),
(n.data.dedup = n.data.dedup || { hitCount: 1 }),
n.data.dedup.hitCount++,
(n.data.dedup.lJournal = m),
(r = !0)));
this.Awb(m);
r || this.zq.push(m);
this.zq.length > this.J.zA && this.zq.shift();
return m;
}
};
f.prototype.Awb = function (g) {
var m;
k.ia &&
(null === (m = this.J.console) || void 0 === m
? void 0
: m.trace(this.J.source + '::' + g.methodName, g.data));
'object' === typeof __ASE_DEVTOOLS_EXTENSION__ && __ASE_DEVTOOLS_EXTENSION__.register(this.J, g);
};
f.prototype.zwb = function (g) {
var m;
k.ia &&
(null === (m = this.J.console) || void 0 === m
? void 0
: m.error(this.J.source + '::' + g.methodName, g.data));
};
f.prototype.Kb = function () {
Object.defineProperties(this.J.Gq, { Pfa: { enumerable: !1, value: null, configurable: !0 } });
this.O2 = !0;
this.clear();
};
f.prototype.clear = function () {
this.zq = [];
this.Qga = {};
};
return f;
})();
b.Ov = u;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.$x = 'LogMessageFactorySymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Ap = { start: 'start', stop: 'stop', zW: 'keepAlive', VM: 'engage', splice: 'splice' };
b.Zca = 'EventPboCommandFactorySymbol';
b.CLa = 'StartEventPboCommandSymbol';
b.GLa = 'StopEventPboCommandSymbol';
b.iFa = 'KeepAliveEventPboCommandSymbol';
b.xLa = 'SpliceEventPboCommandSymbol';
b.cDa = 'EngageEventPboCommandSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Zx = b.ResponseType = void 0;
b.ResponseType = { Text: 1, O8b: 2, seb: 3 };
b.Zx = 'LegacyHttpSymbol';
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
c = a(151);
b.zo = function (h) {
c.assert('number' === typeof h);
return (
String.fromCharCode((h >>> 24) & 255) +
String.fromCharCode((h >>> 16) & 255) +
String.fromCharCode((h >>> 8) & 255) +
String.fromCharCode(h & 255)
);
};
b.oS = function (h) {
return h.charCodeAt(3) + (h.charCodeAt(2) << 8) + (h.charCodeAt(1) << 16) + (h.charCodeAt(0) << 24);
};
b.lmb = function (h, k) {
return Math.floor((1e3 * h) / k);
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Ji = { audio: 'audio', video: 'video', aba: 'timedtext', kya: 'trickplay' };
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Qx = 'DeviceFactorySymbol';
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
b.hj = b.ejb = b.PB = void 0;
c = a(13);
b.PB =
b.PB ||
function (h, k, l) {
return h >= k ? (h <= l ? h : l) : k;
};
b.ejb = function (h, k, l, d, f) {
return ((h - k) * (f - d)) / (l - k) + d;
};
b.hj = function (h) {
if ((0, c.Ga)(h)) return (h / 1e3).toFixed(3);
};
},
function (u, b, a) {
var h, k, l, d, f;
function c(g, m, n) {
this.context = g;
this.errorCode = m;
this.vXb = n;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.Qj = void 0;
u = a(1);
h = a(0);
k = a(522);
l = a(4);
d = a(38);
f = a(40);
c.prototype.send = function (g, m, n, p, q, v) {
var r;
r = this;
v = void 0 === v ? f.Gv.LR : v;
return this.eGb(g, m, n, v, p, q).then(function (t) {
return r.context.mBb.send(t.context, t.request);
});
};
c.prototype.eGb = function (g, m, n, p, q, v) {
var r, t;
try {
r = this.context.WWb.create(this.context.aA.pz(), m.url, n, q, p);
t = this.Wtb(m, g, p, v);
return Promise.resolve({ context: t, request: r });
} catch (w) {
return Promise.reject(w);
}
};
c.prototype.Wtb = function (g, m, n, p) {
return {
Yf: this.context.Yf,
log: m,
Cn: g.name,
url: this.context.J2b((0, k.BSa)(this.context.Mh, this.context.Vh, g.name, n)),
awa: this.vXb,
timeout: (0, l.Ch)(59),
headers: (0, k.ASa)(this.context.Vh, this.context.NG),
Oq: g.Oq,
Atb: p,
};
};
c.prototype.Vo = function (g) {
return g instanceof d.jd ? g : (0, k.Vo)(this.errorCode, g);
};
a = c;
a = u.__decorate(
[(0, h.T)(), u.__param(0, (0, h.Vm)()), u.__param(1, (0, h.Vm)()), u.__param(2, (0, h.Vm)())],
a
);
b.Qj = a;
},
function (u, b, a) {
var k, l;
function c(d, f, g, m, n) {
var p, q, r;
p = {};
q = 'number' === typeof n;
n = void 0 !== n && q ? n.toString() : g;
if (q && void 0 !== g) throw Error(k.Lhb);
Reflect.spa(d, f) && (p = Reflect.getMetadata(d, f));
g = p[n];
if (Array.isArray(g)) {
q = 0;
for (var v = g; q < v.length; q++) {
r = v[q];
if (r.key === m.key) throw Error(k.pgb + ' ' + r.key.toString());
}
} else g = [];
g.push(m);
p[n] = g;
Reflect.h5(d, p, f);
}
function h(d, f) {
return function (g, m) {
f(g, m, d);
};
}
Object.defineProperty(b, '__esModule', { value: !0 });
k = a(57);
l = a(42);
b.rJ = function (d, f, g, m) {
c(l.RLa, d, f, m, g);
};
b.FZ = function (d, f, g) {
c(l.SLa, d.constructor, f, g);
};
b.Ur = function (d, f, g) {
'number' === typeof g
? ((d = [h(g, d)]), Reflect.Ur(d, f))
: 'string' === typeof g
? Reflect.Ur([d], f, g)
: Reflect.Ur([d], f);
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.ZEa = 'Injector';
b.ay = 145152e5;
b.NR = 'ProfileSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Tkb = 'StorageValidatorSymbol';
b.DB = 'AppStorageFactorySymbol';
},
function (u, b, a) {
var h, k;
function c(l, d, f, g, m) {
l = void 0 === l ? h.S.jn : l;
return k.jd.call(this, l, d, f, void 0, void 0, g, k.jd.Ge(m), m) || this;
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.oh = void 0;
h = a(3);
k = a(38);
oa(c, k.jd);
b.oh = c;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.$ca = 'EventSourceSymbol';
b.cda = 'GlobalEventSourceSymbol';
b.k0 = 'DebugEventSourceSymbol';
b.eCa = 'DiagnosticsEventSourceSymbol';
},
function (u, b, a) {
Object.defineProperties(b, { __esModule: { value: !0 } });
u = a(2);
u.__exportStar(a(721), b);
u.__exportStar(a(722), b);
u.__exportStar(a(723), b);
u.__exportStar(a(724), b);
u.__exportStar(a(725), b);
u.__exportStar(a(726), b);
u.__exportStar(a(727), b);
u.__exportStar(a(728), b);
u.__exportStar(a(350), b);
u.__exportStar(a(351), b);
u.__exportStar(a(729), b);
u.__exportStar(a(730), b);
u.__exportStar(a(214), b);
},
function (u, b, a) {
var n;
function c(p, q) {
if (p.length == q.length && 1 < p.length) {
for (var v = p.length, r = 0, t = d(p), w = d(q), x = 0; x < v; x++) {
r += p[x] * q[x];
}
return (r - (t * w) / v) / v;
}
return !1;
}
function h(p) {
if (!Array.isArray(p) || 2 > p.length) return !1;
p = k(p);
return Math.sqrt(p);
}
function k(p) {
var q;
if (!Array.isArray(p) || 2 > p.length) return !1;
q = l(p);
return (
d(
p.map(function (v) {
return (v - q) * (v - q);
})
) /
(p.length - 1)
);
}
function l(p) {
return Array.isArray(p) && p.length ? d(p) / p.length : !1;
}
function d(p) {
return Array.isArray(p)
? p.reduce(function (q, v) {
return q + v;
}, 0)
: !1;
}
function f(p, q, v) {
return Math.max(Math.min(p, v), q);
}
function g(p, q) {
return 'number' === typeof p ? p : q;
}
function m(p) {
return 1 / (1 + Math.exp(-p));
}
n = a(10);
u.exports = {
Za: function (p, q, v) {
try {
p.emit(q, v);
} catch (r) {
p.Pk('JAVASCRIPT EXCEPTION: Caught in ASE client event listener. Exception:', r, 'Event:', v);
}
},
NC: function () {
var p, q, v;
p = Array.prototype.concat.apply([], arguments);
q = p.reduce(function (r, t) {
return r + t.byteLength;
}, 0);
v = new Uint8Array(q);
p.reduce(function (r, t) {
v.set(new Uint8Array(t), r);
return r + t.byteLength;
}, 0);
return v.buffer;
},
y4: f,
Fvb: function (p, q, v, r) {
return {
min: f(g(p.min, q), v, r),
max: f(g(p.max, q), v, r),
hz: f(p.hz || 6e4, 0, 6e5),
SSa: f(p.SSa || 0, -3e5, 3e5),
scale: f(p.scale || 6e4, 0, 3e5),
l9a: f(p.l9a || 0, -3e5, 3e5),
gamma: f(p.gamma || 1, 0.1, 10),
};
},
pg: function (p, q) {
void 0 !== p &&
n.OSb(p).forEach(function (v) {
q(v[0], v[1]);
});
},
Ama: function (p, q, v) {
return (
p.min +
(p.max - p.min) *
(1 -
Math.pow(
m((6 * (q - (p.hz + (p.SSa || 0) * (1 - v)))) / (p.scale + (p.l9a || 0) * (1 - v))),
p.gamma
))
);
},
cDb: function (p, q) {
return p.min + (p.max - p.min) * Math.pow(m((6 * (q - p.hz)) / p.scale), p.gamma);
},
Y$b: d,
tFb: l,
MIb: k,
W$b: h,
Q$b: c,
P$b: function (p, q) {
var v;
if (p.length == q.length) {
v = c(p, q);
p = h(p);
q = h(q);
if (0 < p && 0 < q) return v / (p * q);
}
return !1;
},
Cq: function (p, q, v) {
return q.DUa ? q.DUa(v) : new p.Console('ASEJS', 'media|asejs', q.prefix ? q.prefix + ' ' + v : v);
},
cYb: function (p) {
return p.length ? '{' + p + '} ' : '';
},
QXb: function (p, q, v) {
return {
min: p.min * v + (1 - v) * q.min,
max: p.max * v + (1 - v) * q.max,
hz: p.hz * v + (1 - v) * q.hz,
scale: p.scale * v + (1 - v) * q.scale,
gamma: p.gamma * v + (1 - v) * q.gamma,
};
},
tanh:
Math.tanh ||
function (p) {
var q;
q = Math.exp(+p);
p = Math.exp(-p);
return Infinity == q ? 1 : Infinity == p ? -1 : (q - p) / (q + p);
},
bxa: m,
Bq: function (p) {
var q;
q = p.Ua.jb.H.id;
return {
$: p.$,
duration: p.duration,
offset: p.offset,
da: p.da,
bitrate: p.bitrate,
profile: p.profile,
fd: p.fd,
ja: q,
Ta: p.Ta,
me: p.me,
location: p.location,
yi: p.yi,
kk: p.kk,
gx: { jb: { H: { id: q } } },
};
},
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.kF = '6674654e-696c-5078-6966-665374726d21';
b.lF = '6674654e-696c-4878-6165-6465722e7632';
b.zR = '6674654e-696c-5078-6966-66496e646578';
b.ey = '6674654e-696c-4d78-6f6f-6653697a6573';
b.dy = '6674654e-696c-5378-6565-6b506f696e74';
b.ER = 'cedb7489-e77b-514c-84f9-7148f9882554';
b.DR = '524f39a2-9b5a-144f-a244-6c427c648df4';
b.jF = '6674654e-696c-4678-7261-6d6552617465';
},
function (u, b, a) {
var c, h, k, l, d, f, g, m, n;
Object.defineProperties(b, { __esModule: { value: !0 } });
b.$m = void 0;
c = a(2);
h = a(5);
k = c.__importDefault(a(27));
l = c.__importDefault(a(123));
d = a(380);
f = a(21);
u = a(41);
g = a(173);
m = a(234);
a = a(100);
n = (function (p) {
function q(v, r) {
var t;
t = p.call(this, v, r) || this;
q.Eb(t, v, r);
return t;
}
c.__extends(q, p);
q.Eb = function (v, r, t, w) {
var x;
g.uv.Eb(v, r, t);
v.ze = t.index;
v.dL = t.$a;
v.Tv = t.tb;
v.Nqb = t.xb ? t.xb : r.xb;
v.YI = t.YI;
v.xoa = w;
v.COa = !!t.Aq;
v.APa = null !== (x = t.region) && void 0 !== x ? x : 0;
v.ZNa = !!t.gna;
v.BOa = !!t.Qw;
v.Md =
void 0 === t.i6 || void 0 === t.rna || (t.i6 === t.$a && t.rna === t.tb)
? v
: new m.FB(v, { $a: t.i6, tb: t.rna });
v.fob = t.Nsa;
v.Clb = t.oi;
v.snb = r.AJb;
v.Kp = t.Aa ? v.Z4a(t.Aa) : void 0;
v.XPa = t.kv;
v.ff = !1;
};
q.BUa = function (v) {
for (
var r = new Uint32Array(v.length),
t = new Uint32Array(v.length),
w = new Uint8Array(v.length),
x = new Uint8Array(v.length),
y = 0,
z,
A,
B = 0;
B < v.length;
++B
) {
z = v[B];
A = z.Rc;
r[B] = z.Tv - z.dL;
t[B] = A;
w[B] = z.stream.Nf;
void 0 !== z.xb && null !== z.xb && (x[B] = z.xb);
y += A;
}
return new d.qfa(r, t, w, x, v.length ? v[0].X : 1e3, y);
};
Object.defineProperties(q.prototype, {
yD: {
get: function () {
return !0;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
index: {
get: function () {
return this.ze;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
xb: {
get: function () {
return this.Nqb;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
gSa: {
get: function () {
return (8 * this.da) / this.duration;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
$a: {
get: function () {
return this.dL;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
tb: {
get: function () {
return this.Tv;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
Hj: {
get: function () {
var v, r;
return null !== (r = null === (v = this.xoa) || void 0 === v ? void 0 : v.call(this)) && void 0 !== r
? r
: 0;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
Aq: {
get: function () {
return this.COa;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
region: {
get: function () {
return this.APa;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
gna: {
get: function () {
return this.ZNa;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
Qw: {
get: function () {
return this.BOa;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
Nsa: {
get: function () {
return this.fob;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
oi: {
get: function () {
return this.Clb;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
Aa: {
get: function () {
return this.Kp;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
kv: {
get: function () {
return this.XPa;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
i6: {
get: function () {
return this.Md.$a;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
rna: {
get: function () {
return this.Md.tb;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
JEb: {
get: function () {
return this.Md.Yt;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
gN: {
get: function () {
return this.Md.wd;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
k6: {
get: function () {
return this.Md.je;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
j6: {
get: function () {
return this.Md.duration;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
sna: {
get: function () {
return this.Md.cd;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
IEb: {
get: function () {
return this.Md.Nc;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(q.prototype, {
bD: {
get: function () {
var v;
v = this.JEb;
h.assert(v);
return v / this.stream.wa.pc;
},
enumerable: !1,
configurable: !0,
},
});
q.prototype.r3a = function () {
this.COa = !0;
};
q.prototype.aZb = function (v) {
this.YI = {
Zd: v.zYa(),
get f8() {
return v.mv;
},
};
};
q.prototype.xP = function (v) {
this.XPa = v;
};
q.prototype.YYb = function (v, r, t) {
this.APa = v;
this.ZNa = r;
this.BOa = t;
};
q.prototype.Hk = function (v) {
var r, t;
void 0 === v && (v = {});
r = this.stream.wa.pc;
t = this.Kp || { start: 0, end: this.bD };
v = this.Z4a(v);
(this.Md && this.Md !== this) || (this.Md = new m.FB(this, this));
v.start > t.start && (this.dL = this.Md.$a + v.start * r);
v.end < t.end && (this.Tv = this.Md.$a + v.end * r);
this.Kp = v;
};
q.prototype.cma = function (v) {
void 0 === v && (v = 1);
this.Kp ? this.Hk({ start: this.Kp.start + v, end: this.Kp.end }) : this.Hk({ start: v });
};
q.prototype.dma = function (v) {
this.Kp ? this.Hk({ start: this.Kp.start, end: (this.Kp.end || 0) - v }) : this.Hk({ start: 0, end: -v });
};
q.prototype.bma = function () {
this.Hk({ start: 0, end: 0 });
};
q.prototype.bZb = function (v) {
this.Kp || this.Hk();
this.Kp.cxa = v;
};
q.prototype.pXa = function (v) {
var t;
if (!(v < this.$ || v >= this.Ma) && this.oi && this.oi.length) {
v = new f.P(v + 1 - this.$, 1e3).Il(this.stream.wa);
for (var r = this.oi.length - 1; 0 <= r; --r) {
t = this.oi[r];
if (t.ql <= v) return t;
}
return { ql: 0, Fd: this.sna };
}
};
q.prototype.iEb = function (v) {
var t;
if (!(v < this.$ || v >= this.Ma) && this.oi && this.oi.length) {
v = new f.P(v + 1 - this.$, 1e3).Il(this.stream.wa);
for (var r = this.oi.length - 1; 0 <= r; --r) {
t = this.oi[r];
if (t.ql <= v) return t;
}
return { ql: 0, Fd: this.sna };
}
};
q.prototype.hXa = function (v, r) {
var t, w, x;
if (!(v < this.$ || v >= this.Ma)) {
if (!r && this.snb) return { ql: 0, Fd: this.$ };
t = this.wa.pc;
w = this.wa.X;
x = Math.floor(this.Yt / t);
v = Math.min(
(r ? Math.ceil : Math.floor)((f.P.Osa(v, w) - this.$a + (r ? -1 : 1) * (w / 1e3 - 1)) / t),
x
);
t = f.P.PZ(this.$a + v * t, w);
return v === x ? void 0 : { ql: v, Fd: t };
}
};
q.prototype.Yma = function (v) {
return this.mediaType === k.default.Xa.Pb ? this.pXa(v) : this.hXa(v, !1);
};
q.prototype.Xma = function (v) {
return this.mediaType === k.default.Xa.Pb ? this.iEb(v) : this.hXa(v, !0);
};
q.prototype.K3 = function (v) {
this.Rc += v.da;
this.Tv = v.tb;
this.Kp && ((this.Md = new m.FB(this, { $a: this.i6, tb: this.Tv })), (this.Kp.end = this.bD));
};
q.prototype.toString = function () {
return (
'[' +
this.Ta +
', ' +
this.bitrate +
'kbit/s, c:' +
(this.cd + '-' + this.Nc + ',p:') +
(this.wd + '-' + this.je + ',d:' + this.duration + ']')
);
};
q.prototype.toJSON = function () {
var v;
v = g.uv.prototype.toJSON.call(this);
l.default(
{
index: this.index,
startPts: this.$,
endPts: this.Ma,
'contentStartTicks:': this.$a,
contentEndTicks: this.tb,
contentStartPts: this.cd,
contentEndPts: this.Nc,
fragmentStartPts: this.gN !== this.$ ? this.gN : void 0,
fragmentEndPts: this.k6 !== this.Ma ? this.k6 : void 0,
edit: this.Aa,
},
v
);
return v;
};
q.prototype.oXa = function (v) {
var t;
if (this.oi)
for (var r = 0; r < this.oi.length; ++r) {
if (this.oi[r].ql === v) t = this.oi[r].offset;
}
return t;
};
q.prototype.Z4a = function (v) {
var r;
r = v.start || 0;
return {
start: r,
end: void 0 === v.end ? this.bD : Math.min(this.bD, Math.max(r, 0 > v.end ? this.bD + v.end : v.end)),
cxa: v.cxa,
PZb: v.PZb,
};
};
return q;
})(g.uv);
b.$m = n;
u.xf(a.Jx, n);
u.xf(a.EB, n);
},
function (u, b, a) {
var d;
function c(f, g) {
return void 0 === f ? void 0 : 0 === f ? d.P.fb : new d.P(f, g);
}
function h(f, g) {
return f && Math.floor(d.P.PZ(f, g));
}
function k(f, g) {
return void 0 === f || void 0 === g ? void 0 : f + g;
}
function l(f, g) {
return void 0 === f || void 0 === g ? void 0 : f - g;
}
Object.defineProperties(b, { __esModule: { value: !0 } });
b.EB = b.Jx = void 0;
d = a(21);
u = (function () {
function f() {}
Object.defineProperties(f.prototype, {
Yt: {
get: function () {
return l(this.tb, this.$a) || 0;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
PTb: {
get: function () {
return k(this.$a, this.Hj);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
MTb: {
get: function () {
return k(this.tb, this.Hj);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
SG: {
get: function () {
return c(this.Yt, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Yc: {
get: function () {
return c(this.$a, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Rd: {
get: function () {
return c(this.tb, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Ng: {
get: function () {
return c(this.PTb, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
we: {
get: function () {
return c(this.MTb, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Vua: {
get: function () {
return c(this.Hj, this.X);
},
enumerable: !1,
configurable: !0,
},
});
return f;
})();
b.Jx = u;
u = (function () {
function f() {}
Object.defineProperties(f.prototype, {
duration: {
get: function () {
return l(this.Ma, this.$) || 0;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
$: {
get: function () {
return h(k(this.$a, this.Hj), this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Ma: {
get: function () {
return h(k(this.tb, this.Hj), this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Zu: {
get: function () {
return h(this.Hj, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
kk: {
get: function () {
return h(this.$a, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
cd: {
get: function () {
return h(this.$a, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Nc: {
get: function () {
return h(this.tb, this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
wd: {
get: function () {
return h(k(this.$a, this.Hj), this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
je: {
get: function () {
return h(k(this.tb, this.Hj), this.X);
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
Wr: {
get: function () {
return this.duration;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
SA: {
get: function () {
return this.$;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(f.prototype, {
kx: {
get: function () {
return this.Ma;
},
enumerable: !1,
configurable: !0,
},
});
return f;
})();
b.EB = u;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.uQ = b.Wdb = b.ica = b.jca = void 0;
(function (a) {
a[(a.RVa = 0)] = 'downloading';
a[(a.HBb = 1)] = 'downloaded';
a[(a.ff = 2)] = 'appended';
a[(a.buffered = 3)] = 'buffered';
a[(a.XO = 4)] = 'removed';
a[(a.hdc = 5)] = 'unused';
})(b.jca || (b.jca = {}));
(function (a) {
a[(a.waiting = 1)] = 'waiting';
a[(a.Jbc = 2)] = 'ondeck';
a[(a.RVa = 4)] = 'downloading';
a[(a.HBb = 8)] = 'downloaded';
a[(a.mW = 6)] = 'inprogress';
})(b.ica || (b.ica = {}));
b.Wdb = 'AseBufferViewSymbol';
b.uQ = 'AseBufferAccountingSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.Bea = b.dn = void 0;
u = b.dn || (b.dn = {});
u.pF = 'PRE_FETCH';
u.mkb = 'QC';
u.Dp = 'STANDARD';
u.J1 = 'SUPPLEMENTAL';
u.h5b = 'DOWNLOAD';
b.Bea = 'PboManifestCommandSymbol';
},
function (u, b, a) {
var c, h;
Object.defineProperty(b, '__esModule', { value: !0 });
b.r_a = b.Nbb = b.Iu = b.f9 = b.a4a = void 0;
u = a(976);
c = a(979);
h = a(1e3);
a = a(1004);
b.a4a = u;
b.f9 = function (k, l) {
return (0, b.a4a)(
function (d, f) {
return void 0 !== f ? f : d;
},
k,
l
);
};
b.Iu = c;
b.Nbb = h;
b.r_a = a;
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.kF = '6674654e-696c-5078-6966-665374726d21';
b.lF = '6674654e-696c-4878-6165-6465722e7632';
b.zR = '6674654e-696c-5078-6966-66496e646578';
b.ey = '6674654e-696c-4d78-6f6f-6653697a6573';
b.dy = '6674654e-696c-5378-6565-6b506f696e74';
b.ER = 'cedb7489-e77b-514c-84f9-7148f9882554';
b.DR = '524f39a2-9b5a-144f-a244-6c427c648df4';
b.jF = '6674654e-696c-4678-7261-6d6552617465';
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
c = a(22);
u = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.prototype.parse = function (l) {
h.prototype.parse.call(this, l);
this.jc = this.bj([
{ offset: 16, type: 'offset' },
{ offset: 16, type: 'offset' },
{ offset: 96, type: 'offset' },
{ width: 'int16' },
{ height: 'int16' },
{ VJb: 'int32' },
{ o3b: 'int32' },
{ offset: 32, type: 'offset' },
{ KEb: 'int16' },
{ owb: { type: 'int8', Yia: 32 } },
{ depth: 'int16' },
{ offset: 16, type: 'offset' },
]);
return !0;
};
k.Sa = !0;
return k;
})(a(266).default);
b.default = u;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc1';
return k;
})(u);
b.bca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc2';
return k;
})(u);
b.cca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc3';
return k;
})(u);
b.dca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'avc4';
return k;
})(u);
b.eca = a;
a = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'hvc1';
return k;
})(u);
b.qda = a;
u = (function (h) {
function k() {
return (null !== h && h.apply(this, arguments)) || this;
}
c.__extends(k, h);
k.Zb = 'hev1';
return k;
})(u);
b.gda = u;
},
function (u, b, a) {
var m, n, p, q, v, r, t, w, x, y, z, A, B, E, C;
function c(F) {
var G, D, I, J;
G = F.url.split('?');
D = G[0];
I = 'sc=' + F.VXb;
J = F.CSa ? 'random=' + (1e17 * (0, y.tR)()).toFixed(0) : '';
D = G[1] ? D + ('?' + G[1] + '&' + I) : D + ('?' + I);
D += J ? '&' + J : '';
F.uc &&
!(0, q.h8)(D) &&
(F = n.config && n.config.eka) &&
(D = F.replace('{URL}', D).replace('{EURL}', encodeURIComponent(D)));
return D;
}
function h(F) {
var G, D, I, J;
G = F.url.split('?');
D = G[0];
I = 'bb_reason=' + F.reason;
J = F.CSa ? 'random=' + (1e17 * (0, y.tR)()).toFixed(0) : '';
D = G[1] ? D + ('?' + G[1] + '&' + I) : D + ('?' + I);
D += J ? '&' + J : '';
F.uc &&
!(0, q.h8)(D) &&
(F = n.config && n.config.eka) &&
(D = F.replace('{URL}', D).replace('{EURL}', encodeURIComponent(D)));
return D;
}
function k(F, G) {
var D, I, J;
D = F.url.split('?');
I = D[0];
J = l(F);
J &&
((G.Gs = J),
(void 0 === F.Ys ? n.config.Ys : F.Ys)
? ((F.headers = F.headers || {}), (F.headers.Range = 'bytes=' + J))
: ((G.Gs = J), (I = '/' == I[I.length - 1] ? I + 'range/' : I + '/range/'), (I += J)));
J = F.CSa ? 'random=' + (1e17 * (0, y.tR)()).toFixed(0) : '';
n.config.Fz && F.Eaa && (J = 'sc=' + F.Eaa + (J ? '&' + J : ''));
I = D[1] ? I + ('?' + D[1] + (J ? '&' + J : '')) : I + (J ? '?' + J : '');
F.uc &&
!(0, q.h8)(I) &&
(F = n.config && n.config.eka) &&
(I = F.replace('{URL}', I).replace('{EURL}', encodeURIComponent(I)));
G.url = I;
}
function l(F) {
var G;
G = F.offset;
if (void 0 !== G)
return (
(0, w.yU)(G), void 0 !== F.length ? ((F = F.offset + F.length - 1), (0, w.yU)(F), G + '-' + F) : G + '-'
);
}
function d() {
return !1 !== y.re.onLine;
}
function f(F, G, D, I) {
var J, P;
J = I.U6a;
P = I.headers;
F.open(J ? 'POST' : 'GET', G, !D);
switch (I.responseType) {
case b.dW:
F.responseType = 'arraybuffer';
break;
case b.Jpa:
(0, x.OSa)(F, 'overrideMimeType', void 0, 'text/xml');
}
J &&
((G = { 'Content-Type': (0, A.Gf)(J) ? 'text/plain' : 'application/x-octet-stream' }),
(P = P ? (0, x.Dd)(G, P) : G));
P &&
(0, x.pg)(P, function (H, R) {
F.setRequestHeader(H, R);
});
I.withCredentials && (F.withCredentials = !0);
void 0 !== F.msCaching && (F.msCaching = 'disabled');
J ? F.send(J) : F.send();
}
function g(F, G) {
switch (G.type) {
case b.dW:
return F.response || new ArrayBuffer(0);
case b.Jpa:
return F.responseXML;
default:
return F.responseText;
}
}
Object.defineProperty(b, '__esModule', { value: !0 });
b.dW =
b.Jpa =
b.Ipa =
b.Kpa =
b.x7 =
b.a0a =
b.$_a =
b.v7 =
b.qlb =
b.rlb =
b.bKb =
b.w7 =
b.ZJb =
b.$Jb =
b.YJb =
b.aKb =
b.Yf =
void 0;
m = a(70);
n = a(18);
p = a(14);
q = a(43);
v = a(60);
r = a(3);
t = a(8);
w = a(24);
x = a(23);
y = a(11);
z = a(59);
A = a(13);
B = a(34);
E = { gn: 1, N8b: 2, beb: 3 };
b.Yf = (function () {
var I, J, P, H;
function F(R) {
var L;
try {
L = R.url;
(0, A.Pqa)(L)
? 0 === L.indexOf('https')
? H.ssl++
: 0 === L.indexOf('http')
? H['non-ssl']++
: H.invalid++
: H.invalid++;
} catch (K) {}
}
function G() {
J.Ic(b.a0a);
J.Ic(b.Kpa);
}
function D() {
J.Ic(b.x7);
J.Ic(b.Kpa);
}
I = (0, t.rj)('Http');
J = new m.Lk();
P = 0;
H = { ssl: 0, 'non-ssl': 0, invalid: 0 };
t.xa.get(B.di).register(r.S.KEa, function (R) {
n.config.P2b && (ob.addEventListener('online', G), ob.addEventListener('offline', D), (b.w7 = d));
R(p.hg);
});
return {
addEventListener: J.addListener,
removeEventListener: J.removeListener,
download: function (R, L) {
var Da, va, Z, ra, N, T, ma, ja, Aa, Sa, Wa;
function K() {
var Ya;
K = p.ur;
Wa && (clearTimeout(Wa), (Wa = null));
J.removeListener(b.x7, S);
Aa &&
((Aa.onloadstart = null),
(Aa.onreadystatechange = null),
(Aa.onprogress = null),
(Aa.onerror = null),
(Aa.onload = null),
(Aa = Aa.onabort = null));
ja.fa
? !1
: ja.va != r.N.IB
? Da.warn('Download failed', va, (0, r.Ux)(ja))
: Da.trace('Download aborted', va);
Ya = Z;
Z = void 0;
for (var $a = Ya.length; $a--; ) {
(function () {
var Za;
Za = Ya[$a];
(0, z.Vf)(function () {
Za(ja);
});
})();
}
J.Ic(b.$_a, ja, !0);
}
function O() {
Wa && (clearTimeout(Wa), (Wa = null));
Wa = setTimeout(X, Sa ? ma : T);
}
function M(Ya, $a, Za, gb) {
var Va, wa;
ja.fa = !1;
ja.va = Ya;
Va = (0, v.Bn)();
wa = ja.Em;
wa.Di = wa.Di || Va;
wa.np = wa.np || Va;
0 < $a && (ja.Zk = ja.qf = $a);
Za && (ja.Qb = Za);
gb && (ja.jE = gb);
(Ya !== r.N.cR && Ya !== r.N.YE && Ya !== r.N.fR) || !Aa || ((Aa.onabort = null), ea());
K();
}
function Q(Ya) {
var $a, Za;
try {
Za = Ya.getResponseHeader('X-Netflix.Retry.Server.Policy');
Za && ($a = JSON.parse(Za));
} catch (gb) {
!1;
}
return $a;
}
function S() {
(0, b.w7)() || M(r.N.cR);
}
function X() {
M(Sa ? r.N.YE : r.N.fR);
}
function ea() {
try {
Aa && Aa.abort();
} catch (Ya) {}
}
function la() {
M(r.N.IB);
}
(0, w.wb)(L);
Da = (R.j && R.j.log && (0, t.wi)(R.j, 'Http')) || I;
va = { Num: P++ };
Z = [L];
ra = {};
T = R.H4 || n.config.H4;
ma = R.$sa || n.config.$sa;
F(R);
!1;
ja = (function () {
var Ya, $a, Za;
Ya = p.ur;
$a = p.ur;
Za = p.ur;
return {
request: R,
type: R.responseType,
Em: ra,
abort: ea,
timeout: X,
pia: function (gb) {
K !== p.ur &&
((0, w.wb)(Z, 'Callback should be added before download starts.'), Z && Z.unshift(gb));
},
X9: function (gb) {
Za(gb);
},
Z9: function (gb) {
Ya(gb);
},
$n: function (gb) {
$a(gb);
},
RYb: function (gb) {
Za = gb;
},
XYb: function (gb) {
Ya = gb;
},
IYb: function (gb) {
$a = gb;
},
};
})();
(0, z.Vf)(function () {
var Ya, $a;
if ((0, A.Pqa)(R.url))
try {
if ((k(R, ja), (N = ja.url), (0, w.zU)(N), (va.Url = N), (0, b.w7)())) {
!1;
Aa = new XMLHttpRequest();
Ya = n.config.W2b && 'undefined' != typeof Aa.onloadstart;
Ya &&
(Aa.onloadstart = function () {
var Za;
Za = (0, v.Bn)();
ra.Pq = Za;
ja.X9({ mediaRequest: R, timestamp: Za });
});
Aa.onreadystatechange = function () {
if (2 == Aa.readyState) {
Sa = !0;
ra.Di = (0, v.Bn)();
Aa.onreadystatechange = null;
O();
!1;
for (
var Za = ja, gb = Aa.getAllResponseHeaders().split('\n'), Va = gb.length, wa, Ea, Na = {};
Va--;
) {
if ((wa = gb[Va]))
(Ea = wa.indexOf(': ')),
1 <= Ea && Ea < wa.length - 1 && (Na[wa.substr(0, Ea)] = wa.substr(Ea + 2));
}
Za.headers = Na;
ja.Z9({
timestamp: ra.Di,
connect: !0,
mediaRequest: R,
start: ra.Pq,
rt: [ra.Di - ra.Pq],
});
}
};
Aa.onprogress = function (Za) {
Sa = !0;
ra.Wka = Za.loaded;
O();
Za = { mediaRequest: R, bytes: Za.loaded, timestamp: (0, v.Bn)(), bytesLoaded: Za.loaded };
ja.Z9(Za);
};
Aa.onload = function () {
var Za;
if (K !== p.ur) {
(0, w.wb)(void 0 === ra.np);
ra.np = (0, v.Bn)();
ra.Di = ra.Di || ra.np;
if (200 <= Aa.status && 299 >= Aa.status) {
Za = g(Aa, ja);
ja.parsed = !1;
ja.content = Za;
ja.fa = !0;
} else Aa.status == C ? M(r.N.eR, Aa.status) : M(r.N.dR, Aa.status, Aa.response, Q(Aa));
K();
}
};
Aa.onabort = la;
Aa.onerror = function () {
var Za, gb;
Za = Aa.status;
'undefined' !== typeof n.config.EXa && (Za = n.config.EXa);
if (0 < Za) {
if (Za == C) M(r.N.eR, Za);
else {
try {
gb = Aa.responseText;
} catch (Va) {}
M(r.N.dR, Za, gb, Q(Aa));
}
} else M(r.N.gR);
};
$a = (0, v.Bn)();
f(Aa, N, !1, R);
J.Ic(b.v7, ja, !0);
Ya || ((ra.Pq = $a), ja.X9({ mediaRequest: R, timestamp: $a }));
O();
J.addListener(b.x7, S);
} else (0, z.Vf)(M.bind(void 0, r.N.cR));
} catch (Za) {
Da.error('Exception starting download', Za, va);
M(r.N.pda, void 0, (0, x.Ge)(Za));
}
else M(r.N.UDa);
});
return ja;
},
ic: H,
Gbc: function (R) {
var L;
L = new XMLHttpRequest();
R = h(R);
L.open('HEAD', R);
L.onreadystatechange = function () {
2 == L.readyState && !1;
};
L.send();
},
NZb: function (R) {
var L;
L = new XMLHttpRequest();
R = c(R);
L.open('HEAD', R);
L.onreadystatechange = function () {
2 == L.readyState && !1;
};
L.send();
},
VUb: function (R) {
var L, K, O;
L = new XMLHttpRequest();
K = R.url;
O = R.SUb;
L.open('HEAD', K);
L.timeout = Math.max(2 * O.RNb, n.config.Lua);
L.onreadystatechange = function () {
2 == L.readyState && (!1, O && O.vO({ url: K }));
};
L.ontimeout = L.onerror = function () {
!1;
O && O.hta({ url: K });
};
L.send();
},
skb: E,
};
})();
b.aKb = c;
b.YJb = h;
b.$Jb = k;
b.ZJb = l;
b.w7 = p.wKa;
b.bKb = d;
b.rlb = f;
b.qlb = g;
b.v7 = 1;
b.$_a = 2;
b.a0a = 3;
b.x7 = 4;
b.Kpa = 5;
b.Ipa = 1;
b.Jpa = 2;
b.dW = 3;
C = 420;
ob._cad_global.http = b.Yf;
},
function (u, b) {
var a;
Object.defineProperty(b, '__esModule', { value: !0 });
a = 0;
b.id = function () {
return a++;
};
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.qF = 'PlatformConfigDefaultsSymbol';
},
function (u, b, a) {
var h, k, l;
function c() {}
Object.defineProperty(b, '__esModule', { value: !0 });
b.$J = b.Ib = void 0;
h = a(136);
k = a(38);
l = a(3);
c.F6 = function (d) {
if (d) {
if (d.includes(b.$J.MA)) return h.Xl.MA;
if (d.includes('fps')) return h.Xl.ZC;
if (d.includes(b.$J.Mba)) return h.Xl.Mba;
}
throw new k.jd(l.S.Hgb, void 0, void 0, void 0, void 0, 'Invalid KeySystem: ' + d);
};
c.FYa = function (d) {
switch (d) {
case h.Xl.MA:
return b.$J.MA;
case h.Xl.ZC:
return b.$J.ZC;
default:
return b.$J.Mba;
}
};
b.Ib = c;
c.hy = 'com.microsoft.playready';
c.Vd = 'com.microsoft.playready.hardware';
c.rF = 'com.microsoft.playready.software';
c.Wgb = 'com.apple.fps.2_0';
c.YMa = 'com.widevine.alpha';
c.gkb = 'com.microsoft.playready.recommendation.3000';
c.hJa = 'com.microsoft.playready.recommendation.2000';
b.$J = { ZC: 'fairplay', Mba: 'widevine', MA: 'playready' };
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.SBa = 'DebugConfigSymbol';
b.Ox = 'DebugSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.IK = 'ThrottleFactorySymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.nK = 'LoggerSinksSymbol';
},
function (u) {
var g, m, n, p;
function b() {
b.Eb.call(this);
}
function a(q) {
if ('function' !== typeof q)
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof q);
}
function c(q, v, r, t) {
var w, x;
a(r);
w = q.Kh;
if (void 0 === w) (w = q.Kh = Object.create(null)), (q.IF = 0);
else {
void 0 !== w.Dbc && (q.emit('newListener', v, r.listener ? r.listener : r), (w = q.Kh));
x = w[v];
}
void 0 === x
? ((w[v] = r), ++q.IF)
: ('function' === typeof x ? (x = w[v] = t ? [r, x] : [x, r]) : t ? x.unshift(r) : x.push(r),
(r = void 0 === q.OS ? b.qAb : q.OS),
0 < r &&
x.length > r &&
!x.K3b &&
((x.K3b = !0),
(r = Error(
'Possible EventEmitter memory leak detected. ' +
x.length +
' ' +
String(v) +
' listeners added. Use emitter.setMaxListeners() to increase limit'
)),
(r.name = 'MaxListenersExceededWarning'),
(r.Zt = q),
(r.type = v),
(r.count = x.length),
console && console.warn && console.warn(r)));
return q;
}
function h() {
if (!this.tXa)
return (
this.target.removeListener(this.type, this.gdb),
(this.tXa = !0),
0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments)
);
}
function k(q, v, r) {
q = { tXa: !1, gdb: void 0, target: q, type: v, listener: r };
v = h.bind(q);
v.listener = r;
return (q.gdb = v);
}
function l(q) {
var v;
v = this.Kh;
if (void 0 !== v) {
q = v[q];
if ('function' === typeof q) return 1;
if (void 0 !== q) return q.length;
}
return 0;
}
function d(q, v, r) {
'function' === typeof q.on && f(q, 'error', v, r);
}
function f(q, v, r, t) {
if ('function' === typeof q.on) {
if (t.once) q.once(v, r);
else q.on(v, r);
} else if ('function' === typeof q.addEventListener)
q.addEventListener(v, function y(x) {
t.once && q.removeEventListener(v, y);
r(x);
});
else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof q);
}
g = 'object' === typeof Reflect ? Reflect : null;
m =
g && 'function' === typeof g.apply
? g.apply
: function (q, v, r) {
return Function.prototype.apply.call(q, v, r);
};
n =
Number.isNaN ||
function (q) {
return q !== q;
};
u.exports = b;
u.exports.once = function (q, v) {
return new Promise(function (r, t) {
function w(y) {
q.removeListener(v, x);
t(y);
}
function x() {
'function' === typeof q.removeListener && q.removeListener('error', w);
r([].slice.call(arguments));
}
f(q, v, x, { once: !0 });
'error' !== v && d(q, w, { once: !0 });
});
};
b.EventEmitter = b;
b.prototype.Kh = void 0;
b.prototype.IF = 0;
b.prototype.OS = void 0;
p = 10;
Object.defineProperty(b, 'defaultMaxListeners', {
enumerable: !0,
get: function () {
return p;
},
set: function (q) {
if ('number' !== typeof q || 0 > q || n(q))
throw new RangeError(
'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
q +
'.'
);
p = q;
},
});
b.Eb = function () {
if (void 0 === this.Kh || this.Kh === Object.getPrototypeOf(this).Kh)
(this.Kh = Object.create(null)), (this.IF = 0);
this.OS = this.OS || void 0;
};
b.prototype.setMaxListeners = function (q) {
if ('number' !== typeof q || 0 > q || n(q))
throw new RangeError(
'The value of "n" is out of range. It must be a non-negative number. Received ' + q + '.'
);
this.OS = q;
return this;
};
b.prototype.emit = function (q) {
var t, w;
for (var v = [], r = 1; r < arguments.length; r++) {
v.push(arguments[r]);
}
t = 'error' === q;
r = this.Kh;
if (void 0 !== r) t = t && void 0 === r.error;
else if (!t) return !1;
if (t) {
0 < v.length && (w = v[0]);
if (w instanceof Error) throw w;
v = Error('Unhandled error.' + (w ? ' (' + w.message + ')' : ''));
v.context = w;
throw v;
}
r = r[q];
if (void 0 === r) return !1;
if ('function' === typeof r) m(r, this, v);
else {
w = r.length;
t = Array(w);
for (var x = 0; x < w; ++x) {
t[x] = r[x];
}
for (r = 0; r < w; ++r) {
m(t[r], this, v);
}
}
return !0;
};
b.prototype.addListener = function (q, v) {
return c(this, q, v, !1);
};
b.prototype.on = b.prototype.addListener;
b.prototype.dY = function (q, v) {
return c(this, q, v, !0);
};
b.prototype.once = function (q, v) {
a(v);
this.on(q, k(this, q, v));
return this;
};
b.prototype.d7a = function (q, v) {
a(v);
this.dY(q, k(this, q, v));
return this;
};
b.prototype.removeListener = function (q, v) {
var r, t, w, x, y;
a(v);
t = this.Kh;
if (void 0 === t) return this;
w = t[q];
if (void 0 === w) return this;
if (w === v || w.listener === v)
0 === --this.IF
? (this.Kh = Object.create(null))
: (delete t[q], t.removeListener && this.emit('removeListener', q, w.listener || v));
else if ('function' !== typeof w) {
x = -1;
for (r = w.length - 1; 0 <= r; r--) {
if (w[r] === v || w[r].listener === v) {
y = w[r].listener;
x = r;
break;
}
}
if (0 > x) return this;
if (0 === x) w.shift();
else {
for (; x + 1 < w.length; x++) {
w[x] = w[x + 1];
}
w.pop();
}
1 === w.length && (t[q] = w[0]);
void 0 !== t.removeListener && this.emit('removeListener', q, y || v);
}
return this;
};
b.prototype.HA = b.prototype.removeListener;
b.prototype.removeAllListeners = function (q) {
var v, r, t;
v = this.Kh;
if (void 0 === v) return this;
if (void 0 === v.removeListener)
return (
0 === arguments.length
? ((this.Kh = Object.create(null)), (this.IF = 0))
: void 0 !== v[q] && (0 === --this.IF ? (this.Kh = Object.create(null)) : delete v[q]),
this
);
if (0 === arguments.length) {
r = Object.keys(v);
for (v = 0; v < r.length; ++v) {
t = r[v];
'removeListener' !== t && this.removeAllListeners(t);
}
this.removeAllListeners('removeListener');
this.Kh = Object.create(null);
this.IF = 0;
return this;
}
r = v[q];
if ('function' === typeof r) this.removeListener(q, r);
else if (void 0 !== r)
for (v = r.length - 1; 0 <= v; v--) {
this.removeListener(q, r[v]);
}
return this;
};
b.prototype.listeners = function (q) {
var v;
v = this.Kh;
if (void 0 === v) q = [];
else if (((q = v[q]), void 0 === q)) q = [];
else if ('function' === typeof q) q = [q.listener || q];
else {
v = Array(q.length);
for (var r = 0; r < v.length; ++r) {
v[r] = q[r].listener || q[r];
}
q = v;
}
return q;
};
b.listenerCount = function (q, v) {
return 'function' === typeof q.listenerCount ? q.listenerCount(v) : l.call(q, v);
};
b.prototype.listenerCount = l;
},
function (u, b, a) {
var c;
Object.defineProperty(b, '__esModule', { value: !0 });
u = a(225);
c = a(145);
b.qgb = c;
c = a(373);
b.LK = c;
c = a(377);
b.Zsb = c;
b.N1 = u.Dq.Ya.sidx;
u = a(798);
b.sr = u.sr;
u = a(233);
b.pr = u.pr;
u = a(802);
b.qr = u.qr;
b.sA = u.sA;
u = a(803);
b.kK = u.kK;
u = a(79);
b.zo = u.zo;
a = a(804);
b.Uj = a.Uj;
},
function (u, b, a) {
var c, h, k, l, d, f, g, m, n, p, q;
Object.defineProperties(b, { __esModule: { value: !0 } });
b.N_ = b.Oj = void 0;
c = a(2);
u = c.__importDefault(a(20));
h = c.__importStar(a(10));
k = u.default.hi;
l = c.__importDefault(a(6));
d = l.default.nr;
f = a(171);
g = c.__importDefault(a(143));
m = a(9);
u = a(41);
n = a(237);
p = a(173);
(function (v) {
v[(v.Rib = 0)] = 'NOTHING_APPENDED';
v[(v.ljb = 1)] = 'PARTIAL';
v[(v.Nx = 2)] = 'COMPLETE';
v[(v.Pf = 3)] = 'ERROR';
})((q = b.Oj || (b.Oj = {})));
a = (function (v) {
function r(t, w, x, y, z, A, B) {
w = v.call(this, w, x) || this;
n.SJ.Eb(w, t, y, z, A, B);
p.uv.Eb(w, t, y);
w.vlb = t.url || y.url;
w.Ofa = y.responseType;
w.ulb = y.Eaa;
void 0 === w.Ofa && (w.Ofa = d.Sc && !d.Sc.OY.RR ? 0 : 1);
w.Li = new k();
w.Li.on(w, d.Oe.CHa, w.uha);
w.Li.on(w, d.Oe.BHa, w.Tob);
w.Li.on(w, d.Oe.DHa, w.Wob);
w.Li.on(w, d.Oe.CR, w.tha);
w.Li.on(w, d.Oe.oF, w.PS);
w.OK = !1;
w.af = !1;
w.gm = !1;
w.Fo = !1;
w.yS = !1;
w.Spb = y.MI;
w.cqb = y.oP;
w.Cs = 0;
return w;
}
c.__extends(r, v);
Object.defineProperties(r.prototype, {
active: {
get: function () {
return this.af;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(r.prototype, {
pva: {
get: function () {
return this.gm;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(r.prototype, {
complete: {
get: function () {
return !this.OK && 5 === this.readyState;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(r.prototype, {
aborted: {
get: function () {
return this.OK;
},
enumerable: !1,
configurable: !0,
},
});
Object.defineProperties(r.prototype, {
zqa: {
get: function () {
return this.Fo && !this.yS;
},
enumerable: !1,
configurable: !0,
},
});
r.prototype.Eb = function (t) {
var w;
n.SJ.prototype.Eb.call(this, t);
if (!this.Do && (this.gf.uia || !this.fd) && ((t = this.Do = g.default.instance()), this.active)) {
w = l.default.time.ha();
t.cP(w, this.hE);
this.gm && (t.D8a(), (w = this.QI), this.connect && 0 < w.length && t.Uy(w[0]));
}
};
r.prototype.wu = function () {
return this.ff || 1 !== this.responseType ? 5 === this.readyState : 3 <= this.readyState;
};
r.prototype.nG = function (t, w, x, y) {
this.ff = t.appendBuffer(this.response, y || m.Bq(this));
return { status: this.ff ? q.Nx : q.Pf };
};
r.prototype.BO = function () {
(this.Fo = d.prototype.open.call(
this,
this.vlb,
{ start: this.offset, end: this.offset + this.da - 1 },
this.Ofa,
{},
void 0,
void 0,
this.ulb
)) && this.rV(this);
return this.Fo;
};
r.prototype.abort = function () {
var t, w;
if (this.aborted) return !0;
t = this.af;
w = this.Do;
w && t && w.IY(l.default.time.ha(), this.gm, this.hE);
this.OK = !0;
this.gm = this.af = !1;
d.prototype.abort.call(this);
this.eN(this, t, this.zqa);
return !0;
};
r.prototype.bd = function () {
7 !== this.readyState &&
5 !== this.readyState &&
(this.I.warn('AseMediaRequest: in-progress request should be aborted before cleanup', this.toString()),
this.abort());
this.Li && this.Li.clear();
v.prototype.bd.call(this);
};
r.prototype.uha = function () {
var t, w;
t = this.sf || this.loadTime;
f.Lx.instance().push(l.default.time.ha() - t);
if (!this.af) {
this.af = !0;
this.yu = this.track.yu();
if (!this.stream.J.t3a) {
w = this.Do;
w && w.cP(t, this.hE);
}
this.fN(this);
this.Vu = this.sf;
}
};
r.prototype.Tob = function () {
var t, w, x, y;
t = this.sf || this.bna;
w = this.connect;
x = this.QI;
f.Lx.instance().push(l.default.time.ha() - t);
this.af || (this.af = !0);
if (!this.gm) {
this.gm = !0;
y = this.Do;
this.stream.J.t3a && y && y.cP(t, this.hE);
y && y.D8a();
w && 0 < x.length && y && y.Uy(x[0]);
this.aD(this);
this.Vu = t;
}
};
r.prototype.Wob = function () {
var t, w, x;
t = this.sf;
w = this.bytesReceived - this.Cs;
f.Lx.instance().push(l.default.time.ha() - t);
this.gm || (this.gm = !0);
x = this.Do;
x &&
(void 0 === this.Vu || x.wC(w, this.Vu, t, this.hE),
(w = this.QI) &&
w.length &&
w.forEach(function (y) {
x.Sy(y);
}));
this.bH(this);
this.Vu = t;
this.Cs = this.bytesReceived;
};
r.prototype.tha = function () {
var t, w, x;
t = this.sf;
w = this.bytesReceived - this.Cs;
f.Lx.instance().push(l.default.time.ha() - t);
x = this.Do;
x &&
(0 < w && x.wC(w, this.Vu, t, this.hE),
(w = this.QI) &&
w.length &&
w.forEach(function (y) {
x.Sy(y);
}),
x.IY(t, this.gm, this.hE));
this.gm = this.af = !1;
this.yS = !0;
this.gu(this);
this.Vu = t;
this.Cs = this.bytesReceived;
this.bd();
};
r.prototype.dnb = function () {
var t, w;
t = (t = this.stream) ? t.toString() : this.url;
w = this.r4;
w && (t += ',range ' + w.start + '-' + w.end);
return t;
};
Object.defineProperties(r.prototype, {
hE: {
get: function () {
return {
requestId: this.dnb(),
nk: this.me,
type: this.mediaType,
MI: this.Spb,
da: this.da,
bytesReceived: this.bytesReceived,
oP: this.cqb,
};
},
enumerable: !1,
configurable: !0,
},
});
r.prototype.PS = function () {
var t, w, x, y;
this.I.warn('AseMediaRequest._onError:', this.toString());
t = this.sf;
w = this.status;
x = this.wh;
y = this.zj;
f.Lx.instance().push(l.default.time.ha() - t);
this.complete
? this.I.warn('Error on a done request ' + this.toString() + ', failurecode: ' + x)
: this.aborted
? this.I.warn('Error on an aborted request ' + this.toString() + ', failurecode: ' + x)
: h.Ga(x)
? ((x = this.Do) &&
this.gf &&
this.gf.Mva &&
this.loadTime &&
void 0 === w &&
x.wC(
this.Cs ? this.bytesReceived - this.Cs : this.bytesReceived,
this.Vu ? this.Vu : this.loadTime,
t,
this.hE
),
this.h6(this))
: this.I.warn('ignoring undefined request error (nativecode: ' + y + ')');
};
return r;
})(d);
b.N_ = a;
u.xf(n.SJ, a, !1);
u.xf(p.uv, a, !1);
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.gF = 'ManifestFetcherSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.CF = 'VideoPreparerSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.CK = b.uF = void 0;
u = b.uF || (b.uF = {});
u.q6b = 'ident';
u.Qda = 'main';
u.RAa = 'credits';
b.CK = 'PlaygraphHelperSymbol';
},
function (u, b) {
Object.defineProperty(b, '__esModule', { value: !0 });
b.fo = void 0;
b.fo = function (a, c) {
return [].concat.apply([], da(a)).map(function (h) {
return Object.assign({ name: h }, null !== c && void 0 !== c ? c : {});
});
};
},
function (u, b, a) {
var h;
function c() {}
Object.defineProperty(b, '__esModule', { value: !0 });
b.pe = void 0;
h = a(28);
c.HUa = function (k) {
var l;
l = {};
l[h.$e.QR] = c.WQ;
l[h.$e.w0] = c.WQ;
l[h.$e.WR] = c.fda;
l[h.$e.gK] = c.gK;
l[h.$e.yv] = k || c.yv;
l[h.$e.CB] = c.WQ;
l[h.$e.WB] = c.ZR;
l[h.$e.wl] = c.wl;
return l;
};
b.pe = c;
c.Dsa = 'video/mp4; codecs="avc1.4d0028"';
c.WQ = 'avc1.4d0028';
c.fda = 'hev1.1.6.L93.B0';
c.Mca = 'dvhe.05.01';
c.IBa = 'dvhe.05.04';
c.JBa = 'dvhe.05.05';
c.KBa = 'dvhe.05.06';
c.LBa = 'dvhe.05.07';
c.MBa = 'dvhe.05.09';
c.yv = c.Mca;
c.gK = c.fda;
c.Rba = 'mp4a.40.2';
c.oy = 'mp4a.40.42';
c.rfb = 'ec-3';
c.ZR = 'vp09.00.11.08.02';
c.wl = 'av01.0.04M.08';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment