@wix/himalaya-cli 0.1882.0 → 0.1884.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{c0c9168ac683637ad53e3365739c050ca372b6fd84b920b90ee3050a0cafca62.bin → 5634539b1de6317bfac96d63062a0cf58803504fbb50489c6758e427a245af27.bin} +1 -1
- package/dist/browser-plane/sw.js +10 -10
- package/dist/cli.mjs +316 -87
- package/dist/preview-assets.generated.bin +0 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -43475,6 +43475,7 @@ function shouldRevealError(args) {
|
|
|
43475
43475
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
43476
43476
|
var init_validation = __esm({
|
|
43477
43477
|
"../../core/ts/src/validation.ts"() {
|
|
43478
|
+
"use strict";
|
|
43478
43479
|
init_define_HHP_CATALOG();
|
|
43479
43480
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
43480
43481
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -44279,8 +44280,8 @@ function instancePayload(instance) {
|
|
|
44279
44280
|
const part7 = instance.split(".")[1];
|
|
44280
44281
|
if (!part7) return null;
|
|
44281
44282
|
try {
|
|
44282
|
-
const
|
|
44283
|
-
const parsed = JSON.parse(decodeURIComponent(Array.from(atob(
|
|
44283
|
+
const b643 = part7.replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(part7.length / 4) * 4, "=");
|
|
44284
|
+
const parsed = JSON.parse(decodeURIComponent(Array.from(atob(b643), (c2) => `%${c2.charCodeAt(0).toString(16).padStart(2, "0")}`).join("")));
|
|
44284
44285
|
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
|
|
44285
44286
|
} catch {
|
|
44286
44287
|
return null;
|
|
@@ -50860,6 +50861,19 @@ var init_runtimeCopy_generated = __esm({
|
|
|
50860
50861
|
"../../core/web-renderer/src/runtimeCopy.generated.ts"() {
|
|
50861
50862
|
init_define_HHP_CATALOG();
|
|
50862
50863
|
RUNTIME_COPY_DEFAULTS = {
|
|
50864
|
+
"runtime.a11y.checked": "checked",
|
|
50865
|
+
"runtime.a11y.collapsed": "collapsed",
|
|
50866
|
+
"runtime.a11y.error": "Error",
|
|
50867
|
+
"runtime.a11y.expanded": "expanded",
|
|
50868
|
+
"runtime.a11y.mixed": "mixed",
|
|
50869
|
+
"runtime.a11y.more": "{count} more",
|
|
50870
|
+
"runtime.a11y.page": "page {index} of {count}",
|
|
50871
|
+
"runtime.a11y.people": "{count, plural, one {# person} other {# people}}",
|
|
50872
|
+
"runtime.a11y.position": "{index} of {count}",
|
|
50873
|
+
"runtime.a11y.rating": "{value} of {max}",
|
|
50874
|
+
"runtime.a11y.step": "step {index} of {count}",
|
|
50875
|
+
"runtime.a11y.stepLabeled": "step {index} of {count}, {label}",
|
|
50876
|
+
"runtime.a11y.unchecked": "not checked",
|
|
50863
50877
|
"runtime.auth.signOutFailed": "Couldn\u2019t sign out. Check your connection and try again.",
|
|
50864
50878
|
"runtime.auth.signOutPurgeFailed": "Signed out, but this device\u2019s data couldn\u2019t be cleared. Try again.",
|
|
50865
50879
|
"runtime.boot.failed": "The app couldn't start. Please try again.",
|
|
@@ -50995,6 +51009,7 @@ var init_runtimeCopy_generated = __esm({
|
|
|
50995
51009
|
"runtime.component.webview.loading": "Loading",
|
|
50996
51010
|
"runtime.component.webview.openInTab": "Open in a new tab",
|
|
50997
51011
|
"runtime.component.wheel.label": "Wheel selection",
|
|
51012
|
+
"runtime.dialog.biometricReason": "Confirm your identity",
|
|
50998
51013
|
"runtime.dialog.cancel": "Cancel",
|
|
50999
51014
|
"runtime.dialog.confirm": "Confirm",
|
|
51000
51015
|
"runtime.dialog.delete": "Delete",
|
|
@@ -51004,22 +51019,31 @@ var init_runtimeCopy_generated = __esm({
|
|
|
51004
51019
|
"runtime.dialog.discard.title": "Discard changes?",
|
|
51005
51020
|
"runtime.dialog.ok": "OK",
|
|
51006
51021
|
"runtime.lightbox.close": "Close",
|
|
51022
|
+
"runtime.lightbox.export.denied": "Photo access was not granted",
|
|
51007
51023
|
"runtime.lightbox.export.failed": "Couldn't save this image",
|
|
51024
|
+
"runtime.lightbox.export.macFailed": "Unable to export this image",
|
|
51025
|
+
"runtime.lightbox.export.openSettings": "Open Settings",
|
|
51008
51026
|
"runtime.lightbox.export.permission": "Allow photo access in Settings to save images",
|
|
51027
|
+
"runtime.lightbox.export.permissionTitle": "Photo access",
|
|
51009
51028
|
"runtime.lightbox.export.saved": "Saved to your photos",
|
|
51029
|
+
"runtime.lightbox.export.shareFailed": "Couldn't share image",
|
|
51010
51030
|
"runtime.lightbox.more": "More",
|
|
51011
51031
|
"runtime.lightbox.next": "Next image",
|
|
51012
51032
|
"runtime.lightbox.position": "Image {index} of {count}",
|
|
51033
|
+
"runtime.lightbox.previewFailed": "Unable to open image preview",
|
|
51013
51034
|
"runtime.lightbox.previous": "Previous image",
|
|
51014
51035
|
"runtime.lightbox.save": "Save",
|
|
51015
51036
|
"runtime.lightbox.share": "Share",
|
|
51016
51037
|
"runtime.lightbox.viewer": "Image viewer",
|
|
51017
51038
|
"runtime.nav.actionUnavailable": "Action unavailable. Please try again.",
|
|
51039
|
+
"runtime.nav.apps": "Apps",
|
|
51018
51040
|
"runtime.nav.back": "Back",
|
|
51041
|
+
"runtime.nav.backToApps": "Back to apps",
|
|
51019
51042
|
"runtime.nav.cancel": "Cancel",
|
|
51020
51043
|
"runtime.nav.cancelSearch": "Cancel search",
|
|
51021
51044
|
"runtime.nav.clearSearch": "Clear search",
|
|
51022
51045
|
"runtime.nav.close": "Close",
|
|
51046
|
+
"runtime.nav.closeNavigation": "Close navigation",
|
|
51023
51047
|
"runtime.nav.disabledSuffix": "{name}, disabled",
|
|
51024
51048
|
"runtime.nav.dismiss": "Dismiss",
|
|
51025
51049
|
"runtime.nav.dismissMenu": "Dismiss menu",
|
|
@@ -51027,6 +51051,7 @@ var init_runtimeCopy_generated = __esm({
|
|
|
51027
51051
|
"runtime.nav.done": "Done",
|
|
51028
51052
|
"runtime.nav.drawer": "Navigation",
|
|
51029
51053
|
"runtime.nav.edit": "Edit",
|
|
51054
|
+
"runtime.nav.fillWindow": "Fill window",
|
|
51030
51055
|
"runtime.nav.hostedAppFailed": "Couldn't open {title}.",
|
|
51031
51056
|
"runtime.nav.jumpToLatest": "Jump to latest",
|
|
51032
51057
|
"runtime.nav.menu": "Menu",
|
|
@@ -51045,7 +51070,9 @@ var init_runtimeCopy_generated = __esm({
|
|
|
51045
51070
|
"runtime.nav.searchTryAgain": "Try Again",
|
|
51046
51071
|
"runtime.nav.selectionCount": "{count} selected",
|
|
51047
51072
|
"runtime.nav.showActions": "Show actions",
|
|
51073
|
+
"runtime.nav.showAsPhone": "Show as phone",
|
|
51048
51074
|
"runtime.nav.stillSaving": "Still saving\u2026",
|
|
51075
|
+
"runtime.nav.switchApp": "Switch app",
|
|
51049
51076
|
"runtime.nav.thisApp": "this app",
|
|
51050
51077
|
"runtime.nav.toggleSidebar": "Toggle sidebar",
|
|
51051
51078
|
"runtime.nav.voiceSearch": "Voice search",
|
|
@@ -51083,6 +51110,7 @@ var init_runtimeCopy_generated = __esm({
|
|
|
51083
51110
|
"runtime.webview.offline.title": "You're offline",
|
|
51084
51111
|
"runtime.webview.pageError": "This page couldn't be loaded",
|
|
51085
51112
|
"runtime.worker.actionFailed": "That didn't work. Please try again.",
|
|
51113
|
+
"runtime.worker.bundleUnavailable": "This screen couldn\u2019t finish loading. Check your connection and try again.",
|
|
51086
51114
|
"runtime.worker.failed": "Something went wrong while loading this screen."
|
|
51087
51115
|
};
|
|
51088
51116
|
RUNTIME_RENDERER_COPY = {
|
|
@@ -51115,6 +51143,7 @@ var init_runtimeCopy_generated = __esm({
|
|
|
51115
51143
|
"runtime.component.form.loading": "Loading form\u2026",
|
|
51116
51144
|
"runtime.component.form.refreshing": "Refreshing form\u2026",
|
|
51117
51145
|
"runtime.component.form.unavailable": "Form unavailable. Please try again.",
|
|
51146
|
+
"runtime.component.image.label": "Image",
|
|
51118
51147
|
"runtime.component.list.pullToRefresh": "Pull to refresh",
|
|
51119
51148
|
"runtime.component.list.refreshing": "Refreshing",
|
|
51120
51149
|
"runtime.component.media.audio": "Audio",
|
|
@@ -94917,7 +94946,7 @@ var init_pdf_worker_min = __esm({
|
|
|
94917
94946
|
return e3;
|
|
94918
94947
|
} });
|
|
94919
94948
|
}, 3110(e2, t2, n2) {
|
|
94920
|
-
var a3 = n2(6518), r3 = n2(7751), s5 = n2(9565), i2 = n2(9504), o2 = n2(9039), l3 = n2(4376), f2 = n2(4901), c2 = n2(34), h2 = n2(2360), u2 = n2(5810), m2 = n2(757), p2 = n2(2195), d2 = n2(1240), g2 = n2(9617).includes, b3 = n2(9297), w2 = n2(655), j2 = n2(8235), k3 = n2(3392), y2 = n2(4495), q4 = n2(7819), v2 = String, S3 = TypeError, x2 = r3("JSON", "stringify"), C2 = r3("BigInt"), T2 = i2("".valueOf), O2 = i2(true.valueOf), R2 = C2 && i2(C2.prototype.valueOf), D2 = i2(/./.exec), H2 = i2("".charAt), M2 = i2("".charCodeAt), N6 = i2("".replace), _2 = i2("".slice), E2 = i2([].push), z8 = i2([].pop), L2 = i2(1.1.toString), U2 = /[\uD800-\uDFFF]/g, W2 = /^[\uD800-\uDBFF]$/, X2 = /^[\uDC00-\uDFFF]$/, K3 = /^\d+$/, G3 = k3(), V2 = k3(), $2 = k3(), Y2 = G3.length,
|
|
94949
|
+
var a3 = n2(6518), r3 = n2(7751), s5 = n2(9565), i2 = n2(9504), o2 = n2(9039), l3 = n2(4376), f2 = n2(4901), c2 = n2(34), h2 = n2(2360), u2 = n2(5810), m2 = n2(757), p2 = n2(2195), d2 = n2(1240), g2 = n2(9617).includes, b3 = n2(9297), w2 = n2(655), j2 = n2(8235), k3 = n2(3392), y2 = n2(4495), q4 = n2(7819), v2 = String, S3 = TypeError, x2 = r3("JSON", "stringify"), C2 = r3("BigInt"), T2 = i2("".valueOf), O2 = i2(true.valueOf), R2 = C2 && i2(C2.prototype.valueOf), D2 = i2(/./.exec), H2 = i2("".charAt), M2 = i2("".charCodeAt), N6 = i2("".replace), _2 = i2("".slice), E2 = i2([].push), z8 = i2([].pop), L2 = i2(1.1.toString), U2 = /[\uD800-\uDFFF]/g, W2 = /^[\uD800-\uDBFF]$/, X2 = /^[\uDC00-\uDFFF]$/, K3 = /^\d+$/, G3 = k3(), V2 = k3(), $2 = k3(), Y2 = G3.length, J3 = V2.length, Q2 = !y2 || o2(function() {
|
|
94921
94950
|
var e3 = r3("Symbol")("stringify detection");
|
|
94922
94951
|
return "[null]" !== x2([e3]) || "{}" !== x2({ a: e3 }) || "{}" !== x2(Object(e3));
|
|
94923
94952
|
}), Z2 = o2(function() {
|
|
@@ -95018,7 +95047,7 @@ var init_pdf_worker_min = __esm({
|
|
|
95018
95047
|
var O3 = H2(y3, T3);
|
|
95019
95048
|
if ('"' === O3) {
|
|
95020
95049
|
var R3 = j2(y3, ++T3).end - 1, M3 = _2(y3, T3, R3);
|
|
95021
|
-
_2(M3, 0, Y2) === G3 ? x3 += c3[_2(M3, Y2)] : _2(M3, 0,
|
|
95050
|
+
_2(M3, 0, Y2) === G3 ? x3 += c3[_2(M3, Y2)] : _2(M3, 0, J3) === V2 ? x3 += '"' + _2(M3, J3) + '"' : x3 += '"' + M3 + '"';
|
|
95022
95051
|
T3 = R3;
|
|
95023
95052
|
} else x3 += O3;
|
|
95024
95053
|
}
|
|
@@ -144224,7 +144253,7 @@ var init_renderNode = __esm({
|
|
|
144224
144253
|
const boundAlt = useResolvedScalar(contentDescription, ctx);
|
|
144225
144254
|
const previewTile = !!ctx.imagePreview && !ctx.imagePreviewBlocked && previewEligible({ body: { type: "Image", props: props2 } });
|
|
144226
144255
|
const ownAlt = asFinalTextL10n(boundAlt, ctx);
|
|
144227
|
-
const altText = previewTile && !String(ownAlt ?? "").trim() ? "
|
|
144256
|
+
const altText = previewTile && !String(ownAlt ?? "").trim() ? rcopy(ctx, "runtime.component.image.label") : ownAlt;
|
|
144228
144257
|
const fadeIn = motionDefaultsAnimate(ctx);
|
|
144229
144258
|
const [shownSrc, setShownSrc] = React22.useState(null);
|
|
144230
144259
|
const imgRef = React22.useRef(null);
|
|
@@ -149850,20 +149879,20 @@ async function pngFontFaceCss(tokens2, opts = {}) {
|
|
|
149850
149879
|
if (hit !== void 0) return hit;
|
|
149851
149880
|
const bytes2 = await faceBytes(face, catalog4, opts);
|
|
149852
149881
|
if (!bytes2) return null;
|
|
149853
|
-
const
|
|
149854
|
-
cache4?.set(face.sha256,
|
|
149855
|
-
return
|
|
149882
|
+
const b643 = bytes2.toString("base64");
|
|
149883
|
+
cache4?.set(face.sha256, b643);
|
|
149884
|
+
return b643;
|
|
149856
149885
|
})
|
|
149857
149886
|
);
|
|
149858
149887
|
const rules = [];
|
|
149859
149888
|
wanted.forEach(({ family, face, variable }, i2) => {
|
|
149860
|
-
const
|
|
149861
|
-
if (
|
|
149889
|
+
const b643 = data[i2];
|
|
149890
|
+
if (b643 == null) return;
|
|
149862
149891
|
const [mime, format] = FORMATS[extname(face.file).toLowerCase()] ?? ["font/ttf", "truetype"];
|
|
149863
149892
|
const wght = variable?.axes?.["wght"];
|
|
149864
149893
|
const weight2 = wght ? `${wght.min} ${wght.max}` : String(face.weight);
|
|
149865
149894
|
rules.push(
|
|
149866
|
-
`@font-face{font-family:${cssString(family)};font-weight:${weight2};font-style:${face.style ?? "normal"};font-display:block;src:url(data:${mime};base64,${
|
|
149895
|
+
`@font-face{font-family:${cssString(family)};font-weight:${weight2};font-style:${face.style ?? "normal"};font-display:block;src:url(data:${mime};base64,${b643}) format("${format}")}`
|
|
149867
149896
|
);
|
|
149868
149897
|
});
|
|
149869
149898
|
return rules.join("");
|
|
@@ -152376,7 +152405,7 @@ async function handleWebWix(req, res, state) {
|
|
|
152376
152405
|
const session = webWixSession(req, res, state);
|
|
152377
152406
|
const auth = resolveWebWixAuth(state.app);
|
|
152378
152407
|
const path2 = new URL(req.url ?? "", "http://localhost").pathname;
|
|
152379
|
-
const
|
|
152408
|
+
const readJson17 = async () => {
|
|
152380
152409
|
const chunks = [];
|
|
152381
152410
|
for await (const c2 of req) chunks.push(c2);
|
|
152382
152411
|
const t2 = Buffer.concat(chunks).toString("utf8");
|
|
@@ -152393,7 +152422,7 @@ async function handleWebWix(req, res, state) {
|
|
|
152393
152422
|
res.end(JSON.stringify(obj30));
|
|
152394
152423
|
};
|
|
152395
152424
|
if (path2 === "/v1/__webwix/stream" && req.method === "POST") {
|
|
152396
|
-
const b3 = await
|
|
152425
|
+
const b3 = await readJson17();
|
|
152397
152426
|
const method = String(b3.method ?? "GET").toUpperCase();
|
|
152398
152427
|
const requestedUrl = String(b3.url ?? "");
|
|
152399
152428
|
const body = b3.body === void 0 ? void 0 : typeof b3.body === "string" ? b3.body : JSON.stringify(b3.body);
|
|
@@ -152547,7 +152576,7 @@ async function handleWebWix(req, res, state) {
|
|
|
152547
152576
|
if (oneAppMetaSiteIdOf(state.app?.meta.auth) && !resolveWixClientId(state.app)) {
|
|
152548
152577
|
return reply(200, { ok: false, code: "unavailable", error: "member_login_unavailable" });
|
|
152549
152578
|
}
|
|
152550
|
-
const b3 = await
|
|
152579
|
+
const b3 = await readJson17();
|
|
152551
152580
|
try {
|
|
152552
152581
|
const { memberToken, visitorToken } = await memberDirectLogin(
|
|
152553
152582
|
auth.clientId,
|
|
@@ -152640,7 +152669,7 @@ async function handleWebWix(req, res, state) {
|
|
|
152640
152669
|
res.setHeader("cache-control", "no-store");
|
|
152641
152670
|
const account2 = session.account;
|
|
152642
152671
|
if (!account2) return reply(401, { error: "webwix_account_signed_out" });
|
|
152643
|
-
const metaSiteId = String((await
|
|
152672
|
+
const metaSiteId = String((await readJson17()).metaSiteId ?? "").trim();
|
|
152644
152673
|
if (!isSafeMsid(metaSiteId)) return reply(400, { error: "webwix_account_bad_site_id" });
|
|
152645
152674
|
if (sealedAccountRoute) return sealedRefusal(MEMBER_SESSION_URL, "POST");
|
|
152646
152675
|
try {
|
|
@@ -152661,7 +152690,7 @@ async function handleWebWix(req, res, state) {
|
|
|
152661
152690
|
if (!accountApp) return reply(404, { error: "webwix_account_unsupported" });
|
|
152662
152691
|
if (req.method !== "POST") return reply(405, { error: "method_not_allowed" });
|
|
152663
152692
|
res.setHeader("cache-control", "no-store");
|
|
152664
|
-
const shortId = String((await
|
|
152693
|
+
const shortId = String((await readJson17()).shortId ?? "").trim();
|
|
152665
152694
|
const start2 = inviteShortLinkUrl(shortId);
|
|
152666
152695
|
if (!start2) return reply(400, { error: "webwix_short_link_bad_id" });
|
|
152667
152696
|
if (sealedAccountRoute) return sealedRefusal(start2, "GET");
|
|
@@ -152670,7 +152699,7 @@ async function handleWebWix(req, res, state) {
|
|
|
152670
152699
|
return url ? reply(200, { url }) : reply(404, { error: "webwix_short_link_unresolved" });
|
|
152671
152700
|
}
|
|
152672
152701
|
if (path2 === "/v1/__webwix/call" && req.method === "POST") {
|
|
152673
|
-
const b3 = await
|
|
152702
|
+
const b3 = await readJson17();
|
|
152674
152703
|
const ownerRung = b3.ownerMsid !== void 0 || b3.checkOwnerSession === true;
|
|
152675
152704
|
const accountRung = !ownerRung && accountApp && !!session.account;
|
|
152676
152705
|
const msid = String(b3.ownerMsid ?? "");
|
|
@@ -152868,7 +152897,7 @@ async function handleWebWix(req, res, state) {
|
|
|
152868
152897
|
if (oneAppMetaSiteIdOf(state.app?.meta.auth) && !resolveWixClientId(state.app)) {
|
|
152869
152898
|
return reply(200, { ok: false, code: "unavailable", error: "member_login_unavailable" });
|
|
152870
152899
|
}
|
|
152871
|
-
const b3 = await
|
|
152900
|
+
const b3 = await readJson17();
|
|
152872
152901
|
try {
|
|
152873
152902
|
const { memberToken, visitorToken } = await memberDirectRegister(
|
|
152874
152903
|
auth.clientId,
|
|
@@ -183468,8 +183497,8 @@ var init_milestones = __esm({
|
|
|
183468
183497
|
});
|
|
183469
183498
|
|
|
183470
183499
|
// ../../core/serve-storage/src/base64.ts
|
|
183471
|
-
function fromBase64(
|
|
183472
|
-
const bin = atob(
|
|
183500
|
+
function fromBase64(b643) {
|
|
183501
|
+
const bin = atob(b643);
|
|
183473
183502
|
const out2 = new Uint8Array(bin.length);
|
|
183474
183503
|
for (let i2 = 0; i2 < bin.length; i2++) out2[i2] = bin.charCodeAt(i2) & 255;
|
|
183475
183504
|
return out2;
|
|
@@ -195302,10 +195331,10 @@ async function runShotsPass(opts) {
|
|
|
195302
195331
|
const files = {};
|
|
195303
195332
|
const states = {};
|
|
195304
195333
|
for (let i2 = 0; i2 < shots.length; i2++) {
|
|
195305
|
-
const
|
|
195306
|
-
if (!
|
|
195334
|
+
const b643 = pngs[i2];
|
|
195335
|
+
if (!b643) continue;
|
|
195307
195336
|
const file2 = `${opts.outDir}/${shots[i2].screenId}.png`;
|
|
195308
|
-
const own6 = opts.deps.writePng(file2,
|
|
195337
|
+
const own6 = opts.deps.writePng(file2, b643, shots[i2].screenId);
|
|
195309
195338
|
if (own6 === null) {
|
|
195310
195339
|
refused2.push(shots[i2].screenId);
|
|
195311
195340
|
continue;
|
|
@@ -215763,9 +215792,9 @@ var init_local = __esm({
|
|
|
215763
215792
|
return lease(account2, this.privateKey(), this.now());
|
|
215764
215793
|
}
|
|
215765
215794
|
privateKey() {
|
|
215766
|
-
const
|
|
215767
|
-
if (
|
|
215768
|
-
return Buffer.from(
|
|
215795
|
+
const b643 = this.env.ASC_PRIVATE_KEY_B64?.trim();
|
|
215796
|
+
if (b643)
|
|
215797
|
+
return Buffer.from(b643, "base64").toString("utf8");
|
|
215769
215798
|
const inline = this.env.ASC_PRIVATE_KEY;
|
|
215770
215799
|
if (inline?.trim())
|
|
215771
215800
|
return inline.replace(/\\n/g, "\n");
|
|
@@ -258165,7 +258194,7 @@ async function renderCommand(ctx) {
|
|
|
258165
258194
|
pngFile = explicitPng ? writePngFile(explicitPng, r3.pngBase64) : attestationPngFile;
|
|
258166
258195
|
}
|
|
258167
258196
|
const beside = (suffix) => pngFile ? pngFile.replace(/\.png$/i, "") + suffix + ".png" : void 0;
|
|
258168
|
-
const frameFiles = r3.entranceFramesBase64 && pngFile ? r3.entranceFramesBase64.map((
|
|
258197
|
+
const frameFiles = r3.entranceFramesBase64 && pngFile ? r3.entranceFramesBase64.map((b643, i2) => writePngFile(beside(`-enter-${i2}`), b643)) : void 0;
|
|
258169
258198
|
const pressedFile = r3.pressedBase64 && pngFile ? writePngFile(beside("-pressed"), r3.pressedBase64) : void 0;
|
|
258170
258199
|
if (renderWidth !== void 0 && r3.renderable) {
|
|
258171
258200
|
recordRenderWidth(dir, {
|
|
@@ -259585,11 +259614,11 @@ function planFromPayload(payload, base2, selectors) {
|
|
|
259585
259614
|
patch.bundles = {};
|
|
259586
259615
|
for (const name of wantBundles) {
|
|
259587
259616
|
const sha7 = local.bundles?.[name]?.sha256;
|
|
259588
|
-
const
|
|
259589
|
-
if (!sha7 || !
|
|
259617
|
+
const b643 = sha7 ? payload.bundles?.[sha7] : void 0;
|
|
259618
|
+
if (!sha7 || !b643) {
|
|
259590
259619
|
return { ok: false, error: { error: "selector_matched_nothing", selector: `bundle:${name}`, message: `bundle "${name}" has no built bytes in this release \u2014 run \`himi build\` first.`, bundles: localBundles } };
|
|
259591
259620
|
}
|
|
259592
|
-
patch.bundles[sha7] =
|
|
259621
|
+
patch.bundles[sha7] = b643;
|
|
259593
259622
|
touched.push(`bundle:${name}`);
|
|
259594
259623
|
}
|
|
259595
259624
|
}
|
|
@@ -260628,6 +260657,164 @@ var init_member_exchange = __esm({
|
|
|
260628
260657
|
}
|
|
260629
260658
|
});
|
|
260630
260659
|
|
|
260660
|
+
// ../../core/serve-runtime/src/member-photo.ts
|
|
260661
|
+
function sniffImageMime(bytes2) {
|
|
260662
|
+
const at2 = (i2) => bytes2[i2];
|
|
260663
|
+
if (bytes2.length >= 8 && at2(0) === 137 && at2(1) === 80 && at2(2) === 78 && at2(3) === 71 && at2(4) === 13 && at2(5) === 10 && at2(6) === 26 && at2(7) === 10) return "image/png";
|
|
260664
|
+
if (bytes2.length >= 3 && at2(0) === 255 && at2(1) === 216 && at2(2) === 255) return "image/jpeg";
|
|
260665
|
+
if (bytes2.length >= 12 && at2(0) === 82 && at2(1) === 73 && at2(2) === 70 && at2(3) === 70 && at2(8) === 87 && at2(9) === 69 && at2(10) === 66 && at2(11) === 80) return "image/webp";
|
|
260666
|
+
return null;
|
|
260667
|
+
}
|
|
260668
|
+
async function readBodyCapped(request2, max = MEMBER_PHOTO_MAX_BYTES) {
|
|
260669
|
+
const declared = Number(request2.headers.get("content-length"));
|
|
260670
|
+
if (Number.isFinite(declared) && declared > max) {
|
|
260671
|
+
await request2.body?.cancel().catch(() => {
|
|
260672
|
+
});
|
|
260673
|
+
return null;
|
|
260674
|
+
}
|
|
260675
|
+
if (!request2.body) return new Uint8Array(0);
|
|
260676
|
+
const reader = request2.body.getReader();
|
|
260677
|
+
const chunks = [];
|
|
260678
|
+
let total = 0;
|
|
260679
|
+
for (; ; ) {
|
|
260680
|
+
const { done, value: value2 } = await reader.read();
|
|
260681
|
+
if (done) break;
|
|
260682
|
+
total += value2.byteLength;
|
|
260683
|
+
if (total > max) {
|
|
260684
|
+
await reader.cancel().catch(() => {
|
|
260685
|
+
});
|
|
260686
|
+
return null;
|
|
260687
|
+
}
|
|
260688
|
+
chunks.push(value2);
|
|
260689
|
+
}
|
|
260690
|
+
const out2 = new Uint8Array(total);
|
|
260691
|
+
let offset = 0;
|
|
260692
|
+
for (const chunk2 of chunks) {
|
|
260693
|
+
out2.set(chunk2, offset);
|
|
260694
|
+
offset += chunk2.byteLength;
|
|
260695
|
+
}
|
|
260696
|
+
return out2;
|
|
260697
|
+
}
|
|
260698
|
+
function isMediaHost(raw) {
|
|
260699
|
+
let url;
|
|
260700
|
+
try {
|
|
260701
|
+
url = new URL(raw);
|
|
260702
|
+
} catch {
|
|
260703
|
+
return false;
|
|
260704
|
+
}
|
|
260705
|
+
if (url.protocol !== "https:" || url.port !== "" || url.username || url.password) return false;
|
|
260706
|
+
const host = url.hostname.toLowerCase();
|
|
260707
|
+
return host === "wixmp.com" || host.endsWith(".wixmp.com");
|
|
260708
|
+
}
|
|
260709
|
+
function isStaticMediaUrl(raw) {
|
|
260710
|
+
if (typeof raw !== "string" || raw.length > 2048) return false;
|
|
260711
|
+
let url;
|
|
260712
|
+
try {
|
|
260713
|
+
url = new URL(raw);
|
|
260714
|
+
} catch {
|
|
260715
|
+
return false;
|
|
260716
|
+
}
|
|
260717
|
+
if (url.protocol !== "https:" || url.hostname.toLowerCase() !== "static.wixstatic.com" || url.port !== "" || url.username || url.password || url.hash) return false;
|
|
260718
|
+
const rawPath = raw.replace(/^https:\/\/[^/?#]*/i, "").split(/[?#]/, 1)[0];
|
|
260719
|
+
return rawPath === url.pathname && url.pathname.startsWith("/media/") && url.pathname.length > "/media/".length && !/[\\]|%2f|%5c|\/\.\.?(\/|$)/i.test(url.pathname);
|
|
260720
|
+
}
|
|
260721
|
+
async function lookupMemberId(memberToken, fetchImpl = fetch) {
|
|
260722
|
+
const res = await makeCall(fetchImpl)(`${MEMBERS_API}/my`, { method: "GET", headers: { Accept: "application/json", Authorization: memberToken } });
|
|
260723
|
+
if (!res) return { ok: false, code: "unreachable" };
|
|
260724
|
+
if (res.status === 401 || res.status === 403) return { ok: false, code: "member_token_refused", status: res.status };
|
|
260725
|
+
const id = (await readJson13(res)).member?.id;
|
|
260726
|
+
if (!res.ok || typeof id !== "string" || !MEMBER_ID.test(id)) return { ok: false, code: "member_lookup_failed", status: res.status };
|
|
260727
|
+
return { ok: true, memberId: id };
|
|
260728
|
+
}
|
|
260729
|
+
async function uploadMemberPhoto(input, fetchImpl = fetch) {
|
|
260730
|
+
const { memberToken, memberId, bytes: bytes2, mimeType } = input;
|
|
260731
|
+
const call = makeCall(fetchImpl);
|
|
260732
|
+
const fail16 = (code3, res) => res === null ? { ok: false, code: "unreachable" } : { ok: false, code: code3, ...res ? { status: res.status } : {} };
|
|
260733
|
+
const fileName = `member-photo.${EXTENSION[mimeType]}`;
|
|
260734
|
+
const mint = await call(MINT_URL, {
|
|
260735
|
+
method: "POST",
|
|
260736
|
+
headers: { ...J2, Authorization: memberToken },
|
|
260737
|
+
body: JSON.stringify({ mimeType, fileName, parentFolderId: MEMBER_PHOTO_FOLDER, sizeInBytes: bytes2.length, isVisitor: false })
|
|
260738
|
+
});
|
|
260739
|
+
if (!mint) return fail16("mint_failed", null);
|
|
260740
|
+
const minted = await readJson13(mint);
|
|
260741
|
+
const { uploadUrl, uploadToken } = minted;
|
|
260742
|
+
if (!mint.ok || typeof uploadUrl !== "string" || !isMediaHost(uploadUrl) || typeof uploadToken !== "string" || !UPLOAD_TOKEN.test(uploadToken)) return fail16("mint_failed", mint);
|
|
260743
|
+
const base2 = uploadUrl.replace(/\/+$/, "");
|
|
260744
|
+
const create = await call(base2, {
|
|
260745
|
+
method: "POST",
|
|
260746
|
+
headers: {
|
|
260747
|
+
"Tus-Resumable": "1.0.0",
|
|
260748
|
+
"Upload-Length": String(bytes2.length),
|
|
260749
|
+
"Content-Type": "application/offset+octet-stream",
|
|
260750
|
+
"Upload-Metadata": `filename ${b642(fileName)},acl ${b642("public")},token ${b642(uploadToken)},parent_folder_id ${b642(MEMBER_PHOTO_FOLDER)}`
|
|
260751
|
+
}
|
|
260752
|
+
});
|
|
260753
|
+
if (!create) return fail16("upload_session_failed", null);
|
|
260754
|
+
const location = create.headers.get("location");
|
|
260755
|
+
if (create.status !== 201 || !location) return fail16("upload_session_failed", create);
|
|
260756
|
+
let session;
|
|
260757
|
+
try {
|
|
260758
|
+
session = new URL(location, base2).toString();
|
|
260759
|
+
} catch {
|
|
260760
|
+
return fail16("upload_session_failed", create);
|
|
260761
|
+
}
|
|
260762
|
+
if (!isMediaHost(session)) return fail16("upload_session_failed", create);
|
|
260763
|
+
const patch = await call(session, {
|
|
260764
|
+
method: "PATCH",
|
|
260765
|
+
headers: { "Tus-Resumable": "1.0.0", "Upload-Offset": "0", "Content-Type": "application/offset+octet-stream" },
|
|
260766
|
+
body: bytes2
|
|
260767
|
+
});
|
|
260768
|
+
if (!patch) return fail16("upload_failed", null);
|
|
260769
|
+
if (patch.status !== 204 || patch.headers.get("upload-offset") !== String(bytes2.length)) return fail16("upload_failed", patch);
|
|
260770
|
+
const query = new URLSearchParams({ filename: fileName, acl: "public", token: uploadToken, parent_folder_id: MEMBER_PHOTO_FOLDER });
|
|
260771
|
+
const finish3 = await call(`${base2}/${uploadToken}?${query}`, { method: "PUT", headers: J2 });
|
|
260772
|
+
if (!finish3) return fail16("finish_failed", null);
|
|
260773
|
+
const file2 = (await readJson13(finish3)).file;
|
|
260774
|
+
if (!finish3.ok) return fail16("finish_failed", finish3);
|
|
260775
|
+
if (!isStaticMediaUrl(file2?.url)) return fail16("bad_file_url", finish3);
|
|
260776
|
+
const url = file2.url;
|
|
260777
|
+
const save = await call(`${MEMBERS_API}/${encodeURIComponent(memberId)}`, {
|
|
260778
|
+
method: "PATCH",
|
|
260779
|
+
headers: { ...J2, Authorization: memberToken },
|
|
260780
|
+
body: JSON.stringify({ member: { id: memberId, profile: { photo: { url } } } })
|
|
260781
|
+
});
|
|
260782
|
+
if (!save) return fail16("save_failed", null);
|
|
260783
|
+
if (!save.ok) return fail16("save_failed", save);
|
|
260784
|
+
return { ok: true, url };
|
|
260785
|
+
}
|
|
260786
|
+
var MEMBER_PHOTO_MAX_BYTES, MEMBER_PHOTO_FOLDER, MINT_URL, MEMBERS_API, STEP_TIMEOUT_MS2, MEMBER_ID, UPLOAD_TOKEN, EXTENSION, J2, b642, makeCall, readJson13;
|
|
260787
|
+
var init_member_photo = __esm({
|
|
260788
|
+
"../../core/serve-runtime/src/member-photo.ts"() {
|
|
260789
|
+
init_define_HHP_CATALOG();
|
|
260790
|
+
MEMBER_PHOTO_MAX_BYTES = 5 * 1024 * 1024;
|
|
260791
|
+
MEMBER_PHOTO_FOLDER = "mobile-uploads";
|
|
260792
|
+
MINT_URL = "https://www.wix.com/_serverless/mobile_pixwix/v1/tus_upload_url";
|
|
260793
|
+
MEMBERS_API = "https://www.wixapis.com/members/v1/members";
|
|
260794
|
+
STEP_TIMEOUT_MS2 = 2e4;
|
|
260795
|
+
MEMBER_ID = /^[^\u0000-\u001f\u007f]{1,128}$/;
|
|
260796
|
+
UPLOAD_TOKEN = /^[A-Za-z0-9._-]{16,4096}$/;
|
|
260797
|
+
EXTENSION = { "image/png": "png", "image/jpeg": "jpg", "image/webp": "webp" };
|
|
260798
|
+
J2 = { "Content-Type": "application/json" };
|
|
260799
|
+
b642 = (s5) => btoa(s5);
|
|
260800
|
+
makeCall = (fetchImpl) => async (url, init) => {
|
|
260801
|
+
try {
|
|
260802
|
+
return await fetchImpl(url, { ...init, redirect: "manual", credentials: "omit", signal: AbortSignal.timeout(STEP_TIMEOUT_MS2) });
|
|
260803
|
+
} catch {
|
|
260804
|
+
return null;
|
|
260805
|
+
}
|
|
260806
|
+
};
|
|
260807
|
+
readJson13 = async (res) => {
|
|
260808
|
+
try {
|
|
260809
|
+
const v2 = await res.json();
|
|
260810
|
+
return v2 && typeof v2 === "object" ? v2 : {};
|
|
260811
|
+
} catch {
|
|
260812
|
+
return {};
|
|
260813
|
+
}
|
|
260814
|
+
};
|
|
260815
|
+
}
|
|
260816
|
+
});
|
|
260817
|
+
|
|
260631
260818
|
// ../../core/serve-runtime/src/member-forward.ts
|
|
260632
260819
|
function matchMemberForward(method, raw, rules = MEMBER_FORWARD_ALLOWLIST) {
|
|
260633
260820
|
if (typeof method !== "string" || typeof raw !== "string" || raw.length === 0 || raw.length > 8192) return null;
|
|
@@ -261370,6 +261557,10 @@ function makeServeHandler(opts) {
|
|
|
261370
261557
|
const webwixFetch = opts.webwixFetch ?? fetch;
|
|
261371
261558
|
const webwixOwnerInstances = new OwnerInstanceCache(webwixFetch);
|
|
261372
261559
|
const visitorMintLimiter = new FixedWindowRateLimiter({ max: opts.visitorMintRatePerMin ?? 30, windowMs: 6e4 });
|
|
261560
|
+
const memberPhotoLimiter = new FixedWindowRateLimiter({ max: opts.memberPhotoRatePerMin ?? 5, windowMs: 6e4 });
|
|
261561
|
+
const memberPhotoCallerLimiter = new FixedWindowRateLimiter({ max: opts.memberPhotoCallerRatePerMin ?? 30, windowMs: 6e4 });
|
|
261562
|
+
const memberPhotoSlots = new QueuedConcurrencyLimiter(opts.memberPhotoMaxInFlight ?? 8, 0);
|
|
261563
|
+
const memberPhotoCallerSlots = new KeyedQueuedConcurrencyLimiter(2, 0);
|
|
261373
261564
|
const largeAssetReads = new QueuedConcurrencyLimiter(LARGE_ASSET_STORE_READS_PER_POD, LARGE_ASSET_STORE_READS_QUEUED);
|
|
261374
261565
|
const largeAssetCallerReads = new KeyedQueuedConcurrencyLimiter(LARGE_ASSET_STORE_READS_PER_CALLER, LARGE_ASSET_STORE_READS_QUEUED_PER_CALLER);
|
|
261375
261566
|
const forwardVisitors = /* @__PURE__ */ new Map();
|
|
@@ -261967,6 +262158,43 @@ ${releaseId}`;
|
|
|
261967
262158
|
if (!forwarded.ok) return json6(502, { error: forwarded.code }, noStore);
|
|
261968
262159
|
return json6(200, { status: forwarded.status, body: forwarded.body }, noStore);
|
|
261969
262160
|
}
|
|
262161
|
+
if (request2.method === "POST" && path2 === "/v1/__webwix/member-photo") {
|
|
262162
|
+
const noStore = { "cache-control": "no-store" };
|
|
262163
|
+
if (opts.webwixBridge === false) return json6(503, { error: "webwix_bridge_disabled" }, noStore);
|
|
262164
|
+
const app3 = resolveApp2(request2, url);
|
|
262165
|
+
if (!app3) return json6(400, { error: "app_required" }, noStore);
|
|
262166
|
+
const cfg = await appConfigFor(request2, url, app3);
|
|
262167
|
+
if (!cfg.ok) return cfg.response;
|
|
262168
|
+
const memberToken = request2.headers.get("x-himalaya-member-token") ?? "";
|
|
262169
|
+
if (!/^[\x21-\x7e]{1,4096}$/.test(memberToken)) return json6(400, { error: "member_token_required" }, noStore);
|
|
262170
|
+
const caller = visitorMintCaller(request2);
|
|
262171
|
+
const callerRate = memberPhotoCallerLimiter.check(caller);
|
|
262172
|
+
if (!callerRate.ok) return json6(429, { error: "member_photo_rate_limited" }, { ...noStore, "retry-after": String(callerRate.retryAfterSec) });
|
|
262173
|
+
const callerSlot = await memberPhotoCallerSlots.acquire(caller, request2.signal);
|
|
262174
|
+
if (!callerSlot) return json6(429, { error: "member_photo_busy" }, { ...noStore, "retry-after": "1" });
|
|
262175
|
+
const podSlot = await memberPhotoSlots.acquire(request2.signal);
|
|
262176
|
+
if (!podSlot) {
|
|
262177
|
+
callerSlot();
|
|
262178
|
+
return json6(503, { error: "member_photo_busy" }, { ...noStore, "retry-after": "1" });
|
|
262179
|
+
}
|
|
262180
|
+
try {
|
|
262181
|
+
const bytes2 = await readBodyCapped(request2);
|
|
262182
|
+
if (!bytes2) return json6(413, { error: "photo_too_large", maxBytes: MEMBER_PHOTO_MAX_BYTES }, noStore);
|
|
262183
|
+
if (bytes2.length === 0) return json6(400, { error: "empty_body" }, noStore);
|
|
262184
|
+
const mimeType = sniffImageMime(bytes2);
|
|
262185
|
+
if (!mimeType) return json6(415, { error: "unsupported_image_type" }, noStore);
|
|
262186
|
+
const member = await lookupMemberId(memberToken, webwixFetch);
|
|
262187
|
+
if (!member.ok) return json6(member.code === "member_token_refused" ? 401 : 502, { error: member.code }, noStore);
|
|
262188
|
+
const rate = memberPhotoLimiter.check(member.memberId);
|
|
262189
|
+
if (!rate.ok) return json6(429, { error: "member_photo_rate_limited" }, { ...noStore, "retry-after": String(rate.retryAfterSec) });
|
|
262190
|
+
const uploaded = await uploadMemberPhoto({ memberToken, memberId: member.memberId, bytes: bytes2, mimeType }, webwixFetch);
|
|
262191
|
+
if (!uploaded.ok) return json6(502, { error: uploaded.code }, noStore);
|
|
262192
|
+
return json6(200, { url: uploaded.url }, noStore);
|
|
262193
|
+
} finally {
|
|
262194
|
+
podSlot();
|
|
262195
|
+
callerSlot();
|
|
262196
|
+
}
|
|
262197
|
+
}
|
|
261970
262198
|
if (request2.method === "POST" && path2 === "/v1/__webwix/call") {
|
|
261971
262199
|
const served = { rung: "none" };
|
|
261972
262200
|
let status2 = 500;
|
|
@@ -262670,6 +262898,7 @@ var init_server3 = __esm({
|
|
|
262670
262898
|
init_preview_token();
|
|
262671
262899
|
init_pinned_read();
|
|
262672
262900
|
init_member_exchange();
|
|
262901
|
+
init_member_photo();
|
|
262673
262902
|
init_member_forward();
|
|
262674
262903
|
init_package_share();
|
|
262675
262904
|
init_rate_limit();
|
|
@@ -263230,53 +263459,53 @@ var init_preview_assets_generated = __esm({
|
|
|
263230
263459
|
init_define_HHP_CATALOG();
|
|
263231
263460
|
init_preview_assets_format();
|
|
263232
263461
|
PREVIEW_ASSET_MANIFEST = [
|
|
263233
|
-
{ key: "assets/DashboardHost-
|
|
263234
|
-
{ key: "assets/DevDrawer-
|
|
263235
|
-
{ key: "assets/IdiomCompare-
|
|
263236
|
-
{ key: "assets/LightboxViewer-
|
|
263237
|
-
{ key: "assets/OfflineReadingBar-
|
|
263238
|
-
{ key: "assets/PhonePreviewControl-
|
|
263239
|
-
{ key: "assets/SchemeCompare-
|
|
263240
|
-
{ key: "assets/TopBarSearchStates-
|
|
263241
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
263462
|
+
{ key: "assets/DashboardHost-BT8DkmlA.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "9ba3c31af6ef84f7db83fff2516fbe6a4773d79ad13ad4d47c82e1fc3097a08e" },
|
|
263463
|
+
{ key: "assets/DevDrawer-COoSKeZP.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "07067d5550ffe4f4eaeabeaa8210a9dfaa041bf9d1c1275ca653ea4758e1f903" },
|
|
263464
|
+
{ key: "assets/IdiomCompare-h-BEaDAl.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "a1e727635c2efffcee03a589c198c2196142ecf265f117d5915d45318f8e8fab" },
|
|
263465
|
+
{ key: "assets/LightboxViewer-BEPuqwkk.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 15926, sha256: "73220b0f092b0cae02946b723121c7bb61dfcb150edfbdf52a43a36204e43239" },
|
|
263466
|
+
{ key: "assets/OfflineReadingBar-BpOgSsQ3.js", contentType: "application/javascript; charset=utf-8", offset: 37628, length: 1695, sha256: "c8a3bff03237a036d8938bdcae524ec679815ad78bf56b88cc753f02e25948de" },
|
|
263467
|
+
{ key: "assets/PhonePreviewControl-Dgk5c1VY.js", contentType: "application/javascript; charset=utf-8", offset: 39323, length: 37851, sha256: "53d2e35de64fefd8d6ea6968882ef1c89155c8a8f9045542ccd1aac6cf9f9dba" },
|
|
263468
|
+
{ key: "assets/SchemeCompare-DbA3uSUa.js", contentType: "application/javascript; charset=utf-8", offset: 77174, length: 1858, sha256: "55852ef93fdea23e0b17737a7e7a8900d3870a465852970a20c3d31be5b21dd7" },
|
|
263469
|
+
{ key: "assets/TopBarSearchStates-CoX_tpCx.js", contentType: "application/javascript; charset=utf-8", offset: 79032, length: 4068, sha256: "bef5f89920dc34a23427d8e80a3267e10fb3519e6253f60c87a1e629128826b8" },
|
|
263470
|
+
{ key: "assets/WixFrogTelemetrySink-BDwXu5uB.js", contentType: "application/javascript; charset=utf-8", offset: 83100, length: 3515, sha256: "6c182cd757b10e8760b1a9ba76059a64e94ee031e4e473ef88a70e9fce5df663" },
|
|
263242
263471
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 86615, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
263243
263472
|
{ key: "assets/catalog-B4UJpy5D.js", contentType: "application/javascript; charset=utf-8", offset: 88807, length: 35626, sha256: "90111ffcf2d13eff399836acafd1f2b387859440a29dcd4a0afd8370915992cb" },
|
|
263244
|
-
{ key: "assets/catalogFontFaces-
|
|
263473
|
+
{ key: "assets/catalogFontFaces-C1hTI5lA.js", contentType: "application/javascript; charset=utf-8", offset: 124433, length: 1111, sha256: "95664932cfc29545ddd73d08e039006c1f0dd14b1e5b3690194f6effb7dac44b" },
|
|
263245
263474
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 125544, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
263246
|
-
{ key: "assets/files-transfer-
|
|
263475
|
+
{ key: "assets/files-transfer-BMWE5CWZ.js", contentType: "application/javascript; charset=utf-8", offset: 128111, length: 6446, sha256: "b2f7b9827741a8bf0a63bccf18075a387652a0bc1dacccc12db3466a4f23b174" },
|
|
263247
263476
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 134557, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
263248
|
-
{ key: "assets/frogApiRules-
|
|
263477
|
+
{ key: "assets/frogApiRules-CUYMIDZv.js", contentType: "application/javascript; charset=utf-8", offset: 135729, length: 2207, sha256: "30f30ea4bdf79a424b592fc4db38efd0fa501dc14ccd7b439aeaf54a30c9c95b" },
|
|
263249
263478
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 137936, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
263250
263479
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 139003, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
263251
263480
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 145581, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
263252
|
-
{ key: "assets/index-
|
|
263253
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
263254
|
-
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
263255
|
-
{ key: "assets/pdf-
|
|
263256
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
263257
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
263258
|
-
{ key: "assets/pdfDocument-
|
|
263259
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
263260
|
-
{ key: "assets/scrollLinkedRuntime-
|
|
263261
|
-
{ key: "assets/webviewBridgeHost-
|
|
263262
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
263263
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
263264
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
263265
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
263266
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
263267
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
263268
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
263269
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
263270
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
263271
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
263272
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
263273
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
263274
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
263275
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
263276
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
263277
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
263278
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
263279
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
263481
|
+
{ key: "assets/index-C7vRYjIa.js", contentType: "application/javascript; charset=utf-8", offset: 148285, length: 1703756, sha256: "cdcf41940ad0232cec4f9798d4fe203ef0450694d0d5acabe3bc5ce7fb37ada3" },
|
|
263482
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1852041, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
263483
|
+
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1859792, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
|
|
263484
|
+
{ key: "assets/pdf-BporS3Tg.js", contentType: "application/javascript; charset=utf-8", offset: 1870323, length: 488215, sha256: "5634539b1de6317bfac96d63062a0cf58803504fbb50489c6758e427a245af27" },
|
|
263485
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2358538, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
263486
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2358628, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
263487
|
+
{ key: "assets/pdfDocument-lp5cy7Ss.js", contentType: "application/javascript; charset=utf-8", offset: 3675662, length: 3836, sha256: "380d61c9ca43c08a875a31ee191519bdea459f1ddbf3c476738d29ceba701321" },
|
|
263488
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3679498, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
263489
|
+
{ key: "assets/scrollLinkedRuntime-BSIOrFH2.js", contentType: "application/javascript; charset=utf-8", offset: 3681764, length: 2278, sha256: "064a7e665325880b251d109554f5825cebf463e5b947ce4e3e2a4d15900ac404" },
|
|
263490
|
+
{ key: "assets/webviewBridgeHost-D9HltZpr.js", contentType: "application/javascript; charset=utf-8", offset: 3684042, length: 9889, sha256: "be3bfd23892c8d56cfd13d2743aca87d8a7e99ada7b4369fa3172a2b8ae929ca" },
|
|
263491
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3693931, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
263492
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3698541, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
263493
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4187125, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
263494
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4278049, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
263495
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4369033, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
263496
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4460013, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
263497
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4550885, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
263498
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4641865, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
263499
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4750501, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
263500
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4859585, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
263501
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4968633, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
263502
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 5076333, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
263503
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5164441, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
263504
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5171259, length: 4924, sha256: "999cd0100c76753cbd057a9e12e32b1ece9f35805ccc0168d39dbda2ac8dd56d" },
|
|
263505
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5176183, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
263506
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5187640, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
263507
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5188811, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
|
|
263508
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5213114, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
|
|
263280
263509
|
];
|
|
263281
263510
|
}
|
|
263282
263511
|
});
|
|
@@ -263602,7 +263831,7 @@ async function releasePayloadFromDir(root, app2, header2) {
|
|
|
263602
263831
|
const store = new FileReleaseStore(root);
|
|
263603
263832
|
const manifest2 = await store.getManifest(app2);
|
|
263604
263833
|
if (!manifest2) throw new Error(`no release manifest for ${app2} under ${root}`);
|
|
263605
|
-
const
|
|
263834
|
+
const b643 = (b3) => b3 ? Buffer.from(b3).toString("base64") : void 0;
|
|
263606
263835
|
const text32 = (b3) => b3 ? new TextDecoder().decode(b3) : void 0;
|
|
263607
263836
|
const screens = {};
|
|
263608
263837
|
const docs = {};
|
|
@@ -263623,12 +263852,12 @@ async function releasePayloadFromDir(root, app2, header2) {
|
|
|
263623
263852
|
await addDoc(manifest2.sourceHash);
|
|
263624
263853
|
const bundles = {};
|
|
263625
263854
|
for (const b3 of Object.values(manifest2.bundles ?? {})) {
|
|
263626
|
-
const bytes2 =
|
|
263855
|
+
const bytes2 = b643(await store.getBundle(app2, b3.sha256));
|
|
263627
263856
|
if (bytes2 !== void 0) bundles[b3.sha256] = bytes2;
|
|
263628
263857
|
}
|
|
263629
263858
|
const assets = {};
|
|
263630
263859
|
for (const rec of Object.values(manifest2.assets ?? {})) {
|
|
263631
|
-
const bytes2 =
|
|
263860
|
+
const bytes2 = b643(await store.getAsset?.(app2, rec.sha256) ?? null);
|
|
263632
263861
|
if (bytes2 !== void 0) assets[rec.sha256] = { base64: bytes2, contentType: rec.contentType };
|
|
263633
263862
|
}
|
|
263634
263863
|
const widgets = {};
|
|
@@ -263648,7 +263877,7 @@ async function releasePayloadFromDir(root, app2, header2) {
|
|
|
263648
263877
|
widgets,
|
|
263649
263878
|
tokens: text32(await store.getTokens(app2)),
|
|
263650
263879
|
appConfig,
|
|
263651
|
-
icon:
|
|
263880
|
+
icon: b643(await store.getIcon?.(app2) ?? null),
|
|
263652
263881
|
header: header2,
|
|
263653
263882
|
...wixClientId ? { wixClientId } : {}
|
|
263654
263883
|
};
|
|
@@ -266715,7 +266944,7 @@ function assetUploadUrl(operation, size) {
|
|
|
266715
266944
|
function backoffMs2(attempt2) {
|
|
266716
266945
|
return Math.min(BASE_BACKOFF_MS * 2 ** (attempt2 - 1), MAX_RETRY_WAIT_MS);
|
|
266717
266946
|
}
|
|
266718
|
-
async function
|
|
266947
|
+
async function readJson14(response) {
|
|
266719
266948
|
try {
|
|
266720
266949
|
return await response.json();
|
|
266721
266950
|
} catch {
|
|
@@ -266856,7 +267085,7 @@ var init_iap_client = __esm({
|
|
|
266856
267085
|
}
|
|
266857
267086
|
async send(method, url, body) {
|
|
266858
267087
|
const response = await this.fetchOrNetworkError(method, url, body);
|
|
266859
|
-
const payload = await
|
|
267088
|
+
const payload = await readJson14(response);
|
|
266860
267089
|
if (!response.ok) throw this.httpError(method, url, response, payload);
|
|
266861
267090
|
if (payload === void 0 && response.status !== 204) {
|
|
266862
267091
|
throw new AscError2("server", `${method} ${url.pathname} \u2192 ${response.status} with an unreadable body`, response.status);
|
|
@@ -274578,7 +274807,7 @@ var init_runtime_copy = __esm({
|
|
|
274578
274807
|
// the app's served \`$t:\` catalog wins over every value here.
|
|
274579
274808
|
`;
|
|
274580
274809
|
RENDERER_PREFIXES = ["runtime.component.", "runtime.state.retry", "runtime.state.takeAction", "runtime.state.server.", "runtime.state.offline.", "runtime.state.permission.", "runtime.state.signIn.", "runtime.nav.resizeSheet", "runtime.nav.dismiss", "runtime.dialog.cancel", "runtime.dialog.confirm", "runtime.dialog.delete", "runtime.webview.pageError"];
|
|
274581
|
-
RENDERER_EXCLUDE = /* @__PURE__ */ new Set(["runtime.component.image.
|
|
274810
|
+
RENDERER_EXCLUDE = /* @__PURE__ */ new Set(["runtime.component.image.openPreview", "runtime.component.region.failed", "runtime.component.list.empty"]);
|
|
274582
274811
|
RUNTIME_KIND = "Runtime.native";
|
|
274583
274812
|
if (false) main();
|
|
274584
274813
|
}
|
|
@@ -276380,7 +276609,7 @@ function dropTrailingCommas(text32) {
|
|
|
276380
276609
|
}
|
|
276381
276610
|
return out2;
|
|
276382
276611
|
}
|
|
276383
|
-
function
|
|
276612
|
+
function readJson15(files, path2) {
|
|
276384
276613
|
const text32 = files.get(path2);
|
|
276385
276614
|
if (text32 === void 0) return void 0;
|
|
276386
276615
|
try {
|
|
@@ -276395,7 +276624,7 @@ function filesIn(files, dir, re2) {
|
|
|
276395
276624
|
return [...files.keys()].filter((p2) => p2.startsWith(prefix) && !p2.slice(prefix.length).includes("/") && re2.test(p2)).sort();
|
|
276396
276625
|
}
|
|
276397
276626
|
function projectDirs(files) {
|
|
276398
|
-
const cfg =
|
|
276627
|
+
const cfg = readJson15(files, "base44/config.jsonc") ?? readJson15(files, "base44/config.json") ?? {};
|
|
276399
276628
|
const dir = (k3, d2) => {
|
|
276400
276629
|
const v2 = cfg[k3];
|
|
276401
276630
|
return `base44/${typeof v2 === "string" && v2 && !v2.includes("..") ? v2.replace(/^\.\/|\/+$/g, "") : d2}`;
|
|
@@ -276426,7 +276655,7 @@ function fieldsOf(schema2) {
|
|
|
276426
276655
|
function readEntities(files, dirs) {
|
|
276427
276656
|
const out2 = [];
|
|
276428
276657
|
for (const path2 of [...filesIn(files, dirs.entities, JSON_FILE), ...filesIn(files, "entities", JSON_FILE)]) {
|
|
276429
|
-
const schema2 =
|
|
276658
|
+
const schema2 = readJson15(files, path2);
|
|
276430
276659
|
if (!schema2) continue;
|
|
276431
276660
|
const base2 = path2.split("/").pop().replace(JSON_FILE, "");
|
|
276432
276661
|
const name = typeof schema2.name === "string" && schema2.name ? schema2.name : base2;
|
|
@@ -276470,7 +276699,7 @@ function readFunctions(files, dirs) {
|
|
|
276470
276699
|
const prefix = `${dirs.functions}/`;
|
|
276471
276700
|
const under = [...files.keys()].filter((p2) => p2.startsWith(prefix)).sort();
|
|
276472
276701
|
for (const cfgPath of under.filter((p2) => /\/function\.jsonc?$/i.test(p2))) {
|
|
276473
|
-
const cfg =
|
|
276702
|
+
const cfg = readJson15(files, cfgPath);
|
|
276474
276703
|
if (!cfg || typeof cfg.name !== "string") continue;
|
|
276475
276704
|
const folder = cfgPath.slice(0, cfgPath.lastIndexOf("/"));
|
|
276476
276705
|
const entry = typeof cfg.entry === "string" ? `${folder}/${cfg.entry.replace(/^\.\//, "")}` : void 0;
|
|
@@ -276497,12 +276726,12 @@ function agentFromConfig(cfg, source2) {
|
|
|
276497
276726
|
return { name: cfg.name, ...typeof cfg.description === "string" ? { description: cfg.description } : {}, tools, source: source2 };
|
|
276498
276727
|
}
|
|
276499
276728
|
function readAgents(files, dirs) {
|
|
276500
|
-
return filesIn(files, dirs.agents, JSON_FILE).map((p2) =>
|
|
276729
|
+
return filesIn(files, dirs.agents, JSON_FILE).map((p2) => readJson15(files, p2)).map((cfg) => cfg ? agentFromConfig(cfg, "project-files") : void 0).filter((a3) => !!a3);
|
|
276501
276730
|
}
|
|
276502
276731
|
function readConnectors(files, dirs) {
|
|
276503
276732
|
const out2 = [];
|
|
276504
276733
|
for (const p2 of filesIn(files, dirs.connectors, JSON_FILE)) {
|
|
276505
|
-
const cfg =
|
|
276734
|
+
const cfg = readJson15(files, p2);
|
|
276506
276735
|
if (!cfg || typeof cfg.type !== "string") continue;
|
|
276507
276736
|
out2.push({ type: cfg.type, scopes: Array.isArray(cfg.scopes) ? cfg.scopes.map(String) : [], source: "project-files" });
|
|
276508
276737
|
}
|
|
@@ -276521,7 +276750,7 @@ function providersOf(cfg) {
|
|
|
276521
276750
|
}
|
|
276522
276751
|
function readAuthConfig(files, dirs) {
|
|
276523
276752
|
for (const p2 of filesIn(files, dirs.auth, JSON_FILE)) {
|
|
276524
|
-
const cfg =
|
|
276753
|
+
const cfg = readJson15(files, p2);
|
|
276525
276754
|
if (cfg && Object.keys(cfg).some((k3) => /^enable/.test(k3))) return { providers: providersOf(cfg), source: "project-files" };
|
|
276526
276755
|
}
|
|
276527
276756
|
return void 0;
|
|
@@ -285063,7 +285292,7 @@ var init_widgets_cli = __esm({
|
|
|
285063
285292
|
});
|
|
285064
285293
|
|
|
285065
285294
|
// src/one-app/access-policy.ts
|
|
285066
|
-
async function
|
|
285295
|
+
async function readJson16(fetchImpl, url, headers2) {
|
|
285067
285296
|
const response = await fetchImpl(url, { method: "GET", headers: headers2, redirect: "error", signal: AbortSignal.timeout(TIMEOUT_MS6) });
|
|
285068
285297
|
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
285069
285298
|
const text32 = await response.text();
|
|
@@ -285079,10 +285308,10 @@ async function readAccessPolicy(metaSiteId, deps = {}) {
|
|
|
285079
285308
|
});
|
|
285080
285309
|
if (!SITE_ID2.test(metaSiteId)) return unknown("the site id is not a UUID");
|
|
285081
285310
|
try {
|
|
285082
|
-
const session = await
|
|
285311
|
+
const session = await readJson16(fetchImpl, `${VISITOR_SESSION2}${metaSiteId}/signed-instance?signed_instance_type=Visitor`, { Accept: "application/json" });
|
|
285083
285312
|
const instance = isObject4(session) && session.signedInstanceType === "Visitor" && typeof session.signedInstance === "string" ? session.signedInstance.trim() : "";
|
|
285084
285313
|
if (!instance || /[\r\n]/.test(instance)) return unknown("no Visitor session");
|
|
285085
|
-
const config = await
|
|
285314
|
+
const config = await readJson16(fetchImpl, `${GATEWAY}${metaSiteId}/hybrid-app-config`, { Authorization: instance, "wix-site-id": metaSiteId, Accept: "application/json" });
|
|
285086
285315
|
const value2 = isObject4(config) ? config.visitorModeEnabled : void 0;
|
|
285087
285316
|
if (typeof value2 !== "boolean") return unknown("the gateway did not report it");
|
|
285088
285317
|
return { policy: { schemaVersion: 1, visitorModeEnabled: value2, source: "mobile-hybrid-gateway:hybrid-app-config", fetchedAt } };
|