@apps-in-toss/web-framework 0.0.0-dev.1762248930136 → 0.0.0-dev.1763432540119

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.
@@ -491,6 +491,36 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
491
491
  }
492
492
  });
493
493
 
494
+ // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js
495
+ function _class_call_check(instance, Constructor) {
496
+ if (!_instanceof1(instance, Constructor)) throw new TypeError("Cannot call a class as a function");
497
+ }
498
+ var init_class_call_check = __esm({
499
+ "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js"() {
500
+ init_instanceof();
501
+ }
502
+ });
503
+
504
+ // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js
505
+ function _defineProperties(target, props) {
506
+ for (var i60 = 0; i60 < props.length; i60++) {
507
+ var descriptor = props[i60];
508
+ descriptor.enumerable = descriptor.enumerable || false;
509
+ descriptor.configurable = true;
510
+ if ("value" in descriptor) descriptor.writable = true;
511
+ Object.defineProperty(target, descriptor.key, descriptor);
512
+ }
513
+ }
514
+ function _create_class(Constructor, protoProps, staticProps) {
515
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
516
+ if (staticProps) _defineProperties(Constructor, staticProps);
517
+ return Constructor;
518
+ }
519
+ var init_create_class = __esm({
520
+ "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js"() {
521
+ }
522
+ });
523
+
494
524
  // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_extends.js
495
525
  function _extends() {
496
526
  _extends = Object.assign || function assign(target) {
@@ -2307,36 +2337,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
2307
2337
  }
2308
2338
  });
2309
2339
 
2310
- // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js
2311
- function _class_call_check(instance, Constructor) {
2312
- if (!_instanceof1(instance, Constructor)) throw new TypeError("Cannot call a class as a function");
2313
- }
2314
- var init_class_call_check = __esm({
2315
- "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js"() {
2316
- init_instanceof();
2317
- }
2318
- });
2319
-
2320
- // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js
2321
- function _defineProperties(target, props) {
2322
- for (var i60 = 0; i60 < props.length; i60++) {
2323
- var descriptor = props[i60];
2324
- descriptor.enumerable = descriptor.enumerable || false;
2325
- descriptor.configurable = true;
2326
- if ("value" in descriptor) descriptor.writable = true;
2327
- Object.defineProperty(target, descriptor.key, descriptor);
2328
- }
2329
- }
2330
- function _create_class(Constructor, protoProps, staticProps) {
2331
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2332
- if (staticProps) _defineProperties(Constructor, staticProps);
2333
- return Constructor;
2334
- }
2335
- var init_create_class = __esm({
2336
- "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js"() {
2337
- }
2338
- });
2339
-
2340
2340
  // ../../.yarn/cache/webidl-conversions-npm-5.0.0-5fd5be45a0-bf31df332e.zip/node_modules/webidl-conversions/lib/index.js
2341
2341
  var require_lib = __commonJS({
2342
2342
  "../../.yarn/cache/webidl-conversions-npm-5.0.0-5fd5be45a0-bf31df332e.zip/node_modules/webidl-conversions/lib/index.js"(exports) {
@@ -44032,7 +44032,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44032
44032
  });
44033
44033
 
44034
44034
  // ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/constants.ts
44035
- var GAME_CENTER_MIN_VERSION2, GAME_USER_KEY_MIN_VERSION, GAME_PROMOTION_REWARD_MIN_VERSION;
44035
+ var GAME_CENTER_MIN_VERSION2, GAME_USER_KEY_MIN_VERSION, GAME_PROMOTION_REWARD_MIN_VERSION, GET_IS_TOSS_LOGIN_INTEGRATED_SERVICE_MIN_VERSION;
44036
44036
  var init_constants13 = __esm({
44037
44037
  "../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/constants.ts"() {
44038
44038
  "use strict";
@@ -44048,6 +44048,10 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44048
44048
  android: "5.232.0",
44049
44049
  ios: "5.232.0"
44050
44050
  };
44051
+ GET_IS_TOSS_LOGIN_INTEGRATED_SERVICE_MIN_VERSION = {
44052
+ android: "5.237.0",
44053
+ ios: "5.237.0"
44054
+ };
44051
44055
  }
44052
44056
  });
44053
44057
 
