@wix/blog 1.0.697 → 1.0.699
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/_sdk-exports/{context-blog-feed-context-provider → context-blog-feed}/runtime.js +3 -3
- package/_sdk-exports/{context-post-context-provider → context-post}/runtime.js +2 -2
- package/_sdk-exports/context-post-by-id/runtime.js +5 -0
- package/_sdk-exports/context-related-posts/runtime.js +5 -0
- package/blog-feed-context-provider/package.json +1 -1
- package/build/cjs/{context-blog-feed-context-provider.js → context-blog-feed.js} +201 -186
- package/build/cjs/context-blog-feed.js.map +1 -0
- package/build/cjs/{context-category-item-context-provider.js → context-category-item.js} +6 -6
- package/build/cjs/context-category-item.js.map +1 -0
- package/build/cjs/{context-post-by-id-context-provider.js → context-post-by-id.js} +480 -473
- package/build/cjs/context-post-by-id.js.map +1 -0
- package/build/cjs/{context-post-item-context-provider.js → context-post-item.js} +6 -6
- package/build/cjs/context-post-item.js.map +1 -0
- package/build/cjs/{context-post-context-provider.js → context-post.js} +214 -198
- package/build/cjs/context-post.js.map +1 -0
- package/build/cjs/{context-related-posts-context-provider.js → context-related-posts.js} +779 -763
- package/build/cjs/context-related-posts.js.map +1 -0
- package/build/cjs/{context-tag-item-context-provider.js → context-tag-item.js} +6 -6
- package/build/cjs/context-tag-item.js.map +1 -0
- package/build/es/{context-blog-feed-context-provider.mjs → context-blog-feed.mjs} +197 -182
- package/build/es/context-blog-feed.mjs.map +1 -0
- package/build/es/{context-category-item-context-provider.mjs → context-category-item.mjs} +2 -2
- package/build/es/context-category-item.mjs.map +1 -0
- package/build/es/{context-post-by-id-context-provider.mjs → context-post-by-id.mjs} +476 -469
- package/build/es/context-post-by-id.mjs.map +1 -0
- package/build/es/{context-post-item-context-provider.mjs → context-post-item.mjs} +2 -2
- package/build/es/context-post-item.mjs.map +1 -0
- package/build/es/{context-post-context-provider.mjs → context-post.mjs} +210 -194
- package/build/es/context-post.mjs.map +1 -0
- package/build/es/{context-related-posts-context-provider.mjs → context-related-posts.mjs} +775 -759
- package/build/es/context-related-posts.mjs.map +1 -0
- package/build/es/{context-tag-item-context-provider.mjs → context-tag-item.mjs} +2 -2
- package/build/es/context-tag-item.mjs.map +1 -0
- package/category-item-context-provider/package.json +1 -1
- package/context/blog-feed/package.json +3 -0
- package/context/category-item/package.json +3 -0
- package/context/post/package.json +3 -0
- package/context/post-by-id/package.json +3 -0
- package/context/post-item/package.json +3 -0
- package/context/related-posts/package.json +3 -0
- package/context/tag-item/package.json +3 -0
- package/package.json +60 -60
- package/post-by-id-context-provider/package.json +1 -1
- package/post-context-provider/package.json +1 -1
- package/post-item-context-provider/package.json +1 -1
- package/related-posts-context-provider/package.json +1 -1
- package/tag-item-context-provider/package.json +1 -1
- package/_sdk-exports/context-post-by-id-context-provider/runtime.js +0 -5
- package/_sdk-exports/context-related-posts-context-provider/runtime.js +0 -5
- package/build/cjs/context-blog-feed-context-provider.js.map +0 -1
- package/build/cjs/context-category-item-context-provider.js.map +0 -1
- package/build/cjs/context-post-by-id-context-provider.js.map +0 -1
- package/build/cjs/context-post-context-provider.js.map +0 -1
- package/build/cjs/context-post-item-context-provider.js.map +0 -1
- package/build/cjs/context-related-posts-context-provider.js.map +0 -1
- package/build/cjs/context-tag-item-context-provider.js.map +0 -1
- package/build/es/context-blog-feed-context-provider.mjs.map +0 -1
- package/build/es/context-category-item-context-provider.mjs.map +0 -1
- package/build/es/context-post-by-id-context-provider.mjs.map +0 -1
- package/build/es/context-post-context-provider.mjs.map +0 -1
- package/build/es/context-post-item-context-provider.mjs.map +0 -1
- package/build/es/context-related-posts-context-provider.mjs.map +0 -1
- package/build/es/context-tag-item-context-provider.mjs.map +0 -1
- package/context/blog-feed-context-provider/package.json +0 -3
- package/context/category-item-context-provider/package.json +0 -3
- package/context/post-by-id-context-provider/package.json +0 -3
- package/context/post-context-provider/package.json +0 -3
- package/context/post-item-context-provider/package.json +0 -3
- package/context/related-posts-context-provider/package.json +0 -3
- package/context/tag-item-context-provider/package.json +0 -3
- /package/_sdk-exports/{context-blog-feed-context-provider → context-blog-feed}/runtime.d.ts +0 -0
- /package/_sdk-exports/{context-category-item-context-provider → context-category-item}/runtime.d.ts +0 -0
- /package/_sdk-exports/{context-category-item-context-provider → context-category-item}/runtime.js +0 -0
- /package/_sdk-exports/{context-post-context-provider → context-post}/runtime.d.ts +0 -0
- /package/_sdk-exports/{context-post-by-id-context-provider → context-post-by-id}/runtime.d.ts +0 -0
- /package/_sdk-exports/{context-post-item-context-provider → context-post-item}/runtime.d.ts +0 -0
- /package/_sdk-exports/{context-post-item-context-provider → context-post-item}/runtime.js +0 -0
- /package/_sdk-exports/{context-related-posts-context-provider → context-related-posts}/runtime.d.ts +0 -0
- /package/_sdk-exports/{context-tag-item-context-provider → context-tag-item}/runtime.d.ts +0 -0
- /package/_sdk-exports/{context-tag-item-context-provider → context-tag-item}/runtime.js +0 -0
- /package/build/cjs/{context-blog-feed-context-provider.d.ts → context-blog-feed.d.ts} +0 -0
- /package/build/cjs/{context-category-item-context-provider.d.ts → context-category-item.d.ts} +0 -0
- /package/build/cjs/{context-post-by-id-context-provider.d.ts → context-post-by-id.d.ts} +0 -0
- /package/build/cjs/{context-post-item-context-provider.d.ts → context-post-item.d.ts} +0 -0
- /package/build/cjs/{context-post-context-provider.d.ts → context-post.d.ts} +0 -0
- /package/build/cjs/{context-related-posts-context-provider.d.ts → context-related-posts.d.ts} +0 -0
- /package/build/cjs/{context-tag-item-context-provider.d.ts → context-tag-item.d.ts} +0 -0
- /package/build/es/{context-blog-feed-context-provider.d.mts → context-blog-feed.d.mts} +0 -0
- /package/build/es/{context-category-item-context-provider.d.mts → context-category-item.d.mts} +0 -0
- /package/build/es/{context-post-by-id-context-provider.d.mts → context-post-by-id.d.mts} +0 -0
- /package/build/es/{context-post-item-context-provider.d.mts → context-post-item.d.mts} +0 -0
- /package/build/es/{context-post-context-provider.d.mts → context-post.d.mts} +0 -0
- /package/build/es/{context-related-posts-context-provider.d.mts → context-related-posts.d.mts} +0 -0
- /package/build/es/{context-tag-item-context-provider.d.mts → context-tag-item.d.mts} +0 -0
- /package/build/internal/cjs/{context-blog-feed-context-provider.d.ts → context-blog-feed.d.ts} +0 -0
- /package/build/internal/cjs/{context-category-item-context-provider.d.ts → context-category-item.d.ts} +0 -0
- /package/build/internal/cjs/{context-post-by-id-context-provider.d.ts → context-post-by-id.d.ts} +0 -0
- /package/build/internal/cjs/{context-post-item-context-provider.d.ts → context-post-item.d.ts} +0 -0
- /package/build/internal/cjs/{context-post-context-provider.d.ts → context-post.d.ts} +0 -0
- /package/build/internal/cjs/{context-related-posts-context-provider.d.ts → context-related-posts.d.ts} +0 -0
- /package/build/internal/cjs/{context-tag-item-context-provider.d.ts → context-tag-item.d.ts} +0 -0
- /package/build/internal/es/{context-blog-feed-context-provider.d.mts → context-blog-feed.d.mts} +0 -0
- /package/build/internal/es/{context-category-item-context-provider.d.mts → context-category-item.d.mts} +0 -0
- /package/build/internal/es/{context-post-by-id-context-provider.d.mts → context-post-by-id.d.mts} +0 -0
- /package/build/internal/es/{context-post-item-context-provider.d.mts → context-post-item.d.mts} +0 -0
- /package/build/internal/es/{context-post-context-provider.d.mts → context-post.d.mts} +0 -0
- /package/build/internal/es/{context-related-posts-context-provider.d.mts → context-related-posts.d.mts} +0 -0
- /package/build/internal/es/{context-tag-item-context-provider.d.mts → context-tag-item.d.mts} +0 -0
|
@@ -27,17 +27,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// context-post-by-id
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
33
|
-
PostByIdProvider: () =>
|
|
34
|
-
default: () =>
|
|
35
|
-
injectAccessTokenGetter: () =>
|
|
30
|
+
// context-post-by-id.ts
|
|
31
|
+
var context_post_by_id_exports = {};
|
|
32
|
+
__export(context_post_by_id_exports, {
|
|
33
|
+
PostByIdProvider: () => rd,
|
|
34
|
+
default: () => rd,
|
|
35
|
+
injectAccessTokenGetter: () => id,
|
|
36
36
|
usePostByIdContext: () => import_post_context_provider.usePostContext
|
|
37
37
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
38
|
+
module.exports = __toCommonJS(context_post_by_id_exports);
|
|
39
39
|
|
|
40
|
-
// _sdk-exports/context-post-by-id
|
|
40
|
+
// _sdk-exports/context-post-by-id/runtime.js
|
|
41
41
|
var import_post_context_provider = __toESM(require("@wix/blog/post-context-provider"));
|
|
42
42
|
var import_react = require("react");
|
|
43
43
|
var import_services_manager_react = require("@wix/services-manager-react");
|
|
@@ -1318,8 +1318,8 @@ var Fr = (e6, t2, n2 = `.`) => {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
return i2;
|
|
1320
1320
|
};
|
|
1321
|
-
var
|
|
1322
|
-
var
|
|
1321
|
+
var Ir = (e6) => e6?.replace(/_/g, `-`);
|
|
1322
|
+
var Lr = { type: `logger`, log(e6) {
|
|
1323
1323
|
this.output(`log`, e6);
|
|
1324
1324
|
}, warn(e6) {
|
|
1325
1325
|
this.output(`warn`, e6);
|
|
@@ -1328,12 +1328,12 @@ var Ir = { type: `logger`, log(e6) {
|
|
|
1328
1328
|
}, output(e6, t2) {
|
|
1329
1329
|
console?.[e6]?.apply?.(console, t2);
|
|
1330
1330
|
} };
|
|
1331
|
-
var
|
|
1331
|
+
var V = new class e2 {
|
|
1332
1332
|
constructor(e6, t2 = {}) {
|
|
1333
1333
|
this.init(e6, t2);
|
|
1334
1334
|
}
|
|
1335
1335
|
init(e6, t2 = {}) {
|
|
1336
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1336
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Lr, this.options = t2, this.debug = t2.debug;
|
|
1337
1337
|
}
|
|
1338
1338
|
log(...e6) {
|
|
1339
1339
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1357,7 +1357,7 @@ var H = new class e2 {
|
|
|
1357
1357
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1358
1358
|
}
|
|
1359
1359
|
}();
|
|
1360
|
-
var
|
|
1360
|
+
var Rr = class {
|
|
1361
1361
|
constructor() {
|
|
1362
1362
|
this.observers = {};
|
|
1363
1363
|
}
|
|
@@ -1385,8 +1385,8 @@ var Lr = class {
|
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
1387
|
};
|
|
1388
|
-
var
|
|
1389
|
-
var
|
|
1388
|
+
var zr = /* @__PURE__ */ new WeakSet();
|
|
1389
|
+
var Br = class extends Rr {
|
|
1390
1390
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1391
1391
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1392
1392
|
}
|
|
@@ -1433,37 +1433,37 @@ var zr = class extends Lr {
|
|
|
1433
1433
|
let t2 = this.getDataByLanguage(e6);
|
|
1434
1434
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1435
1435
|
let n2 = t2[e7];
|
|
1436
|
-
return
|
|
1436
|
+
return zr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && zr.add(n2), true);
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
toJSON() {
|
|
1440
1440
|
return this.data;
|
|
1441
1441
|
}
|
|
1442
1442
|
};
|
|
1443
|
-
var
|
|
1443
|
+
var Vr = { processors: {}, addPostProcessor(e6) {
|
|
1444
1444
|
this.processors[e6.name] = e6;
|
|
1445
1445
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1446
1446
|
return e6.forEach((e7) => {
|
|
1447
1447
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1448
1448
|
}), t2;
|
|
1449
1449
|
} };
|
|
1450
|
-
var
|
|
1451
|
-
function
|
|
1450
|
+
var Hr = Symbol(`i18next/PATH_KEY`);
|
|
1451
|
+
function Ur() {
|
|
1452
1452
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1453
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1453
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Hr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
let { [
|
|
1455
|
+
function H(e6, t2) {
|
|
1456
|
+
let { [Hr]: n2 } = e6(Ur()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1457
1457
|
if (n2.length > 1 && i2) {
|
|
1458
1458
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1459
1459
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1460
1460
|
}
|
|
1461
1461
|
return n2.join(r2);
|
|
1462
1462
|
}
|
|
1463
|
-
var
|
|
1464
|
-
var
|
|
1463
|
+
var Wr = (e6) => !L(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1464
|
+
var Gr = class e3 extends Rr {
|
|
1465
1465
|
constructor(e6, t2 = {}) {
|
|
1466
|
-
super(), br([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger =
|
|
1466
|
+
super(), br([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = V.create(`translator`), this.checkedLoadedFor = {};
|
|
1467
1467
|
}
|
|
1468
1468
|
changeLanguage(e6) {
|
|
1469
1469
|
e6 && (this.language = e6);
|
|
@@ -1473,7 +1473,7 @@ var Wr = class e3 extends Lr {
|
|
|
1473
1473
|
if (e6 == null) return false;
|
|
1474
1474
|
let r2 = this.resolve(e6, n2);
|
|
1475
1475
|
if (r2?.res === void 0) return false;
|
|
1476
|
-
let i2 =
|
|
1476
|
+
let i2 = Wr(r2.res);
|
|
1477
1477
|
return !(n2.returnObjects === false && i2);
|
|
1478
1478
|
}
|
|
1479
1479
|
extractFromKey(e6, t2) {
|
|
@@ -1491,14 +1491,14 @@ var Wr = class e3 extends Lr {
|
|
|
1491
1491
|
translate(t2, n2, r2) {
|
|
1492
1492
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1493
1493
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1494
|
-
typeof t2 == `function` && (t2 =
|
|
1494
|
+
typeof t2 == `function` && (t2 = H(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? H(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1495
1495
|
let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
|
|
1496
1496
|
u2 === void 0 && (u2 = `:`);
|
|
1497
1497
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1498
1498
|
if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
|
|
1499
1499
|
let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !L(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, ee2 = b2 && !i2.ordinal && i2.count === 0, w2 = ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, T2 = m2;
|
|
1500
1500
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1501
|
-
let te2 =
|
|
1501
|
+
let te2 = Wr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1502
1502
|
if (y2 && T2 && te2 && !_2.includes(ne2) && !(L(v2) && Array.isArray(T2))) {
|
|
1503
1503
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1504
1504
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
@@ -1509,7 +1509,7 @@ var Wr = class e3 extends Lr {
|
|
|
1509
1509
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1510
1510
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1511
1511
|
let r3 = `${n3}${o2}${e7}`;
|
|
1512
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1512
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Wr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1513
1513
|
}
|
|
1514
1514
|
m2 = t3;
|
|
1515
1515
|
}
|
|
@@ -1558,11 +1558,11 @@ var Wr = class e3 extends Lr {
|
|
|
1558
1558
|
!n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e6 = this.interpolator.nest(e6, (...e7) => i2?.[0] === e7[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e7[0]} in key: ${t2[0]}`), null) : this.translate(...e7, t2), n2)), n2.interpolation && this.interpolator.reset();
|
|
1559
1559
|
}
|
|
1560
1560
|
let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
|
|
1561
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1561
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Vr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1562
1562
|
}
|
|
1563
1563
|
resolve(e6, t2 = {}) {
|
|
1564
1564
|
let n2, r2, i2, a2, o2;
|
|
1565
|
-
return L(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ?
|
|
1565
|
+
return L(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? H(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1566
1566
|
if (this.isValidLookup(n2)) return;
|
|
1567
1567
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1568
1568
|
r2 = c2;
|
|
@@ -1609,20 +1609,20 @@ var Wr = class e3 extends Lr {
|
|
|
1609
1609
|
return false;
|
|
1610
1610
|
}
|
|
1611
1611
|
};
|
|
1612
|
-
var
|
|
1612
|
+
var Kr = class {
|
|
1613
1613
|
constructor(e6) {
|
|
1614
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1614
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = V.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1615
1615
|
}
|
|
1616
1616
|
clearCache() {
|
|
1617
1617
|
this.resolveHierarchyCache = {};
|
|
1618
1618
|
}
|
|
1619
1619
|
getScriptPartFromCode(e6) {
|
|
1620
|
-
if (e6 =
|
|
1620
|
+
if (e6 = Ir(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1621
1621
|
let t2 = e6.split(`-`);
|
|
1622
1622
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1623
1623
|
}
|
|
1624
1624
|
getLanguagePartFromCode(e6) {
|
|
1625
|
-
if (e6 =
|
|
1625
|
+
if (e6 = Ir(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1626
1626
|
let t2 = e6.split(`-`);
|
|
1627
1627
|
return this.formatLanguageCode(t2[0]);
|
|
1628
1628
|
}
|
|
@@ -1683,24 +1683,24 @@ var Gr = class {
|
|
|
1683
1683
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1684
1684
|
}
|
|
1685
1685
|
};
|
|
1686
|
-
var
|
|
1687
|
-
var
|
|
1688
|
-
var
|
|
1686
|
+
var qr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1687
|
+
var Jr = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1688
|
+
var Yr = class {
|
|
1689
1689
|
constructor(e6, t2 = {}) {
|
|
1690
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1690
|
+
this.languageUtils = e6, this.options = t2, this.logger = V.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1691
1691
|
}
|
|
1692
1692
|
clearCache() {
|
|
1693
1693
|
this.pluralRulesCache = {};
|
|
1694
1694
|
}
|
|
1695
1695
|
getRule(e6, t2 = {}) {
|
|
1696
|
-
let n2 =
|
|
1696
|
+
let n2 = Ir(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1697
1697
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1698
1698
|
let a2;
|
|
1699
1699
|
try {
|
|
1700
1700
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1701
1701
|
} catch {
|
|
1702
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1703
|
-
if (!e6.match(/-|_/)) return
|
|
1702
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Jr;
|
|
1703
|
+
if (!e6.match(/-|_/)) return Jr;
|
|
1704
1704
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1705
1705
|
a2 = this.getRule(n3, t2);
|
|
1706
1706
|
}
|
|
@@ -1715,21 +1715,21 @@ var Jr = class {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
getSuffixes(e6, t2 = {}) {
|
|
1717
1717
|
let n2 = this.getRule(e6, t2);
|
|
1718
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1718
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => qr[e7] - qr[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
|
|
1719
1719
|
}
|
|
1720
1720
|
getSuffix(e6, t2, n2 = {}) {
|
|
1721
1721
|
let r2 = this.getRule(e6, n2);
|
|
1722
1722
|
return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e6}`), this.getSuffix(`dev`, t2, n2));
|
|
1723
1723
|
}
|
|
1724
1724
|
};
|
|
1725
|
-
var
|
|
1725
|
+
var Xr = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1726
1726
|
let a2 = Dr(e6, t2, n2);
|
|
1727
1727
|
return !a2 && i2 && L(n2) && (a2 = Fr(e6, n2, r2), a2 === void 0 && (a2 = Fr(t2, n2, r2))), a2;
|
|
1728
1728
|
};
|
|
1729
|
-
var
|
|
1730
|
-
var
|
|
1729
|
+
var Zr = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1730
|
+
var Qr = class {
|
|
1731
1731
|
constructor(e6 = {}) {
|
|
1732
|
-
this.logger =
|
|
1732
|
+
this.logger = V.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1733
1733
|
}
|
|
1734
1734
|
init(e6 = {}) {
|
|
1735
1735
|
e6.interpolation ||= { escapeValue: true };
|
|
@@ -1746,11 +1746,11 @@ var Zr = class {
|
|
|
1746
1746
|
interpolate(e6, t2, n2, r2) {
|
|
1747
1747
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1748
1748
|
if (!e7.includes(this.formatSeparator)) {
|
|
1749
|
-
let i4 =
|
|
1749
|
+
let i4 = Xr(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1750
1750
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1751
1751
|
}
|
|
1752
1752
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1753
|
-
return this.format(
|
|
1753
|
+
return this.format(Xr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1754
1754
|
};
|
|
1755
1755
|
this.resetRegExp(), !this.escapeValue && typeof e6 == `string` && /\$t\([^)]*\{[^}]*\{\{/.test(e6) && this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);
|
|
1756
1756
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1768,7 +1768,7 @@ var Zr = class {
|
|
|
1768
1768
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1769
1769
|
} else !L(a2) && !this.useRawValueToEscape && (a2 = yr(a2));
|
|
1770
1770
|
let s3 = t3.safeValue(a2);
|
|
1771
|
-
if (e6 = e6.replace(i2[0],
|
|
1771
|
+
if (e6 = e6.replace(i2[0], Zr(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1772
1772
|
}
|
|
1773
1773
|
}), e6;
|
|
1774
1774
|
}
|
|
@@ -1797,7 +1797,7 @@ var Zr = class {
|
|
|
1797
1797
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1798
1798
|
}
|
|
1799
1799
|
};
|
|
1800
|
-
var
|
|
1800
|
+
var $r = (e6) => {
|
|
1801
1801
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1802
1802
|
if (e6.includes(`(`)) {
|
|
1803
1803
|
let r2 = e6.split(`(`);
|
|
@@ -1812,23 +1812,23 @@ var Qr = (e6) => {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
return { formatName: t2, formatOptions: n2 };
|
|
1814
1814
|
};
|
|
1815
|
-
var
|
|
1815
|
+
var ei = (e6) => {
|
|
1816
1816
|
let t2 = {};
|
|
1817
1817
|
return (n2, r2, i2) => {
|
|
1818
1818
|
let a2 = i2;
|
|
1819
1819
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1820
1820
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1821
|
-
return s2 || (s2 = e6(
|
|
1821
|
+
return s2 || (s2 = e6(Ir(r2), i2), t2[o2] = s2), s2(n2);
|
|
1822
1822
|
};
|
|
1823
1823
|
};
|
|
1824
|
-
var
|
|
1825
|
-
var
|
|
1824
|
+
var ti = (e6) => (t2, n2, r2) => e6(Ir(n2), r2)(t2);
|
|
1825
|
+
var ni = class {
|
|
1826
1826
|
constructor(e6 = {}) {
|
|
1827
|
-
this.logger =
|
|
1827
|
+
this.logger = V.create(`formatter`), this.options = e6, this.init(e6);
|
|
1828
1828
|
}
|
|
1829
1829
|
init(e6, t2 = { interpolation: {} }) {
|
|
1830
1830
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1831
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1831
|
+
let n2 = t2.cacheInBuiltFormats ? ei : ti;
|
|
1832
1832
|
this.formats = { number: n2((e7, t3) => {
|
|
1833
1833
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1834
1834
|
return (e8) => n3.format(e8);
|
|
@@ -1850,7 +1850,7 @@ var ti = class {
|
|
|
1850
1850
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1851
1851
|
}
|
|
1852
1852
|
addCached(e6, t2) {
|
|
1853
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1853
|
+
this.formats[e6.toLowerCase().trim()] = ei(t2);
|
|
1854
1854
|
}
|
|
1855
1855
|
format(e6, t2, n2, r2 = {}) {
|
|
1856
1856
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1861,7 +1861,7 @@ var ti = class {
|
|
|
1861
1861
|
a2.push(t3);
|
|
1862
1862
|
}
|
|
1863
1863
|
return a2.reduce((e7, t3) => {
|
|
1864
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1864
|
+
let { formatName: i3, formatOptions: a3 } = $r(t3);
|
|
1865
1865
|
if (this.formats[i3]) {
|
|
1866
1866
|
let t4 = e7;
|
|
1867
1867
|
try {
|
|
@@ -1876,12 +1876,12 @@ var ti = class {
|
|
|
1876
1876
|
}, e6);
|
|
1877
1877
|
}
|
|
1878
1878
|
};
|
|
1879
|
-
var
|
|
1879
|
+
var ri = (e6, t2) => {
|
|
1880
1880
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1881
1881
|
};
|
|
1882
|
-
var
|
|
1882
|
+
var ii = class extends Rr {
|
|
1883
1883
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1884
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1884
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = V.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
|
|
1885
1885
|
}
|
|
1886
1886
|
queueLoad(e6, t2, n2, r2) {
|
|
1887
1887
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1898,7 +1898,7 @@ var ri = class extends Lr {
|
|
|
1898
1898
|
t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e6] = t2 ? -1 : 2, t2 && n2 && (this.state[e6] = 0);
|
|
1899
1899
|
let o2 = {};
|
|
1900
1900
|
this.queue.forEach((n3) => {
|
|
1901
|
-
Tr(n3.loaded, [i2], a2),
|
|
1901
|
+
Tr(n3.loaded, [i2], a2), ri(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1902
1902
|
o2[e7] || (o2[e7] = {});
|
|
1903
1903
|
let t3 = n3.loaded[e7];
|
|
1904
1904
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1970,7 +1970,7 @@ var ri = class extends Lr {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
1972
1972
|
};
|
|
1973
|
-
var
|
|
1973
|
+
var ai = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, enableSelector: false, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e6) => {
|
|
1974
1974
|
let t2 = {};
|
|
1975
1975
|
if (typeof e6[1] == `object` && (t2 = e6[1]), L(e6[1]) && (t2.defaultValue = e6[1]), L(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1976
1976
|
let n2 = e6[3] || e6[2];
|
|
@@ -1980,17 +1980,17 @@ var ii = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1980
1980
|
}
|
|
1981
1981
|
return t2;
|
|
1982
1982
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1983
|
-
var
|
|
1984
|
-
var
|
|
1983
|
+
var oi = (e6) => (L(e6.ns) && (e6.ns = [e6.ns]), L(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), L(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
1984
|
+
var si = () => {
|
|
1985
1985
|
};
|
|
1986
|
-
var
|
|
1986
|
+
var ci = (e6) => {
|
|
1987
1987
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
1988
1988
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
1989
1989
|
});
|
|
1990
1990
|
};
|
|
1991
|
-
var
|
|
1991
|
+
var U = class e4 extends Rr {
|
|
1992
1992
|
constructor(e6 = {}, t2) {
|
|
1993
|
-
if (super(), this.options =
|
|
1993
|
+
if (super(), this.options = oi(e6), this.services = {}, this.logger = V, this.modules = { external: [] }, ci(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
1994
1994
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
1995
1995
|
setTimeout(() => {
|
|
1996
1996
|
this.init(e6, t2);
|
|
@@ -1999,25 +1999,25 @@ var W = class e4 extends Lr {
|
|
|
1999
1999
|
}
|
|
2000
2000
|
init(e6 = {}, t2) {
|
|
2001
2001
|
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (L(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
2002
|
-
let n2 =
|
|
2003
|
-
this.options = { ...n2, ...this.options, ...
|
|
2002
|
+
let n2 = ai();
|
|
2003
|
+
this.options = { ...n2, ...this.options, ...oi(e6) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e6.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e6.keySeparator), e6.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e6.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler);
|
|
2004
2004
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
2005
2005
|
if (!this.options.isClone) {
|
|
2006
|
-
this.modules.logger ?
|
|
2006
|
+
this.modules.logger ? V.init(r2(this.modules.logger), this.options) : V.init(null, this.options);
|
|
2007
2007
|
let e7;
|
|
2008
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
2009
|
-
let t3 = new
|
|
2010
|
-
this.store = new
|
|
2008
|
+
e7 = this.modules.formatter ? this.modules.formatter : ni;
|
|
2009
|
+
let t3 = new Kr(this.options);
|
|
2010
|
+
this.store = new Br(this.options.resources, this.options);
|
|
2011
2011
|
let n3 = this.services;
|
|
2012
|
-
n3.logger =
|
|
2012
|
+
n3.logger = V, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new Yr(t3, { prepend: this.options.pluralSeparator }), e7 && (n3.formatter = r2(e7), n3.formatter.init && n3.formatter.init(n3, this.options), this.options.interpolation.format = n3.formatter.format.bind(n3.formatter)), n3.interpolator = new Qr(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new ii(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2013
2013
|
this.emit(e8, ...t4);
|
|
2014
|
-
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new
|
|
2014
|
+
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new Gr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2015
2015
|
this.emit(e8, ...t4);
|
|
2016
2016
|
}), this.modules.external.forEach((e8) => {
|
|
2017
2017
|
e8.init && e8.init(this);
|
|
2018
2018
|
});
|
|
2019
2019
|
}
|
|
2020
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2020
|
+
if (this.format = this.options.interpolation.format, t2 ||= si, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2021
2021
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2022
2022
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2023
2023
|
}
|
|
@@ -2035,7 +2035,7 @@ var W = class e4 extends Lr {
|
|
|
2035
2035
|
};
|
|
2036
2036
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2037
2037
|
}
|
|
2038
|
-
loadResources(e6, t2 =
|
|
2038
|
+
loadResources(e6, t2 = si) {
|
|
2039
2039
|
let n2 = t2, r2 = L(e6) ? e6 : this.language;
|
|
2040
2040
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2041
2041
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
@@ -2051,14 +2051,14 @@ var W = class e4 extends Lr {
|
|
|
2051
2051
|
}
|
|
2052
2052
|
reloadResources(e6, t2, n2) {
|
|
2053
2053
|
let r2 = R();
|
|
2054
|
-
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||=
|
|
2054
|
+
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= si, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2055
2055
|
r2.resolve(), n2(e7);
|
|
2056
2056
|
}), r2;
|
|
2057
2057
|
}
|
|
2058
2058
|
use(e6) {
|
|
2059
2059
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2060
2060
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2061
|
-
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` &&
|
|
2061
|
+
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && Vr.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2062
2062
|
}
|
|
2063
2063
|
setResolvedLanguage(e6) {
|
|
2064
2064
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2096,9 +2096,9 @@ var W = class e4 extends Lr {
|
|
|
2096
2096
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2097
2097
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2098
2098
|
let c2 = { ...this.options, ...o2 };
|
|
2099
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2099
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = H(o2.keyPrefix, c2));
|
|
2100
2100
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2101
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2101
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = H(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = H(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2102
2102
|
};
|
|
2103
2103
|
return L(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2104
2104
|
}
|
|
@@ -2152,24 +2152,24 @@ var W = class e4 extends Lr {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
} catch {
|
|
2154
2154
|
}
|
|
2155
|
-
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new
|
|
2155
|
+
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new Kr(ai());
|
|
2156
2156
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2157
2157
|
}
|
|
2158
2158
|
static createInstance(t2 = {}, n2) {
|
|
2159
2159
|
let r2 = new e4(t2, n2);
|
|
2160
2160
|
return r2.createInstance = e4.createInstance, r2;
|
|
2161
2161
|
}
|
|
2162
|
-
cloneInstance(t2 = {}, n2 =
|
|
2162
|
+
cloneInstance(t2 = {}, n2 = si) {
|
|
2163
2163
|
let r2 = t2.forkResourceStore;
|
|
2164
2164
|
r2 && delete t2.forkResourceStore;
|
|
2165
2165
|
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2166
2166
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2167
2167
|
a2[e6] = this[e6];
|
|
2168
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2169
|
-
let e6 = { ...
|
|
2170
|
-
a2.services.interpolator = new
|
|
2168
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Br(Object.keys(this.store.data).reduce((e6, t3) => (e6[t3] = { ...this.store.data[t3] }, e6[t3] = Object.keys(e6[t3]).reduce((n3, r3) => (n3[r3] = { ...e6[t3][r3] }, n3), e6[t3]), e6), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
|
|
2169
|
+
let e6 = { ...ai().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2170
|
+
a2.services.interpolator = new Qr(n3);
|
|
2171
2171
|
}
|
|
2172
|
-
return a2.translator = new
|
|
2172
|
+
return a2.translator = new Gr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2173
2173
|
a2.emit(e6, ...t3);
|
|
2174
2174
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2175
2175
|
}
|
|
@@ -2177,9 +2177,9 @@ var W = class e4 extends Lr {
|
|
|
2177
2177
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2178
2178
|
}
|
|
2179
2179
|
}.createInstance();
|
|
2180
|
-
|
|
2181
|
-
var
|
|
2182
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2180
|
+
U.createInstance, U.dir, U.init, U.loadResources, U.reloadResources, U.use, U.changeLanguage, U.getFixedT, U.t, U.exists, U.setDefaultNamespace, U.hasLoadedNamespace, U.loadNamespaces, U.loadLanguages;
|
|
2181
|
+
var li = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2182
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = U.createInstance(i2 ? s2 : void 0);
|
|
2183
2183
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2184
2184
|
try {
|
|
2185
2185
|
return r3(null, await t2(e7));
|
|
@@ -2188,8 +2188,8 @@ var ci = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2188
2188
|
}
|
|
2189
2189
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2190
2190
|
};
|
|
2191
|
-
var
|
|
2192
|
-
function
|
|
2191
|
+
var ui = [`__proto__`, `constructor`, `prototype`];
|
|
2192
|
+
function di(e6, t2, n2) {
|
|
2193
2193
|
function r2(e7) {
|
|
2194
2194
|
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
2195
2195
|
}
|
|
@@ -2199,64 +2199,64 @@ function ui(e6, t2, n2) {
|
|
|
2199
2199
|
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
2200
2200
|
if (i2()) return {};
|
|
2201
2201
|
var o2 = r2(a2.shift());
|
|
2202
|
-
if (
|
|
2202
|
+
if (ui.indexOf(o2) > -1) return {};
|
|
2203
2203
|
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
2204
2204
|
}
|
|
2205
2205
|
if (i2()) return {};
|
|
2206
2206
|
var s2 = r2(a2.shift());
|
|
2207
|
-
return
|
|
2207
|
+
return ui.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
2208
2208
|
}
|
|
2209
|
-
function
|
|
2210
|
-
var r2 =
|
|
2209
|
+
function fi(e6, t2, n2) {
|
|
2210
|
+
var r2 = di(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
2211
2211
|
i2 !== void 0 && (i2[a2] = n2);
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2214
|
-
var n2 =
|
|
2213
|
+
function pi(e6, t2) {
|
|
2214
|
+
var n2 = di(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
2215
2215
|
if (r2) return r2[i2];
|
|
2216
2216
|
}
|
|
2217
|
-
var
|
|
2218
|
-
var
|
|
2219
|
-
var
|
|
2220
|
-
function
|
|
2221
|
-
return
|
|
2217
|
+
var mi = [];
|
|
2218
|
+
var hi = mi.forEach;
|
|
2219
|
+
var gi = mi.slice;
|
|
2220
|
+
function _i(e6) {
|
|
2221
|
+
return hi.call(gi.call(arguments, 1), function(t2) {
|
|
2222
2222
|
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
2223
2223
|
var i2 = r2[n2];
|
|
2224
|
-
|
|
2224
|
+
ui.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
2225
2225
|
}
|
|
2226
2226
|
}), e6;
|
|
2227
2227
|
}
|
|
2228
|
-
function
|
|
2229
|
-
let n2 = t2 && t2.cache ? t2.cache :
|
|
2230
|
-
return (t2 && t2.strategy ? t2.strategy :
|
|
2228
|
+
function vi(e6, t2) {
|
|
2229
|
+
let n2 = t2 && t2.cache ? t2.cache : Oi, r2 = t2 && t2.serializer ? t2.serializer : Ei;
|
|
2230
|
+
return (t2 && t2.strategy ? t2.strategy : Ci)(e6, { cache: n2, serializer: r2 });
|
|
2231
2231
|
}
|
|
2232
|
-
function
|
|
2232
|
+
function yi(e6) {
|
|
2233
2233
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2234
2234
|
}
|
|
2235
|
-
function
|
|
2236
|
-
let i2 =
|
|
2235
|
+
function bi(e6, t2, n2, r2) {
|
|
2236
|
+
let i2 = yi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2237
2237
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2239
|
+
function xi(e6, t2, n2) {
|
|
2240
2240
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2241
2241
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2243
|
+
function Si(e6, t2, n2, r2, i2) {
|
|
2244
2244
|
return n2.bind(t2, e6, r2, i2);
|
|
2245
2245
|
}
|
|
2246
|
-
function Si(e6, t2) {
|
|
2247
|
-
let n2 = e6.length === 1 ? yi : bi;
|
|
2248
|
-
return xi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2249
|
-
}
|
|
2250
2246
|
function Ci(e6, t2) {
|
|
2251
|
-
|
|
2247
|
+
let n2 = e6.length === 1 ? bi : xi;
|
|
2248
|
+
return Si(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2252
2249
|
}
|
|
2253
2250
|
function wi(e6, t2) {
|
|
2254
|
-
return
|
|
2251
|
+
return Si(e6, this, xi, t2.cache.create(), t2.serializer);
|
|
2252
|
+
}
|
|
2253
|
+
function Ti(e6, t2) {
|
|
2254
|
+
return Si(e6, this, bi, t2.cache.create(), t2.serializer);
|
|
2255
2255
|
}
|
|
2256
|
-
var
|
|
2256
|
+
var Ei = function() {
|
|
2257
2257
|
return JSON.stringify(arguments);
|
|
2258
2258
|
};
|
|
2259
|
-
var
|
|
2259
|
+
var Di = class {
|
|
2260
2260
|
constructor() {
|
|
2261
2261
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2262
2262
|
}
|
|
@@ -2267,14 +2267,14 @@ var Ei = class {
|
|
|
2267
2267
|
this.cache[e6] = t2;
|
|
2268
2268
|
}
|
|
2269
2269
|
};
|
|
2270
|
-
var
|
|
2271
|
-
return new
|
|
2270
|
+
var Oi = { create: function() {
|
|
2271
|
+
return new Di();
|
|
2272
2272
|
} };
|
|
2273
|
-
var
|
|
2274
|
-
var
|
|
2275
|
-
function
|
|
2273
|
+
var ki = { variadic: wi, monadic: Ti };
|
|
2274
|
+
var Ai = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
2275
|
+
function ji(e6) {
|
|
2276
2276
|
let t2 = {};
|
|
2277
|
-
return e6.replace(
|
|
2277
|
+
return e6.replace(Ai, (e7) => {
|
|
2278
2278
|
let n2 = e7.length;
|
|
2279
2279
|
switch (e7[0]) {
|
|
2280
2280
|
case `G`:
|
|
@@ -2361,10 +2361,10 @@ function Ai(e6) {
|
|
|
2361
2361
|
return ``;
|
|
2362
2362
|
}), t2;
|
|
2363
2363
|
}
|
|
2364
|
-
var
|
|
2365
|
-
function
|
|
2364
|
+
var Mi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2365
|
+
function Ni(e6) {
|
|
2366
2366
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2367
|
-
let t2 = e6.split(
|
|
2367
|
+
let t2 = e6.split(Mi).filter((e7) => e7.length > 0), n2 = [];
|
|
2368
2368
|
for (let e7 of t2) {
|
|
2369
2369
|
let t3 = e7.split(`/`);
|
|
2370
2370
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2374,20 +2374,20 @@ function Mi(e6) {
|
|
|
2374
2374
|
}
|
|
2375
2375
|
return n2;
|
|
2376
2376
|
}
|
|
2377
|
-
function
|
|
2377
|
+
function Pi(e6) {
|
|
2378
2378
|
return e6.replace(/^(.*?)-/, ``);
|
|
2379
2379
|
}
|
|
2380
|
-
var
|
|
2381
|
-
var
|
|
2382
|
-
var
|
|
2383
|
-
var
|
|
2384
|
-
function
|
|
2380
|
+
var Fi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2381
|
+
var Ii = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2382
|
+
var Li = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2383
|
+
var Ri = /^(0+)$/;
|
|
2384
|
+
function zi(e6) {
|
|
2385
2385
|
let t2 = {};
|
|
2386
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2386
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Ii, function(e7, n2, r2) {
|
|
2387
2387
|
return typeof r2 == `string` ? r2 === `+` ? t2.minimumSignificantDigits = n2.length : n2[0] === `#` ? t2.maximumSignificantDigits = n2.length : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length + (typeof r2 == `string` ? r2.length : 0)) : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length), ``;
|
|
2388
2388
|
}), t2;
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2390
|
+
function Bi(e6) {
|
|
2391
2391
|
switch (e6) {
|
|
2392
2392
|
case `sign-auto`:
|
|
2393
2393
|
return { signDisplay: `auto` };
|
|
@@ -2411,19 +2411,19 @@ function zi(e6) {
|
|
|
2411
2411
|
return { signDisplay: `never` };
|
|
2412
2412
|
}
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function Vi(e6) {
|
|
2415
2415
|
let t2;
|
|
2416
2416
|
if (e6[0] === `E` && e6[1] === `E` ? (t2 = { notation: `engineering` }, e6 = e6.slice(2)) : e6[0] === `E` && (t2 = { notation: `scientific` }, e6 = e6.slice(1)), t2) {
|
|
2417
2417
|
let n2 = e6.slice(0, 2);
|
|
2418
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2418
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Ri.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2419
2419
|
t2.minimumIntegerDigits = e6.length;
|
|
2420
2420
|
}
|
|
2421
2421
|
return t2;
|
|
2422
2422
|
}
|
|
2423
|
-
function Vi(e6) {
|
|
2424
|
-
return zi(e6) || {};
|
|
2425
|
-
}
|
|
2426
2423
|
function Hi(e6) {
|
|
2424
|
+
return Bi(e6) || {};
|
|
2425
|
+
}
|
|
2426
|
+
function Ui(e6) {
|
|
2427
2427
|
let t2 = {};
|
|
2428
2428
|
for (let n2 of e6) {
|
|
2429
2429
|
switch (n2.stem) {
|
|
@@ -2447,7 +2447,7 @@ function Hi(e6) {
|
|
|
2447
2447
|
continue;
|
|
2448
2448
|
case `measure-unit`:
|
|
2449
2449
|
case `unit`:
|
|
2450
|
-
t2.style = `unit`, t2.unit =
|
|
2450
|
+
t2.style = `unit`, t2.unit = Pi(n2.options[0]);
|
|
2451
2451
|
continue;
|
|
2452
2452
|
case `compact-short`:
|
|
2453
2453
|
case `K`:
|
|
@@ -2458,10 +2458,10 @@ function Hi(e6) {
|
|
|
2458
2458
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2459
2459
|
continue;
|
|
2460
2460
|
case `scientific`:
|
|
2461
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2461
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Hi(t3) }), {}) };
|
|
2462
2462
|
continue;
|
|
2463
2463
|
case `engineering`:
|
|
2464
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2464
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Hi(t3) }), {}) };
|
|
2465
2465
|
continue;
|
|
2466
2466
|
case `notation-simple`:
|
|
2467
2467
|
t2.notation = `standard`;
|
|
@@ -2504,7 +2504,7 @@ function Hi(e6) {
|
|
|
2504
2504
|
continue;
|
|
2505
2505
|
case `integer-width`:
|
|
2506
2506
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2507
|
-
n2.options[0].replace(
|
|
2507
|
+
n2.options[0].replace(Li, function(e8, n3, r3, i2, a2, o2) {
|
|
2508
2508
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2509
2509
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2510
2510
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2512,68 +2512,68 @@ function Hi(e6) {
|
|
|
2512
2512
|
});
|
|
2513
2513
|
continue;
|
|
2514
2514
|
}
|
|
2515
|
-
if (
|
|
2515
|
+
if (Ri.test(n2.stem)) {
|
|
2516
2516
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2517
2517
|
continue;
|
|
2518
2518
|
}
|
|
2519
|
-
if (
|
|
2519
|
+
if (Fi.test(n2.stem)) {
|
|
2520
2520
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2521
|
-
n2.stem.replace(
|
|
2521
|
+
n2.stem.replace(Fi, function(e9, n3, r3, i2, a2, o2) {
|
|
2522
2522
|
return r3 === `*` ? t2.minimumFractionDigits = n3.length : i2 && i2[0] === `#` ? t2.maximumFractionDigits = i2.length : a2 && o2 ? (t2.minimumFractionDigits = a2.length, t2.maximumFractionDigits = a2.length + o2.length) : (t2.minimumFractionDigits = n3.length, t2.maximumFractionDigits = n3.length), ``;
|
|
2523
2523
|
});
|
|
2524
2524
|
let e8 = n2.options[0];
|
|
2525
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2525
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...zi(e8) });
|
|
2526
2526
|
continue;
|
|
2527
2527
|
}
|
|
2528
|
-
if (
|
|
2529
|
-
t2 = { ...t2, ...
|
|
2528
|
+
if (Ii.test(n2.stem)) {
|
|
2529
|
+
t2 = { ...t2, ...zi(n2.stem) };
|
|
2530
2530
|
continue;
|
|
2531
2531
|
}
|
|
2532
|
-
let e7 =
|
|
2532
|
+
let e7 = Bi(n2.stem);
|
|
2533
2533
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2534
|
-
let r2 =
|
|
2534
|
+
let r2 = Vi(n2.stem);
|
|
2535
2535
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2536
2536
|
}
|
|
2537
2537
|
return t2;
|
|
2538
2538
|
}
|
|
2539
|
-
var
|
|
2539
|
+
var Wi = function(e6) {
|
|
2540
2540
|
return e6[e6.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e6[e6.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e6[e6.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e6[e6.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e6[e6.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e6[e6.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e6[e6.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e6[e6.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e6[e6.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e6[e6.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e6[e6.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e6[e6.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e6[e6.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e6[e6.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e6[e6.INVALID_TAG = 23] = `INVALID_TAG`, e6[e6.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e6[e6.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e6[e6.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`, e6;
|
|
2541
2541
|
}({});
|
|
2542
|
-
function
|
|
2542
|
+
function Gi(e6) {
|
|
2543
2543
|
return e6.type === 0;
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function Ki(e6) {
|
|
2546
2546
|
return e6.type === 1;
|
|
2547
2547
|
}
|
|
2548
|
-
function
|
|
2548
|
+
function qi(e6) {
|
|
2549
2549
|
return e6.type === 2;
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2551
|
+
function Ji(e6) {
|
|
2552
2552
|
return e6.type === 3;
|
|
2553
2553
|
}
|
|
2554
|
-
function
|
|
2554
|
+
function Yi(e6) {
|
|
2555
2555
|
return e6.type === 4;
|
|
2556
2556
|
}
|
|
2557
|
-
function
|
|
2557
|
+
function Xi(e6) {
|
|
2558
2558
|
return e6.type === 5;
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function Zi(e6) {
|
|
2561
2561
|
return e6.type === 6;
|
|
2562
2562
|
}
|
|
2563
|
-
function
|
|
2563
|
+
function Qi(e6) {
|
|
2564
2564
|
return e6.type === 7;
|
|
2565
2565
|
}
|
|
2566
|
-
function
|
|
2566
|
+
function $i(e6) {
|
|
2567
2567
|
return e6.type === 8;
|
|
2568
2568
|
}
|
|
2569
|
-
function
|
|
2569
|
+
function ea(e6) {
|
|
2570
2570
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function ta(e6) {
|
|
2573
2573
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2574
2574
|
}
|
|
2575
|
-
var
|
|
2576
|
-
var
|
|
2575
|
+
var na = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2576
|
+
var W = { "001": [`H`, `h`], 419: [`h`, `H`, `hB`, `hb`], AC: [`H`, `h`, `hb`, `hB`], AD: [`H`, `hB`], AE: [`h`, `hB`, `hb`, `H`], AF: [`H`, `hb`, `hB`, `h`], AG: [`h`, `hb`, `H`, `hB`], AI: [`H`, `h`, `hb`, `hB`], AL: [`h`, `H`, `hB`], AM: [`H`, `hB`], AO: [`H`, `hB`], AR: [`h`, `H`, `hB`, `hb`], AS: [`h`, `H`], AT: [`H`, `hB`], AU: [`h`, `hb`, `H`, `hB`], AW: [`H`, `hB`], AX: [`H`], AZ: [`H`, `hB`, `h`], BA: [`H`, `hB`, `h`], BB: [`h`, `hb`, `H`, `hB`], BD: [`h`, `hB`, `H`], BE: [`H`, `hB`], BF: [`H`, `hB`], BG: [`H`, `hB`, `h`], BH: [`h`, `hB`, `hb`, `H`], BI: [`H`, `h`], BJ: [`H`, `hB`], BL: [`H`, `hB`], BM: [`h`, `hb`, `H`, `hB`], BN: [`hb`, `hB`, `h`, `H`], BO: [`h`, `H`, `hB`, `hb`], BQ: [`H`], BR: [`H`, `hB`], BS: [`h`, `hb`, `H`, `hB`], BT: [`h`, `H`], BW: [`H`, `h`, `hb`, `hB`], BY: [`H`, `h`], BZ: [`H`, `h`, `hb`, `hB`], CA: [`h`, `hb`, `H`, `hB`], CC: [`H`, `h`, `hb`, `hB`], CD: [`hB`, `H`], CF: [`H`, `h`, `hB`], CG: [`H`, `hB`], CH: [`H`, `hB`, `h`], CI: [`H`, `hB`], CK: [`H`, `h`, `hb`, `hB`], CL: [`h`, `H`, `hB`, `hb`], CM: [`H`, `h`, `hB`], CN: [`H`, `hB`, `hb`, `h`], CO: [`h`, `H`, `hB`, `hb`], CP: [`H`], CR: [`h`, `H`, `hB`, `hb`], CU: [`h`, `H`, `hB`, `hb`], CV: [`H`, `hB`], CW: [`H`, `hB`], CX: [`H`, `h`, `hb`, `hB`], CY: [`h`, `H`, `hb`, `hB`], CZ: [`H`], DE: [`H`, `hB`], DG: [`H`, `h`, `hb`, `hB`], DJ: [`h`, `H`], DK: [`H`], DM: [`h`, `hb`, `H`, `hB`], DO: [`h`, `H`, `hB`, `hb`], DZ: [`h`, `hB`, `hb`, `H`], EA: [`H`, `h`, `hB`, `hb`], EC: [`h`, `H`, `hB`, `hb`], EE: [`H`, `hB`], EG: [`h`, `hB`, `hb`, `H`], EH: [`h`, `hB`, `hb`, `H`], ER: [`h`, `H`], ES: [`H`, `hB`, `h`, `hb`], ET: [`hB`, `hb`, `h`, `H`], FI: [`H`], FJ: [`h`, `hb`, `H`, `hB`], FK: [`H`, `h`, `hb`, `hB`], FM: [`h`, `hb`, `H`, `hB`], FO: [`H`, `h`], FR: [`H`, `hB`], GA: [`H`, `hB`], GB: [`H`, `h`, `hb`, `hB`], GD: [`h`, `hb`, `H`, `hB`], GE: [`H`, `hB`, `h`], GF: [`H`, `hB`], GG: [`H`, `h`, `hb`, `hB`], GH: [`h`, `H`], GI: [`H`, `h`, `hb`, `hB`], GL: [`H`, `h`], GM: [`h`, `hb`, `H`, `hB`], GN: [`H`, `hB`], GP: [`H`, `hB`], GQ: [`H`, `hB`, `h`, `hb`], GR: [`h`, `H`, `hb`, `hB`], GS: [`H`, `h`, `hb`, `hB`], GT: [`h`, `H`, `hB`, `hb`], GU: [`h`, `hb`, `H`, `hB`], GW: [`H`, `hB`], GY: [`h`, `hb`, `H`, `hB`], HK: [`h`, `hB`, `hb`, `H`], HN: [`h`, `H`, `hB`, `hb`], HR: [`H`, `hB`], HU: [`H`, `h`], IC: [`H`, `h`, `hB`, `hb`], ID: [`H`], IE: [`H`, `h`, `hb`, `hB`], IL: [`H`, `hB`], IM: [`H`, `h`, `hb`, `hB`], IN: [`h`, `H`], IO: [`H`, `h`, `hb`, `hB`], IQ: [`h`, `hB`, `hb`, `H`], IR: [`hB`, `H`], IS: [`H`], IT: [`H`, `hB`], JE: [`H`, `h`, `hb`, `hB`], JM: [`h`, `hb`, `H`, `hB`], JO: [`h`, `hB`, `hb`, `H`], JP: [`H`, `K`, `h`], KE: [`hB`, `hb`, `H`, `h`], KG: [`H`, `h`, `hB`, `hb`], KH: [`hB`, `h`, `H`, `hb`], KI: [`h`, `hb`, `H`, `hB`], KM: [`H`, `h`, `hB`, `hb`], KN: [`h`, `hb`, `H`, `hB`], KP: [`h`, `H`, `hB`, `hb`], KR: [`h`, `H`, `hB`, `hb`], KW: [`h`, `hB`, `hb`, `H`], KY: [`h`, `hb`, `H`, `hB`], KZ: [`H`, `hB`], LA: [`H`, `hb`, `hB`, `h`], LB: [`h`, `hB`, `hb`, `H`], LC: [`h`, `hb`, `H`, `hB`], LI: [`H`, `hB`, `h`], LK: [`H`, `h`, `hB`, `hb`], LR: [`h`, `hb`, `H`, `hB`], LS: [`h`, `H`], LT: [`H`, `h`, `hb`, `hB`], LU: [`H`, `h`, `hB`], LV: [`H`, `hB`, `hb`, `h`], LY: [`h`, `hB`, `hb`, `H`], MA: [`H`, `h`, `hB`, `hb`], MC: [`H`, `hB`], MD: [`H`, `hB`], ME: [`H`, `hB`, `h`], MF: [`H`, `hB`], MG: [`H`, `h`], MH: [`h`, `hb`, `H`, `hB`], MK: [`H`, `h`, `hb`, `hB`], ML: [`H`], MM: [`hB`, `hb`, `H`, `h`], MN: [`H`, `h`, `hb`, `hB`], MO: [`h`, `hB`, `hb`, `H`], MP: [`h`, `hb`, `H`, `hB`], MQ: [`H`, `hB`], MR: [`h`, `hB`, `hb`, `H`], MS: [`H`, `h`, `hb`, `hB`], MT: [`H`, `h`], MU: [`H`, `h`], MV: [`H`, `h`], MW: [`h`, `hb`, `H`, `hB`], MX: [`h`, `H`, `hB`, `hb`], MY: [`hb`, `hB`, `h`, `H`], MZ: [`H`, `hB`], NA: [`h`, `H`, `hB`, `hb`], NC: [`H`, `hB`], NE: [`H`], NF: [`H`, `h`, `hb`, `hB`], NG: [`H`, `h`, `hb`, `hB`], NI: [`h`, `H`, `hB`, `hb`], NL: [`H`, `hB`], NO: [`H`, `h`], NP: [`H`, `h`, `hB`], NR: [`H`, `h`, `hb`, `hB`], NU: [`H`, `h`, `hb`, `hB`], NZ: [`h`, `hb`, `H`, `hB`], OM: [`h`, `hB`, `hb`, `H`], PA: [`h`, `H`, `hB`, `hb`], PE: [`h`, `H`, `hB`, `hb`], PF: [`H`, `h`, `hB`], PG: [`h`, `H`], PH: [`h`, `hB`, `hb`, `H`], PK: [`h`, `hB`, `H`], PL: [`H`, `h`], PM: [`H`, `hB`], PN: [`H`, `h`, `hb`, `hB`], PR: [`h`, `H`, `hB`, `hb`], PS: [`h`, `hB`, `hb`, `H`], PT: [`H`, `hB`], PW: [`h`, `H`], PY: [`h`, `H`, `hB`, `hb`], QA: [`h`, `hB`, `hb`, `H`], RE: [`H`, `hB`], RO: [`H`, `hB`], RS: [`H`, `hB`, `h`], RU: [`H`], RW: [`H`, `h`], SA: [`h`, `hB`, `hb`, `H`], SB: [`h`, `hb`, `H`, `hB`], SC: [`H`, `h`, `hB`], SD: [`h`, `hB`, `hb`, `H`], SE: [`H`], SG: [`h`, `hb`, `H`, `hB`], SH: [`H`, `h`, `hb`, `hB`], SI: [`H`, `hB`], SJ: [`H`], SK: [`H`], SL: [`h`, `hb`, `H`, `hB`], SM: [`H`, `h`, `hB`], SN: [`H`, `h`, `hB`], SO: [`h`, `H`], SR: [`H`, `hB`], SS: [`h`, `hb`, `H`, `hB`], ST: [`H`, `hB`], SV: [`h`, `H`, `hB`, `hb`], SX: [`H`, `h`, `hb`, `hB`], SY: [`h`, `hB`, `hb`, `H`], SZ: [`h`, `hb`, `H`, `hB`], TA: [`H`, `h`, `hb`, `hB`], TC: [`h`, `hb`, `H`, `hB`], TD: [`h`, `H`, `hB`], TF: [`H`, `h`, `hB`], TG: [`H`, `hB`], TH: [`H`, `h`], TJ: [`H`, `h`], TL: [`H`, `hB`, `hb`, `h`], TM: [`H`, `h`], TN: [`h`, `hB`, `hb`, `H`], TO: [`h`, `H`], TR: [`H`, `hB`], TT: [`h`, `hb`, `H`, `hB`], TW: [`hB`, `hb`, `h`, `H`], TZ: [`hB`, `hb`, `H`, `h`], UA: [`H`, `hB`, `h`], UG: [`hB`, `hb`, `H`, `h`], UM: [`h`, `hb`, `H`, `hB`], US: [`h`, `hb`, `H`, `hB`], UY: [`h`, `H`, `hB`, `hb`], UZ: [`H`, `hB`, `h`], VA: [`H`, `h`, `hB`], VC: [`h`, `hb`, `H`, `hB`], VE: [`h`, `H`, `hB`, `hb`], VG: [`h`, `hb`, `H`, `hB`], VI: [`h`, `hb`, `H`, `hB`], VN: [`H`, `h`], VU: [`h`, `H`], WF: [`H`, `hB`], WS: [`h`, `H`], XK: [`H`, `hB`, `h`], YE: [`h`, `hB`, `hb`, `H`], YT: [`H`, `hB`], ZA: [`H`, `h`, `hb`, `hB`], ZM: [`h`, `hb`, `H`, `hB`], ZW: [`H`, `h`], "af-ZA": [`H`, `h`, `hB`, `hb`], "ar-001": [`h`, `hB`, `hb`, `H`], "ca-ES": [`H`, `h`, `hB`], "en-001": [`h`, `hb`, `H`, `hB`], "en-HK": [`h`, `hb`, `H`, `hB`], "en-IL": [`H`, `h`, `hb`, `hB`], "en-MY": [`h`, `hb`, `H`, `hB`], "es-BR": [`H`, `h`, `hB`, `hb`], "es-ES": [`H`, `h`, `hB`, `hb`], "es-GQ": [`H`, `h`, `hB`, `hb`], "fr-CA": [`H`, `h`, `hB`], "gl-ES": [`H`, `h`, `hB`], "gu-IN": [`hB`, `hb`, `h`, `H`], "hi-IN": [`hB`, `h`, `H`], "it-CH": [`H`, `h`, `hB`], "it-IT": [`H`, `h`, `hB`], "kn-IN": [`hB`, `h`, `H`], "ku-SY": [`H`, `hB`], "ml-IN": [`hB`, `h`, `H`], "mr-IN": [`hB`, `hb`, `h`, `H`], "pa-IN": [`hB`, `hb`, `h`, `H`], "ta-IN": [`hB`, `h`, `hb`, `H`], "te-IN": [`hB`, `h`, `H`], "zu-ZA": [`H`, `hB`, `hb`, `h`] };
|
|
2577
2577
|
function ra(e6, t2) {
|
|
2578
2578
|
let n2 = ``;
|
|
2579
2579
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
@@ -2607,10 +2607,10 @@ function ia(e6) {
|
|
|
2607
2607
|
throw Error(`Invalid hourCycle`);
|
|
2608
2608
|
}
|
|
2609
2609
|
let n2 = e6.language, r2;
|
|
2610
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2610
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (W[`${n2}-${r2}`] || W[r2 || ``] || W[n2 || ``] || W[`${n2}-001`] || W[`001`])[0].charAt(0);
|
|
2611
2611
|
}
|
|
2612
|
-
var aa = RegExp(`^${
|
|
2613
|
-
var oa = RegExp(`${
|
|
2612
|
+
var aa = RegExp(`^${na.source}*`);
|
|
2613
|
+
var oa = RegExp(`${na.source}*$`);
|
|
2614
2614
|
function G(e6, t2) {
|
|
2615
2615
|
return { start: e6, end: t2 };
|
|
2616
2616
|
}
|
|
@@ -2835,7 +2835,7 @@ var ga = class {
|
|
|
2835
2835
|
if (t4.length === 0) return this.error(10, i3);
|
|
2836
2836
|
let r3 = t4;
|
|
2837
2837
|
this.locale && (r3 = ra(t4, this.locale));
|
|
2838
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2838
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? ji(r3) : {} };
|
|
2839
2839
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
@@ -2894,11 +2894,11 @@ var ga = class {
|
|
|
2894
2894
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2895
2895
|
let n2 = [];
|
|
2896
2896
|
try {
|
|
2897
|
-
n2 =
|
|
2897
|
+
n2 = Ni(e6);
|
|
2898
2898
|
} catch {
|
|
2899
2899
|
return this.error(7, t2);
|
|
2900
2900
|
}
|
|
2901
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2901
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Ui(n2) : {} }, err: null };
|
|
2902
2902
|
}
|
|
2903
2903
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2904
2904
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -3002,15 +3002,15 @@ function ba(e6) {
|
|
|
3002
3002
|
}
|
|
3003
3003
|
function xa(e6) {
|
|
3004
3004
|
e6.forEach((e7) => {
|
|
3005
|
-
if (delete e7.location,
|
|
3006
|
-
else
|
|
3005
|
+
if (delete e7.location, Xi(e7) || Zi(e7)) for (let t2 in e7.options) delete e7.options[t2].location, xa(e7.options[t2].value);
|
|
3006
|
+
else qi(e7) && ea(e7.style) || (Ji(e7) || Yi(e7)) && ta(e7.style) ? delete e7.style.location : $i(e7) && xa(e7.children);
|
|
3007
3007
|
});
|
|
3008
3008
|
}
|
|
3009
3009
|
function Sa(e6, t2 = {}) {
|
|
3010
3010
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
3011
3011
|
let n2 = new ga(e6, t2).parse();
|
|
3012
3012
|
if (n2.err) {
|
|
3013
|
-
let e7 = SyntaxError(
|
|
3013
|
+
let e7 = SyntaxError(Wi[n2.err.kind]);
|
|
3014
3014
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
3015
3015
|
}
|
|
3016
3016
|
return t2?.captureLocation || xa(n2.val), n2.val;
|
|
@@ -3048,29 +3048,29 @@ function Oa(e6) {
|
|
|
3048
3048
|
return typeof e6 == `function`;
|
|
3049
3049
|
}
|
|
3050
3050
|
function ka(e6, t2, n2, r2, i2, a2, o2) {
|
|
3051
|
-
if (e6.length === 1 &&
|
|
3051
|
+
if (e6.length === 1 && Gi(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3052
3052
|
let s2 = [];
|
|
3053
3053
|
for (let c2 of e6) {
|
|
3054
|
-
if (
|
|
3054
|
+
if (Gi(c2)) {
|
|
3055
3055
|
s2.push({ type: 0, value: c2.value });
|
|
3056
3056
|
continue;
|
|
3057
3057
|
}
|
|
3058
|
-
if (
|
|
3058
|
+
if (Qi(c2)) {
|
|
3059
3059
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3060
3060
|
continue;
|
|
3061
3061
|
}
|
|
3062
3062
|
let { value: e7 } = c2;
|
|
3063
3063
|
if (!(i2 && e7 in i2)) throw new Ea(e7, o2);
|
|
3064
3064
|
let l2 = i2[e7];
|
|
3065
|
-
if (
|
|
3066
|
-
else if (
|
|
3067
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3065
|
+
if (Ki(c2)) (!l2 || typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint`) && (l2 = typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint` ? String(l2) : ``), s2.push({ type: typeof l2 == `string` ? 0 : 1, value: l2 });
|
|
3066
|
+
else if (Ji(c2)) {
|
|
3067
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : ta(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3068
3068
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3069
|
-
} else if (
|
|
3070
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3069
|
+
} else if (Yi(c2)) {
|
|
3070
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : ta(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3071
3071
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3072
|
-
} else if (
|
|
3073
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3072
|
+
} else if (qi(c2)) {
|
|
3073
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ea(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3074
3074
|
if (e8 && e8.scale) {
|
|
3075
3075
|
let t3 = e8.scale || 1;
|
|
3076
3076
|
if (typeof l2 == `bigint`) {
|
|
@@ -3080,17 +3080,17 @@ function ka(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3080
3080
|
}
|
|
3081
3081
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3082
3082
|
} else {
|
|
3083
|
-
if (
|
|
3083
|
+
if ($i(c2)) {
|
|
3084
3084
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3085
3085
|
if (!Oa(u2)) throw new Ta(l3, `function`, o2);
|
|
3086
3086
|
let d2 = u2(ka(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3087
3087
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3088
3088
|
}
|
|
3089
|
-
if (
|
|
3089
|
+
if (Xi(c2)) {
|
|
3090
3090
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3091
3091
|
if (!a3) throw new wa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3092
3092
|
s2.push(...ka(a3.value, t2, n2, r2, i2));
|
|
3093
|
-
} else if (
|
|
3093
|
+
} else if (Zi(c2)) {
|
|
3094
3094
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3095
3095
|
if (!a3) {
|
|
3096
3096
|
if (!Intl.PluralRules) throw new Ca(`Intl.PluralRules is not available in this environment.
|
|
@@ -3123,7 +3123,7 @@ function Ma(e6) {
|
|
|
3123
3123
|
} };
|
|
3124
3124
|
}
|
|
3125
3125
|
function Na(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3126
|
-
return { getNumberFormat:
|
|
3126
|
+
return { getNumberFormat: vi((...e7) => new Intl.NumberFormat(...e7), { cache: Ma(e6.number), strategy: ki.variadic }), getDateTimeFormat: vi((...e7) => new Intl.DateTimeFormat(...e7), { cache: Ma(e6.dateTime), strategy: ki.variadic }), getPluralRules: vi((...e7) => new Intl.PluralRules(...e7), { cache: Ma(e6.pluralRules), strategy: ki.variadic }) };
|
|
3127
3127
|
}
|
|
3128
3128
|
var Pa = class e5 {
|
|
3129
3129
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
@@ -3274,7 +3274,7 @@ var Xa = function() {
|
|
|
3274
3274
|
}
|
|
3275
3275
|
return Ka(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3276
3276
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3277
|
-
if (this.options =
|
|
3277
|
+
if (this.options = _i(r2, t2, this.options || {}, Ya()), this.formats = this.options.formats, e7) {
|
|
3278
3278
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3279
3279
|
e7.IntlMessageFormat = Pa, e7.ICU = this, s2 && (a2 && e7.on(a2, function() {
|
|
3280
3280
|
return n2.clearCache();
|
|
@@ -3286,9 +3286,9 @@ var Xa = function() {
|
|
|
3286
3286
|
this.formats = this.formats ? Ha(Ha({}, this.formats), e7) : e7;
|
|
3287
3287
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3288
3288
|
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && `${n2}.${r2}.${i2.replace(/\./g, `###`)}`, c2;
|
|
3289
|
-
this.options.memoize && (c2 =
|
|
3289
|
+
this.options.memoize && (c2 = pi(this.mem, s2));
|
|
3290
3290
|
try {
|
|
3291
|
-
return c2 || (c2 = new Pa(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) &&
|
|
3291
|
+
return c2 || (c2 = new Pa(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && fi(this.mem, s2, c2)), c2.format(this.escapeVariableValues(t2));
|
|
3292
3292
|
} catch (n3) {
|
|
3293
3293
|
return this.options.parseErrorHandler(n3, i2, e7, t2);
|
|
3294
3294
|
}
|
|
@@ -3308,7 +3308,7 @@ var Xa = function() {
|
|
|
3308
3308
|
Xa.type = `i18nFormat`;
|
|
3309
3309
|
function Za({ icuOptions: e6 = {}, ...t2 }) {
|
|
3310
3310
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3311
|
-
return
|
|
3311
|
+
return li(t2, { icu: new Xa({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3312
3312
|
}
|
|
3313
3313
|
var Qa = (e6, t2, n2, r2) => {
|
|
3314
3314
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
@@ -3857,39 +3857,39 @@ function Js(e6) {
|
|
|
3857
3857
|
let t2 = ``;
|
|
3858
3858
|
return (e6.filename || e6.altText) && (t2 = `/${encodeURIComponent(e6.filename || e6.altText)}`), e6.id ? `wix:image://v1/${e6.id}${t2}#originWidth=${e6.width}&originHeight=${e6.height}` : e6.url;
|
|
3859
3859
|
}
|
|
3860
|
-
function
|
|
3860
|
+
function X(e6) {
|
|
3861
3861
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3862
3862
|
}
|
|
3863
|
-
var
|
|
3864
|
-
var
|
|
3865
|
-
function
|
|
3863
|
+
var Ys = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3864
|
+
var Xs = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3865
|
+
function Zs(e6) {
|
|
3866
3866
|
return P(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/category`, destPath: `/v3/bulk/category` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/categories`, destPath: `/v3/bulk/categories` }], "*.pub.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], _: [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www.wixapis.com": [{ srcPath: `/blog/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/v3/categories`, destPath: `/v3/categories` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "api._api_base_domain_": [{ srcPath: `/category-service-api-proxy`, destPath: `` }] } }));
|
|
3867
3867
|
}
|
|
3868
|
-
var
|
|
3869
|
-
function
|
|
3868
|
+
var Qs = `@wix/auto_sdk_blog_categories`;
|
|
3869
|
+
function $s(e6) {
|
|
3870
3870
|
function t2({ host: t3 }) {
|
|
3871
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3871
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Qs, migrationOptions: { optInTransformResponse: true }, url: Zs({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ys }, { transformFn: F, paths: Xs }]) };
|
|
3872
3872
|
}
|
|
3873
3873
|
return t2;
|
|
3874
3874
|
}
|
|
3875
|
-
var
|
|
3876
|
-
var
|
|
3877
|
-
async function
|
|
3878
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3875
|
+
var ec = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3876
|
+
var tc = [{ path: `categories.coverImage` }];
|
|
3877
|
+
async function nc(e6) {
|
|
3878
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = $s(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3879
3879
|
n2?.onSiteCall?.();
|
|
3880
3880
|
try {
|
|
3881
3881
|
let e7 = await t2.request(r2);
|
|
3882
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3882
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: ec }, { transformFn: Js, paths: tc }]));
|
|
3883
3883
|
} catch (e7) {
|
|
3884
3884
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3885
3885
|
throw n2?.onError?.(e7), t3;
|
|
3886
3886
|
}
|
|
3887
3887
|
}
|
|
3888
|
-
function
|
|
3889
|
-
return (t2) =>
|
|
3888
|
+
function rc(e6) {
|
|
3889
|
+
return (t2) => nc(t2, { httpClient: e6 });
|
|
3890
3890
|
}
|
|
3891
|
-
var
|
|
3892
|
-
function
|
|
3891
|
+
var ic = M(rc);
|
|
3892
|
+
function ac(e6) {
|
|
3893
3893
|
if (!e6) return;
|
|
3894
3894
|
let t2 = ``;
|
|
3895
3895
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3904,43 +3904,43 @@ function oc(e6) {
|
|
|
3904
3904
|
}
|
|
3905
3905
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3906
3906
|
}
|
|
3907
|
-
var
|
|
3908
|
-
var
|
|
3909
|
-
var lc = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3910
|
-
var
|
|
3911
|
-
function
|
|
3907
|
+
var oc = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { path: `post.heroImage.urlExpirationDate` }, { path: `post.richContent.metadata.createdTimestamp` }, { path: `post.richContent.metadata.updatedTimestamp` }, { path: `post.moderationDetails.submittedDate` }, { path: `post.moderationDetails.moderationDate` }, { path: `post.media.wixMedia.image.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3908
|
+
var sc = [{ path: `post.richContentCompressed` }];
|
|
3909
|
+
var cc = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3910
|
+
var lc = [{ path: `metrics.averageRating` }];
|
|
3911
|
+
function uc(e6) {
|
|
3912
3912
|
return P(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
3913
3913
|
}
|
|
3914
|
-
var
|
|
3915
|
-
function
|
|
3914
|
+
var dc = `@wix/auto_sdk_blog_posts`;
|
|
3915
|
+
function fc(e6) {
|
|
3916
3916
|
function t2({ host: t3 }) {
|
|
3917
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost`, packageName:
|
|
3917
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost`, packageName: dc, migrationOptions: { optInTransformResponse: true }, url: uc({ protoPath: `/v3/posts/{postId}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: oc }, { transformFn: dn, paths: sc }, { transformFn: F, paths: cc }]) };
|
|
3918
3918
|
}
|
|
3919
3919
|
return t2;
|
|
3920
3920
|
}
|
|
3921
|
-
function
|
|
3921
|
+
function pc(e6) {
|
|
3922
3922
|
function t2({ host: t3 }) {
|
|
3923
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName:
|
|
3923
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName: dc, migrationOptions: { optInTransformResponse: true }, url: uc({ protoPath: `/v3/posts/{postId}/metrics`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: F, paths: lc }]) };
|
|
3924
3924
|
}
|
|
3925
3925
|
return t2;
|
|
3926
3926
|
}
|
|
3927
|
-
var
|
|
3928
|
-
var
|
|
3929
|
-
var
|
|
3930
|
-
var
|
|
3931
|
-
async function
|
|
3932
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3927
|
+
var mc = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3928
|
+
var hc = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3929
|
+
var gc = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3930
|
+
var Z = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.COUNTERS = `COUNTERS`, e6.URL = `URL`, e6.CONTENT_TEXT = `CONTENT_TEXT`, e6.METRICS = `METRICS`, e6.SEO = `SEO`, e6.CONTENT = `CONTENT`, e6.INTERNAL_ID = `INTERNAL_ID`, e6.CONTACT_ID = `CONTACT_ID`, e6.RICH_CONTENT = `RICH_CONTENT`, e6.RICH_CONTENT_STRING = `RICH_CONTENT_STRING`, e6.RICH_CONTENT_COMPRESSED = `RICH_CONTENT_COMPRESSED`, e6.TRANSLATIONS = `TRANSLATIONS`, e6.REFERENCE_ID = `REFERENCE_ID`, e6.EXCLUDE_PAID_CONTENT = `EXCLUDE_PAID_CONTENT`, e6.SEO_DATA = `SEO_DATA`, e6.OWNER = `OWNER`, e6.HAS_UNPUBLISHED_CHANGES = `HAS_UNPUBLISHED_CHANGES`, e6.HEADING = `HEADING`, e6.IMAGE = `IMAGE`, e6))(Z || {});
|
|
3931
|
+
async function _c(e6, t2) {
|
|
3932
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = fc(D({ postId: e6, fieldsets: t2?.fieldsets }, []));
|
|
3933
3933
|
r2?.onSiteCall?.();
|
|
3934
3934
|
try {
|
|
3935
3935
|
let e7 = await n2.request(i2);
|
|
3936
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3936
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: mc }, { transformFn: Js, paths: hc }, { transformFn: ac, paths: gc }]), [`post.richContent`, `post.rich_content`]);
|
|
3937
3937
|
} catch (e7) {
|
|
3938
3938
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]`, fieldsets: `$[1].fieldsets` }, singleArgumentUnchanged: false }, [`postId`, `options`]);
|
|
3939
3939
|
throw r2?.onError?.(e7), t3;
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
|
-
async function
|
|
3943
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3942
|
+
async function vc(e6) {
|
|
3943
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = pc(D({ postId: e6 }, []));
|
|
3944
3944
|
n2?.onSiteCall?.();
|
|
3945
3945
|
try {
|
|
3946
3946
|
let e7 = await t2.request(r2);
|
|
@@ -3950,32 +3950,32 @@ async function yc(e6) {
|
|
|
3950
3950
|
throw n2?.onError?.(e7), t3;
|
|
3951
3951
|
}
|
|
3952
3952
|
}
|
|
3953
|
-
function
|
|
3954
|
-
return (t2, n2) =>
|
|
3953
|
+
function yc(e6) {
|
|
3954
|
+
return (t2, n2) => _c(t2, n2, { httpClient: e6 });
|
|
3955
3955
|
}
|
|
3956
|
-
function
|
|
3957
|
-
return (t2) =>
|
|
3956
|
+
function bc(e6) {
|
|
3957
|
+
return (t2) => vc(t2, { httpClient: e6 });
|
|
3958
3958
|
}
|
|
3959
|
+
var xc = M(yc);
|
|
3959
3960
|
var Sc = M(bc);
|
|
3960
|
-
var Cc =
|
|
3961
|
-
var wc = [{ path: `
|
|
3962
|
-
|
|
3963
|
-
function Ec(e6) {
|
|
3961
|
+
var Cc = [{ path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3962
|
+
var wc = [{ path: `tags.createdDate` }, { path: `tags.updatedDate` }];
|
|
3963
|
+
function Tc(e6) {
|
|
3964
3964
|
return P(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www.wixapis.com": [{ srcPath: `/v3/tags`, destPath: `/v3/tags` }, { srcPath: `/blog/v3/tags`, destPath: `/v3/tags` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v2/tags`, destPath: `/v2/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tag`, destPath: `/v3/bulk/tag` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tags`, destPath: `/v3/bulk/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }] } }));
|
|
3965
3965
|
}
|
|
3966
|
-
var
|
|
3967
|
-
function
|
|
3966
|
+
var Ec = `@wix/auto_sdk_blog_tags`;
|
|
3967
|
+
function Dc(e6) {
|
|
3968
3968
|
function t2({ host: t3 }) {
|
|
3969
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3970
|
-
return { entityFqdn: `wix.blog.v3.tag`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.QueryTags`, packageName:
|
|
3969
|
+
let n2 = A(e6, [{ transformFn: un, paths: Cc }]);
|
|
3970
|
+
return { entityFqdn: `wix.blog.v3.tag`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.QueryTags`, packageName: Ec, migrationOptions: { optInTransformResponse: true }, url: Tc({ protoPath: `/v3/tags/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: wc }]) };
|
|
3971
3971
|
}
|
|
3972
3972
|
return t2;
|
|
3973
3973
|
}
|
|
3974
|
-
var
|
|
3975
|
-
function
|
|
3974
|
+
var Oc = [{ path: `tags.url` }];
|
|
3975
|
+
function kc(e6) {
|
|
3976
3976
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3977
3977
|
return gs({ func: async (r2) => {
|
|
3978
|
-
let i2 =
|
|
3978
|
+
let i2 = Dc({ ...r2, ...e6 ?? {} });
|
|
3979
3979
|
n2?.onSiteCall?.();
|
|
3980
3980
|
try {
|
|
3981
3981
|
let e7 = await t2.request(i2);
|
|
@@ -3987,50 +3987,57 @@ function Ac(e6) {
|
|
|
3987
3987
|
let n3 = [t3, e6];
|
|
3988
3988
|
return D({ ...n3?.[1], query: n3?.[0] });
|
|
3989
3989
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3990
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3990
|
+
let t3 = O(A(e7, [{ transformFn: X, paths: Oc }]));
|
|
3991
3991
|
return { items: t3?.tags, pagingMetadata: t3?.pagingMetadata };
|
|
3992
3992
|
}, errorTransformer: (e7) => {
|
|
3993
3993
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3994
3994
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3995
3995
|
}
|
|
3996
|
-
async function
|
|
3997
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3996
|
+
async function Ac(e6, t2) {
|
|
3997
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Dc(D({ query: e6, ...t2 }));
|
|
3998
3998
|
r2?.onSiteCall?.();
|
|
3999
3999
|
try {
|
|
4000
4000
|
let e7 = await n2.request(i2);
|
|
4001
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
4001
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Oc }]));
|
|
4002
4002
|
} catch (e7) {
|
|
4003
4003
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
4004
4004
|
throw r2?.onError?.(e7), t3;
|
|
4005
4005
|
}
|
|
4006
4006
|
}
|
|
4007
|
+
function jc(e6) {
|
|
4008
|
+
return (t2) => kc(t2, { httpClient: e6 });
|
|
4009
|
+
}
|
|
4007
4010
|
function Mc(e6) {
|
|
4008
|
-
return (t2) => Ac(t2, { httpClient: e6 });
|
|
4011
|
+
return (t2, n2) => Ac(t2, n2, { httpClient: e6 });
|
|
4009
4012
|
}
|
|
4010
4013
|
function Nc(e6) {
|
|
4011
|
-
|
|
4012
|
-
}
|
|
4013
|
-
function Pc(e6) {
|
|
4014
|
-
let t2 = Es({ builderQueryFunction: (t3) => Mc(e6)(t3), typedQueryFunction: (t3, n3) => Nc(e6)(t3, n3), hasOptionsParameter: true });
|
|
4014
|
+
let t2 = Es({ builderQueryFunction: (t3) => jc(e6)(t3), typedQueryFunction: (t3, n3) => Mc(e6)(t3, n3), hasOptionsParameter: true });
|
|
4015
4015
|
function n2(e7, n3) {
|
|
4016
4016
|
return t2(...arguments);
|
|
4017
4017
|
}
|
|
4018
4018
|
return n2;
|
|
4019
4019
|
}
|
|
4020
|
-
var
|
|
4021
|
-
var
|
|
4022
|
-
|
|
4020
|
+
var Pc = M(Nc);
|
|
4021
|
+
var Fc = (e6) => O(A(e6, [{ transformFn: X, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: Js, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: ac, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
4022
|
+
var Ic = `https://blog.wixsite.com/blog-demo-posts`;
|
|
4023
|
+
M((e6) => async (t2) => {
|
|
4024
|
+
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${N(t2)}`);
|
|
4025
|
+
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
4026
|
+
return Fc(await n2.json()).filter((e7) => !e7.url?.startsWith(Ic));
|
|
4027
|
+
});
|
|
4028
|
+
var Lc = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
|
|
4029
|
+
function Rc(e6) {
|
|
4023
4030
|
return P(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
|
|
4024
4031
|
}
|
|
4025
|
-
var
|
|
4026
|
-
function
|
|
4032
|
+
var zc = `@wix/auto_sdk_members_members`;
|
|
4033
|
+
function Bc(e6) {
|
|
4027
4034
|
function t2({ host: t3 }) {
|
|
4028
|
-
return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName:
|
|
4035
|
+
return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName: zc, migrationOptions: { optInTransformResponse: true }, url: Rc({ protoPath: `/v1/members/{id}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Lc }]) };
|
|
4029
4036
|
}
|
|
4030
4037
|
return t2;
|
|
4031
4038
|
}
|
|
4032
|
-
async function
|
|
4033
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
4039
|
+
async function Vc(e6, t2) {
|
|
4040
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Bc(D({ id: e6, fieldsets: t2?.fieldsets }));
|
|
4034
4041
|
r2?.onSiteCall?.();
|
|
4035
4042
|
try {
|
|
4036
4043
|
let e7 = await n2.request(i2);
|
|
@@ -4040,70 +4047,70 @@ async function Bc(e6, t2) {
|
|
|
4040
4047
|
throw r2?.onError?.(e7), t3;
|
|
4041
4048
|
}
|
|
4042
4049
|
}
|
|
4043
|
-
function
|
|
4044
|
-
return (t2, n2) =>
|
|
4050
|
+
function Hc(e6) {
|
|
4051
|
+
return (t2, n2) => Vc(t2, n2, { httpClient: e6 });
|
|
4045
4052
|
}
|
|
4046
|
-
var
|
|
4047
|
-
var
|
|
4053
|
+
var Uc = M(Hc);
|
|
4054
|
+
var Wc = async (e6) => {
|
|
4048
4055
|
try {
|
|
4049
|
-
return await
|
|
4056
|
+
return await Uc(e6, { fieldsets: [`PUBLIC`] });
|
|
4050
4057
|
} catch {
|
|
4051
4058
|
return;
|
|
4052
4059
|
}
|
|
4053
4060
|
};
|
|
4054
|
-
var
|
|
4055
|
-
var
|
|
4056
|
-
let n2 = await ss({ postFqdn:
|
|
4061
|
+
var Gc = `wix.blog.v4.post`;
|
|
4062
|
+
var Kc = async (e6, t2) => {
|
|
4063
|
+
let n2 = await ss({ postFqdn: Gc, postId: e6 }, t2 ? { language: t2 } : void 0);
|
|
4057
4064
|
if (typeof n2 != `object` || !n2) throw Error(`No Wix SDK context for the post paywall read`);
|
|
4058
4065
|
let { richContent: r2 } = n2;
|
|
4059
4066
|
return D(r2);
|
|
4060
4067
|
};
|
|
4061
|
-
var
|
|
4062
|
-
var
|
|
4063
|
-
var
|
|
4068
|
+
var qc = `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3`;
|
|
4069
|
+
var Jc = `membership_plan_picker_tpa`;
|
|
4070
|
+
var Yc = (e6) => {
|
|
4064
4071
|
let t2;
|
|
4065
4072
|
try {
|
|
4066
|
-
t2 = e6.appSectionRelativeUrl(
|
|
4073
|
+
t2 = e6.appSectionRelativeUrl(qc, Jc);
|
|
4067
4074
|
} catch {
|
|
4068
4075
|
return;
|
|
4069
4076
|
}
|
|
4070
4077
|
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${t2.replace(/^\/+/, ``)}`;
|
|
4071
4078
|
};
|
|
4072
|
-
var
|
|
4073
|
-
let n2 = e7.nodes ? { ...e7, nodes:
|
|
4079
|
+
var Xc = (e6, t2) => e6.flatMap((e7) => {
|
|
4080
|
+
let n2 = e7.nodes ? { ...e7, nodes: Xc(e7.nodes, t2) } : e7;
|
|
4074
4081
|
return e7.type !== `BUTTON` || e7.buttonData?.type !== `ACTION` ? [n2] : t2 ? [{ ...n2, buttonData: { ...e7.buttonData, type: `LINK`, link: { url: t2, target: `SELF`, rel: { nofollow: true } } } }] : [];
|
|
4075
4082
|
});
|
|
4076
|
-
var
|
|
4083
|
+
var Zc = (e6, t2, n2) => {
|
|
4077
4084
|
if (!t2?.nodes?.length) return e6;
|
|
4078
|
-
let r2 =
|
|
4085
|
+
let r2 = Xc(t2.nodes.map((e7) => e7.layoutData ? { ...e7, layoutData: { ...e7.layoutData, banner: void 0 } } : e7), n2);
|
|
4079
4086
|
return { ...e6, nodes: [...e6.nodes ?? [], ...r2] };
|
|
4080
4087
|
};
|
|
4081
|
-
var
|
|
4082
|
-
var
|
|
4083
|
-
var $c = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
4084
|
-
var
|
|
4085
|
-
function
|
|
4088
|
+
var Qc = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
4089
|
+
var $c = [{ path: `posts.richContentCompressed` }];
|
|
4090
|
+
var el = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
4091
|
+
var tl = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
4092
|
+
function nl(e6) {
|
|
4086
4093
|
return P(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
4087
4094
|
}
|
|
4088
|
-
var
|
|
4089
|
-
function
|
|
4095
|
+
var rl = `@wix/auto_sdk_blog_posts`;
|
|
4096
|
+
function il(e6) {
|
|
4090
4097
|
function t2({ host: t3 }) {
|
|
4091
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
4092
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4098
|
+
let n2 = A(e6, [{ transformFn: un, paths: tl }]);
|
|
4099
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: rl, migrationOptions: { optInTransformResponse: true }, url: nl({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Qc }, { transformFn: dn, paths: $c }, { transformFn: F, paths: el }]) };
|
|
4093
4100
|
}
|
|
4094
4101
|
return t2;
|
|
4095
4102
|
}
|
|
4096
|
-
function
|
|
4097
|
-
let e6 =
|
|
4103
|
+
function al() {
|
|
4104
|
+
let e6 = il({});
|
|
4098
4105
|
return { getUrl: (t2) => {
|
|
4099
4106
|
let { url: n2 } = e6(t2);
|
|
4100
4107
|
return n2;
|
|
4101
4108
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4102
4109
|
}
|
|
4103
|
-
var
|
|
4104
|
-
var
|
|
4110
|
+
var ol = al();
|
|
4111
|
+
var sl = (e6) => (t2) => ({ method: `POST`, url: ol.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4105
4112
|
M((e6) => async (t2) => {
|
|
4106
|
-
let { data: n2 } = await e6.request(
|
|
4113
|
+
let { data: n2 } = await e6.request(sl(t2)), r2 = {};
|
|
4107
4114
|
for (let e7 of n2.posts ?? []) {
|
|
4108
4115
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4109
4116
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4112,115 +4119,115 @@ M((e6) => async (t2) => {
|
|
|
4112
4119
|
}
|
|
4113
4120
|
return r2;
|
|
4114
4121
|
});
|
|
4115
|
-
var
|
|
4122
|
+
var cl = class extends Error {
|
|
4116
4123
|
constructor(e6, t2) {
|
|
4117
4124
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4118
4125
|
}
|
|
4119
4126
|
};
|
|
4120
|
-
var
|
|
4127
|
+
var ll = (e6, t2, n2) => {
|
|
4121
4128
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4122
|
-
r2 = setTimeout(() => i3(new
|
|
4129
|
+
r2 = setTimeout(() => i3(new cl(n2, t2)), t2);
|
|
4123
4130
|
});
|
|
4124
4131
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4125
4132
|
};
|
|
4126
|
-
|
|
4127
|
-
var
|
|
4128
|
-
|
|
4129
|
-
var
|
|
4133
|
+
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT;
|
|
4134
|
+
var ul = [Z.RICH_CONTENT, Z.URL];
|
|
4135
|
+
Z.URL, Z.METRICS;
|
|
4136
|
+
var dl = (e6) => {
|
|
4130
4137
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4131
4138
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4132
4139
|
};
|
|
4133
|
-
var
|
|
4134
|
-
if (t2 && !
|
|
4140
|
+
var fl = (e6, t2) => {
|
|
4141
|
+
if (t2 && !dl(e6)) throw e6;
|
|
4135
4142
|
};
|
|
4136
|
-
var
|
|
4143
|
+
var pl = async (e6) => {
|
|
4137
4144
|
try {
|
|
4138
|
-
let { metrics: t2 } = await
|
|
4145
|
+
let { metrics: t2 } = await Sc(e6);
|
|
4139
4146
|
return t2;
|
|
4140
4147
|
} catch {
|
|
4141
4148
|
return;
|
|
4142
4149
|
}
|
|
4143
4150
|
};
|
|
4144
|
-
var
|
|
4145
|
-
var
|
|
4151
|
+
var ml = 100;
|
|
4152
|
+
var hl = async () => {
|
|
4146
4153
|
try {
|
|
4147
|
-
let { categories: e6 } = await
|
|
4154
|
+
let { categories: e6 } = await ic({ paging: { limit: ml } });
|
|
4148
4155
|
return e6 ?? [];
|
|
4149
4156
|
} catch {
|
|
4150
4157
|
return [];
|
|
4151
4158
|
}
|
|
4152
4159
|
};
|
|
4153
|
-
var
|
|
4160
|
+
var gl = (e6, t2) => {
|
|
4154
4161
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4155
4162
|
if (!n2?.length) return [];
|
|
4156
4163
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4157
4164
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4158
4165
|
};
|
|
4159
|
-
var
|
|
4160
|
-
var
|
|
4166
|
+
var _l = 30;
|
|
4167
|
+
var vl = async (e6) => {
|
|
4161
4168
|
if (!e6?.length) return [];
|
|
4162
4169
|
try {
|
|
4163
|
-
let { items: t2 } = await
|
|
4170
|
+
let { items: t2 } = await Pc().in(`_id`, e6).limit(_l).find();
|
|
4164
4171
|
return t2 ?? [];
|
|
4165
4172
|
} catch {
|
|
4166
4173
|
return [];
|
|
4167
4174
|
}
|
|
4168
4175
|
};
|
|
4169
|
-
var
|
|
4176
|
+
var yl = (e6, t2) => {
|
|
4170
4177
|
let { tagIds: n2 } = e6 ?? {};
|
|
4171
4178
|
if (!n2?.length) return [];
|
|
4172
4179
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4173
4180
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4174
4181
|
};
|
|
4175
|
-
var
|
|
4176
|
-
var
|
|
4182
|
+
var bl = 1e3;
|
|
4183
|
+
var xl = async (e6, t2 = false) => {
|
|
4177
4184
|
try {
|
|
4178
|
-
return (await
|
|
4185
|
+
return (await xc(e6, { fieldsets: ul })).post;
|
|
4179
4186
|
} catch (e7) {
|
|
4180
|
-
|
|
4187
|
+
fl(e7, t2);
|
|
4181
4188
|
return;
|
|
4182
4189
|
}
|
|
4183
4190
|
};
|
|
4184
|
-
var
|
|
4185
|
-
let n2 =
|
|
4186
|
-
return
|
|
4191
|
+
var Sl = async (e6, t2 = false) => {
|
|
4192
|
+
let n2 = hl();
|
|
4193
|
+
return Cl(await xl(e6, t2), n2);
|
|
4187
4194
|
};
|
|
4188
|
-
var
|
|
4189
|
-
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ?
|
|
4190
|
-
return { post: e6, author: o2, metrics: s2, categories:
|
|
4195
|
+
var Cl = async (e6, t2) => {
|
|
4196
|
+
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ? Wc(r2) : void 0, n2 ? pl(n2) : void 0, t2, vl(i2), a2 && n2 ? ll(Kc(n2, e6?.language ?? void 0), bl, `post-paywall`).catch(() => void 0) : void 0]);
|
|
4197
|
+
return { post: e6, author: o2, metrics: s2, categories: gl(e6, c2), tags: yl(e6, l2), ...u2 && { paywall: u2 } };
|
|
4191
4198
|
};
|
|
4192
|
-
var
|
|
4199
|
+
var wl = (e6) => {
|
|
4193
4200
|
let { _id: t2, categoryIds: n2, relatedPostIds: r2 } = e6 ?? {};
|
|
4194
4201
|
return { currentPostId: t2 ?? void 0, categoryIds: n2, relatedPostIds: r2 };
|
|
4195
4202
|
};
|
|
4196
|
-
var
|
|
4197
|
-
var
|
|
4203
|
+
var Tl = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4204
|
+
var El = (e6) => {
|
|
4198
4205
|
try {
|
|
4199
4206
|
return e6.getMonitoringClient?.() ?? null;
|
|
4200
4207
|
} catch {
|
|
4201
4208
|
return null;
|
|
4202
4209
|
}
|
|
4203
4210
|
};
|
|
4204
|
-
var
|
|
4205
|
-
function
|
|
4206
|
-
let o2 =
|
|
4211
|
+
var Dl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4212
|
+
function Ol(e6, t2, { feature: n2, action: r2, level: i2 = `error`, contexts: a2 }) {
|
|
4213
|
+
let o2 = Dl(e6, `captureException`);
|
|
4207
4214
|
if (!o2) return;
|
|
4208
4215
|
let s2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4209
4216
|
o2.captureException(s2, { level: i2, tags: { feature: n2, action: r2 }, ...a2 ? { contexts: a2 } : {} });
|
|
4210
4217
|
}
|
|
4211
|
-
function
|
|
4212
|
-
let a2 =
|
|
4218
|
+
function kl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4219
|
+
let a2 = Dl(e6, `startSpanManual`);
|
|
4213
4220
|
if (!a2) return i2;
|
|
4214
4221
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4215
4222
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4216
4223
|
}
|
|
4217
|
-
var
|
|
4224
|
+
var Al = class extends import_react.Component {
|
|
4218
4225
|
state = { error: void 0 };
|
|
4219
4226
|
static getDerivedStateFromError(e6) {
|
|
4220
4227
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4221
4228
|
}
|
|
4222
4229
|
componentDidCatch(e6, t2) {
|
|
4223
|
-
|
|
4230
|
+
Ol(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4224
4231
|
}
|
|
4225
4232
|
render() {
|
|
4226
4233
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4228,13 +4235,13 @@ var kl = class extends import_react.Component {
|
|
|
4228
4235
|
return this.props.fallback;
|
|
4229
4236
|
}
|
|
4230
4237
|
};
|
|
4231
|
-
var
|
|
4232
|
-
var
|
|
4238
|
+
var jl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4239
|
+
var Ml = (e6) => {
|
|
4233
4240
|
if (e6 && typeof e6 == `object`) return (typeof e6.$eq == `string` ? e6.$eq : Array.isArray(e6.$in) ? e6.$in.find((e7) => typeof e7 == `string` && e7.trim() !== ``) : void 0)?.trim() || void 0;
|
|
4234
4241
|
};
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4237
|
-
var
|
|
4242
|
+
var Nl = `postId`;
|
|
4243
|
+
var Pl = (e6) => Ml(e6?.[Nl]);
|
|
4244
|
+
var Fl = (e6) => {
|
|
4238
4245
|
let t2;
|
|
4239
4246
|
try {
|
|
4240
4247
|
t2 = (0, import_services_manager_react.useService)(Xn);
|
|
@@ -4243,49 +4250,49 @@ var Pl = (e6) => {
|
|
|
4243
4250
|
}
|
|
4244
4251
|
return lr(t2, e6);
|
|
4245
4252
|
};
|
|
4246
|
-
var
|
|
4247
|
-
function
|
|
4253
|
+
var Il = 1e4;
|
|
4254
|
+
function Ll(e6) {
|
|
4248
4255
|
let [t2, n2] = (0, import_react.useState)(void 0);
|
|
4249
4256
|
return (0, import_react.useEffect)(() => {
|
|
4250
4257
|
let t3 = Date.now();
|
|
4251
|
-
t3 - e6 >
|
|
4258
|
+
t3 - e6 > Il && (0, import_react.startTransition)(() => n2(t3));
|
|
4252
4259
|
}, []), t2 ?? e6;
|
|
4253
4260
|
}
|
|
4254
|
-
var
|
|
4255
|
-
var Rl = async (e6) => {
|
|
4256
|
-
await Gs({ like: { entityId: e6, fqdn: Ll } });
|
|
4257
|
-
};
|
|
4261
|
+
var Rl = `wix.blog.v3.post`;
|
|
4258
4262
|
var zl = async (e6) => {
|
|
4259
|
-
await
|
|
4263
|
+
await Gs({ like: { entityId: e6, fqdn: Rl } });
|
|
4264
|
+
};
|
|
4265
|
+
var Bl = async (e6) => {
|
|
4266
|
+
await Ks({ fqdn: Rl, entityId: e6 });
|
|
4260
4267
|
};
|
|
4261
|
-
var
|
|
4262
|
-
var
|
|
4263
|
-
let [t2, n2] = await Promise.allSettled([qs().eq(`fqdn`,
|
|
4264
|
-
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount:
|
|
4268
|
+
var Vl = (e6) => typeof e6 == `number` ? e6 : void 0;
|
|
4269
|
+
var Hl = async (e6) => {
|
|
4270
|
+
let [t2, n2] = await Promise.allSettled([qs().eq(`fqdn`, Rl).eq(`entityId`, e6).limit(1).find(), Sc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
|
|
4271
|
+
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Vl(r2?.likes), viewCount: Vl(r2?.views), commentCount: Vl(r2?.comments) };
|
|
4265
4272
|
};
|
|
4266
|
-
var
|
|
4267
|
-
var
|
|
4273
|
+
var Ul = I(`@wix/site-service-editor-context`);
|
|
4274
|
+
var Wl = () => {
|
|
4268
4275
|
try {
|
|
4269
|
-
return !!(0, import_services_manager_react.useService)(
|
|
4276
|
+
return !!(0, import_services_manager_react.useService)(Ul).previewMode;
|
|
4270
4277
|
} catch {
|
|
4271
4278
|
return false;
|
|
4272
4279
|
}
|
|
4273
4280
|
};
|
|
4274
|
-
var
|
|
4275
|
-
var
|
|
4276
|
-
var
|
|
4281
|
+
var Gl = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
|
|
4282
|
+
var Kl = `wix-blog:post-like-toggled`;
|
|
4283
|
+
var ql = () => {
|
|
4277
4284
|
let e6 = window;
|
|
4278
|
-
return e6[
|
|
4285
|
+
return e6[Kl] ??= /* @__PURE__ */ new Map();
|
|
4279
4286
|
};
|
|
4280
|
-
var
|
|
4281
|
-
|
|
4287
|
+
var Jl = (e6) => {
|
|
4288
|
+
ql().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Kl, { detail: e6 }));
|
|
4282
4289
|
};
|
|
4283
|
-
var
|
|
4284
|
-
var
|
|
4285
|
-
let i2 =
|
|
4290
|
+
var Yl = (e6, t2) => ({ isLiked: e6.liked, likeCount: Math.max(0, (e6.freshLikeCount ?? t2) + Number(e6.liked) - Number(e6.baselineLiked)), isLikeCountLoaded: e6.isLikeCountLoaded, viewCount: e6.viewCount, commentCount: e6.commentCount });
|
|
4291
|
+
var Xl = (e6, t2, n2 = false, r2) => {
|
|
4292
|
+
let i2 = Wl() || n2, [a2, c2] = (0, import_react.useState)(Gl), p2 = (0, import_react.useRef)(Gl), m2 = (0, import_react.useRef)(t2), h2 = (0, import_react.useRef)(/* @__PURE__ */ new Set()), g2 = (0, import_react.useRef)(false), _2 = (0, import_react.useRef)(false), v2 = (0, import_react.useRef)(void 0), y2 = Jn(), [b2, x2] = (0, import_react.useState)(0);
|
|
4286
4293
|
(0, import_react.useEffect)(() => {
|
|
4287
4294
|
let e7 = y2?.addMemberLoginListener?.(() => {
|
|
4288
|
-
|
|
4295
|
+
ql().clear(), x2((e8) => e8 + 1);
|
|
4289
4296
|
});
|
|
4290
4297
|
return () => {
|
|
4291
4298
|
e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
|
|
@@ -4294,21 +4301,21 @@ var Yl = (e6, t2, n2 = false, r2) => {
|
|
|
4294
4301
|
let S2 = (0, import_react.useCallback)((e7) => {
|
|
4295
4302
|
let t3 = p2.current, n3 = { ...t3, ...e7 };
|
|
4296
4303
|
Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), (0, import_react.startTransition)(() => c2(n3)));
|
|
4297
|
-
}, []), C2 = (0, import_react.useMemo)(() => ({ get: () =>
|
|
4304
|
+
}, []), C2 = (0, import_react.useMemo)(() => ({ get: () => Yl(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
|
|
4298
4305
|
h2.current.delete(e7);
|
|
4299
4306
|
}) }), []);
|
|
4300
4307
|
(0, import_react.useEffect)(() => {
|
|
4301
4308
|
m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
|
|
4302
4309
|
}, [t2]), (0, import_react.useEffect)(() => {
|
|
4303
|
-
if (v2.current !== e6 && (v2.current = e6, S2(
|
|
4310
|
+
if (v2.current !== e6 && (v2.current = e6, S2(Gl)), _2.current = false, !e6 || i2) {
|
|
4304
4311
|
S2({ isLikeCountLoaded: true });
|
|
4305
4312
|
return;
|
|
4306
4313
|
}
|
|
4307
4314
|
let t3 = false;
|
|
4308
|
-
return
|
|
4315
|
+
return Hl(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i3 }) => {
|
|
4309
4316
|
t3 || S2({ isLikeCountLoaded: true, viewCount: r3, commentCount: i3, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
|
|
4310
4317
|
}).catch((n3) => {
|
|
4311
|
-
t3 || S2({ isLikeCountLoaded: true }),
|
|
4318
|
+
t3 || S2({ isLikeCountLoaded: true }), Ol(r2, n3, { feature: Tl.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
|
|
4312
4319
|
}), () => {
|
|
4313
4320
|
t3 = true;
|
|
4314
4321
|
};
|
|
@@ -4316,32 +4323,32 @@ var Yl = (e6, t2, n2 = false, r2) => {
|
|
|
4316
4323
|
if (!e6) return;
|
|
4317
4324
|
let t3 = (e7) => {
|
|
4318
4325
|
_2.current = true, S2({ liked: e7 });
|
|
4319
|
-
}, n3 =
|
|
4326
|
+
}, n3 = ql().get(e6);
|
|
4320
4327
|
n3 !== void 0 && t3(n3);
|
|
4321
4328
|
let r3 = (n4) => {
|
|
4322
4329
|
let { detail: r4 } = n4;
|
|
4323
4330
|
r4.postId === e6 && t3(r4.liked);
|
|
4324
4331
|
};
|
|
4325
|
-
return window.addEventListener(
|
|
4332
|
+
return window.addEventListener(Kl, r3), () => window.removeEventListener(Kl, r3);
|
|
4326
4333
|
}, [e6, S2]);
|
|
4327
4334
|
let ee2 = (0, import_react.useCallback)(async (t3) => {
|
|
4328
4335
|
if (!e6 || g2.current) return;
|
|
4329
4336
|
_2.current = true;
|
|
4330
4337
|
let n3 = !p2.current.liked;
|
|
4331
|
-
if (S2({ liked: n3 }),
|
|
4338
|
+
if (S2({ liked: n3 }), Jl({ postId: e6, liked: n3 }), !i2) {
|
|
4332
4339
|
g2.current = true;
|
|
4333
4340
|
try {
|
|
4334
|
-
await (n3 ?
|
|
4341
|
+
await (n3 ? zl(e6) : Bl(e6));
|
|
4335
4342
|
} catch (t4) {
|
|
4336
|
-
S2({ liked: !n3 }),
|
|
4343
|
+
S2({ liked: !n3 }), Jl({ postId: e6, liked: !n3 }), Ol(r2, t4, { feature: Tl.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
|
|
4337
4344
|
} finally {
|
|
4338
4345
|
g2.current = false;
|
|
4339
4346
|
}
|
|
4340
4347
|
}
|
|
4341
4348
|
}, [e6, i2, r2, S2]);
|
|
4342
|
-
return { ...
|
|
4349
|
+
return { ...Yl(a2, t2), toggleLike: ee2, liveLikes: C2 };
|
|
4343
4350
|
};
|
|
4344
|
-
var
|
|
4351
|
+
var Zl = () => {
|
|
4345
4352
|
try {
|
|
4346
4353
|
let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(xo);
|
|
4347
4354
|
return e6 || t2;
|
|
@@ -4349,23 +4356,23 @@ var Xl = () => {
|
|
|
4349
4356
|
return;
|
|
4350
4357
|
}
|
|
4351
4358
|
};
|
|
4352
|
-
var
|
|
4359
|
+
var Ql = () => {
|
|
4353
4360
|
try {
|
|
4354
|
-
return
|
|
4361
|
+
return Yc((0, import_services_manager_react.useService)(Xn));
|
|
4355
4362
|
} catch {
|
|
4356
4363
|
return;
|
|
4357
4364
|
}
|
|
4358
4365
|
};
|
|
4359
|
-
var
|
|
4360
|
-
var
|
|
4361
|
-
var
|
|
4362
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
4363
|
-
return { timeToRead: (t3) => e6(
|
|
4366
|
+
var $l = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
|
|
4367
|
+
var Q = { timeToRead: `post.time-to-read`, viewCount: `post.view-count`, commentCount: `post.comment-count`, likeCount: `post.like-count`, noPostsTitle: `post-list.empty-state.title`, noPostsDescription: `post-list.empty-state.description`, noRelatedPostsTitle: `related-posts.empty-state.title`, noRelatedPostsDescription: `related-posts.empty-state.description`, canvasPostTitle: `canvas.post-title`, canvasAuthorName: `canvas.author-name`, canvasExcerpt: `canvas.excerpt`, canvasContent: `canvas.content`, canvasCategory: `canvas.category`, canvasCategoryNumbered: `canvas.category-numbered`, canvasTagNumbered: `canvas.tag-numbered`, canvasCoverAlt: `cover-media.placeholder-alt`, canvasAuthorPhotoAlt: `canvas.author-photo-alt` };
|
|
4368
|
+
var eu = (e6, t2) => {
|
|
4369
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: $l(r2, `full`, t2) });
|
|
4370
|
+
return { timeToRead: (t3) => e6(Q.timeToRead, { count: t3 }), viewCount: n2(Q.viewCount), commentCount: n2(Q.commentCount), likeCount: n2(Q.likeCount), noPostsEmptyState: () => ({ title: e6(Q.noPostsTitle), description: e6(Q.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(Q.noRelatedPostsTitle), description: e6(Q.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(Q.canvasPostTitle), authorName: () => e6(Q.canvasAuthorName), excerpt: () => e6(Q.canvasExcerpt), content: () => e6(Q.canvasContent), category: () => e6(Q.canvasCategory), categoryNumbered: (t3) => e6(Q.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(Q.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(Q.canvasCoverAlt), authorPhotoAlt: () => e6(Q.canvasAuthorPhotoAlt) } };
|
|
4364
4371
|
};
|
|
4365
|
-
var
|
|
4366
|
-
var
|
|
4367
|
-
var
|
|
4368
|
-
var
|
|
4372
|
+
var tu = (0, import_react.createContext)({ isEditor: false, isPreview: false });
|
|
4373
|
+
var nu = () => (0, import_react.useContext)(tu);
|
|
4374
|
+
var ru = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4375
|
+
var iu = () => {
|
|
4369
4376
|
try {
|
|
4370
4377
|
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(Un);
|
|
4371
4378
|
return e6 || t2;
|
|
@@ -4373,159 +4380,159 @@ var ru = () => {
|
|
|
4373
4380
|
return false;
|
|
4374
4381
|
}
|
|
4375
4382
|
};
|
|
4376
|
-
var
|
|
4377
|
-
let e6 =
|
|
4378
|
-
return nu(
|
|
4379
|
-
};
|
|
4380
|
-
var
|
|
4381
|
-
var
|
|
4382
|
-
var
|
|
4383
|
-
var
|
|
4384
|
-
var
|
|
4385
|
-
var
|
|
4386
|
-
var
|
|
4387
|
-
var
|
|
4383
|
+
var au = () => {
|
|
4384
|
+
let e6 = iu();
|
|
4385
|
+
return ru(nu()) && !e6;
|
|
4386
|
+
};
|
|
4387
|
+
var ou = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4388
|
+
var $ = (e6) => ({ text: e6, html: `<p>${ou(e6)}</p>`, linkList: [] });
|
|
4389
|
+
var su = 6e4;
|
|
4390
|
+
var cu = su * 60;
|
|
4391
|
+
var lu = cu * 24;
|
|
4392
|
+
var uu = lu * 7;
|
|
4393
|
+
var du = (e6) => e6 < su ? [`second`, e6 / 1e3] : e6 < cu ? [`minute`, e6 / su] : e6 < lu ? [`hour`, e6 / cu] : [`day`, e6 / lu];
|
|
4394
|
+
var fu = (e6, t2, n2 = Date.now()) => {
|
|
4388
4395
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4389
|
-
if (i2 >= 0 && i2 <
|
|
4390
|
-
let [e7, n3] =
|
|
4396
|
+
if (i2 >= 0 && i2 < uu) {
|
|
4397
|
+
let [e7, n3] = du(i2);
|
|
4391
4398
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4392
4399
|
}
|
|
4393
4400
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4394
4401
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4395
4402
|
};
|
|
4396
|
-
var
|
|
4397
|
-
var
|
|
4398
|
-
var
|
|
4403
|
+
var pu = `https://static.wixstatic.com/media/`;
|
|
4404
|
+
var mu = 100;
|
|
4405
|
+
var hu = (e6, t2 = ``) => {
|
|
4399
4406
|
let n2 = e6?.profile?.photo;
|
|
4400
4407
|
if (!n2?.url) return;
|
|
4401
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4402
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4403
|
-
};
|
|
4404
|
-
var
|
|
4405
|
-
var
|
|
4406
|
-
var
|
|
4407
|
-
var
|
|
4408
|
-
var
|
|
4408
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(pu) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4409
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || mu, height: n2.height || mu, alt: r2 ?? t2 };
|
|
4410
|
+
};
|
|
4411
|
+
var gu = `https://static.wixstatic.com/media/`;
|
|
4412
|
+
var _u = `wix:image://`;
|
|
4413
|
+
var vu = 1200;
|
|
4414
|
+
var yu = 800;
|
|
4415
|
+
var bu = (e6) => {
|
|
4409
4416
|
if (!e6) return;
|
|
4410
4417
|
let t2 = Number.parseInt(e6, 10);
|
|
4411
4418
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4412
4419
|
};
|
|
4413
|
-
var
|
|
4414
|
-
if (!e6.startsWith(
|
|
4420
|
+
var xu = (e6) => {
|
|
4421
|
+
if (!e6.startsWith(_u)) {
|
|
4415
4422
|
let t3 = e6.split(/[?#]/)[0];
|
|
4416
4423
|
return t3 ? { uri: t3 } : void 0;
|
|
4417
4424
|
}
|
|
4418
4425
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4419
4426
|
if (!r2) return;
|
|
4420
4427
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4421
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4428
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: bu(a2.get(`originWidth`)), height: bu(a2.get(`originHeight`)) };
|
|
4422
4429
|
};
|
|
4423
|
-
var
|
|
4430
|
+
var Su = (e6, t2) => {
|
|
4424
4431
|
if (!e6) return;
|
|
4425
|
-
let n2 =
|
|
4432
|
+
let n2 = xu(e6);
|
|
4426
4433
|
if (!n2) return;
|
|
4427
4434
|
let r2 = n2.name ?? n2.uri;
|
|
4428
|
-
return { uri: n2.uri, url: `${
|
|
4435
|
+
return { uri: n2.uri, url: `${gu}${n2.uri}`, name: r2, width: n2.width ?? vu, height: n2.height ?? yu, alt: t2 ?? r2 };
|
|
4429
4436
|
};
|
|
4430
|
-
var
|
|
4437
|
+
var Cu = (e6) => {
|
|
4431
4438
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4432
4439
|
if (!t2) return;
|
|
4433
|
-
let n2 =
|
|
4440
|
+
let n2 = xu(t2);
|
|
4434
4441
|
if (!n2) return;
|
|
4435
4442
|
let r2 = n2.name ?? n2.uri;
|
|
4436
|
-
return { uri: n2.uri, url: `${
|
|
4443
|
+
return { uri: n2.uri, url: `${gu}${n2.uri}`, name: r2, width: n2.width ?? vu, height: n2.height ?? yu, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4437
4444
|
};
|
|
4438
|
-
var
|
|
4439
|
-
var
|
|
4440
|
-
var
|
|
4445
|
+
var wu = `https://static.wixstatic.com/media/`;
|
|
4446
|
+
var Tu = `wix:video://`;
|
|
4447
|
+
var Eu = (e6) => {
|
|
4441
4448
|
if (!e6) return;
|
|
4442
4449
|
let t2 = Number.parseInt(e6, 10);
|
|
4443
4450
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4444
4451
|
};
|
|
4445
|
-
var
|
|
4446
|
-
if (!e6.startsWith(
|
|
4452
|
+
var Du = (e6) => {
|
|
4453
|
+
if (!e6.startsWith(Tu)) return;
|
|
4447
4454
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4448
4455
|
if (!r2) return;
|
|
4449
4456
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4450
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4457
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${wu}${a2}` : void 0, posterWidth: Eu(i2.get(`posterWidth`)), posterHeight: Eu(i2.get(`posterHeight`)) };
|
|
4451
4458
|
};
|
|
4452
|
-
var
|
|
4453
|
-
let t2 =
|
|
4459
|
+
var Ou = (e6) => {
|
|
4460
|
+
let t2 = Cu(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4454
4461
|
if (t2 || !n2) return t2;
|
|
4455
|
-
let r2 =
|
|
4462
|
+
let r2 = Du(n2), i2 = Su(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4456
4463
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4457
4464
|
};
|
|
4458
|
-
var
|
|
4465
|
+
var ku = (e6) => {
|
|
4459
4466
|
if (!e6) return;
|
|
4460
4467
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4461
4468
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4462
4469
|
};
|
|
4463
|
-
var
|
|
4464
|
-
var
|
|
4465
|
-
var
|
|
4466
|
-
let n2 =
|
|
4470
|
+
var Au = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4471
|
+
var ju = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
|
|
4472
|
+
var Mu = (e6, t2) => {
|
|
4473
|
+
let n2 = ju(e6, t2);
|
|
4467
4474
|
return n2 ? { href: n2, target: `_self` } : void 0;
|
|
4468
4475
|
};
|
|
4469
|
-
var
|
|
4470
|
-
var
|
|
4476
|
+
var Nu = { href: `#`, target: `_self` };
|
|
4477
|
+
var Pu = (e6, t2) => {
|
|
4471
4478
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4472
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel:
|
|
4479
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: Mu(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
|
|
4473
4480
|
};
|
|
4474
|
-
var
|
|
4475
|
-
var
|
|
4481
|
+
var Fu = 2;
|
|
4482
|
+
var Iu = (e6) => Array.from({ length: Fu }, (t2, n2) => {
|
|
4476
4483
|
let r2 = e6.canvas.categoryNumbered(n2 + 1);
|
|
4477
|
-
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel:
|
|
4484
|
+
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: Nu, categoryItem: { label: r2, slug: `` } };
|
|
4478
4485
|
});
|
|
4479
|
-
var
|
|
4486
|
+
var Lu = (e6, t2) => {
|
|
4480
4487
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4481
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel:
|
|
4488
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: Mu(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
|
|
4482
4489
|
};
|
|
4483
|
-
var
|
|
4484
|
-
var
|
|
4490
|
+
var Ru = 3;
|
|
4491
|
+
var zu = (e6) => Array.from({ length: Ru }, (t2, n2) => {
|
|
4485
4492
|
let r2 = e6.canvas.tagNumbered(n2 + 1);
|
|
4486
|
-
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel:
|
|
4493
|
+
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: Nu, tagItem: { label: r2, slug: `` } };
|
|
4487
4494
|
});
|
|
4488
|
-
var
|
|
4489
|
-
var
|
|
4490
|
-
var
|
|
4491
|
-
var
|
|
4492
|
-
var
|
|
4493
|
-
var
|
|
4494
|
-
var
|
|
4495
|
-
var
|
|
4496
|
-
var
|
|
4497
|
-
let { t: a2 } = yo(), o2 =
|
|
4495
|
+
var Bu = 1;
|
|
4496
|
+
var Vu = { views: 120, comments: 4, likes: 12 };
|
|
4497
|
+
var Hu = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
|
|
4498
|
+
var Uu = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4499
|
+
var Wu = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
|
|
4500
|
+
var Gu = { nodes: [] };
|
|
4501
|
+
var Ku = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, richContent: Gu, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
|
|
4502
|
+
var qu = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2 }, a2, o2, s2 = false, c2 = Date.now(), l2 = {}) => !e6 && !s2 ? Ku() : { title: $(e6?.title ?? a2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? a2.canvas.excerpt()), coverImage: Ou(e6), richContent: e6?.richContent ?? Hu(a2.canvas.content()), authorName: $(t2?.profile?.nickname ?? a2.canvas.authorName()), authorImage: hu(t2, a2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? a2.timeToRead(e6.minutesToRead) : s2 ? a2.timeToRead(Bu) : ``), publishedDate: $(fu(e6?.firstPublishedDate ?? new Date(c2), o2, c2)), viewCount: Uu(n2?.views, Vu.views, s2, a2.viewCount), commentCount: Uu(n2?.comments, Vu.comments, s2, a2.commentCount), likeCount: Uu(n2?.likes, Vu.likes, s2, a2.likeCount), postCategories: r2.length === 0 && s2 ? Iu(a2) : r2.map((e7) => Pu(e7, l2.category)), postTags: i2.length === 0 && s2 ? zu(a2) : i2.map((e7) => Lu(e7, l2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && Ou(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: ku(e6?.firstPublishedDate) ?? (s2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: Au(e6?.minutesToRead) ?? (s2 ? Bu : void 0), viewCountValue: Wu(n2?.views, Vu.views, s2), commentCountValue: Wu(n2?.comments, Vu.comments, s2) };
|
|
4503
|
+
var Ju = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
|
|
4504
|
+
let { t: a2 } = yo(), o2 = Zl(), s2 = (0, import_react.useMemo)(() => eu(a2, o2), [a2, o2]), c2 = Ll(e6.fetchedAt), l2 = au(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = Xl(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Fl($n), y2 = Fl(`tag`), b2 = (0, import_react.useMemo)(() => wl(e6.post), [e6]), x2 = Ql(), S2 = (0, import_react.useMemo)(() => e6.post?.richContent && e6.paywall ? Zc(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
|
|
4498
4505
|
return (0, import_react.useMemo)(() => {
|
|
4499
|
-
let n3 =
|
|
4500
|
-
return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : cr(e6.post, i2)?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount:
|
|
4506
|
+
let n3 = qu(!e6.post && l2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, l2, c2, { category: v2, tag: y2 });
|
|
4507
|
+
return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : cr(e6.post, i2)?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount: $(s2.likeCount(f2)) } : {}, isLiked: d2, likeCountValue: f2, isLikeCountLoaded: p2, toggleLike: g2, liveLikes: _2, clockValue: c2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !l2 };
|
|
4501
4508
|
}, [e6, t2, b2, S2, s2, o2, c2, f2, d2, p2, m2, h2, g2, _2, l2, r2, i2, v2, y2]);
|
|
4502
4509
|
};
|
|
4503
|
-
var
|
|
4504
|
-
var
|
|
4505
|
-
var
|
|
4510
|
+
var Yu = (e6) => ({ post: e6, hasError: false });
|
|
4511
|
+
var Xu = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
|
|
4512
|
+
var Zu = (e6) => {
|
|
4506
4513
|
throw e6;
|
|
4507
4514
|
};
|
|
4508
|
-
var
|
|
4515
|
+
var Qu = { ...Ku(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
|
|
4509
4516
|
}, liveLikes: void 0, postUrl: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, isLoadingPost: true, hasError: false, isEmpty: false };
|
|
4510
|
-
var
|
|
4511
|
-
var
|
|
4512
|
-
var
|
|
4513
|
-
var
|
|
4514
|
-
let { post: a2, hasError: o2 } = Bn(r2), c2 = Yn(a2, (0, import_react.useCallback)(() => n2 ?
|
|
4517
|
+
var $u = { ...Qu, isLoadingPost: false, hasError: true, isEmpty: true };
|
|
4518
|
+
var ed = 2500;
|
|
4519
|
+
var td = Promise.resolve(Yu({ post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: 0 }));
|
|
4520
|
+
var nd = ({ children: t2, postId: n2, postLoadPromise: r2, monitoringClient: i2 }) => {
|
|
4521
|
+
let { post: a2, hasError: o2 } = Bn(r2), c2 = Yn(a2, (0, import_react.useCallback)(() => n2 ? xl(n2) : Promise.resolve(void 0), [n2])), l2 = Ju({ postWithAuthor: c2, hasError: o2, monitoringClient: i2, isPostInPreview: false, postPageBase: ur() });
|
|
4515
4522
|
return pr(dr.postByIdProvider, o2 ? `error` : c2.post ? `data` : `empty`), (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: l2, children: t2 });
|
|
4516
4523
|
};
|
|
4517
|
-
function
|
|
4518
|
-
let i2 =
|
|
4519
|
-
let e6 =
|
|
4520
|
-
return
|
|
4521
|
-
} }),
|
|
4522
|
-
return (0, import_jsx_runtime.jsx)(bo, { i18n: c2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value:
|
|
4524
|
+
function rd({ children: t2, postPicker: n2 }) {
|
|
4525
|
+
let i2 = Pl(n2), a2 = Wn(), o2 = hr(), s2 = (0, import_react.useMemo)(() => El(Rn), []), { i18n: c2, locale: l2 } = Go($o), d2 = Kn(() => i2 ? Hn(Mo({ key: `blog-builder:post-by-id:${i2}`, warmupData: o2, fetchData: () => {
|
|
4526
|
+
let e6 = Sl(i2, a2);
|
|
4527
|
+
return jl(kl(s2, `post-by-id-read`, { feature: Tl.post }, a2 ? ll(e6, ed, `post-by-id`) : e6));
|
|
4528
|
+
} }), Yu, a2 ? Zu : Xu) : td, [i2, a2, o2, s2]);
|
|
4529
|
+
return (0, import_jsx_runtime.jsx)(bo, { i18n: c2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Qu, children: t2 }), children: [(0, import_jsx_runtime.jsx)(Wo, { i18n: c2, locale: l2 }), (0, import_jsx_runtime.jsx)(Al, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: $u, children: t2 }), feature: Tl.post, monitoringClient: s2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(nd, { postId: i2, postLoadPromise: d2, monitoringClient: s2, children: t2 }, i2 ?? ``) })] }) });
|
|
4523
4530
|
}
|
|
4524
|
-
var
|
|
4531
|
+
var id = jn(`474ee948-702b-4c0f-970e-b5319eff6d8b`);
|
|
4525
4532
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4526
4533
|
0 && (module.exports = {
|
|
4527
4534
|
PostByIdProvider,
|
|
4528
4535
|
injectAccessTokenGetter,
|
|
4529
4536
|
usePostByIdContext
|
|
4530
4537
|
});
|
|
4531
|
-
//# sourceMappingURL=context-post-by-id
|
|
4538
|
+
//# sourceMappingURL=context-post-by-id.js.map
|