@getopenpay/openpay-js
Version:
Accept payments through OpenPay, right on your site
1,367 lines • 2.08 MB
JavaScript
import { d as diag } from "./diag-api-BoyoSeID.js";
import { E as ExportResultCode, h as hexToBinary } from "./ExportResult-BacsqwKA.js";
import { c as commonjsGlobal } from "./_commonjsHelpers-CdLE1o9f.js";
var OTLPExporterBase = (
/** @class */
(function() {
function p(a) {
this._delegate = a;
}
return p.prototype.export = function(a, s) {
this._delegate.export(a, s);
}, p.prototype.forceFlush = function() {
return this._delegate.forceFlush();
}, p.prototype.shutdown = function() {
return this._delegate.shutdown();
}, p;
})()
), __extends$1 = /* @__PURE__ */ (function() {
var p = function(a, s) {
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, u) {
l.__proto__ = u;
} || function(l, u) {
for (var f in u) Object.prototype.hasOwnProperty.call(u, f) && (l[f] = u[f]);
}, p(a, s);
};
return function(a, s) {
if (typeof s != "function" && s !== null)
throw new TypeError("Class extends value " + String(s) + " is not a constructor or null");
p(a, s);
function l() {
this.constructor = a;
}
a.prototype = s === null ? Object.create(s) : (l.prototype = s.prototype, new l());
};
})(), OTLPExporterError = (
/** @class */
(function(p) {
__extends$1(a, p);
function a(s, l, u) {
var f = p.call(this, s) || this;
return f.name = "OTLPExporterError", f.data = u, f.code = l, f;
}
return a;
})(Error)
);
function validateTimeoutMillis(p) {
if (!Number.isNaN(p) && Number.isFinite(p) && p > 0)
return p;
throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '" + p + "')");
}
function wrapStaticHeadersInFunction(p) {
if (p != null)
return function() {
return p;
};
}
function mergeOtlpSharedConfigurationWithDefaults(p, a, s) {
var l, u, f, d, y, h;
return {
timeoutMillis: validateTimeoutMillis((u = (l = p.timeoutMillis) !== null && l !== void 0 ? l : a.timeoutMillis) !== null && u !== void 0 ? u : s.timeoutMillis),
concurrencyLimit: (d = (f = p.concurrencyLimit) !== null && f !== void 0 ? f : a.concurrencyLimit) !== null && d !== void 0 ? d : s.concurrencyLimit,
compression: (h = (y = p.compression) !== null && y !== void 0 ? y : a.compression) !== null && h !== void 0 ? h : s.compression
};
}
function getSharedConfigurationDefaults() {
return {
timeoutMillis: 1e4,
concurrencyLimit: 30,
compression: "none"
};
}
var __awaiter$2 = function(p, a, s, l) {
function u(f) {
return f instanceof s ? f : new s(function(d) {
d(f);
});
}
return new (s || (s = Promise))(function(f, d) {
function y(i) {
try {
o(l.next(i));
} catch (e) {
d(e);
}
}
function h(i) {
try {
o(l.throw(i));
} catch (e) {
d(e);
}
}
function o(i) {
i.done ? f(i.value) : u(i.value).then(y, h);
}
o((l = l.apply(p, a || [])).next());
});
}, __generator$2 = function(p, a) {
var s = { label: 0, sent: function() {
if (f[0] & 1) throw f[1];
return f[1];
}, trys: [], ops: [] }, l, u, f, d;
return d = { next: y(0), throw: y(1), return: y(2) }, typeof Symbol == "function" && (d[Symbol.iterator] = function() {
return this;
}), d;
function y(o) {
return function(i) {
return h([o, i]);
};
}
function h(o) {
if (l) throw new TypeError("Generator is already executing.");
for (; s; ) try {
if (l = 1, u && (f = o[0] & 2 ? u.return : o[0] ? u.throw || ((f = u.return) && f.call(u), 0) : u.next) && !(f = f.call(u, o[1])).done) return f;
switch (u = 0, f && (o = [o[0] & 2, f.value]), o[0]) {
case 0:
case 1:
f = o;
break;
case 4:
return s.label++, { value: o[1], done: !1 };
case 5:
s.label++, u = o[1], o = [0];
continue;
case 7:
o = s.ops.pop(), s.trys.pop();
continue;
default:
if (f = s.trys, !(f = f.length > 0 && f[f.length - 1]) && (o[0] === 6 || o[0] === 2)) {
s = 0;
continue;
}
if (o[0] === 3 && (!f || o[1] > f[0] && o[1] < f[3])) {
s.label = o[1];
break;
}
if (o[0] === 6 && s.label < f[1]) {
s.label = f[1], f = o;
break;
}
if (f && s.label < f[2]) {
s.label = f[2], s.ops.push(o);
break;
}
f[2] && s.ops.pop(), s.trys.pop();
continue;
}
o = a.call(p, s);
} catch (i) {
o = [6, i], u = 0;
} finally {
l = f = 0;
}
if (o[0] & 5) throw o[1];
return { value: o[0] ? o[1] : void 0, done: !0 };
}
}, BoundedQueueExportPromiseHandler = (
/** @class */
(function() {
function p(a) {
this._sendingPromises = [], this._concurrencyLimit = a;
}
return p.prototype.pushPromise = function(a) {
var s = this;
if (this.hasReachedLimit())
throw new Error("Concurrency Limit reached");
this._sendingPromises.push(a);
var l = function() {
var u = s._sendingPromises.indexOf(a);
s._sendingPromises.splice(u, 1);
};
a.then(l, l);
}, p.prototype.hasReachedLimit = function() {
return this._sendingPromises.length >= this._concurrencyLimit;
}, p.prototype.awaitAll = function() {
return __awaiter$2(this, void 0, void 0, function() {
return __generator$2(this, function(a) {
switch (a.label) {
case 0:
return [4, Promise.all(this._sendingPromises)];
case 1:
return a.sent(), [
2
/*return*/
];
}
});
});
}, p;
})()
);
function createBoundedQueueExportPromiseHandler(p) {
return new BoundedQueueExportPromiseHandler(p.concurrencyLimit);
}
function isPartialSuccessResponse(p) {
return Object.prototype.hasOwnProperty.call(p, "partialSuccess");
}
function createLoggingPartialSuccessResponseHandler() {
return {
handleResponse: function(p) {
p == null || !isPartialSuccessResponse(p) || p.partialSuccess == null || Object.keys(p.partialSuccess).length === 0 || diag.warn("Received Partial Success response:", JSON.stringify(p.partialSuccess));
}
};
}
var __awaiter$1 = function(p, a, s, l) {
function u(f) {
return f instanceof s ? f : new s(function(d) {
d(f);
});
}
return new (s || (s = Promise))(function(f, d) {
function y(i) {
try {
o(l.next(i));
} catch (e) {
d(e);
}
}
function h(i) {
try {
o(l.throw(i));
} catch (e) {
d(e);
}
}
function o(i) {
i.done ? f(i.value) : u(i.value).then(y, h);
}
o((l = l.apply(p, a || [])).next());
});
}, __generator$1 = function(p, a) {
var s = { label: 0, sent: function() {
if (f[0] & 1) throw f[1];
return f[1];
}, trys: [], ops: [] }, l, u, f, d;
return d = { next: y(0), throw: y(1), return: y(2) }, typeof Symbol == "function" && (d[Symbol.iterator] = function() {
return this;
}), d;
function y(o) {
return function(i) {
return h([o, i]);
};
}
function h(o) {
if (l) throw new TypeError("Generator is already executing.");
for (; s; ) try {
if (l = 1, u && (f = o[0] & 2 ? u.return : o[0] ? u.throw || ((f = u.return) && f.call(u), 0) : u.next) && !(f = f.call(u, o[1])).done) return f;
switch (u = 0, f && (o = [o[0] & 2, f.value]), o[0]) {
case 0:
case 1:
f = o;
break;
case 4:
return s.label++, { value: o[1], done: !1 };
case 5:
s.label++, u = o[1], o = [0];
continue;
case 7:
o = s.ops.pop(), s.trys.pop();
continue;
default:
if (f = s.trys, !(f = f.length > 0 && f[f.length - 1]) && (o[0] === 6 || o[0] === 2)) {
s = 0;
continue;
}
if (o[0] === 3 && (!f || o[1] > f[0] && o[1] < f[3])) {
s.label = o[1];
break;
}
if (o[0] === 6 && s.label < f[1]) {
s.label = f[1], f = o;
break;
}
if (f && s.label < f[2]) {
s.label = f[2], s.ops.push(o);
break;
}
f[2] && s.ops.pop(), s.trys.pop();
continue;
}
o = a.call(p, s);
} catch (i) {
o = [6, i], u = 0;
} finally {
l = f = 0;
}
if (o[0] & 5) throw o[1];
return { value: o[0] ? o[1] : void 0, done: !0 };
}
}, OTLPExportDelegate = (
/** @class */
(function() {
function p(a, s, l, u, f) {
this._transport = a, this._serializer = s, this._responseHandler = l, this._promiseQueue = u, this._timeout = f, this._diagLogger = diag.createComponentLogger({
namespace: "OTLPExportDelegate"
});
}
return p.prototype.export = function(a, s) {
var l = this;
if (this._diagLogger.debug("items to be sent", a), this._promiseQueue.hasReachedLimit()) {
s({
code: ExportResultCode.FAILED,
error: new Error("Concurrent export limit reached")
});
return;
}
var u = this._serializer.serializeRequest(a);
if (u == null) {
s({
code: ExportResultCode.FAILED,
error: new Error("Nothing to send")
});
return;
}
this._promiseQueue.pushPromise(this._transport.send(u, this._timeout).then(function(f) {
if (f.status === "success") {
if (f.data != null)
try {
l._responseHandler.handleResponse(l._serializer.deserializeResponse(f.data));
} catch (d) {
l._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?", d, f.data);
}
s({
code: ExportResultCode.SUCCESS
});
return;
} else if (f.status === "failure" && f.error) {
s({
code: ExportResultCode.FAILED,
error: f.error
});
return;
} else f.status === "retryable" ? s({
code: ExportResultCode.FAILED,
error: new OTLPExporterError("Export failed with retryable status")
}) : s({
code: ExportResultCode.FAILED,
error: new OTLPExporterError("Export failed with unknown error")
});
}, function(f) {
return s({
code: ExportResultCode.FAILED,
error: f
});
}));
}, p.prototype.forceFlush = function() {
return this._promiseQueue.awaitAll();
}, p.prototype.shutdown = function() {
return __awaiter$1(this, void 0, void 0, function() {
return __generator$1(this, function(a) {
switch (a.label) {
case 0:
return this._diagLogger.debug("shutdown started"), [4, this.forceFlush()];
case 1:
return a.sent(), this._transport.shutdown(), [
2
/*return*/
];
}
});
});
}, p;
})()
);
function createOtlpExportDelegate(p, a) {
return new OTLPExportDelegate(p.transport, p.serializer, createLoggingPartialSuccessResponseHandler(), p.promiseHandler, a.timeout);
}
function createOtlpNetworkExportDelegate(p, a, s) {
return createOtlpExportDelegate({
transport: s,
serializer: a,
promiseHandler: createBoundedQueueExportPromiseHandler(p)
}, { timeout: p.timeoutMillis });
}
var indexMinimal = {}, minimal$1 = {}, aspromise, hasRequiredAspromise;
function requireAspromise() {
if (hasRequiredAspromise) return aspromise;
hasRequiredAspromise = 1, aspromise = p;
function p(a, s) {
for (var l = new Array(arguments.length - 1), u = 0, f = 2, d = !0; f < arguments.length; )
l[u++] = arguments[f++];
return new Promise(function(h, o) {
l[u] = function(e) {
if (d)
if (d = !1, e)
o(e);
else {
for (var t = new Array(arguments.length - 1), n = 0; n < t.length; )
t[n++] = arguments[n];
h.apply(null, t);
}
};
try {
a.apply(s || null, l);
} catch (i) {
d && (d = !1, o(i));
}
});
}
return aspromise;
}
var base64 = {}, hasRequiredBase64;
function requireBase64() {
return hasRequiredBase64 || (hasRequiredBase64 = 1, (function(p) {
var a = p;
a.length = function(y) {
var h = y.length;
if (!h)
return 0;
for (var o = 0; --h % 4 > 1 && y.charAt(h) === "="; )
++o;
return Math.ceil(y.length * 3) / 4 - o;
};
for (var s = new Array(64), l = new Array(123), u = 0; u < 64; )
l[s[u] = u < 26 ? u + 65 : u < 52 ? u + 71 : u < 62 ? u - 4 : u - 59 | 43] = u++;
a.encode = function(y, h, o) {
for (var i = null, e = [], t = 0, n = 0, r; h < o; ) {
var c = y[h++];
switch (n) {
case 0:
e[t++] = s[c >> 2], r = (c & 3) << 4, n = 1;
break;
case 1:
e[t++] = s[r | c >> 4], r = (c & 15) << 2, n = 2;
break;
case 2:
e[t++] = s[r | c >> 6], e[t++] = s[c & 63], n = 0;
break;
}
t > 8191 && ((i || (i = [])).push(String.fromCharCode.apply(String, e)), t = 0);
}
return n && (e[t++] = s[r], e[t++] = 61, n === 1 && (e[t++] = 61)), i ? (t && i.push(String.fromCharCode.apply(String, e.slice(0, t))), i.join("")) : String.fromCharCode.apply(String, e.slice(0, t));
};
var f = "invalid encoding";
a.decode = function(y, h, o) {
for (var i = o, e = 0, t, n = 0; n < y.length; ) {
var r = y.charCodeAt(n++);
if (r === 61 && e > 1)
break;
if ((r = l[r]) === void 0)
throw Error(f);
switch (e) {
case 0:
t = r, e = 1;
break;
case 1:
h[o++] = t << 2 | (r & 48) >> 4, t = r, e = 2;
break;
case 2:
h[o++] = (t & 15) << 4 | (r & 60) >> 2, t = r, e = 3;
break;
case 3:
h[o++] = (t & 3) << 6 | r, e = 0;
break;
}
}
if (e === 1)
throw Error(f);
return o - i;
}, a.test = function(y) {
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(y);
};
})(base64)), base64;
}
var eventemitter, hasRequiredEventemitter;
function requireEventemitter() {
if (hasRequiredEventemitter) return eventemitter;
hasRequiredEventemitter = 1, eventemitter = p;
function p() {
this._listeners = {};
}
return p.prototype.on = function(s, l, u) {
return (this._listeners[s] || (this._listeners[s] = [])).push({
fn: l,
ctx: u || this
}), this;
}, p.prototype.off = function(s, l) {
if (s === void 0)
this._listeners = {};
else if (l === void 0)
this._listeners[s] = [];
else
for (var u = this._listeners[s], f = 0; f < u.length; )
u[f].fn === l ? u.splice(f, 1) : ++f;
return this;
}, p.prototype.emit = function(s) {
var l = this._listeners[s];
if (l) {
for (var u = [], f = 1; f < arguments.length; )
u.push(arguments[f++]);
for (f = 0; f < l.length; )
l[f].fn.apply(l[f++].ctx, u);
}
return this;
}, eventemitter;
}
var float, hasRequiredFloat;
function requireFloat() {
if (hasRequiredFloat) return float;
hasRequiredFloat = 1, float = p(p);
function p(f) {
return typeof Float32Array < "u" ? (function() {
var d = new Float32Array([-0]), y = new Uint8Array(d.buffer), h = y[3] === 128;
function o(n, r, c) {
d[0] = n, r[c] = y[0], r[c + 1] = y[1], r[c + 2] = y[2], r[c + 3] = y[3];
}
function i(n, r, c) {
d[0] = n, r[c] = y[3], r[c + 1] = y[2], r[c + 2] = y[1], r[c + 3] = y[0];
}
f.writeFloatLE = h ? o : i, f.writeFloatBE = h ? i : o;
function e(n, r) {
return y[0] = n[r], y[1] = n[r + 1], y[2] = n[r + 2], y[3] = n[r + 3], d[0];
}
function t(n, r) {
return y[3] = n[r], y[2] = n[r + 1], y[1] = n[r + 2], y[0] = n[r + 3], d[0];
}
f.readFloatLE = h ? e : t, f.readFloatBE = h ? t : e;
})() : (function() {
function d(h, o, i, e) {
var t = o < 0 ? 1 : 0;
if (t && (o = -o), o === 0)
h(1 / o > 0 ? (
/* positive */
0
) : (
/* negative 0 */
2147483648
), i, e);
else if (isNaN(o))
h(2143289344, i, e);
else if (o > 34028234663852886e22)
h((t << 31 | 2139095040) >>> 0, i, e);
else if (o < 11754943508222875e-54)
h((t << 31 | Math.round(o / 1401298464324817e-60)) >>> 0, i, e);
else {
var n = Math.floor(Math.log(o) / Math.LN2), r = Math.round(o * Math.pow(2, -n) * 8388608) & 8388607;
h((t << 31 | n + 127 << 23 | r) >>> 0, i, e);
}
}
f.writeFloatLE = d.bind(null, a), f.writeFloatBE = d.bind(null, s);
function y(h, o, i) {
var e = h(o, i), t = (e >> 31) * 2 + 1, n = e >>> 23 & 255, r = e & 8388607;
return n === 255 ? r ? NaN : t * (1 / 0) : n === 0 ? t * 1401298464324817e-60 * r : t * Math.pow(2, n - 150) * (r + 8388608);
}
f.readFloatLE = y.bind(null, l), f.readFloatBE = y.bind(null, u);
})(), typeof Float64Array < "u" ? (function() {
var d = new Float64Array([-0]), y = new Uint8Array(d.buffer), h = y[7] === 128;
function o(n, r, c) {
d[0] = n, r[c] = y[0], r[c + 1] = y[1], r[c + 2] = y[2], r[c + 3] = y[3], r[c + 4] = y[4], r[c + 5] = y[5], r[c + 6] = y[6], r[c + 7] = y[7];
}
function i(n, r, c) {
d[0] = n, r[c] = y[7], r[c + 1] = y[6], r[c + 2] = y[5], r[c + 3] = y[4], r[c + 4] = y[3], r[c + 5] = y[2], r[c + 6] = y[1], r[c + 7] = y[0];
}
f.writeDoubleLE = h ? o : i, f.writeDoubleBE = h ? i : o;
function e(n, r) {
return y[0] = n[r], y[1] = n[r + 1], y[2] = n[r + 2], y[3] = n[r + 3], y[4] = n[r + 4], y[5] = n[r + 5], y[6] = n[r + 6], y[7] = n[r + 7], d[0];
}
function t(n, r) {
return y[7] = n[r], y[6] = n[r + 1], y[5] = n[r + 2], y[4] = n[r + 3], y[3] = n[r + 4], y[2] = n[r + 5], y[1] = n[r + 6], y[0] = n[r + 7], d[0];
}
f.readDoubleLE = h ? e : t, f.readDoubleBE = h ? t : e;
})() : (function() {
function d(h, o, i, e, t, n) {
var r = e < 0 ? 1 : 0;
if (r && (e = -e), e === 0)
h(0, t, n + o), h(1 / e > 0 ? (
/* positive */
0
) : (
/* negative 0 */
2147483648
), t, n + i);
else if (isNaN(e))
h(0, t, n + o), h(2146959360, t, n + i);
else if (e > 17976931348623157e292)
h(0, t, n + o), h((r << 31 | 2146435072) >>> 0, t, n + i);
else {
var c;
if (e < 22250738585072014e-324)
c = e / 5e-324, h(c >>> 0, t, n + o), h((r << 31 | c / 4294967296) >>> 0, t, n + i);
else {
var v = Math.floor(Math.log(e) / Math.LN2);
v === 1024 && (v = 1023), c = e * Math.pow(2, -v), h(c * 4503599627370496 >>> 0, t, n + o), h((r << 31 | v + 1023 << 20 | c * 1048576 & 1048575) >>> 0, t, n + i);
}
}
}
f.writeDoubleLE = d.bind(null, a, 0, 4), f.writeDoubleBE = d.bind(null, s, 4, 0);
function y(h, o, i, e, t) {
var n = h(e, t + o), r = h(e, t + i), c = (r >> 31) * 2 + 1, v = r >>> 20 & 2047, m = 4294967296 * (r & 1048575) + n;
return v === 2047 ? m ? NaN : c * (1 / 0) : v === 0 ? c * 5e-324 * m : c * Math.pow(2, v - 1075) * (m + 4503599627370496);
}
f.readDoubleLE = y.bind(null, l, 0, 4), f.readDoubleBE = y.bind(null, u, 4, 0);
})(), f;
}
function a(f, d, y) {
d[y] = f & 255, d[y + 1] = f >>> 8 & 255, d[y + 2] = f >>> 16 & 255, d[y + 3] = f >>> 24;
}
function s(f, d, y) {
d[y] = f >>> 24, d[y + 1] = f >>> 16 & 255, d[y + 2] = f >>> 8 & 255, d[y + 3] = f & 255;
}
function l(f, d) {
return (f[d] | f[d + 1] << 8 | f[d + 2] << 16 | f[d + 3] << 24) >>> 0;
}
function u(f, d) {
return (f[d] << 24 | f[d + 1] << 16 | f[d + 2] << 8 | f[d + 3]) >>> 0;
}
return float;
}
var inquire_1, hasRequiredInquire;
function requireInquire() {
if (hasRequiredInquire) return inquire_1;
hasRequiredInquire = 1, inquire_1 = inquire;
function inquire(moduleName) {
try {
var mod = eval("quire".replace(/^/, "re"))(moduleName);
if (mod && (mod.length || Object.keys(mod).length))
return mod;
} catch (p) {
}
return null;
}
return inquire_1;
}
var utf8 = {}, hasRequiredUtf8;
function requireUtf8() {
return hasRequiredUtf8 || (hasRequiredUtf8 = 1, (function(p) {
var a = p;
a.length = function(l) {
for (var u = 0, f = 0, d = 0; d < l.length; ++d)
f = l.charCodeAt(d), f < 128 ? u += 1 : f < 2048 ? u += 2 : (f & 64512) === 55296 && (l.charCodeAt(d + 1) & 64512) === 56320 ? (++d, u += 4) : u += 3;
return u;
}, a.read = function(l, u, f) {
var d = f - u;
if (d < 1)
return "";
for (var y = null, h = [], o = 0, i; u < f; )
i = l[u++], i < 128 ? h[o++] = i : i > 191 && i < 224 ? h[o++] = (i & 31) << 6 | l[u++] & 63 : i > 239 && i < 365 ? (i = ((i & 7) << 18 | (l[u++] & 63) << 12 | (l[u++] & 63) << 6 | l[u++] & 63) - 65536, h[o++] = 55296 + (i >> 10), h[o++] = 56320 + (i & 1023)) : h[o++] = (i & 15) << 12 | (l[u++] & 63) << 6 | l[u++] & 63, o > 8191 && ((y || (y = [])).push(String.fromCharCode.apply(String, h)), o = 0);
return y ? (o && y.push(String.fromCharCode.apply(String, h.slice(0, o))), y.join("")) : String.fromCharCode.apply(String, h.slice(0, o));
}, a.write = function(l, u, f) {
for (var d = f, y, h, o = 0; o < l.length; ++o)
y = l.charCodeAt(o), y < 128 ? u[f++] = y : y < 2048 ? (u[f++] = y >> 6 | 192, u[f++] = y & 63 | 128) : (y & 64512) === 55296 && ((h = l.charCodeAt(o + 1)) & 64512) === 56320 ? (y = 65536 + ((y & 1023) << 10) + (h & 1023), ++o, u[f++] = y >> 18 | 240, u[f++] = y >> 12 & 63 | 128, u[f++] = y >> 6 & 63 | 128, u[f++] = y & 63 | 128) : (u[f++] = y >> 12 | 224, u[f++] = y >> 6 & 63 | 128, u[f++] = y & 63 | 128);
return f - d;
};
})(utf8)), utf8;
}
var pool_1, hasRequiredPool;
function requirePool() {
if (hasRequiredPool) return pool_1;
hasRequiredPool = 1, pool_1 = p;
function p(a, s, l) {
var u = l || 8192, f = u >>> 1, d = null, y = u;
return function(o) {
if (o < 1 || o > f)
return a(o);
y + o > u && (d = a(u), y = 0);
var i = s.call(d, y, y += o);
return y & 7 && (y = (y | 7) + 1), i;
};
}
return pool_1;
}
var longbits, hasRequiredLongbits;
function requireLongbits() {
if (hasRequiredLongbits) return longbits;
hasRequiredLongbits = 1, longbits = a;
var p = requireMinimal$1();
function a(f, d) {
this.lo = f >>> 0, this.hi = d >>> 0;
}
var s = a.zero = new a(0, 0);
s.toNumber = function() {
return 0;
}, s.zzEncode = s.zzDecode = function() {
return this;
}, s.length = function() {
return 1;
};
var l = a.zeroHash = "\0\0\0\0\0\0\0\0";
a.fromNumber = function(d) {
if (d === 0)
return s;
var y = d < 0;
y && (d = -d);
var h = d >>> 0, o = (d - h) / 4294967296 >>> 0;
return y && (o = ~o >>> 0, h = ~h >>> 0, ++h > 4294967295 && (h = 0, ++o > 4294967295 && (o = 0))), new a(h, o);
}, a.from = function(d) {
if (typeof d == "number")
return a.fromNumber(d);
if (p.isString(d))
if (p.Long)
d = p.Long.fromString(d);
else
return a.fromNumber(parseInt(d, 10));
return d.low || d.high ? new a(d.low >>> 0, d.high >>> 0) : s;
}, a.prototype.toNumber = function(d) {
if (!d && this.hi >>> 31) {
var y = ~this.lo + 1 >>> 0, h = ~this.hi >>> 0;
return y || (h = h + 1 >>> 0), -(y + h * 4294967296);
}
return this.lo + this.hi * 4294967296;
}, a.prototype.toLong = function(d) {
return p.Long ? new p.Long(this.lo | 0, this.hi | 0, !!d) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!d };
};
var u = String.prototype.charCodeAt;
return a.fromHash = function(d) {
return d === l ? s : new a(
(u.call(d, 0) | u.call(d, 1) << 8 | u.call(d, 2) << 16 | u.call(d, 3) << 24) >>> 0,
(u.call(d, 4) | u.call(d, 5) << 8 | u.call(d, 6) << 16 | u.call(d, 7) << 24) >>> 0
);
}, a.prototype.toHash = function() {
return String.fromCharCode(
this.lo & 255,
this.lo >>> 8 & 255,
this.lo >>> 16 & 255,
this.lo >>> 24,
this.hi & 255,
this.hi >>> 8 & 255,
this.hi >>> 16 & 255,
this.hi >>> 24
);
}, a.prototype.zzEncode = function() {
var d = this.hi >> 31;
return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ d) >>> 0, this.lo = (this.lo << 1 ^ d) >>> 0, this;
}, a.prototype.zzDecode = function() {
var d = -(this.lo & 1);
return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ d) >>> 0, this.hi = (this.hi >>> 1 ^ d) >>> 0, this;
}, a.prototype.length = function() {
var d = this.lo, y = (this.lo >>> 28 | this.hi << 4) >>> 0, h = this.hi >>> 24;
return h === 0 ? y === 0 ? d < 16384 ? d < 128 ? 1 : 2 : d < 2097152 ? 3 : 4 : y < 16384 ? y < 128 ? 5 : 6 : y < 2097152 ? 7 : 8 : h < 128 ? 9 : 10;
}, longbits;
}
var hasRequiredMinimal$1;
function requireMinimal$1() {
return hasRequiredMinimal$1 || (hasRequiredMinimal$1 = 1, (function(p) {
var a = p;
a.asPromise = requireAspromise(), a.base64 = requireBase64(), a.EventEmitter = requireEventemitter(), a.float = requireFloat(), a.inquire = requireInquire(), a.utf8 = requireUtf8(), a.pool = requirePool(), a.LongBits = requireLongbits(), a.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), a.global = a.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || minimal$1, a.emptyArray = Object.freeze ? Object.freeze([]) : (
/* istanbul ignore next */
[]
), a.emptyObject = Object.freeze ? Object.freeze({}) : (
/* istanbul ignore next */
{}
), a.isInteger = Number.isInteger || /* istanbul ignore next */
function(f) {
return typeof f == "number" && isFinite(f) && Math.floor(f) === f;
}, a.isString = function(f) {
return typeof f == "string" || f instanceof String;
}, a.isObject = function(f) {
return f && typeof f == "object";
}, a.isset = /**
* Checks if a property on a message is considered to be present.
* @param {Object} obj Plain object or message instance
* @param {string} prop Property name
* @returns {boolean} `true` if considered to be present, otherwise `false`
*/
a.isSet = function(f, d) {
var y = f[d];
return y != null && f.hasOwnProperty(d) ? typeof y != "object" || (Array.isArray(y) ? y.length : Object.keys(y).length) > 0 : !1;
}, a.Buffer = (function() {
try {
var u = a.inquire("buffer").Buffer;
return u.prototype.utf8Write ? u : (
/* istanbul ignore next */
null
);
} catch {
return null;
}
})(), a._Buffer_from = null, a._Buffer_allocUnsafe = null, a.newBuffer = function(f) {
return typeof f == "number" ? a.Buffer ? a._Buffer_allocUnsafe(f) : new a.Array(f) : a.Buffer ? a._Buffer_from(f) : typeof Uint8Array > "u" ? f : new Uint8Array(f);
}, a.Array = typeof Uint8Array < "u" ? Uint8Array : Array, a.Long = /* istanbul ignore next */
a.global.dcodeIO && /* istanbul ignore next */
a.global.dcodeIO.Long || /* istanbul ignore next */
a.global.Long || a.inquire("long"), a.key2Re = /^true|false|0|1$/, a.key32Re = /^-?(?:0|[1-9][0-9]*)$/, a.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, a.longToHash = function(f) {
return f ? a.LongBits.from(f).toHash() : a.LongBits.zeroHash;
}, a.longFromHash = function(f, d) {
var y = a.LongBits.fromHash(f);
return a.Long ? a.Long.fromBits(y.lo, y.hi, d) : y.toNumber(!!d);
};
function s(u, f, d) {
for (var y = Object.keys(f), h = 0; h < y.length; ++h)
(u[y[h]] === void 0 || !d) && (u[y[h]] = f[y[h]]);
return u;
}
a.merge = s, a.lcFirst = function(f) {
return f.charAt(0).toLowerCase() + f.substring(1);
};
function l(u) {
function f(d, y) {
if (!(this instanceof f))
return new f(d, y);
Object.defineProperty(this, "message", { get: function() {
return d;
} }), Error.captureStackTrace ? Error.captureStackTrace(this, f) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), y && s(this, y);
}
return f.prototype = Object.create(Error.prototype, {
constructor: {
value: f,
writable: !0,
enumerable: !1,
configurable: !0
},
name: {
get: function() {
return u;
},
set: void 0,
enumerable: !1,
// configurable: false would accurately preserve the behavior of
// the original, but I'm guessing that was not intentional.
// For an actual error subclass, this property would
// be configurable.
configurable: !0
},
toString: {
value: function() {
return this.name + ": " + this.message;
},
writable: !0,
enumerable: !1,
configurable: !0
}
}), f;
}
a.newError = l, a.ProtocolError = l("ProtocolError"), a.oneOfGetter = function(f) {
for (var d = {}, y = 0; y < f.length; ++y)
d[f[y]] = 1;
return function() {
for (var h = Object.keys(this), o = h.length - 1; o > -1; --o)
if (d[h[o]] === 1 && this[h[o]] !== void 0 && this[h[o]] !== null)
return h[o];
};
}, a.oneOfSetter = function(f) {
return function(d) {
for (var y = 0; y < f.length; ++y)
f[y] !== d && delete this[f[y]];
};
}, a.toJSONOptions = {
longs: String,
enums: String,
bytes: String,
json: !0
}, a._configure = function() {
var u = a.Buffer;
if (!u) {
a._Buffer_from = a._Buffer_allocUnsafe = null;
return;
}
a._Buffer_from = u.from !== Uint8Array.from && u.from || /* istanbul ignore next */
function(d, y) {
return new u(d, y);
}, a._Buffer_allocUnsafe = u.allocUnsafe || /* istanbul ignore next */
function(d) {
return new u(d);
};
};
})(minimal$1)), minimal$1;
}
var writer, hasRequiredWriter;
function requireWriter() {
if (hasRequiredWriter) return writer;
hasRequiredWriter = 1, writer = h;
var p = requireMinimal$1(), a, s = p.LongBits, l = p.base64, u = p.utf8;
function f(v, m, b) {
this.fn = v, this.len = m, this.next = void 0, this.val = b;
}
function d() {
}
function y(v) {
this.head = v.head, this.tail = v.tail, this.len = v.len, this.next = v.states;
}
function h() {
this.len = 0, this.head = new f(d, 0, 0), this.tail = this.head, this.states = null;
}
var o = function() {
return p.Buffer ? function() {
return (h.create = function() {
return new a();
})();
} : function() {
return new h();
};
};
h.create = o(), h.alloc = function(m) {
return new p.Array(m);
}, p.Array !== Array && (h.alloc = p.pool(h.alloc, p.Array.prototype.subarray)), h.prototype._push = function(m, b, x) {
return this.tail = this.tail.next = new f(m, b, x), this.len += b, this;
};
function i(v, m, b) {
m[b] = v & 255;
}
function e(v, m, b) {
for (; v > 127; )
m[b++] = v & 127 | 128, v >>>= 7;
m[b] = v;
}
function t(v, m) {
this.len = v, this.next = void 0, this.val = m;
}
t.prototype = Object.create(f.prototype), t.prototype.fn = e, h.prototype.uint32 = function(m) {
return this.len += (this.tail = this.tail.next = new t(
(m = m >>> 0) < 128 ? 1 : m < 16384 ? 2 : m < 2097152 ? 3 : m < 268435456 ? 4 : 5,
m
)).len, this;
}, h.prototype.int32 = function(m) {
return m < 0 ? this._push(n, 10, s.fromNumber(m)) : this.uint32(m);
}, h.prototype.sint32 = function(m) {
return this.uint32((m << 1 ^ m >> 31) >>> 0);
};
function n(v, m, b) {
for (; v.hi; )
m[b++] = v.lo & 127 | 128, v.lo = (v.lo >>> 7 | v.hi << 25) >>> 0, v.hi >>>= 7;
for (; v.lo > 127; )
m[b++] = v.lo & 127 | 128, v.lo = v.lo >>> 7;
m[b++] = v.lo;
}
h.prototype.uint64 = function(m) {
var b = s.from(m);
return this._push(n, b.length(), b);
}, h.prototype.int64 = h.prototype.uint64, h.prototype.sint64 = function(m) {
var b = s.from(m).zzEncode();
return this._push(n, b.length(), b);
}, h.prototype.bool = function(m) {
return this._push(i, 1, m ? 1 : 0);
};
function r(v, m, b) {
m[b] = v & 255, m[b + 1] = v >>> 8 & 255, m[b + 2] = v >>> 16 & 255, m[b + 3] = v >>> 24;
}
h.prototype.fixed32 = function(m) {
return this._push(r, 4, m >>> 0);
}, h.prototype.sfixed32 = h.prototype.fixed32, h.prototype.fixed64 = function(m) {
var b = s.from(m);
return this._push(r, 4, b.lo)._push(r, 4, b.hi);
}, h.prototype.sfixed64 = h.prototype.fixed64, h.prototype.float = function(m) {
return this._push(p.float.writeFloatLE, 4, m);
}, h.prototype.double = function(m) {
return this._push(p.float.writeDoubleLE, 8, m);
};
var c = p.Array.prototype.set ? function(m, b, x) {
b.set(m, x);
} : function(m, b, x) {
for (var O = 0; O < m.length; ++O)
b[x + O] = m[O];
};
return h.prototype.bytes = function(m) {
var b = m.length >>> 0;
if (!b)
return this._push(i, 1, 0);
if (p.isString(m)) {
var x = h.alloc(b = l.length(m));
l.decode(m, x, 0), m = x;
}
return this.uint32(b)._push(c, b, m);
}, h.prototype.string = function(m) {
var b = u.length(m);
return b ? this.uint32(b)._push(u.write, b, m) : this._push(i, 1, 0);
}, h.prototype.fork = function() {
return this.states = new y(this), this.head = this.tail = new f(d, 0, 0), this.len = 0, this;
}, h.prototype.reset = function() {
return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new f(d, 0, 0), this.len = 0), this;
}, h.prototype.ldelim = function() {
var m = this.head, b = this.tail, x = this.len;
return this.reset().uint32(x), x && (this.tail.next = m.next, this.tail = b, this.len += x), this;
}, h.prototype.finish = function() {
for (var m = this.head.next, b = this.constructor.alloc(this.len), x = 0; m; )
m.fn(m.val, b, x), x += m.len, m = m.next;
return b;
}, h._configure = function(v) {
a = v, h.create = o(), a._configure();
}, writer;
}
var writer_buffer, hasRequiredWriter_buffer;
function requireWriter_buffer() {
if (hasRequiredWriter_buffer) return writer_buffer;
hasRequiredWriter_buffer = 1, writer_buffer = s;
var p = requireWriter();
(s.prototype = Object.create(p.prototype)).constructor = s;
var a = requireMinimal$1();
function s() {
p.call(this);
}
s._configure = function() {
s.alloc = a._Buffer_allocUnsafe, s.writeBytesBuffer = a.Buffer && a.Buffer.prototype instanceof Uint8Array && a.Buffer.prototype.set.name === "set" ? function(f, d, y) {
d.set(f, y);
} : function(f, d, y) {
if (f.copy)
f.copy(d, y, 0, f.length);
else for (var h = 0; h < f.length; )
d[y++] = f[h++];
};
}, s.prototype.bytes = function(f) {
a.isString(f) && (f = a._Buffer_from(f, "base64"));
var d = f.length >>> 0;
return this.uint32(d), d && this._push(s.writeBytesBuffer, d, f), this;
};
function l(u, f, d) {
u.length < 40 ? a.utf8.write(u, f, d) : f.utf8Write ? f.utf8Write(u, d) : f.write(u, d);
}
return s.prototype.string = function(f) {
var d = a.Buffer.byteLength(f);
return this.uint32(d), d && this._push(l, d, f), this;
}, s._configure(), writer_buffer;
}
var reader, hasRequiredReader;
function requireReader() {
if (hasRequiredReader) return reader;
hasRequiredReader = 1, reader = f;
var p = requireMinimal$1(), a, s = p.LongBits, l = p.utf8;
function u(e, t) {
return RangeError("index out of range: " + e.pos + " + " + (t || 1) + " > " + e.len);
}
function f(e) {
this.buf = e, this.pos = 0, this.len = e.length;
}
var d = typeof Uint8Array < "u" ? function(t) {
if (t instanceof Uint8Array || Array.isArray(t))
return new f(t);
throw Error("illegal buffer");
} : function(t) {
if (Array.isArray(t))
return new f(t);
throw Error("illegal buffer");
}, y = function() {
return p.Buffer ? function(n) {
return (f.create = function(c) {
return p.Buffer.isBuffer(c) ? new a(c) : d(c);
})(n);
} : d;
};
f.create = y(), f.prototype._slice = p.Array.prototype.subarray || /* istanbul ignore next */
p.Array.prototype.slice, f.prototype.uint32 = /* @__PURE__ */ (function() {
var t = 4294967295;
return function() {
if (t = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (t = (t | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (t = (t | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (t = (t | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (t = (t | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return t;
if ((this.pos += 5) > this.len)
throw this.pos = this.len, u(this, 10);
return t;
};
})(), f.prototype.int32 = function() {
return this.uint32() | 0;
}, f.prototype.sint32 = function() {
var t = this.uint32();
return t >>> 1 ^ -(t & 1) | 0;
};
function h() {
var e = new s(0, 0), t = 0;
if (this.len - this.pos > 4) {
for (; t < 4; ++t)
if (e.lo = (e.lo | (this.buf[this.pos] & 127) << t * 7) >>> 0, this.buf[this.pos++] < 128)
return e;
if (e.lo = (e.lo | (this.buf[this.pos] & 127) << 28) >>> 0, e.hi = (e.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128)
return e;
t = 0;
} else {
for (; t < 3; ++t) {
if (this.pos >= this.len)
throw u(this);
if (e.lo = (e.lo | (this.buf[this.pos] & 127) << t * 7) >>> 0, this.buf[this.pos++] < 128)
return e;
}
return e.lo = (e.lo | (this.buf[this.pos++] & 127) << t * 7) >>> 0, e;
}
if (this.len - this.pos > 4) {
for (; t < 5; ++t)
if (e.hi = (e.hi | (this.buf[this.pos] & 127) << t * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
return e;
} else
for (; t < 5; ++t) {
if (this.pos >= this.len)
throw u(this);
if (e.hi = (e.hi | (this.buf[this.pos] & 127) << t * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
return e;
}
throw Error("invalid varint encoding");
}
f.prototype.bool = function() {
return this.uint32() !== 0;
};
function o(e, t) {
return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0;
}
f.prototype.fixed32 = function() {
if (this.pos + 4 > this.len)
throw u(this, 4);
return o(this.buf, this.pos += 4);
}, f.prototype.sfixed32 = function() {
if (this.pos + 4 > this.len)
throw u(this, 4);
return o(this.buf, this.pos += 4) | 0;
};
function i() {
if (this.pos + 8 > this.len)
throw u(this, 8);
return new s(o(this.buf, this.pos += 4), o(this.buf, this.pos += 4));
}
return f.prototype.float = function() {
if (this.pos + 4 > this.len)
throw u(this, 4);
var t = p.float.readFloatLE(this.buf, this.pos);
return this.pos += 4, t;
}, f.prototype.double = function() {
if (this.pos + 8 > this.len)
throw u(this, 4);
var t = p.float.readDoubleLE(this.buf, this.pos);
return this.pos += 8, t;
}, f.prototype.bytes = function() {
var t = this.uint32(), n = this.pos, r = this.pos + t;
if (r > this.len)
throw u(this, t);
if (this.pos += t, Array.isArray(this.buf))
return this.buf.slice(n, r);
if (n === r) {
var c = p.Buffer;
return c ? c.alloc(0) : new this.buf.constructor(0);
}
return this._slice.call(this.buf, n, r);
}, f.prototype.string = function() {
var t = this.bytes();
return l.read(t, 0, t.length);
}, f.prototype.skip = function(t) {
if (typeof t == "number") {
if (this.pos + t > this.len)
throw u(this, t);
this.pos += t;
} else
do
if (this.pos >= this.len)
throw u(this);
while (this.buf[this.pos++] & 128);
return this;
}, f.prototype.skipType = function(e) {
switch (e) {
case 0:
this.skip();
break;
case 1:
this.skip(8);
break;
case 2:
this.skip(this.uint32());
break;
case 3:
for (; (e = this.uint32() & 7) !== 4; )
this.skipType(e);
break;
case 5:
this.skip(4);
break;
/* istanbul ignore next */
default:
throw Error("invalid wire type " + e + " at offset " + this.pos);
}
return this;
}, f._configure = function(e) {
a = e, f.create = y(), a._configure();
var t = p.Long ? "toLong" : (
/* istanbul ignore next */
"toNumber"
);
p.merge(f.prototype, {
int64: function() {
return h.call(this)[t](!1);
},
uint64: function() {
return h.call(this)[t](!0);
},
sint64: function() {
return h.call(this).zzDecode()[t](!1);
},
fixed64: function() {
return i.call(this)[t](!0);
},
sfixed64: function() {
return i.call(this)[t](!1);
}
});
}, reader;
}
var reader_buffer, hasRequiredReader_buffer;
function requireReader_buffer() {
if (hasRequiredReader_buffer) return reader_buffer;
hasRequiredReader_buffer = 1, reader_buffer = s;
var p = requireReader();
(s.prototype = Object.create(p.prototype)).constructor = s;
var a = requireMinimal$1();
function s(l) {
p.call(this, l);
}
return s._configure = function() {
a.Buffer && (s.prototype._slice = a.Buffer.prototype.slice);
}, s.prototype.string = function() {
var u = this.uint32();
return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + u, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + u, this.len));
}, s._configure(), reader_buffer;
}
var rpc = {}, service, hasRequiredService;
function requireService() {
if (hasRequiredService) return service;
hasRequiredService = 1, service = a;
var p = requireMinimal$1();
(a.prototype = Object.create(p.EventEmitter.prototype)).constructor = a;
function a(s, l, u) {
if (typeof s != "function")
throw TypeError("rpcImpl must be a function");
p.EventEmitter.call(this), this.rpcImpl = s, this.requestDelimited = !!l, this.responseDelimited = !!u;
}
return a.prototype.rpcCall = function s(l, u, f, d, y) {
if (!d)
throw TypeError("request must be specified");
var h = this;
if (!y)
return p.asPromise(s, h, l, u, f, d);
if (!h.rpcImpl) {
setTimeout(function() {
y(Error("already ended"));
}, 0);
return;
}
try {
return h.rpcImpl(
l,
u[h.requestDelimited ? "encodeDelimited" : "encode"](d).finish(),
function(i, e) {
if (i)
return h.emit("error", i, l), y(i);
if (e === null) {
h.end(
/* endedByRPC */
!0
);
return;
}
if (!(e instanceof f))
try {
e = f[h.responseDelimited ? "decodeDelimited" : "decode"](e);
} catch (t) {
return h.emit("error", t, l), y(t);
}
return h.emit("data", e, l), y(null, e);
}
);
} catch (o) {
h.emit("error", o, l), setTimeout(function() {
y(o);
}, 0);
return;
}
}, a.prototype.end = function(l) {
return this.rpcImpl && (l || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
}, service;
}
var hasRequiredRpc;
function requireRpc() {
return hasRequiredRpc || (hasRequiredRpc = 1, (function(p) {
var a = p;
a.Service = requireService();
})(rpc)), rpc;
}
var roots, hasRequiredRoots;
function requireRoots() {
return hasRequiredRoots || (hasRequiredRoots = 1, roots = {}), roots;
}
var hasRequiredIndexMinimal;
function requireIndexMinimal() {
return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, (function(p) {
var a = p;
a.build = "minimal", a.Writer = requireWriter(), a.BufferWriter = requireWriter_buffer(), a.Reader = requireReader(), a.BufferReader = requireReader_buffer(), a.util = requireMinimal$1(), a.rpc = requireRpc(), a.roots = requireRoots(), a.configure = s;
function s() {
a.util._configure(), a.Writer._configure(a.BufferWriter), a.Reader._configure(a.BufferReader);
}
s();
})(indexMinimal)), indexMinimal;
}
var minimal, hasRequiredMinimal;
function requireMinimal() {
return hasRequiredMinimal || (hasRequiredMinimal = 1, minimal = requireIndexMinimal()), minimal;
}
var root, hasRequiredRoot;
function requireRoot() {
if (hasRequiredRoot) return root;
hasRequiredRoot = 1;
var p = requireMinimal(), a = p.Reader, s = p.Writer, l = p.util, u = p.roots.default || (p.roots.default = {});
return u.opentelemetry = (function() {
var f = {};
return f.proto = (function() {
var d = {};
return d.common = (function() {
var y = {};
return y.v1 = (function() {
var h = {};
return h.AnyValue = (function() {
function o(e) {
if (e)
for (var t = Object.keys(e), n = 0; n < t.length; ++n)
e[t[n]] != null && (this[t[n]] = e[t[n]]);
}
o.prototype.stringValue = null, o.prototype.boolValue = null, o.prototype.intValue = null, o.prototype.doubleValue = null, o.prototype.arrayValue = null, o.prototype.kvlistValue = null, o.prototype.bytesValue = null;
var i;
return Object.defineProperty(o.prototype, "value", {
get: l.oneOfGetter(i = ["stringValue", "boolValue", "intValue", "doubleValue", "arrayValue", "kvlistValue", "bytesValue"]),
set: l.oneOfSetter(i)
}), o.create = function(t) {
return new o(t);
}, o.encode = function(t, n) {
return n || (n = s.create()), t.stringValue != null && Object.hasOwnProperty.call(t, "stringValue") && n.uint32(
/* id 1, wireType 2 =*/
10
).string(t.stringValue), t.boolValue != null && Object.hasOwnProperty.call(t, "boolValue") && n.uint32(
/* id 2, wireType 0 =*/
16
).bool(t.boolValue), t.intValue != null && Object.hasOwnProperty.call(t, "intValue") && n.uint32(
/* id 3, wireType 0 =*/
24
).int64(t.intValue), t.doubleValue != null && Object.hasOwnProperty.call(t, "doubleValue") && n.uint32(
/* id 4, wireType 1 =*/
33
).double(t.doubleValue), t.arrayValue != null && Object.hasOwnProperty.call(t, "arrayValue") && u.opentelemetry.proto.common.v1.ArrayValue.encode(t.arrayValue, n.uint32(
/* id 5, wireType 2 =*/
42
).fork()).ldelim(), t.kvlistValue != null && Object.hasOwnProperty.call(t, "kvlistValue") && u.opentelemetry.proto.common.v1.KeyValueList.encode(t.kvlistValue, n.uint32(
/* id 6, wireType 2 =*/
50
).fork()).ldelim(), t.bytesValue != null && Object.hasOwnProperty.call(t, "bytesValue") && n.uint32(
/* id 7, wireType 2 =*/
58
).bytes(t.bytesValue), n;
}, o.encodeDelimited = function(t, n) {
return this.encode(t, n).ldelim();
}, o.decode = function(t, n) {
t instanceof a || (t = a.create(t));
for (var r = n === void 0 ? t.len : t.pos + n, c = new u.opentelemetry.proto.common.v1.AnyValue(); t.pos < r; ) {
var v = t.uint32();
switch (v >>> 3) {
case 1: {
c.stringValue = t.string();
break;
}
case 2: {
c.boolValue = t.bool();
break;
}
case 3: {
c.intValue = t.int64();
break;
}
case 4: {
c.doubleValue = t.double();
break;
}
case 5: {
c.arrayValue = u.opentelemetry.proto.common.v1.ArrayValue.decode(t, t.uint32());
break;
}
case 6: {
c.kvlistValue = u.opentelemetry.proto.common.v1.KeyValueList.decode(t, t.uint32());
break;
}
case 7: {
c.bytesValue = t.bytes();
break;
}
default:
t.skipType(v & 7);
break;
}
}
return c;
}, o.decodeDelim