@inappstory/react-sdk 1.16.8 → 1.16.10
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.
- package/dist/index.esm.mjs +301 -125
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/types/in-app-messaging/inAppMessaging.d.ts +7 -1
- package/dist/types/storyManager.d.ts +4 -2
- package/package.json +2 -2
- package/plugins/banners/index.esm.mjs +1 -1
- package/plugins/banners/index.umd.js +1 -1
- package/plugins/banners/types/iasBannerPreview.d.ts +6 -0
package/dist/index.esm.mjs
CHANGED
|
@@ -4678,7 +4678,7 @@ class StoryFeedStatisticV1Service {
|
|
|
4678
4678
|
|
|
4679
4679
|
/***/ },
|
|
4680
4680
|
|
|
4681
|
-
/***/
|
|
4681
|
+
/***/ 7737
|
|
4682
4682
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
4683
4683
|
|
|
4684
4684
|
|
|
@@ -4697,7 +4697,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4697
4697
|
Lf: () => (/* reexport */ GameSession),
|
|
4698
4698
|
rp: () => (/* reexport */ GameSessionFactory),
|
|
4699
4699
|
Uy: () => (/* reexport */ GameShareModule),
|
|
4700
|
-
rK: () => (/* reexport */ GameStoryLocalDataModule)
|
|
4700
|
+
rK: () => (/* reexport */ GameStoryLocalDataModule),
|
|
4701
|
+
ey: () => (/* reexport */ GameTextInputModule)
|
|
4701
4702
|
});
|
|
4702
4703
|
|
|
4703
4704
|
// UNUSED EXPORTS: GameForegroundTimeoutError, GameSplashLottieScreen
|
|
@@ -4851,7 +4852,7 @@ class GameClientConfig {
|
|
|
4851
4852
|
value: void 0
|
|
4852
4853
|
});
|
|
4853
4854
|
const storyManagerConfig = this.storyManager.config;
|
|
4854
|
-
const sdkVersion = "1.16.
|
|
4855
|
+
const sdkVersion = "1.16.10";
|
|
4855
4856
|
const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
|
|
4856
4857
|
const session = this.storyManager.rootStore.sessionStore.session;
|
|
4857
4858
|
this.sessionId = session.id;
|
|
@@ -5228,7 +5229,8 @@ class Game {
|
|
|
5228
5229
|
return (0,external_deepmerge_["default"])(this.config.toJSON(), {
|
|
5229
5230
|
clientConfig: Object.assign({ fullScreen: this.isReaderInFullscreen(), screenOrientation: this.screenOptions.orientation, variables: this.storyManager.config.options, safeAreaInsets: payload.safeAreaInsets, widescreen: payload.isWidescreen, dir: this.languageDirection, nonce: (0,helpers/* getNonce */.m9)(), sdkFeatures: {
|
|
5230
5231
|
gameShouldForegroundCallback: true,
|
|
5231
|
-
writeToClipboard: true
|
|
5232
|
+
writeToClipboard: true,
|
|
5233
|
+
showTextInput: true
|
|
5232
5234
|
} }, this.clientConfig.toJSON())
|
|
5233
5235
|
});
|
|
5234
5236
|
}
|
|
@@ -5958,6 +5960,36 @@ class GameLoggerModule {
|
|
|
5958
5960
|
}
|
|
5959
5961
|
}
|
|
5960
5962
|
|
|
5963
|
+
// EXTERNAL MODULE: ../core/src/helpers/showSystemTextInput.ts
|
|
5964
|
+
var showSystemTextInput = __webpack_require__(1207);
|
|
5965
|
+
;// ../core/src/domain/gameCenter/modules/gameTextInputModule/gameTextInputModule.ts
|
|
5966
|
+
|
|
5967
|
+
class GameTextInputModule {
|
|
5968
|
+
constructor() {
|
|
5969
|
+
Object.defineProperty(this, "handleShowTextInput", {
|
|
5970
|
+
enumerable: true,
|
|
5971
|
+
configurable: true,
|
|
5972
|
+
writable: true,
|
|
5973
|
+
value: (session, payload) => {
|
|
5974
|
+
try {
|
|
5975
|
+
const { id, cb, config } = JSON.parse(payload);
|
|
5976
|
+
const value = (0,showSystemTextInput/* showSystemTextInputFromGameConfig */.g)(config);
|
|
5977
|
+
session.sendMessage("cb", {
|
|
5978
|
+
cb,
|
|
5979
|
+
arguments: JSON.stringify([JSON.stringify({ id, response: value })])
|
|
5980
|
+
});
|
|
5981
|
+
}
|
|
5982
|
+
catch (error) {
|
|
5983
|
+
console.error(error);
|
|
5984
|
+
}
|
|
5985
|
+
}
|
|
5986
|
+
});
|
|
5987
|
+
}
|
|
5988
|
+
attach(session, _game) {
|
|
5989
|
+
session.on("showTextInput" /* GameSessionEvent.ShowTextInput */, (payload) => this.handleShowTextInput(session, payload));
|
|
5990
|
+
}
|
|
5991
|
+
}
|
|
5992
|
+
|
|
5961
5993
|
;// ../core/src/domain/gameCenter/modules/index.ts
|
|
5962
5994
|
|
|
5963
5995
|
|
|
@@ -5969,6 +6001,7 @@ class GameLoggerModule {
|
|
|
5969
6001
|
|
|
5970
6002
|
|
|
5971
6003
|
|
|
6004
|
+
|
|
5972
6005
|
;// ../core/src/domain/gameCenter/index.ts
|
|
5973
6006
|
|
|
5974
6007
|
|
|
@@ -6111,13 +6144,21 @@ let IamApi = (() => {
|
|
|
6111
6144
|
});
|
|
6112
6145
|
return response.data;
|
|
6113
6146
|
}
|
|
6114
|
-
async fetchById(messageId,
|
|
6115
|
-
const
|
|
6147
|
+
async fetchById(messageId, options = {}) {
|
|
6148
|
+
const body = {
|
|
6149
|
+
tags: (0,helpers/* filterTags */._N)(this.storyManager.config.tags),
|
|
6150
|
+
targeting: Boolean(options.targeting)
|
|
6151
|
+
};
|
|
6152
|
+
const pos = this.storyManager.config.options.pos;
|
|
6153
|
+
if (pos != null && pos !== "") {
|
|
6154
|
+
body.options = { pos: pos.toString() };
|
|
6155
|
+
}
|
|
6156
|
+
const response = await api["default"].post(`inappmessaging/message/${messageId}`, body, {
|
|
6116
6157
|
params: {
|
|
6117
6158
|
expand: "slides,custom_attributes",
|
|
6118
6159
|
fields: messageFields
|
|
6119
6160
|
},
|
|
6120
|
-
signal
|
|
6161
|
+
signal: options.signal
|
|
6121
6162
|
});
|
|
6122
6163
|
const messageDto = response.data;
|
|
6123
6164
|
if (!messageDto)
|
|
@@ -7378,7 +7419,10 @@ class IamDisplayService {
|
|
|
7378
7419
|
.checkOtherReadersAreClosed()
|
|
7379
7420
|
.checkShowOnlyIfLoaded(options.showOnlyIfLoaded)
|
|
7380
7421
|
.validate();
|
|
7381
|
-
const message = await this.iamStore.findById(messageId, {
|
|
7422
|
+
const message = await this.iamStore.findById(messageId, {
|
|
7423
|
+
signal: options.signal,
|
|
7424
|
+
targeting: options.targeting
|
|
7425
|
+
});
|
|
7382
7426
|
if (message.hasLimit)
|
|
7383
7427
|
await this.checkMesageLimit(messageId, options.signal);
|
|
7384
7428
|
this.logger.debug("message resolved by id", {
|
|
@@ -7497,7 +7541,7 @@ class IamDisplayService {
|
|
|
7497
7541
|
/* harmony import */ var _session__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6317);
|
|
7498
7542
|
/* harmony import */ var _stories__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5804);
|
|
7499
7543
|
/* harmony import */ var _feeds__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
|
|
7500
|
-
/* harmony import */ var _gameCenter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
7544
|
+
/* harmony import */ var _gameCenter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7737);
|
|
7501
7545
|
/* harmony import */ var _placeholders__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7241);
|
|
7502
7546
|
/* harmony import */ var _storyManagerConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(712);
|
|
7503
7547
|
/* harmony import */ var _inAppMessaging__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(632);
|
|
@@ -7644,7 +7688,7 @@ var api = __webpack_require__(861);
|
|
|
7644
7688
|
|
|
7645
7689
|
|
|
7646
7690
|
const openFields = "session,server_timestamp,user_key,share,preview_aspect_ratio,placeholders,image_placeholders,is_allow_ugc,is_allow_statistic_v2,is_game_reader_default_fullscreen,debug_session_key";
|
|
7647
|
-
const openFeatures = "animation,data,deeplink,placeholder,resetTimers,gameReader,sendApi,swipeUpItems,imgPlaceholder,vod,closeStoryApi,slideTimerEndApi,multislideIam,scrollview";
|
|
7691
|
+
const openFeatures = "animation,data,deeplink,placeholder,resetTimers,gameReader,sendApi,swipeUpItems,imgPlaceholder,vod,closeStoryApi,slideTimerEndApi,multislideIam,scrollview,textInputApi";
|
|
7648
7692
|
class SessionApi {
|
|
7649
7693
|
async open(payload) {
|
|
7650
7694
|
var _a;
|
|
@@ -7902,6 +7946,14 @@ var feeds = __webpack_require__(8);
|
|
|
7902
7946
|
|
|
7903
7947
|
|
|
7904
7948
|
|
|
7949
|
+
const STORY_BASE_EXPAND_FIELDS = ["slides", "custom_attributes"];
|
|
7950
|
+
function buildStoryUrl(id, feedSlug) {
|
|
7951
|
+
return `${feedSlug === feeds/* UGCFeedSlug */.rT ? "ugc/" : ""}story/${id}`;
|
|
7952
|
+
}
|
|
7953
|
+
function buildStoryExpandParam(fetchShareUrl) {
|
|
7954
|
+
const expandFields = fetchShareUrl ? [...STORY_BASE_EXPAND_FIELDS, "share_url"] : STORY_BASE_EXPAND_FIELDS;
|
|
7955
|
+
return expandFields.join(",");
|
|
7956
|
+
}
|
|
7905
7957
|
class StoriesApi {
|
|
7906
7958
|
constructor(storyManager) {
|
|
7907
7959
|
Object.defineProperty(this, "storyManager", {
|
|
@@ -7912,26 +7964,49 @@ class StoriesApi {
|
|
|
7912
7964
|
});
|
|
7913
7965
|
}
|
|
7914
7966
|
async fetchStorySlides({ id, feedSlug }) {
|
|
7915
|
-
const
|
|
7916
|
-
|
|
7967
|
+
const response = await src_api["default"].get(buildStoryUrl(id, feedSlug), {
|
|
7968
|
+
params: {
|
|
7969
|
+
expand: buildStoryExpandParam(),
|
|
7970
|
+
fields: ["id", "slides"].join(",")
|
|
7971
|
+
}
|
|
7972
|
+
});
|
|
7917
7973
|
return response.data;
|
|
7918
7974
|
}
|
|
7919
|
-
async fetchStory({ id, feedSlug, fetchShareUrl, once }) {
|
|
7920
|
-
const
|
|
7921
|
-
|
|
7975
|
+
async fetchStory({ id, feedSlug, fetchShareUrl, once, targeting }) {
|
|
7976
|
+
const body = {
|
|
7977
|
+
tags: (0,helpers/* filterTags */._N)(this.storyManager.config.tags),
|
|
7978
|
+
targeting: Boolean(targeting)
|
|
7979
|
+
};
|
|
7980
|
+
const pos = this.storyManager.config.options.pos;
|
|
7981
|
+
if (pos != null && pos !== "") {
|
|
7982
|
+
body.options = { pos: pos.toString() };
|
|
7983
|
+
}
|
|
7984
|
+
const response = await src_api["default"].post(buildStoryUrl(id, feedSlug), body, {
|
|
7985
|
+
params: {
|
|
7986
|
+
expand: buildStoryExpandParam(fetchShareUrl),
|
|
7987
|
+
once: Number(Boolean(once))
|
|
7988
|
+
}
|
|
7989
|
+
});
|
|
7922
7990
|
if (response.status === 204 && once)
|
|
7923
7991
|
throw new IasStoryAlreadyShownError(id.toString());
|
|
7924
7992
|
return response.data;
|
|
7925
7993
|
}
|
|
7926
7994
|
async fetchStoryContext({ ids }) {
|
|
7927
|
-
const
|
|
7928
|
-
|
|
7995
|
+
const response = await src_api["default"].get("story-context", {
|
|
7996
|
+
params: {
|
|
7997
|
+
id: ids.join(","),
|
|
7998
|
+
fields: "widgetsData"
|
|
7999
|
+
}
|
|
8000
|
+
});
|
|
7929
8001
|
return response.data;
|
|
7930
8002
|
}
|
|
7931
8003
|
async fetchStoryCSS() {
|
|
7932
8004
|
var _a;
|
|
7933
|
-
const
|
|
7934
|
-
|
|
8005
|
+
const response = await src_api["default"].get("story-context", {
|
|
8006
|
+
params: {
|
|
8007
|
+
fields: "style"
|
|
8008
|
+
}
|
|
8009
|
+
});
|
|
7935
8010
|
return (_a = response.data.style) !== null && _a !== void 0 ? _a : "";
|
|
7936
8011
|
}
|
|
7937
8012
|
async setStoryLike(storyId, like) {
|
|
@@ -7977,45 +8052,6 @@ class StoriesApi {
|
|
|
7977
8052
|
data: { data }
|
|
7978
8053
|
});
|
|
7979
8054
|
}
|
|
7980
|
-
getStoryRequestConfig(id, feedSlug, allFields = false, fetchShareUrl, once) {
|
|
7981
|
-
const expandFields = ["slides", "custom_attributes"];
|
|
7982
|
-
if (fetchShareUrl) {
|
|
7983
|
-
expandFields.push("share_url");
|
|
7984
|
-
}
|
|
7985
|
-
const config = {
|
|
7986
|
-
url: `${feedSlug === feeds/* UGCFeedSlug */.rT ? "ugc/" : ""}story/${id}`,
|
|
7987
|
-
method: "GET",
|
|
7988
|
-
params: { expand: expandFields.join(",") /* , src_list: "true" */ }
|
|
7989
|
-
};
|
|
7990
|
-
config.params.once = Number(Boolean(once));
|
|
7991
|
-
if (!allFields) {
|
|
7992
|
-
if (config.params != null) {
|
|
7993
|
-
config.params.fields = ["id", "slides"].join(",");
|
|
7994
|
-
}
|
|
7995
|
-
}
|
|
7996
|
-
return config;
|
|
7997
|
-
}
|
|
7998
|
-
getStoryCSSRequestConfig() {
|
|
7999
|
-
const config = {
|
|
8000
|
-
url: `story-context`,
|
|
8001
|
-
method: "GET",
|
|
8002
|
-
params: {
|
|
8003
|
-
fields: "style"
|
|
8004
|
-
}
|
|
8005
|
-
};
|
|
8006
|
-
return config;
|
|
8007
|
-
}
|
|
8008
|
-
getStoryContextRequestConfig(ids) {
|
|
8009
|
-
const config = {
|
|
8010
|
-
url: `story-context`,
|
|
8011
|
-
method: "GET",
|
|
8012
|
-
params: {
|
|
8013
|
-
id: ids.join(","),
|
|
8014
|
-
fields: "widgetsData"
|
|
8015
|
-
}
|
|
8016
|
-
};
|
|
8017
|
-
return config;
|
|
8018
|
-
}
|
|
8019
8055
|
}
|
|
8020
8056
|
|
|
8021
8057
|
;// ../core/src/domain/stories/api/storyFeedsApi.ts
|
|
@@ -10793,6 +10829,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
10793
10829
|
B0: () => (/* reexport */ clipboard/* Clipboard */.B),
|
|
10794
10830
|
Pv: () => (/* reexport */ SCREEN_ORIENTATIONS),
|
|
10795
10831
|
W$: () => (/* reexport */ tags/* TagsValidator */.W$),
|
|
10832
|
+
gR: () => (/* reexport */ textInputValidator/* TextInputValidator */.g),
|
|
10796
10833
|
B7: () => (/* reexport */ applyInternalFontFamilyPrefix),
|
|
10797
10834
|
sY: () => (/* reexport */ awaitMacrotask),
|
|
10798
10835
|
lj: () => (/* reexport */ encodeSVG),
|
|
@@ -10806,17 +10843,20 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
10806
10843
|
LQ: () => (/* reexport */ localStorage/* localStorageGet */.LQ),
|
|
10807
10844
|
Fn: () => (/* reexport */ localStorage/* localStorageSet */.Fn),
|
|
10808
10845
|
Xi: () => (/* reexport */ localStorage/* lsIsAvailable */.Xi),
|
|
10846
|
+
mj: () => (/* reexport */ textInputValidator/* mapTextInputType */.m),
|
|
10809
10847
|
vb: () => (/* reexport */ decorators/* mobxObserver */.vb),
|
|
10810
10848
|
dV: () => (/* reexport */ decorators/* noConcurrent */.dV),
|
|
10811
10849
|
VX: () => (/* reexport */ decorators/* queryCache */.VX),
|
|
10812
10850
|
yh: () => (/* reexport */ replaceAll),
|
|
10813
10851
|
xu: () => (/* reexport */ decorators/* safeCustomElement */.xu),
|
|
10814
10852
|
oi: () => (/* reexport */ safeJson),
|
|
10853
|
+
MO: () => (/* reexport */ showSystemTextInput/* showSystemTextInputFromCardConfig */.M),
|
|
10815
10854
|
yy: () => (/* reexport */ sleep),
|
|
10855
|
+
kM: () => (/* reexport */ subscribeIsDesktopMode),
|
|
10816
10856
|
jA: () => (/* reexport */ waitMinTimeToTransition)
|
|
10817
10857
|
});
|
|
10818
10858
|
|
|
10819
|
-
// UNUSED EXPORTS: INTERNAL_FONT_FAMILY_NAMES, IasTagsCountError, IasTagsLengthError, TAGS_COUNT_LIMIT, TAG_LENGTH_LIMIT, checkUrlProtocol, debug, eventOptions, fontFaceAsCss, initAndLoadFonts, install, isPassiveSupported, isProduction, onAllMediaLoaded
|
|
10859
|
+
// UNUSED EXPORTS: INTERNAL_FONT_FAMILY_NAMES, IasTagsCountError, IasTagsLengthError, TAGS_COUNT_LIMIT, TAG_LENGTH_LIMIT, checkUrlProtocol, debug, eventOptions, fontFaceAsCss, initAndLoadFonts, install, isPassiveSupported, isProduction, onAllMediaLoaded, recalculateIsDesktopMode, showSystemTextInputFromGameConfig
|
|
10820
10860
|
|
|
10821
10861
|
;// ../core/src/helpers/awaitMacrotask.ts
|
|
10822
10862
|
/** Schedules a macrotask so pending microtasks can run before continuing. */
|
|
@@ -11224,15 +11264,35 @@ checkStyle = () => true } = {}) => {
|
|
|
11224
11264
|
|
|
11225
11265
|
;// external "bowser"
|
|
11226
11266
|
|
|
11267
|
+
// EXTERNAL MODULE: external "lodash-es"
|
|
11268
|
+
var external_lodash_es_ = __webpack_require__(1630);
|
|
11227
11269
|
;// ../core/src/helpers/isDesktopMode.ts
|
|
11228
11270
|
|
|
11229
|
-
|
|
11230
|
-
const ua = browser.parse();
|
|
11271
|
+
|
|
11231
11272
|
/** platform type, can be either `"desktop"`, `"tablet"` or `"mobile"`
|
|
11232
11273
|
* https://bowser-js.github.io/bowser/docs/parser.js.html#line241
|
|
11233
|
-
*
|
|
11234
11274
|
*/
|
|
11235
|
-
|
|
11275
|
+
function computeIsDesktopMode() {
|
|
11276
|
+
const browser = __WEBPACK_EXTERNAL_MODULE_bowser_default__.getParser(window.navigator.userAgent);
|
|
11277
|
+
return browser.getPlatformType() !== "mobile";
|
|
11278
|
+
}
|
|
11279
|
+
let isDesktopMode = computeIsDesktopMode();
|
|
11280
|
+
const listeners = new Set();
|
|
11281
|
+
function recalculateIsDesktopMode() {
|
|
11282
|
+
const prev = isDesktopMode;
|
|
11283
|
+
isDesktopMode = computeIsDesktopMode();
|
|
11284
|
+
if (prev !== isDesktopMode) {
|
|
11285
|
+
listeners.forEach((listener) => listener());
|
|
11286
|
+
}
|
|
11287
|
+
}
|
|
11288
|
+
function subscribeIsDesktopMode(listener) {
|
|
11289
|
+
listeners.add(listener);
|
|
11290
|
+
return () => listeners.delete(listener);
|
|
11291
|
+
}
|
|
11292
|
+
const debouncedRecalculateIsDesktopMode = (0,external_lodash_es_.debounce)(recalculateIsDesktopMode, 150);
|
|
11293
|
+
if (typeof window !== "undefined") {
|
|
11294
|
+
window.addEventListener("resize", debouncedRecalculateIsDesktopMode);
|
|
11295
|
+
}
|
|
11236
11296
|
|
|
11237
11297
|
;// ../core/src/helpers/safeJson.ts
|
|
11238
11298
|
function safeJson(input) {
|
|
@@ -11249,6 +11309,10 @@ function safeJson(input) {
|
|
|
11249
11309
|
}
|
|
11250
11310
|
}
|
|
11251
11311
|
|
|
11312
|
+
// EXTERNAL MODULE: ../core/src/helpers/showSystemTextInput.ts
|
|
11313
|
+
var showSystemTextInput = __webpack_require__(1207);
|
|
11314
|
+
// EXTERNAL MODULE: ../core/src/helpers/textInputValidator.ts
|
|
11315
|
+
var textInputValidator = __webpack_require__(125);
|
|
11252
11316
|
;// ../core/src/helpers/index.ts
|
|
11253
11317
|
|
|
11254
11318
|
|
|
@@ -11269,6 +11333,8 @@ function safeJson(input) {
|
|
|
11269
11333
|
|
|
11270
11334
|
|
|
11271
11335
|
|
|
11336
|
+
|
|
11337
|
+
|
|
11272
11338
|
|
|
11273
11339
|
|
|
11274
11340
|
|
|
@@ -12054,6 +12120,45 @@ async function hasLossyWebP() {
|
|
|
12054
12120
|
}
|
|
12055
12121
|
|
|
12056
12122
|
|
|
12123
|
+
/***/ },
|
|
12124
|
+
|
|
12125
|
+
/***/ 1207
|
|
12126
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12127
|
+
|
|
12128
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12129
|
+
/* harmony export */ M: () => (/* binding */ showSystemTextInputFromCardConfig),
|
|
12130
|
+
/* harmony export */ g: () => (/* binding */ showSystemTextInputFromGameConfig)
|
|
12131
|
+
/* harmony export */ });
|
|
12132
|
+
/* harmony import */ var _textInputValidator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(125);
|
|
12133
|
+
|
|
12134
|
+
function showSystemTextInputFromCardConfig(config) {
|
|
12135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
12136
|
+
const message = (_e = (_d = (_c = (_b = (_a = config.configV2) === null || _a === void 0 ? void 0 : _a.main) === null || _b === void 0 ? void 0 : _b.question) === null || _c === void 0 ? void 0 : _c.text) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : "";
|
|
12137
|
+
const defaultValue = (_j = (_h = (_g = (_f = config.configV2) === null || _f === void 0 ? void 0 : _f.main) === null || _g === void 0 ? void 0 : _g.input) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : "";
|
|
12138
|
+
const type = (_o = (_m = (_l = (_k = config.configV2) === null || _k === void 0 ? void 0 : _k.main) === null || _l === void 0 ? void 0 : _l.input) === null || _m === void 0 ? void 0 : _m.type) !== null && _o !== void 0 ? _o : "";
|
|
12139
|
+
return showSystemTextInput({ message, defaultValue, type });
|
|
12140
|
+
}
|
|
12141
|
+
function showSystemTextInputFromGameConfig(config) {
|
|
12142
|
+
var _a, _b, _c, _d, _e;
|
|
12143
|
+
const message = (_c = (_a = config.title) !== null && _a !== void 0 ? _a : (_b = config.input) === null || _b === void 0 ? void 0 : _b.placeholder) !== null && _c !== void 0 ? _c : "";
|
|
12144
|
+
const type = (_e = (_d = config.input) === null || _d === void 0 ? void 0 : _d.type) !== null && _e !== void 0 ? _e : "";
|
|
12145
|
+
return showSystemTextInput({ message, defaultValue: "", type });
|
|
12146
|
+
}
|
|
12147
|
+
function showSystemTextInput(options) {
|
|
12148
|
+
const { message, defaultValue, type } = options;
|
|
12149
|
+
let currentDefault = defaultValue;
|
|
12150
|
+
while (true) {
|
|
12151
|
+
const result = window.prompt(message, currentDefault);
|
|
12152
|
+
if (result === null)
|
|
12153
|
+
return "";
|
|
12154
|
+
if (_textInputValidator__WEBPACK_IMPORTED_MODULE_0__/* .TextInputValidator */ .g.validateValue(result, type)) {
|
|
12155
|
+
return result.trim();
|
|
12156
|
+
}
|
|
12157
|
+
currentDefault = result;
|
|
12158
|
+
}
|
|
12159
|
+
}
|
|
12160
|
+
|
|
12161
|
+
|
|
12057
12162
|
/***/ },
|
|
12058
12163
|
|
|
12059
12164
|
/***/ 5928
|
|
@@ -12140,6 +12245,52 @@ class TagsValidator {
|
|
|
12140
12245
|
|
|
12141
12246
|
|
|
12142
12247
|
|
|
12248
|
+
/***/ },
|
|
12249
|
+
|
|
12250
|
+
/***/ 125
|
|
12251
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12252
|
+
|
|
12253
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12254
|
+
/* harmony export */ g: () => (/* binding */ TextInputValidator)
|
|
12255
|
+
/* harmony export */ });
|
|
12256
|
+
const mapTextInputType = (configType) => {
|
|
12257
|
+
switch (configType) {
|
|
12258
|
+
case "":
|
|
12259
|
+
return "text";
|
|
12260
|
+
case "tel":
|
|
12261
|
+
return "tel";
|
|
12262
|
+
case "email":
|
|
12263
|
+
return "email";
|
|
12264
|
+
default:
|
|
12265
|
+
return "text";
|
|
12266
|
+
}
|
|
12267
|
+
};
|
|
12268
|
+
class TextInputValidator {
|
|
12269
|
+
static isEmailValid(email) {
|
|
12270
|
+
return /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(email);
|
|
12271
|
+
}
|
|
12272
|
+
static isTelephoneValid(mask, telephone) {
|
|
12273
|
+
if (mask)
|
|
12274
|
+
return mask.replace(/\s/g, "").length === telephone.length && telephone.length > 0;
|
|
12275
|
+
return /^\d+$/.test(telephone);
|
|
12276
|
+
}
|
|
12277
|
+
static validateValue(value, configType, options) {
|
|
12278
|
+
var _a, _b;
|
|
12279
|
+
const inputType = mapTextInputType(configType);
|
|
12280
|
+
if (inputType === "email")
|
|
12281
|
+
return TextInputValidator.isEmailValid(value);
|
|
12282
|
+
if (inputType === "tel") {
|
|
12283
|
+
return TextInputValidator.isTelephoneValid((_a = options === null || options === void 0 ? void 0 : options.phoneMask) !== null && _a !== void 0 ? _a : "", (_b = options === null || options === void 0 ? void 0 : options.phone) !== null && _b !== void 0 ? _b : value);
|
|
12284
|
+
}
|
|
12285
|
+
return true;
|
|
12286
|
+
}
|
|
12287
|
+
}
|
|
12288
|
+
|
|
12289
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
12290
|
+
/* harmony export */ "m", 0, /* binding */ mapTextInputType
|
|
12291
|
+
/* harmony export */ ]);
|
|
12292
|
+
|
|
12293
|
+
|
|
12143
12294
|
/***/ },
|
|
12144
12295
|
|
|
12145
12296
|
/***/ 9690
|
|
@@ -12185,7 +12336,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
12185
12336
|
Cc: () => (/* reexport */ storyManager/* storyManager */.jR)
|
|
12186
12337
|
});
|
|
12187
12338
|
|
|
12188
|
-
// UNUSED EXPORTS: AppearanceManagerTypeException, BaseStoryReaderEvent, CTASource, CloseStoryEvent, CloseStoryReaderAction, CloseStoryReaderEvent, DesktopGameGeometry, DesktopStoryGeometry, DislikeStoryEvent, FAVORITE_CARD_ID, FavoriteStoryCardViewModel, FavoriteStoryEvent, FeedCoverageAnalytics, FeedCoverageAnalyticsCalculator, FeedCoverageAnalyticsFactory, GAME_CUSTOM_SCREEN_PREVIEW_ID, GameCloseButtonBehavior, GameGeometryFactory, GameReaderViewModel, GameReaderViewModelFactory, GoodsWidgetEvent, HybridAppPlatform, INTERNAL_FONT_FAMILY_NAMES, IasGameAlreadyOpenError, IasGameAnonymousOpen, IasNoOpenedGameError, IasTagsCountError, IasTagsLengthError, LikeStoryEvent, MobileGameGeometry, MobileStoryGeometry, NarrativeDataCache, NullStorySlideViewModel, STORY_READER_WINDOW_REFERER, SafeAreaFrameCalculator, SharePanelDefault, SharePanelViewModel, ShareStoryEvent, ShareStoryWithPathEvent, ShareType, ShowSlideEvent, ShowStoryEvent, ShowStoryFailed, StoriesListEvents, StoriesListOptionsDefault, StoryActionPanelViewModel, StoryActionSource, StoryCardViewModel, StoryCardViewStatisticV2Event, StoryEvent, StoryGeometryFactory, StoryGoodsWidgetViewModel, StoryListViewModelFactory, StoryManagerEvent, StoryManagerLinkEventSource, StoryReaderViewModel, StoryReaderViewModelFactory, StoryRect, StorySlideApiHandlers, StorySlideApiHandlersFactory, StorySlideViewModel, StoryTimelineController, StoryTimelineViewModel, StoryViewModel, TAGS_COUNT_LIMIT, TAG_LENGTH_LIMIT, TagsValidator, TextInputViewModel, Timer, TimerEvent, TypedEventEmitter, UGC_CARD_ID, applyInternalFontFamilyPrefix, awaitMacrotask, checkUrlProtocol, debug, encodeSVG, eventOptions, filterTags, focusElementOnIOS, fontFaceAsCss, getNonce, hasLossyWebP, inAppMessaging, initAndLoadFonts, install, isGameCustomScreenPreviewId, isNumeric, isPassiveSupported, isProduction, localStorageGet, localStorageSet, lsIsAvailable, mobxObserver, noConcurrent, onAllMediaLoaded, queryCache, replaceAll, safeCustomElement, safeJson, sleep, waitMinTimeToTransition
|
|
12339
|
+
// UNUSED EXPORTS: AppearanceManagerTypeException, BaseStoryReaderEvent, CTASource, CloseStoryEvent, CloseStoryReaderAction, CloseStoryReaderEvent, DesktopGameGeometry, DesktopStoryGeometry, DislikeStoryEvent, FAVORITE_CARD_ID, FavoriteStoryCardViewModel, FavoriteStoryEvent, FeedCoverageAnalytics, FeedCoverageAnalyticsCalculator, FeedCoverageAnalyticsFactory, GAME_CUSTOM_SCREEN_PREVIEW_ID, GameCloseButtonBehavior, GameGeometryFactory, GameReaderViewModel, GameReaderViewModelFactory, GoodsWidgetEvent, HybridAppPlatform, INTERNAL_FONT_FAMILY_NAMES, IasGameAlreadyOpenError, IasGameAnonymousOpen, IasNoOpenedGameError, IasTagsCountError, IasTagsLengthError, LikeStoryEvent, MobileGameGeometry, MobileStoryGeometry, NarrativeDataCache, NullStorySlideViewModel, STORY_READER_WINDOW_REFERER, SafeAreaFrameCalculator, SharePanelDefault, SharePanelViewModel, ShareStoryEvent, ShareStoryWithPathEvent, ShareType, ShowSlideEvent, ShowStoryEvent, ShowStoryFailed, StoriesListEvents, StoriesListOptionsDefault, StoryActionPanelViewModel, StoryActionSource, StoryCardViewModel, StoryCardViewStatisticV2Event, StoryEvent, StoryGeometryFactory, StoryGoodsWidgetViewModel, StoryListViewModelFactory, StoryManagerEvent, StoryManagerLinkEventSource, StoryReaderViewModel, StoryReaderViewModelFactory, StoryRect, StorySlideApiHandlers, StorySlideApiHandlersFactory, StorySlideViewModel, StoryTimelineController, StoryTimelineViewModel, StoryViewModel, TAGS_COUNT_LIMIT, TAG_LENGTH_LIMIT, TagsValidator, TextInputValidator, TextInputViewModel, Timer, TimerEvent, TypedEventEmitter, UGC_CARD_ID, applyInternalFontFamilyPrefix, awaitMacrotask, checkUrlProtocol, debug, encodeSVG, eventOptions, filterTags, focusElementOnIOS, fontFaceAsCss, getNonce, hasLossyWebP, inAppMessaging, initAndLoadFonts, install, isGameCustomScreenPreviewId, isNumeric, isPassiveSupported, isProduction, localStorageGet, localStorageSet, lsIsAvailable, mapTextInputType, mobxObserver, noConcurrent, onAllMediaLoaded, queryCache, recalculateIsDesktopMode, replaceAll, safeCustomElement, safeJson, showSystemTextInputFromCardConfig, showSystemTextInputFromGameConfig, sleep, subscribeIsDesktopMode, waitMinTimeToTransition
|
|
12189
12340
|
|
|
12190
12341
|
// EXTERNAL MODULE: ../core/src/storyManager/index.ts
|
|
12191
12342
|
var storyManager = __webpack_require__(4445);
|
|
@@ -12436,8 +12587,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
12436
12587
|
var viewModels = __webpack_require__(4474);
|
|
12437
12588
|
// EXTERNAL MODULE: external "mobx"
|
|
12438
12589
|
var external_mobx_ = __webpack_require__(4980);
|
|
12439
|
-
// EXTERNAL MODULE: ../core/src/domain/gameCenter/index.ts +
|
|
12440
|
-
var gameCenter = __webpack_require__(
|
|
12590
|
+
// EXTERNAL MODULE: ../core/src/domain/gameCenter/index.ts + 32 modules
|
|
12591
|
+
var gameCenter = __webpack_require__(7737);
|
|
12441
12592
|
;// ../core/src/readers/gameReader/errors.ts
|
|
12442
12593
|
class IasGameAlreadyOpenError extends Error {
|
|
12443
12594
|
constructor(gameId) {
|
|
@@ -12546,6 +12697,7 @@ let GameReaderViewModel = (() => {
|
|
|
12546
12697
|
let __gameShouldBeShown_decorators;
|
|
12547
12698
|
let __gameShouldBeShown_initializers = [];
|
|
12548
12699
|
let __gameShouldBeShown_extraInitializers = [];
|
|
12700
|
+
let _get_safeAreaInsets_decorators;
|
|
12549
12701
|
let _get_needApplySafeAreaInsets_decorators;
|
|
12550
12702
|
let _get_closeBtnVisible_decorators;
|
|
12551
12703
|
let _get_dir_decorators;
|
|
@@ -12644,7 +12796,7 @@ let GameReaderViewModel = (() => {
|
|
|
12644
12796
|
writable: true,
|
|
12645
12797
|
value: void 0
|
|
12646
12798
|
});
|
|
12647
|
-
Object.defineProperty(this, "
|
|
12799
|
+
Object.defineProperty(this, "nativeSafeAreaInsets", {
|
|
12648
12800
|
enumerable: true,
|
|
12649
12801
|
configurable: true,
|
|
12650
12802
|
writable: true,
|
|
@@ -12682,10 +12834,16 @@ let GameReaderViewModel = (() => {
|
|
|
12682
12834
|
new gameCenter/* GameNavigationModule */.vL(this.storyManager),
|
|
12683
12835
|
new gameCenter/* GameStoryLocalDataModule */.rK(this.storyManager),
|
|
12684
12836
|
new gameCenter/* GameLocalDataModule */.yf(this.storyManager),
|
|
12837
|
+
new gameCenter/* GameTextInputModule */.ey(),
|
|
12685
12838
|
new gameCenter/* GameShareModule */.Uy(this.storyManager, this),
|
|
12686
12839
|
this.gameLogger
|
|
12687
12840
|
];
|
|
12688
|
-
this.
|
|
12841
|
+
this.nativeSafeAreaInsets = this.getFallbackSafeAreaInsets();
|
|
12842
|
+
}
|
|
12843
|
+
get safeAreaInsets() {
|
|
12844
|
+
var _b;
|
|
12845
|
+
const hybridApp = this.storyManager.config.hybridApp;
|
|
12846
|
+
return (_b = hybridApp === null || hybridApp === void 0 ? void 0 : hybridApp.safeAreaInsets) !== null && _b !== void 0 ? _b : this.nativeSafeAreaInsets;
|
|
12689
12847
|
}
|
|
12690
12848
|
get needApplySafeAreaInsets() {
|
|
12691
12849
|
var _b, _c, _d, _e;
|
|
@@ -12987,11 +13145,6 @@ let GameReaderViewModel = (() => {
|
|
|
12987
13145
|
}
|
|
12988
13146
|
this.emit(gameCenter/* GameReaderEvent */.G.Close);
|
|
12989
13147
|
}
|
|
12990
|
-
getSafeAreaInsets() {
|
|
12991
|
-
var _b;
|
|
12992
|
-
const hybridApp = this.storyManager.config.hybridApp;
|
|
12993
|
-
return (_b = hybridApp === null || hybridApp === void 0 ? void 0 : hybridApp.safeAreaInsets) !== null && _b !== void 0 ? _b : this.getFallbackSafeAreaInsets();
|
|
12994
|
-
}
|
|
12995
13148
|
getFallbackSafeAreaInsets() {
|
|
12996
13149
|
const html = getComputedStyle(document.documentElement);
|
|
12997
13150
|
const getPropValue = (prop) => parseFloat(html.getPropertyValue(prop)) || 0;
|
|
@@ -13024,6 +13177,7 @@ let GameReaderViewModel = (() => {
|
|
|
13024
13177
|
__gameError_decorators = [external_mobx_.observable];
|
|
13025
13178
|
__closeBtnVisible_decorators = [external_mobx_.observable];
|
|
13026
13179
|
__gameShouldBeShown_decorators = [external_mobx_.observable];
|
|
13180
|
+
_get_safeAreaInsets_decorators = [external_mobx_.computed];
|
|
13027
13181
|
_get_needApplySafeAreaInsets_decorators = [external_mobx_.computed];
|
|
13028
13182
|
_get_closeBtnVisible_decorators = [external_mobx_.computed];
|
|
13029
13183
|
_get_dir_decorators = [external_mobx_.computed];
|
|
@@ -13045,6 +13199,7 @@ let GameReaderViewModel = (() => {
|
|
|
13045
13199
|
__esDecorate(_a, null, __gameError_decorators, { kind: "accessor", name: "_gameError", static: false, private: false, access: { has: obj => "_gameError" in obj, get: obj => obj._gameError, set: (obj, value) => { obj._gameError = value; } }, metadata: _metadata }, __gameError_initializers, __gameError_extraInitializers);
|
|
13046
13200
|
__esDecorate(_a, null, __closeBtnVisible_decorators, { kind: "accessor", name: "_closeBtnVisible", static: false, private: false, access: { has: obj => "_closeBtnVisible" in obj, get: obj => obj._closeBtnVisible, set: (obj, value) => { obj._closeBtnVisible = value; } }, metadata: _metadata }, __closeBtnVisible_initializers, __closeBtnVisible_extraInitializers);
|
|
13047
13201
|
__esDecorate(_a, null, __gameShouldBeShown_decorators, { kind: "accessor", name: "_gameShouldBeShown", static: false, private: false, access: { has: obj => "_gameShouldBeShown" in obj, get: obj => obj._gameShouldBeShown, set: (obj, value) => { obj._gameShouldBeShown = value; } }, metadata: _metadata }, __gameShouldBeShown_initializers, __gameShouldBeShown_extraInitializers);
|
|
13202
|
+
__esDecorate(_a, null, _get_safeAreaInsets_decorators, { kind: "getter", name: "safeAreaInsets", static: false, private: false, access: { has: obj => "safeAreaInsets" in obj, get: obj => obj.safeAreaInsets }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
13048
13203
|
__esDecorate(_a, null, _get_needApplySafeAreaInsets_decorators, { kind: "getter", name: "needApplySafeAreaInsets", static: false, private: false, access: { has: obj => "needApplySafeAreaInsets" in obj, get: obj => obj.needApplySafeAreaInsets }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
13049
13204
|
__esDecorate(_a, null, _get_closeBtnVisible_decorators, { kind: "getter", name: "closeBtnVisible", static: false, private: false, access: { has: obj => "closeBtnVisible" in obj, get: obj => obj.closeBtnVisible }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
13050
13205
|
__esDecorate(_a, null, _get_dir_decorators, { kind: "getter", name: "dir", static: false, private: false, access: { has: obj => "dir" in obj, get: obj => obj.dir }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
@@ -13472,8 +13627,8 @@ var helpers = __webpack_require__(4884);
|
|
|
13472
13627
|
var UI = __webpack_require__(7340);
|
|
13473
13628
|
// EXTERNAL MODULE: ../core/src/api/index.ts + 8 modules
|
|
13474
13629
|
var api = __webpack_require__(861);
|
|
13475
|
-
// EXTERNAL MODULE: ../core/src/domain/gameCenter/index.ts +
|
|
13476
|
-
var gameCenter = __webpack_require__(
|
|
13630
|
+
// EXTERNAL MODULE: ../core/src/domain/gameCenter/index.ts + 32 modules
|
|
13631
|
+
var gameCenter = __webpack_require__(7737);
|
|
13477
13632
|
;// ../core/src/readers/inAppMessaging/iamMessage/actions/openGameAction.ts
|
|
13478
13633
|
|
|
13479
13634
|
class OpenGameAction {
|
|
@@ -14296,7 +14451,9 @@ class IamSlideApiHandlers {
|
|
|
14296
14451
|
const widgetsData = this.iamMessage.context.widgetsData;
|
|
14297
14452
|
return (_a = widgetsData._narrative_saved_data) !== null && _a !== void 0 ? _a : null;
|
|
14298
14453
|
}
|
|
14299
|
-
showCardTextInput(id, config) {
|
|
14454
|
+
showCardTextInput(id, config) {
|
|
14455
|
+
this.iamMessage.showCardTextInput(id, config);
|
|
14456
|
+
}
|
|
14300
14457
|
setCardSessionValue(key, value) {
|
|
14301
14458
|
this.activeMessageNarrativeDataCache.set(key, value);
|
|
14302
14459
|
}
|
|
@@ -14721,6 +14878,11 @@ let IamMultiSlideMessageViewModel = (() => {
|
|
|
14721
14878
|
this.toast = new UI/* Toast */.y8(Object.assign(Object.assign({}, options), { mountPoint: this.$root }));
|
|
14722
14879
|
this.toast.show(options.content);
|
|
14723
14880
|
}
|
|
14881
|
+
showCardTextInput(id, config) {
|
|
14882
|
+
var _b;
|
|
14883
|
+
const value = (0,helpers/* showSystemTextInputFromCardConfig */.MO)(config);
|
|
14884
|
+
(_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.setTextInputResult(id, value);
|
|
14885
|
+
}
|
|
14724
14886
|
onShowSlide(index) {
|
|
14725
14887
|
this._activeSlideIndex = index;
|
|
14726
14888
|
this.slidesMetrics.set(index, {
|
|
@@ -19666,8 +19828,8 @@ let StoryViewModel = (() => {
|
|
|
19666
19828
|
var api = __webpack_require__(861);
|
|
19667
19829
|
// EXTERNAL MODULE: ../core/src/api/exceptions/apiRequestError.ts
|
|
19668
19830
|
var apiRequestError = __webpack_require__(663);
|
|
19669
|
-
// EXTERNAL MODULE: ../core/src/domain/gameCenter/index.ts +
|
|
19670
|
-
var gameCenter = __webpack_require__(
|
|
19831
|
+
// EXTERNAL MODULE: ../core/src/domain/gameCenter/index.ts + 32 modules
|
|
19832
|
+
var gameCenter = __webpack_require__(7737);
|
|
19671
19833
|
;// ../core/src/readers/storyReader/storyViewModel/storySlideApiHandlers/actions/openGameAction.ts
|
|
19672
19834
|
|
|
19673
19835
|
class OpenGameAction {
|
|
@@ -20743,7 +20905,8 @@ class ShowStoryOnceStrategy {
|
|
|
20743
20905
|
const story = await storyStore.fetchStoryById({
|
|
20744
20906
|
storyId: payload.storyId,
|
|
20745
20907
|
feedSlug: "",
|
|
20746
|
-
once: true
|
|
20908
|
+
once: true,
|
|
20909
|
+
targeting: payload.targeting
|
|
20747
20910
|
});
|
|
20748
20911
|
this.throwIfAborted(payload.signal);
|
|
20749
20912
|
if (story.error)
|
|
@@ -20799,7 +20962,8 @@ class ShowStoryStrategy {
|
|
|
20799
20962
|
const story = await storyStore.fetchStoryById({
|
|
20800
20963
|
storyId: payload.storyId,
|
|
20801
20964
|
feedSlug: "",
|
|
20802
|
-
fetchShareUrl: payload.fetchShareUrl
|
|
20965
|
+
fetchShareUrl: payload.fetchShareUrl,
|
|
20966
|
+
targeting: payload.targeting
|
|
20803
20967
|
});
|
|
20804
20968
|
this.throwIfAborted(payload.signal);
|
|
20805
20969
|
this.openStoryReader(story, payload);
|
|
@@ -22559,7 +22723,7 @@ let IamStore = (() => {
|
|
|
22559
22723
|
const message = this._messages.get(messageId.toString());
|
|
22560
22724
|
if (message)
|
|
22561
22725
|
return message;
|
|
22562
|
-
return this.fetchById(messageId, options
|
|
22726
|
+
return this.fetchById(messageId, options);
|
|
22563
22727
|
}
|
|
22564
22728
|
findAllByEvent(eventName) {
|
|
22565
22729
|
let messages = Array.from(this._messages.values()).filter(message => message.hasEvent(eventName));
|
|
@@ -22570,10 +22734,10 @@ let IamStore = (() => {
|
|
|
22570
22734
|
async updateMessageUserData(messageId, data) {
|
|
22571
22735
|
return this.iamApi.updateUserData(messageId, data);
|
|
22572
22736
|
}
|
|
22573
|
-
async fetchById(messageId,
|
|
22737
|
+
async fetchById(messageId, options = {}) {
|
|
22574
22738
|
await this.rootStore.sessionStore.open();
|
|
22575
|
-
const messageContext = await this.fetchMessageContext({ messageIds: [messageId], signal });
|
|
22576
|
-
const messageDto = await this.iamApi.fetchById(messageId,
|
|
22739
|
+
const messageContext = await this.fetchMessageContext({ messageIds: [messageId], signal: options.signal });
|
|
22740
|
+
const messageDto = await this.iamApi.fetchById(messageId, options);
|
|
22577
22741
|
return this.createMessageByDto(messageDto, messageContext);
|
|
22578
22742
|
}
|
|
22579
22743
|
async fetchAll(params) {
|
|
@@ -22993,13 +23157,13 @@ let StoryStore = (() => {
|
|
|
22993
23157
|
this.storiesApi.markStoryAsOpened(session.userKey, story.id);
|
|
22994
23158
|
this.rootStore.onboardingFeedStore.removeStoryFromOnboardingFeedsById(story.id);
|
|
22995
23159
|
}
|
|
22996
|
-
async fetchStoryById({ storyId, feedSlug, fetchShareUrl, once }) {
|
|
23160
|
+
async fetchStoryById({ storyId, feedSlug, fetchShareUrl, once, targeting }) {
|
|
22997
23161
|
let story = this.findStoryById(storyId);
|
|
22998
23162
|
if (story === null || story === void 0 ? void 0 : story.slidesLoaded)
|
|
22999
23163
|
return story;
|
|
23000
23164
|
await this.rootStore.sessionStore.open();
|
|
23001
23165
|
await this.fetchStoryCSS();
|
|
23002
|
-
story = await this.fetchStory({ storyId, feedSlug, fetchShareUrl, once });
|
|
23166
|
+
story = await this.fetchStory({ storyId, feedSlug, fetchShareUrl, once, targeting });
|
|
23003
23167
|
const storyContext = await this.fetchStoryContext({
|
|
23004
23168
|
id: story.id,
|
|
23005
23169
|
feedSlug
|
|
@@ -23052,9 +23216,9 @@ let StoryStore = (() => {
|
|
|
23052
23216
|
story.setError(error);
|
|
23053
23217
|
}
|
|
23054
23218
|
}
|
|
23055
|
-
async fetchStory({ storyId, feedSlug, fetchShareUrl, once }) {
|
|
23219
|
+
async fetchStory({ storyId, feedSlug, fetchShareUrl, once, targeting }) {
|
|
23056
23220
|
var _b;
|
|
23057
|
-
const storyDto = await this.storiesApi.fetchStory({ id: storyId, feedSlug, fetchShareUrl, once });
|
|
23221
|
+
const storyDto = await this.storiesApi.fetchStory({ id: storyId, feedSlug, fetchShareUrl, once, targeting });
|
|
23058
23222
|
const story = this.addStoryByDto(storyDto);
|
|
23059
23223
|
story.setSlides((_b = storyDto.slides) !== null && _b !== void 0 ? _b : []);
|
|
23060
23224
|
story.applyFontPrefix(this.storyManager.config.fontPrefix);
|
|
@@ -23452,7 +23616,7 @@ class UgcEditorStore {
|
|
|
23452
23616
|
const session = await this.storyManager.rootStore.sessionStore.open();
|
|
23453
23617
|
const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
|
|
23454
23618
|
const storyManagerConfig = this.storyManager.config;
|
|
23455
|
-
const sdkVersion = "1.16.
|
|
23619
|
+
const sdkVersion = "1.16.10";
|
|
23456
23620
|
this._config = {
|
|
23457
23621
|
sessionId: session.id,
|
|
23458
23622
|
apiKey: storyManagerConfig.apiKey,
|
|
@@ -23928,11 +24092,11 @@ class StoryManager extends types/* TypedEventEmitter */.Xl {
|
|
|
23928
24092
|
return api/* deviceDescriptor */.c2.deviceId;
|
|
23929
24093
|
}
|
|
23930
24094
|
get sdkVersionName() {
|
|
23931
|
-
const sdkVersionName = "1.16.
|
|
24095
|
+
const sdkVersionName = "1.16.10";
|
|
23932
24096
|
return sdkVersionName || "0.0.0";
|
|
23933
24097
|
}
|
|
23934
24098
|
get sdkVersionCode() {
|
|
23935
|
-
const sdkVersionCode =
|
|
24099
|
+
const sdkVersionCode = 11610;
|
|
23936
24100
|
return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
23937
24101
|
}
|
|
23938
24102
|
get lang() {
|
|
@@ -23996,7 +24160,7 @@ class StoryManager extends types/* TypedEventEmitter */.Xl {
|
|
|
23996
24160
|
this.rootStore.storyManagerConfigStore.setConfig(configDto);
|
|
23997
24161
|
}
|
|
23998
24162
|
setUserAgent(userAgent) {
|
|
23999
|
-
const sdkVersionCode =
|
|
24163
|
+
const sdkVersionCode = 11610;
|
|
24000
24164
|
const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
24001
24165
|
// According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
|
|
24002
24166
|
this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;
|
|
@@ -25937,24 +26101,48 @@ var screenOrientationLock_module_update = injectStylesIntoStyleTag_default()(scr
|
|
|
25937
26101
|
|
|
25938
26102
|
/* harmony default export */ const ScreenOrientationLock_screenOrientationLock_module = (screenOrientationLock_module/* default */.A && screenOrientationLock_module/* default */.A.locals ? screenOrientationLock_module/* default */.A.locals : undefined);
|
|
25939
26103
|
|
|
26104
|
+
;// ./src/hooks/useIsDesktopMode.ts
|
|
26105
|
+
|
|
26106
|
+
|
|
26107
|
+
function useIsDesktopMode() {
|
|
26108
|
+
const [desktopMode, setDesktopMode] = __WEBPACK_EXTERNAL_MODULE_react_useState__(helpers/* isDesktopMode */.ML);
|
|
26109
|
+
__WEBPACK_EXTERNAL_MODULE_react_useEffect__(() => {
|
|
26110
|
+
return (0,helpers/* subscribeIsDesktopMode */.kM)(() => {
|
|
26111
|
+
setDesktopMode(helpers/* isDesktopMode */.ML);
|
|
26112
|
+
});
|
|
26113
|
+
}, []);
|
|
26114
|
+
return desktopMode;
|
|
26115
|
+
}
|
|
26116
|
+
|
|
26117
|
+
;// ./src/hooks/index.ts
|
|
26118
|
+
|
|
26119
|
+
|
|
25940
26120
|
;// ./src/UI/ScreenOrientationLock/ScreenOrientationLock.tsx
|
|
25941
26121
|
|
|
25942
26122
|
|
|
25943
26123
|
|
|
25944
26124
|
|
|
26125
|
+
|
|
25945
26126
|
const src_orientation = (0,src/* getOrientation */.vc)();
|
|
25946
26127
|
const ScreenOrientationLock = (props) => {
|
|
25947
26128
|
const [isWrong, setIsWrong] = __WEBPACK_EXTERNAL_MODULE_react_useState__(false);
|
|
26129
|
+
const desktopMode = useIsDesktopMode();
|
|
25948
26130
|
const checkScreenOrientation = __WEBPACK_EXTERNAL_MODULE_react_useCallback__(() => {
|
|
25949
|
-
if (
|
|
26131
|
+
if (desktopMode) {
|
|
26132
|
+
setIsWrong(false);
|
|
26133
|
+
props.onOrientationChange({
|
|
26134
|
+
type: src_orientation.type,
|
|
26135
|
+
isWrong: false
|
|
26136
|
+
});
|
|
25950
26137
|
return;
|
|
26138
|
+
}
|
|
25951
26139
|
const isWrong = src_orientation.type !== props.orientation;
|
|
25952
26140
|
props.onOrientationChange({
|
|
25953
26141
|
type: src_orientation.type,
|
|
25954
26142
|
isWrong: isWrong
|
|
25955
26143
|
});
|
|
25956
26144
|
setIsWrong(isWrong);
|
|
25957
|
-
}, [props.orientation]);
|
|
26145
|
+
}, [desktopMode, props.orientation]);
|
|
25958
26146
|
__WEBPACK_EXTERNAL_MODULE_react_useEffect__(() => {
|
|
25959
26147
|
checkScreenOrientation();
|
|
25960
26148
|
src_orientation.addEventListener("change", checkScreenOrientation);
|
|
@@ -26682,12 +26870,14 @@ var storyReader = __webpack_require__(9320);
|
|
|
26682
26870
|
|
|
26683
26871
|
|
|
26684
26872
|
|
|
26873
|
+
|
|
26685
26874
|
const VERTICAL_PADDING = {
|
|
26686
26875
|
TOP: 50,
|
|
26687
26876
|
BOTTOM: 50
|
|
26688
26877
|
};
|
|
26689
26878
|
const useStoryGeometry = (viewport, story) => {
|
|
26690
26879
|
const { storyReaderOptions } = useIASProvider();
|
|
26880
|
+
const desktopMode = useIsDesktopMode();
|
|
26691
26881
|
return __WEBPACK_EXTERNAL_MODULE_react_useMemo__(() => {
|
|
26692
26882
|
var _a;
|
|
26693
26883
|
const safeAreaFrameCalculator = new storyReader/* SafeAreaFrameCalculator */.Wn(viewport.vw, viewport.vh);
|
|
@@ -26709,7 +26899,7 @@ const useStoryGeometry = (viewport, story) => {
|
|
|
26709
26899
|
isDesktopGeometry,
|
|
26710
26900
|
correctionPaddingStyle
|
|
26711
26901
|
};
|
|
26712
|
-
}, [storyReaderOptions.actionPanelBottomOffset, viewport, story]);
|
|
26902
|
+
}, [storyReaderOptions.actionPanelBottomOffset, viewport, story, desktopMode]);
|
|
26713
26903
|
};
|
|
26714
26904
|
|
|
26715
26905
|
;// ./src/StoryReader/hooks/index.ts
|
|
@@ -26721,12 +26911,13 @@ const useStoryGeometry = (viewport, story) => {
|
|
|
26721
26911
|
;// ./src/GameReader/hooks/useGameGeometry.ts
|
|
26722
26912
|
|
|
26723
26913
|
|
|
26724
|
-
|
|
26914
|
+
|
|
26915
|
+
const useGameGeometry = (desktopMode) => {
|
|
26725
26916
|
const { vw, vh } = useWindowViewport();
|
|
26726
|
-
const gameGeometry = new gameReader/* GameGeometryFactory */.DE().create({
|
|
26917
|
+
const gameGeometry = __WEBPACK_EXTERNAL_MODULE_react_useMemo__(() => new gameReader/* GameGeometryFactory */.DE().create({
|
|
26727
26918
|
vw,
|
|
26728
26919
|
vh
|
|
26729
|
-
});
|
|
26920
|
+
}), [vw, vh, desktopMode]);
|
|
26730
26921
|
const isDesktopGeometry = gameGeometry instanceof gameReader/* DesktopGameGeometry */.bb;
|
|
26731
26922
|
return { isDesktopGeometry, gameGeometry };
|
|
26732
26923
|
};
|
|
@@ -26944,12 +27135,14 @@ const useAppearanceManager_useAppearanceManager = ({ commonOptions, gameReaderOp
|
|
|
26944
27135
|
|
|
26945
27136
|
|
|
26946
27137
|
|
|
27138
|
+
|
|
26947
27139
|
const GameReader = __WEBPACK_EXTERNAL_MODULE_mobx_react_lite_9dacf130_observer__(({ gameReader }) => {
|
|
26948
27140
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
26949
27141
|
const { gameReaderOptions: options } = useIASProvider();
|
|
26950
27142
|
const gameReaderIframeRef = __WEBPACK_EXTERNAL_MODULE_react_useRef__(null);
|
|
26951
27143
|
const { sharePanelOpeningParams, handleShareComplete, closeSharePanel } = useSharePanel(gameReader);
|
|
26952
|
-
const
|
|
27144
|
+
const isDesktopMode = useIsDesktopMode();
|
|
27145
|
+
const { gameGeometry, isDesktopGeometry } = useGameGeometry(isDesktopMode);
|
|
26953
27146
|
const game = gameReader.game;
|
|
26954
27147
|
const isWidescreen = isDesktopGeometry && ((_a = game === null || game === void 0 ? void 0 : game.screenOptions.widescreen) !== null && _a !== void 0 ? _a : true);
|
|
26955
27148
|
useEscKey(() => {
|
|
@@ -28568,30 +28761,13 @@ const useTextInputModalBodyStyles = ({ config }) => {
|
|
|
28568
28761
|
};
|
|
28569
28762
|
|
|
28570
28763
|
;// ./src/StoryReader/Story/Widgets/TextInputModal/TextInputModalBody/hooks/useTextInputForm/validator.ts
|
|
28571
|
-
|
|
28572
|
-
static isEmailValid(email) {
|
|
28573
|
-
return /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(email);
|
|
28574
|
-
}
|
|
28575
|
-
static isTelephoneValid(mask, telephone) {
|
|
28576
|
-
if (mask)
|
|
28577
|
-
return mask.replace(/\s/g, "").length === telephone.length && telephone.length > 0;
|
|
28578
|
-
return /^\d+$/.test(telephone);
|
|
28579
|
-
}
|
|
28580
|
-
}
|
|
28764
|
+
|
|
28581
28765
|
|
|
28582
28766
|
;// ./src/StoryReader/Story/Widgets/TextInputModal/TextInputModalBody/helpers/mapConfigTypeToInputType.ts
|
|
28583
|
-
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
28587
|
-
case "tel":
|
|
28588
|
-
return "tel";
|
|
28589
|
-
case "email":
|
|
28590
|
-
return "email";
|
|
28591
|
-
default:
|
|
28592
|
-
return "text";
|
|
28593
|
-
}
|
|
28594
|
-
};
|
|
28767
|
+
|
|
28768
|
+
|
|
28769
|
+
;// ./src/StoryReader/Story/Widgets/TextInputModal/TextInputModalBody/helpers/index.ts
|
|
28770
|
+
|
|
28595
28771
|
|
|
28596
28772
|
;// ./src/StoryReader/Story/Widgets/TextInputModal/TextInputModalBody/controls/TelephoneInput/phoneMasks.ts
|
|
28597
28773
|
const phoneMasks = {
|
|
@@ -28847,11 +29023,11 @@ const useTextInputForm = (config) => {
|
|
|
28847
29023
|
};
|
|
28848
29024
|
const validate = (value) => {
|
|
28849
29025
|
var _a;
|
|
28850
|
-
const inputType =
|
|
29026
|
+
const inputType = (0,helpers/* mapTextInputType */.mj)((_a = config === null || config === void 0 ? void 0 : config.configV2.main.input.type) !== null && _a !== void 0 ? _a : "");
|
|
28851
29027
|
if (inputType === "email")
|
|
28852
|
-
return
|
|
29028
|
+
return helpers/* TextInputValidator */.gR.isEmailValid(value);
|
|
28853
29029
|
if (inputType === "tel")
|
|
28854
|
-
return
|
|
29030
|
+
return helpers/* TextInputValidator */.gR.isTelephoneValid(getPhoneMask(), telephone.phone);
|
|
28855
29031
|
return true;
|
|
28856
29032
|
};
|
|
28857
29033
|
const handleChange = (value) => {
|
|
@@ -29416,7 +29592,7 @@ const TextInputModalBody = (_a) => {
|
|
|
29416
29592
|
const placeholder = String(config.configV2.main.input.text.placeholder).trim();
|
|
29417
29593
|
const buttonName = String(config.configV2.main.button.text.value).trim();
|
|
29418
29594
|
const question = String(config.configV2.main.question.text.value).trim();
|
|
29419
|
-
const inputType =
|
|
29595
|
+
const inputType = (0,helpers/* mapTextInputType */.mj)(config.configV2.main.input.type);
|
|
29420
29596
|
const onSubmit = ({ value }) => {
|
|
29421
29597
|
props.onComplete({ result: true, value });
|
|
29422
29598
|
setIsVisible(false);
|