@balancy/wasm 1.0.30 → 1.0.34

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/Balancy.wasm CHANGED
Binary file
package/dist/index.cjs.js CHANGED
@@ -388,7 +388,7 @@ var Balancy = function() {
388
388
  "__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
389
389
  "_balancySetUnzipCallback",
390
390
  "__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_",
391
- "__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
391
+ "__Z23jsbalancyWebViewRequestPN7Balancy5Utils15JsonBasedObjectENSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN10emscripten3valE",
392
392
  "_balancySetDataRequestedCallback",
393
393
  "_balancyViewAllowOptimization",
394
394
  "_balancyConfigLaunch",
@@ -437,6 +437,7 @@ var Balancy = function() {
437
437
  "_balancyGetTimeOffset",
438
438
  "_balancySetTimeOffset",
439
439
  "__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib",
440
+ "_balancySetViewNotificationsCallback",
440
441
  "__Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi",
441
442
  "__Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi",
442
443
  "__Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE",
@@ -525,7 +526,7 @@ var Balancy = function() {
525
526
  "_balancySoftPurchaseShopSlot",
526
527
  "_balancySoftPurchaseGameOffer",
527
528
  "_balancySoftPurchaseGameOfferGroup",
528
- "__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE",
529
+ "__Z22_balancyWebViewRequestPvNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_8functionIFvS6_EEE",
529
530
  "_balancyWebViewRequest",
530
531
  "_balancyGetProductsIdAndType",
531
532
  "_balancyGetParsedObject",
@@ -1345,161 +1346,6 @@ var Balancy = function() {
1345
1346
  invokeErrorCallback(-1, error.message, callbackPtr);
1346
1347
  });
1347
1348
  }
1348
- function js_call_typescript_bridge_connect(connectionId, url, authData) {
1349
- if (typeof Module !== "undefined" && Module.typescript_websocket_connect_request) {
1350
- try {
1351
- var urlStr = UTF8ToString(url);
1352
- var authStr = UTF8ToString(authData);
1353
- console.log("[C++ -> TS Bridge] Connect request", connectionId, urlStr);
1354
- Module.typescript_websocket_connect_request(connectionId, urlStr, authStr);
1355
- return true;
1356
- } catch (error) {
1357
- console.error("[ERROR] calling typescript_websocket_connect_request via Module:", error);
1358
- }
1359
- }
1360
- if (typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_connect_request) {
1361
- try {
1362
- var urlStr1 = UTF8ToString(url);
1363
- var authStr1 = UTF8ToString(authData);
1364
- console.log("[C++ -> TS Bridge] Connect request via window.Module", connectionId, urlStr1);
1365
- window.Module.typescript_websocket_connect_request(connectionId, urlStr1, authStr1);
1366
- return true;
1367
- } catch (error) {
1368
- console.error("[ERROR] calling typescript_websocket_connect_request via window.Module:", error);
1369
- }
1370
- }
1371
- if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_connect_request) {
1372
- try {
1373
- var urlStr2 = UTF8ToString(url);
1374
- var authStr2 = UTF8ToString(authData);
1375
- console.log("[C++ -> TS Bridge] Connect request via globalThis.Module", connectionId, urlStr2);
1376
- globalThis.Module.typescript_websocket_connect_request(connectionId, urlStr2, authStr2);
1377
- return true;
1378
- } catch (error) {
1379
- console.error("[ERROR] calling typescript_websocket_connect_request via globalThis.Module:", error);
1380
- }
1381
- }
1382
- console.error("[ERROR] TypeScript WebSocket Bridge connect method not found. Available contexts:", {
1383
- Module: typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1384
- return k.includes("websocket") || k.includes("typescript");
1385
- }) : "undefined",
1386
- windowModule: typeof window !== "undefined" && window.Module ? Object.keys(window.Module).filter(function(k) {
1387
- return k.includes("websocket") || k.includes("typescript");
1388
- }) : "undefined",
1389
- globalThisModule: typeof globalThis !== "undefined" && globalThis.Module ? Object.keys(globalThis.Module).filter(function(k) {
1390
- return k.includes("websocket") || k.includes("typescript");
1391
- }) : "undefined"
1392
- });
1393
- return false;
1394
- }
1395
- function js_call_typescript_bridge_disconnect(connectionId) {
1396
- var success = false;
1397
- if (typeof Module !== "undefined" && Module.typescript_websocket_disconnect_request) {
1398
- try {
1399
- console.log("[C++ -> TS Bridge] Disconnect request", connectionId);
1400
- Module.typescript_websocket_disconnect_request(connectionId);
1401
- success = true;
1402
- } catch (error) {
1403
- console.error("[ERROR] calling typescript_websocket_disconnect_request via Module:", error);
1404
- }
1405
- }
1406
- if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_disconnect_request) {
1407
- try {
1408
- console.log("[C++ -> TS Bridge] Disconnect request via window.Module", connectionId);
1409
- window.Module.typescript_websocket_disconnect_request(connectionId);
1410
- success = true;
1411
- } catch (error) {
1412
- console.error("[ERROR] calling typescript_websocket_disconnect_request via window.Module:", error);
1413
- }
1414
- }
1415
- if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_disconnect_request) {
1416
- try {
1417
- console.log("[C++ -> TS Bridge] Disconnect request via globalThis.Module", connectionId);
1418
- globalThis.Module.typescript_websocket_disconnect_request(connectionId);
1419
- success = true;
1420
- } catch (error) {
1421
- console.error("[ERROR] calling typescript_websocket_disconnect_request via globalThis.Module:", error);
1422
- }
1423
- }
1424
- if (!success) {
1425
- console.error("[ERROR] TypeScript WebSocket Bridge disconnect method not found");
1426
- }
1427
- }
1428
- function js_call_typescript_bridge_subscribe(connectionId, eventName) {
1429
- var success = false;
1430
- if (typeof Module !== "undefined" && Module.typescript_websocket_subscribe_event) {
1431
- try {
1432
- var eventStr = UTF8ToString(eventName);
1433
- console.log("[C++ -> TS Bridge] Subscribe event", connectionId, eventStr);
1434
- Module.typescript_websocket_subscribe_event(connectionId, eventStr);
1435
- success = true;
1436
- } catch (error) {
1437
- console.error("[ERROR] calling typescript_websocket_subscribe_event via Module:", error);
1438
- }
1439
- }
1440
- if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_subscribe_event) {
1441
- try {
1442
- var eventStr1 = UTF8ToString(eventName);
1443
- console.log("[C++ -> TS Bridge] Subscribe event via window.Module", connectionId, eventStr1);
1444
- window.Module.typescript_websocket_subscribe_event(connectionId, eventStr1);
1445
- success = true;
1446
- } catch (error) {
1447
- console.error("[ERROR] calling typescript_websocket_subscribe_event via window.Module:", error);
1448
- }
1449
- }
1450
- if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_subscribe_event) {
1451
- try {
1452
- var eventStr2 = UTF8ToString(eventName);
1453
- console.log("[C++ -> TS Bridge] Subscribe event via globalThis.Module", connectionId, eventStr2);
1454
- globalThis.Module.typescript_websocket_subscribe_event(connectionId, eventStr2);
1455
- success = true;
1456
- } catch (error) {
1457
- console.error("[ERROR] calling typescript_websocket_subscribe_event via globalThis.Module:", error);
1458
- }
1459
- }
1460
- if (!success) {
1461
- console.error("[ERROR] TypeScript WebSocket Bridge subscribe method not found");
1462
- }
1463
- }
1464
- function js_call_typescript_bridge_send_message(connectionId, eventName, data) {
1465
- var success = false;
1466
- if (typeof Module !== "undefined" && Module.typescript_websocket_send_message) {
1467
- try {
1468
- var eventStr = UTF8ToString(eventName);
1469
- var dataStr = UTF8ToString(data);
1470
- console.log("[C++ -> TS Bridge] Send message", connectionId, eventStr);
1471
- Module.typescript_websocket_send_message(connectionId, eventStr, dataStr);
1472
- success = true;
1473
- } catch (error) {
1474
- console.error("[ERROR] calling typescript_websocket_send_message via Module:", error);
1475
- }
1476
- }
1477
- if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_send_message) {
1478
- try {
1479
- var eventStr1 = UTF8ToString(eventName);
1480
- var dataStr1 = UTF8ToString(data);
1481
- console.log("[C++ -> TS Bridge] Send message via window.Module", connectionId, eventStr1);
1482
- window.Module.typescript_websocket_send_message(connectionId, eventStr1, dataStr1);
1483
- success = true;
1484
- } catch (error) {
1485
- console.error("[ERROR] calling typescript_websocket_send_message via window.Module:", error);
1486
- }
1487
- }
1488
- if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_send_message) {
1489
- try {
1490
- var eventStr2 = UTF8ToString(eventName);
1491
- var dataStr2 = UTF8ToString(data);
1492
- console.log("[C++ -> TS Bridge] Send message via globalThis.Module", connectionId, eventStr2);
1493
- globalThis.Module.typescript_websocket_send_message(connectionId, eventStr2, dataStr2);
1494
- success = true;
1495
- } catch (error) {
1496
- console.error("[ERROR] calling typescript_websocket_send_message via globalThis.Module:", error);
1497
- }
1498
- }
1499
- if (!success) {
1500
- console.error("[ERROR] TypeScript WebSocket Bridge send message method not found");
1501
- }
1502
- }
1503
1349
  function js_call_typescript_bridge_send_ack(connectionId, ackId, responseData) {
1504
1350
  var success = false;
1505
1351
  if (typeof Module !== "undefined" && Module.typescript_websocket_send_ack) {
@@ -1536,85 +1382,6 @@ var Balancy = function() {
1536
1382
  console.error("[ERROR] TypeScript WebSocket Bridge send ack method not found");
1537
1383
  }
1538
1384
  }
1539
- function js_initialize_typescript_bridge() {
1540
- console.log("[INIT] Initializing TypeScript WebSocket Bridge integration...");
1541
- if (typeof window !== "undefined" && window.initializeTypeScriptWebSocketBridge) {
1542
- try {
1543
- window.initializeTypeScriptWebSocketBridge();
1544
- console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via window");
1545
- } catch (error) {
1546
- console.warn("[WARNING] Failed to initialize bridge via window:", error);
1547
- }
1548
- }
1549
- if (typeof globalThis !== "undefined" && globalThis.initializeTypeScriptWebSocketBridge) {
1550
- try {
1551
- globalThis.initializeTypeScriptWebSocketBridge();
1552
- console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via globalThis");
1553
- } catch (error) {
1554
- console.warn("[WARNING] Failed to initialize bridge via globalThis:", error);
1555
- }
1556
- }
1557
- var bridgeMethods = [
1558
- "typescript_websocket_connect_request",
1559
- "typescript_websocket_disconnect_request",
1560
- "typescript_websocket_subscribe_event",
1561
- "typescript_websocket_send_message",
1562
- "typescript_websocket_send_ack"
1563
- ];
1564
- var bridgeFound = false;
1565
- var contexts = [];
1566
- if (typeof Module !== "undefined") {
1567
- contexts.push({
1568
- name: "Module",
1569
- obj: Module
1570
- });
1571
- }
1572
- if (typeof window !== "undefined" && window.Module) {
1573
- contexts.push({
1574
- name: "window.Module",
1575
- obj: window.Module
1576
- });
1577
- }
1578
- if (typeof globalThis !== "undefined" && globalThis.Module) {
1579
- contexts.push({
1580
- name: "globalThis.Module",
1581
- obj: globalThis.Module
1582
- });
1583
- }
1584
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1585
- try {
1586
- var _loop = function() {
1587
- var context = _step.value;
1588
- var availableMethods = bridgeMethods.filter(function(method) {
1589
- return typeof context.obj[method] === "function";
1590
- });
1591
- if (availableMethods.length > 0) {
1592
- console.log("[SUCCESS] Bridge methods found in " + context.name + ": " + availableMethods.join(", "));
1593
- bridgeFound = true;
1594
- }
1595
- };
1596
- for(var _iterator = contexts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
1597
- } catch (err) {
1598
- _didIteratorError = true;
1599
- _iteratorError = err;
1600
- } finally{
1601
- try {
1602
- if (!_iteratorNormalCompletion && _iterator.return != null) {
1603
- _iterator.return();
1604
- }
1605
- } finally{
1606
- if (_didIteratorError) {
1607
- throw _iteratorError;
1608
- }
1609
- }
1610
- }
1611
- if (!bridgeFound) {
1612
- console.warn("[WARNING] No TypeScript WebSocket Bridge methods found in any context");
1613
- console.log("Available in Module:", typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1614
- return k.includes("websocket") || k.includes("typescript");
1615
- }) : "undefined");
1616
- }
1617
- }
1618
1385
  var ExitStatus = function ExitStatus(status) {
1619
1386
  _class_call_check(this, ExitStatus);
1620
1387
  _define_property(this, "name", "ExitStatus");
@@ -7507,13 +7274,8 @@ var Balancy = function() {
7507
7274
  invoke_viiiiiiiiii: invoke_viiiiiiiiii,
7508
7275
  invoke_viiiiiiiiiiiiiii: invoke_viiiiiiiiiiiiiii,
7509
7276
  invoke_viijii: invoke_viijii,
7510
- js_call_typescript_bridge_connect: js_call_typescript_bridge_connect,
7511
- js_call_typescript_bridge_disconnect: js_call_typescript_bridge_disconnect,
7512
7277
  js_call_typescript_bridge_send_ack: js_call_typescript_bridge_send_ack,
7513
- js_call_typescript_bridge_send_message: js_call_typescript_bridge_send_message,
7514
- js_call_typescript_bridge_subscribe: js_call_typescript_bridge_subscribe,
7515
7278
  js_fetch: js_fetch,
7516
- js_initialize_typescript_bridge: js_initialize_typescript_bridge,
7517
7279
  random_get: _random_get
7518
7280
  };
7519
7281
  var wasmExports;
@@ -7564,7 +7326,7 @@ var Balancy = function() {
7564
7326
  Module["__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7565
7327
  Module["_balancySetUnzipCallback"] = createExportWrapper("balancySetUnzipCallback", 1);
7566
7328
  Module["__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_"] = createExportWrapper("_Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_", 2);
7567
- Module["__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7329
+ Module["__Z23jsbalancyWebViewRequestPN7Balancy5Utils15JsonBasedObjectENSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z23jsbalancyWebViewRequestPN7Balancy5Utils15JsonBasedObjectENSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN10emscripten3valE", 3);
7568
7330
  Module["_balancySetDataRequestedCallback"] = createExportWrapper("balancySetDataRequestedCallback", 1);
7569
7331
  Module["_balancyViewAllowOptimization"] = createExportWrapper("balancyViewAllowOptimization", 1);
7570
7332
  Module["_balancyConfigLaunch"] = createExportWrapper("balancyConfigLaunch", 1);
@@ -7613,6 +7375,7 @@ var Balancy = function() {
7613
7375
  Module["_balancyGetTimeOffset"] = createExportWrapper("balancyGetTimeOffset", 0);
7614
7376
  Module["_balancySetTimeOffset"] = createExportWrapper("balancySetTimeOffset", 1);
7615
7377
  Module["__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib"] = createExportWrapper("_Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib", 4);
7378
+ Module["_balancySetViewNotificationsCallback"] = createExportWrapper("balancySetViewNotificationsCallback", 1);
7616
7379
  Module["__Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi"] = createExportWrapper("_Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi", 2);
7617
7380
  Module["__Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi"] = createExportWrapper("_Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi", 2);
7618
7381
  Module["__Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE"] = createExportWrapper("_Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE", 1);
@@ -7703,8 +7466,8 @@ var Balancy = function() {
7703
7466
  Module["_balancySoftPurchaseShopSlot"] = createExportWrapper("balancySoftPurchaseShopSlot", 1);
7704
7467
  Module["_balancySoftPurchaseGameOffer"] = createExportWrapper("balancySoftPurchaseGameOffer", 1);
7705
7468
  Module["_balancySoftPurchaseGameOfferGroup"] = createExportWrapper("balancySoftPurchaseGameOfferGroup", 2);
7706
- Module["__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE"] = createExportWrapper("_Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE", 2);
7707
- Module["_balancyWebViewRequest"] = createExportWrapper("balancyWebViewRequest", 1);
7469
+ Module["__Z22_balancyWebViewRequestPvNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_8functionIFvS6_EEE"] = createExportWrapper("_Z22_balancyWebViewRequestPvNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_8functionIFvS6_EEE", 3);
7470
+ Module["_balancyWebViewRequest"] = createExportWrapper("balancyWebViewRequest", 3);
7708
7471
  Module["_balancyGetProductsIdAndType"] = createExportWrapper("balancyGetProductsIdAndType", 1);
7709
7472
  Module["_balancyGetParsedObject"] = createExportWrapper("balancyGetParsedObject", 3);
7710
7473
  Module["_balancyAuth_NameAndPassword"] = createExportWrapper("balancyAuth_NameAndPassword", 3);
package/dist/index.es.js CHANGED
@@ -383,7 +383,7 @@ var Balancy = function() {
383
383
  "__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
384
384
  "_balancySetUnzipCallback",
385
385
  "__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_",
386
- "__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
386
+ "__Z23jsbalancyWebViewRequestPN7Balancy5Utils15JsonBasedObjectENSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN10emscripten3valE",
387
387
  "_balancySetDataRequestedCallback",
388
388
  "_balancyViewAllowOptimization",
389
389
  "_balancyConfigLaunch",
@@ -432,6 +432,7 @@ var Balancy = function() {
432
432
  "_balancyGetTimeOffset",
433
433
  "_balancySetTimeOffset",
434
434
  "__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib",
435
+ "_balancySetViewNotificationsCallback",
435
436
  "__Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi",
436
437
  "__Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi",
437
438
  "__Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE",
@@ -520,7 +521,7 @@ var Balancy = function() {
520
521
  "_balancySoftPurchaseShopSlot",
521
522
  "_balancySoftPurchaseGameOffer",
522
523
  "_balancySoftPurchaseGameOfferGroup",
523
- "__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE",
524
+ "__Z22_balancyWebViewRequestPvNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_8functionIFvS6_EEE",
524
525
  "_balancyWebViewRequest",
525
526
  "_balancyGetProductsIdAndType",
526
527
  "_balancyGetParsedObject",
@@ -1340,161 +1341,6 @@ var Balancy = function() {
1340
1341
  invokeErrorCallback(-1, error.message, callbackPtr);
1341
1342
  });
1342
1343
  }
1343
- function js_call_typescript_bridge_connect(connectionId, url, authData) {
1344
- if (typeof Module !== "undefined" && Module.typescript_websocket_connect_request) {
1345
- try {
1346
- var urlStr = UTF8ToString(url);
1347
- var authStr = UTF8ToString(authData);
1348
- console.log("[C++ -> TS Bridge] Connect request", connectionId, urlStr);
1349
- Module.typescript_websocket_connect_request(connectionId, urlStr, authStr);
1350
- return true;
1351
- } catch (error) {
1352
- console.error("[ERROR] calling typescript_websocket_connect_request via Module:", error);
1353
- }
1354
- }
1355
- if (typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_connect_request) {
1356
- try {
1357
- var urlStr1 = UTF8ToString(url);
1358
- var authStr1 = UTF8ToString(authData);
1359
- console.log("[C++ -> TS Bridge] Connect request via window.Module", connectionId, urlStr1);
1360
- window.Module.typescript_websocket_connect_request(connectionId, urlStr1, authStr1);
1361
- return true;
1362
- } catch (error) {
1363
- console.error("[ERROR] calling typescript_websocket_connect_request via window.Module:", error);
1364
- }
1365
- }
1366
- if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_connect_request) {
1367
- try {
1368
- var urlStr2 = UTF8ToString(url);
1369
- var authStr2 = UTF8ToString(authData);
1370
- console.log("[C++ -> TS Bridge] Connect request via globalThis.Module", connectionId, urlStr2);
1371
- globalThis.Module.typescript_websocket_connect_request(connectionId, urlStr2, authStr2);
1372
- return true;
1373
- } catch (error) {
1374
- console.error("[ERROR] calling typescript_websocket_connect_request via globalThis.Module:", error);
1375
- }
1376
- }
1377
- console.error("[ERROR] TypeScript WebSocket Bridge connect method not found. Available contexts:", {
1378
- Module: typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1379
- return k.includes("websocket") || k.includes("typescript");
1380
- }) : "undefined",
1381
- windowModule: typeof window !== "undefined" && window.Module ? Object.keys(window.Module).filter(function(k) {
1382
- return k.includes("websocket") || k.includes("typescript");
1383
- }) : "undefined",
1384
- globalThisModule: typeof globalThis !== "undefined" && globalThis.Module ? Object.keys(globalThis.Module).filter(function(k) {
1385
- return k.includes("websocket") || k.includes("typescript");
1386
- }) : "undefined"
1387
- });
1388
- return false;
1389
- }
1390
- function js_call_typescript_bridge_disconnect(connectionId) {
1391
- var success = false;
1392
- if (typeof Module !== "undefined" && Module.typescript_websocket_disconnect_request) {
1393
- try {
1394
- console.log("[C++ -> TS Bridge] Disconnect request", connectionId);
1395
- Module.typescript_websocket_disconnect_request(connectionId);
1396
- success = true;
1397
- } catch (error) {
1398
- console.error("[ERROR] calling typescript_websocket_disconnect_request via Module:", error);
1399
- }
1400
- }
1401
- if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_disconnect_request) {
1402
- try {
1403
- console.log("[C++ -> TS Bridge] Disconnect request via window.Module", connectionId);
1404
- window.Module.typescript_websocket_disconnect_request(connectionId);
1405
- success = true;
1406
- } catch (error) {
1407
- console.error("[ERROR] calling typescript_websocket_disconnect_request via window.Module:", error);
1408
- }
1409
- }
1410
- if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_disconnect_request) {
1411
- try {
1412
- console.log("[C++ -> TS Bridge] Disconnect request via globalThis.Module", connectionId);
1413
- globalThis.Module.typescript_websocket_disconnect_request(connectionId);
1414
- success = true;
1415
- } catch (error) {
1416
- console.error("[ERROR] calling typescript_websocket_disconnect_request via globalThis.Module:", error);
1417
- }
1418
- }
1419
- if (!success) {
1420
- console.error("[ERROR] TypeScript WebSocket Bridge disconnect method not found");
1421
- }
1422
- }
1423
- function js_call_typescript_bridge_subscribe(connectionId, eventName) {
1424
- var success = false;
1425
- if (typeof Module !== "undefined" && Module.typescript_websocket_subscribe_event) {
1426
- try {
1427
- var eventStr = UTF8ToString(eventName);
1428
- console.log("[C++ -> TS Bridge] Subscribe event", connectionId, eventStr);
1429
- Module.typescript_websocket_subscribe_event(connectionId, eventStr);
1430
- success = true;
1431
- } catch (error) {
1432
- console.error("[ERROR] calling typescript_websocket_subscribe_event via Module:", error);
1433
- }
1434
- }
1435
- if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_subscribe_event) {
1436
- try {
1437
- var eventStr1 = UTF8ToString(eventName);
1438
- console.log("[C++ -> TS Bridge] Subscribe event via window.Module", connectionId, eventStr1);
1439
- window.Module.typescript_websocket_subscribe_event(connectionId, eventStr1);
1440
- success = true;
1441
- } catch (error) {
1442
- console.error("[ERROR] calling typescript_websocket_subscribe_event via window.Module:", error);
1443
- }
1444
- }
1445
- if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_subscribe_event) {
1446
- try {
1447
- var eventStr2 = UTF8ToString(eventName);
1448
- console.log("[C++ -> TS Bridge] Subscribe event via globalThis.Module", connectionId, eventStr2);
1449
- globalThis.Module.typescript_websocket_subscribe_event(connectionId, eventStr2);
1450
- success = true;
1451
- } catch (error) {
1452
- console.error("[ERROR] calling typescript_websocket_subscribe_event via globalThis.Module:", error);
1453
- }
1454
- }
1455
- if (!success) {
1456
- console.error("[ERROR] TypeScript WebSocket Bridge subscribe method not found");
1457
- }
1458
- }
1459
- function js_call_typescript_bridge_send_message(connectionId, eventName, data) {
1460
- var success = false;
1461
- if (typeof Module !== "undefined" && Module.typescript_websocket_send_message) {
1462
- try {
1463
- var eventStr = UTF8ToString(eventName);
1464
- var dataStr = UTF8ToString(data);
1465
- console.log("[C++ -> TS Bridge] Send message", connectionId, eventStr);
1466
- Module.typescript_websocket_send_message(connectionId, eventStr, dataStr);
1467
- success = true;
1468
- } catch (error) {
1469
- console.error("[ERROR] calling typescript_websocket_send_message via Module:", error);
1470
- }
1471
- }
1472
- if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_send_message) {
1473
- try {
1474
- var eventStr1 = UTF8ToString(eventName);
1475
- var dataStr1 = UTF8ToString(data);
1476
- console.log("[C++ -> TS Bridge] Send message via window.Module", connectionId, eventStr1);
1477
- window.Module.typescript_websocket_send_message(connectionId, eventStr1, dataStr1);
1478
- success = true;
1479
- } catch (error) {
1480
- console.error("[ERROR] calling typescript_websocket_send_message via window.Module:", error);
1481
- }
1482
- }
1483
- if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_send_message) {
1484
- try {
1485
- var eventStr2 = UTF8ToString(eventName);
1486
- var dataStr2 = UTF8ToString(data);
1487
- console.log("[C++ -> TS Bridge] Send message via globalThis.Module", connectionId, eventStr2);
1488
- globalThis.Module.typescript_websocket_send_message(connectionId, eventStr2, dataStr2);
1489
- success = true;
1490
- } catch (error) {
1491
- console.error("[ERROR] calling typescript_websocket_send_message via globalThis.Module:", error);
1492
- }
1493
- }
1494
- if (!success) {
1495
- console.error("[ERROR] TypeScript WebSocket Bridge send message method not found");
1496
- }
1497
- }
1498
1344
  function js_call_typescript_bridge_send_ack(connectionId, ackId, responseData) {
1499
1345
  var success = false;
1500
1346
  if (typeof Module !== "undefined" && Module.typescript_websocket_send_ack) {
@@ -1531,85 +1377,6 @@ var Balancy = function() {
1531
1377
  console.error("[ERROR] TypeScript WebSocket Bridge send ack method not found");
1532
1378
  }
1533
1379
  }
1534
- function js_initialize_typescript_bridge() {
1535
- console.log("[INIT] Initializing TypeScript WebSocket Bridge integration...");
1536
- if (typeof window !== "undefined" && window.initializeTypeScriptWebSocketBridge) {
1537
- try {
1538
- window.initializeTypeScriptWebSocketBridge();
1539
- console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via window");
1540
- } catch (error) {
1541
- console.warn("[WARNING] Failed to initialize bridge via window:", error);
1542
- }
1543
- }
1544
- if (typeof globalThis !== "undefined" && globalThis.initializeTypeScriptWebSocketBridge) {
1545
- try {
1546
- globalThis.initializeTypeScriptWebSocketBridge();
1547
- console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via globalThis");
1548
- } catch (error) {
1549
- console.warn("[WARNING] Failed to initialize bridge via globalThis:", error);
1550
- }
1551
- }
1552
- var bridgeMethods = [
1553
- "typescript_websocket_connect_request",
1554
- "typescript_websocket_disconnect_request",
1555
- "typescript_websocket_subscribe_event",
1556
- "typescript_websocket_send_message",
1557
- "typescript_websocket_send_ack"
1558
- ];
1559
- var bridgeFound = false;
1560
- var contexts = [];
1561
- if (typeof Module !== "undefined") {
1562
- contexts.push({
1563
- name: "Module",
1564
- obj: Module
1565
- });
1566
- }
1567
- if (typeof window !== "undefined" && window.Module) {
1568
- contexts.push({
1569
- name: "window.Module",
1570
- obj: window.Module
1571
- });
1572
- }
1573
- if (typeof globalThis !== "undefined" && globalThis.Module) {
1574
- contexts.push({
1575
- name: "globalThis.Module",
1576
- obj: globalThis.Module
1577
- });
1578
- }
1579
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1580
- try {
1581
- var _loop = function() {
1582
- var context = _step.value;
1583
- var availableMethods = bridgeMethods.filter(function(method) {
1584
- return typeof context.obj[method] === "function";
1585
- });
1586
- if (availableMethods.length > 0) {
1587
- console.log("[SUCCESS] Bridge methods found in " + context.name + ": " + availableMethods.join(", "));
1588
- bridgeFound = true;
1589
- }
1590
- };
1591
- for(var _iterator = contexts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
1592
- } catch (err) {
1593
- _didIteratorError = true;
1594
- _iteratorError = err;
1595
- } finally{
1596
- try {
1597
- if (!_iteratorNormalCompletion && _iterator.return != null) {
1598
- _iterator.return();
1599
- }
1600
- } finally{
1601
- if (_didIteratorError) {
1602
- throw _iteratorError;
1603
- }
1604
- }
1605
- }
1606
- if (!bridgeFound) {
1607
- console.warn("[WARNING] No TypeScript WebSocket Bridge methods found in any context");
1608
- console.log("Available in Module:", typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1609
- return k.includes("websocket") || k.includes("typescript");
1610
- }) : "undefined");
1611
- }
1612
- }
1613
1380
  var ExitStatus = function ExitStatus(status) {
1614
1381
  _class_call_check(this, ExitStatus);
1615
1382
  _define_property(this, "name", "ExitStatus");
@@ -7502,13 +7269,8 @@ var Balancy = function() {
7502
7269
  invoke_viiiiiiiiii: invoke_viiiiiiiiii,
7503
7270
  invoke_viiiiiiiiiiiiiii: invoke_viiiiiiiiiiiiiii,
7504
7271
  invoke_viijii: invoke_viijii,
7505
- js_call_typescript_bridge_connect: js_call_typescript_bridge_connect,
7506
- js_call_typescript_bridge_disconnect: js_call_typescript_bridge_disconnect,
7507
7272
  js_call_typescript_bridge_send_ack: js_call_typescript_bridge_send_ack,
7508
- js_call_typescript_bridge_send_message: js_call_typescript_bridge_send_message,
7509
- js_call_typescript_bridge_subscribe: js_call_typescript_bridge_subscribe,
7510
7273
  js_fetch: js_fetch,
7511
- js_initialize_typescript_bridge: js_initialize_typescript_bridge,
7512
7274
  random_get: _random_get
7513
7275
  };
7514
7276
  var wasmExports;
@@ -7559,7 +7321,7 @@ var Balancy = function() {
7559
7321
  Module["__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7560
7322
  Module["_balancySetUnzipCallback"] = createExportWrapper("balancySetUnzipCallback", 1);
7561
7323
  Module["__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_"] = createExportWrapper("_Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_", 2);
7562
- Module["__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7324
+ Module["__Z23jsbalancyWebViewRequestPN7Balancy5Utils15JsonBasedObjectENSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z23jsbalancyWebViewRequestPN7Balancy5Utils15JsonBasedObjectENSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN10emscripten3valE", 3);
7563
7325
  Module["_balancySetDataRequestedCallback"] = createExportWrapper("balancySetDataRequestedCallback", 1);
7564
7326
  Module["_balancyViewAllowOptimization"] = createExportWrapper("balancyViewAllowOptimization", 1);
7565
7327
  Module["_balancyConfigLaunch"] = createExportWrapper("balancyConfigLaunch", 1);
@@ -7608,6 +7370,7 @@ var Balancy = function() {
7608
7370
  Module["_balancyGetTimeOffset"] = createExportWrapper("balancyGetTimeOffset", 0);
7609
7371
  Module["_balancySetTimeOffset"] = createExportWrapper("balancySetTimeOffset", 1);
7610
7372
  Module["__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib"] = createExportWrapper("_Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib", 4);
7373
+ Module["_balancySetViewNotificationsCallback"] = createExportWrapper("balancySetViewNotificationsCallback", 1);
7611
7374
  Module["__Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi"] = createExportWrapper("_Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi", 2);
7612
7375
  Module["__Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi"] = createExportWrapper("_Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi", 2);
7613
7376
  Module["__Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE"] = createExportWrapper("_Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE", 1);
@@ -7698,8 +7461,8 @@ var Balancy = function() {
7698
7461
  Module["_balancySoftPurchaseShopSlot"] = createExportWrapper("balancySoftPurchaseShopSlot", 1);
7699
7462
  Module["_balancySoftPurchaseGameOffer"] = createExportWrapper("balancySoftPurchaseGameOffer", 1);
7700
7463
  Module["_balancySoftPurchaseGameOfferGroup"] = createExportWrapper("balancySoftPurchaseGameOfferGroup", 2);
7701
- Module["__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE"] = createExportWrapper("_Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE", 2);
7702
- Module["_balancyWebViewRequest"] = createExportWrapper("balancyWebViewRequest", 1);
7464
+ Module["__Z22_balancyWebViewRequestPvNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_8functionIFvS6_EEE"] = createExportWrapper("_Z22_balancyWebViewRequestPvNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_8functionIFvS6_EEE", 3);
7465
+ Module["_balancyWebViewRequest"] = createExportWrapper("balancyWebViewRequest", 3);
7703
7466
  Module["_balancyGetProductsIdAndType"] = createExportWrapper("balancyGetProductsIdAndType", 1);
7704
7467
  Module["_balancyGetParsedObject"] = createExportWrapper("balancyGetParsedObject", 3);
7705
7468
  Module["_balancyAuth_NameAndPassword"] = createExportWrapper("balancyAuth_NameAndPassword", 3);