@@ -44228,6 +44232,48 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44228
44232
  }
44229
44233
  });
44230
44234
 
44235
+ // ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/native-modules/getIsTossLoginIntegratedService.ts
44236
+ function getIsTossLoginIntegratedService() {
44237
+ return _getIsTossLoginIntegratedService.apply(this, arguments);
44238
+ }
44239
+ function _getIsTossLoginIntegratedService() {
44240
+ _getIsTossLoginIntegratedService = _async_to_generator(function() {
44241
+ var isSupported, response;
44242
+ return __generator(this, function(_state) {
44243
+ switch (_state.label) {
44244
+ case 0:
44245
+ isSupported = isMinVersionSupported2(GET_IS_TOSS_LOGIN_INTEGRATED_SERVICE_MIN_VERSION);
44246
+ if (!isSupported) {
44247
+ return [
44248
+ 2
44249
+ ];
44250
+ }
44251
+ return [
44252
+ 4,
44253
+ AppsInTossModule2.getIsTossLoginIntegratedService({})
44254
+ ];
44255
+ case 1:
44256
+ response = _state.sent();
44257
+ return [
44258
+ 2,
44259
+ response
44260
+ ];
44261
+ }
44262
+ });
44263
+ });
44264
+ return _getIsTossLoginIntegratedService.apply(this, arguments);
44265
+ }
44266
+ var init_getIsTossLoginIntegratedService = __esm({
44267
+ "../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/native-modules/getIsTossLoginIntegratedService.ts"() {
44268
+ "use strict";
44269
+ init_async_to_generator();
44270
+ init_ts_generator();
44271
+ init_AppsInTossModule();
44272
+ init_isMinVersionSupported();
44273
+ init_constants13();
44274
+ }
44275
+ });
44276
+
44231
44277
  // ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/native-modules/grantPromotionRewardForGame.ts
44232
44278
  function isGrantPromotionRewardForGameError(error) {
44233
44279
  return (typeof error === "undefined" ? "undefined" : _type_of(error)) === "object" && error !== null && "code" in error && typeof error.code === "string" && "message" in error && typeof error.message === "string";
@@ -44346,6 +44392,9 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44346
44392
  getGameCenterGameProfile: function() {
44347
44393
  return getGameCenterGameProfile2;
44348
44394
  },
44395
+ getIsTossLoginIntegratedService: function() {
44396
+ return getIsTossLoginIntegratedService;
44397
+ },
44349
44398
  getNetworkStatus: function() {
44350
44399
  return getNetworkStatus;
44351
44400
  },
@@ -44432,6 +44481,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44432
44481
  init_openGameCenterLeaderboard();
44433
44482
  init_submitGameCenterLeaderBoardScore();
44434
44483
  init_getUserKeyForGame();
44484
+ init_getIsTossLoginIntegratedService();
44435
44485
  init_grantPromotionRewardForGame();
44436
44486
  }
44437
44487
  });
@@ -45270,6 +45320,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
45270
45320
  init_submitGameCenterLeaderBoardScore();
45271
45321
  init_getUserKeyForGame();
45272
45322
  init_grantPromotionRewardForGame();
45323
+ init_getIsTossLoginIntegratedService();
45273
45324
  init_contactsViral();
45274
45325
  init_appsInTossSignTossCert();
45275
45326
  }
@@ -46480,21 +46531,22 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46480
46531
  });
46481
46532
  }
