@apps-in-toss/web-framework 1.12.0 → 1.14.0

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.
@@ -153186,10 +153186,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
153186
153186
  "use strict";
153187
153187
 
153188
153188
  var _defineProperty = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/defineProperty");
153189
- var _classCallCheck = _$$_REQUIRE(_dependencyMap[1], "@babel/runtime/helpers/classCallCheck");
153190
- var _createClass = _$$_REQUIRE(_dependencyMap[2], "@babel/runtime/helpers/createClass");
153191
- var _toConsumableArray = _$$_REQUIRE(_dependencyMap[3], "@babel/runtime/helpers/toConsumableArray");
153192
- var _objectWithoutProperties = _$$_REQUIRE(_dependencyMap[4], "@babel/runtime/helpers/objectWithoutProperties");
153189
+ var _toConsumableArray = _$$_REQUIRE(_dependencyMap[1], "@babel/runtime/helpers/toConsumableArray");
153190
+ var _objectWithoutProperties = _$$_REQUIRE(_dependencyMap[2], "@babel/runtime/helpers/objectWithoutProperties");
153191
+ var _classCallCheck = _$$_REQUIRE(_dependencyMap[3], "@babel/runtime/helpers/classCallCheck");
153192
+ var _createClass = _$$_REQUIRE(_dependencyMap[4], "@babel/runtime/helpers/createClass");
153193
153193
  var _asyncToGenerator = _$$_REQUIRE(_dependencyMap[5], "@babel/runtime/helpers/asyncToGenerator");
153194
153194
  var _slicedToArray = _$$_REQUIRE(_dependencyMap[6], "@babel/runtime/helpers/slicedToArray");
153195
153195
  var _objectDestructuringEmpty = _$$_REQUIRE(_dependencyMap[7], "@babel/runtime/helpers/objectDestructuringEmpty");
@@ -153262,9 +153262,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
153262
153262
  env: function env() {
153263
153263
  return _env;
153264
153264
  },
153265
+ homeEvent: function homeEvent() {
153266
+ return _homeEvent;
153267
+ },
153265
153268
  loadFullScreenAd: function loadFullScreenAd() {
153266
153269
  return _loadFullScreenAd;
153267
153270
  },
153271
+ safeAreaInsetsChange: function safeAreaInsetsChange() {
153272
+ return _safeAreaInsetsChange;
153273
+ },
153268
153274
  showFullScreenAd: function showFullScreenAd() {
153269
153275
  return _showFullScreenAd;
153270
153276
  },
@@ -153980,6 +153986,71 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
153980
153986
  };
153981
153987
  }(), [brandDisplayName, openConfirm]);
153982
153988
  }
153989
+ var EventEmitter = function () {
153990
+ function EventEmitter() {
153991
+ _classCallCheck(this, EventEmitter);
153992
+ this.listeners = {};
153993
+ }
153994
+ return _createClass(EventEmitter, [{
153995
+ key: "subscribe",
153996
+ value: function subscribe(event, listener) {
153997
+ var _this = this;
153998
+ if (!this.listeners[event]) {
153999
+ this.listeners[event] = [];
154000
+ }
154001
+ this.listeners[event].push(listener);
154002
+ return function () {
154003
+ var _this$listeners$event, _this$listeners$event2;
154004
+ _this.listeners[event] = (_this$listeners$event = (_this$listeners$event2 = _this.listeners[event]) == null ? void 0 : _this$listeners$event2.filter(function (l) {
154005
+ return l !== listener;
154006
+ })) != null ? _this$listeners$event : [];
154007
+ };
154008
+ }
154009
+ }, {
154010
+ key: "hasSubscriptions",
154011
+ value: function hasSubscriptions(event) {
154012
+ return this.listeners[event] != null && this.listeners[event].length > 0;
154013
+ }
154014
+ }, {
154015
+ key: "clearSubscriptions",
154016
+ value: function clearSubscriptions(event) {
154017
+ this.listeners[event] = [];
154018
+ }
154019
+ }, {
154020
+ key: "emit",
154021
+ value: function emit(event) {
154022
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
154023
+ args[_key - 1] = arguments[_key];
154024
+ }
154025
+ if (!this.listeners[event]) {
154026
+ return;
154027
+ }
154028
+ this.listeners[event].forEach(function (listener) {
154029
+ return listener.apply(void 0, args);
154030
+ });
154031
+ }
154032
+ }]);
154033
+ }();
154034
+ var eventEmitter = new EventEmitter();
154035
+ function createEvent(event) {
154036
+ return {
154037
+ name: event,
154038
+ subscribe: function subscribe(listener) {
154039
+ return eventEmitter.subscribe(event, listener);
154040
+ },
154041
+ hasSubscriptions: function hasSubscriptions() {
154042
+ return eventEmitter.hasSubscriptions(event);
154043
+ },
154044
+ clearSubscriptions: function clearSubscriptions() {
154045
+ return eventEmitter.clearSubscriptions(event);
154046
+ },
154047
+ emit: function emit(data) {
154048
+ return eventEmitter.emit(event, data);
154049
+ }
154050
+ };
154051
+ }
154052
+ var _homeEvent = createEvent("homeEvent");
154053
+ var _safeAreaInsetsChange = createEvent("safeAreaInsetsChange");
153983
154054
  var import_native_modules7 = _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules");
153984
154055
  var import_react_native13 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
153985
154056
  var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
@@ -154091,7 +154162,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154091
154162
  },
154092
154163
  handleHomeButtonClick: function handleHomeButtonClick() {
154093
154164
  logging.homeButtonClick();
154094
- navigation.navigate("/");
154165
+ if (_homeEvent.hasSubscriptions()) {
154166
+ _homeEvent.emit({});
154167
+ } else {
154168
+ navigation.navigate("/");
154169
+ }
154095
154170
  },
