@wix/blog 1.0.713 → 1.0.714
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/runtime.js +2 -2
- package/_sdk-exports/context-post-by-id/runtime.js +2 -2
- package/_sdk-exports/context-post-by-slug/runtime.js +2 -2
- package/_sdk-exports/context-post-list-item/runtime.js +4 -4
- package/_sdk-exports/context-related-posts/runtime.js +4 -4
- package/build/cjs/context-blog-feed.js +9 -3
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +118 -111
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +9 -3
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +596 -589
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-related-posts.js +941 -934
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +9 -3
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +118 -111
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +9 -3
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +596 -589
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-related-posts.mjs +941 -934
- package/build/es/context-related-posts.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -783,21 +783,21 @@ function ln(e6, t2) {
|
|
|
783
783
|
function un(e6) {
|
|
784
784
|
return isFinite(e6) ? e6 : e6.toString();
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function N(e6) {
|
|
787
787
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function dn(e6) {
|
|
790
790
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
791
791
|
}
|
|
792
|
-
var
|
|
793
|
-
var
|
|
792
|
+
var fn = `modulepreload`;
|
|
793
|
+
var pn = function(e6, t2) {
|
|
794
794
|
return new URL(e6, t2).href;
|
|
795
795
|
};
|
|
796
|
-
var
|
|
797
|
-
var
|
|
796
|
+
var mn = {};
|
|
797
|
+
var hn = function(e6) {
|
|
798
798
|
return e6.pathname.endsWith(`.css`);
|
|
799
799
|
};
|
|
800
|
-
var
|
|
800
|
+
var gn = function(e6, t2, n2) {
|
|
801
801
|
if (t2 in e6) return e6[t2];
|
|
802
802
|
let r2 = n2();
|
|
803
803
|
if (!r2) {
|
|
@@ -811,7 +811,7 @@ var _n = function(e6, t2, n2) {
|
|
|
811
811
|
});
|
|
812
812
|
return e6[t2] = i2, i2;
|
|
813
813
|
};
|
|
814
|
-
var
|
|
814
|
+
var _n = function(e6, t2, n2) {
|
|
815
815
|
let r2 = Promise.resolve();
|
|
816
816
|
if (t2 && t2.length > 0) {
|
|
817
817
|
let o3 = function(e8) {
|
|
@@ -822,9 +822,9 @@ var vn = function(e6, t2, n2) {
|
|
|
822
822
|
var o2 = o3, s2 = s3;
|
|
823
823
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
824
824
|
r2 = o3(t2.map((t3) => {
|
|
825
|
-
t3 =
|
|
826
|
-
let r3 = s3(t3), i4 =
|
|
827
|
-
return
|
|
825
|
+
t3 = pn(t3, n2);
|
|
826
|
+
let r3 = s3(t3), i4 = hn(r3);
|
|
827
|
+
return gn(mn, r3.href, () => {
|
|
828
828
|
if (e7 === void 0) {
|
|
829
829
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
830
830
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -835,7 +835,7 @@ var vn = function(e6, t2, n2) {
|
|
|
835
835
|
}
|
|
836
836
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
837
837
|
let t4 = document.createElement(`link`);
|
|
838
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
838
|
+
if (t4.rel = i4 ? `stylesheet` : fn, i4 || (t4.as = `script`), t4.crossOrigin = ``, t4.href = r3.href, a2 && t4.setAttribute(`nonce`, a2), document.head.appendChild(t4), i4) return new Promise((e8, n3) => {
|
|
839
839
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
840
840
|
});
|
|
841
841
|
});
|
|
@@ -850,30 +850,30 @@ var vn = function(e6, t2, n2) {
|
|
|
850
850
|
return e6().catch(i2);
|
|
851
851
|
});
|
|
852
852
|
};
|
|
853
|
-
var
|
|
854
|
-
var
|
|
855
|
-
var
|
|
856
|
-
var
|
|
857
|
-
let e6 =
|
|
858
|
-
if (e6) return { [
|
|
853
|
+
var vn = `x-wix-linguist`;
|
|
854
|
+
var yn = `00000000-0000-0000-0000-000000000000`;
|
|
855
|
+
var bn = `false`;
|
|
856
|
+
var xn = () => {
|
|
857
|
+
let e6 = wn(`language`), t2 = wn(`locale`);
|
|
858
|
+
if (e6) return { [vn]: [e6, t2 || e6, bn, yn].join(`|`) };
|
|
859
859
|
};
|
|
860
|
-
function
|
|
860
|
+
function Sn() {
|
|
861
861
|
let e6 = null, t2 = null;
|
|
862
862
|
return { promise: new Promise((n2, r2) => {
|
|
863
863
|
e6 = n2, t2 = r2;
|
|
864
864
|
}), resolve: e6, reject: t2 };
|
|
865
865
|
}
|
|
866
|
-
var
|
|
867
|
-
var
|
|
868
|
-
var
|
|
869
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
870
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
871
|
-
return
|
|
866
|
+
var Cn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
867
|
+
var wn = (e6) => Cn()?.[e6];
|
|
868
|
+
var Tn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
869
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Dn();
|
|
870
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: wn(`language`), locale: wn(`locale`), get passThroughHeaders() {
|
|
871
|
+
return xn();
|
|
872
872
|
} } };
|
|
873
873
|
}, auth: (e7) => {
|
|
874
874
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
875
|
-
!e7 &&
|
|
876
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
875
|
+
!e7 && En() && (e7 = t2?.getAccessTokenFunction?.());
|
|
876
|
+
let n2 = false, { resolve: r2, promise: i2 } = Sn();
|
|
877
877
|
return { getAuthHeaders: async () => {
|
|
878
878
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
879
879
|
return { headers: { Authorization: await e7() } };
|
|
@@ -881,37 +881,37 @@ var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
881
881
|
r2(e8);
|
|
882
882
|
}) };
|
|
883
883
|
} });
|
|
884
|
-
function
|
|
884
|
+
function En() {
|
|
885
885
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Dn() {
|
|
888
888
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
889
889
|
if (!e6) return;
|
|
890
890
|
let t2 = new URL(e6);
|
|
891
891
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
892
892
|
}
|
|
893
|
-
var
|
|
893
|
+
var On = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
894
894
|
if (!e6) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
|
|
895
895
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
896
896
|
}, getAccessToken: () => {
|
|
897
897
|
throw Error(`Not implemented`);
|
|
898
898
|
}, observeState: () => ({ disconnect: () => {
|
|
899
899
|
} }) });
|
|
900
|
-
var
|
|
900
|
+
var kn = Tn({ createHost: function(e6) {
|
|
901
901
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
902
902
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
903
|
-
return { channel:
|
|
903
|
+
return { channel: On({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
904
904
|
} };
|
|
905
905
|
} });
|
|
906
|
-
var
|
|
907
|
-
let n2 =
|
|
906
|
+
var An = (e6, t2) => {
|
|
907
|
+
let n2 = kn.host({ applicationId: e6, componentId: t2 }), r2 = kn.auth();
|
|
908
908
|
return qe({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
909
909
|
};
|
|
910
|
-
var
|
|
911
|
-
function
|
|
910
|
+
var jn = (e6) => An(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
911
|
+
function Mn() {
|
|
912
912
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
913
913
|
if (e6) return { initWixModules(t3, n3) {
|
|
914
|
-
return
|
|
914
|
+
return Nn(() => e6(t3, n3));
|
|
915
915
|
}, fetchWithAuth() {
|
|
916
916
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
917
917
|
}, graphql() {
|
|
@@ -921,10 +921,10 @@ function Nn() {
|
|
|
921
921
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
922
922
|
if (r2) {
|
|
923
923
|
if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
|
|
924
|
-
return
|
|
924
|
+
return Nn(() => n2.use(e7));
|
|
925
925
|
}
|
|
926
926
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
927
|
-
return
|
|
927
|
+
return Nn(() => t2.use(e7));
|
|
928
928
|
}, fetchWithAuth: (e7, n3) => {
|
|
929
929
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
930
930
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -936,7 +936,7 @@ function Nn() {
|
|
|
936
936
|
return t2.graphql(e7, n3, r2);
|
|
937
937
|
} };
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Nn(e6) {
|
|
940
940
|
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
941
941
|
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
942
942
|
try {
|
|
@@ -945,17 +945,17 @@ function Pn(e6) {
|
|
|
945
945
|
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Pn(e6, t2) {
|
|
949
949
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
950
|
-
let r2 =
|
|
950
|
+
let r2 = Mn();
|
|
951
951
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
952
952
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
953
953
|
}])) };
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
return
|
|
955
|
+
function Fn(e6) {
|
|
956
|
+
return Pn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
957
957
|
}
|
|
958
|
-
var
|
|
958
|
+
var In = class {
|
|
959
959
|
constructor(e6) {
|
|
960
960
|
this.message = e6, this.captureException = () => {
|
|
961
961
|
console.error(this.message);
|
|
@@ -970,13 +970,13 @@ var Ln = class {
|
|
|
970
970
|
};
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
|
-
var
|
|
974
|
-
var
|
|
975
|
-
function
|
|
973
|
+
var Ln = (e6) => new In(e6);
|
|
974
|
+
var Rn = Fn({ getMonitoringClient: (e6) => () => e6.getMonitoringClient ? e6.getMonitoringClient() : Ln(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
975
|
+
function zn(e6) {
|
|
976
976
|
let t2 = Promise.resolve(e6);
|
|
977
977
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function Bn(e6) {
|
|
980
980
|
if (e6.status === `fulfilled`) return e6.value;
|
|
981
981
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
982
982
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -984,17 +984,17 @@ function Vn(e6) {
|
|
|
984
984
|
e6.status = `rejected`, e6.reason = t2;
|
|
985
985
|
})), e6);
|
|
986
986
|
}
|
|
987
|
-
var
|
|
988
|
-
function
|
|
989
|
-
let r2 =
|
|
990
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
987
|
+
var Vn = /* @__PURE__ */ new WeakMap();
|
|
988
|
+
function Hn(e6, t2, n2) {
|
|
989
|
+
let r2 = Vn.get(e6);
|
|
990
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Vn.set(e6, r2));
|
|
991
991
|
let i2 = r2.get(t2);
|
|
992
992
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
993
993
|
let a2 = i2.get(n2);
|
|
994
994
|
if (!a2) {
|
|
995
|
-
if (e6.status === `fulfilled`) a2 =
|
|
995
|
+
if (e6.status === `fulfilled`) a2 = zn(t2(e6.value));
|
|
996
996
|
else if (e6.status === `rejected`) try {
|
|
997
|
-
a2 =
|
|
997
|
+
a2 = zn(n2(e6.reason));
|
|
998
998
|
} catch {
|
|
999
999
|
a2 = e6.then(t2, n2);
|
|
1000
1000
|
}
|
|
@@ -1003,45 +1003,45 @@ function Un(e6, t2, n2) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
return a2;
|
|
1005
1005
|
}
|
|
1006
|
-
var
|
|
1007
|
-
function
|
|
1006
|
+
var Un = 1e4;
|
|
1007
|
+
function Wn(e6) {
|
|
1008
1008
|
let [t2, n2] = u(void 0);
|
|
1009
1009
|
return s(() => {
|
|
1010
1010
|
let t3 = Date.now();
|
|
1011
|
-
t3 - e6 >
|
|
1011
|
+
t3 - e6 > Un && i(() => n2(t3));
|
|
1012
1012
|
}, []), t2 ?? e6;
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function P(e6) {
|
|
1015
1015
|
return e6;
|
|
1016
1016
|
}
|
|
1017
|
-
var
|
|
1018
|
-
var
|
|
1017
|
+
var Gn = P(`@wix/site-service-rendering-context`);
|
|
1018
|
+
var Kn = () => {
|
|
1019
1019
|
try {
|
|
1020
|
-
return f(
|
|
1020
|
+
return f(Gn).SSR;
|
|
1021
1021
|
} catch {
|
|
1022
1022
|
return false;
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
|
-
var
|
|
1026
|
-
function
|
|
1025
|
+
var qn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1026
|
+
function Jn(e6, t2) {
|
|
1027
1027
|
let [n2, r2] = u(() => ({ deps: t2, value: e6() }));
|
|
1028
1028
|
return s(() => {
|
|
1029
|
-
if (
|
|
1029
|
+
if (qn(n2.deps, t2)) return;
|
|
1030
1030
|
let a2 = e6();
|
|
1031
1031
|
i(() => r2({ deps: t2, value: a2 }));
|
|
1032
1032
|
}, t2), n2.value;
|
|
1033
1033
|
}
|
|
1034
|
-
var
|
|
1035
|
-
var
|
|
1036
|
-
var
|
|
1037
|
-
var
|
|
1038
|
-
var
|
|
1039
|
-
var
|
|
1034
|
+
var Yn = P(`@wix/site-service-url`);
|
|
1035
|
+
var Xn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1036
|
+
var Zn = `post`;
|
|
1037
|
+
var Qn = `builder-post`;
|
|
1038
|
+
var $n = `__blog_unknown_section__`;
|
|
1039
|
+
var er = (e6) => {
|
|
1040
1040
|
let t2;
|
|
1041
1041
|
try {
|
|
1042
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1043
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1044
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1042
|
+
let n3 = e6.appSectionRelativeUrl(Xn, Qn);
|
|
1043
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, $n) && !n3?.endsWith(`/post-page`)) return;
|
|
1044
|
+
t2 = e6.appSectionRelativeUrl(Xn, Qn, true);
|
|
1045
1045
|
} catch {
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
@@ -1049,12 +1049,12 @@ var tr = (e6) => {
|
|
|
1049
1049
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1050
1050
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1051
1051
|
};
|
|
1052
|
-
var
|
|
1053
|
-
var
|
|
1054
|
-
let t2 =
|
|
1055
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1052
|
+
var tr = (e6) => `${e6}/${Zn}`;
|
|
1053
|
+
var nr = (e6) => {
|
|
1054
|
+
let t2 = er(e6);
|
|
1055
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${tr(t2)}`;
|
|
1056
1056
|
};
|
|
1057
|
-
var
|
|
1057
|
+
var rr = (e6, t2) => {
|
|
1058
1058
|
if (!e6 || !t2) return;
|
|
1059
1059
|
let n2;
|
|
1060
1060
|
try {
|
|
@@ -1068,14 +1068,14 @@ var ir = (e6, t2) => {
|
|
|
1068
1068
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1069
1069
|
}
|
|
1070
1070
|
};
|
|
1071
|
-
var
|
|
1071
|
+
var ir = (e6) => {
|
|
1072
1072
|
if (!e6) return;
|
|
1073
1073
|
if (typeof e6 == `string`) return e6;
|
|
1074
1074
|
let { base: t2, path: n2 } = e6;
|
|
1075
1075
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1076
1076
|
};
|
|
1077
|
-
var
|
|
1078
|
-
let n2 =
|
|
1077
|
+
var ar = (e6, t2) => {
|
|
1078
|
+
let n2 = ir(e6.url), r2 = `/${Zn}`;
|
|
1079
1079
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1080
1080
|
let i2, a2;
|
|
1081
1081
|
try {
|
|
@@ -1086,23 +1086,23 @@ var or = (e6, t2) => {
|
|
|
1086
1086
|
let o2 = a2.slice(0, -r2.length);
|
|
1087
1087
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1088
1088
|
};
|
|
1089
|
-
var
|
|
1090
|
-
let n2 =
|
|
1089
|
+
var or = (e6, t2) => {
|
|
1090
|
+
let n2 = ar(e6, t2);
|
|
1091
1091
|
if (n2) return { href: n2, target: `_self` };
|
|
1092
1092
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1093
|
-
let r2 =
|
|
1093
|
+
let r2 = ir(e6.url);
|
|
1094
1094
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1095
1095
|
};
|
|
1096
|
-
var
|
|
1096
|
+
var sr = (e6) => {
|
|
1097
1097
|
let t2;
|
|
1098
1098
|
try {
|
|
1099
|
-
t2 = f(
|
|
1099
|
+
t2 = f(Yn);
|
|
1100
1100
|
} catch {
|
|
1101
1101
|
return;
|
|
1102
1102
|
}
|
|
1103
|
-
return
|
|
1103
|
+
return nr(t2) ?? rr(t2.currentUrl, e6);
|
|
1104
1104
|
};
|
|
1105
|
-
var
|
|
1105
|
+
var cr = (e6, t2) => {
|
|
1106
1106
|
let n2;
|
|
1107
1107
|
try {
|
|
1108
1108
|
n2 = new URL(e6).pathname.split(`/`).filter(Boolean);
|
|
@@ -1122,52 +1122,59 @@ var lr = (e6, t2) => {
|
|
|
1122
1122
|
return i2;
|
|
1123
1123
|
}
|
|
1124
1124
|
};
|
|
1125
|
-
var
|
|
1125
|
+
var lr = () => {
|
|
1126
1126
|
let e6;
|
|
1127
1127
|
try {
|
|
1128
|
-
e6 = f(
|
|
1128
|
+
e6 = f(Yn);
|
|
1129
1129
|
} catch {
|
|
1130
1130
|
return;
|
|
1131
1131
|
}
|
|
1132
1132
|
if (!e6.currentUrl) return;
|
|
1133
|
-
let t2 =
|
|
1134
|
-
return
|
|
1133
|
+
let t2 = er(e6);
|
|
1134
|
+
return cr(e6.currentUrl, t2 && tr(t2));
|
|
1135
1135
|
};
|
|
1136
|
-
var
|
|
1137
|
-
var
|
|
1138
|
-
var
|
|
1136
|
+
var ur = { categoryHeader: `WixBlog.CategoryHeader`, coverMedia: `WixBlog.PostCoverMedia`, postActions: `WixBlog.PostActionBar`, postCategories: `WixBlog.PostCategoryList`, postCounters: `WixBlog.PostCounterBar`, postMetadata: `WixBlog.PostMetadataBar`, postTags: `WixBlog.PostTagList`, feedProvider: `WixBlog.BlogFeedContextProvider`, postBySlugProvider: `WixBlog.PostBySlugContextProvider`, postByIdProvider: `WixBlog.PostByIdContextProvider`, relatedPostsProvider: `WixBlog.RelatedPostsContextProvider` };
|
|
1137
|
+
var dr = (e6) => `${e6} rendered`;
|
|
1138
|
+
var fr = (e6, t2, n2) => {
|
|
1139
1139
|
s(() => {
|
|
1140
1140
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1141
|
-
performance.mark(
|
|
1141
|
+
performance.mark(dr(e6), { detail: { state: t2, compId: n2 } });
|
|
1142
1142
|
} catch {
|
|
1143
1143
|
}
|
|
1144
1144
|
}, [e6, t2, n2]);
|
|
1145
1145
|
};
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1148
|
-
var
|
|
1146
|
+
var pr = P(`@wix/site-service-locale`);
|
|
1147
|
+
var mr = P(`@wix/site-service-renderer-configuration`);
|
|
1148
|
+
var hr = () => {
|
|
1149
1149
|
let e6, t2;
|
|
1150
1150
|
try {
|
|
1151
|
-
e6 = f(
|
|
1151
|
+
e6 = f(mr).languageCode;
|
|
1152
1152
|
} catch {
|
|
1153
1153
|
}
|
|
1154
1154
|
try {
|
|
1155
|
-
t2 = f(
|
|
1155
|
+
t2 = f(pr).language;
|
|
1156
1156
|
} catch {
|
|
1157
1157
|
}
|
|
1158
1158
|
return e6 || t2;
|
|
1159
1159
|
};
|
|
1160
|
+
var gr = P(`@wix/viewer-service-multilingual`);
|
|
1160
1161
|
var _r = () => {
|
|
1162
|
+
let e6;
|
|
1161
1163
|
try {
|
|
1162
|
-
let {
|
|
1163
|
-
|
|
1164
|
+
let { multilingualEnabled: t3, currentLocale: n3 } = f(gr);
|
|
1165
|
+
t3 && n3 && !n3.primaryLocale && (e6 = n3.regionalFormat);
|
|
1164
1166
|
} catch {
|
|
1165
|
-
return;
|
|
1166
1167
|
}
|
|
1168
|
+
let t2, n2;
|
|
1169
|
+
try {
|
|
1170
|
+
({ locale: t2, language: n2 } = f(pr));
|
|
1171
|
+
} catch {
|
|
1172
|
+
}
|
|
1173
|
+
return e6 || t2 || n2;
|
|
1167
1174
|
};
|
|
1168
|
-
var vr =
|
|
1175
|
+
var vr = P(`@wix/site-service-warmup-data`);
|
|
1169
1176
|
function yr() {
|
|
1170
|
-
let e6 =
|
|
1177
|
+
let e6 = Kn(), t2 = null;
|
|
1171
1178
|
try {
|
|
1172
1179
|
t2 = d()(vr);
|
|
1173
1180
|
} catch {
|
|
@@ -1210,8 +1217,8 @@ var Sr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1210
1217
|
};
|
|
1211
1218
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1212
1219
|
};
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1220
|
+
var F = (e6) => typeof e6 == `string`;
|
|
1221
|
+
var I = () => {
|
|
1215
1222
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1216
1223
|
e6 = n3, t2 = r2;
|
|
1217
1224
|
});
|
|
@@ -1225,9 +1232,9 @@ var wr = (e6, t2, n2) => {
|
|
|
1225
1232
|
};
|
|
1226
1233
|
var Tr = /###/g;
|
|
1227
1234
|
var Er = (e6) => e6 && e6.includes(`###`) ? e6.replace(Tr, `.`) : e6;
|
|
1228
|
-
var Dr = (e6) => !e6 ||
|
|
1229
|
-
var
|
|
1230
|
-
let r2 =
|
|
1235
|
+
var Dr = (e6) => !e6 || F(e6);
|
|
1236
|
+
var Or = (e6, t2, n2) => {
|
|
1237
|
+
let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1231
1238
|
for (; i2 < r2.length - 1; ) {
|
|
1232
1239
|
if (Dr(e6)) return {};
|
|
1233
1240
|
let t3 = Er(r2[i2]);
|
|
@@ -1235,36 +1242,36 @@ var I = (e6, t2, n2) => {
|
|
|
1235
1242
|
}
|
|
1236
1243
|
return Dr(e6) ? {} : { obj: e6, k: Er(r2[i2]) };
|
|
1237
1244
|
};
|
|
1238
|
-
var
|
|
1239
|
-
let { obj: r2, k: i2 } =
|
|
1245
|
+
var kr = (e6, t2, n2) => {
|
|
1246
|
+
let { obj: r2, k: i2 } = Or(e6, t2, Object);
|
|
1240
1247
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1241
1248
|
r2[i2] = n2;
|
|
1242
1249
|
return;
|
|
1243
1250
|
}
|
|
1244
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1245
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1251
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Or(e6, o2, Object);
|
|
1252
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Or(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1246
1253
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1247
1254
|
};
|
|
1248
|
-
var
|
|
1249
|
-
let { obj: i2, k: a2 } =
|
|
1255
|
+
var Ar = (e6, t2, n2, r2) => {
|
|
1256
|
+
let { obj: i2, k: a2 } = Or(e6, t2, Object);
|
|
1250
1257
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1251
1258
|
};
|
|
1252
|
-
var
|
|
1253
|
-
let { obj: n2, k: r2 } =
|
|
1259
|
+
var jr = (e6, t2) => {
|
|
1260
|
+
let { obj: n2, k: r2 } = Or(e6, t2);
|
|
1254
1261
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1255
1262
|
};
|
|
1256
|
-
var jr = (e6, t2, n2) => {
|
|
1257
|
-
let r2 = Ar(e6, n2);
|
|
1258
|
-
return r2 === void 0 ? Ar(t2, n2) : r2;
|
|
1259
|
-
};
|
|
1260
1263
|
var Mr = (e6, t2, n2) => {
|
|
1261
|
-
|
|
1264
|
+
let r2 = jr(e6, n2);
|
|
1265
|
+
return r2 === void 0 ? jr(t2, n2) : r2;
|
|
1266
|
+
};
|
|
1267
|
+
var Nr = (e6, t2, n2) => {
|
|
1268
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? F(e6[r2]) || e6[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Nr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1262
1269
|
return e6;
|
|
1263
1270
|
};
|
|
1264
1271
|
var L = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1265
|
-
var
|
|
1266
|
-
var
|
|
1267
|
-
var
|
|
1272
|
+
var Pr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1273
|
+
var Fr = (e6) => F(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Pr[e7]) : e6;
|
|
1274
|
+
var Ir = class {
|
|
1268
1275
|
constructor(e6) {
|
|
1269
1276
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1270
1277
|
}
|
|
@@ -1275,20 +1282,20 @@ var Fr = class {
|
|
|
1275
1282
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1276
1283
|
}
|
|
1277
1284
|
};
|
|
1278
|
-
var
|
|
1279
|
-
var
|
|
1280
|
-
var
|
|
1285
|
+
var Lr = [` `, `,`, `?`, `!`, `;`];
|
|
1286
|
+
var Rr = new Ir(20);
|
|
1287
|
+
var zr = (e6, t2, n2) => {
|
|
1281
1288
|
t2 ||= ``, n2 ||= ``;
|
|
1282
|
-
let r2 =
|
|
1289
|
+
let r2 = Lr.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1283
1290
|
if (r2.length === 0) return true;
|
|
1284
|
-
let i2 =
|
|
1291
|
+
let i2 = Rr.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1285
1292
|
if (!a2) {
|
|
1286
1293
|
let t3 = e6.indexOf(n2);
|
|
1287
1294
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1288
1295
|
}
|
|
1289
1296
|
return a2;
|
|
1290
1297
|
};
|
|
1291
|
-
var
|
|
1298
|
+
var Br = (e6, t2, n2 = `.`) => {
|
|
1292
1299
|
if (!e6) return;
|
|
1293
1300
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1294
1301
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1304,8 +1311,8 @@ var zr = (e6, t2, n2 = `.`) => {
|
|
|
1304
1311
|
}
|
|
1305
1312
|
return i2;
|
|
1306
1313
|
};
|
|
1307
|
-
var
|
|
1308
|
-
var
|
|
1314
|
+
var Vr = (e6) => e6?.replace(/_/g, `-`);
|
|
1315
|
+
var Hr = { type: `logger`, log(e6) {
|
|
1309
1316
|
this.output(`log`, e6);
|
|
1310
1317
|
}, warn(e6) {
|
|
1311
1318
|
this.output(`warn`, e6);
|
|
@@ -1314,12 +1321,12 @@ var Br = { type: `logger`, log(e6) {
|
|
|
1314
1321
|
}, output(e6, t2) {
|
|
1315
1322
|
console?.[e6]?.apply?.(console, t2);
|
|
1316
1323
|
} };
|
|
1317
|
-
var
|
|
1324
|
+
var R = new class e2 {
|
|
1318
1325
|
constructor(e6, t2 = {}) {
|
|
1319
1326
|
this.init(e6, t2);
|
|
1320
1327
|
}
|
|
1321
1328
|
init(e6, t2 = {}) {
|
|
1322
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1329
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Hr, this.options = t2, this.debug = t2.debug;
|
|
1323
1330
|
}
|
|
1324
1331
|
log(...e6) {
|
|
1325
1332
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1334,7 +1341,7 @@ var z = new class e2 {
|
|
|
1334
1341
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1335
1342
|
}
|
|
1336
1343
|
forward(e6, t2, n2, r2) {
|
|
1337
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1344
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => F(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), F(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
1338
1345
|
}
|
|
1339
1346
|
create(t2) {
|
|
1340
1347
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1343,7 +1350,7 @@ var z = new class e2 {
|
|
|
1343
1350
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1344
1351
|
}
|
|
1345
1352
|
}();
|
|
1346
|
-
var
|
|
1353
|
+
var Ur = class {
|
|
1347
1354
|
constructor() {
|
|
1348
1355
|
this.observers = {};
|
|
1349
1356
|
}
|
|
@@ -1371,8 +1378,8 @@ var Vr = class {
|
|
|
1371
1378
|
});
|
|
1372
1379
|
}
|
|
1373
1380
|
};
|
|
1374
|
-
var
|
|
1375
|
-
var
|
|
1381
|
+
var Wr = /* @__PURE__ */ new WeakSet();
|
|
1382
|
+
var Gr = class extends Ur {
|
|
1376
1383
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1377
1384
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1378
1385
|
}
|
|
@@ -1385,23 +1392,23 @@ var Ur = class extends Vr {
|
|
|
1385
1392
|
}
|
|
1386
1393
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1387
1394
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1388
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
1389
|
-
let s2 =
|
|
1390
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
1395
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1396
|
+
let s2 = jr(this.data, o2);
|
|
1397
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : Br(this.data?.[e6]?.[t2], n2, i2);
|
|
1391
1398
|
}
|
|
1392
1399
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1393
1400
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1394
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
1401
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), kr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1395
1402
|
}
|
|
1396
1403
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1397
|
-
for (let r3 in n2) (
|
|
1404
|
+
for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
1398
1405
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
1399
1406
|
}
|
|
1400
1407
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
1401
1408
|
let o2 = [e6, t2];
|
|
1402
1409
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1403
|
-
let s2 =
|
|
1404
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
1410
|
+
let s2 = jr(this.data, o2) || {};
|
|
1411
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Nr(s2, n2, i2) : s2 = { ...s2, ...n2 }, kr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
|
|
1405
1412
|
}
|
|
1406
1413
|
removeResourceBundle(e6, t2) {
|
|
1407
1414
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -1419,37 +1426,37 @@ var Ur = class extends Vr {
|
|
|
1419
1426
|
let t2 = this.getDataByLanguage(e6);
|
|
1420
1427
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1421
1428
|
let n2 = t2[e7];
|
|
1422
|
-
return
|
|
1429
|
+
return Wr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Wr.add(n2), true);
|
|
1423
1430
|
});
|
|
1424
1431
|
}
|
|
1425
1432
|
toJSON() {
|
|
1426
1433
|
return this.data;
|
|
1427
1434
|
}
|
|
1428
1435
|
};
|
|
1429
|
-
var
|
|
1436
|
+
var Kr = { processors: {}, addPostProcessor(e6) {
|
|
1430
1437
|
this.processors[e6.name] = e6;
|
|
1431
1438
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1432
1439
|
return e6.forEach((e7) => {
|
|
1433
1440
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1434
1441
|
}), t2;
|
|
1435
1442
|
} };
|
|
1436
|
-
var
|
|
1437
|
-
function
|
|
1443
|
+
var qr = Symbol(`i18next/PATH_KEY`);
|
|
1444
|
+
function Jr() {
|
|
1438
1445
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1439
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1446
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === qr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1440
1447
|
}
|
|
1441
|
-
function
|
|
1442
|
-
let { [
|
|
1448
|
+
function z(e6, t2) {
|
|
1449
|
+
let { [qr]: n2 } = e6(Jr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1443
1450
|
if (n2.length > 1 && i2) {
|
|
1444
1451
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1445
1452
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1446
1453
|
}
|
|
1447
1454
|
return n2.join(r2);
|
|
1448
1455
|
}
|
|
1449
|
-
var
|
|
1450
|
-
var
|
|
1456
|
+
var Yr = (e6) => !F(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1457
|
+
var Xr = class e3 extends Ur {
|
|
1451
1458
|
constructor(e6, t2 = {}) {
|
|
1452
|
-
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger =
|
|
1459
|
+
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = R.create(`translator`), this.checkedLoadedFor = {};
|
|
1453
1460
|
}
|
|
1454
1461
|
changeLanguage(e6) {
|
|
1455
1462
|
e6 && (this.language = e6);
|
|
@@ -1459,33 +1466,33 @@ var Jr = class e3 extends Vr {
|
|
|
1459
1466
|
if (e6 == null) return false;
|
|
1460
1467
|
let r2 = this.resolve(e6, n2);
|
|
1461
1468
|
if (r2?.res === void 0) return false;
|
|
1462
|
-
let i2 =
|
|
1469
|
+
let i2 = Yr(r2.res);
|
|
1463
1470
|
return !(n2.returnObjects === false && i2);
|
|
1464
1471
|
}
|
|
1465
1472
|
extractFromKey(e6, t2) {
|
|
1466
1473
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1467
1474
|
n2 === void 0 && (n2 = `:`);
|
|
1468
|
-
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !
|
|
1475
|
+
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !zr(e6, n2, r2);
|
|
1469
1476
|
if (a2 && !o2) {
|
|
1470
1477
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1471
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
1478
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1472
1479
|
let a3 = e6.split(n2);
|
|
1473
1480
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
1474
1481
|
}
|
|
1475
|
-
return { key: e6, namespaces:
|
|
1482
|
+
return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1476
1483
|
}
|
|
1477
1484
|
translate(t2, n2, r2) {
|
|
1478
1485
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1479
1486
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1480
|
-
typeof t2 == `function` && (t2 =
|
|
1487
|
+
typeof t2 == `function` && (t2 = z(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? z(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1481
1488
|
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;
|
|
1482
1489
|
u2 === void 0 && (u2 = `:`);
|
|
1483
1490
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1484
1491
|
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;
|
|
1485
|
-
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 && !
|
|
1492
|
+
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 && !F(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;
|
|
1486
1493
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1487
|
-
let te2 =
|
|
1488
|
-
if (y2 && T2 && te2 && !_2.includes(ne2) && !(
|
|
1494
|
+
let te2 = Yr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1495
|
+
if (y2 && T2 && te2 && !_2.includes(ne2) && !(F(v2) && Array.isArray(T2))) {
|
|
1489
1496
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1490
1497
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1491
1498
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -1495,11 +1502,11 @@ var Jr = class e3 extends Vr {
|
|
|
1495
1502
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1496
1503
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1497
1504
|
let r3 = `${n3}${o2}${e7}`;
|
|
1498
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1505
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Yr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1499
1506
|
}
|
|
1500
1507
|
m2 = t3;
|
|
1501
1508
|
}
|
|
1502
|
-
} else if (y2 &&
|
|
1509
|
+
} else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1503
1510
|
else {
|
|
1504
1511
|
let e6 = false, n3 = false;
|
|
1505
1512
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -1531,30 +1538,30 @@ var Jr = class e3 extends Vr {
|
|
|
1531
1538
|
if (this.i18nFormat?.parse) e6 = this.i18nFormat.parse(e6, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
|
|
1532
1539
|
else if (!n2.skipInterpolation) {
|
|
1533
1540
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1534
|
-
let a3 =
|
|
1541
|
+
let a3 = F(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1535
1542
|
if (a3) {
|
|
1536
1543
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1537
1544
|
o3 = t3 && t3.length;
|
|
1538
1545
|
}
|
|
1539
|
-
let s2 = n2.replace && !
|
|
1546
|
+
let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
|
|
1540
1547
|
if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e6 = this.interpolator.interpolate(e6, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
|
|
1541
1548
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1542
1549
|
o3 < r3 && (n2.nest = false);
|
|
1543
1550
|
}
|
|
1544
1551
|
!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();
|
|
1545
1552
|
}
|
|
1546
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
1547
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1553
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
|
|
1554
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Kr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1548
1555
|
}
|
|
1549
1556
|
resolve(e6, t2 = {}) {
|
|
1550
1557
|
let n2, r2, i2, a2, o2;
|
|
1551
|
-
return
|
|
1558
|
+
return F(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? z(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1552
1559
|
if (this.isValidLookup(n2)) return;
|
|
1553
1560
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1554
1561
|
r2 = c2;
|
|
1555
1562
|
let l2 = s2.namespaces;
|
|
1556
1563
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1557
|
-
let u2 = t2.count !== void 0 && !
|
|
1564
|
+
let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1558
1565
|
l2.forEach((e8) => {
|
|
1559
1566
|
this.isValidLookup(n2) || (o2 = e8, !this.checkedLoadedFor[`${p2[0]}-${e8}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (this.checkedLoadedFor[`${p2[0]}-${e8}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
|
|
1560
1567
|
if (this.isValidLookup(n2)) return;
|
|
@@ -1583,7 +1590,7 @@ var Jr = class e3 extends Vr {
|
|
|
1583
1590
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
1584
1591
|
}
|
|
1585
1592
|
getUsedParamsDetails(e6 = {}) {
|
|
1586
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
1593
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !F(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
1587
1594
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1588
1595
|
r2 = { ...r2 };
|
|
1589
1596
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -1595,25 +1602,25 @@ var Jr = class e3 extends Vr {
|
|
|
1595
1602
|
return false;
|
|
1596
1603
|
}
|
|
1597
1604
|
};
|
|
1598
|
-
var
|
|
1605
|
+
var Zr = class {
|
|
1599
1606
|
constructor(e6) {
|
|
1600
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1607
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = R.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1601
1608
|
}
|
|
1602
1609
|
clearCache() {
|
|
1603
1610
|
this.resolveHierarchyCache = {};
|
|
1604
1611
|
}
|
|
1605
1612
|
getScriptPartFromCode(e6) {
|
|
1606
|
-
if (e6 =
|
|
1613
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1607
1614
|
let t2 = e6.split(`-`);
|
|
1608
1615
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1609
1616
|
}
|
|
1610
1617
|
getLanguagePartFromCode(e6) {
|
|
1611
|
-
if (e6 =
|
|
1618
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1612
1619
|
let t2 = e6.split(`-`);
|
|
1613
1620
|
return this.formatLanguageCode(t2[0]);
|
|
1614
1621
|
}
|
|
1615
1622
|
formatLanguageCode(e6) {
|
|
1616
|
-
if (
|
|
1623
|
+
if (F(e6) && e6.includes(`-`)) {
|
|
1617
1624
|
let t2;
|
|
1618
1625
|
try {
|
|
1619
1626
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -1644,7 +1651,7 @@ var Yr = class {
|
|
|
1644
1651
|
}
|
|
1645
1652
|
getFallbackCodes(e6, t2) {
|
|
1646
1653
|
if (!e6) return [];
|
|
1647
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
1654
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), F(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
1648
1655
|
if (!t2) return e6.default || [];
|
|
1649
1656
|
let n2 = e6[t2];
|
|
1650
1657
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -1652,7 +1659,7 @@ var Yr = class {
|
|
|
1652
1659
|
toResolveHierarchy(e6, t2) {
|
|
1653
1660
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
1654
1661
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
1655
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
1662
|
+
let i2 = t2 === void 0 || t2 === false || F(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = F(e6) && i2 && !a2, s2 = null;
|
|
1656
1663
|
if (o2) {
|
|
1657
1664
|
let n3;
|
|
1658
1665
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -1664,30 +1671,30 @@ var Yr = class {
|
|
|
1664
1671
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
1665
1672
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
1666
1673
|
};
|
|
1667
|
-
return
|
|
1674
|
+
return F(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : F(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
1668
1675
|
let t3 = this.formatLanguageCode(e7);
|
|
1669
1676
|
l2.includes(t3) || u2(t3);
|
|
1670
1677
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1671
1678
|
}
|
|
1672
1679
|
};
|
|
1673
|
-
var
|
|
1674
|
-
var
|
|
1675
|
-
var
|
|
1680
|
+
var Qr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1681
|
+
var $r = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1682
|
+
var ei = class {
|
|
1676
1683
|
constructor(e6, t2 = {}) {
|
|
1677
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1684
|
+
this.languageUtils = e6, this.options = t2, this.logger = R.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1678
1685
|
}
|
|
1679
1686
|
clearCache() {
|
|
1680
1687
|
this.pluralRulesCache = {};
|
|
1681
1688
|
}
|
|
1682
1689
|
getRule(e6, t2 = {}) {
|
|
1683
|
-
let n2 =
|
|
1690
|
+
let n2 = Vr(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1684
1691
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1685
1692
|
let a2;
|
|
1686
1693
|
try {
|
|
1687
1694
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1688
1695
|
} catch {
|
|
1689
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1690
|
-
if (!e6.match(/-|_/)) return
|
|
1696
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $r;
|
|
1697
|
+
if (!e6.match(/-|_/)) return $r;
|
|
1691
1698
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1692
1699
|
a2 = this.getRule(n3, t2);
|
|
1693
1700
|
}
|
|
@@ -1702,26 +1709,26 @@ var Qr = class {
|
|
|
1702
1709
|
}
|
|
1703
1710
|
getSuffixes(e6, t2 = {}) {
|
|
1704
1711
|
let n2 = this.getRule(e6, t2);
|
|
1705
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1712
|
+
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}`) : [];
|
|
1706
1713
|
}
|
|
1707
1714
|
getSuffix(e6, t2, n2 = {}) {
|
|
1708
1715
|
let r2 = this.getRule(e6, n2);
|
|
1709
1716
|
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));
|
|
1710
1717
|
}
|
|
1711
1718
|
};
|
|
1712
|
-
var
|
|
1713
|
-
let a2 =
|
|
1714
|
-
return !a2 && i2 &&
|
|
1719
|
+
var ti = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1720
|
+
let a2 = Mr(e6, t2, n2);
|
|
1721
|
+
return !a2 && i2 && F(n2) && (a2 = Br(e6, n2, r2), a2 === void 0 && (a2 = Br(t2, n2, r2))), a2;
|
|
1715
1722
|
};
|
|
1716
|
-
var
|
|
1717
|
-
var
|
|
1723
|
+
var ni = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1724
|
+
var ri = class {
|
|
1718
1725
|
constructor(e6 = {}) {
|
|
1719
|
-
this.logger =
|
|
1726
|
+
this.logger = R.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1720
1727
|
}
|
|
1721
1728
|
init(e6 = {}) {
|
|
1722
1729
|
e6.interpolation ||= { escapeValue: true };
|
|
1723
1730
|
let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e6.interpolation;
|
|
1724
|
-
this.escape = t2 === void 0 ?
|
|
1731
|
+
this.escape = t2 === void 0 ? Fr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? L(i2) : a2 || `{{`, this.suffix = o2 ? L(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? L(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? L(l2) : ``, this.nestingPrefix = d2 ? L(d2) : f2 || L(`$t(`), this.nestingSuffix = p2 ? L(p2) : m2 || L(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1725
1732
|
}
|
|
1726
1733
|
reset() {
|
|
1727
1734
|
this.options && this.init(this.options);
|
|
@@ -1733,11 +1740,11 @@ var ti = class {
|
|
|
1733
1740
|
interpolate(e6, t2, n2, r2) {
|
|
1734
1741
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1735
1742
|
if (!e7.includes(this.formatSeparator)) {
|
|
1736
|
-
let i4 =
|
|
1743
|
+
let i4 = ti(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1737
1744
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1738
1745
|
}
|
|
1739
1746
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1740
|
-
return this.format(
|
|
1747
|
+
return this.format(ti(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1741
1748
|
};
|
|
1742
1749
|
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.`);
|
|
1743
1750
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1747,15 +1754,15 @@ var ti = class {
|
|
|
1747
1754
|
if (a2 = c2(n3), a2 === void 0) {
|
|
1748
1755
|
if (typeof l2 == `function`) {
|
|
1749
1756
|
let t4 = l2(e6, i2, r2);
|
|
1750
|
-
a2 =
|
|
1757
|
+
a2 = F(t4) ? t4 : ``;
|
|
1751
1758
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1752
1759
|
else if (u2) {
|
|
1753
1760
|
a2 = i2[0];
|
|
1754
1761
|
continue;
|
|
1755
1762
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1756
|
-
} else !
|
|
1763
|
+
} else !F(a2) && !this.useRawValueToEscape && (a2 = Cr(a2));
|
|
1757
1764
|
let s3 = t3.safeValue(a2);
|
|
1758
|
-
if (e6 = e6.replace(i2[0],
|
|
1765
|
+
if (e6 = e6.replace(i2[0], ni(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1759
1766
|
}
|
|
1760
1767
|
}), e6;
|
|
1761
1768
|
}
|
|
@@ -1776,15 +1783,15 @@ var ti = class {
|
|
|
1776
1783
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
1777
1784
|
for (; r2 = s2.exec(e6); ) {
|
|
1778
1785
|
let u2 = [];
|
|
1779
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
1786
|
+
a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1780
1787
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1781
|
-
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !
|
|
1782
|
-
|
|
1788
|
+
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !F(i2)) return i2;
|
|
1789
|
+
F(i2) || (i2 = Cr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + Cr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1783
1790
|
}
|
|
1784
1791
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1785
1792
|
}
|
|
1786
1793
|
};
|
|
1787
|
-
var
|
|
1794
|
+
var ii = (e6) => {
|
|
1788
1795
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1789
1796
|
if (e6.includes(`(`)) {
|
|
1790
1797
|
let r2 = e6.split(`(`);
|
|
@@ -1799,23 +1806,23 @@ var ni = (e6) => {
|
|
|
1799
1806
|
}
|
|
1800
1807
|
return { formatName: t2, formatOptions: n2 };
|
|
1801
1808
|
};
|
|
1802
|
-
var
|
|
1809
|
+
var ai = (e6) => {
|
|
1803
1810
|
let t2 = {};
|
|
1804
1811
|
return (n2, r2, i2) => {
|
|
1805
1812
|
let a2 = i2;
|
|
1806
1813
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1807
1814
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1808
|
-
return s2 || (s2 = e6(
|
|
1815
|
+
return s2 || (s2 = e6(Vr(r2), i2), t2[o2] = s2), s2(n2);
|
|
1809
1816
|
};
|
|
1810
1817
|
};
|
|
1811
|
-
var
|
|
1812
|
-
var
|
|
1818
|
+
var oi = (e6) => (t2, n2, r2) => e6(Vr(n2), r2)(t2);
|
|
1819
|
+
var si = class {
|
|
1813
1820
|
constructor(e6 = {}) {
|
|
1814
|
-
this.logger =
|
|
1821
|
+
this.logger = R.create(`formatter`), this.options = e6, this.init(e6);
|
|
1815
1822
|
}
|
|
1816
1823
|
init(e6, t2 = { interpolation: {} }) {
|
|
1817
1824
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1818
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1825
|
+
let n2 = t2.cacheInBuiltFormats ? ai : oi;
|
|
1819
1826
|
this.formats = { number: n2((e7, t3) => {
|
|
1820
1827
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1821
1828
|
return (e8) => n3.format(e8);
|
|
@@ -1837,7 +1844,7 @@ var ai = class {
|
|
|
1837
1844
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1838
1845
|
}
|
|
1839
1846
|
addCached(e6, t2) {
|
|
1840
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1847
|
+
this.formats[e6.toLowerCase().trim()] = ai(t2);
|
|
1841
1848
|
}
|
|
1842
1849
|
format(e6, t2, n2, r2 = {}) {
|
|
1843
1850
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1848,7 +1855,7 @@ var ai = class {
|
|
|
1848
1855
|
a2.push(t3);
|
|
1849
1856
|
}
|
|
1850
1857
|
return a2.reduce((e7, t3) => {
|
|
1851
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1858
|
+
let { formatName: i3, formatOptions: a3 } = ii(t3);
|
|
1852
1859
|
if (this.formats[i3]) {
|
|
1853
1860
|
let t4 = e7;
|
|
1854
1861
|
try {
|
|
@@ -1863,12 +1870,12 @@ var ai = class {
|
|
|
1863
1870
|
}, e6);
|
|
1864
1871
|
}
|
|
1865
1872
|
};
|
|
1866
|
-
var
|
|
1873
|
+
var ci = (e6, t2) => {
|
|
1867
1874
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1868
1875
|
};
|
|
1869
|
-
var
|
|
1876
|
+
var li = class extends Ur {
|
|
1870
1877
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1871
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1878
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = R.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);
|
|
1872
1879
|
}
|
|
1873
1880
|
queueLoad(e6, t2, n2, r2) {
|
|
1874
1881
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1885,7 +1892,7 @@ var si = class extends Vr {
|
|
|
1885
1892
|
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);
|
|
1886
1893
|
let o2 = {};
|
|
1887
1894
|
this.queue.forEach((n3) => {
|
|
1888
|
-
|
|
1895
|
+
Ar(n3.loaded, [i2], a2), ci(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1889
1896
|
o2[e7] || (o2[e7] = {});
|
|
1890
1897
|
let t3 = n3.loaded[e7];
|
|
1891
1898
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1920,7 +1927,7 @@ var si = class extends Vr {
|
|
|
1920
1927
|
}
|
|
1921
1928
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
1922
1929
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1923
|
-
|
|
1930
|
+
F(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), F(t2) && (t2 = [t2]);
|
|
1924
1931
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
1925
1932
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1926
1933
|
i2.toLoad.forEach((e7) => {
|
|
@@ -1957,9 +1964,9 @@ var si = class extends Vr {
|
|
|
1957
1964
|
}
|
|
1958
1965
|
}
|
|
1959
1966
|
};
|
|
1960
|
-
var
|
|
1967
|
+
var ui = () => ({ 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) => {
|
|
1961
1968
|
let t2 = {};
|
|
1962
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
1969
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), F(e6[1]) && (t2.defaultValue = e6[1]), F(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1963
1970
|
let n2 = e6[3] || e6[2];
|
|
1964
1971
|
Object.keys(n2).forEach((e7) => {
|
|
1965
1972
|
t2[e7] = n2[e7];
|
|
@@ -1967,17 +1974,17 @@ var ci = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1967
1974
|
}
|
|
1968
1975
|
return t2;
|
|
1969
1976
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1970
|
-
var
|
|
1971
|
-
var
|
|
1977
|
+
var di = (e6) => (F(e6.ns) && (e6.ns = [e6.ns]), F(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), F(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
1978
|
+
var fi = () => {
|
|
1972
1979
|
};
|
|
1973
|
-
var
|
|
1980
|
+
var pi = (e6) => {
|
|
1974
1981
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
1975
1982
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
1976
1983
|
});
|
|
1977
1984
|
};
|
|
1978
|
-
var
|
|
1985
|
+
var B = class e4 extends Ur {
|
|
1979
1986
|
constructor(e6 = {}, t2) {
|
|
1980
|
-
if (super(), this.options =
|
|
1987
|
+
if (super(), this.options = di(e6), this.services = {}, this.logger = R, this.modules = { external: [] }, pi(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
1981
1988
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
1982
1989
|
setTimeout(() => {
|
|
1983
1990
|
this.init(e6, t2);
|
|
@@ -1985,26 +1992,26 @@ var V = class e4 extends Vr {
|
|
|
1985
1992
|
}
|
|
1986
1993
|
}
|
|
1987
1994
|
init(e6 = {}, t2) {
|
|
1988
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
1989
|
-
let n2 =
|
|
1990
|
-
this.options = { ...n2, ...this.options, ...
|
|
1995
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (F(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
1996
|
+
let n2 = ui();
|
|
1997
|
+
this.options = { ...n2, ...this.options, ...di(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);
|
|
1991
1998
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
1992
1999
|
if (!this.options.isClone) {
|
|
1993
|
-
this.modules.logger ?
|
|
2000
|
+
this.modules.logger ? R.init(r2(this.modules.logger), this.options) : R.init(null, this.options);
|
|
1994
2001
|
let e7;
|
|
1995
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
1996
|
-
let t3 = new
|
|
1997
|
-
this.store = new
|
|
2002
|
+
e7 = this.modules.formatter ? this.modules.formatter : si;
|
|
2003
|
+
let t3 = new Zr(this.options);
|
|
2004
|
+
this.store = new Gr(this.options.resources, this.options);
|
|
1998
2005
|
let n3 = this.services;
|
|
1999
|
-
n3.logger =
|
|
2006
|
+
n3.logger = R, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new ei(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 ri(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new li(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2000
2007
|
this.emit(e8, ...t4);
|
|
2001
|
-
}), 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
|
|
2008
|
+
}), 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 Xr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2002
2009
|
this.emit(e8, ...t4);
|
|
2003
2010
|
}), this.modules.external.forEach((e8) => {
|
|
2004
2011
|
e8.init && e8.init(this);
|
|
2005
2012
|
});
|
|
2006
2013
|
}
|
|
2007
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2014
|
+
if (this.format = this.options.interpolation.format, t2 ||= fi, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2008
2015
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2009
2016
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2010
2017
|
}
|
|
@@ -2013,7 +2020,7 @@ var V = class e4 extends Vr {
|
|
|
2013
2020
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2014
2021
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2015
2022
|
});
|
|
2016
|
-
let i2 =
|
|
2023
|
+
let i2 = I(), a2 = () => {
|
|
2017
2024
|
let e7 = (e8, n3) => {
|
|
2018
2025
|
this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e8, n3);
|
|
2019
2026
|
};
|
|
@@ -2022,8 +2029,8 @@ var V = class e4 extends Vr {
|
|
|
2022
2029
|
};
|
|
2023
2030
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2024
2031
|
}
|
|
2025
|
-
loadResources(e6, t2 =
|
|
2026
|
-
let n2 = t2, r2 =
|
|
2032
|
+
loadResources(e6, t2 = fi) {
|
|
2033
|
+
let n2 = t2, r2 = F(e6) ? e6 : this.language;
|
|
2027
2034
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2028
2035
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2029
2036
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2037,15 +2044,15 @@ var V = class e4 extends Vr {
|
|
|
2037
2044
|
} else n2(null);
|
|
2038
2045
|
}
|
|
2039
2046
|
reloadResources(e6, t2, n2) {
|
|
2040
|
-
let r2 =
|
|
2041
|
-
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 ||=
|
|
2047
|
+
let r2 = I();
|
|
2048
|
+
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 ||= fi, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2042
2049
|
r2.resolve(), n2(e7);
|
|
2043
2050
|
}), r2;
|
|
2044
2051
|
}
|
|
2045
2052
|
use(e6) {
|
|
2046
2053
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2047
2054
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2048
|
-
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` &&
|
|
2055
|
+
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` && Kr.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2049
2056
|
}
|
|
2050
2057
|
setResolvedLanguage(e6) {
|
|
2051
2058
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2061,7 +2068,7 @@ var V = class e4 extends Vr {
|
|
|
2061
2068
|
}
|
|
2062
2069
|
changeLanguage(e6, t2) {
|
|
2063
2070
|
this.isLanguageChangingTo = e6;
|
|
2064
|
-
let n2 =
|
|
2071
|
+
let n2 = I();
|
|
2065
2072
|
this.emit(`languageChanging`, e6);
|
|
2066
2073
|
let r2 = (e7) => {
|
|
2067
2074
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2069,7 +2076,7 @@ var V = class e4 extends Vr {
|
|
|
2069
2076
|
a3 ? this.isLanguageChangingTo === e6 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e7) => this.t(...e7)), t2 && t2(i3, (...e7) => this.t(...e7));
|
|
2070
2077
|
}, a2 = (t3) => {
|
|
2071
2078
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2072
|
-
let n3 =
|
|
2079
|
+
let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
|
|
2073
2080
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2074
2081
|
i2(e7, a3);
|
|
2075
2082
|
});
|
|
@@ -2083,11 +2090,11 @@ var V = class e4 extends Vr {
|
|
|
2083
2090
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2084
2091
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2085
2092
|
let c2 = { ...this.options, ...o2 };
|
|
2086
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2093
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = z(o2.keyPrefix, c2));
|
|
2087
2094
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2088
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2095
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = z(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = z(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2089
2096
|
};
|
|
2090
|
-
return
|
|
2097
|
+
return F(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2091
2098
|
}
|
|
2092
2099
|
t(...e6) {
|
|
2093
2100
|
return this.translator?.translate(...e6);
|
|
@@ -2116,16 +2123,16 @@ var V = class e4 extends Vr {
|
|
|
2116
2123
|
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2117
2124
|
}
|
|
2118
2125
|
loadNamespaces(e6, t2) {
|
|
2119
|
-
let n2 =
|
|
2120
|
-
return this.options.ns ? (
|
|
2126
|
+
let n2 = I();
|
|
2127
|
+
return this.options.ns ? (F(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2121
2128
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2122
2129
|
}), this.loadResources((e7) => {
|
|
2123
2130
|
n2.resolve(), t2 && t2(e7);
|
|
2124
2131
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2125
2132
|
}
|
|
2126
2133
|
loadLanguages(e6, t2) {
|
|
2127
|
-
let n2 =
|
|
2128
|
-
|
|
2134
|
+
let n2 = I();
|
|
2135
|
+
F(e6) && (e6 = [e6]);
|
|
2129
2136
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2130
2137
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2131
2138
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2141,24 +2148,24 @@ var V = class e4 extends Vr {
|
|
|
2141
2148
|
}
|
|
2142
2149
|
} catch {
|
|
2143
2150
|
}
|
|
2144
|
-
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
|
|
2151
|
+
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 Zr(ui());
|
|
2145
2152
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2146
2153
|
}
|
|
2147
2154
|
static createInstance(t2 = {}, n2) {
|
|
2148
2155
|
let r2 = new e4(t2, n2);
|
|
2149
2156
|
return r2.createInstance = e4.createInstance, r2;
|
|
2150
2157
|
}
|
|
2151
|
-
cloneInstance(t2 = {}, n2 =
|
|
2158
|
+
cloneInstance(t2 = {}, n2 = fi) {
|
|
2152
2159
|
let r2 = t2.forkResourceStore;
|
|
2153
2160
|
r2 && delete t2.forkResourceStore;
|
|
2154
2161
|
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2155
2162
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2156
2163
|
a2[e6] = this[e6];
|
|
2157
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2158
|
-
let e6 = { ...
|
|
2159
|
-
a2.services.interpolator = new
|
|
2164
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Gr(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) {
|
|
2165
|
+
let e6 = { ...ui().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2166
|
+
a2.services.interpolator = new ri(n3);
|
|
2160
2167
|
}
|
|
2161
|
-
return a2.translator = new
|
|
2168
|
+
return a2.translator = new Xr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2162
2169
|
a2.emit(e6, ...t3);
|
|
2163
2170
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2164
2171
|
}
|
|
@@ -2166,9 +2173,9 @@ var V = class e4 extends Vr {
|
|
|
2166
2173
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2167
2174
|
}
|
|
2168
2175
|
}.createInstance();
|
|
2169
|
-
|
|
2170
|
-
var
|
|
2171
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2176
|
+
B.createInstance, B.dir, B.init, B.loadResources, B.reloadResources, B.use, B.changeLanguage, B.getFixedT, B.t, B.exists, B.setDefaultNamespace, B.hasLoadedNamespace, B.loadNamespaces, B.loadLanguages;
|
|
2177
|
+
var mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2178
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = B.createInstance(i2 ? s2 : void 0);
|
|
2172
2179
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2173
2180
|
try {
|
|
2174
2181
|
return r3(null, await t2(e7));
|
|
@@ -2177,38 +2184,38 @@ var fi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2177
2184
|
}
|
|
2178
2185
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2179
2186
|
};
|
|
2180
|
-
function
|
|
2181
|
-
let n2 = t2 && t2.cache ? t2.cache :
|
|
2182
|
-
return (t2 && t2.strategy ? t2.strategy :
|
|
2187
|
+
function hi(e6, t2) {
|
|
2188
|
+
let n2 = t2 && t2.cache ? t2.cache : Ti, r2 = t2 && t2.serializer ? t2.serializer : Ci;
|
|
2189
|
+
return (t2 && t2.strategy ? t2.strategy : bi)(e6, { cache: n2, serializer: r2 });
|
|
2183
2190
|
}
|
|
2184
|
-
function
|
|
2191
|
+
function gi(e6) {
|
|
2185
2192
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2186
2193
|
}
|
|
2187
|
-
function
|
|
2188
|
-
let i2 =
|
|
2194
|
+
function _i(e6, t2, n2, r2) {
|
|
2195
|
+
let i2 = gi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2189
2196
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2190
2197
|
}
|
|
2191
|
-
function
|
|
2198
|
+
function vi(e6, t2, n2) {
|
|
2192
2199
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2193
2200
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2194
2201
|
}
|
|
2195
|
-
function
|
|
2202
|
+
function yi(e6, t2, n2, r2, i2) {
|
|
2196
2203
|
return n2.bind(t2, e6, r2, i2);
|
|
2197
2204
|
}
|
|
2198
|
-
function
|
|
2199
|
-
let n2 = e6.length === 1 ?
|
|
2200
|
-
return
|
|
2205
|
+
function bi(e6, t2) {
|
|
2206
|
+
let n2 = e6.length === 1 ? _i : vi;
|
|
2207
|
+
return yi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2201
2208
|
}
|
|
2202
|
-
function
|
|
2203
|
-
return
|
|
2209
|
+
function xi(e6, t2) {
|
|
2210
|
+
return yi(e6, this, vi, t2.cache.create(), t2.serializer);
|
|
2204
2211
|
}
|
|
2205
|
-
function
|
|
2206
|
-
return
|
|
2212
|
+
function Si(e6, t2) {
|
|
2213
|
+
return yi(e6, this, _i, t2.cache.create(), t2.serializer);
|
|
2207
2214
|
}
|
|
2208
|
-
var
|
|
2215
|
+
var Ci = function() {
|
|
2209
2216
|
return JSON.stringify(arguments);
|
|
2210
2217
|
};
|
|
2211
|
-
var
|
|
2218
|
+
var wi = class {
|
|
2212
2219
|
constructor() {
|
|
2213
2220
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2214
2221
|
}
|
|
@@ -2219,14 +2226,14 @@ var Si = class {
|
|
|
2219
2226
|
this.cache[e6] = t2;
|
|
2220
2227
|
}
|
|
2221
2228
|
};
|
|
2222
|
-
var
|
|
2223
|
-
return new
|
|
2229
|
+
var Ti = { create: function() {
|
|
2230
|
+
return new wi();
|
|
2224
2231
|
} };
|
|
2225
|
-
var
|
|
2226
|
-
var
|
|
2227
|
-
function
|
|
2232
|
+
var Ei = { variadic: xi, monadic: Si };
|
|
2233
|
+
var Di = /(?:[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;
|
|
2234
|
+
function Oi(e6) {
|
|
2228
2235
|
let t2 = {};
|
|
2229
|
-
return e6.replace(
|
|
2236
|
+
return e6.replace(Di, (e7) => {
|
|
2230
2237
|
let n2 = e7.length;
|
|
2231
2238
|
switch (e7[0]) {
|
|
2232
2239
|
case `G`:
|
|
@@ -2313,10 +2320,10 @@ function Ei(e6) {
|
|
|
2313
2320
|
return ``;
|
|
2314
2321
|
}), t2;
|
|
2315
2322
|
}
|
|
2316
|
-
var
|
|
2317
|
-
function
|
|
2323
|
+
var ki = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2324
|
+
function Ai(e6) {
|
|
2318
2325
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2319
|
-
let t2 = e6.split(
|
|
2326
|
+
let t2 = e6.split(ki).filter((e7) => e7.length > 0), n2 = [];
|
|
2320
2327
|
for (let e7 of t2) {
|
|
2321
2328
|
let t3 = e7.split(`/`);
|
|
2322
2329
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2326,20 +2333,20 @@ function Oi(e6) {
|
|
|
2326
2333
|
}
|
|
2327
2334
|
return n2;
|
|
2328
2335
|
}
|
|
2329
|
-
function
|
|
2336
|
+
function ji(e6) {
|
|
2330
2337
|
return e6.replace(/^(.*?)-/, ``);
|
|
2331
2338
|
}
|
|
2332
|
-
var
|
|
2333
|
-
var
|
|
2334
|
-
var
|
|
2335
|
-
var
|
|
2336
|
-
function
|
|
2339
|
+
var Mi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2340
|
+
var Ni = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2341
|
+
var Pi = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2342
|
+
var Fi = /^(0+)$/;
|
|
2343
|
+
function Ii(e6) {
|
|
2337
2344
|
let t2 = {};
|
|
2338
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2345
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Ni, function(e7, n2, r2) {
|
|
2339
2346
|
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), ``;
|
|
2340
2347
|
}), t2;
|
|
2341
2348
|
}
|
|
2342
|
-
function
|
|
2349
|
+
function Li(e6) {
|
|
2343
2350
|
switch (e6) {
|
|
2344
2351
|
case `sign-auto`:
|
|
2345
2352
|
return { signDisplay: `auto` };
|
|
@@ -2363,19 +2370,19 @@ function Fi(e6) {
|
|
|
2363
2370
|
return { signDisplay: `never` };
|
|
2364
2371
|
}
|
|
2365
2372
|
}
|
|
2366
|
-
function
|
|
2373
|
+
function Ri(e6) {
|
|
2367
2374
|
let t2;
|
|
2368
2375
|
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) {
|
|
2369
2376
|
let n2 = e6.slice(0, 2);
|
|
2370
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2377
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Fi.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2371
2378
|
t2.minimumIntegerDigits = e6.length;
|
|
2372
2379
|
}
|
|
2373
2380
|
return t2;
|
|
2374
2381
|
}
|
|
2375
|
-
function
|
|
2376
|
-
return
|
|
2382
|
+
function zi(e6) {
|
|
2383
|
+
return Li(e6) || {};
|
|
2377
2384
|
}
|
|
2378
|
-
function
|
|
2385
|
+
function Bi(e6) {
|
|
2379
2386
|
let t2 = {};
|
|
2380
2387
|
for (let n2 of e6) {
|
|
2381
2388
|
switch (n2.stem) {
|
|
@@ -2399,7 +2406,7 @@ function Ri(e6) {
|
|
|
2399
2406
|
continue;
|
|
2400
2407
|
case `measure-unit`:
|
|
2401
2408
|
case `unit`:
|
|
2402
|
-
t2.style = `unit`, t2.unit =
|
|
2409
|
+
t2.style = `unit`, t2.unit = ji(n2.options[0]);
|
|
2403
2410
|
continue;
|
|
2404
2411
|
case `compact-short`:
|
|
2405
2412
|
case `K`:
|
|
@@ -2410,10 +2417,10 @@ function Ri(e6) {
|
|
|
2410
2417
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2411
2418
|
continue;
|
|
2412
2419
|
case `scientific`:
|
|
2413
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2420
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2414
2421
|
continue;
|
|
2415
2422
|
case `engineering`:
|
|
2416
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2423
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2417
2424
|
continue;
|
|
2418
2425
|
case `notation-simple`:
|
|
2419
2426
|
t2.notation = `standard`;
|
|
@@ -2456,7 +2463,7 @@ function Ri(e6) {
|
|
|
2456
2463
|
continue;
|
|
2457
2464
|
case `integer-width`:
|
|
2458
2465
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2459
|
-
n2.options[0].replace(
|
|
2466
|
+
n2.options[0].replace(Pi, function(e8, n3, r3, i2, a2, o2) {
|
|
2460
2467
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2461
2468
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2462
2469
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2464,83 +2471,83 @@ function Ri(e6) {
|
|
|
2464
2471
|
});
|
|
2465
2472
|
continue;
|
|
2466
2473
|
}
|
|
2467
|
-
if (
|
|
2474
|
+
if (Fi.test(n2.stem)) {
|
|
2468
2475
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2469
2476
|
continue;
|
|
2470
2477
|
}
|
|
2471
|
-
if (
|
|
2478
|
+
if (Mi.test(n2.stem)) {
|
|
2472
2479
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2473
|
-
n2.stem.replace(
|
|
2480
|
+
n2.stem.replace(Mi, function(e9, n3, r3, i2, a2, o2) {
|
|
2474
2481
|
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), ``;
|
|
2475
2482
|
});
|
|
2476
2483
|
let e8 = n2.options[0];
|
|
2477
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2484
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Ii(e8) });
|
|
2478
2485
|
continue;
|
|
2479
2486
|
}
|
|
2480
|
-
if (
|
|
2481
|
-
t2 = { ...t2, ...
|
|
2487
|
+
if (Ni.test(n2.stem)) {
|
|
2488
|
+
t2 = { ...t2, ...Ii(n2.stem) };
|
|
2482
2489
|
continue;
|
|
2483
2490
|
}
|
|
2484
|
-
let e7 =
|
|
2491
|
+
let e7 = Li(n2.stem);
|
|
2485
2492
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2486
|
-
let r2 =
|
|
2493
|
+
let r2 = Ri(n2.stem);
|
|
2487
2494
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2488
2495
|
}
|
|
2489
2496
|
return t2;
|
|
2490
2497
|
}
|
|
2491
|
-
var
|
|
2498
|
+
var Vi = function(e6) {
|
|
2492
2499
|
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;
|
|
2493
2500
|
}({});
|
|
2494
|
-
function
|
|
2501
|
+
function Hi(e6) {
|
|
2495
2502
|
return e6.type === 0;
|
|
2496
2503
|
}
|
|
2497
|
-
function
|
|
2504
|
+
function Ui(e6) {
|
|
2498
2505
|
return e6.type === 1;
|
|
2499
2506
|
}
|
|
2500
|
-
function
|
|
2507
|
+
function Wi(e6) {
|
|
2501
2508
|
return e6.type === 2;
|
|
2502
2509
|
}
|
|
2503
|
-
function
|
|
2510
|
+
function Gi(e6) {
|
|
2504
2511
|
return e6.type === 3;
|
|
2505
2512
|
}
|
|
2506
|
-
function
|
|
2513
|
+
function Ki(e6) {
|
|
2507
2514
|
return e6.type === 4;
|
|
2508
2515
|
}
|
|
2509
|
-
function
|
|
2516
|
+
function qi(e6) {
|
|
2510
2517
|
return e6.type === 5;
|
|
2511
2518
|
}
|
|
2512
|
-
function
|
|
2519
|
+
function Ji(e6) {
|
|
2513
2520
|
return e6.type === 6;
|
|
2514
2521
|
}
|
|
2515
|
-
function
|
|
2522
|
+
function Yi(e6) {
|
|
2516
2523
|
return e6.type === 7;
|
|
2517
2524
|
}
|
|
2518
|
-
function
|
|
2525
|
+
function Xi(e6) {
|
|
2519
2526
|
return e6.type === 8;
|
|
2520
2527
|
}
|
|
2521
|
-
function
|
|
2528
|
+
function Zi(e6) {
|
|
2522
2529
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2523
2530
|
}
|
|
2524
|
-
function
|
|
2531
|
+
function Qi(e6) {
|
|
2525
2532
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2526
2533
|
}
|
|
2527
|
-
var
|
|
2528
|
-
var
|
|
2529
|
-
function
|
|
2534
|
+
var $i = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2535
|
+
var V = { "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`] };
|
|
2536
|
+
function ea(e6, t2) {
|
|
2530
2537
|
let n2 = ``;
|
|
2531
2538
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
2532
2539
|
let i2 = e6.charAt(r2);
|
|
2533
2540
|
if (i2 === `j`) {
|
|
2534
2541
|
let a2 = 0;
|
|
2535
2542
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
2536
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
2543
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = ta(t2);
|
|
2537
2544
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
2538
2545
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
2539
2546
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
2540
2547
|
}
|
|
2541
2548
|
return n2;
|
|
2542
2549
|
}
|
|
2543
|
-
function
|
|
2550
|
+
function ta(e6) {
|
|
2544
2551
|
let t2 = e6.hourCycle;
|
|
2545
2552
|
if (t2 === void 0) {
|
|
2546
2553
|
let n3 = e6;
|
|
@@ -2559,36 +2566,36 @@ function $i(e6) {
|
|
|
2559
2566
|
throw Error(`Invalid hourCycle`);
|
|
2560
2567
|
}
|
|
2561
2568
|
let n2 = e6.language, r2;
|
|
2562
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2569
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (V[`${n2}-${r2}`] || V[r2 || ``] || V[n2 || ``] || V[`${n2}-001`] || V[`001`])[0].charAt(0);
|
|
2563
2570
|
}
|
|
2564
|
-
var
|
|
2565
|
-
var
|
|
2566
|
-
function
|
|
2571
|
+
var na = RegExp(`^${$i.source}*`);
|
|
2572
|
+
var ra = RegExp(`${$i.source}*$`);
|
|
2573
|
+
function H(e6, t2) {
|
|
2567
2574
|
return { start: e6, end: t2 };
|
|
2568
2575
|
}
|
|
2569
|
-
var
|
|
2570
|
-
var
|
|
2571
|
-
var
|
|
2572
|
-
var
|
|
2576
|
+
var ia = !!Object.fromEntries;
|
|
2577
|
+
var aa = !!String.prototype.trimStart;
|
|
2578
|
+
var oa = !!String.prototype.trimEnd;
|
|
2579
|
+
var sa = ia ? Object.fromEntries : function(e6) {
|
|
2573
2580
|
let t2 = {};
|
|
2574
2581
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
2575
2582
|
return t2;
|
|
2576
2583
|
};
|
|
2577
|
-
var
|
|
2584
|
+
var ca = aa ? function(e6) {
|
|
2578
2585
|
return e6.trimStart();
|
|
2579
2586
|
} : function(e6) {
|
|
2580
|
-
return e6.replace(
|
|
2587
|
+
return e6.replace(na, ``);
|
|
2581
2588
|
};
|
|
2582
|
-
var
|
|
2589
|
+
var la = oa ? function(e6) {
|
|
2583
2590
|
return e6.trimEnd();
|
|
2584
2591
|
} : function(e6) {
|
|
2585
|
-
return e6.replace(
|
|
2592
|
+
return e6.replace(ra, ``);
|
|
2586
2593
|
};
|
|
2587
|
-
var
|
|
2588
|
-
function
|
|
2589
|
-
return
|
|
2594
|
+
var ua = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
2595
|
+
function da(e6, t2) {
|
|
2596
|
+
return ua.lastIndex = t2, ua.exec(e6)[1] ?? ``;
|
|
2590
2597
|
}
|
|
2591
|
-
function
|
|
2598
|
+
function fa(e6) {
|
|
2592
2599
|
if (e6.length === 0) return null;
|
|
2593
2600
|
let t2 = 1, n2 = 1;
|
|
2594
2601
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -2609,7 +2616,7 @@ function ua(e6) {
|
|
|
2609
2616
|
}
|
|
2610
2617
|
return { offset: e6.length, line: t2, column: n2 };
|
|
2611
2618
|
}
|
|
2612
|
-
var
|
|
2619
|
+
var pa = class {
|
|
2613
2620
|
constructor(e6, t2 = {}) {
|
|
2614
2621
|
this.message = e6, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!t2.ignoreTag, this.locale = t2.locale, this.requiresOtherClause = !!t2.requiresOtherClause, this.shouldParseSkeletons = !!t2.shouldParseSkeletons;
|
|
2615
2622
|
}
|
|
@@ -2618,10 +2625,10 @@ var da = class {
|
|
|
2618
2625
|
if (this.message.length > 0) {
|
|
2619
2626
|
let e6 = this.message.charCodeAt(0);
|
|
2620
2627
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
2621
|
-
let e7 =
|
|
2628
|
+
let e7 = fa(this.message);
|
|
2622
2629
|
if (e7) {
|
|
2623
2630
|
let t2 = this.clonePosition();
|
|
2624
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
2631
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: H(t2, this.clonePosition()) }], err: null };
|
|
2625
2632
|
}
|
|
2626
2633
|
}
|
|
2627
2634
|
}
|
|
@@ -2638,11 +2645,11 @@ var da = class {
|
|
|
2638
2645
|
} else if (i2 === 125 && e6 > 0) break;
|
|
2639
2646
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
2640
2647
|
let e7 = this.clonePosition();
|
|
2641
|
-
this.bump(), r2.push({ type: 7, location:
|
|
2648
|
+
this.bump(), r2.push({ type: 7, location: H(e7, this.clonePosition()) });
|
|
2642
2649
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2643
2650
|
if (n2) break;
|
|
2644
|
-
return this.error(26,
|
|
2645
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
2651
|
+
return this.error(26, H(this.clonePosition(), this.clonePosition()));
|
|
2652
|
+
} else if (i2 === 60 && !this.ignoreTag && ma(this.peek() || 0)) {
|
|
2646
2653
|
let n3 = this.parseTag(e6, t2);
|
|
2647
2654
|
if (n3.err) return n3;
|
|
2648
2655
|
r2.push(n3.val);
|
|
@@ -2658,23 +2665,23 @@ var da = class {
|
|
|
2658
2665
|
let n2 = this.clonePosition();
|
|
2659
2666
|
this.bump();
|
|
2660
2667
|
let r2 = this.parseTagName();
|
|
2661
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
2668
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: H(n2, this.clonePosition()) }, err: null };
|
|
2662
2669
|
if (this.bumpIf(`>`)) {
|
|
2663
2670
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
2664
2671
|
if (i2.err) return i2;
|
|
2665
2672
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2666
2673
|
if (this.bumpIf(`</`)) {
|
|
2667
|
-
if (this.isEOF() || !
|
|
2674
|
+
if (this.isEOF() || !ma(this.char())) return this.error(23, H(o2, this.clonePosition()));
|
|
2668
2675
|
let e7 = this.clonePosition();
|
|
2669
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
2676
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: H(n2, this.clonePosition()) }, err: null } : this.error(23, H(o2, this.clonePosition()))) : this.error(26, H(e7, this.clonePosition()));
|
|
2670
2677
|
}
|
|
2671
|
-
return this.error(27,
|
|
2678
|
+
return this.error(27, H(n2, this.clonePosition()));
|
|
2672
2679
|
}
|
|
2673
|
-
return this.error(23,
|
|
2680
|
+
return this.error(23, H(n2, this.clonePosition()));
|
|
2674
2681
|
}
|
|
2675
2682
|
parseTagName() {
|
|
2676
2683
|
let e6 = this.offset();
|
|
2677
|
-
for (this.bump(); !this.isEOF() &&
|
|
2684
|
+
for (this.bump(); !this.isEOF() && ga(this.char()); ) this.bump();
|
|
2678
2685
|
return this.message.slice(e6, this.offset());
|
|
2679
2686
|
}
|
|
2680
2687
|
parseLiteral(e6, t2) {
|
|
@@ -2694,11 +2701,11 @@ var da = class {
|
|
|
2694
2701
|
if (a2) r2 += a2;
|
|
2695
2702
|
else break;
|
|
2696
2703
|
}
|
|
2697
|
-
let i2 =
|
|
2704
|
+
let i2 = H(n2, this.clonePosition());
|
|
2698
2705
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2699
2706
|
}
|
|
2700
2707
|
tryParseLeftAngleBracket() {
|
|
2701
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
2708
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !ha(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
2702
2709
|
}
|
|
2703
2710
|
tryParseQuote(e6) {
|
|
2704
2711
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -2738,29 +2745,29 @@ var da = class {
|
|
|
2738
2745
|
}
|
|
2739
2746
|
parseArgument(e6, t2) {
|
|
2740
2747
|
let n2 = this.clonePosition();
|
|
2741
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2742
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
2748
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2749
|
+
if (this.char() === 125) return this.bump(), this.error(2, H(n2, this.clonePosition()));
|
|
2743
2750
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
2744
|
-
if (!r2) return this.error(3,
|
|
2745
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2751
|
+
if (!r2) return this.error(3, H(n2, this.clonePosition()));
|
|
2752
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2746
2753
|
switch (this.char()) {
|
|
2747
2754
|
case 125:
|
|
2748
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
2755
|
+
return this.bump(), { val: { type: 1, value: r2, location: H(n2, this.clonePosition()) }, err: null };
|
|
2749
2756
|
case 44:
|
|
2750
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
2757
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, H(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
2751
2758
|
default:
|
|
2752
|
-
return this.error(3,
|
|
2759
|
+
return this.error(3, H(n2, this.clonePosition()));
|
|
2753
2760
|
}
|
|
2754
2761
|
}
|
|
2755
2762
|
parseIdentifierIfPossible() {
|
|
2756
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
2757
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
2763
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = da(this.message, t2), r2 = t2 + n2.length;
|
|
2764
|
+
return this.bumpTo(r2), { value: n2, location: H(e6, this.clonePosition()) };
|
|
2758
2765
|
}
|
|
2759
2766
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
2760
2767
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
2761
2768
|
switch (a2) {
|
|
2762
2769
|
case ``:
|
|
2763
|
-
return this.error(4,
|
|
2770
|
+
return this.error(4, H(i2, o2));
|
|
2764
2771
|
case `number`:
|
|
2765
2772
|
case `date`:
|
|
2766
2773
|
case `time`: {
|
|
@@ -2770,15 +2777,15 @@ var da = class {
|
|
|
2770
2777
|
this.bumpSpace();
|
|
2771
2778
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2772
2779
|
if (n3.err) return n3;
|
|
2773
|
-
let r3 =
|
|
2774
|
-
if (r3.length === 0) return this.error(6,
|
|
2775
|
-
e7 = { style: r3, styleLocation:
|
|
2780
|
+
let r3 = la(n3.val);
|
|
2781
|
+
if (r3.length === 0) return this.error(6, H(this.clonePosition(), this.clonePosition()));
|
|
2782
|
+
e7 = { style: r3, styleLocation: H(t4, this.clonePosition()) };
|
|
2776
2783
|
}
|
|
2777
2784
|
let t3 = this.tryParseArgumentClose(r2);
|
|
2778
2785
|
if (t3.err) return t3;
|
|
2779
|
-
let i3 =
|
|
2786
|
+
let i3 = H(r2, this.clonePosition());
|
|
2780
2787
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2781
|
-
let t4 =
|
|
2788
|
+
let t4 = ca(e7.style.slice(2));
|
|
2782
2789
|
if (a2 === `number`) {
|
|
2783
2790
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
2784
2791
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -2786,8 +2793,8 @@ var da = class {
|
|
|
2786
2793
|
{
|
|
2787
2794
|
if (t4.length === 0) return this.error(10, i3);
|
|
2788
2795
|
let r3 = t4;
|
|
2789
|
-
this.locale && (r3 =
|
|
2790
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2796
|
+
this.locale && (r3 = ea(t4, this.locale));
|
|
2797
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Oi(r3) : {} };
|
|
2791
2798
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2792
2799
|
}
|
|
2793
2800
|
}
|
|
@@ -2797,11 +2804,11 @@ var da = class {
|
|
|
2797
2804
|
case `selectordinal`:
|
|
2798
2805
|
case `select`: {
|
|
2799
2806
|
let i3 = this.clonePosition();
|
|
2800
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
2807
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, H(i3, { ...i3 }));
|
|
2801
2808
|
this.bumpSpace();
|
|
2802
2809
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
2803
2810
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
2804
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
2811
|
+
if (!this.bumpIf(`:`)) return this.error(13, H(this.clonePosition(), this.clonePosition()));
|
|
2805
2812
|
this.bumpSpace();
|
|
2806
2813
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
2807
2814
|
if (e7.err) return e7;
|
|
@@ -2811,15 +2818,15 @@ var da = class {
|
|
|
2811
2818
|
if (c2.err) return c2;
|
|
2812
2819
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2813
2820
|
if (l2.err) return l2;
|
|
2814
|
-
let u2 =
|
|
2815
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
2821
|
+
let u2 = H(r2, this.clonePosition());
|
|
2822
|
+
return a2 === `select` ? { val: { type: 5, value: n2, options: sa(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: sa(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
2816
2823
|
}
|
|
2817
2824
|
default:
|
|
2818
|
-
return this.error(5,
|
|
2825
|
+
return this.error(5, H(i2, o2));
|
|
2819
2826
|
}
|
|
2820
2827
|
}
|
|
2821
2828
|
tryParseArgumentClose(e6) {
|
|
2822
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
2829
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, H(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
2823
2830
|
}
|
|
2824
2831
|
parseSimpleArgStyleIfPossible() {
|
|
2825
2832
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -2827,7 +2834,7 @@ var da = class {
|
|
|
2827
2834
|
case 39: {
|
|
2828
2835
|
this.bump();
|
|
2829
2836
|
let e7 = this.clonePosition();
|
|
2830
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
2837
|
+
if (!this.bumpUntil(`'`)) return this.error(11, H(e7, this.clonePosition()));
|
|
2831
2838
|
this.bump();
|
|
2832
2839
|
break;
|
|
2833
2840
|
}
|
|
@@ -2846,11 +2853,11 @@ var da = class {
|
|
|
2846
2853
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2847
2854
|
let n2 = [];
|
|
2848
2855
|
try {
|
|
2849
|
-
n2 =
|
|
2856
|
+
n2 = Ai(e6);
|
|
2850
2857
|
} catch {
|
|
2851
2858
|
return this.error(7, t2);
|
|
2852
2859
|
}
|
|
2853
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2860
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Bi(n2) : {} }, err: null };
|
|
2854
2861
|
}
|
|
2855
2862
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2856
2863
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2860,20 +2867,20 @@ var da = class {
|
|
|
2860
2867
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
2861
2868
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
2862
2869
|
if (t3.err) return t3;
|
|
2863
|
-
c2 =
|
|
2870
|
+
c2 = H(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
2864
2871
|
} else break;
|
|
2865
2872
|
}
|
|
2866
2873
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
2867
2874
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
2868
2875
|
let r3 = this.clonePosition();
|
|
2869
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
2876
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, H(this.clonePosition(), this.clonePosition()));
|
|
2870
2877
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
2871
2878
|
if (l2.err) return l2;
|
|
2872
2879
|
let u2 = this.tryParseArgumentClose(r3);
|
|
2873
2880
|
if (u2.err) return u2;
|
|
2874
|
-
a2.push([s2, { value: l2.val, location:
|
|
2881
|
+
a2.push([s2, { value: l2.val, location: H(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
2875
2882
|
}
|
|
2876
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
2883
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, H(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, H(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
2877
2884
|
}
|
|
2878
2885
|
tryParseDecimalInteger(e6, t2) {
|
|
2879
2886
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -2884,7 +2891,7 @@ var da = class {
|
|
|
2884
2891
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
2885
2892
|
else break;
|
|
2886
2893
|
}
|
|
2887
|
-
let o2 =
|
|
2894
|
+
let o2 = H(r2, this.clonePosition());
|
|
2888
2895
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
2889
2896
|
}
|
|
2890
2897
|
offset() {
|
|
@@ -2932,7 +2939,7 @@ var da = class {
|
|
|
2932
2939
|
}
|
|
2933
2940
|
}
|
|
2934
2941
|
bumpSpace() {
|
|
2935
|
-
for (; !this.isEOF() &&
|
|
2942
|
+
for (; !this.isEOF() && _a(this.char()); ) this.bump();
|
|
2936
2943
|
}
|
|
2937
2944
|
peek() {
|
|
2938
2945
|
if (this.isEOF()) return null;
|
|
@@ -2940,34 +2947,34 @@ var da = class {
|
|
|
2940
2947
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
2941
2948
|
}
|
|
2942
2949
|
};
|
|
2943
|
-
function
|
|
2950
|
+
function ma(e6) {
|
|
2944
2951
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
2945
2952
|
}
|
|
2946
|
-
function
|
|
2947
|
-
return
|
|
2953
|
+
function ha(e6) {
|
|
2954
|
+
return ma(e6) || e6 === 47;
|
|
2948
2955
|
}
|
|
2949
|
-
function
|
|
2956
|
+
function ga(e6) {
|
|
2950
2957
|
return e6 === 45 || e6 === 46 || e6 >= 48 && e6 <= 57 || e6 === 95 || e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90 || e6 == 183 || e6 >= 192 && e6 <= 214 || e6 >= 216 && e6 <= 246 || e6 >= 248 && e6 <= 893 || e6 >= 895 && e6 <= 8191 || e6 >= 8204 && e6 <= 8205 || e6 >= 8255 && e6 <= 8256 || e6 >= 8304 && e6 <= 8591 || e6 >= 11264 && e6 <= 12271 || e6 >= 12289 && e6 <= 55295 || e6 >= 63744 && e6 <= 64975 || e6 >= 65008 && e6 <= 65533 || e6 >= 65536 && e6 <= 983039;
|
|
2951
2958
|
}
|
|
2952
|
-
function
|
|
2959
|
+
function _a(e6) {
|
|
2953
2960
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
2954
2961
|
}
|
|
2955
|
-
function
|
|
2962
|
+
function va(e6) {
|
|
2956
2963
|
e6.forEach((e7) => {
|
|
2957
|
-
if (delete e7.location,
|
|
2958
|
-
else
|
|
2964
|
+
if (delete e7.location, qi(e7) || Ji(e7)) for (let t2 in e7.options) delete e7.options[t2].location, va(e7.options[t2].value);
|
|
2965
|
+
else Wi(e7) && Zi(e7.style) || (Gi(e7) || Ki(e7)) && Qi(e7.style) ? delete e7.style.location : Xi(e7) && va(e7.children);
|
|
2959
2966
|
});
|
|
2960
2967
|
}
|
|
2961
|
-
function
|
|
2968
|
+
function ya(e6, t2 = {}) {
|
|
2962
2969
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
2963
|
-
let n2 = new
|
|
2970
|
+
let n2 = new pa(e6, t2).parse();
|
|
2964
2971
|
if (n2.err) {
|
|
2965
|
-
let e7 = SyntaxError(
|
|
2972
|
+
let e7 = SyntaxError(Vi[n2.err.kind]);
|
|
2966
2973
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
2967
2974
|
}
|
|
2968
|
-
return t2?.captureLocation ||
|
|
2975
|
+
return t2?.captureLocation || va(n2.val), n2.val;
|
|
2969
2976
|
}
|
|
2970
|
-
var
|
|
2977
|
+
var ba = class extends Error {
|
|
2971
2978
|
constructor(e6, t2, n2) {
|
|
2972
2979
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
2973
2980
|
}
|
|
@@ -2975,54 +2982,54 @@ var va = class extends Error {
|
|
|
2975
2982
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
2976
2983
|
}
|
|
2977
2984
|
};
|
|
2978
|
-
var
|
|
2985
|
+
var xa = class extends ba {
|
|
2979
2986
|
constructor(e6, t2, n2, r2) {
|
|
2980
2987
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
2981
2988
|
}
|
|
2982
2989
|
};
|
|
2983
|
-
var
|
|
2990
|
+
var Sa = class extends ba {
|
|
2984
2991
|
constructor(e6, t2, n2) {
|
|
2985
2992
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
2986
2993
|
}
|
|
2987
2994
|
};
|
|
2988
|
-
var
|
|
2995
|
+
var Ca = class extends ba {
|
|
2989
2996
|
constructor(e6, t2) {
|
|
2990
2997
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
2991
2998
|
}
|
|
2992
2999
|
};
|
|
2993
|
-
function
|
|
3000
|
+
function wa(e6) {
|
|
2994
3001
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
2995
3002
|
let n2 = e7[e7.length - 1];
|
|
2996
3003
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
2997
3004
|
}, []);
|
|
2998
3005
|
}
|
|
2999
|
-
function
|
|
3006
|
+
function Ta(e6) {
|
|
3000
3007
|
return typeof e6 == `function`;
|
|
3001
3008
|
}
|
|
3002
|
-
function
|
|
3003
|
-
if (e6.length === 1 &&
|
|
3009
|
+
function Ea(e6, t2, n2, r2, i2, a2, o2) {
|
|
3010
|
+
if (e6.length === 1 && Hi(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3004
3011
|
let s2 = [];
|
|
3005
3012
|
for (let c2 of e6) {
|
|
3006
|
-
if (
|
|
3013
|
+
if (Hi(c2)) {
|
|
3007
3014
|
s2.push({ type: 0, value: c2.value });
|
|
3008
3015
|
continue;
|
|
3009
3016
|
}
|
|
3010
|
-
if (
|
|
3017
|
+
if (Yi(c2)) {
|
|
3011
3018
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3012
3019
|
continue;
|
|
3013
3020
|
}
|
|
3014
3021
|
let { value: e7 } = c2;
|
|
3015
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3022
|
+
if (!(i2 && e7 in i2)) throw new Ca(e7, o2);
|
|
3016
3023
|
let l2 = i2[e7];
|
|
3017
|
-
if (
|
|
3018
|
-
else if (
|
|
3019
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3024
|
+
if (Ui(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 });
|
|
3025
|
+
else if (Gi(c2)) {
|
|
3026
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3020
3027
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3021
|
-
} else if (
|
|
3022
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3028
|
+
} else if (Ki(c2)) {
|
|
3029
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3023
3030
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3024
|
-
} else if (
|
|
3025
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3031
|
+
} else if (Wi(c2)) {
|
|
3032
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : Zi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3026
3033
|
if (e8 && e8.scale) {
|
|
3027
3034
|
let t3 = e8.scale || 1;
|
|
3028
3035
|
if (typeof l2 == `bigint`) {
|
|
@@ -3032,40 +3039,40 @@ function wa(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3032
3039
|
}
|
|
3033
3040
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3034
3041
|
} else {
|
|
3035
|
-
if (
|
|
3042
|
+
if (Xi(c2)) {
|
|
3036
3043
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3037
|
-
if (!
|
|
3038
|
-
let d2 = u2(
|
|
3044
|
+
if (!Ta(u2)) throw new Sa(l3, `function`, o2);
|
|
3045
|
+
let d2 = u2(Ea(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3039
3046
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3040
3047
|
}
|
|
3041
|
-
if (
|
|
3048
|
+
if (qi(c2)) {
|
|
3042
3049
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3043
|
-
if (!a3) throw new
|
|
3044
|
-
s2.push(...
|
|
3045
|
-
} else if (
|
|
3050
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3051
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2));
|
|
3052
|
+
} else if (Ji(c2)) {
|
|
3046
3053
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3047
3054
|
if (!a3) {
|
|
3048
|
-
if (!Intl.PluralRules) throw new
|
|
3055
|
+
if (!Intl.PluralRules) throw new ba(`Intl.PluralRules is not available in this environment.
|
|
3049
3056
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3050
3057
|
`, `MISSING_INTL_API`, o2);
|
|
3051
3058
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3052
3059
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3053
3060
|
}
|
|
3054
|
-
if (!a3) throw new
|
|
3061
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3055
3062
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3056
|
-
s2.push(...
|
|
3063
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3057
3064
|
}
|
|
3058
3065
|
}
|
|
3059
3066
|
}
|
|
3060
|
-
return
|
|
3067
|
+
return wa(s2);
|
|
3061
3068
|
}
|
|
3062
|
-
function
|
|
3069
|
+
function Da(e6, t2) {
|
|
3063
3070
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3064
3071
|
}
|
|
3065
|
-
function
|
|
3066
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3072
|
+
function Oa(e6, t2) {
|
|
3073
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Da(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3067
3074
|
}
|
|
3068
|
-
function
|
|
3075
|
+
function ka(e6) {
|
|
3069
3076
|
return { create() {
|
|
3070
3077
|
return { get(t2) {
|
|
3071
3078
|
return e6[t2];
|
|
@@ -3074,23 +3081,23 @@ function Da(e6) {
|
|
|
3074
3081
|
} };
|
|
3075
3082
|
} };
|
|
3076
3083
|
}
|
|
3077
|
-
function
|
|
3078
|
-
return { getNumberFormat:
|
|
3084
|
+
function Aa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3085
|
+
return { getNumberFormat: hi((...e7) => new Intl.NumberFormat(...e7), { cache: ka(e6.number), strategy: Ei.variadic }), getDateTimeFormat: hi((...e7) => new Intl.DateTimeFormat(...e7), { cache: ka(e6.dateTime), strategy: Ei.variadic }), getPluralRules: hi((...e7) => new Intl.PluralRules(...e7), { cache: ka(e6.pluralRules), strategy: Ei.variadic }) };
|
|
3079
3086
|
}
|
|
3080
|
-
var
|
|
3087
|
+
var ja = class e5 {
|
|
3081
3088
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3082
3089
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3083
3090
|
let t3 = this.formatToParts(e6);
|
|
3084
3091
|
if (t3.length === 1) return t3[0].value;
|
|
3085
3092
|
let n3 = t3.reduce((e7, t4) => (!e7.length || t4.type !== 0 || typeof e7[e7.length - 1] != `string` ? e7.push(t4.value) : e7[e7.length - 1] += t4.value, e7), []);
|
|
3086
3093
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3087
|
-
}, this.formatToParts = (e6) =>
|
|
3094
|
+
}, this.formatToParts = (e6) => Ea(this.ast, this.locales, this.formatters, this.formats, e6, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n2, this.resolvedLocale = e5.resolveLocale(n2), typeof t2 == `string`) {
|
|
3088
3095
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3089
3096
|
let { ...n3 } = i2 || {};
|
|
3090
3097
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3091
3098
|
} else this.ast = t2;
|
|
3092
3099
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3093
|
-
this.formats =
|
|
3100
|
+
this.formats = Oa(e5.formats, r2), this.formatters = i2 && i2.formatters || Aa(this.formatterCache);
|
|
3094
3101
|
}
|
|
3095
3102
|
static {
|
|
3096
3103
|
this.memoizedDefaultLocale = null;
|
|
@@ -3106,14 +3113,14 @@ var ka = class e5 {
|
|
|
3106
3113
|
};
|
|
3107
3114
|
}
|
|
3108
3115
|
static {
|
|
3109
|
-
this.__parse =
|
|
3116
|
+
this.__parse = ya;
|
|
3110
3117
|
}
|
|
3111
3118
|
static {
|
|
3112
3119
|
this.formats = { number: { integer: { maximumFractionDigits: 0 }, currency: { style: `currency` }, percent: { style: `percent` } }, date: { short: { month: `numeric`, day: `numeric`, year: `2-digit` }, medium: { month: `short`, day: `numeric`, year: `numeric` }, long: { month: `long`, day: `numeric`, year: `numeric` }, full: { weekday: `long`, month: `long`, day: `numeric`, year: `numeric` } }, time: { short: { hour: `numeric`, minute: `numeric` }, medium: { hour: `numeric`, minute: `numeric`, second: `numeric` }, long: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` }, full: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` } } };
|
|
3113
3120
|
}
|
|
3114
3121
|
};
|
|
3115
|
-
var
|
|
3116
|
-
function
|
|
3122
|
+
var Ma = [`__proto__`, `constructor`, `prototype`];
|
|
3123
|
+
function Na(e6, t2, n2) {
|
|
3117
3124
|
function r2(e7) {
|
|
3118
3125
|
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3119
3126
|
}
|
|
@@ -3123,49 +3130,49 @@ function ja(e6, t2, n2) {
|
|
|
3123
3130
|
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3124
3131
|
if (i2()) return {};
|
|
3125
3132
|
var o2 = r2(a2.shift());
|
|
3126
|
-
if (
|
|
3133
|
+
if (Ma.indexOf(o2) > -1) return {};
|
|
3127
3134
|
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3128
3135
|
}
|
|
3129
3136
|
if (i2()) return {};
|
|
3130
3137
|
var s2 = r2(a2.shift());
|
|
3131
|
-
return
|
|
3138
|
+
return Ma.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3132
3139
|
}
|
|
3133
|
-
function
|
|
3134
|
-
var r2 =
|
|
3140
|
+
function Pa(e6, t2, n2) {
|
|
3141
|
+
var r2 = Na(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3135
3142
|
i2 !== void 0 && (i2[a2] = n2);
|
|
3136
3143
|
}
|
|
3137
|
-
function
|
|
3138
|
-
var n2 =
|
|
3144
|
+
function Fa(e6, t2) {
|
|
3145
|
+
var n2 = Na(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3139
3146
|
if (r2) return r2[i2];
|
|
3140
3147
|
}
|
|
3141
|
-
function
|
|
3148
|
+
function Ia(e6) {
|
|
3142
3149
|
return [...arguments].slice(1).forEach(function(t2) {
|
|
3143
3150
|
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3144
3151
|
var i2 = r2[n2];
|
|
3145
|
-
|
|
3152
|
+
Ma.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3146
3153
|
}
|
|
3147
3154
|
}), e6;
|
|
3148
3155
|
}
|
|
3149
|
-
function
|
|
3150
|
-
return
|
|
3156
|
+
function La(e6, t2) {
|
|
3157
|
+
return Ha(e6) || Va(e6, t2) || za(e6, t2) || Ra();
|
|
3151
3158
|
}
|
|
3152
|
-
function
|
|
3159
|
+
function Ra() {
|
|
3153
3160
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3154
3161
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3155
3162
|
}
|
|
3156
|
-
function
|
|
3163
|
+
function za(e6, t2) {
|
|
3157
3164
|
if (e6) {
|
|
3158
|
-
if (typeof e6 == `string`) return
|
|
3165
|
+
if (typeof e6 == `string`) return Ba(e6, t2);
|
|
3159
3166
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3160
|
-
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ?
|
|
3167
|
+
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? Ba(e6, t2) : void 0;
|
|
3161
3168
|
}
|
|
3162
3169
|
}
|
|
3163
|
-
function
|
|
3170
|
+
function Ba(e6, t2) {
|
|
3164
3171
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3165
3172
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3166
3173
|
return r2;
|
|
3167
3174
|
}
|
|
3168
|
-
function
|
|
3175
|
+
function Va(e6, t2) {
|
|
3169
3176
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3170
3177
|
if (n2 != null) {
|
|
3171
3178
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3186,10 +3193,10 @@ function za(e6, t2) {
|
|
|
3186
3193
|
return s2;
|
|
3187
3194
|
}
|
|
3188
3195
|
}
|
|
3189
|
-
function
|
|
3196
|
+
function Ha(e6) {
|
|
3190
3197
|
if (Array.isArray(e6)) return e6;
|
|
3191
3198
|
}
|
|
3192
|
-
function
|
|
3199
|
+
function Ua(e6, t2) {
|
|
3193
3200
|
var n2 = Object.keys(e6);
|
|
3194
3201
|
if (Object.getOwnPropertySymbols) {
|
|
3195
3202
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3199,101 +3206,101 @@ function Va(e6, t2) {
|
|
|
3199
3206
|
}
|
|
3200
3207
|
return n2;
|
|
3201
3208
|
}
|
|
3202
|
-
function
|
|
3209
|
+
function Wa(e6) {
|
|
3203
3210
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3204
3211
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3205
|
-
t2 % 2 ?
|
|
3206
|
-
|
|
3207
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3212
|
+
t2 % 2 ? Ua(Object(n2), true).forEach(function(t3) {
|
|
3213
|
+
Ga(e6, t3, n2[t3]);
|
|
3214
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : Ua(Object(n2)).forEach(function(t3) {
|
|
3208
3215
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3209
3216
|
});
|
|
3210
3217
|
}
|
|
3211
3218
|
return e6;
|
|
3212
3219
|
}
|
|
3213
|
-
function
|
|
3214
|
-
return (t2 =
|
|
3220
|
+
function Ga(e6, t2, n2) {
|
|
3221
|
+
return (t2 = Ya(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3215
3222
|
}
|
|
3216
|
-
function
|
|
3223
|
+
function Ka(e6, t2) {
|
|
3217
3224
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3218
3225
|
}
|
|
3219
|
-
function
|
|
3226
|
+
function qa(e6, t2) {
|
|
3220
3227
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3221
3228
|
var r2 = t2[n2];
|
|
3222
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3229
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, Ya(r2.key), r2);
|
|
3223
3230
|
}
|
|
3224
3231
|
}
|
|
3225
|
-
function
|
|
3226
|
-
return t2 &&
|
|
3232
|
+
function Ja(e6, t2, n2) {
|
|
3233
|
+
return t2 && qa(e6.prototype, t2), n2 && qa(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3227
3234
|
}
|
|
3228
|
-
function
|
|
3229
|
-
var t2 =
|
|
3230
|
-
return
|
|
3235
|
+
function Ya(e6) {
|
|
3236
|
+
var t2 = Xa(e6, `string`);
|
|
3237
|
+
return U(t2) == `symbol` ? t2 : t2 + ``;
|
|
3231
3238
|
}
|
|
3232
|
-
function
|
|
3233
|
-
if (
|
|
3239
|
+
function Xa(e6, t2) {
|
|
3240
|
+
if (U(e6) != `object` || !e6) return e6;
|
|
3234
3241
|
var n2 = e6[Symbol.toPrimitive];
|
|
3235
3242
|
if (n2 !== void 0) {
|
|
3236
3243
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3237
|
-
if (
|
|
3244
|
+
if (U(r2) != `object`) return r2;
|
|
3238
3245
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3239
3246
|
}
|
|
3240
3247
|
return (t2 === `string` ? String : Number)(e6);
|
|
3241
3248
|
}
|
|
3242
|
-
function
|
|
3249
|
+
function U(e6) {
|
|
3243
3250
|
"@babel/helpers - typeof";
|
|
3244
|
-
return
|
|
3251
|
+
return U = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3245
3252
|
return typeof e7;
|
|
3246
3253
|
} : function(e7) {
|
|
3247
3254
|
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3248
|
-
},
|
|
3255
|
+
}, U(e6);
|
|
3249
3256
|
}
|
|
3250
|
-
var
|
|
3251
|
-
var
|
|
3252
|
-
function
|
|
3257
|
+
var Za = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3258
|
+
var Qa = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3259
|
+
function $a() {
|
|
3253
3260
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3254
3261
|
return n2;
|
|
3255
3262
|
}, parseLngForICU: function(e6) {
|
|
3256
3263
|
return e6;
|
|
3257
3264
|
}, escapeVariables: false };
|
|
3258
3265
|
}
|
|
3259
|
-
function
|
|
3260
|
-
return n2 && t2 &&
|
|
3266
|
+
function eo(e6, t2, n2, r2) {
|
|
3267
|
+
return n2 && t2 && U(t2) === `object` ? `${r2} resolved to an object or array, but i18next-icu does not support returnObjects or joinArrays and returns the raw value unformatted.` : n2 && typeof t2 == `string` && t2.indexOf(`{{`) > -1 ? `${r2} could not be parsed (${e6.message}). It contains "{{": i18next interpolation like {{name}} does not work with ICU, use {name}.` : `${r2} could not be ${n2 ? `parsed` : `formatted`}: ${e6.message}`;
|
|
3261
3268
|
}
|
|
3262
|
-
var
|
|
3269
|
+
var to = function() {
|
|
3263
3270
|
function e6(t2) {
|
|
3264
|
-
|
|
3271
|
+
Ka(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3265
3272
|
}
|
|
3266
|
-
return
|
|
3273
|
+
return Ja(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3267
3274
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3268
|
-
if (this.options =
|
|
3275
|
+
if (this.options = Ia(r2, t2, this.options || {}, $a()), this.formats = this.options.formats, e7) {
|
|
3269
3276
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3270
|
-
e7.IntlMessageFormat =
|
|
3277
|
+
e7.IntlMessageFormat = ja, e7.ICU = this, this.i18next = e7, this.debug = !!(e7.options && e7.options.debug), this.debug && e7.options.interpolation && e7.options.interpolation.escapeValue !== false && !this.options.escapeVariables && this.warn(`interpolation.escapeValue is not applied, values are inserted without HTML escaping. Set the i18next-icu option escapeVariables: true to escape them, or interpolation.escapeValue: false if your output is escaped elsewhere (e.g. by React).`), s2 && (a2 && e7.on(a2, function() {
|
|
3271
3278
|
return n2.clearCache();
|
|
3272
3279
|
}), o2 && e7.store.on(o2, function() {
|
|
3273
3280
|
return n2.clearCache();
|
|
3274
3281
|
}));
|
|
3275
3282
|
}
|
|
3276
3283
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3277
|
-
this.formats = this.formats ?
|
|
3284
|
+
this.formats = this.formats ? Wa(Wa({}, this.formats), e7) : e7, this.clearCache();
|
|
3278
3285
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3279
3286
|
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3280
3287
|
if (this.options.memoize) {
|
|
3281
|
-
var l2 =
|
|
3288
|
+
var l2 = Fa(this.mem, s2);
|
|
3282
3289
|
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3283
3290
|
}
|
|
3284
3291
|
try {
|
|
3285
|
-
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new
|
|
3286
|
-
var u2 = t2 && t2.replace &&
|
|
3292
|
+
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new ja(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Pa(this.mem, s2, { res: e7, fc: c2 }));
|
|
3293
|
+
var u2 = t2 && t2.replace && U(t2.replace) === `object` ? Wa(Wa({}, t2), t2.replace) : t2;
|
|
3287
3294
|
return c2.format(this.escapeVariableValues(u2));
|
|
3288
3295
|
} catch (a3) {
|
|
3289
|
-
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(
|
|
3296
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(eo(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3290
3297
|
}
|
|
3291
3298
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3292
3299
|
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3293
3300
|
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3294
3301
|
var i2 = r2.count, a2 = r2.context, o2 = this.i18next.options, s2 = o2.pluralSeparator, c2 = s2 === void 0 ? `_` : s2, l2 = o2.contextSeparator, u2 = l2 === void 0 ? `_` : l2, d2 = this.i18next.services.resourceStore, f2 = `key "${e7}" (${t2}/${n2})`;
|
|
3295
3302
|
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3296
|
-
var p2 =
|
|
3303
|
+
var p2 = Qa.concat(Qa.map(function(e8) {
|
|
3297
3304
|
return `ordinal${c2}${e8}`;
|
|
3298
3305
|
})).map(function(t3) {
|
|
3299
3306
|
return `${e7}${c2}${t3}`;
|
|
@@ -3307,33 +3314,33 @@ var $a = function() {
|
|
|
3307
3314
|
} }, { key: `firstTime`, value: function(e7) {
|
|
3308
3315
|
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3309
3316
|
} }, { key: `warn`, value: function(e7) {
|
|
3310
|
-
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${
|
|
3317
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${Za}`);
|
|
3311
3318
|
} }, { key: `clearCache`, value: function() {
|
|
3312
3319
|
this.mem = {};
|
|
3313
3320
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3314
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3321
|
+
if (!this.options.escapeVariables || !e7 || U(e7) !== `object`) return e7;
|
|
3315
3322
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3316
|
-
var i2 =
|
|
3323
|
+
var i2 = La(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3317
3324
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3318
3325
|
}
|
|
3319
3326
|
return t2;
|
|
3320
3327
|
} }]), e6;
|
|
3321
3328
|
}();
|
|
3322
|
-
|
|
3323
|
-
function
|
|
3329
|
+
to.type = `i18nFormat`;
|
|
3330
|
+
function no({ icuOptions: e6 = {}, ...t2 }) {
|
|
3324
3331
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3325
|
-
return
|
|
3332
|
+
return mi(t2, { icu: new to({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3326
3333
|
}
|
|
3327
|
-
var
|
|
3334
|
+
var ro = (e6, t2, n2, r2) => {
|
|
3328
3335
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3329
3336
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3330
|
-
|
|
3337
|
+
W(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3331
3338
|
};
|
|
3332
|
-
var
|
|
3333
|
-
var
|
|
3334
|
-
|
|
3339
|
+
var io = {};
|
|
3340
|
+
var ao = (e6, t2, n2, r2) => {
|
|
3341
|
+
W(n2) && io[n2] || (W(n2) && (io[n2] = /* @__PURE__ */ new Date()), ro(e6, t2, n2, r2));
|
|
3335
3342
|
};
|
|
3336
|
-
var
|
|
3343
|
+
var oo = (e6, t2) => () => {
|
|
3337
3344
|
if (e6.isInitialized) t2();
|
|
3338
3345
|
else {
|
|
3339
3346
|
let n2 = () => {
|
|
@@ -3344,29 +3351,29 @@ var io = (e6, t2) => () => {
|
|
|
3344
3351
|
e6.on(`initialized`, n2);
|
|
3345
3352
|
}
|
|
3346
3353
|
};
|
|
3347
|
-
var
|
|
3348
|
-
e6.loadNamespaces(t2,
|
|
3354
|
+
var so = (e6, t2, n2) => {
|
|
3355
|
+
e6.loadNamespaces(t2, oo(e6, n2));
|
|
3349
3356
|
};
|
|
3350
|
-
var
|
|
3351
|
-
if (
|
|
3357
|
+
var co = (e6, t2, n2, r2) => {
|
|
3358
|
+
if (W(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return so(e6, n2, r2);
|
|
3352
3359
|
n2.forEach((t3) => {
|
|
3353
3360
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3354
|
-
}), e6.loadLanguages(t2,
|
|
3361
|
+
}), e6.loadLanguages(t2, oo(e6, r2));
|
|
3355
3362
|
};
|
|
3356
|
-
var
|
|
3363
|
+
var lo = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (ao(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3357
3364
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3358
3365
|
} });
|
|
3359
|
-
var
|
|
3360
|
-
var
|
|
3361
|
-
var
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
var
|
|
3365
|
-
var mo = () => po;
|
|
3366
|
-
var ho;
|
|
3366
|
+
var W = (e6) => typeof e6 == `string`;
|
|
3367
|
+
var uo = (e6) => typeof e6 == `object` && !!e6;
|
|
3368
|
+
var fo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3369
|
+
var po = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
3370
|
+
var mo = (e6) => po[e6];
|
|
3371
|
+
var ho = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(fo, mo) };
|
|
3367
3372
|
var go = () => ho;
|
|
3368
|
-
var _o
|
|
3369
|
-
var vo =
|
|
3373
|
+
var _o;
|
|
3374
|
+
var vo = () => _o;
|
|
3375
|
+
var yo = n();
|
|
3376
|
+
var bo = class {
|
|
3370
3377
|
constructor() {
|
|
3371
3378
|
this.usedNamespaces = {};
|
|
3372
3379
|
}
|
|
@@ -3379,32 +3386,32 @@ var vo = class {
|
|
|
3379
3386
|
return Object.keys(this.usedNamespaces);
|
|
3380
3387
|
}
|
|
3381
3388
|
};
|
|
3382
|
-
var
|
|
3389
|
+
var xo = (e6, t2) => {
|
|
3383
3390
|
let n2 = l();
|
|
3384
3391
|
return s(() => {
|
|
3385
3392
|
n2.current = t2 ? n2.current : e6;
|
|
3386
3393
|
}, [e6, t2]), n2.current;
|
|
3387
3394
|
};
|
|
3388
|
-
var
|
|
3389
|
-
var
|
|
3390
|
-
var
|
|
3391
|
-
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = o(
|
|
3392
|
-
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new
|
|
3393
|
-
|
|
3394
|
-
let e7 = (e8, t4) =>
|
|
3395
|
+
var So = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
|
|
3396
|
+
var Co = (e6, t2, n2, r2) => a(So(e6, t2, n2, r2), [e6, t2, n2, r2]);
|
|
3397
|
+
var wo = (e6, t2 = {}) => {
|
|
3398
|
+
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = o(yo) || {}, a2 = n2 || r2 || vo();
|
|
3399
|
+
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new bo()), !a2) {
|
|
3400
|
+
ao(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3401
|
+
let e7 = (e8, t4) => W(t4) ? t4 : uo(t4) && W(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3395
3402
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3396
3403
|
}
|
|
3397
|
-
a2.options.react?.wait &&
|
|
3398
|
-
let c2 = { ...
|
|
3399
|
-
p2 =
|
|
3400
|
-
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) =>
|
|
3404
|
+
a2.options.react?.wait && ao(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3405
|
+
let c2 = { ...go(), ...a2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = c2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3406
|
+
p2 = W(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3407
|
+
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => lo(e7, a2, c2)), h2 = Co(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => So(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = u(g2), b2 = p2.join();
|
|
3401
3408
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3402
|
-
let x2 =
|
|
3409
|
+
let x2 = xo(b2), S2 = l(true);
|
|
3403
3410
|
s(() => {
|
|
3404
3411
|
let { bindI18n: e7, bindI18nStore: n3 } = c2;
|
|
3405
|
-
S2.current = true, !m2 && !d2 && (t2.lng ?
|
|
3412
|
+
S2.current = true, !m2 && !d2 && (t2.lng ? co(a2, t2.lng, p2, () => {
|
|
3406
3413
|
S2.current && y2(_2);
|
|
3407
|
-
}) :
|
|
3414
|
+
}) : so(a2, p2, () => {
|
|
3408
3415
|
S2.current && y2(_2);
|
|
3409
3416
|
})), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
|
|
3410
3417
|
let r3 = () => {
|
|
@@ -3419,131 +3426,131 @@ var So = (e6, t2 = {}) => {
|
|
|
3419
3426
|
let C2 = [v2, a2, m2];
|
|
3420
3427
|
if (C2.t = v2, C2.i18n = a2, C2.ready = m2, m2 || !m2 && !d2) return C2;
|
|
3421
3428
|
throw new Promise((e7) => {
|
|
3422
|
-
t2.lng ?
|
|
3429
|
+
t2.lng ? co(a2, t2.lng, p2, () => e7()) : so(a2, p2, () => e7());
|
|
3423
3430
|
});
|
|
3424
3431
|
};
|
|
3425
|
-
function
|
|
3432
|
+
function To({ i18n: e6, defaultNS: t2, children: n2 }) {
|
|
3426
3433
|
let i2 = c(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
|
|
3427
|
-
return r(
|
|
3434
|
+
return r(yo.Provider, { value: i2 }, n2);
|
|
3428
3435
|
}
|
|
3429
|
-
var
|
|
3430
|
-
var
|
|
3431
|
-
function
|
|
3436
|
+
var Eo = `wix-warmup-data`;
|
|
3437
|
+
var Do = null;
|
|
3438
|
+
function Oo(e6) {
|
|
3432
3439
|
if (typeof document < `u`) try {
|
|
3433
|
-
let t2 = document.getElementById(
|
|
3434
|
-
return t2 ? (
|
|
3440
|
+
let t2 = document.getElementById(Eo)?.textContent;
|
|
3441
|
+
return t2 ? (Do?.text !== t2 && (Do = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Do.data[e6] ?? void 0) : void 0;
|
|
3435
3442
|
} catch {
|
|
3436
3443
|
return;
|
|
3437
3444
|
}
|
|
3438
3445
|
}
|
|
3439
|
-
var
|
|
3440
|
-
var
|
|
3441
|
-
var
|
|
3442
|
-
var
|
|
3443
|
-
var
|
|
3444
|
-
let t2 = e6.scope ??
|
|
3445
|
-
return n2 || (n2 = /* @__PURE__ */ new Map(),
|
|
3446
|
+
var ko = 5e3;
|
|
3447
|
+
var Ao = 100;
|
|
3448
|
+
var jo = {};
|
|
3449
|
+
var Mo = /* @__PURE__ */ new WeakMap();
|
|
3450
|
+
var No = (e6) => {
|
|
3451
|
+
let t2 = e6.scope ?? jo, n2 = Mo.get(t2);
|
|
3452
|
+
return n2 || (n2 = /* @__PURE__ */ new Map(), Mo.set(t2, n2)), n2;
|
|
3446
3453
|
};
|
|
3447
|
-
function
|
|
3454
|
+
function Po({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
3448
3455
|
if (e6 === null) return n2();
|
|
3449
3456
|
if (t2.isServer) return n2().then((n3) => (t2.set(e6, n3), n3));
|
|
3450
|
-
let r2 =
|
|
3457
|
+
let r2 = No(t2), i2 = Date.now();
|
|
3451
3458
|
for (let [e7, t3] of r2) t3.expiresAt <= i2 && r2.delete(e7);
|
|
3452
3459
|
let a2 = r2.get(e6);
|
|
3453
3460
|
if (a2) return a2.promise;
|
|
3454
|
-
let o2 =
|
|
3461
|
+
let o2 = Oo(e6);
|
|
3455
3462
|
if (o2 !== void 0) {
|
|
3456
|
-
let t3 =
|
|
3457
|
-
return r2.set(e6, { promise: t3, expiresAt: i2 +
|
|
3463
|
+
let t3 = zn(o2);
|
|
3464
|
+
return r2.set(e6, { promise: t3, expiresAt: i2 + ko }), t3;
|
|
3458
3465
|
}
|
|
3459
3466
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
3460
|
-
r2.size >=
|
|
3467
|
+
r2.size >= Ao && r2.delete(r2.keys().next().value);
|
|
3461
3468
|
let c2 = { promise: s2, expiresAt: 1 / 0 };
|
|
3462
3469
|
return r2.set(e6, c2), s2.then(() => {
|
|
3463
|
-
c2.expiresAt = Date.now() +
|
|
3470
|
+
c2.expiresAt = Date.now() + ko;
|
|
3464
3471
|
}, () => {
|
|
3465
3472
|
r2.get(e6) === c2 && r2.delete(e6);
|
|
3466
3473
|
}), s2;
|
|
3467
3474
|
}
|
|
3468
|
-
var
|
|
3469
|
-
var
|
|
3470
|
-
var
|
|
3471
|
-
var
|
|
3472
|
-
function
|
|
3473
|
-
let n2 =
|
|
3475
|
+
var Fo = `blog-builder:i18n`;
|
|
3476
|
+
var Io = `translation`;
|
|
3477
|
+
var Lo = () => Oo(Fo);
|
|
3478
|
+
var Ro = /* @__PURE__ */ new Map();
|
|
3479
|
+
function zo(e6, t2) {
|
|
3480
|
+
let n2 = Ro.get(e6);
|
|
3474
3481
|
if (n2) return n2;
|
|
3475
|
-
let r2 =
|
|
3476
|
-
return
|
|
3482
|
+
let r2 = Lo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = no({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
|
|
3483
|
+
return Ro.set(e6, a2), a2;
|
|
3477
3484
|
}
|
|
3478
|
-
function
|
|
3479
|
-
let t2 = () => e6.loadNamespaces(
|
|
3485
|
+
function Bo(e6) {
|
|
3486
|
+
let t2 = () => e6.loadNamespaces(Io).then(() => void 0, () => void 0);
|
|
3480
3487
|
return e6.isInitialized ? t2() : new Promise((n2) => {
|
|
3481
3488
|
e6.on(`initialized`, () => void t2().then(n2));
|
|
3482
3489
|
});
|
|
3483
3490
|
}
|
|
3484
|
-
function
|
|
3491
|
+
function Vo(e6, t2) {
|
|
3485
3492
|
return e6.getResourceBundle(t2, `translation`) ?? e6.getResourceBundle(`en`, `translation`);
|
|
3486
3493
|
}
|
|
3487
|
-
var
|
|
3494
|
+
var Ho = (e6, t2, n2) => {
|
|
3488
3495
|
let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
|
|
3489
3496
|
return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
|
|
3490
3497
|
(typeof queueMicrotask == `function` ? queueMicrotask : setTimeout)(r3.bind(null, Error(`Unknown variable dynamic import: ` + t2 + (t2.split(`/`).length === n2 ? `` : `. Note that variables only represent file names one level deep.`))));
|
|
3491
3498
|
});
|
|
3492
3499
|
};
|
|
3493
|
-
var
|
|
3494
|
-
Sr({ isDev: false, loadMessages: (e6) =>
|
|
3495
|
-
var
|
|
3496
|
-
function
|
|
3497
|
-
let t2 =
|
|
3498
|
-
return t2 || (t2 =
|
|
3500
|
+
var Uo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3501
|
+
Sr({ isDev: false, loadMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import.meta.url), "../assets/locale/messages_en.json": () => _n(() => Promise.resolve().then(() => Xo), void 0, import.meta.url) }), `../assets/locale/messages_${Uo(e6)}.json`, 4), loadDevMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import.meta.url) }), `../assets/locale/messages_${Uo(e6)}.dev.json`, 4) });
|
|
3502
|
+
var Wo = /* @__PURE__ */ new WeakMap();
|
|
3503
|
+
function Go(e6) {
|
|
3504
|
+
let t2 = Wo.get(e6);
|
|
3505
|
+
return t2 || (t2 = Bo(e6).finally(() => Wo.delete(e6)), Wo.set(e6, t2)), t2;
|
|
3499
3506
|
}
|
|
3500
|
-
function
|
|
3501
|
-
let n2 =
|
|
3507
|
+
function Ko({ i18n: e6, locale: t2 }) {
|
|
3508
|
+
let n2 = Kn(), r2 = yr();
|
|
3502
3509
|
if (!n2) return null;
|
|
3503
|
-
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw
|
|
3504
|
-
let i2 =
|
|
3505
|
-
return i2 && r2.set(
|
|
3506
|
-
}
|
|
3507
|
-
function
|
|
3508
|
-
let t2 =
|
|
3509
|
-
return { i18n:
|
|
3510
|
-
}
|
|
3511
|
-
var
|
|
3512
|
-
var
|
|
3513
|
-
var
|
|
3514
|
-
var
|
|
3515
|
-
var
|
|
3516
|
-
var
|
|
3517
|
-
var
|
|
3518
|
-
let n2 =
|
|
3510
|
+
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Go(e6);
|
|
3511
|
+
let i2 = Vo(e6, t2);
|
|
3512
|
+
return i2 && r2.set(Fo, { locale: t2, messages: i2 }), null;
|
|
3513
|
+
}
|
|
3514
|
+
function qo(e6) {
|
|
3515
|
+
let t2 = hr(), n2 = Lo()?.locale ?? t2 ?? `en`;
|
|
3516
|
+
return { i18n: zo(n2, e6), locale: n2 };
|
|
3517
|
+
}
|
|
3518
|
+
var Jo = _({ default: () => Yo });
|
|
3519
|
+
var Yo = { "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "post-list.empty-state.title": `No posts yet`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "related-posts.empty-state.title": `No related posts yet`, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "post-actions.like": `Like post`, "post-actions.unlike": `Unlike post`, "post-actions.share": `Share post`, "post-actions.share-dialog": `Share post`, "post-actions.link-copied": `Link copied`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.link-label": `Post link`, "post-actions.copy-link": `Copy link`, "post-actions.close": `Close`, "post-counters.loading-likes": `Loading likes`, "cover-media.play": `Play video`, "cover-media.placeholder-alt": `Post cover image`, "post-comments.loading": `Loading comments\u2026`, "post-comments.no-post": `No post resolved for this URL yet.`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, "canvas.post-title": `Post Title`, "canvas.author-name": `Author Name`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "canvas.category": `Category`, "canvas.category-numbered": `Category {number}`, "canvas.tag-numbered": `Tag {number}`, "canvas.author-photo-alt": `Author photo`, "category-header.all-posts": `All Posts` };
|
|
3520
|
+
var Xo = _({ default: () => Qo, title: () => Zo });
|
|
3521
|
+
var Zo = `My App`;
|
|
3522
|
+
var Qo = { "canvas.category": `Category`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "canvas.tag-numbered": `Tag {number}`, "cover-media.play": `Play video`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-counters.loading-likes": `Loading likes`, "post-comments.loading": `Loading comments\u2026`, "post-actions.like": `Like post`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "related-posts.empty-state.title": `No related posts yet`, "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post-actions.link-copied": `Link copied`, "category-header.all-posts": `All Posts`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.copy-link": `Copy link`, "cover-media.placeholder-alt": `Post cover image`, "post-actions.link-label": `Post link`, "post-list.empty-state.title": `No posts yet`, "post-actions.share-dialog": `Share post`, "canvas.post-title": `Post Title`, "post-actions.unlike": `Unlike post`, "post-comments.no-post": `No post resolved for this URL yet.`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "canvas.category-numbered": `Category {number}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post-actions.share": `Share post`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post-actions.close": `Close`, "canvas.category-description": `Add a short description of this category so readers know what they will find here. It shows under the category title, above the posts.`, "canvas.author-photo-alt": `Author photo`, "canvas.author-name": `Author Name`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, title: Zo, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.` };
|
|
3523
|
+
var $o = Object.assign({ "../assets/locale/messages_en.dev.json": Jo, "../assets/locale/messages_en.json": Xo });
|
|
3524
|
+
var es = (e6, t2) => {
|
|
3525
|
+
let n2 = $o[`../assets/locale/messages_${Uo(e6)}${t2}.json`];
|
|
3519
3526
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3520
3527
|
};
|
|
3521
|
-
var
|
|
3522
|
-
var
|
|
3523
|
-
var
|
|
3524
|
-
var
|
|
3525
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
3526
|
-
return { timeToRead: (t3) => e6(
|
|
3528
|
+
var ts = Sr({ isDev: false, loadMessages: (e6) => es(e6, ``), loadDevMessages: (e6) => es(e6, `.dev`) });
|
|
3529
|
+
var ns = (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);
|
|
3530
|
+
var G = { 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` };
|
|
3531
|
+
var rs = (e6, t2) => {
|
|
3532
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: ns(r2, `full`, t2) });
|
|
3533
|
+
return { timeToRead: (t3) => e6(G.timeToRead, { count: t3 }), viewCount: n2(G.viewCount), commentCount: n2(G.commentCount), likeCount: n2(G.likeCount), noPostsEmptyState: () => ({ title: e6(G.noPostsTitle), description: e6(G.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(G.noRelatedPostsTitle), description: e6(G.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(G.canvasPostTitle), authorName: () => e6(G.canvasAuthorName), excerpt: () => e6(G.canvasExcerpt), content: () => e6(G.canvasContent), category: () => e6(G.canvasCategory), categoryNumbered: (t3) => e6(G.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(G.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(G.canvasCoverAlt), authorPhotoAlt: () => e6(G.canvasAuthorPhotoAlt) } };
|
|
3527
3534
|
};
|
|
3528
|
-
function
|
|
3535
|
+
function is(e6) {
|
|
3529
3536
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
3530
3537
|
}
|
|
3531
|
-
function
|
|
3538
|
+
function as(e6) {
|
|
3532
3539
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
3533
3540
|
}
|
|
3534
|
-
function
|
|
3541
|
+
function os(e6) {
|
|
3535
3542
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3536
3543
|
}
|
|
3537
|
-
function
|
|
3538
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
3544
|
+
function K(e6, t2) {
|
|
3545
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...is(e6) ? e6.$and : [e6], ...is(t2) ? t2.$and : [t2]] };
|
|
3539
3546
|
}
|
|
3540
|
-
function
|
|
3541
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
3547
|
+
function ss(e6, t2) {
|
|
3548
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...as(e6) ? e6.$or : [e6], ...as(t2) ? t2.$or : [t2]] };
|
|
3542
3549
|
}
|
|
3543
|
-
function
|
|
3544
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
3550
|
+
function cs(e6) {
|
|
3551
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return os(e6) ? e6.$not : { $not: e6 };
|
|
3545
3552
|
}
|
|
3546
|
-
var
|
|
3553
|
+
var ls = class {
|
|
3547
3554
|
_items;
|
|
3548
3555
|
_fetchNextPage;
|
|
3549
3556
|
_fetchPrevPage;
|
|
@@ -3573,7 +3580,7 @@ var ss = class {
|
|
|
3573
3580
|
return await this._fetchPrevPage();
|
|
3574
3581
|
}
|
|
3575
3582
|
};
|
|
3576
|
-
var
|
|
3583
|
+
var us = class extends ls {
|
|
3577
3584
|
_nextCursor;
|
|
3578
3585
|
_prevCursor;
|
|
3579
3586
|
cursors;
|
|
@@ -3587,7 +3594,7 @@ var cs = class extends ss {
|
|
|
3587
3594
|
return !!this._prevCursor;
|
|
3588
3595
|
}
|
|
3589
3596
|
};
|
|
3590
|
-
var
|
|
3597
|
+
var ds = class extends ls {
|
|
3591
3598
|
_totalCount;
|
|
3592
3599
|
_offset;
|
|
3593
3600
|
_tooManyToCount;
|
|
@@ -3610,76 +3617,76 @@ var ls = class extends ss {
|
|
|
3610
3617
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
3611
3618
|
}
|
|
3612
3619
|
};
|
|
3613
|
-
function
|
|
3620
|
+
function fs(e6) {
|
|
3614
3621
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3615
3622
|
try {
|
|
3616
3623
|
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Ze]: a2, [Qe]: o2 } = e6.responseTransformer(i2);
|
|
3617
3624
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3618
3625
|
let e7 = n2;
|
|
3619
|
-
return new
|
|
3626
|
+
return new ds({ items: a2 ?? [], fetchNextPage: () => t2({ ...e7, paging: { offset: e7.paging.offset + e7.paging.limit, limit: e7.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e7.paging.offset - e7.paging.limit, 0), limit: e7.paging.limit } }).find(), offset: e7.paging.offset, limit: e7.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
|
|
3620
3627
|
}
|
|
3621
3628
|
let s2 = n2.cursorPaging;
|
|
3622
|
-
return new
|
|
3629
|
+
return new us({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
|
|
3623
3630
|
} catch (t3) {
|
|
3624
3631
|
throw e6.errorTransformer(t3);
|
|
3625
3632
|
}
|
|
3626
3633
|
}, skipTo(e7) {
|
|
3627
3634
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
3628
3635
|
}, eq(r2, i2) {
|
|
3629
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3630
|
-
return t2({ ...n2, filter:
|
|
3636
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: a2 };
|
|
3637
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3631
3638
|
}, ne(r2, i2) {
|
|
3632
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3633
|
-
return t2({ ...n2, filter:
|
|
3639
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
3640
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3634
3641
|
}, ge(r2, i2) {
|
|
3635
|
-
let a2 = { [
|
|
3636
|
-
return t2({ ...n2, filter:
|
|
3642
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
3643
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3637
3644
|
}, gt(r2, i2) {
|
|
3638
|
-
let a2 = { [
|
|
3639
|
-
return t2({ ...n2, filter:
|
|
3645
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
3646
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3640
3647
|
}, le(r2, i2) {
|
|
3641
|
-
let a2 = { [
|
|
3642
|
-
return t2({ ...n2, filter:
|
|
3648
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
3649
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3643
3650
|
}, lt(r2, i2) {
|
|
3644
|
-
let a2 = { [
|
|
3645
|
-
return t2({ ...n2, filter:
|
|
3651
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
3652
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3646
3653
|
}, isNotEmpty(e7) {
|
|
3647
3654
|
return this.ne(e7, null);
|
|
3648
3655
|
}, isEmpty(e7) {
|
|
3649
3656
|
return this.eq(e7, null);
|
|
3650
3657
|
}, startsWith(r2, i2) {
|
|
3651
|
-
let a2 = { [
|
|
3652
|
-
return t2({ ...n2, filter:
|
|
3658
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
3659
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3653
3660
|
}, endsWith(r2, i2) {
|
|
3654
|
-
let a2 = { [
|
|
3655
|
-
return t2({ ...n2, filter:
|
|
3661
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
3662
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3656
3663
|
}, contains(r2, i2) {
|
|
3657
|
-
let a2 = { [
|
|
3658
|
-
return t2({ ...n2, filter:
|
|
3664
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
3665
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3659
3666
|
}, hasSome(r2, ...i2) {
|
|
3660
|
-
let a2 = { [
|
|
3661
|
-
return t2({ ...n2, filter:
|
|
3667
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3668
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3662
3669
|
}, hasAll(r2, ...i2) {
|
|
3663
|
-
let a2 = { [
|
|
3664
|
-
return t2({ ...n2, filter:
|
|
3670
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3671
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3665
3672
|
}, between(e7, t3, n3) {
|
|
3666
3673
|
return this.ge(e7, t3).lt(e7, n3);
|
|
3667
3674
|
}, in(r2, i2) {
|
|
3668
|
-
let a2 = { [
|
|
3669
|
-
return t2({ ...n2, filter:
|
|
3675
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
3676
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3670
3677
|
}, exists(r2, i2 = true) {
|
|
3671
|
-
let a2 = { [
|
|
3672
|
-
return t2({ ...n2, filter:
|
|
3678
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3679
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3673
3680
|
}, or(e7) {
|
|
3674
|
-
return t2({ ...n2, filter:
|
|
3681
|
+
return t2({ ...n2, filter: ss(n2.filter, e7.query.filter) });
|
|
3675
3682
|
}, and(e7) {
|
|
3676
|
-
return t2({ ...n2, filter:
|
|
3683
|
+
return t2({ ...n2, filter: K(n2.filter, e7.query.filter) });
|
|
3677
3684
|
}, not(e7) {
|
|
3678
|
-
return t2({ ...n2, filter:
|
|
3685
|
+
return t2({ ...n2, filter: cs(e7.query.filter) });
|
|
3679
3686
|
}, ascending(...r2) {
|
|
3680
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3687
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3681
3688
|
}, descending(...r2) {
|
|
3682
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3689
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
3683
3690
|
}, skip(e7) {
|
|
3684
3691
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
3685
3692
|
}, limit(r2) {
|
|
@@ -3692,82 +3699,82 @@ function us(e6) {
|
|
|
3692
3699
|
} });
|
|
3693
3700
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
3694
3701
|
}
|
|
3695
|
-
function
|
|
3702
|
+
function q(e6, t2) {
|
|
3696
3703
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3697
3704
|
return n2 ? t2.replace(n2, e6[n2]) : et(t2, { ...e6, ...$e });
|
|
3698
3705
|
}
|
|
3699
|
-
var
|
|
3700
|
-
var
|
|
3701
|
-
var
|
|
3702
|
-
var
|
|
3703
|
-
var
|
|
3704
|
-
var
|
|
3705
|
-
function
|
|
3706
|
+
var ps = `filter`;
|
|
3707
|
+
var ms = `sort`;
|
|
3708
|
+
var hs = `cursorPaging`;
|
|
3709
|
+
var gs = `paging`;
|
|
3710
|
+
var _s = [ps, ms, hs];
|
|
3711
|
+
var vs = [ps, ms, gs];
|
|
3712
|
+
function ys(e6, t2) {
|
|
3706
3713
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
3707
3714
|
}
|
|
3708
|
-
function
|
|
3709
|
-
return
|
|
3715
|
+
function bs(e6) {
|
|
3716
|
+
return ys(e6, _s);
|
|
3710
3717
|
}
|
|
3711
|
-
function
|
|
3712
|
-
return
|
|
3718
|
+
function xs(e6) {
|
|
3719
|
+
return ys(e6, vs);
|
|
3713
3720
|
}
|
|
3714
|
-
function
|
|
3721
|
+
function Ss(e6) {
|
|
3715
3722
|
let { hasOptionsParameter: t2 } = e6;
|
|
3716
3723
|
return function(...n2) {
|
|
3717
|
-
return t2 ?
|
|
3724
|
+
return t2 ? ws(n2, e6) : Cs(n2, e6);
|
|
3718
3725
|
};
|
|
3719
3726
|
}
|
|
3720
|
-
function
|
|
3727
|
+
function Cs(e6, t2) {
|
|
3721
3728
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
3722
3729
|
}
|
|
3723
|
-
function
|
|
3730
|
+
function ws(e6, t2) {
|
|
3724
3731
|
switch (e6.length) {
|
|
3725
3732
|
case 0:
|
|
3726
3733
|
return t2.builderQueryFunction();
|
|
3727
3734
|
case 1:
|
|
3728
|
-
return
|
|
3735
|
+
return bs(e6[0]) || xs(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
3729
3736
|
default:
|
|
3730
3737
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3731
3738
|
}
|
|
3732
3739
|
}
|
|
3733
|
-
function
|
|
3740
|
+
function J(e6) {
|
|
3734
3741
|
if (!e6) return;
|
|
3735
3742
|
let t2 = ``;
|
|
3736
3743
|
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;
|
|
3737
3744
|
}
|
|
3738
|
-
function
|
|
3745
|
+
function Y(e6) {
|
|
3739
3746
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3740
3747
|
}
|
|
3741
|
-
var
|
|
3742
|
-
var
|
|
3743
|
-
function
|
|
3748
|
+
var Ts = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3749
|
+
var Es = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3750
|
+
function Ds(e6) {
|
|
3744
3751
|
return Lt(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: `` }] } }));
|
|
3745
3752
|
}
|
|
3746
|
-
var
|
|
3747
|
-
function
|
|
3753
|
+
var Os = `@wix/auto_sdk_blog_categories`;
|
|
3754
|
+
function ks(e6) {
|
|
3748
3755
|
function t2({ host: t3 }) {
|
|
3749
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3756
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Os, migrationOptions: { optInTransformResponse: true }, url: Ds({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ts }, { transformFn: N, paths: Es }]) };
|
|
3750
3757
|
}
|
|
3751
3758
|
return t2;
|
|
3752
3759
|
}
|
|
3753
|
-
var
|
|
3754
|
-
var
|
|
3755
|
-
async function
|
|
3756
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3760
|
+
var As = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3761
|
+
var js = [{ path: `categories.coverImage` }];
|
|
3762
|
+
async function Ms(e6) {
|
|
3763
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ks(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3757
3764
|
n2?.onSiteCall?.();
|
|
3758
3765
|
try {
|
|
3759
3766
|
let e7 = await t2.request(r2);
|
|
3760
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3767
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: As }, { transformFn: J, paths: js }]));
|
|
3761
3768
|
} catch (e7) {
|
|
3762
3769
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3763
3770
|
throw n2?.onError?.(e7), t3;
|
|
3764
3771
|
}
|
|
3765
3772
|
}
|
|
3766
|
-
function js(e6) {
|
|
3767
|
-
return (t2) => As(t2, { httpClient: e6 });
|
|
3768
|
-
}
|
|
3769
|
-
var Ms = M(js);
|
|
3770
3773
|
function Ns(e6) {
|
|
3774
|
+
return (t2) => Ms(t2, { httpClient: e6 });
|
|
3775
|
+
}
|
|
3776
|
+
var Ps = M(Ns);
|
|
3777
|
+
function X(e6) {
|
|
3771
3778
|
if (!e6) return;
|
|
3772
3779
|
let t2 = ``;
|
|
3773
3780
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3782,69 +3789,69 @@ function Ns(e6) {
|
|
|
3782
3789
|
}
|
|
3783
3790
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3784
3791
|
}
|
|
3785
|
-
var
|
|
3786
|
-
var
|
|
3787
|
-
var Is = [{ 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` }];
|
|
3788
|
-
var
|
|
3789
|
-
var
|
|
3790
|
-
var zs = [{ 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` }];
|
|
3791
|
-
var
|
|
3792
|
-
function
|
|
3792
|
+
var Fs = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { path: `post.expirationDate` }, { 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` }];
|
|
3793
|
+
var Is = [{ path: `post.richContentCompressed` }];
|
|
3794
|
+
var Ls = [{ 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` }];
|
|
3795
|
+
var Rs = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { 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` }];
|
|
3796
|
+
var zs = [{ path: `posts.richContentCompressed` }];
|
|
3797
|
+
var Bs = [{ 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` }];
|
|
3798
|
+
var Vs = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3799
|
+
function Hs(e6) {
|
|
3793
3800
|
return Lt(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` }] } }));
|
|
3794
3801
|
}
|
|
3795
|
-
var
|
|
3796
|
-
function
|
|
3802
|
+
var Us = `@wix/auto_sdk_blog_posts`;
|
|
3803
|
+
function Ws(e6) {
|
|
3797
3804
|
function t2({ host: t3 }) {
|
|
3798
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName:
|
|
3805
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/slugs/{slug}`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Fs }, { transformFn: dn, paths: Is }, { transformFn: N, paths: Ls }]) };
|
|
3799
3806
|
}
|
|
3800
3807
|
return t2;
|
|
3801
3808
|
}
|
|
3802
|
-
function
|
|
3809
|
+
function Gs(e6) {
|
|
3803
3810
|
function t2({ host: t3 }) {
|
|
3804
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
3811
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3805
3812
|
}
|
|
3806
3813
|
return t2;
|
|
3807
3814
|
}
|
|
3808
|
-
function
|
|
3815
|
+
function Ks(e6) {
|
|
3809
3816
|
function t2({ host: t3 }) {
|
|
3810
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3811
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
3817
|
+
let n2 = A(e6, [{ transformFn: un, paths: Vs }]);
|
|
3818
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3812
3819
|
}
|
|
3813
3820
|
return t2;
|
|
3814
3821
|
}
|
|
3815
|
-
var
|
|
3816
|
-
var
|
|
3817
|
-
var
|
|
3818
|
-
var
|
|
3819
|
-
var
|
|
3820
|
-
var
|
|
3822
|
+
var qs = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3823
|
+
var Js = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3824
|
+
var Ys = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3825
|
+
var Xs = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
3826
|
+
var Zs = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
3827
|
+
var Qs = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
3821
3828
|
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 || {});
|
|
3822
|
-
async function
|
|
3823
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3829
|
+
async function $s(e6, t2) {
|
|
3830
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ws(D({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }, []));
|
|
3824
3831
|
r2?.onSiteCall?.();
|
|
3825
3832
|
try {
|
|
3826
3833
|
let e7 = await n2.request(i2);
|
|
3827
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3834
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: qs }, { transformFn: J, paths: Js }, { transformFn: X, paths: Ys }]), [`post.richContent`, `post.rich_content`]);
|
|
3828
3835
|
} catch (e7) {
|
|
3829
3836
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
3830
3837
|
throw r2?.onError?.(e7), t3;
|
|
3831
3838
|
}
|
|
3832
3839
|
}
|
|
3833
|
-
async function
|
|
3834
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3840
|
+
async function ec(e6) {
|
|
3841
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Gs(D({ featured: e6?.featured, hashtags: e6?.hashtags, categoryIds: e6?.categoryIds, tagIds: e6?.tagIds, sort: e6?.sort, paging: e6?.paging, language: e6?.language, memberId: e6?.memberId, fieldsets: e6?.fieldsets }, []));
|
|
3835
3842
|
n2?.onSiteCall?.();
|
|
3836
3843
|
try {
|
|
3837
3844
|
let e7 = await t2.request(r2);
|
|
3838
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3845
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3839
3846
|
} catch (e7) {
|
|
3840
3847
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { featured: `$[0].featured`, hashtags: `$[0].hashtags`, categoryIds: `$[0].categoryIds`, tagIds: `$[0].tagIds`, sort: `$[0].sort`, paging: `$[0].paging`, language: `$[0].language`, memberId: `$[0].memberId`, fieldsets: `$[0].fieldsets` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3841
3848
|
throw n2?.onError?.(e7), t3;
|
|
3842
3849
|
}
|
|
3843
3850
|
}
|
|
3844
|
-
function
|
|
3851
|
+
function tc(e6) {
|
|
3845
3852
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3846
|
-
return
|
|
3847
|
-
let i2 =
|
|
3853
|
+
return fs({ func: async (r2) => {
|
|
3854
|
+
let i2 = Ks({ ...r2, ...e6 ?? {} });
|
|
3848
3855
|
n2?.onSiteCall?.();
|
|
3849
3856
|
try {
|
|
3850
3857
|
let e7 = await t2.request(i2);
|
|
@@ -3856,76 +3863,76 @@ function ec(e6) {
|
|
|
3856
3863
|
let n3 = [t3, e6];
|
|
3857
3864
|
return D({ ...n3?.[1], query: n3?.[0] }, []);
|
|
3858
3865
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3859
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3866
|
+
let t3 = O(A(e7, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3860
3867
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
3861
3868
|
}, errorTransformer: (e7) => {
|
|
3862
3869
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3863
3870
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3864
3871
|
}
|
|
3865
|
-
async function
|
|
3866
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3872
|
+
async function nc(e6, t2) {
|
|
3873
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ks(D({ query: e6, ...t2 }, []));
|
|
3867
3874
|
r2?.onSiteCall?.();
|
|
3868
3875
|
try {
|
|
3869
3876
|
let e7 = await n2.request(i2);
|
|
3870
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3877
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3871
3878
|
} catch (e7) {
|
|
3872
3879
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3873
3880
|
throw r2?.onError?.(e7), t3;
|
|
3874
3881
|
}
|
|
3875
3882
|
}
|
|
3876
|
-
function nc(e6) {
|
|
3877
|
-
return (t2, n2) => Qs(t2, n2, { httpClient: e6 });
|
|
3878
|
-
}
|
|
3879
3883
|
function rc(e6) {
|
|
3880
|
-
return (t2) => $s(t2, { httpClient: e6 });
|
|
3884
|
+
return (t2, n2) => $s(t2, n2, { httpClient: e6 });
|
|
3881
3885
|
}
|
|
3882
3886
|
function ic(e6) {
|
|
3883
3887
|
return (t2) => ec(t2, { httpClient: e6 });
|
|
3884
3888
|
}
|
|
3885
3889
|
function ac(e6) {
|
|
3886
|
-
return (t2
|
|
3890
|
+
return (t2) => tc(t2, { httpClient: e6 });
|
|
3887
3891
|
}
|
|
3888
3892
|
function oc(e6) {
|
|
3889
|
-
|
|
3893
|
+
return (t2, n2) => nc(t2, n2, { httpClient: e6 });
|
|
3894
|
+
}
|
|
3895
|
+
function sc(e6) {
|
|
3896
|
+
let t2 = Ss({ builderQueryFunction: (t3) => ac(e6)(t3), typedQueryFunction: (t3, n3) => oc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3890
3897
|
function n2(e7, n3) {
|
|
3891
3898
|
return t2(...arguments);
|
|
3892
3899
|
}
|
|
3893
3900
|
return n2;
|
|
3894
3901
|
}
|
|
3895
|
-
var sc = M(nc);
|
|
3896
3902
|
var cc = M(rc);
|
|
3897
|
-
var lc = M(
|
|
3898
|
-
var uc = (
|
|
3899
|
-
var dc = `
|
|
3900
|
-
var fc =
|
|
3903
|
+
var lc = M(ic);
|
|
3904
|
+
var uc = M(sc);
|
|
3905
|
+
var dc = (e6) => O(A(e6, [{ transformFn: Y, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: J, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: X, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
3906
|
+
var fc = `https://blog.wixsite.com/blog-demo-posts`;
|
|
3907
|
+
var pc = M((e6) => async (t2) => {
|
|
3901
3908
|
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${It(t2)}`);
|
|
3902
3909
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
3903
|
-
return
|
|
3910
|
+
return dc(await n2.json()).filter((e7) => !e7.url?.startsWith(fc));
|
|
3904
3911
|
});
|
|
3905
|
-
var
|
|
3912
|
+
var mc = async (e6) => {
|
|
3906
3913
|
try {
|
|
3907
|
-
return await
|
|
3914
|
+
return await pc(e6);
|
|
3908
3915
|
} catch (e7) {
|
|
3909
3916
|
return console.info(`[blog demo posts]`, `read failed`, e7), [];
|
|
3910
3917
|
}
|
|
3911
3918
|
};
|
|
3912
|
-
var
|
|
3913
|
-
var
|
|
3914
|
-
function
|
|
3919
|
+
var hc = [{ path: `members.createdDate` }, { path: `members.updatedDate` }, { path: `members.lastLoginDate` }];
|
|
3920
|
+
var gc = [{ path: `query.sorting.origin.latitude` }, { path: `query.sorting.origin.longitude` }];
|
|
3921
|
+
function _c(e6) {
|
|
3915
3922
|
return Lt(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` }] } }));
|
|
3916
3923
|
}
|
|
3917
|
-
var
|
|
3918
|
-
function
|
|
3924
|
+
var vc = `@wix/auto_sdk_members_members`;
|
|
3925
|
+
function yc(e6) {
|
|
3919
3926
|
function t2({ host: t3 }) {
|
|
3920
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3921
|
-
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName:
|
|
3927
|
+
let n2 = A(e6, [{ transformFn: un, paths: gc }]);
|
|
3928
|
+
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: vc, migrationOptions: { optInTransformResponse: true }, url: _c({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: hc }]) };
|
|
3922
3929
|
}
|
|
3923
3930
|
return t2;
|
|
3924
3931
|
}
|
|
3925
|
-
function
|
|
3932
|
+
function bc(e6) {
|
|
3926
3933
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3927
|
-
return
|
|
3928
|
-
let i2 =
|
|
3934
|
+
return fs({ func: async (r2) => {
|
|
3935
|
+
let i2 = yc({ ...r2, ...e6 ?? {} });
|
|
3929
3936
|
n2?.onSiteCall?.();
|
|
3930
3937
|
try {
|
|
3931
3938
|
let e7 = await t2.request(i2);
|
|
@@ -3943,8 +3950,8 @@ function yc(e6) {
|
|
|
3943
3950
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3944
3951
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3945
3952
|
}
|
|
3946
|
-
async function
|
|
3947
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3953
|
+
async function xc(e6, t2) {
|
|
3954
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = yc(D({ query: e6, ...t2 }));
|
|
3948
3955
|
r2?.onSiteCall?.();
|
|
3949
3956
|
try {
|
|
3950
3957
|
let e7 = await n2.request(i2);
|
|
@@ -3954,25 +3961,25 @@ async function bc(e6, t2) {
|
|
|
3954
3961
|
throw r2?.onError?.(e7), t3;
|
|
3955
3962
|
}
|
|
3956
3963
|
}
|
|
3957
|
-
function xc(e6) {
|
|
3958
|
-
return (t2) => yc(t2, { httpClient: e6 });
|
|
3959
|
-
}
|
|
3960
3964
|
function Sc(e6) {
|
|
3961
|
-
return (t2
|
|
3965
|
+
return (t2) => bc(t2, { httpClient: e6 });
|
|
3962
3966
|
}
|
|
3963
3967
|
function Cc(e6) {
|
|
3964
|
-
|
|
3968
|
+
return (t2, n2) => xc(t2, n2, { httpClient: e6 });
|
|
3969
|
+
}
|
|
3970
|
+
function wc(e6) {
|
|
3971
|
+
let t2 = Ss({ builderQueryFunction: (t3) => Sc(e6)(t3), typedQueryFunction: (t3, n3) => Cc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3965
3972
|
function n2(e7, n3) {
|
|
3966
3973
|
return t2(...arguments);
|
|
3967
3974
|
}
|
|
3968
3975
|
return n2;
|
|
3969
3976
|
}
|
|
3970
|
-
var
|
|
3971
|
-
var
|
|
3977
|
+
var Tc = M(wc);
|
|
3978
|
+
var Ec = async (e6) => {
|
|
3972
3979
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
3973
3980
|
if (t2.length === 0) return {};
|
|
3974
3981
|
try {
|
|
3975
|
-
let { items: e7 } = await
|
|
3982
|
+
let { items: e7 } = await Tc({ fieldsets: [`PUBLIC`] }).in(`_id`, t2).limit(t2.length).find();
|
|
3976
3983
|
return Object.fromEntries(e7.flatMap((e8) => {
|
|
3977
3984
|
let { _id: t3 } = e8;
|
|
3978
3985
|
return t3 ? [[t3, e8]] : [];
|
|
@@ -3981,32 +3988,32 @@ var Tc = async (e6) => {
|
|
|
3981
3988
|
return {};
|
|
3982
3989
|
}
|
|
3983
3990
|
};
|
|
3984
|
-
var
|
|
3985
|
-
var
|
|
3986
|
-
var Oc = [{ 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` }];
|
|
3987
|
-
var
|
|
3988
|
-
function
|
|
3991
|
+
var Dc = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { 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` }];
|
|
3992
|
+
var Oc = [{ path: `posts.richContentCompressed` }];
|
|
3993
|
+
var kc = [{ 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` }];
|
|
3994
|
+
var Ac = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3995
|
+
function jc(e6) {
|
|
3989
3996
|
return Lt(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` }] } }));
|
|
3990
3997
|
}
|
|
3991
|
-
var
|
|
3992
|
-
function
|
|
3998
|
+
var Mc = `@wix/auto_sdk_blog_posts`;
|
|
3999
|
+
function Nc(e6) {
|
|
3993
4000
|
function t2({ host: t3 }) {
|
|
3994
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3995
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4001
|
+
let n2 = A(e6, [{ transformFn: un, paths: Ac }]);
|
|
4002
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Mc, migrationOptions: { optInTransformResponse: true }, url: jc({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Dc }, { transformFn: dn, paths: Oc }, { transformFn: N, paths: kc }]) };
|
|
3996
4003
|
}
|
|
3997
4004
|
return t2;
|
|
3998
4005
|
}
|
|
3999
|
-
function
|
|
4000
|
-
let e6 =
|
|
4006
|
+
function Pc() {
|
|
4007
|
+
let e6 = Nc({});
|
|
4001
4008
|
return { getUrl: (t2) => {
|
|
4002
4009
|
let { url: n2 } = e6(t2);
|
|
4003
4010
|
return n2;
|
|
4004
4011
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4005
4012
|
}
|
|
4006
|
-
var
|
|
4007
|
-
var
|
|
4008
|
-
var
|
|
4009
|
-
let { data: n2 } = await e6.request(
|
|
4013
|
+
var Fc = Pc();
|
|
4014
|
+
var Ic = (e6) => (t2) => ({ method: `POST`, url: Fc.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4015
|
+
var Lc = M((e6) => async (t2) => {
|
|
4016
|
+
let { data: n2 } = await e6.request(Ic(t2)), r2 = {};
|
|
4010
4017
|
for (let e7 of n2.posts ?? []) {
|
|
4011
4018
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4012
4019
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4015,128 +4022,128 @@ var Ic = M((e6) => async (t2) => {
|
|
|
4015
4022
|
}
|
|
4016
4023
|
return r2;
|
|
4017
4024
|
});
|
|
4018
|
-
var
|
|
4025
|
+
var Rc = async (e6) => {
|
|
4019
4026
|
if (e6.length === 0) return {};
|
|
4020
4027
|
try {
|
|
4021
|
-
return await
|
|
4028
|
+
return await Lc(e6);
|
|
4022
4029
|
} catch {
|
|
4023
4030
|
return {};
|
|
4024
4031
|
}
|
|
4025
4032
|
};
|
|
4026
|
-
var
|
|
4033
|
+
var zc = class extends Error {
|
|
4027
4034
|
constructor(e6, t2) {
|
|
4028
4035
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4029
4036
|
}
|
|
4030
4037
|
};
|
|
4031
|
-
var
|
|
4038
|
+
var Bc = (e6, t2, n2) => {
|
|
4032
4039
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4033
|
-
r2 = setTimeout(() => i3(new
|
|
4040
|
+
r2 = setTimeout(() => i3(new zc(n2, t2)), t2);
|
|
4034
4041
|
});
|
|
4035
4042
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4036
4043
|
};
|
|
4037
4044
|
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT, Z.RICH_CONTENT, Z.URL;
|
|
4038
|
-
var
|
|
4039
|
-
var
|
|
4045
|
+
var Vc = [Z.URL, Z.METRICS];
|
|
4046
|
+
var Hc = (e6) => {
|
|
4040
4047
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4041
4048
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4042
4049
|
};
|
|
4043
|
-
var
|
|
4044
|
-
if (t2 && !
|
|
4050
|
+
var Uc = (e6, t2) => {
|
|
4051
|
+
if (t2 && !Hc(e6)) throw e6;
|
|
4045
4052
|
};
|
|
4046
|
-
var
|
|
4047
|
-
var
|
|
4048
|
-
var
|
|
4053
|
+
var Wc = (e6) => Ec(e6.map(({ memberId: e7 }) => e7));
|
|
4054
|
+
var Gc = (e6) => Rc(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4055
|
+
var Kc = async (e6, t2, n2 = false, r2) => {
|
|
4049
4056
|
try {
|
|
4050
|
-
let { post: n3 } = await
|
|
4057
|
+
let { post: n3 } = await cc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
|
|
4051
4058
|
if (n3) return n3;
|
|
4052
4059
|
} catch (e7) {
|
|
4053
|
-
|
|
4060
|
+
Uc(e7, n2);
|
|
4054
4061
|
}
|
|
4055
4062
|
try {
|
|
4056
|
-
let { items: n3 } = await
|
|
4063
|
+
let { items: n3 } = await uc(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
|
|
4057
4064
|
return n3[0];
|
|
4058
4065
|
} catch (e7) {
|
|
4059
|
-
|
|
4066
|
+
Uc(e7, n2);
|
|
4060
4067
|
return;
|
|
4061
4068
|
}
|
|
4062
4069
|
};
|
|
4063
|
-
var
|
|
4070
|
+
var qc = async (e6, t2 = false, n2) => {
|
|
4064
4071
|
try {
|
|
4065
4072
|
let t3 = async (t4) => {
|
|
4066
|
-
let { posts: r2 } = await
|
|
4073
|
+
let { posts: r2 } = await lc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
|
|
4067
4074
|
return r2?.[0];
|
|
4068
4075
|
};
|
|
4069
4076
|
return await t3(true) ?? (n2 ? await t3(false) : void 0);
|
|
4070
4077
|
} catch (e7) {
|
|
4071
|
-
|
|
4078
|
+
Uc(e7, t2);
|
|
4072
4079
|
return;
|
|
4073
4080
|
}
|
|
4074
4081
|
};
|
|
4075
|
-
var
|
|
4076
|
-
var
|
|
4082
|
+
var Jc = 100;
|
|
4083
|
+
var Yc = async () => {
|
|
4077
4084
|
try {
|
|
4078
|
-
let { categories: e6 } = await
|
|
4085
|
+
let { categories: e6 } = await Ps({ paging: { limit: Jc } });
|
|
4079
4086
|
return e6 ?? [];
|
|
4080
4087
|
} catch {
|
|
4081
4088
|
return [];
|
|
4082
4089
|
}
|
|
4083
4090
|
};
|
|
4084
|
-
var
|
|
4091
|
+
var Xc = (e6, t2) => {
|
|
4085
4092
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4086
4093
|
if (!n2?.length) return [];
|
|
4087
4094
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4088
4095
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4089
4096
|
};
|
|
4090
|
-
var
|
|
4097
|
+
var Zc = (e6, t2) => {
|
|
4091
4098
|
let n2 = {};
|
|
4092
|
-
for (let r2 of e6) for (let { _id: e7, label: i2 } of
|
|
4099
|
+
for (let r2 of e6) for (let { _id: e7, label: i2 } of Xc(r2, t2)) e7 && (n2[e7] = i2 ?? ``);
|
|
4093
4100
|
return n2;
|
|
4094
4101
|
};
|
|
4095
|
-
var
|
|
4096
|
-
let n2 = e6 ? await
|
|
4102
|
+
var Qc = async (e6, t2) => {
|
|
4103
|
+
let n2 = e6 ? await Kc(e6, void 0, false, t2) : void 0, { _id: r2, categoryIds: i2, relatedPostIds: a2 } = n2 ?? await qc(void 0, false, t2) ?? {};
|
|
4097
4104
|
return { currentPostId: r2 ?? void 0, categoryIds: i2, relatedPostIds: n2 ? a2 : void 0 };
|
|
4098
4105
|
};
|
|
4099
|
-
var
|
|
4100
|
-
let { items: r2 } = await
|
|
4106
|
+
var $c = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4107
|
+
let { items: r2 } = await uc({ fieldsets: Vc }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4101
4108
|
let { _id: t3 } = e7;
|
|
4102
4109
|
return [t3, e7];
|
|
4103
4110
|
}));
|
|
4104
4111
|
return e6.filter((e7) => e7 !== t2).map((e7) => i2.get(e7)).filter((e7) => e7 !== void 0).slice(0, n2);
|
|
4105
4112
|
};
|
|
4106
|
-
var
|
|
4107
|
-
let i2 =
|
|
4113
|
+
var el = async ({ currentPostId: e6, categoryIds: t2, language: n2, limit: r2 }) => {
|
|
4114
|
+
let i2 = uc({ fieldsets: Vc }).ne(`_id`, e6).descending(`firstPublishedDate`).limit(r2);
|
|
4108
4115
|
t2?.length && (i2 = i2.hasSome(`categoryIds`, t2)), n2 && (i2 = i2.eq(`language`, n2));
|
|
4109
4116
|
let { items: a2 } = await i2.find();
|
|
4110
4117
|
return a2;
|
|
4111
4118
|
};
|
|
4112
|
-
var
|
|
4113
|
-
let o2 =
|
|
4119
|
+
var tl = async ({ slug: e6, language: t2, limit: n2 = 3, propagateErrors: r2 = false, source: i2, sourcePromise: a2 }) => {
|
|
4120
|
+
let o2 = Yc();
|
|
4114
4121
|
try {
|
|
4115
|
-
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await
|
|
4122
|
+
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await Qc(e6, t2));
|
|
4116
4123
|
if (!r3) return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4117
|
-
let l2 = c2?.length ? await
|
|
4118
|
-
return { posts: u2, authorsByMemberId: d2, categoryLabelsById:
|
|
4124
|
+
let l2 = c2?.length ? await $c({ ids: c2, currentPostId: r3, limit: n2 }) : [], u2 = l2.length > 0 ? l2 : await el({ currentPostId: r3, categoryIds: s2, language: t2, limit: n2 }), [d2, f2, p2] = await Promise.all([Wc(u2), o2, Gc(u2)]);
|
|
4125
|
+
return { posts: u2, authorsByMemberId: d2, categoryLabelsById: Zc(u2, f2), videoSourcesByPostId: p2 };
|
|
4119
4126
|
} catch (e7) {
|
|
4120
4127
|
if (r2) throw e7;
|
|
4121
4128
|
return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4122
4129
|
}
|
|
4123
4130
|
};
|
|
4124
|
-
var
|
|
4125
|
-
var
|
|
4126
|
-
var
|
|
4127
|
-
var
|
|
4128
|
-
var
|
|
4129
|
-
var
|
|
4131
|
+
var nl = { newest: `FEED`, oldest: `PUBLISHED_DATE_ASC`, titleAsc: `TITLE_ASC`, titleDesc: `TITLE_DESC`, mostViewed: `VIEW_COUNT`, mostLiked: `LIKE_COUNT` };
|
|
4132
|
+
var rl = async (e6, { limit: t2, offset: n2 = 0, language: r2, sortOrder: i2 }) => e6.posts.length > 0 ? e6 : { ...e6, demoPosts: await mc({ paging: { limit: t2, offset: n2 }, fieldsets: Vc, ...r2 && { language: r2 }, ...i2 && { sort: nl[i2] } }) };
|
|
4133
|
+
var il = n({ isEditor: false, isPreview: false });
|
|
4134
|
+
var al = () => o(il);
|
|
4135
|
+
var ol = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4136
|
+
var sl = () => {
|
|
4130
4137
|
try {
|
|
4131
|
-
let { SSR: e6, SEO: t2 } = f(
|
|
4138
|
+
let { SSR: e6, SEO: t2 } = f(Gn);
|
|
4132
4139
|
return e6 || t2;
|
|
4133
4140
|
} catch {
|
|
4134
4141
|
return false;
|
|
4135
4142
|
}
|
|
4136
4143
|
};
|
|
4137
|
-
var
|
|
4138
|
-
let e6 =
|
|
4139
|
-
return al(
|
|
4144
|
+
var cl = () => {
|
|
4145
|
+
let e6 = sl();
|
|
4146
|
+
return ol(al()) && !e6;
|
|
4140
4147
|
};
|
|
4141
4148
|
g((e6, t2) => {
|
|
4142
4149
|
(function() {
|
|
@@ -4165,34 +4172,34 @@ g((e6, t2) => {
|
|
|
4165
4172
|
}) : window.classNames = n2;
|
|
4166
4173
|
})();
|
|
4167
4174
|
})();
|
|
4168
|
-
var
|
|
4169
|
-
var
|
|
4175
|
+
var ll = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4176
|
+
var ul = (e6) => {
|
|
4170
4177
|
try {
|
|
4171
4178
|
return e6.getMonitoringClient?.() ?? null;
|
|
4172
4179
|
} catch {
|
|
4173
4180
|
return null;
|
|
4174
4181
|
}
|
|
4175
4182
|
};
|
|
4176
|
-
var
|
|
4177
|
-
function
|
|
4178
|
-
let s2 =
|
|
4183
|
+
var dl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4184
|
+
function fl(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
|
|
4185
|
+
let s2 = dl(e6, `captureException`);
|
|
4179
4186
|
if (!s2) return;
|
|
4180
4187
|
let c2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4181
4188
|
s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
|
|
4182
4189
|
}
|
|
4183
|
-
function
|
|
4184
|
-
let a2 =
|
|
4190
|
+
function pl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4191
|
+
let a2 = dl(e6, `startSpanManual`);
|
|
4185
4192
|
if (!a2) return i2;
|
|
4186
4193
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4187
4194
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4188
4195
|
}
|
|
4189
|
-
var
|
|
4196
|
+
var ml = class extends e {
|
|
4190
4197
|
state = { error: void 0 };
|
|
4191
4198
|
static getDerivedStateFromError(e6) {
|
|
4192
4199
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4193
4200
|
}
|
|
4194
4201
|
componentDidCatch(e6, t2) {
|
|
4195
|
-
|
|
4202
|
+
fl(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, tags: this.props.component ? { component: this.props.component } : void 0, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4196
4203
|
}
|
|
4197
4204
|
render() {
|
|
4198
4205
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4200,205 +4207,205 @@ var pl = class extends e {
|
|
|
4200
4207
|
return this.props.fallback;
|
|
4201
4208
|
}
|
|
4202
4209
|
};
|
|
4203
|
-
var
|
|
4204
|
-
var
|
|
4205
|
-
function
|
|
4206
|
-
return o(
|
|
4210
|
+
var hl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4211
|
+
var gl = n(void 0);
|
|
4212
|
+
function _l() {
|
|
4213
|
+
return o(gl);
|
|
4207
4214
|
}
|
|
4208
|
-
var
|
|
4209
|
-
function
|
|
4210
|
-
return o(
|
|
4215
|
+
var vl = n(void 0);
|
|
4216
|
+
function yl() {
|
|
4217
|
+
return o(vl);
|
|
4211
4218
|
}
|
|
4212
|
-
var
|
|
4213
|
-
var
|
|
4214
|
-
var
|
|
4215
|
-
var
|
|
4216
|
-
var
|
|
4217
|
-
var
|
|
4219
|
+
var bl = 6e4;
|
|
4220
|
+
var xl = bl * 60;
|
|
4221
|
+
var Sl = xl * 24;
|
|
4222
|
+
var Cl = Sl * 7;
|
|
4223
|
+
var wl = (e6) => e6 < bl ? [`second`, e6 / 1e3] : e6 < xl ? [`minute`, e6 / bl] : e6 < Sl ? [`hour`, e6 / xl] : [`day`, e6 / Sl];
|
|
4224
|
+
var Tl = (e6, t2, n2 = Date.now()) => {
|
|
4218
4225
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4219
|
-
if (i2 >= 0 && i2 <
|
|
4220
|
-
let [e7, n3] =
|
|
4226
|
+
if (i2 >= 0 && i2 < Cl) {
|
|
4227
|
+
let [e7, n3] = wl(i2);
|
|
4221
4228
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4222
4229
|
}
|
|
4223
4230
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4224
4231
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4225
4232
|
};
|
|
4226
|
-
var
|
|
4227
|
-
var
|
|
4228
|
-
var
|
|
4233
|
+
var El = `https://static.wixstatic.com/media/`;
|
|
4234
|
+
var Dl = 100;
|
|
4235
|
+
var Ol = (e6, t2 = ``) => {
|
|
4229
4236
|
let n2 = e6?.profile?.photo;
|
|
4230
4237
|
if (!n2?.url) return;
|
|
4231
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4232
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4233
|
-
};
|
|
4234
|
-
var
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4237
|
-
var
|
|
4238
|
-
var
|
|
4238
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(El) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4239
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || Dl, height: n2.height || Dl, alt: r2 ?? t2 };
|
|
4240
|
+
};
|
|
4241
|
+
var kl = `https://static.wixstatic.com/media/`;
|
|
4242
|
+
var Al = `wix:image://`;
|
|
4243
|
+
var jl = 1200;
|
|
4244
|
+
var Ml = 800;
|
|
4245
|
+
var Nl = (e6) => {
|
|
4239
4246
|
if (!e6) return;
|
|
4240
4247
|
let t2 = Number.parseInt(e6, 10);
|
|
4241
4248
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4242
4249
|
};
|
|
4243
|
-
var
|
|
4244
|
-
if (!e6.startsWith(
|
|
4250
|
+
var Pl = (e6) => {
|
|
4251
|
+
if (!e6.startsWith(Al)) {
|
|
4245
4252
|
let t3 = e6.split(/[?#]/)[0];
|
|
4246
4253
|
return t3 ? { uri: t3 } : void 0;
|
|
4247
4254
|
}
|
|
4248
4255
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4249
4256
|
if (!r2) return;
|
|
4250
4257
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4251
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4258
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Nl(a2.get(`originWidth`)), height: Nl(a2.get(`originHeight`)) };
|
|
4252
4259
|
};
|
|
4253
|
-
var
|
|
4260
|
+
var Fl = (e6, t2) => {
|
|
4254
4261
|
if (!e6) return;
|
|
4255
|
-
let n2 =
|
|
4262
|
+
let n2 = Pl(e6);
|
|
4256
4263
|
if (!n2) return;
|
|
4257
4264
|
let r2 = n2.name ?? n2.uri;
|
|
4258
|
-
return { uri: n2.uri, url: `${
|
|
4265
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: t2 ?? r2 };
|
|
4259
4266
|
};
|
|
4260
|
-
var
|
|
4267
|
+
var Il = (e6) => {
|
|
4261
4268
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4262
4269
|
if (!t2) return;
|
|
4263
|
-
let n2 =
|
|
4270
|
+
let n2 = Pl(t2);
|
|
4264
4271
|
if (!n2) return;
|
|
4265
4272
|
let r2 = n2.name ?? n2.uri;
|
|
4266
|
-
return { uri: n2.uri, url: `${
|
|
4273
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4267
4274
|
};
|
|
4268
|
-
var
|
|
4269
|
-
var
|
|
4270
|
-
var
|
|
4275
|
+
var Ll = `https://static.wixstatic.com/media/`;
|
|
4276
|
+
var Rl = `wix:video://`;
|
|
4277
|
+
var zl = (e6) => {
|
|
4271
4278
|
if (!e6) return;
|
|
4272
4279
|
let t2 = Number.parseInt(e6, 10);
|
|
4273
4280
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4274
4281
|
};
|
|
4275
|
-
var
|
|
4276
|
-
if (!e6.startsWith(
|
|
4282
|
+
var Bl = (e6) => {
|
|
4283
|
+
if (!e6.startsWith(Rl)) return;
|
|
4277
4284
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4278
4285
|
if (!r2) return;
|
|
4279
4286
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4280
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4287
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Ll}${a2}` : void 0, posterWidth: zl(i2.get(`posterWidth`)), posterHeight: zl(i2.get(`posterHeight`)) };
|
|
4281
4288
|
};
|
|
4282
|
-
var
|
|
4283
|
-
var
|
|
4284
|
-
var
|
|
4289
|
+
var Vl = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4290
|
+
var Hl = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4291
|
+
var Ul = (e6, t2) => {
|
|
4285
4292
|
for (let n2 of e6) {
|
|
4286
4293
|
let e7 = n2.exec(t2);
|
|
4287
4294
|
if (e7) return e7[1];
|
|
4288
4295
|
}
|
|
4289
4296
|
};
|
|
4290
|
-
var
|
|
4291
|
-
let t2 =
|
|
4297
|
+
var Wl = (e6) => {
|
|
4298
|
+
let t2 = Ul(Vl, e6);
|
|
4292
4299
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4293
|
-
let n2 = Hl
|
|
4300
|
+
let n2 = Ul(Hl, e6);
|
|
4294
4301
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4295
4302
|
};
|
|
4296
|
-
var
|
|
4303
|
+
var Gl = (e6, t2 = []) => {
|
|
4297
4304
|
let n2 = e6?.media;
|
|
4298
4305
|
if (!n2 || n2.displayed === false) return;
|
|
4299
|
-
let r2 =
|
|
4306
|
+
let r2 = Il(e6);
|
|
4300
4307
|
if (r2) return { kind: `image`, image: r2 };
|
|
4301
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4308
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Bl(n2.wixMedia.videoV2) : void 0;
|
|
4302
4309
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4303
4310
|
let o2 = n2.embedMedia?.video?.url;
|
|
4304
4311
|
if (o2) {
|
|
4305
4312
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4306
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4313
|
+
return { kind: `embed`, videoUrl: o2, ...Wl(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4307
4314
|
}
|
|
4308
4315
|
};
|
|
4309
|
-
var
|
|
4310
|
-
let t2 =
|
|
4316
|
+
var Kl = (e6) => {
|
|
4317
|
+
let t2 = Il(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4311
4318
|
if (t2 || !n2) return t2;
|
|
4312
|
-
let r2 =
|
|
4319
|
+
let r2 = Bl(n2), i2 = Fl(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4313
4320
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4314
4321
|
};
|
|
4315
|
-
var
|
|
4316
|
-
var
|
|
4317
|
-
var
|
|
4318
|
-
var
|
|
4322
|
+
var ql = `2026-05-12T12:00:00.000Z`;
|
|
4323
|
+
var Jl = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4324
|
+
var Yl = (e6) => `https://static.wixstatic.com/media/${e6}/v1/fit/w_1200,h_1200,al_c,q_85/cover.jpg`;
|
|
4325
|
+
var Xl = (e6) => {
|
|
4319
4326
|
if (!e6) return;
|
|
4320
4327
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4321
4328
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4322
4329
|
};
|
|
4323
|
-
var
|
|
4324
|
-
var
|
|
4325
|
-
var Q = (e6) => ({ text: e6, html: `<p>${
|
|
4330
|
+
var Zl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4331
|
+
var Ql = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4332
|
+
var Q = (e6) => ({ text: e6, html: `<p>${Ql(e6)}</p>`, linkList: [] });
|
|
4326
4333
|
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4327
|
-
var
|
|
4334
|
+
var $l = (e6) => {
|
|
4328
4335
|
let { metrics: t2 } = e6;
|
|
4329
4336
|
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4330
4337
|
};
|
|
4331
|
-
var
|
|
4332
|
-
var
|
|
4338
|
+
var eu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4339
|
+
var tu = (e6, t2, n2, r2) => {
|
|
4333
4340
|
let i2 = e6.categoryIds?.map((e7) => t2[e7]).find(Boolean);
|
|
4334
4341
|
return Q(i2 ?? (n2 ? r2.canvas.category() : ``));
|
|
4335
4342
|
};
|
|
4336
|
-
var
|
|
4337
|
-
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 =
|
|
4338
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage:
|
|
4339
|
-
};
|
|
4340
|
-
var nu = 3;
|
|
4341
|
-
var ru = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4342
|
-
var iu = (e6, t2) => {
|
|
4343
|
-
let { uri: n2, width: r2, height: i2 } = ru[e6 % ru.length];
|
|
4344
|
-
return { uri: n2, url: Jl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4343
|
+
var nu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4344
|
+
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = $l(e6);
|
|
4345
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Kl(e6), itemCoverMedia: Gl(e6, s2[l2 ?? ``] ?? []), itemLink: or(e6, r2), itemPublishedDate: Q(Tl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Xl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Zl(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: Ol(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: eu(f2.views, $.views, o2, t2.viewCount), commentCount: eu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: tu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4345
4346
|
};
|
|
4347
|
+
var ru = 3;
|
|
4348
|
+
var iu = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4346
4349
|
var au = (e6, t2) => {
|
|
4347
|
-
let { uri: n2 } =
|
|
4348
|
-
return { uri: n2, url:
|
|
4350
|
+
let { uri: n2, width: r2, height: i2 } = iu[e6 % iu.length];
|
|
4351
|
+
return { uri: n2, url: Yl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4352
|
+
};
|
|
4353
|
+
var ou = (e6, t2) => {
|
|
4354
|
+
let { uri: n2 } = iu[(e6 + 1) % iu.length];
|
|
4355
|
+
return { uri: n2, url: Yl(n2), name: n2, width: 100, height: 100, alt: t2 };
|
|
4349
4356
|
};
|
|
4350
|
-
var
|
|
4351
|
-
let o2 = e6.canvas.postTitle(), s2 =
|
|
4352
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink:
|
|
4357
|
+
var su = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: ru }, (i2, a2) => {
|
|
4358
|
+
let o2 = e6.canvas.postTitle(), s2 = au(a2, e6.canvas.coverAlt());
|
|
4359
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Jl(n2), itemPublishedDate: Q(Tl(new Date(r2), t2, r2)), publishedDateValue: ql, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: ou(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4353
4360
|
});
|
|
4354
|
-
var
|
|
4355
|
-
function
|
|
4356
|
-
let e6 = o(
|
|
4361
|
+
var cu = n(void 0);
|
|
4362
|
+
function lu() {
|
|
4363
|
+
let e6 = o(cu);
|
|
4357
4364
|
if (!e6) throw Error(`useRelatedPostsContext must be used within a RelatedPostsProvider`);
|
|
4358
4365
|
return e6;
|
|
4359
4366
|
}
|
|
4360
|
-
var
|
|
4361
|
-
var
|
|
4362
|
-
var
|
|
4363
|
-
var
|
|
4364
|
-
var
|
|
4367
|
+
var uu = 3;
|
|
4368
|
+
var du = (e6) => typeof e6 == `number` && Number.isFinite(e6) && e6 >= 1 ? Math.min(Math.floor(e6), 12) : uu;
|
|
4369
|
+
var fu = 2e3;
|
|
4370
|
+
var pu = /* @__PURE__ */ new WeakMap();
|
|
4371
|
+
var mu = (e6, t2, n2) => {
|
|
4365
4372
|
if (!e6) return n2();
|
|
4366
|
-
let r2 =
|
|
4367
|
-
r2 || (r2 = /* @__PURE__ */ new Map(),
|
|
4373
|
+
let r2 = pu.get(e6);
|
|
4374
|
+
r2 || (r2 = /* @__PURE__ */ new Map(), pu.set(e6, r2));
|
|
4368
4375
|
let i2 = r2.get(t2);
|
|
4369
4376
|
if (i2) return i2;
|
|
4370
4377
|
let a2 = n2();
|
|
4371
4378
|
return r2.set(t2, a2), a2;
|
|
4372
4379
|
};
|
|
4373
|
-
var
|
|
4374
|
-
var
|
|
4375
|
-
var
|
|
4376
|
-
var
|
|
4377
|
-
var
|
|
4380
|
+
var hu = { relatedPosts: [], emptyState: null, isLoadingRelatedPosts: true, hasError: false, hasRelatedPosts: false };
|
|
4381
|
+
var gu = { ...hu, isLoadingRelatedPosts: false, hasError: true };
|
|
4382
|
+
var _u = (e6) => ({ strip: e6, hasError: false });
|
|
4383
|
+
var vu = () => ({ strip: { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {}, fetchedAt: Date.now() }, hasError: true });
|
|
4384
|
+
var yu = (e6) => {
|
|
4378
4385
|
throw e6;
|
|
4379
4386
|
};
|
|
4380
|
-
var
|
|
4381
|
-
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } =
|
|
4382
|
-
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) =>
|
|
4387
|
+
var bu = ({ children: e6, stripLoadPromise: t2, slug: n2, language: r2 }) => {
|
|
4388
|
+
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } = Bn(t2), f2 = Wn(l2), m2 = cl(), h2 = sr(n2), { t: g2 } = wo(), _2 = _r(), v2 = c(() => rs(g2, _2), [g2, _2]), y2 = c(() => {
|
|
4389
|
+
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) => nu(e8, v2, _2, h2, a2, o2, m2, s2, f2)), t3 = e7.length === 0 && m2 ? su(v2, _2, h2, f2) : e7;
|
|
4383
4390
|
return { relatedPosts: t3, emptyState: i2.length === 0 && !d2 ? v2.noRelatedPostsEmptyState() : null, isLoadingRelatedPosts: false, hasError: d2, hasRelatedPosts: t3.length > 0 };
|
|
4384
4391
|
}, [i2, u2, a2, o2, s2, v2, _2, r2, h2, m2, f2, d2]);
|
|
4385
|
-
return
|
|
4392
|
+
return fr(ur.relatedPostsProvider, d2 ? `error` : i2.length > 0 ? `data` : `empty`), p(cu.Provider, { value: y2, children: e6 });
|
|
4386
4393
|
};
|
|
4387
|
-
function
|
|
4388
|
-
let r2 =
|
|
4394
|
+
function xu({ children: e6, postsCount: n2 }) {
|
|
4395
|
+
let r2 = lr(), i2 = hr(), a2 = Kn(), o2 = du(n2), s2 = cl(), l2 = _l(), u2 = yl(), d2 = yr(), f2 = c(() => ul(Rn), []), { i18n: h2, locale: g2 } = qo(ts), _2 = Jn(() => {
|
|
4389
4396
|
let e7 = `blog-builder:related:${JSON.stringify({ slug: r2 ?? ``, language: i2 ?? ``, limit: o2, ...u2 && { postId: u2 } })}`;
|
|
4390
|
-
return { slug: r2, language: i2, stripLoadPromise:
|
|
4391
|
-
let e8 =
|
|
4392
|
-
return
|
|
4393
|
-
} })),
|
|
4397
|
+
return { slug: r2, language: i2, stripLoadPromise: Hn(mu(l2, e7, () => Po({ key: e7, warmupData: d2, fetchData: () => {
|
|
4398
|
+
let e8 = tl({ slug: r2, language: i2, limit: o2, propagateErrors: true, sourcePromise: l2 }).then((e9) => s2 ? rl(e9, { limit: o2, language: i2 }) : e9);
|
|
4399
|
+
return hl(pl(f2, `related-posts-read`, { feature: ll.relatedPosts, tags: { limit: o2 } }, a2 ? Bc(e8, fu, `related-posts`) : e8));
|
|
4400
|
+
} })), _u, a2 ? yu : vu) };
|
|
4394
4401
|
}, [r2, i2, a2, s2, l2, d2, o2, f2, u2]);
|
|
4395
|
-
return p(
|
|
4402
|
+
return p(To, { i18n: h2, children: m(t, { fallback: p(cu.Provider, { value: hu, children: e6 }), children: [p(Ko, { i18n: h2, locale: g2 }), p(ml, { fallback: p(cu.Provider, { value: gu, children: e6 }), feature: ll.relatedPosts, monitoringClient: f2, rethrow: a2, children: p(bu, { stripLoadPromise: _2.stripLoadPromise, slug: _2.slug, language: _2.language, children: e6 }, `${_2.language ?? ``}|${_2.slug ?? ``}`) })] }) });
|
|
4396
4403
|
}
|
|
4397
|
-
var
|
|
4404
|
+
var Su = jn(`7d10ae29-fb0a-4361-8bc0-c3b8a3b96e34`);
|
|
4398
4405
|
export {
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4406
|
+
xu as RelatedPostsProvider,
|
|
4407
|
+
xu as default,
|
|
4408
|
+
Su as injectAccessTokenGetter,
|
|
4409
|
+
lu as useRelatedPostsContext
|
|
4403
4410
|
};
|
|
4404
4411
|
//# sourceMappingURL=context-related-posts.mjs.map
|