@vonage/client-sdk 0.2.1-alpha.0 → 0.2.1-beta.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.
@@ -39831,7 +39831,7 @@ function requireClientsdkClientcore () {
39831
39831
  }
39832
39832
  }
39833
39833
  }
39834
- function EventAPIImpl$onEvent$lambda$lambda(this$0, $eventCounters, $listener) {
39834
+ function EventAPIImpl$onEvent$lambda$lambda(this$0, $listener, $eventCounters) {
39835
39835
  return function () {
39836
39836
  var state = ensureNotNull(this$0.h2d_1.d29(getKClass(EventReducer)));
39837
39837
  var tmp0_safe_receiver = state.j2d_1;
@@ -39841,33 +39841,10 @@ function requireClientsdkClientcore () {
39841
39841
  // Inline function 'kotlin.let' call
39842
39842
  // Inline function 'kotlin.contracts.contract' call
39843
39843
  var buffer = ensureNotNull(state.i2d_1.g2(tmp0_safe_receiver));
39844
- var tmp_0;
39845
- var tmp$ret$1;
39846
- // Inline function 'kotlin.collections.getOrPut' call
39847
- var value = $eventCounters.g2(tmp0_safe_receiver);
39848
- var tmp_1;
39849
- if (value == null) {
39850
- var tmp$ret$0;
39851
- // Inline function 'com.vonage.clientcore.core.api.EventAPIImpl.onEvent.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
39852
- tmp$ret$0 = 0;
39853
- var answer = tmp$ret$0;
39854
- $eventCounters.l(tmp0_safe_receiver, answer);
39855
- tmp_1 = answer;
39856
- } else {
39857
- tmp_1 = value;
39858
- }
39859
- tmp$ret$1 = tmp_1;
39860
- if (tmp$ret$1 < buffer.k2d_1) {
39861
- tmp_0 = true;
39862
- } else {
39863
- tmp_0 = ensureNotNull(buffer.m2d_1).w1j() == null;
39864
- }
39865
- if (tmp_0) {
39866
- invokeEventListener(this$0, buffer.m2d_1, $listener);
39867
- var tmp0_set = buffer.k2d_1;
39868
- $eventCounters.l(tmp0_safe_receiver, tmp0_set);
39869
- Unit_getInstance();
39870
- }
39844
+ invokeEventListener(this$0, buffer.m2d_1, $listener);
39845
+ var tmp0_set = buffer.k2d_1;
39846
+ $eventCounters.l(tmp0_safe_receiver, tmp0_set);
39847
+ Unit_getInstance();
39871
39848
  }
39872
39849
  return Unit_getInstance();
39873
39850
  };
@@ -39878,7 +39855,7 @@ function requireClientsdkClientcore () {
39878
39855
  // Inline function 'kotlin.collections.mutableMapOf' call
39879
39856
  tmp$ret$0 = LinkedHashMap_init_$Create$();
39880
39857
  var eventCounters = tmp$ret$0;
39881
- return new StoredSubscription(EventAPIImpl$onEvent$lambda$lambda(this$0, eventCounters, $listener));
39858
+ return new StoredSubscription(EventAPIImpl$onEvent$lambda$lambda(this$0, $listener, eventCounters));
39882
39859
  };
39883
39860
  }
39884
39861
  function EventAPIImpl(store) {
@@ -42317,7 +42294,7 @@ function requireClientsdkClientcore () {
42317
42294
  return Unit_getInstance();
42318
42295
  };
42319
42296
  }
42320
- function VoiceAPIImpl$serverCall$lambda$lambda$lambda(this$0, $legId, $callback) {
42297
+ function VoiceAPIImpl$serverCall$lambda$lambda$lambda(this$0, $legId, $callback, $cancel) {
42321
42298
  return function () {
42322
42299
  var state = ensureNotNull(this$0.g2i_1.d29(getKClass(CallReducer)));
42323
42300
  var tmp0_safe_receiver = state.j2h_1.g2($legId);
@@ -42329,10 +42306,26 @@ function requireClientsdkClientcore () {
42329
42306
  var mediaState = tmp0_safe_receiver.u2h_1;
42330
42307
  var tmp_0 = mediaState.s1();
42331
42308
  if (tmp_0 instanceof Active_0) {
42309
+ // Inline function 'kotlin.also' call
42332
42310
  $callback(null, new VoiceCall(this$0.g2i_1, new VoiceLeg($legId)));
42311
+ // Inline function 'kotlin.contracts.contract' call
42312
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.serverCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
42313
+ var tmp0_safe_receiver_0 = $cancel._v;
42314
+ if (tmp0_safe_receiver_0 == null)
42315
+ ;
42316
+ else
42317
+ tmp0_safe_receiver_0();
42333
42318
  } else {
42334
42319
  if (mediaState instanceof Failed) {
42320
+ // Inline function 'kotlin.also' call
42335
42321
  $callback(mediaState.s2g_1.d3_1, null);
42322
+ // Inline function 'kotlin.contracts.contract' call
42323
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.serverCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
42324
+ var tmp0_safe_receiver_1 = $cancel._v;
42325
+ if (tmp0_safe_receiver_1 == null)
42326
+ ;
42327
+ else
42328
+ tmp0_safe_receiver_1();
42336
42329
  this$0.g2i_1.l1c(Action_init_$Create$(new CallCleanup($legId)));
42337
42330
  Unit_getInstance();
42338
42331
  } else {
@@ -42343,9 +42336,9 @@ function requireClientsdkClientcore () {
42343
42336
  return Unit_getInstance();
42344
42337
  };
42345
42338
  }
42346
- function VoiceAPIImpl$serverCall$lambda$lambda(this$0, $legId, $callback) {
42339
+ function VoiceAPIImpl$serverCall$lambda$lambda(this$0, $legId, $callback, $cancel) {
42347
42340
  return function () {
42348
- return new StoredSubscription(VoiceAPIImpl$serverCall$lambda$lambda$lambda(this$0, $legId, $callback));
42341
+ return new StoredSubscription(VoiceAPIImpl$serverCall$lambda$lambda$lambda(this$0, $legId, $callback, $cancel));
42349
42342
  };
42350
42343
  }
42351
42344
  function VoiceAPIImpl$serverCall$lambda(this$0, $callback) {
@@ -42353,8 +42346,9 @@ function requireClientsdkClientcore () {
42353
42346
  var tmp0_subject = it;
42354
42347
  if (!(tmp0_subject == null) ? typeof tmp0_subject === 'string' : false) {
42355
42348
  var legId = it;
42349
+ var cancel = {_v: null};
42356
42350
  var tmp_0 = getKClass(CallReducer);
42357
- this$0.g2i_1.o2d(tmp_0, VoiceAPIImpl$serverCall$lambda$lambda(this$0, legId, $callback));
42351
+ cancel._v = this$0.g2i_1.o2d(tmp_0, VoiceAPIImpl$serverCall$lambda$lambda(this$0, legId, $callback, cancel));
42358
42352
  Unit_getInstance();
42359
42353
  } else {
42360
42354
  if (tmp0_subject instanceof Error_0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonage/client-sdk",
3
- "version": "0.2.1-alpha.0",
3
+ "version": "0.2.1-beta.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "module": "dist/client/index.mjs",