@orbit-software/sdk 1.93.1 → 1.93.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export declare const BASE_URL: string;
package/dist/esm/sdk.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { AdsgramController, AdsgramInitOptions, CryptoSteamSDK as CryptoSteamSDKType, OrbitAdsResponse, TMANetworkInterstitialResponse } from './types/sdk';
2
- export declare const BASE_URL: string;
3
2
  export declare const makeRequest: <T>(path: string, method: "POST" | "GET" | "PUT" | "DELETE", body?: unknown) => Promise<T>;
4
3
  export declare function startGameTimeTrack(): void;
5
4
  declare global {
package/dist/esm/sdk.mjs CHANGED
@@ -16,7 +16,7 @@ import * as React from "react";
16
16
  import React__default, { createContext, useContext, useState, useRef, useEffect, useCallback, useLayoutEffect, useMemo, forwardRef, isValidElement, useId as useId$1, useInsertionEffect, Children, Fragment, createElement, Component, version as version$1, memo as memo$1, Suspense } from "react";
17
17
  import * as ReactDOM from "react-dom";
18
18
  import ReactDOM__default, { createPortal } from "react-dom";
19
- const version = "1.93.1";
19
+ const version = "1.93.2";
20
20
  function getDefaultExportFromCjs$3(e) {
21
21
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
22
22
  }
@@ -11851,8 +11851,8 @@ function useAnimate() {
11851
11851
  e.animations.forEach((i) => i.stop()), e.animations.length = 0;
11852
11852
  }), [e, t];
11853
11853
  }
