unframer 2.11.2 → 2.13.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/exporter.d.ts +3 -0
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js +70 -32
- package/dist/exporter.js.map +1 -1
- package/dist/exporter.test.js +3 -0
- package/dist/exporter.test.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +876 -507
- package/dist/framer.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +16 -6
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +70 -3
- package/dist/react.js.map +1 -1
- package/dist/utils.d.ts +3 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +27 -2
- package/dist/utils.js.map +1 -1
- package/esm/exporter.d.ts +3 -0
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +72 -35
- package/esm/exporter.js.map +1 -1
- package/esm/exporter.test.js +4 -1
- package/esm/exporter.test.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +873 -507
- package/esm/framer.js.map +1 -1
- package/esm/index.d.ts +3 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -1
- package/esm/index.js.map +1 -1
- package/esm/react.d.ts +16 -6
- package/esm/react.d.ts.map +1 -1
- package/esm/react.js +69 -5
- package/esm/react.js.map +1 -1
- package/esm/utils.d.ts +3 -2
- package/esm/utils.d.ts.map +1 -1
- package/esm/utils.js +26 -2
- package/esm/utils.js.map +1 -1
- package/package.json +3 -4
- package/src/exporter.test.ts +6 -1
- package/src/exporter.ts +85 -42
- package/src/framer.js +925 -513
- package/src/index.ts +7 -1
- package/src/react.tsx +104 -16
- package/src/utils.ts +30 -3
package/esm/framer.js
CHANGED
|
@@ -14597,7 +14597,7 @@ function steps(numSteps, direction = 'end') {
|
|
|
14597
14597
|
return clamp(0, 1, rounded / numSteps);
|
|
14598
14598
|
};
|
|
14599
14599
|
}
|
|
14600
|
-
// https :https://app.framerstatic.com/framer.
|
|
14600
|
+
// https :https://app.framerstatic.com/framer.K777Q2AQ.mjs
|
|
14601
14601
|
init_chunk_QLPHEVXG();
|
|
14602
14602
|
import React4 from 'react';
|
|
14603
14603
|
import { startTransition as startTransition2, } from 'react';
|
|
@@ -16264,9 +16264,9 @@ function renderPage(Page4, defaultPageStyle) {
|
|
|
16264
16264
|
}
|
|
16265
16265
|
var NotFoundError = class extends Error {
|
|
16266
16266
|
};
|
|
16267
|
-
var
|
|
16267
|
+
var NotFoundErrorBoundaryCaughtError = class extends Error {
|
|
16268
16268
|
};
|
|
16269
|
-
var
|
|
16269
|
+
var NotFoundErrorBoundary = class extends Component {
|
|
16270
16270
|
constructor(props) {
|
|
16271
16271
|
super(props);
|
|
16272
16272
|
this.state = {
|
|
@@ -16297,7 +16297,7 @@ var ErrorBoundary = class extends Component {
|
|
|
16297
16297
|
return this.props.children;
|
|
16298
16298
|
}
|
|
16299
16299
|
if (!(this.state.error instanceof NotFoundError)) {
|
|
16300
|
-
const error = new
|
|
16300
|
+
const error = new NotFoundErrorBoundaryCaughtError();
|
|
16301
16301
|
error.cause = this.state.error;
|
|
16302
16302
|
throw error;
|
|
16303
16303
|
}
|
|
@@ -16308,6 +16308,162 @@ var ErrorBoundary = class extends Component {
|
|
|
16308
16308
|
return renderPage(notFoundPage, defaultPageStyle);
|
|
16309
16309
|
}
|
|
16310
16310
|
};
|
|
16311
|
+
function isObject(value) {
|
|
16312
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
16313
|
+
}
|
|
16314
|
+
function isString(value) {
|
|
16315
|
+
return typeof value === 'string';
|
|
16316
|
+
}
|
|
16317
|
+
var preloadKey = 'preload';
|
|
16318
|
+
function isLazyComponentType(componentType) {
|
|
16319
|
+
return typeof componentType === 'object' && componentType !== null && !React4.isValidElement(componentType) &&
|
|
16320
|
+
preloadKey in componentType;
|
|
16321
|
+
}
|
|
16322
|
+
function lazy(factory) {
|
|
16323
|
+
const LazyComponent = React4.lazy(factory);
|
|
16324
|
+
let factoryPromise;
|
|
16325
|
+
let LoadedComponent;
|
|
16326
|
+
const Component18 = React4.forwardRef(function LazyWithPreload(props, ref) {
|
|
16327
|
+
return React4.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, ref
|
|
16328
|
+
? {
|
|
16329
|
+
ref,
|
|
16330
|
+
...props,
|
|
16331
|
+
}
|
|
16332
|
+
: props);
|
|
16333
|
+
});
|
|
16334
|
+
Component18.preload = () => {
|
|
16335
|
+
if (!factoryPromise) {
|
|
16336
|
+
factoryPromise = factory().then((module) => {
|
|
16337
|
+
LoadedComponent = module.default;
|
|
16338
|
+
return LoadedComponent;
|
|
16339
|
+
});
|
|
16340
|
+
}
|
|
16341
|
+
return factoryPromise;
|
|
16342
|
+
};
|
|
16343
|
+
return Component18;
|
|
16344
|
+
}
|
|
16345
|
+
function getRouteElementId(route, hash2) {
|
|
16346
|
+
if (hash2 && route) {
|
|
16347
|
+
if (route.elements && hash2 in route.elements) {
|
|
16348
|
+
return route.elements[hash2];
|
|
16349
|
+
}
|
|
16350
|
+
else {
|
|
16351
|
+
return hash2;
|
|
16352
|
+
}
|
|
16353
|
+
}
|
|
16354
|
+
return void 0;
|
|
16355
|
+
}
|
|
16356
|
+
function isBot(userAgent) {
|
|
16357
|
+
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent);
|
|
16358
|
+
}
|
|
16359
|
+
function yieldToMain(options) {
|
|
16360
|
+
if ('scheduler' in window) {
|
|
16361
|
+
if ('yield' in scheduler)
|
|
16362
|
+
return scheduler.yield(options);
|
|
16363
|
+
if ('postTask' in scheduler)
|
|
16364
|
+
return scheduler.postTask(() => { }, options);
|
|
16365
|
+
}
|
|
16366
|
+
if ((options === null || options === void 0 ? void 0 : options.priority) === 'user-blocking') {
|
|
16367
|
+
return Promise.resolve();
|
|
16368
|
+
}
|
|
16369
|
+
return new Promise((resolve) => {
|
|
16370
|
+
setTimeout(resolve);
|
|
16371
|
+
});
|
|
16372
|
+
}
|
|
16373
|
+
async function yieldBefore(fn, options) {
|
|
16374
|
+
await yieldToMain(options);
|
|
16375
|
+
return fn();
|
|
16376
|
+
}
|
|
16377
|
+
function interactionResponse(options) {
|
|
16378
|
+
return new Promise((resolve) => {
|
|
16379
|
+
setTimeout(resolve, 100);
|
|
16380
|
+
requestAnimationFrame(() => {
|
|
16381
|
+
void yieldBefore(resolve, options);
|
|
16382
|
+
});
|
|
16383
|
+
});
|
|
16384
|
+
}
|
|
16385
|
+
function useAfterPaintEffect(effectFn, deps, opts, useEffectFn = useLayoutEffect) {
|
|
16386
|
+
useEffectFn(() => {
|
|
16387
|
+
const runAfterPaint = async (fn) => {
|
|
16388
|
+
await interactionResponse(opts);
|
|
16389
|
+
return fn();
|
|
16390
|
+
};
|
|
16391
|
+
const runPromise = runAfterPaint(effectFn);
|
|
16392
|
+
return () => {
|
|
16393
|
+
void (async () => {
|
|
16394
|
+
const cleanup = await runPromise;
|
|
16395
|
+
if (!cleanup)
|
|
16396
|
+
return;
|
|
16397
|
+
void runAfterPaint(cleanup);
|
|
16398
|
+
})();
|
|
16399
|
+
};
|
|
16400
|
+
}, deps);
|
|
16401
|
+
}
|
|
16402
|
+
var noop2 = () => { };
|
|
16403
|
+
var EMPTY_ARRAY = [];
|
|
16404
|
+
var requestIdleCallback = /* @__PURE__ */ (() => {
|
|
16405
|
+
return typeof window !== 'undefined' ? window.requestIdleCallback || window.setTimeout : setTimeout;
|
|
16406
|
+
})();
|
|
16407
|
+
var ErrorBoundaryCaughtError = class extends NotFoundErrorBoundaryCaughtError {
|
|
16408
|
+
constructor() {
|
|
16409
|
+
super(...arguments);
|
|
16410
|
+
this.caught = true;
|
|
16411
|
+
}
|
|
16412
|
+
};
|
|
16413
|
+
var GracefullyDegradingErrorBoundary = class extends Component {
|
|
16414
|
+
constructor() {
|
|
16415
|
+
super(...arguments);
|
|
16416
|
+
this.state = {
|
|
16417
|
+
error: void 0,
|
|
16418
|
+
};
|
|
16419
|
+
this.message = 'Made UI non-interactive due to the error above. We\'ve logged it, but also please report this to the Framer team.';
|
|
16420
|
+
}
|
|
16421
|
+
static getDerivedStateFromError(error) {
|
|
16422
|
+
return {
|
|
16423
|
+
error,
|
|
16424
|
+
};
|
|
16425
|
+
}
|
|
16426
|
+
componentDidCatch(error) {
|
|
16427
|
+
var _a;
|
|
16428
|
+
if ('cause' in error) {
|
|
16429
|
+
error = error.cause;
|
|
16430
|
+
}
|
|
16431
|
+
console.error(this.message);
|
|
16432
|
+
if (Math.random() > 0.01)
|
|
16433
|
+
return;
|
|
16434
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
16435
|
+
(_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push(['published_site_load_error', {
|
|
16436
|
+
message: String(error),
|
|
16437
|
+
stack,
|
|
16438
|
+
},]);
|
|
16439
|
+
}
|
|
16440
|
+
render() {
|
|
16441
|
+
var _a;
|
|
16442
|
+
const error = this.state.error;
|
|
16443
|
+
if (!error)
|
|
16444
|
+
return this.props.children;
|
|
16445
|
+
if (!isBot(navigator.userAgent)) {
|
|
16446
|
+
const fatalError = new ErrorBoundaryCaughtError();
|
|
16447
|
+
fatalError.cause = 'cause' in error ? error.cause : error;
|
|
16448
|
+
console.error(this.message, fatalError.cause);
|
|
16449
|
+
throw fatalError;
|
|
16450
|
+
}
|
|
16451
|
+
return (
|
|
16452
|
+
// This has the caveat that we will slightly modify the DOM, but it appears to be fine in this case.
|
|
16453
|
+
// The alternative would be to queue a new task that runs after and then set the innerHTML (= avoids the dummy-div), but that means we'll have DOM -> no DOM -> DOM transitions. With the div, we have DOM -> DOM and remove possible race-conditions.
|
|
16454
|
+
jsx('div', {
|
|
16455
|
+
style: {
|
|
16456
|
+
display: 'contents',
|
|
16457
|
+
},
|
|
16458
|
+
suppressHydrationWarning: true,
|
|
16459
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: React would unmount the root on errors, but we must ensure that bots can still read the SSR'd content.
|
|
16460
|
+
dangerouslySetInnerHTML: {
|
|
16461
|
+
__html: '<!-- DOM replaced by GracefullyDegradingErrorBoundary -->' +
|
|
16462
|
+
(((_a = document.getElementById('main')) === null || _a === void 0 ? void 0 : _a.innerHTML) || ''),
|
|
16463
|
+
},
|
|
16464
|
+
}));
|
|
16465
|
+
}
|
|
16466
|
+
};
|
|
16311
16467
|
var pathVariablesRegExpRaw = ':([a-z]\\w*)';
|
|
16312
16468
|
var pathVariablesRegExp = /* @__PURE__ */ new RegExp(pathVariablesRegExpRaw, 'gi');
|
|
16313
16469
|
function fillPathVariables(path, variables) {
|
|
@@ -16481,99 +16637,6 @@ function forwardQueryParams(queryParamsString, href) {
|
|
|
16481
16637
|
}
|
|
16482
16638
|
return hrefWithoutHash.substring(0, startOfSearch + 1) + newSearchParams.toString() + hash2;
|
|
16483
16639
|
}
|
|
16484
|
-
function isObject(value) {
|
|
16485
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
16486
|
-
}
|
|
16487
|
-
function isString(value) {
|
|
16488
|
-
return typeof value === 'string';
|
|
16489
|
-
}
|
|
16490
|
-
var preloadKey = 'preload';
|
|
16491
|
-
function isLazyComponentType(componentType) {
|
|
16492
|
-
return typeof componentType === 'object' && componentType !== null && !React4.isValidElement(componentType) &&
|
|
16493
|
-
preloadKey in componentType;
|
|
16494
|
-
}
|
|
16495
|
-
function lazy(factory) {
|
|
16496
|
-
const LazyComponent = React4.lazy(factory);
|
|
16497
|
-
let factoryPromise;
|
|
16498
|
-
let LoadedComponent;
|
|
16499
|
-
const Component16 = React4.forwardRef(function LazyWithPreload(props, ref) {
|
|
16500
|
-
return React4.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, ref
|
|
16501
|
-
? {
|
|
16502
|
-
ref,
|
|
16503
|
-
...props,
|
|
16504
|
-
}
|
|
16505
|
-
: props);
|
|
16506
|
-
});
|
|
16507
|
-
Component16.preload = () => {
|
|
16508
|
-
if (!factoryPromise) {
|
|
16509
|
-
factoryPromise = factory().then((module) => {
|
|
16510
|
-
LoadedComponent = module.default;
|
|
16511
|
-
return LoadedComponent;
|
|
16512
|
-
});
|
|
16513
|
-
}
|
|
16514
|
-
return factoryPromise;
|
|
16515
|
-
};
|
|
16516
|
-
return Component16;
|
|
16517
|
-
}
|
|
16518
|
-
function getRouteElementId(route, hash2) {
|
|
16519
|
-
if (hash2 && route) {
|
|
16520
|
-
if (route.elements && hash2 in route.elements) {
|
|
16521
|
-
return route.elements[hash2];
|
|
16522
|
-
}
|
|
16523
|
-
else {
|
|
16524
|
-
return hash2;
|
|
16525
|
-
}
|
|
16526
|
-
}
|
|
16527
|
-
return void 0;
|
|
16528
|
-
}
|
|
16529
|
-
function isBot(userAgent) {
|
|
16530
|
-
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent);
|
|
16531
|
-
}
|
|
16532
|
-
function yieldToMain(options) {
|
|
16533
|
-
if ('scheduler' in window) {
|
|
16534
|
-
if ('yield' in scheduler)
|
|
16535
|
-
return scheduler.yield(options);
|
|
16536
|
-
if ('postTask' in scheduler)
|
|
16537
|
-
return scheduler.postTask(() => { }, options);
|
|
16538
|
-
}
|
|
16539
|
-
if ((options === null || options === void 0 ? void 0 : options.priority) === 'user-blocking') {
|
|
16540
|
-
return Promise.resolve();
|
|
16541
|
-
}
|
|
16542
|
-
return new Promise((resolve) => {
|
|
16543
|
-
setTimeout(resolve);
|
|
16544
|
-
});
|
|
16545
|
-
}
|
|
16546
|
-
async function yieldBefore(fn, options) {
|
|
16547
|
-
await yieldToMain(options);
|
|
16548
|
-
return fn();
|
|
16549
|
-
}
|
|
16550
|
-
function interactionResponse(options) {
|
|
16551
|
-
return new Promise((resolve) => {
|
|
16552
|
-
setTimeout(resolve, 100);
|
|
16553
|
-
requestAnimationFrame(() => {
|
|
16554
|
-
void yieldBefore(resolve, options);
|
|
16555
|
-
});
|
|
16556
|
-
});
|
|
16557
|
-
}
|
|
16558
|
-
function useAfterPaintEffect(effectFn, deps, opts, useEffectFn = useLayoutEffect) {
|
|
16559
|
-
useEffectFn(() => {
|
|
16560
|
-
const runAfterPaint = async (fn) => {
|
|
16561
|
-
await interactionResponse(opts);
|
|
16562
|
-
return fn();
|
|
16563
|
-
};
|
|
16564
|
-
const runPromise = runAfterPaint(effectFn);
|
|
16565
|
-
return () => {
|
|
16566
|
-
void (async () => {
|
|
16567
|
-
const cleanup = await runPromise;
|
|
16568
|
-
if (!cleanup)
|
|
16569
|
-
return;
|
|
16570
|
-
void runAfterPaint(cleanup);
|
|
16571
|
-
})();
|
|
16572
|
-
};
|
|
16573
|
-
}, deps);
|
|
16574
|
-
}
|
|
16575
|
-
var noop2 = () => { };
|
|
16576
|
-
var EMPTY_ARRAY = [];
|
|
16577
16640
|
async function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {
|
|
16578
16641
|
var _a, _b, _c;
|
|
16579
16642
|
let resultPath = path;
|
|
@@ -16977,11 +17040,8 @@ function createViewTransitionStylesheet({ exit = defaultPageTransition, enter, }
|
|
|
16977
17040
|
styleElement.textContent = styleContent;
|
|
16978
17041
|
document.head.appendChild(styleElement);
|
|
16979
17042
|
}
|
|
16980
|
-
var _requestIdleCallback = /* @__PURE__ */ (() => {
|
|
16981
|
-
return typeof window !== 'undefined' ? window.requestIdleCallback || window.setTimeout : setTimeout;
|
|
16982
|
-
})();
|
|
16983
17043
|
function removeViewTransitionStylesheet() {
|
|
16984
|
-
|
|
17044
|
+
requestIdleCallback(() => {
|
|
16985
17045
|
frame.render(() => {
|
|
16986
17046
|
performance.mark('framer-vt-remove');
|
|
16987
17047
|
const element = document.getElementById(VIEW_TRANSITION_STYLES_ID);
|
|
@@ -17096,14 +17156,15 @@ async function pushRouteState(routeId, route, { currentRoutePath, currentPathVar
|
|
|
17096
17156
|
const { path, } = route;
|
|
17097
17157
|
if (!path)
|
|
17098
17158
|
return;
|
|
17159
|
+
const newPath = getPathForRoute(route, {
|
|
17160
|
+
currentRoutePath,
|
|
17161
|
+
currentPathVariables,
|
|
17162
|
+
hash: hash2,
|
|
17163
|
+
pathVariables,
|
|
17164
|
+
preserveQueryParams,
|
|
17165
|
+
});
|
|
17166
|
+
const currentUrl = window.location.href;
|
|
17099
17167
|
try {
|
|
17100
|
-
const newPath = getPathForRoute(route, {
|
|
17101
|
-
currentRoutePath,
|
|
17102
|
-
currentPathVariables,
|
|
17103
|
-
hash: hash2,
|
|
17104
|
-
pathVariables,
|
|
17105
|
-
preserveQueryParams,
|
|
17106
|
-
});
|
|
17107
17168
|
const urlUpdatePromise = pushHistoryState({
|
|
17108
17169
|
routeId,
|
|
17109
17170
|
hash: hash2,
|
|
@@ -17114,6 +17175,16 @@ async function pushRouteState(routeId, route, { currentRoutePath, currentPathVar
|
|
|
17114
17175
|
}
|
|
17115
17176
|
catch { }
|
|
17116
17177
|
}
|
|
17178
|
+
function updateCanonicalURL(url, prevUrl) {
|
|
17179
|
+
requestIdleCallback(() => {
|
|
17180
|
+
const canonical = document.querySelector('link[rel=\'canonical\']');
|
|
17181
|
+
if (!canonical)
|
|
17182
|
+
return;
|
|
17183
|
+
const newURL = new URL(url, prevUrl);
|
|
17184
|
+
newURL.search = '';
|
|
17185
|
+
canonical.setAttribute('href', newURL.toString());
|
|
17186
|
+
});
|
|
17187
|
+
}
|
|
17117
17188
|
function isHistoryState(data2) {
|
|
17118
17189
|
const routeIdKey = 'routeId';
|
|
17119
17190
|
return isObject(data2) && isString(data2[routeIdKey]);
|
|
@@ -17139,6 +17210,7 @@ async function pushHistoryState(data2, url, awaitPaintBeforeUpdate = false, isNa
|
|
|
17139
17210
|
});
|
|
17140
17211
|
}
|
|
17141
17212
|
performance.mark('framer-history-push');
|
|
17213
|
+
updateCanonicalURL(url, window.location.href);
|
|
17142
17214
|
if (!isNavigationTransition) {
|
|
17143
17215
|
window.history.pushState(data2, '', url);
|
|
17144
17216
|
return;
|
|
@@ -17207,8 +17279,9 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
|
|
|
17207
17279
|
return;
|
|
17208
17280
|
void monitorNextPaintAfterRender();
|
|
17209
17281
|
const changeRoute = () => {
|
|
17210
|
-
setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject(pathVariables) ? pathVariables : void 0,
|
|
17282
|
+
setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject(pathVariables) ? pathVariables : void 0, true, false);
|
|
17211
17283
|
};
|
|
17284
|
+
updateCanonicalURL(window.location.href);
|
|
17212
17285
|
const transition = await startViewTransition2(currentRouteId.current, routeId, changeRoute, false);
|
|
17213
17286
|
if (transition) {
|
|
17214
17287
|
void transition.updateCallbackDone.then((_d = viewTransitionReady.current) === null || _d === void 0 ? void 0 : _d.resolve).catch((_e = viewTransitionReady.current) === null || _e === void 0 ? void 0 : _e.reject);
|
|
@@ -17633,8 +17706,8 @@ var SuspenseErrorBoundary = class extends Component {
|
|
|
17633
17706
|
};
|
|
17634
17707
|
}
|
|
17635
17708
|
static getDerivedStateFromError(error) {
|
|
17636
|
-
if (!(error instanceof
|
|
17637
|
-
console.error('Derived error in SuspenseErrorBoundary', error);
|
|
17709
|
+
if (!(error instanceof NotFoundErrorBoundaryCaughtError)) {
|
|
17710
|
+
console.error('Derived error in SuspenseErrorBoundary:\n', error);
|
|
17638
17711
|
}
|
|
17639
17712
|
return {
|
|
17640
17713
|
error,
|
|
@@ -17642,26 +17715,25 @@ var SuspenseErrorBoundary = class extends Component {
|
|
|
17642
17715
|
}
|
|
17643
17716
|
componentDidCatch(error, errorInfo) {
|
|
17644
17717
|
var _a;
|
|
17645
|
-
if (error instanceof
|
|
17718
|
+
if (error instanceof NotFoundErrorBoundaryCaughtError) {
|
|
17646
17719
|
return;
|
|
17647
17720
|
}
|
|
17648
17721
|
const componentStack = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.componentStack;
|
|
17649
|
-
console.error('Caught error in SuspenseErrorBoundary', error, componentStack);
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
|
|
17655
|
-
|
|
17656
|
-
|
|
17657
|
-
},]);
|
|
17658
|
-
}
|
|
17722
|
+
console.error('Caught error in SuspenseErrorBoundary:\n', error, componentStack);
|
|
17723
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
17724
|
+
(_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
17725
|
+
message: String(error),
|
|
17726
|
+
stack,
|
|
17727
|
+
// only log componentStack if we don't have a stack
|
|
17728
|
+
componentStack: stack ? void 0 : componentStack,
|
|
17729
|
+
},]);
|
|
17659
17730
|
}
|
|
17660
17731
|
render() {
|
|
17661
|
-
|
|
17732
|
+
const error = this.state.error;
|
|
17733
|
+
if (error === void 0)
|
|
17662
17734
|
return this.props.children;
|
|
17663
|
-
if (
|
|
17664
|
-
throw
|
|
17735
|
+
if (error instanceof NotFoundErrorBoundaryCaughtError) {
|
|
17736
|
+
throw error.cause;
|
|
17665
17737
|
}
|
|
17666
17738
|
window.__framer_STPD_OPT_OUT__ = true;
|
|
17667
17739
|
return jsx(Suspense2, {
|
|
@@ -17744,8 +17816,10 @@ function useNavigationTransition(enableAsyncURLUpdates) {
|
|
|
17744
17816
|
return useCallback(async (transitionFn, updateURL, isAbortable = true) => {
|
|
17745
17817
|
var _a;
|
|
17746
17818
|
setHydrationDone();
|
|
17819
|
+
const hasUpdateURL = updateURL !== void 0;
|
|
17747
17820
|
if (!enableAsyncURLUpdates) {
|
|
17748
|
-
|
|
17821
|
+
if (hasUpdateURL)
|
|
17822
|
+
await updateURL();
|
|
17749
17823
|
transitionFn();
|
|
17750
17824
|
void monitorNextPaintAfterRender();
|
|
17751
17825
|
return new Promise((resolve) => {
|
|
@@ -17757,7 +17831,7 @@ function useNavigationTransition(enableAsyncURLUpdates) {
|
|
|
17757
17831
|
navigationController.current = controller;
|
|
17758
17832
|
const signal = controller === null || controller === void 0 ? void 0 : controller.signal;
|
|
17759
17833
|
const nextRender = monitorNextPaintAfterRender();
|
|
17760
|
-
if (!
|
|
17834
|
+
if (!hasUpdateURL) {
|
|
17761
17835
|
navigationController.current = void 0;
|
|
17762
17836
|
transitionFn(signal);
|
|
17763
17837
|
return nextRender;
|
|
@@ -17875,7 +17949,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
17875
17949
|
startNavigation,
|
|
17876
17950
|
startViewTransition2,
|
|
17877
17951
|
]);
|
|
17878
|
-
const setCurrentRouteId = useCallback((routeId, localeId, hash2, pathVariables,
|
|
17952
|
+
const setCurrentRouteId = useCallback((routeId, localeId, hash2, pathVariables, isHistoryTransition, smoothScroll = false, updateURL) => {
|
|
17879
17953
|
const currentRouteId2 = currentRouteRef.current;
|
|
17880
17954
|
currentRouteRef.current = routeId;
|
|
17881
17955
|
currentPathVariablesRef.current = pathVariables;
|
|
@@ -17946,7 +18020,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
17946
18020
|
},
|
|
17947
18021
|
// we yield in startNavigation before updating the URL, so yielding again is not needed.
|
|
17948
18022
|
false, ignorePushStateWrapper);
|
|
17949
|
-
setCurrentRouteId(routeId, currentRouteLocaleId, routeElementId, pathVariables,
|
|
18023
|
+
setCurrentRouteId(routeId, currentRouteLocaleId, routeElementId, pathVariables, false, smoothScroll, disableHistory ? void 0 : updateURL);
|
|
17950
18024
|
}, [routes, setCurrentRouteId, disableHistory, preserveQueryParams, enableAsyncURLUpdates,]);
|
|
17951
18025
|
const getRoute = useGetRouteCallback(routes);
|
|
17952
18026
|
const currentRouteId = currentRouteRef.current;
|
|
@@ -17969,39 +18043,41 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
17969
18043
|
? fillPathVariables(current.path, currentPathVariables)
|
|
17970
18044
|
: current.path;
|
|
17971
18045
|
const remountKey = String(currentLocaleId) + pathWithFilledVariables;
|
|
17972
|
-
return jsx(
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
children:
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
children:
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
|
|
17990
|
-
?
|
|
17991
|
-
|
|
17992
|
-
|
|
17993
|
-
|
|
17994
|
-
|
|
17995
|
-
|
|
17996
|
-
|
|
17997
|
-
|
|
17998
|
-
|
|
18046
|
+
return jsx(GracefullyDegradingErrorBoundary, {
|
|
18047
|
+
children: jsx(RouterAPIProvider, {
|
|
18048
|
+
api,
|
|
18049
|
+
children: jsx(LocaleInfoContext.Provider, {
|
|
18050
|
+
value: localeInfo,
|
|
18051
|
+
children: jsxs(SuspenseThatPreservesDom, {
|
|
18052
|
+
children: [
|
|
18053
|
+
jsx(NotFoundErrorBoundary, {
|
|
18054
|
+
notFoundPage,
|
|
18055
|
+
defaultPageStyle,
|
|
18056
|
+
forceUpdateKey: dep,
|
|
18057
|
+
children: jsx(WithLayoutTemplate, {
|
|
18058
|
+
LayoutTemplate,
|
|
18059
|
+
routeId: currentRouteId,
|
|
18060
|
+
children: jsxs(Fragment, {
|
|
18061
|
+
children: [
|
|
18062
|
+
jsx(MarkSuspenseEffects.Start, {}),
|
|
18063
|
+
pageExistsInCurrentLocale
|
|
18064
|
+
? renderPage(current.page, LayoutTemplate
|
|
18065
|
+
? {
|
|
18066
|
+
...defaultPageStyle,
|
|
18067
|
+
display: 'content',
|
|
18068
|
+
}
|
|
18069
|
+
: defaultPageStyle)
|
|
18070
|
+
: // LAYOUT_TEMPLATE @TODO: display: content for not found page?
|
|
18071
|
+
notFoundPage && renderPage(notFoundPage, defaultPageStyle),
|
|
18072
|
+
],
|
|
18073
|
+
}, remountKey),
|
|
18074
|
+
}),
|
|
17999
18075
|
}),
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
|
|
18004
|
-
|
|
18076
|
+
jsx(TurnOnReactEventHandling, {}),
|
|
18077
|
+
jsx(MarkSuspenseEffects.End, {}),
|
|
18078
|
+
editorBar,
|
|
18079
|
+
],
|
|
18080
|
+
}),
|
|
18005
18081
|
}),
|
|
18006
18082
|
}),
|
|
18007
18083
|
});
|
|
@@ -20435,6 +20511,7 @@ var mockWindow = {
|
|
|
20435
20511
|
scrollY: 0,
|
|
20436
20512
|
location: {
|
|
20437
20513
|
href: '',
|
|
20514
|
+
pathname: '',
|
|
20438
20515
|
},
|
|
20439
20516
|
document: {
|
|
20440
20517
|
cookie: '',
|
|
@@ -20463,6 +20540,7 @@ var mockWindow = {
|
|
|
20463
20540
|
innerWidth: 0,
|
|
20464
20541
|
SVGSVGElement: {},
|
|
20465
20542
|
open: function (_url, _target, _features) { },
|
|
20543
|
+
__framer_events: [],
|
|
20466
20544
|
};
|
|
20467
20545
|
var safeWindow = typeof window === 'undefined' ? mockWindow : window;
|
|
20468
20546
|
var _raf = (f) => {
|
|
@@ -21414,7 +21492,7 @@ function getColorsFromTheme(theme, type) {
|
|
|
21414
21492
|
screenColor: isDarkTheme ? '#333' : '#eee',
|
|
21415
21493
|
};
|
|
21416
21494
|
}
|
|
21417
|
-
var
|
|
21495
|
+
var ErrorBoundary = class extends Component {
|
|
21418
21496
|
constructor() {
|
|
21419
21497
|
super(...arguments);
|
|
21420
21498
|
__publicField(this, 'state', {});
|
|
@@ -21560,7 +21638,7 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
|
|
|
21560
21638
|
ref: screenRef,
|
|
21561
21639
|
children: /* @__PURE__ */ jsx(MotionConfig, {
|
|
21562
21640
|
transformPagePoint: invertScale2,
|
|
21563
|
-
children: /* @__PURE__ */ jsx(
|
|
21641
|
+
children: /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
21564
21642
|
children,
|
|
21565
21643
|
}),
|
|
21566
21644
|
}),
|
|
@@ -26250,7 +26328,7 @@ function useMeasuredSize(ref) {
|
|
|
26250
26328
|
return size.current;
|
|
26251
26329
|
}
|
|
26252
26330
|
var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
|
|
26253
|
-
var withMeasuredSize = (
|
|
26331
|
+
var withMeasuredSize = (Component18) => (props) => {
|
|
26254
26332
|
const ref = React4.useRef(null);
|
|
26255
26333
|
const size = useMeasuredSize(ref);
|
|
26256
26334
|
const dataProps = {
|
|
@@ -26267,7 +26345,7 @@ var withMeasuredSize = (Component16) => (props) => {
|
|
|
26267
26345
|
},
|
|
26268
26346
|
ref,
|
|
26269
26347
|
...dataProps,
|
|
26270
|
-
children: shouldRender && /* @__PURE__ */ jsx(
|
|
26348
|
+
children: shouldRender && /* @__PURE__ */ jsx(Component18, {
|
|
26271
26349
|
...props,
|
|
26272
26350
|
width: (size == null ? void 0 : size.width) ?? fallbackWidth,
|
|
26273
26351
|
height: (size == null ? void 0 : size.height) ?? fallbackHeight,
|
|
@@ -27771,7 +27849,7 @@ var clamp2 = (value, a, b) => {
|
|
|
27771
27849
|
var DraggingContext = /* @__PURE__ */ React4.createContext({
|
|
27772
27850
|
dragging: false,
|
|
27773
27851
|
});
|
|
27774
|
-
function WithDragging(
|
|
27852
|
+
function WithDragging(Component18) {
|
|
27775
27853
|
const _WithDraggingHOC = class extends React4.Component {
|
|
27776
27854
|
constructor(props, defaultProps) {
|
|
27777
27855
|
super(props, defaultProps);
|
|
@@ -28340,7 +28418,7 @@ function WithDragging(Component16) {
|
|
|
28340
28418
|
value: {
|
|
28341
28419
|
dragging: this.state.isDragging,
|
|
28342
28420
|
},
|
|
28343
|
-
children: /* @__PURE__ */ jsx(
|
|
28421
|
+
children: /* @__PURE__ */ jsx(Component18, {
|
|
28344
28422
|
...originalProps,
|
|
28345
28423
|
}),
|
|
28346
28424
|
});
|
|
@@ -28378,9 +28456,9 @@ function WithDragging(Component16) {
|
|
|
28378
28456
|
constraints: {},
|
|
28379
28457
|
mouseWheel: false,
|
|
28380
28458
|
});
|
|
28381
|
-
__publicField(WithDraggingHOC, 'defaultProps', Object.assign({},
|
|
28459
|
+
__publicField(WithDraggingHOC, 'defaultProps', Object.assign({}, Component18.defaultProps, _WithDraggingHOC.draggingDefaultProps));
|
|
28382
28460
|
const withDragging = WithDraggingHOC;
|
|
28383
|
-
(0, import_hoist_non_react_statics.default)(withDragging,
|
|
28461
|
+
(0, import_hoist_non_react_statics.default)(withDragging, Component18);
|
|
28384
28462
|
return withDragging;
|
|
28385
28463
|
}
|
|
28386
28464
|
var hoverProps = {
|
|
@@ -31156,7 +31234,7 @@ function useInfiniteScroll({ ref: elementRef, loadMore, rootMargin = '0px', thre
|
|
|
31156
31234
|
};
|
|
31157
31235
|
}, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,]);
|
|
31158
31236
|
}
|
|
31159
|
-
function withInfiniteScroll(
|
|
31237
|
+
function withInfiniteScroll(Component18) {
|
|
31160
31238
|
return React4.forwardRef(({ __paginationInfo, __loadMore, ...props }, ref) => {
|
|
31161
31239
|
const backupRef = React4.useRef(null);
|
|
31162
31240
|
const infiniteScrollRef = ref ?? backupRef;
|
|
@@ -31166,7 +31244,7 @@ function withInfiniteScroll(Component16) {
|
|
|
31166
31244
|
ref: infiniteScrollRef,
|
|
31167
31245
|
paginationInfo: __paginationInfo,
|
|
31168
31246
|
});
|
|
31169
|
-
return /* @__PURE__ */ jsx(
|
|
31247
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
31170
31248
|
...props,
|
|
31171
31249
|
ref: infiniteScrollRef,
|
|
31172
31250
|
});
|
|
@@ -33943,20 +34021,20 @@ function convertColorProps(props) {
|
|
|
33943
34021
|
}
|
|
33944
34022
|
return props;
|
|
33945
34023
|
}
|
|
33946
|
-
function WithOverride(
|
|
34024
|
+
function WithOverride(Component18, override) {
|
|
33947
34025
|
const useOverride = typeof override === 'function' ? (props) => override(convertColorProps(props)) : () => convertColorProps(override);
|
|
33948
34026
|
const ComponentWithOverride = function (props) {
|
|
33949
34027
|
useContext(DataObserverContext);
|
|
33950
34028
|
const overrideProps = useOverride(props);
|
|
33951
34029
|
const { style, ...rest } = props;
|
|
33952
|
-
return /* @__PURE__ */ jsx(
|
|
34030
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
33953
34031
|
...rest,
|
|
33954
34032
|
...overrideProps,
|
|
33955
34033
|
_initialStyle: style,
|
|
33956
34034
|
});
|
|
33957
34035
|
};
|
|
33958
|
-
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride,
|
|
33959
|
-
ComponentWithOverride['displayName'] = `WithOverride(${
|
|
34036
|
+
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component18);
|
|
34037
|
+
ComponentWithOverride['displayName'] = `WithOverride(${Component18.displayName || Component18.name})`;
|
|
33960
34038
|
return ComponentWithOverride;
|
|
33961
34039
|
}
|
|
33962
34040
|
var prefix = '__framer__';
|
|
@@ -34760,10 +34838,10 @@ function addMotionValueStyle(style, values) {
|
|
|
34760
34838
|
function isVariantOrVariantList(value) {
|
|
34761
34839
|
return isString2(value) || Array.isArray(value);
|
|
34762
34840
|
}
|
|
34763
|
-
var withFX = (
|
|
34841
|
+
var withFX = (Component18) => React4.forwardRef((props, forwardedRef) => {
|
|
34764
34842
|
var _a;
|
|
34765
34843
|
if (props.__withFX) {
|
|
34766
|
-
return /* @__PURE__ */ jsx(
|
|
34844
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
34767
34845
|
...props,
|
|
34768
34846
|
animate: void 0,
|
|
34769
34847
|
initial: void 0,
|
|
@@ -34774,7 +34852,7 @@ var withFX = (Component16) => React4.forwardRef((props, forwardedRef) => {
|
|
|
34774
34852
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
34775
34853
|
const animate4 = isVariantOrVariantList(props.animate) ? props.animate : void 0;
|
|
34776
34854
|
const initial2 = isVariantOrVariantList(props.initial) ? props.initial : void 0;
|
|
34777
|
-
return /* @__PURE__ */ jsx(
|
|
34855
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
34778
34856
|
...props,
|
|
34779
34857
|
animate: animate4,
|
|
34780
34858
|
initial: initial2,
|
|
@@ -34852,7 +34930,7 @@ var withFX = (Component16) => React4.forwardRef((props, forwardedRef) => {
|
|
|
34852
34930
|
exit,
|
|
34853
34931
|
}
|
|
34854
34932
|
: {};
|
|
34855
|
-
return /* @__PURE__ */ jsx(
|
|
34933
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
34856
34934
|
...forwardedProps,
|
|
34857
34935
|
...motionGestures,
|
|
34858
34936
|
__withFX: true,
|
|
@@ -34975,7 +35053,7 @@ var ComponentViewportContext = /* @__PURE__ */ React4.createContext({});
|
|
|
34975
35053
|
function useComponentViewport() {
|
|
34976
35054
|
return React4.useContext(ComponentViewportContext);
|
|
34977
35055
|
}
|
|
34978
|
-
var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(({ width, height, y, children, ...rest }, ref)
|
|
35056
|
+
var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(function ComponentViewportProvider2({ width, height, y, children, ...rest }, ref) {
|
|
34979
35057
|
const componentViewport = React4.useMemo(() => {
|
|
34980
35058
|
return {
|
|
34981
35059
|
width,
|
|
@@ -34989,9 +35067,9 @@ var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(({ width, heig
|
|
|
34989
35067
|
children: cloneWithPropsAndRef(children, rest),
|
|
34990
35068
|
});
|
|
34991
35069
|
});
|
|
34992
|
-
var withGeneratedLayoutId = (
|
|
35070
|
+
var withGeneratedLayoutId = (Component18) => React4.forwardRef((props, ref) => {
|
|
34993
35071
|
const layoutId = useLayoutId2(props);
|
|
34994
|
-
return /* @__PURE__ */ jsx(
|
|
35072
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
34995
35073
|
layoutId,
|
|
34996
35074
|
...props,
|
|
34997
35075
|
layoutIdKey: void 0,
|
|
@@ -34999,7 +35077,84 @@ var withGeneratedLayoutId = (Component16) => React4.forwardRef((props, ref) => {
|
|
|
34999
35077
|
ref,
|
|
35000
35078
|
});
|
|
35001
35079
|
});
|
|
35002
|
-
|
|
35080
|
+
function collectErrorToAnalytics(error, errorInfo) {
|
|
35081
|
+
var _a;
|
|
35082
|
+
if (typeof window === 'undefined')
|
|
35083
|
+
return;
|
|
35084
|
+
if (Math.random() > 0.01)
|
|
35085
|
+
return;
|
|
35086
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
35087
|
+
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
35088
|
+
(_a = safeWindow.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
35089
|
+
message: String(error),
|
|
35090
|
+
stack,
|
|
35091
|
+
// only log componentStack if we don't have a stack
|
|
35092
|
+
componentStack: stack ? void 0 : componentStack,
|
|
35093
|
+
},]);
|
|
35094
|
+
}
|
|
35095
|
+
function logError(...args) {
|
|
35096
|
+
if (false)
|
|
35097
|
+
return;
|
|
35098
|
+
console.error(...args);
|
|
35099
|
+
}
|
|
35100
|
+
function shouldEnableCodeBoundaries() {
|
|
35101
|
+
return RenderTarget.current() !== RenderTarget.canvas;
|
|
35102
|
+
}
|
|
35103
|
+
function CodeComponentBoundary({ errorMessage, fallback, children, }) {
|
|
35104
|
+
if (!shouldEnableCodeBoundaries()) {
|
|
35105
|
+
return children;
|
|
35106
|
+
}
|
|
35107
|
+
return /* @__PURE__ */ jsx(ClientSideErrorBoundary, {
|
|
35108
|
+
fallback,
|
|
35109
|
+
errorMessage,
|
|
35110
|
+
children: /* @__PURE__ */ jsx(ServerSideErrorBoundary, {
|
|
35111
|
+
fallback,
|
|
35112
|
+
children,
|
|
35113
|
+
}),
|
|
35114
|
+
});
|
|
35115
|
+
}
|
|
35116
|
+
var ClientSideErrorBoundary = class extends Component {
|
|
35117
|
+
constructor() {
|
|
35118
|
+
super(...arguments);
|
|
35119
|
+
__publicField(this, 'state', {
|
|
35120
|
+
hasError: false,
|
|
35121
|
+
});
|
|
35122
|
+
}
|
|
35123
|
+
static getDerivedStateFromError() {
|
|
35124
|
+
return {
|
|
35125
|
+
hasError: true,
|
|
35126
|
+
};
|
|
35127
|
+
}
|
|
35128
|
+
componentDidCatch(error, errorInfo) {
|
|
35129
|
+
logError(this.props.errorMessage, errorInfo == null ? void 0 : errorInfo.componentStack);
|
|
35130
|
+
collectErrorToAnalytics(error, errorInfo);
|
|
35131
|
+
}
|
|
35132
|
+
render() {
|
|
35133
|
+
const { children, fallback = null, } = this.props;
|
|
35134
|
+
const { hasError, } = this.state;
|
|
35135
|
+
return hasError ? fallback : children;
|
|
35136
|
+
}
|
|
35137
|
+
};
|
|
35138
|
+
function ServerSideErrorBoundary({ children, fallback = null, }) {
|
|
35139
|
+
return typeof window === 'undefined'
|
|
35140
|
+
? // On the server, Suspense fallback is activated by errors. So we use the actual Suspense,
|
|
35141
|
+
// and render the actual error fallback if Suspense activates.
|
|
35142
|
+
/* @__PURE__ */
|
|
35143
|
+
jsx(Suspense2, {
|
|
35144
|
+
fallback,
|
|
35145
|
+
children,
|
|
35146
|
+
})
|
|
35147
|
+
: // On the client, Suspense fallback is activated by data fetching. So we use SuspenseThatPreservesDom,
|
|
35148
|
+
// because we don’t want to render a fallback if the boundary gets inadvertently activated.
|
|
35149
|
+
//
|
|
35150
|
+
// “Why won’t you just render plain children without Suspense?” Because that would cause a hydration mismatch
|
|
35151
|
+
// (the server has Suspense, the client doesn’t).
|
|
35152
|
+
/* @__PURE__ */
|
|
35153
|
+
jsx(SuspenseThatPreservesDom, {
|
|
35154
|
+
children,
|
|
35155
|
+
});
|
|
35156
|
+
}
|
|
35157
|
+
var DeprecatedContainerErrorBoundary = class extends Component {
|
|
35003
35158
|
constructor() {
|
|
35004
35159
|
super(...arguments);
|
|
35005
35160
|
__publicField(this, 'state', {
|
|
@@ -35009,21 +35164,12 @@ var ContainerErrorBoundary = class extends Component {
|
|
|
35009
35164
|
// We use `componentDidCatch` instead of `static getDerivedStateFromError()` because the latter could also catch hydration errors.
|
|
35010
35165
|
// Hydration errors are recoverable by React, so we don't want to hide the coponent in that case (since the tree will not unmount).
|
|
35011
35166
|
componentDidCatch(error, errorInfo) {
|
|
35012
|
-
var _a;
|
|
35013
35167
|
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
35014
35168
|
console.error('Error in component (see previous log). This component has been hidden. Please check any custom code or code overrides to fix.', componentStack);
|
|
35015
35169
|
this.setState({
|
|
35016
35170
|
hasError: true,
|
|
35017
35171
|
});
|
|
35018
|
-
|
|
35019
|
-
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
35020
|
-
(_a = window.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
35021
|
-
message: String(error),
|
|
35022
|
-
stack,
|
|
35023
|
-
// only log componentStack if we don't have a stack
|
|
35024
|
-
componentStack: stack ? void 0 : componentStack,
|
|
35025
|
-
},]);
|
|
35026
|
-
}
|
|
35172
|
+
collectErrorToAnalytics(error, errorInfo);
|
|
35027
35173
|
}
|
|
35028
35174
|
render() {
|
|
35029
35175
|
const { children, } = this.props;
|
|
@@ -35031,9 +35177,63 @@ var ContainerErrorBoundary = class extends Component {
|
|
|
35031
35177
|
return hasError ? null : children;
|
|
35032
35178
|
}
|
|
35033
35179
|
};
|
|
35034
|
-
var
|
|
35180
|
+
var CRASH_ERROR_MESSAGE_PREFIX = 'code-crash:';
|
|
35181
|
+
function formatCodeCrashLocationFromSourceNode(scopeId, nodeId) {
|
|
35182
|
+
return `${CRASH_ERROR_MESSAGE_PREFIX}${scopeId}:${nodeId}`;
|
|
35183
|
+
}
|
|
35184
|
+
function getErrorMessageForComponent(scopeId, nodeId) {
|
|
35185
|
+
return getErrorMessageFor('component', scopeId, nodeId);
|
|
35186
|
+
}
|
|
35187
|
+
function getErrorMessageForOverride(scopeId, nodeId) {
|
|
35188
|
+
return getErrorMessageFor('override', scopeId, nodeId);
|
|
35189
|
+
}
|
|
35190
|
+
function getErrorMessageFor(element, scopeId, nodeId) {
|
|
35191
|
+
return `A code ${element} crashed while rendering due to the error above. To find and fix it, open the project in the editor \u2192 open Quick Actions (press Cmd+K or Ctrl+K) \u2192 paste this: ${formatCodeCrashLocationFromSourceNode(scopeId, nodeId)} \u2192 click \u201CShow Layer\u201D.`;
|
|
35192
|
+
}
|
|
35193
|
+
var IsInExternalComponentContext = /* @__PURE__ */ (() => React4.createContext(0))();
|
|
35194
|
+
function useExternalComponentNestingLevel() {
|
|
35195
|
+
return React4.useContext(IsInExternalComponentContext);
|
|
35196
|
+
}
|
|
35197
|
+
function IsExternalComponent({ children, }) {
|
|
35198
|
+
const count = React4.useContext(IsInExternalComponentContext);
|
|
35199
|
+
return /* @__PURE__ */ jsx(IsInExternalComponentContext.Provider, {
|
|
35200
|
+
value: count + 1,
|
|
35201
|
+
children,
|
|
35202
|
+
});
|
|
35203
|
+
}
|
|
35204
|
+
function shouldWrapComponentWithBoundary(externalModuleNestingLevel, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
35205
|
+
const isLocalComponentInstance =
|
|
35206
|
+
// We know a component instance is local when it’s not nested inside any external component...
|
|
35207
|
+
externalModuleNestingLevel === 0 ||
|
|
35208
|
+
// ...or – “Ticker edge case” – when it’s nested inside an external component during React rendering,
|
|
35209
|
+
// but is actually defined in a slot that’s passed into the component. (This is the “Ticker edge case”:
|
|
35210
|
+
// if a site has a Ticker (or any other component with slots), and something in a Ticker’s slot crashes,
|
|
35211
|
+
// we want to disable that something, not the whole ticker.)
|
|
35212
|
+
externalModuleNestingLevel === 1 && inComponentSlot;
|
|
35213
|
+
return (isAuthoredByUser || isExternalComponent) && isLocalComponentInstance;
|
|
35214
|
+
}
|
|
35215
|
+
function shouldWrapOverrideWithBoundary(externalModuleNestingLevel, inComponentSlot) {
|
|
35216
|
+
const isWrappingFrameLocalToProject =
|
|
35217
|
+
// We know a frame is local when it’s not nested inside any external component...
|
|
35218
|
+
externalModuleNestingLevel === 0 ||
|
|
35219
|
+
// ...or – “Ticker edge case” – when it’s nested inside an external component during React rendering,
|
|
35220
|
+
// but is actually defined in a slot that’s passed into the component. (This is the “Ticker edge case”:
|
|
35221
|
+
// if a site has a Ticker (or any other component with slots), and an override in a Ticker’s slot crashes,
|
|
35222
|
+
// we want to disable that override, not the whole ticker.)
|
|
35223
|
+
externalModuleNestingLevel === 1 && inComponentSlot;
|
|
35224
|
+
return isWrappingFrameLocalToProject;
|
|
35225
|
+
}
|
|
35226
|
+
var ContainerInner = /* @__PURE__ */ React4.forwardRef(({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, ...props }, ref) => {
|
|
35035
35227
|
const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
|
|
35036
35228
|
const MotionComponent = htmlElementAsMotionComponent(as);
|
|
35229
|
+
const clonedChildren = React4.Children.map(children, (child) => {
|
|
35230
|
+
return React4.isValidElement(child)
|
|
35231
|
+
? React4.cloneElement(child, {
|
|
35232
|
+
layoutId,
|
|
35233
|
+
})
|
|
35234
|
+
: child;
|
|
35235
|
+
});
|
|
35236
|
+
const childrenWithCodeBoundary = useWrapWithCodeBoundary(clonedChildren, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);
|
|
35037
35237
|
return /* @__PURE__ */ jsx(MotionComponent, {
|
|
35038
35238
|
layoutId: outerLayoutId,
|
|
35039
35239
|
...props,
|
|
@@ -35045,21 +35245,62 @@ var Providers = /* @__PURE__ */ React4.forwardRef(({ children, layoutId, as, ...
|
|
|
35045
35245
|
children: /* @__PURE__ */ jsx(LayoutGroup, {
|
|
35046
35246
|
id: layoutId ?? '',
|
|
35047
35247
|
inherit: 'id',
|
|
35048
|
-
children:
|
|
35049
|
-
children: React4.Children.map(children, (child) => {
|
|
35050
|
-
return React4.isValidElement(child)
|
|
35051
|
-
? React4.cloneElement(child, {
|
|
35052
|
-
layoutId,
|
|
35053
|
-
})
|
|
35054
|
-
: child;
|
|
35055
|
-
}),
|
|
35056
|
-
}),
|
|
35248
|
+
children: childrenWithCodeBoundary,
|
|
35057
35249
|
}),
|
|
35058
35250
|
}),
|
|
35059
35251
|
}),
|
|
35060
35252
|
});
|
|
35061
35253
|
});
|
|
35062
|
-
var Container = /* @__PURE__ */ withGeneratedLayoutId(
|
|
35254
|
+
var Container = /* @__PURE__ */ withGeneratedLayoutId(ContainerInner);
|
|
35255
|
+
var SmartComponentScopedContainer = /* @__PURE__ */ React4.forwardRef((props, ref) => {
|
|
35256
|
+
const { as, layoutId, scopeId, nodeId, isAuthoredByUser, rendersWithMotion, isModuleExternal, inComponentSlot, style, children, ...renderableProps } = props;
|
|
35257
|
+
const childrenWithCodeBoundary = useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);
|
|
35258
|
+
const tagName = props.as ?? 'div';
|
|
35259
|
+
if (props.rendersWithMotion) {
|
|
35260
|
+
const Component18 = htmlElementAsMotionComponent(tagName);
|
|
35261
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
35262
|
+
ref,
|
|
35263
|
+
style: props.style,
|
|
35264
|
+
...renderableProps,
|
|
35265
|
+
children: childrenWithCodeBoundary,
|
|
35266
|
+
});
|
|
35267
|
+
}
|
|
35268
|
+
else {
|
|
35269
|
+
const Component18 = tagName;
|
|
35270
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
35271
|
+
ref,
|
|
35272
|
+
style: props.style,
|
|
35273
|
+
...renderableProps,
|
|
35274
|
+
children: childrenWithCodeBoundary,
|
|
35275
|
+
});
|
|
35276
|
+
}
|
|
35277
|
+
});
|
|
35278
|
+
function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
35279
|
+
const externalModuleNestingLevel = useExternalComponentNestingLevel();
|
|
35280
|
+
if (
|
|
35281
|
+
// Those props will either be all undefined, which means the Container wasn’t codegenned yet,
|
|
35282
|
+
// and we should use the old ContainerErrorBoundary –
|
|
35283
|
+
// or all defined, which means we have enough information to use the new boundary.
|
|
35284
|
+
isUndefined(scopeId) || isUndefined(nodeId)) {
|
|
35285
|
+
return /* @__PURE__ */ jsx(DeprecatedContainerErrorBoundary, {
|
|
35286
|
+
children,
|
|
35287
|
+
});
|
|
35288
|
+
}
|
|
35289
|
+
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(externalModuleNestingLevel, isAuthoredByUser ?? false, isExternalComponent ?? false, inComponentSlot ?? false);
|
|
35290
|
+
if (shouldWrapWithBoundary) {
|
|
35291
|
+
children = /* @__PURE__ */ jsx(CodeComponentBoundary, {
|
|
35292
|
+
errorMessage: getErrorMessageForComponent(scopeId, nodeId),
|
|
35293
|
+
fallback: null,
|
|
35294
|
+
children,
|
|
35295
|
+
});
|
|
35296
|
+
}
|
|
35297
|
+
if (isExternalComponent) {
|
|
35298
|
+
children = /* @__PURE__ */ jsx(IsExternalComponent, {
|
|
35299
|
+
children,
|
|
35300
|
+
});
|
|
35301
|
+
}
|
|
35302
|
+
return children;
|
|
35303
|
+
}
|
|
35063
35304
|
var StyleSheetContext = /* @__PURE__ */ React4.createContext(void 0);
|
|
35064
35305
|
var framerPostSSRCSSSelector = 'style[data-framer-css-ssr-minified]';
|
|
35065
35306
|
var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
@@ -35074,7 +35315,7 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
|
35074
35315
|
return new Set(componentsWithSSRStylesAttr.split(' '));
|
|
35075
35316
|
})();
|
|
35076
35317
|
var framerCSSMarker = 'data-framer-css-ssr';
|
|
35077
|
-
var withCSS = (
|
|
35318
|
+
var withCSS = (Component18, escapedCSS, componentSerializationId) => React4.forwardRef((props, ref) => {
|
|
35078
35319
|
const { sheet, cache: cache2, } = React4.useContext(StyleSheetContext) ?? {};
|
|
35079
35320
|
if (!isBrowser2()) {
|
|
35080
35321
|
if (isFunction(escapedCSS))
|
|
@@ -35091,7 +35332,7 @@ var withCSS = (Component16, escapedCSS, componentSerializationId) => React4.forw
|
|
|
35091
35332
|
__html: concatenatedCSS,
|
|
35092
35333
|
},
|
|
35093
35334
|
}),
|
|
35094
|
-
/* @__PURE__ */ jsx(
|
|
35335
|
+
/* @__PURE__ */ jsx(Component18, {
|
|
35095
35336
|
...props,
|
|
35096
35337
|
ref,
|
|
35097
35338
|
}),
|
|
@@ -35108,7 +35349,7 @@ var withCSS = (Component16, escapedCSS, componentSerializationId) => React4.forw
|
|
|
35108
35349
|
: escapedCSS.split('\n');
|
|
35109
35350
|
css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
|
|
35110
35351
|
}, []);
|
|
35111
|
-
return /* @__PURE__ */ jsx(
|
|
35352
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
35112
35353
|
...props,
|
|
35113
35354
|
ref,
|
|
35114
35355
|
});
|
|
@@ -36080,10 +36321,10 @@ function ChildrenCanSuspend({ children, }) {
|
|
|
36080
36321
|
children,
|
|
36081
36322
|
});
|
|
36082
36323
|
}
|
|
36083
|
-
function withChildrenCanSuspend(
|
|
36324
|
+
function withChildrenCanSuspend(Component18) {
|
|
36084
36325
|
return forwardRef(function withChildrenCanSuspendInner(props, ref) {
|
|
36085
36326
|
return /* @__PURE__ */ jsx(ChildrenCanSuspend, {
|
|
36086
|
-
children: /* @__PURE__ */ jsx(
|
|
36327
|
+
children: /* @__PURE__ */ jsx(Component18, {
|
|
36087
36328
|
...props,
|
|
36088
36329
|
ref,
|
|
36089
36330
|
}),
|
|
@@ -36634,7 +36875,7 @@ function getRouteFromPageLink(pageLink, router, currentRoute) {
|
|
|
36634
36875
|
const { webPageId, } = pageLink;
|
|
36635
36876
|
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
36636
36877
|
}
|
|
36637
|
-
var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwardRef(({ children, href, openInNewTab, smoothScroll, nodeId, ...restProps }, forwardedRef)
|
|
36878
|
+
var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwardRef(function Link2({ children, href, openInNewTab, smoothScroll, nodeId, ...restProps }, forwardedRef) {
|
|
36638
36879
|
const router = useRouter();
|
|
36639
36880
|
const currentRoute = useCurrentRoute();
|
|
36640
36881
|
const implicitPathVariables = useImplicitPathVariables();
|
|
@@ -37653,12 +37894,8 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
|
|
|
37653
37894
|
},
|
|
37654
37895
|
preserveQueryParams,
|
|
37655
37896
|
enableAsyncURLUpdates,
|
|
37656
|
-
editorBar:
|
|
37657
|
-
|
|
37658
|
-
children: /* @__PURE__ */ jsx(EditorBar, {
|
|
37659
|
-
framerSiteId,
|
|
37660
|
-
}),
|
|
37661
|
-
}),
|
|
37897
|
+
editorBar: /* @__PURE__ */ jsx(EditorBarLauncher, {
|
|
37898
|
+
EditorBar,
|
|
37662
37899
|
}),
|
|
37663
37900
|
}),
|
|
37664
37901
|
}),
|
|
@@ -37683,6 +37920,24 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
|
|
|
37683
37920
|
});
|
|
37684
37921
|
}
|
|
37685
37922
|
}
|
|
37923
|
+
function EditorBarLauncher({ EditorBar, }) {
|
|
37924
|
+
const [mounted, setMounted,] = useState(false);
|
|
37925
|
+
const framerSiteId = useContext(FormContext);
|
|
37926
|
+
useEffect(() => {
|
|
37927
|
+
startTransition2(() => {
|
|
37928
|
+
setMounted(true);
|
|
37929
|
+
});
|
|
37930
|
+
}, []);
|
|
37931
|
+
if (!EditorBar || !framerSiteId || !mounted)
|
|
37932
|
+
return null;
|
|
37933
|
+
return /* @__PURE__ */ jsx(IgnoreErrors, {
|
|
37934
|
+
children: /* @__PURE__ */ jsx(Suspense2, {
|
|
37935
|
+
children: /* @__PURE__ */ jsx(EditorBar, {
|
|
37936
|
+
framerSiteId,
|
|
37937
|
+
}),
|
|
37938
|
+
}),
|
|
37939
|
+
});
|
|
37940
|
+
}
|
|
37686
37941
|
function cloneChildrenWithProps(children, props, asNode) {
|
|
37687
37942
|
const cloned = React2.Children.map(children, (child) => {
|
|
37688
37943
|
if (React2.isValidElement(child)) {
|
|
@@ -38276,61 +38531,61 @@ var DatabaseValue = {
|
|
|
38276
38531
|
* Checks if the left value is equal to the right value. Returns false if
|
|
38277
38532
|
* the values are not of the same type.
|
|
38278
38533
|
*/
|
|
38279
|
-
equal(left, right,
|
|
38534
|
+
equal(left, right, collation11) {
|
|
38280
38535
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38281
38536
|
return false;
|
|
38282
38537
|
}
|
|
38283
|
-
return compare(left, right,
|
|
38538
|
+
return compare(left, right, collation11) === 0;
|
|
38284
38539
|
},
|
|
38285
38540
|
/**
|
|
38286
38541
|
* Checks if the left value is less than the right value. Returns false if
|
|
38287
38542
|
* the values are not of the same type.
|
|
38288
38543
|
*/
|
|
38289
|
-
lessThan(left, right,
|
|
38544
|
+
lessThan(left, right, collation11) {
|
|
38290
38545
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38291
38546
|
return false;
|
|
38292
38547
|
}
|
|
38293
|
-
return compare(left, right,
|
|
38548
|
+
return compare(left, right, collation11) < 0;
|
|
38294
38549
|
},
|
|
38295
38550
|
/**
|
|
38296
38551
|
* Checks if the left value is less than or equal to the right value.
|
|
38297
38552
|
* Returns false if the values are not of the same type.
|
|
38298
38553
|
*/
|
|
38299
|
-
lessThanOrEqual(left, right,
|
|
38554
|
+
lessThanOrEqual(left, right, collation11) {
|
|
38300
38555
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38301
38556
|
return false;
|
|
38302
38557
|
}
|
|
38303
|
-
return compare(left, right,
|
|
38558
|
+
return compare(left, right, collation11) <= 0;
|
|
38304
38559
|
},
|
|
38305
38560
|
/**
|
|
38306
38561
|
* Checks if the left value is greater than the right value. Returns false
|
|
38307
38562
|
* if the values are not of the same type.
|
|
38308
38563
|
*/
|
|
38309
|
-
greaterThan(left, right,
|
|
38564
|
+
greaterThan(left, right, collation11) {
|
|
38310
38565
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38311
38566
|
return false;
|
|
38312
38567
|
}
|
|
38313
|
-
return compare(left, right,
|
|
38568
|
+
return compare(left, right, collation11) > 0;
|
|
38314
38569
|
},
|
|
38315
38570
|
/**
|
|
38316
38571
|
* Checks if the left value is greater than or equal to the right value.
|
|
38317
38572
|
* Returns false if the values are not of the same type.
|
|
38318
38573
|
*/
|
|
38319
|
-
greaterThanOrEqual(left, right,
|
|
38574
|
+
greaterThanOrEqual(left, right, collation11) {
|
|
38320
38575
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38321
38576
|
return false;
|
|
38322
38577
|
}
|
|
38323
|
-
return compare(left, right,
|
|
38578
|
+
return compare(left, right, collation11) >= 0;
|
|
38324
38579
|
},
|
|
38325
38580
|
/**
|
|
38326
38581
|
* Checks if the left value is in the right value. Returns false if the
|
|
38327
38582
|
* right value is not an array.
|
|
38328
38583
|
*/
|
|
38329
|
-
in(left, right,
|
|
38584
|
+
in(left, right, collation11) {
|
|
38330
38585
|
if ((right == null ? void 0 : right.type) !== 'array')
|
|
38331
38586
|
return false;
|
|
38332
38587
|
return right.value.some((item) => {
|
|
38333
|
-
return DatabaseValue.equal(item, left,
|
|
38588
|
+
return DatabaseValue.equal(item, left, collation11);
|
|
38334
38589
|
});
|
|
38335
38590
|
},
|
|
38336
38591
|
/**
|
|
@@ -38338,47 +38593,47 @@ var DatabaseValue = {
|
|
|
38338
38593
|
*
|
|
38339
38594
|
* If source has duplicates, the index of the first occurrence is always returned.
|
|
38340
38595
|
*/
|
|
38341
|
-
indexOf(source, target,
|
|
38596
|
+
indexOf(source, target, collation11) {
|
|
38342
38597
|
if ((source == null ? void 0 : source.type) !== 'array')
|
|
38343
38598
|
return -1;
|
|
38344
38599
|
return source.value.findIndex((item) => {
|
|
38345
|
-
return DatabaseValue.equal(item, target,
|
|
38600
|
+
return DatabaseValue.equal(item, target, collation11);
|
|
38346
38601
|
});
|
|
38347
38602
|
},
|
|
38348
|
-
contains(source, target,
|
|
38603
|
+
contains(source, target, collation11) {
|
|
38349
38604
|
let sourceValue = toString(source);
|
|
38350
38605
|
let targetValue = toString(target);
|
|
38351
38606
|
if (isNull(sourceValue))
|
|
38352
38607
|
return false;
|
|
38353
38608
|
if (isNull(targetValue))
|
|
38354
38609
|
return false;
|
|
38355
|
-
if (
|
|
38610
|
+
if (collation11.type === 0) {
|
|
38356
38611
|
sourceValue = sourceValue.toLowerCase();
|
|
38357
38612
|
targetValue = targetValue.toLowerCase();
|
|
38358
38613
|
}
|
|
38359
38614
|
return sourceValue.includes(targetValue);
|
|
38360
38615
|
},
|
|
38361
|
-
startsWith(source, target,
|
|
38616
|
+
startsWith(source, target, collation11) {
|
|
38362
38617
|
let sourceValue = toString(source);
|
|
38363
38618
|
let targetValue = toString(target);
|
|
38364
38619
|
if (isNull(sourceValue))
|
|
38365
38620
|
return false;
|
|
38366
38621
|
if (isNull(targetValue))
|
|
38367
38622
|
return false;
|
|
38368
|
-
if (
|
|
38623
|
+
if (collation11.type === 0) {
|
|
38369
38624
|
sourceValue = sourceValue.toLowerCase();
|
|
38370
38625
|
targetValue = targetValue.toLowerCase();
|
|
38371
38626
|
}
|
|
38372
38627
|
return sourceValue.startsWith(targetValue);
|
|
38373
38628
|
},
|
|
38374
|
-
endsWith(source, target,
|
|
38629
|
+
endsWith(source, target, collation11) {
|
|
38375
38630
|
let sourceValue = toString(source);
|
|
38376
38631
|
let targetValue = toString(target);
|
|
38377
38632
|
if (isNull(sourceValue))
|
|
38378
38633
|
return false;
|
|
38379
38634
|
if (isNull(targetValue))
|
|
38380
38635
|
return false;
|
|
38381
|
-
if (
|
|
38636
|
+
if (collation11.type === 0) {
|
|
38382
38637
|
sourceValue = sourceValue.toLowerCase();
|
|
38383
38638
|
targetValue = targetValue.toLowerCase();
|
|
38384
38639
|
}
|
|
@@ -38424,7 +38679,7 @@ var DatabaseValue = {
|
|
|
38424
38679
|
}
|
|
38425
38680
|
},
|
|
38426
38681
|
};
|
|
38427
|
-
function compare(left, right,
|
|
38682
|
+
function compare(left, right, collation11) {
|
|
38428
38683
|
if (isNull(left) || isNull(right)) {
|
|
38429
38684
|
assert(left === right);
|
|
38430
38685
|
return 0;
|
|
@@ -38443,7 +38698,7 @@ function compare(left, right, collation10) {
|
|
|
38443
38698
|
const rightItem = right.value[i];
|
|
38444
38699
|
assert(!isUndefined(leftItem), 'Left item must exist');
|
|
38445
38700
|
assert(!isUndefined(rightItem), 'Right item must exist');
|
|
38446
|
-
const result = compare(leftItem, rightItem,
|
|
38701
|
+
const result = compare(leftItem, rightItem, collation11);
|
|
38447
38702
|
if (result !== 0)
|
|
38448
38703
|
return result;
|
|
38449
38704
|
}
|
|
@@ -38530,7 +38785,7 @@ function compare(left, right, collation10) {
|
|
|
38530
38785
|
const rightValue = right.value[rightKey];
|
|
38531
38786
|
assert(!isUndefined(leftValue), 'Left value must exist');
|
|
38532
38787
|
assert(!isUndefined(rightValue), 'Right value must exist');
|
|
38533
|
-
const result = compare(leftValue, rightValue,
|
|
38788
|
+
const result = compare(leftValue, rightValue, collation11);
|
|
38534
38789
|
if (result !== 0)
|
|
38535
38790
|
return result;
|
|
38536
38791
|
}
|
|
@@ -38560,7 +38815,7 @@ function compare(left, right, collation10) {
|
|
|
38560
38815
|
assert(left.type === right.type);
|
|
38561
38816
|
let leftValue = left.value;
|
|
38562
38817
|
let rightValue = right.value;
|
|
38563
|
-
if (
|
|
38818
|
+
if (collation11.type === 0) {
|
|
38564
38819
|
leftValue = left.value.toLowerCase();
|
|
38565
38820
|
rightValue = right.value.toLowerCase();
|
|
38566
38821
|
}
|
|
@@ -38579,6 +38834,208 @@ var unknownDefinition = {
|
|
|
38579
38834
|
type: 'unknown',
|
|
38580
38835
|
isNullable: true,
|
|
38581
38836
|
};
|
|
38837
|
+
function getNetworkLatency() {
|
|
38838
|
+
return 25;
|
|
38839
|
+
}
|
|
38840
|
+
function getNetworkSpeed() {
|
|
38841
|
+
return 100 * 125;
|
|
38842
|
+
}
|
|
38843
|
+
var KB = 1e3;
|
|
38844
|
+
var Cost = class {
|
|
38845
|
+
constructor(network) {
|
|
38846
|
+
this.network = network;
|
|
38847
|
+
}
|
|
38848
|
+
static estimate(totalRequests, transferredBytes) {
|
|
38849
|
+
const latency = getNetworkLatency();
|
|
38850
|
+
const speed = getNetworkSpeed();
|
|
38851
|
+
const network = totalRequests * latency + transferredBytes / speed;
|
|
38852
|
+
return new Cost(network);
|
|
38853
|
+
}
|
|
38854
|
+
static max(left, right) {
|
|
38855
|
+
const network = Math.max(left.network, right.network);
|
|
38856
|
+
return new Cost(network);
|
|
38857
|
+
}
|
|
38858
|
+
static compare(left, right) {
|
|
38859
|
+
if (left.network < right.network)
|
|
38860
|
+
return -1;
|
|
38861
|
+
if (left.network > right.network)
|
|
38862
|
+
return 1;
|
|
38863
|
+
return 0;
|
|
38864
|
+
}
|
|
38865
|
+
add(cost) {
|
|
38866
|
+
this.network += cost.network;
|
|
38867
|
+
return this;
|
|
38868
|
+
}
|
|
38869
|
+
toString() {
|
|
38870
|
+
return `${this.network}ms`;
|
|
38871
|
+
}
|
|
38872
|
+
};
|
|
38873
|
+
function GroupId(id3) {
|
|
38874
|
+
return id3;
|
|
38875
|
+
}
|
|
38876
|
+
var Group = class {
|
|
38877
|
+
constructor(id3, relational) {
|
|
38878
|
+
this.id = id3;
|
|
38879
|
+
this.relational = relational;
|
|
38880
|
+
__publicField(this, 'nodes', []);
|
|
38881
|
+
__publicField(this, 'winners', /* @__PURE__ */ new Map());
|
|
38882
|
+
}
|
|
38883
|
+
/**
|
|
38884
|
+
* Adds a node to the group. Throws an error if the node is already in a
|
|
38885
|
+
* group.
|
|
38886
|
+
*/
|
|
38887
|
+
addNode(node) {
|
|
38888
|
+
this.nodes.push(node);
|
|
38889
|
+
node.setGroup(this);
|
|
38890
|
+
}
|
|
38891
|
+
/**
|
|
38892
|
+
* Returns the winner for the given required physical props. The winner
|
|
38893
|
+
* stores the best node and its cost. This is used to find the best node in
|
|
38894
|
+
* the group.
|
|
38895
|
+
*/
|
|
38896
|
+
getWinner(required) {
|
|
38897
|
+
const hash2 = required.getHash();
|
|
38898
|
+
const existing = this.winners.get(hash2);
|
|
38899
|
+
if (existing)
|
|
38900
|
+
return existing;
|
|
38901
|
+
const winner = new Winner();
|
|
38902
|
+
this.winners.set(hash2, winner);
|
|
38903
|
+
return winner;
|
|
38904
|
+
}
|
|
38905
|
+
/**
|
|
38906
|
+
* Returns the optimized version of the node. The optimized version is the
|
|
38907
|
+
* node with the lowest cost with all children replaced with their optimized
|
|
38908
|
+
* versions. This is used to create the final optimized query plan.
|
|
38909
|
+
*/
|
|
38910
|
+
getOptimized(required) {
|
|
38911
|
+
const winner = this.getWinner(required);
|
|
38912
|
+
assert(winner.node, 'Group not optimized');
|
|
38913
|
+
const optimizer = winner.node.getOptimized(required);
|
|
38914
|
+
optimizer.setGroup(this);
|
|
38915
|
+
return optimizer;
|
|
38916
|
+
}
|
|
38917
|
+
};
|
|
38918
|
+
var Winner = class {
|
|
38919
|
+
constructor() {
|
|
38920
|
+
__publicField(this, 'node');
|
|
38921
|
+
__publicField(this, 'cost', new Cost(Infinity));
|
|
38922
|
+
__publicField(this, 'nodes', []);
|
|
38923
|
+
}
|
|
38924
|
+
update(node, cost) {
|
|
38925
|
+
this.nodes.push(node);
|
|
38926
|
+
if (Cost.compare(cost, this.cost) < 0) {
|
|
38927
|
+
this.node = node;
|
|
38928
|
+
this.cost = cost;
|
|
38929
|
+
}
|
|
38930
|
+
}
|
|
38931
|
+
};
|
|
38932
|
+
function evaluateSync(generator) {
|
|
38933
|
+
const state2 = generator.next();
|
|
38934
|
+
assert(state2.done, 'Generator must not yield');
|
|
38935
|
+
return state2.value;
|
|
38936
|
+
}
|
|
38937
|
+
async function evaluateAsync(generator, state2 = generator.next()) {
|
|
38938
|
+
while (!state2.done) {
|
|
38939
|
+
const value = await state2.value;
|
|
38940
|
+
state2 = generator.next(value);
|
|
38941
|
+
}
|
|
38942
|
+
return state2.value;
|
|
38943
|
+
}
|
|
38944
|
+
function* evaluateObject(values) {
|
|
38945
|
+
const result = {};
|
|
38946
|
+
const keys3 = Object.keys(values);
|
|
38947
|
+
const promises = [];
|
|
38948
|
+
for (const key7 of keys3) {
|
|
38949
|
+
const generator = values[key7];
|
|
38950
|
+
if (isGenerator2(generator)) {
|
|
38951
|
+
const state2 = generator.next();
|
|
38952
|
+
if (state2.done) {
|
|
38953
|
+
result[key7] = state2.value;
|
|
38954
|
+
}
|
|
38955
|
+
else {
|
|
38956
|
+
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
38957
|
+
result[key7] = value;
|
|
38958
|
+
}));
|
|
38959
|
+
}
|
|
38960
|
+
}
|
|
38961
|
+
else {
|
|
38962
|
+
result[key7] = generator;
|
|
38963
|
+
}
|
|
38964
|
+
}
|
|
38965
|
+
if (promises.length > 0) {
|
|
38966
|
+
yield Promise.all(promises);
|
|
38967
|
+
}
|
|
38968
|
+
return result;
|
|
38969
|
+
}
|
|
38970
|
+
function* evaluateArray(values) {
|
|
38971
|
+
const result = [];
|
|
38972
|
+
const keys3 = values.keys();
|
|
38973
|
+
const promises = [];
|
|
38974
|
+
for (const key7 of keys3) {
|
|
38975
|
+
const generator = values[key7];
|
|
38976
|
+
if (isGenerator2(generator)) {
|
|
38977
|
+
const state2 = generator.next();
|
|
38978
|
+
if (state2.done) {
|
|
38979
|
+
result[key7] = state2.value;
|
|
38980
|
+
}
|
|
38981
|
+
else {
|
|
38982
|
+
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
38983
|
+
result[key7] = value;
|
|
38984
|
+
}));
|
|
38985
|
+
}
|
|
38986
|
+
}
|
|
38987
|
+
else {
|
|
38988
|
+
result[key7] = generator;
|
|
38989
|
+
}
|
|
38990
|
+
}
|
|
38991
|
+
if (promises.length > 0) {
|
|
38992
|
+
yield Promise.all(promises);
|
|
38993
|
+
}
|
|
38994
|
+
return result;
|
|
38995
|
+
}
|
|
38996
|
+
var AbstractNode = class {
|
|
38997
|
+
constructor(isSynchronous) {
|
|
38998
|
+
this.isSynchronous = isSynchronous;
|
|
38999
|
+
}
|
|
39000
|
+
};
|
|
39001
|
+
var RelationalNode = class extends AbstractNode {
|
|
39002
|
+
constructor() {
|
|
39003
|
+
super(...arguments);
|
|
39004
|
+
__publicField(this, 'group');
|
|
39005
|
+
}
|
|
39006
|
+
/**
|
|
39007
|
+
* Returns the group that the node belongs to. Throws an error if the node
|
|
39008
|
+
* is not in a group. This should only happen in the constructor because
|
|
39009
|
+
* every node is added to a group right after creation.
|
|
39010
|
+
*/
|
|
39011
|
+
getGroup() {
|
|
39012
|
+
assert(this.group, 'Node must be in a group');
|
|
39013
|
+
return this.group;
|
|
39014
|
+
}
|
|
39015
|
+
/**
|
|
39016
|
+
* Adds the node to the given group. Throws an error if the node is already
|
|
39017
|
+
* in a group.
|
|
39018
|
+
*/
|
|
39019
|
+
setGroup(group) {
|
|
39020
|
+
assert(!this.group, 'Node is already in a group');
|
|
39021
|
+
this.group = group;
|
|
39022
|
+
}
|
|
39023
|
+
/**
|
|
39024
|
+
* Evaluates the node and all children synchronously. Throws an error if the
|
|
39025
|
+
* node is not synchronous.
|
|
39026
|
+
*/
|
|
39027
|
+
evaluateSync() {
|
|
39028
|
+
const generator = this.evaluate(void 0);
|
|
39029
|
+
return evaluateSync(generator);
|
|
39030
|
+
}
|
|
39031
|
+
/**
|
|
39032
|
+
* Evaluates the node and all children asynchronously.
|
|
39033
|
+
*/
|
|
39034
|
+
evaluateAsync() {
|
|
39035
|
+
const generator = this.evaluate(void 0);
|
|
39036
|
+
return evaluateAsync(generator);
|
|
39037
|
+
}
|
|
39038
|
+
};
|
|
38582
39039
|
function Hash(value) {
|
|
38583
39040
|
return value;
|
|
38584
39041
|
}
|
|
@@ -38587,6 +39044,16 @@ function isHashable(value) {
|
|
|
38587
39044
|
}
|
|
38588
39045
|
function calculateHash(name, ...values) {
|
|
38589
39046
|
const hashes = values.map((value) => {
|
|
39047
|
+
const isCollectionMetadata = value instanceof CollectionMetadata;
|
|
39048
|
+
assert(!isCollectionMetadata, 'Pass CollectionMetadata.id instead');
|
|
39049
|
+
const isFieldMetadata = value instanceof FieldMetadata;
|
|
39050
|
+
assert(!isFieldMetadata, 'Pass FieldMetadata.id instead');
|
|
39051
|
+
const isIndexMetadata = value instanceof IndexMetadata;
|
|
39052
|
+
assert(!isIndexMetadata, 'Pass IndexMetadata.id instead');
|
|
39053
|
+
const isRelationalNode = value instanceof RelationalNode;
|
|
39054
|
+
assert(!isRelationalNode, 'Pass RelationalNode.group.id instead');
|
|
39055
|
+
const isGroup = value instanceof Group;
|
|
39056
|
+
assert(!isGroup, 'Pass Group.id instead');
|
|
38590
39057
|
if (isHashable(value)) {
|
|
38591
39058
|
return value.getHash();
|
|
38592
39059
|
}
|
|
@@ -38711,106 +39178,6 @@ var Fields = class extends Metadata {
|
|
|
38711
39178
|
__publicField(this, 'name', 'Fields');
|
|
38712
39179
|
}
|
|
38713
39180
|
};
|
|
38714
|
-
function getNetworkLatency() {
|
|
38715
|
-
return 25;
|
|
38716
|
-
}
|
|
38717
|
-
function getNetworkSpeed() {
|
|
38718
|
-
return 100 * 125;
|
|
38719
|
-
}
|
|
38720
|
-
var KB = 1e3;
|
|
38721
|
-
var Cost = class {
|
|
38722
|
-
constructor(network) {
|
|
38723
|
-
this.network = network;
|
|
38724
|
-
}
|
|
38725
|
-
static estimate(totalRequests, transferredBytes) {
|
|
38726
|
-
const latency = getNetworkLatency();
|
|
38727
|
-
const speed = getNetworkSpeed();
|
|
38728
|
-
const network = totalRequests * latency + transferredBytes / speed;
|
|
38729
|
-
return new Cost(network);
|
|
38730
|
-
}
|
|
38731
|
-
static max(left, right) {
|
|
38732
|
-
const network = Math.max(left.network, right.network);
|
|
38733
|
-
return new Cost(network);
|
|
38734
|
-
}
|
|
38735
|
-
static compare(left, right) {
|
|
38736
|
-
if (left.network < right.network)
|
|
38737
|
-
return -1;
|
|
38738
|
-
if (left.network > right.network)
|
|
38739
|
-
return 1;
|
|
38740
|
-
return 0;
|
|
38741
|
-
}
|
|
38742
|
-
add(cost) {
|
|
38743
|
-
this.network += cost.network;
|
|
38744
|
-
return this;
|
|
38745
|
-
}
|
|
38746
|
-
toString() {
|
|
38747
|
-
return `${this.network}ms`;
|
|
38748
|
-
}
|
|
38749
|
-
};
|
|
38750
|
-
function evaluateSync(generator) {
|
|
38751
|
-
const state2 = generator.next();
|
|
38752
|
-
assert(state2.done, 'Generator must not yield');
|
|
38753
|
-
return state2.value;
|
|
38754
|
-
}
|
|
38755
|
-
async function evaluateAsync(generator, state2 = generator.next()) {
|
|
38756
|
-
while (!state2.done) {
|
|
38757
|
-
const value = await state2.value;
|
|
38758
|
-
state2 = generator.next(value);
|
|
38759
|
-
}
|
|
38760
|
-
return state2.value;
|
|
38761
|
-
}
|
|
38762
|
-
function* evaluateObject(values) {
|
|
38763
|
-
const result = {};
|
|
38764
|
-
const keys3 = Object.keys(values);
|
|
38765
|
-
const promises = [];
|
|
38766
|
-
for (const key7 of keys3) {
|
|
38767
|
-
const generator = values[key7];
|
|
38768
|
-
if (isGenerator2(generator)) {
|
|
38769
|
-
const state2 = generator.next();
|
|
38770
|
-
if (state2.done) {
|
|
38771
|
-
result[key7] = state2.value;
|
|
38772
|
-
}
|
|
38773
|
-
else {
|
|
38774
|
-
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
38775
|
-
result[key7] = value;
|
|
38776
|
-
}));
|
|
38777
|
-
}
|
|
38778
|
-
}
|
|
38779
|
-
else {
|
|
38780
|
-
result[key7] = generator;
|
|
38781
|
-
}
|
|
38782
|
-
}
|
|
38783
|
-
if (promises.length > 0) {
|
|
38784
|
-
yield Promise.all(promises);
|
|
38785
|
-
}
|
|
38786
|
-
return result;
|
|
38787
|
-
}
|
|
38788
|
-
function* evaluateArray(values) {
|
|
38789
|
-
const result = [];
|
|
38790
|
-
const keys3 = values.keys();
|
|
38791
|
-
const promises = [];
|
|
38792
|
-
for (const key7 of keys3) {
|
|
38793
|
-
const generator = values[key7];
|
|
38794
|
-
if (isGenerator2(generator)) {
|
|
38795
|
-
const state2 = generator.next();
|
|
38796
|
-
if (state2.done) {
|
|
38797
|
-
result[key7] = state2.value;
|
|
38798
|
-
}
|
|
38799
|
-
else {
|
|
38800
|
-
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
38801
|
-
result[key7] = value;
|
|
38802
|
-
}));
|
|
38803
|
-
}
|
|
38804
|
-
}
|
|
38805
|
-
else {
|
|
38806
|
-
result[key7] = generator;
|
|
38807
|
-
}
|
|
38808
|
-
}
|
|
38809
|
-
if (promises.length > 0) {
|
|
38810
|
-
yield Promise.all(promises);
|
|
38811
|
-
}
|
|
38812
|
-
return result;
|
|
38813
|
-
}
|
|
38814
39181
|
var RequiredProps = class {
|
|
38815
39182
|
constructor(ordering, resolvedFields) {
|
|
38816
39183
|
this.ordering = ordering;
|
|
@@ -38863,8 +39230,11 @@ var Tuple = class {
|
|
|
38863
39230
|
__publicField(this, 'values', /* @__PURE__ */ new Map());
|
|
38864
39231
|
}
|
|
38865
39232
|
getKey() {
|
|
38866
|
-
const
|
|
38867
|
-
|
|
39233
|
+
const result = [];
|
|
39234
|
+
for (const [collection, pointer,] of this.pointers) {
|
|
39235
|
+
result.push(`${collection.id}-${pointer}`);
|
|
39236
|
+
}
|
|
39237
|
+
return result.sort().join('-');
|
|
38868
39238
|
}
|
|
38869
39239
|
addValue(field, value) {
|
|
38870
39240
|
this.values.set(field, value);
|
|
@@ -38961,49 +39331,6 @@ var Relation = class {
|
|
|
38961
39331
|
return result;
|
|
38962
39332
|
}
|
|
38963
39333
|
};
|
|
38964
|
-
var AbstractNode = class {
|
|
38965
|
-
constructor(isSynchronous) {
|
|
38966
|
-
this.isSynchronous = isSynchronous;
|
|
38967
|
-
}
|
|
38968
|
-
};
|
|
38969
|
-
var RelationalNode = class extends AbstractNode {
|
|
38970
|
-
constructor() {
|
|
38971
|
-
super(...arguments);
|
|
38972
|
-
__publicField(this, 'group');
|
|
38973
|
-
}
|
|
38974
|
-
/**
|
|
38975
|
-
* Returns the group that the node belongs to. Throws an error if the node
|
|
38976
|
-
* is not in a group. This should only happen in the constructor because
|
|
38977
|
-
* every node is added to a group right after creation.
|
|
38978
|
-
*/
|
|
38979
|
-
getGroup() {
|
|
38980
|
-
assert(this.group, 'Node must be in a group');
|
|
38981
|
-
return this.group;
|
|
38982
|
-
}
|
|
38983
|
-
/**
|
|
38984
|
-
* Adds the node to the given group. Throws an error if the node is already
|
|
38985
|
-
* in a group.
|
|
38986
|
-
*/
|
|
38987
|
-
setGroup(group) {
|
|
38988
|
-
assert(!this.group, 'Node is already in a group');
|
|
38989
|
-
this.group = group;
|
|
38990
|
-
}
|
|
38991
|
-
/**
|
|
38992
|
-
* Evaluates the node and all children synchronously. Throws an error if the
|
|
38993
|
-
* node is not synchronous.
|
|
38994
|
-
*/
|
|
38995
|
-
evaluateSync() {
|
|
38996
|
-
const generator = this.evaluate(void 0);
|
|
38997
|
-
return evaluateSync(generator);
|
|
38998
|
-
}
|
|
38999
|
-
/**
|
|
39000
|
-
* Evaluates the node and all children asynchronously.
|
|
39001
|
-
*/
|
|
39002
|
-
evaluateAsync() {
|
|
39003
|
-
const generator = this.evaluate(void 0);
|
|
39004
|
-
return evaluateAsync(generator);
|
|
39005
|
-
}
|
|
39006
|
-
};
|
|
39007
39334
|
var ProjectionField = class {
|
|
39008
39335
|
constructor(input, field) {
|
|
39009
39336
|
this.input = input;
|
|
@@ -39036,7 +39363,16 @@ var RelationalProject = class extends RelationalNode {
|
|
|
39036
39363
|
}
|
|
39037
39364
|
return fields;
|
|
39038
39365
|
}
|
|
39039
|
-
canProvideOrdering() {
|
|
39366
|
+
canProvideOrdering(ordering) {
|
|
39367
|
+
const projectionFields = new Fields();
|
|
39368
|
+
for (const projection of this.projections) {
|
|
39369
|
+
projectionFields.add(projection.field);
|
|
39370
|
+
}
|
|
39371
|
+
for (const { field, } of ordering.fields) {
|
|
39372
|
+
if (projectionFields.has(field)) {
|
|
39373
|
+
return false;
|
|
39374
|
+
}
|
|
39375
|
+
}
|
|
39040
39376
|
return true;
|
|
39041
39377
|
}
|
|
39042
39378
|
canProvideResolvedFields() {
|
|
@@ -40089,21 +40425,19 @@ var RelationalLeftJoin = class extends RelationalNode {
|
|
|
40089
40425
|
return new RelationalLeftJoin(left, right, constraint);
|
|
40090
40426
|
}
|
|
40091
40427
|
/** Optimized path for equality constraints that runs in O(n + m) time. */
|
|
40092
|
-
*evaluateScalarEquals(
|
|
40093
|
-
const { left, right, } = yield* evaluateObject({
|
|
40094
|
-
left: this.left.evaluate(context),
|
|
40095
|
-
right: this.right.evaluate(context),
|
|
40096
|
-
});
|
|
40428
|
+
*evaluateScalarEquals(left, right, leftConstraint, rightConstraint, context) {
|
|
40097
40429
|
const joinKeyMap = /* @__PURE__ */ new Map();
|
|
40098
40430
|
for (const rightTuple of right.tuples) {
|
|
40099
|
-
const rightValue = yield*
|
|
40431
|
+
const rightValue = yield* rightConstraint.evaluate(context, rightTuple);
|
|
40100
40432
|
const key7 = JSON.stringify((rightValue == null ? void 0 : rightValue.value) ?? null);
|
|
40101
40433
|
const tuplesForKey = joinKeyMap.get(key7) ?? [];
|
|
40102
40434
|
tuplesForKey.push(rightTuple);
|
|
40103
40435
|
joinKeyMap.set(key7, tuplesForKey);
|
|
40104
40436
|
}
|
|
40437
|
+
const outputFields = this.getOutputFields();
|
|
40438
|
+
const result = new Relation(outputFields);
|
|
40105
40439
|
for (const leftTuple of left.tuples) {
|
|
40106
|
-
const leftValue = yield*
|
|
40440
|
+
const leftValue = yield* leftConstraint.evaluate(context, leftTuple);
|
|
40107
40441
|
const key7 = JSON.stringify((leftValue == null ? void 0 : leftValue.value) ?? null);
|
|
40108
40442
|
const matches = joinKeyMap.get(key7) ?? [];
|
|
40109
40443
|
if (matches.length === 0) {
|
|
@@ -40121,16 +40455,22 @@ var RelationalLeftJoin = class extends RelationalNode {
|
|
|
40121
40455
|
return result;
|
|
40122
40456
|
}
|
|
40123
40457
|
*evaluate(context) {
|
|
40124
|
-
const outputFields = this.getOutputFields();
|
|
40125
|
-
const result = new Relation(outputFields);
|
|
40126
|
-
if (this.constraint instanceof ScalarEquals) {
|
|
40127
|
-
yield* this.evaluateScalarEquals(result.tuples, this.constraint, context);
|
|
40128
|
-
return result;
|
|
40129
|
-
}
|
|
40130
40458
|
const { left, right, } = yield* evaluateObject({
|
|
40131
40459
|
left: this.left.evaluate(context),
|
|
40132
40460
|
right: this.right.evaluate(context),
|
|
40133
40461
|
});
|
|
40462
|
+
if (this.constraint instanceof ScalarEquals) {
|
|
40463
|
+
if (this.constraint.left.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40464
|
+
this.constraint.right.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40465
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.left, this.constraint.right, context);
|
|
40466
|
+
}
|
|
40467
|
+
if (this.constraint.right.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40468
|
+
this.constraint.left.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40469
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.right, this.constraint.left, context);
|
|
40470
|
+
}
|
|
40471
|
+
}
|
|
40472
|
+
const outputFields = this.getOutputFields();
|
|
40473
|
+
const result = new Relation(outputFields);
|
|
40134
40474
|
for (const leftTuple of left.tuples) {
|
|
40135
40475
|
let hasMatch = false;
|
|
40136
40476
|
for (const rightTuple of right.tuples) {
|
|
@@ -40207,21 +40547,19 @@ var RelationalRightJoin = class extends RelationalNode {
|
|
|
40207
40547
|
return new RelationalRightJoin(left, right, constraint);
|
|
40208
40548
|
}
|
|
40209
40549
|
/** Optimized path for equality constraints that runs in O(n + m) time. */
|
|
40210
|
-
*evaluateScalarEquals(
|
|
40211
|
-
const { left, right, } = yield* evaluateObject({
|
|
40212
|
-
left: this.left.evaluate(context),
|
|
40213
|
-
right: this.right.evaluate(context),
|
|
40214
|
-
});
|
|
40550
|
+
*evaluateScalarEquals(left, right, leftConstraint, rightConstraint, context) {
|
|
40215
40551
|
const joinKeyMap = /* @__PURE__ */ new Map();
|
|
40216
40552
|
for (const leftTuple of left.tuples) {
|
|
40217
|
-
const leftValue = yield*
|
|
40553
|
+
const leftValue = yield* leftConstraint.evaluate(context, leftTuple);
|
|
40218
40554
|
const key7 = JSON.stringify((leftValue == null ? void 0 : leftValue.value) ?? null);
|
|
40219
40555
|
const tuplesForKey = joinKeyMap.get(key7) ?? [];
|
|
40220
40556
|
tuplesForKey.push(leftTuple);
|
|
40221
40557
|
joinKeyMap.set(key7, tuplesForKey);
|
|
40222
40558
|
}
|
|
40559
|
+
const outputFields = this.getOutputFields();
|
|
40560
|
+
const result = new Relation(outputFields);
|
|
40223
40561
|
for (const rightTuple of right.tuples) {
|
|
40224
|
-
const rightValue = yield*
|
|
40562
|
+
const rightValue = yield* rightConstraint.evaluate(context, rightTuple);
|
|
40225
40563
|
const key7 = JSON.stringify((rightValue == null ? void 0 : rightValue.value) ?? null);
|
|
40226
40564
|
const matches = joinKeyMap.get(key7) ?? [];
|
|
40227
40565
|
if (matches.length === 0) {
|
|
@@ -40239,16 +40577,22 @@ var RelationalRightJoin = class extends RelationalNode {
|
|
|
40239
40577
|
return result;
|
|
40240
40578
|
}
|
|
40241
40579
|
*evaluate(context) {
|
|
40242
|
-
const outputFields = this.getOutputFields();
|
|
40243
|
-
const result = new Relation(outputFields);
|
|
40244
|
-
if (this.constraint instanceof ScalarEquals) {
|
|
40245
|
-
yield* this.evaluateScalarEquals(result.tuples, this.constraint, context);
|
|
40246
|
-
return result;
|
|
40247
|
-
}
|
|
40248
40580
|
const { left, right, } = yield* evaluateObject({
|
|
40249
40581
|
left: this.left.evaluate(context),
|
|
40250
40582
|
right: this.right.evaluate(context),
|
|
40251
40583
|
});
|
|
40584
|
+
if (this.constraint instanceof ScalarEquals) {
|
|
40585
|
+
if (this.constraint.left.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40586
|
+
this.constraint.right.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40587
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.left, this.constraint.right, context);
|
|
40588
|
+
}
|
|
40589
|
+
if (this.constraint.right.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40590
|
+
this.constraint.left.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40591
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.right, this.constraint.left, context);
|
|
40592
|
+
}
|
|
40593
|
+
}
|
|
40594
|
+
const outputFields = this.getOutputFields();
|
|
40595
|
+
const result = new Relation(outputFields);
|
|
40252
40596
|
for (const rightTuple of right.tuples) {
|
|
40253
40597
|
let hasMatch = false;
|
|
40254
40598
|
for (const leftTuple of left.tuples) {
|
|
@@ -40846,7 +41190,7 @@ var Explorer = class {
|
|
|
40846
41190
|
explore(before) {
|
|
40847
41191
|
const group = before.getGroup();
|
|
40848
41192
|
if (before instanceof RelationalLeftJoin) {
|
|
40849
|
-
const after = new RelationalRightJoin(before.
|
|
41193
|
+
const after = new RelationalRightJoin(before.right, before.left, before.constraint);
|
|
40850
41194
|
this.memo.addRelational(after, group);
|
|
40851
41195
|
}
|
|
40852
41196
|
if (before instanceof RelationalFilter) {
|
|
@@ -40983,63 +41327,6 @@ function createIndexQueryAll(length) {
|
|
|
40983
41327
|
};
|
|
40984
41328
|
return new Array(length).fill(lookup);
|
|
40985
41329
|
}
|
|
40986
|
-
function GroupId(id3) {
|
|
40987
|
-
return id3;
|
|
40988
|
-
}
|
|
40989
|
-
var Group = class {
|
|
40990
|
-
constructor(id3, relational) {
|
|
40991
|
-
this.id = id3;
|
|
40992
|
-
this.relational = relational;
|
|
40993
|
-
__publicField(this, 'nodes', []);
|
|
40994
|
-
__publicField(this, 'winners', /* @__PURE__ */ new Map());
|
|
40995
|
-
}
|
|
40996
|
-
/**
|
|
40997
|
-
* Adds a node to the group. Throws an error if the node is already in a
|
|
40998
|
-
* group.
|
|
40999
|
-
*/
|
|
41000
|
-
addNode(node) {
|
|
41001
|
-
this.nodes.push(node);
|
|
41002
|
-
node.setGroup(this);
|
|
41003
|
-
}
|
|
41004
|
-
/**
|
|
41005
|
-
* Returns the winner for the given required physical props. The winner
|
|
41006
|
-
* stores the best node and its cost. This is used to find the best node in
|
|
41007
|
-
* the group.
|
|
41008
|
-
*/
|
|
41009
|
-
getWinner(required) {
|
|
41010
|
-
const hash2 = required.getHash();
|
|
41011
|
-
const existing = this.winners.get(hash2);
|
|
41012
|
-
if (existing)
|
|
41013
|
-
return existing;
|
|
41014
|
-
const winner = new Winner();
|
|
41015
|
-
this.winners.set(hash2, winner);
|
|
41016
|
-
return winner;
|
|
41017
|
-
}
|
|
41018
|
-
/**
|
|
41019
|
-
* Returns the optimized version of the node. The optimized version is the
|
|
41020
|
-
* node with the lowest cost with all children replaced with their optimized
|
|
41021
|
-
* versions. This is used to create the final optimized query plan.
|
|
41022
|
-
*/
|
|
41023
|
-
getOptimized(required) {
|
|
41024
|
-
const winner = this.getWinner(required);
|
|
41025
|
-
assert(winner.node, 'Group not optimized');
|
|
41026
|
-
const optimizer = winner.node.getOptimized(required);
|
|
41027
|
-
optimizer.setGroup(this);
|
|
41028
|
-
return optimizer;
|
|
41029
|
-
}
|
|
41030
|
-
};
|
|
41031
|
-
var Winner = class {
|
|
41032
|
-
constructor() {
|
|
41033
|
-
__publicField(this, 'node');
|
|
41034
|
-
__publicField(this, 'cost', new Cost(Infinity));
|
|
41035
|
-
}
|
|
41036
|
-
update(node, cost) {
|
|
41037
|
-
if (Cost.compare(cost, this.cost) < 0) {
|
|
41038
|
-
this.node = node;
|
|
41039
|
-
this.cost = cost;
|
|
41040
|
-
}
|
|
41041
|
-
}
|
|
41042
|
-
};
|
|
41043
41330
|
var RelationalProps = class {
|
|
41044
41331
|
constructor(outputFields) {
|
|
41045
41332
|
this.outputFields = outputFields;
|
|
@@ -41206,9 +41493,11 @@ var EnforcerSort = class extends EnforcerNode {
|
|
|
41206
41493
|
getInputRequiredProps(required) {
|
|
41207
41494
|
const resolvedFields = new Fields(required.resolvedFields);
|
|
41208
41495
|
for (const { field, } of this.ordering.fields) {
|
|
41209
|
-
if (field.name
|
|
41210
|
-
|
|
41211
|
-
|
|
41496
|
+
if (field.name === VIRTUAL_INDEX_FIELD)
|
|
41497
|
+
continue;
|
|
41498
|
+
if (isUndefined(field.collection))
|
|
41499
|
+
continue;
|
|
41500
|
+
resolvedFields.add(field);
|
|
41212
41501
|
}
|
|
41213
41502
|
const ordering = new Ordering();
|
|
41214
41503
|
return new RequiredProps(ordering, resolvedFields);
|
|
@@ -41399,6 +41688,8 @@ var ScalarArray = class extends ScalarNode {
|
|
|
41399
41688
|
const resolvedFields = new Fields();
|
|
41400
41689
|
const fields = Object.values(this.namedFields);
|
|
41401
41690
|
for (const field of fields) {
|
|
41691
|
+
if (isUndefined(field.collection))
|
|
41692
|
+
continue;
|
|
41402
41693
|
resolvedFields.add(field);
|
|
41403
41694
|
}
|
|
41404
41695
|
return new RequiredProps(this.ordering, resolvedFields);
|
|
@@ -41485,7 +41776,9 @@ var ScalarFlatArray = class extends ScalarNode {
|
|
|
41485
41776
|
}
|
|
41486
41777
|
getInputRequiredProps() {
|
|
41487
41778
|
const resolvedFields = new Fields();
|
|
41488
|
-
|
|
41779
|
+
if (!isUndefined(this.field.collection)) {
|
|
41780
|
+
resolvedFields.add(this.field);
|
|
41781
|
+
}
|
|
41489
41782
|
return new RequiredProps(this.ordering, resolvedFields);
|
|
41490
41783
|
}
|
|
41491
41784
|
optimize(optimizer) {
|
|
@@ -41513,7 +41806,7 @@ var ScalarFlatArray = class extends ScalarNode {
|
|
|
41513
41806
|
};
|
|
41514
41807
|
}
|
|
41515
41808
|
};
|
|
41516
|
-
var
|
|
41809
|
+
var collation8 = {
|
|
41517
41810
|
type: 0,
|
|
41518
41811
|
/* CaseInsensitive */
|
|
41519
41812
|
};
|
|
@@ -41557,11 +41850,11 @@ var ScalarIn = class extends ScalarNode {
|
|
|
41557
41850
|
});
|
|
41558
41851
|
return {
|
|
41559
41852
|
type: 'boolean',
|
|
41560
|
-
value: DatabaseValue.in(left, right,
|
|
41853
|
+
value: DatabaseValue.in(left, right, collation8),
|
|
41561
41854
|
};
|
|
41562
41855
|
}
|
|
41563
41856
|
};
|
|
41564
|
-
var
|
|
41857
|
+
var collation9 = {
|
|
41565
41858
|
type: 1,
|
|
41566
41859
|
/* CaseSensitive */
|
|
41567
41860
|
};
|
|
@@ -41605,7 +41898,7 @@ var ScalarIndexOf = class extends ScalarNode {
|
|
|
41605
41898
|
});
|
|
41606
41899
|
return {
|
|
41607
41900
|
type: 'number',
|
|
41608
|
-
value: DatabaseValue.indexOf(source, target,
|
|
41901
|
+
value: DatabaseValue.indexOf(source, target, collation9),
|
|
41609
41902
|
};
|
|
41610
41903
|
}
|
|
41611
41904
|
};
|
|
@@ -41669,7 +41962,7 @@ var ScalarNot = class extends ScalarNode {
|
|
|
41669
41962
|
};
|
|
41670
41963
|
}
|
|
41671
41964
|
};
|
|
41672
|
-
var
|
|
41965
|
+
var collation10 = {
|
|
41673
41966
|
type: 0,
|
|
41674
41967
|
/* CaseInsensitive */
|
|
41675
41968
|
};
|
|
@@ -41713,7 +42006,7 @@ var ScalarNotIn = class extends ScalarNode {
|
|
|
41713
42006
|
});
|
|
41714
42007
|
return {
|
|
41715
42008
|
type: 'boolean',
|
|
41716
|
-
value: !DatabaseValue.in(left, right,
|
|
42009
|
+
value: !DatabaseValue.in(left, right, collation10),
|
|
41717
42010
|
};
|
|
41718
42011
|
}
|
|
41719
42012
|
};
|
|
@@ -42091,6 +42384,11 @@ var Optimizer = class {
|
|
|
42091
42384
|
this.explorer.explore(node);
|
|
42092
42385
|
}
|
|
42093
42386
|
}
|
|
42387
|
+
if (false) {
|
|
42388
|
+
assert(winner.node, 'Group not optimized');
|
|
42389
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
42390
|
+
winner.node = new RelationalAssert(winner.node, required, cache2);
|
|
42391
|
+
}
|
|
42094
42392
|
return winner.cost;
|
|
42095
42393
|
}
|
|
42096
42394
|
createEnforcer(winner, node, required) {
|
|
@@ -42366,7 +42664,7 @@ var AnimationCollector = class {
|
|
|
42366
42664
|
};
|
|
42367
42665
|
_variantHashes = /* @__PURE__ */ new WeakMap();
|
|
42368
42666
|
var framerAppearEffects = /* @__PURE__ */ new AnimationCollector();
|
|
42369
|
-
function withOptimizedAppearEffect(
|
|
42667
|
+
function withOptimizedAppearEffect(Component18) {
|
|
42370
42668
|
return React4.forwardRef(({ optimized, ...props }, ref) => {
|
|
42371
42669
|
const generatedComponentContext = React4.useContext(GeneratedComponentContext);
|
|
42372
42670
|
const variants = React4.useContext(SSRParentVariantsContext);
|
|
@@ -42380,7 +42678,7 @@ function withOptimizedAppearEffect(Component16) {
|
|
|
42380
42678
|
// should not be optimized.
|
|
42381
42679
|
optimized ? props : null, generatedComponentContext);
|
|
42382
42680
|
}
|
|
42383
|
-
return /* @__PURE__ */ jsx(
|
|
42681
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
42384
42682
|
ref,
|
|
42385
42683
|
...props,
|
|
42386
42684
|
});
|
|
@@ -42500,7 +42798,9 @@ function activeBreakpointHashFromWindow(breakpoints) {
|
|
|
42500
42798
|
}
|
|
42501
42799
|
function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitial = true) {
|
|
42502
42800
|
const isInitialNavigation = useContext(IsInitialNavigationContext);
|
|
42503
|
-
const
|
|
42801
|
+
const onCanvas = useIsOnFramerCanvas();
|
|
42802
|
+
const usesMediaQueries = !onCanvas && isBrowser2();
|
|
42803
|
+
const baseVariant = useRef(usesMediaQueries ? activeMediaQueryFromWindow(mediaQueries) ?? initial : initial);
|
|
42504
42804
|
const basePropsVariant = useRef(hydratedWithInitial && isInitialNavigation ? initial : baseVariant.current);
|
|
42505
42805
|
const forceUpdate = useForceUpdate3();
|
|
42506
42806
|
const instantTransition = useInstantTransition();
|
|
@@ -42568,8 +42868,8 @@ function removeHiddenBreakpointLayersV2(breakpoints) {
|
|
|
42568
42868
|
(_a = hiddenLayer.parentNode) == null ? void 0 : _a.removeChild(hiddenLayer);
|
|
42569
42869
|
}
|
|
42570
42870
|
}
|
|
42571
|
-
const
|
|
42572
|
-
|
|
42871
|
+
const requestIdleCallback2 = safeWindow.requestIdleCallback ?? requestIdleCallbackFallback;
|
|
42872
|
+
requestIdleCallback2(() => {
|
|
42573
42873
|
var _a2;
|
|
42574
42874
|
(_a2 = document.querySelector(framerBreakpointCSSSelector)) == null ? void 0 : _a2.remove();
|
|
42575
42875
|
});
|
|
@@ -42941,49 +43241,49 @@ function usePrototypeNavigate({ preload, } = {}) {
|
|
|
42941
43241
|
navigation.goBack();
|
|
42942
43242
|
return false;
|
|
42943
43243
|
}
|
|
42944
|
-
const
|
|
43244
|
+
const Component18 = typeof target === 'string'
|
|
42945
43245
|
? await componentForRoute(getRoute == null ? void 0 : getRoute(target)).catch(() => { })
|
|
42946
43246
|
: React4.isValidElement(target)
|
|
42947
43247
|
? target
|
|
42948
43248
|
: null;
|
|
42949
|
-
if (!
|
|
43249
|
+
if (!Component18)
|
|
42950
43250
|
return;
|
|
42951
43251
|
const { appearsFrom, backdropColor, animation, } = options;
|
|
42952
43252
|
const transitionType = options.transition || 'instant';
|
|
42953
43253
|
switch (transitionType) {
|
|
42954
43254
|
case 'instant':
|
|
42955
|
-
navigation.instant(
|
|
43255
|
+
navigation.instant(Component18);
|
|
42956
43256
|
break;
|
|
42957
43257
|
case 'fade':
|
|
42958
|
-
navigation.fade(
|
|
43258
|
+
navigation.fade(Component18, {
|
|
42959
43259
|
animation,
|
|
42960
43260
|
});
|
|
42961
43261
|
break;
|
|
42962
43262
|
case 'push':
|
|
42963
|
-
navigation.push(
|
|
43263
|
+
navigation.push(Component18, {
|
|
42964
43264
|
appearsFrom,
|
|
42965
43265
|
animation,
|
|
42966
43266
|
});
|
|
42967
43267
|
break;
|
|
42968
43268
|
case 'flip':
|
|
42969
|
-
navigation.flip(
|
|
43269
|
+
navigation.flip(Component18, {
|
|
42970
43270
|
appearsFrom,
|
|
42971
43271
|
animation,
|
|
42972
43272
|
});
|
|
42973
43273
|
break;
|
|
42974
43274
|
case 'magicMotion':
|
|
42975
|
-
navigation.magicMotion(
|
|
43275
|
+
navigation.magicMotion(Component18, {
|
|
42976
43276
|
animation,
|
|
42977
43277
|
});
|
|
42978
43278
|
break;
|
|
42979
43279
|
case 'modal':
|
|
42980
|
-
navigation.modal(
|
|
43280
|
+
navigation.modal(Component18, {
|
|
42981
43281
|
backdropColor,
|
|
42982
43282
|
animation,
|
|
42983
43283
|
});
|
|
42984
43284
|
break;
|
|
42985
43285
|
case 'overlay':
|
|
42986
|
-
navigation.overlay(
|
|
43286
|
+
navigation.overlay(Component18, {
|
|
42987
43287
|
appearsFrom,
|
|
42988
43288
|
backdropColor,
|
|
42989
43289
|
animation,
|
|
@@ -43355,6 +43655,71 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
43355
43655
|
variantClassNames,
|
|
43356
43656
|
]);
|
|
43357
43657
|
}
|
|
43658
|
+
function withCodeBoundaryForOverrides(Component18, { scopeId, nodeId, override, inComponentSlot, }) {
|
|
43659
|
+
if (!shouldEnableCodeBoundaries()) {
|
|
43660
|
+
return override(Component18);
|
|
43661
|
+
}
|
|
43662
|
+
const appliedOverride = tryToApplyOverride(Component18, override);
|
|
43663
|
+
let hasErrorBeenLogged = false;
|
|
43664
|
+
function CodeBoundaryForOverrides(props, ref) {
|
|
43665
|
+
const externalComponentNestingLevel = useExternalComponentNestingLevel();
|
|
43666
|
+
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(externalComponentNestingLevel, inComponentSlot ?? false);
|
|
43667
|
+
if (shouldWrapWithBoundary) {
|
|
43668
|
+
if (appliedOverride.status === 'success') {
|
|
43669
|
+
return /* @__PURE__ */ jsx(CodeComponentBoundary, {
|
|
43670
|
+
errorMessage: getErrorMessageForOverride(scopeId, nodeId),
|
|
43671
|
+
fallback: /* @__PURE__ */ jsx(Component18, {
|
|
43672
|
+
...props,
|
|
43673
|
+
ref,
|
|
43674
|
+
}),
|
|
43675
|
+
children: /* @__PURE__ */ jsx(appliedOverride.Component, {
|
|
43676
|
+
...props,
|
|
43677
|
+
ref,
|
|
43678
|
+
}),
|
|
43679
|
+
});
|
|
43680
|
+
}
|
|
43681
|
+
else {
|
|
43682
|
+
if (!hasErrorBeenLogged) {
|
|
43683
|
+
logError(appliedOverride.error);
|
|
43684
|
+
logError(getErrorMessageForOverride(scopeId, nodeId));
|
|
43685
|
+
collectErrorToAnalytics(appliedOverride.error);
|
|
43686
|
+
hasErrorBeenLogged = true;
|
|
43687
|
+
}
|
|
43688
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
43689
|
+
...props,
|
|
43690
|
+
ref,
|
|
43691
|
+
});
|
|
43692
|
+
}
|
|
43693
|
+
}
|
|
43694
|
+
else {
|
|
43695
|
+
if (appliedOverride.status === 'success') {
|
|
43696
|
+
return /* @__PURE__ */ jsx(appliedOverride.Component, {
|
|
43697
|
+
...props,
|
|
43698
|
+
ref,
|
|
43699
|
+
});
|
|
43700
|
+
}
|
|
43701
|
+
else {
|
|
43702
|
+
throw appliedOverride.error;
|
|
43703
|
+
}
|
|
43704
|
+
}
|
|
43705
|
+
}
|
|
43706
|
+
return React4.forwardRef(CodeBoundaryForOverrides);
|
|
43707
|
+
}
|
|
43708
|
+
function tryToApplyOverride(Component18, override) {
|
|
43709
|
+
try {
|
|
43710
|
+
const ComponentWithOverrides = override(Component18);
|
|
43711
|
+
return {
|
|
43712
|
+
status: 'success',
|
|
43713
|
+
Component: ComponentWithOverrides,
|
|
43714
|
+
};
|
|
43715
|
+
}
|
|
43716
|
+
catch (error) {
|
|
43717
|
+
return {
|
|
43718
|
+
status: 'error',
|
|
43719
|
+
error,
|
|
43720
|
+
};
|
|
43721
|
+
}
|
|
43722
|
+
}
|
|
43358
43723
|
function extractMappingFromInfo(info) {
|
|
43359
43724
|
var _a;
|
|
43360
43725
|
const json = (_a = info.__FramerMetadata__.exports.default.annotations) == null ? void 0 : _a.framerVariables;
|
|
@@ -43367,14 +43732,14 @@ function extractMappingFromInfo(info) {
|
|
|
43367
43732
|
return void 0;
|
|
43368
43733
|
}
|
|
43369
43734
|
}
|
|
43370
|
-
function withMappedReactProps(
|
|
43735
|
+
function withMappedReactProps(Component18, info) {
|
|
43371
43736
|
return (rawProps) => {
|
|
43372
43737
|
const props = {};
|
|
43373
43738
|
const mapping = extractMappingFromInfo(info);
|
|
43374
43739
|
for (const key7 in rawProps) {
|
|
43375
43740
|
asRecord(props)[(mapping == null ? void 0 : mapping[key7]) ?? key7] = rawProps[key7];
|
|
43376
43741
|
}
|
|
43377
|
-
return /* @__PURE__ */ jsx(
|
|
43742
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
43378
43743
|
...props,
|
|
43379
43744
|
});
|
|
43380
43745
|
};
|
|
@@ -43417,9 +43782,9 @@ function createInputOutputRanges2(transformTargets, threshold, exitTarget) {
|
|
|
43417
43782
|
outputRange: [-1, -1, ...outputRange,],
|
|
43418
43783
|
};
|
|
43419
43784
|
}
|
|
43420
|
-
var withVariantAppearEffect = (
|
|
43785
|
+
var withVariantAppearEffect = (Component18) => React4.forwardRef((props, forwardedRef) => {
|
|
43421
43786
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
43422
|
-
return /* @__PURE__ */ jsx(
|
|
43787
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
43423
43788
|
...props,
|
|
43424
43789
|
ref: forwardedRef,
|
|
43425
43790
|
});
|
|
@@ -43504,26 +43869,26 @@ var withVariantAppearEffect = (Component16) => React4.forwardRef((props, forward
|
|
|
43504
43869
|
repeat: !animateOnce,
|
|
43505
43870
|
});
|
|
43506
43871
|
if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
|
|
43507
|
-
return /* @__PURE__ */ jsx(
|
|
43872
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
43508
43873
|
...rest,
|
|
43509
43874
|
variant: activeVariant ?? props.variant,
|
|
43510
43875
|
ref: observerRef,
|
|
43511
43876
|
});
|
|
43512
43877
|
}
|
|
43513
43878
|
else {
|
|
43514
|
-
return /* @__PURE__ */ jsx(
|
|
43879
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
43515
43880
|
...rest,
|
|
43516
43881
|
});
|
|
43517
43882
|
}
|
|
43518
43883
|
});
|
|
43519
|
-
var withVariantFX = (
|
|
43884
|
+
var withVariantFX = (Component18) => React4.forwardRef(({ initial, animate: animate3, exit, ...props }, forwardedRef) => {
|
|
43520
43885
|
const observerRef = useObserverRef(forwardedRef);
|
|
43521
43886
|
const effect = usePresenceAnimation({
|
|
43522
43887
|
initial,
|
|
43523
43888
|
animate: animate3,
|
|
43524
43889
|
exit,
|
|
43525
43890
|
}, observerRef, true);
|
|
43526
|
-
return /* @__PURE__ */ jsx(
|
|
43891
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
43527
43892
|
...props,
|
|
43528
43893
|
style: {
|
|
43529
43894
|
...(props == null ? void 0 : props.style),
|
|
@@ -46980,10 +47345,10 @@ var RichTextContainer = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
46980
47345
|
if (layoutId) {
|
|
46981
47346
|
rest.layout = 'preserve-aspect';
|
|
46982
47347
|
}
|
|
46983
|
-
const
|
|
47348
|
+
const Component18 = htmlElementAsMotionComponent(props.as);
|
|
46984
47349
|
if (isString2(props.viewBox)) {
|
|
46985
47350
|
if (props.as !== void 0) {
|
|
46986
|
-
return /* @__PURE__ */ jsx(
|
|
47351
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
46987
47352
|
...rest,
|
|
46988
47353
|
ref: containerRef,
|
|
46989
47354
|
style: containerStyle,
|
|
@@ -47017,7 +47382,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
47017
47382
|
});
|
|
47018
47383
|
}
|
|
47019
47384
|
}
|
|
47020
|
-
return /* @__PURE__ */ jsx(
|
|
47385
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
47021
47386
|
...rest,
|
|
47022
47387
|
ref: containerRef,
|
|
47023
47388
|
style: containerStyle,
|
|
@@ -49421,7 +49786,7 @@ MotionValue.prototype.addChild = function ({ transformer = (v) => v, }) {
|
|
|
49421
49786
|
if (false) {
|
|
49422
49787
|
MainLoop2.start();
|
|
49423
49788
|
}
|
|
49424
|
-
export { _injectRuntime, AcceleratedAnimation, addActionControls, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateVisualElement, animationControls, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform, calcLength, calculateRect, callEach, cancelFrame, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertPresentationTree, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, filterProps, findSpring, finiteNumber, FlatTree, Floating, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, getComponentSize, getDevicePreset, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getPropertyControls, getWhereExpressionFromPathVariables, gradientForShape, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, InternalID, interpolate, invariant, inView, isAnimatable2 as isAnimatable, isBrowser, isDesignDefinition, isDragActive, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isMotionComponent, isMotionValue2 as isMotionValue, isOfAnnotatedType, isOverride, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStraightCurve, isValidMotionProp, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, markHydrationStart, memoize2 as memoize, mirrorEasing, mix, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, namespace_exports as Reorder, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, NotFoundError, ObservableObject, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseFramerPageLink, pathDefaults, PathSegment, PathVariablesContext, pipe, Point, Polygon, preloadImage, PresenceContext, print, progress, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryEngine, RadialGradient, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, RenderTarget, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, RichText2 as RichText, roundedNumber, roundedNumberString, roundWithOffset, Scroll, scroll, scrollInfo, setGlobalRenderEnvironment, setInitialHydrationState, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, spring, SpringAnimator, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, steps, StyleSheetContext, SVG, SwitchLayoutGroupContext, sync, systemFontFamilyName, Text2 as Text, throttle, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformString2 as transformString, transformTemplate, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useLoadMorePaginatedQuery, useLocale, useLocaleCode, useLocaleInfo, useLocalizationInfo, useMeasureLayout, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePrefetch, usePreloadQuery, usePresence, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, version, VisualElement, visualElementStore, warning, WindowContext, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withVariantAppearEffect, withVariantFX, wrap, };
|
|
49789
|
+
export { _injectRuntime, AcceleratedAnimation, addActionControls, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateVisualElement, animationControls, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform, calcLength, calculateRect, callEach, cancelFrame, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertPresentationTree, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, filterProps, findSpring, finiteNumber, FlatTree, Floating, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, getComponentSize, getDevicePreset, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getPropertyControls, getWhereExpressionFromPathVariables, gradientForShape, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, InternalID, interpolate, invariant, inView, isAnimatable2 as isAnimatable, isBrowser, isDesignDefinition, isDragActive, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isMotionComponent, isMotionValue2 as isMotionValue, isOfAnnotatedType, isOverride, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStraightCurve, isValidMotionProp, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, markHydrationStart, memoize2 as memoize, mirrorEasing, mix, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, namespace_exports as Reorder, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, NotFoundError, ObservableObject, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseFramerPageLink, pathDefaults, PathSegment, PathVariablesContext, pipe, Point, Polygon, preloadImage, PresenceContext, print, progress, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryEngine, RadialGradient, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, RenderTarget, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, RichText2 as RichText, roundedNumber, roundedNumberString, roundWithOffset, Scroll, scroll, scrollInfo, setGlobalRenderEnvironment, setInitialHydrationState, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, SmartComponentScopedContainer, spring, SpringAnimator, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, steps, StyleSheetContext, SVG, SwitchLayoutGroupContext, sync, systemFontFamilyName, Text2 as Text, throttle, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformString2 as transformString, transformTemplate, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useLoadMorePaginatedQuery, useLocale, useLocaleCode, useLocaleInfo, useLocalizationInfo, useMeasureLayout, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePrefetch, usePreloadQuery, usePresence, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, version, VisualElement, visualElementStore, warning, WindowContext, withCodeBoundaryForOverrides, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withVariantAppearEffect, withVariantFX, wrap, };
|
|
49425
49790
|
/**
|
|
49426
49791
|
* @license Emotion v11.0.0
|
|
49427
49792
|
* MIT License
|
|
@@ -49468,5 +49833,6 @@ if (typeof document !== 'undefined') {
|
|
|
49468
49833
|
}
|
|
49469
49834
|
document.head.appendChild(fragment);
|
|
49470
49835
|
}
|
|
49471
|
-
export {
|
|
49836
|
+
export { Link as FramerLink };
|
|
49837
|
+
export { Router, FetchClientProvider, FormContext, LocaleInfoContext };
|
|
49472
49838
|
//# sourceMappingURL=framer.js.map
|