try {
this._platformSdk.UI.loadAd();
} catch (t) {
this._setRewardedState(a.FAILED);
}
},
},
{
key: "showBanner",
value: function (t) {
var e, r;
(r = t),
(function (t, e, r) {
if (e.set) e.set.call(t, r);
else {
if (!e.writable)
throw new TypeError(
"attempted to set read only private field"
);
e.value = r;
}
})((e = this), ha(e, ma, "set"), r),
this._platformSdk.invokeUIMethod("requestBannerAds");
},
},
{
key: "hideBanner",
value: function () {
this._platformSdk.invokeUIMethod("hideBannerAds");
},
},
{
key: "checkAdBlock",
value: function () {
var t = this._getPromiseDecorator(v.ADBLOCK_DETECT);
return (
t ||
((t = this._createPromiseDecorator(v.ADBLOCK_DETECT)),
this._platformSdk.invokeUIMethod("isAdBlockEnabled")),
t.promise
);
},
},
{
key: "inviteFriends",
value: function (t) {
var e = (t || {}).text;
if (!t || "string" != typeof e) return Promise.reject();
var r = this._getPromiseDecorator(v.INVITE_FRIENDS);
return (
r ||
((r = this._createPromiseDecorator(v.INVITE_FRIENDS)),
e.length > 120
? this._rejectPromiseDecorator(
v.INVITE_FRIENDS,
_.INVITE_FRIENDS_MESSAGE_LENGTH_ERROR
)
: this._platformSdk.UI.showInvite(e)),
r.promise
);
},
},
{
key: "rate",
value: function () {
var t = this._getPromiseDecorator(v.RATE);
return (
t ||
((t = this._createPromiseDecorator(v.RATE)),
this._platformSdk.UI.showRatingDialog()),
t.promise
);
},
},
{
key: "createPost",
value: function (t) {
if (!t || null == t || !t.media) return Promise.reject();
var e,
r = this._getPromiseDecorator(v.CREATE_POST);
return (
r ||
((r = this._createPromiseDecorator(v.CREATE_POST)),
this._platformSdk.UI.postMediatopic(
t,
null !== (e = t.status) && void 0 !== e && e
)),
r.promise
);
},
},
{
key: "joinCommunity",
value: function (t) {
if (!t || null == t || !t.groupId) return Promise.reject();
var e,
r = this._getPromiseDecorator(v.JOIN_COMMUNITY);
return (
r ||
((r = this._createPromiseDecorator(v.JOIN_COMMUNITY)),
this._platformSdk.UI.joinGroup(
t.groupId,
null !== (e = t.enableMessages) && void 0 !== e && e
)),
r.promise
);
},
},
]) && ea(r.prototype, n),
Object.defineProperty(r, "prototype", { writable: !1 }),
l
);
})(lo);
function rs(t) {
return (
(rs =
"function" == typeof Symbol && "symbol" == typeof Symbol.iterator
? function (t) {
return typeof t;
}
: function (t) {
return t &&
"function" == typeof Symbol &&
t.constructor === Symbol &&
t !== Symbol.prototype
? "symbol"
: typeof t;
}),
rs(t)
);
}
function ns() {
ns = function () {
return e;
};
var t,
e = {},
r = Object.prototype,
n = r.hasOwnProperty,
o =
Object.defineProperty ||
function (t, e, r) {
t[e] = r.value;
},
i = "function" == typeof Symbol ? Symbol : {},
a = i.iterator || "@@iterator",
s = i.asyncIterator || "@@asyncIterator",
c = i.toStringTag || "@@toStringTag";
function u(t, e, r) {
return (
Object.defineProperty(t, e, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0,
}),
t[e]
);
}
try {
u({}, "");
} catch (t) {
u = function (t, e, r) {
return (t[e] = r);
};
}
function l(t, e, r, n) {
var i = e && e.prototype instanceof v ? e : v,
a = Object.create(i.prototype),
s = new I(n || []);
return o(a, "_invoke", { value: O(t, r, s) }), a;
}
function f(t, e, r) {
try {
return { type: "normal", arg: t.call(e, r) };
} catch (t) {
return { type: "throw", arg: t };
}
}
e.wrap = l;
var p = "suspendedStart",
h = "suspendedYield",
d = "executing",
y = "completed",
m = {};
function v() {}
function _() {}
function g() {}
var S = {};
u(S, a, function () {
return this;
});
var b = Object.getPrototypeOf,
E = b && b(b(R([])));
E && E !== r && n.call(E, a) && (S = E);
var P = (g.prototype = v.prototype = Object.create(S));
function w(t) {
["next", "throw", "return"].forEach(function (e) {
u(t, e, function (t) {
return this._invoke(e, t);
});
});
}
function A(t, e) {
function r(o, i, a, s) {
var c = f(t[o], t, i);
if ("throw" !== c.type) {
var u = c.arg,
l = u.value;
return l && "object" == rs(l) && n.call(l, "__await")
? e.resolve(l.__await).then(
function (t) {
r("next", t, a, s);
},
function (t) {
r("throw", t, a, s);
}
)
: e.resolve(l).then(
function (t) {
(u.value = t), a(u);
},
function (t) {
return r("throw", t, a, s);
}
);
}
s(c.arg);
}
var i;
o(this, "_invoke", {
value: function (t, n) {
function o() {
return new e(function (e, o) {
r(t, n, e, o);
});
}
return (i = i ? i.then(o, o) : o());
},
});
}
function O(e, r, n) {
var o = p;
return function (i, a) {
if (o === d) throw new Error("Generator is already running");
if (o === y) {
if ("throw" === i) throw a;
return { value: t, done: !0 };
}
for (n.method = i, n.arg = a; ; ) {
var s = n.delegate;
if (s) {
var c = T(s, n);
if (c) {
if (c === m) continue;
return c;
}
}
if ("next" === n.method) n.sent = n._sent = n.arg;
else if ("throw" === n.method) {
if (o === p) throw ((o = y), n.arg);
n.dispatchException(n.arg);
} else "return" === n.method && n.abrupt("return", n.arg);
o = d;
var u = f(e, r, n);
if ("normal" === u.type) {
if (((o = n.done ? y : h), u.arg === m)) continue;
return { value: u.arg, done: n.done };
}
"throw" === u.type &&
((o = y), (n.method = "throw"), (n.arg = u.arg));
}
};
}
function T(e, r) {
var n = r.method,
o = e.iterator[n];
if (o === t)
return (
(r.delegate = null),
("throw" === n &&
e.iterator.return &&
((r.method = "return"),
(r.arg = t),
T(e, r),
"throw" === r.method)) ||
("return" !== n &&
((r.method = "throw"),
(r.arg = new TypeError(
"The iterator does not provide a '" + n + "' method"
)))),
m
);
var i = f(o, e.iterator, r.arg);
if ("throw" === i.type)
return (
(r.method = "throw"), (r.arg = i.arg), (r.delegate = null), m
);
var a = i.arg;
return a
? a.done
? ((r[e.resultName] = a.value),
(r.next = e.nextLoc),
"return" !== r.method && ((r.method = "next"), (r.arg = t)),
(r.delegate = null),
m)
: a
: ((r.method = "throw"),
(r.arg = new TypeError("iterator result is not an object")),
(r.delegate = null),
m);
}
function k(t) {
var e = { tryLoc: t[0] };
1 in t && (e.catchLoc = t[1]),
2 in t && ((e.finallyLoc = t[2]), (e.afterLoc = t[3])),
this.tryEntries.push(e);
}
function D(t) {
var e = t.completion || {};
(e.type = "normal"), delete e.arg, (t.completion = e);
}
function I(t) {
(this.tryEntries = [{ tryLoc: "root" }]),
t.forEach(k, this),
this.reset(!0);
}
function R(e) {
|