11854
- var define_process_env_default$6 = { NODE_ENV: "production", version: "1.93.1", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
11855
- const ASSETS_BASE_URL = define_process_env_default$6.ASSETS_BASE_URL;
11854
+ var define_process_env_default$7 = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
11855
+ const ASSETS_BASE_URL = define_process_env_default$7.ASSETS_BASE_URL;
11856
11856
  function assetUrl(e) {
11857
11857
  return `${ASSETS_BASE_URL}/${e}`;
11858
11858
  }
@@ -19474,7 +19474,7 @@ var Ot, jr, Removable = (jr = class {
19474
19474
  clearGcTimeout() {
19475
19475
  U(this, Ot) && (timeoutManager.clearTimeout(U(this, Ot)), ge(this, Ot, void 0));
19476
19476
  }
19477
- }, Ot = new WeakMap(), jr), define_process_env_default$5 = { NODE_ENV: "production", version: "1.93.1", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" }, kt, Gt, st, Lt, Xe, er, Dt, ot, dt, Br, Query = (Br = class extends Removable {
19477
+ }, Ot = new WeakMap(), jr), define_process_env_default$6 = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" }, kt, Gt, st, Lt, Xe, er, Dt, ot, dt, Br, Query = (Br = class extends Removable {
19478
19478
  constructor(t) {
19479
19479
  super();
19480
19480
  we(this, ot);
@@ -19643,7 +19643,7 @@ var Ot, jr, Removable = (jr = class {
19643
19643
  try {
19644
19644
  const w = await U(this, Xe).start();
19645
19645
  if (w === void 0)
19646
- throw define_process_env_default$5.NODE_ENV, new Error(`${this.queryHash} data is undefined`);
19646
+ throw define_process_env_default$6.NODE_ENV, new Error(`${this.queryHash} data is undefined`);
19647
19647
  return this.setData(w), (m = (p = U(this, st).config).onSuccess) == null || m.call(p, w, this), (v = (g = U(this, st).config).onSettled) == null || v.call(
19648
19648
  g,
19649
19649
  w,
@@ -35208,7 +35208,7 @@ function getAnalytics(e) {
35208
35208
  const s = resolveConfig(e), o = createInstance(s);
35209
35209
  return t[KEY] = { instance: o, config: s }, o;
35210
35210
  }
35211
- var define_process_env_default$4 = { NODE_ENV: "production", version: "1.93.1", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" }, win;
35211
+ var define_process_env_default$5 = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" }, win;
35212
35212
  if (typeof window > "u") {
35213
35213
  var loc = {
35214
35214
  hostname: ""
@@ -38283,7 +38283,7 @@ var postcss$2$1 = {}, LazyResult$2$1 = /* @__PURE__ */ function() {
38283
38283
  s.plugin = a.postcssPlugin, s.setMessage();
38284
38284
  else if (a.postcssVersion) {
38285
38285
  var l, c, u, f, d;
38286
- define_process_env_default$4.NODE_ENV;
38286
+ define_process_env_default$5.NODE_ENV;
38287
38287
  }
38288
38288
  } catch (h) {
38289
38289
  console && console.error && console.error(h);
@@ -38830,7 +38830,7 @@ postcss$3.plugin = function e(t, i) {
38830
38830
  for (var l = arguments.length, c = new Array(l), u = 0; u < l; u++)
38831
38831
  c[u] = arguments[u];
38832
38832
  console && console.warn && !s && (s = !0, console.warn(t + `: postcss.plugin was deprecated. Migration guide:
38833
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`), define_process_env_default$4.LANG && define_process_env_default$4.LANG.startsWith("cn") && console.warn(t + `: 里面 postcss.plugin 被弃用. 迁移指南:
38833
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`), define_process_env_default$5.LANG && define_process_env_default$5.LANG.startsWith("cn") && console.warn(t + `: 里面 postcss.plugin 被弃用. 迁移指南:
38834
38834
  https://www.w3ctech.com/topic/2226`));
38835
38835
  var f = i.apply(void 0, [].concat(c));
38836
38836
  return f.postcssPlugin = t, f.postcssVersion = new Processor2$1().version, f;
@@ -40823,7 +40823,7 @@ var postcss$2 = {}, LazyResult$2 = /* @__PURE__ */ function() {
40823
40823
  s.plugin = a.postcssPlugin, s.setMessage();
40824
40824
  else if (a.postcssVersion) {
40825
40825
  var l, c, u, f, d;
40826
- define_process_env_default$4.NODE_ENV;
40826
+ define_process_env_default$5.NODE_ENV;
40827
40827
  }
40828
40828
  } catch (h) {
40829
40829
  console && console.error && console.error(h);
@@ -41370,7 +41370,7 @@ postcss.plugin = function e(t, i) {
41370
41370
  for (var l = arguments.length, c = new Array(l), u = 0; u < l; u++)
41371
41371
  c[u] = arguments[u];
41372
41372
  console && console.warn && !s && (s = !0, console.warn(t + `: postcss.plugin was deprecated. Migration guide:
41373
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`), define_process_env_default$4.LANG && define_process_env_default$4.LANG.startsWith("cn") && console.warn(t + `: 里面 postcss.plugin 被弃用. 迁移指南:
41373
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`), define_process_env_default$5.LANG && define_process_env_default$5.LANG.startsWith("cn") && console.warn(t + `: 里面 postcss.plugin 被弃用. 迁移指南:
41374
41374
  https://www.w3ctech.com/topic/2226`));
41375
41375
  var f = i.apply(void 0, [].concat(c));
41376
41376
  return f.postcssPlugin = t, f.postcssVersion = new Processor22().version, f;
@@ -47779,8 +47779,10 @@ function init_as_module(e) {
47779
47779
  function loadNoop(e, t) {
47780
47780
  t();
47781
47781
  }
47782
- var mixpanel = init_as_module(loadNoop), define_process_env_default$3 = { NODE_ENV: "production", version: "1.93.1", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
47783
- const MIXPANEL_TOKEN = "b0d7c97039e244366388b9a210c0b15a", BASE_URL$1 = define_process_env_default$3.BASE_URL, ANALYTICS_ENDPOINT = `${BASE_URL$1.replace(/\/sdk\/?$/, "")}/api/analytics/events`;
47782
+ var mixpanel = init_as_module(loadNoop), define_process_env_default$4 = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
47783
+ const BASE_URL = define_process_env_default$4.BASE_URL;
47784
+ var define_process_env_default$3 = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
47785
+ const MIXPANEL_TOKEN = "b0d7c97039e244366388b9a210c0b15a", ANALYTICS_ENDPOINT = `${BASE_URL}/analytics/events`;
47784
47786
  function getBaseAnalyticsParams() {
47785
47787
  return {
47786
47788
  game_id: window.game_id,
@@ -50612,7 +50614,7 @@ const balance$4 = "Balance", topUp$4 = "Top Up", ads$4 = "Ads", adsOn$4 = "On",
50612
50614
  topUpModal,
50613
50615
  inventoryModal
50614
50616
  };
50615
- var define_process_env_default$2 = { NODE_ENV: "production", version: "1.93.1", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
50617
+ var define_process_env_default$2 = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
50616
50618
  const resources = {
50617
50619
  en: {
50618
50620
  translation: en
@@ -51364,7 +51366,7 @@ async function showMonetagAd(e, t, i) {
51364
51366
  });
51365
51367
  });
51366
51368
  }
51367
- var define_process_env_default$1 = { NODE_ENV: "production", version: "1.93.1", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
51369
+ var define_process_env_default$1 = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" };
51368
51370
  const log$1 = createAdLogger("Orbit");
51369
51371
  async function initOrbitAds() {
51370
51372
  log$1.group("Initialization"), log$1.time("init"), log$1.info("Loading script...");
@@ -51748,7 +51750,7 @@ function createIframeSdk() {
51748
51750
  }
51749
51751
  });
51750
51752
  }
51751
- var define_process_env_default = { NODE_ENV: "production", version: "1.93.1", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" }, qr, Kr;
51753
+ var define_process_env_default = { NODE_ENV: "production", version: "1.93.2", BASE_URL: "https://app.portalapp.games/sdk", ADS_SCRIPT_URL: "https://ads-sdk.portalapp.games/script.js", ASSETS_BASE_URL: "https://sdk.portalapp.games/assets" }, qr, Kr;
51752
51754
  const _isThirdPartyIframe = window.parent !== window && !((Kr = (qr = window.Telegram) == null ? void 0 : qr.WebApp) != null && Kr.initData);
51753
51755
  _isThirdPartyIframe || (ensureViewportMetaTag(), initSentry());
51754
51756
  const adLog = createAdLogger("SDK");
@@ -51765,7 +51767,7 @@ const CloudStorageGetItem = (e) => new Promise((t, i) => {
51765
51767
  getTelegramWebApp().CloudStorage.removeItem(e, (s, o) => {
51766
51768
  s ? i(new Error(s)) : t(o ?? null);
51767
51769
  });
51768
- }), BASE_URL = define_process_env_default.BASE_URL, G_MEASUREMENT_ID = "G-4RMXVE2K75", BANNER_HEIGHT = 60, bannerManager = new BannerManager({
51770
+ }), G_MEASUREMENT_ID = "G-4RMXVE2K75", BANNER_HEIGHT = 60, bannerManager = new BannerManager({
51769
51771
  height: BANNER_HEIGHT
51770
51772
  });
51771
51773
  let timer = null;
@@ -52402,7 +52404,6 @@ const PortalEmuSDK = {
52402
52404
  };
52403
52405
  globalObj.PortalEmuSDK = PortalEmuSDK;
52404
52406
  export {
52405
- BASE_URL,
52406
52407
  resolvedSDK as PortalSDK,
52407
52408
  resolvedSDK as default,
52408
52409
  makeRequest,