@shenyin/embedded-call-widget 3.0.1 → 3.0.2

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.
@@ -204,7 +204,7 @@ class U extends mt {
204
204
  return e;
205
205
  }
206
206
  }
207
- class Q extends mt {
207
+ class ee extends mt {
208
208
  /**
209
209
  * Constructor
210
210
  * @param scheme -
@@ -278,7 +278,7 @@ class Q extends mt {
278
278
  this.headers = {};
279
279
  }
280
280
  clone() {
281
- return new Q(this._raw.scheme, this._raw.user || "", this._raw.host, this._raw.port, JSON.parse(JSON.stringify(this.parameters)), JSON.parse(JSON.stringify(this.headers)));
281
+ return new ee(this._raw.scheme, this._raw.user || "", this._raw.host, this._raw.port, JSON.parse(JSON.stringify(this.parameters)), JSON.parse(JSON.stringify(this.headers)));
282
282
  }
283
283
  toRaw() {
284
284
  return this._toString(this._raw);
@@ -576,10 +576,10 @@ function Nt(a, e) {
576
576
  /^[\x0E-\x7F]/,
577
577
  A([["", ""]], !1, !1),
578
578
  function() {
579
- e = e || { data: {} }, e.data.uri = new Q(e.data.scheme, e.data.user, e.data.host, e.data.port), delete e.data.scheme, delete e.data.user, delete e.data.host, delete e.data.host_type, delete e.data.port;
579
+ e = e || { data: {} }, e.data.uri = new ee(e.data.scheme, e.data.user, e.data.host, e.data.port), delete e.data.scheme, delete e.data.user, delete e.data.host, delete e.data.host_type, delete e.data.port;
580
580
  },
581
581
  function() {
582
- e = e || { data: {} }, e.data.uri = new Q(e.data.scheme, e.data.user, e.data.host, e.data.port, e.data.uri_params, e.data.uri_headers), delete e.data.scheme, delete e.data.user, delete e.data.host, delete e.data.host_type, delete e.data.port, delete e.data.uri_params, e.startRule === "SIP_URI" && (e.data = e.data.uri);
582
+ e = e || { data: {} }, e.data.uri = new ee(e.data.scheme, e.data.user, e.data.host, e.data.port, e.data.uri_params, e.data.uri_headers), delete e.data.scheme, delete e.data.user, delete e.data.host, delete e.data.host_type, delete e.data.port, delete e.data.uri_params, e.startRule === "SIP_URI" && (e.data = e.data.uri);
583
583
  },
584
584
  "sips",
585
585
  p("sips", !0),
@@ -679,7 +679,7 @@ function Nt(a, e) {
679
679
  l = l.join("").toLowerCase(), b = b.join(""), e = e || { data: {} }, e.data.uri_headers || (e.data.uri_headers = {}), e.data.uri_headers[l] ? e.data.uri_headers[l].push(b) : e.data.uri_headers[l] = [b];
680
680
  },
681
681
  function() {
682
- e = e || { data: {} }, e.startRule === "Refer_To" && (e.data.uri = new Q(e.data.scheme, e.data.user, e.data.host, e.data.port, e.data.uri_params, e.data.uri_headers), delete e.data.scheme, delete e.data.user, delete e.data.host, delete e.data.host_type, delete e.data.port, delete e.data.uri_params);
682
+ e = e || { data: {} }, e.startRule === "Refer_To" && (e.data.uri = new ee(e.data.scheme, e.data.user, e.data.host, e.data.port, e.data.uri_params, e.data.uri_headers), delete e.data.scheme, delete e.data.user, delete e.data.host, delete e.data.host_type, delete e.data.port, delete e.data.uri_params);
683
683
  },
684
684
  "//",
685
685
  p("//", !1),
@@ -1920,19 +1920,19 @@ var y;
1920
1920
  (function(a) {
1921
1921
  a.Initial = "Initial", a.HaveLocalOffer = "HaveLocalOffer", a.HaveRemoteOffer = "HaveRemoteOffer", a.Stable = "Stable", a.Closed = "Closed";
1922
1922
  })(y = y || (y = {}));
1923
- const te = 500, Bt = 4e3, at = 5e3, q = {
1924
- T1: te,
1923
+ const ie = 500, Bt = 4e3, at = 5e3, q = {
1924
+ T1: ie,
1925
1925
  T2: Bt,
1926
- TIMER_B: 64 * te,
1927
- TIMER_D: 0 * te,
1928
- TIMER_F: 64 * te,
1929
- TIMER_H: 64 * te,
1926
+ TIMER_B: 64 * ie,
1927
+ TIMER_D: 0 * ie,
1928
+ TIMER_F: 64 * ie,
1929
+ TIMER_H: 64 * ie,
1930
1930
  TIMER_I: 0 * at,
1931
- TIMER_J: 0 * te,
1931
+ TIMER_J: 0 * ie,
1932
1932
  TIMER_K: 0 * at,
1933
- TIMER_L: 64 * te,
1934
- TIMER_M: 64 * te,
1935
- TIMER_N: 64 * te,
1933
+ TIMER_L: 64 * ie,
1934
+ TIMER_M: 64 * ie,
1935
+ TIMER_N: 64 * ie,
1936
1936
  PROVISIONAL_RESPONSE_INTERVAL: 6e4
1937
1937
  // See RFC 3261 Section 13.3.1.1
1938
1938
  };
@@ -2828,7 +2828,7 @@ class we {
2828
2828
  }
2829
2829
  referToString(e) {
2830
2830
  let t;
2831
- if (e instanceof Q)
2831
+ if (e instanceof ee)
2832
2832
  t = e.toString();
2833
2833
  else {
2834
2834
  if (!e.dialog)
@@ -3786,7 +3786,7 @@ class X {
3786
3786
  instanceId: "",
3787
3787
  params: {},
3788
3788
  regId: 0,
3789
- registrar: new Q("sip", "anonymous", "anonymous.invalid"),
3789
+ registrar: new ee("sip", "anonymous", "anonymous.invalid"),
3790
3790
  refreshFrequency: X.defaultRefreshFrequency
3791
3791
  };
3792
3792
  }
@@ -5798,7 +5798,7 @@ class B extends Ct {
5798
5798
  this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`), this.state === f.Completed && this.stateTransition(f.Terminated);
5799
5799
  }
5800
5800
  }
5801
- class ee {
5801
+ class te {
5802
5802
  constructor(e, t, i, s) {
5803
5803
  this.transactionConstructor = e, this.core = t, this.message = i, this.delegate = s, this.logger = this.loggerFactory.getLogger("sip.user-agent-server"), this.toTag = i.toTag ? i.toTag : qe(), this.init();
5804
5804
  }
@@ -5942,7 +5942,7 @@ class ee {
5942
5942
  this.core.userAgentServers.set(t.id, this);
5943
5943
  }
5944
5944
  }
5945
- class Yt extends ee {
5945
+ class Yt extends te {
5946
5946
  constructor(e, t, i) {
5947
5947
  super(B, e.userAgentCore, t, i);
5948
5948
  }
@@ -5953,7 +5953,7 @@ class Jt extends O {
5953
5953
  super(j, e.userAgentCore, s, t);
5954
5954
  }
5955
5955
  }
5956
- class Zt extends ee {
5956
+ class Zt extends te {
5957
5957
  constructor(e, t, i) {
5958
5958
  super(B, e.userAgentCore, t, i);
5959
5959
  }
@@ -5963,7 +5963,7 @@ class Et extends O {
5963
5963
  super(j, e, t, i);
5964
5964
  }
5965
5965
  }
5966
- class xt extends ee {
5966
+ class xt extends te {
5967
5967
  constructor(e, t, i) {
5968
5968
  super(B, e, t, i);
5969
5969
  }
@@ -5977,7 +5977,7 @@ class Xt extends O {
5977
5977
  function Qt(a) {
5978
5978
  return a.userAgentCore !== void 0;
5979
5979
  }
5980
- class ke extends ee {
5980
+ class ke extends te {
5981
5981
  /**
5982
5982
  * NOTIFY UAS constructor.
5983
5983
  * @param dialogOrCore - Dialog for in dialog NOTIFY, UserAgentCore for out of dialog NOTIFY (deprecated).
@@ -5994,7 +5994,7 @@ class ei extends O {
5994
5994
  super(j, e.userAgentCore, s, t), e.signalingStateTransition(s);
5995
5995
  }
5996
5996
  }
5997
- class ti extends ee {
5997
+ class ti extends te {
5998
5998
  constructor(e, t, i) {
5999
5999
  super(B, e.userAgentCore, t, i), e.signalingStateTransition(t), this.dialog = e;
6000
6000
  }
@@ -6049,7 +6049,7 @@ class ii extends O {
6049
6049
  }
6050
6050
  }
6051
6051
  }
6052
- class si extends ee {
6052
+ class si extends te {
6053
6053
  constructor(e, t, i) {
6054
6054
  super(L, e.userAgentCore, t, i), e.reinviteUserAgentServer = this, this.dialog = e;
6055
6055
  }
@@ -6100,7 +6100,7 @@ class ri extends O {
6100
6100
  function ni(a) {
6101
6101
  return a.userAgentCore !== void 0;
6102
6102
  }
6103
- class _t extends ee {
6103
+ class _t extends te {
6104
6104
  /**
6105
6105
  * REFER UAS constructor.
6106
6106
  * @param dialogOrCore - Dialog for in dialog REFER, UserAgentCore for out of dialog REFER.
@@ -6696,7 +6696,7 @@ class ai extends O {
6696
6696
  }
6697
6697
  }
6698
6698
  }
6699
- class je extends ee {
6699
+ class je extends te {
6700
6700
  constructor(e, t, i) {
6701
6701
  super(L, e, t, i), this.core = e;
6702
6702
  }
@@ -6809,7 +6809,7 @@ class ci extends O {
6809
6809
  super(j, e, t, i);
6810
6810
  }
6811
6811
  }
6812
- class di extends ee {
6812
+ class di extends te {
6813
6813
  constructor(e, t, i) {
6814
6814
  super(B, e, t, i), this.core = e;
6815
6815
  }
@@ -7191,7 +7191,7 @@ class hi extends O {
7191
7191
  this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."), this.waitNotifyStop(), this.delegate && this.delegate.onNotifyTimeout && this.delegate.onNotifyTimeout();
7192
7192
  }
7193
7193
  }
7194
- class ui extends ee {
7194
+ class ui extends te {
7195
7195
  constructor(e, t, i) {
7196
7196
  super(B, e, t, i), this.core = e;
7197
7197
  }
@@ -8496,7 +8496,7 @@ class W {
8496
8496
  * @param options - Options bucket. See {@link UserAgentOptions} for details.
8497
8497
  */
8498
8498
  constructor(e = {}) {
8499
- if (this._publishers = {}, this._registerers = {}, this._sessions = {}, this._subscriptions = {}, this._state = P.Stopped, this._stateEventEmitter = new xe(), this.delegate = e.delegate, this.options = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, W.defaultOptions()), { sipjsId: he(5) }), { uri: new Q("sip", "anonymous." + he(6), "anonymous.invalid") }), { viaHost: he(12) + ".invalid" }), W.stripUndefinedProperties(e)), this.options.hackIpInContact)
8499
+ if (this._publishers = {}, this._registerers = {}, this._sessions = {}, this._subscriptions = {}, this._state = P.Stopped, this._stateEventEmitter = new xe(), this.delegate = e.delegate, this.options = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, W.defaultOptions()), { sipjsId: he(5) }), { uri: new ee("sip", "anonymous." + he(6), "anonymous.invalid") }), { viaHost: he(12) + ".invalid" }), W.stripUndefinedProperties(e)), this.options.hackIpInContact)
8500
8500
  if (typeof this.options.hackIpInContact == "boolean" && this.options.hackIpInContact) {
8501
8501
  const s = Math.floor(Math.random() * 254 + 1);
8502
8502
  this.options.viaHost = "192.0.2." + s;
@@ -8593,7 +8593,7 @@ class W {
8593
8593
  sipjsId: "",
8594
8594
  transportConstructor: Re,
8595
8595
  transportOptions: {},
8596
- uri: new Q("sip", "anonymous", "anonymous.invalid"),
8596
+ uri: new ee("sip", "anonymous", "anonymous.invalid"),
8597
8597
  userAgentString: "SIP.js/" + kt,
8598
8598
  viaHost: ""
8599
8599
  };
@@ -8797,7 +8797,7 @@ class W {
8797
8797
  return {
8798
8798
  pubGruu: void 0,
8799
8799
  tempGruu: void 0,
8800
- uri: new Q("sip", e, this.options.viaHost, void 0, t),
8800
+ uri: new ee("sip", e, this.options.viaHost, void 0, t),
8801
8801
  toString: (s = {}) => {
8802
8802
  const r = s.anonymous || !1, n = s.outbound || !1, o = s.register || !1;
8803
8803
  let d = "<";
@@ -11338,7 +11338,7 @@ const Ri = `
11338
11338
  .meta { padding: 12px 16px 0; font-size: 12px; }
11339
11339
  .logs { max-height: 150px; padding: 12px 16px 16px; }
11340
11340
  }
11341
- `, ie = {
11341
+ `, se = {
11342
11342
  idle: "网页电话已加载,正在准备待机能力。",
11343
11343
  requesting: "正在向服务端申请网页通话会话。",
11344
11344
  standbyRequesting: "正在向服务端申请 widget 待机会话。",
@@ -11409,11 +11409,11 @@ const Ui = `
11409
11409
  function $(a, e, t) {
11410
11410
  t != null && (typeof t == "string" && t.trim() === "" || (a[e] = t));
11411
11411
  }
11412
- function se(a) {
11412
+ function Q(a) {
11413
11413
  return typeof a == "string" ? a.trim() : "";
11414
11414
  }
11415
11415
  function ft(a, e, t) {
11416
- const i = se(a?.session_mode);
11416
+ const i = Q(a?.session_mode);
11417
11417
  if (!i)
11418
11418
  throw N(`${t} 缺少必填字段 session_mode。`, {
11419
11419
  source: t,
@@ -11438,7 +11438,7 @@ function ft(a, e, t) {
11438
11438
  return i;
11439
11439
  }
11440
11440
  function Li(a, e = {}) {
11441
- const t = se(e?.session_action).toLowerCase(), i = se(e?.session_action_reason) || null, s = se(e?.session_action_detail) || null, r = se(e?.resolved_session_id) || null, n = se(e?.resolved_widget_anchor_number) || null, o = se(e?.resolved_browser_sip_username) || null, d = {
11441
+ const t = Q(e?.session_action).toLowerCase(), i = Q(e?.session_action_reason) || null, s = Q(e?.session_action_detail) || null, r = Q(e?.resolved_session_id) || null, n = Q(e?.resolved_widget_anchor_number) || null, o = Q(e?.resolved_browser_sip_username) || null, d = {
11442
11442
  source: a,
11443
11443
  session_action: t || null,
11444
11444
  session_action_reason: i,
@@ -11528,7 +11528,7 @@ function Ae(a) {
11528
11528
  }
11529
11529
  class Ki {
11530
11530
  constructor({ mount: e, shadowRoot: t, options: i }) {
11531
- this.mountNode = e, this.shadowRoot = t, this.options = i, this.mode = Bi(i.mode), this.legacyOutboundOnly = this.mode === "outbound", this.apiBaseUrl = Ie(i.apiBaseUrl || window.location.origin).href, this.client = null, this.issuedSession = null, this.bootstrap = null, this.turnIceServers = [], this.state = "idle", this.stateDetail = ie.idle, this.finalizing = !1, this.isMobileViewport = !1, this.pendingIncomingCall = null, this.visibilityHandler = null, this.sessionTouchTimer = null, this.sessionRecoveryInFlight = null, this.transportDisconnectTimer = null, this.transportDisconnectContext = null, this.e2eBridgeEnabled = Vi(), this.terminalFailureOverride = "", this.presenceId = Gi(), this.presenceTouchTimer = null, this.presenceFailureCount = 0, this.availabilityState = "preparing", this.availabilityDetail = "正在连接后台并准备网页电话待机。", this.connectivityRecoveryInFlight = null, this.lifecycleRunId = 0, this.pendingLifecycleMode = null, this.expectedClientTeardown = null, this.expectedTermination = null, this.autoStandbyRecoveryTimer = null, this.recentlyReleasedSessions = /* @__PURE__ */ new Map(), this.networkOnline = typeof navigator > "u" ? !0 : navigator.onLine !== !1, this.pageVisible = typeof document > "u" ? !0 : document.visibilityState === "visible", this.onlineHandler = null, this.offlineHandler = null, this.beforeUnloadHandler = null, this.pageHideHandler = null, this.unloadCleanupStarted = !1, this.panelAutoCloseTimer = null, this.transientPanelState = null, this.transientPanelDetail = "", this.missedIncomingCount = 0, this.debugRequested = i.debug === !0, this.debugPanelEnabled = !1, this.hasAccessToken = !!String(i.accessToken || "").trim(), this.triggerHintStorageKey = `${Mi}${String(i.siteKey || "default").trim() || "default"}`, this.triggerHintDismissed = Fi(this.triggerHintStorageKey), this.refs = {};
11531
+ this.mountNode = e, this.shadowRoot = t, this.options = i, this.mode = Bi(i.mode), this.legacyOutboundOnly = this.mode === "outbound", this.apiBaseUrl = Ie(i.apiBaseUrl || window.location.origin).href, this.client = null, this.issuedSession = null, this.bootstrap = null, this.turnIceServers = [], this.state = "idle", this.stateDetail = se.idle, this.finalizing = !1, this.isMobileViewport = !1, this.pendingIncomingCall = null, this.visibilityHandler = null, this.sessionTouchTimer = null, this.sessionRecoveryInFlight = null, this.transportDisconnectTimer = null, this.transportDisconnectContext = null, this.e2eBridgeEnabled = Vi(), this.terminalFailureOverride = "", this.presenceId = Gi(), this.presenceTouchTimer = null, this.presenceFailureCount = 0, this.availabilityState = "preparing", this.availabilityDetail = "正在连接后台并准备网页电话待机。", this.connectivityRecoveryInFlight = null, this.lifecycleRunId = 0, this.pendingLifecycleMode = null, this.expectedClientTeardown = null, this.expectedTermination = null, this.autoStandbyRecoveryTimer = null, this.recentlyReleasedSessions = /* @__PURE__ */ new Map(), this.networkOnline = typeof navigator > "u" ? !0 : navigator.onLine !== !1, this.pageVisible = typeof document > "u" ? !0 : document.visibilityState === "visible", this.onlineHandler = null, this.offlineHandler = null, this.beforeUnloadHandler = null, this.pageHideHandler = null, this.unloadCleanupStarted = !1, this.panelAutoCloseTimer = null, this.transientPanelState = null, this.transientPanelDetail = "", this.missedIncomingCount = 0, this.debugRequested = i.debug === !0, this.debugPanelEnabled = !1, this.hasAccessToken = !!String(i.accessToken || "").trim(), this.triggerHintStorageKey = `${Mi}${String(i.siteKey || "default").trim() || "default"}`, this.triggerHintDismissed = Fi(this.triggerHintStorageKey), this.refs = {};
11532
11532
  }
11533
11533
  async mount() {
11534
11534
  this.isMobileViewport = typeof window < "u" && window.matchMedia("(max-width: 480px)").matches, this.shadowRoot.innerHTML = `
@@ -11581,7 +11581,7 @@ class Ki {
11581
11581
  }), this.isMobileViewport && ["requesting", "registering", "calling", "connected"].includes(this.state) && (this.stateDetail = "页面已切到后台;手机网页回到前台后请确认通话仍在继续。", this.render());
11582
11582
  return;
11583
11583
  }
11584
- if (this.isMobileViewport && (this.appendLog("页面已回到前台", { state: this.state }), ["requesting", "registering", "calling", "connected"].includes(this.state) && (this.stateDetail = ie[this.state] || ie.idle, this.render())), this.touchWidgetPresence("visibility-visible"), !this.legacyOutboundOnly && ["standby", "registering", "standbyRequesting", "failed", "idle", "missed", "rejected", "ended"].includes(this.state)) {
11584
+ if (this.isMobileViewport && (this.appendLog("页面已回到前台", { state: this.state }), ["requesting", "registering", "calling", "connected"].includes(this.state) && (this.stateDetail = se[this.state] || se.idle, this.render())), this.touchWidgetPresence("visibility-visible"), !this.legacyOutboundOnly && ["standby", "registering", "standbyRequesting", "failed", "idle", "missed", "rejected", "ended"].includes(this.state)) {
11585
11585
  const e = this.client?.getConnectionSnapshot?.() || null, t = !!(e?.connected && (this.state !== "standby" || e?.registered));
11586
11586
  this.issuedSession?.session_id && t ? this.touchIssuedSession(this.state, { trigger: "visibility-visible" }) : (this.appendLog("页面回到前台后检测到待机链路未处于健康状态,准备自动重建。", {
11587
11587
  state: this.state,
@@ -11660,7 +11660,12 @@ class Ki {
11660
11660
  };
11661
11661
  }
11662
11662
  getVisibleState() {
11663
- return this.transientPanelState ? this.transientPanelState : this.state === "incoming" ? "ringing" : ["requesting", "registering", "calling"].includes(this.state) ? "dialing" : this.state === "connected" ? "connected" : "idle";
11663
+ if (this.transientPanelState)
11664
+ return this.transientPanelState;
11665
+ if (this.state === "incoming")
11666
+ return "ringing";
11667
+ const e = Q(this.issuedSession?.session_mode), t = this.pendingLifecycleMode === "outbound", i = this.state === "registering" && e === "outbound";
11668
+ return this.state === "calling" || i || t && ["requesting", "registering"].includes(this.state) ? "dialing" : this.state === "connected" ? "connected" : "idle";
11664
11669
  }
11665
11670
  isPanelVisible() {
11666
11671
  return this.getVisibleState() !== "idle";
@@ -11842,7 +11847,7 @@ class Ki {
11842
11847
  return;
11843
11848
  }
11844
11849
  if (e === "ringing" || e === "dialing") {
11845
- this.setState("calling", t?.message || ie.calling);
11850
+ this.setState("calling", t?.message || se.calling);
11846
11851
  return;
11847
11852
  }
11848
11853
  if (e === "answered") {
@@ -11856,13 +11861,13 @@ class Ki {
11856
11861
  await this.handleStandbyTermination(t);
11857
11862
  return;
11858
11863
  }
11859
- t && typeof t == "object" && (t.source === "invite-response" || t.source === "invite-exception" || t.code || t.status || t.stage) && (this.terminalFailureOverride = t?.message || ie.failed, this.setState("failed", this.terminalFailureOverride)), await this.finalizeAfterTermination(t?.hangupSource || "terminated");
11864
+ t && typeof t == "object" && (t.source === "invite-response" || t.source === "invite-exception" || t.code || t.status || t.stage) && (this.terminalFailureOverride = t?.message || se.failed, this.setState("failed", this.terminalFailureOverride)), await this.finalizeAfterTermination(t?.hangupSource || "terminated");
11860
11865
  return;
11861
11866
  }
11862
11867
  if (e === "failed") {
11863
11868
  if (this.isExpectedClientTeardown())
11864
11869
  return;
11865
- this.pendingLifecycleMode = null, await this.clearTransportDisconnectGrace(!1), this.stopSessionTouch(), this.terminalFailureOverride = t?.message || ie.failed, this.setState("failed", this.terminalFailureOverride), this.setTransientPanelState("failed", "当前暂时无法接通,请稍后再试。"), this.setAvailabilityState("recovering", "通话链路异常断开,系统会继续自动恢复。"), await this.releaseIssuedSession("failed", "sip-client-failed");
11870
+ this.pendingLifecycleMode = null, await this.clearTransportDisconnectGrace(!1), this.stopSessionTouch(), this.terminalFailureOverride = t?.message || se.failed, this.setState("failed", this.terminalFailureOverride), this.setTransientPanelState("failed", "当前暂时无法接通,请稍后再试。"), this.setAvailabilityState("recovering", "通话链路异常断开,系统会继续自动恢复。"), await this.releaseIssuedSession("failed", "sip-client-failed");
11866
11871
  return;
11867
11872
  }
11868
11873
  if (e === "disconnected" || e === "unregistered") {
@@ -11923,7 +11928,7 @@ class Ki {
11923
11928
  this.beginLifecycleRun(), this.finalizing = !0;
11924
11929
  try {
11925
11930
  this.pendingLifecycleMode = null, this.stopSessionTouch(), this.stopTransportDisconnectGrace(), await this.releaseIssuedSession("released", e), this.client && (await this.client.destroy(), this.client = null);
11926
- const t = this.terminalFailureOverride || (this.state === "failed" ? this.stateDetail || ie.failed : "");
11931
+ const t = this.terminalFailureOverride || (this.state === "failed" ? this.stateDetail || se.failed : "");
11927
11932
  if (this.setTransientPanelState(
11928
11933
  t ? "failed" : "ended",
11929
11934
  t ? "当前暂时无法接通,请稍后再试。" : "本次通话已结束。"
@@ -12286,7 +12291,7 @@ class Ki {
12286
12291
  const i = Li(e, t);
12287
12292
  if (i.action !== Xe.restartStandby)
12288
12293
  return !1;
12289
- const s = se(this.issuedSession?.session_mode), r = se(this.pendingLifecycleMode), n = s === Te.outbound || r === gt.outbound, o = s === Te.standby || r === gt.standby;
12294
+ const s = Q(this.issuedSession?.session_mode), r = Q(this.pendingLifecycleMode), n = s === Te.outbound || r === gt.outbound, o = s === Te.standby || r === gt.standby;
12290
12295
  if (n || !o)
12291
12296
  throw N("非待机协议上下文收到了非法的 restart_standby 指令。", {
12292
12297
  source: e,
@@ -12510,7 +12515,7 @@ class Ki {
12510
12515
  }, $i));
12511
12516
  }
12512
12517
  setState(e, t = "") {
12513
- this.state = e, this.stateDetail = t || ie[e] || ie.idle, this.syncAvailabilityState(), this.render(), this.emitHostCallback("onStateChange", this.getSnapshot());
12518
+ this.state = e, this.stateDetail = t || se[e] || se.idle, this.syncAvailabilityState(), this.render(), this.emitHostCallback("onStateChange", this.getSnapshot());
12514
12519
  }
12515
12520
  appendLog(e, t) {
12516
12521
  if (!this.refs.logs)
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "package_name": "@shenyin/embedded-call-widget",
3
- "source_package_version": "3.0.1",
4
- "built_at": "2026-04-09T01:03:56.397Z",
3
+ "source_package_version": "3.0.2",
4
+ "built_at": "2026-04-09T01:34:28.918Z",
5
5
  "outputs": {
6
6
  "esm_shell": "embedded-call-widget.js",
7
7
  "esm_runtime": "embedded-call-widget-runtime.js",
@@ -55,9 +55,9 @@
55
55
  },
56
56
  "release_metadata": {
57
57
  "npm_package_name": "@shenyin/embedded-call-widget",
58
- "git_tag": "embedded-call-widget-v3.0.1",
59
- "git_tag_alias": "v3.0.1",
60
- "cdn_version_path": "embedded-call-widget/3.0.1/",
58
+ "git_tag": "embedded-call-widget-v3.0.2",
59
+ "git_tag_alias": "v3.0.2",
60
+ "cdn_version_path": "embedded-call-widget/3.0.2/",
61
61
  "cdn_latest_path": "embedded-call-widget/latest/",
62
62
  "semver_channel": "stable"
63
63
  },
@@ -70,9 +70,9 @@
70
70
  },
71
71
  "esm_runtime": {
72
72
  "file": "embedded-call-widget-runtime.js",
73
- "size_bytes": 536519,
74
- "sha256": "8ef265e594383cce14b511cecfc3611508a187cc6d133dbb66a3c84330720db5",
75
- "sri_sha384": "sha384-Y88gMCdP7x5XrNjJRruLHW1YG5RkwKrVFQH9gr+cSMB9OSpK5OvEmb9DfG3Y9Chm"
73
+ "size_bytes": 536735,
74
+ "sha256": "c5f6449ce61929c95b08a3a5933c4cb791ac4ef09918e3bdfd836a385c14d847",
75
+ "sri_sha384": "sha384-5MPy56VqK3zGS91Hz8qLH7RTbpIEJX//BIuM0oUls1dvNgqSTHl/+jvjWJSVexaC"
76
76
  },
77
77
  "iife_shell": {
78
78
  "file": "embedded-call-widget.iife.js",
@@ -82,9 +82,9 @@
82
82
  },
83
83
  "iife_runtime": {
84
84
  "file": "embedded-call-widget-runtime.iife.js",
85
- "size_bytes": 350752,
86
- "sha256": "203b997a290a0c7a01d3e4a30f9f941148ff9b95c3c8f2b5729fc599c061f0fd",
87
- "sri_sha384": "sha384-+fypdWEKc3W42EGbtYbxsCIoE+XE282pnYglPUjjmVzp0AGBKVl1cT72mqaic+CX"
85
+ "size_bytes": 350921,
86
+ "sha256": "9ffcd86533e37dcef739b1f8fd1fe47f081e48846ac6f59216dd5498c3abdf03",
87
+ "sri_sha384": "sha384-HYNi1/YPeGfZXIzBFShKmmHoi988e0MPxpaKCvW2imqBMFJwgBczto6cCUMDIxaS"
88
88
  }
89
89
  }
90
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shenyin/embedded-call-widget",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [