@streamlayer/sdk-web-anonymous-auth 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2100 -3
- package/lib/es/index.js +1805 -10869
- package/lib/index.d.ts +0 -1
- package/package.json +7 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1,7 +1,2104 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("@streamlayer/sl-eslib/interactive/interactive.common_pb");
|
|
4
|
+
require("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb");
|
|
5
|
+
const sdkSettings_common_pb = require("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb");
|
|
6
|
+
require("@streamlayer/sl-eslib/sports/events/events_connect");
|
|
7
|
+
require("@streamlayer/sl-eslib/sdkSettings/client/client_connect");
|
|
8
|
+
const users_connect = require("@streamlayer/sl-eslib/users/users_connect");
|
|
9
|
+
const jose = require("jose");
|
|
10
|
+
var dist = {};
|
|
11
|
+
var buffer = {};
|
|
12
|
+
var base64Js = {};
|
|
13
|
+
base64Js.byteLength = byteLength;
|
|
14
|
+
base64Js.toByteArray = toByteArray;
|
|
15
|
+
base64Js.fromByteArray = fromByteArray;
|
|
16
|
+
var lookup = [];
|
|
17
|
+
var revLookup = [];
|
|
18
|
+
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
19
|
+
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
20
|
+
for (var i = 0, len = code.length; i < len; ++i) {
|
|
21
|
+
lookup[i] = code[i];
|
|
22
|
+
revLookup[code.charCodeAt(i)] = i;
|
|
23
|
+
}
|
|
24
|
+
revLookup["-".charCodeAt(0)] = 62;
|
|
25
|
+
revLookup["_".charCodeAt(0)] = 63;
|
|
26
|
+
function getLens(b64) {
|
|
27
|
+
var len = b64.length;
|
|
28
|
+
if (len % 4 > 0) {
|
|
29
|
+
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
30
|
+
}
|
|
31
|
+
var validLen = b64.indexOf("=");
|
|
32
|
+
if (validLen === -1)
|
|
33
|
+
validLen = len;
|
|
34
|
+
var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
|
|
35
|
+
return [validLen, placeHoldersLen];
|
|
36
|
+
}
|
|
37
|
+
function byteLength(b64) {
|
|
38
|
+
var lens = getLens(b64);
|
|
39
|
+
var validLen = lens[0];
|
|
40
|
+
var placeHoldersLen = lens[1];
|
|
41
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
42
|
+
}
|
|
43
|
+
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
44
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
45
|
+
}
|
|
46
|
+
function toByteArray(b64) {
|
|
47
|
+
var tmp;
|
|
48
|
+
var lens = getLens(b64);
|
|
49
|
+
var validLen = lens[0];
|
|
50
|
+
var placeHoldersLen = lens[1];
|
|
51
|
+
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
52
|
+
var curByte = 0;
|
|
53
|
+
var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
54
|
+
var i;
|
|
55
|
+
for (i = 0; i < len; i += 4) {
|
|
56
|
+
tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
|
|
57
|
+
arr[curByte++] = tmp >> 16 & 255;
|
|
58
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
59
|
+
arr[curByte++] = tmp & 255;
|
|
60
|
+
}
|
|
61
|
+
if (placeHoldersLen === 2) {
|
|
62
|
+
tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
|
|
63
|
+
arr[curByte++] = tmp & 255;
|
|
64
|
+
}
|
|
65
|
+
if (placeHoldersLen === 1) {
|
|
66
|
+
tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
|
|
67
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
68
|
+
arr[curByte++] = tmp & 255;
|
|
69
|
+
}
|
|
70
|
+
return arr;
|
|
71
|
+
}
|
|
72
|
+
function tripletToBase64(num) {
|
|
73
|
+
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
74
|
+
}
|
|
75
|
+
function encodeChunk(uint8, start, end) {
|
|
76
|
+
var tmp;
|
|
77
|
+
var output = [];
|
|
78
|
+
for (var i = start; i < end; i += 3) {
|
|
79
|
+
tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
|
|
80
|
+
output.push(tripletToBase64(tmp));
|
|
81
|
+
}
|
|
82
|
+
return output.join("");
|
|
83
|
+
}
|
|
84
|
+
function fromByteArray(uint8) {
|
|
85
|
+
var tmp;
|
|
86
|
+
var len = uint8.length;
|
|
87
|
+
var extraBytes = len % 3;
|
|
88
|
+
var parts = [];
|
|
89
|
+
var maxChunkLength = 16383;
|
|
90
|
+
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
|
91
|
+
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
|
|
92
|
+
}
|
|
93
|
+
if (extraBytes === 1) {
|
|
94
|
+
tmp = uint8[len - 1];
|
|
95
|
+
parts.push(
|
|
96
|
+
lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
|
|
97
|
+
);
|
|
98
|
+
} else if (extraBytes === 2) {
|
|
99
|
+
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
|
|
100
|
+
parts.push(
|
|
101
|
+
lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
return parts.join("");
|
|
105
|
+
}
|
|
106
|
+
var ieee754 = {};
|
|
107
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
108
|
+
ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
|
|
109
|
+
var e, m;
|
|
110
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
111
|
+
var eMax = (1 << eLen) - 1;
|
|
112
|
+
var eBias = eMax >> 1;
|
|
113
|
+
var nBits = -7;
|
|
114
|
+
var i = isLE ? nBytes - 1 : 0;
|
|
115
|
+
var d = isLE ? -1 : 1;
|
|
116
|
+
var s = buffer2[offset + i];
|
|
117
|
+
i += d;
|
|
118
|
+
e = s & (1 << -nBits) - 1;
|
|
119
|
+
s >>= -nBits;
|
|
120
|
+
nBits += eLen;
|
|
121
|
+
for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
122
|
+
}
|
|
123
|
+
m = e & (1 << -nBits) - 1;
|
|
124
|
+
e >>= -nBits;
|
|
125
|
+
nBits += mLen;
|
|
126
|
+
for (; nBits > 0; m = m * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
127
|
+
}
|
|
128
|
+
if (e === 0) {
|
|
129
|
+
e = 1 - eBias;
|
|
130
|
+
} else if (e === eMax) {
|
|
131
|
+
return m ? NaN : (s ? -1 : 1) * Infinity;
|
|
132
|
+
} else {
|
|
133
|
+
m = m + Math.pow(2, mLen);
|
|
134
|
+
e = e - eBias;
|
|
135
|
+
}
|
|
136
|
+
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
|
137
|
+
};
|
|
138
|
+
ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
139
|
+
var e, m, c;
|
|
140
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
141
|
+
var eMax = (1 << eLen) - 1;
|
|
142
|
+
var eBias = eMax >> 1;
|
|
143
|
+
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
144
|
+
var i = isLE ? 0 : nBytes - 1;
|
|
145
|
+
var d = isLE ? 1 : -1;
|
|
146
|
+
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
147
|
+
value = Math.abs(value);
|
|
148
|
+
if (isNaN(value) || value === Infinity) {
|
|
149
|
+
m = isNaN(value) ? 1 : 0;
|
|
150
|
+
e = eMax;
|
|
151
|
+
} else {
|
|
152
|
+
e = Math.floor(Math.log(value) / Math.LN2);
|
|
153
|
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
154
|
+
e--;
|
|
155
|
+
c *= 2;
|
|
156
|
+
}
|
|
157
|
+
if (e + eBias >= 1) {
|
|
158
|
+
value += rt / c;
|
|
159
|
+
} else {
|
|
160
|
+
value += rt * Math.pow(2, 1 - eBias);
|
|
161
|
+
}
|
|
162
|
+
if (value * c >= 2) {
|
|
163
|
+
e++;
|
|
164
|
+
c /= 2;
|
|
165
|
+
}
|
|
166
|
+
if (e + eBias >= eMax) {
|
|
167
|
+
m = 0;
|
|
168
|
+
e = eMax;
|
|
169
|
+
} else if (e + eBias >= 1) {
|
|
170
|
+
m = (value * c - 1) * Math.pow(2, mLen);
|
|
171
|
+
e = e + eBias;
|
|
172
|
+
} else {
|
|
173
|
+
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
174
|
+
e = 0;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
for (; mLen >= 8; buffer2[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
|
|
178
|
+
}
|
|
179
|
+
e = e << mLen | m;
|
|
180
|
+
eLen += mLen;
|
|
181
|
+
for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
182
|
+
}
|
|
183
|
+
buffer2[offset + i - d] |= s * 128;
|
|
184
|
+
};
|
|
185
|
+
/*!
|
|
2
186
|
* The buffer module from node.js, for the browser.
|
|
3
187
|
*
|
|
4
188
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
189
|
* @license MIT
|
|
6
|
-
*/(function(t){const s=Be,o=an,m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=Ge,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,l.TYPED_ARRAY_SUPPORT=d(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function d(){try{const r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function u(r){if(r>i)throw new RangeError('The value "'+r+'" is invalid for option "size"');const e=new Uint8Array(r);return Object.setPrototypeOf(e,l.prototype),e}function l(r,e,a){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(r)}return k(r,e,a)}l.poolSize=8192;function k(r,e,a){if(typeof r=="string")return E(r,e);if(ArrayBuffer.isView(r))return N(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(V(r,ArrayBuffer)||r&&V(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(r,SharedArrayBuffer)||r&&V(r.buffer,SharedArrayBuffer)))return D(r,e,a);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const c=r.valueOf&&r.valueOf();if(c!=null&&c!==r)return l.from(c,e,a);const T=v(r);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return l.from(r[Symbol.toPrimitive]("string"),e,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}l.from=function(r,e,a){return k(r,e,a)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function g(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function S(r,e,a){return g(r),r<=0?u(r):e!==void 0?typeof a=="string"?u(r).fill(e,a):u(r).fill(e):u(r)}l.alloc=function(r,e,a){return S(r,e,a)};function _(r){return g(r),u(r<0?0:x(r)|0)}l.allocUnsafe=function(r){return _(r)},l.allocUnsafeSlow=function(r){return _(r)};function E(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const a=yn(r,e)|0;let c=u(a);const T=c.write(r,e);return T!==a&&(c=c.slice(0,T)),c}function h(r){const e=r.length<0?0:x(r.length)|0,a=u(e);for(let c=0;c<e;c+=1)a[c]=r[c]&255;return a}function N(r){if(V(r,Uint8Array)){const e=new Uint8Array(r);return D(e.buffer,e.byteOffset,e.byteLength)}return h(r)}function D(r,e,a){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(a||0))throw new RangeError('"length" is outside of buffer bounds');let c;return e===void 0&&a===void 0?c=new Uint8Array(r):a===void 0?c=new Uint8Array(r,e):c=new Uint8Array(r,e,a),Object.setPrototypeOf(c,l.prototype),c}function v(r){if(l.isBuffer(r)){const e=x(r.length)|0,a=u(e);return a.length===0||r.copy(a,0,0,e),a}if(r.length!==void 0)return typeof r.length!="number"||Ve(r.length)?u(0):h(r);if(r.type==="Buffer"&&Array.isArray(r.data))return h(r.data)}function x(r){if(r>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return r|0}function Ge(r){return+r!=r&&(r=0),l.alloc(+r)}l.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==l.prototype},l.compare=function(e,a){if(V(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),V(a,Uint8Array)&&(a=l.from(a,a.offset,a.byteLength)),!l.isBuffer(e)||!l.isBuffer(a))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===a)return 0;let c=e.length,T=a.length;for(let p=0,y=Math.min(c,T);p<y;++p)if(e[p]!==a[p]){c=e[p],T=a[p];break}return c<T?-1:T<c?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,a){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return l.alloc(0);let c;if(a===void 0)for(a=0,c=0;c<e.length;++c)a+=e[c].length;const T=l.allocUnsafe(a);let p=0;for(c=0;c<e.length;++c){let y=e[c];if(V(y,Uint8Array))p+y.length>T.length?(l.isBuffer(y)||(y=l.from(y)),y.copy(T,p)):Uint8Array.prototype.set.call(T,y,p);else if(l.isBuffer(y))y.copy(T,p);else throw new TypeError('"list" argument must be an Array of Buffers');p+=y.length}return T};function yn(r,e){if(l.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||V(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const a=r.length,c=arguments.length>2&&arguments[2]===!0;if(!c&&a===0)return 0;let T=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return Ce(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a*2;case"hex":return a>>>1;case"base64":return Mn(r).length;default:if(T)return c?-1:Ce(r).length;e=(""+e).toLowerCase(),T=!0}}l.byteLength=yn;function qa(r,e,a){let c=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((a===void 0||a>this.length)&&(a=this.length),a<=0)||(a>>>=0,e>>>=0,a<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Za(this,e,a);case"utf8":case"utf-8":return Sn(this,e,a);case"ascii":return ja(this,e,a);case"latin1":case"binary":return Xa(this,e,a);case"base64":return za(this,e,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return es(this,e,a);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),c=!0}}l.prototype._isBuffer=!0;function Z(r,e,a){const c=r[e];r[e]=r[a],r[a]=c}l.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let a=0;a<e;a+=2)Z(this,a,a+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let a=0;a<e;a+=4)Z(this,a,a+3),Z(this,a+1,a+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let a=0;a<e;a+=8)Z(this,a,a+7),Z(this,a+1,a+6),Z(this,a+2,a+5),Z(this,a+3,a+4);return this},l.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?Sn(this,0,e):qa.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:l.compare(this,e)===0},l.prototype.inspect=function(){let e="";const a=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,a).replace(/(.{2})/g,"$1 ").trim(),this.length>a&&(e+=" ... "),"<Buffer "+e+">"},m&&(l.prototype[m]=l.prototype.inspect),l.prototype.compare=function(e,a,c,T,p){if(V(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(a===void 0&&(a=0),c===void 0&&(c=e?e.length:0),T===void 0&&(T=0),p===void 0&&(p=this.length),a<0||c>e.length||T<0||p>this.length)throw new RangeError("out of range index");if(T>=p&&a>=c)return 0;if(T>=p)return-1;if(a>=c)return 1;if(a>>>=0,c>>>=0,T>>>=0,p>>>=0,this===e)return 0;let y=p-T,R=c-a;const M=Math.min(y,R),A=this.slice(T,p),O=e.slice(a,c);for(let I=0;I<M;++I)if(A[I]!==O[I]){y=A[I],R=O[I];break}return y<R?-1:R<y?1:0};function gn(r,e,a,c,T){if(r.length===0)return-1;if(typeof a=="string"?(c=a,a=0):a>2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),a=+a,Ve(a)&&(a=T?0:r.length-1),a<0&&(a=r.length+a),a>=r.length){if(T)return-1;a=r.length-1}else if(a<0)if(T)a=0;else return-1;if(typeof e=="string"&&(e=l.from(e,c)),l.isBuffer(e))return e.length===0?-1:fn(r,e,a,c,T);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(r,e,a):Uint8Array.prototype.lastIndexOf.call(r,e,a):fn(r,[e],a,c,T);throw new TypeError("val must be string, number or Buffer")}function fn(r,e,a,c,T){let p=1,y=r.length,R=e.length;if(c!==void 0&&(c=String(c).toLowerCase(),c==="ucs2"||c==="ucs-2"||c==="utf16le"||c==="utf-16le")){if(r.length<2||e.length<2)return-1;p=2,y/=2,R/=2,a/=2}function M(O,I){return p===1?O[I]:O.readUInt16BE(I*p)}let A;if(T){let O=-1;for(A=a;A<y;A++)if(M(r,A)===M(e,O===-1?0:A-O)){if(O===-1&&(O=A),A-O+1===R)return O*p}else O!==-1&&(A-=A-O),O=-1}else for(a+R>y&&(a=y-R),A=a;A>=0;A--){let O=!0;for(let I=0;I<R;I++)if(M(r,A+I)!==M(e,I)){O=!1;break}if(O)return A}return-1}l.prototype.includes=function(e,a,c){return this.indexOf(e,a,c)!==-1},l.prototype.indexOf=function(e,a,c){return gn(this,e,a,c,!0)},l.prototype.lastIndexOf=function(e,a,c){return gn(this,e,a,c,!1)};function Ya(r,e,a,c){a=Number(a)||0;const T=r.length-a;c?(c=Number(c),c>T&&(c=T)):c=T;const p=e.length;c>p/2&&(c=p/2);let y;for(y=0;y<c;++y){const R=parseInt(e.substr(y*2,2),16);if(Ve(R))return y;r[a+y]=R}return y}function Ha(r,e,a,c){return he(Ce(e,r.length-a),r,a,c)}function Ka(r,e,a,c){return he(ts(e),r,a,c)}function $a(r,e,a,c){return he(Mn(e),r,a,c)}function Wa(r,e,a,c){return he(rs(e,r.length-a),r,a,c)}l.prototype.write=function(e,a,c,T){if(a===void 0)T="utf8",c=this.length,a=0;else if(c===void 0&&typeof a=="string")T=a,c=this.length,a=0;else if(isFinite(a))a=a>>>0,isFinite(c)?(c=c>>>0,T===void 0&&(T="utf8")):(T=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const p=this.length-a;if((c===void 0||c>p)&&(c=p),e.length>0&&(c<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");let y=!1;for(;;)switch(T){case"hex":return Ya(this,e,a,c);case"utf8":case"utf-8":return Ha(this,e,a,c);case"ascii":case"latin1":case"binary":return Ka(this,e,a,c);case"base64":return $a(this,e,a,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wa(this,e,a,c);default:if(y)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),y=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function za(r,e,a){return e===0&&a===r.length?s.fromByteArray(r):s.fromByteArray(r.slice(e,a))}function Sn(r,e,a){a=Math.min(r.length,a);const c=[];let T=e;for(;T<a;){const p=r[T];let y=null,R=p>239?4:p>223?3:p>191?2:1;if(T+R<=a){let M,A,O,I;switch(R){case 1:p<128&&(y=p);break;case 2:M=r[T+1],(M&192)===128&&(I=(p&31)<<6|M&63,I>127&&(y=I));break;case 3:M=r[T+1],A=r[T+2],(M&192)===128&&(A&192)===128&&(I=(p&15)<<12|(M&63)<<6|A&63,I>2047&&(I<55296||I>57343)&&(y=I));break;case 4:M=r[T+1],A=r[T+2],O=r[T+3],(M&192)===128&&(A&192)===128&&(O&192)===128&&(I=(p&15)<<18|(M&63)<<12|(A&63)<<6|O&63,I>65535&&I<1114112&&(y=I))}}y===null?(y=65533,R=1):y>65535&&(y-=65536,c.push(y>>>10&1023|55296),y=56320|y&1023),c.push(y),T+=R}return Ja(c)}const _n=4096;function Ja(r){const e=r.length;if(e<=_n)return String.fromCharCode.apply(String,r);let a="",c=0;for(;c<e;)a+=String.fromCharCode.apply(String,r.slice(c,c+=_n));return a}function ja(r,e,a){let c="";a=Math.min(r.length,a);for(let T=e;T<a;++T)c+=String.fromCharCode(r[T]&127);return c}function Xa(r,e,a){let c="";a=Math.min(r.length,a);for(let T=e;T<a;++T)c+=String.fromCharCode(r[T]);return c}function Za(r,e,a){const c=r.length;(!e||e<0)&&(e=0),(!a||a<0||a>c)&&(a=c);let T="";for(let p=e;p<a;++p)T+=os[r[p]];return T}function es(r,e,a){const c=r.slice(e,a);let T="";for(let p=0;p<c.length-1;p+=2)T+=String.fromCharCode(c[p]+c[p+1]*256);return T}l.prototype.slice=function(e,a){const c=this.length;e=~~e,a=a===void 0?c:~~a,e<0?(e+=c,e<0&&(e=0)):e>c&&(e=c),a<0?(a+=c,a<0&&(a=0)):a>c&&(a=c),a<e&&(a=e);const T=this.subarray(e,a);return Object.setPrototypeOf(T,l.prototype),T};function L(r,e,a){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>a)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(e,a,c){e=e>>>0,a=a>>>0,c||L(e,a,this.length);let T=this[e],p=1,y=0;for(;++y<a&&(p*=256);)T+=this[e+y]*p;return T},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,a,c){e=e>>>0,a=a>>>0,c||L(e,a,this.length);let T=this[e+--a],p=1;for(;a>0&&(p*=256);)T+=this[e+--a]*p;return T},l.prototype.readUint8=l.prototype.readUInt8=function(e,a){return e=e>>>0,a||L(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,a){return e=e>>>0,a||L(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,a){return e=e>>>0,a||L(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,a){return e=e>>>0,a||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,a){return e=e>>>0,a||L(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=W(function(e){e=e>>>0,oe(e,"offset");const a=this[e],c=this[e+7];(a===void 0||c===void 0)&&ue(e,this.length-8);const T=a+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,p=this[++e]+this[++e]*2**8+this[++e]*2**16+c*2**24;return BigInt(T)+(BigInt(p)<<BigInt(32))}),l.prototype.readBigUInt64BE=W(function(e){e=e>>>0,oe(e,"offset");const a=this[e],c=this[e+7];(a===void 0||c===void 0)&&ue(e,this.length-8);const T=a*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],p=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+c;return(BigInt(T)<<BigInt(32))+BigInt(p)}),l.prototype.readIntLE=function(e,a,c){e=e>>>0,a=a>>>0,c||L(e,a,this.length);let T=this[e],p=1,y=0;for(;++y<a&&(p*=256);)T+=this[e+y]*p;return p*=128,T>=p&&(T-=Math.pow(2,8*a)),T},l.prototype.readIntBE=function(e,a,c){e=e>>>0,a=a>>>0,c||L(e,a,this.length);let T=a,p=1,y=this[e+--T];for(;T>0&&(p*=256);)y+=this[e+--T]*p;return p*=128,y>=p&&(y-=Math.pow(2,8*a)),y},l.prototype.readInt8=function(e,a){return e=e>>>0,a||L(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},l.prototype.readInt16LE=function(e,a){e=e>>>0,a||L(e,2,this.length);const c=this[e]|this[e+1]<<8;return c&32768?c|4294901760:c},l.prototype.readInt16BE=function(e,a){e=e>>>0,a||L(e,2,this.length);const c=this[e+1]|this[e]<<8;return c&32768?c|4294901760:c},l.prototype.readInt32LE=function(e,a){return e=e>>>0,a||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,a){return e=e>>>0,a||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=W(function(e){e=e>>>0,oe(e,"offset");const a=this[e],c=this[e+7];(a===void 0||c===void 0)&&ue(e,this.length-8);const T=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(c<<24);return(BigInt(T)<<BigInt(32))+BigInt(a+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),l.prototype.readBigInt64BE=W(function(e){e=e>>>0,oe(e,"offset");const a=this[e],c=this[e+7];(a===void 0||c===void 0)&&ue(e,this.length-8);const T=(a<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(T)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+c)}),l.prototype.readFloatLE=function(e,a){return e=e>>>0,a||L(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,a){return e=e>>>0,a||L(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,a){return e=e>>>0,a||L(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,a){return e=e>>>0,a||L(e,8,this.length),o.read(this,e,!1,52,8)};function F(r,e,a,c,T,p){if(!l.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>T||e<p)throw new RangeError('"value" argument is out of bounds');if(a+c>r.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,a,c,T){if(e=+e,a=a>>>0,c=c>>>0,!T){const R=Math.pow(2,8*c)-1;F(this,e,a,c,R,0)}let p=1,y=0;for(this[a]=e&255;++y<c&&(p*=256);)this[a+y]=e/p&255;return a+c},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,a,c,T){if(e=+e,a=a>>>0,c=c>>>0,!T){const R=Math.pow(2,8*c)-1;F(this,e,a,c,R,0)}let p=c-1,y=1;for(this[a+p]=e&255;--p>=0&&(y*=256);)this[a+p]=e/y&255;return a+c},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,1,255,0),this[a]=e&255,a+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,2,65535,0),this[a]=e&255,this[a+1]=e>>>8,a+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,2,65535,0),this[a]=e>>>8,this[a+1]=e&255,a+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,4,4294967295,0),this[a+3]=e>>>24,this[a+2]=e>>>16,this[a+1]=e>>>8,this[a]=e&255,a+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,4,4294967295,0),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=e&255,a+4};function En(r,e,a,c,T){An(e,c,T,r,a,7);let p=Number(e&BigInt(4294967295));r[a++]=p,p=p>>8,r[a++]=p,p=p>>8,r[a++]=p,p=p>>8,r[a++]=p;let y=Number(e>>BigInt(32)&BigInt(4294967295));return r[a++]=y,y=y>>8,r[a++]=y,y=y>>8,r[a++]=y,y=y>>8,r[a++]=y,a}function hn(r,e,a,c,T){An(e,c,T,r,a,7);let p=Number(e&BigInt(4294967295));r[a+7]=p,p=p>>8,r[a+6]=p,p=p>>8,r[a+5]=p,p=p>>8,r[a+4]=p;let y=Number(e>>BigInt(32)&BigInt(4294967295));return r[a+3]=y,y=y>>8,r[a+2]=y,y=y>>8,r[a+1]=y,y=y>>8,r[a]=y,a+8}l.prototype.writeBigUInt64LE=W(function(e,a=0){return En(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=W(function(e,a=0){return hn(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(e,a,c,T){if(e=+e,a=a>>>0,!T){const M=Math.pow(2,8*c-1);F(this,e,a,c,M-1,-M)}let p=0,y=1,R=0;for(this[a]=e&255;++p<c&&(y*=256);)e<0&&R===0&&this[a+p-1]!==0&&(R=1),this[a+p]=(e/y>>0)-R&255;return a+c},l.prototype.writeIntBE=function(e,a,c,T){if(e=+e,a=a>>>0,!T){const M=Math.pow(2,8*c-1);F(this,e,a,c,M-1,-M)}let p=c-1,y=1,R=0;for(this[a+p]=e&255;--p>=0&&(y*=256);)e<0&&R===0&&this[a+p+1]!==0&&(R=1),this[a+p]=(e/y>>0)-R&255;return a+c},l.prototype.writeInt8=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,1,127,-128),e<0&&(e=255+e+1),this[a]=e&255,a+1},l.prototype.writeInt16LE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,2,32767,-32768),this[a]=e&255,this[a+1]=e>>>8,a+2},l.prototype.writeInt16BE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,2,32767,-32768),this[a]=e>>>8,this[a+1]=e&255,a+2},l.prototype.writeInt32LE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,4,2147483647,-2147483648),this[a]=e&255,this[a+1]=e>>>8,this[a+2]=e>>>16,this[a+3]=e>>>24,a+4},l.prototype.writeInt32BE=function(e,a,c){return e=+e,a=a>>>0,c||F(this,e,a,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=e&255,a+4},l.prototype.writeBigInt64LE=W(function(e,a=0){return En(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=W(function(e,a=0){return hn(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rn(r,e,a,c,T,p){if(a+c>r.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function Nn(r,e,a,c,T){return e=+e,a=a>>>0,T||Rn(r,e,a,4),o.write(r,e,a,c,23,4),a+4}l.prototype.writeFloatLE=function(e,a,c){return Nn(this,e,a,!0,c)},l.prototype.writeFloatBE=function(e,a,c){return Nn(this,e,a,!1,c)};function bn(r,e,a,c,T){return e=+e,a=a>>>0,T||Rn(r,e,a,8),o.write(r,e,a,c,52,8),a+8}l.prototype.writeDoubleLE=function(e,a,c){return bn(this,e,a,!0,c)},l.prototype.writeDoubleBE=function(e,a,c){return bn(this,e,a,!1,c)},l.prototype.copy=function(e,a,c,T){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(c||(c=0),!T&&T!==0&&(T=this.length),a>=e.length&&(a=e.length),a||(a=0),T>0&&T<c&&(T=c),T===c||e.length===0||this.length===0)return 0;if(a<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),e.length-a<T-c&&(T=e.length-a+c);const p=T-c;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(a,c,T):Uint8Array.prototype.set.call(e,this.subarray(c,T),a),p},l.prototype.fill=function(e,a,c,T){if(typeof e=="string"){if(typeof a=="string"?(T=a,a=0,c=this.length):typeof c=="string"&&(T=c,c=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!l.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(e.length===1){const y=e.charCodeAt(0);(T==="utf8"&&y<128||T==="latin1")&&(e=y)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(a<0||this.length<a||this.length<c)throw new RangeError("Out of range index");if(c<=a)return this;a=a>>>0,c=c===void 0?this.length:c>>>0,e||(e=0);let p;if(typeof e=="number")for(p=a;p<c;++p)this[p]=e;else{const y=l.isBuffer(e)?e:l.from(e,T),R=y.length;if(R===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(p=0;p<c-a;++p)this[p+a]=y[p%R]}return this};const re={};function xe(r,e,a){re[r]=class extends a{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}xe("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),xe("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),xe("ERR_OUT_OF_RANGE",function(r,e,a){let c=`The value of "${r}" is out of range.`,T=a;return Number.isInteger(a)&&Math.abs(a)>2**32?T=In(String(a)):typeof a=="bigint"&&(T=String(a),(a>BigInt(2)**BigInt(32)||a<-(BigInt(2)**BigInt(32)))&&(T=In(T)),T+="n"),c+=` It must be ${e}. Received ${T}`,c},RangeError);function In(r){let e="",a=r.length;const c=r[0]==="-"?1:0;for(;a>=c+4;a-=3)e=`_${r.slice(a-3,a)}${e}`;return`${r.slice(0,a)}${e}`}function ns(r,e,a){oe(e,"offset"),(r[e]===void 0||r[e+a]===void 0)&&ue(e,r.length-(a+1))}function An(r,e,a,c,T,p){if(r>a||r<e){const y=typeof e=="bigint"?"n":"";let R;throw p>3?e===0||e===BigInt(0)?R=`>= 0${y} and < 2${y} ** ${(p+1)*8}${y}`:R=`>= -(2${y} ** ${(p+1)*8-1}${y}) and < 2 ** ${(p+1)*8-1}${y}`:R=`>= ${e}${y} and <= ${a}${y}`,new re.ERR_OUT_OF_RANGE("value",R,r)}ns(c,T,p)}function oe(r,e){if(typeof r!="number")throw new re.ERR_INVALID_ARG_TYPE(e,"number",r)}function ue(r,e,a){throw Math.floor(r)!==r?(oe(r,a),new re.ERR_OUT_OF_RANGE(a||"offset","an integer",r)):e<0?new re.ERR_BUFFER_OUT_OF_BOUNDS:new re.ERR_OUT_OF_RANGE(a||"offset",`>= ${a?1:0} and <= ${e}`,r)}const as=/[^+/0-9A-Za-z-_]/g;function ss(r){if(r=r.split("=")[0],r=r.trim().replace(as,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Ce(r,e){e=e||1/0;let a;const c=r.length;let T=null;const p=[];for(let y=0;y<c;++y){if(a=r.charCodeAt(y),a>55295&&a<57344){if(!T){if(a>56319){(e-=3)>-1&&p.push(239,191,189);continue}else if(y+1===c){(e-=3)>-1&&p.push(239,191,189);continue}T=a;continue}if(a<56320){(e-=3)>-1&&p.push(239,191,189),T=a;continue}a=(T-55296<<10|a-56320)+65536}else T&&(e-=3)>-1&&p.push(239,191,189);if(T=null,a<128){if((e-=1)<0)break;p.push(a)}else if(a<2048){if((e-=2)<0)break;p.push(a>>6|192,a&63|128)}else if(a<65536){if((e-=3)<0)break;p.push(a>>12|224,a>>6&63|128,a&63|128)}else if(a<1114112){if((e-=4)<0)break;p.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else throw new Error("Invalid code point")}return p}function ts(r){const e=[];for(let a=0;a<r.length;++a)e.push(r.charCodeAt(a)&255);return e}function rs(r,e){let a,c,T;const p=[];for(let y=0;y<r.length&&!((e-=2)<0);++y)a=r.charCodeAt(y),c=a>>8,T=a%256,p.push(T),p.push(c);return p}function Mn(r){return s.toByteArray(ss(r))}function he(r,e,a,c){let T;for(T=0;T<c&&!(T+a>=e.length||T>=r.length);++T)e[T+a]=r[T];return T}function V(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function Ve(r){return r!==r}const os=function(){const r="0123456789abcdef",e=new Array(256);for(let a=0;a<16;++a){const c=a*16;for(let T=0;T<16;++T)e[c+T]=r[a]+r[T]}return e}();function W(r){return typeof BigInt>"u"?is:r}function is(){throw new Error("BigInt not supported")}})(ra);var ia={exports:{}},B=ia.exports={},Q,q;function Je(){throw new Error("setTimeout has not been defined")}function je(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Q=setTimeout:Q=Je}catch{Q=Je}try{typeof clearTimeout=="function"?q=clearTimeout:q=je}catch{q=je}})();function ma(t){if(Q===setTimeout)return setTimeout(t,0);if((Q===Je||!Q)&&setTimeout)return Q=setTimeout,setTimeout(t,0);try{return Q(t,0)}catch{try{return Q.call(null,t,0)}catch{return Q.call(this,t,0)}}}function ys(t){if(q===clearTimeout)return clearTimeout(t);if((q===je||!q)&&clearTimeout)return q=clearTimeout,clearTimeout(t);try{return q(t)}catch{try{return q.call(null,t)}catch{return q.call(this,t)}}}var K=[],le=!1,ee,be=-1;function gs(){!le||!ee||(le=!1,ee.length?K=ee.concat(K):be=-1,K.length&&ca())}function ca(){if(!le){var t=ma(gs);le=!0;for(var s=K.length;s;){for(ee=K,K=[];++be<s;)ee&&ee[be].run();be=-1,s=K.length}ee=null,le=!1,ys(t)}}B.nextTick=function(t){var s=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)s[o-1]=arguments[o];K.push(new la(t,s)),K.length===1&&!le&&ma(ca)};function la(t,s){this.fun=t,this.array=s}la.prototype.run=function(){this.fun.apply(null,this.array)};B.title="browser";B.browser=!0;B.env={};B.argv=[];B.version="";B.versions={};function $(){}B.on=$;B.addListener=$;B.once=$;B.off=$;B.removeListener=$;B.removeAllListeners=$;B.emit=$;B.prependListener=$;B.prependOnceListener=$;B.listeners=function(t){return[]};B.binding=function(t){throw new Error("process.binding is not supported")};B.cwd=function(){return"/"};B.chdir=function(t){throw new Error("process.chdir is not supported")};B.umask=function(){return 0};var fs=ia.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=ra,o=fs,m=u=>u&&u.__esModule?u:{default:u},i=m(o),d=globalThis||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>s.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>i.default}),t.global=d})(ze);function G(t,s){if(!t)throw new Error(s)}const Ss=34028234663852886e22,_s=-34028234663852886e22,Es=4294967295,hs=2147483647,Rs=-2147483648;function Ie(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>hs||t<Rs)throw new Error("invalid int 32: "+t)}function Xe(t){if(typeof t!="number")throw new Error("invalid uint 32: "+typeof t);if(!Number.isInteger(t)||t>Es||t<0)throw new Error("invalid uint 32: "+t)}function da(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>Ss||t<_s))throw new Error("invalid float 32: "+t)}const Ta=Symbol("@bufbuild/protobuf/enum-type");function Ns(t){const s=t[Ta];return G(s,"missing enum type on enum object"),s}function ua(t,s,o,m){t[Ta]=pa(s,o.map(i=>({no:i.no,name:i.name,localName:t[i.no]})))}function pa(t,s,o){const m=Object.create(null),i=Object.create(null),d=[];for(const u of s){const l=ka(u);d.push(l),m[u.name]=l,i[u.no]=l}return{typeName:t,values:d,findName(u){return m[u]},findNumber(u){return i[u]}}}function bs(t,s,o){const m={};for(const i of s){const d=ka(i);m[d.localName]=d.no,m[d.no]=d.localName}return ua(m,t,s),m}function ka(t){return"localName"in t?t:Object.assign(Object.assign({},t),{localName:t.name})}class de{equals(s){return this.getType().runtime.util.equals(this.getType(),this,s)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(s,o){const m=this.getType(),i=m.runtime.bin,d=i.makeReadOptions(o);return i.readMessage(this,d.readerFactory(s),s.byteLength,d),this}fromJson(s,o){const m=this.getType(),i=m.runtime.json,d=i.makeReadOptions(o);return i.readMessage(m,s,d,this),this}fromJsonString(s,o){let m;try{m=JSON.parse(s)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(m,o)}toBinary(s){const o=this.getType(),m=o.runtime.bin,i=m.makeWriteOptions(s),d=i.writerFactory();return m.writeMessage(this,d,i),d.finish()}toJson(s){const o=this.getType(),m=o.runtime.json,i=m.makeWriteOptions(s);return m.writeMessage(this,i)}toJsonString(s){var o;const m=this.toJson(s);return JSON.stringify(m,null,(o=s==null?void 0:s.prettySpaces)!==null&&o!==void 0?o:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function Is(t,s,o,m){var i;const d=(i=m==null?void 0:m.localName)!==null&&i!==void 0?i:s.substring(s.lastIndexOf(".")+1),u={[d]:function(l){t.util.initFields(this),t.util.initPartial(l,this)}}[d];return Object.setPrototypeOf(u.prototype,new de),Object.assign(u,{runtime:t,typeName:s,fields:t.util.newFieldList(o),fromBinary(l,k){return new u().fromBinary(l,k)},fromJson(l,k){return new u().fromJson(l,k)},fromJsonString(l,k){return new u().fromJsonString(l,k)},equals(l,k){return t.util.equals(u,l,k)}}),u}function As(t,s,o,m){return{syntax:t,json:s,bin:o,util:m,makeMessageType(i,d,u){return Is(this,i,d,u)},makeEnum:bs,makeEnumType:pa,getEnumType:Ns}}var f;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(f||(f={}));var ae;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING"})(ae||(ae={}));function Ms(){let t=0,s=0;for(let m=0;m<28;m+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<m,!(i&128))return this.assertBounds(),[t,s]}let o=this.buf[this.pos++];if(t|=(o&15)<<28,s=(o&112)>>4,!(o&128))return this.assertBounds(),[t,s];for(let m=3;m<=31;m+=7){let i=this.buf[this.pos++];if(s|=(i&127)<<m,!(i&128))return this.assertBounds(),[t,s]}throw new Error("invalid varint")}function qe(t,s,o){for(let d=0;d<28;d=d+7){const u=t>>>d,l=!(!(u>>>7)&&s==0),k=(l?u|128:u)&255;if(o.push(k),!l)return}const m=t>>>28&15|(s&7)<<4,i=!!(s>>3);if(o.push((i?m|128:m)&255),!!i){for(let d=3;d<31;d=d+7){const u=s>>>d,l=!!(u>>>7),k=(l?u|128:u)&255;if(o.push(k),!l)return}o.push(s>>>31&1)}}const Ae=4294967296;function wn(t){const s=t[0]==="-";s&&(t=t.slice(1));const o=1e6;let m=0,i=0;function d(u,l){const k=Number(t.slice(u,l));i*=o,m=m*o+k,m>=Ae&&(i=i+(m/Ae|0),m=m%Ae)}return d(-24,-18),d(-18,-12),d(-12,-6),d(-6),s?ga(m,i):sn(m,i)}function Os(t,s){let o=sn(t,s);const m=o.hi&2147483648;m&&(o=ga(o.lo,o.hi));const i=ya(o.lo,o.hi);return m?"-"+i:i}function ya(t,s){if({lo:t,hi:s}=ws(t,s),s<=2097151)return String(Ae*s+t);const o=t&16777215,m=(t>>>24|s<<8)&16777215,i=s>>16&65535;let d=o+m*6777216+i*6710656,u=m+i*8147497,l=i*2;const k=1e7;return d>=k&&(u+=Math.floor(d/k),d%=k),u>=k&&(l+=Math.floor(u/k),u%=k),l.toString()+Bn(u)+Bn(d)}function ws(t,s){return{lo:t>>>0,hi:s>>>0}}function sn(t,s){return{lo:t|0,hi:s|0}}function ga(t,s){return s=~s,t?t=~t+1:s+=1,sn(t,s)}const Bn=t=>{const s=String(t);return"0000000".slice(s.length)+s};function Dn(t,s){if(t>=0){for(;t>127;)s.push(t&127|128),t=t>>>7;s.push(t)}else{for(let o=0;o<9;o++)s.push(t&127|128),t=t>>7;s.push(1)}}function Bs(){let t=this.buf[this.pos++],s=t&127;if(!(t&128))return this.assertBounds(),s;if(t=this.buf[this.pos++],s|=(t&127)<<7,!(t&128))return this.assertBounds(),s;if(t=this.buf[this.pos++],s|=(t&127)<<14,!(t&128))return this.assertBounds(),s;if(t=this.buf[this.pos++],s|=(t&127)<<21,!(t&128))return this.assertBounds(),s;t=this.buf[this.pos++],s|=(t&15)<<28;for(let o=5;t&128&&o<10;o++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),s>>>0}function Ds(){const t=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"&&(typeof ze.process!="object"||typeof ze.process.env!="object"||!1)){const i=BigInt("-9223372036854775808"),d=BigInt("9223372036854775807"),u=BigInt("0"),l=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(k){const g=typeof k=="bigint"?k:BigInt(k);if(g>d||g<i)throw new Error(`int64 invalid: ${k}`);return g},uParse(k){const g=typeof k=="bigint"?k:BigInt(k);if(g>l||g<u)throw new Error(`uint64 invalid: ${k}`);return g},enc(k){return t.setBigInt64(0,this.parse(k),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(k){return t.setBigInt64(0,this.uParse(k),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(k,g){return t.setInt32(0,k,!0),t.setInt32(4,g,!0),t.getBigInt64(0,!0)},uDec(k,g){return t.setInt32(0,k,!0),t.setInt32(4,g,!0),t.getBigUint64(0,!0)}}}const o=i=>G(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),m=i=>G(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),o(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),m(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),o(i),wn(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),m(i),wn(i)},dec(i,d){return Os(i,d)},uDec(i,d){return ya(i,d)}}}const U=Ds();var w;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(w||(w={}));class Ls{constructor(s){this.stack=[],this.textEncoder=s??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let s=0;for(let i=0;i<this.chunks.length;i++)s+=this.chunks[i].length;let o=new Uint8Array(s),m=0;for(let i=0;i<this.chunks.length;i++)o.set(this.chunks[i],m),m+=this.chunks[i].length;return this.chunks=[],o}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let s=this.finish(),o=this.stack.pop();if(!o)throw new Error("invalid state, fork stack empty");return this.chunks=o.chunks,this.buf=o.buf,this.uint32(s.byteLength),this.raw(s)}tag(s,o){return this.uint32((s<<3|o)>>>0)}raw(s){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(s),this}uint32(s){for(Xe(s);s>127;)this.buf.push(s&127|128),s=s>>>7;return this.buf.push(s),this}int32(s){return Ie(s),Dn(s,this.buf),this}bool(s){return this.buf.push(s?1:0),this}bytes(s){return this.uint32(s.byteLength),this.raw(s)}string(s){let o=this.textEncoder.encode(s);return this.uint32(o.byteLength),this.raw(o)}float(s){da(s);let o=new Uint8Array(4);return new DataView(o.buffer).setFloat32(0,s,!0),this.raw(o)}double(s){let o=new Uint8Array(8);return new DataView(o.buffer).setFloat64(0,s,!0),this.raw(o)}fixed32(s){Xe(s);let o=new Uint8Array(4);return new DataView(o.buffer).setUint32(0,s,!0),this.raw(o)}sfixed32(s){Ie(s);let o=new Uint8Array(4);return new DataView(o.buffer).setInt32(0,s,!0),this.raw(o)}sint32(s){return Ie(s),s=(s<<1^s>>31)>>>0,Dn(s,this.buf),this}sfixed64(s){let o=new Uint8Array(8),m=new DataView(o.buffer),i=U.enc(s);return m.setInt32(0,i.lo,!0),m.setInt32(4,i.hi,!0),this.raw(o)}fixed64(s){let o=new Uint8Array(8),m=new DataView(o.buffer),i=U.uEnc(s);return m.setInt32(0,i.lo,!0),m.setInt32(4,i.hi,!0),this.raw(o)}int64(s){let o=U.enc(s);return qe(o.lo,o.hi,this.buf),this}sint64(s){let o=U.enc(s),m=o.hi>>31,i=o.lo<<1^m,d=(o.hi<<1|o.lo>>>31)^m;return qe(i,d,this.buf),this}uint64(s){let o=U.uEnc(s);return qe(o.lo,o.hi,this.buf),this}}class Us{constructor(s,o){this.varint64=Ms,this.uint32=Bs,this.buf=s,this.len=s.length,this.pos=0,this.view=new DataView(s.buffer,s.byteOffset,s.byteLength),this.textDecoder=o??new TextDecoder}tag(){let s=this.uint32(),o=s>>>3,m=s&7;if(o<=0||m<0||m>5)throw new Error("illegal tag: field no "+o+" wire type "+m);return[o,m]}skip(s){let o=this.pos;switch(s){case w.Varint:for(;this.buf[this.pos++]&128;);break;case w.Bit64:this.pos+=4;case w.Bit32:this.pos+=4;break;case w.LengthDelimited:let m=this.uint32();this.pos+=m;break;case w.StartGroup:let i;for(;(i=this.tag()[1])!==w.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+s)}return this.assertBounds(),this.buf.subarray(o,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let s=this.uint32();return s>>>1^-(s&1)}int64(){return U.dec(...this.varint64())}uint64(){return U.uDec(...this.varint64())}sint64(){let[s,o]=this.varint64(),m=-(s&1);return s=(s>>>1|(o&1)<<31)^m,o=o>>>1^m,U.dec(s,o)}bool(){let[s,o]=this.varint64();return s!==0||o!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return U.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return U.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let s=this.uint32(),o=this.pos;return this.pos+=s,this.assertBounds(),this.buf.subarray(o,o+s)}string(){return this.textDecoder.decode(this.bytes())}}function Ze(t,s){return s instanceof de||!t.fieldWrapper?s:t.fieldWrapper.wrapField(s)}f.DOUBLE,f.FLOAT,f.INT64,f.UINT64,f.INT32,f.UINT32,f.BOOL,f.STRING,f.BYTES;function z(t,s,o){if(s===o)return!0;if(t==f.BYTES){if(!(s instanceof Uint8Array)||!(o instanceof Uint8Array)||s.length!==o.length)return!1;for(let m=0;m<s.length;m++)if(s[m]!==o[m])return!1;return!0}switch(t){case f.UINT64:case f.FIXED64:case f.INT64:case f.SFIXED64:case f.SINT64:return s==o}return!1}function en(t,s){switch(t){case f.BOOL:return!1;case f.UINT64:case f.FIXED64:case f.INT64:case f.SFIXED64:case f.SINT64:return s==0?U.zero:"0";case f.DOUBLE:case f.FLOAT:return 0;case f.BYTES:return new Uint8Array(0);case f.STRING:return"";default:return 0}}function fa(t,s){const o=s===void 0;let m=w.Varint,i=s===0;switch(t){case f.STRING:i=o||!s.length,m=w.LengthDelimited;break;case f.BOOL:i=s===!1;break;case f.DOUBLE:m=w.Bit64;break;case f.FLOAT:m=w.Bit32;break;case f.INT64:i=o||s==0;break;case f.UINT64:i=o||s==0;break;case f.FIXED64:i=o||s==0,m=w.Bit64;break;case f.BYTES:i=o||!s.byteLength,m=w.LengthDelimited;break;case f.FIXED32:m=w.Bit32;break;case f.SFIXED32:m=w.Bit32;break;case f.SFIXED64:i=o||s==0,m=w.Bit64;break;case f.SINT64:i=o||s==0;break}const d=f[t].toLowerCase();return[m,d,o||i]}const me=Symbol("@bufbuild/protobuf/unknown-fields"),Ln={readUnknownFields:!0,readerFactory:t=>new Us(t)},Un={writeUnknownFields:!0,writerFactory:()=>new Ls};function Ps(t){return t?Object.assign(Object.assign({},Ln),t):Ln}function vs(t){return t?Object.assign(Object.assign({},Un),t):Un}function Fs(){return{makeReadOptions:Ps,makeWriteOptions:vs,listUnknownFields(t){var s;return(s=t[me])!==null&&s!==void 0?s:[]},discardUnknownFields(t){delete t[me]},writeUnknownFields(t,s){const m=t[me];if(m)for(const i of m)s.tag(i.no,i.wireType).raw(i.data)},onUnknownField(t,s,o,m){const i=t;Array.isArray(i[me])||(i[me]=[]),i[me].push({no:s,wireType:o,data:m})},readMessage(t,s,o,m){const i=t.getType(),d=o===void 0?s.len:s.pos+o;for(;s.pos<d;){const[u,l]=s.tag(),k=i.fields.find(u);if(!k){const E=s.skip(l);m.readUnknownFields&&this.onUnknownField(t,u,l,E);continue}let g=t,S=k.repeated,_=k.localName;switch(k.oneof&&(g=g[k.oneof.localName],g.case!=_&&delete g.value,g.case=_,_="value"),k.kind){case"scalar":case"enum":const E=k.kind=="enum"?f.INT32:k.T;let h=Oe;if(k.kind=="scalar"&&k.L>0&&(h=xs),S){let x=g[_];if(l==w.LengthDelimited&&E!=f.STRING&&E!=f.BYTES){let Ge=s.uint32()+s.pos;for(;s.pos<Ge;)x.push(h(s,E))}else x.push(h(s,E))}else g[_]=h(s,E);break;case"message":const N=k.T;S?g[_].push(Me(s,new N,m)):g[_]instanceof de?Me(s,g[_],m):(g[_]=Me(s,new N,m),N.fieldWrapper&&!k.oneof&&!k.repeated&&(g[_]=N.fieldWrapper.unwrapField(g[_])));break;case"map":let[D,v]=Gs(k,s,m);g[_][D]=v;break}}}}}function Me(t,s,o){return s.getType().runtime.bin.readMessage(s,t,t.uint32(),o),s}function Gs(t,s,o){const m=s.uint32(),i=s.pos+m;let d,u;for(;s.pos<i;){let[l]=s.tag();switch(l){case 1:d=Oe(s,t.K);break;case 2:switch(t.V.kind){case"scalar":u=Oe(s,t.V.T);break;case"enum":u=s.int32();break;case"message":u=Me(s,new t.V.T,o);break}break}}if(d===void 0){let l=en(t.K,ae.BIGINT);d=t.K==f.BOOL?l.toString():l}if(typeof d!="string"&&typeof d!="number"&&(d=d.toString()),u===void 0)switch(t.V.kind){case"scalar":u=en(t.V.T,ae.BIGINT);break;case"enum":u=0;break;case"message":u=new t.V.T;break}return[d,u]}function xs(t,s){const o=Oe(t,s);return typeof o=="bigint"?o.toString():o}function Oe(t,s){switch(s){case f.STRING:return t.string();case f.BOOL:return t.bool();case f.DOUBLE:return t.double();case f.FLOAT:return t.float();case f.INT32:return t.int32();case f.INT64:return t.int64();case f.UINT64:return t.uint64();case f.FIXED64:return t.fixed64();case f.BYTES:return t.bytes();case f.FIXED32:return t.fixed32();case f.SFIXED32:return t.sfixed32();case f.SFIXED64:return t.sfixed64();case f.SINT64:return t.sint64();case f.UINT32:return t.uint32();case f.SINT32:return t.sint32()}}function Cs(t,s,o,m,i){t.tag(o.no,w.LengthDelimited),t.fork();let d=m;switch(o.K){case f.INT32:case f.FIXED32:case f.UINT32:case f.SFIXED32:case f.SINT32:d=Number.parseInt(m);break;case f.BOOL:G(m=="true"||m=="false"),d=m=="true";break}switch(ge(t,o.K,1,d,!0),o.V.kind){case"scalar":ge(t,o.V.T,2,i,!0);break;case"enum":ge(t,f.INT32,2,i,!0);break;case"message":nn(t,s,o.V.T,2,i);break}t.join()}function nn(t,s,o,m,i){if(i!==void 0){const d=Ze(o,i);t.tag(m,w.LengthDelimited).bytes(d.toBinary(s))}}function ge(t,s,o,m,i){let[d,u,l]=fa(s,m);(!l||i)&&t.tag(o,d)[u](m)}function Vs(t,s,o,m){if(!m.length)return;t.tag(o,w.LengthDelimited).fork();let[,i]=fa(s);for(let d=0;d<m.length;d++)t[i](m[d]);t.join()}function Qs(){return Object.assign(Object.assign({},Fs()),{writeMessage(t,s,o){const m=t.getType();for(const i of m.fields.byNumber()){let d,u=i.repeated,l=i.localName;if(i.oneof){const k=t[i.oneof.localName];if(k.case!==l)continue;d=k.value}else d=t[l];switch(i.kind){case"scalar":case"enum":let k=i.kind=="enum"?f.INT32:i.T;if(u)if(i.packed)Vs(s,k,i.no,d);else for(const g of d)ge(s,k,i.no,g,!0);else d!==void 0&&ge(s,k,i.no,d,!!i.oneof||i.opt);break;case"message":if(u)for(const g of d)nn(s,o,i.T,i.no,g);else nn(s,o,i.T,i.no,d);break;case"map":for(const[g,S]of Object.entries(d))Cs(s,o,i,g,S);break}}return o.writeUnknownFields&&this.writeUnknownFields(t,s),s}})}let H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),De=[];for(let t=0;t<H.length;t++)De[H[t].charCodeAt(0)]=t;De["-".charCodeAt(0)]=H.indexOf("+");De["_".charCodeAt(0)]=H.indexOf("/");const Sa={dec(t){let s=t.length*3/4;t[t.length-2]=="="?s-=2:t[t.length-1]=="="&&(s-=1);let o=new Uint8Array(s),m=0,i=0,d,u=0;for(let l=0;l<t.length;l++){if(d=De[t.charCodeAt(l)],d===void 0)switch(t[l]){case"=":i=0;case`
|
|
7
|
-
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:u=d,i=1;break;case 1:o[m++]=u<<2|(d&48)>>4,u=d,i=2;break;case 2:o[m++]=(u&15)<<4|(d&60)>>2,u=d,i=3;break;case 3:o[m++]=(u&3)<<6|d,i=0;break}}if(i==1)throw Error("invalid base64 string.");return o.subarray(0,m)},enc(t){let s="",o=0,m,i=0;for(let d=0;d<t.length;d++)switch(m=t[d],o){case 0:s+=H[m>>2],i=(m&3)<<4,o=1;break;case 1:s+=H[i|m>>4],i=(m&15)<<2,o=2;break;case 2:s+=H[i|m>>6],s+=H[m&63],o=0;break}return o&&(s+=H[i],s+="=",o==1&&(s+="=")),s}},Pn={ignoreUnknownFields:!1},vn={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function qs(t){return t?Object.assign(Object.assign({},Pn),t):Pn}function Ys(t){return t?Object.assign(Object.assign({},vn),t):vn}function Hs(t){const s=t(Ks,Fn);return{makeReadOptions:qs,makeWriteOptions:Ys,readMessage(o,m,i,d){if(m==null||Array.isArray(m)||typeof m!="object")throw new Error(`cannot decode message ${o.typeName} from JSON: ${this.debug(m)}`);d=d??new o;const u={};for(const[l,k]of Object.entries(m)){const g=o.fields.findJsonName(l);if(!g){if(!i.ignoreUnknownFields)throw new Error(`cannot decode message ${o.typeName} from JSON: key "${l}" is unknown`);continue}let S=g.localName,_=d;if(g.oneof){if(k===null&&g.kind=="scalar")continue;const E=u[g.oneof.localName];if(E)throw new Error(`cannot decode message ${o.typeName} from JSON: multiple keys for oneof "${g.oneof.name}" present: "${E}", "${l}"`);u[g.oneof.localName]=l,_=_[g.oneof.localName]={case:S},S="value"}if(g.repeated){if(k===null)continue;if(!Array.isArray(k))throw new Error(`cannot decode field ${o.typeName}.${g.name} from JSON: ${this.debug(k)}`);const E=_[S];for(const h of k){if(h===null)throw new Error(`cannot decode field ${o.typeName}.${g.name} from JSON: ${this.debug(h)}`);let N;switch(g.kind){case"message":N=g.T.fromJson(h,i);break;case"enum":if(N=Ye(g.T,h,i.ignoreUnknownFields),N===void 0)continue;break;case"scalar":try{N=pe(g.T,h,g.L)}catch(D){let v=`cannot decode field ${o.typeName}.${g.name} from JSON: ${this.debug(h)}`;throw D instanceof Error&&D.message.length>0&&(v+=`: ${D.message}`),new Error(v)}break}E.push(N)}}else if(g.kind=="map"){if(k===null)continue;if(Array.isArray(k)||typeof k!="object")throw new Error(`cannot decode field ${o.typeName}.${g.name} from JSON: ${this.debug(k)}`);const E=_[S];for(const[h,N]of Object.entries(k)){if(N===null)throw new Error(`cannot decode field ${o.typeName}.${g.name} from JSON: map value null`);let D;switch(g.V.kind){case"message":D=g.V.T.fromJson(N,i);break;case"enum":if(D=Ye(g.V.T,N,i.ignoreUnknownFields),D===void 0)continue;break;case"scalar":try{D=pe(g.V.T,N,ae.BIGINT)}catch(v){let x=`cannot decode map value for field ${o.typeName}.${g.name} from JSON: ${this.debug(k)}`;throw v instanceof Error&&v.message.length>0&&(x+=`: ${v.message}`),new Error(x)}break}try{E[pe(g.K,g.K==f.BOOL?h=="true"?!0:h=="false"?!1:h:h,ae.BIGINT).toString()]=D}catch(v){let x=`cannot decode map key for field ${o.typeName}.${g.name} from JSON: ${this.debug(k)}`;throw v instanceof Error&&v.message.length>0&&(x+=`: ${v.message}`),new Error(x)}}}else switch(g.kind){case"message":const E=g.T;if(k===null&&E.typeName!="google.protobuf.Value"){if(g.oneof)throw new Error(`cannot decode field ${o.typeName}.${g.name} from JSON: null is invalid for oneof field "${l}"`);continue}_[S]instanceof de?_[S].fromJson(k,i):(_[S]=E.fromJson(k,i),E.fieldWrapper&&!g.oneof&&(_[S]=E.fieldWrapper.unwrapField(_[S])));break;case"enum":const h=Ye(g.T,k,i.ignoreUnknownFields);h!==void 0&&(_[S]=h);break;case"scalar":try{_[S]=pe(g.T,k,g.L)}catch(N){let D=`cannot decode field ${o.typeName}.${g.name} from JSON: ${this.debug(k)}`;throw N instanceof Error&&N.message.length>0&&(D+=`: ${N.message}`),new Error(D)}break}}return d},writeMessage(o,m){const i=o.getType(),d={};let u;try{for(const l of i.fields.byMember()){let k;if(l.kind=="oneof"){const g=o[l.localName];if(g.value===void 0)continue;if(u=l.findField(g.case),!u)throw"oneof case not found: "+g.case;k=s(u,g.value,m)}else u=l,k=s(u,o[u.localName],m);k!==void 0&&(d[m.useProtoFieldName?u.name:u.jsonName]=k)}}catch(l){const k=u?`cannot encode field ${i.typeName}.${u.name} to JSON`:`cannot encode message ${i.typeName} to JSON`,g=l instanceof Error?l.message:String(l);throw new Error(k+(g.length>0?`: ${g}`:""))}return d},readScalar:pe,writeScalar:Fn,debug:_a}}function _a(t){if(t===null)return"null";switch(typeof t){case"object":return Array.isArray(t)?"array":"object";case"string":return t.length>100?"string":`"${t.split('"').join('\\"')}"`;default:return String(t)}}function pe(t,s,o){switch(t){case f.DOUBLE:case f.FLOAT:if(s===null)return 0;if(s==="NaN")return Number.NaN;if(s==="Infinity")return Number.POSITIVE_INFINITY;if(s==="-Infinity")return Number.NEGATIVE_INFINITY;if(s===""||typeof s=="string"&&s.trim().length!==s.length||typeof s!="string"&&typeof s!="number")break;const m=Number(s);if(Number.isNaN(m)||!Number.isFinite(m))break;return t==f.FLOAT&&da(m),m;case f.INT32:case f.FIXED32:case f.SFIXED32:case f.SINT32:case f.UINT32:if(s===null)return 0;let i;if(typeof s=="number"?i=s:typeof s=="string"&&s.length>0&&s.trim().length===s.length&&(i=Number(s)),i===void 0)break;return t==f.UINT32?Xe(i):Ie(i),i;case f.INT64:case f.SFIXED64:case f.SINT64:if(s===null)return U.zero;if(typeof s!="number"&&typeof s!="string")break;const d=U.parse(s);return o?d.toString():d;case f.FIXED64:case f.UINT64:if(s===null)return U.zero;if(typeof s!="number"&&typeof s!="string")break;const u=U.uParse(s);return o?u.toString():u;case f.BOOL:if(s===null)return!1;if(typeof s!="boolean")break;return s;case f.STRING:if(s===null)return"";if(typeof s!="string")break;try{encodeURIComponent(s)}catch{throw new Error("invalid UTF8")}return s;case f.BYTES:if(s===null||s==="")return new Uint8Array(0);if(typeof s!="string")break;return Sa.dec(s)}throw new Error}function Ye(t,s,o){if(s===null)return 0;switch(typeof s){case"number":if(Number.isInteger(s))return s;break;case"string":const m=t.findName(s);if(m||o)return m==null?void 0:m.no;break}throw new Error(`cannot decode enum ${t.typeName} from JSON: ${_a(s)}`)}function Ks(t,s,o,m){var i;if(s===void 0)return s;if(s===0&&!o)return;if(m)return s;if(t.typeName=="google.protobuf.NullValue")return null;const d=t.findNumber(s);return(i=d==null?void 0:d.name)!==null&&i!==void 0?i:s}function Fn(t,s,o){if(s!==void 0)switch(t){case f.INT32:case f.SFIXED32:case f.SINT32:case f.FIXED32:case f.UINT32:return G(typeof s=="number"),s!=0||o?s:void 0;case f.FLOAT:case f.DOUBLE:return G(typeof s=="number"),Number.isNaN(s)?"NaN":s===Number.POSITIVE_INFINITY?"Infinity":s===Number.NEGATIVE_INFINITY?"-Infinity":s!==0||o?s:void 0;case f.STRING:return G(typeof s=="string"),s.length>0||o?s:void 0;case f.BOOL:return G(typeof s=="boolean"),s||o?s:void 0;case f.UINT64:case f.FIXED64:case f.INT64:case f.SFIXED64:case f.SINT64:return G(typeof s=="bigint"||typeof s=="string"||typeof s=="number"),o||s!=0?s.toString(10):void 0;case f.BYTES:return G(s instanceof Uint8Array),o||s.byteLength>0?Sa.enc(s):void 0}}function $s(){return Hs((t,s)=>function(m,i,d){if(m.kind=="map"){const u={};switch(m.V.kind){case"scalar":for(const[k,g]of Object.entries(i)){const S=s(m.V.T,g,!0);G(S!==void 0),u[k.toString()]=S}break;case"message":for(const[k,g]of Object.entries(i))u[k.toString()]=g.toJson(d);break;case"enum":const l=m.V.T;for(const[k,g]of Object.entries(i)){G(g===void 0||typeof g=="number");const S=t(l,g,!0,d.enumAsInteger);G(S!==void 0),u[k.toString()]=S}break}return d.emitDefaultValues||Object.keys(u).length>0?u:void 0}else if(m.repeated){const u=[];switch(m.kind){case"scalar":for(let l=0;l<i.length;l++)u.push(s(m.T,i[l],!0));break;case"enum":for(let l=0;l<i.length;l++)u.push(t(m.T,i[l],!0,d.enumAsInteger));break;case"message":for(let l=0;l<i.length;l++)u.push(Ze(m.T,i[l]).toJson(d));break}return d.emitDefaultValues||u.length>0?u:void 0}else switch(m.kind){case"scalar":return s(m.T,i,!!m.oneof||m.opt||d.emitDefaultValues);case"enum":return t(m.T,i,!!m.oneof||m.opt||d.emitDefaultValues,d.enumAsInteger);case"message":return i!==void 0?Ze(m.T,i).toJson(d):void 0}})}function Ws(){return{setEnumType:ua,initPartial(t,s){if(t===void 0)return;const o=s.getType();for(const m of o.fields.byMember()){const i=m.localName,d=s,u=t;if(u[i]!==void 0)switch(m.kind){case"oneof":const l=u[i].case;if(l===void 0)continue;const k=m.findField(l);let g=u[i].value;k&&k.kind=="message"&&!(g instanceof k.T)?g=new k.T(g):k&&k.kind==="scalar"&&k.T===f.BYTES&&(g=ke(g)),d[i]={case:l,value:g};break;case"scalar":case"enum":let S=u[i];m.T===f.BYTES&&(S=m.repeated?S.map(ke):ke(S)),d[i]=S;break;case"map":switch(m.V.kind){case"scalar":case"enum":if(m.V.T===f.BYTES)for(const[h,N]of Object.entries(u[i]))d[i][h]=ke(N);else Object.assign(d[i],u[i]);break;case"message":const E=m.V.T;for(const h of Object.keys(u[i])){let N=u[i][h];E.fieldWrapper||(N=new E(N)),d[i][h]=N}break}break;case"message":const _=m.T;if(m.repeated)d[i]=u[i].map(E=>E instanceof _?E:new _(E));else if(u[i]!==void 0){const E=u[i];_.fieldWrapper?_.typeName==="google.protobuf.BytesValue"?d[i]=ke(E):d[i]=E:d[i]=E instanceof _?E:new _(E)}break}}},equals(t,s,o){return s===o?!0:!s||!o?!1:t.fields.byMember().every(m=>{const i=s[m.localName],d=o[m.localName];if(m.repeated){if(i.length!==d.length)return!1;switch(m.kind){case"message":return i.every((u,l)=>m.T.equals(u,d[l]));case"scalar":return i.every((u,l)=>z(m.T,u,d[l]));case"enum":return i.every((u,l)=>z(f.INT32,u,d[l]))}throw new Error(`repeated cannot contain ${m.kind}`)}switch(m.kind){case"message":return m.T.equals(i,d);case"enum":return z(f.INT32,i,d);case"scalar":return z(m.T,i,d);case"oneof":if(i.case!==d.case)return!1;const u=m.findField(i.case);if(u===void 0)return!0;switch(u.kind){case"message":return u.T.equals(i.value,d.value);case"enum":return z(f.INT32,i.value,d.value);case"scalar":return z(u.T,i.value,d.value)}throw new Error(`oneof cannot contain ${u.kind}`);case"map":const l=Object.keys(i).concat(Object.keys(d));switch(m.V.kind){case"message":const k=m.V.T;return l.every(S=>k.equals(i[S],d[S]));case"enum":return l.every(S=>z(f.INT32,i[S],d[S]));case"scalar":const g=m.V.T;return l.every(S=>z(g,i[S],d[S]))}break}})},clone(t){const s=t.getType(),o=new s,m=o;for(const i of s.fields.byMember()){const d=t[i.localName];let u;if(i.repeated)u=d.map(Re);else if(i.kind=="map"){u=m[i.localName];for(const[l,k]of Object.entries(d))u[l]=Re(k)}else i.kind=="oneof"?u=i.findField(d.case)?{case:d.case,value:Re(d.value)}:{case:void 0}:u=Re(d);m[i.localName]=u}return o}}}function Re(t){if(t===void 0)return t;if(t instanceof de)return t.clone();if(t instanceof Uint8Array){const s=new Uint8Array(t.byteLength);return s.set(t),s}return t}function ke(t){return t instanceof Uint8Array?t:new Uint8Array(t)}class zs{constructor(s,o){this._fields=s,this._normalizer=o}findJsonName(s){if(!this.jsonNames){const o={};for(const m of this.list())o[m.jsonName]=o[m.name]=m;this.jsonNames=o}return this.jsonNames[s]}find(s){if(!this.numbers){const o={};for(const m of this.list())o[m.no]=m;this.numbers=o}return this.numbers[s]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((s,o)=>s.no-o.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const s=this.members;let o;for(const m of this.list())m.oneof?m.oneof!==o&&(o=m.oneof,s.push(o)):s.push(m)}return this.members}}function Ea(t,s){const o=ha(t);return s?o:nt(et(o))}function Js(t){return Ea(t,!1)}const js=ha;function ha(t){let s=!1;const o=[];for(let m=0;m<t.length;m++){let i=t.charAt(m);switch(i){case"_":s=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o.push(i),s=!1;break;default:s&&(s=!1,i=i.toUpperCase()),o.push(i);break}}return o.join("")}const Xs=new Set(["constructor","toString","toJSON","valueOf"]),Zs=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),Ra=t=>`${t}$`,et=t=>Zs.has(t)?Ra(t):t,nt=t=>Xs.has(t)?Ra(t):t;class at{constructor(s){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.default=void 0,this.fields=[],this.name=s,this.localName=Js(s)}addField(s){G(s.oneof===this,`field ${s.name} not one of ${this.name}`),this.fields.push(s)}findField(s){if(!this._lookup){this._lookup=Object.create(null);for(let o=0;o<this.fields.length;o++)this._lookup[this.fields[o].localName]=this.fields[o]}return this._lookup[s]}}const n=As("proto3",$s(),Qs(),Object.assign(Object.assign({},Ws()),{newFieldList(t){return new zs(t,st)},initFields(t){for(const s of t.getType().fields.byMember()){if(s.opt)continue;const o=s.localName,m=t;if(s.repeated){m[o]=[];continue}switch(s.kind){case"oneof":m[o]={case:void 0};break;case"enum":m[o]=0;break;case"map":m[o]={};break;case"scalar":m[o]=en(s.T,s.L);break}}}}));function st(t){var s,o,m,i;const d=[];let u;for(const l of typeof t=="function"?t():t){const k=l;if(k.localName=Ea(l.name,l.oneof!==void 0),k.jsonName=(s=l.jsonName)!==null&&s!==void 0?s:js(l.name),k.repeated=(o=l.repeated)!==null&&o!==void 0?o:!1,l.kind=="scalar"&&(k.L=(m=l.L)!==null&&m!==void 0?m:ae.BIGINT),k.packed=(i=l.packed)!==null&&i!==void 0?i:l.kind=="enum"||l.kind=="scalar"&&l.T!=f.BYTES&&l.T!=f.STRING,l.oneof!==void 0){const g=typeof l.oneof=="string"?l.oneof:l.oneof.name;(!u||u.name!=g)&&(u=new at(g)),k.oneof=u,u.addField(k)}d.push(k)}return d}var b;(function(t){t[t.Unary=0]="Unary",t[t.ServerStreaming=1]="ServerStreaming",t[t.ClientStreaming=2]="ClientStreaming",t[t.BiDiStreaming=3]="BiDiStreaming"})(b||(b={}));var Gn;(function(t){t[t.NoSideEffects=1]="NoSideEffects",t[t.Idempotent=2]="Idempotent"})(Gn||(Gn={}));class P extends de{constructor(s){super(),this.seconds=U.zero,this.nanos=0,n.util.initPartial(s,this)}fromJson(s,o){if(typeof s!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${n.json.debug(s)}`);const m=s.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!m)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const i=Date.parse(m[1]+"-"+m[2]+"-"+m[3]+"T"+m[4]+":"+m[5]+":"+m[6]+(m[8]?m[8]:"Z"));if(Number.isNaN(i))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(i<Date.parse("0001-01-01T00:00:00Z")||i>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=U.parse(i/1e3),this.nanos=0,m[7]&&(this.nanos=parseInt("1"+m[7]+"0".repeat(9-m[7].length))-1e9),this}toJson(s){const o=Number(this.seconds)*1e3;if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let m="Z";if(this.nanos>0){const i=(this.nanos+1e9).toString().substring(1);i.substring(3)==="000000"?m="."+i.substring(0,3)+"Z":i.substring(6)==="000"?m="."+i.substring(0,6)+"Z":m="."+i+"Z"}return new Date(o).toISOString().replace(".000Z",m)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return P.fromDate(new Date)}static fromDate(s){const o=s.getTime();return new P({seconds:U.parse(Math.floor(o/1e3)),nanos:o%1e3*1e6})}static fromBinary(s,o){return new P().fromBinary(s,o)}static fromJson(s,o){return new P().fromJson(s,o)}static fromJsonString(s,o){return new P().fromJsonString(s,o)}static equals(s,o){return n.util.equals(P,s,o)}}P.runtime=n;P.typeName="google.protobuf.Timestamp";P.fields=n.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);const fe=n.makeEnum("streamlayer.interactive.QuestionType",[{no:0,name:"QUESTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_TYPE_POLL",localName:"POLL"},{no:2,name:"QUESTION_TYPE_TRIVIA",localName:"TRIVIA"},{no:3,name:"QUESTION_TYPE_PREDICTION",localName:"PREDICTION"},{no:4,name:"QUESTION_TYPE_FACTOID",localName:"FACTOID"},{no:5,name:"QUESTION_TYPE_TWEET",localName:"TWEET"},{no:6,name:"QUESTION_TYPE_PROMOTION",localName:"PROMOTION"}]),tt=n.makeEnum("streamlayer.interactive.QuestionSource",[{no:0,name:"QUESTION_SOURCE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SOURCE_AI",localName:"AI"},{no:2,name:"QUESTION_SOURCE_CSV_IMPORT",localName:"CSV_IMPORT"}]),Se=n.makeEnum("streamlayer.interactive.QuestionStatus",[{no:0,name:"QUESTION_STATUS_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_STATUS_NOT_SCHEDULED",localName:"NOT_SCHEDULED"},{no:2,name:"QUESTION_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:3,name:"QUESTION_STATUS_ACTIVE",localName:"ACTIVE"},{no:4,name:"QUESTION_STATUS_RESOLVED",localName:"RESOLVED"}]),rt=n.makeEnum("streamlayer.interactive.QuestionPosition",[{no:0,name:"QUESTION_POSITION_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_POSITION_DEFAULT",localName:"DEFAULT"},{no:2,name:"QUESTION_POSITION_FIXED_BOTTOM",localName:"FIXED_BOTTOM"}]),ot=n.makeEnum("streamlayer.interactive.QuestionLayout",[{no:0,name:"QUESTION_LAYOUT_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_LAYOUT_LIST_VIEW",localName:"LIST_VIEW"},{no:2,name:"QUESTION_LAYOUT_GRID_VIEW",localName:"GRID_VIEW"}]),_e=n.makeEnum("streamlayer.interactive.QuestionImages",[{no:0,name:"QUESTION_IMAGES_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_IMAGES_NONE",localName:"NONE"},{no:2,name:"QUESTION_IMAGES_ROUNDED",localName:"ROUNDED"},{no:3,name:"QUESTION_IMAGES_TRANSPARENT",localName:"TRANSPARENT"},{no:4,name:"QUESTION_IMAGES_CENTERED",localName:"CENTERED"}]),Na=n.makeEnum("streamlayer.interactive.ImagePosition",[{no:0,name:"IMAGE_POSITION_UNSET",localName:"UNSET"},{no:1,name:"IMAGE_POSITION_LEFT",localName:"LEFT"},{no:2,name:"IMAGE_POSITION_RIGHT",localName:"RIGHT"}]),it=n.makeEnum("streamlayer.interactive.PromotionType",[{no:0,name:"PROMOTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_TYPE_INGAME_IAB21",localName:"INGAME_IAB21"},{no:2,name:"PROMOTION_TYPE_INGAME_IAB11",localName:"INGAME_IAB11"},{no:3,name:"PROMOTION_TYPE_INGAME_IAB61",localName:"INGAME_IAB61"}]),mt=n.makeEnum("streamlayer.interactive.PromotionWallet",[{no:0,name:"PROMOTION_WALLET_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_WALLET_ENABLED",localName:"ENABLED"},{no:2,name:"PROMOTION_WALLET_DISABLED",localName:"DISABLED"}]),ct=n.makeEnum("streamlayer.interactive.QuestionAutoPostState",[{no:0,name:"QUESTION_AUTO_POST_STATE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_AUTO_POST_STATE_ON",localName:"ON"},{no:2,name:"QUESTION_AUTO_POST_STATE_OFF",localName:"OFF"},{no:3,name:"QUESTION_AUTO_POST_STATE_PAUSED",localName:"PAUSED"},{no:4,name:"QUESTION_AUTO_POST_STATE_IDLE",localName:"IDLE"}]),lt=n.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),dt=n.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),Tt=n.makeEnum("streamlayer.interactive.SilenceSetting",[{no:0,name:"SILENCE_SETTING_UNSET",localName:"UNSET"},{no:1,name:"SILENCE_SETTING_ON",localName:"ON"},{no:2,name:"SILENCE_SETTING_OFF",localName:"OFF"}]),ut=n.makeEnum("streamlayer.interactive.ImportStatus",[{no:0,name:"IMPORT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"IMPORT_STATUS_PLANNED",localName:"PLANNED"},{no:2,name:"IMPORT_STATUS_RUNNING",localName:"RUNNING"},{no:3,name:"IMPORT_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"IMPORT_STATUS_FAILED",localName:"FAILED"}]),tn=n.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:n.getEnumType(ot)},{no:2,name:"images",kind:"enum",T:n.getEnumType(_e)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:n.getEnumType(rt)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),Te=n.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Le=n.makeMessageType("streamlayer.interactive.QuestionNotification",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9},{no:3,name:"indicator_color",kind:"scalar",T:9},{no:4,name:"image_position",kind:"enum",T:n.getEnumType(Na)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:n.getEnumType(_e)}]),pt=n.makeMessageType("streamlayer.interactive.QuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13}]),kt=n.makeMessageType("streamlayer.interactive.ExtendedQuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13},{no:6,name:"percentage",kind:"scalar",T:13},{no:7,name:"you_voted",kind:"scalar",T:8},{no:8,name:"percentage_decimal",kind:"scalar",T:1}]),J=n.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),yt=n.makeMessageType("streamlayer.interactive.FileLink",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"thumbnail_url",kind:"scalar",T:9}]),gt=n.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),ft=n.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),St=n.makeMessageType("streamlayer.interactive.Banner",()=>[{no:1,name:"image_url",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"cta_button",kind:"message",T:ft}]),rn=n.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:_t,oneof:"options"},{no:2,name:"trivia",kind:"message",T:Et,oneof:"options"},{no:3,name:"prediction",kind:"message",T:ht,oneof:"options"},{no:4,name:"factoid",kind:"message",T:Rt,oneof:"options"},{no:5,name:"tweet",kind:"message",T:Nt,oneof:"options"},{no:6,name:"promotion",kind:"message",T:It,oneof:"options"}]),_t=n.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),Et=n.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:J},{no:2,name:"incorrect_feedback",kind:"message",T:J},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),ht=n.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:J},{no:2,name:"incorrect_feedback",kind:"message",T:J}],{localName:"QuestionOptions_PredictionOptions"}),Rt=n.makeMessageType("streamlayer.interactive.QuestionOptions.FactoidOptions",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"video",kind:"message",T:yt},{no:4,name:"web_link",kind:"message",T:gt}],{localName:"QuestionOptions_FactoidOptions"}),Nt=n.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions",()=>[{no:1,name:"tweet_url",kind:"scalar",T:9},{no:2,name:"tweet_id",kind:"scalar",T:9},{no:3,name:"tweet_meta",kind:"message",T:bt}],{localName:"QuestionOptions_TweetOptions"}),bt=n.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions.TweetMetadata",()=>[{no:1,name:"account",kind:"scalar",T:9},{no:2,name:"account_verified",kind:"scalar",T:8},{no:3,name:"has_media",kind:"scalar",T:8}],{localName:"QuestionOptions_TweetOptions_TweetMetadata"}),It=n.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:n.getEnumType(it)},{no:2,name:"sponsor",kind:"message",T:Te},{no:3,name:"banner",kind:"message",T:St},{no:4,name:"enable_wallet",kind:"enum",T:n.getEnumType(mt)}],{localName:"QuestionOptions_PromotionOptions"}),At=n.makeMessageType("streamlayer.interactive.Tag",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"last_used_time",kind:"scalar",T:4}]),Mt=n.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),ba=n.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:n.getEnumType(fe)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:rn},{no:5,name:"appearance",kind:"message",T:tn},{no:6,name:"sponsorship",kind:"message",T:Te},{no:7,name:"notification",kind:"message",T:Le},{no:8,name:"answers",kind:"message",T:pt,repeated:!0},{no:9,name:"status",kind:"enum",T:n.getEnumType(Se)},{no:10,name:"position",kind:"scalar",T:13,opt:!0},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"overrides",kind:"map",K:9,V:{kind:"scalar",T:8}},{no:15,name:"event_id",kind:"scalar",T:9},{no:16,name:"stream_timestamp",kind:"message",T:P},{no:17,name:"tags",kind:"message",T:At,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:mn},{no:19,name:"import_id",kind:"scalar",T:9},{no:20,name:"activation_trigger_count",kind:"scalar",T:13,opt:!0},{no:21,name:"source",kind:"enum",T:n.getEnumType(tt)},{no:22,name:"ai",kind:"message",T:Mt}]),on=n.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:n.getEnumType(fe)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:rn},{no:5,name:"appearance",kind:"message",T:tn},{no:6,name:"sponsorship",kind:"message",T:Te},{no:7,name:"notification",kind:"message",T:Le},{no:8,name:"answers",kind:"message",T:kt,repeated:!0},{no:9,name:"status",kind:"enum",T:n.getEnumType(Se)},{no:10,name:"position",kind:"scalar",T:13},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"event_id",kind:"scalar",T:9},{no:15,name:"bypass_notifications",kind:"message",T:mn}]);n.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:n.getEnumType(fe)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:n.getEnumType(Se)},{no:6,name:"options",kind:"message",T:rn},{no:7,name:"notification",kind:"message",T:Le}]);const Ia=n.makeMessageType("streamlayer.interactive.EventModeration",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"sponsorship",kind:"message",T:Te},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:Ot},{no:6,name:"sponsors",kind:"message",T:Dt},{no:7,name:"notification",kind:"message",T:Lt},{no:8,name:"activated_at",kind:"message",T:P},{no:9,name:"deactivated_at",kind:"message",T:P},{no:10,name:"question_auto_post",kind:"message",T:Ut},{no:11,name:"bypass_notifications",kind:"message",T:mn},{no:12,name:"importer_collaboration",kind:"message",T:qt}]),Ot=n.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:tn},{no:2,name:"trivia",kind:"message",T:wt},{no:3,name:"prediction",kind:"message",T:Bt},{no:4,name:"correct_feedbacks",kind:"message",T:J,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:J,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),wt=n.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),Bt=n.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),Dt=n.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:Te,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),Lt=n.makeMessageType("streamlayer.interactive.EventModeration.NotificationSettings",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"indicator_color",kind:"scalar",T:9},{no:3,name:"image_position",kind:"enum",T:n.getEnumType(Na)},{no:4,name:"image_mode",kind:"enum",T:n.getEnumType(_e)}],{localName:"EventModeration_NotificationSettings"}),Ut=n.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:n.getEnumType(ct)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:P},{no:4,name:"start_mode",kind:"enum",T:n.getEnumType(lt)},{no:5,name:"start_options",kind:"message",T:Pt}]),Pt=n.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:vt,oneof:"options"}]),vt=n.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});n.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const Ft=n.makeMessageType("streamlayer.interactive.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5},{no:3,name:"cursor",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:Gt},{no:3,name:"statistics",kind:"message",T:xt,repeated:!0}]);const Gt=n.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:n.getEnumType(Se)}],{localName:"QuestionStats_QuestionData"}),xt=n.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:Ct}]),Ct=n.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});n.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const mn=n.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:n.getEnumType(Tt)}]),Vt=n.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),Qt=n.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:n.getEnumType(ut)},{no:3,name:"errors",kind:"message",T:Vt,repeated:!0},{no:4,name:"last_updated",kind:"message",T:P}]),qt=n.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:Qt}}]),Yt=n.makeEnum("streamlayer.interactive.feed.PickHistoryStatus",[{no:0,name:"PICK_HISTORY_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PICK_HISTORY_STATUS_WON",localName:"WON"},{no:2,name:"PICK_HISTORY_STATUS_LOST",localName:"LOST"},{no:3,name:"PICK_HISTORY_STATUS_DNP",localName:"DNP"}]),Aa=n.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:ba},{no:2,name:"notification",kind:"message",T:Le},{no:3,name:"moderation",kind:"message",T:Ia}]);n.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Ht}]);const Ht=n.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse.SubscriptionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Aa}],{localName:"SubscriptionResponse_SubscriptionResponseData"});n.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Kt}]);const Kt=n.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse.VotingSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cn,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),$t=n.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:on}]);n.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Wt}]);const Wt=n.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse.QuestionSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:$t}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),zt=n.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:on}]);n.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:Jt}]);const Jt=n.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse.QuestionByUserResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:zt}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"});n.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:jt}]);const jt=n.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"});n.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Xt}]);const Xt=n.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse.SyncQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Aa}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"});n.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Zt}]);const Zt=n.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse.GetQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ba}],{localName:"GetQuestionResponse_GetQuestionResponseData"});n.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:er}]);const er=n.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse.QuestionDetailResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:on}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),cn=n.makeMessageType("streamlayer.interactive.feed.AnswerVoteResult",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13},{no:3,name:"voted",kind:"scalar",T:8},{no:4,name:"correct",kind:"scalar",T:8}]);n.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:nr}]);const nr=n.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest.SubmitRequestData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9}],{localName:"SubmitAnswerRequest_SubmitRequestData"});n.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:ar}]);const ar=n.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse.SubmitAnswerResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cn,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"});n.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:sr}]);const sr=n.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"});n.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]);n.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:tr}]);const tr=n.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:n.getEnumType(dt)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"});n.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:rr}]);const rr=n.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse.SkipQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cn,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"});n.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:n.getEnumType(fe),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Ft}]);const or=n.makeMessageType("streamlayer.interactive.feed.PickHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:n.getEnumType(Yt)},{no:4,name:"question_type",kind:"enum",T:n.getEnumType(fe)},{no:5,name:"subject",kind:"scalar",T:9},{no:6,name:"text",kind:"scalar",T:9},{no:7,name:"open_for_voting",kind:"scalar",T:8},{no:8,name:"question_status",kind:"enum",T:n.getEnumType(Se)}]);n.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:ir,repeated:!0},{no:2,name:"meta",kind:"message",T:mr}]);const ir=n.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:or}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),mr=n.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseMetadata",()=>[{no:1,name:"total",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"PickHistoryResponse_PickHistoryResponseMetadata"});n.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]);const cr=n.makeMessageType("streamlayer.interactive.feed.InsightHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"image_mode",kind:"enum",T:n.getEnumType(_e)}]);n.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:lr,repeated:!0}]);const lr=n.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse.InsightHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cr}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"});n.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]);const dr=n.makeMessageType("streamlayer.interactive.feed.TweetHistory",()=>[{no:1,name:"tweet_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"body",kind:"scalar",T:9},{no:5,name:"account",kind:"scalar",T:9},{no:6,name:"account_verified",kind:"scalar",T:8}]);n.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Tr,repeated:!0}]);const Tr=n.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse.TweetHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:dr}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),ur=n.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:pr},{no:3,name:"moderation",kind:"message",T:Ia}]),pr=n.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]);n.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:kr}]);const kr=n.makeMessageType("streamlayer.interactive.feed.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ur}],{localName:"GetResponse_GetResponseData"});n.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]);const yr=n.makeMessageType("streamlayer.interactive.feed.PromotionHistory",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:gr,repeated:!0}]);const gr=n.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse.PromotionHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yr}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),fr=n.makeMessageType("streamlayer.sdkSettings.game.common.GameAppearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}]),Sr=n.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),_r=n.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),Er=n.makeMessageType("streamlayer.sdkSettings.game.common.GameOverview",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"auto_activate",kind:"scalar",T:8},{no:4,name:"scoring",kind:"scalar",T:8},{no:5,name:"media",kind:"message",T:Sr},{no:6,name:"appearance",kind:"message",T:fr},{no:7,name:"prizes",kind:"message",T:_r,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),hr=n.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),Rr=n.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),Nr=n.makeMessageType("streamlayer.sdkSettings.game.common.GameTitleCard",()=>[{no:1,name:"visible",kind:"scalar",T:8},{no:2,name:"opt_in",kind:"scalar",T:8},{no:3,name:"title",kind:"scalar",T:9},{no:4,name:"subtitle",kind:"scalar",T:9},{no:5,name:"header",kind:"scalar",T:9},{no:6,name:"media",kind:"message",T:hr},{no:7,name:"appearance",kind:"message",T:Rr},{no:8,name:"completed",kind:"scalar",T:8}]),br=n.makeMessageType("streamlayer.sdkSettings.game.common.OnboardingStep",()=>[{no:1,name:"headline",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"graphic",kind:"scalar",T:9}]),Ir=n.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:br,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),Ar=n.makeMessageType("streamlayer.sdkSettings.game.common.GameRules",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"button_label",kind:"scalar",T:9},{no:4,name:"numbers_color",kind:"scalar",T:9},{no:5,name:"rules",kind:"scalar",T:9,repeated:!0},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"terms",kind:"scalar",T:9},{no:8,name:"terms_url",kind:"scalar",T:9}]),Mr=n.makeMessageType("streamlayer.sdkSettings.game.common.GameInviteCard",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"subtext",kind:"scalar",T:9},{no:4,name:"button_label",kind:"scalar",T:9},{no:5,name:"icon_color",kind:"scalar",T:9},{no:6,name:"terms",kind:"scalar",T:9},{no:7,name:"completed",kind:"scalar",T:8}]),Or=n.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:Er},{no:2,name:"title_card",kind:"message",T:Nr},{no:3,name:"onboarding",kind:"message",T:Ir},{no:4,name:"rules",kind:"message",T:Ar},{no:5,name:"invite_card",kind:"message",T:Mr},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),wr=n.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationGeneral",()=>[{no:1,name:"default_color",kind:"scalar",T:9},{no:2,name:"points",kind:"scalar",T:13},{no:3,name:"auto_hide_interval",kind:"scalar",T:4},{no:4,name:"insights_history_enabled",kind:"scalar",T:8},{no:5,name:"pick_history_enabled",kind:"scalar",T:8},{no:6,name:"correct_feedbacks",kind:"message",T:J,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:J,repeated:!0}]),Br=n.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:n.getEnumType(_e)}]),Dr=n.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSponsorships",()=>[{no:1,name:"rotate",kind:"scalar",T:8},{no:2,name:"no_sponsor",kind:"scalar",T:8},{no:3,name:"sponsors",kind:"message",T:Te,repeated:!0}]),Lr=n.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:wr},{no:2,name:"notifications",kind:"message",T:Br},{no:3,name:"sponsorships",kind:"message",T:Dr}]),ne=n.makeEnum("streamlayer.sdkSettings.SdkOverlayType",[{no:0,name:"SDK_OVERLAY_TYPE_UNSET",localName:"UNSET"},{no:1,name:"SDK_OVERLAY_TYPE_INPLAY",localName:"INPLAY"},{no:2,name:"SDK_OVERLAY_TYPE_MESSAGING",localName:"MESSAGING"},{no:3,name:"SDK_OVERLAY_TYPE_STATISTICS",localName:"STATISTICS"},{no:4,name:"SDK_OVERLAY_TYPE_BETTING",localName:"BETTING"},{no:5,name:"SDK_OVERLAY_TYPE_TWITTER",localName:"TWITTER"},{no:6,name:"SDK_OVERLAY_TYPE_MERCHANDISE",localName:"MERCHANDISE"},{no:7,name:"SDK_OVERLAY_TYPE_CONTESTS",localName:"CONTESTS"},{no:8,name:"SDK_OVERLAY_TYPE_VOICE_CHAT",localName:"VOICE_CHAT"},{no:9,name:"SDK_OVERLAY_TYPE_TICKETS",localName:"TICKETS"},{no:10,name:"SDK_OVERLAY_TYPE_WHOIS_WATCHING",localName:"WHOIS_WATCHING"},{no:11,name:"SDK_OVERLAY_TYPE_PROFILE",localName:"PROFILE"},{no:12,name:"SDK_OVERLAY_TYPE_GAMES",localName:"GAMES"},{no:13,name:"SDK_OVERLAY_TYPE_GOLF_STATISTICS",localName:"GOLF_STATISTICS"},{no:14,name:"SDK_OVERLAY_TYPE_HIGHLIGHTS",localName:"HIGHLIGHTS"},{no:15,name:"SDK_OVERLAY_TYPE_PUBLIC_CHAT",localName:"PUBLIC_CHAT"}]),Ur=n.makeEnum("streamlayer.sdkSettings.BettingFavoriteType",[{no:0,name:"BETTING_FAVORITE_TYPE_UNSET",localName:"UNSET"},{no:1,name:"BETTING_FAVORITE_TYPE_LEAGUE",localName:"LEAGUE"},{no:2,name:"BETTING_FAVORITE_TYPE_TEAM",localName:"TEAM"}]),Pr=n.makeEnum("streamlayer.sdkSettings.BettingSettingsTextColor",[{no:0,name:"BETTING_SETTINGS_TEXT_COLOR_UNSET",localName:"UNSET"},{no:1,name:"BETTING_SETTINGS_TEXT_COLOR_PRIMARY",localName:"PRIMARY"},{no:2,name:"BETTING_SETTINGS_TEXT_COLOR_GREY",localName:"GREY"},{no:3,name:"BETTING_SETTINGS_TEXT_COLOR_CUSTOM",localName:"CUSTOM"}]),ln=n.makeEnum("streamlayer.sdkSettings.GetStreamChannelType",[{no:0,name:"GETSTREAM_CHANNEL_TYPE_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_TYPE_LIVESTREAM"},{no:2,name:"GETSTREAM_CHANNEL_TYPE_MESSAGING"},{no:3,name:"GETSTREAM_CHANNEL_TYPE_TEAM"},{no:4,name:"GETSTREAM_CHANNEL_TYPE_COMMERCE"},{no:5,name:"GETSTREAM_CHANNEL_TYPE_GAMING"},{no:6,name:"GETSTREAM_CHANNEL_TYPE_CUSTOM"}]),vr=n.makeEnum("streamlayer.sdkSettings.GetStreamChannelDefault",[{no:0,name:"GETSTREAM_CHANNEL_DEFAULT_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_DEFAULT_TRUE"},{no:2,name:"GETSTREAM_CHANNEL_DEFAULT_FALSE"}]),Ma=n.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),Fr=n.makeEnum("streamlayer.sdkSettings.LeaderboardKind",[{no:0,name:"LEADERBOARD_KIND_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_KIND_GLOBAL",localName:"GLOBAL"},{no:2,name:"LEADERBOARD_KIND_FRIENDS",localName:"FRIENDS"}]),Gr=n.makeEnum("streamlayer.sdkSettings.PresetRuleKey",[{no:0,name:"PRESET_RULE_KEY_UNSET",localName:"UNSET"},{no:1,name:"PRESET_RULE_KEY_SPORT",localName:"SPORT"},{no:2,name:"PRESET_RULE_KEY_LEAGUE",localName:"LEAGUE"},{no:3,name:"PRESET_RULE_KEY_TEAMS",localName:"TEAMS"}]),xr=n.makeEnum("streamlayer.sdkSettings.AdvertisingPlacement",[{no:0,name:"ADVERTISING_PLACEMENT_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_PLACEMENT_DEFAULT",localName:"DEFAULT"},{no:2,name:"ADVERTISING_PLACEMENT_WATCHPARTY_FULLSIZE",localName:"WATCHPARTY_FULLSIZE"},{no:3,name:"ADVERTISING_PLACEMENT_WATCHPARTY_VIDEOPANEL",localName:"WATCHPARTY_VIDEOPANEL"},{no:4,name:"ADVERTISING_PLACEMENT_OVERLAY_NAVBAR",localName:"OVERLAY_NAVBAR"}]);n.makeEnum("streamlayer.sdkSettings.AdvertisingType",[{no:0,name:"ADVERTISING_TYPE_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_TYPE_SPONSORS",localName:"SPONSORS"},{no:2,name:"ADVERTISING_TYPE_INTERSTITIALS",localName:"INTERSTITIALS"},{no:3,name:"ADVERTISING_TYPE_BANNERS",localName:"BANNERS"}]);const Cr=n.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),Vr=n.makeMessageType("streamlayer.sdkSettings.BettingFavorite",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"icon",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"type",kind:"enum",T:n.getEnumType(Ur)}]),Qr=n.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Oa=n.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:qr}]),qr=n.makeMessageType("streamlayer.sdkSettings.BrandDefaults.Appearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}],{localName:"BrandDefaults_Appearance"}),xn=n.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:Vr,repeated:!0},{no:2,name:"primary_color",kind:"scalar",T:9},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"text_color",kind:"enum",T:n.getEnumType(Pr)},{no:5,name:"app_installed_text",kind:"scalar",T:9},{no:6,name:"app_not_installed_text",kind:"scalar",T:9},{no:7,name:"text_color_custom",kind:"scalar",T:9},{no:8,name:"cta_image",kind:"message",T:Qr}]),Yr=n.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:n.getEnumType(Ma)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:5,name:"default_channel_type",kind:"enum",T:n.getEnumType(ln)}]),we=n.makeMessageType("streamlayer.sdkSettings.GetStreamChannel",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"channel_id",kind:"scalar",T:9},{no:4,name:"channel_type",kind:"enum",T:n.getEnumType(ln)},{no:5,name:"is_default",kind:"enum",T:n.getEnumType(vr)}]),Hr=n.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:n.getEnumType(Ma)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:4,name:"default_channel_type",kind:"enum",T:n.getEnumType(ln)},{no:5,name:"default_channel",kind:"message",T:we},{no:6,name:"channels",kind:"message",T:we,repeated:!0}]),wa=n.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:Ue,repeated:!0},{no:2,name:"custom",kind:"scalar",T:8},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"primary_color",kind:"scalar",T:9},{no:5,name:"secondary_color",kind:"scalar",T:9},{no:6,name:"moderation_primary_color",kind:"scalar",T:9},{no:7,name:"link_share_icon",kind:"scalar",T:9},{no:8,name:"link_share_text",kind:"scalar",T:9},{no:9,name:"brand_defaults",kind:"message",T:Oa},{no:10,name:"getstream",kind:"message",T:Hr}]),Kr=n.makeMessageType("streamlayer.sdkSettings.JWK",()=>[{no:1,name:"alg",kind:"scalar",T:9,opt:!0},{no:2,name:"crv",kind:"scalar",T:9,opt:!0},{no:3,name:"d",kind:"scalar",T:9,opt:!0},{no:4,name:"dp",kind:"scalar",T:9,opt:!0},{no:5,name:"dq",kind:"scalar",T:9,opt:!0},{no:6,name:"e",kind:"scalar",T:9,opt:!0},{no:7,name:"ext",kind:"scalar",T:8,opt:!0},{no:8,name:"k",kind:"scalar",T:9,opt:!0},{no:9,name:"key_ops",kind:"scalar",T:9,repeated:!0},{no:10,name:"kid",kind:"scalar",T:9,opt:!0},{no:11,name:"kty",kind:"scalar",T:9,opt:!0},{no:12,name:"n",kind:"scalar",T:9,opt:!0},{no:13,name:"oth",kind:"message",T:$r,repeated:!0},{no:14,name:"p",kind:"scalar",T:9,opt:!0},{no:15,name:"q",kind:"scalar",T:9,opt:!0},{no:16,name:"qi",kind:"scalar",T:9,opt:!0},{no:17,name:"use",kind:"scalar",T:9,opt:!0},{no:18,name:"x",kind:"scalar",T:9,opt:!0},{no:19,name:"y",kind:"scalar",T:9,opt:!0},{no:20,name:"x5c",kind:"scalar",T:9,repeated:!0},{no:21,name:"x5t",kind:"scalar",T:9,opt:!0},{no:22,name:"x5u",kind:"scalar",T:9,opt:!0}]),$r=n.makeMessageType("streamlayer.sdkSettings.JWK.OTH",()=>[{no:1,name:"d",kind:"scalar",T:9,opt:!0},{no:2,name:"r",kind:"scalar",T:9,opt:!0},{no:3,name:"t",kind:"scalar",T:9,opt:!0}],{localName:"JWK_OTH"}),Ba=n.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:Ue,repeated:!0},{no:2,name:"button_icon",kind:"scalar",T:9},{no:3,name:"tinode_host",kind:"scalar",T:9},{no:4,name:"audience",kind:"scalar",T:9},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"provider",kind:"scalar",T:9},{no:7,name:"primary_color",kind:"scalar",T:9},{no:8,name:"secondary_color",kind:"scalar",T:9},{no:9,name:"moderation_primary_color",kind:"scalar",T:9},{no:10,name:"link_share_icon",kind:"scalar",T:9},{no:11,name:"link_share_text",kind:"scalar",T:9},{no:12,name:"brand_defaults",kind:"message",T:Oa},{no:13,name:"pub",kind:"message",T:Kr},{no:14,name:"getstream",kind:"message",T:Yr}]),Wr=n.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:Or},{no:2,name:"moderation",kind:"message",T:Lr},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:n.getEnumType(Fr)}]),Cn=n.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:we},{no:2,name:"channels",kind:"message",T:we,repeated:!0}]),ce=n.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:Cr,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:xn,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:xn,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:Wr,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:Cn,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:Cn,oneof:"overlay_settings"}]),zr=n.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:ce},{no:2,name:"global_preset",kind:"message",T:ce},{no:3,name:"preset",kind:"message",T:ce},{no:4,name:"stream",kind:"message",T:ce}]),Ue=n.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:n.getEnumType(ne)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:ce},{no:6,name:"meta",kind:"message",T:zr},{no:7,name:"enable",kind:"scalar",T:8},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:14,name:"enable_sdk_button",kind:"scalar",T:8}]);n.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:n.getEnumType(ne)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:ce},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);n.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);n.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:Jr}]);const Jr=n.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:Ue,repeated:!0}],{localName:"OverlaysListResponse_OverlaysListResponseData"});n.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:jr}]);const jr=n.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse.GenerateSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateSdkKeyResponse_GenerateSdkKeyResponseData"});n.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Xr}]);const Xr=n.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse.RemoveSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveSdkKeyResponse_RemoveSdkKeyResponseData"});n.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Zr}]);const Zr=n.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse.ListSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"ListSdkKeyResponse_ListSdkKeyResponseData"});n.makeMessageType("streamlayer.sdkSettings.RegisterTwitterRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"stream_id",kind:"scalar",T:9},{no:3,name:"account",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);n.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:no},{no:3,name:"settings",kind:"message",T:eo}]);const eo=n.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:Ue,repeated:!0},{no:2,name:"advertising",kind:"message",T:Da}]),no=n.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:n.getEnumType(Gr)},{no:2,name:"value",kind:"scalar",T:9}]),ao=n.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:Vn},{no:2,name:"videos",kind:"message",T:Vn}]),Vn=n.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraint",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5},{no:3,name:"max_file_size",kind:"scalar",T:1},{no:4,name:"mime",kind:"scalar",T:9}]),so=n.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplate",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"constraints",kind:"map",K:9,V:{kind:"message",T:ao}}]);n.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:so,repeated:!0}]);const to=n.makeMessageType("streamlayer.sdkSettings.AdvertisingImage",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"placement",kind:"enum",T:n.getEnumType(xr)}]),ro=n.makeMessageType("streamlayer.sdkSettings.AdvertisingVideo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"background_color",kind:"scalar",T:9}]),oo=n.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:to,repeated:!0},{no:3,name:"videos",kind:"message",T:ro,repeated:!0}]),io=n.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:n.getEnumType(ne)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:oo}},{no:3,name:"enabled",kind:"scalar",T:8},{no:4,name:"overlay_name",kind:"scalar",T:9},{no:5,name:"use_custom",kind:"scalar",T:8,opt:!0}]),Da=n.makeMessageType("streamlayer.sdkSettings.Advertising",()=>[{no:1,name:"template_id",kind:"scalar",T:9},{no:2,name:"overlay_settings",kind:"map",K:9,V:{kind:"message",T:io}}]);n.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:mo}]);const mo=n.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse.GenerateApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateApiKeyResponse_GenerateApiKeyResponseData"});n.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:co}]);const co=n.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse.RemoveApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveApiKeyResponse_RemoveApiKeyResponseData"});n.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:lo}]);const lo=n.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse.GetApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyResponse_GetApiKeyResponseData"});n.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:To}]);const To=n.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse.GetApiKeyStudioResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyStudioResponse_GetApiKeyStudioResponseData"});window.slStore=Object.create(null);ne.BETTING+"",ne.GAMES+"",ne.PUBLIC_CHAT+"",ne.TWITTER+"";window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));const uo=n.makeEnum("streamlayer.sports.LeagueSyncStatus",[{no:0,name:"LEAGUE_SYNC_STATUS_UNSET",localName:"UNSET"},{no:1,name:"LEAGUE_SYNC_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"LEAGUE_SYNC_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"LEAGUE_SYNC_STATUS_SYNCED",localName:"SYNCED"},{no:4,name:"LEAGUE_SYNC_STATUS_ERROR",localName:"ERROR"}]),dn=n.makeEnum("streamlayer.sports.EventStatus",[{no:0,name:"EVENT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_STATUS_PREGAME",localName:"PREGAME"},{no:2,name:"EVENT_STATUS_ACTIVE",localName:"ACTIVE"},{no:3,name:"EVENT_STATUS_BREAK",localName:"BREAK"},{no:4,name:"EVENT_STATUS_OVERTIME",localName:"OVERTIME"},{no:5,name:"EVENT_STATUS_SHOOTOUTS",localName:"SHOOTOUTS"},{no:6,name:"EVENT_STATUS_POSTGAME",localName:"POSTGAME"},{no:7,name:"EVENT_STATUS_CANCELLED",localName:"CANCELLED"}]),Tn=n.makeEnum("streamlayer.sports.EventEndless",[{no:0,name:"EVENT_ENDLESS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_ENDLESS_ENABLED",localName:"ENABLED"},{no:2,name:"EVENT_ENDLESS_DISABLED",localName:"DISABLED"}]),Pe=n.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),La=n.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),ve=n.makeMessageType("streamlayer.sports.Meta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}]),Fe=n.makeMessageType("streamlayer.sports.Venue",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"scalar",T:9},{no:3,name:"stadium",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sports.Team",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"alias",kind:"scalar",T:9},{no:5,name:"venue",kind:"message",T:Fe}]);const Ee=n.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),Ua=n.makeMessageType("streamlayer.sports.EventPeriod",()=>[{no:1,name:"number",kind:"scalar",T:5},{no:2,name:"score_home",kind:"scalar",T:5},{no:3,name:"score_away",kind:"scalar",T:5}]);n.makeMessageType("streamlayer.sports.Event",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"league_id",kind:"scalar",T:4},{no:4,name:"season_id",kind:"scalar",T:4},{no:5,name:"home_team_id",kind:"scalar",T:4},{no:6,name:"away_team_id",kind:"scalar",T:4},{no:7,name:"winner_team_id",kind:"scalar",T:4},{no:8,name:"scheduled",kind:"scalar",T:9},{no:9,name:"score_home",kind:"scalar",T:5},{no:10,name:"score_away",kind:"scalar",T:5},{no:11,name:"venue",kind:"message",T:Fe},{no:12,name:"event_time",kind:"message",T:Ee},{no:13,name:"status",kind:"enum",T:n.getEnumType(dn)},{no:14,name:"periods",kind:"message",T:Ua,repeated:!0},{no:15,name:"start_time",kind:"scalar",T:9},{no:16,name:"end_time",kind:"scalar",T:9},{no:17,name:"endless",kind:"enum",T:n.getEnumType(Tn)}]);const Pa=n.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),po=n.makeMessageType("streamlayer.sports.PlayerAttributes",()=>[{no:1,name:"display_id",kind:"scalar",T:5},{no:3,name:"full_first",kind:"scalar",T:9},{no:4,name:"full_last",kind:"scalar",T:9},{no:5,name:"uniform",kind:"scalar",T:9},{no:6,name:"height",kind:"message",T:ko},{no:7,name:"weight",kind:"message",T:yo},{no:8,name:"birth",kind:"message",T:go}]),ko=n.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),yo=n.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),go=n.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:Pa}],{localName:"PlayerAttributes_Birth"});n.makeMessageType("streamlayer.sports.PlayerAttributes.Birth.BirthDate",()=>[{no:1,name:"year",kind:"scalar",T:5},{no:2,name:"month",kind:"scalar",T:5},{no:3,name:"date",kind:"scalar",T:5},{no:4,name:"full",kind:"scalar",T:9}],{localName:"PlayerAttributes_Birth_BirthDate"});const fo=n.makeMessageType("streamlayer.sports.PlayerTeam",()=>[{no:1,name:"team_id",kind:"scalar",T:4},{no:2,name:"position",kind:"scalar",T:9},{no:3,name:"jersey_number",kind:"scalar",T:5}]);n.makeMessageType("streamlayer.sports.Player",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"first_name",kind:"scalar",T:9},{no:10,name:"last_name",kind:"scalar",T:9},{no:14,name:"display_name",kind:"scalar",T:9},{no:11,name:"birth_date",kind:"scalar",T:9},{no:12,name:"nationality",kind:"message",T:Pa},{no:13,name:"attributes",kind:"message",T:po},{no:15,name:"teams",kind:"message",T:fo,repeated:!0}]);const j=n.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);n.makeMessageType("streamlayer.sports.Season",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"scalar",T:9},{no:6,name:"year",kind:"scalar",T:5},{no:7,name:"league_id",kind:"scalar",T:4}]);const ye=n.makeMessageType("streamlayer.sports.SyncStatusStage",()=>[{no:1,name:"stage",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:4},{no:3,name:"datetime",kind:"scalar",T:9},{no:4,name:"error",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:n.getEnumType(uo)}]),So=n.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:ye},{no:2,name:"event",kind:"message",T:ye},{no:3,name:"events",kind:"message",T:ye},{no:4,name:"players",kind:"message",T:ye},{no:5,name:"leagues",kind:"message",T:ye}]),_o=n.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:So}]);n.makeMessageType("streamlayer.sports.League",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"country",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9},{no:13,name:"sync",kind:"scalar",T:8},{no:14,name:"sport_id",kind:"scalar",T:4},{no:12,name:"sync_status",kind:"message",T:_o,repeated:!0}]);n.makeMessageType("streamlayer.sports.Sport",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"created",kind:"scalar",T:9},{no:3,name:"updated",kind:"scalar",T:9},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9}]);const Eo=n.makeMessageType("streamlayer.sports.NflEventStatistics",()=>[{no:1,name:"passes",kind:"scalar",T:5},{no:2,name:"rushes",kind:"scalar",T:5},{no:3,name:"penalties",kind:"scalar",T:5},{no:4,name:"turnovers",kind:"scalar",T:5}]),ho=n.makeMessageType("streamlayer.sports.SoccerEventStatistics",()=>[{no:1,name:"ball_possession",kind:"scalar",T:5},{no:2,name:"throw_ins",kind:"scalar",T:5},{no:3,name:"fouls",kind:"scalar",T:5},{no:4,name:"goal_kicks",kind:"scalar",T:5},{no:5,name:"free_kicks",kind:"scalar",T:5},{no:6,name:"shots_on_target",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"shots_off_target",kind:"scalar",T:5},{no:9,name:"shots_saved",kind:"scalar",T:5},{no:10,name:"offsides",kind:"scalar",T:5},{no:11,name:"shots_blocked",kind:"scalar",T:5},{no:12,name:"yellow_cards",kind:"scalar",T:5}]);n.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:Eo,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:ho,oneof:"statistics"}]);const X=n.makeMessageType("streamlayer.sports.EventTeam",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"is_winner",kind:"scalar",T:8}]),Ro=n.makeMessageType("streamlayer.sports.EventCustomFields",()=>[{no:1,name:"preview",kind:"scalar",T:9},{no:2,name:"stream",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"event_ids",kind:"scalar",T:9,repeated:!0},{no:6,name:"subtitle",kind:"scalar",T:9},{no:7,name:"promotitle",kind:"scalar",T:9},{no:8,name:"slate",kind:"scalar",T:9},{no:9,name:"horizontal_preview",kind:"scalar",T:9},{no:10,name:"small_logo",kind:"scalar",T:9},{no:11,name:"description",kind:"scalar",T:9}]),No=n.makeMessageType("streamlayer.sports.EventProgram",()=>[{no:1,name:"id",kind:"scalar",T:9,opt:!0},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:9},{no:4,name:"end_time",kind:"scalar",T:9},{no:5,name:"thumbnail_url",kind:"scalar",T:9},{no:6,name:"square_thumbnail_url",kind:"scalar",T:9}]),bo=n.makeMessageType("streamlayer.sports.EventData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"sport",kind:"scalar",T:9},{no:3,name:"league",kind:"scalar",T:9},{no:4,name:"scheduled",kind:"scalar",T:9},{no:5,name:"home",kind:"message",T:X},{no:6,name:"away",kind:"message",T:X},{no:7,name:"status",kind:"enum",T:n.getEnumType(dn)},{no:8,name:"custom_fields",kind:"message",T:Ro},{no:9,name:"start_time",kind:"scalar",T:9},{no:10,name:"end_time",kind:"scalar",T:9},{no:11,name:"venue",kind:"message",T:Fe},{no:12,name:"schedule",kind:"message",T:No,repeated:!0},{no:13,name:"endless",kind:"enum",T:n.getEnumType(Tn)}]),se=n.makeMessageType("streamlayer.sports.EventSummary",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"scheduled",kind:"scalar",T:9},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"venue",kind:"message",T:Fe},{no:6,name:"event_time",kind:"message",T:Ee},{no:7,name:"home_team",kind:"message",T:X},{no:8,name:"away_team",kind:"message",T:X},{no:9,name:"status",kind:"enum",T:n.getEnumType(dn)},{no:10,name:"periods",kind:"message",T:Ua,repeated:!0},{no:11,name:"league",kind:"scalar",T:9},{no:12,name:"start_time",kind:"scalar",T:9},{no:13,name:"end_time",kind:"scalar",T:9},{no:14,name:"name",kind:"scalar",T:9},{no:15,name:"logo",kind:"scalar",T:9},{no:16,name:"stream_url",kind:"scalar",T:9}]),Ne=n.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),Qn=n.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);n.makeMessageType("streamlayer.sports.Query",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"match",kind:"message",T:Ne,repeated:!0},{no:3,name:"ne",kind:"message",T:Ne,repeated:!0},{no:4,name:"eq",kind:"message",T:Ne,repeated:!0},{no:5,name:"between",kind:"message",T:Qn,repeated:!0},{no:6,name:"includes",kind:"message",T:Qn,repeated:!0},{no:7,name:"is",kind:"message",T:Ne,repeated:!0}]);const Io=n.makeEnum("streamlayer.sports.baseball.PitcherStatus",[{no:0,name:"PITCHER_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PITCHER_STATUS_WIN",localName:"WIN"},{no:2,name:"PITCHER_STATUS_LOSS",localName:"LOSS"}]),Ao=n.makeEnum("streamlayer.sports.baseball.BaseballBase",[{no:0,name:"BASEBALL_BASE_UNSET",localName:"UNSET"},{no:1,name:"BASEBALL_BASE_FIRST",localName:"FIRST"},{no:2,name:"BASEBALL_BASE_SECOND",localName:"SECOND"},{no:3,name:"BASEBALL_BASE_THIRD",localName:"THIRD"}]),qn=n.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:va},{no:2,name:"status",kind:"enum",T:n.getEnumType(Io)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),Mo=n.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),Oo=n.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:n.getEnumType(Ao)},{no:2,name:"player",kind:"message",T:Mo}]),wo=n.makeMessageType("streamlayer.sports.baseball.Hitting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"hits_per_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"run_batted_in",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"batting_average",kind:"scalar",T:9}]),Bo=n.makeMessageType("streamlayer.sports.baseball.Batting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"at_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"hits",kind:"scalar",T:9},{no:5,name:"batting_average",kind:"scalar",T:9}]),va=n.makeMessageType("streamlayer.sports.baseball.Pitching",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"innings_pitched",kind:"scalar",T:9},{no:3,name:"hits_by_pitch",kind:"scalar",T:9},{no:4,name:"earned_runs",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"strikeouts",kind:"scalar",T:9}]),Yn=n.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:wo,repeated:!0},{no:2,name:"batting",kind:"message",T:Bo,repeated:!0},{no:3,name:"pitching",kind:"message",T:va,repeated:!0}]),Do=n.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:qn},{no:2,name:"away_pitcher",kind:"message",T:qn},{no:3,name:"home_statistics",kind:"message",T:Yn},{no:4,name:"away_statistics",kind:"message",T:Yn}]),Lo=n.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:X},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:Uo,repeated:!0},{no:5,name:"runs",kind:"scalar",T:5},{no:6,name:"hits",kind:"scalar",T:5},{no:7,name:"errors",kind:"scalar",T:5}]),Uo=n.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics.BaseballPlayByPlayDetailStatistics",()=>[{no:1,name:"score_home",kind:"scalar",T:5},{no:2,name:"score_away",kind:"scalar",T:5},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}],{localName:"BaseballPlayByPlayStatistics_BaseballPlayByPlayDetailStatistics"}),Po=n.makeMessageType("streamlayer.sports.baseball.EventScore",()=>[{no:1,name:"outs",kind:"scalar",T:5},{no:2,name:"inning",kind:"scalar",T:5},{no:3,name:"inning_division",kind:"scalar",T:9},{no:4,name:"is_delayed",kind:"scalar",T:8},{no:5,name:"reason_for_delay",kind:"scalar",T:9},{no:6,name:"runners_on_base",kind:"message",T:Oo,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:j},{no:9,name:"away_team_record",kind:"message",T:j}]),vo=n.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Lo,repeated:!0}]),Fo=n.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Do}]),Go=n.makeMessageType("streamlayer.sports.baseball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:xo},{no:11,name:"rank",kind:"message",T:Co},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),xo=n.makeMessageType("streamlayer.sports.baseball.TeamStanding.Streak",()=>[{no:1,name:"losses",kind:"scalar",T:5},{no:2,name:"wins",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Co=n.makeMessageType("streamlayer.sports.baseball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Vo=n.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:Go,repeated:!0}]),Qo=n.makeEnum("streamlayer.sports.basketball.BasketballPerformerCategory",[{no:0,name:"BASKETBALL_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"BASKETBALL_PERFORMER_CATEGORY_POINTS",localName:"POINTS"},{no:2,name:"BASKETBALL_PERFORMER_CATEGORY_REBOUNDS",localName:"REBOUNDS"},{no:3,name:"BASKETBALL_PERFORMER_CATEGORY_ASSISTS",localName:"ASSISTS"}]),qo=n.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:j},{no:9,name:"away_team_record",kind:"message",T:j}]),Hn=n.makeMessageType("streamlayer.sports.basketball.BasketballTeamSummary",()=>[{no:1,name:"field_goal_percentage",kind:"scalar",T:1},{no:2,name:"three_pts_percentage",kind:"scalar",T:1},{no:3,name:"free_throw_percentage",kind:"scalar",T:1},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5}]),Kn=n.makeMessageType("streamlayer.sports.basketball.BasketballPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:9}]),Yo=n.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:n.getEnumType(Qo)},{no:2,name:"home_player",kind:"message",T:Kn},{no:3,name:"away_player",kind:"message",T:Kn}]),Ho=n.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Hn},{no:2,name:"away_statistics",kind:"message",T:Hn}]),Ko=n.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Ho},{no:2,name:"top_performers",kind:"message",T:Yo,repeated:!0},{no:3,name:"last_games",kind:"message",T:Fa}]),$o=n.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:X},{no:2,name:"event_time",kind:"message",T:Ee},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),Wo=n.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:$o,repeated:!0}]),$n=n.makeMessageType("streamlayer.sports.basketball.PlayerScores",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"points",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5},{no:6,name:"minutes",kind:"scalar",T:1},{no:7,name:"starter",kind:"scalar",T:8}]),zo=n.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:$n,repeated:!0},{no:2,name:"away_players",kind:"message",T:$n,repeated:!0}]),Jo=n.makeMessageType("streamlayer.sports.basketball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:jo},{no:11,name:"rank",kind:"message",T:Xo},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),jo=n.makeMessageType("streamlayer.sports.basketball.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Xo=n.makeMessageType("streamlayer.sports.basketball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Zo=n.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:Jo,repeated:!0}]),Wn=n.makeMessageType("streamlayer.sports.basketball.BasketballMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),zn=n.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Wn,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Wn,repeated:!0}]),ei=n.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:zn},{no:2,name:"away_team",kind:"message",T:zn}]),He=n.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:ni}]),ni=n.makeMessageType("streamlayer.sports.basketball.BasketballLastGame.BasketballLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"BasketballLastGame_BasketballLastGameAttributes"}),Fa=n.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:He,repeated:!0},{no:2,name:"away",kind:"message",T:He,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:He,repeated:!0}]),ai=n.makeEnum("streamlayer.sports.hockey.HockeyPerformerCategory",[{no:0,name:"HOCKEY_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PERFORMER_CATEGORY_GOALS",localName:"GOALS"},{no:2,name:"HOCKEY_PERFORMER_CATEGORY_SHOTS",localName:"SHOTS"},{no:3,name:"HOCKEY_PERFORMER_CATEGORY_HITS",localName:"HITS"},{no:4,name:"HOCKEY_PERFORMER_CATEGORY_SAVES",localName:"SAVES"}]),Ga=n.makeEnum("streamlayer.sports.hockey.HockeyPlayerPosition",[{no:0,name:"HOCKEY_PLAYER_POSITION_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PLAYER_POSITION_CENTER",localName:"CENTER"},{no:2,name:"HOCKEY_PLAYER_POSITION_LEFT_WIND",localName:"LEFT_WIND"},{no:3,name:"HOCKEY_PLAYER_POSITION_RIGHT_WING",localName:"RIGHT_WING"},{no:4,name:"HOCKEY_PLAYER_POSITION_DEFENSE",localName:"DEFENSE"},{no:5,name:"HOCKEY_PLAYER_POSITION_GOALTENDER",localName:"GOALTENDER"}]),si=n.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:j},{no:9,name:"away_team_record",kind:"message",T:j}]),Jn=n.makeMessageType("streamlayer.sports.hockey.HockeyPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),ti=n.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:n.getEnumType(ai)},{no:2,name:"home_player",kind:"message",T:Jn,repeated:!0},{no:3,name:"away_player",kind:"message",T:Jn,repeated:!0}]),jn=n.makeMessageType("streamlayer.sports.hockey.HockeyTeamSummary",()=>[{no:1,name:"shots_on_goal",kind:"scalar",T:5},{no:2,name:"faceoff",kind:"scalar",T:1},{no:3,name:"powerplay",kind:"scalar",T:5},{no:4,name:"penalty_minutes",kind:"scalar",T:5},{no:5,name:"hits",kind:"scalar",T:5},{no:6,name:"blocks",kind:"scalar",T:5},{no:7,name:"giveaways",kind:"scalar",T:5},{no:8,name:"takeaways",kind:"scalar",T:5}]),ri=n.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:jn},{no:2,name:"away_statistics",kind:"message",T:jn}]),oi=n.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:ri},{no:2,name:"top_performers",kind:"message",T:ti,repeated:!0}]),ii=n.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:X},{no:2,name:"event_time",kind:"message",T:Ee},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),mi=n.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:ii,repeated:!0}]),Ke=n.makeMessageType("streamlayer.sports.hockey.PlayerScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"goals",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"shots",kind:"scalar",T:5},{no:6,name:"penalty_minutes",kind:"scalar",T:1},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:n.getEnumType(Ga)}]),Xn=n.makeMessageType("streamlayer.sports.hockey.GoaltenderScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"shots_againts",kind:"scalar",T:5},{no:4,name:"goals_againts",kind:"scalar",T:5},{no:5,name:"saves",kind:"scalar",T:5},{no:6,name:"saves_pct",kind:"scalar",T:5},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:n.getEnumType(Ga)}]),Zn=n.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:Ke,repeated:!0},{no:2,name:"goaltender",kind:"message",T:Xn},{no:3,name:"forwards",kind:"message",T:Ke,repeated:!0},{no:4,name:"defensemen",kind:"message",T:Ke,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:Xn,repeated:!0}]),ci=n.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Zn},{no:2,name:"away_players",kind:"message",T:Zn}]),li=n.makeMessageType("streamlayer.sports.hockey.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:di},{no:11,name:"rank",kind:"message",T:Ti},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),di=n.makeMessageType("streamlayer.sports.hockey.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Ti=n.makeMessageType("streamlayer.sports.hockey.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),ui=n.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:li,repeated:!0}]),pi=n.makeEnum("streamlayer.sports.soccer.SoccerPerformerCategory",[{no:0,name:"SOCCER_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"SOCCER_PERFORMER_CATEGORY_ATTACK",localName:"ATTACK"},{no:2,name:"SOCCER_PERFORMER_CATEGORY_MIDFIELD",localName:"MIDFIELD"},{no:3,name:"SOCCER_PERFORMER_CATEGORY_DEFENSE",localName:"DEFENSE"}]),ki=n.makeEnum("streamlayer.sports.soccer.SoccerMatchActivityType",[{no:0,name:"SOCCER_MATCH_ACTIVITY_UNSET"},{no:1,name:"SOCCER_MATCH_ACTIVITY_GOAL"},{no:2,name:"SOCCER_MATCH_ACTIVITY_YELLOW_CARD"},{no:3,name:"SOCCER_MATCH_ACTIVITY_RED_CARD"},{no:4,name:"SOCCER_MATCH_ACTIVITY_SUBSTITUTION"},{no:5,name:"SOCCER_MATCH_ACTIVITY_HALF_TIME"},{no:6,name:"SOCCER_MATCH_ACTIVITY_FULL_TIME"}]),yi=n.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:j},{no:9,name:"away_team_record",kind:"message",T:j}]),un=n.makeMessageType("streamlayer.sports.soccer.SoccerPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),gi=n.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:un},{no:2,name:"attack_stats",kind:"message",T:Ii}]),fi=n.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:un},{no:2,name:"midfield_stats",kind:"message",T:Ai}]),Si=n.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:un},{no:2,name:"defense_stats",kind:"message",T:Mi}]),_i=n.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:n.getEnumType(pi)},{no:2,name:"attack_performer",kind:"message",T:gi},{no:3,name:"midfield_performer",kind:"message",T:fi},{no:4,name:"defense_performer",kind:"message",T:Si}]),Ei=n.makeMessageType("streamlayer.sports.soccer.SoccerTeamTopMatchStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"shots",kind:"scalar",T:5},{no:3,name:"shots_on_target",kind:"scalar",T:5},{no:4,name:"passes",kind:"scalar",T:5},{no:5,name:"offsides",kind:"scalar",T:5},{no:6,name:"yellow_cards",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"free_kicks",kind:"scalar",T:5},{no:9,name:"red_cards",kind:"scalar",T:5}]),hi=n.makeMessageType("streamlayer.sports.soccer.SoccerTeamAttackingStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"passing_accuracy",kind:"scalar",T:1},{no:3,name:"chances_created",kind:"scalar",T:5},{no:4,name:"successful_crosses",kind:"scalar",T:1}]),Ri=n.makeMessageType("streamlayer.sports.soccer.SoccerTeamDefenseStats",()=>[{no:1,name:"tackles_made",kind:"scalar",T:5},{no:2,name:"interceptions",kind:"scalar",T:5},{no:3,name:"blocked_shots",kind:"scalar",T:5},{no:4,name:"clearances",kind:"scalar",T:5},{no:5,name:"duels_won",kind:"scalar",T:5}]),ea=n.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:Ei},{no:2,name:"attacking_stats",kind:"message",T:hi},{no:3,name:"defense_stats",kind:"message",T:Ri}]),Ni=n.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:ea},{no:2,name:"away_statistics",kind:"message",T:ea},{no:3,name:"perfomers",kind:"message",T:_i}]),bi=n.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Ni},{no:2,name:"last_games",kind:"message",T:xa}]),Ii=n.makeMessageType("streamlayer.sports.soccer.SoccerPlayerAttackingStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"shots",kind:"scalar",T:5},{no:4,name:"shots_on_goal",kind:"scalar",T:5},{no:5,name:"penalty_kick_goals",kind:"scalar",T:5}]),Ai=n.makeMessageType("streamlayer.sports.soccer.SoccerPlayerMidfieldStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"key_passes",kind:"scalar",T:5},{no:4,name:"crosses",kind:"scalar",T:5},{no:5,name:"corners",kind:"scalar",T:5}]),Mi=n.makeMessageType("streamlayer.sports.soccer.SoccerPlayerDefenseStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"tackles_made",kind:"scalar",T:5},{no:4,name:"interceptions",kind:"scalar",T:5},{no:5,name:"blocked_shots",kind:"scalar",T:5}]);n.makeMessageType("streamlayer.sports.soccer.SoccerMatchOdds",()=>[{no:1,name:"home_team_win",kind:"scalar",T:1},{no:2,name:"draw",kind:"scalar",T:1},{no:3,name:"away_team_win",kind:"scalar",T:1}]);const Oi=n.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrixPlayer",()=>[{no:1,name:"jersey_number",kind:"scalar",T:5},{no:2,name:"player_name",kind:"scalar",T:9},{no:3,name:"photo",kind:"scalar",T:9}]),wi=n.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:Oi,repeated:!0}]),na=n.makeMessageType("streamlayer.sports.soccer.SoccerMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),aa=n.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:wi,repeated:!0},{no:3,name:"start_players",kind:"message",T:na,repeated:!0},{no:4,name:"substitutes",kind:"message",T:na,repeated:!0}]),Bi=n.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:aa},{no:2,name:"away_team",kind:"message",T:aa}]);n.makeMessageType("streamlayer.sports.soccer.SoccerMatchScore",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"mil",kind:"scalar",T:1},{no:3,name:"round",kind:"scalar",T:9},{no:4,name:"live_url",kind:"scalar",T:9}]);const Di=n.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:X},{no:2,name:"event_time",kind:"message",T:Ee},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5},{no:8,name:"type",kind:"enum",T:n.getEnumType(ki)}]),Li=n.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Di,repeated:!0}]),Ui=n.makeMessageType("streamlayer.sports.soccer.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"draws",kind:"scalar",T:5},{no:9,name:"games_behind",kind:"scalar",T:5},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"points",kind:"scalar",T:5},{no:14,name:"position",kind:"scalar",T:5},{no:15,name:"total_goals",kind:"scalar",T:5},{no:16,name:"total_goals_received",kind:"scalar",T:5}]),Pi=n.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:Ui,repeated:!0}]),$e=n.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:vi}]),vi=n.makeMessageType("streamlayer.sports.soccer.SoccerLastGame.SoccerLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"SoccerLastGame_SoccerLastGameAttributes"}),xa=n.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:$e,repeated:!0},{no:2,name:"away",kind:"message",T:$e,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:$e,repeated:!0}]),te=n.makeEnum("streamlayer.sports.events.EventType",[{no:0,name:"EVENT_TYPE_UNSET",localName:"UNSET"},{no:1,name:"EVENT_TYPE_BASEBALL",localName:"BASEBALL"},{no:2,name:"EVENT_TYPE_BASKETBALL",localName:"BASKETBALL"},{no:3,name:"EVENT_TYPE_HOCKEY",localName:"HOCKEY"},{no:4,name:"EVENT_TYPE_SOCCER",localName:"SOCCER"},{no:5,name:"EVENT_TYPE_GOLF",localName:"GOLF"}]),Fi=n.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:se},{no:2,name:"baseball",kind:"message",T:Po,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:qo,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:si,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:yi,oneof:"sport"}]),Gi=n.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:n.getEnumType(te)},{no:3,name:"attributes",kind:"message",T:Fi}]),xi=n.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:bo}]),Ca=n.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:xi}]),Ci=n.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:Vi},{no:2,name:"pagination",kind:"message",T:Pe},{no:3,name:"sort",kind:"message",T:La},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),Vi=n.makeMessageType("streamlayer.sports.events.ListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9},{no:3,name:"start_date_time",kind:"scalar",T:9},{no:4,name:"end_date_time",kind:"scalar",T:9},{no:5,name:"sport",kind:"scalar",T:9},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"endless",kind:"enum",T:n.getEnumType(Tn)}],{localName:"ListRequest_Filter"}),Qi=n.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:qi},{no:2,name:"pagination",kind:"message",T:Pe},{no:3,name:"sort",kind:"message",T:La}]),qi=n.makeMessageType("streamlayer.sports.events.DemoListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"DemoListRequest_Filter"}),Yi=n.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:ve},{no:2,name:"data",kind:"message",T:Ca,repeated:!0}]),Hi=n.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:ve},{no:2,name:"data",kind:"message",T:Ca,repeated:!0}]),sa=n.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),ta=n.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:Ki}]),Ki=n.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:n.getEnumType(te)},{no:3,name:"attributes",kind:"message",T:$i}],{localName:"SummaryResponse_ResponseData"}),$i=n.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:se},{no:2,name:"baseball",kind:"message",T:Fo,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Ko,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:oi,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:bi,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),Wi=n.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),zi=n.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:Ji}]),Ji=n.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:ji}],{localName:"AdminSummaryResponse_ResponseData"}),ji=n.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:se}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),Xi=n.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:Pe},{no:3,name:"order",kind:"scalar",T:9}]),Zi=n.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:em},{no:2,name:"meta",kind:"message",T:ve}]),em=n.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:n.getEnumType(te)},{no:3,name:"attributes",kind:"message",T:nm}],{localName:"PlayByPlayResponse_ResponseData"}),nm=n.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:se},{no:2,name:"baseball",kind:"message",T:vo,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Wo,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:mi,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Li,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),am=n.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:sm},{no:2,name:"pagination",kind:"message",T:Pe}]),sm=n.makeMessageType("streamlayer.sports.events.ScheduleRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleRequest_Filter"}),tm=n.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:Gi,repeated:!0},{no:2,name:"meta",kind:"message",T:ve}]),rm=n.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:om}]),om=n.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),im=n.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),mm=n.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),cm=n.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:lm}]),lm=n.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:n.getEnumType(te)},{no:3,name:"attributes",kind:"message",T:dm}],{localName:"BoxscoreResponse_ResponseData"}),dm=n.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:se},{no:2,name:"basketball",kind:"message",T:zo,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:ci,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),Tm=n.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),um=n.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:pm}]),pm=n.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:n.getEnumType(te)},{no:2,name:"attributes",kind:"message",T:km}],{localName:"StandingsResponse_ResponseData"}),km=n.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:Zo,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:ui,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:Vo,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Pi,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),ym=n.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),gm=n.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:fm}]),fm=n.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:n.getEnumType(te)},{no:3,name:"attributes",kind:"message",T:Sm}],{localName:"LineupResponse_ResponseData"}),Sm=n.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:se},{no:2,name:"soccer",kind:"message",T:Bi,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:ei,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),_m=n.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Em=n.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:hm}]),hm=n.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:n.getEnumType(te)},{no:3,name:"attributes",kind:"message",T:Rm}],{localName:"LastGamesResponse_ResponseData"}),Rm=n.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:se},{no:2,name:"soccer",kind:"message",T:xa,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Fa,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),Nm=n.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),bm=n.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:Im}]),Im=n.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"});b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.ServerStreaming;const Am=n.makeEnum("streamlayer.sdkSettings.client.VisibleStatus",[{no:0,name:"VISIBLE_STATUS_UNSET",localName:"UNSET"},{no:1,name:"VISIBLE_STATUS_INCOGNITO",localName:"INCOGNITO"},{no:2,name:"VISIBLE_STATUS_VISIBLE",localName:"VISIBLE"}]),Mm=n.makeEnum("streamlayer.sdkSettings.client.MessagesNotify",[{no:0,name:"MESSAGES_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_NOTIFY_ALLOW",localName:"ALLOW"}]),Om=n.makeEnum("streamlayer.sdkSettings.client.FriendsNotify",[{no:0,name:"FRIENDS_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_NOTIFY_ALLOW",localName:"ALLOW"}]),wm=n.makeEnum("streamlayer.sdkSettings.client.TwitterNotify",[{no:0,name:"TWITTER_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_NOTIFY_ALLOW",localName:"ALLOW"}]),Bm=n.makeEnum("streamlayer.sdkSettings.client.CallsSound",[{no:0,name:"CALLS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"CALLS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"CALLS_SOUND_ALLOW",localName:"ALLOW"}]),Dm=n.makeEnum("streamlayer.sdkSettings.client.MessagesSound",[{no:0,name:"MESSAGES_SOUND_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_SOUND_ALLOW",localName:"ALLOW"}]),Lm=n.makeEnum("streamlayer.sdkSettings.client.FriendsSound",[{no:0,name:"FRIENDS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_SOUND_ALLOW",localName:"ALLOW"}]),Um=n.makeEnum("streamlayer.sdkSettings.client.TwitterSound",[{no:0,name:"TWITTER_SOUND_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_SOUND_ALLOW",localName:"ALLOW"}]),Va=n.makeEnum("streamlayer.sdkSettings.client.SettingsAllow",[{no:0,name:"SETTINGS_ALLOW_UNSET",localName:"UNSET"},{no:1,name:"SETTINGS_ALLOW_DISALLOW",localName:"DISALLOW"},{no:2,name:"SETTINGS_ALLOW_ALLOW",localName:"ALLOW"}]),Pm=n.makeEnum("streamlayer.sdkSettings.client.ManagedGroupType",[{no:0,name:"MANAGED_GROUP_TYPE_UNSET",localName:"UNSET"},{no:1,name:"MANAGED_GROUP_TYPE_CHAT",localName:"CHAT"},{no:2,name:"MANAGED_GROUP_TYPE_WP",localName:"WP"}]),vm=n.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:n.getEnumType(Va)}]),Fm=n.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:n.getEnumType(Va)}]),We=n.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:vm},{no:2,name:"sound",kind:"message",T:Fm}]),pn=n.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:n.getEnumType(Am)},{no:2,name:"messages_notify",kind:"enum",T:n.getEnumType(Mm)},{no:3,name:"friends_notify",kind:"enum",T:n.getEnumType(Om)},{no:4,name:"calls_sound",kind:"enum",T:n.getEnumType(Bm)},{no:5,name:"messages_sound",kind:"enum",T:n.getEnumType(Dm)},{no:6,name:"friends_sound",kind:"enum",T:n.getEnumType(Lm)},{no:7,name:"twitter_notify",kind:"enum",T:n.getEnumType(wm)},{no:8,name:"twitter_sound",kind:"enum",T:n.getEnumType(Um)},{no:9,name:"gamification",kind:"message",T:We},{no:10,name:"watch_party_invitation",kind:"message",T:We},{no:11,name:"twitter_question",kind:"message",T:We}]),Gm=n.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),xm=n.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:Cm}]),Cm=n.makeMessageType("streamlayer.sdkSettings.client.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:pn}],{localName:"GetResponse_GetResponseData"}),Vm=n.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:pn}]),Qm=n.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:qm}]),qm=n.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse.UpdateResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:pn}],{localName:"UpdateResponse_UpdateResponseData"}),Ym=n.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Hm=n.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:Km}]),Km=n.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:wa}],{localName:"GetStreamResponse_GetResponseData"}),$m=n.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),Wm=n.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:zm}]),zm=n.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ba}],{localName:"GetOrganizationResponse_GetResponseData"}),Jm=n.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),jm=n.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:Xm}]),Xm=n.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse.GetOrganizationAdvertisingResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Da}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),Zm=n.makeMessageType("streamlayer.sdkSettings.client.ManagedGroup",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"fantasy_group_id",kind:"scalar",T:9},{no:3,name:"group_type",kind:"enum",T:n.getEnumType(Pm)}]),Qa=n.makeMessageType("streamlayer.sdkSettings.client.DeepLinkData",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"gamification",kind:"scalar",T:8},{no:4,name:"managed_group",kind:"message",T:Zm},{no:5,name:"external_event_id",kind:"scalar",T:9}]),ec=n.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:Qa}]),nc=n.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),ac=n.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:sc}]),sc=n.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:nc}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});n.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:tc}]);const tc=n.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Qa}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),rc=n.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),oc=n.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),ic=n.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:mc}]),mc=n.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:wa}],{localName:"StreamSubscriptionResponse_ResponseData"}),cc=n.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:lc}]),lc=n.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ba}],{localName:"OrganizationSubscriptionResponse_ResponseData"});b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.Unary,b.ServerStreaming,b.ServerStreaming;const dc=n.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),Tc=n.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),uc=n.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:Tc},{no:7,name:"public_name",kind:"scalar",T:9}]);n.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const pc=n.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:n.getEnumType(dc)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),kc=n.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:pc}]),kn=n.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:uc}]);n.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:kc}]);const yc=n.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),gc=n.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:fc},{no:2,name:"data",kind:"message",T:kn}]),fc=n.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),Sc=n.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),_c=n.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),Ec=n.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:_c}]),hc=n.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Rc=n.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),Nc=n.makeMessageType("streamlayer.users.MeRequest",[]),bc=n.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:kn}]),Ic=n.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),Ac=n.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),Mc=n.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),Oc=n.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),wc=n.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),Bc=n.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),Dc=n.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),Lc=n.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),Uc=n.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:Pc}]),Pc=n.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),vc=n.makeMessageType("streamlayer.users.InviteResponse",[]),Fc=n.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),Gc=n.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:xc},{no:2,name:"data",kind:"message",T:kn,opt:!0}]),xc=n.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Cc={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:yc,O:gc,kind:b.Unary},register:{name:"Register",I:Sc,O:Ec,kind:b.Unary},requestPassword:{name:"RequestPassword",I:hc,O:Rc,kind:b.Unary},me:{name:"Me",I:Nc,O:bc,kind:b.Unary},invite:{name:"Invite",I:Uc,O:vc,kind:b.Unary},bypassAuth:{name:"BypassAuth",I:Fc,O:Gc,kind:b.Unary},updateMetadata:{name:"UpdateMetadata",I:Ic,O:Lc,kind:b.Unary},updateAvatar:{name:"UpdateAvatar",I:Ac,O:Mc,kind:b.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:Oc,O:wc,kind:b.Unary},updatePublicName:{name:"UpdatePublicName",I:Bc,O:Dc,kind:b.Unary}}},Vc=(t,s)=>{const{client:o}=t.createPromiseClient(Cc,{method:"bypassAuth"});return o.bypassAuth(s)},Qc=async(t,s)=>{var h,N;const{schemaName:o,issuer:m}={schemaName:"slra",issuer:"sdk-web"},i=await t.stores.organizationSettings.getValue();if(!i)throw new Error("unknown organization");const d=`${(h=i.pub)==null?void 0:h.kid}`,u=`${o}:${i.id}`,k=(N=(await Vc(t.transport,{userKey:d,schema:u,init:!0})).meta)==null?void 0:N.token,g=i.pub,S=await On.importJWK({...g}),_=window.crypto.randomUUID(),E=await new On.EncryptJWT({"device-id":_,totp:k}).setProtectedHeader({alg:g.alg||"",enc:"A256CBC-HS512",kid:g.kid}).setIssuedAt().setIssuer(m).setAudience(i.id).setExpirationTime("2m").encrypt(S);return t.sdk.authorizationBypass(u,E)},qc=(t,s,o)=>{t.sdk.anonymousAuthorization=async()=>{await Qc(t)},o()};exports.anonymous=qc;
|
|
190
|
+
*/
|
|
191
|
+
(function(exports2) {
|
|
192
|
+
const base64 = base64Js;
|
|
193
|
+
const ieee754$1 = ieee754;
|
|
194
|
+
const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
195
|
+
exports2.Buffer = Buffer;
|
|
196
|
+
exports2.SlowBuffer = SlowBuffer;
|
|
197
|
+
exports2.INSPECT_MAX_BYTES = 50;
|
|
198
|
+
const K_MAX_LENGTH = 2147483647;
|
|
199
|
+
exports2.kMaxLength = K_MAX_LENGTH;
|
|
200
|
+
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
201
|
+
if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
202
|
+
console.error(
|
|
203
|
+
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function typedArraySupport() {
|
|
207
|
+
try {
|
|
208
|
+
const arr = new Uint8Array(1);
|
|
209
|
+
const proto = { foo: function() {
|
|
210
|
+
return 42;
|
|
211
|
+
} };
|
|
212
|
+
Object.setPrototypeOf(proto, Uint8Array.prototype);
|
|
213
|
+
Object.setPrototypeOf(arr, proto);
|
|
214
|
+
return arr.foo() === 42;
|
|
215
|
+
} catch (e) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
Object.defineProperty(Buffer.prototype, "parent", {
|
|
220
|
+
enumerable: true,
|
|
221
|
+
get: function() {
|
|
222
|
+
if (!Buffer.isBuffer(this))
|
|
223
|
+
return void 0;
|
|
224
|
+
return this.buffer;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
Object.defineProperty(Buffer.prototype, "offset", {
|
|
228
|
+
enumerable: true,
|
|
229
|
+
get: function() {
|
|
230
|
+
if (!Buffer.isBuffer(this))
|
|
231
|
+
return void 0;
|
|
232
|
+
return this.byteOffset;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
function createBuffer(length) {
|
|
236
|
+
if (length > K_MAX_LENGTH) {
|
|
237
|
+
throw new RangeError('The value "' + length + '" is invalid for option "size"');
|
|
238
|
+
}
|
|
239
|
+
const buf = new Uint8Array(length);
|
|
240
|
+
Object.setPrototypeOf(buf, Buffer.prototype);
|
|
241
|
+
return buf;
|
|
242
|
+
}
|
|
243
|
+
function Buffer(arg, encodingOrOffset, length) {
|
|
244
|
+
if (typeof arg === "number") {
|
|
245
|
+
if (typeof encodingOrOffset === "string") {
|
|
246
|
+
throw new TypeError(
|
|
247
|
+
'The "string" argument must be of type string. Received type number'
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
return allocUnsafe(arg);
|
|
251
|
+
}
|
|
252
|
+
return from(arg, encodingOrOffset, length);
|
|
253
|
+
}
|
|
254
|
+
Buffer.poolSize = 8192;
|
|
255
|
+
function from(value, encodingOrOffset, length) {
|
|
256
|
+
if (typeof value === "string") {
|
|
257
|
+
return fromString(value, encodingOrOffset);
|
|
258
|
+
}
|
|
259
|
+
if (ArrayBuffer.isView(value)) {
|
|
260
|
+
return fromArrayView(value);
|
|
261
|
+
}
|
|
262
|
+
if (value == null) {
|
|
263
|
+
throw new TypeError(
|
|
264
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
268
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
269
|
+
}
|
|
270
|
+
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
271
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
272
|
+
}
|
|
273
|
+
if (typeof value === "number") {
|
|
274
|
+
throw new TypeError(
|
|
275
|
+
'The "value" argument must not be of type number. Received type number'
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
const valueOf = value.valueOf && value.valueOf();
|
|
279
|
+
if (valueOf != null && valueOf !== value) {
|
|
280
|
+
return Buffer.from(valueOf, encodingOrOffset, length);
|
|
281
|
+
}
|
|
282
|
+
const b = fromObject(value);
|
|
283
|
+
if (b)
|
|
284
|
+
return b;
|
|
285
|
+
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
286
|
+
return Buffer.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
|
|
287
|
+
}
|
|
288
|
+
throw new TypeError(
|
|
289
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
Buffer.from = function(value, encodingOrOffset, length) {
|
|
293
|
+
return from(value, encodingOrOffset, length);
|
|
294
|
+
};
|
|
295
|
+
Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
|
|
296
|
+
Object.setPrototypeOf(Buffer, Uint8Array);
|
|
297
|
+
function assertSize(size) {
|
|
298
|
+
if (typeof size !== "number") {
|
|
299
|
+
throw new TypeError('"size" argument must be of type number');
|
|
300
|
+
} else if (size < 0) {
|
|
301
|
+
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
function alloc(size, fill, encoding) {
|
|
305
|
+
assertSize(size);
|
|
306
|
+
if (size <= 0) {
|
|
307
|
+
return createBuffer(size);
|
|
308
|
+
}
|
|
309
|
+
if (fill !== void 0) {
|
|
310
|
+
return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
|
|
311
|
+
}
|
|
312
|
+
return createBuffer(size);
|
|
313
|
+
}
|
|
314
|
+
Buffer.alloc = function(size, fill, encoding) {
|
|
315
|
+
return alloc(size, fill, encoding);
|
|
316
|
+
};
|
|
317
|
+
function allocUnsafe(size) {
|
|
318
|
+
assertSize(size);
|
|
319
|
+
return createBuffer(size < 0 ? 0 : checked(size) | 0);
|
|
320
|
+
}
|
|
321
|
+
Buffer.allocUnsafe = function(size) {
|
|
322
|
+
return allocUnsafe(size);
|
|
323
|
+
};
|
|
324
|
+
Buffer.allocUnsafeSlow = function(size) {
|
|
325
|
+
return allocUnsafe(size);
|
|
326
|
+
};
|
|
327
|
+
function fromString(string, encoding) {
|
|
328
|
+
if (typeof encoding !== "string" || encoding === "") {
|
|
329
|
+
encoding = "utf8";
|
|
330
|
+
}
|
|
331
|
+
if (!Buffer.isEncoding(encoding)) {
|
|
332
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
333
|
+
}
|
|
334
|
+
const length = byteLength2(string, encoding) | 0;
|
|
335
|
+
let buf = createBuffer(length);
|
|
336
|
+
const actual = buf.write(string, encoding);
|
|
337
|
+
if (actual !== length) {
|
|
338
|
+
buf = buf.slice(0, actual);
|
|
339
|
+
}
|
|
340
|
+
return buf;
|
|
341
|
+
}
|
|
342
|
+
function fromArrayLike(array) {
|
|
343
|
+
const length = array.length < 0 ? 0 : checked(array.length) | 0;
|
|
344
|
+
const buf = createBuffer(length);
|
|
345
|
+
for (let i = 0; i < length; i += 1) {
|
|
346
|
+
buf[i] = array[i] & 255;
|
|
347
|
+
}
|
|
348
|
+
return buf;
|
|
349
|
+
}
|
|
350
|
+
function fromArrayView(arrayView) {
|
|
351
|
+
if (isInstance(arrayView, Uint8Array)) {
|
|
352
|
+
const copy = new Uint8Array(arrayView);
|
|
353
|
+
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
|
|
354
|
+
}
|
|
355
|
+
return fromArrayLike(arrayView);
|
|
356
|
+
}
|
|
357
|
+
function fromArrayBuffer(array, byteOffset, length) {
|
|
358
|
+
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
359
|
+
throw new RangeError('"offset" is outside of buffer bounds');
|
|
360
|
+
}
|
|
361
|
+
if (array.byteLength < byteOffset + (length || 0)) {
|
|
362
|
+
throw new RangeError('"length" is outside of buffer bounds');
|
|
363
|
+
}
|
|
364
|
+
let buf;
|
|
365
|
+
if (byteOffset === void 0 && length === void 0) {
|
|
366
|
+
buf = new Uint8Array(array);
|
|
367
|
+
} else if (length === void 0) {
|
|
368
|
+
buf = new Uint8Array(array, byteOffset);
|
|
369
|
+
} else {
|
|
370
|
+
buf = new Uint8Array(array, byteOffset, length);
|
|
371
|
+
}
|
|
372
|
+
Object.setPrototypeOf(buf, Buffer.prototype);
|
|
373
|
+
return buf;
|
|
374
|
+
}
|
|
375
|
+
function fromObject(obj) {
|
|
376
|
+
if (Buffer.isBuffer(obj)) {
|
|
377
|
+
const len = checked(obj.length) | 0;
|
|
378
|
+
const buf = createBuffer(len);
|
|
379
|
+
if (buf.length === 0) {
|
|
380
|
+
return buf;
|
|
381
|
+
}
|
|
382
|
+
obj.copy(buf, 0, 0, len);
|
|
383
|
+
return buf;
|
|
384
|
+
}
|
|
385
|
+
if (obj.length !== void 0) {
|
|
386
|
+
if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
|
|
387
|
+
return createBuffer(0);
|
|
388
|
+
}
|
|
389
|
+
return fromArrayLike(obj);
|
|
390
|
+
}
|
|
391
|
+
if (obj.type === "Buffer" && Array.isArray(obj.data)) {
|
|
392
|
+
return fromArrayLike(obj.data);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function checked(length) {
|
|
396
|
+
if (length >= K_MAX_LENGTH) {
|
|
397
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
|
|
398
|
+
}
|
|
399
|
+
return length | 0;
|
|
400
|
+
}
|
|
401
|
+
function SlowBuffer(length) {
|
|
402
|
+
if (+length != length) {
|
|
403
|
+
length = 0;
|
|
404
|
+
}
|
|
405
|
+
return Buffer.alloc(+length);
|
|
406
|
+
}
|
|
407
|
+
Buffer.isBuffer = function isBuffer(b) {
|
|
408
|
+
return b != null && b._isBuffer === true && b !== Buffer.prototype;
|
|
409
|
+
};
|
|
410
|
+
Buffer.compare = function compare(a, b) {
|
|
411
|
+
if (isInstance(a, Uint8Array))
|
|
412
|
+
a = Buffer.from(a, a.offset, a.byteLength);
|
|
413
|
+
if (isInstance(b, Uint8Array))
|
|
414
|
+
b = Buffer.from(b, b.offset, b.byteLength);
|
|
415
|
+
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
|
416
|
+
throw new TypeError(
|
|
417
|
+
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
if (a === b)
|
|
421
|
+
return 0;
|
|
422
|
+
let x = a.length;
|
|
423
|
+
let y = b.length;
|
|
424
|
+
for (let i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
425
|
+
if (a[i] !== b[i]) {
|
|
426
|
+
x = a[i];
|
|
427
|
+
y = b[i];
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (x < y)
|
|
432
|
+
return -1;
|
|
433
|
+
if (y < x)
|
|
434
|
+
return 1;
|
|
435
|
+
return 0;
|
|
436
|
+
};
|
|
437
|
+
Buffer.isEncoding = function isEncoding(encoding) {
|
|
438
|
+
switch (String(encoding).toLowerCase()) {
|
|
439
|
+
case "hex":
|
|
440
|
+
case "utf8":
|
|
441
|
+
case "utf-8":
|
|
442
|
+
case "ascii":
|
|
443
|
+
case "latin1":
|
|
444
|
+
case "binary":
|
|
445
|
+
case "base64":
|
|
446
|
+
case "ucs2":
|
|
447
|
+
case "ucs-2":
|
|
448
|
+
case "utf16le":
|
|
449
|
+
case "utf-16le":
|
|
450
|
+
return true;
|
|
451
|
+
default:
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
Buffer.concat = function concat(list, length) {
|
|
456
|
+
if (!Array.isArray(list)) {
|
|
457
|
+
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
458
|
+
}
|
|
459
|
+
if (list.length === 0) {
|
|
460
|
+
return Buffer.alloc(0);
|
|
461
|
+
}
|
|
462
|
+
let i;
|
|
463
|
+
if (length === void 0) {
|
|
464
|
+
length = 0;
|
|
465
|
+
for (i = 0; i < list.length; ++i) {
|
|
466
|
+
length += list[i].length;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
const buffer2 = Buffer.allocUnsafe(length);
|
|
470
|
+
let pos = 0;
|
|
471
|
+
for (i = 0; i < list.length; ++i) {
|
|
472
|
+
let buf = list[i];
|
|
473
|
+
if (isInstance(buf, Uint8Array)) {
|
|
474
|
+
if (pos + buf.length > buffer2.length) {
|
|
475
|
+
if (!Buffer.isBuffer(buf))
|
|
476
|
+
buf = Buffer.from(buf);
|
|
477
|
+
buf.copy(buffer2, pos);
|
|
478
|
+
} else {
|
|
479
|
+
Uint8Array.prototype.set.call(
|
|
480
|
+
buffer2,
|
|
481
|
+
buf,
|
|
482
|
+
pos
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
} else if (!Buffer.isBuffer(buf)) {
|
|
486
|
+
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
487
|
+
} else {
|
|
488
|
+
buf.copy(buffer2, pos);
|
|
489
|
+
}
|
|
490
|
+
pos += buf.length;
|
|
491
|
+
}
|
|
492
|
+
return buffer2;
|
|
493
|
+
};
|
|
494
|
+
function byteLength2(string, encoding) {
|
|
495
|
+
if (Buffer.isBuffer(string)) {
|
|
496
|
+
return string.length;
|
|
497
|
+
}
|
|
498
|
+
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
|
499
|
+
return string.byteLength;
|
|
500
|
+
}
|
|
501
|
+
if (typeof string !== "string") {
|
|
502
|
+
throw new TypeError(
|
|
503
|
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
const len = string.length;
|
|
507
|
+
const mustMatch = arguments.length > 2 && arguments[2] === true;
|
|
508
|
+
if (!mustMatch && len === 0)
|
|
509
|
+
return 0;
|
|
510
|
+
let loweredCase = false;
|
|
511
|
+
for (; ; ) {
|
|
512
|
+
switch (encoding) {
|
|
513
|
+
case "ascii":
|
|
514
|
+
case "latin1":
|
|
515
|
+
case "binary":
|
|
516
|
+
return len;
|
|
517
|
+
case "utf8":
|
|
518
|
+
case "utf-8":
|
|
519
|
+
return utf8ToBytes(string).length;
|
|
520
|
+
case "ucs2":
|
|
521
|
+
case "ucs-2":
|
|
522
|
+
case "utf16le":
|
|
523
|
+
case "utf-16le":
|
|
524
|
+
return len * 2;
|
|
525
|
+
case "hex":
|
|
526
|
+
return len >>> 1;
|
|
527
|
+
case "base64":
|
|
528
|
+
return base64ToBytes(string).length;
|
|
529
|
+
default:
|
|
530
|
+
if (loweredCase) {
|
|
531
|
+
return mustMatch ? -1 : utf8ToBytes(string).length;
|
|
532
|
+
}
|
|
533
|
+
encoding = ("" + encoding).toLowerCase();
|
|
534
|
+
loweredCase = true;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
Buffer.byteLength = byteLength2;
|
|
539
|
+
function slowToString(encoding, start, end) {
|
|
540
|
+
let loweredCase = false;
|
|
541
|
+
if (start === void 0 || start < 0) {
|
|
542
|
+
start = 0;
|
|
543
|
+
}
|
|
544
|
+
if (start > this.length) {
|
|
545
|
+
return "";
|
|
546
|
+
}
|
|
547
|
+
if (end === void 0 || end > this.length) {
|
|
548
|
+
end = this.length;
|
|
549
|
+
}
|
|
550
|
+
if (end <= 0) {
|
|
551
|
+
return "";
|
|
552
|
+
}
|
|
553
|
+
end >>>= 0;
|
|
554
|
+
start >>>= 0;
|
|
555
|
+
if (end <= start) {
|
|
556
|
+
return "";
|
|
557
|
+
}
|
|
558
|
+
if (!encoding)
|
|
559
|
+
encoding = "utf8";
|
|
560
|
+
while (true) {
|
|
561
|
+
switch (encoding) {
|
|
562
|
+
case "hex":
|
|
563
|
+
return hexSlice(this, start, end);
|
|
564
|
+
case "utf8":
|
|
565
|
+
case "utf-8":
|
|
566
|
+
return utf8Slice(this, start, end);
|
|
567
|
+
case "ascii":
|
|
568
|
+
return asciiSlice(this, start, end);
|
|
569
|
+
case "latin1":
|
|
570
|
+
case "binary":
|
|
571
|
+
return latin1Slice(this, start, end);
|
|
572
|
+
case "base64":
|
|
573
|
+
return base64Slice(this, start, end);
|
|
574
|
+
case "ucs2":
|
|
575
|
+
case "ucs-2":
|
|
576
|
+
case "utf16le":
|
|
577
|
+
case "utf-16le":
|
|
578
|
+
return utf16leSlice(this, start, end);
|
|
579
|
+
default:
|
|
580
|
+
if (loweredCase)
|
|
581
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
582
|
+
encoding = (encoding + "").toLowerCase();
|
|
583
|
+
loweredCase = true;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
Buffer.prototype._isBuffer = true;
|
|
588
|
+
function swap(b, n, m) {
|
|
589
|
+
const i = b[n];
|
|
590
|
+
b[n] = b[m];
|
|
591
|
+
b[m] = i;
|
|
592
|
+
}
|
|
593
|
+
Buffer.prototype.swap16 = function swap16() {
|
|
594
|
+
const len = this.length;
|
|
595
|
+
if (len % 2 !== 0) {
|
|
596
|
+
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
597
|
+
}
|
|
598
|
+
for (let i = 0; i < len; i += 2) {
|
|
599
|
+
swap(this, i, i + 1);
|
|
600
|
+
}
|
|
601
|
+
return this;
|
|
602
|
+
};
|
|
603
|
+
Buffer.prototype.swap32 = function swap32() {
|
|
604
|
+
const len = this.length;
|
|
605
|
+
if (len % 4 !== 0) {
|
|
606
|
+
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
607
|
+
}
|
|
608
|
+
for (let i = 0; i < len; i += 4) {
|
|
609
|
+
swap(this, i, i + 3);
|
|
610
|
+
swap(this, i + 1, i + 2);
|
|
611
|
+
}
|
|
612
|
+
return this;
|
|
613
|
+
};
|
|
614
|
+
Buffer.prototype.swap64 = function swap64() {
|
|
615
|
+
const len = this.length;
|
|
616
|
+
if (len % 8 !== 0) {
|
|
617
|
+
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
618
|
+
}
|
|
619
|
+
for (let i = 0; i < len; i += 8) {
|
|
620
|
+
swap(this, i, i + 7);
|
|
621
|
+
swap(this, i + 1, i + 6);
|
|
622
|
+
swap(this, i + 2, i + 5);
|
|
623
|
+
swap(this, i + 3, i + 4);
|
|
624
|
+
}
|
|
625
|
+
return this;
|
|
626
|
+
};
|
|
627
|
+
Buffer.prototype.toString = function toString() {
|
|
628
|
+
const length = this.length;
|
|
629
|
+
if (length === 0)
|
|
630
|
+
return "";
|
|
631
|
+
if (arguments.length === 0)
|
|
632
|
+
return utf8Slice(this, 0, length);
|
|
633
|
+
return slowToString.apply(this, arguments);
|
|
634
|
+
};
|
|
635
|
+
Buffer.prototype.toLocaleString = Buffer.prototype.toString;
|
|
636
|
+
Buffer.prototype.equals = function equals(b) {
|
|
637
|
+
if (!Buffer.isBuffer(b))
|
|
638
|
+
throw new TypeError("Argument must be a Buffer");
|
|
639
|
+
if (this === b)
|
|
640
|
+
return true;
|
|
641
|
+
return Buffer.compare(this, b) === 0;
|
|
642
|
+
};
|
|
643
|
+
Buffer.prototype.inspect = function inspect() {
|
|
644
|
+
let str = "";
|
|
645
|
+
const max = exports2.INSPECT_MAX_BYTES;
|
|
646
|
+
str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
|
|
647
|
+
if (this.length > max)
|
|
648
|
+
str += " ... ";
|
|
649
|
+
return "<Buffer " + str + ">";
|
|
650
|
+
};
|
|
651
|
+
if (customInspectSymbol) {
|
|
652
|
+
Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;
|
|
653
|
+
}
|
|
654
|
+
Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
|
|
655
|
+
if (isInstance(target, Uint8Array)) {
|
|
656
|
+
target = Buffer.from(target, target.offset, target.byteLength);
|
|
657
|
+
}
|
|
658
|
+
if (!Buffer.isBuffer(target)) {
|
|
659
|
+
throw new TypeError(
|
|
660
|
+
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
if (start === void 0) {
|
|
664
|
+
start = 0;
|
|
665
|
+
}
|
|
666
|
+
if (end === void 0) {
|
|
667
|
+
end = target ? target.length : 0;
|
|
668
|
+
}
|
|
669
|
+
if (thisStart === void 0) {
|
|
670
|
+
thisStart = 0;
|
|
671
|
+
}
|
|
672
|
+
if (thisEnd === void 0) {
|
|
673
|
+
thisEnd = this.length;
|
|
674
|
+
}
|
|
675
|
+
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
|
676
|
+
throw new RangeError("out of range index");
|
|
677
|
+
}
|
|
678
|
+
if (thisStart >= thisEnd && start >= end) {
|
|
679
|
+
return 0;
|
|
680
|
+
}
|
|
681
|
+
if (thisStart >= thisEnd) {
|
|
682
|
+
return -1;
|
|
683
|
+
}
|
|
684
|
+
if (start >= end) {
|
|
685
|
+
return 1;
|
|
686
|
+
}
|
|
687
|
+
start >>>= 0;
|
|
688
|
+
end >>>= 0;
|
|
689
|
+
thisStart >>>= 0;
|
|
690
|
+
thisEnd >>>= 0;
|
|
691
|
+
if (this === target)
|
|
692
|
+
return 0;
|
|
693
|
+
let x = thisEnd - thisStart;
|
|
694
|
+
let y = end - start;
|
|
695
|
+
const len = Math.min(x, y);
|
|
696
|
+
const thisCopy = this.slice(thisStart, thisEnd);
|
|
697
|
+
const targetCopy = target.slice(start, end);
|
|
698
|
+
for (let i = 0; i < len; ++i) {
|
|
699
|
+
if (thisCopy[i] !== targetCopy[i]) {
|
|
700
|
+
x = thisCopy[i];
|
|
701
|
+
y = targetCopy[i];
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (x < y)
|
|
706
|
+
return -1;
|
|
707
|
+
if (y < x)
|
|
708
|
+
return 1;
|
|
709
|
+
return 0;
|
|
710
|
+
};
|
|
711
|
+
function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
|
|
712
|
+
if (buffer2.length === 0)
|
|
713
|
+
return -1;
|
|
714
|
+
if (typeof byteOffset === "string") {
|
|
715
|
+
encoding = byteOffset;
|
|
716
|
+
byteOffset = 0;
|
|
717
|
+
} else if (byteOffset > 2147483647) {
|
|
718
|
+
byteOffset = 2147483647;
|
|
719
|
+
} else if (byteOffset < -2147483648) {
|
|
720
|
+
byteOffset = -2147483648;
|
|
721
|
+
}
|
|
722
|
+
byteOffset = +byteOffset;
|
|
723
|
+
if (numberIsNaN(byteOffset)) {
|
|
724
|
+
byteOffset = dir ? 0 : buffer2.length - 1;
|
|
725
|
+
}
|
|
726
|
+
if (byteOffset < 0)
|
|
727
|
+
byteOffset = buffer2.length + byteOffset;
|
|
728
|
+
if (byteOffset >= buffer2.length) {
|
|
729
|
+
if (dir)
|
|
730
|
+
return -1;
|
|
731
|
+
else
|
|
732
|
+
byteOffset = buffer2.length - 1;
|
|
733
|
+
} else if (byteOffset < 0) {
|
|
734
|
+
if (dir)
|
|
735
|
+
byteOffset = 0;
|
|
736
|
+
else
|
|
737
|
+
return -1;
|
|
738
|
+
}
|
|
739
|
+
if (typeof val === "string") {
|
|
740
|
+
val = Buffer.from(val, encoding);
|
|
741
|
+
}
|
|
742
|
+
if (Buffer.isBuffer(val)) {
|
|
743
|
+
if (val.length === 0) {
|
|
744
|
+
return -1;
|
|
745
|
+
}
|
|
746
|
+
return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);
|
|
747
|
+
} else if (typeof val === "number") {
|
|
748
|
+
val = val & 255;
|
|
749
|
+
if (typeof Uint8Array.prototype.indexOf === "function") {
|
|
750
|
+
if (dir) {
|
|
751
|
+
return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset);
|
|
752
|
+
} else {
|
|
753
|
+
return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);
|
|
757
|
+
}
|
|
758
|
+
throw new TypeError("val must be string, number or Buffer");
|
|
759
|
+
}
|
|
760
|
+
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
|
|
761
|
+
let indexSize = 1;
|
|
762
|
+
let arrLength = arr.length;
|
|
763
|
+
let valLength = val.length;
|
|
764
|
+
if (encoding !== void 0) {
|
|
765
|
+
encoding = String(encoding).toLowerCase();
|
|
766
|
+
if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
|
|
767
|
+
if (arr.length < 2 || val.length < 2) {
|
|
768
|
+
return -1;
|
|
769
|
+
}
|
|
770
|
+
indexSize = 2;
|
|
771
|
+
arrLength /= 2;
|
|
772
|
+
valLength /= 2;
|
|
773
|
+
byteOffset /= 2;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
function read(buf, i2) {
|
|
777
|
+
if (indexSize === 1) {
|
|
778
|
+
return buf[i2];
|
|
779
|
+
} else {
|
|
780
|
+
return buf.readUInt16BE(i2 * indexSize);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
let i;
|
|
784
|
+
if (dir) {
|
|
785
|
+
let foundIndex = -1;
|
|
786
|
+
for (i = byteOffset; i < arrLength; i++) {
|
|
787
|
+
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
|
788
|
+
if (foundIndex === -1)
|
|
789
|
+
foundIndex = i;
|
|
790
|
+
if (i - foundIndex + 1 === valLength)
|
|
791
|
+
return foundIndex * indexSize;
|
|
792
|
+
} else {
|
|
793
|
+
if (foundIndex !== -1)
|
|
794
|
+
i -= i - foundIndex;
|
|
795
|
+
foundIndex = -1;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
} else {
|
|
799
|
+
if (byteOffset + valLength > arrLength)
|
|
800
|
+
byteOffset = arrLength - valLength;
|
|
801
|
+
for (i = byteOffset; i >= 0; i--) {
|
|
802
|
+
let found = true;
|
|
803
|
+
for (let j = 0; j < valLength; j++) {
|
|
804
|
+
if (read(arr, i + j) !== read(val, j)) {
|
|
805
|
+
found = false;
|
|
806
|
+
break;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
if (found)
|
|
810
|
+
return i;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
return -1;
|
|
814
|
+
}
|
|
815
|
+
Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
|
|
816
|
+
return this.indexOf(val, byteOffset, encoding) !== -1;
|
|
817
|
+
};
|
|
818
|
+
Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
|
|
819
|
+
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
|
|
820
|
+
};
|
|
821
|
+
Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
|
|
822
|
+
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
|
|
823
|
+
};
|
|
824
|
+
function hexWrite(buf, string, offset, length) {
|
|
825
|
+
offset = Number(offset) || 0;
|
|
826
|
+
const remaining = buf.length - offset;
|
|
827
|
+
if (!length) {
|
|
828
|
+
length = remaining;
|
|
829
|
+
} else {
|
|
830
|
+
length = Number(length);
|
|
831
|
+
if (length > remaining) {
|
|
832
|
+
length = remaining;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
const strLen = string.length;
|
|
836
|
+
if (length > strLen / 2) {
|
|
837
|
+
length = strLen / 2;
|
|
838
|
+
}
|
|
839
|
+
let i;
|
|
840
|
+
for (i = 0; i < length; ++i) {
|
|
841
|
+
const parsed = parseInt(string.substr(i * 2, 2), 16);
|
|
842
|
+
if (numberIsNaN(parsed))
|
|
843
|
+
return i;
|
|
844
|
+
buf[offset + i] = parsed;
|
|
845
|
+
}
|
|
846
|
+
return i;
|
|
847
|
+
}
|
|
848
|
+
function utf8Write(buf, string, offset, length) {
|
|
849
|
+
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
|
|
850
|
+
}
|
|
851
|
+
function asciiWrite(buf, string, offset, length) {
|
|
852
|
+
return blitBuffer(asciiToBytes(string), buf, offset, length);
|
|
853
|
+
}
|
|
854
|
+
function base64Write(buf, string, offset, length) {
|
|
855
|
+
return blitBuffer(base64ToBytes(string), buf, offset, length);
|
|
856
|
+
}
|
|
857
|
+
function ucs2Write(buf, string, offset, length) {
|
|
858
|
+
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
|
|
859
|
+
}
|
|
860
|
+
Buffer.prototype.write = function write(string, offset, length, encoding) {
|
|
861
|
+
if (offset === void 0) {
|
|
862
|
+
encoding = "utf8";
|
|
863
|
+
length = this.length;
|
|
864
|
+
offset = 0;
|
|
865
|
+
} else if (length === void 0 && typeof offset === "string") {
|
|
866
|
+
encoding = offset;
|
|
867
|
+
length = this.length;
|
|
868
|
+
offset = 0;
|
|
869
|
+
} else if (isFinite(offset)) {
|
|
870
|
+
offset = offset >>> 0;
|
|
871
|
+
if (isFinite(length)) {
|
|
872
|
+
length = length >>> 0;
|
|
873
|
+
if (encoding === void 0)
|
|
874
|
+
encoding = "utf8";
|
|
875
|
+
} else {
|
|
876
|
+
encoding = length;
|
|
877
|
+
length = void 0;
|
|
878
|
+
}
|
|
879
|
+
} else {
|
|
880
|
+
throw new Error(
|
|
881
|
+
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
882
|
+
);
|
|
883
|
+
}
|
|
884
|
+
const remaining = this.length - offset;
|
|
885
|
+
if (length === void 0 || length > remaining)
|
|
886
|
+
length = remaining;
|
|
887
|
+
if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
|
|
888
|
+
throw new RangeError("Attempt to write outside buffer bounds");
|
|
889
|
+
}
|
|
890
|
+
if (!encoding)
|
|
891
|
+
encoding = "utf8";
|
|
892
|
+
let loweredCase = false;
|
|
893
|
+
for (; ; ) {
|
|
894
|
+
switch (encoding) {
|
|
895
|
+
case "hex":
|
|
896
|
+
return hexWrite(this, string, offset, length);
|
|
897
|
+
case "utf8":
|
|
898
|
+
case "utf-8":
|
|
899
|
+
return utf8Write(this, string, offset, length);
|
|
900
|
+
case "ascii":
|
|
901
|
+
case "latin1":
|
|
902
|
+
case "binary":
|
|
903
|
+
return asciiWrite(this, string, offset, length);
|
|
904
|
+
case "base64":
|
|
905
|
+
return base64Write(this, string, offset, length);
|
|
906
|
+
case "ucs2":
|
|
907
|
+
case "ucs-2":
|
|
908
|
+
case "utf16le":
|
|
909
|
+
case "utf-16le":
|
|
910
|
+
return ucs2Write(this, string, offset, length);
|
|
911
|
+
default:
|
|
912
|
+
if (loweredCase)
|
|
913
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
914
|
+
encoding = ("" + encoding).toLowerCase();
|
|
915
|
+
loweredCase = true;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
Buffer.prototype.toJSON = function toJSON() {
|
|
920
|
+
return {
|
|
921
|
+
type: "Buffer",
|
|
922
|
+
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
function base64Slice(buf, start, end) {
|
|
926
|
+
if (start === 0 && end === buf.length) {
|
|
927
|
+
return base64.fromByteArray(buf);
|
|
928
|
+
} else {
|
|
929
|
+
return base64.fromByteArray(buf.slice(start, end));
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
function utf8Slice(buf, start, end) {
|
|
933
|
+
end = Math.min(buf.length, end);
|
|
934
|
+
const res = [];
|
|
935
|
+
let i = start;
|
|
936
|
+
while (i < end) {
|
|
937
|
+
const firstByte = buf[i];
|
|
938
|
+
let codePoint = null;
|
|
939
|
+
let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
|
|
940
|
+
if (i + bytesPerSequence <= end) {
|
|
941
|
+
let secondByte, thirdByte, fourthByte, tempCodePoint;
|
|
942
|
+
switch (bytesPerSequence) {
|
|
943
|
+
case 1:
|
|
944
|
+
if (firstByte < 128) {
|
|
945
|
+
codePoint = firstByte;
|
|
946
|
+
}
|
|
947
|
+
break;
|
|
948
|
+
case 2:
|
|
949
|
+
secondByte = buf[i + 1];
|
|
950
|
+
if ((secondByte & 192) === 128) {
|
|
951
|
+
tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
|
|
952
|
+
if (tempCodePoint > 127) {
|
|
953
|
+
codePoint = tempCodePoint;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
break;
|
|
957
|
+
case 3:
|
|
958
|
+
secondByte = buf[i + 1];
|
|
959
|
+
thirdByte = buf[i + 2];
|
|
960
|
+
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
|
|
961
|
+
tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
|
|
962
|
+
if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
|
|
963
|
+
codePoint = tempCodePoint;
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
break;
|
|
967
|
+
case 4:
|
|
968
|
+
secondByte = buf[i + 1];
|
|
969
|
+
thirdByte = buf[i + 2];
|
|
970
|
+
fourthByte = buf[i + 3];
|
|
971
|
+
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
|
|
972
|
+
tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
|
|
973
|
+
if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
|
|
974
|
+
codePoint = tempCodePoint;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
if (codePoint === null) {
|
|
980
|
+
codePoint = 65533;
|
|
981
|
+
bytesPerSequence = 1;
|
|
982
|
+
} else if (codePoint > 65535) {
|
|
983
|
+
codePoint -= 65536;
|
|
984
|
+
res.push(codePoint >>> 10 & 1023 | 55296);
|
|
985
|
+
codePoint = 56320 | codePoint & 1023;
|
|
986
|
+
}
|
|
987
|
+
res.push(codePoint);
|
|
988
|
+
i += bytesPerSequence;
|
|
989
|
+
}
|
|
990
|
+
return decodeCodePointsArray(res);
|
|
991
|
+
}
|
|
992
|
+
const MAX_ARGUMENTS_LENGTH = 4096;
|
|
993
|
+
function decodeCodePointsArray(codePoints) {
|
|
994
|
+
const len = codePoints.length;
|
|
995
|
+
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
996
|
+
return String.fromCharCode.apply(String, codePoints);
|
|
997
|
+
}
|
|
998
|
+
let res = "";
|
|
999
|
+
let i = 0;
|
|
1000
|
+
while (i < len) {
|
|
1001
|
+
res += String.fromCharCode.apply(
|
|
1002
|
+
String,
|
|
1003
|
+
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
return res;
|
|
1007
|
+
}
|
|
1008
|
+
function asciiSlice(buf, start, end) {
|
|
1009
|
+
let ret = "";
|
|
1010
|
+
end = Math.min(buf.length, end);
|
|
1011
|
+
for (let i = start; i < end; ++i) {
|
|
1012
|
+
ret += String.fromCharCode(buf[i] & 127);
|
|
1013
|
+
}
|
|
1014
|
+
return ret;
|
|
1015
|
+
}
|
|
1016
|
+
function latin1Slice(buf, start, end) {
|
|
1017
|
+
let ret = "";
|
|
1018
|
+
end = Math.min(buf.length, end);
|
|
1019
|
+
for (let i = start; i < end; ++i) {
|
|
1020
|
+
ret += String.fromCharCode(buf[i]);
|
|
1021
|
+
}
|
|
1022
|
+
return ret;
|
|
1023
|
+
}
|
|
1024
|
+
function hexSlice(buf, start, end) {
|
|
1025
|
+
const len = buf.length;
|
|
1026
|
+
if (!start || start < 0)
|
|
1027
|
+
start = 0;
|
|
1028
|
+
if (!end || end < 0 || end > len)
|
|
1029
|
+
end = len;
|
|
1030
|
+
let out = "";
|
|
1031
|
+
for (let i = start; i < end; ++i) {
|
|
1032
|
+
out += hexSliceLookupTable[buf[i]];
|
|
1033
|
+
}
|
|
1034
|
+
return out;
|
|
1035
|
+
}
|
|
1036
|
+
function utf16leSlice(buf, start, end) {
|
|
1037
|
+
const bytes = buf.slice(start, end);
|
|
1038
|
+
let res = "";
|
|
1039
|
+
for (let i = 0; i < bytes.length - 1; i += 2) {
|
|
1040
|
+
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
|
|
1041
|
+
}
|
|
1042
|
+
return res;
|
|
1043
|
+
}
|
|
1044
|
+
Buffer.prototype.slice = function slice(start, end) {
|
|
1045
|
+
const len = this.length;
|
|
1046
|
+
start = ~~start;
|
|
1047
|
+
end = end === void 0 ? len : ~~end;
|
|
1048
|
+
if (start < 0) {
|
|
1049
|
+
start += len;
|
|
1050
|
+
if (start < 0)
|
|
1051
|
+
start = 0;
|
|
1052
|
+
} else if (start > len) {
|
|
1053
|
+
start = len;
|
|
1054
|
+
}
|
|
1055
|
+
if (end < 0) {
|
|
1056
|
+
end += len;
|
|
1057
|
+
if (end < 0)
|
|
1058
|
+
end = 0;
|
|
1059
|
+
} else if (end > len) {
|
|
1060
|
+
end = len;
|
|
1061
|
+
}
|
|
1062
|
+
if (end < start)
|
|
1063
|
+
end = start;
|
|
1064
|
+
const newBuf = this.subarray(start, end);
|
|
1065
|
+
Object.setPrototypeOf(newBuf, Buffer.prototype);
|
|
1066
|
+
return newBuf;
|
|
1067
|
+
};
|
|
1068
|
+
function checkOffset(offset, ext, length) {
|
|
1069
|
+
if (offset % 1 !== 0 || offset < 0)
|
|
1070
|
+
throw new RangeError("offset is not uint");
|
|
1071
|
+
if (offset + ext > length)
|
|
1072
|
+
throw new RangeError("Trying to access beyond buffer length");
|
|
1073
|
+
}
|
|
1074
|
+
Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength3, noAssert) {
|
|
1075
|
+
offset = offset >>> 0;
|
|
1076
|
+
byteLength3 = byteLength3 >>> 0;
|
|
1077
|
+
if (!noAssert)
|
|
1078
|
+
checkOffset(offset, byteLength3, this.length);
|
|
1079
|
+
let val = this[offset];
|
|
1080
|
+
let mul = 1;
|
|
1081
|
+
let i = 0;
|
|
1082
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
1083
|
+
val += this[offset + i] * mul;
|
|
1084
|
+
}
|
|
1085
|
+
return val;
|
|
1086
|
+
};
|
|
1087
|
+
Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength3, noAssert) {
|
|
1088
|
+
offset = offset >>> 0;
|
|
1089
|
+
byteLength3 = byteLength3 >>> 0;
|
|
1090
|
+
if (!noAssert) {
|
|
1091
|
+
checkOffset(offset, byteLength3, this.length);
|
|
1092
|
+
}
|
|
1093
|
+
let val = this[offset + --byteLength3];
|
|
1094
|
+
let mul = 1;
|
|
1095
|
+
while (byteLength3 > 0 && (mul *= 256)) {
|
|
1096
|
+
val += this[offset + --byteLength3] * mul;
|
|
1097
|
+
}
|
|
1098
|
+
return val;
|
|
1099
|
+
};
|
|
1100
|
+
Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
|
|
1101
|
+
offset = offset >>> 0;
|
|
1102
|
+
if (!noAssert)
|
|
1103
|
+
checkOffset(offset, 1, this.length);
|
|
1104
|
+
return this[offset];
|
|
1105
|
+
};
|
|
1106
|
+
Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
|
|
1107
|
+
offset = offset >>> 0;
|
|
1108
|
+
if (!noAssert)
|
|
1109
|
+
checkOffset(offset, 2, this.length);
|
|
1110
|
+
return this[offset] | this[offset + 1] << 8;
|
|
1111
|
+
};
|
|
1112
|
+
Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
|
|
1113
|
+
offset = offset >>> 0;
|
|
1114
|
+
if (!noAssert)
|
|
1115
|
+
checkOffset(offset, 2, this.length);
|
|
1116
|
+
return this[offset] << 8 | this[offset + 1];
|
|
1117
|
+
};
|
|
1118
|
+
Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
|
|
1119
|
+
offset = offset >>> 0;
|
|
1120
|
+
if (!noAssert)
|
|
1121
|
+
checkOffset(offset, 4, this.length);
|
|
1122
|
+
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
|
|
1123
|
+
};
|
|
1124
|
+
Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
|
|
1125
|
+
offset = offset >>> 0;
|
|
1126
|
+
if (!noAssert)
|
|
1127
|
+
checkOffset(offset, 4, this.length);
|
|
1128
|
+
return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
|
|
1129
|
+
};
|
|
1130
|
+
Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
|
|
1131
|
+
offset = offset >>> 0;
|
|
1132
|
+
validateNumber(offset, "offset");
|
|
1133
|
+
const first = this[offset];
|
|
1134
|
+
const last = this[offset + 7];
|
|
1135
|
+
if (first === void 0 || last === void 0) {
|
|
1136
|
+
boundsError(offset, this.length - 8);
|
|
1137
|
+
}
|
|
1138
|
+
const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
|
|
1139
|
+
const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
|
|
1140
|
+
return BigInt(lo) + (BigInt(hi) << BigInt(32));
|
|
1141
|
+
});
|
|
1142
|
+
Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
|
|
1143
|
+
offset = offset >>> 0;
|
|
1144
|
+
validateNumber(offset, "offset");
|
|
1145
|
+
const first = this[offset];
|
|
1146
|
+
const last = this[offset + 7];
|
|
1147
|
+
if (first === void 0 || last === void 0) {
|
|
1148
|
+
boundsError(offset, this.length - 8);
|
|
1149
|
+
}
|
|
1150
|
+
const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1151
|
+
const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
|
|
1152
|
+
return (BigInt(hi) << BigInt(32)) + BigInt(lo);
|
|
1153
|
+
});
|
|
1154
|
+
Buffer.prototype.readIntLE = function readIntLE(offset, byteLength3, noAssert) {
|
|
1155
|
+
offset = offset >>> 0;
|
|
1156
|
+
byteLength3 = byteLength3 >>> 0;
|
|
1157
|
+
if (!noAssert)
|
|
1158
|
+
checkOffset(offset, byteLength3, this.length);
|
|
1159
|
+
let val = this[offset];
|
|
1160
|
+
let mul = 1;
|
|
1161
|
+
let i = 0;
|
|
1162
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
1163
|
+
val += this[offset + i] * mul;
|
|
1164
|
+
}
|
|
1165
|
+
mul *= 128;
|
|
1166
|
+
if (val >= mul)
|
|
1167
|
+
val -= Math.pow(2, 8 * byteLength3);
|
|
1168
|
+
return val;
|
|
1169
|
+
};
|
|
1170
|
+
Buffer.prototype.readIntBE = function readIntBE(offset, byteLength3, noAssert) {
|
|
1171
|
+
offset = offset >>> 0;
|
|
1172
|
+
byteLength3 = byteLength3 >>> 0;
|
|
1173
|
+
if (!noAssert)
|
|
1174
|
+
checkOffset(offset, byteLength3, this.length);
|
|
1175
|
+
let i = byteLength3;
|
|
1176
|
+
let mul = 1;
|
|
1177
|
+
let val = this[offset + --i];
|
|
1178
|
+
while (i > 0 && (mul *= 256)) {
|
|
1179
|
+
val += this[offset + --i] * mul;
|
|
1180
|
+
}
|
|
1181
|
+
mul *= 128;
|
|
1182
|
+
if (val >= mul)
|
|
1183
|
+
val -= Math.pow(2, 8 * byteLength3);
|
|
1184
|
+
return val;
|
|
1185
|
+
};
|
|
1186
|
+
Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
|
|
1187
|
+
offset = offset >>> 0;
|
|
1188
|
+
if (!noAssert)
|
|
1189
|
+
checkOffset(offset, 1, this.length);
|
|
1190
|
+
if (!(this[offset] & 128))
|
|
1191
|
+
return this[offset];
|
|
1192
|
+
return (255 - this[offset] + 1) * -1;
|
|
1193
|
+
};
|
|
1194
|
+
Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
|
|
1195
|
+
offset = offset >>> 0;
|
|
1196
|
+
if (!noAssert)
|
|
1197
|
+
checkOffset(offset, 2, this.length);
|
|
1198
|
+
const val = this[offset] | this[offset + 1] << 8;
|
|
1199
|
+
return val & 32768 ? val | 4294901760 : val;
|
|
1200
|
+
};
|
|
1201
|
+
Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
|
|
1202
|
+
offset = offset >>> 0;
|
|
1203
|
+
if (!noAssert)
|
|
1204
|
+
checkOffset(offset, 2, this.length);
|
|
1205
|
+
const val = this[offset + 1] | this[offset] << 8;
|
|
1206
|
+
return val & 32768 ? val | 4294901760 : val;
|
|
1207
|
+
};
|
|
1208
|
+
Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
|
|
1209
|
+
offset = offset >>> 0;
|
|
1210
|
+
if (!noAssert)
|
|
1211
|
+
checkOffset(offset, 4, this.length);
|
|
1212
|
+
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
|
|
1213
|
+
};
|
|
1214
|
+
Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
|
|
1215
|
+
offset = offset >>> 0;
|
|
1216
|
+
if (!noAssert)
|
|
1217
|
+
checkOffset(offset, 4, this.length);
|
|
1218
|
+
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
|
|
1219
|
+
};
|
|
1220
|
+
Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
|
|
1221
|
+
offset = offset >>> 0;
|
|
1222
|
+
validateNumber(offset, "offset");
|
|
1223
|
+
const first = this[offset];
|
|
1224
|
+
const last = this[offset + 7];
|
|
1225
|
+
if (first === void 0 || last === void 0) {
|
|
1226
|
+
boundsError(offset, this.length - 8);
|
|
1227
|
+
}
|
|
1228
|
+
const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
|
|
1229
|
+
return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
|
|
1230
|
+
});
|
|
1231
|
+
Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
|
|
1232
|
+
offset = offset >>> 0;
|
|
1233
|
+
validateNumber(offset, "offset");
|
|
1234
|
+
const first = this[offset];
|
|
1235
|
+
const last = this[offset + 7];
|
|
1236
|
+
if (first === void 0 || last === void 0) {
|
|
1237
|
+
boundsError(offset, this.length - 8);
|
|
1238
|
+
}
|
|
1239
|
+
const val = (first << 24) + // Overflow
|
|
1240
|
+
this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1241
|
+
return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
|
|
1242
|
+
});
|
|
1243
|
+
Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
|
|
1244
|
+
offset = offset >>> 0;
|
|
1245
|
+
if (!noAssert)
|
|
1246
|
+
checkOffset(offset, 4, this.length);
|
|
1247
|
+
return ieee754$1.read(this, offset, true, 23, 4);
|
|
1248
|
+
};
|
|
1249
|
+
Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
|
|
1250
|
+
offset = offset >>> 0;
|
|
1251
|
+
if (!noAssert)
|
|
1252
|
+
checkOffset(offset, 4, this.length);
|
|
1253
|
+
return ieee754$1.read(this, offset, false, 23, 4);
|
|
1254
|
+
};
|
|
1255
|
+
Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
|
|
1256
|
+
offset = offset >>> 0;
|
|
1257
|
+
if (!noAssert)
|
|
1258
|
+
checkOffset(offset, 8, this.length);
|
|
1259
|
+
return ieee754$1.read(this, offset, true, 52, 8);
|
|
1260
|
+
};
|
|
1261
|
+
Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
|
|
1262
|
+
offset = offset >>> 0;
|
|
1263
|
+
if (!noAssert)
|
|
1264
|
+
checkOffset(offset, 8, this.length);
|
|
1265
|
+
return ieee754$1.read(this, offset, false, 52, 8);
|
|
1266
|
+
};
|
|
1267
|
+
function checkInt(buf, value, offset, ext, max, min) {
|
|
1268
|
+
if (!Buffer.isBuffer(buf))
|
|
1269
|
+
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1270
|
+
if (value > max || value < min)
|
|
1271
|
+
throw new RangeError('"value" argument is out of bounds');
|
|
1272
|
+
if (offset + ext > buf.length)
|
|
1273
|
+
throw new RangeError("Index out of range");
|
|
1274
|
+
}
|
|
1275
|
+
Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength3, noAssert) {
|
|
1276
|
+
value = +value;
|
|
1277
|
+
offset = offset >>> 0;
|
|
1278
|
+
byteLength3 = byteLength3 >>> 0;
|
|
1279
|
+
if (!noAssert) {
|
|
1280
|
+
const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
|
|
1281
|
+
checkInt(this, value, offset, byteLength3, maxBytes, 0);
|
|
1282
|
+
}
|
|
1283
|
+
let mul = 1;
|
|
1284
|
+
let i = 0;
|
|
1285
|
+
this[offset] = value & 255;
|
|
1286
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
1287
|
+
this[offset + i] = value / mul & 255;
|
|
1288
|
+
}
|
|
1289
|
+
return offset + byteLength3;
|
|
1290
|
+
};
|
|
1291
|
+
Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength3, noAssert) {
|
|
1292
|
+
value = +value;
|
|
1293
|
+
offset = offset >>> 0;
|
|
1294
|
+
byteLength3 = byteLength3 >>> 0;
|
|
1295
|
+
if (!noAssert) {
|
|
1296
|
+
const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
|
|
1297
|
+
checkInt(this, value, offset, byteLength3, maxBytes, 0);
|
|
1298
|
+
}
|
|
1299
|
+
let i = byteLength3 - 1;
|
|
1300
|
+
let mul = 1;
|
|
1301
|
+
this[offset + i] = value & 255;
|
|
1302
|
+
while (--i >= 0 && (mul *= 256)) {
|
|
1303
|
+
this[offset + i] = value / mul & 255;
|
|
1304
|
+
}
|
|
1305
|
+
return offset + byteLength3;
|
|
1306
|
+
};
|
|
1307
|
+
Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
|
|
1308
|
+
value = +value;
|
|
1309
|
+
offset = offset >>> 0;
|
|
1310
|
+
if (!noAssert)
|
|
1311
|
+
checkInt(this, value, offset, 1, 255, 0);
|
|
1312
|
+
this[offset] = value & 255;
|
|
1313
|
+
return offset + 1;
|
|
1314
|
+
};
|
|
1315
|
+
Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
|
|
1316
|
+
value = +value;
|
|
1317
|
+
offset = offset >>> 0;
|
|
1318
|
+
if (!noAssert)
|
|
1319
|
+
checkInt(this, value, offset, 2, 65535, 0);
|
|
1320
|
+
this[offset] = value & 255;
|
|
1321
|
+
this[offset + 1] = value >>> 8;
|
|
1322
|
+
return offset + 2;
|
|
1323
|
+
};
|
|
1324
|
+
Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
|
|
1325
|
+
value = +value;
|
|
1326
|
+
offset = offset >>> 0;
|
|
1327
|
+
if (!noAssert)
|
|
1328
|
+
checkInt(this, value, offset, 2, 65535, 0);
|
|
1329
|
+
this[offset] = value >>> 8;
|
|
1330
|
+
this[offset + 1] = value & 255;
|
|
1331
|
+
return offset + 2;
|
|
1332
|
+
};
|
|
1333
|
+
Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
|
|
1334
|
+
value = +value;
|
|
1335
|
+
offset = offset >>> 0;
|
|
1336
|
+
if (!noAssert)
|
|
1337
|
+
checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1338
|
+
this[offset + 3] = value >>> 24;
|
|
1339
|
+
this[offset + 2] = value >>> 16;
|
|
1340
|
+
this[offset + 1] = value >>> 8;
|
|
1341
|
+
this[offset] = value & 255;
|
|
1342
|
+
return offset + 4;
|
|
1343
|
+
};
|
|
1344
|
+
Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
|
|
1345
|
+
value = +value;
|
|
1346
|
+
offset = offset >>> 0;
|
|
1347
|
+
if (!noAssert)
|
|
1348
|
+
checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1349
|
+
this[offset] = value >>> 24;
|
|
1350
|
+
this[offset + 1] = value >>> 16;
|
|
1351
|
+
this[offset + 2] = value >>> 8;
|
|
1352
|
+
this[offset + 3] = value & 255;
|
|
1353
|
+
return offset + 4;
|
|
1354
|
+
};
|
|
1355
|
+
function wrtBigUInt64LE(buf, value, offset, min, max) {
|
|
1356
|
+
checkIntBI(value, min, max, buf, offset, 7);
|
|
1357
|
+
let lo = Number(value & BigInt(4294967295));
|
|
1358
|
+
buf[offset++] = lo;
|
|
1359
|
+
lo = lo >> 8;
|
|
1360
|
+
buf[offset++] = lo;
|
|
1361
|
+
lo = lo >> 8;
|
|
1362
|
+
buf[offset++] = lo;
|
|
1363
|
+
lo = lo >> 8;
|
|
1364
|
+
buf[offset++] = lo;
|
|
1365
|
+
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
1366
|
+
buf[offset++] = hi;
|
|
1367
|
+
hi = hi >> 8;
|
|
1368
|
+
buf[offset++] = hi;
|
|
1369
|
+
hi = hi >> 8;
|
|
1370
|
+
buf[offset++] = hi;
|
|
1371
|
+
hi = hi >> 8;
|
|
1372
|
+
buf[offset++] = hi;
|
|
1373
|
+
return offset;
|
|
1374
|
+
}
|
|
1375
|
+
function wrtBigUInt64BE(buf, value, offset, min, max) {
|
|
1376
|
+
checkIntBI(value, min, max, buf, offset, 7);
|
|
1377
|
+
let lo = Number(value & BigInt(4294967295));
|
|
1378
|
+
buf[offset + 7] = lo;
|
|
1379
|
+
lo = lo >> 8;
|
|
1380
|
+
buf[offset + 6] = lo;
|
|
1381
|
+
lo = lo >> 8;
|
|
1382
|
+
buf[offset + 5] = lo;
|
|
1383
|
+
lo = lo >> 8;
|
|
1384
|
+
buf[offset + 4] = lo;
|
|
1385
|
+
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
1386
|
+
buf[offset + 3] = hi;
|
|
1387
|
+
hi = hi >> 8;
|
|
1388
|
+
buf[offset + 2] = hi;
|
|
1389
|
+
hi = hi >> 8;
|
|
1390
|
+
buf[offset + 1] = hi;
|
|
1391
|
+
hi = hi >> 8;
|
|
1392
|
+
buf[offset] = hi;
|
|
1393
|
+
return offset + 8;
|
|
1394
|
+
}
|
|
1395
|
+
Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
|
|
1396
|
+
return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1397
|
+
});
|
|
1398
|
+
Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
|
|
1399
|
+
return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1400
|
+
});
|
|
1401
|
+
Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength3, noAssert) {
|
|
1402
|
+
value = +value;
|
|
1403
|
+
offset = offset >>> 0;
|
|
1404
|
+
if (!noAssert) {
|
|
1405
|
+
const limit = Math.pow(2, 8 * byteLength3 - 1);
|
|
1406
|
+
checkInt(this, value, offset, byteLength3, limit - 1, -limit);
|
|
1407
|
+
}
|
|
1408
|
+
let i = 0;
|
|
1409
|
+
let mul = 1;
|
|
1410
|
+
let sub = 0;
|
|
1411
|
+
this[offset] = value & 255;
|
|
1412
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
1413
|
+
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
|
1414
|
+
sub = 1;
|
|
1415
|
+
}
|
|
1416
|
+
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
1417
|
+
}
|
|
1418
|
+
return offset + byteLength3;
|
|
1419
|
+
};
|
|
1420
|
+
Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength3, noAssert) {
|
|
1421
|
+
value = +value;
|
|
1422
|
+
offset = offset >>> 0;
|
|
1423
|
+
if (!noAssert) {
|
|
1424
|
+
const limit = Math.pow(2, 8 * byteLength3 - 1);
|
|
1425
|
+
checkInt(this, value, offset, byteLength3, limit - 1, -limit);
|
|
1426
|
+
}
|
|
1427
|
+
let i = byteLength3 - 1;
|
|
1428
|
+
let mul = 1;
|
|
1429
|
+
let sub = 0;
|
|
1430
|
+
this[offset + i] = value & 255;
|
|
1431
|
+
while (--i >= 0 && (mul *= 256)) {
|
|
1432
|
+
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
|
1433
|
+
sub = 1;
|
|
1434
|
+
}
|
|
1435
|
+
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
1436
|
+
}
|
|
1437
|
+
return offset + byteLength3;
|
|
1438
|
+
};
|
|
1439
|
+
Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
|
|
1440
|
+
value = +value;
|
|
1441
|
+
offset = offset >>> 0;
|
|
1442
|
+
if (!noAssert)
|
|
1443
|
+
checkInt(this, value, offset, 1, 127, -128);
|
|
1444
|
+
if (value < 0)
|
|
1445
|
+
value = 255 + value + 1;
|
|
1446
|
+
this[offset] = value & 255;
|
|
1447
|
+
return offset + 1;
|
|
1448
|
+
};
|
|
1449
|
+
Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
|
|
1450
|
+
value = +value;
|
|
1451
|
+
offset = offset >>> 0;
|
|
1452
|
+
if (!noAssert)
|
|
1453
|
+
checkInt(this, value, offset, 2, 32767, -32768);
|
|
1454
|
+
this[offset] = value & 255;
|
|
1455
|
+
this[offset + 1] = value >>> 8;
|
|
1456
|
+
return offset + 2;
|
|
1457
|
+
};
|
|
1458
|
+
Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
|
|
1459
|
+
value = +value;
|
|
1460
|
+
offset = offset >>> 0;
|
|
1461
|
+
if (!noAssert)
|
|
1462
|
+
checkInt(this, value, offset, 2, 32767, -32768);
|
|
1463
|
+
this[offset] = value >>> 8;
|
|
1464
|
+
this[offset + 1] = value & 255;
|
|
1465
|
+
return offset + 2;
|
|
1466
|
+
};
|
|
1467
|
+
Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
|
|
1468
|
+
value = +value;
|
|
1469
|
+
offset = offset >>> 0;
|
|
1470
|
+
if (!noAssert)
|
|
1471
|
+
checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
1472
|
+
this[offset] = value & 255;
|
|
1473
|
+
this[offset + 1] = value >>> 8;
|
|
1474
|
+
this[offset + 2] = value >>> 16;
|
|
1475
|
+
this[offset + 3] = value >>> 24;
|
|
1476
|
+
return offset + 4;
|
|
1477
|
+
};
|
|
1478
|
+
Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
|
|
1479
|
+
value = +value;
|
|
1480
|
+
offset = offset >>> 0;
|
|
1481
|
+
if (!noAssert)
|
|
1482
|
+
checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
1483
|
+
if (value < 0)
|
|
1484
|
+
value = 4294967295 + value + 1;
|
|
1485
|
+
this[offset] = value >>> 24;
|
|
1486
|
+
this[offset + 1] = value >>> 16;
|
|
1487
|
+
this[offset + 2] = value >>> 8;
|
|
1488
|
+
this[offset + 3] = value & 255;
|
|
1489
|
+
return offset + 4;
|
|
1490
|
+
};
|
|
1491
|
+
Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
|
|
1492
|
+
return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1493
|
+
});
|
|
1494
|
+
Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
|
|
1495
|
+
return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1496
|
+
});
|
|
1497
|
+
function checkIEEE754(buf, value, offset, ext, max, min) {
|
|
1498
|
+
if (offset + ext > buf.length)
|
|
1499
|
+
throw new RangeError("Index out of range");
|
|
1500
|
+
if (offset < 0)
|
|
1501
|
+
throw new RangeError("Index out of range");
|
|
1502
|
+
}
|
|
1503
|
+
function writeFloat(buf, value, offset, littleEndian, noAssert) {
|
|
1504
|
+
value = +value;
|
|
1505
|
+
offset = offset >>> 0;
|
|
1506
|
+
if (!noAssert) {
|
|
1507
|
+
checkIEEE754(buf, value, offset, 4);
|
|
1508
|
+
}
|
|
1509
|
+
ieee754$1.write(buf, value, offset, littleEndian, 23, 4);
|
|
1510
|
+
return offset + 4;
|
|
1511
|
+
}
|
|
1512
|
+
Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
|
|
1513
|
+
return writeFloat(this, value, offset, true, noAssert);
|
|
1514
|
+
};
|
|
1515
|
+
Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
|
|
1516
|
+
return writeFloat(this, value, offset, false, noAssert);
|
|
1517
|
+
};
|
|
1518
|
+
function writeDouble(buf, value, offset, littleEndian, noAssert) {
|
|
1519
|
+
value = +value;
|
|
1520
|
+
offset = offset >>> 0;
|
|
1521
|
+
if (!noAssert) {
|
|
1522
|
+
checkIEEE754(buf, value, offset, 8);
|
|
1523
|
+
}
|
|
1524
|
+
ieee754$1.write(buf, value, offset, littleEndian, 52, 8);
|
|
1525
|
+
return offset + 8;
|
|
1526
|
+
}
|
|
1527
|
+
Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
|
|
1528
|
+
return writeDouble(this, value, offset, true, noAssert);
|
|
1529
|
+
};
|
|
1530
|
+
Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
|
|
1531
|
+
return writeDouble(this, value, offset, false, noAssert);
|
|
1532
|
+
};
|
|
1533
|
+
Buffer.prototype.copy = function copy(target, targetStart, start, end) {
|
|
1534
|
+
if (!Buffer.isBuffer(target))
|
|
1535
|
+
throw new TypeError("argument should be a Buffer");
|
|
1536
|
+
if (!start)
|
|
1537
|
+
start = 0;
|
|
1538
|
+
if (!end && end !== 0)
|
|
1539
|
+
end = this.length;
|
|
1540
|
+
if (targetStart >= target.length)
|
|
1541
|
+
targetStart = target.length;
|
|
1542
|
+
if (!targetStart)
|
|
1543
|
+
targetStart = 0;
|
|
1544
|
+
if (end > 0 && end < start)
|
|
1545
|
+
end = start;
|
|
1546
|
+
if (end === start)
|
|
1547
|
+
return 0;
|
|
1548
|
+
if (target.length === 0 || this.length === 0)
|
|
1549
|
+
return 0;
|
|
1550
|
+
if (targetStart < 0) {
|
|
1551
|
+
throw new RangeError("targetStart out of bounds");
|
|
1552
|
+
}
|
|
1553
|
+
if (start < 0 || start >= this.length)
|
|
1554
|
+
throw new RangeError("Index out of range");
|
|
1555
|
+
if (end < 0)
|
|
1556
|
+
throw new RangeError("sourceEnd out of bounds");
|
|
1557
|
+
if (end > this.length)
|
|
1558
|
+
end = this.length;
|
|
1559
|
+
if (target.length - targetStart < end - start) {
|
|
1560
|
+
end = target.length - targetStart + start;
|
|
1561
|
+
}
|
|
1562
|
+
const len = end - start;
|
|
1563
|
+
if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
|
|
1564
|
+
this.copyWithin(targetStart, start, end);
|
|
1565
|
+
} else {
|
|
1566
|
+
Uint8Array.prototype.set.call(
|
|
1567
|
+
target,
|
|
1568
|
+
this.subarray(start, end),
|
|
1569
|
+
targetStart
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
return len;
|
|
1573
|
+
};
|
|
1574
|
+
Buffer.prototype.fill = function fill(val, start, end, encoding) {
|
|
1575
|
+
if (typeof val === "string") {
|
|
1576
|
+
if (typeof start === "string") {
|
|
1577
|
+
encoding = start;
|
|
1578
|
+
start = 0;
|
|
1579
|
+
end = this.length;
|
|
1580
|
+
} else if (typeof end === "string") {
|
|
1581
|
+
encoding = end;
|
|
1582
|
+
end = this.length;
|
|
1583
|
+
}
|
|
1584
|
+
if (encoding !== void 0 && typeof encoding !== "string") {
|
|
1585
|
+
throw new TypeError("encoding must be a string");
|
|
1586
|
+
}
|
|
1587
|
+
if (typeof encoding === "string" && !Buffer.isEncoding(encoding)) {
|
|
1588
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
1589
|
+
}
|
|
1590
|
+
if (val.length === 1) {
|
|
1591
|
+
const code2 = val.charCodeAt(0);
|
|
1592
|
+
if (encoding === "utf8" && code2 < 128 || encoding === "latin1") {
|
|
1593
|
+
val = code2;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
} else if (typeof val === "number") {
|
|
1597
|
+
val = val & 255;
|
|
1598
|
+
} else if (typeof val === "boolean") {
|
|
1599
|
+
val = Number(val);
|
|
1600
|
+
}
|
|
1601
|
+
if (start < 0 || this.length < start || this.length < end) {
|
|
1602
|
+
throw new RangeError("Out of range index");
|
|
1603
|
+
}
|
|
1604
|
+
if (end <= start) {
|
|
1605
|
+
return this;
|
|
1606
|
+
}
|
|
1607
|
+
start = start >>> 0;
|
|
1608
|
+
end = end === void 0 ? this.length : end >>> 0;
|
|
1609
|
+
if (!val)
|
|
1610
|
+
val = 0;
|
|
1611
|
+
let i;
|
|
1612
|
+
if (typeof val === "number") {
|
|
1613
|
+
for (i = start; i < end; ++i) {
|
|
1614
|
+
this[i] = val;
|
|
1615
|
+
}
|
|
1616
|
+
} else {
|
|
1617
|
+
const bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
|
|
1618
|
+
const len = bytes.length;
|
|
1619
|
+
if (len === 0) {
|
|
1620
|
+
throw new TypeError('The value "' + val + '" is invalid for argument "value"');
|
|
1621
|
+
}
|
|
1622
|
+
for (i = 0; i < end - start; ++i) {
|
|
1623
|
+
this[i + start] = bytes[i % len];
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
return this;
|
|
1627
|
+
};
|
|
1628
|
+
const errors = {};
|
|
1629
|
+
function E(sym, getMessage, Base) {
|
|
1630
|
+
errors[sym] = class NodeError extends Base {
|
|
1631
|
+
constructor() {
|
|
1632
|
+
super();
|
|
1633
|
+
Object.defineProperty(this, "message", {
|
|
1634
|
+
value: getMessage.apply(this, arguments),
|
|
1635
|
+
writable: true,
|
|
1636
|
+
configurable: true
|
|
1637
|
+
});
|
|
1638
|
+
this.name = `${this.name} [${sym}]`;
|
|
1639
|
+
this.stack;
|
|
1640
|
+
delete this.name;
|
|
1641
|
+
}
|
|
1642
|
+
get code() {
|
|
1643
|
+
return sym;
|
|
1644
|
+
}
|
|
1645
|
+
set code(value) {
|
|
1646
|
+
Object.defineProperty(this, "code", {
|
|
1647
|
+
configurable: true,
|
|
1648
|
+
enumerable: true,
|
|
1649
|
+
value,
|
|
1650
|
+
writable: true
|
|
1651
|
+
});
|
|
1652
|
+
}
|
|
1653
|
+
toString() {
|
|
1654
|
+
return `${this.name} [${sym}]: ${this.message}`;
|
|
1655
|
+
}
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
E(
|
|
1659
|
+
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
1660
|
+
function(name) {
|
|
1661
|
+
if (name) {
|
|
1662
|
+
return `${name} is outside of buffer bounds`;
|
|
1663
|
+
}
|
|
1664
|
+
return "Attempt to access memory outside buffer bounds";
|
|
1665
|
+
},
|
|
1666
|
+
RangeError
|
|
1667
|
+
);
|
|
1668
|
+
E(
|
|
1669
|
+
"ERR_INVALID_ARG_TYPE",
|
|
1670
|
+
function(name, actual) {
|
|
1671
|
+
return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
|
|
1672
|
+
},
|
|
1673
|
+
TypeError
|
|
1674
|
+
);
|
|
1675
|
+
E(
|
|
1676
|
+
"ERR_OUT_OF_RANGE",
|
|
1677
|
+
function(str, range, input) {
|
|
1678
|
+
let msg = `The value of "${str}" is out of range.`;
|
|
1679
|
+
let received = input;
|
|
1680
|
+
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
1681
|
+
received = addNumericalSeparator(String(input));
|
|
1682
|
+
} else if (typeof input === "bigint") {
|
|
1683
|
+
received = String(input);
|
|
1684
|
+
if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
|
|
1685
|
+
received = addNumericalSeparator(received);
|
|
1686
|
+
}
|
|
1687
|
+
received += "n";
|
|
1688
|
+
}
|
|
1689
|
+
msg += ` It must be ${range}. Received ${received}`;
|
|
1690
|
+
return msg;
|
|
1691
|
+
},
|
|
1692
|
+
RangeError
|
|
1693
|
+
);
|
|
1694
|
+
function addNumericalSeparator(val) {
|
|
1695
|
+
let res = "";
|
|
1696
|
+
let i = val.length;
|
|
1697
|
+
const start = val[0] === "-" ? 1 : 0;
|
|
1698
|
+
for (; i >= start + 4; i -= 3) {
|
|
1699
|
+
res = `_${val.slice(i - 3, i)}${res}`;
|
|
1700
|
+
}
|
|
1701
|
+
return `${val.slice(0, i)}${res}`;
|
|
1702
|
+
}
|
|
1703
|
+
function checkBounds(buf, offset, byteLength3) {
|
|
1704
|
+
validateNumber(offset, "offset");
|
|
1705
|
+
if (buf[offset] === void 0 || buf[offset + byteLength3] === void 0) {
|
|
1706
|
+
boundsError(offset, buf.length - (byteLength3 + 1));
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
function checkIntBI(value, min, max, buf, offset, byteLength3) {
|
|
1710
|
+
if (value > max || value < min) {
|
|
1711
|
+
const n = typeof min === "bigint" ? "n" : "";
|
|
1712
|
+
let range;
|
|
1713
|
+
if (byteLength3 > 3) {
|
|
1714
|
+
if (min === 0 || min === BigInt(0)) {
|
|
1715
|
+
range = `>= 0${n} and < 2${n} ** ${(byteLength3 + 1) * 8}${n}`;
|
|
1716
|
+
} else {
|
|
1717
|
+
range = `>= -(2${n} ** ${(byteLength3 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength3 + 1) * 8 - 1}${n}`;
|
|
1718
|
+
}
|
|
1719
|
+
} else {
|
|
1720
|
+
range = `>= ${min}${n} and <= ${max}${n}`;
|
|
1721
|
+
}
|
|
1722
|
+
throw new errors.ERR_OUT_OF_RANGE("value", range, value);
|
|
1723
|
+
}
|
|
1724
|
+
checkBounds(buf, offset, byteLength3);
|
|
1725
|
+
}
|
|
1726
|
+
function validateNumber(value, name) {
|
|
1727
|
+
if (typeof value !== "number") {
|
|
1728
|
+
throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
function boundsError(value, length, type) {
|
|
1732
|
+
if (Math.floor(value) !== value) {
|
|
1733
|
+
validateNumber(value, type);
|
|
1734
|
+
throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
|
|
1735
|
+
}
|
|
1736
|
+
if (length < 0) {
|
|
1737
|
+
throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
|
|
1738
|
+
}
|
|
1739
|
+
throw new errors.ERR_OUT_OF_RANGE(
|
|
1740
|
+
type || "offset",
|
|
1741
|
+
`>= ${type ? 1 : 0} and <= ${length}`,
|
|
1742
|
+
value
|
|
1743
|
+
);
|
|
1744
|
+
}
|
|
1745
|
+
const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
|
|
1746
|
+
function base64clean(str) {
|
|
1747
|
+
str = str.split("=")[0];
|
|
1748
|
+
str = str.trim().replace(INVALID_BASE64_RE, "");
|
|
1749
|
+
if (str.length < 2)
|
|
1750
|
+
return "";
|
|
1751
|
+
while (str.length % 4 !== 0) {
|
|
1752
|
+
str = str + "=";
|
|
1753
|
+
}
|
|
1754
|
+
return str;
|
|
1755
|
+
}
|
|
1756
|
+
function utf8ToBytes(string, units) {
|
|
1757
|
+
units = units || Infinity;
|
|
1758
|
+
let codePoint;
|
|
1759
|
+
const length = string.length;
|
|
1760
|
+
let leadSurrogate = null;
|
|
1761
|
+
const bytes = [];
|
|
1762
|
+
for (let i = 0; i < length; ++i) {
|
|
1763
|
+
codePoint = string.charCodeAt(i);
|
|
1764
|
+
if (codePoint > 55295 && codePoint < 57344) {
|
|
1765
|
+
if (!leadSurrogate) {
|
|
1766
|
+
if (codePoint > 56319) {
|
|
1767
|
+
if ((units -= 3) > -1)
|
|
1768
|
+
bytes.push(239, 191, 189);
|
|
1769
|
+
continue;
|
|
1770
|
+
} else if (i + 1 === length) {
|
|
1771
|
+
if ((units -= 3) > -1)
|
|
1772
|
+
bytes.push(239, 191, 189);
|
|
1773
|
+
continue;
|
|
1774
|
+
}
|
|
1775
|
+
leadSurrogate = codePoint;
|
|
1776
|
+
continue;
|
|
1777
|
+
}
|
|
1778
|
+
if (codePoint < 56320) {
|
|
1779
|
+
if ((units -= 3) > -1)
|
|
1780
|
+
bytes.push(239, 191, 189);
|
|
1781
|
+
leadSurrogate = codePoint;
|
|
1782
|
+
continue;
|
|
1783
|
+
}
|
|
1784
|
+
codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
|
|
1785
|
+
} else if (leadSurrogate) {
|
|
1786
|
+
if ((units -= 3) > -1)
|
|
1787
|
+
bytes.push(239, 191, 189);
|
|
1788
|
+
}
|
|
1789
|
+
leadSurrogate = null;
|
|
1790
|
+
if (codePoint < 128) {
|
|
1791
|
+
if ((units -= 1) < 0)
|
|
1792
|
+
break;
|
|
1793
|
+
bytes.push(codePoint);
|
|
1794
|
+
} else if (codePoint < 2048) {
|
|
1795
|
+
if ((units -= 2) < 0)
|
|
1796
|
+
break;
|
|
1797
|
+
bytes.push(
|
|
1798
|
+
codePoint >> 6 | 192,
|
|
1799
|
+
codePoint & 63 | 128
|
|
1800
|
+
);
|
|
1801
|
+
} else if (codePoint < 65536) {
|
|
1802
|
+
if ((units -= 3) < 0)
|
|
1803
|
+
break;
|
|
1804
|
+
bytes.push(
|
|
1805
|
+
codePoint >> 12 | 224,
|
|
1806
|
+
codePoint >> 6 & 63 | 128,
|
|
1807
|
+
codePoint & 63 | 128
|
|
1808
|
+
);
|
|
1809
|
+
} else if (codePoint < 1114112) {
|
|
1810
|
+
if ((units -= 4) < 0)
|
|
1811
|
+
break;
|
|
1812
|
+
bytes.push(
|
|
1813
|
+
codePoint >> 18 | 240,
|
|
1814
|
+
codePoint >> 12 & 63 | 128,
|
|
1815
|
+
codePoint >> 6 & 63 | 128,
|
|
1816
|
+
codePoint & 63 | 128
|
|
1817
|
+
);
|
|
1818
|
+
} else {
|
|
1819
|
+
throw new Error("Invalid code point");
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
return bytes;
|
|
1823
|
+
}
|
|
1824
|
+
function asciiToBytes(str) {
|
|
1825
|
+
const byteArray = [];
|
|
1826
|
+
for (let i = 0; i < str.length; ++i) {
|
|
1827
|
+
byteArray.push(str.charCodeAt(i) & 255);
|
|
1828
|
+
}
|
|
1829
|
+
return byteArray;
|
|
1830
|
+
}
|
|
1831
|
+
function utf16leToBytes(str, units) {
|
|
1832
|
+
let c, hi, lo;
|
|
1833
|
+
const byteArray = [];
|
|
1834
|
+
for (let i = 0; i < str.length; ++i) {
|
|
1835
|
+
if ((units -= 2) < 0)
|
|
1836
|
+
break;
|
|
1837
|
+
c = str.charCodeAt(i);
|
|
1838
|
+
hi = c >> 8;
|
|
1839
|
+
lo = c % 256;
|
|
1840
|
+
byteArray.push(lo);
|
|
1841
|
+
byteArray.push(hi);
|
|
1842
|
+
}
|
|
1843
|
+
return byteArray;
|
|
1844
|
+
}
|
|
1845
|
+
function base64ToBytes(str) {
|
|
1846
|
+
return base64.toByteArray(base64clean(str));
|
|
1847
|
+
}
|
|
1848
|
+
function blitBuffer(src, dst, offset, length) {
|
|
1849
|
+
let i;
|
|
1850
|
+
for (i = 0; i < length; ++i) {
|
|
1851
|
+
if (i + offset >= dst.length || i >= src.length)
|
|
1852
|
+
break;
|
|
1853
|
+
dst[i + offset] = src[i];
|
|
1854
|
+
}
|
|
1855
|
+
return i;
|
|
1856
|
+
}
|
|
1857
|
+
function isInstance(obj, type) {
|
|
1858
|
+
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
1859
|
+
}
|
|
1860
|
+
function numberIsNaN(obj) {
|
|
1861
|
+
return obj !== obj;
|
|
1862
|
+
}
|
|
1863
|
+
const hexSliceLookupTable = function() {
|
|
1864
|
+
const alphabet = "0123456789abcdef";
|
|
1865
|
+
const table = new Array(256);
|
|
1866
|
+
for (let i = 0; i < 16; ++i) {
|
|
1867
|
+
const i16 = i * 16;
|
|
1868
|
+
for (let j = 0; j < 16; ++j) {
|
|
1869
|
+
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
return table;
|
|
1873
|
+
}();
|
|
1874
|
+
function defineBigIntMethod(fn) {
|
|
1875
|
+
return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
|
|
1876
|
+
}
|
|
1877
|
+
function BufferBigIntNotDefined() {
|
|
1878
|
+
throw new Error("BigInt not supported");
|
|
1879
|
+
}
|
|
1880
|
+
})(buffer);
|
|
1881
|
+
var browser = { exports: {} };
|
|
1882
|
+
var process = browser.exports = {};
|
|
1883
|
+
var cachedSetTimeout;
|
|
1884
|
+
var cachedClearTimeout;
|
|
1885
|
+
function defaultSetTimout() {
|
|
1886
|
+
throw new Error("setTimeout has not been defined");
|
|
1887
|
+
}
|
|
1888
|
+
function defaultClearTimeout() {
|
|
1889
|
+
throw new Error("clearTimeout has not been defined");
|
|
1890
|
+
}
|
|
1891
|
+
(function() {
|
|
1892
|
+
try {
|
|
1893
|
+
if (typeof setTimeout === "function") {
|
|
1894
|
+
cachedSetTimeout = setTimeout;
|
|
1895
|
+
} else {
|
|
1896
|
+
cachedSetTimeout = defaultSetTimout;
|
|
1897
|
+
}
|
|
1898
|
+
} catch (e) {
|
|
1899
|
+
cachedSetTimeout = defaultSetTimout;
|
|
1900
|
+
}
|
|
1901
|
+
try {
|
|
1902
|
+
if (typeof clearTimeout === "function") {
|
|
1903
|
+
cachedClearTimeout = clearTimeout;
|
|
1904
|
+
} else {
|
|
1905
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
1906
|
+
}
|
|
1907
|
+
} catch (e) {
|
|
1908
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
1909
|
+
}
|
|
1910
|
+
})();
|
|
1911
|
+
function runTimeout(fun) {
|
|
1912
|
+
if (cachedSetTimeout === setTimeout) {
|
|
1913
|
+
return setTimeout(fun, 0);
|
|
1914
|
+
}
|
|
1915
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
1916
|
+
cachedSetTimeout = setTimeout;
|
|
1917
|
+
return setTimeout(fun, 0);
|
|
1918
|
+
}
|
|
1919
|
+
try {
|
|
1920
|
+
return cachedSetTimeout(fun, 0);
|
|
1921
|
+
} catch (e) {
|
|
1922
|
+
try {
|
|
1923
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
1924
|
+
} catch (e2) {
|
|
1925
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
function runClearTimeout(marker) {
|
|
1930
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
1931
|
+
return clearTimeout(marker);
|
|
1932
|
+
}
|
|
1933
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
1934
|
+
cachedClearTimeout = clearTimeout;
|
|
1935
|
+
return clearTimeout(marker);
|
|
1936
|
+
}
|
|
1937
|
+
try {
|
|
1938
|
+
return cachedClearTimeout(marker);
|
|
1939
|
+
} catch (e) {
|
|
1940
|
+
try {
|
|
1941
|
+
return cachedClearTimeout.call(null, marker);
|
|
1942
|
+
} catch (e2) {
|
|
1943
|
+
return cachedClearTimeout.call(this, marker);
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
var queue = [];
|
|
1948
|
+
var draining = false;
|
|
1949
|
+
var currentQueue;
|
|
1950
|
+
var queueIndex = -1;
|
|
1951
|
+
function cleanUpNextTick() {
|
|
1952
|
+
if (!draining || !currentQueue) {
|
|
1953
|
+
return;
|
|
1954
|
+
}
|
|
1955
|
+
draining = false;
|
|
1956
|
+
if (currentQueue.length) {
|
|
1957
|
+
queue = currentQueue.concat(queue);
|
|
1958
|
+
} else {
|
|
1959
|
+
queueIndex = -1;
|
|
1960
|
+
}
|
|
1961
|
+
if (queue.length) {
|
|
1962
|
+
drainQueue();
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
function drainQueue() {
|
|
1966
|
+
if (draining) {
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1969
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
1970
|
+
draining = true;
|
|
1971
|
+
var len = queue.length;
|
|
1972
|
+
while (len) {
|
|
1973
|
+
currentQueue = queue;
|
|
1974
|
+
queue = [];
|
|
1975
|
+
while (++queueIndex < len) {
|
|
1976
|
+
if (currentQueue) {
|
|
1977
|
+
currentQueue[queueIndex].run();
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
queueIndex = -1;
|
|
1981
|
+
len = queue.length;
|
|
1982
|
+
}
|
|
1983
|
+
currentQueue = null;
|
|
1984
|
+
draining = false;
|
|
1985
|
+
runClearTimeout(timeout);
|
|
1986
|
+
}
|
|
1987
|
+
process.nextTick = function(fun) {
|
|
1988
|
+
var args = new Array(arguments.length - 1);
|
|
1989
|
+
if (arguments.length > 1) {
|
|
1990
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1991
|
+
args[i - 1] = arguments[i];
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
queue.push(new Item(fun, args));
|
|
1995
|
+
if (queue.length === 1 && !draining) {
|
|
1996
|
+
runTimeout(drainQueue);
|
|
1997
|
+
}
|
|
1998
|
+
};
|
|
1999
|
+
function Item(fun, array) {
|
|
2000
|
+
this.fun = fun;
|
|
2001
|
+
this.array = array;
|
|
2002
|
+
}
|
|
2003
|
+
Item.prototype.run = function() {
|
|
2004
|
+
this.fun.apply(null, this.array);
|
|
2005
|
+
};
|
|
2006
|
+
process.title = "browser";
|
|
2007
|
+
process.browser = true;
|
|
2008
|
+
process.env = {};
|
|
2009
|
+
process.argv = [];
|
|
2010
|
+
process.version = "";
|
|
2011
|
+
process.versions = {};
|
|
2012
|
+
function noop() {
|
|
2013
|
+
}
|
|
2014
|
+
process.on = noop;
|
|
2015
|
+
process.addListener = noop;
|
|
2016
|
+
process.once = noop;
|
|
2017
|
+
process.off = noop;
|
|
2018
|
+
process.removeListener = noop;
|
|
2019
|
+
process.removeAllListeners = noop;
|
|
2020
|
+
process.emit = noop;
|
|
2021
|
+
process.prependListener = noop;
|
|
2022
|
+
process.prependOnceListener = noop;
|
|
2023
|
+
process.listeners = function(name) {
|
|
2024
|
+
return [];
|
|
2025
|
+
};
|
|
2026
|
+
process.binding = function(name) {
|
|
2027
|
+
throw new Error("process.binding is not supported");
|
|
2028
|
+
};
|
|
2029
|
+
process.cwd = function() {
|
|
2030
|
+
return "/";
|
|
2031
|
+
};
|
|
2032
|
+
process.chdir = function(dir) {
|
|
2033
|
+
throw new Error("process.chdir is not supported");
|
|
2034
|
+
};
|
|
2035
|
+
process.umask = function() {
|
|
2036
|
+
return 0;
|
|
2037
|
+
};
|
|
2038
|
+
var browserExports = browser.exports;
|
|
2039
|
+
(function(exports2) {
|
|
2040
|
+
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
2041
|
+
const t = buffer, r = browserExports, o = (e) => e && e.__esModule ? e : { default: e }, l = o(r), u = globalThis || void 0 || self;
|
|
2042
|
+
Object.defineProperty(exports2, "Buffer", { enumerable: true, get: () => t.Buffer });
|
|
2043
|
+
Object.defineProperty(exports2, "process", { enumerable: true, get: () => l.default });
|
|
2044
|
+
exports2.global = u;
|
|
2045
|
+
})(dist);
|
|
2046
|
+
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
2047
|
+
var FeatureSource;
|
|
2048
|
+
(function(FeatureSource2) {
|
|
2049
|
+
FeatureSource2["ORGANIZATION"] = "ORGANIZATION";
|
|
2050
|
+
FeatureSource2["STREAM"] = "STREAM";
|
|
2051
|
+
})(FeatureSource || (FeatureSource = {}));
|
|
2052
|
+
({
|
|
2053
|
+
[sdkSettings_common_pb.SdkOverlayType.BETTING]: "betting",
|
|
2054
|
+
[sdkSettings_common_pb.SdkOverlayType.GAMES]: "games",
|
|
2055
|
+
[sdkSettings_common_pb.SdkOverlayType.PUBLIC_CHAT]: "publicChat",
|
|
2056
|
+
[sdkSettings_common_pb.SdkOverlayType.TWITTER]: "twitter"
|
|
2057
|
+
});
|
|
2058
|
+
var FeatureStatus;
|
|
2059
|
+
(function(FeatureStatus2) {
|
|
2060
|
+
FeatureStatus2["Ready"] = "ready";
|
|
2061
|
+
FeatureStatus2["Suspended"] = "suspended";
|
|
2062
|
+
})(FeatureStatus || (FeatureStatus = {}));
|
|
2063
|
+
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
2064
|
+
var ServerStreamSubscriptionStatus;
|
|
2065
|
+
(function(ServerStreamSubscriptionStatus2) {
|
|
2066
|
+
ServerStreamSubscriptionStatus2["Init"] = "init";
|
|
2067
|
+
ServerStreamSubscriptionStatus2["Ready"] = "ready";
|
|
2068
|
+
ServerStreamSubscriptionStatus2["Connecting"] = "connecting";
|
|
2069
|
+
ServerStreamSubscriptionStatus2["Connected"] = "connected";
|
|
2070
|
+
ServerStreamSubscriptionStatus2["Disconnected"] = "disconnected";
|
|
2071
|
+
ServerStreamSubscriptionStatus2["Failed"] = "failed";
|
|
2072
|
+
ServerStreamSubscriptionStatus2["Reconnecting"] = "reconnecting";
|
|
2073
|
+
})(ServerStreamSubscriptionStatus || (ServerStreamSubscriptionStatus = {}));
|
|
2074
|
+
const bypassAuth = (transport, params) => {
|
|
2075
|
+
const { client } = transport.createPromiseClient(users_connect.Users, { method: "bypassAuth" });
|
|
2076
|
+
return client.bypassAuth(params);
|
|
2077
|
+
};
|
|
2078
|
+
const anonymousAuth = async (instance, opts) => {
|
|
2079
|
+
var _a, _b;
|
|
2080
|
+
const { schemaName, issuer } = {
|
|
2081
|
+
schemaName: "slra",
|
|
2082
|
+
issuer: "sdk-web"
|
|
2083
|
+
};
|
|
2084
|
+
const organization = await instance.stores.organizationSettings.getValue();
|
|
2085
|
+
if (!organization) {
|
|
2086
|
+
throw new Error("unknown organization");
|
|
2087
|
+
}
|
|
2088
|
+
const userKey = `${(_a = organization.pub) == null ? void 0 : _a.kid}`;
|
|
2089
|
+
const schema = `${schemaName}:${organization.id}`;
|
|
2090
|
+
const anonymous2 = await bypassAuth(instance.transport, { userKey, schema, init: true });
|
|
2091
|
+
const token = (_b = anonymous2.meta) == null ? void 0 : _b.token;
|
|
2092
|
+
const pubKey = organization.pub;
|
|
2093
|
+
const pub = await jose.importJWK({ ...pubKey });
|
|
2094
|
+
const deviceId = window.crypto.randomUUID();
|
|
2095
|
+
const jwe = await new jose.EncryptJWT({ ["device-id"]: deviceId, totp: token }).setProtectedHeader({ alg: pubKey.alg || "", enc: "A256CBC-HS512", kid: pubKey.kid }).setIssuedAt().setIssuer(issuer).setAudience(organization.id).setExpirationTime("2m").encrypt(pub);
|
|
2096
|
+
return instance.sdk.authorizationBypass(schema, jwe);
|
|
2097
|
+
};
|
|
2098
|
+
const anonymous = (instance, opts, done) => {
|
|
2099
|
+
instance.sdk.anonymousAuthorization = async () => {
|
|
2100
|
+
await anonymousAuth(instance);
|
|
2101
|
+
};
|
|
2102
|
+
done();
|
|
2103
|
+
};
|
|
2104
|
+
exports.anonymous = anonymous;
|