154096
154171
  handleCloseButtonClick: function handleCloseButtonClick() {
154097
154172
  logging.closeButtonClick();
@@ -154324,16 +154399,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154324
154399
  var import_native_modules11 = _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules");
154325
154400
  var import_react_native20 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
154326
154401
  var import_jsx_runtime8 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154327
- function PermissionsMenu() {
154402
+ function SettingsMenu() {
154328
154403
  var globals = getAppsInTossGlobals();
154329
154404
  if ((0, import_native_modules11.getOperationalEnvironment)() === "sandbox") {
154330
154405
  return null;
154331
154406
  }
154332
154407
  return (0, import_jsx_runtime8.jsx)(Menu, {
154333
- title: "\uAD8C\uD55C \uC124\uC815",
154408
+ title: "\uC124\uC815",
154334
154409
  iconURL: "https://static.toss.im/icons/png/4x/icon-setting-mono.png",
154335
154410
  onPress: function onPress() {
154336
- return (0, import_react_native20.openURL)(`servicetoss://apps-in-toss-menu/permissions?appName=${import_react_native20.Granite.appName}&displayAppName=${globals.brandDisplayName}`);
154411
+ return (0, import_react_native20.openURL)(`servicetoss://apps-in-toss-menu/settings?appName=${import_react_native20.Granite.appName}&displayAppName=${globals.brandDisplayName}`);
154337
154412
  }
154338
154413
  });
154339
154414
  }
@@ -154358,7 +154433,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154358
154433
  android: "5.246.0",
154359
154434
  ios: "5.246.0"
154360
154435
  },
154361
- PERMISSIONS_MENU: {
154436
+ SETTINGS_MENU: {
154362
154437
  android: "5.238.0",
154363
154438
  ios: "5.237.0"
154364
154439
  }
@@ -154377,36 +154452,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154377
154452
  var isHomeShortcutSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.HOME_SHORTCUT_MENU);
154378
154453
  var isBottomSheetSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
154379
154454
  var isShareListMenuSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
154380
- var _ref38 = (0, import_react15.useState)(false),
154381
- _ref39 = _slicedToArray(_ref38, 2),
154382
- isPermissionsMenuSupported = _ref39[0],
154383
- setIsPermissionsMenuSupported = _ref39[1];
154455
+ var isSettingsMenuSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.SETTINGS_MENU);
154384
154456
  (0, import_react15.useEffect)(function () {
154385
154457
  if (!isBottomSheetSupported) {
154386
154458
  return;
154387
154459
  }
154388
154460
  import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(APP_BRIDGE_METHOD_NAME, {}, {
154389
- onSuccess: function onSuccess(_ref40) {
154390
- var items = _ref40.items;
154461
+ onSuccess: function onSuccess(_ref38) {
154462
+ var items = _ref38.items;
154391
154463
  return setItemList(items);
154392
154464
  },
154393
154465
  onError: function onError(error) {
154394
154466
  return console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error);
154395
154467
  }
154396
154468
  });
154397
- if ((0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.PERMISSIONS_MENU)) {
154398
- import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("getAllPermission", {}, {
154399
- onSuccess: function onSuccess(permissions) {
154400
- return setIsPermissionsMenuSupported(permissions.length > 0);
154401
- },
154402
- onError: function onError(error) {
154403
- return console.error("\uAD8C\uD55C \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error);
154404
- }
154405
- });
154406
- }
154407
154469
  }, [isBottomSheetSupported]);
154408
154470
  var onClickHandler = function () {
154409
- var _ref41 = _asyncToGenerator(function* () {
154471
+ var _ref39 = _asyncToGenerator(function* () {
154410
154472
  logging.open();
154411
154473
  if (!isBottomSheetSupported) {
154412
154474
  yield appUpdateDialog.open({
@@ -154415,10 +154477,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154415
154477
  });
154416
154478
  return;
154417
154479
  }
154418
- overlay.open(function (_ref42) {
154419
- var isOpen = _ref42.isOpen,
154420
- exit = _ref42.exit,
154421
- close = _ref42.close;
154480
+ overlay.open(function (_ref40) {
154481
+ var isOpen = _ref40.isOpen,
154482
+ exit = _ref40.exit,
154483
+ close = _ref40.close;
154422
154484
  var handleClose = function handleClose() {
154423
154485
  logging.close();
154424
154486
  close();
@@ -154455,22 +154517,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154455
154517
  return (0, import_react_native21.openURL)(item.contactUri);
154456
154518
  }
154457
154519
  }, item.contactItemName);
154458
- }), isHomeShortcutSupported && (0, import_jsx_runtime9.jsx)(HomeShortcutMenu, {}), isShareListMenuSupported && (0, import_jsx_runtime9.jsx)(AppShareListMenu, {}), isPermissionsMenuSupported && (0, import_jsx_runtime9.jsx)(PermissionsMenu, {})]
154520
+ }), isHomeShortcutSupported && (0, import_jsx_runtime9.jsx)(HomeShortcutMenu, {}), isShareListMenuSupported && (0, import_jsx_runtime9.jsx)(AppShareListMenu, {}), isSettingsMenuSupported && (0, import_jsx_runtime9.jsx)(SettingsMenu, {})]
154459
154521
  })
154460
154522
  })
154461
154523
  });
154462
154524
  });
154463
154525
  });
154464
154526
  return function onClickHandler() {
154465
- return _ref41.apply(this, arguments);
154527
+ return _ref39.apply(this, arguments);
154466
154528
  };
154467
154529
  }();
154468
154530
  return {
154469
154531
  open: onClickHandler
154470
154532
  };
154471
154533
  }
