i && t._playerPhotos.push(i),
a && t._playerPhotos.push(a),
t._playerExtra = {
payingStatus: e.getPayingStatus()
},
r && (t._playerExtra.signature = e.signature),
Ho(t, Wo, e),
e.getData()
}
)).then((function(e) {
t._platformStorageCachedData = e
}
)).finally((function() {
e()
}
))
}
))
}
const Ko = function(e) {
!function(t, e) {
if ("function" != typeof e && null !== e)
throw new TypeError("Super expression must either be null or a function");
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(t, "prototype", {
writable: !1
}),
e && No(t, e)
}(p, e);
var r, n, o, c, f = (o = p,
c = function() {
if ("undefined" == typeof Reflect || !Reflect.construct)
return !1;
if (Reflect.construct.sham)
return !1;
if ("function" == typeof Proxy)
return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}
))),
!0
} catch (t) {
return !1
}
}(),
function() {
var t, e = Go(o);
if (c) {
var r = Go(this).constructor;
t = Reflect.construct(e, arguments, r)
} else
t = e.apply(this, arguments);
return function(t, e) {
if (e && ("object" === ko(e) || "function" == typeof e))
return e;
if (void 0 !== e)
throw new TypeError("Derived constructors may only return object or undefined");
return Co(t)
}(this, t)
}
);
function p() {
var t, e, r;
!function(t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function")
}(this, p);
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++)
o[i] = arguments[i];
return Bo(e = Co(t = f.call.apply(f, [this].concat(o))), r = Yo),
r.add(e),
Mo(Co(t), Vo, {
writable: !0,
value: !1
}),
Mo(Co(t), Wo, {
writable: !0,
value: null
}),
Mo(Co(t), zo, {
writable: !0,
value: null
}),
Mo(Co(t), Zo, {
writable: !0,
value: null
}),
t
}
return r = p,
(n = [{
key: "platformId",
get: function() {
return t.YANDEX
}
}, {
key: "platformLanguage",
get: function() {
return this._platformSdk ? this._platformSdk.environment.i18n.lang.toLowerCase() : jo(Go(p.prototype), "platformLanguage", this)
}
}, {
key: "platformTld",
get: function() {
return this._platformSdk ? this._platformSdk.environment.i18n.tld.toLowerCase() : jo(Go(p.prototype), "platformTld", this)
}
}, {
key: "isPlatformGetAllGamesSupported",
get: function() {
return !0
}
}, {
key: "isPlatformGetGameByIdSupported",
get: function() {
return !0
}
}, {
key: "isInterstitialSupported",
get: function() {
return !0
}
}, {
key: "isRewardedSupported",
get: function() {
return !0
}
}, {
key: "deviceType",
get: function() {
switch (this._platformSdk && this._platformSdk.deviceInfo.type) {
case l.DESKTOP:
return l.DESKTOP;
case l.MOBILE:
return l.MOBILE;
case l.TABLET:
return l.TABLET;
case l.TV:
return l.TV;
default:
return jo(Go(p.prototype), "deviceType", this)
}
}
}, {
key: "isPlayerAuthorizationSupported",
get: function() {
return !0
}
}, {
key: "isAddToHomeScreenSupported",
get: function() {
return Fo(this, Vo)
}
}, {
key: "isRateSupported",
get: function() {
return !0
}
}, {
key: "isExternalLinksAllowed",
get: function() {
return !1
}
}, {
key: "leaderboardsType",
get: function() {
return y
}
}, {
key: "isPaymentsSupported",
get: function() {
return !0
}
}, {
key: "isRemoteConfigSupported",
get: function() {
return !0
}
}, {
key: "initialize",
value: function() {
var t = this;
if (this._isInitialized)
return Promise.resolve();
var e = this._getPromiseDecorator(_.INITIALIZE);
return e || (e = this._createPromiseDecorator(_.INITIALIZE),
xt("/sdk.js").then((function() {
Ut("YaGames", "init").then((function() {
window.YaGames.init().then((function(e) {
var r;
t._platformSdk = e,
Ho(t, Zo, xo(t, Yo, Jo).call(t));
var n = null === (r = t._platformSdk.features.PluginEngineDataReporterAPI) || void 0 === r ? void 0 : r.report({
engineName: "",
engineVersion: "",
pluginName: "playgama-bridge",
pluginVersion: "1.27.1"
})
, o = t._platformSdk.shortcut.canShowPrompt().then((function(e) {
Ho(t, Vo, e.canShow)
}
))
, i = new Promise((function(t) {
setTimeout(t, 1e3)
}
))
, a = Promise.race([o, i])
, c = t._platformSdk.getPayments().then((function(e) {
Ho(t, zo, e)
}
));
t._isBannerSupported = !0;
var u = t._platformSdk.adv.getBannerAdvStatus().then((function(e) {
e.stickyAdvIsShowing && t._setBannerState(s.SHOWN)
}
));
Promise.all([n, a, c, u]).finally((function() {
t._isInitialized = !0,
t._resolvePromiseDecorator(_.INITIALIZE)
}
))
}
))
}
))
}
))),
e.promise
}
}, {
key: "sendMessage",
value: function(t) {
switch (t) {
case h.GAME_READY:
var e;
return null === (e = this._platformSdk.features.LoadingAPI) || void 0 === e || e.ready(),
Promise.resolve();
case h.GAMEPLAY_STARTED:
var r;
return null === (r = this._platformSdk.features.GameplayAPI) || void 0 === r || r.start(),
Promise.resolve();
case h.GAMEPLAY_STOPPED:
var n;
return null === (n = this._platformSdk.features.GameplayAPI) || void 0 === n || n.stop(),
Promise.resolve();
default:
return jo(Go(p.prototype), "sendMessage", this).call(this, t)
}
}
}, {
|