@byteplus/vepusher 2.0.4-rc.6 → 2.0.4-rc.7

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/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- var $c = Object.defineProperty;
2
- var Kc = (r, e, t) => e in r ? $c(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var P = (r, e, t) => Kc(r, typeof e != "symbol" ? e + "" : e, t);
4
- function Wc(r, e) {
1
+ var Kc = Object.defineProperty;
2
+ var Wc = (r, e, t) => e in r ? Kc(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var P = (r, e, t) => Wc(r, typeof e != "symbol" ? e + "" : e, t);
4
+ function Jc(r, e) {
5
5
  for (var t = 0; t < e.length; t++) {
6
6
  const n = e[t];
7
7
  if (typeof n != "string" && !Array.isArray(n)) {
@@ -21,7 +21,7 @@ function _n(r) {
21
21
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
22
22
  }
23
23
  var xn = { exports: {} }, as;
24
- function Jc() {
24
+ function Xc() {
25
25
  return as || (as = 1, function(r) {
26
26
  var e = Object.prototype.hasOwnProperty, t = "~";
27
27
  function n() {
@@ -127,8 +127,8 @@ function Jc() {
127
127
  }, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = t, o.EventEmitter = o, r.exports = o;
128
128
  }(xn)), xn.exports;
129
129
  }
130
- var Xc = Jc();
131
- const pt = /* @__PURE__ */ _n(Xc);
130
+ var Zc = Xc();
131
+ const pt = /* @__PURE__ */ _n(Zc);
132
132
  var Ko = /* @__PURE__ */ ((r) => (r.LeftToRight = "LeftToRight", r.UpToDown = "UpToDown", r.All = "All", r.None = "None", r))(Ko || {}), ee = /* @__PURE__ */ ((r) => (r.Camera = "camera", r.Screen = "screen", r.VideoFile = "videoFile", r.Microphone = "microphone", r.AudioFile = "audioFile", r.Image = "image", r.MixAudio = "mixAudio", r.MixVideo = "mixVideo", r.CustomVideo = "customVideo", r.CustomAudio = "customAudio", r))(ee || {}), je = /* @__PURE__ */ ((r) => (r.DeviceCaptured = "deviceCaptured", r.DeviceStopCapture = "deviceStopCapture", r.Error = "error", r.Interrupted = "interrupted", r))(je || {}), oe = /* @__PURE__ */ ((r) => (r.PushStart = "pushStart", r.PushStop = "pushStop", r.PushError = "pushError", r.RTCConnectStateChanged = "rtcConnectStateChanged", r.CaptureFirstVideoFrame = "capturefirstvideoframe", r.CaptureFirstAudioFrame = "capturefirstaudioframe", r.NotAllowedAutoPlay = "notallowedautoplay", r.ReconnectStateChange = "reconnectStateChange", r.LiveConnectStateChange = "liveConnectStateChange", r))(oe || {}), Wo = /* @__PURE__ */ ((r) => (r["120p"] = "160x120x15x200", r["180p"] = "320x180x15x350", r["240p"] = "320x240x15x400", r["360p"] = "640x360x15x800", r["480p"] = "640x480x15x900", r["720p-1"] = "1280x720x15x1500", r["720p-2"] = "1280x720x25x1500", r["720p-3"] = "1280x720x30x1500", r["1080p-1"] = "1920x1080x15x2080", r["1080p-2"] = "1920x1080x25x3000", r["1080p-3"] = "1920x1080x30x3150", r))(Wo || {}), Jo = /* @__PURE__ */ ((r) => (r["120p"] = "120x160x15x200", r["180p"] = "180x320x15x350", r["240p"] = "240x320x15x400", r["360p"] = "360x640x15x800", r["480p"] = "480x640x15x900", r["720p-1"] = "720x1280x15x1500", r["720p-2"] = "720x1280x25x1500", r["720p-3"] = "720x1280x30x1500", r["1080p-1"] = "1080x1920x15x2080", r["1080p-2"] = "1080x1920x25x3000", r["1080p-3"] = "1080x1920x30x3150", r))(Jo || {}), Xo = /* @__PURE__ */ ((r) => (r.STANDARD = "48000x40", r.HIGH = "48000x128", r))(Xo || {}), Ct = /* @__PURE__ */ ((r) => (r.VideoStreamChange = "videoStreamChange", r.AudioStreamChange = "audioStreamChange", r))(Ct || {}), Zo = /* @__PURE__ */ ((r) => (r[r.init = -1] = "init", r[r.new = 0] = "new", r[r.connecting = 1] = "connecting", r[r.connected = 2] = "connected", r[r.disconnected = 3] = "disconnected", r[r.failed = 4] = "failed", r[r.closed = 5] = "closed", r))(Zo || {});
133
133
  const Yo = {
134
134
  SizeChange: "sizeChange"
@@ -139,29 +139,29 @@ var Ie = /* @__PURE__ */ ((r) => (r[r.DISCONNECTED = 0] = "DISCONNECTED", r[r.CO
139
139
  const fe = [];
140
140
  for (let r = 0; r < 256; ++r)
141
141
  fe.push((r + 256).toString(16).slice(1));
142
- function Zc(r, e = 0) {
142
+ function Yc(r, e = 0) {
143
143
  return (fe[r[e + 0]] + fe[r[e + 1]] + fe[r[e + 2]] + fe[r[e + 3]] + "-" + fe[r[e + 4]] + fe[r[e + 5]] + "-" + fe[r[e + 6]] + fe[r[e + 7]] + "-" + fe[r[e + 8]] + fe[r[e + 9]] + "-" + fe[r[e + 10]] + fe[r[e + 11]] + fe[r[e + 12]] + fe[r[e + 13]] + fe[r[e + 14]] + fe[r[e + 15]]).toLowerCase();
144
144
  }
145
145
  let In;
146
- const Yc = new Uint8Array(16);
147
- function Qc() {
146
+ const Qc = new Uint8Array(16);
147
+ function eu() {
148
148
  if (!In) {
149
149
  if (typeof crypto > "u" || !crypto.getRandomValues)
150
150
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
151
151
  In = crypto.getRandomValues.bind(crypto);
152
152
  }
153
- return In(Yc);
153
+ return In(Qc);
154
154
  }
155
- const eu = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), cs = { randomUUID: eu };
155
+ const tu = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), cs = { randomUUID: tu };
156
156
  function At(r, e, t) {
157
157
  var i;
158
158
  if (cs.randomUUID && !r)
159
159
  return cs.randomUUID();
160
160
  r = r || {};
161
- const n = r.random ?? ((i = r.rng) == null ? void 0 : i.call(r)) ?? Qc();
161
+ const n = r.random ?? ((i = r.rng) == null ? void 0 : i.call(r)) ?? eu();
162
162
  if (n.length < 16)
163
163
  throw new Error("Random bytes length must be >= 16");
164
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Zc(n);
164
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Yc(n);
165
165
  }
166
166
  class ta {
167
167
  constructor() {
@@ -211,7 +211,7 @@ class us extends ta {
211
211
  this._g = t, this._node && (this._node.gain.value = t);
212
212
  }
213
213
  }
214
- class tu extends ta {
214
+ class ru extends ta {
215
215
  constructor(t) {
216
216
  super();
217
217
  P(this, "previousNode", null);
@@ -225,7 +225,7 @@ class tu extends ta {
225
225
  super.destroy();
226
226
  }
227
227
  }
228
- class ru extends tu {
228
+ class nu extends ru {
229
229
  constructor() {
230
230
  super(...arguments);
231
231
  P(this, "_node");
@@ -266,8 +266,8 @@ const ds = {
266
266
  warn: { color: "rgba(255, 119, 0, 0.3)", text: "WARN" },
267
267
  err: { color: "rgba(255, 0, 0, 0.3)", text: "ERR " },
268
268
  succ: { color: "rgba(0, 119, 0, 0.3)", text: "SUCC" }
269
- }, ls = "__debug__", nu = "[VE-CAPTURE]";
270
- function iu() {
269
+ }, ls = "__debug__", iu = "[VE-CAPTURE]";
270
+ function su() {
271
271
  if (typeof location > "u" || typeof localStorage > "u")
272
272
  return !1;
273
273
  let r = !1;
@@ -279,9 +279,9 @@ let we = class {
279
279
  this.moduleName = e;
280
280
  }
281
281
  print(e, t, ...n) {
282
- const i = su();
283
- iu() && console.log(
284
- `${i}-${nu}%c[${ds[e].text}]%c[${this.moduleName}][${t}]`,
282
+ const i = ou();
283
+ su() && console.log(
284
+ `${i}-${iu}%c[${ds[e].text}]%c[${this.moduleName}][${t}]`,
285
285
  `background-color:${ds[e].color};`,
286
286
  "background-color:rgba(0, 0, 0, 0)",
287
287
  ...n
@@ -314,7 +314,7 @@ let we = class {
314
314
  };
315
315
  }
316
316
  };
317
- function su() {
317
+ function ou() {
318
318
  const r = /* @__PURE__ */ new Date();
319
319
  return `${r.toTimeString().split(" ")[0]}:${r.getMilliseconds().toString().padStart(3, "0")}`;
320
320
  }
@@ -388,15 +388,15 @@ Ni();
388
388
  !ae() && /micromessenger/i.test(ie());
389
389
  !ae() && ie().includes("mobile");
390
390
  !ae() && /sm-\w+/i.test(ie());
391
- const ou = !ae() && !!/(iphone|ipad|ipod)/i.exec(ie());
391
+ const au = !ae() && !!/(iphone|ipad|ipod)/i.exec(ie());
392
392
  !ae() && /android/i.test(ie());
393
393
  !ae() && /windows/i.test(ie());
394
394
  !ae() && /openharmony/i.test(ie());
395
395
  let ia = "0";
396
396
  var Fo;
397
- const au = !ae() && ((Fo = ie().match(/version\/(\d+)/i)) == null ? void 0 : Fo[1]);
397
+ const cu = !ae() && ((Fo = ie().match(/version\/(\d+)/i)) == null ? void 0 : Fo[1]);
398
398
  var Vo;
399
- gn && au && (ia = (Vo = navigator.userAgent.match(/version\/(\d+\.\d+)/i)) == null ? void 0 : Vo[1]);
399
+ gn && cu && (ia = (Vo = navigator.userAgent.match(/version\/(\d+\.\d+)/i)) == null ? void 0 : Vo[1]);
400
400
  var jo;
401
401
  !ae() && ((jo = ie().match(/firefox\/(\d+)/i)) == null || jo[1]);
402
402
  const fi = ia;
@@ -404,51 +404,51 @@ var Ho, qo;
404
404
  !ae() && ((qo = (Ho = ie().match(/ ([\d_]+) like mac os x/i)) == null ? void 0 : Ho[1]) == null || qo.split("_").map((r) => parseInt(r)));
405
405
  var $o;
406
406
  !ae() && (($o = ie().match(/chrome\/(\d+)/i)) == null || $o[1]);
407
- function cu() {
407
+ function uu() {
408
408
  var r;
409
409
  return !!((r = navigator == null ? void 0 : navigator.permissions) != null && r.query);
410
410
  }
411
411
  function Ui() {
412
412
  return !!(navigator != null && navigator.mediaDevices);
413
413
  }
414
- function uu() {
414
+ function du() {
415
415
  var r;
416
416
  return Ui() && !!((r = navigator == null ? void 0 : navigator.mediaDevices) != null && r.getUserMedia);
417
417
  }
418
- function du() {
418
+ function lu() {
419
419
  return !!Promise.withResolvers;
420
420
  }
421
- function lu() {
421
+ function hu() {
422
422
  return !(gn && fi === "16.1");
423
423
  }
424
- function hu() {
424
+ function pu() {
425
425
  return !(gn && fi && ["16.1", "16.2", "16.3"].includes(fi));
426
426
  }
427
- function pu() {
427
+ function fu() {
428
428
  return !na;
429
429
  }
430
- function fu() {
430
+ function mu() {
431
431
  return typeof CanvasCaptureMediaStreamTrack < "u";
432
432
  }
433
- function mu(r) {
433
+ function _u(r) {
434
434
  return typeof r.requestFrame == "function";
435
435
  }
436
- function _u() {
436
+ function gu() {
437
437
  return !!Ui() && typeof navigator.mediaDevices.ondevicechange < "u" && typeof navigator.mediaDevices.addEventListener == "function";
438
438
  }
439
439
  const We = {
440
- permissionQuery: cu,
440
+ permissionQuery: uu,
441
441
  mediaDevices: Ui,
442
- settingResolutionInGetDisplayMedia: lu,
443
- promiseWithResolvers: du,
444
- getUserMedia: uu,
445
- isolateEnumerateDevices: pu,
446
- supportIdealParamsInGetDisplayMedia: hu,
447
- canvasCaptureMediaStreamTrack: fu,
448
- requestFrameOnMediaStream: mu,
449
- ondevicechange: _u
442
+ settingResolutionInGetDisplayMedia: hu,
443
+ promiseWithResolvers: lu,
444
+ getUserMedia: du,
445
+ isolateEnumerateDevices: fu,
446
+ supportIdealParamsInGetDisplayMedia: pu,
447
+ canvasCaptureMediaStreamTrack: mu,
448
+ requestFrameOnMediaStream: _u,
449
+ ondevicechange: gu
450
450
  };
451
- function gu() {
451
+ function vu() {
452
452
  if (We.promiseWithResolvers())
453
453
  return Promise.withResolvers();
454
454
  let r, e;
@@ -464,7 +464,7 @@ function sa(r = {}) {
464
464
  timeout: 0,
465
465
  message: new $(K.UNEXPECTED_ERROR, "unexpected timeout"),
466
466
  ...r
467
- }, { promise: n, resolve: i, reject: s } = gu();
467
+ }, { promise: n, resolve: i, reject: s } = vu();
468
468
  if (e <= 0)
469
469
  return { promise: n, resolve: i, reject: s };
470
470
  const a = setTimeout(() => {
@@ -478,7 +478,7 @@ function sa(r = {}) {
478
478
  reject: s
479
479
  };
480
480
  }
481
- const vu = {
481
+ const yu = {
482
482
  playsinline: "",
483
483
  "webkit-playsinline": "",
484
484
  "x5-playsinline": "",
@@ -487,7 +487,7 @@ const vu = {
487
487
  preload: "metadata",
488
488
  muted: "",
489
489
  crossOrigin: "anonymous"
490
- }, yu = {
490
+ }, Su = {
491
491
  playsinline: "",
492
492
  "webkit-playsinline": "",
493
493
  preload: "metadata",
@@ -507,9 +507,9 @@ class wr {
507
507
  let n;
508
508
  if (e instanceof MediaStreamTrack) {
509
509
  const o = new MediaStream([e]);
510
- n = Su(o), this._stream = o;
510
+ n = bu(o), this._stream = o;
511
511
  } else if (e.url)
512
- n = bu(e);
512
+ n = Eu(e);
513
513
  else
514
514
  throw new $(
515
515
  K.UNEXPECTED_TYPE,
@@ -613,7 +613,7 @@ class wr {
613
613
  });
614
614
  }
615
615
  }
616
- function Su(r) {
616
+ function bu(r) {
617
617
  let e = "audio";
618
618
  r.getVideoTracks().length > 0 && (e = "video");
619
619
  const t = oa(
@@ -621,7 +621,7 @@ function Su(r) {
621
621
  );
622
622
  return t.srcObject = r, t;
623
623
  }
624
- function bu(r) {
624
+ function Eu(r) {
625
625
  const { url: e, kind: t, loop: n } = r, i = oa(t);
626
626
  return i.src = e, i.loop = n, i;
627
627
  }
@@ -632,14 +632,14 @@ function oa(r) {
632
632
  width: "100%",
633
633
  height: "100%"
634
634
  },
635
- attributes: vu
635
+ attributes: yu
636
636
  });
637
637
  if (r === te.AUDIO)
638
638
  return pi(te.AUDIO, {
639
639
  style: {
640
640
  display: "none"
641
641
  },
642
- attributes: yu
642
+ attributes: Su
643
643
  });
644
644
  throw new $(
645
645
  K.UNEXPECTED_TYPE,
@@ -711,7 +711,7 @@ class aa {
711
711
  this._config = { width: t, height: n, frameRate: i };
712
712
  const { context: s, canvas: a } = ra({ width: t, height: n });
713
713
  this._context = s, this._canvas = a;
714
- const o = Eu({ url: e.url, width: t, height: n });
714
+ const o = Cu({ url: e.url, width: t, height: n });
715
715
  this._image = new Li(o);
716
716
  const { promise: d, resolve: c, reject: u } = sa({
717
717
  timeout: 2e3,
@@ -766,7 +766,7 @@ class aa {
766
766
  }
767
767
  // destroy() {}
768
768
  }
769
- function Eu({
769
+ function Cu({
770
770
  url: r,
771
771
  height: e,
772
772
  width: t
@@ -859,7 +859,7 @@ class vn extends Bi {
859
859
  );
860
860
  if (this._node)
861
861
  return this._node;
862
- const t = new ru(this);
862
+ const t = new nu(this);
863
863
  return this._node = t, t;
864
864
  }
865
865
  /** overwrite in AudioTrack */
@@ -894,13 +894,13 @@ class vn extends Bi {
894
894
  this.logger.warn("destroy", this.id), (t = this._node) == null || t.destroy(), super.destroy();
895
895
  }
896
896
  }
897
- class Cu extends vn {
897
+ class wu extends vn {
898
898
  constructor() {
899
899
  super(...arguments);
900
900
  P(this, "logger", new we("MicrophoneAudioTrack"));
901
901
  }
902
902
  }
903
- class wu extends vn {
903
+ class Tu extends vn {
904
904
  constructor() {
905
905
  super(...arguments);
906
906
  P(this, "logger", new we("ScreenAudioTrack"));
@@ -925,22 +925,22 @@ class ca extends vn {
925
925
  }
926
926
  }
927
927
  }
928
- class Tu extends vn {
928
+ class ku extends vn {
929
929
  constructor() {
930
930
  super(...arguments);
931
931
  P(this, "logger", new we("CustomAudioTrack"));
932
932
  }
933
933
  }
934
- let ku = 1;
934
+ let Ru = 1;
935
935
  const Pn = new we("PromiseQueue");
936
- class Ru {
936
+ class Au {
937
937
  constructor(e) {
938
938
  P(this, "lockingPromise", Promise.resolve());
939
939
  P(this, "locks", 0);
940
940
  P(this, "name", "");
941
941
  P(this, "lockId");
942
942
  P(this, "closeReason");
943
- this.lockId = ku++, e && (this.name = e), Pn.info(`lock-${this.name}-${this.lockId}`, "is created.");
943
+ this.lockId = Ru++, e && (this.name = e), Pn.info(`lock-${this.name}-${this.lockId}`, "is created.");
944
944
  }
945
945
  get isLocked() {
946
946
  return this.locks > 0;
@@ -962,8 +962,8 @@ class Ru {
962
962
  return this.lockingPromise = this.lockingPromise.then(() => t), n;
963
963
  }
964
964
  }
965
- const Au = 300, Du = 3e3, Ue = new we("Devices");
966
- class xu extends Gi {
965
+ const Du = 300, xu = 3e3, Ue = new we("Devices");
966
+ class Iu extends Gi {
967
967
  constructor() {
968
968
  super();
969
969
  /** 存储 SDK 已知的设备列表 */
@@ -977,7 +977,7 @@ class xu extends Gi {
977
977
  [te.AUDIO]: !1,
978
978
  [te.VIDEO]: !1
979
979
  });
980
- P(this, "_changedQueue", new Ru("device changed queue"));
980
+ P(this, "_changedQueue", new Au("device changed queue"));
981
981
  this._init();
982
982
  }
983
983
  async _init() {
@@ -992,13 +992,13 @@ class xu extends Gi {
992
992
  "no supported, use timer instead"
993
993
  ), setInterval(() => {
994
994
  this._handleDeviceChanged();
995
- }, Du);
995
+ }, xu);
996
996
  return;
997
997
  }
998
998
  We.ondevicechange() && navigator.mediaDevices.addEventListener("devicechange", () => {
999
999
  Ue.info("devicechange"), setTimeout(() => {
1000
1000
  this._handleDeviceChanged();
1001
- }, Au);
1001
+ }, Du);
1002
1002
  });
1003
1003
  }
1004
1004
  async _initPermissionChanged() {
@@ -1180,7 +1180,7 @@ function ms(r) {
1180
1180
  const e = [];
1181
1181
  return r.audio && e.push(te.AUDIO), r.video && e.push(te.VIDEO), e;
1182
1182
  }
1183
- const mi = new xu(), On = {
1183
+ const mi = new Iu(), On = {
1184
1184
  LeftToRight: "LeftToRight",
1185
1185
  UpToDown: "UpToDown",
1186
1186
  All: "All"
@@ -1190,7 +1190,7 @@ class Fi {
1190
1190
  P(this, "id", At());
1191
1191
  }
1192
1192
  position(e, t) {
1193
- return new Iu(this, { x: e, y: t });
1193
+ return new zu(this, { x: e, y: t });
1194
1194
  }
1195
1195
  scale(e) {
1196
1196
  return new _s(this, { s: e });
@@ -1203,7 +1203,7 @@ class Fi {
1203
1203
  return ((e = this.previousNode) == null ? void 0 : e.available()) ?? !1;
1204
1204
  }
1205
1205
  }
1206
- class Iu extends Fi {
1206
+ class zu extends Fi {
1207
1207
  constructor(t, n) {
1208
1208
  super();
1209
1209
  P(this, "previousNode");
@@ -1241,7 +1241,7 @@ class _s extends Fi {
1241
1241
  t.scale(this._scaleParams[0], this._scaleParams[1]);
1242
1242
  }
1243
1243
  }
1244
- class zu extends Fi {
1244
+ class Pu extends Fi {
1245
1245
  constructor(t) {
1246
1246
  super();
1247
1247
  P(this, "previousNode", null);
@@ -1252,7 +1252,7 @@ class zu extends Fi {
1252
1252
  return this._source.available();
1253
1253
  }
1254
1254
  }
1255
- class yn extends zu {
1255
+ class yn extends Pu {
1256
1256
  constructor(t, n) {
1257
1257
  super(t);
1258
1258
  P(this, "_targetWidth");
@@ -1274,7 +1274,7 @@ class yn extends zu {
1274
1274
  );
1275
1275
  }
1276
1276
  }
1277
- class Pu extends Bi {
1277
+ class Ou extends Bi {
1278
1278
  constructor() {
1279
1279
  super(...arguments);
1280
1280
  P(this, "logger", new we("PictureTrack"));
@@ -1310,7 +1310,7 @@ class Pu extends Bi {
1310
1310
  this.logger.warn("destroy"), super.destroy();
1311
1311
  }
1312
1312
  }
1313
- const Ou = 500;
1313
+ const Mu = 500;
1314
1314
  class Sn extends Bi {
1315
1315
  constructor() {
1316
1316
  super(...arguments);
@@ -1325,7 +1325,7 @@ class Sn extends Bi {
1325
1325
  width: i,
1326
1326
  height: s
1327
1327
  });
1328
- }, Ou);
1328
+ }, Mu);
1329
1329
  });
1330
1330
  }
1331
1331
  element() {
@@ -1349,7 +1349,7 @@ class Sn extends Bi {
1349
1349
  clearTimeout(this.sizeChangeTimer), super.destroy();
1350
1350
  }
1351
1351
  }
1352
- class Mu extends Sn {
1352
+ class Lu extends Sn {
1353
1353
  constructor(t) {
1354
1354
  super(t);
1355
1355
  P(this, "logger", new we("CameraVideoTrack"));
@@ -1364,7 +1364,7 @@ class Mu extends Sn {
1364
1364
  return t ?? 0;
1365
1365
  }
1366
1366
  }
1367
- class Lu extends Sn {
1367
+ class Nu extends Sn {
1368
1368
  constructor(t) {
1369
1369
  super(t);
1370
1370
  P(this, "logger", new we("ScreenVideoTrack"));
@@ -1379,7 +1379,7 @@ class Lu extends Sn {
1379
1379
  return t ?? 0;
1380
1380
  }
1381
1381
  }
1382
- class Nu extends Sn {
1382
+ class Uu extends Sn {
1383
1383
  constructor() {
1384
1384
  super(...arguments);
1385
1385
  P(this, "logger", new we("MediaVideoTrack"));
@@ -1393,7 +1393,7 @@ class Nu extends Sn {
1393
1393
  return t ?? 0;
1394
1394
  }
1395
1395
  }
1396
- class Uu extends Sn {
1396
+ class Gu extends Sn {
1397
1397
  constructor() {
1398
1398
  super(...arguments);
1399
1399
  P(this, "logger", new we("CustomVideoTrack"));
@@ -1423,13 +1423,13 @@ async function ua(r, e) {
1423
1423
  }
1424
1424
  }
1425
1425
  const Ye = new we("Capture");
1426
- async function Gu(r) {
1426
+ async function Bu(r) {
1427
1427
  return mi.enumerateDevices(r);
1428
1428
  }
1429
- async function Bu(r) {
1429
+ async function Fu(r) {
1430
1430
  mi.removeAllListeners("onDeviceStateChanged"), mi.on("onDeviceStateChanged", r);
1431
1431
  }
1432
- async function Fu(r, e) {
1432
+ async function Vu(r, e) {
1433
1433
  let t;
1434
1434
  try {
1435
1435
  const i = { video: r ?? !0 };
@@ -1444,9 +1444,9 @@ async function Fu(r, e) {
1444
1444
  const n = t.getVideoTracks()[0];
1445
1445
  if (r != null && r.frameRate && e && ua(n, r), !n)
1446
1446
  throw new $(K.UNEXPECTED_TYPE, "got falsy in track");
1447
- return new Mu(n);
1447
+ return new Lu(n);
1448
1448
  }
1449
- async function Vu(r, e, t) {
1449
+ async function ju(r, e, t) {
1450
1450
  const { video: n, audio: i } = r;
1451
1451
  let s = n === !0 ? {} : n;
1452
1452
  e != null && e.displaySurface && (s.displaySurface = e.displaySurface, delete e.displaySurface), We.settingResolutionInGetDisplayMedia() || (s = !0), !We.supportIdealParamsInGetDisplayMedia() && typeof s != "boolean" && (s.width && typeof s.width == "number" && (s.width = {
@@ -1473,21 +1473,21 @@ async function Vu(r, e, t) {
1473
1473
  throw new $(K.UNEXPECTED_TYPE, "got falsy in videoTrack");
1474
1474
  typeof s != "boolean" && typeof s.frameRate == "number" && t && ua(o, s);
1475
1475
  const c = [];
1476
- return c.push(new Lu(o)), d && c.push(new wu(d)), c;
1476
+ return c.push(new Nu(o)), d && c.push(new Tu(d)), c;
1477
1477
  }
1478
- async function ju(r) {
1478
+ async function Hu(r) {
1479
1479
  const { url: e, audio: t, video: n, loop: i } = r, s = new wr({
1480
1480
  url: e,
1481
1481
  kind: n ? te.VIDEO : te.AUDIO,
1482
1482
  loop: i
1483
1483
  }), a = [];
1484
- return t && a.push(new ca(s)), n && a.push(new Nu(s)), await s.isReady(), a;
1484
+ return t && a.push(new ca(s)), n && a.push(new Uu(s)), await s.isReady(), a;
1485
1485
  }
1486
- async function Hu(r) {
1486
+ async function qu(r) {
1487
1487
  const e = new aa(r);
1488
- return await e.isReady(), new Pu(e);
1488
+ return await e.isReady(), new Ou(e);
1489
1489
  }
1490
- async function qu(r) {
1490
+ async function $u(r) {
1491
1491
  let e;
1492
1492
  try {
1493
1493
  const n = { audio: r ?? !0 };
@@ -1502,31 +1502,31 @@ async function qu(r) {
1502
1502
  const t = e.getAudioTracks()[0];
1503
1503
  if (!t)
1504
1504
  throw new $(K.UNEXPECTED_TYPE, "got falsy in track");
1505
- return new Cu(t);
1505
+ return new wu(t);
1506
1506
  }
1507
- function $u(r) {
1507
+ function Ku(r) {
1508
1508
  if (!r || r.kind !== "video")
1509
1509
  throw new $(
1510
1510
  K.UNEXPECTED_TYPE,
1511
1511
  "error custom video track type"
1512
1512
  );
1513
- return new Uu(r);
1513
+ return new Gu(r);
1514
1514
  }
1515
- function Ku(r) {
1515
+ function Wu(r) {
1516
1516
  if (!r || r.kind !== "audio")
1517
1517
  throw new $(
1518
1518
  K.UNEXPECTED_TYPE,
1519
1519
  "error custom audio track type"
1520
1520
  );
1521
- return new Tu(r);
1521
+ return new ku(r);
1522
1522
  }
1523
- const Wu = Ye.invoke(Gu, "enumerateInputDevices"), Ju = Ye.invoke(Fu, "createCameraTrack"), Xu = Ye.invoke(Hu, "createPictureTrack"), gs = Ye.invoke(ju, "createMediaTracks"), Zu = Ye.invoke(qu, "createMicrophoneTrack"), Yu = Ye.invoke(Vu, "createScreenTracks"), Qu = Ye.invoke(Bu, "onDeviceChanged"), ed = Ye.invoke($u, "createCustomVideoTrack"), td = Ye.invoke(Ku, "createCustomAudioTrack");
1523
+ const Ju = Ye.invoke(Bu, "enumerateInputDevices"), Xu = Ye.invoke(Vu, "createCameraTrack"), Zu = Ye.invoke(qu, "createPictureTrack"), gs = Ye.invoke(Hu, "createMediaTracks"), Yu = Ye.invoke($u, "createMicrophoneTrack"), Qu = Ye.invoke(ju, "createScreenTracks"), ed = Ye.invoke(Fu, "onDeviceChanged"), td = Ye.invoke(Ku, "createCustomVideoTrack"), rd = Ye.invoke(Wu, "createCustomAudioTrack");
1524
1524
  var _i = /* @__PURE__ */ ((r) => (r.PAUSING = "pausing", r))(_i || {});
1525
- const rd = {
1525
+ const nd = {
1526
1526
  sampleRate: 48e3,
1527
1527
  keepAlive: !0
1528
1528
  }, vs = /* @__PURE__ */ new Map(), rr = new we("Mixer");
1529
- class nd extends Gi {
1529
+ class id extends Gi {
1530
1530
  constructor(t) {
1531
1531
  super();
1532
1532
  P(this, "id", At());
@@ -1551,9 +1551,9 @@ class nd extends Gi {
1551
1551
  });
1552
1552
  });
1553
1553
  rr.info("ctor", t), this._config = {
1554
- ...rd,
1554
+ ...nd,
1555
1555
  ...t
1556
- }, this._context = id(this._config), this._bindContextEvent(this._context);
1556
+ }, this._context = sd(this._config), this._bindContextEvent(this._context);
1557
1557
  }
1558
1558
  mix(t) {
1559
1559
  rr.info("mix", t), cr(this._context);
@@ -1596,7 +1596,7 @@ class nd extends Gi {
1596
1596
  return this._destNode = t, this._track = n, n;
1597
1597
  }
1598
1598
  }
1599
- function id(r) {
1599
+ function sd(r) {
1600
1600
  const { sampleRate: e, keepAlive: t } = r;
1601
1601
  let n = vs.get(e);
1602
1602
  return (!n || n.state === "closed") && (n = new AudioContext({ sampleRate: e }), vs.set(e, n)), t && (n.onstatechange = () => {
@@ -1606,7 +1606,7 @@ function id(r) {
1606
1606
  function cr(r) {
1607
1607
  return r.state === "suspended" || r.state === "interrupted" ? r.resume() : Promise.resolve();
1608
1608
  }
1609
- const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === void 0 ? 9007199254740991 : Number.MAX_SAFE_INTEGER, da = 536870912, Ss = da * 2, od = (r, e) => (t) => {
1609
+ const od = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === void 0 ? 9007199254740991 : Number.MAX_SAFE_INTEGER, da = 536870912, Ss = da * 2, ad = (r, e) => (t) => {
1610
1610
  const n = e.get(t);
1611
1611
  let i = n === void 0 ? t.size : n < Ss ? n + 1 : 0;
1612
1612
  if (!t.has(i))
@@ -1621,12 +1621,12 @@ const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === v
1621
1621
  for (; t.has(i); )
1622
1622
  i = Math.floor(Math.random() * ys);
1623
1623
  return r(t, i);
1624
- }, la = /* @__PURE__ */ new WeakMap(), ad = sd(la), st = od(ad, la), cd = (r) => r.method !== void 0 && r.method === "call", ud = (r) => typeof r.id == "number" && typeof r.result == "boolean", dd = (r) => {
1624
+ }, la = /* @__PURE__ */ new WeakMap(), cd = od(la), st = ad(cd, la), ud = (r) => r.method !== void 0 && r.method === "call", dd = (r) => typeof r.id == "number" && typeof r.result == "boolean", ld = (r) => {
1625
1625
  const e = /* @__PURE__ */ new Map([[0, () => {
1626
1626
  }]]), t = /* @__PURE__ */ new Map([[0, () => {
1627
1627
  }]]), n = /* @__PURE__ */ new Map(), i = new Worker(r);
1628
1628
  return i.addEventListener("message", ({ data: c }) => {
1629
- if (cd(c)) {
1629
+ if (ud(c)) {
1630
1630
  const { params: { timerId: u, timerType: h } } = c;
1631
1631
  if (h === "interval") {
1632
1632
  const l = e.get(u);
@@ -1647,7 +1647,7 @@ const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === v
1647
1647
  throw new Error("The timer is in an undefined state.");
1648
1648
  } else typeof l == "function" && (l(), t.delete(u));
1649
1649
  }
1650
- } else if (ud(c)) {
1650
+ } else if (dd(c)) {
1651
1651
  const { id: u } = c, h = n.get(u);
1652
1652
  if (h === void 0)
1653
1653
  throw new Error("The timer is in an undefined state.");
@@ -1716,7 +1716,7 @@ const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === v
1716
1716
  }), l;
1717
1717
  }
1718
1718
  };
1719
- }, ld = (r, e) => {
1719
+ }, hd = (r, e) => {
1720
1720
  let t = null;
1721
1721
  return () => {
1722
1722
  if (t !== null)
@@ -1724,7 +1724,7 @@ const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === v
1724
1724
  const n = new Blob([e], { type: "application/javascript; charset=utf-8" }), i = URL.createObjectURL(n);
1725
1725
  return t = r(i), setTimeout(() => URL.revokeObjectURL(i)), t;
1726
1726
  };
1727
- }, hd = `(()=>{"use strict";const e=new Map,t=new Map,r=t=>{const r=e.get(t);return void 0!==r&&(clearTimeout(r),e.delete(t),!0)},s=e=>{const r=t.get(e);return void 0!==r&&(clearTimeout(r),t.delete(e),!0)},o=(e,t)=>{const r=performance.now(),s=e+t-r-performance.timeOrigin;return{expected:r+s,remainingDelay:s}},i=(e,t,r,s)=>{const o=r-performance.now();o>0?e.set(t,setTimeout(i,o,e,t,r,s)):(e.delete(t),postMessage({id:null,method:"call",params:{timerId:t,timerType:s}}))};addEventListener("message",(({data:n})=>{try{if("clear"===n.method){const{id:e,params:{timerId:t,timerType:o}}=n;if("interval"===o)postMessage({id:e,result:r(t)});else{if("timeout"!==o)throw new Error('The given type "'.concat(o,'" is not supported'));postMessage({id:e,result:s(t)})}}else{if("set"!==n.method)throw new Error('The given method "'.concat(n.method,'" is not supported'));{const{params:{delay:r,now:s,timerId:a,timerType:m}}=n;if("interval"===m)((t,r,s)=>{const{expected:n,remainingDelay:a}=o(t,s);e.set(r,setTimeout(i,a,e,r,n,"interval"))})(r,a,s);else{if("timeout"!==m)throw new Error('The given type "'.concat(m,'" is not supported'));((e,r,s)=>{const{expected:n,remainingDelay:a}=o(e,s);t.set(r,setTimeout(i,a,t,r,n,"timeout"))})(r,a,s)}}}}catch(e){postMessage({error:{message:e.message},id:n.id,result:null})}}))})();`, ha = ld(dd, hd), pd = (r) => ha().clearTimeout(r), fd = (...r) => ha().setTimeout(...r), md = (r) => r.method !== void 0 && r.method === "call", _d = (r) => typeof r.id == "number" && typeof r.result == "boolean", gd = (r) => {
1727
+ }, pd = `(()=>{"use strict";const e=new Map,t=new Map,r=t=>{const r=e.get(t);return void 0!==r&&(clearTimeout(r),e.delete(t),!0)},s=e=>{const r=t.get(e);return void 0!==r&&(clearTimeout(r),t.delete(e),!0)},o=(e,t)=>{const r=performance.now(),s=e+t-r-performance.timeOrigin;return{expected:r+s,remainingDelay:s}},i=(e,t,r,s)=>{const o=r-performance.now();o>0?e.set(t,setTimeout(i,o,e,t,r,s)):(e.delete(t),postMessage({id:null,method:"call",params:{timerId:t,timerType:s}}))};addEventListener("message",(({data:n})=>{try{if("clear"===n.method){const{id:e,params:{timerId:t,timerType:o}}=n;if("interval"===o)postMessage({id:e,result:r(t)});else{if("timeout"!==o)throw new Error('The given type "'.concat(o,'" is not supported'));postMessage({id:e,result:s(t)})}}else{if("set"!==n.method)throw new Error('The given method "'.concat(n.method,'" is not supported'));{const{params:{delay:r,now:s,timerId:a,timerType:m}}=n;if("interval"===m)((t,r,s)=>{const{expected:n,remainingDelay:a}=o(t,s);e.set(r,setTimeout(i,a,e,r,n,"interval"))})(r,a,s);else{if("timeout"!==m)throw new Error('The given type "'.concat(m,'" is not supported'));((e,r,s)=>{const{expected:n,remainingDelay:a}=o(e,s);t.set(r,setTimeout(i,a,t,r,n,"timeout"))})(r,a,s)}}}}catch(e){postMessage({error:{message:e.message},id:n.id,result:null})}}))})();`, ha = hd(ld, pd), fd = (r) => ha().clearTimeout(r), md = (...r) => ha().setTimeout(...r), _d = (r) => r.method !== void 0 && r.method === "call", gd = (r) => typeof r.id == "number" && typeof r.result == "boolean", vd = (r) => {
1728
1728
  const e = /* @__PURE__ */ new Map([
1729
1729
  [0, () => {
1730
1730
  }]
@@ -1735,7 +1735,7 @@ const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === v
1735
1735
  credentials: "omit"
1736
1736
  });
1737
1737
  return i.addEventListener("message", ({ data: c }) => {
1738
- if (md(c)) {
1738
+ if (_d(c)) {
1739
1739
  const {
1740
1740
  params: { timerId: u, timerType: h }
1741
1741
  } = c;
@@ -1758,7 +1758,7 @@ const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === v
1758
1758
  throw new Error("The timer is in an undefined state.");
1759
1759
  } else typeof l == "function" && (l(), t.delete(u));
1760
1760
  }
1761
- } else if (_d(c)) {
1761
+ } else if (gd(c)) {
1762
1762
  const { id: u } = c, h = n.get(u);
1763
1763
  if (h === void 0)
1764
1764
  throw new Error("The timer is in an undefined state.");
@@ -1829,13 +1829,13 @@ const sd = (r) => (e, t) => (r.set(e, t), t), ys = Number.MAX_SAFE_INTEGER === v
1829
1829
  }), l;
1830
1830
  }
1831
1831
  };
1832
- }, vd = {
1832
+ }, yd = {
1833
1833
  width: 640,
1834
1834
  height: 480,
1835
1835
  frameRate: 30,
1836
1836
  backgroundColor: "#000000"
1837
1837
  }, qr = new we("View");
1838
- class yd {
1838
+ class Sd {
1839
1839
  constructor(e) {
1840
1840
  P(this, "id", At());
1841
1841
  P(this, "_context");
@@ -1866,15 +1866,15 @@ class yd {
1866
1866
  }, Zr / this._config.frameRate), this._raqId = requestAnimationFrame(this._paintLoop);
1867
1867
  });
1868
1868
  qr.info("ctor", e), this._config = {
1869
- ...vd,
1869
+ ...yd,
1870
1870
  ...e
1871
1871
  };
1872
1872
  const { context: t, canvas: n } = ra(this._config);
1873
- this._context = t, this._canvas = n, this._customSetTimeout = fd, this._customClearTimeout = pd;
1873
+ this._context = t, this._canvas = n, this._customSetTimeout = md, this._customClearTimeout = fd;
1874
1874
  }
1875
1875
  setWorkerTimerScriptUrl(e) {
1876
1876
  if (this._workerTimerScriptUrl = e, this._workerTimerScriptUrl) {
1877
- const t = gd(this._workerTimerScriptUrl);
1877
+ const t = vd(this._workerTimerScriptUrl);
1878
1878
  this._customSetTimeout = (...n) => t.setTimeout(...n), this._customClearTimeout = (n) => t.clearTimeout(n);
1879
1879
  }
1880
1880
  }
@@ -1940,10 +1940,10 @@ class yd {
1940
1940
  this._stopped = !0;
1941
1941
  }
1942
1942
  }
1943
- function Sd() {
1943
+ function bd() {
1944
1944
  return Math.random().toString(36).slice(-8);
1945
1945
  }
1946
- const bd = `
1946
+ const Ed = `
1947
1947
  const SMOOTHING_FACTOR = 0.8;
1948
1948
  const MINIMUM_VALUE = 0.00001;
1949
1949
 
@@ -1998,10 +1998,10 @@ registerProcessor('vumeter', class extends AudioWorkletProcessor {
1998
1998
  return true;
1999
1999
  }
2000
2000
  });
2001
- `, Ed = URL.createObjectURL(
2002
- new Blob([bd], { type: "application/javascript" })
2001
+ `, Cd = URL.createObjectURL(
2002
+ new Blob([Ed], { type: "application/javascript" })
2003
2003
  );
2004
- class Cd {
2004
+ class wd {
2005
2005
  constructor() {
2006
2006
  this._audioCtx = null, this._volume = 0;
2007
2007
  }
@@ -2011,7 +2011,7 @@ class Cd {
2011
2011
  async start(e, t) {
2012
2012
  if (this._audioCtx) return;
2013
2013
  const n = new AudioContext();
2014
- await n.audioWorklet.addModule(t || Ed);
2014
+ await n.audioWorklet.addModule(t || Cd);
2015
2015
  const i = new MediaStream();
2016
2016
  i.addTrack(e);
2017
2017
  const s = n.createMediaStreamSource(i), a = new AudioWorkletNode(n, "vumeter");
@@ -2041,7 +2041,7 @@ class bn {
2041
2041
  }
2042
2042
  class pa extends pt {
2043
2043
  constructor(e) {
2044
- super(), this._width = 0, this._height = 0, this._mediaStream = null, this._nextStream = null, this._trackMap = {}, this.type = e.type, this.id = Sd(), this._source = e.stream;
2044
+ super(), this._width = 0, this._height = 0, this._mediaStream = null, this._nextStream = null, this._trackMap = {}, this.type = e.type, this.id = bd(), this._source = e.stream;
2045
2045
  }
2046
2046
  get source() {
2047
2047
  return this._source;
@@ -2072,7 +2072,7 @@ class pa extends pt {
2072
2072
  return this._trackMap.audio && e.addTrack(this._trackMap.audio), this._trackMap.video && e.addTrack(this._trackMap.video), this._mediaStream = e, e;
2073
2073
  }
2074
2074
  async startVolumeDetect() {
2075
- this.audioTrack && (this._volumeDetector || (this._volumeDetector = new Cd()), await this._volumeDetector.start(
2075
+ this.audioTrack && (this._volumeDetector || (this._volumeDetector = new wd()), await this._volumeDetector.start(
2076
2076
  this.audioTrack,
2077
2077
  bn.instance.volumeDetectScriptUrl
2078
2078
  ));
@@ -2116,7 +2116,7 @@ class En extends pa {
2116
2116
  return !0;
2117
2117
  }
2118
2118
  }
2119
- class wd extends Ht {
2119
+ class Td extends Ht {
2120
2120
  constructor(e, t) {
2121
2121
  super({
2122
2122
  type: ee.Camera,
@@ -2139,31 +2139,31 @@ class wd extends Ht {
2139
2139
  this.source.destroy();
2140
2140
  }
2141
2141
  }
2142
- var fa = typeof global == "object" && global && global.Object === Object && global, Td = typeof self == "object" && self && self.Object === Object && self, Qe = fa || Td || Function("return this")(), lt = Qe.Symbol, ma = Object.prototype, kd = ma.hasOwnProperty, Rd = ma.toString, nr = lt ? lt.toStringTag : void 0;
2143
- function Ad(r) {
2144
- var e = kd.call(r, nr), t = r[nr];
2142
+ var fa = typeof global == "object" && global && global.Object === Object && global, kd = typeof self == "object" && self && self.Object === Object && self, Qe = fa || kd || Function("return this")(), lt = Qe.Symbol, ma = Object.prototype, Rd = ma.hasOwnProperty, Ad = ma.toString, nr = lt ? lt.toStringTag : void 0;
2143
+ function Dd(r) {
2144
+ var e = Rd.call(r, nr), t = r[nr];
2145
2145
  try {
2146
2146
  r[nr] = void 0;
2147
2147
  var n = !0;
2148
2148
  } catch {
2149
2149
  }
2150
- var i = Rd.call(r);
2150
+ var i = Ad.call(r);
2151
2151
  return n && (e ? r[nr] = t : delete r[nr]), i;
2152
2152
  }
2153
- var Dd = Object.prototype, xd = Dd.toString;
2154
- function Id(r) {
2155
- return xd.call(r);
2153
+ var xd = Object.prototype, Id = xd.toString;
2154
+ function zd(r) {
2155
+ return Id.call(r);
2156
2156
  }
2157
- var zd = "[object Null]", Pd = "[object Undefined]", bs = lt ? lt.toStringTag : void 0;
2157
+ var Pd = "[object Null]", Od = "[object Undefined]", bs = lt ? lt.toStringTag : void 0;
2158
2158
  function qt(r) {
2159
- return r == null ? r === void 0 ? Pd : zd : bs && bs in Object(r) ? Ad(r) : Id(r);
2159
+ return r == null ? r === void 0 ? Od : Pd : bs && bs in Object(r) ? Dd(r) : zd(r);
2160
2160
  }
2161
2161
  function Vt(r) {
2162
2162
  return r != null && typeof r == "object";
2163
2163
  }
2164
- var Od = "[object Symbol]";
2164
+ var Md = "[object Symbol]";
2165
2165
  function Cn(r) {
2166
- return typeof r == "symbol" || Vt(r) && qt(r) == Od;
2166
+ return typeof r == "symbol" || Vt(r) && qt(r) == Md;
2167
2167
  }
2168
2168
  function _a(r, e) {
2169
2169
  for (var t = -1, n = r == null ? 0 : r.length, i = Array(n); ++t < n; )
@@ -2181,22 +2181,22 @@ function ga(r) {
2181
2181
  var e = r + "";
2182
2182
  return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
2183
2183
  }
2184
- var Md = /\s/;
2185
- function Ld(r) {
2186
- for (var e = r.length; e-- && Md.test(r.charAt(e)); )
2184
+ var Ld = /\s/;
2185
+ function Nd(r) {
2186
+ for (var e = r.length; e-- && Ld.test(r.charAt(e)); )
2187
2187
  ;
2188
2188
  return e;
2189
2189
  }
2190
- var Nd = /^\s+/;
2191
- function Ud(r) {
2192
- return r && r.slice(0, Ld(r) + 1).replace(Nd, "");
2190
+ var Ud = /^\s+/;
2191
+ function Gd(r) {
2192
+ return r && r.slice(0, Nd(r) + 1).replace(Ud, "");
2193
2193
  }
2194
2194
  function Tr(r) {
2195
2195
  var e = typeof r;
2196
2196
  return r != null && (e == "object" || e == "function");
2197
2197
  }
2198
- var ws = NaN, Gd = /^[-+]0x[0-9a-f]+$/i, Bd = /^0b[01]+$/i, Fd = /^0o[0-7]+$/i, Vd = parseInt;
2199
- function jd(r) {
2198
+ var ws = NaN, Bd = /^[-+]0x[0-9a-f]+$/i, Fd = /^0b[01]+$/i, Vd = /^0o[0-7]+$/i, jd = parseInt;
2199
+ function Hd(r) {
2200
2200
  if (typeof r == "number")
2201
2201
  return r;
2202
2202
  if (Cn(r))
@@ -2207,46 +2207,46 @@ function jd(r) {
2207
2207
  }
2208
2208
  if (typeof r != "string")
2209
2209
  return r === 0 ? r : +r;
2210
- r = Ud(r);
2211
- var t = Bd.test(r);
2212
- return t || Fd.test(r) ? Vd(r.slice(2), t ? 2 : 8) : Gd.test(r) ? ws : +r;
2210
+ r = Gd(r);
2211
+ var t = Fd.test(r);
2212
+ return t || Vd.test(r) ? jd(r.slice(2), t ? 2 : 8) : Bd.test(r) ? ws : +r;
2213
2213
  }
2214
- var Hd = 1 / 0, qd = 17976931348623157e292;
2215
- function $d(r) {
2214
+ var qd = 1 / 0, $d = 17976931348623157e292;
2215
+ function Kd(r) {
2216
2216
  if (!r)
2217
2217
  return r === 0 ? r : 0;
2218
- if (r = jd(r), r === Hd || r === -1 / 0) {
2218
+ if (r = Hd(r), r === qd || r === -1 / 0) {
2219
2219
  var e = r < 0 ? -1 : 1;
2220
- return e * qd;
2220
+ return e * $d;
2221
2221
  }
2222
2222
  return r === r ? r : 0;
2223
2223
  }
2224
- function Kd(r) {
2225
- var e = $d(r), t = e % 1;
2224
+ function Wd(r) {
2225
+ var e = Kd(r), t = e % 1;
2226
2226
  return e === e ? t ? e - t : e : 0;
2227
2227
  }
2228
- function Wd(r) {
2228
+ function Jd(r) {
2229
2229
  return r;
2230
2230
  }
2231
- var Jd = "[object AsyncFunction]", Xd = "[object Function]", Zd = "[object GeneratorFunction]", Yd = "[object Proxy]";
2231
+ var Xd = "[object AsyncFunction]", Zd = "[object Function]", Yd = "[object GeneratorFunction]", Qd = "[object Proxy]";
2232
2232
  function va(r) {
2233
2233
  if (!Tr(r))
2234
2234
  return !1;
2235
2235
  var e = qt(r);
2236
- return e == Xd || e == Zd || e == Jd || e == Yd;
2236
+ return e == Zd || e == Yd || e == Xd || e == Qd;
2237
2237
  }
2238
2238
  var Mn = Qe["__core-js_shared__"], Ts = function() {
2239
2239
  var r = /[^.]+$/.exec(Mn && Mn.keys && Mn.keys.IE_PROTO || "");
2240
2240
  return r ? "Symbol(src)_1." + r : "";
2241
2241
  }();
2242
- function Qd(r) {
2242
+ function el(r) {
2243
2243
  return !!Ts && Ts in r;
2244
2244
  }
2245
- var el = Function.prototype, tl = el.toString;
2245
+ var tl = Function.prototype, rl = tl.toString;
2246
2246
  function Dt(r) {
2247
2247
  if (r != null) {
2248
2248
  try {
2249
- return tl.call(r);
2249
+ return rl.call(r);
2250
2250
  } catch {
2251
2251
  }
2252
2252
  try {
@@ -2256,144 +2256,144 @@ function Dt(r) {
2256
2256
  }
2257
2257
  return "";
2258
2258
  }
2259
- var rl = /[\\^$.*+?()[\]{}|]/g, nl = /^\[object .+?Constructor\]$/, il = Function.prototype, sl = Object.prototype, ol = il.toString, al = sl.hasOwnProperty, cl = RegExp(
2260
- "^" + ol.call(al).replace(rl, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
2259
+ var nl = /[\\^$.*+?()[\]{}|]/g, il = /^\[object .+?Constructor\]$/, sl = Function.prototype, ol = Object.prototype, al = sl.toString, cl = ol.hasOwnProperty, ul = RegExp(
2260
+ "^" + al.call(cl).replace(nl, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
2261
2261
  );
2262
- function ul(r) {
2263
- if (!Tr(r) || Qd(r))
2262
+ function dl(r) {
2263
+ if (!Tr(r) || el(r))
2264
2264
  return !1;
2265
- var e = va(r) ? cl : nl;
2265
+ var e = va(r) ? ul : il;
2266
2266
  return e.test(Dt(r));
2267
2267
  }
2268
- function dl(r, e) {
2268
+ function ll(r, e) {
2269
2269
  return r == null ? void 0 : r[e];
2270
2270
  }
2271
2271
  function $t(r, e) {
2272
- var t = dl(r, e);
2273
- return ul(t) ? t : void 0;
2272
+ var t = ll(r, e);
2273
+ return dl(t) ? t : void 0;
2274
2274
  }
2275
2275
  var gi = $t(Qe, "WeakMap");
2276
- function ll(r, e, t, n) {
2276
+ function hl(r, e, t, n) {
2277
2277
  for (var i = r.length, s = t + -1; ++s < i; )
2278
2278
  if (e(r[s], s, r))
2279
2279
  return s;
2280
2280
  return -1;
2281
2281
  }
2282
- var hl = 9007199254740991, pl = /^(?:0|[1-9]\d*)$/;
2282
+ var pl = 9007199254740991, fl = /^(?:0|[1-9]\d*)$/;
2283
2283
  function ya(r, e) {
2284
2284
  var t = typeof r;
2285
- return e = e ?? hl, !!e && (t == "number" || t != "symbol" && pl.test(r)) && r > -1 && r % 1 == 0 && r < e;
2285
+ return e = e ?? pl, !!e && (t == "number" || t != "symbol" && fl.test(r)) && r > -1 && r % 1 == 0 && r < e;
2286
2286
  }
2287
2287
  function Sa(r, e) {
2288
2288
  return r === e || r !== r && e !== e;
2289
2289
  }
2290
- var fl = 9007199254740991;
2290
+ var ml = 9007199254740991;
2291
2291
  function Vi(r) {
2292
- return typeof r == "number" && r > -1 && r % 1 == 0 && r <= fl;
2292
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= ml;
2293
2293
  }
2294
2294
  function wn(r) {
2295
2295
  return r != null && Vi(r.length) && !va(r);
2296
2296
  }
2297
- var ml = Object.prototype;
2297
+ var _l = Object.prototype;
2298
2298
  function ba(r) {
2299
- var e = r && r.constructor, t = typeof e == "function" && e.prototype || ml;
2299
+ var e = r && r.constructor, t = typeof e == "function" && e.prototype || _l;
2300
2300
  return r === t;
2301
2301
  }
2302
- function _l(r, e) {
2302
+ function gl(r, e) {
2303
2303
  for (var t = -1, n = Array(r); ++t < r; )
2304
2304
  n[t] = e(t);
2305
2305
  return n;
2306
2306
  }
2307
- var gl = "[object Arguments]";
2307
+ var vl = "[object Arguments]";
2308
2308
  function ks(r) {
2309
- return Vt(r) && qt(r) == gl;
2309
+ return Vt(r) && qt(r) == vl;
2310
2310
  }
2311
- var Ea = Object.prototype, vl = Ea.hasOwnProperty, yl = Ea.propertyIsEnumerable, ji = ks(/* @__PURE__ */ function() {
2311
+ var Ea = Object.prototype, yl = Ea.hasOwnProperty, Sl = Ea.propertyIsEnumerable, ji = ks(/* @__PURE__ */ function() {
2312
2312
  return arguments;
2313
2313
  }()) ? ks : function(r) {
2314
- return Vt(r) && vl.call(r, "callee") && !yl.call(r, "callee");
2314
+ return Vt(r) && yl.call(r, "callee") && !Sl.call(r, "callee");
2315
2315
  };
2316
- function Sl() {
2316
+ function bl() {
2317
2317
  return !1;
2318
2318
  }
2319
- var Ca = typeof exports == "object" && exports && !exports.nodeType && exports, Rs = Ca && typeof module == "object" && module && !module.nodeType && module, bl = Rs && Rs.exports === Ca, As = bl ? Qe.Buffer : void 0, El = As ? As.isBuffer : void 0, an = El || Sl, Cl = "[object Arguments]", wl = "[object Array]", Tl = "[object Boolean]", kl = "[object Date]", Rl = "[object Error]", Al = "[object Function]", Dl = "[object Map]", xl = "[object Number]", Il = "[object Object]", zl = "[object RegExp]", Pl = "[object Set]", Ol = "[object String]", Ml = "[object WeakMap]", Ll = "[object ArrayBuffer]", Nl = "[object DataView]", Ul = "[object Float32Array]", Gl = "[object Float64Array]", Bl = "[object Int8Array]", Fl = "[object Int16Array]", Vl = "[object Int32Array]", jl = "[object Uint8Array]", Hl = "[object Uint8ClampedArray]", ql = "[object Uint16Array]", $l = "[object Uint32Array]", re = {};
2320
- re[Ul] = re[Gl] = re[Bl] = re[Fl] = re[Vl] = re[jl] = re[Hl] = re[ql] = re[$l] = !0;
2321
- re[Cl] = re[wl] = re[Ll] = re[Tl] = re[Nl] = re[kl] = re[Rl] = re[Al] = re[Dl] = re[xl] = re[Il] = re[zl] = re[Pl] = re[Ol] = re[Ml] = !1;
2322
- function Kl(r) {
2319
+ var Ca = typeof exports == "object" && exports && !exports.nodeType && exports, Rs = Ca && typeof module == "object" && module && !module.nodeType && module, El = Rs && Rs.exports === Ca, As = El ? Qe.Buffer : void 0, Cl = As ? As.isBuffer : void 0, an = Cl || bl, wl = "[object Arguments]", Tl = "[object Array]", kl = "[object Boolean]", Rl = "[object Date]", Al = "[object Error]", Dl = "[object Function]", xl = "[object Map]", Il = "[object Number]", zl = "[object Object]", Pl = "[object RegExp]", Ol = "[object Set]", Ml = "[object String]", Ll = "[object WeakMap]", Nl = "[object ArrayBuffer]", Ul = "[object DataView]", Gl = "[object Float32Array]", Bl = "[object Float64Array]", Fl = "[object Int8Array]", Vl = "[object Int16Array]", jl = "[object Int32Array]", Hl = "[object Uint8Array]", ql = "[object Uint8ClampedArray]", $l = "[object Uint16Array]", Kl = "[object Uint32Array]", re = {};
2320
+ re[Gl] = re[Bl] = re[Fl] = re[Vl] = re[jl] = re[Hl] = re[ql] = re[$l] = re[Kl] = !0;
2321
+ re[wl] = re[Tl] = re[Nl] = re[kl] = re[Ul] = re[Rl] = re[Al] = re[Dl] = re[xl] = re[Il] = re[zl] = re[Pl] = re[Ol] = re[Ml] = re[Ll] = !1;
2322
+ function Wl(r) {
2323
2323
  return Vt(r) && Vi(r.length) && !!re[qt(r)];
2324
2324
  }
2325
- function Wl(r) {
2325
+ function Jl(r) {
2326
2326
  return function(e) {
2327
2327
  return r(e);
2328
2328
  };
2329
2329
  }
2330
- var wa = typeof exports == "object" && exports && !exports.nodeType && exports, pr = wa && typeof module == "object" && module && !module.nodeType && module, Jl = pr && pr.exports === wa, Ln = Jl && fa.process, Ds = function() {
2330
+ var wa = typeof exports == "object" && exports && !exports.nodeType && exports, pr = wa && typeof module == "object" && module && !module.nodeType && module, Xl = pr && pr.exports === wa, Ln = Xl && fa.process, Ds = function() {
2331
2331
  try {
2332
2332
  var r = pr && pr.require && pr.require("util").types;
2333
2333
  return r || Ln && Ln.binding && Ln.binding("util");
2334
2334
  } catch {
2335
2335
  }
2336
- }(), xs = Ds && Ds.isTypedArray, Hi = xs ? Wl(xs) : Kl, Xl = Object.prototype, Zl = Xl.hasOwnProperty;
2337
- function Yl(r, e) {
2338
- var t = de(r), n = !t && ji(r), i = !t && !n && an(r), s = !t && !n && !i && Hi(r), a = t || n || i || s, o = a ? _l(r.length, String) : [], d = o.length;
2336
+ }(), xs = Ds && Ds.isTypedArray, Hi = xs ? Jl(xs) : Wl, Zl = Object.prototype, Yl = Zl.hasOwnProperty;
2337
+ function Ql(r, e) {
2338
+ var t = de(r), n = !t && ji(r), i = !t && !n && an(r), s = !t && !n && !i && Hi(r), a = t || n || i || s, o = a ? gl(r.length, String) : [], d = o.length;
2339
2339
  for (var c in r)
2340
- Zl.call(r, c) && !(a && // Safari 9 has enumerable `arguments.length` in strict mode.
2340
+ Yl.call(r, c) && !(a && // Safari 9 has enumerable `arguments.length` in strict mode.
2341
2341
  (c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
2342
2342
  i && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
2343
2343
  s && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties.
2344
2344
  ya(c, d))) && o.push(c);
2345
2345
  return o;
2346
2346
  }
2347
- function Ql(r, e) {
2347
+ function eh(r, e) {
2348
2348
  return function(t) {
2349
2349
  return r(e(t));
2350
2350
  };
2351
2351
  }
2352
- var eh = Ql(Object.keys, Object), th = Object.prototype, rh = th.hasOwnProperty;
2352
+ var th = eh(Object.keys, Object), rh = Object.prototype, nh = rh.hasOwnProperty;
2353
2353
  function Ta(r) {
2354
2354
  if (!ba(r))
2355
- return eh(r);
2355
+ return th(r);
2356
2356
  var e = [];
2357
2357
  for (var t in Object(r))
2358
- rh.call(r, t) && t != "constructor" && e.push(t);
2358
+ nh.call(r, t) && t != "constructor" && e.push(t);
2359
2359
  return e;
2360
2360
  }
2361
2361
  function Nr(r) {
2362
- return wn(r) ? Yl(r) : Ta(r);
2362
+ return wn(r) ? Ql(r) : Ta(r);
2363
2363
  }
2364
- var nh = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ih = /^\w*$/;
2364
+ var ih = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, sh = /^\w*$/;
2365
2365
  function qi(r, e) {
2366
2366
  if (de(r))
2367
2367
  return !1;
2368
2368
  var t = typeof r;
2369
- return t == "number" || t == "symbol" || t == "boolean" || r == null || Cn(r) ? !0 : ih.test(r) || !nh.test(r) || e != null && r in Object(e);
2369
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || Cn(r) ? !0 : sh.test(r) || !ih.test(r) || e != null && r in Object(e);
2370
2370
  }
2371
2371
  var kr = $t(Object, "create");
2372
- function sh() {
2372
+ function oh() {
2373
2373
  this.__data__ = kr ? kr(null) : {}, this.size = 0;
2374
2374
  }
2375
- function oh(r) {
2375
+ function ah(r) {
2376
2376
  var e = this.has(r) && delete this.__data__[r];
2377
2377
  return this.size -= e ? 1 : 0, e;
2378
2378
  }
2379
- var ah = "__lodash_hash_undefined__", ch = Object.prototype, uh = ch.hasOwnProperty;
2380
- function dh(r) {
2379
+ var ch = "__lodash_hash_undefined__", uh = Object.prototype, dh = uh.hasOwnProperty;
2380
+ function lh(r) {
2381
2381
  var e = this.__data__;
2382
2382
  if (kr) {
2383
2383
  var t = e[r];
2384
- return t === ah ? void 0 : t;
2384
+ return t === ch ? void 0 : t;
2385
2385
  }
2386
- return uh.call(e, r) ? e[r] : void 0;
2386
+ return dh.call(e, r) ? e[r] : void 0;
2387
2387
  }
2388
- var lh = Object.prototype, hh = lh.hasOwnProperty;
2389
- function ph(r) {
2388
+ var hh = Object.prototype, ph = hh.hasOwnProperty;
2389
+ function fh(r) {
2390
2390
  var e = this.__data__;
2391
- return kr ? e[r] !== void 0 : hh.call(e, r);
2391
+ return kr ? e[r] !== void 0 : ph.call(e, r);
2392
2392
  }
2393
- var fh = "__lodash_hash_undefined__";
2394
- function mh(r, e) {
2393
+ var mh = "__lodash_hash_undefined__";
2394
+ function _h(r, e) {
2395
2395
  var t = this.__data__;
2396
- return this.size += this.has(r) ? 0 : 1, t[r] = kr && e === void 0 ? fh : e, this;
2396
+ return this.size += this.has(r) ? 0 : 1, t[r] = kr && e === void 0 ? mh : e, this;
2397
2397
  }
2398
2398
  function Tt(r) {
2399
2399
  var e = -1, t = r == null ? 0 : r.length;
@@ -2402,12 +2402,12 @@ function Tt(r) {
2402
2402
  this.set(n[0], n[1]);
2403
2403
  }
2404
2404
  }
2405
- Tt.prototype.clear = sh;
2406
- Tt.prototype.delete = oh;
2407
- Tt.prototype.get = dh;
2408
- Tt.prototype.has = ph;
2409
- Tt.prototype.set = mh;
2410
- function _h() {
2405
+ Tt.prototype.clear = oh;
2406
+ Tt.prototype.delete = ah;
2407
+ Tt.prototype.get = lh;
2408
+ Tt.prototype.has = fh;
2409
+ Tt.prototype.set = _h;
2410
+ function gh() {
2411
2411
  this.__data__ = [], this.size = 0;
2412
2412
  }
2413
2413
  function Tn(r, e) {
@@ -2416,22 +2416,22 @@ function Tn(r, e) {
2416
2416
  return t;
2417
2417
  return -1;
2418
2418
  }
2419
- var gh = Array.prototype, vh = gh.splice;
2420
- function yh(r) {
2419
+ var vh = Array.prototype, yh = vh.splice;
2420
+ function Sh(r) {
2421
2421
  var e = this.__data__, t = Tn(e, r);
2422
2422
  if (t < 0)
2423
2423
  return !1;
2424
2424
  var n = e.length - 1;
2425
- return t == n ? e.pop() : vh.call(e, t, 1), --this.size, !0;
2425
+ return t == n ? e.pop() : yh.call(e, t, 1), --this.size, !0;
2426
2426
  }
2427
- function Sh(r) {
2427
+ function bh(r) {
2428
2428
  var e = this.__data__, t = Tn(e, r);
2429
2429
  return t < 0 ? void 0 : e[t][1];
2430
2430
  }
2431
- function bh(r) {
2431
+ function Eh(r) {
2432
2432
  return Tn(this.__data__, r) > -1;
2433
2433
  }
2434
- function Eh(r, e) {
2434
+ function Ch(r, e) {
2435
2435
  var t = this.__data__, n = Tn(t, r);
2436
2436
  return n < 0 ? (++this.size, t.push([r, e])) : t[n][1] = e, this;
2437
2437
  }
@@ -2442,38 +2442,38 @@ function et(r) {
2442
2442
  this.set(n[0], n[1]);
2443
2443
  }
2444
2444
  }
2445
- et.prototype.clear = _h;
2446
- et.prototype.delete = yh;
2447
- et.prototype.get = Sh;
2448
- et.prototype.has = bh;
2449
- et.prototype.set = Eh;
2445
+ et.prototype.clear = gh;
2446
+ et.prototype.delete = Sh;
2447
+ et.prototype.get = bh;
2448
+ et.prototype.has = Eh;
2449
+ et.prototype.set = Ch;
2450
2450
  var Rr = $t(Qe, "Map");
2451
- function Ch() {
2451
+ function wh() {
2452
2452
  this.size = 0, this.__data__ = {
2453
2453
  hash: new Tt(),
2454
2454
  map: new (Rr || et)(),
2455
2455
  string: new Tt()
2456
2456
  };
2457
2457
  }
2458
- function wh(r) {
2458
+ function Th(r) {
2459
2459
  var e = typeof r;
2460
2460
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
2461
2461
  }
2462
2462
  function kn(r, e) {
2463
2463
  var t = r.__data__;
2464
- return wh(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
2464
+ return Th(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
2465
2465
  }
2466
- function Th(r) {
2466
+ function kh(r) {
2467
2467
  var e = kn(this, r).delete(r);
2468
2468
  return this.size -= e ? 1 : 0, e;
2469
2469
  }
2470
- function kh(r) {
2470
+ function Rh(r) {
2471
2471
  return kn(this, r).get(r);
2472
2472
  }
2473
- function Rh(r) {
2473
+ function Ah(r) {
2474
2474
  return kn(this, r).has(r);
2475
2475
  }
2476
- function Ah(r, e) {
2476
+ function Dh(r, e) {
2477
2477
  var t = kn(this, r), n = t.size;
2478
2478
  return t.set(r, e), this.size += t.size == n ? 0 : 1, this;
2479
2479
  }
@@ -2484,15 +2484,15 @@ function tt(r) {
2484
2484
  this.set(n[0], n[1]);
2485
2485
  }
2486
2486
  }
2487
- tt.prototype.clear = Ch;
2488
- tt.prototype.delete = Th;
2489
- tt.prototype.get = kh;
2490
- tt.prototype.has = Rh;
2491
- tt.prototype.set = Ah;
2492
- var Dh = "Expected a function";
2487
+ tt.prototype.clear = wh;
2488
+ tt.prototype.delete = kh;
2489
+ tt.prototype.get = Rh;
2490
+ tt.prototype.has = Ah;
2491
+ tt.prototype.set = Dh;
2492
+ var xh = "Expected a function";
2493
2493
  function $i(r, e) {
2494
2494
  if (typeof r != "function" || e != null && typeof e != "function")
2495
- throw new TypeError(Dh);
2495
+ throw new TypeError(xh);
2496
2496
  var t = function() {
2497
2497
  var n = arguments, i = e ? e.apply(this, n) : n[0], s = t.cache;
2498
2498
  if (s.has(i))
@@ -2503,24 +2503,24 @@ function $i(r, e) {
2503
2503
  return t.cache = new ($i.Cache || tt)(), t;
2504
2504
  }
2505
2505
  $i.Cache = tt;
2506
- var xh = 500;
2507
- function Ih(r) {
2506
+ var Ih = 500;
2507
+ function zh(r) {
2508
2508
  var e = $i(r, function(n) {
2509
- return t.size === xh && t.clear(), n;
2509
+ return t.size === Ih && t.clear(), n;
2510
2510
  }), t = e.cache;
2511
2511
  return e;
2512
2512
  }
2513
- var zh = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ph = /\\(\\)?/g, Oh = Ih(function(r) {
2513
+ var Ph = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Oh = /\\(\\)?/g, Mh = zh(function(r) {
2514
2514
  var e = [];
2515
- return r.charCodeAt(0) === 46 && e.push(""), r.replace(zh, function(t, n, i, s) {
2516
- e.push(i ? s.replace(Ph, "$1") : n || t);
2515
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(Ph, function(t, n, i, s) {
2516
+ e.push(i ? s.replace(Oh, "$1") : n || t);
2517
2517
  }), e;
2518
2518
  });
2519
- function Mh(r) {
2519
+ function Lh(r) {
2520
2520
  return r == null ? "" : ga(r);
2521
2521
  }
2522
2522
  function ka(r, e) {
2523
- return de(r) ? r : qi(r, e) ? [r] : Oh(Mh(r));
2523
+ return de(r) ? r : qi(r, e) ? [r] : Mh(Lh(r));
2524
2524
  }
2525
2525
  function Rn(r) {
2526
2526
  if (typeof r == "string" || Cn(r))
@@ -2534,34 +2534,34 @@ function Ra(r, e) {
2534
2534
  r = r[Rn(e[t++])];
2535
2535
  return t && t == n ? r : void 0;
2536
2536
  }
2537
- function Lh(r, e, t) {
2537
+ function Nh(r, e, t) {
2538
2538
  var n = r == null ? void 0 : Ra(r, e);
2539
2539
  return n === void 0 ? t : n;
2540
2540
  }
2541
- function Nh(r, e) {
2541
+ function Uh(r, e) {
2542
2542
  for (var t = -1, n = e.length, i = r.length; ++t < n; )
2543
2543
  r[i + t] = e[t];
2544
2544
  return r;
2545
2545
  }
2546
- function Uh() {
2546
+ function Gh() {
2547
2547
  this.__data__ = new et(), this.size = 0;
2548
2548
  }
2549
- function Gh(r) {
2549
+ function Bh(r) {
2550
2550
  var e = this.__data__, t = e.delete(r);
2551
2551
  return this.size = e.size, t;
2552
2552
  }
2553
- function Bh(r) {
2553
+ function Fh(r) {
2554
2554
  return this.__data__.get(r);
2555
2555
  }
2556
- function Fh(r) {
2556
+ function Vh(r) {
2557
2557
  return this.__data__.has(r);
2558
2558
  }
2559
- var Vh = 200;
2560
- function jh(r, e) {
2559
+ var jh = 200;
2560
+ function Hh(r, e) {
2561
2561
  var t = this.__data__;
2562
2562
  if (t instanceof et) {
2563
2563
  var n = t.__data__;
2564
- if (!Rr || n.length < Vh - 1)
2564
+ if (!Rr || n.length < jh - 1)
2565
2565
  return n.push([r, e]), this.size = ++t.size, this;
2566
2566
  t = this.__data__ = new tt(n);
2567
2567
  }
@@ -2571,11 +2571,11 @@ function Ze(r) {
2571
2571
  var e = this.__data__ = new et(r);
2572
2572
  this.size = e.size;
2573
2573
  }
2574
- Ze.prototype.clear = Uh;
2575
- Ze.prototype.delete = Gh;
2576
- Ze.prototype.get = Bh;
2577
- Ze.prototype.has = Fh;
2578
- Ze.prototype.set = jh;
2574
+ Ze.prototype.clear = Gh;
2575
+ Ze.prototype.delete = Bh;
2576
+ Ze.prototype.get = Fh;
2577
+ Ze.prototype.has = Vh;
2578
+ Ze.prototype.set = Hh;
2579
2579
  function Aa(r, e) {
2580
2580
  for (var t = -1, n = r == null ? 0 : r.length, i = 0, s = []; ++t < n; ) {
2581
2581
  var a = r[t];
@@ -2583,44 +2583,44 @@ function Aa(r, e) {
2583
2583
  }
2584
2584
  return s;
2585
2585
  }
2586
- function Hh() {
2586
+ function qh() {
2587
2587
  return [];
2588
2588
  }
2589
- var qh = Object.prototype, $h = qh.propertyIsEnumerable, Is = Object.getOwnPropertySymbols, Kh = Is ? function(r) {
2589
+ var $h = Object.prototype, Kh = $h.propertyIsEnumerable, Is = Object.getOwnPropertySymbols, Wh = Is ? function(r) {
2590
2590
  return r == null ? [] : (r = Object(r), Aa(Is(r), function(e) {
2591
- return $h.call(r, e);
2591
+ return Kh.call(r, e);
2592
2592
  }));
2593
- } : Hh;
2594
- function Wh(r, e, t) {
2593
+ } : qh;
2594
+ function Jh(r, e, t) {
2595
2595
  var n = e(r);
2596
- return de(r) ? n : Nh(n, t(r));
2596
+ return de(r) ? n : Uh(n, t(r));
2597
2597
  }
2598
2598
  function zs(r) {
2599
- return Wh(r, Nr, Kh);
2599
+ return Jh(r, Nr, Wh);
2600
2600
  }
2601
- var vi = $t(Qe, "DataView"), yi = $t(Qe, "Promise"), Si = $t(Qe, "Set"), Ps = "[object Map]", Jh = "[object Object]", Os = "[object Promise]", Ms = "[object Set]", Ls = "[object WeakMap]", Ns = "[object DataView]", Xh = Dt(vi), Zh = Dt(Rr), Yh = Dt(yi), Qh = Dt(Si), ep = Dt(gi), Je = qt;
2601
+ var vi = $t(Qe, "DataView"), yi = $t(Qe, "Promise"), Si = $t(Qe, "Set"), Ps = "[object Map]", Xh = "[object Object]", Os = "[object Promise]", Ms = "[object Set]", Ls = "[object WeakMap]", Ns = "[object DataView]", Zh = Dt(vi), Yh = Dt(Rr), Qh = Dt(yi), ep = Dt(Si), tp = Dt(gi), Je = qt;
2602
2602
  (vi && Je(new vi(new ArrayBuffer(1))) != Ns || Rr && Je(new Rr()) != Ps || yi && Je(yi.resolve()) != Os || Si && Je(new Si()) != Ms || gi && Je(new gi()) != Ls) && (Je = function(r) {
2603
- var e = qt(r), t = e == Jh ? r.constructor : void 0, n = t ? Dt(t) : "";
2603
+ var e = qt(r), t = e == Xh ? r.constructor : void 0, n = t ? Dt(t) : "";
2604
2604
  if (n)
2605
2605
  switch (n) {
2606
- case Xh:
2607
- return Ns;
2608
2606
  case Zh:
2609
- return Ps;
2607
+ return Ns;
2610
2608
  case Yh:
2611
- return Os;
2609
+ return Ps;
2612
2610
  case Qh:
2613
- return Ms;
2611
+ return Os;
2614
2612
  case ep:
2613
+ return Ms;
2614
+ case tp:
2615
2615
  return Ls;
2616
2616
  }
2617
2617
  return e;
2618
2618
  });
2619
- var Us = Qe.Uint8Array, tp = "__lodash_hash_undefined__";
2620
- function rp(r) {
2621
- return this.__data__.set(r, tp), this;
2622
- }
2619
+ var Us = Qe.Uint8Array, rp = "__lodash_hash_undefined__";
2623
2620
  function np(r) {
2621
+ return this.__data__.set(r, rp), this;
2622
+ }
2623
+ function ip(r) {
2624
2624
  return this.__data__.has(r);
2625
2625
  }
2626
2626
  function cn(r) {
@@ -2628,26 +2628,26 @@ function cn(r) {
2628
2628
  for (this.__data__ = new tt(); ++e < t; )
2629
2629
  this.add(r[e]);
2630
2630
  }
2631
- cn.prototype.add = cn.prototype.push = rp;
2632
- cn.prototype.has = np;
2633
- function ip(r, e) {
2631
+ cn.prototype.add = cn.prototype.push = np;
2632
+ cn.prototype.has = ip;
2633
+ function sp(r, e) {
2634
2634
  for (var t = -1, n = r == null ? 0 : r.length; ++t < n; )
2635
2635
  if (e(r[t], t, r))
2636
2636
  return !0;
2637
2637
  return !1;
2638
2638
  }
2639
- function sp(r, e) {
2639
+ function op(r, e) {
2640
2640
  return r.has(e);
2641
2641
  }
2642
- var op = 1, ap = 2;
2642
+ var ap = 1, cp = 2;
2643
2643
  function Da(r, e, t, n, i, s) {
2644
- var a = t & op, o = r.length, d = e.length;
2644
+ var a = t & ap, o = r.length, d = e.length;
2645
2645
  if (o != d && !(a && d > o))
2646
2646
  return !1;
2647
2647
  var c = s.get(r), u = s.get(e);
2648
2648
  if (c && u)
2649
2649
  return c == e && u == r;
2650
- var h = -1, l = !0, f = t & ap ? new cn() : void 0;
2650
+ var h = -1, l = !0, f = t & cp ? new cn() : void 0;
2651
2651
  for (s.set(r, e), s.set(e, r); ++h < o; ) {
2652
2652
  var y = r[h], C = e[h];
2653
2653
  if (n)
@@ -2659,8 +2659,8 @@ function Da(r, e, t, n, i, s) {
2659
2659
  break;
2660
2660
  }
2661
2661
  if (f) {
2662
- if (!ip(e, function(E, k) {
2663
- if (!sp(f, k) && (y === E || i(y, E, t, n, s)))
2662
+ if (!sp(e, function(E, k) {
2663
+ if (!op(f, k) && (y === E || i(y, E, t, n, s)))
2664
2664
  return f.push(k);
2665
2665
  })) {
2666
2666
  l = !1;
@@ -2673,62 +2673,62 @@ function Da(r, e, t, n, i, s) {
2673
2673
  }
2674
2674
  return s.delete(r), s.delete(e), l;
2675
2675
  }
2676
- function cp(r) {
2676
+ function up(r) {
2677
2677
  var e = -1, t = Array(r.size);
2678
2678
  return r.forEach(function(n, i) {
2679
2679
  t[++e] = [i, n];
2680
2680
  }), t;
2681
2681
  }
2682
- function up(r) {
2682
+ function dp(r) {
2683
2683
  var e = -1, t = Array(r.size);
2684
2684
  return r.forEach(function(n) {
2685
2685
  t[++e] = n;
2686
2686
  }), t;
2687
2687
  }
2688
- var dp = 1, lp = 2, hp = "[object Boolean]", pp = "[object Date]", fp = "[object Error]", mp = "[object Map]", _p = "[object Number]", gp = "[object RegExp]", vp = "[object Set]", yp = "[object String]", Sp = "[object Symbol]", bp = "[object ArrayBuffer]", Ep = "[object DataView]", Gs = lt ? lt.prototype : void 0, Nn = Gs ? Gs.valueOf : void 0;
2689
- function Cp(r, e, t, n, i, s, a) {
2688
+ var lp = 1, hp = 2, pp = "[object Boolean]", fp = "[object Date]", mp = "[object Error]", _p = "[object Map]", gp = "[object Number]", vp = "[object RegExp]", yp = "[object Set]", Sp = "[object String]", bp = "[object Symbol]", Ep = "[object ArrayBuffer]", Cp = "[object DataView]", Gs = lt ? lt.prototype : void 0, Nn = Gs ? Gs.valueOf : void 0;
2689
+ function wp(r, e, t, n, i, s, a) {
2690
2690
  switch (t) {
2691
- case Ep:
2691
+ case Cp:
2692
2692
  if (r.byteLength != e.byteLength || r.byteOffset != e.byteOffset)
2693
2693
  return !1;
2694
2694
  r = r.buffer, e = e.buffer;
2695
- case bp:
2695
+ case Ep:
2696
2696
  return !(r.byteLength != e.byteLength || !s(new Us(r), new Us(e)));
2697
- case hp:
2698
2697
  case pp:
2699
- case _p:
2700
- return Sa(+r, +e);
2701
2698
  case fp:
2702
- return r.name == e.name && r.message == e.message;
2703
2699
  case gp:
2704
- case yp:
2705
- return r == e + "";
2700
+ return Sa(+r, +e);
2706
2701
  case mp:
2707
- var o = cp;
2702
+ return r.name == e.name && r.message == e.message;
2708
2703
  case vp:
2709
- var d = n & dp;
2710
- if (o || (o = up), r.size != e.size && !d)
2704
+ case Sp:
2705
+ return r == e + "";
2706
+ case _p:
2707
+ var o = up;
2708
+ case yp:
2709
+ var d = n & lp;
2710
+ if (o || (o = dp), r.size != e.size && !d)
2711
2711
  return !1;
2712
2712
  var c = a.get(r);
2713
2713
  if (c)
2714
2714
  return c == e;
2715
- n |= lp, a.set(r, e);
2715
+ n |= hp, a.set(r, e);
2716
2716
  var u = Da(o(r), o(e), n, i, s, a);
2717
2717
  return a.delete(r), u;
2718
- case Sp:
2718
+ case bp:
2719
2719
  if (Nn)
2720
2720
  return Nn.call(r) == Nn.call(e);
2721
2721
  }
2722
2722
  return !1;
2723
2723
  }
2724
- var wp = 1, Tp = Object.prototype, kp = Tp.hasOwnProperty;
2725
- function Rp(r, e, t, n, i, s) {
2726
- var a = t & wp, o = zs(r), d = o.length, c = zs(e), u = c.length;
2724
+ var Tp = 1, kp = Object.prototype, Rp = kp.hasOwnProperty;
2725
+ function Ap(r, e, t, n, i, s) {
2726
+ var a = t & Tp, o = zs(r), d = o.length, c = zs(e), u = c.length;
2727
2727
  if (d != u && !a)
2728
2728
  return !1;
2729
2729
  for (var h = d; h--; ) {
2730
2730
  var l = o[h];
2731
- if (!(a ? l in e : kp.call(e, l)))
2731
+ if (!(a ? l in e : Rp.call(e, l)))
2732
2732
  return !1;
2733
2733
  }
2734
2734
  var f = s.get(r), y = s.get(e);
@@ -2753,8 +2753,8 @@ function Rp(r, e, t, n, i, s) {
2753
2753
  }
2754
2754
  return s.delete(r), s.delete(e), C;
2755
2755
  }
2756
- var Ap = 1, Bs = "[object Arguments]", Fs = "[object Array]", $r = "[object Object]", Dp = Object.prototype, Vs = Dp.hasOwnProperty;
2757
- function xp(r, e, t, n, i, s) {
2756
+ var Dp = 1, Bs = "[object Arguments]", Fs = "[object Array]", $r = "[object Object]", xp = Object.prototype, Vs = xp.hasOwnProperty;
2757
+ function Ip(r, e, t, n, i, s) {
2758
2758
  var a = de(r), o = de(e), d = a ? Fs : Je(r), c = o ? Fs : Je(e);
2759
2759
  d = d == Bs ? $r : d, c = c == Bs ? $r : c;
2760
2760
  var u = d == $r, h = c == $r, l = d == c;
@@ -2764,21 +2764,21 @@ function xp(r, e, t, n, i, s) {
2764
2764
  a = !0, u = !1;
2765
2765
  }
2766
2766
  if (l && !u)
2767
- return s || (s = new Ze()), a || Hi(r) ? Da(r, e, t, n, i, s) : Cp(r, e, d, t, n, i, s);
2768
- if (!(t & Ap)) {
2767
+ return s || (s = new Ze()), a || Hi(r) ? Da(r, e, t, n, i, s) : wp(r, e, d, t, n, i, s);
2768
+ if (!(t & Dp)) {
2769
2769
  var f = u && Vs.call(r, "__wrapped__"), y = h && Vs.call(e, "__wrapped__");
2770
2770
  if (f || y) {
2771
2771
  var C = f ? r.value() : r, v = y ? e.value() : e;
2772
2772
  return s || (s = new Ze()), i(C, v, t, n, s);
2773
2773
  }
2774
2774
  }
2775
- return l ? (s || (s = new Ze()), Rp(r, e, t, n, i, s)) : !1;
2775
+ return l ? (s || (s = new Ze()), Ap(r, e, t, n, i, s)) : !1;
2776
2776
  }
2777
2777
  function Ki(r, e, t, n, i) {
2778
- return r === e ? !0 : r == null || e == null || !Vt(r) && !Vt(e) ? r !== r && e !== e : xp(r, e, t, n, Ki, i);
2778
+ return r === e ? !0 : r == null || e == null || !Vt(r) && !Vt(e) ? r !== r && e !== e : Ip(r, e, t, n, Ki, i);
2779
2779
  }
2780
- var Ip = 1, zp = 2;
2781
- function Pp(r, e, t, n) {
2780
+ var zp = 1, Pp = 2;
2781
+ function Op(r, e, t, n) {
2782
2782
  var i = t.length, s = i;
2783
2783
  if (r == null)
2784
2784
  return !s;
@@ -2795,7 +2795,7 @@ function Pp(r, e, t, n) {
2795
2795
  return !1;
2796
2796
  } else {
2797
2797
  var u = new Ze(), h;
2798
- if (!(h === void 0 ? Ki(c, d, Ip | zp, n, u) : h))
2798
+ if (!(h === void 0 ? Ki(c, d, zp | Pp, n, u) : h))
2799
2799
  return !1;
2800
2800
  }
2801
2801
  }
@@ -2804,7 +2804,7 @@ function Pp(r, e, t, n) {
2804
2804
  function xa(r) {
2805
2805
  return r === r && !Tr(r);
2806
2806
  }
2807
- function Op(r) {
2807
+ function Mp(r) {
2808
2808
  for (var e = Nr(r), t = e.length; t--; ) {
2809
2809
  var n = e[t], i = r[n];
2810
2810
  e[t] = [n, i, xa(i)];
@@ -2816,16 +2816,16 @@ function Ia(r, e) {
2816
2816
  return t == null ? !1 : t[r] === e && (e !== void 0 || r in Object(t));
2817
2817
  };
2818
2818
  }
2819
- function Mp(r) {
2820
- var e = Op(r);
2819
+ function Lp(r) {
2820
+ var e = Mp(r);
2821
2821
  return e.length == 1 && e[0][2] ? Ia(e[0][0], e[0][1]) : function(t) {
2822
- return t === r || Pp(t, r, e);
2822
+ return t === r || Op(t, r, e);
2823
2823
  };
2824
2824
  }
2825
- function Lp(r, e) {
2825
+ function Np(r, e) {
2826
2826
  return r != null && e in Object(r);
2827
2827
  }
2828
- function Np(r, e, t) {
2828
+ function Up(r, e, t) {
2829
2829
  e = ka(e, r);
2830
2830
  for (var n = -1, i = e.length, s = !1; ++n < i; ) {
2831
2831
  var a = Rn(e[n]);
@@ -2835,33 +2835,33 @@ function Np(r, e, t) {
2835
2835
  }
2836
2836
  return s || ++n != i ? s : (i = r == null ? 0 : r.length, !!i && Vi(i) && ya(a, i) && (de(r) || ji(r)));
2837
2837
  }
2838
- function Up(r, e) {
2839
- return r != null && Np(r, e, Lp);
2838
+ function Gp(r, e) {
2839
+ return r != null && Up(r, e, Np);
2840
2840
  }
2841
- var Gp = 1, Bp = 2;
2842
- function Fp(r, e) {
2841
+ var Bp = 1, Fp = 2;
2842
+ function Vp(r, e) {
2843
2843
  return qi(r) && xa(e) ? Ia(Rn(r), e) : function(t) {
2844
- var n = Lh(t, r);
2845
- return n === void 0 && n === e ? Up(t, r) : Ki(e, n, Gp | Bp);
2844
+ var n = Nh(t, r);
2845
+ return n === void 0 && n === e ? Gp(t, r) : Ki(e, n, Bp | Fp);
2846
2846
  };
2847
2847
  }
2848
- function Vp(r) {
2848
+ function jp(r) {
2849
2849
  return function(e) {
2850
2850
  return e == null ? void 0 : e[r];
2851
2851
  };
2852
2852
  }
2853
- function jp(r) {
2853
+ function Hp(r) {
2854
2854
  return function(e) {
2855
2855
  return Ra(e, r);
2856
2856
  };
2857
2857
  }
2858
- function Hp(r) {
2859
- return qi(r) ? Vp(Rn(r)) : jp(r);
2858
+ function qp(r) {
2859
+ return qi(r) ? jp(Rn(r)) : Hp(r);
2860
2860
  }
2861
2861
  function Wi(r) {
2862
- return typeof r == "function" ? r : r == null ? Wd : typeof r == "object" ? de(r) ? Fp(r[0], r[1]) : Mp(r) : Hp(r);
2862
+ return typeof r == "function" ? r : r == null ? Jd : typeof r == "object" ? de(r) ? Vp(r[0], r[1]) : Lp(r) : qp(r);
2863
2863
  }
2864
- function qp(r) {
2864
+ function $p(r) {
2865
2865
  return function(e, t, n) {
2866
2866
  for (var i = -1, s = Object(e), a = n(e), o = a.length; o--; ) {
2867
2867
  var d = a[++i];
@@ -2871,11 +2871,11 @@ function qp(r) {
2871
2871
  return e;
2872
2872
  };
2873
2873
  }
2874
- var $p = qp();
2875
- function Kp(r, e) {
2876
- return r && $p(r, e, Nr);
2877
- }
2874
+ var Kp = $p();
2878
2875
  function Wp(r, e) {
2876
+ return r && Kp(r, e, Nr);
2877
+ }
2878
+ function Jp(r, e) {
2879
2879
  return function(t, n) {
2880
2880
  if (t == null)
2881
2881
  return t;
@@ -2886,18 +2886,18 @@ function Wp(r, e) {
2886
2886
  return t;
2887
2887
  };
2888
2888
  }
2889
- var Jp = Wp(Kp);
2890
- function Xp(r, e) {
2889
+ var Xp = Jp(Wp);
2890
+ function Zp(r, e) {
2891
2891
  var t = [];
2892
- return Jp(r, function(n, i, s) {
2892
+ return Xp(r, function(n, i, s) {
2893
2893
  e(n, i, s) && t.push(n);
2894
2894
  }), t;
2895
2895
  }
2896
2896
  function za(r, e) {
2897
- var t = de(r) ? Aa : Xp;
2897
+ var t = de(r) ? Aa : Zp;
2898
2898
  return t(r, Wi(e));
2899
2899
  }
2900
- function Zp(r) {
2900
+ function Yp(r) {
2901
2901
  return function(e, t, n) {
2902
2902
  var i = Object(e);
2903
2903
  if (!wn(e)) {
@@ -2910,43 +2910,43 @@ function Zp(r) {
2910
2910
  return a > -1 ? i[s ? e[a] : a] : void 0;
2911
2911
  };
2912
2912
  }
2913
- var Yp = Math.max;
2914
- function Qp(r, e, t) {
2913
+ var Qp = Math.max;
2914
+ function ef(r, e, t) {
2915
2915
  var n = r == null ? 0 : r.length;
2916
2916
  if (!n)
2917
2917
  return -1;
2918
- var i = t == null ? 0 : Kd(t);
2919
- return i < 0 && (i = Yp(n + i, 0)), ll(r, Wi(e), i);
2918
+ var i = t == null ? 0 : Wd(t);
2919
+ return i < 0 && (i = Qp(n + i, 0)), hl(r, Wi(e), i);
2920
2920
  }
2921
- var Ar = Zp(Qp);
2922
- function ef(r, e) {
2921
+ var Ar = Yp(ef);
2922
+ function tf(r, e) {
2923
2923
  return _a(e, function(t) {
2924
2924
  return r[t];
2925
2925
  });
2926
2926
  }
2927
2927
  function $e(r) {
2928
- return r == null ? [] : ef(r, Nr(r));
2928
+ return r == null ? [] : tf(r, Nr(r));
2929
2929
  }
2930
- var tf = "[object Map]", rf = "[object Set]", nf = Object.prototype, sf = nf.hasOwnProperty;
2931
- function of(r) {
2930
+ var rf = "[object Map]", nf = "[object Set]", sf = Object.prototype, of = sf.hasOwnProperty;
2931
+ function af(r) {
2932
2932
  if (r == null)
2933
2933
  return !0;
2934
2934
  if (wn(r) && (de(r) || typeof r == "string" || typeof r.splice == "function" || an(r) || Hi(r) || ji(r)))
2935
2935
  return !r.length;
2936
2936
  var e = Je(r);
2937
- if (e == tf || e == rf)
2937
+ if (e == rf || e == nf)
2938
2938
  return !r.size;
2939
2939
  if (ba(r))
2940
2940
  return !Ta(r).length;
2941
2941
  for (var t in r)
2942
- if (sf.call(r, t))
2942
+ if (of.call(r, t))
2943
2943
  return !1;
2944
2944
  return !0;
2945
2945
  }
2946
- function af(r) {
2946
+ function cf(r) {
2947
2947
  return r == null;
2948
2948
  }
2949
- class cf extends En {
2949
+ class uf extends En {
2950
2950
  constructor(e) {
2951
2951
  super({
2952
2952
  type: ee.Microphone,
@@ -2966,7 +2966,7 @@ class cf extends En {
2966
2966
  this.source.destroy();
2967
2967
  }
2968
2968
  }
2969
- class uf extends Ht {
2969
+ class df extends Ht {
2970
2970
  constructor(e) {
2971
2971
  super({
2972
2972
  type: ee.VideoFile,
@@ -2998,7 +2998,7 @@ class uf extends Ht {
2998
2998
  (e = this._videoStream) == null || e.destroy(), (t = this._audioStream) == null || t.destroy(), delete this._trackMap.video, delete this._trackMap.audio;
2999
2999
  }
3000
3000
  }
3001
- class df extends Ht {
3001
+ class lf extends Ht {
3002
3002
  constructor(e, t) {
3003
3003
  super({
3004
3004
  type: ee.Screen,
@@ -3030,7 +3030,7 @@ class df extends Ht {
3030
3030
  (e = this._videoStream) == null || e.destroy(), (t = this._audioStream) == null || t.destroy(), delete this._trackMap.video, delete this._trackMap.audio;
3031
3031
  }
3032
3032
  }
3033
- class lf extends En {
3033
+ class hf extends En {
3034
3034
  constructor(e) {
3035
3035
  super({
3036
3036
  type: ee.AudioFile,
@@ -3055,7 +3055,7 @@ class lf extends En {
3055
3055
  (e = this._audioStream) == null || e.destroy();
3056
3056
  }
3057
3057
  }
3058
- class hf extends Ht {
3058
+ class pf extends Ht {
3059
3059
  constructor(e) {
3060
3060
  super({
3061
3061
  type: ee.Image,
@@ -3078,7 +3078,7 @@ class hf extends Ht {
3078
3078
  this.source.destroy();
3079
3079
  }
3080
3080
  }
3081
- class pf extends Ht {
3081
+ class ff extends Ht {
3082
3082
  constructor(e) {
3083
3083
  super({
3084
3084
  type: ee.CustomVideo,
@@ -3101,7 +3101,7 @@ class pf extends Ht {
3101
3101
  this.source.destroy();
3102
3102
  }
3103
3103
  }
3104
- class ff extends En {
3104
+ class mf extends En {
3105
3105
  constructor(e) {
3106
3106
  super({
3107
3107
  type: ee.CustomAudio,
@@ -3124,7 +3124,7 @@ class ff extends En {
3124
3124
  (e = this._audioStream) == null || e.destroy();
3125
3125
  }
3126
3126
  }
3127
- const mf = ["user", "environment"], _f = 18e4, gf = 1e4, Pa = 1e3;
3127
+ const _f = ["user", "environment"], gf = 18e4, vf = 1e4, Pa = 1e3;
3128
3128
  var Re = /* @__PURE__ */ ((r) => (r[r.OPEN_CAMERA_FAILED = 1001] = "OPEN_CAMERA_FAILED", r[r.OPEN_MICROPHONE_FAILED = 1002] = "OPEN_MICROPHONE_FAILED", r[r.OPEN_SCREEN_FAILED = 1003] = "OPEN_SCREEN_FAILED", r[r.VIDEO_FILE_CAPTURE_FAILED = 1004] = "VIDEO_FILE_CAPTURE_FAILED", r[r.AUDIO_FILE_CAPTURE_FAILED = 1005] = "AUDIO_FILE_CAPTURE_FAILED", r[r.IMAGE_FILE_CAPTURE_FAILED = 1006] = "IMAGE_FILE_CAPTURE_FAILED", r[r.VOLUME_DETECT_FAILED = 1008] = "VOLUME_DETECT_FAILED", r[r.PUBLISH_FAILED = 2001] = "PUBLISH_FAILED", r[r.UPDATE_PUBLISH_FAILED = 2002] = "UPDATE_PUBLISH_FAILED", r[r.PUSH_CONNECT_FAILED = 2003] = "PUSH_CONNECT_FAILED", r[r.AUDIO_RESUME_FAILED = 2004] = "AUDIO_RESUME_FAILED", r))(Re || {});
3129
3129
  class Ut extends Error {
3130
3130
  constructor(e, t, n) {
@@ -3237,7 +3237,7 @@ function Ei(r, e) {
3237
3237
  };
3238
3238
  }
3239
3239
  }
3240
- function vf(r, e) {
3240
+ function yf(r, e) {
3241
3241
  var t = typeof Symbol == "function" && r[Symbol.iterator];
3242
3242
  if (!t) return r;
3243
3243
  var n, i, s = t.call(r), a = [];
@@ -3255,10 +3255,10 @@ function vf(r, e) {
3255
3255
  return a;
3256
3256
  }
3257
3257
  function Dr() {
3258
- for (var r = [], e = 0; e < arguments.length; e++) r = r.concat(vf(arguments[e]));
3258
+ for (var r = [], e = 0; e < arguments.length; e++) r = r.concat(yf(arguments[e]));
3259
3259
  return r;
3260
3260
  }
3261
- var js, yf = function() {
3261
+ var js, Sf = function() {
3262
3262
  function r() {
3263
3263
  this._hooks = {}, this._cache = [], this._hooksCache = {};
3264
3264
  }
@@ -3293,7 +3293,7 @@ var js, yf = function() {
3293
3293
  return r != null && Object.prototype.toString.call(r) == "[object Object]";
3294
3294
  }, Ji = function(r) {
3295
3295
  return Array.isArray(r);
3296
- }, Sf = (js = +Date.now() + Number(("" + Math.random()).slice(2, 8)), function() {
3296
+ }, bf = (js = +Date.now() + Number(("" + Math.random()).slice(2, 8)), function() {
3297
3297
  return js += 1;
3298
3298
  }), Ir = function(r) {
3299
3299
  return function(e, t, n) {
@@ -4491,9 +4491,9 @@ var fr = La(function(r, e) {
4491
4491
  if ((!jr(qe, q) || m[q]) && typeof m[q] != "function") return void A(z);
4492
4492
  }
4493
4493
  (function() {
4494
- for (var J = function(Hc) {
4494
+ for (var J = function(qc) {
4495
4495
  return function() {
4496
- var qc = new Error("Method " + Hc + " is not implemented by the current driver"), os = d.reject(qc);
4496
+ var $c = new Error("Method " + qc + " is not implemented by the current driver"), os = d.reject($c);
4497
4497
  return c(os, arguments[arguments.length - 1]), os;
4498
4498
  };
4499
4499
  }, pe = 0, vt = qe.length; pe < vt; pe++) {
@@ -4577,7 +4577,7 @@ var fr = La(function(r, e) {
4577
4577
  }())();
4578
4578
  n.exports = Dn;
4579
4579
  }, { 3: 3 }] }, {}, [4])(4);
4580
- }), bf = function() {
4580
+ }), Ef = function() {
4581
4581
  function r() {
4582
4582
  this.cache = {};
4583
4583
  }
@@ -4588,7 +4588,7 @@ var fr = La(function(r, e) {
4588
4588
  }, r.prototype.removeItem = function(e) {
4589
4589
  this.cache[e] = void 0;
4590
4590
  }, r;
4591
- }(), Ef = function() {
4591
+ }(), Cf = function() {
4592
4592
  function r() {
4593
4593
  this.support = this.isSupportLS();
4594
4594
  }
@@ -4621,7 +4621,7 @@ var fr = La(function(r, e) {
4621
4621
  } catch {
4622
4622
  }
4623
4623
  }, r;
4624
- }(), Cf = function() {
4624
+ }(), wf = function() {
4625
4625
  function r() {
4626
4626
  this.support = this.isSupportSession();
4627
4627
  }
@@ -4654,7 +4654,7 @@ var fr = La(function(r, e) {
4654
4654
  } catch {
4655
4655
  }
4656
4656
  }, r;
4657
- }(), wf = function() {
4657
+ }(), Tf = function() {
4658
4658
  function r(e, t) {
4659
4659
  return this.dbStorage = Gn.createInstance({ driver: [Gn.INDEXEDDB, Gn.LOCALSTORAGE], name: e, storeName: t }), this.dbStorage;
4660
4660
  }
@@ -4692,9 +4692,9 @@ var fr = La(function(r, e) {
4692
4692
  console.warn("db remove storage error");
4693
4693
  }
4694
4694
  }, r;
4695
- }(), Tf = function() {
4695
+ }(), kf = function() {
4696
4696
  function r() {
4697
- this.defaultExpireTime = 6048e5, this.local = new Ef(), this.session = new Cf(), this.cache = new bf();
4697
+ this.defaultExpireTime = 6048e5, this.local = new Cf(), this.session = new wf(), this.cache = new Ef();
4698
4698
  }
4699
4699
  return r.prototype.getLocalItem = function(e) {
4700
4700
  return this.local.getItem(e);
@@ -4733,14 +4733,14 @@ var fr = La(function(r, e) {
4733
4733
  } catch {
4734
4734
  }
4735
4735
  }, r;
4736
- }(), kf = function() {
4736
+ }(), Rf = function() {
4737
4737
  function r(e, t, n) {
4738
4738
  this.appid = e, this.domain = t, this.userAgent = window.navigator.userAgent, this.appVersion = window.navigator.appVersion, this.cookie_expire = n;
4739
4739
  }
4740
4740
  return r.prototype.init = function() {
4741
4741
  var e, t = window.navigator.userAgent, n = window.navigator.language, i = document.referrer, s = i ? Xi(i).hostname : "", a = un(window.location.href), o = /Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion) ? "wap" : "web", d = ((e = window.navigator.connection) === null || e === void 0 ? void 0 : e.effectiveType) || "";
4742
4742
  this.utm = function(h, l, f, y) {
4743
- var C = new Tf(), v = h ? "_tea_utm_cache_" + h : "_tea_utm_cache", E = h ? "_$utm_from_url_" + h : "_$utm_from_url", k = {}, g = ["tr_shareuser", "tr_admaster", "tr_param1", "tr_param2", "tr_param3", "tr_param4", "$utm_from_url"], D = { ad_id: Number(l.ad_id) || void 0, campaign_id: Number(l.campaign_id) || void 0, creative_id: Number(l.creative_id) || void 0, utm_source: l.utm_source, utm_medium: l.utm_medium, utm_campaign: l.utm_campaign, utm_term: l.utm_term, utm_content: l.utm_content, tr_shareuser: l.tr_shareuser, tr_admaster: l.tr_admaster, tr_param1: l.tr_param1, tr_param2: l.tr_param2, tr_param3: l.tr_param3, tr_param4: l.tr_param4 };
4743
+ var C = new kf(), v = h ? "_tea_utm_cache_" + h : "_tea_utm_cache", E = h ? "_$utm_from_url_" + h : "_$utm_from_url", k = {}, g = ["tr_shareuser", "tr_admaster", "tr_param1", "tr_param2", "tr_param3", "tr_param4", "$utm_from_url"], D = { ad_id: Number(l.ad_id) || void 0, campaign_id: Number(l.campaign_id) || void 0, creative_id: Number(l.creative_id) || void 0, utm_source: l.utm_source, utm_medium: l.utm_medium, utm_campaign: l.utm_campaign, utm_term: l.utm_term, utm_content: l.utm_content, tr_shareuser: l.tr_shareuser, tr_admaster: l.tr_admaster, tr_param1: l.tr_param1, tr_param2: l.tr_param2, tr_param3: l.tr_param3, tr_param4: l.tr_param4 };
4744
4744
  try {
4745
4745
  var L = !1;
4746
4746
  for (var R in D) D[R] && (g.indexOf(R) !== -1 ? (k.hasOwnProperty("tracer_data") || (k.tracer_data = {}), k.tracer_data[R] = D[R]) : k[R] = D[R], L = !0);
@@ -4830,7 +4830,7 @@ var fr = La(function(r, e) {
4830
4830
  fr.set(r, e, { expires: new Date(s), path: "/", domain: i });
4831
4831
  } catch {
4832
4832
  }
4833
- }, Rf = function() {
4833
+ }, Af = function() {
4834
4834
  function r() {
4835
4835
  this.cache = {};
4836
4836
  }
@@ -4877,7 +4877,7 @@ var fr = La(function(r, e) {
4877
4877
  } catch {
4878
4878
  return !1;
4879
4879
  }
4880
- }() }, Af = { getItem: function(r) {
4880
+ }() }, Df = { getItem: function(r) {
4881
4881
  try {
4882
4882
  var e = sessionStorage.getItem(r), t = e;
4883
4883
  try {
@@ -4911,7 +4911,7 @@ var fr = La(function(r, e) {
4911
4911
  }
4912
4912
  }() }, kt = function() {
4913
4913
  function r(e, t) {
4914
- this._storage = t && t === "session" ? Af : !e && Hs.isSupportLS ? Hs : new Rf();
4914
+ this._storage = t && t === "session" ? Df : !e && Hs.isSupportLS ? Hs : new Af();
4915
4915
  }
4916
4916
  return r.prototype.getItem = function(e) {
4917
4917
  return this._storage.getItem(e);
@@ -4928,7 +4928,7 @@ var fr = La(function(r, e) {
4928
4928
  return new Set(Object.keys(Qi));
4929
4929
  }, Bn = function() {
4930
4930
  return Object.keys(Qi);
4931
- }, qs = { sg: "1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k", va: "1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k", my: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k" }, wi = { va: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k", sg: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k", in: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k" }, Df = { sg: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k", va: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k", in: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k", ie2: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23" }, xf = { sg: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21", va: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21", ie2: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23" }, zr = "5.3.11_oversea", If = ["1fz22z22z1nz21z4mz4bz4bz1bz18z22z18z4az19z27z22z1cz1bz18z1lz1az1cz4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz22z1cz18z49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z1cz23z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z23z21z22z21z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz1gz1mz49z21z1ez4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz1gz1mz49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22"].map(function(r) {
4931
+ }, qs = { sg: "1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k", va: "1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k", my: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k" }, wi = { va: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k", sg: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k", in: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k" }, xf = { sg: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k", va: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k", in: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k", ie2: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23" }, If = { sg: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21", va: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21", ie2: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23" }, zr = "5.3.11_oversea", zf = ["1fz22z22z1nz21z4mz4bz4bz1bz18z22z18z4az19z27z22z1cz1bz18z1lz1az1cz4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz22z1cz18z49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z1cz23z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z23z21z22z21z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz1gz1mz49z21z1ez4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22", "1fz22z22z1nz21z4mz4bz4bz1gz1mz49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22"].map(function(r) {
4932
4932
  return Ir(r);
4933
4933
  });
4934
4934
  (function(r) {
@@ -4936,14 +4936,14 @@ var fr = La(function(r, e) {
4936
4936
  })(Ci || (Ci = {})), function(r) {
4937
4937
  r.DEBUGGER_MESSAGE = "debugger-message", r.DEBUGGER_MESSAGE_SDK = "debugger-message-sdk", r.DEBUGGER_MESSAGE_FETCH = "debugger-message-fetch", r.DEBUGGER_MESSAGE_FETCH_RESULT = "debugger-message-fetch-result", r.DEBUGGER_MESSAGE_EVENT = "debugger-message-event", r.DEVTOOL_WEB_READY = "devtool-web-ready";
4938
4938
  }(T || (T = {}));
4939
- var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), zf = parseInt("" + -Ua / 60, 10), Pf = 60 * Ua, Of = function() {
4939
+ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), Pf = parseInt("" + -Ua / 60, 10), Of = 60 * Ua, Mf = function() {
4940
4940
  function r(e, t) {
4941
4941
  var n = this;
4942
4942
  this.is_first_time = !0, this.configPersist = !1, this.initConfig = t, this.collect = e;
4943
- var i = new kf(t.app_id, t.cookie_domain || "", t.cookie_expire || 6048e5).init(), s = "__tea_cache_first_" + t.app_id;
4943
+ var i = new Rf(t.app_id, t.cookie_domain || "", t.cookie_expire || 6048e5).init(), s = "__tea_cache_first_" + t.app_id;
4944
4944
  this.configKey = "__tea_cache_config_" + t.app_id, this.sessionStorage = new kt(!1, "session"), this.localStorage = new kt(!1, "local"), this.channelUrl = this.getChannelForUrl(), this.current_env = "row", t.configPersist && (this.configPersist = !0, this.storage = t.configPersist === 1 ? this.sessionStorage : this.localStorage);
4945
4945
  var a = this.localStorage.getItem(s);
4946
- a && a == 1 ? this.is_first_time = !1 : (this.is_first_time = !0, this.localStorage.setItem(s, "1")), this.envInfo = { user: { user_unique_id: Y, user_type: Y, user_id: Y, user_is_auth: Y, user_is_login: Y, device_id: Y, web_id: Y, ip_addr_id: Y, user_unique_id_type: Y }, header: { app_id: Y, app_name: Y, app_install_id: Y, install_id: Y, app_package: Y, app_channel: Y, app_version: Y, ab_version: Y, os_name: i.os_name, os_version: i.os_version, device_model: i.device_model, ab_client: Y, traffic_type: Y, network_type: i.network_type, client_ip: Y, device_brand: Y, os_api: Y, access: Y, language: i.language, region: Y, app_language: Y, app_region: Y, creative_id: i.utm.creative_id, ad_id: i.utm.ad_id, campaign_id: i.utm.campaign_id, log_type: Y, rnd: Y, platform: i.platform, sdk_version: zr, sdk_lib: "js", province: Y, city: Y, timezone: zf, tz_offset: Pf, tz_name: Y, sim_region: Y, carrier: Y, resolution: i.screen_width + "x" + i.screen_height, browser: i.browser, browser_version: i.browser_version, referrer: i.referrer, referrer_host: i.referrer_host, width: i.screen_width, height: i.screen_height, screen_width: i.screen_width, screen_height: i.screen_height, utm_term: i.utm.utm_term, utm_content: i.utm.utm_content, utm_source: i.utm.utm_source, utm_medium: i.utm.utm_medium, utm_campaign: i.utm.utm_campaign, tracer_data: JSON.stringify(i.utm.tracer_data), custom: i.network_type ? { network_type: i.network_type } : {} } }, this.ab_version = "", this.ab_uuid_cache = {}, this.evtParams = {}, this.reportErrorCallback = function() {
4946
+ a && a == 1 ? this.is_first_time = !1 : (this.is_first_time = !0, this.localStorage.setItem(s, "1")), this.envInfo = { user: { user_unique_id: Y, user_type: Y, user_id: Y, user_is_auth: Y, user_is_login: Y, device_id: Y, web_id: Y, ip_addr_id: Y, user_unique_id_type: Y }, header: { app_id: Y, app_name: Y, app_install_id: Y, install_id: Y, app_package: Y, app_channel: Y, app_version: Y, ab_version: Y, os_name: i.os_name, os_version: i.os_version, device_model: i.device_model, ab_client: Y, traffic_type: Y, network_type: i.network_type, client_ip: Y, device_brand: Y, os_api: Y, access: Y, language: i.language, region: Y, app_language: Y, app_region: Y, creative_id: i.utm.creative_id, ad_id: i.utm.ad_id, campaign_id: i.utm.campaign_id, log_type: Y, rnd: Y, platform: i.platform, sdk_version: zr, sdk_lib: "js", province: Y, city: Y, timezone: Pf, tz_offset: Of, tz_name: Y, sim_region: Y, carrier: Y, resolution: i.screen_width + "x" + i.screen_height, browser: i.browser, browser_version: i.browser_version, referrer: i.referrer, referrer_host: i.referrer_host, width: i.screen_width, height: i.screen_height, screen_width: i.screen_width, screen_height: i.screen_height, utm_term: i.utm.utm_term, utm_content: i.utm.utm_content, utm_source: i.utm.utm_source, utm_medium: i.utm.utm_medium, utm_campaign: i.utm.utm_campaign, tracer_data: JSON.stringify(i.utm.tracer_data), custom: i.network_type ? { network_type: i.network_type } : {} } }, this.ab_version = "", this.ab_uuid_cache = {}, this.evtParams = {}, this.reportErrorCallback = function() {
4947
4947
  }, this.isLast = !1, this.setCustom(i), this.initDomain(), this.initABData(), this.collect.on("route-change", function(o) {
4948
4948
  n.changeReferInfo(o.config);
4949
4949
  });
@@ -4961,7 +4961,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
4961
4961
  return this.customDomain || e && this.initDomain(e), this.domain;
4962
4962
  }, r.prototype.getChannelDomain = function(e) {
4963
4963
  var t, n, i = e || this.initConfig.report_channel || this.initConfig.channel;
4964
- return Na().has(i) ? Qi[i] : ((t = this.initConfig) === null || t === void 0 ? void 0 : t.channel_type) === "tcpy" ? Df[i] : ((n = this.initConfig) === null || n === void 0 ? void 0 : n.channel_type) === "ttp" ? xf[i] : qs[i];
4964
+ return Na().has(i) ? Qi[i] : ((t = this.initConfig) === null || t === void 0 ? void 0 : t.channel_type) === "tcpy" ? xf[i] : ((n = this.initConfig) === null || n === void 0 ? void 0 : n.channel_type) === "ttp" ? If[i] : qs[i];
4965
4965
  }, r.prototype.getChannelForUrl = function() {
4966
4966
  return this.initConfig.channel_type ? { WEBID_URL: "/v1/user/webid", TOB_URL: "", REPORT_URL: "/v1/list" } : this.initConfig.report_channel ? ["sg_central", "us_east"].indexOf(this.initConfig.report_channel) !== -1 ? { WEBID_URL: "/webid", TOB_URL: "/tobid", REPORT_URL: "/list" } : { WEBID_URL: "/v1/user/webid", TOB_URL: "", REPORT_URL: "/v1/list" } : { WEBID_URL: "/webid", TOB_URL: "/tobid", REPORT_URL: "/list" };
4967
4967
  }, r.prototype.setCurrentEnv = function(e) {
@@ -5062,7 +5062,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5062
5062
  this.collect.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK Something Error", level: "error", time: Date.now(), data: n.message, infoType: "sdk" }), console.log("delete error");
5063
5063
  }
5064
5064
  }, r;
5065
- }(), Mf = function() {
5065
+ }(), Lf = function() {
5066
5066
  function r(e, t) {
5067
5067
  this.isLog = t || !1, this.name = e || "";
5068
5068
  }
@@ -5075,7 +5075,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5075
5075
  }, r.prototype.throw = function(e) {
5076
5076
  throw this.error(this.name), new Error(e);
5077
5077
  }, r;
5078
- }(), Lf = function() {
5078
+ }(), Nf = function() {
5079
5079
  function r() {
5080
5080
  this.spiderBot = ["Baiduspider", "googlebot", "360Spider", "haosouspider", "YoudaoBot", "Yisouspider", "Googlebot", "Headless", "Applebot", "Bingbot", "PetalBot"];
5081
5081
  }
@@ -5088,7 +5088,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5088
5088
  t.indexOf(i) !== -1 && (n = !0);
5089
5089
  }), n;
5090
5090
  }, r;
5091
- }(), Nf = function() {
5091
+ }(), Uf = function() {
5092
5092
  function r(t, n) {
5093
5093
  this.collect = t, this.native = n;
5094
5094
  }
@@ -5188,7 +5188,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5188
5188
  console.error("profileAppend error");
5189
5189
  }
5190
5190
  }, r;
5191
- }(), Uf = function() {
5191
+ }(), Gf = function() {
5192
5192
  function r() {
5193
5193
  this.setUrl = "/service/2/web_sdk_settings/", this.expireTime = 216e5;
5194
5194
  }
@@ -5196,7 +5196,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5196
5196
  if (t.enable_logsetting) {
5197
5197
  this.collect = e, this.config = t;
5198
5198
  var n = e.adapters.storage;
5199
- this.setKey = "applog_web_logsetting_" + t.app_id, this.uniqueKey = "web_logsetting_data", this.cacheStorgae = new n(!1), this.dbStorage = new wf(this.setKey, "LOGSETTING_DATA_STORE"), this.domain = t.logsetting_domain || this.collect.configManager.getDomain(), this.check();
5199
+ this.setKey = "applog_web_logsetting_" + t.app_id, this.uniqueKey = "web_logsetting_data", this.cacheStorgae = new n(!1), this.dbStorage = new Tf(this.setKey, "LOGSETTING_DATA_STORE"), this.domain = t.logsetting_domain || this.collect.configManager.getDomain(), this.check();
5200
5200
  } else e.emit(x.LogSettingReady);
5201
5201
  }, r.prototype.check = function() {
5202
5202
  return bi(this, void 0, void 0, function() {
@@ -5258,13 +5258,13 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5258
5258
  }, r.prototype.getPredefineParamsList = function() {
5259
5259
  return /* @__PURE__ */ new Set(["event_index"]);
5260
5260
  }, r;
5261
- }(), Gf = function() {
5261
+ }(), Bf = function() {
5262
5262
  function r() {
5263
5263
  this.eventLimit = 50, this.enable_ttwebid = !1, this.eventCache = [], this.beconEventCache = [];
5264
5264
  }
5265
5265
  return r.prototype.apply = function(e, t) {
5266
5266
  var n = this;
5267
- this.collect = e, this.config = t, this.configManager = e.configManager, this.cacheStorgae = new kt(!0), this.localStorage = new kt(!1), this.logSetting = new Uf(), this.maxReport = t.max_report || 10, this.reportTime = t.reportTime || 30, this.timeout = t.timeout || 1e5, this.enable_ttwebid = t.enable_ttwebid, this.reportUrl = t.report_url || this.configManager.getUrl("event"), this.eventKey = "__tea_cache_events_" + this.configManager.get("app_id"), this.beconKey = "__tea_cache_events_becon_" + this.configManager.get("app_id"), this.abKey = "__tea_sdk_ab_version_" + this.configManager.get("app_id"), this.refer_key = "__tea_cache_refer_" + this.configManager.get("app_id"), this.logSetting.apply(e, t), this.collect.on(x.Ready, function() {
5267
+ this.collect = e, this.config = t, this.configManager = e.configManager, this.cacheStorgae = new kt(!0), this.localStorage = new kt(!1), this.logSetting = new Gf(), this.maxReport = t.max_report || 10, this.reportTime = t.reportTime || 30, this.timeout = t.timeout || 1e5, this.enable_ttwebid = t.enable_ttwebid, this.reportUrl = t.report_url || this.configManager.getUrl("event"), this.eventKey = "__tea_cache_events_" + this.configManager.get("app_id"), this.beconKey = "__tea_cache_events_becon_" + this.configManager.get("app_id"), this.abKey = "__tea_sdk_ab_version_" + this.configManager.get("app_id"), this.refer_key = "__tea_cache_refer_" + this.configManager.get("app_id"), this.logSetting.apply(e, t), this.collect.on(x.Ready, function() {
5268
5268
  n.reportAll(!1);
5269
5269
  }), this.collect.on(x.ConfigDomain, function() {
5270
5270
  n.reportUrl = n.configManager.getUrl("event");
@@ -5479,7 +5479,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5479
5479
  return function r(e) {
5480
5480
  return e ? (e ^ 16 * Math.random() >> e / 4).toString(10) : ("10000000-1000-4000-8000" + -1e11).replace(/[018]/g, r);
5481
5481
  }().replace(/-/g, "").slice(0, 19);
5482
- }, Bf = function() {
5482
+ }, Ff = function() {
5483
5483
  function r() {
5484
5484
  this.cacheToken = {}, this.enableCookie = !1, this.enable_ttwebid = !1, this.enableCustomWebid = !1;
5485
5485
  }
@@ -5564,7 +5564,7 @@ var x = Ci, Y = void 0, Ua = (/* @__PURE__ */ new Date()).getTimezoneOffset(), z
5564
5564
  var e = 16 * Math.random() | 0;
5565
5565
  return (r === "x" ? e : 3 & e | 8).toString(16);
5566
5566
  });
5567
- }, Ff = function() {
5567
+ }, Vf = function() {
5568
5568
  function r() {
5569
5569
  }
5570
5570
  return r.prototype.apply = function(e, t) {
@@ -5605,7 +5605,7 @@ function Kt(r) {
5605
5605
  let e = r.length;
5606
5606
  for (; --e >= 0; ) r[e] = 0;
5607
5607
  }
5608
- const Ti = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]), Qr = new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]), Vf = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]), $s = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Ke = new Array(576);
5608
+ const Ti = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]), Qr = new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]), jf = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]), $s = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Ke = new Array(576);
5609
5609
  Kt(Ke);
5610
5610
  const dr = new Array(60);
5611
5611
  Kt(dr);
@@ -5706,7 +5706,7 @@ let to = !1;
5706
5706
  const ro = (r, e, t, n) => {
5707
5707
  Ce(r, 0 + (n ? 1 : 0), 3), Va(r), Or(r, t), Or(r, ~t), t && r.pending_buf.set(r.window.subarray(e, e + t), r.pending), r.pending += t;
5708
5708
  };
5709
- var jf = { _tr_init: (r) => {
5709
+ var Hf = { _tr_init: (r) => {
5710
5710
  to || ((() => {
5711
5711
  let e, t, n, i, s;
5712
5712
  const a = new Array(16);
@@ -5719,7 +5719,7 @@ var jf = { _tr_init: (r) => {
5719
5719
  for (; e <= 279; ) Ke[2 * e + 1] = 7, e++, a[7]++;
5720
5720
  for (; e <= 287; ) Ke[2 * e + 1] = 8, e++, a[8]++;
5721
5721
  for (Fa(Ke, 287, a), e = 0; e < 30; e++) dr[2 * e + 1] = 5, dr[2 * e] = Ba(e, 5);
5722
- Ks = new Fn(Ke, Ti, 257, 286, 15), Ws = new Fn(dr, Qr, 0, 30, 15), Js = new Fn(new Array(0), Vf, 0, 19, 7);
5722
+ Ks = new Fn(Ke, Ti, 257, 286, 15), Ws = new Fn(dr, Qr, 0, 30, 15), Js = new Fn(new Array(0), jf, 0, 19, 7);
5723
5723
  })(), to = !0), r.l_desc = new Vn(r.dyn_ltree, Ks), r.d_desc = new Vn(r.dyn_dtree, Ws), r.bl_desc = new Vn(r.bl_tree, Js), r.bi_buf = 0, r.bi_valid = 0, Xs(r);
5724
5724
  }, _tr_stored_block: ro, _tr_flush_block: (r, e, t, n) => {
5725
5725
  let i, s, a = 0;
@@ -5753,7 +5753,7 @@ var jf = { _tr_init: (r) => {
5753
5753
  }
5754
5754
  return i | s << 16 | 0;
5755
5755
  };
5756
- const Hf = new Uint32Array((() => {
5756
+ const qf = new Uint32Array((() => {
5757
5757
  let r, e = [];
5758
5758
  for (var t = 0; t < 256; t++) {
5759
5759
  r = t;
@@ -5763,15 +5763,15 @@ const Hf = new Uint32Array((() => {
5763
5763
  return e;
5764
5764
  })());
5765
5765
  var he = (r, e, t, n) => {
5766
- const i = Hf, s = n + t;
5766
+ const i = qf, s = n + t;
5767
5767
  r ^= -1;
5768
5768
  for (let a = n; a < s; a++) r = r >>> 8 ^ i[255 & (r ^ e[a])];
5769
5769
  return -1 ^ r;
5770
5770
  }, Rt = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" }, xt = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
5771
- const { _tr_init: qf, _tr_stored_block: ki, _tr_flush_block: $f, _tr_tally: ct, _tr_align: Kf } = jf, { Z_NO_FLUSH: ut, Z_PARTIAL_FLUSH: Wf, Z_FULL_FLUSH: Jf, Z_FINISH: Me, Z_BLOCK: no, Z_OK: me, Z_STREAM_END: io, Z_STREAM_ERROR: Fe, Z_DATA_ERROR: Xf, Z_BUF_ERROR: qn, Z_DEFAULT_COMPRESSION: Zf, Z_FILTERED: Yf, Z_HUFFMAN_ONLY: Wr, Z_RLE: Qf, Z_FIXED: em, Z_DEFAULT_STRATEGY: tm, Z_UNKNOWN: rm, Z_DEFLATED: ln } = xt, St = (r, e) => (r.msg = Rt[e], e), so = (r) => 2 * r - (r > 4 ? 9 : 0), it = (r) => {
5771
+ const { _tr_init: $f, _tr_stored_block: ki, _tr_flush_block: Kf, _tr_tally: ct, _tr_align: Wf } = Hf, { Z_NO_FLUSH: ut, Z_PARTIAL_FLUSH: Jf, Z_FULL_FLUSH: Xf, Z_FINISH: Me, Z_BLOCK: no, Z_OK: me, Z_STREAM_END: io, Z_STREAM_ERROR: Fe, Z_DATA_ERROR: Zf, Z_BUF_ERROR: qn, Z_DEFAULT_COMPRESSION: Yf, Z_FILTERED: Qf, Z_HUFFMAN_ONLY: Wr, Z_RLE: em, Z_FIXED: tm, Z_DEFAULT_STRATEGY: rm, Z_UNKNOWN: nm, Z_DEFLATED: ln } = xt, St = (r, e) => (r.msg = Rt[e], e), so = (r) => 2 * r - (r > 4 ? 9 : 0), it = (r) => {
5772
5772
  let e = r.length;
5773
5773
  for (; --e >= 0; ) r[e] = 0;
5774
- }, nm = (r) => {
5774
+ }, im = (r) => {
5775
5775
  let e, t, n, i = r.w_size;
5776
5776
  e = r.hash_size, n = e;
5777
5777
  do
@@ -5788,7 +5788,7 @@ const ke = (r) => {
5788
5788
  let t = e.pending;
5789
5789
  t > r.avail_out && (t = r.avail_out), t !== 0 && (r.output.set(e.pending_buf.subarray(e.pending_out, e.pending_out + t), r.next_out), r.next_out += t, e.pending_out += t, r.total_out += t, r.avail_out -= t, e.pending -= t, e.pending === 0 && (e.pending_out = 0));
5790
5790
  }, Ae = (r, e) => {
5791
- $f(r, r.block_start >= 0 ? r.block_start : -1, r.strstart - r.block_start, e), r.block_start = r.strstart, ke(r.strm);
5791
+ Kf(r, r.block_start >= 0 ? r.block_start : -1, r.strstart - r.block_start, e), r.block_start = r.strstart, ke(r.strm);
5792
5792
  }, Q = (r, e) => {
5793
5793
  r.pending_buf[r.pending++] = e;
5794
5794
  }, ir = (r, e) => {
@@ -5818,7 +5818,7 @@ const ke = (r) => {
5818
5818
  const e = r.w_size;
5819
5819
  let t, n, i;
5820
5820
  do {
5821
- if (n = r.window_size - r.lookahead - r.strstart, r.strstart >= e + (e - 262) && (r.window.set(r.window.subarray(e, e + e - n), 0), r.match_start -= e, r.strstart -= e, r.block_start -= e, r.insert > r.strstart && (r.insert = r.strstart), nm(r), n += e), r.strm.avail_in === 0) break;
5821
+ if (n = r.window_size - r.lookahead - r.strstart, r.strstart >= e + (e - 262) && (r.window.set(r.window.subarray(e, e + e - n), 0), r.match_start -= e, r.strstart -= e, r.block_start -= e, r.insert > r.strstart && (r.insert = r.strstart), im(r), n += e), r.strm.avail_in === 0) break;
5822
5822
  if (t = Ri(r.strm, r.window, r.strstart + r.lookahead, n), r.lookahead += t, r.lookahead + r.insert >= 3) for (i = r.strstart - r.insert, r.ins_h = r.window[i], r.ins_h = dt(r, r.ins_h, r.window[i + 1]); r.insert && (r.ins_h = dt(r, r.ins_h, r.window[i + 3 - 1]), r.prev[i & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = i, i++, r.insert--, !(r.lookahead + r.insert < 3)); ) ;
5823
5823
  } while (r.lookahead < 262 && r.strm.avail_in !== 0);
5824
5824
  }, Ha = (r, e) => {
@@ -5853,7 +5853,7 @@ const ke = (r) => {
5853
5853
  if (Gt(r), r.lookahead < 262 && e === ut) return 1;
5854
5854
  if (r.lookahead === 0) break;
5855
5855
  }
5856
- if (t = 0, r.lookahead >= 3 && (r.ins_h = dt(r, r.ins_h, r.window[r.strstart + 3 - 1]), t = r.prev[r.strstart & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = r.strstart), r.prev_length = r.match_length, r.prev_match = r.match_start, r.match_length = 2, t !== 0 && r.prev_length < r.max_lazy_match && r.strstart - t <= r.w_size - 262 && (r.match_length = ja(r, t), r.match_length <= 5 && (r.strategy === Yf || r.match_length === 3 && r.strstart - r.match_start > 4096) && (r.match_length = 2)), r.prev_length >= 3 && r.match_length <= r.prev_length) {
5856
+ if (t = 0, r.lookahead >= 3 && (r.ins_h = dt(r, r.ins_h, r.window[r.strstart + 3 - 1]), t = r.prev[r.strstart & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = r.strstart), r.prev_length = r.match_length, r.prev_match = r.match_start, r.match_length = 2, t !== 0 && r.prev_length < r.max_lazy_match && r.strstart - t <= r.w_size - 262 && (r.match_length = ja(r, t), r.match_length <= 5 && (r.strategy === Qf || r.match_length === 3 && r.strstart - r.match_start > 4096) && (r.match_length = 2)), r.prev_length >= 3 && r.match_length <= r.prev_length) {
5857
5857
  i = r.strstart + r.lookahead - 3, n = ct(r, r.strstart - 1 - r.prev_match, r.prev_length - 3), r.lookahead -= r.prev_length - 1, r.prev_length -= 2;
5858
5858
  do
5859
5859
  ++r.strstart <= i && (r.ins_h = dt(r, r.ins_h, r.window[r.strstart + 3 - 1]), t = r.prev[r.strstart & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = r.strstart);
@@ -5869,7 +5869,7 @@ function Ge(r, e, t, n, i) {
5869
5869
  this.good_length = r, this.max_lazy = e, this.nice_length = t, this.max_chain = n, this.func = i;
5870
5870
  }
5871
5871
  const lr = [new Ge(0, 0, 0, 0, Ha), new Ge(4, 4, 8, 4, $n), new Ge(4, 5, 16, 8, $n), new Ge(4, 6, 32, 32, $n), new Ge(4, 4, 16, 16, zt), new Ge(8, 16, 32, 32, zt), new Ge(8, 16, 128, 128, zt), new Ge(8, 32, 128, 256, zt), new Ge(32, 128, 258, 1024, zt), new Ge(32, 258, 258, 4096, zt)];
5872
- function im() {
5872
+ function sm() {
5873
5873
  this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = ln, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(1146), this.dyn_dtree = new Uint16Array(122), this.bl_tree = new Uint16Array(78), it(this.dyn_ltree), it(this.dyn_dtree), it(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(16), this.heap = new Uint16Array(573), it(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(573), it(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
5874
5874
  }
5875
5875
  const hr = (r) => {
@@ -5878,9 +5878,9 @@ const hr = (r) => {
5878
5878
  return !e || e.strm !== r || e.status !== 42 && e.status !== 57 && e.status !== 69 && e.status !== 73 && e.status !== 91 && e.status !== 103 && e.status !== 113 && e.status !== 666 ? 1 : 0;
5879
5879
  }, qa = (r) => {
5880
5880
  if (hr(r)) return St(r, Fe);
5881
- r.total_in = r.total_out = 0, r.data_type = rm;
5881
+ r.total_in = r.total_out = 0, r.data_type = nm;
5882
5882
  const e = r.state;
5883
- return e.pending = 0, e.pending_out = 0, e.wrap < 0 && (e.wrap = -e.wrap), e.status = e.wrap === 2 ? 57 : e.wrap ? 42 : 113, r.adler = e.wrap === 2 ? 0 : 1, e.last_flush = -2, qf(e), me;
5883
+ return e.pending = 0, e.pending_out = 0, e.wrap < 0 && (e.wrap = -e.wrap), e.status = e.wrap === 2 ? 57 : e.wrap ? 42 : 113, r.adler = e.wrap === 2 ? 0 : 1, e.last_flush = -2, $f(e), me;
5884
5884
  }, $a = (r) => {
5885
5885
  const e = qa(r);
5886
5886
  var t;
@@ -5888,12 +5888,12 @@ const hr = (r) => {
5888
5888
  }, oo = (r, e, t, n, i, s) => {
5889
5889
  if (!r) return Fe;
5890
5890
  let a = 1;
5891
- if (e === Zf && (e = 6), n < 0 ? (a = 0, n = -n) : n > 15 && (a = 2, n -= 16), i < 1 || i > 9 || t !== ln || n < 8 || n > 15 || e < 0 || e > 9 || s < 0 || s > em || n === 8 && a !== 1) return St(r, Fe);
5891
+ if (e === Yf && (e = 6), n < 0 ? (a = 0, n = -n) : n > 15 && (a = 2, n -= 16), i < 1 || i > 9 || t !== ln || n < 8 || n > 15 || e < 0 || e > 9 || s < 0 || s > tm || n === 8 && a !== 1) return St(r, Fe);
5892
5892
  n === 8 && (n = 9);
5893
- const o = new im();
5893
+ const o = new sm();
5894
5894
  return r.state = o, o.strm = r, o.status = 42, o.wrap = a, o.gzhead = null, o.w_bits = n, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = i + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~((o.hash_bits + 3 - 1) / 3), o.window = new Uint8Array(2 * o.w_size), o.head = new Uint16Array(o.hash_size), o.prev = new Uint16Array(o.w_size), o.lit_bufsize = 1 << i + 6, o.pending_buf_size = 4 * o.lit_bufsize, o.pending_buf = new Uint8Array(o.pending_buf_size), o.sym_buf = o.lit_bufsize, o.sym_end = 3 * (o.lit_bufsize - 1), o.level = e, o.strategy = s, o.method = t, $a(r);
5895
5895
  };
5896
- var gr = { deflateInit: (r, e) => oo(r, e, ln, 15, 8, tm), deflateInit2: oo, deflateReset: $a, deflateResetKeep: qa, deflateSetHeader: (r, e) => hr(r) || r.state.wrap !== 2 ? Fe : (r.state.gzhead = e, me), deflate: (r, e) => {
5896
+ var gr = { deflateInit: (r, e) => oo(r, e, ln, 15, 8, rm), deflateInit2: oo, deflateReset: $a, deflateResetKeep: qa, deflateSetHeader: (r, e) => hr(r) || r.state.wrap !== 2 ? Fe : (r.state.gzhead = e, me), deflate: (r, e) => {
5897
5897
  if (hr(r) || e > no || e < 0) return r ? St(r, Fe) : Fe;
5898
5898
  const t = r.state;
5899
5899
  if (!r.output || r.avail_in !== 0 && !r.input || t.status === 666 && e !== Me) return St(r, r.avail_out === 0 ? qn : Fe);
@@ -5969,7 +5969,7 @@ var gr = { deflateInit: (r, e) => oo(r, e, ln, 15, 8, tm), deflateInit2: oo, def
5969
5969
  if (s.match_length = 0, o = ct(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, o && (Ae(s, !1), s.strm.avail_out === 0)) return 1;
5970
5970
  }
5971
5971
  return s.insert = 0, a === Me ? (Ae(s, !0), s.strm.avail_out === 0 ? 3 : 4) : s.sym_next && (Ae(s, !1), s.strm.avail_out === 0) ? 1 : 2;
5972
- })(t, e) : t.strategy === Qf ? ((s, a) => {
5972
+ })(t, e) : t.strategy === em ? ((s, a) => {
5973
5973
  let o, d, c, u;
5974
5974
  const h = s.window;
5975
5975
  for (; ; ) {
@@ -5989,13 +5989,13 @@ var gr = { deflateInit: (r, e) => oo(r, e, ln, 15, 8, tm), deflateInit2: oo, def
5989
5989
  return s.insert = 0, a === Me ? (Ae(s, !0), s.strm.avail_out === 0 ? 3 : 4) : s.sym_next && (Ae(s, !1), s.strm.avail_out === 0) ? 1 : 2;
5990
5990
  })(t, e) : lr[t.level].func(t, e);
5991
5991
  if (i !== 3 && i !== 4 || (t.status = 666), i === 1 || i === 3) return r.avail_out === 0 && (t.last_flush = -1), me;
5992
- if (i === 2 && (e === Wf ? Kf(t) : e !== no && (ki(t, 0, 0, !1), e === Jf && (it(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), ke(r), r.avail_out === 0)) return t.last_flush = -1, me;
5992
+ if (i === 2 && (e === Jf ? Wf(t) : e !== no && (ki(t, 0, 0, !1), e === Xf && (it(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), ke(r), r.avail_out === 0)) return t.last_flush = -1, me;
5993
5993
  }
5994
5994
  return e !== Me ? me : t.wrap <= 0 ? io : (t.wrap === 2 ? (Q(t, 255 & r.adler), Q(t, r.adler >> 8 & 255), Q(t, r.adler >> 16 & 255), Q(t, r.adler >> 24 & 255), Q(t, 255 & r.total_in), Q(t, r.total_in >> 8 & 255), Q(t, r.total_in >> 16 & 255), Q(t, r.total_in >> 24 & 255)) : (ir(t, r.adler >>> 16), ir(t, 65535 & r.adler)), ke(r), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? me : io);
5995
5995
  }, deflateEnd: (r) => {
5996
5996
  if (hr(r)) return Fe;
5997
5997
  const e = r.state.status;
5998
- return r.state = null, e === 113 ? St(r, Xf) : me;
5998
+ return r.state = null, e === 113 ? St(r, Zf) : me;
5999
5999
  }, deflateSetDictionary: (r, e) => {
6000
6000
  let t = e.length;
6001
6001
  if (hr(r)) return Fe;
@@ -6016,14 +6016,14 @@ var gr = { deflateInit: (r, e) => oo(r, e, ln, 15, 8, tm), deflateInit2: oo, def
6016
6016
  }
6017
6017
  return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length = 2, n.match_available = 0, r.next_in = a, r.input = o, r.avail_in = s, n.wrap = i, me;
6018
6018
  }, deflateInfo: "pako deflate (from Nodeca project)" };
6019
- const sm = (r, e) => Object.prototype.hasOwnProperty.call(r, e);
6019
+ const om = (r, e) => Object.prototype.hasOwnProperty.call(r, e);
6020
6020
  var Ka = function(r) {
6021
6021
  const e = Array.prototype.slice.call(arguments, 1);
6022
6022
  for (; e.length; ) {
6023
6023
  const t = e.shift();
6024
6024
  if (t) {
6025
6025
  if (typeof t != "object") throw new TypeError(t + "must be non-object");
6026
- for (const n in t) sm(t, n) && (r[n] = t[n]);
6026
+ for (const n in t) om(t, n) && (r[n] = t[n]);
6027
6027
  }
6028
6028
  }
6029
6029
  return r;
@@ -6052,7 +6052,7 @@ var ts = (r) => {
6052
6052
  for (i = 0; i < a; i++) t = r.charCodeAt(i), (64512 & t) == 55296 && i + 1 < a && (n = r.charCodeAt(i + 1), (64512 & n) == 56320 && (t = 65536 + (t - 55296 << 10) + (n - 56320), i++)), o += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4;
6053
6053
  for (e = new Uint8Array(o), s = 0, i = 0; s < o; i++) t = r.charCodeAt(i), (64512 & t) == 55296 && i + 1 < a && (n = r.charCodeAt(i + 1), (64512 & n) == 56320 && (t = 65536 + (t - 55296 << 10) + (n - 56320), i++)), t < 128 ? e[s++] = t : t < 2048 ? (e[s++] = 192 | t >>> 6, e[s++] = 128 | 63 & t) : t < 65536 ? (e[s++] = 224 | t >>> 12, e[s++] = 128 | t >>> 6 & 63, e[s++] = 128 | 63 & t) : (e[s++] = 240 | t >>> 18, e[s++] = 128 | t >>> 12 & 63, e[s++] = 128 | t >>> 6 & 63, e[s++] = 128 | 63 & t);
6054
6054
  return e;
6055
- }, om = (r, e) => {
6055
+ }, am = (r, e) => {
6056
6056
  const t = e || r.length;
6057
6057
  if (typeof TextDecoder == "function" && TextDecoder.prototype.decode) return new TextDecoder().decode(r.subarray(0, e));
6058
6058
  let n, i;
@@ -6076,7 +6076,7 @@ var ts = (r) => {
6076
6076
  for (let c = 0; c < o; c++) d += String.fromCharCode(a[c]);
6077
6077
  return d;
6078
6078
  })(s, i);
6079
- }, am = (r, e) => {
6079
+ }, cm = (r, e) => {
6080
6080
  (e = e || r.length) > r.length && (e = r.length);
6081
6081
  let t = e - 1;
6082
6082
  for (; t >= 0 && (192 & r[t]) == 128; ) t--;
@@ -6084,9 +6084,9 @@ var ts = (r) => {
6084
6084
  }, Xa = function() {
6085
6085
  this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
6086
6086
  };
6087
- const Za = Object.prototype.toString, { Z_NO_FLUSH: cm, Z_SYNC_FLUSH: um, Z_FULL_FLUSH: dm, Z_FINISH: lm, Z_OK: hn, Z_STREAM_END: hm, Z_DEFAULT_COMPRESSION: pm, Z_DEFAULT_STRATEGY: fm, Z_DEFLATED: mm } = xt;
6087
+ const Za = Object.prototype.toString, { Z_NO_FLUSH: um, Z_SYNC_FLUSH: dm, Z_FULL_FLUSH: lm, Z_FINISH: hm, Z_OK: hn, Z_STREAM_END: pm, Z_DEFAULT_COMPRESSION: fm, Z_DEFAULT_STRATEGY: mm, Z_DEFLATED: _m } = xt;
6088
6088
  function vr(r) {
6089
- this.options = Ka({ level: pm, method: mm, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: fm }, r || {});
6089
+ this.options = Ka({ level: fm, method: _m, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: mm }, r || {});
6090
6090
  let e = this.options;
6091
6091
  e.raw && e.windowBits > 0 ? e.windowBits = -e.windowBits : e.gzip && e.windowBits > 0 && e.windowBits < 16 && (e.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new Xa(), this.strm.avail_out = 0;
6092
6092
  let t = gr.deflateInit2(this.strm, e.level, e.method, e.windowBits, e.memLevel, e.strategy);
@@ -6106,9 +6106,9 @@ vr.prototype.push = function(r, e) {
6106
6106
  const t = this.strm, n = this.options.chunkSize;
6107
6107
  let i, s;
6108
6108
  if (this.ended) return !1;
6109
- for (s = e === ~~e ? e : e === !0 ? lm : cm, typeof r == "string" ? t.input = ts(r) : Za.call(r) === "[object ArrayBuffer]" ? t.input = new Uint8Array(r) : t.input = r, t.next_in = 0, t.avail_in = t.input.length; ; ) if (t.avail_out === 0 && (t.output = new Uint8Array(n), t.next_out = 0, t.avail_out = n), (s === um || s === dm) && t.avail_out <= 6) this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
6109
+ for (s = e === ~~e ? e : e === !0 ? hm : um, typeof r == "string" ? t.input = ts(r) : Za.call(r) === "[object ArrayBuffer]" ? t.input = new Uint8Array(r) : t.input = r, t.next_in = 0, t.avail_in = t.input.length; ; ) if (t.avail_out === 0 && (t.output = new Uint8Array(n), t.next_out = 0, t.avail_out = n), (s === dm || s === lm) && t.avail_out <= 6) this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
6110
6110
  else {
6111
- if (i = gr.deflate(t, s), i === hm) return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), i = gr.deflateEnd(this.strm), this.onEnd(i), this.ended = !0, i === hn;
6111
+ if (i = gr.deflate(t, s), i === pm) return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), i = gr.deflateEnd(this.strm), this.onEnd(i), this.ended = !0, i === hn;
6112
6112
  if (t.avail_out !== 0) {
6113
6113
  if (s > 0 && t.next_out > 0) this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
6114
6114
  else if (t.avail_in === 0) break;
@@ -6120,11 +6120,11 @@ vr.prototype.push = function(r, e) {
6120
6120
  }, vr.prototype.onEnd = function(r) {
6121
6121
  r === hn && (this.result = Wa(this.chunks)), this.chunks = [], this.err = r, this.msg = this.strm.msg;
6122
6122
  };
6123
- var _m = { Deflate: vr, deflate: Kn, deflateRaw: function(r, e) {
6123
+ var gm = { Deflate: vr, deflate: Kn, deflateRaw: function(r, e) {
6124
6124
  return (e = e || {}).raw = !0, Kn(r, e);
6125
6125
  }, gzip: function(r, e) {
6126
6126
  return (e = e || {}).gzip = !0, Kn(r, e);
6127
- }, constants: xt }, gm = function(r, e) {
6127
+ }, constants: xt }, vm = function(r, e) {
6128
6128
  let t, n, i, s, a, o, d, c, u, h, l, f, y, C, v, E, k, g, D, L, R, M, N, U;
6129
6129
  const B = r.state;
6130
6130
  t = r.next_in, N = r.input, n = t + (r.avail_in - 5), i = r.next_out, U = r.output, s = i - (e - r.avail_out), a = i + (r.avail_out - 257), o = B.dmax, d = B.wsize, c = B.whave, u = B.wnext, h = B.window, l = B.hold, f = B.bits, y = B.lencode, C = B.distcode, v = (1 << B.lenbits) - 1, E = (1 << B.distbits) - 1;
@@ -6210,7 +6210,7 @@ var _m = { Deflate: vr, deflate: Kn, deflateRaw: function(r, e) {
6210
6210
  } while (t < n && i < a);
6211
6211
  D = f >> 3, t -= D, f -= D << 3, l &= (1 << f) - 1, r.next_in = t, r.next_out = i, r.avail_in = t < n ? n - t + 5 : 5 - (t - n), r.avail_out = i < a ? a - i + 257 : 257 - (i - a), B.hold = l, B.bits = f;
6212
6212
  };
6213
- const vm = new Uint16Array([3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]), ym = new Uint8Array([16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]), Sm = new Uint16Array([1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0]), bm = new Uint8Array([16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]);
6213
+ const ym = new Uint16Array([3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]), Sm = new Uint8Array([16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]), bm = new Uint16Array([1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0]), Em = new Uint8Array([16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]);
6214
6214
  var yr = (r, e, t, n, i, s, a, o) => {
6215
6215
  const d = o.bits;
6216
6216
  let c, u, h, l, f, y, C = 0, v = 0, E = 0, k = 0, g = 0, D = 0, L = 0, R = 0, M = 0, N = 0, U = null;
@@ -6225,7 +6225,7 @@ var yr = (r, e, t, n, i, s, a, o) => {
6225
6225
  if (R > 0 && (r === 0 || k !== 1)) return -1;
6226
6226
  for (H[1] = 0, C = 1; C < 15; C++) H[C + 1] = H[C] + B[C];
6227
6227
  for (v = 0; v < n; v++) e[t + v] !== 0 && (a[H[e[t + v]]++] = v);
6228
- if (r === 0 ? (U = ce = a, y = 20) : r === 1 ? (U = vm, ce = ym, y = 257) : (U = Sm, ce = bm, y = 0), N = 0, v = 0, C = E, f = s, D = g, L = 0, h = -1, M = 1 << g, l = M - 1, r === 1 && M > 852 || r === 2 && M > 592) return 1;
6228
+ if (r === 0 ? (U = ce = a, y = 20) : r === 1 ? (U = ym, ce = Sm, y = 257) : (U = bm, ce = Em, y = 0), N = 0, v = 0, C = E, f = s, D = g, L = 0, h = -1, M = 1 << g, l = M - 1, r === 1 && M > 852 || r === 2 && M > 592) return 1;
6229
6229
  for (; ; ) {
6230
6230
  Z = C - L, a[v] + 1 < y ? (W = 0, ue = a[v]) : a[v] >= y ? (W = ce[a[v] - y], ue = U[a[v] - y]) : (W = 96, ue = 0), c = 1 << C - L, u = 1 << D, E = u;
6231
6231
  do
@@ -6244,8 +6244,8 @@ var yr = (r, e, t, n, i, s, a, o) => {
6244
6244
  }
6245
6245
  return N !== 0 && (i[f + N] = C - L << 24 | 64 << 16 | 0), o.bits = g, 0;
6246
6246
  };
6247
- const { Z_FINISH: ao, Z_BLOCK: Em, Z_TREES: Jr, Z_OK: bt, Z_STREAM_END: Cm, Z_NEED_DICT: wm, Z_STREAM_ERROR: Oe, Z_DATA_ERROR: co, Z_MEM_ERROR: uo, Z_BUF_ERROR: Tm, Z_DEFLATED: lo } = xt, ho = (r) => (r >>> 24 & 255) + (r >>> 8 & 65280) + ((65280 & r) << 8) + ((255 & r) << 24);
6248
- function km() {
6247
+ const { Z_FINISH: ao, Z_BLOCK: Cm, Z_TREES: Jr, Z_OK: bt, Z_STREAM_END: wm, Z_NEED_DICT: Tm, Z_STREAM_ERROR: Oe, Z_DATA_ERROR: co, Z_MEM_ERROR: uo, Z_BUF_ERROR: km, Z_DEFLATED: lo } = xt, ho = (r) => (r >>> 24 & 255) + (r >>> 8 & 65280) + ((65280 & r) << 8) + ((255 & r) << 24);
6248
+ function Rm() {
6249
6249
  this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
6250
6250
  }
6251
6251
  const wt = (r) => {
@@ -6267,13 +6267,13 @@ const wt = (r) => {
6267
6267
  return e < 0 ? (t = 0, e = -e) : (t = 5 + (e >> 4), e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? Oe : (n.window !== null && n.wbits !== e && (n.window = null), n.wrap = t, n.wbits = e, Qa(r));
6268
6268
  }, po = (r, e) => {
6269
6269
  if (!r) return Oe;
6270
- const t = new km();
6270
+ const t = new Rm();
6271
6271
  r.state = t, t.strm = r, t.window = null, t.mode = 16180;
6272
6272
  const n = ec(r, e);
6273
6273
  return n !== bt && (r.state = null), n;
6274
6274
  };
6275
6275
  let Wn, Jn, fo = !0;
6276
- const Rm = (r) => {
6276
+ const Am = (r) => {
6277
6277
  if (fo) {
6278
6278
  Wn = new Int32Array(512), Jn = new Int32Array(32);
6279
6279
  let e = 0;
@@ -6404,10 +6404,10 @@ var Xe = { inflateReset: Qa, inflateReset2: ec, inflateResetKeep: Ya, inflateIni
6404
6404
  }
6405
6405
  r.adler = t.check = ho(c), c = 0, u = 0, t.mode = 16190;
6406
6406
  case 16190:
6407
- if (t.havedict === 0) return r.next_out = a, r.avail_out = d, r.next_in = s, r.avail_in = o, t.hold = c, t.bits = u, wm;
6407
+ if (t.havedict === 0) return r.next_out = a, r.avail_out = d, r.next_in = s, r.avail_in = o, t.hold = c, t.bits = u, Tm;
6408
6408
  r.adler = t.check = 1, t.mode = 16191;
6409
6409
  case 16191:
6410
- if (e === Em || e === Jr) break e;
6410
+ if (e === Cm || e === Jr) break e;
6411
6411
  case 16192:
6412
6412
  if (t.last) {
6413
6413
  c >>>= 7 & u, u -= 7 & u, t.mode = 16206;
@@ -6422,7 +6422,7 @@ var Xe = { inflateReset: Qa, inflateReset2: ec, inflateResetKeep: Ya, inflateIni
6422
6422
  t.mode = 16193;
6423
6423
  break;
6424
6424
  case 1:
6425
- if (Rm(t), t.mode = 16199, e === Jr) {
6425
+ if (Am(t), t.mode = 16199, e === Jr) {
6426
6426
  c >>>= 2, u -= 2;
6427
6427
  break e;
6428
6428
  }
@@ -6535,7 +6535,7 @@ var Xe = { inflateReset: Qa, inflateReset2: ec, inflateResetKeep: Ya, inflateIni
6535
6535
  t.mode = 16200;
6536
6536
  case 16200:
6537
6537
  if (o >= 6 && d >= 258) {
6538
- r.next_out = a, r.avail_out = d, r.next_in = s, r.avail_in = o, t.hold = c, t.bits = u, gm(r, l), a = r.next_out, i = r.output, d = r.avail_out, s = r.next_in, n = r.input, o = r.avail_in, c = t.hold, u = t.bits, t.mode === 16191 && (t.back = -1);
6538
+ r.next_out = a, r.avail_out = d, r.next_in = s, r.avail_in = o, t.hold = c, t.bits = u, vm(r, l), a = r.next_out, i = r.output, d = r.avail_out, s = r.next_in, n = r.input, o = r.avail_in, c = t.hold, u = t.bits, t.mode === 16191 && (t.back = -1);
6539
6539
  break;
6540
6540
  }
6541
6541
  for (t.back = 0; N = t.lencode[c & (1 << t.lenbits) - 1], v = N >>> 24, E = N >>> 16 & 255, k = 65535 & N, !(v <= u); ) {
@@ -6647,7 +6647,7 @@ var Xe = { inflateReset: Qa, inflateReset2: ec, inflateResetKeep: Ya, inflateIni
6647
6647
  }
6648
6648
  t.mode = 16208;
6649
6649
  case 16208:
6650
- M = Cm;
6650
+ M = wm;
6651
6651
  break e;
6652
6652
  case 16209:
6653
6653
  M = co;
@@ -6658,7 +6658,7 @@ var Xe = { inflateReset: Qa, inflateReset2: ec, inflateResetKeep: Ya, inflateIni
6658
6658
  default:
6659
6659
  return Oe;
6660
6660
  }
6661
- return r.next_out = a, r.avail_out = d, r.next_in = s, r.avail_in = o, t.hold = c, t.bits = u, (t.wsize || l !== r.avail_out && t.mode < 16209 && (t.mode < 16206 || e !== ao)) && mo(r, r.output, r.next_out, l - r.avail_out), h -= r.avail_in, l -= r.avail_out, r.total_in += h, r.total_out += l, t.total += l, 4 & t.wrap && l && (r.adler = t.check = t.flags ? he(t.check, i, l, r.next_out - l) : _r(t.check, i, l, r.next_out - l)), r.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === 16191 ? 128 : 0) + (t.mode === 16199 || t.mode === 16194 ? 256 : 0), (h === 0 && l === 0 || e === ao) && M === bt && (M = Tm), M;
6661
+ return r.next_out = a, r.avail_out = d, r.next_in = s, r.avail_in = o, t.hold = c, t.bits = u, (t.wsize || l !== r.avail_out && t.mode < 16209 && (t.mode < 16206 || e !== ao)) && mo(r, r.output, r.next_out, l - r.avail_out), h -= r.avail_in, l -= r.avail_out, r.total_in += h, r.total_out += l, t.total += l, 4 & t.wrap && l && (r.adler = t.check = t.flags ? he(t.check, i, l, r.next_out - l) : _r(t.check, i, l, r.next_out - l)), r.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === 16191 ? 128 : 0) + (t.mode === 16199 || t.mode === 16194 ? 256 : 0), (h === 0 && l === 0 || e === ao) && M === bt && (M = km), M;
6662
6662
  }, inflateEnd: (r) => {
6663
6663
  if (wt(r)) return Oe;
6664
6664
  let e = r.state;
@@ -6671,17 +6671,17 @@ var Xe = { inflateReset: Qa, inflateReset2: ec, inflateResetKeep: Ya, inflateIni
6671
6671
  const t = e.length;
6672
6672
  let n, i, s;
6673
6673
  return wt(r) ? Oe : (n = r.state, n.wrap !== 0 && n.mode !== 16190 ? Oe : n.mode === 16190 && (i = 1, i = _r(i, e, t, 0), i !== n.check) ? co : (s = mo(r, e, t, t), s ? (n.mode = 16210, uo) : (n.havedict = 1, bt)));
6674
- }, inflateInfo: "pako inflate (from Nodeca project)" }, Am = function() {
6674
+ }, inflateInfo: "pako inflate (from Nodeca project)" }, Dm = function() {
6675
6675
  this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
6676
6676
  };
6677
- const tc = Object.prototype.toString, { Z_NO_FLUSH: Dm, Z_FINISH: xm, Z_OK: Sr, Z_STREAM_END: Xn, Z_NEED_DICT: Zn, Z_STREAM_ERROR: Im, Z_DATA_ERROR: _o, Z_MEM_ERROR: zm } = xt;
6677
+ const tc = Object.prototype.toString, { Z_NO_FLUSH: xm, Z_FINISH: Im, Z_OK: Sr, Z_STREAM_END: Xn, Z_NEED_DICT: Zn, Z_STREAM_ERROR: zm, Z_DATA_ERROR: _o, Z_MEM_ERROR: Pm } = xt;
6678
6678
  function br(r) {
6679
6679
  this.options = Ka({ chunkSize: 65536, windowBits: 15, to: "" }, r || {});
6680
6680
  const e = this.options;
6681
6681
  e.raw && e.windowBits >= 0 && e.windowBits < 16 && (e.windowBits = -e.windowBits, e.windowBits === 0 && (e.windowBits = -15)), !(e.windowBits >= 0 && e.windowBits < 16) || r && r.windowBits || (e.windowBits += 32), e.windowBits > 15 && e.windowBits < 48 && !(15 & e.windowBits) && (e.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new Xa(), this.strm.avail_out = 0;
6682
6682
  let t = Xe.inflateInit2(this.strm, e.windowBits);
6683
6683
  if (t !== Sr) throw new Error(Rt[t]);
6684
- if (this.header = new Am(), Xe.inflateGetHeader(this.strm, this.header), e.dictionary && (typeof e.dictionary == "string" ? e.dictionary = ts(e.dictionary) : tc.call(e.dictionary) === "[object ArrayBuffer]" && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (t = Xe.inflateSetDictionary(this.strm, e.dictionary), t !== Sr))) throw new Error(Rt[t]);
6684
+ if (this.header = new Dm(), Xe.inflateGetHeader(this.strm, this.header), e.dictionary && (typeof e.dictionary == "string" ? e.dictionary = ts(e.dictionary) : tc.call(e.dictionary) === "[object ArrayBuffer]" && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (t = Xe.inflateSetDictionary(this.strm, e.dictionary), t !== Sr))) throw new Error(Rt[t]);
6685
6685
  }
6686
6686
  function Yn(r, e) {
6687
6687
  const t = new br(e);
@@ -6692,17 +6692,17 @@ br.prototype.push = function(r, e) {
6692
6692
  const t = this.strm, n = this.options.chunkSize, i = this.options.dictionary;
6693
6693
  let s, a, o;
6694
6694
  if (this.ended) return !1;
6695
- for (a = e === ~~e ? e : e === !0 ? xm : Dm, tc.call(r) === "[object ArrayBuffer]" ? t.input = new Uint8Array(r) : t.input = r, t.next_in = 0, t.avail_in = t.input.length; ; ) {
6695
+ for (a = e === ~~e ? e : e === !0 ? Im : xm, tc.call(r) === "[object ArrayBuffer]" ? t.input = new Uint8Array(r) : t.input = r, t.next_in = 0, t.avail_in = t.input.length; ; ) {
6696
6696
  for (t.avail_out === 0 && (t.output = new Uint8Array(n), t.next_out = 0, t.avail_out = n), s = Xe.inflate(t, a), s === Zn && i && (s = Xe.inflateSetDictionary(t, i), s === Sr ? s = Xe.inflate(t, a) : s === _o && (s = Zn)); t.avail_in > 0 && s === Xn && t.state.wrap > 0 && r[t.next_in] !== 0; ) Xe.inflateReset(t), s = Xe.inflate(t, a);
6697
6697
  switch (s) {
6698
- case Im:
6698
+ case zm:
6699
6699
  case _o:
6700
6700
  case Zn:
6701
- case zm:
6701
+ case Pm:
6702
6702
  return this.onEnd(s), this.ended = !0, !1;
6703
6703
  }
6704
6704
  if (o = t.avail_out, t.next_out && (t.avail_out === 0 || s === Xn)) if (this.options.to === "string") {
6705
- let d = am(t.output, t.next_out), c = t.next_out - d, u = om(t.output, d);
6705
+ let d = cm(t.output, t.next_out), c = t.next_out - d, u = am(t.output, d);
6706
6706
  t.next_out = c, t.avail_out = n - c, c && t.output.set(t.output.subarray(d, d + c), 0), this.onData(u);
6707
6707
  } else this.onData(t.output.length === t.next_out ? t.output : t.output.subarray(0, t.next_out));
6708
6708
  if (s !== Sr || o !== 0) {
@@ -6716,11 +6716,11 @@ br.prototype.push = function(r, e) {
6716
6716
  }, br.prototype.onEnd = function(r) {
6717
6717
  r === Sr && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = Wa(this.chunks)), this.chunks = [], this.err = r, this.msg = this.strm.msg;
6718
6718
  };
6719
- var Pm = { Inflate: br, inflate: Yn, inflateRaw: function(r, e) {
6719
+ var Om = { Inflate: br, inflate: Yn, inflateRaw: function(r, e) {
6720
6720
  return (e = e || {}).raw = !0, Yn(r, e);
6721
6721
  }, ungzip: Yn, constants: xt };
6722
- const { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm } = _m, { Inflate: Um, inflate: Gm, inflateRaw: Bm, ungzip: Fm } = Pm;
6723
- var Vm = { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm, Inflate: Um, inflate: Gm, inflateRaw: Bm, ungzip: Fm, constants: xt }, jm = function() {
6722
+ const { Deflate: Mm, deflate: Lm, deflateRaw: Nm, gzip: Um } = gm, { Inflate: Gm, inflate: Bm, inflateRaw: Fm, ungzip: Vm } = Om;
6723
+ var jm = { Deflate: Mm, deflate: Lm, deflateRaw: Nm, gzip: Um, Inflate: Gm, inflate: Bm, inflateRaw: Fm, ungzip: Vm, constants: xt }, Hm = function() {
6724
6724
  function r(e, t) {
6725
6725
  this.collector = e, this.config = t, this.requestType = t.request_type, this.supportBeacon = !(!window.navigator || !window.navigator.sendBeacon), this.errorCode = { NO_URL: 4001, IMG_ON: 4e3, IMG_CATCH: 4002, BEACON_FALSE: 4003, XHR_ON: 500, RESPONSE: 5001, TIMEOUT: 5005 }, this.customHeader = t.custom_request_header || {};
6726
6726
  }
@@ -6762,7 +6762,7 @@ var Vm = { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm, Inflate: Um, infl
6762
6762
  try {
6763
6763
  var C = JSON.stringify(i), v = this.collector.configManager.getCurrentEnv();
6764
6764
  if (this.config.need_zip && h) if (v === "row") {
6765
- var E = new TextEncoder().encode(C), k = Vm.gzip(E);
6765
+ var E = new TextEncoder().encode(C), k = jm.gzip(E);
6766
6766
  l.setRequestHeader("Content-Encoding", "gzip"), l.send(k);
6767
6767
  } else l.send(C), this.collector.logger.warn("your channel do not support gzip, use normal data!");
6768
6768
  else l.send(C);
@@ -6781,7 +6781,7 @@ var Vm = { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm, Inflate: Um, infl
6781
6781
  this.useXhr(e);
6782
6782
  }
6783
6783
  }, r;
6784
- }(), Hm = function() {
6784
+ }(), qm = function() {
6785
6785
  function r(e, t) {
6786
6786
  if (this.devToolReady = !1, this.sendAlready = !1, t.enable_debug && e.configManager.get("browser") !== "Microsoft Internet Explorer") {
6787
6787
  this.collect = e, this.config = t, this.app_id = t.app_id;
@@ -6928,9 +6928,9 @@ var Vm = { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm, Inflate: Um, infl
6928
6928
  window && window.postMessage({ type: "devtool:web:open-draw" }, location.origin);
6929
6929
  });
6930
6930
  }, r;
6931
- }(), Qn = { autotrack: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js" }, object: "LogAutoTrack" }, ab: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js" }, object: "LogAb" }, stay: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js" }, object: "LogStay" }, route: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js" }, object: "LogRoute" }, tracer: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js" }, object: "LogTracer" }, retry: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js" }, object: "LogRetry" }, visual: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js" }, object: "LogVisual" } }, qm = ["ab", "autotrack", "Stay", "store", "et", "profile", "cep", "heartbeat", "monitor", "route", "tracer"], ze = function() {
6931
+ }(), Qn = { autotrack: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js" }, object: "LogAutoTrack" }, ab: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js" }, object: "LogAb" }, stay: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js" }, object: "LogStay" }, route: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js" }, object: "LogRoute" }, tracer: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js" }, object: "LogTracer" }, retry: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js" }, object: "LogRetry" }, visual: { src: { sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js", va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js" }, object: "LogVisual" } }, $m = ["ab", "autotrack", "Stay", "store", "et", "profile", "cep", "heartbeat", "monitor", "route", "tracer"], ze = function() {
6932
6932
  function r(e) {
6933
- this.disableAutoPageView = !1, this.bridgeReport = !1, this.staging = !1, this.pluginInstances = [], this.sended = !1, this.started = !1, this.destroy = !1, this.sdkReady = !1, this.adapters = {}, this.loadType = "base", this.sdkStop = !1, this.name = e, this.hook = new yf(), this.remotePlugin = /* @__PURE__ */ new Map(), this.Types = x, this.adapters.storage = kt, this.loadType = "full";
6933
+ this.disableAutoPageView = !1, this.bridgeReport = !1, this.staging = !1, this.pluginInstances = [], this.sended = !1, this.started = !1, this.destroy = !1, this.sdkReady = !1, this.adapters = {}, this.loadType = "base", this.sdkStop = !1, this.name = e, this.hook = new Sf(), this.remotePlugin = /* @__PURE__ */ new Map(), this.Types = x, this.adapters.storage = kt, this.loadType = "full";
6934
6934
  }
6935
6935
  return r.usePlugin = function(e, t, n) {
6936
6936
  if (t) {
@@ -6942,7 +6942,7 @@ var Vm = { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm, Inflate: Um, infl
6942
6942
  i || r.plugins.push({ name: t, plugin: e, options: n });
6943
6943
  } else r.plugins.push({ plugin: e });
6944
6944
  }, r.prototype.usePlugin = function(e, t, n) {
6945
- e && (this.loadType === "full" && qm.includes(e) ? console.info("your sdk version has " + e + " already ~") : t ? typeof t == "string" ? this.remotePlugin.get(e) || this.remotePlugin.set(e, { src: t, call: n }) : this.remotePlugin.get(e) || this.remotePlugin.set(e, { instance: t }) : this.remotePlugin.get(e) || this.remotePlugin.set(e, "sdk"));
6945
+ e && (this.loadType === "full" && $m.includes(e) ? console.info("your sdk version has " + e + " already ~") : t ? typeof t == "string" ? this.remotePlugin.get(e) || this.remotePlugin.set(e, { src: t, call: n }) : this.remotePlugin.get(e) || this.remotePlugin.set(e, { instance: t }) : this.remotePlugin.get(e) || this.remotePlugin.set(e, "sdk"));
6946
6946
  }, r.prototype.init = function(e) {
6947
6947
  var t, n, i = this;
6948
6948
  try {
@@ -6950,12 +6950,12 @@ var Vm = { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm, Inflate: Um, infl
6950
6950
  } catch {
6951
6951
  t = e;
6952
6952
  }
6953
- if (this.logger = new Mf(this.name, t.log), this.inited) this.logger.warn("[instance: " + this.name + "], every instance's api: init, can be call only one time!");
6953
+ if (this.logger = new Lf(this.name, t.log), this.inited) this.logger.warn("[instance: " + this.name + "], every instance's api: init, can be call only one time!");
6954
6954
  else if (t && xr(t)) if (t.app_id && typeof (n = t.app_id) == "number" && !isNaN(n)) if (!t.app_key || /* @__PURE__ */ function(s) {
6955
6955
  return typeof s == "string";
6956
6956
  }(t.app_key)) {
6957
- if (t.channel_domain || (t.report_channel !== "eu_ttp_ie" && t.channel !== "ie" || this.logger.error("ie dc will be deprecated in the future, please use other dc instead"), t.report_channel && !Na().has(t.report_channel) ? (this.logger.warn("your report_channel: " + t.report_channel + " is not exist. report_channel must be one of " + Bn().join(",") + ", use default report_channel: us_east instead, please check!!!"), t.report_channel = "us_east") : t.report_channel || ["sg", "va", "in", "my", "ie", "ie2"].indexOf(t.channel) !== -1 || (this.logger.warn("your channel: " + t.channel + " is not exist. use report_channel instead and report_channel must be one of " + Bn().join(",") + ", use default report_channel: us_east instead, please check!!!"), t.report_channel = "us_east"), this.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK set channel warning", level: "error", time: Date.now(), data: "your report_channel: " + t.channel + " is not exist. report_channel must be one of " + Bn().join(",") + ", use us_east instead, please check!!!", infoType: "sdk" })), this.spider = new Lf(), this.spider.checkSpider(t)) return this.logger.warn("The current environment may be a spider, can not report!"), void this.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK hit spider", level: "error", time: Date.now(), data: "The current environment may be a spider, can not report!", infoType: "sdk" });
6958
- this.appBridge = new Nf(this, t.enable_native), this.requestManager = new jm(this, t), this.bridgeReport = this.appBridge.bridgeInject(), this.configManager = new Of(this, t), this.debugger = new Hm(this, t), this.initConfig = t, this.emit(x.Init), this.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK Execute Init", data: t, level: "info", time: Date.now(), infoType: "cus" }), t.disable_auto_pv && (this.disableAutoPageView = !0), this.bridgeReport || (this.configManager.setAppid(t.app_id), this.eventManager = new Gf(), this.tokenManager = new Bf(), this.sessionManager = new Ff(), Promise.all([new Promise(function(s) {
6957
+ if (t.channel_domain || (t.report_channel !== "eu_ttp_ie" && t.channel !== "ie" || this.logger.error("ie dc will be deprecated in the future, please use other dc instead"), t.report_channel && !Na().has(t.report_channel) ? (this.logger.warn("your report_channel: " + t.report_channel + " is not exist. report_channel must be one of " + Bn().join(",") + ", use default report_channel: us_east instead, please check!!!"), t.report_channel = "us_east") : t.report_channel || ["sg", "va", "in", "my", "ie", "ie2"].indexOf(t.channel) !== -1 || (this.logger.warn("your channel: " + t.channel + " is not exist. use report_channel instead and report_channel must be one of " + Bn().join(",") + ", use default report_channel: us_east instead, please check!!!"), t.report_channel = "us_east"), this.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK set channel warning", level: "error", time: Date.now(), data: "your report_channel: " + t.channel + " is not exist. report_channel must be one of " + Bn().join(",") + ", use us_east instead, please check!!!", infoType: "sdk" })), this.spider = new Nf(), this.spider.checkSpider(t)) return this.logger.warn("The current environment may be a spider, can not report!"), void this.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK hit spider", level: "error", time: Date.now(), data: "The current environment may be a spider, can not report!", infoType: "sdk" });
6958
+ this.appBridge = new Uf(this, t.enable_native), this.requestManager = new Hm(this, t), this.bridgeReport = this.appBridge.bridgeInject(), this.configManager = new Mf(this, t), this.debugger = new qm(this, t), this.initConfig = t, this.emit(x.Init), this.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK Execute Init", data: t, level: "info", time: Date.now(), infoType: "cus" }), t.disable_auto_pv && (this.disableAutoPageView = !0), this.bridgeReport || (this.configManager.setAppid(t.app_id), this.eventManager = new Bf(), this.tokenManager = new Ff(), this.sessionManager = new Vf(), Promise.all([new Promise(function(s) {
6959
6959
  i.once(x.TokenComplete, function() {
6960
6960
  s(!0);
6961
6961
  });
@@ -7065,7 +7065,7 @@ var Vm = { Deflate: Om, deflate: Mm, deflateRaw: Lm, gzip: Nm, Inflate: Um, infl
7065
7065
  var n = e;
7066
7066
  /^event\./.test(e) && (n = e.slice(6));
7067
7067
  var i = t;
7068
- typeof i != "object" && (i = {}), i.profile ? delete i.profile : i.event_index = Sf();
7068
+ typeof i != "object" && (i = {}), i.profile ? delete i.profile : i.event_index = bf();
7069
7069
  var s = void 0;
7070
7070
  return i.local_ms ? (s = i.local_ms, delete i.local_ms) : s = +/* @__PURE__ */ new Date(), { event: n, params: i, local_time_ms: s, is_bav: this.initConfig && this.initConfig.autotrack ? 1 : 0 };
7071
7071
  } catch (a) {
@@ -7179,7 +7179,7 @@ function go(r, e, t, n) {
7179
7179
  var i = r && r.source || window.opener || window.parent, s = r && r.origin || n || window.location.origin, a = { type: e, payload: t };
7180
7180
  i.postMessage(JSON.stringify(a), s);
7181
7181
  }
7182
- function $m(r) {
7182
+ function Km(r) {
7183
7183
  if (rc.some(function(i) {
7184
7184
  return r.origin.indexOf(i) > -1;
7185
7185
  })) {
@@ -7200,7 +7200,7 @@ var Cr, ei = "__rangers_ab_style__";
7200
7200
  (function(r) {
7201
7201
  r[r.Var = 0] = "Var", r[r.All = 1] = "All";
7202
7202
  })(Cr || (Cr = {}));
7203
- var Km = function() {
7203
+ var Wm = function() {
7204
7204
  function r() {
7205
7205
  this.fetchStatus = "no", this.refreshFetchStatus = "no", this.versions = [], this.extVersions = [], this.mulilinkVersions = [], this.enable_multilink = !1, this.enable_ab_visual = !1, this.editMode = !1, this.callbacks = [], this.data = {}, this.changeListener = /* @__PURE__ */ new Map(), this.readyStatus = !1, this.exposureCache = [], this.fetchQueueMap = /* @__PURE__ */ new Map();
7206
7206
  }
@@ -7437,7 +7437,7 @@ var Km = function() {
7437
7437
  }
7438
7438
  return e;
7439
7439
  }, r;
7440
- }(), Wm = function() {
7440
+ }(), Jm = function() {
7441
7441
  function r() {
7442
7442
  }
7443
7443
  return r.prototype.apply = function(e, t) {
@@ -7470,7 +7470,7 @@ var Km = function() {
7470
7470
  }
7471
7471
  });
7472
7472
  }, r;
7473
- }(), Jm = function() {
7473
+ }(), Xm = function() {
7474
7474
  function r(e, t) {
7475
7475
  this.maxDuration = 432e5, this.aliveDTime = 6e4, this.options = { aliveName: "predefine_page_alive", params: {} }, this.focusState = !0, this.collect = e, this.config = t, this.pageStartTime = Date.now(), this.sessionStartTime = this.pageStartTime, this.timerHandler = null, xr(t.enable_stay_duration) && (this.options = Object.assign(this.options, t.enable_stay_duration)), this.hard = this.options.mode && this.options.mode === "hard", this.focusState = document.hasFocus();
7476
7476
  }
@@ -7519,7 +7519,7 @@ var Km = function() {
7519
7519
  window.removeEventListener("blur", t), window.removeEventListener("focus", n);
7520
7520
  };
7521
7521
  }, r;
7522
- }(), Xm = function() {
7522
+ }(), Zm = function() {
7523
7523
  function r(e, t) {
7524
7524
  var n = this;
7525
7525
  this.maxDuration = 432e5, this.aliveDTime = 6e4, this.options = { closeName: "predefine_page_close", params: {} }, this.focusState = !0, this.visibilitychange = function() {
@@ -7570,13 +7570,13 @@ var Km = function() {
7570
7570
  window.removeEventListener("blur", t), window.removeEventListener("focus", n);
7571
7571
  };
7572
7572
  }, r;
7573
- }(), Zm = function() {
7573
+ }(), Ym = function() {
7574
7574
  function r() {
7575
7575
  }
7576
7576
  return r.prototype.apply = function(e, t) {
7577
7577
  var n = this;
7578
7578
  if (this.collect = e, this.config = t, this.config.enable_stay_duration) {
7579
- this.title = document.title || location.pathname, this.url = location.href, this.url_path = location.pathname, this.pageAlive = new Jm(e, t), this.pageClose = new Xm(e, t);
7579
+ this.title = document.title || location.pathname, this.url = location.href, this.url_path = location.pathname, this.pageAlive = new Xm(e, t), this.pageClose = new Zm(e, t);
7580
7580
  var i = this.collect.Types;
7581
7581
  this.collect.on(i.ResetStay, function(s) {
7582
7582
  var a = s.url_path, o = s.title, d = s.url;
@@ -7611,7 +7611,7 @@ var Km = function() {
7611
7611
  }, r.prototype.resetStayDuration = function(e, t, n) {
7612
7612
  this.reset(e, t, n), this.collect.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "SDK Execute resetStayDuration", level: "info", time: Date.now(), data: { url_path: e, title: t, url: n } });
7613
7613
  }, r;
7614
- }(), Ym = function() {
7614
+ }(), Qm = function() {
7615
7615
  function r() {
7616
7616
  var e = this;
7617
7617
  this.setInterval = function() {
@@ -7648,7 +7648,7 @@ var Km = function() {
7648
7648
  var e = this.lastTime || +/* @__PURE__ */ new Date();
7649
7649
  this.lastTime = +/* @__PURE__ */ new Date(), this.lastTime - e > this.sessionInterval && (this.clearInterval(), this.endCurrentSession(), this.setInterval());
7650
7650
  }, r;
7651
- }(), Qm = function() {
7651
+ }(), e_ = function() {
7652
7652
  function r() {
7653
7653
  }
7654
7654
  return r.prototype.apply = function(e, t) {
@@ -7739,7 +7739,7 @@ function yo(r) {
7739
7739
  }
7740
7740
  var pn = function(r, e) {
7741
7741
  return r.hasAttribute ? r.hasAttribute(e) : r.attributes ? !(!r.attributes[e] || !r.attributes[e].specified) : void 0;
7742
- }, e_ = function(r, e) {
7742
+ }, t_ = function(r, e) {
7743
7743
  if (typeof e == "string") return pn(r, e);
7744
7744
  if (Ji(e)) {
7745
7745
  for (var t = !1, n = 0; n < e.length; n++)
@@ -7749,7 +7749,7 @@ var pn = function(r, e) {
7749
7749
  }
7750
7750
  return t;
7751
7751
  }
7752
- }, t_ = function() {
7752
+ }, r_ = function() {
7753
7753
  function r(e, t, n) {
7754
7754
  var i = this;
7755
7755
  this.statistics = !1, this.pageView = !1, this.clickEvent = function(s) {
@@ -7839,7 +7839,7 @@ var pn = function(r, e) {
7839
7839
  }, r.prototype.getDefaultConfig = function() {
7840
7840
  return { is_html: 1, url: location.href, referrer: document.referrer, page_key: location.href, refer_page_key: document.referrer, page_title: document.title || location.pathname, page_manual_key: "", refer_page_manual_key: "", refer_page_title: "", page_path: location.pathname, page_host: location.host };
7841
7841
  }, r;
7842
- }(), r_ = { eventConfig: { mode: "proxy-capturing", submit: !1, click: !0, change: !1, pv: !0, beat: !0, hashTag: !1, impr: !1 }, scoutConfig: { mode: "xpath" } }, n_ = function() {
7842
+ }(), n_ = { eventConfig: { mode: "proxy-capturing", submit: !1, click: !0, change: !1, pv: !0, beat: !0, hashTag: !1, impr: !1 }, scoutConfig: { mode: "xpath" } }, i_ = function() {
7843
7843
  function r(e, t) {
7844
7844
  this.config = e, this.config.eventConfig = Object.assign(this.config.eventConfig, t);
7845
7845
  }
@@ -7849,7 +7849,7 @@ var pn = function(r, e) {
7849
7849
  return this.config = e;
7850
7850
  }, r;
7851
7851
  }();
7852
- function i_(r) {
7852
+ function s_(r) {
7853
7853
  for (var e = []; r.parentElement !== null; ) e.push(r), r = r.parentElement;
7854
7854
  var t = [], n = [];
7855
7855
  return e.forEach(function(i) {
@@ -7862,7 +7862,7 @@ function i_(r) {
7862
7862
  t.unshift(a), n.unshift(o);
7863
7863
  }), { element_path: "/" + t.join("/"), positions: n };
7864
7864
  }
7865
- function s_(r, e, t, n) {
7865
+ function o_(r, e, t, n) {
7866
7866
  var i = {}, s = function(R) {
7867
7867
  if (R) {
7868
7868
  var M = R.getBoundingClientRect(), N = M.width, U = M.height;
@@ -7872,7 +7872,7 @@ function s_(r, e, t, n) {
7872
7872
  R === void 0 && (R = {}), M === void 0 && (M = {});
7873
7873
  var N = R.clientX, U = R.clientY, B = M.left, H = M.top, Z = N - B >= 0 ? N - B : 0, W = U - H >= 0 ? U - H : 0;
7874
7874
  return { touch_x: Math.floor(Z), touch_y: Math.floor(W) };
7875
- }(r, s), o = s.element_width, d = s.element_height, c = a.touch_x, u = a.touch_y, h = i_(e), l = h.element_path, f = h.positions, y = function(R) {
7875
+ }(r, s), o = s.element_width, d = s.element_height, c = a.touch_x, u = a.touch_y, h = s_(e), l = h.element_path, f = h.positions, y = function(R) {
7876
7876
  var M = ti(R), N = [];
7877
7877
  return function U(B) {
7878
7878
  var H = vo(B);
@@ -7888,7 +7888,7 @@ function s_(r, e, t, n) {
7888
7888
  if (H && (N += H), B.childNodes.length > 0) for (var Z = B.childNodes, W = 0; W < Z.length; W++) Z[W].nodeType === 3 && U(Z[W]);
7889
7889
  }(M), N;
7890
7890
  }(e)), i.element_id = e.getAttribute("id") || "", i.element_class_name = e.getAttribute("class") || "", i.element_type = e.nodeType, i.element_width = Math.floor(o), i.element_height = Math.floor(d), i.touch_x = c, i.touch_y = u, i.page_manual_key = "", i.elememt_manual_key = "", i.since_page_start_ms = v, i.page_start_ms = C, i.page_path = location.pathname, i.page_host = location.host, t.track_attr && function(R, M) {
7891
- return !!e_(R, M);
7891
+ return !!t_(R, M);
7892
7892
  }(e, t.track_attr)) {
7893
7893
  var g = function(R, M) {
7894
7894
  var N = {};
@@ -7903,8 +7903,8 @@ function s_(r, e, t, n) {
7903
7903
  return L.tagName === "A" && (i.href = L.getAttribute("href")), e.tagName === "IMG" && (i.src = e.getAttribute("src")), i;
7904
7904
  }
7905
7905
  var sr = function(r, e, t, n, i) {
7906
- return ne(ne({ event: r }, s_(e, t, n, i)), { is_html: 1, page_key: window.location.href, page_title: document.title });
7907
- }, o_ = function() {
7906
+ return ne(ne({ event: r }, o_(e, t, n, i)), { is_html: 1, page_key: window.location.href, page_title: document.title });
7907
+ }, a_ = function() {
7908
7908
  function r(e, t) {
7909
7909
  this.ignore = { text: !0 }, this.initConfig = e, this.options = t, this.eventName = t && t.custom === "tea" ? { click: "__bav_click", page: "__bav_page", beat: "__bav_beat", static: "__bav_page_statistics", exposure: "__bav_page_exposure" } : { click: "bav2b_click", page: "bav2b_page", beat: "bav2b_beat", static: "bav2b_page_statistics", exposure: "bav2b_exposure" }, t && t.text === !0 && (this.ignore.text = !1), t && t.exposure && t.exposure.eventName && (this.eventName.exposure = t.exposure.eventName);
7910
7910
  }
@@ -7973,7 +7973,7 @@ var sr = function(r, e, t, n, i) {
7973
7973
  if (n = Object.assign(n, e.params), !this.options.scroll.callback || (n = this.options.scroll.callback(n)) || Object.keys(n).length) return n;
7974
7974
  console.warn("scroll callback must return data!");
7975
7975
  }, r;
7976
- }(), a_ = function() {
7976
+ }(), c_ = function() {
7977
7977
  function r(e) {
7978
7978
  this.collect = e, this.eventNameList = ["report_click_event", "report_change_event", "report_submit_event", "report_exposure_event", "report_page_view_event", "report_page_statistics_event", "report_beat_event"];
7979
7979
  }
@@ -7988,7 +7988,7 @@ var sr = function(r, e, t, n, i) {
7988
7988
  fetch(e, n);
7989
7989
  }, r;
7990
7990
  }(), ri = !1;
7991
- function c_(r) {
7991
+ function u_(r) {
7992
7992
  var e, t, n, i, s = r.event, a = r.editorUrl, o = r.autoTrackInstance;
7993
7993
  ri || (ri = !0, e = a, t = function() {
7994
7994
  go(s, "editorScriptloadSuccess"), o.destroy();
@@ -8000,10 +8000,10 @@ function c_(r) {
8000
8000
  t();
8001
8001
  }, document.getElementsByTagName("head")[0].appendChild(i));
8002
8002
  }
8003
- function u_(r, e) {
8003
+ function d_(r, e) {
8004
8004
  window.TEAVisualEditor = window.TEAVisualEditor || {}, window.TEAVisualEditor.appId = e.app_id;
8005
8005
  var t, n, i, s = e.channel_domain, a = "";
8006
- if ((t = If).length && t.forEach(function(l) {
8006
+ if ((t = zf).length && t.forEach(function(l) {
8007
8007
  rc.push(l);
8008
8008
  }), s) {
8009
8009
  var o = void 0, d = "";
@@ -8022,17 +8022,17 @@ function u_(r, e) {
8022
8022
  } catch {
8023
8023
  }
8024
8024
  }
8025
- window.addEventListener("message", $m, !1);
8025
+ window.addEventListener("message", Km, !1);
8026
8026
  try {
8027
8027
  i = function(l) {
8028
8028
  var f = l.data.app_id;
8029
- f && f !== e.app_id || c_({ event: l, editorUrl: "https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/log-sdk/collect/heatmap-core.js?query=" + Date.now(), autoTrackInstance: r });
8029
+ f && f !== e.app_id || u_({ event: l, editorUrl: "https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/log-sdk/collect/heatmap-core.js?query=" + Date.now(), autoTrackInstance: r });
8030
8030
  }, Er[n = "tea:openHeatMapCore"] = Er[n] || [], Er[n].push(i);
8031
8031
  } catch {
8032
8032
  console.log("openHeatMapCore error");
8033
8033
  }
8034
8034
  }
8035
- var Be, d_ = function() {
8035
+ var Be, l_ = function() {
8036
8036
  function r(e, t) {
8037
8037
  this._instance = null, this._intersection = e, this.config = t, this._intersection && this.init();
8038
8038
  }
@@ -8081,7 +8081,7 @@ var Be, d_ = function() {
8081
8081
  (function(r) {
8082
8082
  r[r.EXPOSURE_ONCE = 0] = "EXPOSURE_ONCE", r[r.LIFECYCLE_SHOW_NEW = 3] = "LIFECYCLE_SHOW_NEW", r[r.RESUME_FORM_PAGE = 6] = "RESUME_FORM_PAGE", r[r.RESUME_FORM_BACK = 7] = "RESUME_FORM_BACK", r[r.NOT_EXPOSURE = -1] = "NOT_EXPOSURE";
8083
8083
  })(Be || (Be = {}));
8084
- var Et, l_ = function() {
8084
+ var Et, h_ = function() {
8085
8085
  function r(e, t, n) {
8086
8086
  var i = this;
8087
8087
  this.backStatus = !1, this.instance = this.buildObserver(), this.collect = e, this.observeMap = r._observer_map, t.autotrack.exposure.ratio ? this.ratio = t.autotrack.exposure.ratio : t.autotrack.exposure.ratio === 0 ? this.ratio = 0 : this.ratio = 0.5, this.timeLimit = t.autotrack.exposure.stay || 0, this.exposureType = Be.NOT_EXPOSURE, this.eventHandle = n, this.hashMap = /* @__PURE__ */ new Map(), this.backStatus = !1, this.lastState = null, this.collect.on("re-start-sdk", function() {
@@ -8189,9 +8189,9 @@ var Et, l_ = function() {
8189
8189
  })(document, "visibilitychange", a, !1);
8190
8190
  };
8191
8191
  }, r._observer_instance = null, r._observer_map = /* @__PURE__ */ new Map(), r;
8192
- }(), h_ = function() {
8192
+ }(), p_ = function() {
8193
8193
  function r(e, t, n) {
8194
- t.autotrack && t.autotrack.exposure && (this._intersection = new l_(e, t, n), this._observer = new d_(this._intersection, t), this._intersection && this._observer ? this.initObserver() : console.log("your browser version cannot support exposure event, please update~"));
8194
+ t.autotrack && t.autotrack.exposure && (this._intersection = new h_(e, t, n), this._observer = new l_(this._intersection, t), this._intersection && this._observer ? this.initObserver() : console.log("your browser version cannot support exposure event, please update~"));
8195
8195
  }
8196
8196
  return r.prototype.initObserver = function() {
8197
8197
  var e = this;
@@ -8203,7 +8203,7 @@ var Et, l_ = function() {
8203
8203
  (function(r) {
8204
8204
  r[r.SCROLL_UP = 1] = "SCROLL_UP", r[r.SCROLL_DOWN = 2] = "SCROLL_DOWN", r[r.SCROLL_LEFT = 3] = "SCROLL_LEFT", r[r.SCROLL_RIGHT = 4] = "SCROLL_RIGHT", r[r.NOT_SCROLL = -1] = "NOT_SCROLL";
8205
8205
  })(Et || (Et = {}));
8206
- var So, p_ = function() {
8206
+ var So, f_ = function() {
8207
8207
  function r(e, t) {
8208
8208
  this.distance = 30, e.autotrack && e.autotrack.scroll && (e.autotrack.scroll.distance && (this.distance = e.autotrack.scroll.distance), this.eventHandle = t, this.addLinstenr(), this.mutation());
8209
8209
  }
@@ -8256,7 +8256,7 @@ var So, p_ = function() {
8256
8256
  console.warn("scroll event error", JSON.stringify(u));
8257
8257
  }
8258
8258
  }, r;
8259
- }(), f_ = { hashTag: !1, impr: !1 }, m_ = function() {
8259
+ }(), m_ = { hashTag: !1, impr: !1 }, __ = function() {
8260
8260
  function r() {
8261
8261
  }
8262
8262
  return r.prototype.apply = function(e, t) {
@@ -8267,7 +8267,7 @@ var So, p_ = function() {
8267
8267
  }, r.prototype.ready = function(e) {
8268
8268
  this.collect.set(e);
8269
8269
  var t = this.config.autotrack;
8270
- t = typeof t == "object" ? t : {}, t = Object.assign(f_, t), this.destroyed = !1, this.options = t, this.Config = new n_(r_, this.options), this.Exposure = new h_(this.collect, this.config, this.handle.bind(this)), this.Scroll = new p_(this.config, this.handle.bind(this)), this.Listener = new t_(t, this.collect, this.Config), this.EventHandle = new o_(this.config, t), this.Request = new a_(this.collect), this.autoTrackStart = !0, this.init(), u_(this, this.config);
8270
+ t = typeof t == "object" ? t : {}, t = Object.assign(m_, t), this.destroyed = !1, this.options = t, this.Config = new i_(n_, this.options), this.Exposure = new p_(this.collect, this.config, this.handle.bind(this)), this.Scroll = new f_(this.config, this.handle.bind(this)), this.Listener = new r_(t, this.collect, this.Config), this.EventHandle = new a_(this.config, t), this.Request = new c_(this.collect), this.autoTrackStart = !0, this.init(), d_(this, this.config);
8271
8271
  }, r.prototype.init = function() {
8272
8272
  this.Listener.init(this.handle.bind(this)), this.collect.loadType === "base" && (window.opener || window.parent).postMessage("[tea-sdk]ready", "*");
8273
8273
  }, r.prototype.handle = function(e, t) {
@@ -8303,7 +8303,7 @@ var So, p_ = function() {
8303
8303
  (function(r) {
8304
8304
  r.Net = "net", r.FailNet = "f_net", r.FailData = "f_data";
8305
8305
  })(So || (So = {}));
8306
- var bo = { pv: ["predefine_pageview"], sdk: ["_be_active", "predefine_page_alive", "predefine_page_close", "__profile_set", "__profile_set_once", "__profile_increment", "__profile_unset", "__profile_append"], autotrack: ["bav2b_click", "bav2b_page", "bav2b_beat", "bav2b_page_statistics", "__bav_click", "__bav_page", "__bav_beat", "__bav_page_statistics"] }, __ = function() {
8306
+ var bo = { pv: ["predefine_pageview"], sdk: ["_be_active", "predefine_page_alive", "predefine_page_close", "__profile_set", "__profile_set_once", "__profile_increment", "__profile_unset", "__profile_append"], autotrack: ["bav2b_click", "bav2b_page", "bav2b_beat", "bav2b_page_statistics", "__bav_click", "__bav_page", "__bav_beat", "__bav_page_statistics"] }, g_ = function() {
8307
8307
  function r() {
8308
8308
  }
8309
8309
  return r.prototype.apply = function(e, t) {
@@ -8385,7 +8385,7 @@ var bo = { pv: ["predefine_pageview"], sdk: ["_be_active", "predefine_page_alive
8385
8385
  }, r.prototype.leavePage = function() {
8386
8386
  this.report(!0);
8387
8387
  }, r;
8388
- }(), g_ = function() {
8388
+ }(), v_ = function() {
8389
8389
  function r() {
8390
8390
  this.retryWaitTime = 3e3, this.retryStatus = !1, this.retryCacheStatus = !1;
8391
8391
  }
@@ -8441,7 +8441,7 @@ var bo = { pv: ["predefine_pageview"], sdk: ["_be_active", "predefine_page_alive
8441
8441
  }, r.prototype.fetchData = function(e, t, n, i) {
8442
8442
  this.collect.requestManager.useRequest({ url: this.eventUrl, data: e, timeout: 3e4, success: t, fail: n, app_key: i ? "566f58151b0ed37e" : "" });
8443
8443
  }, r;
8444
- }(), ni = typeof window < "u" ? (window.LogPluginObject || (window.LogPluginObject = {}), window.LogPluginObject) : null, v_ = function() {
8444
+ }(), ni = typeof window < "u" ? (window.LogPluginObject || (window.LogPluginObject = {}), window.LogPluginObject) : null, y_ = function() {
8445
8445
  function r() {
8446
8446
  }
8447
8447
  return r.prototype.apply = function(e, t) {
@@ -8490,7 +8490,7 @@ var bo = { pv: ["predefine_pageview"], sdk: ["_be_active", "predefine_page_alive
8490
8490
  this.collect.emit(T.DEBUGGER_MESSAGE, { type: T.DEBUGGER_MESSAGE_SDK, info: "Extend LoadPlugin Fail", level: "error", time: Date.now(), data: o.message });
8491
8491
  }
8492
8492
  }, r;
8493
- }(), y_ = function() {
8493
+ }(), S_ = function() {
8494
8494
  function r() {
8495
8495
  this.autotrack = !1, this.spa = !1, this.cache = {}, this.allowHash = !1;
8496
8496
  }
@@ -8587,7 +8587,7 @@ var bo = { pv: ["predefine_pageview"], sdk: ["_be_active", "predefine_page_alive
8587
8587
  var t = this.storage.getItem(this.cache_key) || {}, n = this.removeQuery(e);
8588
8588
  t.refer_key = n, t.routeChange = !0, this.storage.setItem(this.cache_key, t);
8589
8589
  }, r;
8590
- }(), S_ = function() {
8590
+ }(), b_ = function() {
8591
8591
  function r() {
8592
8592
  }
8593
8593
  return r.prototype.apply = function(e, t) {
@@ -8639,12 +8639,12 @@ var bo = { pv: ["predefine_pageview"], sdk: ["_be_active", "predefine_page_alive
8639
8639
  this.TrackEventMap.delete(e);
8640
8640
  }, r;
8641
8641
  }();
8642
- ze.usePlugin(v_, "extend"), ze.usePlugin(Wm, "et"), ze.usePlugin(g_, "retry"), ze.usePlugin(Km, "ab"), ze.usePlugin(Zm, "stay"), ze.usePlugin(m_, "autotrack"), ze.usePlugin(S_, "trackeventduration"), ze.usePlugin(Ym, "heartbeat"), ze.usePlugin(Qm, "monitor"), ze.usePlugin(y_, "route"), ze.usePlugin(__, "tracer");
8642
+ ze.usePlugin(y_, "extend"), ze.usePlugin(Jm, "et"), ze.usePlugin(v_, "retry"), ze.usePlugin(Wm, "ab"), ze.usePlugin(Ym, "stay"), ze.usePlugin(__, "autotrack"), ze.usePlugin(b_, "trackeventduration"), ze.usePlugin(Qm, "heartbeat"), ze.usePlugin(e_, "monitor"), ze.usePlugin(S_, "route"), ze.usePlugin(g_, "tracer");
8643
8643
  var or = new ze("default");
8644
8644
  const ii = "VEPUSHER_DEVICE_ID", si = "VEPUSHER_USER_ID", nc = (r) => Math.floor(
8645
8645
  (Math.random() * 9 + 1) * Math.pow(10, r - 1)
8646
8646
  ).toString();
8647
- function b_(r) {
8647
+ function E_(r) {
8648
8648
  const e = {};
8649
8649
  if (!(r instanceof Object))
8650
8650
  throw new Error("params type error");
@@ -8659,7 +8659,7 @@ function b_(r) {
8659
8659
  }
8660
8660
  return e;
8661
8661
  }
8662
- function E_(r) {
8662
+ function C_(r) {
8663
8663
  if (r)
8664
8664
  return localStorage.setItem(si, r), r;
8665
8665
  const e = localStorage.getItem(si);
@@ -8668,7 +8668,7 @@ function E_(r) {
8668
8668
  const t = nc(12);
8669
8669
  return localStorage.setItem(si, t), r;
8670
8670
  }
8671
- function C_(r) {
8671
+ function w_(r) {
8672
8672
  if (r)
8673
8673
  return localStorage.setItem(ii, r), r;
8674
8674
  const e = localStorage.getItem(ii);
@@ -8677,65 +8677,7 @@ function C_(r) {
8677
8677
  const t = nc(11);
8678
8678
  return localStorage.setItem(ii, t), t;
8679
8679
  }
8680
- class w_ {
8681
- constructor({ showLogInConsole: e = !1 }) {
8682
- this._showLogInConsole = !1, this.markCollectTeaEventReady = () => {
8683
- this.isReady = !0, or.start(), this.queueTeaEvent.forEach((t) => this.sendTeaEvent(...t)), this.queueTeaEvent = [];
8684
- }, this.configTea = (t, n) => {
8685
- const i = {
8686
- ...t,
8687
- evtParams: {
8688
- page_url_fe: encodeURIComponent(window.location.href) || "",
8689
- page_path_fe: window.location.pathname || "unknown",
8690
- page_host_fe: window.location.hostname || "unknown",
8691
- sdk_version: "2.0.3",
8692
- build_version: "1.0.0.92",
8693
- ...n
8694
- }
8695
- };
8696
- or.config(i), this.markCollectTeaEventReady();
8697
- }, this.isReady = !1, this.queueTeaEvent = [], or.init({
8698
- app_id: 778494,
8699
- channel: "sg"
8700
- }), this._showLogInConsole = e;
8701
- }
8702
- /**
8703
- * @description Tea埋点发送方法
8704
- * @param {string} eventName
8705
- * @param {Record<string,any>} params (value非string|number类型会进行序列化)
8706
- */
8707
- sendTeaEvent(e, t, n = !1) {
8708
- if (e)
8709
- if (this.isReady)
8710
- try {
8711
- const i = {
8712
- ...b_(t || {})
8713
- };
8714
- or.event(e, i), this._showLogInConsole && !n && console.log("[VePusher logger]:", e, i);
8715
- } catch (i) {
8716
- console.error(i);
8717
- }
8718
- else
8719
- this._showLogInConsole && !n && console.log("[VePusher logger]:", e, t), this.queueTeaEvent.push([e, t]);
8720
- }
8721
- getIsReady() {
8722
- return this.isReady;
8723
- }
8724
- getRawTea() {
8725
- return or;
8726
- }
8727
- }
8728
- let Lr;
8729
- function T_({ showLogInConsole: r }) {
8730
- Lr = new w_({ showLogInConsole: r });
8731
- }
8732
- function V(r, e, t = !1) {
8733
- Lr && Lr.sendTeaEvent(r, e, t);
8734
- }
8735
- function k_(r, e) {
8736
- Lr && Lr.configTea(r, e);
8737
- }
8738
- const R_ = {
8680
+ const T_ = {
8739
8681
  /**
8740
8682
  * 获取采集设备列表结果
8741
8683
  * devices: 采集设备列表
@@ -8803,7 +8745,7 @@ const R_ = {
8803
8745
  * number: 停止的流数量
8804
8746
  */
8805
8747
  STOP_CAPTURE: "stop_capture"
8806
- }, A_ = {
8748
+ }, k_ = {
8807
8749
  /**
8808
8750
  * 开关合流功能事件
8809
8751
  * enable: 是否开启合流功能
@@ -8861,7 +8803,7 @@ const R_ = {
8861
8803
  * visible: 是否可见
8862
8804
  */
8863
8805
  CHANGE_AUDIO_STREAM_MUTE: "change_audio_stream_mute"
8864
- }, D_ = {
8806
+ }, R_ = {
8865
8807
  /**
8866
8808
  * 开始推流事件
8867
8809
  * url: 推流地址:
@@ -8911,7 +8853,7 @@ const R_ = {
8911
8853
  * RTM推流sdp协商信息
8912
8854
  */
8913
8855
  PUSH_SDP_INFO: "push_sdp_info"
8914
- }, j = {
8856
+ }, V = {
8915
8857
  /**
8916
8858
  * 推流SDK初始化事件
8917
8859
  * options: 初始化配置参数
@@ -8931,9 +8873,78 @@ const R_ = {
8931
8873
  * quality: 音频质量
8932
8874
  */
8933
8875
  SET_AUDIO_QUALITY: "set_audio_quality",
8934
- ...R_,
8935
- ...A_,
8936
- ...D_
8876
+ /** 页面可见性变化 */
8877
+ PAGE_VISIBLE_CHANGE: "page_visible_change",
8878
+ ...T_,
8879
+ ...k_,
8880
+ ...R_
8881
+ };
8882
+ class A_ {
8883
+ constructor({ showLogInConsole: e = !1 }) {
8884
+ this._showLogInConsole = !1, this.markCollectTeaEventReady = () => {
8885
+ this.isReady = !0, or.start(), this.queueTeaEvent.forEach((t) => this.sendTeaEvent(...t)), this.queueTeaEvent = [];
8886
+ }, this.configTea = (t, n) => {
8887
+ const i = {
8888
+ ...t,
8889
+ evtParams: {
8890
+ page_url_fe: encodeURIComponent(window.location.href) || "",
8891
+ page_path_fe: window.location.pathname || "unknown",
8892
+ page_host_fe: window.location.hostname || "unknown",
8893
+ sdk_version: "2.0.3",
8894
+ build_version: "1.0.0.94",
8895
+ ...n
8896
+ }
8897
+ };
8898
+ or.config(i), this.markCollectTeaEventReady();
8899
+ }, this.isReady = !1, this.queueTeaEvent = [], or.init({
8900
+ app_id: 778494,
8901
+ channel: "sg"
8902
+ }), this._showLogInConsole = e;
8903
+ }
8904
+ /**
8905
+ * @description Tea埋点发送方法
8906
+ * @param {string} eventName
8907
+ * @param {Record<string,any>} params (value非string|number类型会进行序列化)
8908
+ */
8909
+ sendTeaEvent(e, t, n = !1) {
8910
+ if (e)
8911
+ if (this.isReady)
8912
+ try {
8913
+ const i = {
8914
+ ...E_(t || {})
8915
+ };
8916
+ or.event(e, i), this._showLogInConsole && !n && console.log("[VePusher logger]:", e, i);
8917
+ } catch (i) {
8918
+ console.error(i);
8919
+ }
8920
+ else
8921
+ this._showLogInConsole && !n && console.log("[VePusher logger]:", e, t), this.queueTeaEvent.push([e, t]);
8922
+ }
8923
+ getIsReady() {
8924
+ return this.isReady;
8925
+ }
8926
+ getRawTea() {
8927
+ return or;
8928
+ }
8929
+ }
8930
+ let Lr;
8931
+ function D_({ showLogInConsole: r }) {
8932
+ Lr = new A_({ showLogInConsole: r });
8933
+ }
8934
+ function j(r, e, t = !1) {
8935
+ Lr && Lr.sendTeaEvent(r, e, t);
8936
+ }
8937
+ function x_(r, e) {
8938
+ Lr && Lr.configTea(r, e);
8939
+ }
8940
+ const ic = () => {
8941
+ j(V.PAGE_VISIBLE_CHANGE, {
8942
+ page_visible: !document.hidden
8943
+ });
8944
+ }, I_ = () => {
8945
+ document.addEventListener("visibilitychange", ic);
8946
+ }, z_ = () => {
8947
+ document.removeEventListener("visibilitychange", ic);
8937
8948
  };
8938
8949
  function Pt(r) {
8939
8950
  var e;
@@ -8944,7 +8955,7 @@ function Pt(r) {
8944
8955
  original_error_message: (e = r.error) == null ? void 0 : e.message
8945
8956
  };
8946
8957
  }
8947
- class x_ extends pt {
8958
+ class P_ extends pt {
8948
8959
  constructor(e) {
8949
8960
  super(), this._videoConstraints = {
8950
8961
  width: 1080,
@@ -9004,16 +9015,16 @@ class x_ extends pt {
9004
9015
  }
9005
9016
  async getDevicesList(e) {
9006
9017
  try {
9007
- const t = await Wu(
9018
+ const t = await Ju(
9008
9019
  e ? [e] : ["audioinput", "videoinput"]
9009
9020
  );
9010
- return V(j.GET_DEVICES_RESULT, {
9021
+ return j(V.GET_DEVICES_RESULT, {
9011
9022
  type: e,
9012
9023
  is_success: !0,
9013
9024
  devices: t
9014
9025
  }), t;
9015
9026
  } catch (t) {
9016
- return V(j.GET_DEVICES_RESULT, {
9027
+ return j(V.GET_DEVICES_RESULT, {
9017
9028
  type: e,
9018
9029
  is_success: !1,
9019
9030
  error: t,
@@ -9064,7 +9075,7 @@ class x_ extends pt {
9064
9075
  i.push(s);
9065
9076
  } else
9066
9077
  i = $e(this[n]);
9067
- V(j.STOP_CAPTURE, {
9078
+ j(V.STOP_CAPTURE, {
9068
9079
  stream_id: e,
9069
9080
  type: t,
9070
9081
  number: i.length
@@ -9075,30 +9086,32 @@ class x_ extends pt {
9075
9086
  }
9076
9087
  async startCameraCapture(e) {
9077
9088
  let t = {};
9078
- mf.includes(e) ? t = {
9089
+ _f.includes(e) ? t = {
9079
9090
  facingMode: e
9080
- } : t = {
9081
- deviceId: e
9082
- };
9091
+ } : e && (t = {
9092
+ deviceId: {
9093
+ exact: e
9094
+ }
9095
+ });
9083
9096
  const n = {
9084
9097
  ...t,
9085
9098
  ...this._videoConstraints
9086
9099
  };
9087
9100
  try {
9088
- const i = await Ju(
9101
+ const i = await Xu(
9089
9102
  n,
9090
9103
  !this._livePusher.isEnableMixing
9091
- ), s = new wd(i, {
9104
+ ), s = new Td(i, {
9092
9105
  frameRate: this._videoConstraints.frameRate
9093
9106
  });
9094
- return this._cameraStreams[s.id] = s, this._notifyCaptured(s), this._bindStreamEvent(s), V(j.CAMERA_CAPTURE_RESULT, {
9107
+ return this._cameraStreams[s.id] = s, this._notifyCaptured(s), this._bindStreamEvent(s), j(V.CAMERA_CAPTURE_RESULT, {
9095
9108
  is_success: !0,
9096
9109
  stream_id: s.id,
9097
9110
  device_id: e,
9098
9111
  capture_params: n
9099
9112
  }), s.id;
9100
9113
  } catch (i) {
9101
- throw V(j.CAMERA_CAPTURE_RESULT, {
9114
+ throw j(V.CAMERA_CAPTURE_RESULT, {
9102
9115
  is_success: !1,
9103
9116
  device_id: e,
9104
9117
  capture_params: n,
@@ -9107,28 +9120,34 @@ class x_ extends pt {
9107
9120
  }
9108
9121
  }
9109
9122
  async startMicrophoneCapture(e) {
9110
- const t = {
9123
+ let t = {};
9124
+ e && (t = {
9125
+ deviceId: {
9126
+ exact: e
9127
+ }
9128
+ });
9129
+ const n = {
9111
9130
  ...this._audioConstraints,
9112
- deviceId: e
9131
+ ...t
9113
9132
  };
9114
9133
  try {
9115
- const n = await Zu(t), i = new cf(n);
9116
- return this._microphoneStreams[i.id] = i, this._notifyCaptured(i), this._bindStreamEvent(i), V(j.MICROPHONE_CAPTURE_RESULT, {
9134
+ const i = await Yu(n), s = new uf(i);
9135
+ return this._microphoneStreams[s.id] = s, this._notifyCaptured(s), this._bindStreamEvent(s), j(V.MICROPHONE_CAPTURE_RESULT, {
9117
9136
  is_success: !0,
9118
- stream_id: i.id,
9137
+ stream_id: s.id,
9119
9138
  device_id: e,
9120
- capture_params: t
9121
- }), i.id;
9122
- } catch (n) {
9123
- throw V(j.MICROPHONE_CAPTURE_RESULT, {
9139
+ capture_params: n
9140
+ }), s.id;
9141
+ } catch (i) {
9142
+ throw j(V.MICROPHONE_CAPTURE_RESULT, {
9124
9143
  is_success: !1,
9125
9144
  device_id: e,
9126
- capture_params: t,
9127
- ...Pt(n)
9145
+ capture_params: n,
9146
+ ...Pt(i)
9128
9147
  }), this._handleError(
9129
- n,
9148
+ i,
9130
9149
  Re.OPEN_MICROPHONE_FAILED
9131
- ), n;
9150
+ ), i;
9132
9151
  }
9133
9152
  }
9134
9153
  async startScreenCapture(e) {
@@ -9137,20 +9156,20 @@ class x_ extends pt {
9137
9156
  video: this._videoConstraints
9138
9157
  };
9139
9158
  try {
9140
- const n = await Yu(
9159
+ const n = await Qu(
9141
9160
  t,
9142
9161
  void 0,
9143
9162
  !this._livePusher.isEnableMixing
9144
- ), i = new df(n, {
9163
+ ), i = new lf(n, {
9145
9164
  frameRate: this._videoConstraints.frameRate
9146
9165
  });
9147
- return this._screenStreams[i.id] = i, this._notifyCaptured(i), this._bindStreamEvent(i), V(j.SCREEN_CAPTURE_RESULT, {
9166
+ return this._screenStreams[i.id] = i, this._notifyCaptured(i), this._bindStreamEvent(i), j(V.SCREEN_CAPTURE_RESULT, {
9148
9167
  is_success: !0,
9149
9168
  stream_id: i.id,
9150
9169
  capture_params: t
9151
9170
  }), i.id;
9152
9171
  } catch (n) {
9153
- throw V(j.SCREEN_CAPTURE_RESULT, {
9172
+ throw j(V.SCREEN_CAPTURE_RESULT, {
9154
9173
  is_success: !1,
9155
9174
  capture_params: t,
9156
9175
  ...Pt(n)
@@ -9164,8 +9183,8 @@ class x_ extends pt {
9164
9183
  video: !0,
9165
9184
  audio: !0,
9166
9185
  loop: !0
9167
- }), n = new uf(t);
9168
- return this._videoFileStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), V(j.VIDEO_FILE_CAPTURE_RESULT, {
9186
+ }), n = new df(t);
9187
+ return this._videoFileStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), j(V.VIDEO_FILE_CAPTURE_RESULT, {
9169
9188
  is_success: !0,
9170
9189
  stream_id: n.id,
9171
9190
  file_url: e
@@ -9174,7 +9193,7 @@ class x_ extends pt {
9174
9193
  throw this._handleError(
9175
9194
  t,
9176
9195
  Re.VIDEO_FILE_CAPTURE_FAILED
9177
- ), V(j.VIDEO_FILE_CAPTURE_RESULT, {
9196
+ ), j(V.VIDEO_FILE_CAPTURE_RESULT, {
9178
9197
  is_success: !1,
9179
9198
  file_url: e,
9180
9199
  ...Pt(t)
@@ -9188,14 +9207,14 @@ class x_ extends pt {
9188
9207
  video: !1,
9189
9208
  audio: !0,
9190
9209
  loop: !0
9191
- }), n = new lf(t);
9192
- return this._audioFileStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), V(j.AUDIO_FILE_CAPTURE_RESULT, {
9210
+ }), n = new hf(t);
9211
+ return this._audioFileStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), j(V.AUDIO_FILE_CAPTURE_RESULT, {
9193
9212
  is_success: !0,
9194
9213
  stream_id: n.id,
9195
9214
  file_url: e
9196
9215
  }), n.id;
9197
9216
  } catch (t) {
9198
- throw V(j.AUDIO_FILE_CAPTURE_RESULT, {
9217
+ throw j(V.AUDIO_FILE_CAPTURE_RESULT, {
9199
9218
  is_success: !1,
9200
9219
  file_url: e,
9201
9220
  ...Pt(t)
@@ -9207,19 +9226,19 @@ class x_ extends pt {
9207
9226
  }
9208
9227
  async startImageCapture(e) {
9209
9228
  try {
9210
- const t = await Xu({
9229
+ const t = await Zu({
9211
9230
  url: e,
9212
9231
  width: 0,
9213
9232
  height: 0,
9214
9233
  frameRate: 30
9215
- }), n = new hf(t);
9216
- return this._imageStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), V(j.IMAGE_FILE_CAPTURE_RESULT, {
9234
+ }), n = new pf(t);
9235
+ return this._imageStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), j(V.IMAGE_FILE_CAPTURE_RESULT, {
9217
9236
  is_success: !0,
9218
9237
  stream_id: n.id,
9219
9238
  file_url: e
9220
9239
  }), n.id;
9221
9240
  } catch (t) {
9222
- throw V(j.IMAGE_FILE_CAPTURE_RESULT, {
9241
+ throw j(V.IMAGE_FILE_CAPTURE_RESULT, {
9223
9242
  is_success: !1,
9224
9243
  file_url: e,
9225
9244
  ...Pt(t)
@@ -9230,16 +9249,16 @@ class x_ extends pt {
9230
9249
  }
9231
9250
  }
9232
9251
  startCustomVideoCapture(e) {
9233
- const t = ed(e);
9252
+ const t = td(e);
9234
9253
  if (t) {
9235
- const n = new pf(t);
9254
+ const n = new ff(t);
9236
9255
  return this._customVideoStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), n.id;
9237
9256
  }
9238
9257
  }
9239
9258
  startCustomAudioCapture(e) {
9240
- const t = td(e);
9259
+ const t = rd(e);
9241
9260
  if (t) {
9242
- const n = new ff(t);
9261
+ const n = new mf(t);
9243
9262
  return this._customAudioStreams[n.id] = n, this._notifyCaptured(n), this._bindStreamEvent(n), n.id;
9244
9263
  }
9245
9264
  }
@@ -9247,12 +9266,12 @@ class x_ extends pt {
9247
9266
  const t = this.getStreamById(e);
9248
9267
  if (t)
9249
9268
  try {
9250
- await t.startVolumeDetect(), V(j.VOLUME_DETECTOR_START_RESULT, {
9269
+ await t.startVolumeDetect(), j(V.VOLUME_DETECTOR_START_RESULT, {
9251
9270
  is_success: !0,
9252
9271
  stream_id: t.id
9253
9272
  });
9254
9273
  } catch (n) {
9255
- V(j.VOLUME_DETECTOR_START_RESULT, {
9274
+ j(V.VOLUME_DETECTOR_START_RESULT, {
9256
9275
  is_success: !1,
9257
9276
  stream_id: t.id,
9258
9277
  error_message: n.message
@@ -9348,7 +9367,7 @@ class ns {
9348
9367
  }
9349
9368
  }
9350
9369
  const Eo = new ft("SingleComposer");
9351
- class I_ extends ns {
9370
+ class O_ extends ns {
9352
9371
  onStreamCapture(e) {
9353
9372
  e.isVideoStream ? this._handleVideoStreamCapture(e) : this._handleAudioStreamCapture(e);
9354
9373
  }
@@ -9419,7 +9438,7 @@ class I_ extends ns {
9419
9438
  return this._composedStream;
9420
9439
  }
9421
9440
  }
9422
- class z_ extends pt {
9441
+ class M_ extends pt {
9423
9442
  constructor(e, {
9424
9443
  width: t,
9425
9444
  height: n,
@@ -9601,16 +9620,16 @@ class Co extends Ht {
9601
9620
  this.source.stop(), delete this._trackMap.video;
9602
9621
  }
9603
9622
  }
9604
- var P_ = Object.defineProperty, O_ = Object.getOwnPropertyDescriptor, Gr = (r, e, t, n) => {
9605
- for (var i = O_(e, t), s = r.length - 1, a; s >= 0; s--)
9623
+ var L_ = Object.defineProperty, N_ = Object.getOwnPropertyDescriptor, Gr = (r, e, t, n) => {
9624
+ for (var i = N_(e, t), s = r.length - 1, a; s >= 0; s--)
9606
9625
  (a = r[s]) && (i = a(e, t, i) || i);
9607
- return i && P_(e, t, i), i;
9626
+ return i && L_(e, t, i), i;
9608
9627
  };
9609
- const ic = new ft("composition-composer");
9628
+ const sc = new ft("composition-composer");
9610
9629
  function Br(r, e, t) {
9611
9630
  const n = t.value;
9612
9631
  return t.value = function(...i) {
9613
- return this._active || ic.error("composer is not active"), n.apply(this, i);
9632
+ return this._active || sc.error("composer is not active"), n.apply(this, i);
9614
9633
  }, t;
9615
9634
  }
9616
9635
  class Wt extends ns {
@@ -9620,7 +9639,7 @@ class Wt extends ns {
9620
9639
  height: 720,
9621
9640
  frameRate: 30,
9622
9641
  backgroundColor: "#000000"
9623
- }, this._sprites = [], this._videoMixer = new yd();
9642
+ }, this._sprites = [], this._videoMixer = new Sd();
9624
9643
  }
9625
9644
  onStreamCapture(e) {
9626
9645
  }
@@ -9651,7 +9670,7 @@ class Wt extends ns {
9651
9670
  }
9652
9671
  _addSprite(e) {
9653
9672
  this._sprites.push(e), this._sprites = this._sprites.sort((t, n) => t.zOrder - n.zOrder), e.on("propsChange", (t) => {
9654
- af(t.zOrder) || (this._sprites = this._sprites.sort(
9673
+ cf(t.zOrder) || (this._sprites = this._sprites.sort(
9655
9674
  (n, i) => n.zOrder - i.zOrder
9656
9675
  )), this._updateSpriteToMixer();
9657
9676
  }), this._updateSpriteToMixer();
@@ -9673,14 +9692,14 @@ class Wt extends ns {
9673
9692
  }
9674
9693
  addVideoStream(e, t) {
9675
9694
  if (!e.viewNode) {
9676
- ic.error("have no viewNode for composition");
9695
+ sc.error("have no viewNode for composition");
9677
9696
  return;
9678
9697
  }
9679
9698
  e.audioTrack && this._streamComposeController.addAudioStream({
9680
9699
  streamId: e.id,
9681
9700
  volume: 100
9682
9701
  });
9683
- const n = new z_(e, t);
9702
+ const n = new M_(e, t);
9684
9703
  this._addSprite(n);
9685
9704
  }
9686
9705
  _updateSingleVideoStream(e) {
@@ -9756,7 +9775,7 @@ Gr([
9756
9775
  Gr([
9757
9776
  Br
9758
9777
  ], Wt.prototype, "unmuteVideoStream");
9759
- class M_ extends pt {
9778
+ class U_ extends pt {
9760
9779
  constructor(e, { volume: t }) {
9761
9780
  super(), this._volume = 100, this._isMute = !1, this._volume = t ?? 100, this._stream = e;
9762
9781
  }
@@ -9784,7 +9803,7 @@ class M_ extends pt {
9784
9803
  return this._stream;
9785
9804
  }
9786
9805
  }
9787
- class L_ extends En {
9806
+ class G_ extends En {
9788
9807
  constructor(e) {
9789
9808
  super({
9790
9809
  type: ee.MixAudio,
@@ -9808,9 +9827,9 @@ class L_ extends En {
9808
9827
  (e = this._trackMap.audio) == null || e.stop(), delete this._trackMap.audio;
9809
9828
  }
9810
9829
  }
9811
- class N_ extends ns {
9830
+ class B_ extends ns {
9812
9831
  constructor(e) {
9813
- super(e), this._spriteList = [], this._audioMixer = new nd({
9832
+ super(e), this._spriteList = [], this._audioMixer = new id({
9814
9833
  keepAlive: !0
9815
9834
  });
9816
9835
  }
@@ -9831,11 +9850,11 @@ class N_ extends ns {
9831
9850
  }
9832
9851
  enable() {
9833
9852
  super.enable();
9834
- const e = this._audioMixer.track(), t = new L_(e);
9853
+ const e = this._audioMixer.track(), t = new G_(e);
9835
9854
  this._composedStream.setAudioStream(t), this._audioMixer.mix([]);
9836
9855
  }
9837
9856
  addAudioStream(e, t) {
9838
- const n = new M_(e, t);
9857
+ const n = new U_(e, t);
9839
9858
  this._spriteList.push(n), this._updateSpriteToMixer();
9840
9859
  }
9841
9860
  tryResume() {
@@ -9881,7 +9900,7 @@ class N_ extends ns {
9881
9900
  return this._spriteList.filter((t) => t.stream.type === e).map((t) => t.stream);
9882
9901
  }
9883
9902
  }
9884
- class U_ extends pt {
9903
+ class F_ extends pt {
9885
9904
  constructor({
9886
9905
  videoStream: e,
9887
9906
  audioStream: t
@@ -9911,10 +9930,10 @@ class U_ extends pt {
9911
9930
  return (e = this._audioStream) == null ? void 0 : e.audioTrack;
9912
9931
  }
9913
9932
  }
9914
- const G_ = new ft("streamComposeController");
9915
- class B_ {
9933
+ const V_ = new ft("streamComposeController");
9934
+ class j_ {
9916
9935
  constructor(e) {
9917
- this._streamManagerController = e, this._composedStream = new U_(), this.singleComposer = new I_({
9936
+ this._streamManagerController = e, this._composedStream = new F_(), this.singleComposer = new O_({
9918
9937
  streamManagerController: this._streamManagerController,
9919
9938
  composedStream: this._composedStream,
9920
9939
  streamComposeController: this
@@ -9922,7 +9941,7 @@ class B_ {
9922
9941
  streamManagerController: this._streamManagerController,
9923
9942
  composedStream: this._composedStream,
9924
9943
  streamComposeController: this
9925
- }), this.mixerComposer = new N_({
9944
+ }), this.mixerComposer = new B_({
9926
9945
  streamManagerController: this._streamManagerController,
9927
9946
  composedStream: this._composedStream,
9928
9947
  streamComposeController: this
@@ -9971,7 +9990,7 @@ class B_ {
9971
9990
  e.streamId
9972
9991
  );
9973
9992
  if (!t) {
9974
- G_.error("can not find video stream" + e.streamId);
9993
+ V_.error("can not find video stream" + e.streamId);
9975
9994
  return;
9976
9995
  }
9977
9996
  this.compositionComposer.addVideoStream(t, e);
@@ -10025,7 +10044,7 @@ class B_ {
10025
10044
  return this.compositionComposer.getDrawCountPerSecond();
10026
10045
  }
10027
10046
  }
10028
- class sc {
10047
+ class oc {
10029
10048
  constructor(e) {
10030
10049
  this._hasBindComposedStreamEvent = !1, this._composedStream = e;
10031
10050
  }
@@ -10049,7 +10068,7 @@ class sc {
10049
10068
  }
10050
10069
  }
10051
10070
  const Ot = new ft("PreviewConsumer");
10052
- class F_ extends sc {
10071
+ class H_ extends oc {
10053
10072
  constructor(e, {
10054
10073
  streamConsumeController: t
10055
10074
  }) {
@@ -10587,7 +10606,7 @@ function is() {
10587
10606
  }), ai.exports;
10588
10607
  }
10589
10608
  var To;
10590
- function V_() {
10609
+ function q_() {
10591
10610
  return To || (To = 1, function(r) {
10592
10611
  var e = function(o) {
10593
10612
  return String(Number(o)) === o ? Number(o) : o;
@@ -10652,7 +10671,7 @@ function V_() {
10652
10671
  }(oi)), oi;
10653
10672
  }
10654
10673
  var ci, ko;
10655
- function j_() {
10674
+ function $_() {
10656
10675
  if (ko) return ci;
10657
10676
  ko = 1;
10658
10677
  var r = is(), e = /%[sdv%]/g, t = function(a) {
@@ -10722,20 +10741,20 @@ function j_() {
10722
10741
  }, ci;
10723
10742
  }
10724
10743
  var Ro;
10725
- function H_() {
10744
+ function K_() {
10726
10745
  if (Ro) return Ne;
10727
10746
  Ro = 1;
10728
- var r = V_(), e = j_(), t = is();
10747
+ var r = q_(), e = $_(), t = is();
10729
10748
  return Ne.grammar = t, Ne.write = e, Ne.parse = r.parse, Ne.parseParams = r.parseParams, Ne.parseFmtpConfig = r.parseFmtpConfig, Ne.parsePayloads = r.parsePayloads, Ne.parseRemoteCandidates = r.parseRemoteCandidates, Ne.parseImageAttributes = r.parseImageAttributes, Ne.parseSimulcastStreamList = r.parseSimulcastStreamList, Ne;
10730
10749
  }
10731
- var q_ = H_();
10732
- const Mt = /* @__PURE__ */ _n(q_);
10750
+ var W_ = K_();
10751
+ const Mt = /* @__PURE__ */ _n(W_);
10733
10752
  function An(r) {
10734
10753
  return new Promise((e) => {
10735
10754
  setTimeout(e, r);
10736
10755
  });
10737
10756
  }
10738
- async function $_(r, e = {}, t = 0) {
10757
+ async function J_(r, e = {}, t = 0) {
10739
10758
  const n = new AbortController();
10740
10759
  let i = !1;
10741
10760
  e = Object.assign({}, e, { signal: n.signal });
@@ -10762,15 +10781,15 @@ async function $_(r, e = {}, t = 0) {
10762
10781
  throw i = !0, a;
10763
10782
  }
10764
10783
  }
10765
- async function oc(r, e = {}, t = {}) {
10784
+ async function ac(r, e = {}, t = {}) {
10766
10785
  const { timeout: n = 0, retryDelay: i = 0 } = t;
10767
10786
  let { retryCount: s = 0 } = t;
10768
10787
  try {
10769
- return await $_(r, e, n);
10788
+ return await J_(r, e, n);
10770
10789
  } catch (a) {
10771
10790
  if (s--, t.retryCount = s, s < 0)
10772
10791
  throw a;
10773
- return await An(i), await oc(r, e, t);
10792
+ return await An(i), await ac(r, e, t);
10774
10793
  }
10775
10794
  }
10776
10795
  const Ai = -1;
@@ -10804,7 +10823,7 @@ async function Di(r, e) {
10804
10823
  transport: le("transport", i)
10805
10824
  }), t;
10806
10825
  }
10807
- async function K_(r, e, t) {
10826
+ async function X_(r, e, t) {
10808
10827
  var u, h, l, f, y, C, v, E, k, g, D, L, R, M, N, U, B, H, Z, W, ue, ce, ye, Se, be, ve, De, Le, Ee, rt, mt, _t, Jt, Fr, Vr, jr, Xt, nt, Zt;
10809
10828
  const n = await Di(e, t);
10810
10829
  await An(r);
@@ -10863,7 +10882,7 @@ async function K_(r, e, t) {
10863
10882
  function se(r, e = Ai) {
10864
10883
  return r ?? e;
10865
10884
  }
10866
- function W_(r) {
10885
+ function Z_(r) {
10867
10886
  var e, t, n, i, s, a, o, d, c, u, h, l, f, y, C, v, E, k, g, D, L, R, M, N, U, B, H, Z, W, ue, ce, ye, Se, be, ve, De, Le, Ee, rt, mt, _t;
10868
10887
  return {
10869
10888
  // outbound-rtp info
@@ -10910,7 +10929,7 @@ function W_(r) {
10910
10929
  audio_remote_port: (_t = r.remoteCandidate) == null ? void 0 : _t.port
10911
10930
  };
10912
10931
  }
10913
- function J_(r) {
10932
+ function Y_(r) {
10914
10933
  var e, t, n, i, s, a, o, d, c, u, h, l, f, y, C, v, E, k, g, D, L, R, M, N, U, B, H, Z, W, ue, ce, ye, Se, be, ve, De, Le;
10915
10934
  return {
10916
10935
  // outbound-rtp info
@@ -10955,9 +10974,9 @@ function J_(r) {
10955
10974
  video_input_frame_height: (Le = r.mediaSource) == null ? void 0 : Le.height
10956
10975
  };
10957
10976
  }
10958
- function X_(r, e, t) {
10977
+ function Q_(r, e, t) {
10959
10978
  var c, u, h, l, f, y, C, v, E, k, g, D, L, R, M, N, U, B, H, Z, W, ue, ce, ye, Se, be, ve;
10960
- const n = J_(e.video ?? {}), { video_input_frame_width: i, video_input_frame_height: s } = n, a = se((c = r.video) == null ? void 0 : c.frameWidth), o = se(
10979
+ const n = Y_(e.video ?? {}), { video_input_frame_width: i, video_input_frame_height: s } = n, a = se((c = r.video) == null ? void 0 : c.frameWidth), o = se(
10961
10980
  (u = r.video) == null ? void 0 : u.frameHeight
10962
10981
  ), d = a < Number(i) || o < Number(s);
10963
10982
  return {
@@ -11000,7 +11019,7 @@ function X_(r, e, t) {
11000
11019
  1
11001
11020
  ) * 100 : Ai,
11002
11021
  video_resolution_downgrade: d,
11003
- ...W_(e.audio ?? {}),
11022
+ ...Z_(e.audio ?? {}),
11004
11023
  audio_send_k_bitrate: se((W = r.audio) == null ? void 0 : W.sendBitrate) / 1e3,
11005
11024
  audio_send_channels: se((ue = r.audio) == null ? void 0 : ue.channels),
11006
11025
  audio_packets_sent: se((ce = r.audio) == null ? void 0 : ce.packetsSent),
@@ -11010,7 +11029,7 @@ function X_(r, e, t) {
11010
11029
  audio_delta_energy: (ve = r.audio) == null ? void 0 : ve.deltaAudioEnergy
11011
11030
  };
11012
11031
  }
11013
- function Z_(r) {
11032
+ function eg(r) {
11014
11033
  return {
11015
11034
  video_send_k_bitrate: r.video.sendBitrate / 1e3,
11016
11035
  video_send_frame_rate: r.video.framesPerSecond,
@@ -11027,7 +11046,7 @@ function Z_(r) {
11027
11046
  audio_send_sample_rate: r.audio.sampleRate
11028
11047
  };
11029
11048
  }
11030
- const Y_ = "42001f", Q_ = "42e01f", eg = (r) => {
11049
+ const tg = "42001f", rg = "42e01f", ng = (r) => {
11031
11050
  var t;
11032
11051
  if (!na)
11033
11052
  return;
@@ -11035,15 +11054,15 @@ const Y_ = "42001f", Q_ = "42e01f", eg = (r) => {
11035
11054
  e && r.fmtp.forEach((n) => {
11036
11055
  n.payload === e && (n.config = "minptime=10;useinbandfec=1");
11037
11056
  });
11038
- }, tg = (r) => {
11039
- r.ext && (ou || gn) && (r.ext = r.ext.filter(
11057
+ }, ig = (r) => {
11058
+ r.ext && (au || gn) && (r.ext = r.ext.filter(
11040
11059
  (e) => {
11041
11060
  var t;
11042
11061
  return !((t = e.uri) != null && t.includes("video-orientation"));
11043
11062
  }
11044
11063
  ));
11045
11064
  };
11046
- function rg(r, e) {
11065
+ function sg(r, e) {
11047
11066
  r == null || r.rtp.forEach(({ codec: t, payload: n }) => {
11048
11067
  if (["vp8", "h264"].includes(t.toLocaleLowerCase())) {
11049
11068
  const i = r.fmtp.find((s) => s.payload === n);
@@ -11063,9 +11082,9 @@ function Ao(r, e) {
11063
11082
  if (!Array.isArray(r.fmtp) || !Array.isArray(r.rtp))
11064
11083
  return;
11065
11084
  const t = r.fmtp.find(
11066
- (a) => a.config && a.config.includes(Y_)
11085
+ (a) => a.config && a.config.includes(tg)
11067
11086
  ), n = r.fmtp.find(
11068
- (a) => a.config && a.config.includes(Q_)
11087
+ (a) => a.config && a.config.includes(rg)
11069
11088
  );
11070
11089
  if (!t || !n)
11071
11090
  return;
@@ -11088,7 +11107,7 @@ function Ao(r, e) {
11088
11107
  r.payloads = r.rtp.map((a) => a.payload).join(" ");
11089
11108
  }
11090
11109
  const _e = new ft("PCConnect");
11091
- class ng {
11110
+ class og {
11092
11111
  constructor(e, t, n) {
11093
11112
  this._pc = null, this._ms = new MediaStream(), this._signalUrl = "", this._videoTransceiver = null, this._audioTransceiver = null, this._opts = void 0, this._sessionId = Date.now(), this._signalUrl = e, this._opts = t, this._onConnectStateChange = n;
11094
11113
  }
@@ -11127,9 +11146,9 @@ class ng {
11127
11146
  _e.groupCollapsed("local offer"), _e.log(o.sdp);
11128
11147
  const d = Mt.parse(o.sdp);
11129
11148
  d.media.forEach((l) => {
11130
- l.type === "audio" ? eg(l) : l.type === "video" && (tg(l), Ao(l, "software"), rg(l, t[1]));
11149
+ l.type === "audio" ? ng(l) : l.type === "video" && (ig(l), Ao(l, "software"), sg(l, t[1]));
11131
11150
  }), o.sdp = Mt.write(d), _e.log("local offer modified"), _e.log(o.sdp), await i.setLocalDescription(o);
11132
- const c = await oc(
11151
+ const c = await ac(
11133
11152
  this._signalUrl,
11134
11153
  {
11135
11154
  method: "POST",
@@ -11164,7 +11183,7 @@ class ng {
11164
11183
  );
11165
11184
  return;
11166
11185
  }
11167
- V(j.PUSH_SDP_INFO, {
11186
+ j(V.PUSH_SDP_INFO, {
11168
11187
  offer_sdp: o.sdp,
11169
11188
  answer_sdp: c.remoteSdp.sdp
11170
11189
  }), await i.setRemoteDescription(c.remoteSdp);
@@ -11214,7 +11233,7 @@ class ng {
11214
11233
  }
11215
11234
  getStatsSnapshoot(e) {
11216
11235
  var t, n;
11217
- return K_(
11236
+ return X_(
11218
11237
  e || 100,
11219
11238
  (t = this._audioTransceiver) == null ? void 0 : t.sender,
11220
11239
  (n = this._videoTransceiver) == null ? void 0 : n.sender
@@ -11228,7 +11247,7 @@ class ng {
11228
11247
  }
11229
11248
  }
11230
11249
  var ot = /* @__PURE__ */ ((r) => (r.OnError = "onerror", r.OnConnectClosed = "onconnectclosed", r.OnFirstFramePushed = "onfirstframepushed", r))(ot || {}), at = /* @__PURE__ */ ((r) => (r.Video = "video", r.Audio = "audio", r))(at || {}), Pe = /* @__PURE__ */ ((r) => (r.Init = "init", r.AvExist = "avexist", r.VideoFrame = "videoframe", r.MockVideoEncode = "mockvideoencode", r.AudioFrame = "audioframe", r.AdjustBitrate = "adjustbitrate", r.Publish = "publish", r.UnPublish = "unpublish", r.Download = "download", r.GetStats = "getstats", r.EncodeConfig = "encodeconfig", r))(Pe || {}), yt = /* @__PURE__ */ ((r) => (r.Ready = "ready", r.Error = "error", r.FirstFramePushed = "firstframepushed", r.Flvfile = "flvfile", r.STATS = "stats", r.Close = "close", r))(yt || {}), ui = { exports: {} }, Do;
11231
- function ig() {
11250
+ function ag() {
11232
11251
  return Do || (Do = 1, function(r) {
11233
11252
  var e = Object.prototype.hasOwnProperty, t = "~";
11234
11253
  function n() {
@@ -11334,10 +11353,10 @@ function ig() {
11334
11353
  }, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = t, o.EventEmitter = o, r.exports = o;
11335
11354
  }(ui)), ui.exports;
11336
11355
  }
11337
- var sg = ig();
11338
- const og = /* @__PURE__ */ _n(sg);
11356
+ var cg = ag();
11357
+ const ug = /* @__PURE__ */ _n(cg);
11339
11358
  var fn = /* @__PURE__ */ ((r) => (r[r.RTMP_INIT_FAIL = 3e3] = "RTMP_INIT_FAIL", r[r.AUDIO_ENCODER_INIT_FAIL = 3001] = "AUDIO_ENCODER_INIT_FAIL", r[r.AUDIO_RRNOISE_INIT_FAIL = 3002] = "AUDIO_RRNOISE_INIT_FAIL", r[r.AUDIO_ENCODE_FAIL = 3003] = "AUDIO_ENCODE_FAIL", r[r.VIDEO_ENCODE_CONFIGURE_FAIL = 3004] = "VIDEO_ENCODE_CONFIGURE_FAIL", r[r.VIDEO_ENCODE_FAIL = 3005] = "VIDEO_ENCODE_FAIL", r[r.WTP_OPEN_FAIL = 3006] = "WTP_OPEN_FAIL", r[r.WTP_CONNECT_FAIL = 3007] = "WTP_CONNECT_FAIL", r[r.WORKER_ERROR = 3008] = "WORKER_ERROR", r))(fn || {});
11340
- class ac extends Error {
11359
+ class cc extends Error {
11341
11360
  constructor(e, t, n) {
11342
11361
  super(), this.code = e, this.message = t, n && (this.ext = n), this.toJson = () => ({
11343
11362
  code: this.code,
@@ -11347,7 +11366,7 @@ class ac extends Error {
11347
11366
  }
11348
11367
  }
11349
11368
  function xo(r, e, t) {
11350
- return new ac(r, e, t);
11369
+ return new cc(r, e, t);
11351
11370
  }
11352
11371
  const Bt = class Bt {
11353
11372
  constructor(e) {
@@ -11380,7 +11399,7 @@ const Bt = class Bt {
11380
11399
  Bt.enable = !1, Bt.enableLong = !1;
11381
11400
  let ht = Bt;
11382
11401
  const xe = new ht("RTMP_Capture");
11383
- class ag {
11402
+ class dg {
11384
11403
  constructor(e) {
11385
11404
  this._videoFirstframeCaptured = !1, this._audioFirstframeCaptured = !1, this._videoProcessorReader = null, this._audioProcessorReader = null, this._bridge = e;
11386
11405
  }
@@ -11479,8 +11498,8 @@ class ag {
11479
11498
  });
11480
11499
  }
11481
11500
  }
11482
- const cc = '(function(){"use strict";var l=(i=>(i.OnVideoCaptured="onvideocaptured",i.OnAudioCaptured="onaudiocaptured",i.OnVideoCaptureNoOutput="onvideocapturenooutput",i.OnVideoEncoded="onvideoencoded",i.OnAudioEncoded="onaudioencoded",i.OnEncodedFrame="onencodedframe",i.OnPacketed="onpacketed",i.OnUpstreamFeedback="onupstreamfeedback",i.OnBitrateChanged="onbitratechanged",i))(l||{}),O=(i=>(i.OnError="onerror",i.OnConnectClosed="onconnectclosed",i.OnFirstFramePushed="onfirstframepushed",i))(O||{}),I=(i=>(i.Video="video",i.Audio="audio",i))(I||{}),v=(i=>(i.Init="init",i.AvExist="avexist",i.VideoFrame="videoframe",i.MockVideoEncode="mockvideoencode",i.AudioFrame="audioframe",i.AdjustBitrate="adjustbitrate",i.Publish="publish",i.UnPublish="unpublish",i.Download="download",i.GetStats="getstats",i.EncodeConfig="encodeconfig",i))(v||{}),w=(i=>(i.Ready="ready",i.Error="error",i.FirstFramePushed="firstframepushed",i.Flvfile="flvfile",i.STATS="stats",i.Close="close",i))(w||{});function $(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var k={exports:{}},U;function q(){return U||(U=1,function(i){var t=Object.prototype.hasOwnProperty,e="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(e=!1));function r(u,a,n){this.fn=u,this.context=a,this.once=n||!1}function o(u,a,n,h,m){if(typeof n!="function")throw new TypeError("The listener must be a function");var g=new r(n,h||u,m),f=e?e+a:a;return u._events[f]?u._events[f].fn?u._events[f]=[u._events[f],g]:u._events[f].push(g):(u._events[f]=g,u._eventsCount++),u}function _(u,a){--u._eventsCount===0?u._events=new s:delete u._events[a]}function c(){this._events=new s,this._eventsCount=0}c.prototype.eventNames=function(){var a=[],n,h;if(this._eventsCount===0)return a;for(h in n=this._events)t.call(n,h)&&a.push(e?h.slice(1):h);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(n)):a},c.prototype.listeners=function(a){var n=e?e+a:a,h=this._events[n];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,f=new Array(g);m<g;m++)f[m]=h[m].fn;return f},c.prototype.listenerCount=function(a){var n=e?e+a:a,h=this._events[n];return h?h.fn?1:h.length:0},c.prototype.emit=function(a,n,h,m,g,f){var F=e?e+a:a;if(!this._events[F])return!1;var d=this._events[F],C=arguments.length,N,p;if(d.fn){switch(d.once&&this.removeListener(a,d.fn,void 0,!0),C){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,n),!0;case 3:return d.fn.call(d.context,n,h),!0;case 4:return d.fn.call(d.context,n,h,m),!0;case 5:return d.fn.call(d.context,n,h,m,g),!0;case 6:return d.fn.call(d.context,n,h,m,g,f),!0}for(p=1,N=new Array(C-1);p<C;p++)N[p-1]=arguments[p];d.fn.apply(d.context,N)}else{var fe=d.length,R;for(p=0;p<fe;p++)switch(d[p].once&&this.removeListener(a,d[p].fn,void 0,!0),C){case 1:d[p].fn.call(d[p].context);break;case 2:d[p].fn.call(d[p].context,n);break;case 3:d[p].fn.call(d[p].context,n,h);break;case 4:d[p].fn.call(d[p].context,n,h,m);break;default:if(!N)for(R=1,N=new Array(C-1);R<C;R++)N[R-1]=arguments[R];d[p].fn.apply(d[p].context,N)}}return!0},c.prototype.on=function(a,n,h){return o(this,a,n,h,!1)},c.prototype.once=function(a,n,h){return o(this,a,n,h,!0)},c.prototype.removeListener=function(a,n,h,m){var g=e?e+a:a;if(!this._events[g])return this;if(!n)return _(this,g),this;var f=this._events[g];if(f.fn)f.fn===n&&(!m||f.once)&&(!h||f.context===h)&&_(this,g);else{for(var F=0,d=[],C=f.length;F<C;F++)(f[F].fn!==n||m&&!f[F].once||h&&f[F].context!==h)&&d.push(f[F]);d.length?this._events[g]=d.length===1?d[0]:d:_(this,g)}return this},c.prototype.removeAllListeners=function(a){var n;return a?(n=e?e+a:a,this._events[n]&&_(this,n)):(this._events=new s,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=e,c.EventEmitter=c,i.exports=c}(k)),k.exports}var z=q(),H=$(z);const x=class x{constructor(t){this.group=(...e)=>{this._enabled&&console.group(`[${this._prefix}]: `,...e)},this.groupCollapsed=(...e)=>{this._enabled&&console.groupCollapsed(`[${this._prefix}]: `,...e)},this.groupEnd=()=>{this._enabled&&console.groupEnd()},this.log=(...e)=>{this._enabled&&console.log(`[${this._prefix}]: `,...e)},this.warn=(...e)=>{this._enabled&&console.warn(`[${this._prefix}]: `,...e)},this.error=(...e)=>{this._enabled&&console.error(`[${this._prefix}]: `,...e)},this.table=(...e)=>{this._enabled&&console.table(...e)},this._prefix=t}get _enabled(){return x.enable}get _enableLong(){return x.enableLong}get long(){return this._enableLong}};x.enable=!1,x.enableLong=!1;let E=x;function S(i){i=i.filter(Boolean);const t=new Uint8Array(i.reduce((s,r)=>s+r.byteLength,0));let e=0;return i.forEach(s=>{t.set(s,e),e+=s.byteLength}),t}const A={codec:"avc1.4DE033",MaxCachedFrameSize:100,RealSpeedPercent:.8,UplinkBitrateCheckInterval:60*1e3,VideoBitrateDefault:1e6,AudioBitrateDefault:68e3,gopSize:90,sampleRate:48e3,channel:2,audioEncoderPath:"https://lf-unpkg.volccdn.com/obj/vcloudfe/sdk/Web_push/1.0.1/1735619140327/pcm2aac.js",audioEncoderWasmPath:"https://lf-unpkg.volccdn.com/obj/vcloudfe/sdk/Web_push/1.0.2/1735619208418/pcm2aac.wasm",ignoreRelPublish:!1},T=new E("RTMP_AudioEncoder");class j{constructor(t){this._encodedFrameCount=0,this._ready=!1,this._lastFrame=null,this._aacOutput=(e,s)=>{const r=this._module.HEAPU8.subarray(e,e+s);if(!this._lastFrame)return;this._encodedFrameCount++;const{props:o}=this._lastFrame,_={buffer:new Uint8Array(r),props:{timestamp:parseInt(o.timestamp/1e3),originTs:parseInt(o.timestamp/1e3)}};this._core.emit(l.OnAudioEncoded,_)},this._core=t}async init(){const t=await fetch(A.audioEncoderPath).then(_=>_.text());new Function(`self.exports={};${t}`)();const e=self.exports.m;let s,r;const o=new Promise((_,c)=>{r=_,s=c});return e({instantiateWasm:function(_,c){fetch(A.audioEncoderWasmPath).then(u=>u.arrayBuffer()).then(u=>WebAssembly.instantiate(u,_)).then(function(u){return c(u.instance)}).then(()=>{r(),T.log("aac module inited")}).catch(u=>{s(u)})}}).then(_=>{const c=_.addFunction(this._aacOutput,"vii");_._init_callback(c),this._module=_}).catch(s),o}rnnoise(t){var s;const e=t.length;for(let r=0;r<e;r++)t[r]=t[r]*32768;(s=this._rnnoiseModule)==null||s.processFrame(t);for(let r=0;r<e;r++)t[r]=t[r]/32768}updateConfigure(){this._module._flush(),this._module._free_encoder(),this._ready=!1}encode(t){if(!this._ready){const o=this._start_encoder();if(o<0)throw new Error(`init aac encoder error, code:${o}`)}this._lastFrame=t;const e=t.buffer.buffer,s=this._module._malloc(e.byteLength);this._module.HEAPU8.subarray(s,s+e.byteLength).set(new Uint8Array(e));const r=this._module._encode_one_frame(s);if(r<0)throw new Error(`encode aac frame error, code:${r}`)}_start_encoder(){const t=this._core.getSetting(),e=this._module._init_encoder(t.sampleRate,t.channel,t.audioBitrate);if(e<0)return e;this._ready=!0,T.log(`init encoder: sampleRate=${t.sampleRate}, channel:${t.channel}, bitrate:${t.audioBitrate}`)}destroy(){var t;(t=this._module)==null||t._free_encoder()}}const P=1024;class M{constructor(){this._queue=[],this._sampleCount=0}compose(t){if(this._queue.push(t),this._sampleCount+=t.data.audioData.numberOfFrames,this._sampleCount>=P)return this._doCompose()}_doCompose(){const t=new Float32Array(P);let e=0,s=P;const r=this._queue[0];for(;;){const o=this._queue[0];if(!o)break;const _=Math.min(s,o.data.audioData.numberOfFrames-o.offset,480),c=o.data.buffer.slice(o.offset,o.offset+_);if(o.offset+=_,o.offset>=o.data.audioData.numberOfFrames&&this._queue.shift(),s-=_,this._sampleCount-=_,t.set(c,e),e+=_,s<=0)break}return{buffer:t,props:{timestamp:r.data.audioData.timestamp,sampleRate:r.data.audioData.sampleRate,numberOfChannels:r.data.audioData.numberOfChannels}}}}var y=(i=>(i[i.RTMP_INIT_FAIL=3e3]="RTMP_INIT_FAIL",i[i.AUDIO_ENCODER_INIT_FAIL=3001]="AUDIO_ENCODER_INIT_FAIL",i[i.AUDIO_RRNOISE_INIT_FAIL=3002]="AUDIO_RRNOISE_INIT_FAIL",i[i.AUDIO_ENCODE_FAIL=3003]="AUDIO_ENCODE_FAIL",i[i.VIDEO_ENCODE_CONFIGURE_FAIL=3004]="VIDEO_ENCODE_CONFIGURE_FAIL",i[i.VIDEO_ENCODE_FAIL=3005]="VIDEO_ENCODE_FAIL",i[i.WTP_OPEN_FAIL=3006]="WTP_OPEN_FAIL",i[i.WTP_CONNECT_FAIL=3007]="WTP_CONNECT_FAIL",i[i.WORKER_ERROR=3008]="WORKER_ERROR",i))(y||{});class W extends Error{constructor(t,e,s){super(),this.code=t,this.message=e,s&&(this.ext=s),this.toJson=()=>({code:this.code,message:this.message,ext:this.ext})}}function b(i,t,e){return new W(i,t,e)}class G{constructor(t){this._audioFrameQueue=new M,this.encode=e=>{const s=new Float32Array(e.numberOfFrames);e.copyTo(s,{planeIndex:0,frameOffset:0,frameCount:e.numberOfFrames});const r=this._audioFrameQueue.compose({offset:0,data:{audioData:e,buffer:s}});if(r)try{this._encoder.encode(r)}catch(o){this._core.emit(O.OnError,b(y.AUDIO_ENCODE_FAIL,o.message))}},this._core=t,this._encoder=new j(t)}async init(){try{await this._encoder.init()}catch(t){throw b(y.AUDIO_ENCODER_INIT_FAIL,t.message)}}setConfiguration(t){const e=Object.assign({},this._core.getSetting(),{audioBitrate:t});this._core.updateSetting(e),this._encoder.updateConfigure()}destroy(){this._encoder.destroy()}}const L=new E("RTMP_VEncoder");class J{constructor(t){this._encoder=null,this._queue=[],this._encodeTimer=0,this._loopEncodeTimer=0,this._frameIndex=0,this._gopSize=0,this._encodedFrameCount=0,this._lastFrame=null,this._startTimer=()=>{this._clearEncodeTimer(),this._encodeTimer=setInterval(()=>{const e=this._queue.shift();if(!(!e||!this._encoder||this._encoder.state==="closed"))try{this._encoder.encode(e,{keyFrame:this._frameIndex%this._gopSize===0}),this._frameIndex++,this._lastFrame&&this._lastFrame.close(),this._lastFrame=e}catch(s){L.log("encode frame error",s)}},5)},this._core=t}configurate(t){return this._gopSize=t.gopSize,this._encoder?this.flush().then(()=>this._configure(t)):this._configure(t)}_configure(t){return this._clearEncodeTimer(),L.log("start config encoder",t),VideoEncoder.isConfigSupported(t).then(e=>{if(!e.supported)throw new Error(`VideoEncoder not support config, ${JSON.stringify(t)}`);this._encoder=new VideoEncoder({output:(s,r)=>{const o=new Uint8Array(s.byteLength);s.copyTo(o),this._emitFrame(o,s,r)},error:s=>{this._clearEncodeTimer(),this._core.emit(O.OnError,b(y.VIDEO_ENCODE_FAIL,s.message))}}),this._encoder.configure(t),L.log("encoder configured")}).then(this._startTimer).catch(e=>{throw b(y.VIDEO_ENCODE_CONFIGURE_FAIL,e.message)})}_emitFrame(t,e,s){this._encodedFrameCount++,this._core.emit(l.OnVideoEncoded,{buffer:t,props:{byteLength:e.byteLength,duration:e.duration,timestamp:parseInt(e.timestamp/1e3),originTs:parseInt(e.timestamp/1e3),type:e.type},cfg:s.decoderConfig})}_clearEncodeTimer(){clearInterval(this._encodeTimer)}_clearLoopEncodeTimer(){this._loopEncodeTimer&&clearInterval(this._loopEncodeTimer)}flush(){return this._encoder?this._encoder.flush().then(()=>{var t;this._clearEncodeTimer(),(t=this._encoder)==null||t.close(),this._frameIndex=0,this._encoder=null,L.log("encoder flush & closed")}).catch(t=>{console.log("encoder flush & close error:",t)}):Promise.resolve()}encode(t){this._clearLoopEncodeTimer(),this._queue.push(t)}startLoop(t){if(!this._lastFrame)return;const e=Math.floor(1e3/t*1e3);L.log("start encode last frame looped, ",t,"increment:",e),this._loopEncodeTimer=setInterval(()=>{if(!this._lastFrame)return;const s=new VideoFrame(this._lastFrame,{duration:e,timestamp:(this._lastFrame.timestamp||0)+e});this._queue.push(s)},Math.floor(1e3/t))}destroy(){this._queue.forEach(t=>t.close()),this._lastFrame&&this._lastFrame.close(),this._clearEncodeTimer(),this._clearLoopEncodeTimer(),this.flush()}}const Q=new E("RTMP_VideoEncode");class K{constructor(t){this._core=t,this._encoder=new J(t)}async setConfiguration(t={}){const e=Object.assign({},this._core.getSetting(),t),s={width:e.width,height:e.height,displayWidth:e.width,displayHeight:e.height,bitrate:e.videoBitrate,framerate:Math.floor(e.frameRate),codec:e.codec,gopSize:e.gopSize,hardwareAcceleration:e.hardwareAcceleration};this._core.updateSetting(e),Q.log("set Configuration:",s,t);try{await this._encoder.configurate(s)}catch(r){this._core.emit(O.OnError,r)}}encode(t){this._encoder.encode(t)}startLoopEncodeLastFrame(){this._encoder.startLoop(this._core.getSetting().frameRate)}flushEncoder(){this._encoder.flush()}destroy(){this._encoder.destroy()}}const V=new E("RTMP_AVSync");class Z{constructor(t){this._videoFrameGot=!1,this._videoBaseDts=0,this._audioBaseDts=0,this._videoNextDts=0,this._videoLastDts=0,this._audioNextDts=0,this._lastVideoReceived=0,this._core=t}get avExist(){return this._core.getSetting().hasVideo&&this._core.getSetting().hasAudio}get videoRefDuration(){return parseInt(1e3/this._core.getSetting().frameRate)}get audioRefDuration(){return parseInt(1024/this._core.getSetting().sampleRate*1e3)}addVideoFrame(t){this._videoFrameGot||(this._videoFrameGot=!0);const e=t.props;if(Math.abs(this._videoNextDts-e.timestamp-this._videoBaseDts)>1e3){const r=Date.now()-this._lastVideoReceived;this._videoNextDts=this._videoNextDts===this._audioNextDts?this._videoNextDts+this.videoRefDuration:this._audioNextDts||this._videoNextDts+r,this._videoBaseDts=this._videoNextDts-e.timestamp,V.warn(`video stream timestamp breaked! dts:${this._videoNextDts} -> ${e.timestamp}, videoBaseDts=${this._videoBaseDts}, deltaToLastFrame=${r}`)}e.timestamp=e.timestamp+this._videoBaseDts;const s=e.timestamp-this._videoLastDts;return s>100&&V.warn("video frame large gap",s),this._videoLastDts=this._videoNextDts=e.timestamp,V.long&&V.log(`V frame, dts: ${e.timestamp}, originDts:${e.originTs}, videoBaseDts=${this._videoBaseDts}, type=${e.type}, duration=${s}`),this._lastVideoReceived=Date.now(),this._core.emit(l.OnEncodedFrame,I.Video,t),{size:t.buffer.length,duration:s,key:t.props.type==="key"}}addAudioFrame(t){if(this.avExist&&!this._videoFrameGot)return;const e=t.props;return this._audioBaseDts||(this._audioBaseDts=e.timestamp-this._videoNextDts),Math.abs(e.timestamp-this._audioBaseDts-this._audioNextDts)>1e3&&(this._audioBaseDts=this._audioNextDts+this.audioRefDuration-e.timestamp,V.warn(`audio stream timestamp breaked! dts:${this._audioNextDts} -> ${e.timestamp}, audioBaseDts=${this._audioBaseDts}`)),this._audioNextDts=e.timestamp=e.timestamp-this._audioBaseDts,V.long&&V.log(`A frame, dts: ${e.timestamp}, originDts:${e.originTs}`),this._core.emit(l.OnEncodedFrame,I.Audio,t),{size:t.buffer.length,duration:this.audioRefDuration}}}class X{constructor(){this._videoSize=0,this._videoDuration=0,this._videoBitrate=0,this._frameCount=0,this._fps=0,this._videoEncodedCount=0,this._keyCount=0,this._audioSize=0,this._audioDuration=0,this._audioBitrate=0,this._audioEncodedCount=0}get videoStats(){return{sendBitrate:this._videoBitrate,framesPerSecond:this._fps,framesEncoded:this._videoEncodedCount,keyFramesEncoded:this._keyCount}}get audioStats(){return{sendBitrate:this._audioBitrate,framesEncoded:this._audioEncodedCount}}addVideoSample({size:t,duration:e,key:s}){this._videoEncodedCount++,this._videoSize+=t,this._videoDuration+=e,this._frameCount++,s&&this._keyCount++,this._videoDuration>=1e3&&(this._videoBitrate=Math.floor(this._videoSize/this._videoDuration*8e3),this._fps=this._frameCount,this._frameCount=0,this._videoSize=0,this._videoDuration=0)}addAudioSample({size:t,duration:e}){this._audioEncodedCount++,this._audioSize+=t,this._audioDuration+=e,this._audioDuration>=1e3&&(this._audioBitrate=Math.floor(this._audioSize/this._audioDuration*1e3),this._audioSize=0,this._audioDuration=0)}}const Y=new E("RTMP_EncodeController");class ee{constructor(t){this._analyse=new X,this._gotFrame=!1,this._OnVideoCaptured=(e,s)=>{this._gotFrame=!0,this._videoSettingChanged(s)&&(Y.log("video track setting changed!",s),this._core.updateSetting({width:s.width,height:s.height,frameRate:s.frameRate,vDeviceId:s.deviceId}),this._videoEncode.setConfiguration()),this._videoEncode.encode(e)},this._OnVideoCaptureNoOutput=()=>{this._videoEncode.startLoopEncodeLastFrame()},this._OnAudioCaptured=e=>{this._gotFrame=!0,this._audioEncode.encode(e)},this._OnVideoEncoded=e=>{const s=this._avSync.addVideoFrame(e);this._analyse.addVideoSample(s)},this._OnAudioEncoded=e=>{if(!e.buffer.length)return;const s=this._avSync.addAudioFrame(e);s&&this._analyse.addAudioSample(s)},this._OnUpstreamFeedback=e=>{this._videoEncode.setConfiguration(e)},this._OnBitrateChanged=(e,s)=>{this._gotFrame&&(e===I.Video&&this._videoEncode.setConfiguration({videoBitrate:s}),e===I.Audio&&this._audioEncode.setConfiguration(s))},this._core=t,this._audioEncode=new G(t),this._videoEncode=new K(t),this._avSync=new Z(t),this._bindEvents()}getStats(){return{video:this._analyse.videoStats,audio:this._analyse.audioStats}}init(){return this._audioEncode.init()}_bindEvents(){this._core.on(l.OnVideoCaptured,this._OnVideoCaptured),this._core.on(l.OnAudioCaptured,this._OnAudioCaptured),this._core.on(l.OnVideoCaptureNoOutput,this._OnVideoCaptureNoOutput),this._core.on(l.OnVideoEncoded,this._OnVideoEncoded),this._core.on(l.OnAudioEncoded,this._OnAudioEncoded),this._core.on(l.OnUpstreamFeedback,this._OnUpstreamFeedback),this._core.on(l.OnBitrateChanged,this._OnBitrateChanged)}_videoSettingChanged(t){const e=this._core.getSetting();return t.width!==e.width||t.height!==e.height||Math.floor(t.frameRate)!==Math.floor(e.frameRate)||t.deviceId!==e.vDeviceId}destroy(){this._videoEncode.destroy(),this._audioEncode.destroy()}}var B=(i=>(i[i.AUDIO=8]="AUDIO",i[i.VIDEO=9]="VIDEO",i[i.SCRIPT_DATA=18]="SCRIPT_DATA",i))(B||{});const te=10,ie=1,se=7,oe={96e3:0,48e3:3,44100:4,22050:7,16e3:8,8e3:11};function re(i){const t=(i[4]&3)+1;let e;const s=[],r=[];let o=6;const _=i[5]&31;let c;for(let n=0;n<_;n++){if(c=i[o]<<8|i[o+1],o+=2,!c)continue;const h=i.subarray(o,o+c);o+=c,s.push(h)}const u=i[o];o++;let a;for(let n=0;n<u;n++)a=i[o]<<8|i[o+1],o+=2,a&&(r.push(i.subarray(o,o+a)),o+=a);return{sps:e,spsArr:s,ppsArr:r,nalUnitSize:t}}class ne{constructor(){this._cfg={hasVideo:!1,hasAudio:!1,sampleRate:48e3,channelCount:1},this._hasAudioSeqHeader=!1,this._hasVideoSeqHeader=!1}setConfig(t){this._cfg=Object.assign(this._cfg,t)}genHeader(){const t=[70,76,86,1,(this._cfg.hasAudio?1:0)<<2|(this._cfg.hasVideo?1:0),0,0,0,9,0,0,0,0];return new Uint8Array(t)}genSeqTag(t,e){let s;t===8?(s=this._genAudioTagPaylod(0,e),this._hasAudioSeqHeader=!0):(s=this._genVideoTagPayload(0,e),this._hasVideoSeqHeader=!0);const r=this._genTagHeader(t,s.length,e.props.timestamp),o=r.length+s.length;return S([r,s,new Uint8Array([o>>>24,o>>>16,o>>>8,o])])}genFrameTag(t,e){let s;t===8?s=this._genAudioTagPaylod(1,e):s=this._genVideoTagPayload(1,e);const r=this._genTagHeader(t,s.length,e.props.timestamp),o=r.length+s.length;return S([r,s,new Uint8Array([o>>>24,o>>>16,o>>>8,o])])}_genTagHeader(t,e,s){return new Uint8Array([t,e>>>16,e>>>8,e,s>>>16,s>>>8,s,s>>>24,0,0,0])}_genAudioTagPaylod(t,e){return S(t===0?[this._genAudioTagHeader(),this._genAudioSequenceHeader()]:[this._genAudioTagHeader(),this._genAudioData(e)])}_genAudioTagHeader(){return new Uint8Array([te<<4|12|ie<<1|this._cfg.channelCount-1])}_genAudioSequenceHeader(){const t=4096|oe[this._cfg.sampleRate]<<7|this._cfg.channelCount<<3;return new Uint8Array([0,t>>8,t])}_genAudioData(t){const e=new Uint8Array(1+t.buffer.length);return e.set([1],0),e.set(t.buffer,1),e}_genVideoTagPayload(t,e){return S(t===0?[this._genVideoTagHeader(e),this._genVideoSequenceHeader(e)]:[this._genVideoTagHeader(e),this._genVideoData(e)])}_genVideoTagHeader(t){return new Uint8Array([(t.props.type==="key"?1:2)<<4|se,this._hasVideoSeqHeader?1:0,0,0,0])}_genVideoSequenceHeader(t){return new Uint8Array(t.cfg.description)}_genVideoData(t){if(t.props.type==="delta")return t.buffer;const e=re(new Uint8Array(t.cfg.description)),s=e.spsArr[0].length,r=e.ppsArr[0].length;return S([new Uint8Array([0,0,s>>8,s%256]),e.spsArr[0],new Uint8Array([0,0,r>>8,r%256]),e.ppsArr[0],t.buffer])}}const ae=new E("RTMP_Packet");class de{constructor(t){this._firstFrame=!0,this._flv=new ne,this._OnEncodedFrame=(e,s)=>{if(this._firstFrame){const o=this._core.getSetting();this._flv.setConfig({hasVideo:o.hasVideo,hasAudio:o.hasAudio,sampleRate:o.sampleRate,channelCount:o.channel});const _=this._flv.genHeader();if(this._core.emit(l.OnPacketed,_),o.hasVideo){const c=this._flv.genSeqTag(B.VIDEO,s);this._core.emit(l.OnPacketed,c)}if(o.hasAudio){const c=this._flv.genSeqTag(B.AUDIO,s);this._core.emit(l.OnPacketed,c)}this._firstFrame=!1,ae.log("first frame encoded & packed")}const r=this._flv.genFrameTag(e==="video"?B.VIDEO:B.AUDIO,s);this._core.emit(l.OnPacketed,r,s.props.type==="key")},this._core=t,this._bindEvents()}_bindEvents(){this._core.on(l.OnEncodedFrame,this._OnEncodedFrame)}destroy(){}}class he{constructor(){this._lastDot=0,this._totalSize=0,this._speed=[]}addSample(t){this._lastDot||(this._lastDot=Date.now()),this._totalSize+=t;const e=Date.now()-this._lastDot;e>=500&&(this._addSpeedSample(this._totalSize/e*8e3),this._totalSize=0,this._lastDot=Date.now())}_addSpeedSample(t){this._speed.push(t),this._speed=this._speed.slice(-6)}reset(){this._speed=[]}getUpSpeed(){return this._speed.length?parseInt(this._speed.reduce((t,e)=>t+=e,0)/this._speed.length):0}}const D=new E("RTMP_Wtp");class ce{constructor(t){this._queue=[],this._url="",this._connectClosed=!1,this._upSpeed=new he,this._transport=null,this._writer=null,this._inWriting=!1,this._inAdjustEncode=!1,this._increaseTimer=0,this._firstFramePushed=!1,this._core=t,this._bindEvents()}get sendSpeed(){return this._upSpeed.getUpSpeed()}getStats(){var t;return(t=this._transport)==null?void 0:t.getStats()}_bindEvents(){this._core.on(l.OnPacketed,(t,e=!1)=>{this._checkDecreaseBitrate(),this._checkDeleteCache(e),this._queue.push(t),this._inWriting||this._write()})}_checkDecreaseBitrate(){if(this._inAdjustEncode)return;const t=this._upSpeed.getUpSpeed();if(!t||this._queue.length<A.MaxCachedFrameSize)return;D.log(`up speed: ${t} low, ajust encode setting`);const e=this._core.getSetting();this._core.emit(l.OnUpstreamFeedback,{videoBitrate:t*A.RealSpeedPercent,width:e.width,height:e.height,frameRate:e.frameRate}),this._inAdjustEncode=!0,this._checkIncreaseBitrate()}_checkIncreaseBitrate(){D.log("add timer to check uplink speed increased"),clearInterval(this._increaseTimer),this._increaseTimer=setTimeout(()=>{const t=this._core.getSetting();D.log(`set encode bitrate to specified ${t.videoBitrate}`),this._core.emit(l.OnUpstreamFeedback,{videoBitrate:t.videoBitrate,width:t.width,height:t.height,frameRate:t.frameRate}),this._inAdjustEncode=!0},A.UplinkBitrateCheckInterval)}_checkDeleteCache(t){this._inAdjustEncode&&t&&(D.log(`ajust encode setting finish, delete cached ${this._queue.length} frame`),this._queue=[],this._upSpeed.reset(),this._inAdjustEncode=!1)}async start(t){this._url=t;try{await this._connect()}catch(e){throw b(y.WTP_OPEN_FAIL,e.message)}}async _connect(){const t=new WebTransport(this._url);let e;t.closed.then(()=>{D.log("webtransport closed")}).catch(r=>{e=r.message,D.log("webtransport closed due to",r)}).finally(()=>{this._connectClosed=!0,this._core.emit(O.OnConnectClosed,e),this._core.emit(O.OnError,b(y.WTP_CONNECT_FAIL,e))}),await t.ready,this._transport=t;const s=await t.createBidirectionalStream();this._writer=s.writable.getWriter(),this._write(),D.log("transport opend")}async _write(){var e;if(!this._writer)return;this._inWriting=!0;const t=this._queue.shift();if(!t){this._inWriting=!1;return}await((e=this._writer)==null?void 0:e.write(t)),this._firstFramePushed||(this._firstFramePushed=!0,this._core.emit(O.OnFirstFramePushed),D.log("first frame pushed")),this._upSpeed.addSample(t.length);try{await this._write()}catch(s){D.log("writer error:",s)}}getFile(){return S(this._queue)}destroy(){var t,e;clearTimeout(this._increaseTimer),this._connectClosed||(t=this._writer)==null||t.close(),this._writer=null,(e=this._transport)==null||e.close(),this._transport=null}}const ue=new E("LiveRTMP");class _e extends H{constructor(){super(),this._ts=0,this._setting={codec:A.codec,hardwareAcceleration:"prefer-hardware",width:-1,height:-1,frameRate:-1,sampleRate:A.sampleRate,channel:A.channel,gopSize:A.gopSize,videoBitrate:A.VideoBitrateDefault,audioBitrate:A.AudioBitrateDefault,hasAudio:!1,hasVideo:!1,vDeviceId:"",aDeviceId:""},this._encode=new ee(this),this._packet=new de(this),this._transport=new ce(this)}async checkVideoHardwareAcceleration(){const t=["prefer-hardware","prefer-software","no-preference"],e=this.getSetting(),s={codec:e.codec,width:1280,height:720,framerate:15,bitrate:e.videoBitrate};for(const r of t)try{if((await VideoEncoder.isConfigSupported({...s,hardwareAcceleration:r})).supported)return this.updateSetting({hardwareAcceleration:r}),Promise.resolve()}catch{throw b(y.VIDEO_ENCODE_CONFIGURE_FAIL,`VideoEncoder not support hardwareAcceleration, ${JSON.stringify({...s,hardwareAcceleration:r})}`)}throw b(y.VIDEO_ENCODE_CONFIGURE_FAIL,"VideoEncoder not support hardwareAcceleration")}async ready(){await Promise.all([this.checkVideoHardwareAcceleration(),this._encode.init()])}getSetting(){return this._setting}updateSetting(t){this._setting=Object.assign({},this._setting,t)}videoFrameCaptured(t,e){this.emit(l.OnVideoCaptured,t,e)}audioFrameCaptured(t,e){this.emit(l.OnAudioCaptured,t,e)}startMockVideoEncode(){this.emit(l.OnVideoCaptureNoOutput)}adjustBitrate(t,e){t===I.Video&&this.updateSetting({videoBitrate:e}),t===I.Audio&&this.updateSetting({audioBitrate:e}),this.emit(l.OnBitrateChanged,t,e)}avExist(t,e){this._setting.hasVideo=t,this._setting.hasAudio=e}publish(t){return this._transport.start(t)}setEncodeCapacity(t){this._setting=Object.assign({},this._setting,t)}getStats(){return{video:{...this._encode.getStats().video,sendSpeed:this._transport.sendSpeed,codec:this._setting.codec,frameWidth:this._setting.width,frameHeight:this._setting.height,gopSize:this._setting.gopSize},audio:{...this._encode.getStats().audio,codec:"aac",channels:this._setting.channel,sampleRate:this._setting.sampleRate}}}destroy(){ue.log("destroy"),this._encode.destroy(),this._packet.destroy(),this._transport.destroy()}down(){return this._transport.getFile()}}self.constructor.name!=="Window"&&le();function le(){let i={};self.addEventListener("message",async t=>{switch(t.data.type){case v.Init:{const{options:e}=t.data;e.logEnable&&(E.enable=!0),e.logEnableLong&&(E.enableLong=!0),i=new _e,i.on(O.OnError,s=>{self.postMessage({type:w.Error,data:s.toJson()})}),i.on(O.OnConnectClosed,()=>{self.postMessage({type:w.Close})}),i.on(O.OnFirstFramePushed,()=>{self.postMessage({type:w.FirstFramePushed})});try{await i.ready(),self.postMessage({type:w.Ready})}catch(s){self.postMessage({type:w.Error,data:s.toJson()})}}break;case v.AvExist:{const{hasAudio:e,hasVideo:s}=t.data;i.avExist(s,e)}break;case v.VideoFrame:{const{frame:e,setting:s}=t.data;i.videoFrameCaptured(e,s)}break;case v.MockVideoEncode:i.startMockVideoEncode();break;case v.AudioFrame:{const{frame:e,setting:s}=t.data;i.audioFrameCaptured(e,s)}break;case v.AdjustBitrate:{const{kind:e,bitrate:s}=t.data;i.adjustBitrate(e,s)}break;case v.Publish:{const{url:e}=t.data;try{await i.publish(e)}catch(s){self.postMessage({type:w.Error,data:s.toJson()})}}break;case v.GetStats:self.postMessage({type:w.STATS,data:i.getStats()});break;case v.EncodeConfig:{i.setEncodeCapacity(t.data.cfg);break}case v.Download:{const e=i.down();self.postMessage({type:w.Flvfile,buffer:e},[e.buffer])}break;case v.UnPublish:{i.destroy();break}}})}})();\n', Io = typeof self < "u" && self.Blob && new Blob([cc], { type: "text/javascript;charset=utf-8" });
11483
- function cg(r) {
11501
+ const uc = '(function(){"use strict";var l=(i=>(i.OnVideoCaptured="onvideocaptured",i.OnAudioCaptured="onaudiocaptured",i.OnVideoCaptureNoOutput="onvideocapturenooutput",i.OnVideoEncoded="onvideoencoded",i.OnAudioEncoded="onaudioencoded",i.OnEncodedFrame="onencodedframe",i.OnPacketed="onpacketed",i.OnUpstreamFeedback="onupstreamfeedback",i.OnBitrateChanged="onbitratechanged",i))(l||{}),O=(i=>(i.OnError="onerror",i.OnConnectClosed="onconnectclosed",i.OnFirstFramePushed="onfirstframepushed",i))(O||{}),I=(i=>(i.Video="video",i.Audio="audio",i))(I||{}),v=(i=>(i.Init="init",i.AvExist="avexist",i.VideoFrame="videoframe",i.MockVideoEncode="mockvideoencode",i.AudioFrame="audioframe",i.AdjustBitrate="adjustbitrate",i.Publish="publish",i.UnPublish="unpublish",i.Download="download",i.GetStats="getstats",i.EncodeConfig="encodeconfig",i))(v||{}),w=(i=>(i.Ready="ready",i.Error="error",i.FirstFramePushed="firstframepushed",i.Flvfile="flvfile",i.STATS="stats",i.Close="close",i))(w||{});function $(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var k={exports:{}},U;function q(){return U||(U=1,function(i){var t=Object.prototype.hasOwnProperty,e="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(e=!1));function r(u,a,n){this.fn=u,this.context=a,this.once=n||!1}function o(u,a,n,h,m){if(typeof n!="function")throw new TypeError("The listener must be a function");var g=new r(n,h||u,m),f=e?e+a:a;return u._events[f]?u._events[f].fn?u._events[f]=[u._events[f],g]:u._events[f].push(g):(u._events[f]=g,u._eventsCount++),u}function _(u,a){--u._eventsCount===0?u._events=new s:delete u._events[a]}function c(){this._events=new s,this._eventsCount=0}c.prototype.eventNames=function(){var a=[],n,h;if(this._eventsCount===0)return a;for(h in n=this._events)t.call(n,h)&&a.push(e?h.slice(1):h);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(n)):a},c.prototype.listeners=function(a){var n=e?e+a:a,h=this._events[n];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,f=new Array(g);m<g;m++)f[m]=h[m].fn;return f},c.prototype.listenerCount=function(a){var n=e?e+a:a,h=this._events[n];return h?h.fn?1:h.length:0},c.prototype.emit=function(a,n,h,m,g,f){var F=e?e+a:a;if(!this._events[F])return!1;var d=this._events[F],C=arguments.length,N,p;if(d.fn){switch(d.once&&this.removeListener(a,d.fn,void 0,!0),C){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,n),!0;case 3:return d.fn.call(d.context,n,h),!0;case 4:return d.fn.call(d.context,n,h,m),!0;case 5:return d.fn.call(d.context,n,h,m,g),!0;case 6:return d.fn.call(d.context,n,h,m,g,f),!0}for(p=1,N=new Array(C-1);p<C;p++)N[p-1]=arguments[p];d.fn.apply(d.context,N)}else{var fe=d.length,R;for(p=0;p<fe;p++)switch(d[p].once&&this.removeListener(a,d[p].fn,void 0,!0),C){case 1:d[p].fn.call(d[p].context);break;case 2:d[p].fn.call(d[p].context,n);break;case 3:d[p].fn.call(d[p].context,n,h);break;case 4:d[p].fn.call(d[p].context,n,h,m);break;default:if(!N)for(R=1,N=new Array(C-1);R<C;R++)N[R-1]=arguments[R];d[p].fn.apply(d[p].context,N)}}return!0},c.prototype.on=function(a,n,h){return o(this,a,n,h,!1)},c.prototype.once=function(a,n,h){return o(this,a,n,h,!0)},c.prototype.removeListener=function(a,n,h,m){var g=e?e+a:a;if(!this._events[g])return this;if(!n)return _(this,g),this;var f=this._events[g];if(f.fn)f.fn===n&&(!m||f.once)&&(!h||f.context===h)&&_(this,g);else{for(var F=0,d=[],C=f.length;F<C;F++)(f[F].fn!==n||m&&!f[F].once||h&&f[F].context!==h)&&d.push(f[F]);d.length?this._events[g]=d.length===1?d[0]:d:_(this,g)}return this},c.prototype.removeAllListeners=function(a){var n;return a?(n=e?e+a:a,this._events[n]&&_(this,n)):(this._events=new s,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=e,c.EventEmitter=c,i.exports=c}(k)),k.exports}var z=q(),H=$(z);const x=class x{constructor(t){this.group=(...e)=>{this._enabled&&console.group(`[${this._prefix}]: `,...e)},this.groupCollapsed=(...e)=>{this._enabled&&console.groupCollapsed(`[${this._prefix}]: `,...e)},this.groupEnd=()=>{this._enabled&&console.groupEnd()},this.log=(...e)=>{this._enabled&&console.log(`[${this._prefix}]: `,...e)},this.warn=(...e)=>{this._enabled&&console.warn(`[${this._prefix}]: `,...e)},this.error=(...e)=>{this._enabled&&console.error(`[${this._prefix}]: `,...e)},this.table=(...e)=>{this._enabled&&console.table(...e)},this._prefix=t}get _enabled(){return x.enable}get _enableLong(){return x.enableLong}get long(){return this._enableLong}};x.enable=!1,x.enableLong=!1;let E=x;function S(i){i=i.filter(Boolean);const t=new Uint8Array(i.reduce((s,r)=>s+r.byteLength,0));let e=0;return i.forEach(s=>{t.set(s,e),e+=s.byteLength}),t}const A={codec:"avc1.4DE033",MaxCachedFrameSize:100,RealSpeedPercent:.8,UplinkBitrateCheckInterval:60*1e3,VideoBitrateDefault:1e6,AudioBitrateDefault:68e3,gopSize:90,sampleRate:48e3,channel:2,audioEncoderPath:"https://lf-unpkg.volccdn.com/obj/vcloudfe/sdk/Web_push/1.0.1/1735619140327/pcm2aac.js",audioEncoderWasmPath:"https://lf-unpkg.volccdn.com/obj/vcloudfe/sdk/Web_push/1.0.2/1735619208418/pcm2aac.wasm",ignoreRelPublish:!1},T=new E("RTMP_AudioEncoder");class j{constructor(t){this._encodedFrameCount=0,this._ready=!1,this._lastFrame=null,this._aacOutput=(e,s)=>{const r=this._module.HEAPU8.subarray(e,e+s);if(!this._lastFrame)return;this._encodedFrameCount++;const{props:o}=this._lastFrame,_={buffer:new Uint8Array(r),props:{timestamp:parseInt(o.timestamp/1e3),originTs:parseInt(o.timestamp/1e3)}};this._core.emit(l.OnAudioEncoded,_)},this._core=t}async init(){const t=await fetch(A.audioEncoderPath).then(_=>_.text());new Function(`self.exports={};${t}`)();const e=self.exports.m;let s,r;const o=new Promise((_,c)=>{r=_,s=c});return e({instantiateWasm:function(_,c){fetch(A.audioEncoderWasmPath).then(u=>u.arrayBuffer()).then(u=>WebAssembly.instantiate(u,_)).then(function(u){return c(u.instance)}).then(()=>{r(),T.log("aac module inited")}).catch(u=>{s(u)})}}).then(_=>{const c=_.addFunction(this._aacOutput,"vii");_._init_callback(c),this._module=_}).catch(s),o}rnnoise(t){var s;const e=t.length;for(let r=0;r<e;r++)t[r]=t[r]*32768;(s=this._rnnoiseModule)==null||s.processFrame(t);for(let r=0;r<e;r++)t[r]=t[r]/32768}updateConfigure(){this._module._flush(),this._module._free_encoder(),this._ready=!1}encode(t){if(!this._ready){const o=this._start_encoder();if(o<0)throw new Error(`init aac encoder error, code:${o}`)}this._lastFrame=t;const e=t.buffer.buffer,s=this._module._malloc(e.byteLength);this._module.HEAPU8.subarray(s,s+e.byteLength).set(new Uint8Array(e));const r=this._module._encode_one_frame(s);if(r<0)throw new Error(`encode aac frame error, code:${r}`)}_start_encoder(){const t=this._core.getSetting(),e=this._module._init_encoder(t.sampleRate,t.channel,t.audioBitrate);if(e<0)return e;this._ready=!0,T.log(`init encoder: sampleRate=${t.sampleRate}, channel:${t.channel}, bitrate:${t.audioBitrate}`)}destroy(){var t;(t=this._module)==null||t._free_encoder()}}const P=1024;class M{constructor(){this._queue=[],this._sampleCount=0}compose(t){if(this._queue.push(t),this._sampleCount+=t.data.audioData.numberOfFrames,this._sampleCount>=P)return this._doCompose()}_doCompose(){const t=new Float32Array(P);let e=0,s=P;const r=this._queue[0];for(;;){const o=this._queue[0];if(!o)break;const _=Math.min(s,o.data.audioData.numberOfFrames-o.offset,480),c=o.data.buffer.slice(o.offset,o.offset+_);if(o.offset+=_,o.offset>=o.data.audioData.numberOfFrames&&this._queue.shift(),s-=_,this._sampleCount-=_,t.set(c,e),e+=_,s<=0)break}return{buffer:t,props:{timestamp:r.data.audioData.timestamp,sampleRate:r.data.audioData.sampleRate,numberOfChannels:r.data.audioData.numberOfChannels}}}}var y=(i=>(i[i.RTMP_INIT_FAIL=3e3]="RTMP_INIT_FAIL",i[i.AUDIO_ENCODER_INIT_FAIL=3001]="AUDIO_ENCODER_INIT_FAIL",i[i.AUDIO_RRNOISE_INIT_FAIL=3002]="AUDIO_RRNOISE_INIT_FAIL",i[i.AUDIO_ENCODE_FAIL=3003]="AUDIO_ENCODE_FAIL",i[i.VIDEO_ENCODE_CONFIGURE_FAIL=3004]="VIDEO_ENCODE_CONFIGURE_FAIL",i[i.VIDEO_ENCODE_FAIL=3005]="VIDEO_ENCODE_FAIL",i[i.WTP_OPEN_FAIL=3006]="WTP_OPEN_FAIL",i[i.WTP_CONNECT_FAIL=3007]="WTP_CONNECT_FAIL",i[i.WORKER_ERROR=3008]="WORKER_ERROR",i))(y||{});class W extends Error{constructor(t,e,s){super(),this.code=t,this.message=e,s&&(this.ext=s),this.toJson=()=>({code:this.code,message:this.message,ext:this.ext})}}function b(i,t,e){return new W(i,t,e)}class G{constructor(t){this._audioFrameQueue=new M,this.encode=e=>{const s=new Float32Array(e.numberOfFrames);e.copyTo(s,{planeIndex:0,frameOffset:0,frameCount:e.numberOfFrames});const r=this._audioFrameQueue.compose({offset:0,data:{audioData:e,buffer:s}});if(r)try{this._encoder.encode(r)}catch(o){this._core.emit(O.OnError,b(y.AUDIO_ENCODE_FAIL,o.message))}},this._core=t,this._encoder=new j(t)}async init(){try{await this._encoder.init()}catch(t){throw b(y.AUDIO_ENCODER_INIT_FAIL,t.message)}}setConfiguration(t){const e=Object.assign({},this._core.getSetting(),{audioBitrate:t});this._core.updateSetting(e),this._encoder.updateConfigure()}destroy(){this._encoder.destroy()}}const L=new E("RTMP_VEncoder");class J{constructor(t){this._encoder=null,this._queue=[],this._encodeTimer=0,this._loopEncodeTimer=0,this._frameIndex=0,this._gopSize=0,this._encodedFrameCount=0,this._lastFrame=null,this._startTimer=()=>{this._clearEncodeTimer(),this._encodeTimer=setInterval(()=>{const e=this._queue.shift();if(!(!e||!this._encoder||this._encoder.state==="closed"))try{this._encoder.encode(e,{keyFrame:this._frameIndex%this._gopSize===0}),this._frameIndex++,this._lastFrame&&this._lastFrame.close(),this._lastFrame=e}catch(s){L.log("encode frame error",s)}},5)},this._core=t}configurate(t){return this._gopSize=t.gopSize,this._encoder?this.flush().then(()=>this._configure(t)):this._configure(t)}_configure(t){return this._clearEncodeTimer(),L.log("start config encoder",t),VideoEncoder.isConfigSupported(t).then(e=>{if(!e.supported)throw new Error(`VideoEncoder not support config, ${JSON.stringify(t)}`);this._encoder=new VideoEncoder({output:(s,r)=>{const o=new Uint8Array(s.byteLength);s.copyTo(o),this._emitFrame(o,s,r)},error:s=>{this._clearEncodeTimer(),this._core.emit(O.OnError,b(y.VIDEO_ENCODE_FAIL,s.message))}}),this._encoder.configure(t),L.log("encoder configured")}).then(this._startTimer).catch(e=>{throw b(y.VIDEO_ENCODE_CONFIGURE_FAIL,e.message)})}_emitFrame(t,e,s){this._encodedFrameCount++,this._core.emit(l.OnVideoEncoded,{buffer:t,props:{byteLength:e.byteLength,duration:e.duration,timestamp:parseInt(e.timestamp/1e3),originTs:parseInt(e.timestamp/1e3),type:e.type},cfg:s.decoderConfig})}_clearEncodeTimer(){clearInterval(this._encodeTimer)}_clearLoopEncodeTimer(){this._loopEncodeTimer&&clearInterval(this._loopEncodeTimer)}flush(){return this._encoder?this._encoder.flush().then(()=>{var t;this._clearEncodeTimer(),(t=this._encoder)==null||t.close(),this._frameIndex=0,this._encoder=null,L.log("encoder flush & closed")}).catch(t=>{console.log("encoder flush & close error:",t)}):Promise.resolve()}encode(t){this._clearLoopEncodeTimer(),this._queue.push(t)}startLoop(t){if(!this._lastFrame)return;const e=Math.floor(1e3/t*1e3);L.log("start encode last frame looped, ",t,"increment:",e),this._loopEncodeTimer=setInterval(()=>{if(!this._lastFrame)return;const s=new VideoFrame(this._lastFrame,{duration:e,timestamp:(this._lastFrame.timestamp||0)+e});this._queue.push(s)},Math.floor(1e3/t))}destroy(){this._queue.forEach(t=>t.close()),this._lastFrame&&this._lastFrame.close(),this._clearEncodeTimer(),this._clearLoopEncodeTimer(),this.flush()}}const Q=new E("RTMP_VideoEncode");class K{constructor(t){this._core=t,this._encoder=new J(t)}async setConfiguration(t={}){const e=Object.assign({},this._core.getSetting(),t),s={width:e.width,height:e.height,displayWidth:e.width,displayHeight:e.height,bitrate:e.videoBitrate,framerate:Math.floor(e.frameRate),codec:e.codec,gopSize:e.gopSize,hardwareAcceleration:e.hardwareAcceleration};this._core.updateSetting(e),Q.log("set Configuration:",s,t);try{await this._encoder.configurate(s)}catch(r){this._core.emit(O.OnError,r)}}encode(t){this._encoder.encode(t)}startLoopEncodeLastFrame(){this._encoder.startLoop(this._core.getSetting().frameRate)}flushEncoder(){this._encoder.flush()}destroy(){this._encoder.destroy()}}const V=new E("RTMP_AVSync");class Z{constructor(t){this._videoFrameGot=!1,this._videoBaseDts=0,this._audioBaseDts=0,this._videoNextDts=0,this._videoLastDts=0,this._audioNextDts=0,this._lastVideoReceived=0,this._core=t}get avExist(){return this._core.getSetting().hasVideo&&this._core.getSetting().hasAudio}get videoRefDuration(){return parseInt(1e3/this._core.getSetting().frameRate)}get audioRefDuration(){return parseInt(1024/this._core.getSetting().sampleRate*1e3)}addVideoFrame(t){this._videoFrameGot||(this._videoFrameGot=!0);const e=t.props;if(Math.abs(this._videoNextDts-e.timestamp-this._videoBaseDts)>1e3){const r=Date.now()-this._lastVideoReceived;this._videoNextDts=this._videoNextDts===this._audioNextDts?this._videoNextDts+this.videoRefDuration:this._audioNextDts||this._videoNextDts+r,this._videoBaseDts=this._videoNextDts-e.timestamp,V.warn(`video stream timestamp breaked! dts:${this._videoNextDts} -> ${e.timestamp}, videoBaseDts=${this._videoBaseDts}, deltaToLastFrame=${r}`)}e.timestamp=e.timestamp+this._videoBaseDts;const s=e.timestamp-this._videoLastDts;return s>100&&V.warn("video frame large gap",s),this._videoLastDts=this._videoNextDts=e.timestamp,V.long&&V.log(`V frame, dts: ${e.timestamp}, originDts:${e.originTs}, videoBaseDts=${this._videoBaseDts}, type=${e.type}, duration=${s}`),this._lastVideoReceived=Date.now(),this._core.emit(l.OnEncodedFrame,I.Video,t),{size:t.buffer.length,duration:s,key:t.props.type==="key"}}addAudioFrame(t){if(this.avExist&&!this._videoFrameGot)return;const e=t.props;return this._audioBaseDts||(this._audioBaseDts=e.timestamp-this._videoNextDts),Math.abs(e.timestamp-this._audioBaseDts-this._audioNextDts)>1e3&&(this._audioBaseDts=this._audioNextDts+this.audioRefDuration-e.timestamp,V.warn(`audio stream timestamp breaked! dts:${this._audioNextDts} -> ${e.timestamp}, audioBaseDts=${this._audioBaseDts}`)),this._audioNextDts=e.timestamp=e.timestamp-this._audioBaseDts,V.long&&V.log(`A frame, dts: ${e.timestamp}, originDts:${e.originTs}`),this._core.emit(l.OnEncodedFrame,I.Audio,t),{size:t.buffer.length,duration:this.audioRefDuration}}}class X{constructor(){this._videoSize=0,this._videoDuration=0,this._videoBitrate=0,this._frameCount=0,this._fps=0,this._videoEncodedCount=0,this._keyCount=0,this._audioSize=0,this._audioDuration=0,this._audioBitrate=0,this._audioEncodedCount=0}get videoStats(){return{sendBitrate:this._videoBitrate,framesPerSecond:this._fps,framesEncoded:this._videoEncodedCount,keyFramesEncoded:this._keyCount}}get audioStats(){return{sendBitrate:this._audioBitrate,framesEncoded:this._audioEncodedCount}}addVideoSample({size:t,duration:e,key:s}){this._videoEncodedCount++,this._videoSize+=t,this._videoDuration+=e,this._frameCount++,s&&this._keyCount++,this._videoDuration>=1e3&&(this._videoBitrate=Math.floor(this._videoSize/this._videoDuration*8e3),this._fps=this._frameCount,this._frameCount=0,this._videoSize=0,this._videoDuration=0)}addAudioSample({size:t,duration:e}){this._audioEncodedCount++,this._audioSize+=t,this._audioDuration+=e,this._audioDuration>=1e3&&(this._audioBitrate=Math.floor(this._audioSize/this._audioDuration*1e3),this._audioSize=0,this._audioDuration=0)}}const Y=new E("RTMP_EncodeController");class ee{constructor(t){this._analyse=new X,this._gotFrame=!1,this._OnVideoCaptured=(e,s)=>{this._gotFrame=!0,this._videoSettingChanged(s)&&(Y.log("video track setting changed!",s),this._core.updateSetting({width:s.width,height:s.height,frameRate:s.frameRate,vDeviceId:s.deviceId}),this._videoEncode.setConfiguration()),this._videoEncode.encode(e)},this._OnVideoCaptureNoOutput=()=>{this._videoEncode.startLoopEncodeLastFrame()},this._OnAudioCaptured=e=>{this._gotFrame=!0,this._audioEncode.encode(e)},this._OnVideoEncoded=e=>{const s=this._avSync.addVideoFrame(e);this._analyse.addVideoSample(s)},this._OnAudioEncoded=e=>{if(!e.buffer.length)return;const s=this._avSync.addAudioFrame(e);s&&this._analyse.addAudioSample(s)},this._OnUpstreamFeedback=e=>{this._videoEncode.setConfiguration(e)},this._OnBitrateChanged=(e,s)=>{this._gotFrame&&(e===I.Video&&this._videoEncode.setConfiguration({videoBitrate:s}),e===I.Audio&&this._audioEncode.setConfiguration(s))},this._core=t,this._audioEncode=new G(t),this._videoEncode=new K(t),this._avSync=new Z(t),this._bindEvents()}getStats(){return{video:this._analyse.videoStats,audio:this._analyse.audioStats}}init(){return this._audioEncode.init()}_bindEvents(){this._core.on(l.OnVideoCaptured,this._OnVideoCaptured),this._core.on(l.OnAudioCaptured,this._OnAudioCaptured),this._core.on(l.OnVideoCaptureNoOutput,this._OnVideoCaptureNoOutput),this._core.on(l.OnVideoEncoded,this._OnVideoEncoded),this._core.on(l.OnAudioEncoded,this._OnAudioEncoded),this._core.on(l.OnUpstreamFeedback,this._OnUpstreamFeedback),this._core.on(l.OnBitrateChanged,this._OnBitrateChanged)}_videoSettingChanged(t){const e=this._core.getSetting();return t.width!==e.width||t.height!==e.height||Math.floor(t.frameRate)!==Math.floor(e.frameRate)||t.deviceId!==e.vDeviceId}destroy(){this._videoEncode.destroy(),this._audioEncode.destroy()}}var B=(i=>(i[i.AUDIO=8]="AUDIO",i[i.VIDEO=9]="VIDEO",i[i.SCRIPT_DATA=18]="SCRIPT_DATA",i))(B||{});const te=10,ie=1,se=7,oe={96e3:0,48e3:3,44100:4,22050:7,16e3:8,8e3:11};function re(i){const t=(i[4]&3)+1;let e;const s=[],r=[];let o=6;const _=i[5]&31;let c;for(let n=0;n<_;n++){if(c=i[o]<<8|i[o+1],o+=2,!c)continue;const h=i.subarray(o,o+c);o+=c,s.push(h)}const u=i[o];o++;let a;for(let n=0;n<u;n++)a=i[o]<<8|i[o+1],o+=2,a&&(r.push(i.subarray(o,o+a)),o+=a);return{sps:e,spsArr:s,ppsArr:r,nalUnitSize:t}}class ne{constructor(){this._cfg={hasVideo:!1,hasAudio:!1,sampleRate:48e3,channelCount:1},this._hasAudioSeqHeader=!1,this._hasVideoSeqHeader=!1}setConfig(t){this._cfg=Object.assign(this._cfg,t)}genHeader(){const t=[70,76,86,1,(this._cfg.hasAudio?1:0)<<2|(this._cfg.hasVideo?1:0),0,0,0,9,0,0,0,0];return new Uint8Array(t)}genSeqTag(t,e){let s;t===8?(s=this._genAudioTagPaylod(0,e),this._hasAudioSeqHeader=!0):(s=this._genVideoTagPayload(0,e),this._hasVideoSeqHeader=!0);const r=this._genTagHeader(t,s.length,e.props.timestamp),o=r.length+s.length;return S([r,s,new Uint8Array([o>>>24,o>>>16,o>>>8,o])])}genFrameTag(t,e){let s;t===8?s=this._genAudioTagPaylod(1,e):s=this._genVideoTagPayload(1,e);const r=this._genTagHeader(t,s.length,e.props.timestamp),o=r.length+s.length;return S([r,s,new Uint8Array([o>>>24,o>>>16,o>>>8,o])])}_genTagHeader(t,e,s){return new Uint8Array([t,e>>>16,e>>>8,e,s>>>16,s>>>8,s,s>>>24,0,0,0])}_genAudioTagPaylod(t,e){return S(t===0?[this._genAudioTagHeader(),this._genAudioSequenceHeader()]:[this._genAudioTagHeader(),this._genAudioData(e)])}_genAudioTagHeader(){return new Uint8Array([te<<4|12|ie<<1|this._cfg.channelCount-1])}_genAudioSequenceHeader(){const t=4096|oe[this._cfg.sampleRate]<<7|this._cfg.channelCount<<3;return new Uint8Array([0,t>>8,t])}_genAudioData(t){const e=new Uint8Array(1+t.buffer.length);return e.set([1],0),e.set(t.buffer,1),e}_genVideoTagPayload(t,e){return S(t===0?[this._genVideoTagHeader(e),this._genVideoSequenceHeader(e)]:[this._genVideoTagHeader(e),this._genVideoData(e)])}_genVideoTagHeader(t){return new Uint8Array([(t.props.type==="key"?1:2)<<4|se,this._hasVideoSeqHeader?1:0,0,0,0])}_genVideoSequenceHeader(t){return new Uint8Array(t.cfg.description)}_genVideoData(t){if(t.props.type==="delta")return t.buffer;const e=re(new Uint8Array(t.cfg.description)),s=e.spsArr[0].length,r=e.ppsArr[0].length;return S([new Uint8Array([0,0,s>>8,s%256]),e.spsArr[0],new Uint8Array([0,0,r>>8,r%256]),e.ppsArr[0],t.buffer])}}const ae=new E("RTMP_Packet");class de{constructor(t){this._firstFrame=!0,this._flv=new ne,this._OnEncodedFrame=(e,s)=>{if(this._firstFrame){const o=this._core.getSetting();this._flv.setConfig({hasVideo:o.hasVideo,hasAudio:o.hasAudio,sampleRate:o.sampleRate,channelCount:o.channel});const _=this._flv.genHeader();if(this._core.emit(l.OnPacketed,_),o.hasVideo){const c=this._flv.genSeqTag(B.VIDEO,s);this._core.emit(l.OnPacketed,c)}if(o.hasAudio){const c=this._flv.genSeqTag(B.AUDIO,s);this._core.emit(l.OnPacketed,c)}this._firstFrame=!1,ae.log("first frame encoded & packed")}const r=this._flv.genFrameTag(e==="video"?B.VIDEO:B.AUDIO,s);this._core.emit(l.OnPacketed,r,s.props.type==="key")},this._core=t,this._bindEvents()}_bindEvents(){this._core.on(l.OnEncodedFrame,this._OnEncodedFrame)}destroy(){}}class he{constructor(){this._lastDot=0,this._totalSize=0,this._speed=[]}addSample(t){this._lastDot||(this._lastDot=Date.now()),this._totalSize+=t;const e=Date.now()-this._lastDot;e>=500&&(this._addSpeedSample(this._totalSize/e*8e3),this._totalSize=0,this._lastDot=Date.now())}_addSpeedSample(t){this._speed.push(t),this._speed=this._speed.slice(-6)}reset(){this._speed=[]}getUpSpeed(){return this._speed.length?parseInt(this._speed.reduce((t,e)=>t+=e,0)/this._speed.length):0}}const D=new E("RTMP_Wtp");class ce{constructor(t){this._queue=[],this._url="",this._connectClosed=!1,this._upSpeed=new he,this._transport=null,this._writer=null,this._inWriting=!1,this._inAdjustEncode=!1,this._increaseTimer=0,this._firstFramePushed=!1,this._core=t,this._bindEvents()}get sendSpeed(){return this._upSpeed.getUpSpeed()}getStats(){var t;return(t=this._transport)==null?void 0:t.getStats()}_bindEvents(){this._core.on(l.OnPacketed,(t,e=!1)=>{this._checkDecreaseBitrate(),this._checkDeleteCache(e),this._queue.push(t),this._inWriting||this._write()})}_checkDecreaseBitrate(){if(this._inAdjustEncode)return;const t=this._upSpeed.getUpSpeed();if(!t||this._queue.length<A.MaxCachedFrameSize)return;D.log(`up speed: ${t} low, ajust encode setting`);const e=this._core.getSetting();this._core.emit(l.OnUpstreamFeedback,{videoBitrate:t*A.RealSpeedPercent,width:e.width,height:e.height,frameRate:e.frameRate}),this._inAdjustEncode=!0,this._checkIncreaseBitrate()}_checkIncreaseBitrate(){D.log("add timer to check uplink speed increased"),clearInterval(this._increaseTimer),this._increaseTimer=setTimeout(()=>{const t=this._core.getSetting();D.log(`set encode bitrate to specified ${t.videoBitrate}`),this._core.emit(l.OnUpstreamFeedback,{videoBitrate:t.videoBitrate,width:t.width,height:t.height,frameRate:t.frameRate}),this._inAdjustEncode=!0},A.UplinkBitrateCheckInterval)}_checkDeleteCache(t){this._inAdjustEncode&&t&&(D.log(`ajust encode setting finish, delete cached ${this._queue.length} frame`),this._queue=[],this._upSpeed.reset(),this._inAdjustEncode=!1)}async start(t){this._url=t;try{await this._connect()}catch(e){throw b(y.WTP_OPEN_FAIL,e.message)}}async _connect(){const t=new WebTransport(this._url);let e;t.closed.then(()=>{D.log("webtransport closed")}).catch(r=>{e=r.message,D.log("webtransport closed due to",r)}).finally(()=>{this._connectClosed=!0,this._core.emit(O.OnConnectClosed,e),this._core.emit(O.OnError,b(y.WTP_CONNECT_FAIL,e))}),await t.ready,this._transport=t;const s=await t.createBidirectionalStream();this._writer=s.writable.getWriter(),this._write(),D.log("transport opend")}async _write(){var e;if(!this._writer)return;this._inWriting=!0;const t=this._queue.shift();if(!t){this._inWriting=!1;return}await((e=this._writer)==null?void 0:e.write(t)),this._firstFramePushed||(this._firstFramePushed=!0,this._core.emit(O.OnFirstFramePushed),D.log("first frame pushed")),this._upSpeed.addSample(t.length);try{await this._write()}catch(s){D.log("writer error:",s)}}getFile(){return S(this._queue)}destroy(){var t,e;clearTimeout(this._increaseTimer),this._connectClosed||(t=this._writer)==null||t.close(),this._writer=null,(e=this._transport)==null||e.close(),this._transport=null}}const ue=new E("LiveRTMP");class _e extends H{constructor(){super(),this._ts=0,this._setting={codec:A.codec,hardwareAcceleration:"prefer-hardware",width:-1,height:-1,frameRate:-1,sampleRate:A.sampleRate,channel:A.channel,gopSize:A.gopSize,videoBitrate:A.VideoBitrateDefault,audioBitrate:A.AudioBitrateDefault,hasAudio:!1,hasVideo:!1,vDeviceId:"",aDeviceId:""},this._encode=new ee(this),this._packet=new de(this),this._transport=new ce(this)}async checkVideoHardwareAcceleration(){const t=["prefer-hardware","prefer-software","no-preference"],e=this.getSetting(),s={codec:e.codec,width:1280,height:720,framerate:15,bitrate:e.videoBitrate};for(const r of t)try{if((await VideoEncoder.isConfigSupported({...s,hardwareAcceleration:r})).supported)return this.updateSetting({hardwareAcceleration:r}),Promise.resolve()}catch{throw b(y.VIDEO_ENCODE_CONFIGURE_FAIL,`VideoEncoder not support hardwareAcceleration, ${JSON.stringify({...s,hardwareAcceleration:r})}`)}throw b(y.VIDEO_ENCODE_CONFIGURE_FAIL,"VideoEncoder not support hardwareAcceleration")}async ready(){await Promise.all([this.checkVideoHardwareAcceleration(),this._encode.init()])}getSetting(){return this._setting}updateSetting(t){this._setting=Object.assign({},this._setting,t)}videoFrameCaptured(t,e){this.emit(l.OnVideoCaptured,t,e)}audioFrameCaptured(t,e){this.emit(l.OnAudioCaptured,t,e)}startMockVideoEncode(){this.emit(l.OnVideoCaptureNoOutput)}adjustBitrate(t,e){t===I.Video&&this.updateSetting({videoBitrate:e}),t===I.Audio&&this.updateSetting({audioBitrate:e}),this.emit(l.OnBitrateChanged,t,e)}avExist(t,e){this._setting.hasVideo=t,this._setting.hasAudio=e}publish(t){return this._transport.start(t)}setEncodeCapacity(t){this._setting=Object.assign({},this._setting,t)}getStats(){return{video:{...this._encode.getStats().video,sendSpeed:this._transport.sendSpeed,codec:this._setting.codec,frameWidth:this._setting.width,frameHeight:this._setting.height,gopSize:this._setting.gopSize},audio:{...this._encode.getStats().audio,codec:"aac",channels:this._setting.channel,sampleRate:this._setting.sampleRate}}}destroy(){ue.log("destroy"),this._encode.destroy(),this._packet.destroy(),this._transport.destroy()}down(){return this._transport.getFile()}}self.constructor.name!=="Window"&&le();function le(){let i={};self.addEventListener("message",async t=>{switch(t.data.type){case v.Init:{const{options:e}=t.data;e.logEnable&&(E.enable=!0),e.logEnableLong&&(E.enableLong=!0),i=new _e,i.on(O.OnError,s=>{self.postMessage({type:w.Error,data:s.toJson()})}),i.on(O.OnConnectClosed,()=>{self.postMessage({type:w.Close})}),i.on(O.OnFirstFramePushed,()=>{self.postMessage({type:w.FirstFramePushed})});try{await i.ready(),self.postMessage({type:w.Ready})}catch(s){self.postMessage({type:w.Error,data:s.toJson()})}}break;case v.AvExist:{const{hasAudio:e,hasVideo:s}=t.data;i.avExist(s,e)}break;case v.VideoFrame:{const{frame:e,setting:s}=t.data;i.videoFrameCaptured(e,s)}break;case v.MockVideoEncode:i.startMockVideoEncode();break;case v.AudioFrame:{const{frame:e,setting:s}=t.data;i.audioFrameCaptured(e,s)}break;case v.AdjustBitrate:{const{kind:e,bitrate:s}=t.data;i.adjustBitrate(e,s)}break;case v.Publish:{const{url:e}=t.data;try{await i.publish(e)}catch(s){self.postMessage({type:w.Error,data:s.toJson()})}}break;case v.GetStats:self.postMessage({type:w.STATS,data:i.getStats()});break;case v.EncodeConfig:{i.setEncodeCapacity(t.data.cfg);break}case v.Download:{const e=i.down();self.postMessage({type:w.Flvfile,buffer:e},[e.buffer])}break;case v.UnPublish:{i.destroy();break}}})}})();\n', Io = typeof self < "u" && self.Blob && new Blob([uc], { type: "text/javascript;charset=utf-8" });
11502
+ function lg(r) {
11484
11503
  let e;
11485
11504
  try {
11486
11505
  if (e = Io && (self.URL || self.webkitURL).createObjectURL(Io), !e) throw "";
@@ -11492,7 +11511,7 @@ function cg(r) {
11492
11511
  }), t;
11493
11512
  } catch {
11494
11513
  return new Worker(
11495
- "data:text/javascript;charset=utf-8," + encodeURIComponent(cc),
11514
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(uc),
11496
11515
  {
11497
11516
  name: r == null ? void 0 : r.name
11498
11517
  }
@@ -11506,10 +11525,10 @@ try {
11506
11525
  } catch {
11507
11526
  }
11508
11527
  const Xr = new ht("Bridge");
11509
- class uc extends og {
11528
+ class dc extends ug {
11510
11529
  // static version = __VERSION__
11511
11530
  constructor() {
11512
- super(), this._worker = null, this._audioMsTrack = null, this._videoMsTrack = null, this._capture = new ag(this);
11531
+ super(), this._worker = null, this._audioMsTrack = null, this._videoMsTrack = null, this._capture = new dg(this);
11513
11532
  }
11514
11533
  static isSupported() {
11515
11534
  return typeof WebTransport < "u" && typeof MediaStreamTrackProcessor < "u" && typeof MediaStreamTrackGenerator < "u" && typeof VideoEncoder < "u";
@@ -11536,7 +11555,7 @@ class uc extends og {
11536
11555
  }
11537
11556
  };
11538
11557
  try {
11539
- this._worker = new cg();
11558
+ this._worker = new lg();
11540
11559
  } catch (o) {
11541
11560
  t(xo(fn.RTMP_INIT_FAIL, o.message));
11542
11561
  }
@@ -11561,7 +11580,7 @@ class uc extends og {
11561
11580
  Xr.table(n.data.data), this.emit(ot.OnError, n.data.data);
11562
11581
  break;
11563
11582
  case yt.Flvfile:
11564
- ug(n.data.buffer);
11583
+ hg(n.data.buffer);
11565
11584
  break;
11566
11585
  case yt.FirstFramePushed:
11567
11586
  this.emit(ot.OnFirstFramePushed);
@@ -11679,14 +11698,14 @@ class uc extends og {
11679
11698
  });
11680
11699
  }
11681
11700
  }
11682
- function ug(r) {
11701
+ function hg(r) {
11683
11702
  const e = document.createElement("a");
11684
11703
  e.href = URL.createObjectURL(new Blob([r])), e.download = Date.now() + ".flv", e.click();
11685
11704
  }
11686
11705
  const zo = new ft("RTMPConnect");
11687
- class dg {
11706
+ class pg {
11688
11707
  constructor(e, t, n, i) {
11689
- this._opts = void 0, this._isPushing = !1, this._url = e, this._opts = t, this._onError = n, this._OnSuccess = i, this._rtmp = new uc(), this._bindEvents();
11708
+ this._opts = void 0, this._isPushing = !1, this._url = e, this._opts = t, this._onError = n, this._OnSuccess = i, this._rtmp = new dc(), this._bindEvents();
11690
11709
  }
11691
11710
  get isPushing() {
11692
11711
  return this._isPushing;
@@ -11702,7 +11721,7 @@ class dg {
11702
11721
  this._isPushing = !1, this._onError(e);
11703
11722
  }), this._rtmp.on(ot.OnConnectClosed, () => {
11704
11723
  this._isPushing = !1, this._onError(
11705
- new ac(fn.WTP_CONNECT_FAIL, "connect lost")
11724
+ new cc(fn.WTP_CONNECT_FAIL, "connect lost")
11706
11725
  );
11707
11726
  }), this._rtmp.on(ot.OnFirstFramePushed, () => {
11708
11727
  this._isPushing = !0, this._OnSuccess();
@@ -11730,7 +11749,7 @@ class dg {
11730
11749
  zo.warn("unpublish"), this._rtmp.unpublish(), this._isPushing = !1;
11731
11750
  }
11732
11751
  }
11733
- function dc({
11752
+ function lc({
11734
11753
  pushUrl: r,
11735
11754
  addPri: e = !1,
11736
11755
  disableTCC: t = !1
@@ -11738,8 +11757,8 @@ function dc({
11738
11757
  const n = new URL(r), i = Date.now();
11739
11758
  return e && n.searchParams.set("pri", i.toString()), t && n.searchParams.set("tcc", "false"), n.href;
11740
11759
  }
11741
- class lg {
11742
- constructor(e, t = _f) {
11760
+ class fg {
11761
+ constructor(e, t = gf) {
11743
11762
  this._reconnectDelay = 0, this._reconnectCount = 0, this._timeoutTimerId = null, this._reconnectTimeout = null, this._totalReconnectInfo = {
11744
11763
  totalReconnectCount: 0,
11745
11764
  totalReconnectDuration: 0
@@ -11747,7 +11766,7 @@ class lg {
11747
11766
  this.execute(!0);
11748
11767
  }, this.execute = (n = !1) => {
11749
11768
  var i;
11750
- this._logger.log("start reconnect strategy"), this.state === "idle" && (this._reconnectStartTime = Date.now(), this._totalReconnectInfo.totalReconnectCount += 1, V(j.PUSH_RECONNECT_START, {
11769
+ this._logger.log("start reconnect strategy"), this.state === "idle" && (this._reconnectStartTime = Date.now(), this._totalReconnectInfo.totalReconnectCount += 1, j(V.PUSH_RECONNECT_START, {
11751
11770
  start_time: this._reconnectStartTime,
11752
11771
  session_id: this._pushConsumer.pushSessionId,
11753
11772
  max_timeout: this._maxTimeout
@@ -11824,13 +11843,13 @@ class lg {
11824
11843
  }), this._logger.log("reconnect after delay: ", i, Date.now()), this._reconnectTimeout = window.setTimeout(
11825
11844
  this.attemptReconnect,
11826
11845
  i
11827
- ), this._reconnectDelay = this._reconnectDelay === 0 ? 2e3 : Math.min(this._reconnectDelay * 2, gf);
11846
+ ), this._reconnectDelay = this._reconnectDelay === 0 ? 2e3 : Math.min(this._reconnectDelay * 2, vf);
11828
11847
  }, this.state = "idle", this._pushConsumer = e, this._maxTimeout = t, this._logger = new ft("ReconnectStrategy");
11829
11848
  }
11830
11849
  // 恢复推流保持pri自增,能够实现抢流功能,避免上次推流服务端状态还未断开
11831
11850
  getNextPushUrl() {
11832
11851
  const e = this._pushConsumer.pushUrl;
11833
- return e ? dc({
11852
+ return e ? lc({
11834
11853
  pushUrl: e,
11835
11854
  addPri: !0
11836
11855
  }) : "";
@@ -11917,7 +11936,7 @@ const ar = {
11917
11936
  /** 推流异常 */
11918
11937
  PushError: 1
11919
11938
  }, Po = new ft("PushController");
11920
- class hg extends sc {
11939
+ class mg extends oc {
11921
11940
  constructor(e, {
11922
11941
  config: t,
11923
11942
  streamConsumeController: n,
@@ -11930,7 +11949,7 @@ class hg extends sc {
11930
11949
  retryDelay: 1e3
11931
11950
  }, this._audioBitrate = jt(ea, "audio").bitrate, this._videoBitrate = jt(Qo, "video").bitrate, this.handleReconnectError = (o, d) => {
11932
11951
  var c, u;
11933
- V(j.STOP_PUSH_STREAM, {
11952
+ j(V.STOP_PUSH_STREAM, {
11934
11953
  reason: ar.ReconnectFailed,
11935
11954
  error_message: o,
11936
11955
  session_id: this._pushSessionId,
@@ -11957,14 +11976,14 @@ class hg extends sc {
11957
11976
  this._streamConsumeController.emit(
11958
11977
  oe.PushError,
11959
11978
  d
11960
- ), V(j.STOP_PUSH_STREAM, {
11979
+ ), j(V.STOP_PUSH_STREAM, {
11961
11980
  reason: ar.PushError,
11962
11981
  duration: this.pushDuration,
11963
11982
  session_id: this._pushSessionId,
11964
11983
  push_mode: this._pushMode,
11965
11984
  error_msg: o.message,
11966
11985
  error_code: o.code
11967
- }), V(j.START_PUSH_STATUS, {
11986
+ }), j(V.START_PUSH_STATUS, {
11968
11987
  is_success: !1,
11969
11988
  reason: Lt.PushError,
11970
11989
  error_message: o.message,
@@ -11977,7 +11996,7 @@ class hg extends sc {
11977
11996
  (o = this._reconnectStrategy) == null || o.execute(), this.setConnectState(Ie.RECONNECTING), this.unpublish({ isReconnecting: !0 });
11978
11997
  }, this._OnRtcStateChange = (o) => {
11979
11998
  var d;
11980
- switch (V(j.PUSH_RTC_STATE_CHANGE, {
11999
+ switch (j(V.PUSH_RTC_STATE_CHANGE, {
11981
12000
  state: o,
11982
12001
  push_url: this._pushUrl,
11983
12002
  session_id: this._pushSessionId,
@@ -11994,13 +12013,13 @@ class hg extends sc {
11994
12013
  this._reconnectStrategy && this._executeReconnect();
11995
12014
  break;
11996
12015
  case "failed":
11997
- (d = this._reconnectStrategy) != null && d.isActive() ? this._executeReconnect() : (this.connectionState === Ie.CONNECTED ? V(j.STOP_PUSH_STREAM, {
12016
+ (d = this._reconnectStrategy) != null && d.isActive() ? this._executeReconnect() : (this.connectionState === Ie.CONNECTED ? j(V.STOP_PUSH_STREAM, {
11998
12017
  reason: ar.PushError,
11999
12018
  error_message: "peerconnection failed",
12000
12019
  duration: this.pushDuration,
12001
12020
  session_id: this._pushSessionId,
12002
12021
  push_mode: this._pushMode
12003
- }) : V(j.START_PUSH_STATUS, {
12022
+ }) : j(V.START_PUSH_STATUS, {
12004
12023
  is_success: !1,
12005
12024
  reason: Lt.PushError,
12006
12025
  error_message: "peerconnection failed",
@@ -12018,7 +12037,7 @@ class hg extends sc {
12018
12037
  }
12019
12038
  }, this._pushMode = (t == null ? void 0 : t.mode) || "rtm", this._streamConsumeController = n, t && (this._pushConfig = t, this._needCheckAudioTrack = t.checkAudio ?? !1), (s = t == null ? void 0 : t.reconnectConfig) != null && s.enable || !(t != null && t.reconnectConfig)) {
12020
12039
  const o = (a = t == null ? void 0 : t.reconnectConfig) != null && a.maxTimeout ? t.reconnectConfig.maxTimeout * Pa : void 0;
12021
- this._reconnectStrategy = new lg(
12040
+ this._reconnectStrategy = new fg(
12022
12041
  this,
12023
12042
  o
12024
12043
  ), this._reconnectStrategy.onReconnectError = this.handleReconnectError;
@@ -12056,7 +12075,7 @@ class hg extends sc {
12056
12075
  case Ie.CONNECTED:
12057
12076
  (t = this._reconnectStrategy) != null && t.isActive() ? this._reconnectStrategy.stop({ isSuccess: !0 }) : (this._streamConsumeController.emit(
12058
12077
  oe.PushStart
12059
- ), this.setPushStatsInterval(), V(j.START_PUSH_STATUS, {
12078
+ ), this.setPushStatsInterval(), j(V.START_PUSH_STATUS, {
12060
12079
  is_success: !0,
12061
12080
  push_url: this._pushUrl,
12062
12081
  session_id: this._pushSessionId,
@@ -12070,21 +12089,21 @@ class hg extends sc {
12070
12089
  }
12071
12090
  async startPush(e, t = {}) {
12072
12091
  var a, o, d;
12073
- if (t.isReconnect || (this._pushSessionId = Date.now(), V(j.START_PUSH, {
12092
+ if (t.isReconnect || (this._pushSessionId = Date.now(), j(V.START_PUSH, {
12074
12093
  push_url: e,
12075
12094
  session_id: this._pushSessionId
12076
12095
  })), !e)
12077
- throw V(j.START_PUSH_STATUS, {
12096
+ throw j(V.START_PUSH_STATUS, {
12078
12097
  is_success: !1,
12079
12098
  session_id: this._pushSessionId,
12080
12099
  reason: Lt.PushCheck,
12081
12100
  push_url: this._pushUrl
12082
12101
  }), new Error("lack publish url");
12083
12102
  if (this._connect) return;
12084
- this.start(), this._pushUrl = dc({ pushUrl: e, disableTCC: !0 }), this._pushEncodeConfig = t.cfg;
12103
+ this.start(), this._pushUrl = lc({ pushUrl: e, disableTCC: !0 }), this._pushEncodeConfig = t.cfg;
12085
12104
  const n = this._composedStream.videoTrack, i = this._composedStream.audioTrack;
12086
12105
  if (this._needCheckAudioTrack && (!n || !i)) {
12087
- V(j.START_PUSH_STATUS, {
12106
+ j(V.START_PUSH_STATUS, {
12088
12107
  is_success: !1,
12089
12108
  reason: Lt.PushCheck,
12090
12109
  push_url: this._pushUrl,
@@ -12104,7 +12123,7 @@ class hg extends sc {
12104
12123
  );
12105
12124
  return;
12106
12125
  } else if (!n && !i) {
12107
- V(j.START_PUSH_STATUS, {
12126
+ j(V.START_PUSH_STATUS, {
12108
12127
  is_success: !1,
12109
12128
  reason: Lt.PushCheck,
12110
12129
  push_url: this._pushUrl,
@@ -12115,11 +12134,11 @@ class hg extends sc {
12115
12134
  return;
12116
12135
  }
12117
12136
  let s;
12118
- this._pushMode === "rtm" ? s = new ng(
12137
+ this._pushMode === "rtm" ? s = new og(
12119
12138
  this._pushUrl,
12120
12139
  this._pushConfig,
12121
12140
  this._OnRtcStateChange
12122
- ) : s = new dg(
12141
+ ) : s = new pg(
12123
12142
  e,
12124
12143
  this._pushConfig,
12125
12144
  this._OnRTMPError,
@@ -12142,14 +12161,14 @@ class hg extends sc {
12142
12161
  this._streamConsumeController.emit(
12143
12162
  oe.PushError,
12144
12163
  u
12145
- ), V(j.STOP_PUSH_STREAM, {
12164
+ ), j(V.STOP_PUSH_STREAM, {
12146
12165
  reason: ar.PushError,
12147
12166
  error_message: u.message,
12148
12167
  enable_reconnect: !1,
12149
12168
  push_mode: this._pushMode,
12150
12169
  session_id: this._pushSessionId,
12151
12170
  duration: this.pushDuration
12152
- }), V(j.START_PUSH_STATUS, {
12171
+ }), j(V.START_PUSH_STATUS, {
12153
12172
  is_success: !1,
12154
12173
  push_url: this._pushUrl,
12155
12174
  reason: Lt.PushError,
@@ -12167,17 +12186,17 @@ class hg extends sc {
12167
12186
  var t, n, i, s;
12168
12187
  if ((t = this._connect) != null && t.isPushing) {
12169
12188
  const a = Date.now(), { stats: o, originStats: d } = await this._connect.getStatsSnapshoot(2e3), u = Date.now() - a;
12170
- of(o) ? this._prevStats = void 0 : this._prevStats = o;
12171
- const h = this.pushMode === "rtm" ? X_(
12189
+ af(o) ? this._prevStats = void 0 : this._prevStats = o;
12190
+ const h = this.pushMode === "rtm" ? Q_(
12172
12191
  o,
12173
12192
  d,
12174
12193
  {
12175
12194
  idealFrameRate: (n = this._composedStream._videoStream) == null ? void 0 : n.frameRate,
12176
12195
  idealBitrate: this._videoBitrate
12177
12196
  }
12178
- ) : Z_(o), l = this.pushMode === "rtm" ? (i = this._connect) == null ? void 0 : i.videoSenderTrackStats : {};
12179
- V(
12180
- j.PUSH_STATS,
12197
+ ) : eg(o), l = this.pushMode === "rtm" ? (i = this._connect) == null ? void 0 : i.videoSenderTrackStats : {};
12198
+ j(
12199
+ V.PUSH_STATS,
12181
12200
  {
12182
12201
  ...h,
12183
12202
  ...l,
@@ -12193,8 +12212,8 @@ class hg extends sc {
12193
12212
  !0
12194
12213
  );
12195
12214
  } else
12196
- await An(2e3), V(
12197
- j.PUSH_STATS,
12215
+ await An(2e3), j(
12216
+ V.PUSH_STATS,
12198
12217
  {
12199
12218
  push_url: this._pushUrl,
12200
12219
  push_mode: this._pushMode,
@@ -12247,7 +12266,7 @@ class hg extends sc {
12247
12266
  isManual: !1
12248
12267
  }) {
12249
12268
  var t, n, i, s, a;
12250
- (t = this._connect) == null || t.unpublish(), this._connect = null, e.isManual && (V(j.STOP_PUSH_STREAM, {
12269
+ (t = this._connect) == null || t.unpublish(), this._connect = null, e.isManual && (j(V.STOP_PUSH_STREAM, {
12251
12270
  reason: ar.ManualStop,
12252
12271
  duration: this.pushDuration,
12253
12272
  session_id: this._streamConsumeController.pushSessionId,
@@ -12294,7 +12313,7 @@ class hg extends sc {
12294
12313
  params: t,
12295
12314
  teaParams: n
12296
12315
  }) {
12297
- V(j.PUSH_RECONNECT_STATUS, {
12316
+ j(V.PUSH_RECONNECT_STATUS, {
12298
12317
  status: e,
12299
12318
  ...t,
12300
12319
  ...n
@@ -12305,14 +12324,14 @@ class hg extends sc {
12305
12324
  );
12306
12325
  }
12307
12326
  }
12308
- class pg extends pt {
12327
+ class _g extends pt {
12309
12328
  constructor(e, t) {
12310
- super(), this._previewConsumer = new F_(
12329
+ super(), this._previewConsumer = new H_(
12311
12330
  e.getComposedStream(),
12312
12331
  {
12313
12332
  streamConsumeController: this
12314
12333
  }
12315
- ), this._pushConsumer = new hg(
12334
+ ), this._pushConsumer = new mg(
12316
12335
  e.getComposedStream(),
12317
12336
  {
12318
12337
  streamConsumeController: this,
@@ -12376,13 +12395,13 @@ class pg extends pt {
12376
12395
  await this._pushConsumer.destroy(), this._previewConsumer.destroy();
12377
12396
  }
12378
12397
  }
12379
- const fg = () => typeof window > "u", He = {}, mn = async (r) => {
12398
+ const gg = () => typeof window > "u", He = {}, mn = async (r) => {
12380
12399
  const e = new RTCPeerConnection({ sdpSemantics: "unified-plan" });
12381
12400
  e.addTransceiver("video", { direction: r });
12382
12401
  const t = await e.createOffer();
12383
12402
  return e.close(), t.sdp.toLowerCase();
12384
12403
  };
12385
- function lc(r) {
12404
+ function hc(r) {
12386
12405
  const e = r.split(`
12387
12406
  `);
12388
12407
  let t = !1;
@@ -12415,30 +12434,30 @@ function lc(r) {
12415
12434
  }
12416
12435
  return !1;
12417
12436
  }
12418
- const mg = async () => {
12437
+ const vg = async () => {
12419
12438
  let r = await mn("sendonly");
12420
- return navigator.userAgent.includes("VivoBrowser") && (r = await mn("sendonly")), He.h264encode = lc(r), He.vp8encode = r.indexOf("vp8") > -1, He;
12421
- }, _g = async () => {
12439
+ return navigator.userAgent.includes("VivoBrowser") && (r = await mn("sendonly")), He.h264encode = hc(r), He.vp8encode = r.indexOf("vp8") > -1, He;
12440
+ }, yg = async () => {
12422
12441
  let r = await mn("recvonly");
12423
- return navigator.userAgent.includes("VivoBrowser") && (r = await mn("recvonly")), He.h264decode = lc(r), He.vp8decode = r.indexOf("vp8") > -1, He;
12424
- }, gg = async () => {
12442
+ return navigator.userAgent.includes("VivoBrowser") && (r = await mn("recvonly")), He.h264decode = hc(r), He.vp8decode = r.indexOf("vp8") > -1, He;
12443
+ }, Sg = async () => {
12425
12444
  if (typeof He.h264encode > "u")
12426
12445
  try {
12427
- await mg();
12446
+ await vg();
12428
12447
  } catch {
12429
12448
  return !1;
12430
12449
  }
12431
12450
  return He.h264encode || !1;
12432
- }, vg = async () => {
12451
+ }, bg = async () => {
12433
12452
  if (typeof He.h264decode > "u")
12434
12453
  try {
12435
- await _g();
12454
+ await yg();
12436
12455
  } catch {
12437
12456
  return !1;
12438
12457
  }
12439
12458
  return He.h264decode || !1;
12440
12459
  };
12441
- class yg {
12460
+ class Eg {
12442
12461
  /** {zh}
12443
12462
  * @brief 构造函数
12444
12463
  * @hidden
@@ -12464,8 +12483,8 @@ class yg {
12464
12483
  };
12465
12484
  }
12466
12485
  }
12467
- const Sg = new yg();
12468
- let hc = !0, pc = !0;
12486
+ const Cg = new Eg();
12487
+ let pc = !0, fc = !0;
12469
12488
  function en(r, e, t) {
12470
12489
  const n = r.match(e);
12471
12490
  return n && n.length >= t && parseInt(n[t], 10);
@@ -12514,23 +12533,23 @@ function It(r, e, t) {
12514
12533
  configurable: !0
12515
12534
  });
12516
12535
  }
12517
- function bg(r) {
12518
- return typeof r != "boolean" ? new Error("Argument type: " + typeof r + ". Please use a boolean.") : (hc = r, r ? "adapter.js logging disabled" : "adapter.js logging enabled");
12536
+ function wg(r) {
12537
+ return typeof r != "boolean" ? new Error("Argument type: " + typeof r + ". Please use a boolean.") : (pc = r, r ? "adapter.js logging disabled" : "adapter.js logging enabled");
12519
12538
  }
12520
- function Eg(r) {
12521
- return typeof r != "boolean" ? new Error("Argument type: " + typeof r + ". Please use a boolean.") : (pc = !r, "adapter.js deprecation warnings " + (r ? "disabled" : "enabled"));
12539
+ function Tg(r) {
12540
+ return typeof r != "boolean" ? new Error("Argument type: " + typeof r + ". Please use a boolean.") : (fc = !r, "adapter.js deprecation warnings " + (r ? "disabled" : "enabled"));
12522
12541
  }
12523
- function fc() {
12542
+ function mc() {
12524
12543
  if (typeof window == "object") {
12525
- if (hc)
12544
+ if (pc)
12526
12545
  return;
12527
12546
  typeof console < "u" && typeof console.log == "function" && console.log.apply(console, arguments);
12528
12547
  }
12529
12548
  }
12530
12549
  function ss(r, e) {
12531
- pc && console.warn(r + " is deprecated, please use " + e + " instead.");
12550
+ fc && console.warn(r + " is deprecated, please use " + e + " instead.");
12532
12551
  }
12533
- function Cg(r) {
12552
+ function kg(r) {
12534
12553
  const e = { browser: null, version: null };
12535
12554
  if (typeof r > "u" || !r.navigator || !r.navigator.userAgent)
12536
12555
  return e.browser = "Not a browser.", e;
@@ -12565,9 +12584,9 @@ function Cg(r) {
12565
12584
  function Oo(r) {
12566
12585
  return Object.prototype.toString.call(r) === "[object Object]";
12567
12586
  }
12568
- function mc(r) {
12587
+ function _c(r) {
12569
12588
  return Oo(r) ? Object.keys(r).reduce(function(e, t) {
12570
- const n = Oo(r[t]), i = n ? mc(r[t]) : r[t], s = n && !Object.keys(i).length;
12589
+ const n = Oo(r[t]), i = n ? _c(r[t]) : r[t], s = n && !Object.keys(i).length;
12571
12590
  return i === void 0 || s ? e : Object.assign(e, { [t]: i });
12572
12591
  }, {}) : r;
12573
12592
  }
@@ -12591,8 +12610,8 @@ function Mo(r, e, t) {
12591
12610
  });
12592
12611
  }), i;
12593
12612
  }
12594
- const Lo = fc;
12595
- function _c(r, e) {
12613
+ const Lo = mc;
12614
+ function gc(r, e) {
12596
12615
  const t = r && r.navigator;
12597
12616
  if (!t.mediaDevices)
12598
12617
  return;
@@ -12684,10 +12703,10 @@ function _c(r, e) {
12684
12703
  };
12685
12704
  }
12686
12705
  }
12687
- function gc(r) {
12706
+ function vc(r) {
12688
12707
  r.MediaStream = r.MediaStream || r.webkitMediaStream;
12689
12708
  }
12690
- function vc(r) {
12709
+ function yc(r) {
12691
12710
  if (typeof r == "object" && r.RTCPeerConnection && !("ontrack" in r.RTCPeerConnection.prototype)) {
12692
12711
  Object.defineProperty(r.RTCPeerConnection.prototype, "ontrack", {
12693
12712
  get() {
@@ -12722,7 +12741,7 @@ function vc(r) {
12722
12741
  { value: { receiver: e.receiver } }
12723
12742
  ), e));
12724
12743
  }
12725
- function yc(r) {
12744
+ function Sc(r) {
12726
12745
  if (typeof r == "object" && r.RTCPeerConnection && !("getSenders" in r.RTCPeerConnection.prototype) && "createDTMFSender" in r.RTCPeerConnection.prototype) {
12727
12746
  const e = function(i, s) {
12728
12747
  return {
@@ -12774,7 +12793,7 @@ function yc(r) {
12774
12793
  });
12775
12794
  }
12776
12795
  }
12777
- function Sc(r) {
12796
+ function bc(r) {
12778
12797
  if (!(typeof r == "object" && r.RTCPeerConnection && r.RTCRtpSender && r.RTCRtpReceiver))
12779
12798
  return;
12780
12799
  if (!("getStats" in r.RTCRtpSender.prototype)) {
@@ -12828,7 +12847,7 @@ function Sc(r) {
12828
12847
  return e.apply(this, arguments);
12829
12848
  };
12830
12849
  }
12831
- function bc(r) {
12850
+ function Ec(r) {
12832
12851
  r.RTCPeerConnection.prototype.getLocalStreams = function() {
12833
12852
  return this._shimmedLocalStreams = this._shimmedLocalStreams || {}, Object.keys(this._shimmedLocalStreams).map((a) => this._shimmedLocalStreams[a][0]);
12834
12853
  };
@@ -12866,11 +12885,11 @@ function bc(r) {
12866
12885
  }), i.apply(this, arguments);
12867
12886
  };
12868
12887
  }
12869
- function Ec(r, e) {
12888
+ function Cc(r, e) {
12870
12889
  if (!r.RTCPeerConnection)
12871
12890
  return;
12872
12891
  if (r.RTCPeerConnection.prototype.addTrack && e.version >= 65)
12873
- return bc(r);
12892
+ return Ec(r);
12874
12893
  const t = r.RTCPeerConnection.prototype.getLocalStreams;
12875
12894
  r.RTCPeerConnection.prototype.getLocalStreams = function() {
12876
12895
  const u = t.apply(this);
@@ -13009,7 +13028,7 @@ function Ii(r, e) {
13009
13028
  r.RTCPeerConnection.prototype[t] = i[t];
13010
13029
  });
13011
13030
  }
13012
- function Cc(r, e) {
13031
+ function wc(r, e) {
13013
13032
  It(r, "negotiationneeded", (t) => {
13014
13033
  const n = t.target;
13015
13034
  if (!((e.version < 72 || n.getConfiguration && n.getConfiguration().sdpSemantics === "plan-b") && n.signalingState !== "stable"))
@@ -13018,17 +13037,17 @@ function Cc(r, e) {
13018
13037
  }
13019
13038
  const No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13020
13039
  __proto__: null,
13021
- fixNegotiationNeeded: Cc,
13022
- shimAddTrackRemoveTrack: Ec,
13023
- shimAddTrackRemoveTrackWithNative: bc,
13024
- shimGetSendersWithDtmf: yc,
13025
- shimGetUserMedia: _c,
13026
- shimMediaStream: gc,
13027
- shimOnTrack: vc,
13040
+ fixNegotiationNeeded: wc,
13041
+ shimAddTrackRemoveTrack: Cc,
13042
+ shimAddTrackRemoveTrackWithNative: Ec,
13043
+ shimGetSendersWithDtmf: Sc,
13044
+ shimGetUserMedia: gc,
13045
+ shimMediaStream: vc,
13046
+ shimOnTrack: yc,
13028
13047
  shimPeerConnection: Ii,
13029
- shimSenderReceiverGetStats: Sc
13048
+ shimSenderReceiverGetStats: bc
13030
13049
  }, Symbol.toStringTag, { value: "Module" }));
13031
- function wc(r, e) {
13050
+ function Tc(r, e) {
13032
13051
  const t = r && r.navigator, n = r && r.MediaStreamTrack;
13033
13052
  if (t.getUserMedia = function(i, s, a) {
13034
13053
  ss(
@@ -13056,7 +13075,7 @@ function wc(r, e) {
13056
13075
  }
13057
13076
  }
13058
13077
  }
13059
- function wg(r, e) {
13078
+ function Rg(r, e) {
13060
13079
  r.navigator.mediaDevices && "getDisplayMedia" in r.navigator.mediaDevices || r.navigator.mediaDevices && (r.navigator.mediaDevices.getDisplayMedia = function(n) {
13061
13080
  if (!(n && n.video)) {
13062
13081
  const i = new DOMException("getDisplayMedia without video constraints is undefined");
@@ -13065,7 +13084,7 @@ function wg(r, e) {
13065
13084
  return n.video === !0 ? n.video = { mediaSource: e } : n.video.mediaSource = e, r.navigator.mediaDevices.getUserMedia(n);
13066
13085
  });
13067
13086
  }
13068
- function Tc(r) {
13087
+ function kc(r) {
13069
13088
  typeof r == "object" && r.RTCTrackEvent && "receiver" in r.RTCTrackEvent.prototype && !("transceiver" in r.RTCTrackEvent.prototype) && Object.defineProperty(r.RTCTrackEvent.prototype, "transceiver", {
13070
13089
  get() {
13071
13090
  return { receiver: this.receiver };
@@ -13109,7 +13128,7 @@ function zi(r, e) {
13109
13128
  }).then(a, o);
13110
13129
  };
13111
13130
  }
13112
- function kc(r) {
13131
+ function Rc(r) {
13113
13132
  if (!(typeof r == "object" && r.RTCPeerConnection && r.RTCRtpSender) || r.RTCRtpSender && "getStats" in r.RTCRtpSender.prototype)
13114
13133
  return;
13115
13134
  const e = r.RTCPeerConnection.prototype.getSenders;
@@ -13125,7 +13144,7 @@ function kc(r) {
13125
13144
  return this.track ? this._pc.getStats(this.track) : Promise.resolve(/* @__PURE__ */ new Map());
13126
13145
  };
13127
13146
  }
13128
- function Rc(r) {
13147
+ function Ac(r) {
13129
13148
  if (!(typeof r == "object" && r.RTCPeerConnection && r.RTCRtpSender) || r.RTCRtpSender && "getStats" in r.RTCRtpReceiver.prototype)
13130
13149
  return;
13131
13150
  const e = r.RTCPeerConnection.prototype.getReceivers;
@@ -13136,17 +13155,17 @@ function Rc(r) {
13136
13155
  return this._pc.getStats(this.track);
13137
13156
  };
13138
13157
  }
13139
- function Ac(r) {
13158
+ function Dc(r) {
13140
13159
  !r.RTCPeerConnection || "removeStream" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.removeStream = function(t) {
13141
13160
  ss("removeStream", "removeTrack"), this.getSenders().forEach((n) => {
13142
13161
  n.track && t.getTracks().includes(n.track) && this.removeTrack(n);
13143
13162
  });
13144
13163
  });
13145
13164
  }
13146
- function Dc(r) {
13165
+ function xc(r) {
13147
13166
  r.DataChannel && !r.RTCDataChannel && (r.RTCDataChannel = r.DataChannel);
13148
13167
  }
13149
- function xc(r) {
13168
+ function Ic(r) {
13150
13169
  if (!(typeof r == "object" && r.RTCPeerConnection))
13151
13170
  return;
13152
13171
  const e = r.RTCPeerConnection.prototype.addTransceiver;
@@ -13178,7 +13197,7 @@ function xc(r) {
13178
13197
  return s;
13179
13198
  });
13180
13199
  }
13181
- function Ic(r) {
13200
+ function zc(r) {
13182
13201
  if (!(typeof r == "object" && r.RTCRtpSender))
13183
13202
  return;
13184
13203
  const e = r.RTCRtpSender.prototype.getParameters;
@@ -13187,7 +13206,7 @@ function Ic(r) {
13187
13206
  return "encodings" in n || (n.encodings = [].concat(this.sendEncodings || [{}])), n;
13188
13207
  });
13189
13208
  }
13190
- function zc(r) {
13209
+ function Pc(r) {
13191
13210
  if (!(typeof r == "object" && r.RTCPeerConnection))
13192
13211
  return;
13193
13212
  const e = r.RTCPeerConnection.prototype.createOffer;
@@ -13197,7 +13216,7 @@ function zc(r) {
13197
13216
  }) : e.apply(this, arguments);
13198
13217
  };
13199
13218
  }
13200
- function Pc(r) {
13219
+ function Oc(r) {
13201
13220
  if (!(typeof r == "object" && r.RTCPeerConnection))
13202
13221
  return;
13203
13222
  const e = r.RTCPeerConnection.prototype.createAnswer;
@@ -13209,20 +13228,20 @@ function Pc(r) {
13209
13228
  }
13210
13229
  const Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13211
13230
  __proto__: null,
13212
- shimAddTransceiver: xc,
13213
- shimCreateAnswer: Pc,
13214
- shimCreateOffer: zc,
13215
- shimGetDisplayMedia: wg,
13216
- shimGetParameters: Ic,
13217
- shimGetUserMedia: wc,
13218
- shimOnTrack: Tc,
13231
+ shimAddTransceiver: Ic,
13232
+ shimCreateAnswer: Oc,
13233
+ shimCreateOffer: Pc,
13234
+ shimGetDisplayMedia: Rg,
13235
+ shimGetParameters: zc,
13236
+ shimGetUserMedia: Tc,
13237
+ shimOnTrack: kc,
13219
13238
  shimPeerConnection: zi,
13220
- shimRTCDataChannel: Dc,
13221
- shimReceiverGetStats: Rc,
13222
- shimRemoveStream: Ac,
13223
- shimSenderGetStats: kc
13239
+ shimRTCDataChannel: xc,
13240
+ shimReceiverGetStats: Ac,
13241
+ shimRemoveStream: Dc,
13242
+ shimSenderGetStats: Rc
13224
13243
  }, Symbol.toStringTag, { value: "Module" }));
13225
- function Oc(r) {
13244
+ function Mc(r) {
13226
13245
  if (!(typeof r != "object" || !r.RTCPeerConnection)) {
13227
13246
  if ("getLocalStreams" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.getLocalStreams = function() {
13228
13247
  return this._localStreams || (this._localStreams = []), this._localStreams;
@@ -13257,7 +13276,7 @@ function Oc(r) {
13257
13276
  });
13258
13277
  }
13259
13278
  }
13260
- function Mc(r) {
13279
+ function Lc(r) {
13261
13280
  if (!(typeof r != "object" || !r.RTCPeerConnection) && ("getRemoteStreams" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.getRemoteStreams = function() {
13262
13281
  return this._remoteStreams ? this._remoteStreams : [];
13263
13282
  }), !("onaddstream" in r.RTCPeerConnection.prototype))) {
@@ -13292,7 +13311,7 @@ function Mc(r) {
13292
13311
  };
13293
13312
  }
13294
13313
  }
13295
- function Lc(r) {
13314
+ function Nc(r) {
13296
13315
  if (typeof r != "object" || !r.RTCPeerConnection)
13297
13316
  return;
13298
13317
  const e = r.RTCPeerConnection.prototype, t = e.createOffer, n = e.createAnswer, i = e.setLocalDescription, s = e.setRemoteDescription, a = e.addIceCandidate;
@@ -13315,24 +13334,24 @@ function Lc(r) {
13315
13334
  return u ? (h.then(c, u), Promise.resolve()) : h;
13316
13335
  }, e.addIceCandidate = o;
13317
13336
  }
13318
- function Nc(r) {
13337
+ function Uc(r) {
13319
13338
  const e = r && r.navigator;
13320
13339
  if (e.mediaDevices && e.mediaDevices.getUserMedia) {
13321
13340
  const t = e.mediaDevices, n = t.getUserMedia.bind(t);
13322
- e.mediaDevices.getUserMedia = (i) => n(Uc(i));
13341
+ e.mediaDevices.getUserMedia = (i) => n(Gc(i));
13323
13342
  }
13324
13343
  !e.getUserMedia && e.mediaDevices && e.mediaDevices.getUserMedia && (e.getUserMedia = (function(n, i, s) {
13325
13344
  e.mediaDevices.getUserMedia(n).then(i, s);
13326
13345
  }).bind(e));
13327
13346
  }
13328
- function Uc(r) {
13347
+ function Gc(r) {
13329
13348
  return r && r.video !== void 0 ? Object.assign(
13330
13349
  {},
13331
13350
  r,
13332
- { video: mc(r.video) }
13351
+ { video: _c(r.video) }
13333
13352
  ) : r;
13334
13353
  }
13335
- function Gc(r) {
13354
+ function Bc(r) {
13336
13355
  if (!r.RTCPeerConnection)
13337
13356
  return;
13338
13357
  const e = r.RTCPeerConnection;
@@ -13352,14 +13371,14 @@ function Gc(r) {
13352
13371
  }
13353
13372
  });
13354
13373
  }
13355
- function Bc(r) {
13374
+ function Fc(r) {
13356
13375
  typeof r == "object" && r.RTCTrackEvent && "receiver" in r.RTCTrackEvent.prototype && !("transceiver" in r.RTCTrackEvent.prototype) && Object.defineProperty(r.RTCTrackEvent.prototype, "transceiver", {
13357
13376
  get() {
13358
13377
  return { receiver: this.receiver };
13359
13378
  }
13360
13379
  });
13361
13380
  }
13362
- function Fc(r) {
13381
+ function Vc(r) {
13363
13382
  const e = r.RTCPeerConnection.prototype.createOffer;
13364
13383
  r.RTCPeerConnection.prototype.createOffer = function(n) {
13365
13384
  if (n) {
@@ -13372,23 +13391,23 @@ function Fc(r) {
13372
13391
  return e.apply(this, arguments);
13373
13392
  };
13374
13393
  }
13375
- function Vc(r) {
13394
+ function jc(r) {
13376
13395
  typeof r != "object" || r.AudioContext || (r.AudioContext = r.webkitAudioContext);
13377
13396
  }
13378
13397
  const Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13379
13398
  __proto__: null,
13380
- shimAudioContext: Vc,
13381
- shimCallbacksAPI: Lc,
13382
- shimConstraints: Uc,
13383
- shimCreateOfferLegacy: Fc,
13384
- shimGetUserMedia: Nc,
13385
- shimLocalStreamsAPI: Oc,
13386
- shimRTCIceServerUrls: Gc,
13387
- shimRemoteStreamsAPI: Mc,
13388
- shimTrackEventTransceiver: Bc
13399
+ shimAudioContext: jc,
13400
+ shimCallbacksAPI: Nc,
13401
+ shimConstraints: Gc,
13402
+ shimCreateOfferLegacy: Vc,
13403
+ shimGetUserMedia: Uc,
13404
+ shimLocalStreamsAPI: Mc,
13405
+ shimRTCIceServerUrls: Bc,
13406
+ shimRemoteStreamsAPI: Lc,
13407
+ shimTrackEventTransceiver: Fc
13389
13408
  }, Symbol.toStringTag, { value: "Module" }));
13390
13409
  var di = { exports: {} }, Bo;
13391
- function Tg() {
13410
+ function Ag() {
13392
13411
  return Bo || (Bo = 1, function(r) {
13393
13412
  const e = {};
13394
13413
  e.generateIdentifier = function() {
@@ -13777,11 +13796,11 @@ t=0 0\r
13777
13796
  }, r.exports = e;
13778
13797
  }(di)), di.exports;
13779
13798
  }
13780
- var jc = Tg();
13781
- const Ft = /* @__PURE__ */ _n(jc), kg = /* @__PURE__ */ Wc({
13799
+ var Hc = Ag();
13800
+ const Ft = /* @__PURE__ */ _n(Hc), Dg = /* @__PURE__ */ Jc({
13782
13801
  __proto__: null,
13783
13802
  default: Ft
13784
- }, [jc]);
13803
+ }, [Hc]);
13785
13804
  function tn(r) {
13786
13805
  if (!r.RTCIceCandidate || r.RTCIceCandidate && "foundation" in r.RTCIceCandidate.prototype)
13787
13806
  return;
@@ -13994,7 +14013,7 @@ function on(r, e) {
13994
14013
  return i.sdp || i.type !== "offer" && i.type !== "answer" ? t.apply(this, [i]) : (i.type === "offer" ? this.createOffer : this.createAnswer).apply(this).then((a) => t.apply(this, [a]));
13995
14014
  });
13996
14015
  }
13997
- const Rg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14016
+ const xg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13998
14017
  __proto__: null,
13999
14018
  removeExtmapAllowMixed: Mi,
14000
14019
  shimAddIceCandidateNullOrEmpty: sn,
@@ -14005,19 +14024,19 @@ const Rg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14005
14024
  shimRTCIceCandidateRelayProtocol: Pi,
14006
14025
  shimSendThrowTypeError: nn
14007
14026
  }, Symbol.toStringTag, { value: "Module" }));
14008
- function Ag({ window: r } = {}, e = {
14027
+ function Ig({ window: r } = {}, e = {
14009
14028
  shimChrome: !0,
14010
14029
  shimFirefox: !0,
14011
14030
  shimSafari: !0
14012
14031
  }) {
14013
- const t = fc, n = Cg(r), i = {
14032
+ const t = mc, n = kg(r), i = {
14014
14033
  browserDetails: n,
14015
- commonShim: Rg,
14034
+ commonShim: xg,
14016
14035
  extractVersion: en,
14017
- disableLog: bg,
14018
- disableWarnings: Eg,
14036
+ disableLog: wg,
14037
+ disableWarnings: Tg,
14019
14038
  // Expose sdp as a convenience. For production apps include directly.
14020
- sdp: kg
14039
+ sdp: Dg
14021
14040
  };
14022
14041
  switch (n.browser) {
14023
14042
  case "chrome":
@@ -14025,17 +14044,17 @@ function Ag({ window: r } = {}, e = {
14025
14044
  return t("Chrome shim is not included in this adapter release."), i;
14026
14045
  if (n.version === null)
14027
14046
  return t("Chrome shim can not determine version, not shimming."), i;
14028
- t("adapter.js shimming chrome."), i.browserShim = No, sn(r, n), on(r), _c(r, n), gc(r), Ii(r, n), vc(r), Ec(r, n), yc(r), Sc(r), Cc(r, n), tn(r), Pi(r), Oi(r), rn(r, n), nn(r), Mi(r, n);
14047
+ t("adapter.js shimming chrome."), i.browserShim = No, sn(r, n), on(r), gc(r, n), vc(r), Ii(r, n), yc(r), Cc(r, n), Sc(r), bc(r), wc(r, n), tn(r), Pi(r), Oi(r), rn(r, n), nn(r), Mi(r, n);
14029
14048
  break;
14030
14049
  case "firefox":
14031
14050
  if (!Uo || !zi || !e.shimFirefox)
14032
14051
  return t("Firefox shim is not included in this adapter release."), i;
14033
- t("adapter.js shimming firefox."), i.browserShim = Uo, sn(r, n), on(r), wc(r, n), zi(r, n), Tc(r), Ac(r), kc(r), Rc(r), Dc(r), xc(r), Ic(r), zc(r), Pc(r), tn(r), Oi(r), rn(r, n), nn(r);
14052
+ t("adapter.js shimming firefox."), i.browserShim = Uo, sn(r, n), on(r), Tc(r, n), zi(r, n), kc(r), Dc(r), Rc(r), Ac(r), xc(r), Ic(r), zc(r), Pc(r), Oc(r), tn(r), Oi(r), rn(r, n), nn(r);
14034
14053
  break;
14035
14054
  case "safari":
14036
14055
  if (!Go || !e.shimSafari)
14037
14056
  return t("Safari shim is not included in this adapter release."), i;
14038
- t("adapter.js shimming safari."), i.browserShim = Go, sn(r, n), on(r), Gc(r), Fc(r), Lc(r), Oc(r), Mc(r), Bc(r), Nc(r), Vc(r), tn(r), Pi(r), rn(r, n), nn(r), Mi(r, n);
14057
+ t("adapter.js shimming safari."), i.browserShim = Go, sn(r, n), on(r), Bc(r), Vc(r), Nc(r), Mc(r), Lc(r), Fc(r), Uc(r), jc(r), tn(r), Pi(r), rn(r, n), nn(r), Mi(r, n);
14039
14058
  break;
14040
14059
  default:
14041
14060
  t("Unsupported browser!");
@@ -14043,8 +14062,8 @@ function Ag({ window: r } = {}, e = {
14043
14062
  }
14044
14063
  return i;
14045
14064
  }
14046
- Ag({ window: typeof window > "u" ? void 0 : window });
14047
- function Dg() {
14065
+ Ig({ window: typeof window > "u" ? void 0 : window });
14066
+ function zg() {
14048
14067
  const r = {
14049
14068
  // 硬件并发数(CPU核心数近似值)
14050
14069
  hardware_concurrency: navigator.hardwareConcurrency
@@ -14066,7 +14085,7 @@ function Dg() {
14066
14085
  }
14067
14086
  return r;
14068
14087
  }
14069
- class Pg extends pt {
14088
+ class Lg extends pt {
14070
14089
  /** {zh}
14071
14090
  * @brief 查询是否支持 RTM 或 WebTransport 推流。
14072
14091
  * @param mode 推流模式。
@@ -14082,9 +14101,9 @@ class Pg extends pt {
14082
14101
  */
14083
14102
  static async isSupported(e) {
14084
14103
  if (e === "webTransport")
14085
- return Promise.resolve(uc.isSupported());
14104
+ return Promise.resolve(dc.isSupported());
14086
14105
  try {
14087
- return fg() || !window.RTCPeerConnection || !window.RTCPeerConnection.prototype.addTransceiver || !window.RTCPeerConnection.prototype.createDataChannel ? !1 : await vg() && await gg();
14106
+ return gg() || !window.RTCPeerConnection || !window.RTCPeerConnection.prototype.addTransceiver || !window.RTCPeerConnection.prototype.createDataChannel ? !1 : await bg() && await Sg();
14088
14107
  } catch {
14089
14108
  return !1;
14090
14109
  }
@@ -14101,17 +14120,17 @@ class Pg extends pt {
14101
14120
  */
14102
14121
  constructor(e) {
14103
14122
  var t, n, i, s, a, o, d, c, u, h;
14104
- if (super(), this._options = e ?? {}, this._streamManagerController = new x_(this), this._streamComposeController = new B_(
14123
+ if (super(), this._options = e ?? {}, this._streamManagerController = new P_(this), this._streamComposeController = new j_(
14105
14124
  this._streamManagerController
14106
- ), this._streamConsumeController = new pg(
14125
+ ), this._streamConsumeController = new _g(
14107
14126
  this._streamComposeController,
14108
14127
  e
14109
- ), this._streamConsumeController.setPushConfig(e), this._observer = Sg, this._bindEvent(), !(e != null && e.loggerConfig) || (t = e == null ? void 0 : e.loggerConfig) != null && t.enable) {
14110
- T_({
14128
+ ), this._streamConsumeController.setPushConfig(e), this._observer = Cg, this._bindEvent(), !(e != null && e.loggerConfig) || (t = e == null ? void 0 : e.loggerConfig) != null && t.enable) {
14129
+ D_({
14111
14130
  showLogInConsole: ((n = e == null ? void 0 : e.loggerConfig) == null ? void 0 : n.showInConsole) ?? !1
14112
14131
  });
14113
- const l = E_((i = e == null ? void 0 : e.loggerConfig) == null ? void 0 : i.userId), f = C_((s = e == null ? void 0 : e.loggerConfig) == null ? void 0 : s.deviceId);
14114
- k_(
14132
+ const l = C_((i = e == null ? void 0 : e.loggerConfig) == null ? void 0 : i.userId), f = w_((s = e == null ? void 0 : e.loggerConfig) == null ? void 0 : s.deviceId);
14133
+ x_(
14115
14134
  {
14116
14135
  user_unique_id: l,
14117
14136
  device_id: f,
@@ -14126,10 +14145,10 @@ class Pg extends pt {
14126
14145
  customer_app_name: ((u = e == null ? void 0 : e.loggerConfig) == null ? void 0 : u.appName) ?? "unknown",
14127
14146
  customer_app_id: ((h = e == null ? void 0 : e.loggerConfig) == null ? void 0 : h.appId) ?? 0
14128
14147
  }
14129
- ), V(j.PUSHER_INIT, {
14148
+ ), j(V.PUSHER_INIT, {
14130
14149
  options: e,
14131
- ...Dg()
14132
- });
14150
+ ...zg()
14151
+ }), I_();
14133
14152
  }
14134
14153
  }
14135
14154
  /** {zh}
@@ -14577,7 +14596,7 @@ class Pg extends pt {
14577
14596
  * - You can call [`setMixingConfig()`](#livepusher-setmixingconfig) both before and after enabling local mixing to configure canvas parameters (e.g., width, height, frame rate), ensuring the merged output meets your requirements.
14578
14597
  */
14579
14598
  enableMixing(e) {
14580
- if (V(j.SWITCH_ENABLE_MIXING, {
14599
+ if (j(V.SWITCH_ENABLE_MIXING, {
14581
14600
  enable: e,
14582
14601
  is_pushing: this.isPushing()
14583
14602
  }), this.isPushing())
@@ -14593,7 +14612,7 @@ class Pg extends pt {
14593
14612
  * @param config Attributes of the mixing canvas, such as width, height, frame rate, etc.
14594
14613
  */
14595
14614
  setMixingConfig(e) {
14596
- V(j.SET_MIXING_CONFIG, e), this._streamComposeController.setMixingConfig(e);
14615
+ j(V.SET_MIXING_CONFIG, e), this._streamComposeController.setMixingConfig(e);
14597
14616
  }
14598
14617
  /** {zh}
14599
14618
  * @brief 获取配置的合流参数,包括合流画布的宽度、高度、帧率等。
@@ -14659,7 +14678,7 @@ class Pg extends pt {
14659
14678
  try {
14660
14679
  await this._streamComposeController.resumeMixer();
14661
14680
  } catch (t) {
14662
- if (V(j.PUSH_AUDIO_CONTEXT_START_FAILED, {
14681
+ if (j(V.PUSH_AUDIO_CONTEXT_START_FAILED, {
14663
14682
  error: t
14664
14683
  }), this._options.checkAudio)
14665
14684
  throw new Ut(
@@ -14682,7 +14701,7 @@ class Pg extends pt {
14682
14701
  * @param config The video stream layout parameters can be a single object or an array of multiple objects.
14683
14702
  */
14684
14703
  addVideoStream(e) {
14685
- V(j.ADD_VIDEO_STREAM, {
14704
+ j(V.ADD_VIDEO_STREAM, {
14686
14705
  number: de(e) ? e.length : 1,
14687
14706
  // 视频流数量
14688
14707
  config: e
@@ -14700,7 +14719,7 @@ class Pg extends pt {
14700
14719
  * @param streamId The video stream ID to be removed
14701
14720
  */
14702
14721
  removeVideoStream(e) {
14703
- V(j.DELETE_VIDEO_STREAM, { stream_id: e }), this._streamComposeController.removeVideoStream(e);
14722
+ j(V.DELETE_VIDEO_STREAM, { stream_id: e }), this._streamComposeController.removeVideoStream(e);
14704
14723
  }
14705
14724
  /** {zh}
14706
14725
  * @brief 更新已添加的视频流的布局参数,例如位置、大小等,适用于动态布局调整等场景。
@@ -14712,7 +14731,7 @@ class Pg extends pt {
14712
14731
  * @param config Update the video stream parameters. When an array is passed, multiple video streams are updated.
14713
14732
  */
14714
14733
  updateVideoStream(e) {
14715
- V(j.UPDATE_VIDEO_STREAM, {
14734
+ j(V.UPDATE_VIDEO_STREAM, {
14716
14735
  number: de(e) ? e.length : 1,
14717
14736
  // 视频流数量
14718
14737
  config: e
@@ -14728,7 +14747,7 @@ class Pg extends pt {
14728
14747
  * @param streamId The ID of the video stream to hide. If omitted, all video streams will be hidden.
14729
14748
  */
14730
14749
  muteVideoStream(e) {
14731
- V(j.CHANGE_VIDEO_STREAM_MUTE, {
14750
+ j(V.CHANGE_VIDEO_STREAM_MUTE, {
14732
14751
  stream_id: e,
14733
14752
  mute: !1
14734
14753
  }), this._streamComposeController.muteVideoStream(e);
@@ -14743,7 +14762,7 @@ class Pg extends pt {
14743
14762
  * @param streamId To unhide video stream id; if not provided, unhide all video streams.
14744
14763
  */
14745
14764
  unmuteVideoStream(e) {
14746
- V(j.CHANGE_VIDEO_STREAM_MUTE, {
14765
+ j(V.CHANGE_VIDEO_STREAM_MUTE, {
14747
14766
  stream_id: e,
14748
14767
  mute: !0
14749
14768
  }), this._streamComposeController.unmuteVideoStream(e);
@@ -14760,7 +14779,7 @@ class Pg extends pt {
14760
14779
  * @param config Audio stream parameters can be a single object or an array of multiple objects.
14761
14780
  */
14762
14781
  addAudioStream(e) {
14763
- V(j.ADD_AUDIO_STREAM, {
14782
+ j(V.ADD_AUDIO_STREAM, {
14764
14783
  number: de(e) ? e.length : 1,
14765
14784
  // 音频流数量
14766
14785
  config: e
@@ -14778,7 +14797,7 @@ class Pg extends pt {
14778
14797
  * @param streamId The stream ID to be removed. If omitted, all audio streams will be removed.
14779
14798
  */
14780
14799
  removeAudioStream(e) {
14781
- V(j.DELETE_AUDIO_STREAM, { stream_id: e }), this._streamComposeController.removeAudioStream(e);
14800
+ j(V.DELETE_AUDIO_STREAM, { stream_id: e }), this._streamComposeController.removeAudioStream(e);
14782
14801
  }
14783
14802
  /** {zh}
14784
14803
  * @brief 更新音频流的音量大小。在混音场景中调整某个或多个音频流的音量,例如,主播语音、背景音乐和视频音频的平衡调整。
@@ -14798,7 +14817,7 @@ class Pg extends pt {
14798
14817
  * - Call `updateAudioStream()` to update the parameters of the audio stream.
14799
14818
  */
14800
14819
  updateAudioStream(e) {
14801
- V(j.UPDATE_AUDIO_STREAM, {
14820
+ j(V.UPDATE_AUDIO_STREAM, {
14802
14821
  number: de(e) ? e.length : 1,
14803
14822
  // 音频流数量
14804
14823
  config: e
@@ -14816,7 +14835,7 @@ class Pg extends pt {
14816
14835
  * @notes Mute the specified audio stream. If the target is an individual audio stream, mute it directly. If the target is a video stream containing an audio track, it will only affect the audio part of the video stream without impacting the video footage.
14817
14836
  */
14818
14837
  muteAudioStream(e) {
14819
- V(j.CHANGE_AUDIO_STREAM_MUTE, {
14838
+ j(V.CHANGE_AUDIO_STREAM_MUTE, {
14820
14839
  stream_id: e,
14821
14840
  mute: !0
14822
14841
  }), this._streamComposeController.muteAudioStream(e);
@@ -14831,7 +14850,7 @@ class Pg extends pt {
14831
14850
  * @param streamId The stream ID to unmute. If omitted, all streams will be unmuted.
14832
14851
  */
14833
14852
  unmuteAudioStream(e) {
14834
- V(j.CHANGE_AUDIO_STREAM_MUTE, {
14853
+ j(V.CHANGE_AUDIO_STREAM_MUTE, {
14835
14854
  stream_id: e,
14836
14855
  mute: !1
14837
14856
  }), this._streamComposeController.unmuteAudioStream(e);
@@ -14851,7 +14870,7 @@ class Pg extends pt {
14851
14870
  * @param value Fill in the value of the corresponding attribute according to the type of `key`.
14852
14871
  */
14853
14872
  setProperty(e, t) {
14854
- switch (V(j.SET_PROPERTY_CALL, {
14873
+ switch (j(V.SET_PROPERTY_CALL, {
14855
14874
  key: e,
14856
14875
  value: t
14857
14876
  }), e) {
@@ -14924,7 +14943,7 @@ class Pg extends pt {
14924
14943
  * @param quality Video Quality, see [VIDEO_DEFAULT_QUALITY](docs-configuration#video_default_quality)
14925
14944
  */
14926
14945
  setVideoQuality(e) {
14927
- if (V(j.SET_VIDEO_QUALITY, {
14946
+ if (j(V.SET_VIDEO_QUALITY, {
14928
14947
  quality: e
14929
14948
  }), this._streamConsumeController.pushMode === "webTransport" && ["120p", "180p", "240p"].indexOf(e) !== -1)
14930
14949
  throw new Error("quality not allowed lower than 360p on rtmp mode");
@@ -14959,7 +14978,7 @@ class Pg extends pt {
14959
14978
  * - `HIGH`: High audio quality (high bitrate), suitable for music streaming and high-quality scenarios.
14960
14979
  */
14961
14980
  setAudioQuality(e) {
14962
- V(j.SET_AUDIO_QUALITY, {
14981
+ j(V.SET_AUDIO_QUALITY, {
14963
14982
  quality: e
14964
14983
  });
14965
14984
  const { sampleRate: t, bitrate: n } = jt(e, "audio");
@@ -15107,7 +15126,7 @@ class Pg extends pt {
15107
15126
  (e) => {
15108
15127
  this.observer.onLiveConnectStateChange(e);
15109
15128
  }
15110
- ), Qu((e) => {
15129
+ ), ed((e) => {
15111
15130
  e.deviceInfo.kind === "videoinput" ? this.observer.onCameraChanged(e.deviceInfo) : e.deviceInfo.kind === "audioinput" && this.observer.onMicrophoneChanged(e.deviceInfo);
15112
15131
  });
15113
15132
  }
@@ -15127,7 +15146,7 @@ class Pg extends pt {
15127
15146
  * - ** Failure**: returns an error message.
15128
15147
  */
15129
15148
  async destroy() {
15130
- await this._streamConsumeController.destroy(), this._streamManagerController.destroy();
15149
+ await this._streamConsumeController.destroy(), this._streamManagerController.destroy(), z_();
15131
15150
  }
15132
15151
  /** {zh}
15133
15152
  * @default ???
@@ -15177,5 +15196,5 @@ class Pg extends pt {
15177
15196
  }
15178
15197
  }
15179
15198
  export {
15180
- Pg as default
15199
+ Lg as default
15181
15200
  };