promogame-player 1.0.26 → 1.0.28

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
+ .w-full{width:100%}.h-full{height:100%}.items-center{align-items:center}.justify-center{justify-content:center}.text-center{text-align:center}.flex{display:flex}.hidden{display:none}.absolute{position:absolute}.inset-0{top:0;right:0;bottom:0;left:0}.z-10{z-index:10}
@@ -1,6 +1,6 @@
1
1
  import { jsx as di } from "react/jsx-runtime";
2
2
  import hi, { useEffect as Lr } from "react";
3
- var Dn = {}, hn = { exports: {} }, vi = hn.exports, Fr;
3
+ import '../../assets/default-loading.css';var Dn = {}, hn = { exports: {} }, vi = hn.exports, Fr;
4
4
  function pi() {
5
5
  return Fr || (Fr = 1, function(Ie, x) {
6
6
  (function(Ct, Le) {
@@ -6054,7 +6054,7 @@ function wi({
6054
6054
  q(X);
6055
6055
  }, [x, q]), Lr(() => {
6056
6056
  te && te(!!Ne);
6057
- }, [Ne, te]), /* @__PURE__ */ di(pe, { className: "h-full w-full flex items-center justify-center" });
6057
+ }, [Ne, te]), /* @__PURE__ */ di(pe, { className: "flex h-full w-full items-center justify-center" });
6058
6058
  }
6059
6059
  export {
6060
6060
  wi as default
@@ -3,6 +3,7 @@ import * as Qr from "react";
3
3
  import la, { useMemo as Vr, useEffect as Lr } from "react";
4
4
  import { graphql as hr } from "../../gql/gql.js";
5
5
  import { UnityGame as ha } from "./unity-game.js";
6
+ import "./default-loading.js";
6
7
  function da(t, e) {
7
8
  for (var r = 0; r < e.length; r++) {
8
9
  const n = e[r];
@@ -1675,7 +1676,7 @@ Array[Mt] || function(t) {
1675
1676
  } finally {
1676
1677
  return t;
1677
1678
  }
1678
- }(So()), { bind: Qu, noContext: Vu } = ut, Dt = new ut(), { hasOwnProperty: Do } = Object.prototype, Er = Array.from || function(t) {
1679
+ }(So()), { bind: Vu, noContext: Lu } = ut, Dt = new ut(), { hasOwnProperty: Do } = Object.prototype, Er = Array.from || function(t) {
1679
1680
  const e = [];
1680
1681
  return t.forEach((r) => e.push(r)), e;
1681
1682
  };
@@ -7340,7 +7341,7 @@ mutation UpdateParticipantInfo($email: String, $phone: String, $avatar: String,
7340
7341
  id
7341
7342
  }
7342
7343
  }
7343
- `), Lu = Qr.forwardRef(
7344
+ `), zu = Qr.forwardRef(
7344
7345
  ({
7345
7346
  className: t,
7346
7347
  campaignId: e,
@@ -7456,5 +7457,5 @@ mutation UpdateParticipantInfo($email: String, $phone: String, $avatar: String,
7456
7457
  }
7457
7458
  );
7458
7459
  export {
7459
- Lu as PromogamePlayer
7460
+ zu as PromogamePlayer
7460
7461
  };
@@ -1,14 +1,14 @@
1
- import { jsxs as Y, Fragment as Z, jsx as O } from "react/jsx-runtime";
2
- import * as ee from "react";
3
- import x, { useRef as G, useCallback as te, useImperativeHandle as re, useEffect as N, useState as D, useMemo as ne } from "react";
4
- import ae from "../../hooks/use-broadcast-channel.js";
5
- import { cn as ie } from "../../utils.js";
6
- import ue from "./default-loading.js";
7
- var $ = {}, C = {}, q = {}, W;
8
- function oe() {
9
- if (W) return q;
10
- W = 1, Object.defineProperty(q, "__esModule", { value: !0 }), q.useCanvasIdentifier = void 0;
11
- var u = x, v = 0, f = "react-unity-webgl-canvas", s = function(y) {
1
+ import { jsxs as Y, jsx as N } from "react/jsx-runtime";
2
+ import * as Z from "react";
3
+ import x, { useRef as G, useCallback as ee, useImperativeHandle as te, useEffect as O, useState as D, useMemo as re } from "react";
4
+ import ne from "../../hooks/use-broadcast-channel.js";
5
+ import { cn as ae } from "../../utils.js";
6
+ import ie from "./default-loading.js";
7
+ var $ = {}, C = {}, q = {}, z;
8
+ function ue() {
9
+ if (z) return q;
10
+ z = 1, Object.defineProperty(q, "__esModule", { value: !0 }), q.useCanvasIdentifier = void 0;
11
+ var u = x, v = 0, f = "react-unity-webgl-canvas", o = function(y) {
12
12
  var i = (0, u.useState)(0), e = i[0], n = i[1], t = (0, u.useCallback)(function() {
13
13
  n(function(l) {
14
14
  return l + 1;
@@ -16,51 +16,51 @@ function oe() {
16
16
  }, []);
17
17
  if (y !== void 0)
18
18
  return [y, t];
19
- var o = (0, u.useMemo)(function() {
19
+ var s = (0, u.useMemo)(function() {
20
20
  return [f, v].join("-");
21
21
  }, [e]);
22
- return [o, t];
22
+ return [s, t];
23
23
  };
24
- return q.useCanvasIdentifier = s, q;
24
+ return q.useCanvasIdentifier = o, q;
25
25
  }
26
- var R = {}, j = {}, z;
26
+ var R = {}, j = {}, W;
27
27
  function K() {
28
- return z || (z = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.isBrowserEnvironment = void 0, j.isBrowserEnvironment = typeof window < "u" && typeof document < "u"), j;
28
+ return W || (W = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.isBrowserEnvironment = void 0, j.isBrowserEnvironment = typeof window < "u" && typeof document < "u"), j;
29
29
  }
30
- var F;
30
+ var V;
31
31
  function se() {
32
- if (F) return R;
33
- F = 1, Object.defineProperty(R, "__esModule", { value: !0 }), R.useUnityLoader = void 0;
34
- var u = x, v = K(), f = function(s) {
32
+ if (V) return R;
33
+ V = 1, Object.defineProperty(R, "__esModule", { value: !0 }), R.useUnityLoader = void 0;
34
+ var u = x, v = K(), f = function(o) {
35
35
  var y = (0, u.useState)("Loading"), i = y[0], e = y[1];
36
36
  return (0, u.useEffect)(function() {
37
37
  if (v.isBrowserEnvironment !== !1) {
38
- if (s === null) {
38
+ if (o === null) {
39
39
  e("Idle");
40
40
  return;
41
41
  }
42
- var n = window.document.querySelector('script[src="'.concat(s, '"]'));
43
- n === null ? (n = window.document.createElement("script"), n.type = "text/javascript", n.src = s, n.async = !0, n.setAttribute("data-status", "loading"), window.document.body.appendChild(n), n.addEventListener("load", function() {
42
+ var n = window.document.querySelector('script[src="'.concat(o, '"]'));
43
+ n === null ? (n = window.document.createElement("script"), n.type = "text/javascript", n.src = o, n.async = !0, n.setAttribute("data-status", "loading"), window.document.body.appendChild(n), n.addEventListener("load", function() {
44
44
  return n == null ? void 0 : n.setAttribute("data-status", "loaded");
45
45
  }), n.addEventListener("error", function() {
46
46
  return n == null ? void 0 : n.setAttribute("data-status", "error");
47
47
  })) : e(n.getAttribute("data-status") === "loaded" ? "Loaded" : "Error");
48
- var t = function(o) {
49
- return e(o.type === "load" ? "Loaded" : "Error");
48
+ var t = function(s) {
49
+ return e(s.type === "load" ? "Loaded" : "Error");
50
50
  };
51
51
  return n.addEventListener("load", t), n.addEventListener("error", t), function() {
52
52
  n !== null && (n.removeEventListener("load", t), n.removeEventListener("error", t), n.remove());
53
53
  };
54
54
  }
55
- }, [s]), i;
55
+ }, [o]), i;
56
56
  };
57
57
  return R.useUnityLoader = f, R;
58
58
  }
59
- var V;
60
- function le() {
61
- if (V) return C;
62
- V = 1;
63
- var u = C && C.__awaiter || function(e, n, t, o) {
59
+ var p;
60
+ function oe() {
61
+ if (p) return C;
62
+ p = 1;
63
+ var u = C && C.__awaiter || function(e, n, t, s) {
64
64
  function l(r) {
65
65
  return r instanceof t ? r : new t(function(d) {
66
66
  d(r);
@@ -69,14 +69,14 @@ function le() {
69
69
  return new (t || (t = Promise))(function(r, d) {
70
70
  function m(U) {
71
71
  try {
72
- a(o.next(U));
72
+ a(s.next(U));
73
73
  } catch (h) {
74
74
  d(h);
75
75
  }
76
76
  }
77
77
  function w(U) {
78
78
  try {
79
- a(o.throw(U));
79
+ a(s.throw(U));
80
80
  } catch (h) {
81
81
  d(h);
82
82
  }
@@ -84,13 +84,13 @@ function le() {
84
84
  function a(U) {
85
85
  U.done ? r(U.value) : l(U.value).then(m, w);
86
86
  }
87
- a((o = o.apply(e, n || [])).next());
87
+ a((s = s.apply(e, n || [])).next());
88
88
  });
89
89
  }, v = C && C.__generator || function(e, n) {
90
90
  var t = { label: 0, sent: function() {
91
91
  if (r[0] & 1) throw r[1];
92
92
  return r[1];
93
- }, trys: [], ops: [] }, o, l, r, d = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
93
+ }, trys: [], ops: [] }, s, l, r, d = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
94
94
  return d.next = m(0), d.throw = m(1), d.return = m(2), typeof Symbol == "function" && (d[Symbol.iterator] = function() {
95
95
  return this;
96
96
  }), d;
@@ -100,9 +100,9 @@ function le() {
100
100
  };
101
101
  }
102
102
  function w(a) {
103
- if (o) throw new TypeError("Generator is already executing.");
103
+ if (s) throw new TypeError("Generator is already executing.");
104
104
  for (; d && (d = 0, a[0] && (t = 0)), t; ) try {
105
- if (o = 1, l && (r = a[0] & 2 ? l.return : a[0] ? l.throw || ((r = l.return) && r.call(l), 0) : l.next) && !(r = r.call(l, a[1])).done) return r;
105
+ if (s = 1, l && (r = a[0] & 2 ? l.return : a[0] ? l.throw || ((r = l.return) && r.call(l), 0) : l.next) && !(r = r.call(l, a[1])).done) return r;
106
106
  switch (l = 0, r && (a = [a[0] & 2, r.value]), a[0]) {
107
107
  case 0:
108
108
  case 1:
@@ -140,21 +140,21 @@ function le() {
140
140
  } catch (U) {
141
141
  a = [6, U], l = 0;
142
142
  } finally {
143
- o = r = 0;
143
+ s = r = 0;
144
144
  }
145
145
  if (a[0] & 5) throw a[1];
146
146
  return { value: a[0] ? a[1] : void 0, done: !0 };
147
147
  }
148
148
  };
149
149
  Object.defineProperty(C, "__esModule", { value: !0 }), C.Unity = void 0;
150
- var f = x, s = oe(), y = se(), i = (0, f.forwardRef)(
150
+ var f = x, o = ue(), y = se(), i = (0, f.forwardRef)(
151
151
  /**
152
152
  * @param unityProps The Unity props provided the the Unity component.
153
153
  * @param forwardedRef The forwarded ref to the Unity component.
154
154
  * @returns The Unity canvas renderer.
155
155
  */
156
156
  function(e, n) {
157
- var t = (0, f.useState)(null), o = t[0], l = t[1], r = (0, f.useState)(null), d = r[0], m = r[1], w = (0, s.useCanvasIdentifier)(e.id), a = w[0], U = w[1], h = (0, y.useUnityLoader)(e.unityProvider.loaderUrl), S = (0, f.useCallback)(function(I) {
157
+ var t = (0, f.useState)(null), s = t[0], l = t[1], r = (0, f.useState)(null), d = r[0], m = r[1], w = (0, o.useCanvasIdentifier)(e.id), a = w[0], U = w[1], h = (0, y.useUnityLoader)(e.unityProvider.loaderUrl), S = (0, f.useCallback)(function(I) {
158
158
  e.unityProvider.setLoadingProgression(I), I === 1 && e.unityProvider.setIsLoaded(!0);
159
159
  }, [e.unityProvider]);
160
160
  return (0, f.useEffect)(function() {
@@ -164,7 +164,7 @@ function le() {
164
164
  return v(this, function(_) {
165
165
  switch (_.label) {
166
166
  case 0:
167
- if (!o || d || h !== "Loaded")
167
+ if (!s || d || h !== "Loaded")
168
168
  return [
169
169
  2
170
170
  /*return*/
@@ -190,7 +190,7 @@ function le() {
190
190
  (b[L] === null || b[L] === void 0) && delete b[L];
191
191
  }), _.label = 1;
192
192
  case 1:
193
- return _.trys.push([1, 3, , 4]), [4, window.createUnityInstance(o, b, S)];
193
+ return _.trys.push([1, 3, , 4]), [4, window.createUnityInstance(s, b, S)];
194
194
  case 2:
195
195
  return E = _.sent(), m(E), e.unityProvider.setUnityInstance(E), [3, 4];
196
196
  case 3:
@@ -209,10 +209,10 @@ function le() {
209
209
  return v(this, function(c) {
210
210
  switch (c.label) {
211
211
  case 0:
212
- return !d || !o ? [
212
+ return !d || !s ? [
213
213
  2
214
214
  /*return*/
215
- ] : (console.log("React Unity WebGL: Detaching Unity instance..."), e.unityProvider.setUnityInstance(null), m(null), e.unityProvider.setLoadingProgression(0), (P = (E = e.unityProvider).setIsLoaded) === null || P === void 0 || P.call(E, !1), e.unityProvider.setInitialisationError(void 0), b = document.createElement("canvas"), b.id = o.id, b.setAttribute("react-unity-webgl-role", "cleanup"), b.style.display = "none", document.body.appendChild(b), d.Module.canvas = b, m(null), [4, d.Quit()]);
215
+ ] : (console.log("React Unity WebGL: Detaching Unity instance..."), e.unityProvider.setUnityInstance(null), m(null), e.unityProvider.setLoadingProgression(0), (P = (E = e.unityProvider).setIsLoaded) === null || P === void 0 || P.call(E, !1), e.unityProvider.setInitialisationError(void 0), b = document.createElement("canvas"), b.id = s.id, b.setAttribute("react-unity-webgl-role", "cleanup"), b.style.display = "none", document.body.appendChild(b), d.Module.canvas = b, m(null), [4, d.Quit()]);
216
216
  case 1:
217
217
  return c.sent(), document.body.removeChild(b), [
218
218
  2
@@ -225,8 +225,8 @@ function le() {
225
225
  return I(), function() {
226
226
  M();
227
227
  };
228
- }, [o, d, h, e.unityProvider]), (0, f.useImperativeHandle)(n, function() {
229
- return o;
228
+ }, [s, d, h, e.unityProvider]), (0, f.useImperativeHandle)(n, function() {
229
+ return s;
230
230
  }), (0, f.createElement)("canvas", {
231
231
  ref: l,
232
232
  id: a,
@@ -238,23 +238,23 @@ function le() {
238
238
  );
239
239
  return C.Unity = i, C;
240
240
  }
241
- var A = {}, k = {}, p;
242
- function de() {
243
- if (p) return k;
244
- p = 1;
241
+ var A = {}, k = {}, F;
242
+ function le() {
243
+ if (F) return k;
244
+ F = 1;
245
245
  var u = k && k.__spreadArray || function(e, n, t) {
246
- if (t || arguments.length === 2) for (var o = 0, l = n.length, r; o < l; o++)
247
- (r || !(o in n)) && (r || (r = Array.prototype.slice.call(n, 0, o)), r[o] = n[o]);
246
+ if (t || arguments.length === 2) for (var s = 0, l = n.length, r; s < l; s++)
247
+ (r || !(s in n)) && (r || (r = Array.prototype.slice.call(n, 0, s)), r[s] = n[s]);
248
248
  return e.concat(r || Array.prototype.slice.call(n));
249
249
  };
250
250
  Object.defineProperty(k, "__esModule", { value: !0 }), k.useEventSystem = void 0;
251
- var v = x, f = K(), s = [], y = function(e) {
251
+ var v = x, f = K(), o = [], y = function(e) {
252
252
  for (var n = [], t = 1; t < arguments.length; t++)
253
253
  n[t - 1] = arguments[t];
254
- var o = void 0;
255
- return s.forEach(function(l) {
256
- o = l.apply(void 0, u([e], n, !1));
257
- }), o;
254
+ var s = void 0;
255
+ return o.forEach(function(l) {
256
+ s = l.apply(void 0, u([e], n, !1));
257
+ }), s;
258
258
  };
259
259
  f.isBrowserEnvironment === !0 && (window.dispatchReactUnityEvent = y);
260
260
  var i = function() {
@@ -280,7 +280,7 @@ function de() {
280
280
  });
281
281
  },
282
282
  [e]
283
- ), o = (0, v.useCallback)(
283
+ ), s = (0, v.useCallback)(
284
284
  /**
285
285
  * @param eventName The name of the event to dispatch.
286
286
  * @param parameters The parameters to pass to the event listener.
@@ -297,10 +297,10 @@ function de() {
297
297
  [e]
298
298
  );
299
299
  return (0, v.useEffect)(function() {
300
- return s.push(o), function() {
301
- s.splice(s.indexOf(o), 1);
300
+ return o.push(s), function() {
301
+ o.splice(o.indexOf(s), 1);
302
302
  };
303
- }, [o]), {
303
+ }, [s]), {
304
304
  addEventListener: n,
305
305
  removeEventListener: t
306
306
  };
@@ -308,27 +308,27 @@ function de() {
308
308
  return k.useEventSystem = i, k;
309
309
  }
310
310
  var Q;
311
- function ce() {
311
+ function de() {
312
312
  if (Q) return A;
313
313
  Q = 1, Object.defineProperty(A, "__esModule", { value: !0 }), A.useUnityContext = void 0;
314
- var u = x, v = de(), f = function(s) {
315
- var y = (0, u.useState)(null), i = y[0], e = y[1], n = (0, u.useState)(0), t = n[0], o = n[1], l = (0, u.useState)(!1), r = l[0], d = l[1], m = (0, u.useState)(), w = m[0], a = m[1], U = (0, v.useEventSystem)(), h = (0, u.useRef)({
316
- companyName: s.companyName,
317
- productName: s.productName,
318
- productVersion: s.productVersion,
319
- codeUrl: s.codeUrl,
320
- dataUrl: s.dataUrl,
321
- frameworkUrl: s.frameworkUrl,
322
- loaderUrl: s.loaderUrl,
323
- memoryUrl: s.memoryUrl,
324
- symbolsUrl: s.symbolsUrl,
325
- streamingAssetsUrl: s.streamingAssetsUrl,
326
- workerUrl: s.workerUrl,
327
- webglContextAttributes: s.webglContextAttributes,
328
- cacheControl: s.cacheControl,
329
- autoSyncPersistentDataPath: s.autoSyncPersistentDataPath,
314
+ var u = x, v = le(), f = function(o) {
315
+ var y = (0, u.useState)(null), i = y[0], e = y[1], n = (0, u.useState)(0), t = n[0], s = n[1], l = (0, u.useState)(!1), r = l[0], d = l[1], m = (0, u.useState)(), w = m[0], a = m[1], U = (0, v.useEventSystem)(), h = (0, u.useRef)({
316
+ companyName: o.companyName,
317
+ productName: o.productName,
318
+ productVersion: o.productVersion,
319
+ codeUrl: o.codeUrl,
320
+ dataUrl: o.dataUrl,
321
+ frameworkUrl: o.frameworkUrl,
322
+ loaderUrl: o.loaderUrl,
323
+ memoryUrl: o.memoryUrl,
324
+ symbolsUrl: o.symbolsUrl,
325
+ streamingAssetsUrl: o.streamingAssetsUrl,
326
+ workerUrl: o.workerUrl,
327
+ webglContextAttributes: o.webglContextAttributes,
328
+ cacheControl: o.cacheControl,
329
+ autoSyncPersistentDataPath: o.autoSyncPersistentDataPath,
330
330
  setUnityInstance: e,
331
- setLoadingProgression: o,
331
+ setLoadingProgression: s,
332
332
  setIsLoaded: d,
333
333
  setInitialisationError: a
334
334
  }), S = (0, u.useCallback)(function(c) {
@@ -367,55 +367,55 @@ function ce() {
367
367
  return A.useUnityContext = f, A;
368
368
  }
369
369
  var B = {}, T;
370
- function ve() {
370
+ function ce() {
371
371
  if (T) return B;
372
372
  T = 1, Object.defineProperty(B, "__esModule", { value: !0 }), B.useUnityMetricsInfo = void 0;
373
- var u = x, v = function(f, s) {
373
+ var u = x, v = function(f, o) {
374
374
  var y = (0, u.useState)({}), i = y[0], e = y[1];
375
375
  return (0, u.useEffect)(function() {
376
376
  var n = setInterval(function() {
377
377
  var t = f();
378
378
  typeof t > "u" || e(t);
379
- }, s.interval || 1e3);
379
+ }, o.interval || 1e3);
380
380
  return function() {
381
381
  clearInterval(n);
382
382
  };
383
- }, [f, s.interval]), i;
383
+ }, [f, o.interval]), i;
384
384
  };
385
385
  return B.useUnityMetricsInfo = v, B;
386
386
  }
387
387
  var H;
388
- function fe() {
388
+ function ve() {
389
389
  return H || (H = 1, function(u) {
390
390
  Object.defineProperty(u, "__esModule", { value: !0 }), u.useUnityMetricsInfo = u.useUnityContext = u.Unity = void 0;
391
- var v = le();
391
+ var v = oe();
392
392
  Object.defineProperty(u, "Unity", { enumerable: !0, get: function() {
393
393
  return v.Unity;
394
394
  } });
395
- var f = ce();
395
+ var f = de();
396
396
  Object.defineProperty(u, "useUnityContext", { enumerable: !0, get: function() {
397
397
  return f.useUnityContext;
398
398
  } });
399
- var s = ve();
399
+ var o = ce();
400
400
  Object.defineProperty(u, "useUnityMetricsInfo", { enumerable: !0, get: function() {
401
- return s.useUnityMetricsInfo;
401
+ return o.useUnityMetricsInfo;
402
402
  } });
403
403
  }($)), $;
404
404
  }
405
- var J = fe();
406
- const he = ee.forwardRef(
405
+ var J = ve();
406
+ const _e = Z.forwardRef(
407
407
  ({
408
408
  className: u,
409
409
  gameLink: v,
410
410
  loadingComponent: f,
411
- registerEvents: s,
411
+ registerEvents: o,
412
412
  onEventReceived: y,
413
413
  controlLoading: i
414
414
  }, e) => {
415
415
  const {
416
416
  unityProvider: n,
417
417
  isLoaded: t,
418
- loadingProgression: o,
418
+ loadingProgression: s,
419
419
  UNSAFE__unityInstance: l,
420
420
  addEventListener: r,
421
421
  removeEventListener: d,
@@ -427,10 +427,10 @@ const he = ee.forwardRef(
427
427
  dataUrl: `${v}/Build/Build.data.unityweb`,
428
428
  frameworkUrl: `${v}/Build/Build.framework.js.unityweb`,
429
429
  codeUrl: `${v}/Build/Build.wasm.unityweb`
430
- }), U = G(null), h = G([]), S = te(() => {
430
+ }), U = G(null), h = G([]), S = ee(() => {
431
431
  a("WebController", "Unload"), l == null || l.Quit(), m().then();
432
432
  }, [m, a, l]);
433
- re(
433
+ te(
434
434
  e,
435
435
  () => ({
436
436
  unload: S,
@@ -439,12 +439,12 @@ const he = ee.forwardRef(
439
439
  canvas: U.current
440
440
  }),
441
441
  [w, a, S]
442
- ), N(() => {
443
- if (!(s && y))
442
+ ), O(() => {
443
+ if (!(o && y))
444
444
  return () => {
445
445
  };
446
446
  const g = [];
447
- for (const _ of s)
447
+ for (const _ of o)
448
448
  if (!h.current.some((L) => L.key === _)) {
449
449
  const L = (X) => {
450
450
  y == null || y(_, X);
@@ -456,40 +456,40 @@ const he = ee.forwardRef(
456
456
  d(_, L);
457
457
  h.current = [];
458
458
  };
459
- }, [s, r, d, y]), N(() => {
459
+ }, [o, r, d, y]), O(() => {
460
460
  window && l && (window.unityInstance = l);
461
461
  }, [l]);
462
- const [I, M] = D(!1), { message: b } = ae("unity_channel");
463
- N(() => {
462
+ const [I, M] = D(!1), { message: b } = ne("unity_channel");
463
+ O(() => {
464
464
  b === "loading_completed" && (console.log("Game init completed"), M(!0));
465
465
  }, [b]);
466
- const [E, P] = D(!1), c = ne(() => {
466
+ const [E, P] = D(!1), c = re(() => {
467
467
  if (!t || !I || i && !E)
468
468
  return !0;
469
469
  }, [t, I, i, E]);
470
- return /* @__PURE__ */ Y(Z, { children: [
471
- c && (f ? /* @__PURE__ */ O(
470
+ return /* @__PURE__ */ Y("div", { className: "relative h-full w-full", children: [
471
+ /* @__PURE__ */ N("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: c && (f ? /* @__PURE__ */ N(
472
472
  f,
473
473
  {
474
- progress: t ? 0.95 : o,
474
+ progress: t ? 0.95 : s,
475
475
  loadingCompleted: t && I,
476
476
  closeLoading: () => P(!0)
477
477
  }
478
- ) : /* @__PURE__ */ O(
479
- ue,
478
+ ) : /* @__PURE__ */ N(
479
+ ie,
480
480
  {
481
- progress: t ? 0.95 : o,
481
+ progress: t ? 0.95 : s,
482
482
  loadingCompleted: t && I,
483
483
  closeLoading: () => P(!0)
484
484
  }
485
- )),
486
- /* @__PURE__ */ O(
485
+ )) }),
486
+ /* @__PURE__ */ N(
487
487
  J.Unity,
488
488
  {
489
489
  ref: U,
490
490
  id: "unity-canvas",
491
491
  unityProvider: n,
492
- className: ie("h-full w-full", u, !t && "hidden"),
492
+ className: ae("h-full w-full", u, !t && "hidden"),
493
493
  devicePixelRatio: (window == null ? void 0 : window.devicePixelRatio) || 1
494
494
  }
495
495
  )
@@ -497,5 +497,5 @@ const he = ee.forwardRef(
497
497
  }
498
498
  );
499
499
  export {
500
- he as UnityGame
500
+ _e as UnityGame
501
501
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promogame-player",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",