46482
46533
  function useBridgeHandler(param) {
46483
- var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap, originalInjectedJavaScript = param.injectedJavaScript;
46534
+ var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap;
46484
46535
  var ref = (0, import_react231.useRef)(null);
46485
46536
  var injectedJavaScript = (0, import_react231.useMemo)(function() {
46486
- return [
46487
- "window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
46488
- var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
46489
- acc[key] = typeof value === "function" ? value() : value;
46490
- return acc;
46491
- }, {})), ";"),
46492
- originalInjectedJavaScript,
46493
- "true"
46494
- ].join("\n");
46537
+ return "window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
46538
+ var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
46539
+ acc[key] = typeof value === "function" ? value() : value;
46540
+ return acc;
46541
+ }, {})), ";");
46495
46542
  }, [
46496
- constantHandlerMap,
46497
- originalInjectedJavaScript
46543
+ constantHandlerMap
46544
+ ]);
46545
+ (0, import_react231.useEffect)(function() {
46546
+ var _ref_current;
46547
+ (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.injectJavaScript(injectedJavaScript);
46548
+ }, [
46549
+ injectedJavaScript
46498
46550
  ]);
46499
46551
  var createHandleOnEvent = function(functionName, eventId) {
46500
46552
  return function(response) {
@@ -46515,7 +46567,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46515
46567
  var data, _eventListenerMap_data_functionName, handleOnEvent, handleOnError, remove, key, remove1, _ref_current;
46516
46568
  return __generator(this, function(_state) {
46517
46569
  onMessage === null || onMessage === void 0 ? void 0 : onMessage(e59);
46518
- data = JSON.parse(e59.nativeEvent.data);
46570
+ data = parseNativeEventData(e59.nativeEvent.data);
46519
46571
  if ((typeof data === "undefined" ? "undefined" : _type_of(data)) !== "object" || data === null || typeof data.functionName !== "string" || typeof data.eventId !== "string" || typeof data.type !== "string" || ![
46520
46572
  "addEventListener",
46521
46573
  "removeEventListener",
@@ -46579,6 +46631,32 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46579
46631
  onMessage: $onMessage
46580
46632
  };
46581
46633
  }
46634
+ function parseNativeEventData(data) {
46635
+ try {
46636
+ return JSON.parse(data);
46637
+ } catch (error) {
46638
+ console.error(error);
46639
+ return null;
46640
+ }
46641
+ }
46642
+ function useSafeAreaInsetsEmitter() {
46643
+ var insets = (0, react_native_safe_area_context_exports.useSafeAreaInsets)();
46644
+ var emitter = (0, import_react232.useMemo)(function() {
46645
+ return new EventEmitter();
46646
+ }, []);
46647
+ (0, import_react232.useEffect)(function() {
46648
+ emitter.emit("safeAreaInsetsChange", insets);
46649
+ return function() {
46650
+ emitter.off("safeAreaInsetsChange", function(listener) {
46651
+ return listener(insets);
46652
+ });
46653
+ };
46654
+ }, [
46655
+ emitter,
46656
+ insets
46657
+ ]);
46658
+ return emitter;
46659
+ }
46582
46660
  function reducer(state, action) {
46583
46661
  switch (action.type) {
46584
46662
  case "NAVIGATION_CHANGE": {
@@ -46622,8 +46700,8 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46622
46700
  }
46623
46701
  }
46624
46702
  function useWebViewHistory() {
46625
- var _useReducer = _sliced_to_array((0, import_react233.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
46626
- var onNavigationStateChange = (0, import_react233.useCallback)(function(param) {
46703
+ var _useReducer = _sliced_to_array((0, import_react234.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
46704
+ var onNavigationStateChange = (0, import_react234.useCallback)(function(param) {
46627
46705
  var url = param.url, canGoForward2 = param.canGoForward;
46628
46706
  dispatch({
46629
46707
  type: "NAVIGATION_CHANGE",
@@ -46631,7 +46709,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46631
46709
  canGoForward: canGoForward2
46632
46710
  });
46633
46711
  }, []);
46634
- var _useMemo4 = (0, import_react233.useMemo)(function() {
46712
+ var _useMemo5 = (0, import_react234.useMemo)(function() {
46635
46713
  var canBack = state.index > 0;
46636
46714
  var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
46637
46715
  return {
@@ -46641,7 +46719,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46641
46719
  }, [
46642
46720
  state.index,
46643
46721
  state.stack.length
46644
- ]), canGoBack = _useMemo4.canGoBack, canGoForward = _useMemo4.canGoForward;
46722
+ ]), canGoBack = _useMemo5.canGoBack, canGoForward = _useMemo5.canGoForward;
46645
46723
  return {
46646
46724
  onNavigationStateChange,
46647
46725
  hasHistory: canGoBack,
@@ -46655,17 +46733,17 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46655
46733
  var logging = useNavigationBarLogging();
46656
46734
  var openConfirm = useDialog().openConfirm;
46657
46735
  var global2 = getAppsInTossGlobals();
46658
- var addEventListener = (0, import_react232.useCallback)(function(handler) {
46736
+ var addEventListener = (0, import_react233.useCallback)(function(handler) {
46659
46737
  addWebBackEventListener(handler);
46660
46738
  }, [
46661
46739
  addWebBackEventListener
46662
46740
  ]);
46663
- var removeEventListener = (0, import_react232.useCallback)(function(handler) {
46741
+ var removeEventListener = (0, import_react233.useCallback)(function(handler) {
46664
46742
  removeWebBackEventListener(handler);
46665
46743
  }, [
46666
46744
  removeWebBackEventListener
46667
46745
  ]);
46668
- var handleWebBack = (0, import_react232.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
46746
+ var handleWebBack = (0, import_react233.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
46669
46747
  var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, handler, _webViewRef_current, isConfirmed;
46670
46748
  return __generator(this, function(_state) {
46671
46749
  switch (_state.label) {
@@ -46739,7 +46817,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46739
46817
  openConfirm,
46740
46818
  webViewRef
46741
46819
  ]);
46742
- var handleWebHome = (0, import_react232.useCallback)(function() {
46820
+ var handleWebHome = (0, import_react233.useCallback)(function() {
46743
46821
  var _webViewRef_current;
46744
46822
  logging.homeButtonClick();
46745
46823
  if (hasWebBackEvent) {
@@ -46772,7 +46850,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46772
46850
  logging,
46773
46851
  webViewRef
46774
46852
  ]);
46775
- return (0, import_react232.useMemo)(function() {
46853
+ return (0, import_react233.useMemo)(function() {
46776
46854
  return {
46777
46855
  addEventListener,
46778
46856
  removeEventListener,
@@ -47023,15 +47101,13 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47023
47101
  ]);
47024
47102
  var top = useSafeAreaTop();
47025
47103
  var bottom = useSafeAreaBottom();
47104
+ var insets = (0, react_native_safe_area_context_exports.useSafeAreaInsets)();
47026
47105
  var global2 = getAppsInTossGlobals();
47027
47106
  var navigationBarContext = useNavigationBarContext();
47028
- var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
47107
+ var safeAreaInsetsEmitter = useSafeAreaInsetsEmitter();
47029
47108
  var _useState8 = _sliced_to_array((0, import_react226.useState)(props.allowsBackForwardNavigationGestures), 2), allowsBackForwardNavigationGestures = _useState8[0], setAllowsBackForwardNavigationGestures = _useState8[1];
47030
47109
  var handler = useBridgeHandler({
47031
47110
  onMessage,
47032
- injectedJavaScript: [
47033
- disableTextSelectionCSS
47034
- ].join("\n"),
47035
47111
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
47036
47112
  eventListenerMap: _object_spread_props(_object_spread({}, event_bridges_exports), {
47037
47113
  navigationAccessoryEvent: function(param) {
@@ -47063,6 +47139,13 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47063
47139
  options
47064
47140
  });
47065
47141
  },
47142
+ safeAreaInsetsChange: function(param) {
47143
+ var onEvent = param.onEvent;
47144
+ safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
47145
+ return function() {
47146
+ safeAreaInsetsEmitter.off("safeAreaInsetsChange", onEvent);
47147
+ };
47148
+ },
47066
47149
  /** @internal */
47067
47150
  appBridgeCallbackEvent: function(param) {
47068
47151
  var onEvent = param.onEvent, onError2 = param.onError, options = param.options;
@@ -47090,6 +47173,12 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47090
47173
  },
47091
47174
  getSafeAreaBottom: function() {
47092
47175
  return bottom;
47176
+ },
47177
+ getSafeAreaLeft: function() {
47178
+ return insets.left;
47179
+ },
47180
+ getSafeAreaRight: function() {
47181
+ return insets.right;
47093
47182
  }
47094
47183
  }), Object.fromEntries(Object.entries(global2).map(function(param) {
47095
47184
  var _$_param = _sliced_to_array(param, 2), key = _$_param[0], value = _$_param[1];
@@ -47198,6 +47287,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47198
47287
  }, [
47199
47288
  webBackHandler
47200
47289
  ]);
47290
+ var globalScripts = useGlobalScripts();
47201
47291
  return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(BaseWebView, _object_spread_props(_object_spread({
47202
47292
  ref: refs
47203
47293
  }, props, headerPropForExternalWebView), {
@@ -47223,17 +47313,36 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47223
47313
  webviewDebuggingEnabled: webViewDebuggingEnabled,
47224
47314
  thirdPartyCookiesEnabled: true,
47225
47315
  onMessage: handler.onMessage,
47226
- injectedJavaScript: handler.injectedJavaScript,
47227
- injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
47316
+ injectedJavaScript: globalScripts.afterLoad,
47317
+ injectedJavaScriptBeforeContentLoaded: mergeScripts(handler.injectedJavaScript, globalScripts.beforeLoad),
47228
47318
  decelerationRate: import_react_native221.Platform.OS === "ios" ? 1 : void 0,
47229
47319
  allowsBackForwardNavigationGestures
47230
47320
  }));
47231
47321
  }
47232
- var import_react_native199, import_react208, import_react209, import_react210, import_react211, import_jsx_runtime217, import_react212, import_jsx_runtime218, import_react213, import_react214, import_react_native205, import_react215, import_react_native207, import_react216, import_react_native209, import_react217, import_react218, import_react219, import_react220, import_jsx_runtime219, import_jsx_runtime220, import_react221, import_react_native212, import_react222, import_react223, import_react224, import_react_native217, import_jsx_runtime221, import_jsx_runtime222, import_react225, import_jsx_runtime223, import_jsx_runtime224, import_react_native219, import_jsx_runtime225, import_jsx_runtime226, import_jsx_runtime227, import_react226, import_react_native221, import_react227, import_react_native222, import_react228, import_react_native224, import_jsx_runtime228, import_jsx_runtime229, import_react229, import_react230, import_jsx_runtime230, import_jsx_runtime231, import_react231, import_react232, import_react233, import_react_native227, import_react234, import_react235, import_jsx_runtime232, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __copyProps2, __reExport2, env, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, UPDATE_SCHEME, NavigationBarContext, GAME_PROFILE_WEBVIEW_URL, GAME_MIN_VERSION, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, UPDATE_DIALOG_SCHEMA_ID, UPDATE_DIALOG_LOG_NAME, UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID, UPDATE_DIALOG_CTA_CLICK_LOG_NAME, DEFAULT_ERROR, useErrorAlert, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useTransparentWebview, useGameProfileToast, useGameCenterProfile, Z_INDEX, GameInitializer, overlayStyle, NAVI_BAR_IMPRESSION_SCHEMA_ID, NAVI_BAR_IMPRESSION_LOG_NAME, CLOSE_POPUP_SHOW_SCHEMA_ID, CLOSE_POPUP_SHOW_LOG_NAME, CLOSE_BUTTON_CLICK_SCHEMA_ID, CLOSE_BUTTON_CLICK_LOG_NAME, CLOSE_POPUP_CTA_CLICK_SCHEMA_ID, CLOSE_POPUP_CTA_CLICK_LOG_NAME, HOME_BUTTON_CLICK_SCHEMA_ID, HOME_BUTTON_CLICK_LOG_NAME, BOTTOM_SHEET_SCHEMA_ID, BOTTOM_SHEET_LOG_NAME, BOTTOM_SHEET_OPEN_SCHEMA_ID, BOTTOM_SHEET_OPEN_LOG_NAME, BOTTOM_SHEET_CLOSE_CLICK_SCHEMA_ID, BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME, BOTTOM_SHEET_MENU_CLICK_SCHEMA_ID, BOTTOM_SHEET_MENU_CLICK_LOG_NAME, SHARE_SCHEME_REFERRER, APP_SHARE_MENU_INFO, APP_BRIDGE_METHOD_NAME, MIN_VERSION, RNNavigationBar, bridge_entry_exports, AppsInToss, GameWebView, PartnerWebView, globalEventListenerMap, INITIAL_STATE, HISTORY_BACK_SCRIPT, HISTORY_HOME_SCRIPT, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer3, trackScreen, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
47322
+ function useGlobalScripts() {
47323
+ var global2 = getAppsInTossGlobals();
47324
+ var disableTextSelectionCSS = "\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n ";
47325
+ var applyGameResourcesCache = "\n (function () {\n if (typeof caches === 'undefined') {\n return;\n }\n const cacheKeyPrefix = '@apps-in-toss/caches/';\n const cacheKey = `${cacheKeyPrefix}".concat(global2.deploymentId, "`;\n window.addEventListener('load', async () => {\n const keys = await caches.keys();\n for (const key of keys) {\n if (key.startsWith(cacheKeyPrefix) && key !== cacheKey) {\n await caches.delete(key);\n }\n }\n });\n window.fetch = new Proxy(window.fetch, {\n async apply(originalFetch, thisArg, args) {\n const request = new Request(args[0], args[1]);\n if (!/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/.test(request.url)) {\n return await originalFetch.call(thisArg, request);\n }\n const cache = await caches.open(cacheKey);\n const cached = await cache.match(request);\n if (cached) {\n const eTag = cached.headers.get('ETag');\n const lastModified = cached.headers.get('Last-Modified');\n if (eTag) {\n request.headers.set('If-None-Match', eTag);\n }\n if (lastModified) {\n request.headers.set('If-Modified-Since', lastModified);\n }\n const revalidated = await originalFetch.call(thisArg, request);\n if (revalidated.status === 304) {\n return cached;\n }\n cache.put(request, revalidated.clone());\n return revalidated;\n }\n const response = await originalFetch.call(thisArg, request);\n cache.put(request, response.clone());\n return response;\n },\n });\n })();\n ");
47326
+ return {
47327
+ beforeLoad: mergeScripts(global2.webViewType === "game" && applyGameResourcesCache),
47328
+ afterLoad: mergeScripts(disableTextSelectionCSS)
47329
+ };
47330
+ }
47331
+ function mergeScripts() {
47332
+ for (var _len = arguments.length, scripts = new Array(_len), _key = 0; _key < _len; _key++) {
47333
+ scripts[_key] = arguments[_key];
47334
+ }
47335
+ return scripts.filter(function(script) {
47336
+ return typeof script === "string";
47337
+ }).join("\n");
47338
+ }
47339
+ var import_react_native199, import_react208, import_react209, import_react210, import_react211, import_jsx_runtime217, import_react212, import_jsx_runtime218, import_react213, import_react214, import_react_native205, import_react215, import_react_native207, import_react216, import_react_native209, import_react217, import_react218, import_react219, import_react220, import_jsx_runtime219, import_jsx_runtime220, import_react221, import_react_native212, import_react222, import_react223, import_react224, import_react_native217, import_jsx_runtime221, import_jsx_runtime222, import_react225, import_jsx_runtime223, import_jsx_runtime224, import_react_native219, import_jsx_runtime225, import_jsx_runtime226, import_jsx_runtime227, import_react226, import_react_native221, import_react227, import_react_native222, import_react228, import_react_native224, import_jsx_runtime228, import_jsx_runtime229, import_react229, import_react230, import_jsx_runtime230, import_jsx_runtime231, import_react231, import_react232, import_react233, import_react234, import_react_native227, import_react235, import_react236, import_jsx_runtime232, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __copyProps2, __reExport2, env, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, UPDATE_SCHEME, NavigationBarContext, GAME_PROFILE_WEBVIEW_URL, GAME_MIN_VERSION, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, UPDATE_DIALOG_SCHEMA_ID, UPDATE_DIALOG_LOG_NAME, UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID, UPDATE_DIALOG_CTA_CLICK_LOG_NAME, DEFAULT_ERROR, useErrorAlert, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useTransparentWebview, useGameProfileToast, useGameCenterProfile, Z_INDEX, GameInitializer, overlayStyle, NAVI_BAR_IMPRESSION_SCHEMA_ID, NAVI_BAR_IMPRESSION_LOG_NAME, CLOSE_POPUP_SHOW_SCHEMA_ID, CLOSE_POPUP_SHOW_LOG_NAME, CLOSE_BUTTON_CLICK_SCHEMA_ID, CLOSE_BUTTON_CLICK_LOG_NAME, CLOSE_POPUP_CTA_CLICK_SCHEMA_ID, CLOSE_POPUP_CTA_CLICK_LOG_NAME, HOME_BUTTON_CLICK_SCHEMA_ID, HOME_BUTTON_CLICK_LOG_NAME, BOTTOM_SHEET_SCHEMA_ID, BOTTOM_SHEET_LOG_NAME, BOTTOM_SHEET_OPEN_SCHEMA_ID, BOTTOM_SHEET_OPEN_LOG_NAME, BOTTOM_SHEET_CLOSE_CLICK_SCHEMA_ID, BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME, BOTTOM_SHEET_MENU_CLICK_SCHEMA_ID, BOTTOM_SHEET_MENU_CLICK_LOG_NAME, SHARE_SCHEME_REFERRER, APP_SHARE_MENU_INFO, APP_BRIDGE_METHOD_NAME, MIN_VERSION, RNNavigationBar, bridge_entry_exports, AppsInToss, GameWebView, PartnerWebView, globalEventListenerMap, EventEmitter, INITIAL_STATE, HISTORY_BACK_SCRIPT, HISTORY_HOME_SCRIPT, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer3, trackScreen, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
47233
47340
  var init_dist8 = __esm({
47234
47341
  "../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js"() {
47235
47342
  "use strict";
47236
47343
  init_async_to_generator();
47344
+ init_class_call_check();
47345
+ init_create_class();
47237
47346
  init_extends();
47238
47347
  init_instanceof();
47239
47348
  init_object_destructuring_empty();
@@ -47335,6 +47444,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47335
47444
  init_async_bridges();
47336
47445
  init_constant_bridges2();
47337
47446
  init_event_bridges();
47447
+ init_react_native_safe_area_context();
47338
47448
  init_src3();
47339
47449
  init_esm8();
47340
47450
  init_private2();
@@ -47363,16 +47473,18 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47363
47473
  import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
47364
47474
  import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
47365
47475
  import_react231 = __toESM(require_react(), 1);
47476
+ init_react_native_safe_area_context();
47477
+ import_react232 = __toESM(require_react(), 1);
47366
47478
  init_src3();
47367
47479
  init_esm8();
47368
47480
  init_dist7();
47369
- import_react232 = __toESM(require_react(), 1);
47370
47481
  import_react233 = __toESM(require_react(), 1);
47482
+ import_react234 = __toESM(require_react(), 1);
47371
47483
  init_dist6();
47372
47484
  import_react_native227 = __toESM(require_react_native(), 1);
47373
47485
  init_dist6();
47374
- import_react234 = __toESM(require_react(), 1);
47375
47486
  import_react235 = __toESM(require_react(), 1);
47487
+ import_react236 = __toESM(require_react(), 1);
47376
47488
  init_dist6();
47377
47489
  init_src3();
47378
47490
  import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
@@ -47971,6 +48083,50 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47971
48083
  });
47972
48084
  });
47973
48085
  globalEventListenerMap = /* @__PURE__ */ new Map();
48086
+ EventEmitter = /* @__PURE__ */ function() {
48087
+ "use strict";
48088
+ function EventEmitter2() {
48089
+ _class_call_check(this, EventEmitter2);
48090
+ this.listeners = {};
48091
+ }
48092
+ _create_class(EventEmitter2, [
48093
+ {
48094
+ key: "on",
48095
+ value: function on3(event, listener) {
48096
+ if (!this.listeners[event]) {
48097
+ this.listeners[event] = [];
48098
+ }
48099
+ this.listeners[event].push(listener);
48100
+ }
48101
+ },
48102
+ {
48103
+ key: "emit",
48104
+ value: function emit(event) {
48105
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
48106
+ args[_key - 1] = arguments[_key];
48107
+ }
48108
+ if (!this.listeners[event]) {
48109
+ return;
48110
+ }
48111
+ this.listeners[event].forEach(function(listener) {
48112
+ return listener.apply(void 0, _to_consumable_array(args));
48113
+ });
48114
+ }
48115
+ },
48116
+ {
48117
+ key: "off",
48118
+ value: function off(event, listener) {
48119
+ if (!this.listeners[event]) {
48120
+ return;
48121
+ }
48122
+ this.listeners[event] = this.listeners[event].filter(function(l48) {
48123
+ return l48 !== listener;
48124
+ });
48125
+ }
48126
+ }
48127
+ ]);
48128
+ return EventEmitter2;
48129
+ }();
47974
48130
  INITIAL_STATE = {
47975
48131
  stack: [],
47976
48132
  index: -1