154472
- function BottomSheetImpressionArea(_ref43) {
154473
- var children = _ref43.children;
154534
+ function BottomSheetImpressionArea(_ref41) {
154535
+ var children = _ref41.children;
154474
154536
  var logging = useMoreButtonBottomSheetLogging();
154475
154537
  (0, import_react15.useEffect)(function () {
154476
154538
  logging.show();
@@ -154490,9 +154552,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154490
154552
  }
154491
154553
  var import_react16 = _$$_REQUIRE(_dependencyMap[13], "react");
154492
154554
  var import_jsx_runtime10 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154493
- function NavigationBarImpressionArea(_ref44) {
154494
- var children = _ref44.children,
154495
- withHomeButton = _ref44.withHomeButton;
154555
+ function NavigationBarImpressionArea(_ref42) {
154556
+ var children = _ref42.children,
154557
+ withHomeButton = _ref42.withHomeButton;
154496
154558
  var hasLogged = (0, import_react16.useRef)(false);
154497
154559
  var logging = useNavigationBarLogging();
154498
154560
  (0, import_react16.useEffect)(function () {
@@ -154554,8 +154616,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154554
154616
  var navigationEvent = useNavigationEvent();
154555
154617
  var _useNavigationBarCont2 = useNavigationBarContext(),
154556
154618
  navigationRightButton = _useNavigationBarCont2.navigationRightButton;
154557
- var _ref45 = (0, import_react_native_safe_area_context.useSafeAreaInsets)(),
154558
- safeAreaRight = _ref45.right;
154619
+ var _ref43 = (0, import_react_native_safe_area_context.useSafeAreaInsets)(),
154620
+ safeAreaRight = _ref43.right;
154559
154621
  useHardwareBackPress(navigationEvent.handleBack);
154560
154622
  return (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, {
154561
154623
  children: [(0, import_jsx_runtime12.jsx)(import_tds_react_native9.PageNavbar, {
@@ -154593,8 +154655,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154593
154655
  __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/native-modules/constant-bridges"));
154594
154656
  __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[20], "@apps-in-toss/native-modules/event-bridges"));
154595
154657
  var import_jsx_runtime13 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154596
- function RNAppContainer(_ref46) {
154597
- var children = _ref46.children;
154658
+ function RNAppContainer(_ref44) {
154659
+ var children = _ref44.children;
154598
154660
  var global2 = getAppsInTossGlobals();
154599
154661
  switch (global2.appType) {
154600
154662
  case "game":
@@ -154608,8 +154670,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154608
154670
  });
154609
154671
  }
154610
154672
  }
154611
- function GameAppContainer(_ref47) {
154612
- var children = _ref47.children;
154673
+ function GameAppContainer(_ref45) {
154674
+ var children = _ref45.children;
154613
154675
  (0, import_react17.useEffect)(function () {
154614
154676
  if (import_react_native23.Platform.OS === "ios") {
154615
154677
  (0, import_native_modules13.setIosSwipeGestureEnabled)({
@@ -154629,16 +154691,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154629
154691
  }) : children]
154630
154692
  });
154631
154693
  }
154632
- function GeneralAppContainer(_ref48) {
154633
- var children = _ref48.children;
154694
+ function GeneralAppContainer(_ref46) {
154695
+ var children = _ref46.children;
154634
154696
  return (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, {
154635
154697
  children: [(0, import_jsx_runtime13.jsx)(RNNavigationBar.Default, {}), children]
154636
154698
  });
154637
154699
  }
154638
154700
  var import_jsx_runtime14 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154639
- function AppsInTossContainer(Container, _ref49) {
154640
- var children = _ref49.children,
154641
- initialProps = _objectWithoutProperties(_ref49, _excluded);
154701
+ function AppsInTossContainer(Container, _ref47) {
154702
+ var children = _ref47.children,
154703
+ initialProps = _objectWithoutProperties(_ref47, _excluded);
154642
154704
  if (!(0, import_native_modules14.isMinVersionSupported)({
154643
154705
  android: "5.220.0",
154644
154706
  ios: "5.221.0"
@@ -154661,9 +154723,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154661
154723
  }))]
154662
154724
  });
154663
154725
  }
154664
- function registerApp(container, _ref50) {
154665
- var context = _ref50.context,
154666
- analytics = _ref50.analytics;
154726
+ function registerApp(container, _ref48) {
154727
+ var context = _ref48.context,
154728
+ analytics = _ref48.analytics;
154667
154729
  var appName = getAppName();
154668
154730
  var isRegistered = import_react_native25.AppRegistry.getAppKeys().includes(appName);
154669
154731
  if (!isRegistered) {
@@ -154689,8 +154751,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154689
154751
  }
154690
154752
  return global.Page;
154691
154753
  }
154692
- function AppsInTossScreenContainer(_ref51) {
154693
- var children = _ref51.children;
154754
+ function AppsInTossScreenContainer(_ref49) {
154755
+ var children = _ref49.children;
154694
154756
  var isRNApp = getAppsInTossGlobals().webViewType == null;
154695
154757
  return (0, import_jsx_runtime14.jsx)(NavigationBarContextProvider, {
154696
154758
  children: (0, import_jsx_runtime14.jsx)(import_analytics.Analytics.Screen, {
@@ -154736,8 +154798,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154736
154798
  var import_jsx_runtime15 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154737
154799
  function GameWebviewNavigationBar() {
154738
154800
  var safeAreaTop = (0, import_private7.useSafeAreaTop)();
154739
- var _ref52 = (0, import_tds_react_native11.useDialog)(),
154740
- openConfirm = _ref52.openConfirm;
154801
+ var _ref50 = (0, import_tds_react_native11.useDialog)(),
154802
+ openConfirm = _ref50.openConfirm;
154741
154803
  var _useCaptureExitLog3 = useCaptureExitLog(),
154742
154804
  captureExitLog = _useCaptureExitLog3.captureExitLog;
154743
154805
  var global2 = getAppsInTossGlobals();
@@ -154746,8 +154808,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154746
154808
  openMoreButtonBottomSheet = _useMoreButtonBottomS3.open;
154747
154809
  var _useNavigationBarCont3 = useNavigationBarContext(),
154748
154810
  navigationRightButton = _useNavigationBarCont3.navigationRightButton;
154749
- var _ref53 = (0, import_react_native_safe_area_context2.useSafeAreaInsets)(),
154750
- safeAreaRight = _ref53.right;
154811
+ var _ref51 = (0, import_react_native_safe_area_context2.useSafeAreaInsets)(),
154812
+ safeAreaRight = _ref51.right;
154751
154813
  var handleGameWebviewClose = (0, import_react18.useCallback)(_asyncToGenerator(function* () {
154752
154814
  logging.closeButtonClick();
154753
154815
  var isConfirmed = yield openConfirm({
@@ -154825,16 +154887,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154825
154887
  var import_es_hangul4 = _$$_REQUIRE(_dependencyMap[15], "es-hangul");
154826
154888
  var import_react20 = _$$_REQUIRE(_dependencyMap[13], "react");
154827
154889
  var import_jsx_runtime17 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154828
- function PartnerWebviewNavigationBar(_ref55) {
154890
+ function PartnerWebviewNavigationBar(_ref53) {
154829
154891
  var _parsedNavigationBar$3, _parsedNavigationBar$4;
154830
- var onBackButtonClick = _ref55.onBackButtonClick,
154831
- onHomeButtonClick = _ref55.onHomeButtonClick;
154892
+ var onBackButtonClick = _ref53.onBackButtonClick,
154893
+ onHomeButtonClick = _ref53.onHomeButtonClick;
154832
154894
  var globals = getAppsInTossGlobals();
154833
154895
  var _useCaptureExitLog4 = useCaptureExitLog(),
154834
154896
  captureExitLog = _useCaptureExitLog4.captureExitLog;
154835
154897
  var logging = useNavigationBarLogging();
154836
- var _ref56 = (0, import_tds_react_native12.useDialog)(),
154837
- openConfirm = _ref56.openConfirm;
154898
+ var _ref54 = (0, import_tds_react_native12.useDialog)(),
154899
+ openConfirm = _ref54.openConfirm;
154838
154900
  var _useMoreButtonBottomS4 = useMoreButtonBottomSheet(),
154839
154901
  openMoreButtonBottomSheet = _useMoreButtonBottomS4.open;
154840
154902
  var parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
@@ -154880,10 +154942,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154880
154942
  });
154881
154943
  }
154882
154944
  var import_jsx_runtime18 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154883
- var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen(_ref58, ref) {
154884
- var onBackButtonClick = _ref58.onBackButtonClick,
154885
- onHomeButtonClick = _ref58.onHomeButtonClick,
154886
- webViewProps = _objectWithoutProperties(_ref58, _excluded2);
154945
+ var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen(_ref56, ref) {
154946
+ var onBackButtonClick = _ref56.onBackButtonClick,
154947
+ onHomeButtonClick = _ref56.onHomeButtonClick,
154948
+ webViewProps = _objectWithoutProperties(_ref56, _excluded2);
154887
154949
  return (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, {
154888
154950
  children: [(0, import_jsx_runtime18.jsx)(PartnerWebviewNavigationBar, {
154889
154951
  onBackButtonClick: onBackButtonClick,
@@ -154905,9 +154967,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154905
154967
  var components = url.hash.replace("#Intent;", "").split(";").map(function (component) {
154906
154968
  return component.split("=");
154907
154969
  });
154908
- var scheme = (_components$find = components.find(function (_ref59) {
154909
- var _ref60 = _slicedToArray(_ref59, 1),
154910
- key = _ref60[0];
154970
+ var scheme = (_components$find = components.find(function (_ref57) {
154971
+ var _ref58 = _slicedToArray(_ref57, 1),
154972
+ key = _ref58[0];
154911
154973
  return key === "scheme";
154912
154974
  })) == null ? void 0 : _components$find[1];
154913
154975
  if (!scheme) {
@@ -155273,10 +155335,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155273
155335
  function serializeError(error) {
155274
155336
  return JSON.stringify(error, function (_, value) {
155275
155337
  if (value instanceof Error) {
155276
- return Object.assign({}, Object.entries(value).reduce(function (acc, _ref61) {
155277
- var _ref62 = _slicedToArray(_ref61, 2),
155278
- key = _ref62[0],
155279
- value2 = _ref62[1];
155338
+ return Object.assign({}, Object.entries(value).reduce(function (acc, _ref59) {
155339
+ var _ref60 = _slicedToArray(_ref59, 2),
155340
+ key = _ref60[0],
155341
+ value2 = _ref60[1];
155280
155342
  acc[key] = value2;
155281
155343
  return acc;
155282
155344
  }, {}), {
@@ -155289,24 +155351,24 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155289
155351
  return value;
155290
155352
  });
155291
155353
  }
155292
- function methodHandler(_ref63) {
155293
- var args = _ref63.args,
155294
- eventId = _ref63.eventId,
155295
- functionName = _ref63.functionName,
155296
- handlerMap = _ref63.handlerMap,
155297
- injectJavaScript = _ref63.injectJavaScript;
155354
+ function methodHandler(_ref61) {
155355
+ var args = _ref61.args,
155356
+ eventId = _ref61.eventId,
155357
+ functionName = _ref61.functionName,
155358
+ handlerMap = _ref61.handlerMap,
155359
+ injectJavaScript = _ref61.injectJavaScript;
155298
155360
  var func = handlerMap[functionName];
155299
155361
  if (!func) {
155300
155362
  console.error(`${functionName} is not a function`);
155301
155363
  return;
155302
155364
  }
155303
155365
  var wrappedFunc = function () {
155304
- var _ref64 = _asyncToGenerator(function* () {
155366
+ var _ref62 = _asyncToGenerator(function* () {
155305
155367
  var result = yield func.apply(void 0, arguments);
155306
155368
  return result;
155307
155369
  });
155308
155370
  return function wrappedFunc() {
155309
- return _ref64.apply(this, arguments);
155371
+ return _ref62.apply(this, arguments);
155310
155372
  };
155311
155373
  }();
155312
155374
  wrappedFunc.apply(void 0, _toConsumableArray(args)).then(function (result) {
@@ -155321,17 +155383,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155321
155383
  });
155322
155384
  }
155323
155385
  var globalEventListenerMap = new Map();
155324
- function useBridgeHandler(_ref65) {
155325
- var onMessage = _ref65.onMessage,
155326
- constantHandlerMap = _ref65.constantHandlerMap,
155327
- asyncHandlerMap = _ref65.asyncHandlerMap,
155328
- eventListenerMap = _ref65.eventListenerMap;
155386
+ function useBridgeHandler(_ref63) {
155387
+ var onMessage = _ref63.onMessage,
155388
+ constantHandlerMap = _ref63.constantHandlerMap,
155389
+ asyncHandlerMap = _ref63.asyncHandlerMap,
155390
+ eventListenerMap = _ref63.eventListenerMap;
155329
155391
  var ref = (0, import_react22.useRef)(null);
155330
155392
  var injectedJavaScript = (0, import_react22.useMemo)(function () {
155331
- return `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(Object.entries(constantHandlerMap).reduce(function (acc, _ref66) {
155332
- var _ref67 = _slicedToArray(_ref66, 2),
155333
- key = _ref67[0],
155334
- value = _ref67[1];
155393
+ return `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(Object.entries(constantHandlerMap).reduce(function (acc, _ref64) {
155394
+ var _ref65 = _slicedToArray(_ref64, 2),
155395
+ key = _ref65[0],
155396
+ value = _ref65[1];
155335
155397
  acc[key] = typeof value === "function" ? value() : value;
155336
155398
  return acc;
155337
155399
  }, {}))};`;
@@ -155358,7 +155420,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155358
155420
  };
155359
155421
  };
155360
155422
  var $onMessage = (0, import_react22.useCallback)(function () {
155361
- var _ref68 = _asyncToGenerator(function* (e) {
155423
+ var _ref66 = _asyncToGenerator(function* (e) {
155362
155424
  onMessage == null ? void 0 : onMessage(e);
155363
155425
  var data = parseNativeEventData(e.nativeEvent.data);
155364
155426
  if (typeof data !== "object" || data === null || typeof data.functionName !== "string" || typeof data.eventId !== "string" || typeof data.type !== "string" || !["addEventListener", "removeEventListener", "method"].includes(data.type)) {
@@ -155403,7 +155465,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155403
155465
  }
155404
155466
  });
155405
155467
  return function (_x5) {
155406
- return _ref68.apply(this, arguments);
155468
+ return _ref66.apply(this, arguments);
155407
155469
  };
155408
155470
  }(), [onMessage]);
155409
155471
  return {
@@ -155422,58 +155484,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155422
155484
  }
155423
155485
  var import_react_native_safe_area_context3 = _$$_REQUIRE(_dependencyMap[17], "@granite-js/native/react-native-safe-area-context");
155424
155486
  var import_react23 = _$$_REQUIRE(_dependencyMap[13], "react");
155425
- var EventEmitter = function () {
155426
- function EventEmitter() {
155427
- _classCallCheck(this, EventEmitter);
155428
- this.listeners = {};
155429
- }
155430
- return _createClass(EventEmitter, [{
155431
- key: "on",
155432
- value: function on(event, listener) {
155433
- if (!this.listeners[event]) {
155434
- this.listeners[event] = [];
155435
- }
155436
- this.listeners[event].push(listener);
155437
- }
155438
- }, {
155439
- key: "emit",
155440
- value: function emit(event) {
155441
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
155442
- args[_key - 1] = arguments[_key];
155443
- }
155444
- if (!this.listeners[event]) {
155445
- return;
155446
- }
155447
- this.listeners[event].forEach(function (listener) {
155448
- return listener.apply(void 0, args);
155449
- });
155450
- }
155451
- }, {
155452
- key: "off",
155453
- value: function off(event, listener) {
155454
- if (!this.listeners[event]) {
155455
- return;
155456
- }
155457
- this.listeners[event] = this.listeners[event].filter(function (l) {
155458
- return l !== listener;
155459
- });
155460
- }
155461
- }]);
155462
- }();
155463
- function useSafeAreaInsetsEmitter() {
155487
+ function useSafeAreaInsetsEvent() {
155464
155488
  var insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
155465
- var emitter = (0, import_react23.useMemo)(function () {
155466
- return new EventEmitter();
155467
- }, []);
155468
155489
  (0, import_react23.useEffect)(function () {
155469
- emitter.emit("safeAreaInsetsChange", insets);
155490
+ _safeAreaInsetsChange.emit(insets);
155491
+ }, [insets]);
155492
+ (0, import_react23.useEffect)(function () {
155470
155493
  return function () {
155471
- emitter.off("safeAreaInsetsChange", function (listener) {
155472
- return listener(insets);
155473
- });
155494
+ return _safeAreaInsetsChange.clearSubscriptions();
155474
155495
  };
155475
- }, [emitter, insets]);
155476
- return emitter;
155496
+ }, []);
155497
+ return _safeAreaInsetsChange;
155477
155498
  }
155478
155499
  var import_react_native33 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
155479
155500
  var import_tds_react_native13 = _$$_REQUIRE(_dependencyMap[11], "@toss/tds-react-native");
@@ -155526,20 +155547,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155526
155547
  }
155527
155548
  }
155528
155549
  function useWebViewHistory() {
155529
- var _ref69 = (0, import_react24.useReducer)(reducer, INITIAL_STATE),
155530
- _ref70 = _slicedToArray(_ref69, 2),
155531
- state = _ref70[0],
155532
- dispatch = _ref70[1];
155533
- var onNavigationStateChange = (0, import_react24.useCallback)(function (_ref71) {
155534
- var url = _ref71.url,
155535
- canGoForward2 = _ref71.canGoForward;
155550
+ var _ref67 = (0, import_react24.useReducer)(reducer, INITIAL_STATE),
155551
+ _ref68 = _slicedToArray(_ref67, 2),
155552
+ state = _ref68[0],
155553
+ dispatch = _ref68[1];
155554
+ var onNavigationStateChange = (0, import_react24.useCallback)(function (_ref69) {
155555
+ var url = _ref69.url,
155556
+ canGoForward2 = _ref69.canGoForward;
155536
155557
  dispatch({
155537
155558
  type: "NAVIGATION_CHANGE",
155538
155559
  url: url,
155539
155560
  canGoForward: canGoForward2
155540
155561
  });
155541
155562
  }, []);
155542
- var _ref72 = (0, import_react24.useMemo)(function () {
155563
+ var _ref70 = (0, import_react24.useMemo)(function () {
155543
155564
  var canBack = state.index > 0;
155544
155565
  var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
155545
155566
  return {
@@ -155547,8 +155568,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155547
155568
  canGoForward: canFwd
155548
155569
  };
155549
155570
  }, [state.index, state.stack.length]),
155550
- canGoBack = _ref72.canGoBack,
155551
- canGoForward = _ref72.canGoForward;
155571
+ canGoBack = _ref70.canGoBack,
155572
+ canGoForward = _ref70.canGoForward;
155552
155573
  return {
155553
155574
  onNavigationStateChange: onNavigationStateChange,
155554
155575
  hasHistory: canGoBack,
@@ -155561,14 +155582,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155561
155582
  var _useWebViewHistory = useWebViewHistory(),
155562
155583
  hasHistory = _useWebViewHistory.hasHistory,
155563
155584
  onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
155564
- var _ref73 = (0, import_react_native33.useBackEventState)(),
155565
- webBackHandlersRef = _ref73.handlersRef,
155566
- hasWebBackEvent = _ref73.hasBackEvent,
155567
- addWebBackEventListener = _ref73.addEventListener,
155568
- removeWebBackEventListener = _ref73.removeEventListener;
155585
+ var _ref71 = (0, import_react_native33.useBackEventState)(),
155586
+ webBackHandlersRef = _ref71.handlersRef,
155587
+ hasWebBackEvent = _ref71.hasBackEvent,
155588
+ addWebBackEventListener = _ref71.addEventListener,
155589
+ removeWebBackEventListener = _ref71.removeEventListener;
155569
155590
  var logging = useNavigationBarLogging();
155570
- var _ref74 = (0, import_tds_react_native13.useDialog)(),
155571
- openConfirm = _ref74.openConfirm;
155591
+ var _ref72 = (0, import_tds_react_native13.useDialog)(),
155592
+ openConfirm = _ref72.openConfirm;
155572
155593
  var global2 = getAppsInTossGlobals();
155573
155594
  var addEventListener = (0, import_react25.useCallback)(function (handler) {
155574
155595
  addWebBackEventListener(handler);
@@ -155604,10 +155625,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155604
155625
  var handleWebHome = (0, import_react25.useCallback)(function () {
155605
155626
  var _webViewRef$current2;
155606
155627
  logging.homeButtonClick();
155607
- if (hasWebBackEvent) {
155608
- for (var handler of webBackHandlersRef) {
155609
- handler();
155610
- }
155628
+ if (_homeEvent.hasSubscriptions()) {
155629
+ _homeEvent.emit({});
155611
155630
  return;
155612
155631
  }
155613
155632
  (_webViewRef$current2 = webViewRef.current) == null ? void 0 : _webViewRef$current2.injectJavaScript(`
@@ -155770,18 +155789,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155770
155789
  function mapFontScaleToCategory(fontScale, platform) {
155771
155790
  return platform === "ios" ? mapIOSFontScaleToCategory(fontScale) : mapAndroidFontScaleToCategory(fontScale);
155772
155791
  }
155773
- function _useCreateUserAgent(_ref76) {
155774
- var batteryModePreference = _ref76.batteryModePreference,
155775
- colorPreference = _ref76.colorPreference,
155776
- locale = _ref76.locale,
155777
- navbarPreference = _ref76.navbarPreference,
155778
- pureSafeArea = _ref76.pureSafeArea,
155779
- safeArea = _ref76.safeArea,
155780
- safeAreaBottomTransparency = _ref76.safeAreaBottomTransparency;
155792
+ function _useCreateUserAgent(_ref74) {
155793
+ var batteryModePreference = _ref74.batteryModePreference,
155794
+ colorPreference = _ref74.colorPreference,
155795
+ locale = _ref74.locale,
155796
+ navbarPreference = _ref74.navbarPreference,
155797
+ pureSafeArea = _ref74.pureSafeArea,
155798
+ safeArea = _ref74.safeArea,
155799
+ safeAreaBottomTransparency = _ref74.safeAreaBottomTransparency;
155781
155800
  var platform = (0, import_native_modules20.getPlatformOS)();
155782
155801
  var appVersion = (0, import_native_modules20.getTossAppVersion)();
155783
- var _ref77 = (0, import_react_native34.useWindowDimensions)(),
155784
- fontScale = _ref77.fontScale;
155802
+ var _ref75 = (0, import_react_native34.useWindowDimensions)(),
155803
+ fontScale = _ref75.fontScale;
155785
155804
  var platformString = platform === "ios" ? "iPhone" : "Android phone";
155786
155805
  var fontA11y = mapFontScaleToCategory(fontScale, platform);
155787
155806
  var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
@@ -155790,15 +155809,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155790
155809
  var import_native_modules21 = _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules");
155791
155810
  var import_react_native35 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
155792
155811
  var import_react26 = _$$_REQUIRE(_dependencyMap[13], "react");
155793
- function _useGeolocation(_ref78) {
155794
- var accuracy = _ref78.accuracy,
155795
- distanceInterval = _ref78.distanceInterval,
155796
- timeInterval = _ref78.timeInterval;
155812
+ function _useGeolocation(_ref76) {
155813
+ var accuracy = _ref76.accuracy,
155814
+ distanceInterval = _ref76.distanceInterval,
155815
+ timeInterval = _ref76.timeInterval;
155797
155816
  var isVisible = (0, import_react_native35.useVisibility)();
155798
- var _ref79 = (0, import_react26.useState)(null),
155799
- _ref80 = _slicedToArray(_ref79, 2),
155800
- location = _ref80[0],
155801
- setLocation = _ref80[1];
155817
+ var _ref77 = (0, import_react26.useState)(null),
155818
+ _ref78 = _slicedToArray(_ref77, 2),
155819
+ location = _ref78[0],
155820
+ setLocation = _ref78[1];
155802
155821
  (0, import_react26.useEffect)(function () {
155803
155822
  if (!isVisible) {
155804
155823
  return;
@@ -155943,10 +155962,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155943
155962
  var baseUrl = new URL(url);
155944
155963
  var schemeUrl = new URL((0, import_react_native39.getSchemeUri)());
155945
155964
  baseUrl.pathname = schemeUrl.pathname;
155946
- for (var _ref81 of schemeUrl.searchParams.entries()) {
155947
- var _ref82 = _slicedToArray(_ref81, 2);
155948
- var key = _ref82[0];
155949
- var value = _ref82[1];
155965
+ for (var _ref79 of schemeUrl.searchParams.entries()) {
155966
+ var _ref80 = _slicedToArray(_ref79, 2);
155967
+ var key = _ref80[0];
155968
+ var value = _ref80[1];
155950
155969
  baseUrl.searchParams.set(key, value);
155951
155970
  }
155952
155971
  return baseUrl;
@@ -155965,11 +155984,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155965
155984
  }
155966
155985
  return url;
155967
155986
  }
155968
- function _WebView(_ref83) {
155969
- var type = _ref83.type,
155970
- local = _ref83.local,
155971
- onMessage = _ref83.onMessage,
155972
- props = _objectWithoutProperties(_ref83, _excluded3);
155987
+ function _WebView(_ref81) {
155988
+ var type = _ref81.type,
155989
+ local = _ref81.local,
155990
+ onMessage = _ref81.onMessage,
155991
+ props = _objectWithoutProperties(_ref81, _excluded3);
155973
155992
  if (!TYPES.includes(type)) {
155974
155993
  throw new Error(`Invalid WebView type: '${type}'`);
155975
155994
  }
@@ -155983,50 +156002,51 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155983
156002
  var insets = (0, import_react_native_safe_area_context4.useSafeAreaInsets)();
155984
156003
  var global2 = getAppsInTossGlobals();
155985
156004
  var navigationBarContext = useNavigationBarContext();
155986
- var safeAreaInsetsEmitter = useSafeAreaInsetsEmitter();
155987
- var _ref84 = (0, import_react28.useState)(props.allowsBackForwardNavigationGestures),
155988
- _ref85 = _slicedToArray(_ref84, 2),
155989
- allowsBackForwardNavigationGestures = _ref85[0],
155990
- setAllowsBackForwardNavigationGestures = _ref85[1];
156005
+ var safeAreaInsetsEvent = useSafeAreaInsetsEvent();
156006
+ var _ref82 = (0, import_react28.useState)(props.allowsBackForwardNavigationGestures),
156007
+ _ref83 = _slicedToArray(_ref82, 2),
156008
+ allowsBackForwardNavigationGestures = _ref83[0],
156009
+ setAllowsBackForwardNavigationGestures = _ref83[1];
155991
156010
  var handler = useBridgeHandler({
155992
156011
  onMessage: onMessage,
155993
156012
  eventListenerMap: Object.assign({}, appsInTossEventBridges, {
155994
- navigationAccessoryEvent: function navigationAccessoryEvent(_ref86) {
155995
- var onEvent = _ref86.onEvent,
155996
- onError = _ref86.onError;
156013
+ navigationAccessoryEvent: function navigationAccessoryEvent(_ref84) {
156014
+ var onEvent = _ref84.onEvent,
156015
+ onError = _ref84.onError;
155997
156016
  return import_tds_react_native15.tdsEvent.addEventListener("navigationAccessoryEvent", {
155998
156017
  onEvent: onEvent,
155999
156018
  onError: onError
156000
156019
  });
156001
156020
  },
156002
- backEvent: function backEvent(_ref87) {
156003
- var onEvent = _ref87.onEvent;
156021
+ backEvent: function backEvent(_ref85) {
156022
+ var onEvent = _ref85.onEvent;
156004
156023
  webBackHandler.addEventListener(onEvent);
156005
156024
  return function () {
156006
156025
  webBackHandler.removeEventListener(onEvent);
156007
156026
  };
156008
156027
  },
156009
- updateLocationEvent: function updateLocationEvent(_ref88) {
156010
- var onEvent = _ref88.onEvent,
156011
- onError = _ref88.onError,
156012
- options = _ref88.options;
156028
+ homeEvent: function homeEvent(_ref86) {
156029
+ var onEvent = _ref86.onEvent;
156030
+ return _homeEvent.subscribe(onEvent);
156031
+ },
156032
+ updateLocationEvent: function updateLocationEvent(_ref87) {
156033
+ var onEvent = _ref87.onEvent,
156034
+ onError = _ref87.onError,
156035
+ options = _ref87.options;
156013
156036
  return import_native_modules24.appsInTossEvent.addEventListener("updateLocationEvent", {
156014
156037
  onEvent: onEvent,
156015
156038
  onError: onError,
156016
156039
  options: options
156017
156040
  });
156018
156041
  },
156019
- safeAreaInsetsChange: function safeAreaInsetsChange(_ref89) {
156020
- var onEvent = _ref89.onEvent;
156021
- safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
156022
- return function () {
156023
- safeAreaInsetsEmitter.off("safeAreaInsetsChange", onEvent);
156024
- };
156042
+ safeAreaInsetsChange: function safeAreaInsetsChange(_ref88) {
156043
+ var onEvent = _ref88.onEvent;
156044
+ return safeAreaInsetsEvent.subscribe(onEvent);
156025
156045
  },
156026
- appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref90) {
156027
- var onEvent = _ref90.onEvent,
156028
- onError = _ref90.onError,
156029
- options = _ref90.options;
156046
+ appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref89) {
156047
+ var onEvent = _ref89.onEvent,
156048
+ onError = _ref89.onError,
156049
+ options = _ref89.options;
156030
156050
  return import_native_modules24.appsInTossEvent.addEventListener("appBridgeCallbackEvent", {
156031
156051
  onEvent: onEvent,
156032
156052
  onError: onError,
@@ -156051,10 +156071,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156051
156071
  right: insets.right
156052
156072
  };
156053
156073
  }
156054
- }, Object.fromEntries(Object.entries(global2).map(function (_ref91) {
156055
- var _ref92 = _slicedToArray(_ref91, 2),
156056
- key = _ref92[0],
156057
- value = _ref92[1];
156074
+ }, Object.fromEntries(Object.entries(global2).map(function (_ref90) {
156075
+ var _ref91 = _slicedToArray(_ref90, 2),
156076
+ key = _ref91[0],
156077
+ value = _ref91[1];
156058
156078
  return [key, function () {
156059
156079
  return value;
156060
156080
  }];
@@ -156430,9 +156450,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156430
156450
  };
156431
156451
  }
156432
156452
  if (response.resultType !== "SUCCESS") {
156433
- var _ref100, _response$error$reaso, _response$error, _mappedError$code;
156453
+ var _ref99, _response$error$reaso, _response$error, _mappedError$code;
156434
156454
  var mappedError = API_RESULT_ERROR_MAP[response.resultType];
156435
- var errorMessage = (_ref100 = (_response$error$reaso = (_response$error = response.error) == null ? void 0 : _response$error.reason) != null ? _response$error$reaso : mappedError == null ? void 0 : mappedError.message) != null ? _ref100 : ERROR_MESSAGES[ERROR_CODES.INTERNAL_ERROR];
156455
+ var errorMessage = (_ref99 = (_response$error$reaso = (_response$error = response.error) == null ? void 0 : _response$error.reason) != null ? _response$error$reaso : mappedError == null ? void 0 : mappedError.message) != null ? _ref99 : ERROR_MESSAGES[ERROR_CODES.INTERNAL_ERROR];
156436
156456
  var errorCode = (_mappedError$code = mappedError == null ? void 0 : mappedError.code) != null ? _mappedError$code : ERROR_CODES.INTERNAL_ERROR;
156437
156457
  return {
156438
156458
  type: "error",
@@ -156564,7 +156584,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156564
156584
  key: "track",
156565
156585
  value: function () {
156566
156586
  var _track = _asyncToGenerator(function* (eventType) {
156567
- var _this = this;
156587
+ var _this2 = this;
156568
156588
  if (!this.eventTypes.has(eventType)) {
156569
156589
  return;
156570
156590
  }
@@ -156583,7 +156603,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156583
156603
  data: this.eventPayload
156584
156604
  };
156585
156605
  yield Promise.allSettled(this.eventTrackingUrls.map(function (url) {
156586
- return _this.sendTrackingRequest(url, payload);
156606
+ return _this2.sendTrackingRequest(url, payload);
156587
156607
  }));
156588
156608
  if (!this.repeatableEvents.has(eventType) && this.requestId && this.creativeId) {
156589
156609
  globalEventDeduplicator.markTracked(this.requestId, this.creativeId, eventType);
@@ -156623,20 +156643,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156623
156643
  var import_react_native42 = _$$_REQUIRE(_dependencyMap[12], "react-native");
156624
156644
  var import_jsx_runtime20 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
156625
156645
  var ARROW_PATH = "m7.5 20.4c-.5-.5-.5-1.2 0-1.7l6.7-6.7-6.8-6.7c-.5-.5-.5-1.2 0-1.7s1.2-.5 1.7 0l7.5 7.5c.5.5.5 1.2 0 1.7l-7.5 7.5c-.2.3-.5.4-.8.4s-.6-.1-.8-.3z";
156626
- function FeedBannerAdView(_ref93) {
156627
- var brandName = _ref93.brandName,
156628
- brandLogoUri = _ref93.brandLogoUri,
156629
- title = _ref93.title,
156630
- subtitle = _ref93.subtitle,
156631
- mainImageUri = _ref93.mainImageUri,
156632
- ctaText = _ref93.ctaText,
156633
- ctaTextColor = _ref93.ctaTextColor,
156634
- ctaBackgroundColor = _ref93.ctaBackgroundColor,
156635
- adClearanceText = _ref93.adClearanceText,
156636
- colors = _ref93.colors,
156637
- isAdBadgeEnabled = _ref93.isAdBadgeEnabled,
156638
- paddingStyle = _ref93.paddingStyle,
156639
- _onPress2 = _ref93.onPress;
156646
+ function FeedBannerAdView(_ref92) {
156647
+ var brandName = _ref92.brandName,
156648
+ brandLogoUri = _ref92.brandLogoUri,
156649
+ title = _ref92.title,
156650
+ subtitle = _ref92.subtitle,
156651
+ mainImageUri = _ref92.mainImageUri,
156652
+ ctaText = _ref92.ctaText,
156653
+ ctaTextColor = _ref92.ctaTextColor,
156654
+ ctaBackgroundColor = _ref92.ctaBackgroundColor,
156655
+ adClearanceText = _ref92.adClearanceText,
156656
+ colors = _ref92.colors,
156657
+ isAdBadgeEnabled = _ref92.isAdBadgeEnabled,
156658
+ paddingStyle = _ref92.paddingStyle,
156659
+ _onPress2 = _ref92.onPress;
156640
156660
  var scale = (0, import_react29.useRef)(new import_react_native42.Animated.Value(1)).current;
156641
156661
  var animateScale = function animateScale(toValue) {
156642
156662
  import_react_native42.Animated.timing(scale, {
@@ -156924,15 +156944,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156924
156944
  var import_react_native43 = _$$_REQUIRE(_dependencyMap[12], "react-native");
156925
156945
  var import_jsx_runtime21 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
156926
156946
  var SQUIRCLE_PATH = "M0 17.352C0 3.564 3.564 0 17.352 0H18.648C32.436 0 36 3.564 36 17.352V18.648C36 32.436 32.436 36 18.648 36H17.352C3.564 36 0 32.436 0 18.648V17.352Z";
156927
- function ListBannerAdView(_ref94) {
156928
- var title = _ref94.title,
156929
- subtitle = _ref94.subtitle,
156930
- adClearanceText = _ref94.adClearanceText,
156931
- adClearanceFontSize = _ref94.adClearanceFontSize,
156932
- imageUri = _ref94.imageUri,
156933
- paddingStyle = _ref94.paddingStyle,
156934
- colors = _ref94.colors,
156935
- _onPress3 = _ref94.onPress;
156947
+ function ListBannerAdView(_ref93) {
156948
+ var title = _ref93.title,
156949
+ subtitle = _ref93.subtitle,
156950
+ adClearanceText = _ref93.adClearanceText,
156951
+ adClearanceFontSize = _ref93.adClearanceFontSize,
156952
+ imageUri = _ref93.imageUri,
156953
+ paddingStyle = _ref93.paddingStyle,
156954
+ colors = _ref93.colors,
156955
+ _onPress3 = _ref93.onPress;
156936
156956
  var scale = (0, import_react30.useRef)(new import_react_native43.Animated.Value(1)).current;
156937
156957
  var clipIdRef = (0, import_react30.useRef)(`clip-${Math.random().toString(36).slice(2)}`);
156938
156958
  var animateScale = function animateScale(toValue) {
@@ -157244,7 +157264,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157244
157264
  return false;
157245
157265
  }
157246
157266
  function _InlineAd(props) {
157247
- var _ad$requestId3, _ad$creative$id2, _ad$creative2, _listCreative$subTitl, _ref99, _listCreative$adClear;
157267
+ var _ad$requestId3, _ad$creative$id2, _ad$creative2, _listCreative$subTitl, _ref98, _listCreative$adClear;
157248
157268
  var adGroupId = props.adGroupId,
157249
157269
  theme = props.theme,
157250
157270
  tone = props.tone,
@@ -157257,14 +157277,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157257
157277
  onAdFailedToRender = props.onAdFailedToRender,
157258
157278
  onNoFill = props.onNoFill;
157259
157279
  var slotIdRef = (0, import_react31.useRef)(createSlotId());
157260
- var _ref95 = (0, import_react31.useState)(null),
157261
- _ref96 = _slicedToArray(_ref95, 2),
157262
- ad = _ref96[0],
157263
- setAd = _ref96[1];
157264
- var _ref97 = (0, import_react31.useState)(true),
157265
- _ref98 = _slicedToArray(_ref97, 2),
157266
- isAdBadgeEnabled = _ref98[0],
157267
- setIsAdBadgeEnabled = _ref98[1];
157280
+ var _ref94 = (0, import_react31.useState)(null),
157281
+ _ref95 = _slicedToArray(_ref94, 2),
157282
+ ad = _ref95[0],
157283
+ setAd = _ref95[1];
157284
+ var _ref96 = (0, import_react31.useState)(true),
157285
+ _ref97 = _slicedToArray(_ref96, 2),
157286
+ isAdBadgeEnabled = _ref97[0],
157287
+ setIsAdBadgeEnabled = _ref97[1];
157268
157288
  var eventTrackerRef = (0, import_react31.useRef)(null);
157269
157289
  var eventPayloadRef = (0, import_react31.useRef)(null);
157270
157290
  var hasRenderedRef = (0, import_react31.useRef)(false);
@@ -157404,7 +157424,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157404
157424
  var listCreative = isListBanner ? ad.creative : null;
157405
157425
  var feedCreative = isFeedBanner ? ad.creative : null;
157406
157426
  var subtitleText = listCreative && isAdBadgeEnabled ? `${listCreative.subTitle} \u2022 AD` : (_listCreative$subTitl = listCreative == null ? void 0 : listCreative.subTitle) != null ? _listCreative$subTitl : "";
157407
- var adClearanceText = (_ref99 = (_listCreative$adClear = listCreative == null ? void 0 : listCreative.adClearanceText) != null ? _listCreative$adClear : feedCreative == null ? void 0 : feedCreative.adClearanceText) != null ? _ref99 : void 0;
157427
+ var adClearanceText = (_ref98 = (_listCreative$adClear = listCreative == null ? void 0 : listCreative.adClearanceText) != null ? _listCreative$adClear : feedCreative == null ? void 0 : feedCreative.adClearanceText) != null ? _ref98 : void 0;
157408
157428
  var adClearanceFontSize = adClearanceText && adClearanceText.length >= 60 ? 6 : 8;
157409
157429
  var imageUri = listCreative != null && listCreative.imageUrl && isSafeUrl(listCreative.imageUrl) ? listCreative.imageUrl : null;
157410
157430
  var brandLogoUri = feedCreative != null && feedCreative.brandLogoUrl && isSafeUrl(feedCreative.brandLogoUrl) ? feedCreative.brandLogoUrl : null;
@@ -157551,7 +157571,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157551
157571
  OverlayProvider: OverlayProvider,
157552
157572
  WebView: _WebView,
157553
157573
  env: _env,
157574
+ homeEvent: _homeEvent,
157554
157575
  loadFullScreenAd: _loadFullScreenAd,
157576
+ safeAreaInsetsChange: _safeAreaInsetsChange,
157555
157577
  showFullScreenAd: _showFullScreenAd,
157556
157578
  useCreateUserAgent: _useCreateUserAgent,
157557
157579
  useGeolocation: _useGeolocation,
@@ -157559,7 +157581,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157559
157581
  useTopNavigation: _useTopNavigation,
157560
157582
  useWaitForReturnNavigator: _useWaitForReturnNavigator
157561
157583
  }, _$$_REQUIRE(_dependencyMap[8], "@apps-in-toss/analytics"), _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules"), _$$_REQUIRE(_dependencyMap[23], "@apps-in-toss/types")));
157562
- },1256,[93,24,25,32,207,16,61,1257,1258,1259,2,1446,18,6,9,2467,2567,532,2568,2606,2613,2629,2476,1260,642],"../../../.yarn/__virtual__/@apps-in-toss-framework-virtual-afbad361af/1/packages/apps-in-toss/framework/dist/index.cjs");
157584
+ },1256,[93,32,207,24,25,16,61,1257,1258,1259,2,1446,18,6,9,2467,2567,532,2568,2606,2613,2629,2476,1260,642],"../../../.yarn/__virtual__/@apps-in-toss-framework-virtual-afbad361af/1/packages/apps-in-toss/framework/dist/index.cjs");
157563
157585
  __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
157564
157586
  function _objectDestructuringEmpty(obj) {
157565
157587
  if (obj == null) throw new TypeError("Cannot destructure undefined");