@vonage/client-sdk 1.0.1-alpha.3 → 1.0.1-alpha.5

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.
@@ -50393,7 +50393,67 @@ function requireClientsdkClientcore () {
50393
50393
  return Unit_getInstance();
50394
50394
  };
50395
50395
  }
50396
- function VoiceAPIImpl$answerCall$lambda$lambda($callback) {
50396
+ function VoiceAPIImpl$answerCall$lambda$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel) {
50397
+ return function () {
50398
+ var tmp0_safe_receiver = this$0.p2p_1.h2g(getKClass(CallReducer));
50399
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t2p_1;
50400
+ var call = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g2($legIdOrErr);
50401
+ var tmp2_safe_receiver = call;
50402
+ var tmp3_subject = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l2p_1;
50403
+ var tmp0 = tmp3_subject == null ? -1 : tmp3_subject.e4_1;
50404
+ var tmp;
50405
+ switch (tmp0) {
50406
+ case -1:
50407
+ var tmp$ret$1;
50408
+ // Inline function 'kotlin.let' call
50409
+ var tmp0_let = $callback(Companion_getInstance_107().b2g(InternalError_NoInviteFound_getInstance()));
50410
+ // Inline function 'kotlin.contracts.contract' call
50411
+ var tmp$ret$0;
50412
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
50413
+ var tmp0_safe_receiver_0 = $cancel._v;
50414
+ tmp$ret$0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0();
50415
+ tmp$ret$1 = tmp$ret$0;
50416
+
50417
+ tmp = Unit_getInstance();
50418
+ break;
50419
+ case 3:
50420
+ var tmp$ret$2;
50421
+ // Inline function 'kotlin.also' call
50422
+ var tmp4_safe_receiver = $cancel._v;
50423
+ var tmp1_also = tmp4_safe_receiver == null ? null : tmp4_safe_receiver();
50424
+ // Inline function 'kotlin.contracts.contract' call
50425
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
50426
+ $callback(null);
50427
+ tmp$ret$2 = tmp1_also;
50428
+
50429
+ tmp = Unit_getInstance();
50430
+ break;
50431
+ case 5:
50432
+ case 6:
50433
+ var tmp$ret$3;
50434
+ // Inline function 'kotlin.also' call
50435
+ var tmp5_safe_receiver = $cancel._v;
50436
+ var tmp2_also = tmp5_safe_receiver == null ? null : tmp5_safe_receiver();
50437
+ // Inline function 'kotlin.contracts.contract' call
50438
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
50439
+ $callback(Companion_getInstance_107().b2g(InternalError_InboundCallFailed_getInstance()));
50440
+ tmp$ret$3 = tmp2_also;
50441
+
50442
+ tmp = Unit_getInstance();
50443
+ break;
50444
+ default:
50445
+ tmp = Unit_getInstance();
50446
+ break;
50447
+ }
50448
+ return Unit_getInstance();
50449
+ };
50450
+ }
50451
+ function VoiceAPIImpl$answerCall$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel) {
50452
+ return function () {
50453
+ return new StoredSubscription(VoiceAPIImpl$answerCall$lambda$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel));
50454
+ };
50455
+ }
50456
+ function VoiceAPIImpl$answerCall$lambda$lambda($callback, this$0) {
50397
50457
  return function (legIdOrErr) {
50398
50458
  var tmp0_subject = legIdOrErr;
50399
50459
  var tmp;
@@ -50401,7 +50461,10 @@ function requireClientsdkClientcore () {
50401
50461
  tmp = $callback(Companion_getInstance_107().g2g(InternalError_InboundCallFailed_getInstance(), legIdOrErr.message, legIdOrErr.cause));
50402
50462
  } else {
50403
50463
  if (!(tmp0_subject == null) ? typeof tmp0_subject === 'string' : false) {
50404
- tmp = $callback(null);
50464
+ var cancel = {_v: null};
50465
+ var tmp_0 = getKClass(CallReducer);
50466
+ cancel._v = this$0.p2p_1.l2k(tmp_0, VoiceAPIImpl$answerCall$lambda$lambda$lambda(this$0, legIdOrErr, $callback, cancel));
50467
+ tmp = Unit_getInstance();
50405
50468
  } else {
50406
50469
  tmp = $callback(Companion_getInstance_107().h2j());
50407
50470
  }
@@ -50417,7 +50480,7 @@ function requireClientsdkClientcore () {
50417
50480
  tmp = $callback(Companion_getInstance_107().b2g(it));
50418
50481
  } else {
50419
50482
  var tmp_0 = new SetupInboundCall($callId, $invite.a2q_1, $invite.z2p_1, $invite.x2p_1, ensureNotNull($invite.b2q_1), null);
50420
- this$0.p2p_1.c1d(new Action(tmp_0, ActionMeta_init_$Create$(null, null, VoiceAPIImpl$answerCall$lambda$lambda($callback), 3, null)));
50483
+ this$0.p2p_1.c1d(new Action(tmp_0, ActionMeta_init_$Create$(null, null, VoiceAPIImpl$answerCall$lambda$lambda($callback, this$0), 3, null)));
50421
50484
  tmp = Unit_getInstance();
50422
50485
  }
50423
50486
  return Unit_getInstance();
@@ -59579,100 +59642,105 @@ function requireClientsdkClientcore () {
59579
59642
  InviteReducer.prototype.h33 = function (action, state) {
59580
59643
  var tmp0_subject = action.p1d_1;
59581
59644
  var tmp;
59582
- if (tmp0_subject instanceof SessionSuccessEvent) {
59583
- tmp = state.y30(action.p1d_1);
59645
+ if (tmp0_subject instanceof ErrorReport) {
59646
+ var tmp1_elvis_lhs = action.q1d_1.n1d_1;
59647
+ tmp = state.s32(action.p1d_1, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
59584
59648
  } else {
59585
- if (tmp0_subject instanceof MemberInvitedEvent) {
59586
- var tmp_0;
59587
- if (!(action.p1d_1.n1y_1.b1z_1.m2j_1 == null)) {
59588
- tmp_0 = state.p30(action.p1d_1);
59589
- } else {
59590
- tmp_0 = null;
59591
- }
59592
- tmp = tmp_0;
59649
+ if (tmp0_subject instanceof SessionSuccessEvent) {
59650
+ tmp = state.y30(action.p1d_1);
59593
59651
  } else {
59594
- if (tmp0_subject instanceof PushMemberInvitedEvent) {
59595
- var tmp_1;
59596
- if (!(action.p1d_1.w23_1.b1z_1.m2j_1 == null)) {
59597
- tmp_1 = state.j33(action.p1d_1);
59652
+ if (tmp0_subject instanceof MemberInvitedEvent) {
59653
+ var tmp_0;
59654
+ if (!(action.p1d_1.n1y_1.b1z_1.m2j_1 == null)) {
59655
+ tmp_0 = state.p30(action.p1d_1);
59598
59656
  } else {
59599
- tmp_1 = null;
59657
+ tmp_0 = null;
59600
59658
  }
59601
- tmp = tmp_1;
59659
+ tmp = tmp_0;
59602
59660
  } else {
59603
- if (tmp0_subject instanceof MemberJoinedEvent) {
59604
- var tmp_2;
59605
- if (!(action.p1d_1.h1z_1.r1z_1.m2j_1 == null)) {
59606
- tmp_2 = state.o30(action.p1d_1);
59661
+ if (tmp0_subject instanceof PushMemberInvitedEvent) {
59662
+ var tmp_1;
59663
+ if (!(action.p1d_1.w23_1.b1z_1.m2j_1 == null)) {
59664
+ tmp_1 = state.j33(action.p1d_1);
59607
59665
  } else {
59608
- tmp_2 = null;
59666
+ tmp_1 = null;
59609
59667
  }
59610
- tmp = tmp_2;
59668
+ tmp = tmp_1;
59611
59669
  } else {
59612
- if (tmp0_subject instanceof MemberLeftEvent) {
59613
- var id = action.p1d_1.v1z_1.g20_1.m2j_1;
59614
- var tmp1_safe_receiver = id;
59615
- var tmp_3;
59616
- if (tmp1_safe_receiver == null) {
59617
- tmp_3 = null;
59670
+ if (tmp0_subject instanceof MemberJoinedEvent) {
59671
+ var tmp_2;
59672
+ if (!(action.p1d_1.h1z_1.r1z_1.m2j_1 == null)) {
59673
+ tmp_2 = state.o30(action.p1d_1);
59618
59674
  } else {
59619
- var tmp$ret$1;
59620
- // Inline function 'kotlin.let' call
59621
- // Inline function 'kotlin.contracts.contract' call
59622
- var tmp$ret$0;
59623
- // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59624
- tmp$ret$0 = state.f32(action.p1d_1, tmp1_safe_receiver);
59625
- tmp$ret$1 = tmp$ret$0;
59626
- tmp_3 = tmp$ret$1;
59675
+ tmp_2 = null;
59627
59676
  }
59628
- tmp = tmp_3;
59677
+ tmp = tmp_2;
59629
59678
  } else {
59630
- if (tmp0_subject instanceof RTCHangupEvent) {
59631
- var id_0 = action.p1d_1.d23_1.f1y_1.m2j_1;
59632
- var tmp2_safe_receiver = id_0;
59633
- var tmp_4;
59679
+ if (tmp0_subject instanceof MemberLeftEvent) {
59680
+ var id = action.p1d_1.v1z_1.g20_1.m2j_1;
59681
+ var tmp2_safe_receiver = id;
59682
+ var tmp_3;
59634
59683
  if (tmp2_safe_receiver == null) {
59635
- tmp_4 = null;
59684
+ tmp_3 = null;
59636
59685
  } else {
59637
- var tmp$ret$3;
59686
+ var tmp$ret$1;
59638
59687
  // Inline function 'kotlin.let' call
59639
59688
  // Inline function 'kotlin.contracts.contract' call
59640
- var tmp$ret$2;
59689
+ var tmp$ret$0;
59641
59690
  // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59642
- tmp$ret$2 = state.c32(action.p1d_1, tmp2_safe_receiver);
59643
- tmp$ret$3 = tmp$ret$2;
59644
- tmp_4 = tmp$ret$3;
59691
+ tmp$ret$0 = state.f32(action.p1d_1, tmp2_safe_receiver);
59692
+ tmp$ret$1 = tmp$ret$0;
59693
+ tmp_3 = tmp$ret$1;
59645
59694
  }
59646
- tmp = tmp_4;
59695
+ tmp = tmp_3;
59647
59696
  } else {
59648
- if (tmp0_subject instanceof InviteCleanup) {
59649
- var tmp$ret$5;
59650
- // Inline function 'kotlin.let' call
59651
- var tmp0_let = state.i33(action.p1d_1, action.p1d_1.g2s_1);
59652
- // Inline function 'kotlin.contracts.contract' call
59653
- var tmp$ret$4;
59654
- // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59655
- tmp$ret$4 = null;
59656
- tmp$ret$5 = tmp$ret$4;
59657
- tmp = tmp$ret$5;
59697
+ if (tmp0_subject instanceof RTCHangupEvent) {
59698
+ var id_0 = action.p1d_1.d23_1.f1y_1.m2j_1;
59699
+ var tmp3_safe_receiver = id_0;
59700
+ var tmp_4;
59701
+ if (tmp3_safe_receiver == null) {
59702
+ tmp_4 = null;
59703
+ } else {
59704
+ var tmp$ret$3;
59705
+ // Inline function 'kotlin.let' call
59706
+ // Inline function 'kotlin.contracts.contract' call
59707
+ var tmp$ret$2;
59708
+ // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59709
+ tmp$ret$2 = state.c32(action.p1d_1, tmp3_safe_receiver);
59710
+ tmp$ret$3 = tmp$ret$2;
59711
+ tmp_4 = tmp$ret$3;
59712
+ }
59713
+ tmp = tmp_4;
59658
59714
  } else {
59659
- if (isInterface(tmp0_subject, ApiRequest)) {
59660
- var tmp3_elvis_lhs = action.q1d_1.n1d_1;
59661
- var callId = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
59662
- var tmp4_subject = action.p1d_1;
59663
- var tmp_5;
59664
- if (tmp4_subject instanceof MemberKickRequest) {
59665
- tmp_5 = state.z31(action.p1d_1, callId, action.q1d_1.m1d_1);
59666
- } else {
59667
- if (tmp4_subject instanceof MemberJoinRequest) {
59668
- tmp_5 = state.y31(action.p1d_1, callId, action.q1d_1.m1d_1);
59715
+ if (tmp0_subject instanceof InviteCleanup) {
59716
+ var tmp$ret$5;
59717
+ // Inline function 'kotlin.let' call
59718
+ var tmp0_let = state.i33(action.p1d_1, action.p1d_1.g2s_1);
59719
+ // Inline function 'kotlin.contracts.contract' call
59720
+ var tmp$ret$4;
59721
+ // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59722
+ tmp$ret$4 = null;
59723
+ tmp$ret$5 = tmp$ret$4;
59724
+ tmp = tmp$ret$5;
59725
+ } else {
59726
+ if (isInterface(tmp0_subject, ApiRequest)) {
59727
+ var tmp4_elvis_lhs = action.q1d_1.n1d_1;
59728
+ var callId = tmp4_elvis_lhs == null ? '' : tmp4_elvis_lhs;
59729
+ var tmp5_subject = action.p1d_1;
59730
+ var tmp_5;
59731
+ if (tmp5_subject instanceof MemberKickRequest) {
59732
+ tmp_5 = state.z31(action.p1d_1, callId, action.q1d_1.m1d_1);
59669
59733
  } else {
59670
- tmp_5 = null;
59734
+ if (tmp5_subject instanceof MemberJoinRequest) {
59735
+ tmp_5 = state.y31(action.p1d_1, callId, action.q1d_1.m1d_1);
59736
+ } else {
59737
+ tmp_5 = null;
59738
+ }
59671
59739
  }
59740
+ tmp = tmp_5;
59741
+ } else {
59742
+ tmp = null;
59672
59743
  }
59673
- tmp = tmp_5;
59674
- } else {
59675
- tmp = null;
59676
59744
  }
59677
59745
  }
59678
59746
  }
@@ -59789,6 +59857,23 @@ function requireClientsdkClientcore () {
59789
59857
  return Unit_getInstance();
59790
59858
  };
59791
59859
  }
59860
+ function InviteState$update$lambda_6($action) {
59861
+ return function ($this$modify) {
59862
+ var tmp;
59863
+ var tmp_0;
59864
+ var tmp_1 = $this$modify.c2q_1;
59865
+ if (tmp_1 instanceof Pending) {
59866
+ tmp_0 = $this$modify.c2q_1.k2q() === $action.s1d_1;
59867
+ } else {
59868
+ tmp_0 = false;
59869
+ }
59870
+ if (tmp_0) {
59871
+ $this$modify.c2q_1 = toFailed($this$modify.c2q_1, $action.r1d_1);
59872
+ tmp = Unit_getInstance();
59873
+ }
59874
+ return Unit_getInstance();
59875
+ };
59876
+ }
59792
59877
  function InviteState(invites, currentUserId) {
59793
59878
  this.l2q_1 = invites;
59794
59879
  this.m2q_1 = currentUserId;
@@ -59852,6 +59937,9 @@ function requireClientsdkClientcore () {
59852
59937
  tmp$ret$0 = this;
59853
59938
  return tmp$ret$0;
59854
59939
  };
59940
+ InviteState.prototype.s32 = function (action, callId) {
59941
+ return modify(this, callId, InviteState$update$lambda_6(action));
59942
+ };
59855
59943
  InviteState.prototype.l33 = function (invites, currentUserId) {
59856
59944
  return new InviteState(invites, currentUserId);
59857
59945
  };
@@ -66282,6 +66370,10 @@ class MediaClient {
66282
66370
  let error;
66283
66371
  try {
66284
66372
  const pc = yield this.getNewPC();
66373
+ pc.onconnectionstatechange = () => {
66374
+ var _a;
66375
+ (_a = this.delegate) === null || _a === void 0 ? void 0 : _a.onConnectionChange(rtcId, pc.connectionState);
66376
+ };
66285
66377
  this.pcs.set(rtcId, pc);
66286
66378
  sdp = yield createAnswer(pc, offerSDP);
66287
66379
  }
@@ -50369,7 +50369,67 @@ function requireClientsdkClientcore () {
50369
50369
  return Unit_getInstance();
50370
50370
  };
50371
50371
  }
50372
- function VoiceAPIImpl$answerCall$lambda$lambda($callback) {
50372
+ function VoiceAPIImpl$answerCall$lambda$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel) {
50373
+ return function () {
50374
+ var tmp0_safe_receiver = this$0.p2p_1.h2g(getKClass(CallReducer));
50375
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t2p_1;
50376
+ var call = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g2($legIdOrErr);
50377
+ var tmp2_safe_receiver = call;
50378
+ var tmp3_subject = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l2p_1;
50379
+ var tmp0 = tmp3_subject == null ? -1 : tmp3_subject.e4_1;
50380
+ var tmp;
50381
+ switch (tmp0) {
50382
+ case -1:
50383
+ var tmp$ret$1;
50384
+ // Inline function 'kotlin.let' call
50385
+ var tmp0_let = $callback(Companion_getInstance_107().b2g(InternalError_NoInviteFound_getInstance()));
50386
+ // Inline function 'kotlin.contracts.contract' call
50387
+ var tmp$ret$0;
50388
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
50389
+ var tmp0_safe_receiver_0 = $cancel._v;
50390
+ tmp$ret$0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0();
50391
+ tmp$ret$1 = tmp$ret$0;
50392
+
50393
+ tmp = Unit_getInstance();
50394
+ break;
50395
+ case 3:
50396
+ var tmp$ret$2;
50397
+ // Inline function 'kotlin.also' call
50398
+ var tmp4_safe_receiver = $cancel._v;
50399
+ var tmp1_also = tmp4_safe_receiver == null ? null : tmp4_safe_receiver();
50400
+ // Inline function 'kotlin.contracts.contract' call
50401
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
50402
+ $callback(null);
50403
+ tmp$ret$2 = tmp1_also;
50404
+
50405
+ tmp = Unit_getInstance();
50406
+ break;
50407
+ case 5:
50408
+ case 6:
50409
+ var tmp$ret$3;
50410
+ // Inline function 'kotlin.also' call
50411
+ var tmp5_safe_receiver = $cancel._v;
50412
+ var tmp2_also = tmp5_safe_receiver == null ? null : tmp5_safe_receiver();
50413
+ // Inline function 'kotlin.contracts.contract' call
50414
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
50415
+ $callback(Companion_getInstance_107().b2g(InternalError_InboundCallFailed_getInstance()));
50416
+ tmp$ret$3 = tmp2_also;
50417
+
50418
+ tmp = Unit_getInstance();
50419
+ break;
50420
+ default:
50421
+ tmp = Unit_getInstance();
50422
+ break;
50423
+ }
50424
+ return Unit_getInstance();
50425
+ };
50426
+ }
50427
+ function VoiceAPIImpl$answerCall$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel) {
50428
+ return function () {
50429
+ return new StoredSubscription(VoiceAPIImpl$answerCall$lambda$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel));
50430
+ };
50431
+ }
50432
+ function VoiceAPIImpl$answerCall$lambda$lambda($callback, this$0) {
50373
50433
  return function (legIdOrErr) {
50374
50434
  var tmp0_subject = legIdOrErr;
50375
50435
  var tmp;
@@ -50377,7 +50437,10 @@ function requireClientsdkClientcore () {
50377
50437
  tmp = $callback(Companion_getInstance_107().g2g(InternalError_InboundCallFailed_getInstance(), legIdOrErr.message, legIdOrErr.cause));
50378
50438
  } else {
50379
50439
  if (!(tmp0_subject == null) ? typeof tmp0_subject === 'string' : false) {
50380
- tmp = $callback(null);
50440
+ var cancel = {_v: null};
50441
+ var tmp_0 = getKClass(CallReducer);
50442
+ cancel._v = this$0.p2p_1.l2k(tmp_0, VoiceAPIImpl$answerCall$lambda$lambda$lambda(this$0, legIdOrErr, $callback, cancel));
50443
+ tmp = Unit_getInstance();
50381
50444
  } else {
50382
50445
  tmp = $callback(Companion_getInstance_107().h2j());
50383
50446
  }
@@ -50393,7 +50456,7 @@ function requireClientsdkClientcore () {
50393
50456
  tmp = $callback(Companion_getInstance_107().b2g(it));
50394
50457
  } else {
50395
50458
  var tmp_0 = new SetupInboundCall($callId, $invite.a2q_1, $invite.z2p_1, $invite.x2p_1, ensureNotNull($invite.b2q_1), null);
50396
- this$0.p2p_1.c1d(new Action(tmp_0, ActionMeta_init_$Create$(null, null, VoiceAPIImpl$answerCall$lambda$lambda($callback), 3, null)));
50459
+ this$0.p2p_1.c1d(new Action(tmp_0, ActionMeta_init_$Create$(null, null, VoiceAPIImpl$answerCall$lambda$lambda($callback, this$0), 3, null)));
50397
50460
  tmp = Unit_getInstance();
50398
50461
  }
50399
50462
  return Unit_getInstance();
@@ -59555,100 +59618,105 @@ function requireClientsdkClientcore () {
59555
59618
  InviteReducer.prototype.h33 = function (action, state) {
59556
59619
  var tmp0_subject = action.p1d_1;
59557
59620
  var tmp;
59558
- if (tmp0_subject instanceof SessionSuccessEvent) {
59559
- tmp = state.y30(action.p1d_1);
59621
+ if (tmp0_subject instanceof ErrorReport) {
59622
+ var tmp1_elvis_lhs = action.q1d_1.n1d_1;
59623
+ tmp = state.s32(action.p1d_1, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
59560
59624
  } else {
59561
- if (tmp0_subject instanceof MemberInvitedEvent) {
59562
- var tmp_0;
59563
- if (!(action.p1d_1.n1y_1.b1z_1.m2j_1 == null)) {
59564
- tmp_0 = state.p30(action.p1d_1);
59565
- } else {
59566
- tmp_0 = null;
59567
- }
59568
- tmp = tmp_0;
59625
+ if (tmp0_subject instanceof SessionSuccessEvent) {
59626
+ tmp = state.y30(action.p1d_1);
59569
59627
  } else {
59570
- if (tmp0_subject instanceof PushMemberInvitedEvent) {
59571
- var tmp_1;
59572
- if (!(action.p1d_1.w23_1.b1z_1.m2j_1 == null)) {
59573
- tmp_1 = state.j33(action.p1d_1);
59628
+ if (tmp0_subject instanceof MemberInvitedEvent) {
59629
+ var tmp_0;
59630
+ if (!(action.p1d_1.n1y_1.b1z_1.m2j_1 == null)) {
59631
+ tmp_0 = state.p30(action.p1d_1);
59574
59632
  } else {
59575
- tmp_1 = null;
59633
+ tmp_0 = null;
59576
59634
  }
59577
- tmp = tmp_1;
59635
+ tmp = tmp_0;
59578
59636
  } else {
59579
- if (tmp0_subject instanceof MemberJoinedEvent) {
59580
- var tmp_2;
59581
- if (!(action.p1d_1.h1z_1.r1z_1.m2j_1 == null)) {
59582
- tmp_2 = state.o30(action.p1d_1);
59637
+ if (tmp0_subject instanceof PushMemberInvitedEvent) {
59638
+ var tmp_1;
59639
+ if (!(action.p1d_1.w23_1.b1z_1.m2j_1 == null)) {
59640
+ tmp_1 = state.j33(action.p1d_1);
59583
59641
  } else {
59584
- tmp_2 = null;
59642
+ tmp_1 = null;
59585
59643
  }
59586
- tmp = tmp_2;
59644
+ tmp = tmp_1;
59587
59645
  } else {
59588
- if (tmp0_subject instanceof MemberLeftEvent) {
59589
- var id = action.p1d_1.v1z_1.g20_1.m2j_1;
59590
- var tmp1_safe_receiver = id;
59591
- var tmp_3;
59592
- if (tmp1_safe_receiver == null) {
59593
- tmp_3 = null;
59646
+ if (tmp0_subject instanceof MemberJoinedEvent) {
59647
+ var tmp_2;
59648
+ if (!(action.p1d_1.h1z_1.r1z_1.m2j_1 == null)) {
59649
+ tmp_2 = state.o30(action.p1d_1);
59594
59650
  } else {
59595
- var tmp$ret$1;
59596
- // Inline function 'kotlin.let' call
59597
- // Inline function 'kotlin.contracts.contract' call
59598
- var tmp$ret$0;
59599
- // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59600
- tmp$ret$0 = state.f32(action.p1d_1, tmp1_safe_receiver);
59601
- tmp$ret$1 = tmp$ret$0;
59602
- tmp_3 = tmp$ret$1;
59651
+ tmp_2 = null;
59603
59652
  }
59604
- tmp = tmp_3;
59653
+ tmp = tmp_2;
59605
59654
  } else {
59606
- if (tmp0_subject instanceof RTCHangupEvent) {
59607
- var id_0 = action.p1d_1.d23_1.f1y_1.m2j_1;
59608
- var tmp2_safe_receiver = id_0;
59609
- var tmp_4;
59655
+ if (tmp0_subject instanceof MemberLeftEvent) {
59656
+ var id = action.p1d_1.v1z_1.g20_1.m2j_1;
59657
+ var tmp2_safe_receiver = id;
59658
+ var tmp_3;
59610
59659
  if (tmp2_safe_receiver == null) {
59611
- tmp_4 = null;
59660
+ tmp_3 = null;
59612
59661
  } else {
59613
- var tmp$ret$3;
59662
+ var tmp$ret$1;
59614
59663
  // Inline function 'kotlin.let' call
59615
59664
  // Inline function 'kotlin.contracts.contract' call
59616
- var tmp$ret$2;
59665
+ var tmp$ret$0;
59617
59666
  // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59618
- tmp$ret$2 = state.c32(action.p1d_1, tmp2_safe_receiver);
59619
- tmp$ret$3 = tmp$ret$2;
59620
- tmp_4 = tmp$ret$3;
59667
+ tmp$ret$0 = state.f32(action.p1d_1, tmp2_safe_receiver);
59668
+ tmp$ret$1 = tmp$ret$0;
59669
+ tmp_3 = tmp$ret$1;
59621
59670
  }
59622
- tmp = tmp_4;
59671
+ tmp = tmp_3;
59623
59672
  } else {
59624
- if (tmp0_subject instanceof InviteCleanup) {
59625
- var tmp$ret$5;
59626
- // Inline function 'kotlin.let' call
59627
- var tmp0_let = state.i33(action.p1d_1, action.p1d_1.g2s_1);
59628
- // Inline function 'kotlin.contracts.contract' call
59629
- var tmp$ret$4;
59630
- // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59631
- tmp$ret$4 = null;
59632
- tmp$ret$5 = tmp$ret$4;
59633
- tmp = tmp$ret$5;
59673
+ if (tmp0_subject instanceof RTCHangupEvent) {
59674
+ var id_0 = action.p1d_1.d23_1.f1y_1.m2j_1;
59675
+ var tmp3_safe_receiver = id_0;
59676
+ var tmp_4;
59677
+ if (tmp3_safe_receiver == null) {
59678
+ tmp_4 = null;
59679
+ } else {
59680
+ var tmp$ret$3;
59681
+ // Inline function 'kotlin.let' call
59682
+ // Inline function 'kotlin.contracts.contract' call
59683
+ var tmp$ret$2;
59684
+ // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59685
+ tmp$ret$2 = state.c32(action.p1d_1, tmp3_safe_receiver);
59686
+ tmp$ret$3 = tmp$ret$2;
59687
+ tmp_4 = tmp$ret$3;
59688
+ }
59689
+ tmp = tmp_4;
59634
59690
  } else {
59635
- if (isInterface(tmp0_subject, ApiRequest)) {
59636
- var tmp3_elvis_lhs = action.q1d_1.n1d_1;
59637
- var callId = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
59638
- var tmp4_subject = action.p1d_1;
59639
- var tmp_5;
59640
- if (tmp4_subject instanceof MemberKickRequest) {
59641
- tmp_5 = state.z31(action.p1d_1, callId, action.q1d_1.m1d_1);
59642
- } else {
59643
- if (tmp4_subject instanceof MemberJoinRequest) {
59644
- tmp_5 = state.y31(action.p1d_1, callId, action.q1d_1.m1d_1);
59691
+ if (tmp0_subject instanceof InviteCleanup) {
59692
+ var tmp$ret$5;
59693
+ // Inline function 'kotlin.let' call
59694
+ var tmp0_let = state.i33(action.p1d_1, action.p1d_1.g2s_1);
59695
+ // Inline function 'kotlin.contracts.contract' call
59696
+ var tmp$ret$4;
59697
+ // Inline function 'com.vonage.clientcore.core.reducers.call.InviteReducer.reduce.<anonymous>' call
59698
+ tmp$ret$4 = null;
59699
+ tmp$ret$5 = tmp$ret$4;
59700
+ tmp = tmp$ret$5;
59701
+ } else {
59702
+ if (isInterface(tmp0_subject, ApiRequest)) {
59703
+ var tmp4_elvis_lhs = action.q1d_1.n1d_1;
59704
+ var callId = tmp4_elvis_lhs == null ? '' : tmp4_elvis_lhs;
59705
+ var tmp5_subject = action.p1d_1;
59706
+ var tmp_5;
59707
+ if (tmp5_subject instanceof MemberKickRequest) {
59708
+ tmp_5 = state.z31(action.p1d_1, callId, action.q1d_1.m1d_1);
59645
59709
  } else {
59646
- tmp_5 = null;
59710
+ if (tmp5_subject instanceof MemberJoinRequest) {
59711
+ tmp_5 = state.y31(action.p1d_1, callId, action.q1d_1.m1d_1);
59712
+ } else {
59713
+ tmp_5 = null;
59714
+ }
59647
59715
  }
59716
+ tmp = tmp_5;
59717
+ } else {
59718
+ tmp = null;
59648
59719
  }
59649
- tmp = tmp_5;
59650
- } else {
59651
- tmp = null;
59652
59720
  }
59653
59721
  }
59654
59722
  }
@@ -59765,6 +59833,23 @@ function requireClientsdkClientcore () {
59765
59833
  return Unit_getInstance();
59766
59834
  };
59767
59835
  }
59836
+ function InviteState$update$lambda_6($action) {
59837
+ return function ($this$modify) {
59838
+ var tmp;
59839
+ var tmp_0;
59840
+ var tmp_1 = $this$modify.c2q_1;
59841
+ if (tmp_1 instanceof Pending) {
59842
+ tmp_0 = $this$modify.c2q_1.k2q() === $action.s1d_1;
59843
+ } else {
59844
+ tmp_0 = false;
59845
+ }
59846
+ if (tmp_0) {
59847
+ $this$modify.c2q_1 = toFailed($this$modify.c2q_1, $action.r1d_1);
59848
+ tmp = Unit_getInstance();
59849
+ }
59850
+ return Unit_getInstance();
59851
+ };
59852
+ }
59768
59853
  function InviteState(invites, currentUserId) {
59769
59854
  this.l2q_1 = invites;
59770
59855
  this.m2q_1 = currentUserId;
@@ -59828,6 +59913,9 @@ function requireClientsdkClientcore () {
59828
59913
  tmp$ret$0 = this;
59829
59914
  return tmp$ret$0;
59830
59915
  };
59916
+ InviteState.prototype.s32 = function (action, callId) {
59917
+ return modify(this, callId, InviteState$update$lambda_6(action));
59918
+ };
59831
59919
  InviteState.prototype.l33 = function (invites, currentUserId) {
59832
59920
  return new InviteState(invites, currentUserId);
59833
59921
  };
@@ -66258,6 +66346,10 @@ class MediaClient {
66258
66346
  let error;
66259
66347
  try {
66260
66348
  const pc = yield this.getNewPC();
66349
+ pc.onconnectionstatechange = () => {
66350
+ var _a;
66351
+ (_a = this.delegate) === null || _a === void 0 ? void 0 : _a.onConnectionChange(rtcId, pc.connectionState);
66352
+ };
66261
66353
  this.pcs.set(rtcId, pc);
66262
66354
  sdp = yield createAnswer(pc, offerSDP);
66263
66355
  }