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/src/framer.js
CHANGED
|
@@ -15349,7 +15349,7 @@ function steps(numSteps, direction = 'end',) {
|
|
|
15349
15349
|
};
|
|
15350
15350
|
}
|
|
15351
15351
|
|
|
15352
|
-
// https :https://app.framerstatic.com/framer.
|
|
15352
|
+
// https :https://app.framerstatic.com/framer.K777Q2AQ.mjs
|
|
15353
15353
|
init_chunk_QLPHEVXG();
|
|
15354
15354
|
import React4 from 'react';
|
|
15355
15355
|
import { startTransition as startTransition2, } from 'react';
|
|
@@ -17009,8 +17009,8 @@ function renderPage(Page4, defaultPageStyle,) {
|
|
|
17009
17009
|
return React4.isValidElement(Page4,) ? React4.cloneElement(Page4, style,) : React4.createElement(Page4, style,);
|
|
17010
17010
|
}
|
|
17011
17011
|
var NotFoundError = class extends Error {};
|
|
17012
|
-
var
|
|
17013
|
-
var
|
|
17012
|
+
var NotFoundErrorBoundaryCaughtError = class extends Error {};
|
|
17013
|
+
var NotFoundErrorBoundary = class extends Component {
|
|
17014
17014
|
constructor(props,) {
|
|
17015
17015
|
super(props,);
|
|
17016
17016
|
this.state = {
|
|
@@ -17041,7 +17041,7 @@ var ErrorBoundary = class extends Component {
|
|
|
17041
17041
|
return this.props.children;
|
|
17042
17042
|
}
|
|
17043
17043
|
if (!(this.state.error instanceof NotFoundError)) {
|
|
17044
|
-
const error = new
|
|
17044
|
+
const error = new NotFoundErrorBoundaryCaughtError();
|
|
17045
17045
|
error.cause = this.state.error;
|
|
17046
17046
|
throw error;
|
|
17047
17047
|
}
|
|
@@ -17055,6 +17055,160 @@ var ErrorBoundary = class extends Component {
|
|
|
17055
17055
|
return renderPage(notFoundPage, defaultPageStyle,);
|
|
17056
17056
|
}
|
|
17057
17057
|
};
|
|
17058
|
+
function isObject(value,) {
|
|
17059
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value,);
|
|
17060
|
+
}
|
|
17061
|
+
function isString(value,) {
|
|
17062
|
+
return typeof value === 'string';
|
|
17063
|
+
}
|
|
17064
|
+
var preloadKey = 'preload';
|
|
17065
|
+
function isLazyComponentType(componentType,) {
|
|
17066
|
+
return typeof componentType === 'object' && componentType !== null && !React4.isValidElement(componentType,) &&
|
|
17067
|
+
preloadKey in componentType;
|
|
17068
|
+
}
|
|
17069
|
+
function lazy(factory,) {
|
|
17070
|
+
const LazyComponent = React4.lazy(factory,);
|
|
17071
|
+
let factoryPromise;
|
|
17072
|
+
let LoadedComponent;
|
|
17073
|
+
const Component18 = React4.forwardRef(function LazyWithPreload(props, ref,) {
|
|
17074
|
+
return React4.createElement(
|
|
17075
|
+
LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent,
|
|
17076
|
+
ref
|
|
17077
|
+
? {
|
|
17078
|
+
ref,
|
|
17079
|
+
...props,
|
|
17080
|
+
}
|
|
17081
|
+
: props,
|
|
17082
|
+
);
|
|
17083
|
+
},);
|
|
17084
|
+
Component18.preload = () => {
|
|
17085
|
+
if (!factoryPromise) {
|
|
17086
|
+
factoryPromise = factory().then((module) => {
|
|
17087
|
+
LoadedComponent = module.default;
|
|
17088
|
+
return LoadedComponent;
|
|
17089
|
+
},);
|
|
17090
|
+
}
|
|
17091
|
+
return factoryPromise;
|
|
17092
|
+
};
|
|
17093
|
+
return Component18;
|
|
17094
|
+
}
|
|
17095
|
+
function getRouteElementId(route, hash2,) {
|
|
17096
|
+
if (hash2 && route) {
|
|
17097
|
+
if (route.elements && hash2 in route.elements) {
|
|
17098
|
+
return route.elements[hash2];
|
|
17099
|
+
} else {
|
|
17100
|
+
return hash2;
|
|
17101
|
+
}
|
|
17102
|
+
}
|
|
17103
|
+
return void 0;
|
|
17104
|
+
}
|
|
17105
|
+
function isBot(userAgent,) {
|
|
17106
|
+
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent,);
|
|
17107
|
+
}
|
|
17108
|
+
function yieldToMain(options,) {
|
|
17109
|
+
if ('scheduler' in window) {
|
|
17110
|
+
if ('yield' in scheduler) return scheduler.yield(options,);
|
|
17111
|
+
if ('postTask' in scheduler) return scheduler.postTask(() => {}, options,);
|
|
17112
|
+
}
|
|
17113
|
+
if ((options === null || options === void 0 ? void 0 : options.priority) === 'user-blocking') {
|
|
17114
|
+
return Promise.resolve();
|
|
17115
|
+
}
|
|
17116
|
+
return new Promise((resolve) => {
|
|
17117
|
+
setTimeout(resolve,);
|
|
17118
|
+
},);
|
|
17119
|
+
}
|
|
17120
|
+
async function yieldBefore(fn, options,) {
|
|
17121
|
+
await yieldToMain(options,);
|
|
17122
|
+
return fn();
|
|
17123
|
+
}
|
|
17124
|
+
function interactionResponse(options,) {
|
|
17125
|
+
return new Promise((resolve) => {
|
|
17126
|
+
setTimeout(resolve, 100,);
|
|
17127
|
+
requestAnimationFrame(() => {
|
|
17128
|
+
void yieldBefore(resolve, options,);
|
|
17129
|
+
},);
|
|
17130
|
+
},);
|
|
17131
|
+
}
|
|
17132
|
+
function useAfterPaintEffect(effectFn, deps, opts, useEffectFn = useLayoutEffect,) {
|
|
17133
|
+
useEffectFn(() => {
|
|
17134
|
+
const runAfterPaint = async (fn) => {
|
|
17135
|
+
await interactionResponse(opts,);
|
|
17136
|
+
return fn();
|
|
17137
|
+
};
|
|
17138
|
+
const runPromise = runAfterPaint(effectFn,);
|
|
17139
|
+
return () => {
|
|
17140
|
+
void (async () => {
|
|
17141
|
+
const cleanup = await runPromise;
|
|
17142
|
+
if (!cleanup) return;
|
|
17143
|
+
void runAfterPaint(cleanup,);
|
|
17144
|
+
})();
|
|
17145
|
+
};
|
|
17146
|
+
}, deps,);
|
|
17147
|
+
}
|
|
17148
|
+
var noop2 = () => {};
|
|
17149
|
+
var EMPTY_ARRAY = [];
|
|
17150
|
+
var requestIdleCallback = /* @__PURE__ */ (() => {
|
|
17151
|
+
return typeof window !== 'undefined' ? window.requestIdleCallback || window.setTimeout : setTimeout;
|
|
17152
|
+
})();
|
|
17153
|
+
var ErrorBoundaryCaughtError = class extends NotFoundErrorBoundaryCaughtError {
|
|
17154
|
+
constructor() {
|
|
17155
|
+
super(...arguments,);
|
|
17156
|
+
this.caught = true;
|
|
17157
|
+
}
|
|
17158
|
+
};
|
|
17159
|
+
var GracefullyDegradingErrorBoundary = class extends Component {
|
|
17160
|
+
constructor() {
|
|
17161
|
+
super(...arguments,);
|
|
17162
|
+
this.state = {
|
|
17163
|
+
error: void 0,
|
|
17164
|
+
};
|
|
17165
|
+
this.message = 'Made UI non-interactive due to the error above. We\'ve logged it, but also please report this to the Framer team.';
|
|
17166
|
+
}
|
|
17167
|
+
static getDerivedStateFromError(error,) {
|
|
17168
|
+
return {
|
|
17169
|
+
error,
|
|
17170
|
+
};
|
|
17171
|
+
}
|
|
17172
|
+
componentDidCatch(error,) {
|
|
17173
|
+
var _a;
|
|
17174
|
+
if ('cause' in error) {
|
|
17175
|
+
error = error.cause;
|
|
17176
|
+
}
|
|
17177
|
+
console.error(this.message,);
|
|
17178
|
+
if (Math.random() > 0.01) return;
|
|
17179
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
17180
|
+
(_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push(['published_site_load_error', {
|
|
17181
|
+
message: String(error,),
|
|
17182
|
+
stack,
|
|
17183
|
+
},],);
|
|
17184
|
+
}
|
|
17185
|
+
render() {
|
|
17186
|
+
var _a;
|
|
17187
|
+
const error = this.state.error;
|
|
17188
|
+
if (!error) return this.props.children;
|
|
17189
|
+
if (!isBot(navigator.userAgent,)) {
|
|
17190
|
+
const fatalError = new ErrorBoundaryCaughtError();
|
|
17191
|
+
fatalError.cause = 'cause' in error ? error.cause : error;
|
|
17192
|
+
console.error(this.message, fatalError.cause,);
|
|
17193
|
+
throw fatalError;
|
|
17194
|
+
}
|
|
17195
|
+
return (
|
|
17196
|
+
// This has the caveat that we will slightly modify the DOM, but it appears to be fine in this case.
|
|
17197
|
+
// 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.
|
|
17198
|
+
jsx('div', {
|
|
17199
|
+
style: {
|
|
17200
|
+
display: 'contents',
|
|
17201
|
+
},
|
|
17202
|
+
suppressHydrationWarning: true,
|
|
17203
|
+
// 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.
|
|
17204
|
+
dangerouslySetInnerHTML: {
|
|
17205
|
+
__html: '<!-- DOM replaced by GracefullyDegradingErrorBoundary -->' +
|
|
17206
|
+
(((_a = document.getElementById('main',)) === null || _a === void 0 ? void 0 : _a.innerHTML) || ''),
|
|
17207
|
+
},
|
|
17208
|
+
},)
|
|
17209
|
+
);
|
|
17210
|
+
}
|
|
17211
|
+
};
|
|
17058
17212
|
var pathVariablesRegExpRaw = ':([a-z]\\w*)';
|
|
17059
17213
|
var pathVariablesRegExp = /* @__PURE__ */ new RegExp(pathVariablesRegExpRaw, 'gi',);
|
|
17060
17214
|
function fillPathVariables(path, variables,) {
|
|
@@ -17212,98 +17366,6 @@ function forwardQueryParams(queryParamsString, href,) {
|
|
|
17212
17366
|
}
|
|
17213
17367
|
return hrefWithoutHash.substring(0, startOfSearch + 1,) + newSearchParams.toString() + hash2;
|
|
17214
17368
|
}
|
|
17215
|
-
function isObject(value,) {
|
|
17216
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value,);
|
|
17217
|
-
}
|
|
17218
|
-
function isString(value,) {
|
|
17219
|
-
return typeof value === 'string';
|
|
17220
|
-
}
|
|
17221
|
-
var preloadKey = 'preload';
|
|
17222
|
-
function isLazyComponentType(componentType,) {
|
|
17223
|
-
return typeof componentType === 'object' && componentType !== null && !React4.isValidElement(componentType,) &&
|
|
17224
|
-
preloadKey in componentType;
|
|
17225
|
-
}
|
|
17226
|
-
function lazy(factory,) {
|
|
17227
|
-
const LazyComponent = React4.lazy(factory,);
|
|
17228
|
-
let factoryPromise;
|
|
17229
|
-
let LoadedComponent;
|
|
17230
|
-
const Component16 = React4.forwardRef(function LazyWithPreload(props, ref,) {
|
|
17231
|
-
return React4.createElement(
|
|
17232
|
-
LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent,
|
|
17233
|
-
ref
|
|
17234
|
-
? {
|
|
17235
|
-
ref,
|
|
17236
|
-
...props,
|
|
17237
|
-
}
|
|
17238
|
-
: props,
|
|
17239
|
-
);
|
|
17240
|
-
},);
|
|
17241
|
-
Component16.preload = () => {
|
|
17242
|
-
if (!factoryPromise) {
|
|
17243
|
-
factoryPromise = factory().then((module) => {
|
|
17244
|
-
LoadedComponent = module.default;
|
|
17245
|
-
return LoadedComponent;
|
|
17246
|
-
},);
|
|
17247
|
-
}
|
|
17248
|
-
return factoryPromise;
|
|
17249
|
-
};
|
|
17250
|
-
return Component16;
|
|
17251
|
-
}
|
|
17252
|
-
function getRouteElementId(route, hash2,) {
|
|
17253
|
-
if (hash2 && route) {
|
|
17254
|
-
if (route.elements && hash2 in route.elements) {
|
|
17255
|
-
return route.elements[hash2];
|
|
17256
|
-
} else {
|
|
17257
|
-
return hash2;
|
|
17258
|
-
}
|
|
17259
|
-
}
|
|
17260
|
-
return void 0;
|
|
17261
|
-
}
|
|
17262
|
-
function isBot(userAgent,) {
|
|
17263
|
-
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent,);
|
|
17264
|
-
}
|
|
17265
|
-
function yieldToMain(options,) {
|
|
17266
|
-
if ('scheduler' in window) {
|
|
17267
|
-
if ('yield' in scheduler) return scheduler.yield(options,);
|
|
17268
|
-
if ('postTask' in scheduler) return scheduler.postTask(() => {}, options,);
|
|
17269
|
-
}
|
|
17270
|
-
if ((options === null || options === void 0 ? void 0 : options.priority) === 'user-blocking') {
|
|
17271
|
-
return Promise.resolve();
|
|
17272
|
-
}
|
|
17273
|
-
return new Promise((resolve) => {
|
|
17274
|
-
setTimeout(resolve,);
|
|
17275
|
-
},);
|
|
17276
|
-
}
|
|
17277
|
-
async function yieldBefore(fn, options,) {
|
|
17278
|
-
await yieldToMain(options,);
|
|
17279
|
-
return fn();
|
|
17280
|
-
}
|
|
17281
|
-
function interactionResponse(options,) {
|
|
17282
|
-
return new Promise((resolve) => {
|
|
17283
|
-
setTimeout(resolve, 100,);
|
|
17284
|
-
requestAnimationFrame(() => {
|
|
17285
|
-
void yieldBefore(resolve, options,);
|
|
17286
|
-
},);
|
|
17287
|
-
},);
|
|
17288
|
-
}
|
|
17289
|
-
function useAfterPaintEffect(effectFn, deps, opts, useEffectFn = useLayoutEffect,) {
|
|
17290
|
-
useEffectFn(() => {
|
|
17291
|
-
const runAfterPaint = async (fn) => {
|
|
17292
|
-
await interactionResponse(opts,);
|
|
17293
|
-
return fn();
|
|
17294
|
-
};
|
|
17295
|
-
const runPromise = runAfterPaint(effectFn,);
|
|
17296
|
-
return () => {
|
|
17297
|
-
void (async () => {
|
|
17298
|
-
const cleanup = await runPromise;
|
|
17299
|
-
if (!cleanup) return;
|
|
17300
|
-
void runAfterPaint(cleanup,);
|
|
17301
|
-
})();
|
|
17302
|
-
};
|
|
17303
|
-
}, deps,);
|
|
17304
|
-
}
|
|
17305
|
-
var noop2 = () => {};
|
|
17306
|
-
var EMPTY_ARRAY = [];
|
|
17307
17369
|
async function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils,) {
|
|
17308
17370
|
var _a, _b, _c;
|
|
17309
17371
|
let resultPath = path;
|
|
@@ -17756,11 +17818,8 @@ function createViewTransitionStylesheet({
|
|
|
17756
17818
|
styleElement.textContent = styleContent;
|
|
17757
17819
|
document.head.appendChild(styleElement,);
|
|
17758
17820
|
}
|
|
17759
|
-
var _requestIdleCallback = /* @__PURE__ */ (() => {
|
|
17760
|
-
return typeof window !== 'undefined' ? window.requestIdleCallback || window.setTimeout : setTimeout;
|
|
17761
|
-
})();
|
|
17762
17821
|
function removeViewTransitionStylesheet() {
|
|
17763
|
-
|
|
17822
|
+
requestIdleCallback(() => {
|
|
17764
17823
|
frame.render(() => {
|
|
17765
17824
|
performance.mark('framer-vt-remove',);
|
|
17766
17825
|
const element = document.getElementById(VIEW_TRANSITION_STYLES_ID,);
|
|
@@ -17887,14 +17946,15 @@ async function pushRouteState(
|
|
|
17887
17946
|
path,
|
|
17888
17947
|
} = route;
|
|
17889
17948
|
if (!path) return;
|
|
17949
|
+
const newPath = getPathForRoute(route, {
|
|
17950
|
+
currentRoutePath,
|
|
17951
|
+
currentPathVariables,
|
|
17952
|
+
hash: hash2,
|
|
17953
|
+
pathVariables,
|
|
17954
|
+
preserveQueryParams,
|
|
17955
|
+
},);
|
|
17956
|
+
const currentUrl = window.location.href;
|
|
17890
17957
|
try {
|
|
17891
|
-
const newPath = getPathForRoute(route, {
|
|
17892
|
-
currentRoutePath,
|
|
17893
|
-
currentPathVariables,
|
|
17894
|
-
hash: hash2,
|
|
17895
|
-
pathVariables,
|
|
17896
|
-
preserveQueryParams,
|
|
17897
|
-
},);
|
|
17898
17958
|
const urlUpdatePromise = pushHistoryState(
|
|
17899
17959
|
{
|
|
17900
17960
|
routeId,
|
|
@@ -17909,6 +17969,15 @@ async function pushRouteState(
|
|
|
17909
17969
|
return await urlUpdatePromise;
|
|
17910
17970
|
} catch {}
|
|
17911
17971
|
}
|
|
17972
|
+
function updateCanonicalURL(url, prevUrl,) {
|
|
17973
|
+
requestIdleCallback(() => {
|
|
17974
|
+
const canonical = document.querySelector('link[rel=\'canonical\']',);
|
|
17975
|
+
if (!canonical) return;
|
|
17976
|
+
const newURL = new URL(url, prevUrl,);
|
|
17977
|
+
newURL.search = '';
|
|
17978
|
+
canonical.setAttribute('href', newURL.toString(),);
|
|
17979
|
+
},);
|
|
17980
|
+
}
|
|
17912
17981
|
function isHistoryState(data2,) {
|
|
17913
17982
|
const routeIdKey = 'routeId';
|
|
17914
17983
|
return isObject(data2,) && isString(data2[routeIdKey],);
|
|
@@ -17933,6 +18002,7 @@ async function pushHistoryState(data2, url, awaitPaintBeforeUpdate = false, isNa
|
|
|
17933
18002
|
},);
|
|
17934
18003
|
}
|
|
17935
18004
|
performance.mark('framer-history-push',);
|
|
18005
|
+
updateCanonicalURL(url, window.location.href,);
|
|
17936
18006
|
if (!isNavigationTransition) {
|
|
17937
18007
|
window.history.pushState(data2, '', url,);
|
|
17938
18008
|
return;
|
|
@@ -18018,10 +18088,11 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId,) {
|
|
|
18018
18088
|
isString(localeId,) ? localeId : void 0,
|
|
18019
18089
|
isString(hash2,) ? hash2 : void 0,
|
|
18020
18090
|
isObject(pathVariables,) ? pathVariables : void 0,
|
|
18021
|
-
false,
|
|
18022
18091
|
true,
|
|
18092
|
+
false,
|
|
18023
18093
|
);
|
|
18024
18094
|
};
|
|
18095
|
+
updateCanonicalURL(window.location.href,);
|
|
18025
18096
|
const transition = await startViewTransition2(currentRouteId.current, routeId, changeRoute, false,);
|
|
18026
18097
|
if (transition) {
|
|
18027
18098
|
void transition.updateCallbackDone.then((_d = viewTransitionReady.current) === null || _d === void 0 ? void 0 : _d.resolve,).catch(
|
|
@@ -18449,8 +18520,8 @@ var SuspenseErrorBoundary = class extends Component {
|
|
|
18449
18520
|
};
|
|
18450
18521
|
}
|
|
18451
18522
|
static getDerivedStateFromError(error,) {
|
|
18452
|
-
if (!(error instanceof
|
|
18453
|
-
console.error('Derived error in SuspenseErrorBoundary', error,);
|
|
18523
|
+
if (!(error instanceof NotFoundErrorBoundaryCaughtError)) {
|
|
18524
|
+
console.error('Derived error in SuspenseErrorBoundary:\n', error,);
|
|
18454
18525
|
}
|
|
18455
18526
|
return {
|
|
18456
18527
|
error,
|
|
@@ -18458,25 +18529,24 @@ var SuspenseErrorBoundary = class extends Component {
|
|
|
18458
18529
|
}
|
|
18459
18530
|
componentDidCatch(error, errorInfo,) {
|
|
18460
18531
|
var _a;
|
|
18461
|
-
if (error instanceof
|
|
18532
|
+
if (error instanceof NotFoundErrorBoundaryCaughtError) {
|
|
18462
18533
|
return;
|
|
18463
18534
|
}
|
|
18464
18535
|
const componentStack = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.componentStack;
|
|
18465
|
-
console.error('Caught error in SuspenseErrorBoundary', error, componentStack,);
|
|
18466
|
-
|
|
18467
|
-
|
|
18468
|
-
|
|
18469
|
-
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
},],);
|
|
18474
|
-
}
|
|
18536
|
+
console.error('Caught error in SuspenseErrorBoundary:\n', error, componentStack,);
|
|
18537
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
18538
|
+
(_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
18539
|
+
message: String(error,),
|
|
18540
|
+
stack,
|
|
18541
|
+
// only log componentStack if we don't have a stack
|
|
18542
|
+
componentStack: stack ? void 0 : componentStack,
|
|
18543
|
+
},],);
|
|
18475
18544
|
}
|
|
18476
18545
|
render() {
|
|
18477
|
-
|
|
18478
|
-
if (
|
|
18479
|
-
|
|
18546
|
+
const error = this.state.error;
|
|
18547
|
+
if (error === void 0) return this.props.children;
|
|
18548
|
+
if (error instanceof NotFoundErrorBoundaryCaughtError) {
|
|
18549
|
+
throw error.cause;
|
|
18480
18550
|
}
|
|
18481
18551
|
window.__framer_STPD_OPT_OUT__ = true;
|
|
18482
18552
|
return jsx(Suspense2, {
|
|
@@ -18562,8 +18632,9 @@ function useNavigationTransition(enableAsyncURLUpdates,) {
|
|
|
18562
18632
|
return useCallback(async (transitionFn, updateURL, isAbortable = true,) => {
|
|
18563
18633
|
var _a;
|
|
18564
18634
|
setHydrationDone();
|
|
18635
|
+
const hasUpdateURL = updateURL !== void 0;
|
|
18565
18636
|
if (!enableAsyncURLUpdates) {
|
|
18566
|
-
|
|
18637
|
+
if (hasUpdateURL) await updateURL();
|
|
18567
18638
|
transitionFn();
|
|
18568
18639
|
void monitorNextPaintAfterRender();
|
|
18569
18640
|
return new Promise((resolve) => {
|
|
@@ -18575,7 +18646,7 @@ function useNavigationTransition(enableAsyncURLUpdates,) {
|
|
|
18575
18646
|
navigationController.current = controller;
|
|
18576
18647
|
const signal = controller === null || controller === void 0 ? void 0 : controller.signal;
|
|
18577
18648
|
const nextRender = monitorNextPaintAfterRender();
|
|
18578
|
-
if (!
|
|
18649
|
+
if (!hasUpdateURL) {
|
|
18579
18650
|
navigationController.current = void 0;
|
|
18580
18651
|
transitionFn(signal,);
|
|
18581
18652
|
return nextRender;
|
|
@@ -18714,7 +18785,7 @@ function Router({
|
|
|
18714
18785
|
startViewTransition2,
|
|
18715
18786
|
],);
|
|
18716
18787
|
const setCurrentRouteId = useCallback(
|
|
18717
|
-
(routeId, localeId, hash2, pathVariables,
|
|
18788
|
+
(routeId, localeId, hash2, pathVariables, isHistoryTransition, smoothScroll = false, updateURL,) => {
|
|
18718
18789
|
const currentRouteId2 = currentRouteRef.current;
|
|
18719
18790
|
currentRouteRef.current = routeId;
|
|
18720
18791
|
currentPathVariablesRef.current = pathVariables;
|
|
@@ -18803,8 +18874,8 @@ function Router({
|
|
|
18803
18874
|
currentRouteLocaleId,
|
|
18804
18875
|
routeElementId,
|
|
18805
18876
|
pathVariables,
|
|
18806
|
-
smoothScroll,
|
|
18807
18877
|
false,
|
|
18878
|
+
smoothScroll,
|
|
18808
18879
|
disableHistory ? void 0 : updateURL,
|
|
18809
18880
|
);
|
|
18810
18881
|
}, [routes, setCurrentRouteId, disableHistory, preserveQueryParams, enableAsyncURLUpdates,],);
|
|
@@ -18829,42 +18900,44 @@ function Router({
|
|
|
18829
18900
|
? fillPathVariables(current.path, currentPathVariables,)
|
|
18830
18901
|
: current.path;
|
|
18831
18902
|
const remountKey = String(currentLocaleId,) + pathWithFilledVariables;
|
|
18832
|
-
return jsx(
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
children:
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
children:
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
|
|
18852
|
-
|
|
18853
|
-
|
|
18854
|
-
|
|
18855
|
-
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18903
|
+
return jsx(GracefullyDegradingErrorBoundary, {
|
|
18904
|
+
children: jsx(RouterAPIProvider, {
|
|
18905
|
+
api,
|
|
18906
|
+
children: jsx(LocaleInfoContext.Provider, {
|
|
18907
|
+
value: localeInfo,
|
|
18908
|
+
children: jsxs(SuspenseThatPreservesDom, {
|
|
18909
|
+
children: [
|
|
18910
|
+
jsx(NotFoundErrorBoundary, {
|
|
18911
|
+
notFoundPage,
|
|
18912
|
+
defaultPageStyle,
|
|
18913
|
+
forceUpdateKey: dep,
|
|
18914
|
+
children: jsx(WithLayoutTemplate, {
|
|
18915
|
+
LayoutTemplate,
|
|
18916
|
+
routeId: currentRouteId,
|
|
18917
|
+
children: jsxs(Fragment, {
|
|
18918
|
+
children: [
|
|
18919
|
+
jsx(MarkSuspenseEffects.Start, {},),
|
|
18920
|
+
pageExistsInCurrentLocale
|
|
18921
|
+
? renderPage(
|
|
18922
|
+
current.page,
|
|
18923
|
+
LayoutTemplate
|
|
18924
|
+
? {
|
|
18925
|
+
...defaultPageStyle,
|
|
18926
|
+
display: 'content',
|
|
18927
|
+
}
|
|
18928
|
+
: defaultPageStyle,
|
|
18929
|
+
)
|
|
18930
|
+
: // LAYOUT_TEMPLATE @TODO: display: content for not found page?
|
|
18931
|
+
notFoundPage && renderPage(notFoundPage, defaultPageStyle,),
|
|
18932
|
+
],
|
|
18933
|
+
}, remountKey,),
|
|
18934
|
+
},),
|
|
18862
18935
|
},),
|
|
18863
|
-
|
|
18864
|
-
|
|
18865
|
-
|
|
18866
|
-
|
|
18867
|
-
|
|
18936
|
+
jsx(TurnOnReactEventHandling, {},),
|
|
18937
|
+
jsx(MarkSuspenseEffects.End, {},),
|
|
18938
|
+
editorBar,
|
|
18939
|
+
],
|
|
18940
|
+
},),
|
|
18868
18941
|
},),
|
|
18869
18942
|
},),
|
|
18870
18943
|
},);
|
|
@@ -21320,6 +21393,7 @@ var mockWindow = {
|
|
|
21320
21393
|
scrollY: 0,
|
|
21321
21394
|
location: {
|
|
21322
21395
|
href: '',
|
|
21396
|
+
pathname: '',
|
|
21323
21397
|
},
|
|
21324
21398
|
document: {
|
|
21325
21399
|
cookie: '',
|
|
@@ -21348,6 +21422,7 @@ var mockWindow = {
|
|
|
21348
21422
|
innerWidth: 0,
|
|
21349
21423
|
SVGSVGElement: {},
|
|
21350
21424
|
open: function (_url, _target, _features,) {},
|
|
21425
|
+
__framer_events: [],
|
|
21351
21426
|
};
|
|
21352
21427
|
var safeWindow = typeof window === 'undefined' ? mockWindow : window;
|
|
21353
21428
|
var _raf = (f) => {
|
|
@@ -22303,7 +22378,7 @@ function getColorsFromTheme(theme, type,) {
|
|
|
22303
22378
|
screenColor: isDarkTheme ? '#333' : '#eee',
|
|
22304
22379
|
};
|
|
22305
22380
|
}
|
|
22306
|
-
var
|
|
22381
|
+
var ErrorBoundary = class extends Component {
|
|
22307
22382
|
constructor() {
|
|
22308
22383
|
super(...arguments,);
|
|
22309
22384
|
__publicField(this, 'state', {},);
|
|
@@ -22462,7 +22537,7 @@ function Device({
|
|
|
22462
22537
|
ref: screenRef,
|
|
22463
22538
|
children: /* @__PURE__ */ jsx(MotionConfig, {
|
|
22464
22539
|
transformPagePoint: invertScale2,
|
|
22465
|
-
children: /* @__PURE__ */ jsx(
|
|
22540
|
+
children: /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
22466
22541
|
children,
|
|
22467
22542
|
},),
|
|
22468
22543
|
},),
|
|
@@ -27212,7 +27287,7 @@ function useMeasuredSize(ref,) {
|
|
|
27212
27287
|
return size.current;
|
|
27213
27288
|
}
|
|
27214
27289
|
var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
|
|
27215
|
-
var withMeasuredSize = (
|
|
27290
|
+
var withMeasuredSize = (Component18) => (props) => {
|
|
27216
27291
|
const ref = React4.useRef(null,);
|
|
27217
27292
|
const size = useMeasuredSize(ref,);
|
|
27218
27293
|
const dataProps = {
|
|
@@ -27229,7 +27304,7 @@ var withMeasuredSize = (Component16) => (props) => {
|
|
|
27229
27304
|
},
|
|
27230
27305
|
ref,
|
|
27231
27306
|
...dataProps,
|
|
27232
|
-
children: shouldRender && /* @__PURE__ */ jsx(
|
|
27307
|
+
children: shouldRender && /* @__PURE__ */ jsx(Component18, {
|
|
27233
27308
|
...props,
|
|
27234
27309
|
width: (size == null ? void 0 : size.width) ?? fallbackWidth,
|
|
27235
27310
|
height: (size == null ? void 0 : size.height) ?? fallbackHeight,
|
|
@@ -28729,7 +28804,7 @@ var clamp2 = (value, a, b,) => {
|
|
|
28729
28804
|
var DraggingContext = /* @__PURE__ */ React4.createContext({
|
|
28730
28805
|
dragging: false,
|
|
28731
28806
|
},);
|
|
28732
|
-
function WithDragging(
|
|
28807
|
+
function WithDragging(Component18,) {
|
|
28733
28808
|
const _WithDraggingHOC = class extends React4.Component {
|
|
28734
28809
|
constructor(props, defaultProps,) {
|
|
28735
28810
|
super(props, defaultProps,);
|
|
@@ -29357,7 +29432,7 @@ function WithDragging(Component16,) {
|
|
|
29357
29432
|
value: {
|
|
29358
29433
|
dragging: this.state.isDragging,
|
|
29359
29434
|
},
|
|
29360
|
-
children: /* @__PURE__ */ jsx(
|
|
29435
|
+
children: /* @__PURE__ */ jsx(Component18, {
|
|
29361
29436
|
...originalProps,
|
|
29362
29437
|
},),
|
|
29363
29438
|
},);
|
|
@@ -29395,9 +29470,9 @@ function WithDragging(Component16,) {
|
|
|
29395
29470
|
constraints: {},
|
|
29396
29471
|
mouseWheel: false,
|
|
29397
29472
|
},);
|
|
29398
|
-
__publicField(WithDraggingHOC, 'defaultProps', Object.assign({},
|
|
29473
|
+
__publicField(WithDraggingHOC, 'defaultProps', Object.assign({}, Component18.defaultProps, _WithDraggingHOC.draggingDefaultProps,),);
|
|
29399
29474
|
const withDragging = WithDraggingHOC;
|
|
29400
|
-
(0, import_hoist_non_react_statics.default)(withDragging,
|
|
29475
|
+
(0, import_hoist_non_react_statics.default)(withDragging, Component18,);
|
|
29401
29476
|
return withDragging;
|
|
29402
29477
|
}
|
|
29403
29478
|
var hoverProps = {
|
|
@@ -32201,7 +32276,7 @@ function useInfiniteScroll({
|
|
|
32201
32276
|
};
|
|
32202
32277
|
}, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,],);
|
|
32203
32278
|
}
|
|
32204
|
-
function withInfiniteScroll(
|
|
32279
|
+
function withInfiniteScroll(Component18,) {
|
|
32205
32280
|
return React4.forwardRef(({
|
|
32206
32281
|
__paginationInfo,
|
|
32207
32282
|
__loadMore,
|
|
@@ -32215,7 +32290,7 @@ function withInfiniteScroll(Component16,) {
|
|
|
32215
32290
|
ref: infiniteScrollRef,
|
|
32216
32291
|
paginationInfo: __paginationInfo,
|
|
32217
32292
|
},);
|
|
32218
|
-
return /* @__PURE__ */ jsx(
|
|
32293
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
32219
32294
|
...props,
|
|
32220
32295
|
ref: infiniteScrollRef,
|
|
32221
32296
|
},);
|
|
@@ -35156,7 +35231,7 @@ function convertColorProps(props,) {
|
|
|
35156
35231
|
}
|
|
35157
35232
|
return props;
|
|
35158
35233
|
}
|
|
35159
|
-
function WithOverride(
|
|
35234
|
+
function WithOverride(Component18, override,) {
|
|
35160
35235
|
const useOverride = typeof override === 'function' ? (props) => override(convertColorProps(props,),) : () => convertColorProps(override,);
|
|
35161
35236
|
const ComponentWithOverride = function (props,) {
|
|
35162
35237
|
useContext(DataObserverContext,);
|
|
@@ -35165,14 +35240,14 @@ function WithOverride(Component16, override,) {
|
|
|
35165
35240
|
style,
|
|
35166
35241
|
...rest
|
|
35167
35242
|
} = props;
|
|
35168
|
-
return /* @__PURE__ */ jsx(
|
|
35243
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
35169
35244
|
...rest,
|
|
35170
35245
|
...overrideProps,
|
|
35171
35246
|
_initialStyle: style,
|
|
35172
35247
|
},);
|
|
35173
35248
|
};
|
|
35174
|
-
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride,
|
|
35175
|
-
ComponentWithOverride['displayName'] = `WithOverride(${
|
|
35249
|
+
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component18,);
|
|
35250
|
+
ComponentWithOverride['displayName'] = `WithOverride(${Component18.displayName || Component18.name})`;
|
|
35176
35251
|
return ComponentWithOverride;
|
|
35177
35252
|
}
|
|
35178
35253
|
var prefix = '__framer__';
|
|
@@ -36014,11 +36089,11 @@ function addMotionValueStyle(style, values,) {
|
|
|
36014
36089
|
function isVariantOrVariantList(value,) {
|
|
36015
36090
|
return isString2(value,) || Array.isArray(value,);
|
|
36016
36091
|
}
|
|
36017
|
-
var withFX = (
|
|
36092
|
+
var withFX = (Component18) =>
|
|
36018
36093
|
React4.forwardRef((props, forwardedRef,) => {
|
|
36019
36094
|
var _a;
|
|
36020
36095
|
if (props.__withFX) {
|
|
36021
|
-
return /* @__PURE__ */ jsx(
|
|
36096
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
36022
36097
|
...props,
|
|
36023
36098
|
animate: void 0,
|
|
36024
36099
|
initial: void 0,
|
|
@@ -36029,7 +36104,7 @@ var withFX = (Component16) =>
|
|
|
36029
36104
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
36030
36105
|
const animate4 = isVariantOrVariantList(props.animate,) ? props.animate : void 0;
|
|
36031
36106
|
const initial2 = isVariantOrVariantList(props.initial,) ? props.initial : void 0;
|
|
36032
|
-
return /* @__PURE__ */ jsx(
|
|
36107
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
36033
36108
|
...props,
|
|
36034
36109
|
animate: animate4,
|
|
36035
36110
|
initial: initial2,
|
|
@@ -36133,7 +36208,7 @@ var withFX = (Component16) =>
|
|
|
36133
36208
|
exit,
|
|
36134
36209
|
}
|
|
36135
36210
|
: {};
|
|
36136
|
-
return /* @__PURE__ */ jsx(
|
|
36211
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
36137
36212
|
...forwardedProps,
|
|
36138
36213
|
...motionGestures,
|
|
36139
36214
|
__withFX: true,
|
|
@@ -36263,13 +36338,13 @@ var ComponentViewportContext = /* @__PURE__ */ React4.createContext({},);
|
|
|
36263
36338
|
function useComponentViewport() {
|
|
36264
36339
|
return React4.useContext(ComponentViewportContext,);
|
|
36265
36340
|
}
|
|
36266
|
-
var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(({
|
|
36341
|
+
var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(function ComponentViewportProvider2({
|
|
36267
36342
|
width,
|
|
36268
36343
|
height,
|
|
36269
36344
|
y,
|
|
36270
36345
|
children,
|
|
36271
36346
|
...rest
|
|
36272
|
-
}, ref,)
|
|
36347
|
+
}, ref,) {
|
|
36273
36348
|
const componentViewport = React4.useMemo(() => {
|
|
36274
36349
|
return {
|
|
36275
36350
|
width,
|
|
@@ -36283,10 +36358,10 @@ var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(({
|
|
|
36283
36358
|
children: cloneWithPropsAndRef(children, rest,),
|
|
36284
36359
|
},);
|
|
36285
36360
|
},);
|
|
36286
|
-
var withGeneratedLayoutId = (
|
|
36361
|
+
var withGeneratedLayoutId = (Component18) =>
|
|
36287
36362
|
React4.forwardRef((props, ref,) => {
|
|
36288
36363
|
const layoutId = useLayoutId2(props,);
|
|
36289
|
-
return /* @__PURE__ */ jsx(
|
|
36364
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
36290
36365
|
layoutId,
|
|
36291
36366
|
...props,
|
|
36292
36367
|
layoutIdKey: void 0,
|
|
@@ -36294,7 +36369,93 @@ var withGeneratedLayoutId = (Component16) =>
|
|
|
36294
36369
|
ref,
|
|
36295
36370
|
},);
|
|
36296
36371
|
},);
|
|
36297
|
-
|
|
36372
|
+
function collectErrorToAnalytics(error, errorInfo,) {
|
|
36373
|
+
var _a;
|
|
36374
|
+
if (typeof window === 'undefined') return;
|
|
36375
|
+
if (Math.random() > 0.01) return;
|
|
36376
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
36377
|
+
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
36378
|
+
(_a = safeWindow.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
36379
|
+
message: String(error,),
|
|
36380
|
+
stack,
|
|
36381
|
+
// only log componentStack if we don't have a stack
|
|
36382
|
+
componentStack: stack ? void 0 : componentStack,
|
|
36383
|
+
},],);
|
|
36384
|
+
}
|
|
36385
|
+
function logError(...args) {
|
|
36386
|
+
if (false) return;
|
|
36387
|
+
console.error(...args,);
|
|
36388
|
+
}
|
|
36389
|
+
function shouldEnableCodeBoundaries() {
|
|
36390
|
+
return RenderTarget.current() !== RenderTarget.canvas;
|
|
36391
|
+
}
|
|
36392
|
+
function CodeComponentBoundary({
|
|
36393
|
+
errorMessage,
|
|
36394
|
+
fallback,
|
|
36395
|
+
children,
|
|
36396
|
+
},) {
|
|
36397
|
+
if (!shouldEnableCodeBoundaries()) {
|
|
36398
|
+
return children;
|
|
36399
|
+
}
|
|
36400
|
+
return /* @__PURE__ */ jsx(ClientSideErrorBoundary, {
|
|
36401
|
+
fallback,
|
|
36402
|
+
errorMessage,
|
|
36403
|
+
children: /* @__PURE__ */ jsx(ServerSideErrorBoundary, {
|
|
36404
|
+
fallback,
|
|
36405
|
+
children,
|
|
36406
|
+
},),
|
|
36407
|
+
},);
|
|
36408
|
+
}
|
|
36409
|
+
var ClientSideErrorBoundary = class extends Component {
|
|
36410
|
+
constructor() {
|
|
36411
|
+
super(...arguments,);
|
|
36412
|
+
__publicField(this, 'state', {
|
|
36413
|
+
hasError: false,
|
|
36414
|
+
},);
|
|
36415
|
+
}
|
|
36416
|
+
static getDerivedStateFromError() {
|
|
36417
|
+
return {
|
|
36418
|
+
hasError: true,
|
|
36419
|
+
};
|
|
36420
|
+
}
|
|
36421
|
+
componentDidCatch(error, errorInfo,) {
|
|
36422
|
+
logError(this.props.errorMessage, errorInfo == null ? void 0 : errorInfo.componentStack,);
|
|
36423
|
+
collectErrorToAnalytics(error, errorInfo,);
|
|
36424
|
+
}
|
|
36425
|
+
render() {
|
|
36426
|
+
const {
|
|
36427
|
+
children,
|
|
36428
|
+
fallback = null,
|
|
36429
|
+
} = this.props;
|
|
36430
|
+
const {
|
|
36431
|
+
hasError,
|
|
36432
|
+
} = this.state;
|
|
36433
|
+
return hasError ? fallback : children;
|
|
36434
|
+
}
|
|
36435
|
+
};
|
|
36436
|
+
function ServerSideErrorBoundary({
|
|
36437
|
+
children,
|
|
36438
|
+
fallback = null,
|
|
36439
|
+
},) {
|
|
36440
|
+
return typeof window === 'undefined'
|
|
36441
|
+
? // On the server, Suspense fallback is activated by errors. So we use the actual Suspense,
|
|
36442
|
+
// and render the actual error fallback if Suspense activates.
|
|
36443
|
+
/* @__PURE__ */
|
|
36444
|
+
jsx(Suspense2, {
|
|
36445
|
+
fallback,
|
|
36446
|
+
children,
|
|
36447
|
+
},)
|
|
36448
|
+
: // On the client, Suspense fallback is activated by data fetching. So we use SuspenseThatPreservesDom,
|
|
36449
|
+
// because we don’t want to render a fallback if the boundary gets inadvertently activated.
|
|
36450
|
+
//
|
|
36451
|
+
// “Why won’t you just render plain children without Suspense?” Because that would cause a hydration mismatch
|
|
36452
|
+
// (the server has Suspense, the client doesn’t).
|
|
36453
|
+
/* @__PURE__ */
|
|
36454
|
+
jsx(SuspenseThatPreservesDom, {
|
|
36455
|
+
children,
|
|
36456
|
+
},);
|
|
36457
|
+
}
|
|
36458
|
+
var DeprecatedContainerErrorBoundary = class extends Component {
|
|
36298
36459
|
constructor() {
|
|
36299
36460
|
super(...arguments,);
|
|
36300
36461
|
__publicField(this, 'state', {
|
|
@@ -36304,7 +36465,6 @@ var ContainerErrorBoundary = class extends Component {
|
|
|
36304
36465
|
// We use `componentDidCatch` instead of `static getDerivedStateFromError()` because the latter could also catch hydration errors.
|
|
36305
36466
|
// Hydration errors are recoverable by React, so we don't want to hide the coponent in that case (since the tree will not unmount).
|
|
36306
36467
|
componentDidCatch(error, errorInfo,) {
|
|
36307
|
-
var _a;
|
|
36308
36468
|
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
36309
36469
|
console.error(
|
|
36310
36470
|
'Error in component (see previous log). This component has been hidden. Please check any custom code or code overrides to fix.',
|
|
@@ -36313,15 +36473,7 @@ var ContainerErrorBoundary = class extends Component {
|
|
|
36313
36473
|
this.setState({
|
|
36314
36474
|
hasError: true,
|
|
36315
36475
|
},);
|
|
36316
|
-
|
|
36317
|
-
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
36318
|
-
(_a = window.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
36319
|
-
message: String(error,),
|
|
36320
|
-
stack,
|
|
36321
|
-
// only log componentStack if we don't have a stack
|
|
36322
|
-
componentStack: stack ? void 0 : componentStack,
|
|
36323
|
-
},],);
|
|
36324
|
-
}
|
|
36476
|
+
collectErrorToAnalytics(error, errorInfo,);
|
|
36325
36477
|
}
|
|
36326
36478
|
render() {
|
|
36327
36479
|
const {
|
|
@@ -36333,14 +36485,84 @@ var ContainerErrorBoundary = class extends Component {
|
|
|
36333
36485
|
return hasError ? null : children;
|
|
36334
36486
|
}
|
|
36335
36487
|
};
|
|
36336
|
-
var
|
|
36488
|
+
var CRASH_ERROR_MESSAGE_PREFIX = 'code-crash:';
|
|
36489
|
+
function formatCodeCrashLocationFromSourceNode(scopeId, nodeId,) {
|
|
36490
|
+
return `${CRASH_ERROR_MESSAGE_PREFIX}${scopeId}:${nodeId}`;
|
|
36491
|
+
}
|
|
36492
|
+
function getErrorMessageForComponent(scopeId, nodeId,) {
|
|
36493
|
+
return getErrorMessageFor('component', scopeId, nodeId,);
|
|
36494
|
+
}
|
|
36495
|
+
function getErrorMessageForOverride(scopeId, nodeId,) {
|
|
36496
|
+
return getErrorMessageFor('override', scopeId, nodeId,);
|
|
36497
|
+
}
|
|
36498
|
+
function getErrorMessageFor(element, scopeId, nodeId,) {
|
|
36499
|
+
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: ${
|
|
36500
|
+
formatCodeCrashLocationFromSourceNode(scopeId, nodeId,)
|
|
36501
|
+
} \u2192 click \u201CShow Layer\u201D.`;
|
|
36502
|
+
}
|
|
36503
|
+
var IsInExternalComponentContext = /* @__PURE__ */ (() => React4.createContext(0,))();
|
|
36504
|
+
function useExternalComponentNestingLevel() {
|
|
36505
|
+
return React4.useContext(IsInExternalComponentContext,);
|
|
36506
|
+
}
|
|
36507
|
+
function IsExternalComponent({
|
|
36508
|
+
children,
|
|
36509
|
+
},) {
|
|
36510
|
+
const count = React4.useContext(IsInExternalComponentContext,);
|
|
36511
|
+
return /* @__PURE__ */ jsx(IsInExternalComponentContext.Provider, {
|
|
36512
|
+
value: count + 1,
|
|
36513
|
+
children,
|
|
36514
|
+
},);
|
|
36515
|
+
}
|
|
36516
|
+
function shouldWrapComponentWithBoundary(externalModuleNestingLevel, isAuthoredByUser, isExternalComponent, inComponentSlot,) {
|
|
36517
|
+
const isLocalComponentInstance =
|
|
36518
|
+
// We know a component instance is local when it’s not nested inside any external component...
|
|
36519
|
+
externalModuleNestingLevel === 0 ||
|
|
36520
|
+
// ...or – “Ticker edge case” – when it’s nested inside an external component during React rendering,
|
|
36521
|
+
// but is actually defined in a slot that’s passed into the component. (This is the “Ticker edge case”:
|
|
36522
|
+
// if a site has a Ticker (or any other component with slots), and something in a Ticker’s slot crashes,
|
|
36523
|
+
// we want to disable that something, not the whole ticker.)
|
|
36524
|
+
externalModuleNestingLevel === 1 && inComponentSlot;
|
|
36525
|
+
return (isAuthoredByUser || isExternalComponent) && isLocalComponentInstance;
|
|
36526
|
+
}
|
|
36527
|
+
function shouldWrapOverrideWithBoundary(externalModuleNestingLevel, inComponentSlot,) {
|
|
36528
|
+
const isWrappingFrameLocalToProject =
|
|
36529
|
+
// We know a frame is local when it’s not nested inside any external component...
|
|
36530
|
+
externalModuleNestingLevel === 0 ||
|
|
36531
|
+
// ...or – “Ticker edge case” – when it’s nested inside an external component during React rendering,
|
|
36532
|
+
// but is actually defined in a slot that’s passed into the component. (This is the “Ticker edge case”:
|
|
36533
|
+
// if a site has a Ticker (or any other component with slots), and an override in a Ticker’s slot crashes,
|
|
36534
|
+
// we want to disable that override, not the whole ticker.)
|
|
36535
|
+
externalModuleNestingLevel === 1 && inComponentSlot;
|
|
36536
|
+
return isWrappingFrameLocalToProject;
|
|
36537
|
+
}
|
|
36538
|
+
var ContainerInner = /* @__PURE__ */ React4.forwardRef(({
|
|
36337
36539
|
children,
|
|
36338
36540
|
layoutId,
|
|
36339
36541
|
as,
|
|
36542
|
+
scopeId,
|
|
36543
|
+
nodeId,
|
|
36544
|
+
isAuthoredByUser,
|
|
36545
|
+
isModuleExternal,
|
|
36546
|
+
inComponentSlot,
|
|
36340
36547
|
...props
|
|
36341
36548
|
}, ref,) => {
|
|
36342
36549
|
const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
|
|
36343
36550
|
const MotionComponent = htmlElementAsMotionComponent(as,);
|
|
36551
|
+
const clonedChildren = React4.Children.map(children, (child) => {
|
|
36552
|
+
return React4.isValidElement(child,)
|
|
36553
|
+
? React4.cloneElement(child, {
|
|
36554
|
+
layoutId,
|
|
36555
|
+
},)
|
|
36556
|
+
: child;
|
|
36557
|
+
},);
|
|
36558
|
+
const childrenWithCodeBoundary = useWrapWithCodeBoundary(
|
|
36559
|
+
clonedChildren,
|
|
36560
|
+
scopeId,
|
|
36561
|
+
nodeId,
|
|
36562
|
+
isAuthoredByUser,
|
|
36563
|
+
isModuleExternal,
|
|
36564
|
+
inComponentSlot,
|
|
36565
|
+
);
|
|
36344
36566
|
return /* @__PURE__ */ jsx(MotionComponent, {
|
|
36345
36567
|
layoutId: outerLayoutId,
|
|
36346
36568
|
...props,
|
|
@@ -36352,21 +36574,79 @@ var Providers = /* @__PURE__ */ React4.forwardRef(({
|
|
|
36352
36574
|
children: /* @__PURE__ */ jsx(LayoutGroup, {
|
|
36353
36575
|
id: layoutId ?? '',
|
|
36354
36576
|
inherit: 'id',
|
|
36355
|
-
children:
|
|
36356
|
-
children: React4.Children.map(children, (child) => {
|
|
36357
|
-
return React4.isValidElement(child,)
|
|
36358
|
-
? React4.cloneElement(child, {
|
|
36359
|
-
layoutId,
|
|
36360
|
-
},)
|
|
36361
|
-
: child;
|
|
36362
|
-
},),
|
|
36363
|
-
},),
|
|
36577
|
+
children: childrenWithCodeBoundary,
|
|
36364
36578
|
},),
|
|
36365
36579
|
},),
|
|
36366
36580
|
},),
|
|
36367
36581
|
},);
|
|
36368
36582
|
},);
|
|
36369
|
-
var Container = /* @__PURE__ */ withGeneratedLayoutId(
|
|
36583
|
+
var Container = /* @__PURE__ */ withGeneratedLayoutId(ContainerInner,);
|
|
36584
|
+
var SmartComponentScopedContainer = /* @__PURE__ */ React4.forwardRef((props, ref,) => {
|
|
36585
|
+
const {
|
|
36586
|
+
as,
|
|
36587
|
+
layoutId,
|
|
36588
|
+
scopeId,
|
|
36589
|
+
nodeId,
|
|
36590
|
+
isAuthoredByUser,
|
|
36591
|
+
rendersWithMotion,
|
|
36592
|
+
isModuleExternal,
|
|
36593
|
+
inComponentSlot,
|
|
36594
|
+
style,
|
|
36595
|
+
children,
|
|
36596
|
+
...renderableProps
|
|
36597
|
+
} = props;
|
|
36598
|
+
const childrenWithCodeBoundary = useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot,);
|
|
36599
|
+
const tagName = props.as ?? 'div';
|
|
36600
|
+
if (props.rendersWithMotion) {
|
|
36601
|
+
const Component18 = htmlElementAsMotionComponent(tagName,);
|
|
36602
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
36603
|
+
ref,
|
|
36604
|
+
style: props.style,
|
|
36605
|
+
...renderableProps,
|
|
36606
|
+
children: childrenWithCodeBoundary,
|
|
36607
|
+
},);
|
|
36608
|
+
} else {
|
|
36609
|
+
const Component18 = tagName;
|
|
36610
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
36611
|
+
ref,
|
|
36612
|
+
style: props.style,
|
|
36613
|
+
...renderableProps,
|
|
36614
|
+
children: childrenWithCodeBoundary,
|
|
36615
|
+
},);
|
|
36616
|
+
}
|
|
36617
|
+
},);
|
|
36618
|
+
function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isExternalComponent, inComponentSlot,) {
|
|
36619
|
+
const externalModuleNestingLevel = useExternalComponentNestingLevel();
|
|
36620
|
+
if (
|
|
36621
|
+
// Those props will either be all undefined, which means the Container wasn’t codegenned yet,
|
|
36622
|
+
// and we should use the old ContainerErrorBoundary –
|
|
36623
|
+
// or all defined, which means we have enough information to use the new boundary.
|
|
36624
|
+
isUndefined(scopeId,) || isUndefined(nodeId,)
|
|
36625
|
+
) {
|
|
36626
|
+
return /* @__PURE__ */ jsx(DeprecatedContainerErrorBoundary, {
|
|
36627
|
+
children,
|
|
36628
|
+
},);
|
|
36629
|
+
}
|
|
36630
|
+
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(
|
|
36631
|
+
externalModuleNestingLevel,
|
|
36632
|
+
isAuthoredByUser ?? false,
|
|
36633
|
+
isExternalComponent ?? false,
|
|
36634
|
+
inComponentSlot ?? false,
|
|
36635
|
+
);
|
|
36636
|
+
if (shouldWrapWithBoundary) {
|
|
36637
|
+
children = /* @__PURE__ */ jsx(CodeComponentBoundary, {
|
|
36638
|
+
errorMessage: getErrorMessageForComponent(scopeId, nodeId,),
|
|
36639
|
+
fallback: null,
|
|
36640
|
+
children,
|
|
36641
|
+
},);
|
|
36642
|
+
}
|
|
36643
|
+
if (isExternalComponent) {
|
|
36644
|
+
children = /* @__PURE__ */ jsx(IsExternalComponent, {
|
|
36645
|
+
children,
|
|
36646
|
+
},);
|
|
36647
|
+
}
|
|
36648
|
+
return children;
|
|
36649
|
+
}
|
|
36370
36650
|
var StyleSheetContext = /* @__PURE__ */ React4.createContext(void 0,);
|
|
36371
36651
|
var framerPostSSRCSSSelector = 'style[data-framer-css-ssr-minified]';
|
|
36372
36652
|
var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
@@ -36379,7 +36659,7 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
|
36379
36659
|
return new Set(componentsWithSSRStylesAttr.split(' ',),);
|
|
36380
36660
|
})();
|
|
36381
36661
|
var framerCSSMarker = 'data-framer-css-ssr';
|
|
36382
|
-
var withCSS = (
|
|
36662
|
+
var withCSS = (Component18, escapedCSS, componentSerializationId,) =>
|
|
36383
36663
|
React4.forwardRef((props, ref,) => {
|
|
36384
36664
|
const {
|
|
36385
36665
|
sheet,
|
|
@@ -36399,7 +36679,7 @@ var withCSS = (Component16, escapedCSS, componentSerializationId,) =>
|
|
|
36399
36679
|
__html: concatenatedCSS,
|
|
36400
36680
|
},
|
|
36401
36681
|
},),
|
|
36402
|
-
/* @__PURE__ */ jsx(
|
|
36682
|
+
/* @__PURE__ */ jsx(Component18, {
|
|
36403
36683
|
...props,
|
|
36404
36684
|
ref,
|
|
36405
36685
|
},),
|
|
@@ -36415,7 +36695,7 @@ var withCSS = (Component16, escapedCSS, componentSerializationId,) =>
|
|
|
36415
36695
|
: escapedCSS.split('\n',);
|
|
36416
36696
|
css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2,));
|
|
36417
36697
|
}, [],);
|
|
36418
|
-
return /* @__PURE__ */ jsx(
|
|
36698
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
36419
36699
|
...props,
|
|
36420
36700
|
ref,
|
|
36421
36701
|
},);
|
|
@@ -37402,10 +37682,10 @@ function ChildrenCanSuspend({
|
|
|
37402
37682
|
children,
|
|
37403
37683
|
},);
|
|
37404
37684
|
}
|
|
37405
|
-
function withChildrenCanSuspend(
|
|
37685
|
+
function withChildrenCanSuspend(Component18,) {
|
|
37406
37686
|
return forwardRef(function withChildrenCanSuspendInner(props, ref,) {
|
|
37407
37687
|
return /* @__PURE__ */ jsx(ChildrenCanSuspend, {
|
|
37408
|
-
children: /* @__PURE__ */ jsx(
|
|
37688
|
+
children: /* @__PURE__ */ jsx(Component18, {
|
|
37409
37689
|
...props,
|
|
37410
37690
|
ref,
|
|
37411
37691
|
},),
|
|
@@ -37956,14 +38236,14 @@ function getRouteFromPageLink(pageLink, router, currentRoute,) {
|
|
|
37956
38236
|
} = pageLink;
|
|
37957
38237
|
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId,);
|
|
37958
38238
|
}
|
|
37959
|
-
var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwardRef(({
|
|
38239
|
+
var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwardRef(function Link2({
|
|
37960
38240
|
children,
|
|
37961
38241
|
href,
|
|
37962
38242
|
openInNewTab,
|
|
37963
38243
|
smoothScroll,
|
|
37964
38244
|
nodeId,
|
|
37965
38245
|
...restProps
|
|
37966
|
-
}, forwardedRef,)
|
|
38246
|
+
}, forwardedRef,) {
|
|
37967
38247
|
const router = useRouter();
|
|
37968
38248
|
const currentRoute = useCurrentRoute();
|
|
37969
38249
|
const implicitPathVariables = useImplicitPathVariables();
|
|
@@ -39012,12 +39292,8 @@ function PageRoot({
|
|
|
39012
39292
|
},
|
|
39013
39293
|
preserveQueryParams,
|
|
39014
39294
|
enableAsyncURLUpdates,
|
|
39015
|
-
editorBar:
|
|
39016
|
-
|
|
39017
|
-
children: /* @__PURE__ */ jsx(EditorBar, {
|
|
39018
|
-
framerSiteId,
|
|
39019
|
-
},),
|
|
39020
|
-
},),
|
|
39295
|
+
editorBar: /* @__PURE__ */ jsx(EditorBarLauncher, {
|
|
39296
|
+
EditorBar,
|
|
39021
39297
|
},),
|
|
39022
39298
|
},),
|
|
39023
39299
|
},),
|
|
@@ -39043,6 +39319,25 @@ function PageRoot({
|
|
|
39043
39319
|
},);
|
|
39044
39320
|
}
|
|
39045
39321
|
}
|
|
39322
|
+
function EditorBarLauncher({
|
|
39323
|
+
EditorBar,
|
|
39324
|
+
},) {
|
|
39325
|
+
const [mounted, setMounted,] = useState(false,);
|
|
39326
|
+
const framerSiteId = useContext(FormContext,);
|
|
39327
|
+
useEffect(() => {
|
|
39328
|
+
startTransition2(() => {
|
|
39329
|
+
setMounted(true,);
|
|
39330
|
+
},);
|
|
39331
|
+
}, [],);
|
|
39332
|
+
if (!EditorBar || !framerSiteId || !mounted) return null;
|
|
39333
|
+
return /* @__PURE__ */ jsx(IgnoreErrors, {
|
|
39334
|
+
children: /* @__PURE__ */ jsx(Suspense2, {
|
|
39335
|
+
children: /* @__PURE__ */ jsx(EditorBar, {
|
|
39336
|
+
framerSiteId,
|
|
39337
|
+
},),
|
|
39338
|
+
},),
|
|
39339
|
+
},);
|
|
39340
|
+
}
|
|
39046
39341
|
function cloneChildrenWithProps(children, props, asNode,) {
|
|
39047
39342
|
const cloned = React2.Children.map(children, (child) => {
|
|
39048
39343
|
if (React2.isValidElement(child,)) {
|
|
@@ -39685,60 +39980,60 @@ var DatabaseValue = {
|
|
|
39685
39980
|
* Checks if the left value is equal to the right value. Returns false if
|
|
39686
39981
|
* the values are not of the same type.
|
|
39687
39982
|
*/
|
|
39688
|
-
equal(left, right,
|
|
39983
|
+
equal(left, right, collation11,) {
|
|
39689
39984
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
39690
39985
|
return false;
|
|
39691
39986
|
}
|
|
39692
|
-
return compare(left, right,
|
|
39987
|
+
return compare(left, right, collation11,) === 0;
|
|
39693
39988
|
},
|
|
39694
39989
|
/**
|
|
39695
39990
|
* Checks if the left value is less than the right value. Returns false if
|
|
39696
39991
|
* the values are not of the same type.
|
|
39697
39992
|
*/
|
|
39698
|
-
lessThan(left, right,
|
|
39993
|
+
lessThan(left, right, collation11,) {
|
|
39699
39994
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
39700
39995
|
return false;
|
|
39701
39996
|
}
|
|
39702
|
-
return compare(left, right,
|
|
39997
|
+
return compare(left, right, collation11,) < 0;
|
|
39703
39998
|
},
|
|
39704
39999
|
/**
|
|
39705
40000
|
* Checks if the left value is less than or equal to the right value.
|
|
39706
40001
|
* Returns false if the values are not of the same type.
|
|
39707
40002
|
*/
|
|
39708
|
-
lessThanOrEqual(left, right,
|
|
40003
|
+
lessThanOrEqual(left, right, collation11,) {
|
|
39709
40004
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
39710
40005
|
return false;
|
|
39711
40006
|
}
|
|
39712
|
-
return compare(left, right,
|
|
40007
|
+
return compare(left, right, collation11,) <= 0;
|
|
39713
40008
|
},
|
|
39714
40009
|
/**
|
|
39715
40010
|
* Checks if the left value is greater than the right value. Returns false
|
|
39716
40011
|
* if the values are not of the same type.
|
|
39717
40012
|
*/
|
|
39718
|
-
greaterThan(left, right,
|
|
40013
|
+
greaterThan(left, right, collation11,) {
|
|
39719
40014
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
39720
40015
|
return false;
|
|
39721
40016
|
}
|
|
39722
|
-
return compare(left, right,
|
|
40017
|
+
return compare(left, right, collation11,) > 0;
|
|
39723
40018
|
},
|
|
39724
40019
|
/**
|
|
39725
40020
|
* Checks if the left value is greater than or equal to the right value.
|
|
39726
40021
|
* Returns false if the values are not of the same type.
|
|
39727
40022
|
*/
|
|
39728
|
-
greaterThanOrEqual(left, right,
|
|
40023
|
+
greaterThanOrEqual(left, right, collation11,) {
|
|
39729
40024
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
39730
40025
|
return false;
|
|
39731
40026
|
}
|
|
39732
|
-
return compare(left, right,
|
|
40027
|
+
return compare(left, right, collation11,) >= 0;
|
|
39733
40028
|
},
|
|
39734
40029
|
/**
|
|
39735
40030
|
* Checks if the left value is in the right value. Returns false if the
|
|
39736
40031
|
* right value is not an array.
|
|
39737
40032
|
*/
|
|
39738
|
-
in(left, right,
|
|
40033
|
+
in(left, right, collation11,) {
|
|
39739
40034
|
if ((right == null ? void 0 : right.type) !== 'array') return false;
|
|
39740
40035
|
return right.value.some((item) => {
|
|
39741
|
-
return DatabaseValue.equal(item, left,
|
|
40036
|
+
return DatabaseValue.equal(item, left, collation11,);
|
|
39742
40037
|
},);
|
|
39743
40038
|
},
|
|
39744
40039
|
/**
|
|
@@ -39746,40 +40041,40 @@ var DatabaseValue = {
|
|
|
39746
40041
|
*
|
|
39747
40042
|
* If source has duplicates, the index of the first occurrence is always returned.
|
|
39748
40043
|
*/
|
|
39749
|
-
indexOf(source, target,
|
|
40044
|
+
indexOf(source, target, collation11,) {
|
|
39750
40045
|
if ((source == null ? void 0 : source.type) !== 'array') return -1;
|
|
39751
40046
|
return source.value.findIndex((item) => {
|
|
39752
|
-
return DatabaseValue.equal(item, target,
|
|
40047
|
+
return DatabaseValue.equal(item, target, collation11,);
|
|
39753
40048
|
},);
|
|
39754
40049
|
},
|
|
39755
|
-
contains(source, target,
|
|
40050
|
+
contains(source, target, collation11,) {
|
|
39756
40051
|
let sourceValue = toString(source,);
|
|
39757
40052
|
let targetValue = toString(target,);
|
|
39758
40053
|
if (isNull(sourceValue,)) return false;
|
|
39759
40054
|
if (isNull(targetValue,)) return false;
|
|
39760
|
-
if (
|
|
40055
|
+
if (collation11.type === 0) {
|
|
39761
40056
|
sourceValue = sourceValue.toLowerCase();
|
|
39762
40057
|
targetValue = targetValue.toLowerCase();
|
|
39763
40058
|
}
|
|
39764
40059
|
return sourceValue.includes(targetValue,);
|
|
39765
40060
|
},
|
|
39766
|
-
startsWith(source, target,
|
|
40061
|
+
startsWith(source, target, collation11,) {
|
|
39767
40062
|
let sourceValue = toString(source,);
|
|
39768
40063
|
let targetValue = toString(target,);
|
|
39769
40064
|
if (isNull(sourceValue,)) return false;
|
|
39770
40065
|
if (isNull(targetValue,)) return false;
|
|
39771
|
-
if (
|
|
40066
|
+
if (collation11.type === 0) {
|
|
39772
40067
|
sourceValue = sourceValue.toLowerCase();
|
|
39773
40068
|
targetValue = targetValue.toLowerCase();
|
|
39774
40069
|
}
|
|
39775
40070
|
return sourceValue.startsWith(targetValue,);
|
|
39776
40071
|
},
|
|
39777
|
-
endsWith(source, target,
|
|
40072
|
+
endsWith(source, target, collation11,) {
|
|
39778
40073
|
let sourceValue = toString(source,);
|
|
39779
40074
|
let targetValue = toString(target,);
|
|
39780
40075
|
if (isNull(sourceValue,)) return false;
|
|
39781
40076
|
if (isNull(targetValue,)) return false;
|
|
39782
|
-
if (
|
|
40077
|
+
if (collation11.type === 0) {
|
|
39783
40078
|
sourceValue = sourceValue.toLowerCase();
|
|
39784
40079
|
targetValue = targetValue.toLowerCase();
|
|
39785
40080
|
}
|
|
@@ -39825,7 +40120,7 @@ var DatabaseValue = {
|
|
|
39825
40120
|
}
|
|
39826
40121
|
},
|
|
39827
40122
|
};
|
|
39828
|
-
function compare(left, right,
|
|
40123
|
+
function compare(left, right, collation11,) {
|
|
39829
40124
|
if (isNull(left,) || isNull(right,)) {
|
|
39830
40125
|
assert(left === right,);
|
|
39831
40126
|
return 0;
|
|
@@ -39842,7 +40137,7 @@ function compare(left, right, collation10,) {
|
|
|
39842
40137
|
const rightItem = right.value[i];
|
|
39843
40138
|
assert(!isUndefined(leftItem,), 'Left item must exist',);
|
|
39844
40139
|
assert(!isUndefined(rightItem,), 'Right item must exist',);
|
|
39845
|
-
const result = compare(leftItem, rightItem,
|
|
40140
|
+
const result = compare(leftItem, rightItem, collation11,);
|
|
39846
40141
|
if (result !== 0) return result;
|
|
39847
40142
|
}
|
|
39848
40143
|
return 0;
|
|
@@ -39910,7 +40205,7 @@ function compare(left, right, collation10,) {
|
|
|
39910
40205
|
const rightValue = right.value[rightKey];
|
|
39911
40206
|
assert(!isUndefined(leftValue,), 'Left value must exist',);
|
|
39912
40207
|
assert(!isUndefined(rightValue,), 'Right value must exist',);
|
|
39913
|
-
const result = compare(leftValue, rightValue,
|
|
40208
|
+
const result = compare(leftValue, rightValue, collation11,);
|
|
39914
40209
|
if (result !== 0) return result;
|
|
39915
40210
|
}
|
|
39916
40211
|
return 0;
|
|
@@ -39935,7 +40230,7 @@ function compare(left, right, collation10,) {
|
|
|
39935
40230
|
assert(left.type === right.type,);
|
|
39936
40231
|
let leftValue = left.value;
|
|
39937
40232
|
let rightValue = right.value;
|
|
39938
|
-
if (
|
|
40233
|
+
if (collation11.type === 0) {
|
|
39939
40234
|
leftValue = left.value.toLowerCase();
|
|
39940
40235
|
rightValue = right.value.toLowerCase();
|
|
39941
40236
|
}
|
|
@@ -39952,6 +40247,205 @@ var unknownDefinition = {
|
|
|
39952
40247
|
type: 'unknown',
|
|
39953
40248
|
isNullable: true,
|
|
39954
40249
|
};
|
|
40250
|
+
function getNetworkLatency() {
|
|
40251
|
+
return 25;
|
|
40252
|
+
}
|
|
40253
|
+
function getNetworkSpeed() {
|
|
40254
|
+
return 100 * 125;
|
|
40255
|
+
}
|
|
40256
|
+
var KB = 1e3;
|
|
40257
|
+
var Cost = class {
|
|
40258
|
+
constructor(network,) {
|
|
40259
|
+
this.network = network;
|
|
40260
|
+
}
|
|
40261
|
+
static estimate(totalRequests, transferredBytes,) {
|
|
40262
|
+
const latency = getNetworkLatency();
|
|
40263
|
+
const speed = getNetworkSpeed();
|
|
40264
|
+
const network = totalRequests * latency + transferredBytes / speed;
|
|
40265
|
+
return new Cost(network,);
|
|
40266
|
+
}
|
|
40267
|
+
static max(left, right,) {
|
|
40268
|
+
const network = Math.max(left.network, right.network,);
|
|
40269
|
+
return new Cost(network,);
|
|
40270
|
+
}
|
|
40271
|
+
static compare(left, right,) {
|
|
40272
|
+
if (left.network < right.network) return -1;
|
|
40273
|
+
if (left.network > right.network) return 1;
|
|
40274
|
+
return 0;
|
|
40275
|
+
}
|
|
40276
|
+
add(cost,) {
|
|
40277
|
+
this.network += cost.network;
|
|
40278
|
+
return this;
|
|
40279
|
+
}
|
|
40280
|
+
toString() {
|
|
40281
|
+
return `${this.network}ms`;
|
|
40282
|
+
}
|
|
40283
|
+
};
|
|
40284
|
+
function GroupId(id3,) {
|
|
40285
|
+
return id3;
|
|
40286
|
+
}
|
|
40287
|
+
var Group = class {
|
|
40288
|
+
constructor(id3, relational,) {
|
|
40289
|
+
this.id = id3;
|
|
40290
|
+
this.relational = relational;
|
|
40291
|
+
__publicField(this, 'nodes', [],);
|
|
40292
|
+
__publicField(this, 'winners', /* @__PURE__ */ new Map(),);
|
|
40293
|
+
}
|
|
40294
|
+
/**
|
|
40295
|
+
* Adds a node to the group. Throws an error if the node is already in a
|
|
40296
|
+
* group.
|
|
40297
|
+
*/
|
|
40298
|
+
addNode(node,) {
|
|
40299
|
+
this.nodes.push(node,);
|
|
40300
|
+
node.setGroup(this,);
|
|
40301
|
+
}
|
|
40302
|
+
/**
|
|
40303
|
+
* Returns the winner for the given required physical props. The winner
|
|
40304
|
+
* stores the best node and its cost. This is used to find the best node in
|
|
40305
|
+
* the group.
|
|
40306
|
+
*/
|
|
40307
|
+
getWinner(required,) {
|
|
40308
|
+
const hash2 = required.getHash();
|
|
40309
|
+
const existing = this.winners.get(hash2,);
|
|
40310
|
+
if (existing) return existing;
|
|
40311
|
+
const winner = new Winner();
|
|
40312
|
+
this.winners.set(hash2, winner,);
|
|
40313
|
+
return winner;
|
|
40314
|
+
}
|
|
40315
|
+
/**
|
|
40316
|
+
* Returns the optimized version of the node. The optimized version is the
|
|
40317
|
+
* node with the lowest cost with all children replaced with their optimized
|
|
40318
|
+
* versions. This is used to create the final optimized query plan.
|
|
40319
|
+
*/
|
|
40320
|
+
getOptimized(required,) {
|
|
40321
|
+
const winner = this.getWinner(required,);
|
|
40322
|
+
assert(winner.node, 'Group not optimized',);
|
|
40323
|
+
const optimizer = winner.node.getOptimized(required,);
|
|
40324
|
+
optimizer.setGroup(this,);
|
|
40325
|
+
return optimizer;
|
|
40326
|
+
}
|
|
40327
|
+
};
|
|
40328
|
+
var Winner = class {
|
|
40329
|
+
constructor() {
|
|
40330
|
+
__publicField(this, 'node',);
|
|
40331
|
+
__publicField(this, 'cost', new Cost(Infinity,),);
|
|
40332
|
+
__publicField(this, 'nodes', [],);
|
|
40333
|
+
}
|
|
40334
|
+
update(node, cost,) {
|
|
40335
|
+
this.nodes.push(node,);
|
|
40336
|
+
if (Cost.compare(cost, this.cost,) < 0) {
|
|
40337
|
+
this.node = node;
|
|
40338
|
+
this.cost = cost;
|
|
40339
|
+
}
|
|
40340
|
+
}
|
|
40341
|
+
};
|
|
40342
|
+
function evaluateSync(generator,) {
|
|
40343
|
+
const state2 = generator.next();
|
|
40344
|
+
assert(state2.done, 'Generator must not yield',);
|
|
40345
|
+
return state2.value;
|
|
40346
|
+
}
|
|
40347
|
+
async function evaluateAsync(generator, state2 = generator.next(),) {
|
|
40348
|
+
while (!state2.done) {
|
|
40349
|
+
const value = await state2.value;
|
|
40350
|
+
state2 = generator.next(value,);
|
|
40351
|
+
}
|
|
40352
|
+
return state2.value;
|
|
40353
|
+
}
|
|
40354
|
+
function* evaluateObject(values,) {
|
|
40355
|
+
const result = {};
|
|
40356
|
+
const keys3 = Object.keys(values,);
|
|
40357
|
+
const promises = [];
|
|
40358
|
+
for (const key7 of keys3) {
|
|
40359
|
+
const generator = values[key7];
|
|
40360
|
+
if (isGenerator2(generator,)) {
|
|
40361
|
+
const state2 = generator.next();
|
|
40362
|
+
if (state2.done) {
|
|
40363
|
+
result[key7] = state2.value;
|
|
40364
|
+
} else {
|
|
40365
|
+
promises.push(
|
|
40366
|
+
evaluateAsync(generator, state2,).then((value) => {
|
|
40367
|
+
result[key7] = value;
|
|
40368
|
+
},),
|
|
40369
|
+
);
|
|
40370
|
+
}
|
|
40371
|
+
} else {
|
|
40372
|
+
result[key7] = generator;
|
|
40373
|
+
}
|
|
40374
|
+
}
|
|
40375
|
+
if (promises.length > 0) {
|
|
40376
|
+
yield Promise.all(promises,);
|
|
40377
|
+
}
|
|
40378
|
+
return result;
|
|
40379
|
+
}
|
|
40380
|
+
function* evaluateArray(values,) {
|
|
40381
|
+
const result = [];
|
|
40382
|
+
const keys3 = values.keys();
|
|
40383
|
+
const promises = [];
|
|
40384
|
+
for (const key7 of keys3) {
|
|
40385
|
+
const generator = values[key7];
|
|
40386
|
+
if (isGenerator2(generator,)) {
|
|
40387
|
+
const state2 = generator.next();
|
|
40388
|
+
if (state2.done) {
|
|
40389
|
+
result[key7] = state2.value;
|
|
40390
|
+
} else {
|
|
40391
|
+
promises.push(
|
|
40392
|
+
evaluateAsync(generator, state2,).then((value) => {
|
|
40393
|
+
result[key7] = value;
|
|
40394
|
+
},),
|
|
40395
|
+
);
|
|
40396
|
+
}
|
|
40397
|
+
} else {
|
|
40398
|
+
result[key7] = generator;
|
|
40399
|
+
}
|
|
40400
|
+
}
|
|
40401
|
+
if (promises.length > 0) {
|
|
40402
|
+
yield Promise.all(promises,);
|
|
40403
|
+
}
|
|
40404
|
+
return result;
|
|
40405
|
+
}
|
|
40406
|
+
var AbstractNode = class {
|
|
40407
|
+
constructor(isSynchronous,) {
|
|
40408
|
+
this.isSynchronous = isSynchronous;
|
|
40409
|
+
}
|
|
40410
|
+
};
|
|
40411
|
+
var RelationalNode = class extends AbstractNode {
|
|
40412
|
+
constructor() {
|
|
40413
|
+
super(...arguments,);
|
|
40414
|
+
__publicField(this, 'group',);
|
|
40415
|
+
}
|
|
40416
|
+
/**
|
|
40417
|
+
* Returns the group that the node belongs to. Throws an error if the node
|
|
40418
|
+
* is not in a group. This should only happen in the constructor because
|
|
40419
|
+
* every node is added to a group right after creation.
|
|
40420
|
+
*/
|
|
40421
|
+
getGroup() {
|
|
40422
|
+
assert(this.group, 'Node must be in a group',);
|
|
40423
|
+
return this.group;
|
|
40424
|
+
}
|
|
40425
|
+
/**
|
|
40426
|
+
* Adds the node to the given group. Throws an error if the node is already
|
|
40427
|
+
* in a group.
|
|
40428
|
+
*/
|
|
40429
|
+
setGroup(group,) {
|
|
40430
|
+
assert(!this.group, 'Node is already in a group',);
|
|
40431
|
+
this.group = group;
|
|
40432
|
+
}
|
|
40433
|
+
/**
|
|
40434
|
+
* Evaluates the node and all children synchronously. Throws an error if the
|
|
40435
|
+
* node is not synchronous.
|
|
40436
|
+
*/
|
|
40437
|
+
evaluateSync() {
|
|
40438
|
+
const generator = this.evaluate(void 0,);
|
|
40439
|
+
return evaluateSync(generator,);
|
|
40440
|
+
}
|
|
40441
|
+
/**
|
|
40442
|
+
* Evaluates the node and all children asynchronously.
|
|
40443
|
+
*/
|
|
40444
|
+
evaluateAsync() {
|
|
40445
|
+
const generator = this.evaluate(void 0,);
|
|
40446
|
+
return evaluateAsync(generator,);
|
|
40447
|
+
}
|
|
40448
|
+
};
|
|
39955
40449
|
function Hash(value,) {
|
|
39956
40450
|
return value;
|
|
39957
40451
|
}
|
|
@@ -39960,6 +40454,16 @@ function isHashable(value,) {
|
|
|
39960
40454
|
}
|
|
39961
40455
|
function calculateHash(name, ...values) {
|
|
39962
40456
|
const hashes = values.map((value) => {
|
|
40457
|
+
const isCollectionMetadata = value instanceof CollectionMetadata;
|
|
40458
|
+
assert(!isCollectionMetadata, 'Pass CollectionMetadata.id instead',);
|
|
40459
|
+
const isFieldMetadata = value instanceof FieldMetadata;
|
|
40460
|
+
assert(!isFieldMetadata, 'Pass FieldMetadata.id instead',);
|
|
40461
|
+
const isIndexMetadata = value instanceof IndexMetadata;
|
|
40462
|
+
assert(!isIndexMetadata, 'Pass IndexMetadata.id instead',);
|
|
40463
|
+
const isRelationalNode = value instanceof RelationalNode;
|
|
40464
|
+
assert(!isRelationalNode, 'Pass RelationalNode.group.id instead',);
|
|
40465
|
+
const isGroup = value instanceof Group;
|
|
40466
|
+
assert(!isGroup, 'Pass Group.id instead',);
|
|
39963
40467
|
if (isHashable(value,)) {
|
|
39964
40468
|
return value.getHash();
|
|
39965
40469
|
}
|
|
@@ -40078,104 +40582,6 @@ var Fields = class extends Metadata {
|
|
|
40078
40582
|
__publicField(this, 'name', 'Fields',);
|
|
40079
40583
|
}
|
|
40080
40584
|
};
|
|
40081
|
-
function getNetworkLatency() {
|
|
40082
|
-
return 25;
|
|
40083
|
-
}
|
|
40084
|
-
function getNetworkSpeed() {
|
|
40085
|
-
return 100 * 125;
|
|
40086
|
-
}
|
|
40087
|
-
var KB = 1e3;
|
|
40088
|
-
var Cost = class {
|
|
40089
|
-
constructor(network,) {
|
|
40090
|
-
this.network = network;
|
|
40091
|
-
}
|
|
40092
|
-
static estimate(totalRequests, transferredBytes,) {
|
|
40093
|
-
const latency = getNetworkLatency();
|
|
40094
|
-
const speed = getNetworkSpeed();
|
|
40095
|
-
const network = totalRequests * latency + transferredBytes / speed;
|
|
40096
|
-
return new Cost(network,);
|
|
40097
|
-
}
|
|
40098
|
-
static max(left, right,) {
|
|
40099
|
-
const network = Math.max(left.network, right.network,);
|
|
40100
|
-
return new Cost(network,);
|
|
40101
|
-
}
|
|
40102
|
-
static compare(left, right,) {
|
|
40103
|
-
if (left.network < right.network) return -1;
|
|
40104
|
-
if (left.network > right.network) return 1;
|
|
40105
|
-
return 0;
|
|
40106
|
-
}
|
|
40107
|
-
add(cost,) {
|
|
40108
|
-
this.network += cost.network;
|
|
40109
|
-
return this;
|
|
40110
|
-
}
|
|
40111
|
-
toString() {
|
|
40112
|
-
return `${this.network}ms`;
|
|
40113
|
-
}
|
|
40114
|
-
};
|
|
40115
|
-
function evaluateSync(generator,) {
|
|
40116
|
-
const state2 = generator.next();
|
|
40117
|
-
assert(state2.done, 'Generator must not yield',);
|
|
40118
|
-
return state2.value;
|
|
40119
|
-
}
|
|
40120
|
-
async function evaluateAsync(generator, state2 = generator.next(),) {
|
|
40121
|
-
while (!state2.done) {
|
|
40122
|
-
const value = await state2.value;
|
|
40123
|
-
state2 = generator.next(value,);
|
|
40124
|
-
}
|
|
40125
|
-
return state2.value;
|
|
40126
|
-
}
|
|
40127
|
-
function* evaluateObject(values,) {
|
|
40128
|
-
const result = {};
|
|
40129
|
-
const keys3 = Object.keys(values,);
|
|
40130
|
-
const promises = [];
|
|
40131
|
-
for (const key7 of keys3) {
|
|
40132
|
-
const generator = values[key7];
|
|
40133
|
-
if (isGenerator2(generator,)) {
|
|
40134
|
-
const state2 = generator.next();
|
|
40135
|
-
if (state2.done) {
|
|
40136
|
-
result[key7] = state2.value;
|
|
40137
|
-
} else {
|
|
40138
|
-
promises.push(
|
|
40139
|
-
evaluateAsync(generator, state2,).then((value) => {
|
|
40140
|
-
result[key7] = value;
|
|
40141
|
-
},),
|
|
40142
|
-
);
|
|
40143
|
-
}
|
|
40144
|
-
} else {
|
|
40145
|
-
result[key7] = generator;
|
|
40146
|
-
}
|
|
40147
|
-
}
|
|
40148
|
-
if (promises.length > 0) {
|
|
40149
|
-
yield Promise.all(promises,);
|
|
40150
|
-
}
|
|
40151
|
-
return result;
|
|
40152
|
-
}
|
|
40153
|
-
function* evaluateArray(values,) {
|
|
40154
|
-
const result = [];
|
|
40155
|
-
const keys3 = values.keys();
|
|
40156
|
-
const promises = [];
|
|
40157
|
-
for (const key7 of keys3) {
|
|
40158
|
-
const generator = values[key7];
|
|
40159
|
-
if (isGenerator2(generator,)) {
|
|
40160
|
-
const state2 = generator.next();
|
|
40161
|
-
if (state2.done) {
|
|
40162
|
-
result[key7] = state2.value;
|
|
40163
|
-
} else {
|
|
40164
|
-
promises.push(
|
|
40165
|
-
evaluateAsync(generator, state2,).then((value) => {
|
|
40166
|
-
result[key7] = value;
|
|
40167
|
-
},),
|
|
40168
|
-
);
|
|
40169
|
-
}
|
|
40170
|
-
} else {
|
|
40171
|
-
result[key7] = generator;
|
|
40172
|
-
}
|
|
40173
|
-
}
|
|
40174
|
-
if (promises.length > 0) {
|
|
40175
|
-
yield Promise.all(promises,);
|
|
40176
|
-
}
|
|
40177
|
-
return result;
|
|
40178
|
-
}
|
|
40179
40585
|
var RequiredProps = class {
|
|
40180
40586
|
constructor(ordering, resolvedFields,) {
|
|
40181
40587
|
this.ordering = ordering;
|
|
@@ -40226,8 +40632,11 @@ var Tuple = class {
|
|
|
40226
40632
|
__publicField(this, 'values', /* @__PURE__ */ new Map(),);
|
|
40227
40633
|
}
|
|
40228
40634
|
getKey() {
|
|
40229
|
-
const
|
|
40230
|
-
|
|
40635
|
+
const result = [];
|
|
40636
|
+
for (const [collection, pointer,] of this.pointers) {
|
|
40637
|
+
result.push(`${collection.id}-${pointer}`,);
|
|
40638
|
+
}
|
|
40639
|
+
return result.sort().join('-',);
|
|
40231
40640
|
}
|
|
40232
40641
|
addValue(field, value,) {
|
|
40233
40642
|
this.values.set(field, value,);
|
|
@@ -40322,49 +40731,6 @@ var Relation = class {
|
|
|
40322
40731
|
return result;
|
|
40323
40732
|
}
|
|
40324
40733
|
};
|
|
40325
|
-
var AbstractNode = class {
|
|
40326
|
-
constructor(isSynchronous,) {
|
|
40327
|
-
this.isSynchronous = isSynchronous;
|
|
40328
|
-
}
|
|
40329
|
-
};
|
|
40330
|
-
var RelationalNode = class extends AbstractNode {
|
|
40331
|
-
constructor() {
|
|
40332
|
-
super(...arguments,);
|
|
40333
|
-
__publicField(this, 'group',);
|
|
40334
|
-
}
|
|
40335
|
-
/**
|
|
40336
|
-
* Returns the group that the node belongs to. Throws an error if the node
|
|
40337
|
-
* is not in a group. This should only happen in the constructor because
|
|
40338
|
-
* every node is added to a group right after creation.
|
|
40339
|
-
*/
|
|
40340
|
-
getGroup() {
|
|
40341
|
-
assert(this.group, 'Node must be in a group',);
|
|
40342
|
-
return this.group;
|
|
40343
|
-
}
|
|
40344
|
-
/**
|
|
40345
|
-
* Adds the node to the given group. Throws an error if the node is already
|
|
40346
|
-
* in a group.
|
|
40347
|
-
*/
|
|
40348
|
-
setGroup(group,) {
|
|
40349
|
-
assert(!this.group, 'Node is already in a group',);
|
|
40350
|
-
this.group = group;
|
|
40351
|
-
}
|
|
40352
|
-
/**
|
|
40353
|
-
* Evaluates the node and all children synchronously. Throws an error if the
|
|
40354
|
-
* node is not synchronous.
|
|
40355
|
-
*/
|
|
40356
|
-
evaluateSync() {
|
|
40357
|
-
const generator = this.evaluate(void 0,);
|
|
40358
|
-
return evaluateSync(generator,);
|
|
40359
|
-
}
|
|
40360
|
-
/**
|
|
40361
|
-
* Evaluates the node and all children asynchronously.
|
|
40362
|
-
*/
|
|
40363
|
-
evaluateAsync() {
|
|
40364
|
-
const generator = this.evaluate(void 0,);
|
|
40365
|
-
return evaluateAsync(generator,);
|
|
40366
|
-
}
|
|
40367
|
-
};
|
|
40368
40734
|
var ProjectionField = class {
|
|
40369
40735
|
constructor(input, field,) {
|
|
40370
40736
|
this.input = input;
|
|
@@ -40397,7 +40763,20 @@ var RelationalProject = class extends RelationalNode {
|
|
|
40397
40763
|
}
|
|
40398
40764
|
return fields;
|
|
40399
40765
|
}
|
|
40400
|
-
canProvideOrdering() {
|
|
40766
|
+
canProvideOrdering(ordering,) {
|
|
40767
|
+
const projectionFields = new Fields();
|
|
40768
|
+
for (const projection of this.projections) {
|
|
40769
|
+
projectionFields.add(projection.field,);
|
|
40770
|
+
}
|
|
40771
|
+
for (
|
|
40772
|
+
const {
|
|
40773
|
+
field,
|
|
40774
|
+
} of ordering.fields
|
|
40775
|
+
) {
|
|
40776
|
+
if (projectionFields.has(field,)) {
|
|
40777
|
+
return false;
|
|
40778
|
+
}
|
|
40779
|
+
}
|
|
40401
40780
|
return true;
|
|
40402
40781
|
}
|
|
40403
40782
|
canProvideResolvedFields() {
|
|
@@ -41491,24 +41870,19 @@ var RelationalLeftJoin = class extends RelationalNode {
|
|
|
41491
41870
|
return new RelationalLeftJoin(left, right, constraint,);
|
|
41492
41871
|
}
|
|
41493
41872
|
/** Optimized path for equality constraints that runs in O(n + m) time. */
|
|
41494
|
-
*evaluateScalarEquals(
|
|
41495
|
-
const {
|
|
41496
|
-
left,
|
|
41497
|
-
right,
|
|
41498
|
-
} = yield* evaluateObject({
|
|
41499
|
-
left: this.left.evaluate(context,),
|
|
41500
|
-
right: this.right.evaluate(context,),
|
|
41501
|
-
},);
|
|
41873
|
+
*evaluateScalarEquals(left, right, leftConstraint, rightConstraint, context,) {
|
|
41502
41874
|
const joinKeyMap = /* @__PURE__ */ new Map();
|
|
41503
41875
|
for (const rightTuple of right.tuples) {
|
|
41504
|
-
const rightValue = yield*
|
|
41876
|
+
const rightValue = yield* rightConstraint.evaluate(context, rightTuple,);
|
|
41505
41877
|
const key7 = JSON.stringify((rightValue == null ? void 0 : rightValue.value) ?? null,);
|
|
41506
41878
|
const tuplesForKey = joinKeyMap.get(key7,) ?? [];
|
|
41507
41879
|
tuplesForKey.push(rightTuple,);
|
|
41508
41880
|
joinKeyMap.set(key7, tuplesForKey,);
|
|
41509
41881
|
}
|
|
41882
|
+
const outputFields = this.getOutputFields();
|
|
41883
|
+
const result = new Relation(outputFields,);
|
|
41510
41884
|
for (const leftTuple of left.tuples) {
|
|
41511
|
-
const leftValue = yield*
|
|
41885
|
+
const leftValue = yield* leftConstraint.evaluate(context, leftTuple,);
|
|
41512
41886
|
const key7 = JSON.stringify((leftValue == null ? void 0 : leftValue.value) ?? null,);
|
|
41513
41887
|
const matches = joinKeyMap.get(key7,) ?? [];
|
|
41514
41888
|
if (matches.length === 0) {
|
|
@@ -41525,12 +41899,6 @@ var RelationalLeftJoin = class extends RelationalNode {
|
|
|
41525
41899
|
return result;
|
|
41526
41900
|
}
|
|
41527
41901
|
*evaluate(context,) {
|
|
41528
|
-
const outputFields = this.getOutputFields();
|
|
41529
|
-
const result = new Relation(outputFields,);
|
|
41530
|
-
if (this.constraint instanceof ScalarEquals) {
|
|
41531
|
-
yield* this.evaluateScalarEquals(result.tuples, this.constraint, context,);
|
|
41532
|
-
return result;
|
|
41533
|
-
}
|
|
41534
41902
|
const {
|
|
41535
41903
|
left,
|
|
41536
41904
|
right,
|
|
@@ -41538,6 +41906,22 @@ var RelationalLeftJoin = class extends RelationalNode {
|
|
|
41538
41906
|
left: this.left.evaluate(context,),
|
|
41539
41907
|
right: this.right.evaluate(context,),
|
|
41540
41908
|
},);
|
|
41909
|
+
if (this.constraint instanceof ScalarEquals) {
|
|
41910
|
+
if (
|
|
41911
|
+
this.constraint.left.referencedFields.subsetOf(this.leftGroup.relational.outputFields,) &&
|
|
41912
|
+
this.constraint.right.referencedFields.subsetOf(this.rightGroup.relational.outputFields,)
|
|
41913
|
+
) {
|
|
41914
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.left, this.constraint.right, context,);
|
|
41915
|
+
}
|
|
41916
|
+
if (
|
|
41917
|
+
this.constraint.right.referencedFields.subsetOf(this.leftGroup.relational.outputFields,) &&
|
|
41918
|
+
this.constraint.left.referencedFields.subsetOf(this.rightGroup.relational.outputFields,)
|
|
41919
|
+
) {
|
|
41920
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.right, this.constraint.left, context,);
|
|
41921
|
+
}
|
|
41922
|
+
}
|
|
41923
|
+
const outputFields = this.getOutputFields();
|
|
41924
|
+
const result = new Relation(outputFields,);
|
|
41541
41925
|
for (const leftTuple of left.tuples) {
|
|
41542
41926
|
let hasMatch = false;
|
|
41543
41927
|
for (const rightTuple of right.tuples) {
|
|
@@ -41614,24 +41998,19 @@ var RelationalRightJoin = class extends RelationalNode {
|
|
|
41614
41998
|
return new RelationalRightJoin(left, right, constraint,);
|
|
41615
41999
|
}
|
|
41616
42000
|
/** Optimized path for equality constraints that runs in O(n + m) time. */
|
|
41617
|
-
*evaluateScalarEquals(
|
|
41618
|
-
const {
|
|
41619
|
-
left,
|
|
41620
|
-
right,
|
|
41621
|
-
} = yield* evaluateObject({
|
|
41622
|
-
left: this.left.evaluate(context,),
|
|
41623
|
-
right: this.right.evaluate(context,),
|
|
41624
|
-
},);
|
|
42001
|
+
*evaluateScalarEquals(left, right, leftConstraint, rightConstraint, context,) {
|
|
41625
42002
|
const joinKeyMap = /* @__PURE__ */ new Map();
|
|
41626
42003
|
for (const leftTuple of left.tuples) {
|
|
41627
|
-
const leftValue = yield*
|
|
42004
|
+
const leftValue = yield* leftConstraint.evaluate(context, leftTuple,);
|
|
41628
42005
|
const key7 = JSON.stringify((leftValue == null ? void 0 : leftValue.value) ?? null,);
|
|
41629
42006
|
const tuplesForKey = joinKeyMap.get(key7,) ?? [];
|
|
41630
42007
|
tuplesForKey.push(leftTuple,);
|
|
41631
42008
|
joinKeyMap.set(key7, tuplesForKey,);
|
|
41632
42009
|
}
|
|
42010
|
+
const outputFields = this.getOutputFields();
|
|
42011
|
+
const result = new Relation(outputFields,);
|
|
41633
42012
|
for (const rightTuple of right.tuples) {
|
|
41634
|
-
const rightValue = yield*
|
|
42013
|
+
const rightValue = yield* rightConstraint.evaluate(context, rightTuple,);
|
|
41635
42014
|
const key7 = JSON.stringify((rightValue == null ? void 0 : rightValue.value) ?? null,);
|
|
41636
42015
|
const matches = joinKeyMap.get(key7,) ?? [];
|
|
41637
42016
|
if (matches.length === 0) {
|
|
@@ -41648,12 +42027,6 @@ var RelationalRightJoin = class extends RelationalNode {
|
|
|
41648
42027
|
return result;
|
|
41649
42028
|
}
|
|
41650
42029
|
*evaluate(context,) {
|
|
41651
|
-
const outputFields = this.getOutputFields();
|
|
41652
|
-
const result = new Relation(outputFields,);
|
|
41653
|
-
if (this.constraint instanceof ScalarEquals) {
|
|
41654
|
-
yield* this.evaluateScalarEquals(result.tuples, this.constraint, context,);
|
|
41655
|
-
return result;
|
|
41656
|
-
}
|
|
41657
42030
|
const {
|
|
41658
42031
|
left,
|
|
41659
42032
|
right,
|
|
@@ -41661,6 +42034,22 @@ var RelationalRightJoin = class extends RelationalNode {
|
|
|
41661
42034
|
left: this.left.evaluate(context,),
|
|
41662
42035
|
right: this.right.evaluate(context,),
|
|
41663
42036
|
},);
|
|
42037
|
+
if (this.constraint instanceof ScalarEquals) {
|
|
42038
|
+
if (
|
|
42039
|
+
this.constraint.left.referencedFields.subsetOf(this.leftGroup.relational.outputFields,) &&
|
|
42040
|
+
this.constraint.right.referencedFields.subsetOf(this.rightGroup.relational.outputFields,)
|
|
42041
|
+
) {
|
|
42042
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.left, this.constraint.right, context,);
|
|
42043
|
+
}
|
|
42044
|
+
if (
|
|
42045
|
+
this.constraint.right.referencedFields.subsetOf(this.leftGroup.relational.outputFields,) &&
|
|
42046
|
+
this.constraint.left.referencedFields.subsetOf(this.rightGroup.relational.outputFields,)
|
|
42047
|
+
) {
|
|
42048
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.right, this.constraint.left, context,);
|
|
42049
|
+
}
|
|
42050
|
+
}
|
|
42051
|
+
const outputFields = this.getOutputFields();
|
|
42052
|
+
const result = new Relation(outputFields,);
|
|
41664
42053
|
for (const rightTuple of right.tuples) {
|
|
41665
42054
|
let hasMatch = false;
|
|
41666
42055
|
for (const leftTuple of left.tuples) {
|
|
@@ -42291,7 +42680,7 @@ var Explorer = class {
|
|
|
42291
42680
|
explore(before,) {
|
|
42292
42681
|
const group = before.getGroup();
|
|
42293
42682
|
if (before instanceof RelationalLeftJoin) {
|
|
42294
|
-
const after = new RelationalRightJoin(before.
|
|
42683
|
+
const after = new RelationalRightJoin(before.right, before.left, before.constraint,);
|
|
42295
42684
|
this.memo.addRelational(after, group,);
|
|
42296
42685
|
}
|
|
42297
42686
|
if (before instanceof RelationalFilter) {
|
|
@@ -42454,62 +42843,6 @@ function createIndexQueryAll(length,) {
|
|
|
42454
42843
|
};
|
|
42455
42844
|
return new Array(length,).fill(lookup,);
|
|
42456
42845
|
}
|
|
42457
|
-
function GroupId(id3,) {
|
|
42458
|
-
return id3;
|
|
42459
|
-
}
|
|
42460
|
-
var Group = class {
|
|
42461
|
-
constructor(id3, relational,) {
|
|
42462
|
-
this.id = id3;
|
|
42463
|
-
this.relational = relational;
|
|
42464
|
-
__publicField(this, 'nodes', [],);
|
|
42465
|
-
__publicField(this, 'winners', /* @__PURE__ */ new Map(),);
|
|
42466
|
-
}
|
|
42467
|
-
/**
|
|
42468
|
-
* Adds a node to the group. Throws an error if the node is already in a
|
|
42469
|
-
* group.
|
|
42470
|
-
*/
|
|
42471
|
-
addNode(node,) {
|
|
42472
|
-
this.nodes.push(node,);
|
|
42473
|
-
node.setGroup(this,);
|
|
42474
|
-
}
|
|
42475
|
-
/**
|
|
42476
|
-
* Returns the winner for the given required physical props. The winner
|
|
42477
|
-
* stores the best node and its cost. This is used to find the best node in
|
|
42478
|
-
* the group.
|
|
42479
|
-
*/
|
|
42480
|
-
getWinner(required,) {
|
|
42481
|
-
const hash2 = required.getHash();
|
|
42482
|
-
const existing = this.winners.get(hash2,);
|
|
42483
|
-
if (existing) return existing;
|
|
42484
|
-
const winner = new Winner();
|
|
42485
|
-
this.winners.set(hash2, winner,);
|
|
42486
|
-
return winner;
|
|
42487
|
-
}
|
|
42488
|
-
/**
|
|
42489
|
-
* Returns the optimized version of the node. The optimized version is the
|
|
42490
|
-
* node with the lowest cost with all children replaced with their optimized
|
|
42491
|
-
* versions. This is used to create the final optimized query plan.
|
|
42492
|
-
*/
|
|
42493
|
-
getOptimized(required,) {
|
|
42494
|
-
const winner = this.getWinner(required,);
|
|
42495
|
-
assert(winner.node, 'Group not optimized',);
|
|
42496
|
-
const optimizer = winner.node.getOptimized(required,);
|
|
42497
|
-
optimizer.setGroup(this,);
|
|
42498
|
-
return optimizer;
|
|
42499
|
-
}
|
|
42500
|
-
};
|
|
42501
|
-
var Winner = class {
|
|
42502
|
-
constructor() {
|
|
42503
|
-
__publicField(this, 'node',);
|
|
42504
|
-
__publicField(this, 'cost', new Cost(Infinity,),);
|
|
42505
|
-
}
|
|
42506
|
-
update(node, cost,) {
|
|
42507
|
-
if (Cost.compare(cost, this.cost,) < 0) {
|
|
42508
|
-
this.node = node;
|
|
42509
|
-
this.cost = cost;
|
|
42510
|
-
}
|
|
42511
|
-
}
|
|
42512
|
-
};
|
|
42513
42846
|
var RelationalProps = class {
|
|
42514
42847
|
constructor(outputFields,) {
|
|
42515
42848
|
this.outputFields = outputFields;
|
|
@@ -42676,9 +43009,9 @@ var EnforcerSort = class extends EnforcerNode {
|
|
|
42676
43009
|
field,
|
|
42677
43010
|
} of this.ordering.fields
|
|
42678
43011
|
) {
|
|
42679
|
-
if (field.name
|
|
42680
|
-
|
|
42681
|
-
|
|
43012
|
+
if (field.name === VIRTUAL_INDEX_FIELD) continue;
|
|
43013
|
+
if (isUndefined(field.collection,)) continue;
|
|
43014
|
+
resolvedFields.add(field,);
|
|
42682
43015
|
}
|
|
42683
43016
|
const ordering = new Ordering();
|
|
42684
43017
|
return new RequiredProps(ordering, resolvedFields,);
|
|
@@ -42885,6 +43218,7 @@ var ScalarArray = class extends ScalarNode {
|
|
|
42885
43218
|
const resolvedFields = new Fields();
|
|
42886
43219
|
const fields = Object.values(this.namedFields,);
|
|
42887
43220
|
for (const field of fields) {
|
|
43221
|
+
if (isUndefined(field.collection,)) continue;
|
|
42888
43222
|
resolvedFields.add(field,);
|
|
42889
43223
|
}
|
|
42890
43224
|
return new RequiredProps(this.ordering, resolvedFields,);
|
|
@@ -42976,7 +43310,9 @@ var ScalarFlatArray = class extends ScalarNode {
|
|
|
42976
43310
|
}
|
|
42977
43311
|
getInputRequiredProps() {
|
|
42978
43312
|
const resolvedFields = new Fields();
|
|
42979
|
-
|
|
43313
|
+
if (!isUndefined(this.field.collection,)) {
|
|
43314
|
+
resolvedFields.add(this.field,);
|
|
43315
|
+
}
|
|
42980
43316
|
return new RequiredProps(this.ordering, resolvedFields,);
|
|
42981
43317
|
}
|
|
42982
43318
|
optimize(optimizer,) {
|
|
@@ -43002,7 +43338,7 @@ var ScalarFlatArray = class extends ScalarNode {
|
|
|
43002
43338
|
};
|
|
43003
43339
|
}
|
|
43004
43340
|
};
|
|
43005
|
-
var
|
|
43341
|
+
var collation8 = {
|
|
43006
43342
|
type: 0,
|
|
43007
43343
|
/* CaseInsensitive */
|
|
43008
43344
|
};
|
|
@@ -43049,11 +43385,11 @@ var ScalarIn = class extends ScalarNode {
|
|
|
43049
43385
|
},);
|
|
43050
43386
|
return {
|
|
43051
43387
|
type: 'boolean',
|
|
43052
|
-
value: DatabaseValue.in(left, right,
|
|
43388
|
+
value: DatabaseValue.in(left, right, collation8,),
|
|
43053
43389
|
};
|
|
43054
43390
|
}
|
|
43055
43391
|
};
|
|
43056
|
-
var
|
|
43392
|
+
var collation9 = {
|
|
43057
43393
|
type: 1,
|
|
43058
43394
|
/* CaseSensitive */
|
|
43059
43395
|
};
|
|
@@ -43100,7 +43436,7 @@ var ScalarIndexOf = class extends ScalarNode {
|
|
|
43100
43436
|
},);
|
|
43101
43437
|
return {
|
|
43102
43438
|
type: 'number',
|
|
43103
|
-
value: DatabaseValue.indexOf(source, target,
|
|
43439
|
+
value: DatabaseValue.indexOf(source, target, collation9,),
|
|
43104
43440
|
};
|
|
43105
43441
|
}
|
|
43106
43442
|
};
|
|
@@ -43164,7 +43500,7 @@ var ScalarNot = class extends ScalarNode {
|
|
|
43164
43500
|
};
|
|
43165
43501
|
}
|
|
43166
43502
|
};
|
|
43167
|
-
var
|
|
43503
|
+
var collation10 = {
|
|
43168
43504
|
type: 0,
|
|
43169
43505
|
/* CaseInsensitive */
|
|
43170
43506
|
};
|
|
@@ -43211,7 +43547,7 @@ var ScalarNotIn = class extends ScalarNode {
|
|
|
43211
43547
|
},);
|
|
43212
43548
|
return {
|
|
43213
43549
|
type: 'boolean',
|
|
43214
|
-
value: !DatabaseValue.in(left, right,
|
|
43550
|
+
value: !DatabaseValue.in(left, right, collation10,),
|
|
43215
43551
|
};
|
|
43216
43552
|
}
|
|
43217
43553
|
};
|
|
@@ -43596,6 +43932,11 @@ var Optimizer = class {
|
|
|
43596
43932
|
this.explorer.explore(node,);
|
|
43597
43933
|
}
|
|
43598
43934
|
}
|
|
43935
|
+
if (false) {
|
|
43936
|
+
assert(winner.node, 'Group not optimized',);
|
|
43937
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
43938
|
+
winner.node = new RelationalAssert(winner.node, required, cache2,);
|
|
43939
|
+
}
|
|
43599
43940
|
return winner.cost;
|
|
43600
43941
|
}
|
|
43601
43942
|
createEnforcer(winner, node, required,) {
|
|
@@ -43868,7 +44209,7 @@ var AnimationCollector = class {
|
|
|
43868
44209
|
};
|
|
43869
44210
|
_variantHashes = /* @__PURE__ */ new WeakMap();
|
|
43870
44211
|
var framerAppearEffects = /* @__PURE__ */ new AnimationCollector();
|
|
43871
|
-
function withOptimizedAppearEffect(
|
|
44212
|
+
function withOptimizedAppearEffect(Component18,) {
|
|
43872
44213
|
return React4.forwardRef(({
|
|
43873
44214
|
optimized,
|
|
43874
44215
|
...props
|
|
@@ -43889,7 +44230,7 @@ function withOptimizedAppearEffect(Component16,) {
|
|
|
43889
44230
|
generatedComponentContext,
|
|
43890
44231
|
);
|
|
43891
44232
|
}
|
|
43892
|
-
return /* @__PURE__ */ jsx(
|
|
44233
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
43893
44234
|
ref,
|
|
43894
44235
|
...props,
|
|
43895
44236
|
},);
|
|
@@ -44012,7 +44353,9 @@ function activeBreakpointHashFromWindow(breakpoints,) {
|
|
|
44012
44353
|
}
|
|
44013
44354
|
function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitial = true,) {
|
|
44014
44355
|
const isInitialNavigation = useContext(IsInitialNavigationContext,);
|
|
44015
|
-
const
|
|
44356
|
+
const onCanvas = useIsOnFramerCanvas();
|
|
44357
|
+
const usesMediaQueries = !onCanvas && isBrowser2();
|
|
44358
|
+
const baseVariant = useRef(usesMediaQueries ? activeMediaQueryFromWindow(mediaQueries,) ?? initial : initial,);
|
|
44016
44359
|
const basePropsVariant = useRef(hydratedWithInitial && isInitialNavigation ? initial : baseVariant.current,);
|
|
44017
44360
|
const forceUpdate = useForceUpdate3();
|
|
44018
44361
|
const instantTransition = useInstantTransition();
|
|
@@ -44076,8 +44419,8 @@ function removeHiddenBreakpointLayersV2(breakpoints,) {
|
|
|
44076
44419
|
(_a = hiddenLayer.parentNode) == null ? void 0 : _a.removeChild(hiddenLayer,);
|
|
44077
44420
|
}
|
|
44078
44421
|
}
|
|
44079
|
-
const
|
|
44080
|
-
|
|
44422
|
+
const requestIdleCallback2 = safeWindow.requestIdleCallback ?? requestIdleCallbackFallback;
|
|
44423
|
+
requestIdleCallback2(() => {
|
|
44081
44424
|
var _a2;
|
|
44082
44425
|
(_a2 = document.querySelector(framerBreakpointCSSSelector,)) == null ? void 0 : _a2.remove();
|
|
44083
44426
|
},);
|
|
@@ -44431,12 +44774,12 @@ function usePrototypeNavigate({
|
|
|
44431
44774
|
navigation.goBack();
|
|
44432
44775
|
return false;
|
|
44433
44776
|
}
|
|
44434
|
-
const
|
|
44777
|
+
const Component18 = typeof target === 'string'
|
|
44435
44778
|
? await componentForRoute(getRoute == null ? void 0 : getRoute(target,),).catch(() => {},)
|
|
44436
44779
|
: React4.isValidElement(target,)
|
|
44437
44780
|
? target
|
|
44438
44781
|
: null;
|
|
44439
|
-
if (!
|
|
44782
|
+
if (!Component18) return;
|
|
44440
44783
|
const {
|
|
44441
44784
|
appearsFrom,
|
|
44442
44785
|
backdropColor,
|
|
@@ -44445,38 +44788,38 @@ function usePrototypeNavigate({
|
|
|
44445
44788
|
const transitionType = options.transition || 'instant';
|
|
44446
44789
|
switch (transitionType) {
|
|
44447
44790
|
case 'instant':
|
|
44448
|
-
navigation.instant(
|
|
44791
|
+
navigation.instant(Component18,);
|
|
44449
44792
|
break;
|
|
44450
44793
|
case 'fade':
|
|
44451
|
-
navigation.fade(
|
|
44794
|
+
navigation.fade(Component18, {
|
|
44452
44795
|
animation,
|
|
44453
44796
|
},);
|
|
44454
44797
|
break;
|
|
44455
44798
|
case 'push':
|
|
44456
|
-
navigation.push(
|
|
44799
|
+
navigation.push(Component18, {
|
|
44457
44800
|
appearsFrom,
|
|
44458
44801
|
animation,
|
|
44459
44802
|
},);
|
|
44460
44803
|
break;
|
|
44461
44804
|
case 'flip':
|
|
44462
|
-
navigation.flip(
|
|
44805
|
+
navigation.flip(Component18, {
|
|
44463
44806
|
appearsFrom,
|
|
44464
44807
|
animation,
|
|
44465
44808
|
},);
|
|
44466
44809
|
break;
|
|
44467
44810
|
case 'magicMotion':
|
|
44468
|
-
navigation.magicMotion(
|
|
44811
|
+
navigation.magicMotion(Component18, {
|
|
44469
44812
|
animation,
|
|
44470
44813
|
},);
|
|
44471
44814
|
break;
|
|
44472
44815
|
case 'modal':
|
|
44473
|
-
navigation.modal(
|
|
44816
|
+
navigation.modal(Component18, {
|
|
44474
44817
|
backdropColor,
|
|
44475
44818
|
animation,
|
|
44476
44819
|
},);
|
|
44477
44820
|
break;
|
|
44478
44821
|
case 'overlay':
|
|
44479
|
-
navigation.overlay(
|
|
44822
|
+
navigation.overlay(Component18, {
|
|
44480
44823
|
appearsFrom,
|
|
44481
44824
|
backdropColor,
|
|
44482
44825
|
animation,
|
|
@@ -44888,6 +45231,72 @@ function useVariantState({
|
|
|
44888
45231
|
variantClassNames,
|
|
44889
45232
|
],);
|
|
44890
45233
|
}
|
|
45234
|
+
function withCodeBoundaryForOverrides(Component18, {
|
|
45235
|
+
scopeId,
|
|
45236
|
+
nodeId,
|
|
45237
|
+
override,
|
|
45238
|
+
inComponentSlot,
|
|
45239
|
+
},) {
|
|
45240
|
+
if (!shouldEnableCodeBoundaries()) {
|
|
45241
|
+
return override(Component18,);
|
|
45242
|
+
}
|
|
45243
|
+
const appliedOverride = tryToApplyOverride(Component18, override,);
|
|
45244
|
+
let hasErrorBeenLogged = false;
|
|
45245
|
+
function CodeBoundaryForOverrides(props, ref,) {
|
|
45246
|
+
const externalComponentNestingLevel = useExternalComponentNestingLevel();
|
|
45247
|
+
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(externalComponentNestingLevel, inComponentSlot ?? false,);
|
|
45248
|
+
if (shouldWrapWithBoundary) {
|
|
45249
|
+
if (appliedOverride.status === 'success') {
|
|
45250
|
+
return /* @__PURE__ */ jsx(CodeComponentBoundary, {
|
|
45251
|
+
errorMessage: getErrorMessageForOverride(scopeId, nodeId,),
|
|
45252
|
+
fallback: /* @__PURE__ */ jsx(Component18, {
|
|
45253
|
+
...props,
|
|
45254
|
+
ref,
|
|
45255
|
+
},),
|
|
45256
|
+
children: /* @__PURE__ */ jsx(appliedOverride.Component, {
|
|
45257
|
+
...props,
|
|
45258
|
+
ref,
|
|
45259
|
+
},),
|
|
45260
|
+
},);
|
|
45261
|
+
} else {
|
|
45262
|
+
if (!hasErrorBeenLogged) {
|
|
45263
|
+
logError(appliedOverride.error,);
|
|
45264
|
+
logError(getErrorMessageForOverride(scopeId, nodeId,),);
|
|
45265
|
+
collectErrorToAnalytics(appliedOverride.error,);
|
|
45266
|
+
hasErrorBeenLogged = true;
|
|
45267
|
+
}
|
|
45268
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
45269
|
+
...props,
|
|
45270
|
+
ref,
|
|
45271
|
+
},);
|
|
45272
|
+
}
|
|
45273
|
+
} else {
|
|
45274
|
+
if (appliedOverride.status === 'success') {
|
|
45275
|
+
return /* @__PURE__ */ jsx(appliedOverride.Component, {
|
|
45276
|
+
...props,
|
|
45277
|
+
ref,
|
|
45278
|
+
},);
|
|
45279
|
+
} else {
|
|
45280
|
+
throw appliedOverride.error;
|
|
45281
|
+
}
|
|
45282
|
+
}
|
|
45283
|
+
}
|
|
45284
|
+
return React4.forwardRef(CodeBoundaryForOverrides,);
|
|
45285
|
+
}
|
|
45286
|
+
function tryToApplyOverride(Component18, override,) {
|
|
45287
|
+
try {
|
|
45288
|
+
const ComponentWithOverrides = override(Component18,);
|
|
45289
|
+
return {
|
|
45290
|
+
status: 'success',
|
|
45291
|
+
Component: ComponentWithOverrides,
|
|
45292
|
+
};
|
|
45293
|
+
} catch (error) {
|
|
45294
|
+
return {
|
|
45295
|
+
status: 'error',
|
|
45296
|
+
error,
|
|
45297
|
+
};
|
|
45298
|
+
}
|
|
45299
|
+
}
|
|
44891
45300
|
function extractMappingFromInfo(info,) {
|
|
44892
45301
|
var _a;
|
|
44893
45302
|
const json = (_a = info.__FramerMetadata__.exports.default.annotations) == null ? void 0 : _a.framerVariables;
|
|
@@ -44898,14 +45307,14 @@ function extractMappingFromInfo(info,) {
|
|
|
44898
45307
|
return void 0;
|
|
44899
45308
|
}
|
|
44900
45309
|
}
|
|
44901
|
-
function withMappedReactProps(
|
|
45310
|
+
function withMappedReactProps(Component18, info,) {
|
|
44902
45311
|
return (rawProps) => {
|
|
44903
45312
|
const props = {};
|
|
44904
45313
|
const mapping = extractMappingFromInfo(info,);
|
|
44905
45314
|
for (const key7 in rawProps) {
|
|
44906
45315
|
asRecord(props,)[(mapping == null ? void 0 : mapping[key7]) ?? key7] = rawProps[key7];
|
|
44907
45316
|
}
|
|
44908
|
-
return /* @__PURE__ */ jsx(
|
|
45317
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
44909
45318
|
...props,
|
|
44910
45319
|
},);
|
|
44911
45320
|
};
|
|
@@ -44946,10 +45355,10 @@ function createInputOutputRanges2(transformTargets, threshold, exitTarget,) {
|
|
|
44946
45355
|
outputRange: [-1, -1, ...outputRange,],
|
|
44947
45356
|
};
|
|
44948
45357
|
}
|
|
44949
|
-
var withVariantAppearEffect = (
|
|
45358
|
+
var withVariantAppearEffect = (Component18) =>
|
|
44950
45359
|
React4.forwardRef((props, forwardedRef,) => {
|
|
44951
45360
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
44952
|
-
return /* @__PURE__ */ jsx(
|
|
45361
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
44953
45362
|
...props,
|
|
44954
45363
|
ref: forwardedRef,
|
|
44955
45364
|
},);
|
|
@@ -45036,18 +45445,18 @@ var withVariantAppearEffect = (Component16) =>
|
|
|
45036
45445
|
repeat: !animateOnce,
|
|
45037
45446
|
},);
|
|
45038
45447
|
if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
|
|
45039
|
-
return /* @__PURE__ */ jsx(
|
|
45448
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
45040
45449
|
...rest,
|
|
45041
45450
|
variant: activeVariant ?? props.variant,
|
|
45042
45451
|
ref: observerRef,
|
|
45043
45452
|
},);
|
|
45044
45453
|
} else {
|
|
45045
|
-
return /* @__PURE__ */ jsx(
|
|
45454
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
45046
45455
|
...rest,
|
|
45047
45456
|
},);
|
|
45048
45457
|
}
|
|
45049
45458
|
},);
|
|
45050
|
-
var withVariantFX = (
|
|
45459
|
+
var withVariantFX = (Component18) =>
|
|
45051
45460
|
React4.forwardRef(({
|
|
45052
45461
|
initial,
|
|
45053
45462
|
animate: animate3,
|
|
@@ -45064,7 +45473,7 @@ var withVariantFX = (Component16) =>
|
|
|
45064
45473
|
observerRef,
|
|
45065
45474
|
true,
|
|
45066
45475
|
);
|
|
45067
|
-
return /* @__PURE__ */ jsx(
|
|
45476
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
45068
45477
|
...props,
|
|
45069
45478
|
style: {
|
|
45070
45479
|
...(props == null ? void 0 : props.style),
|
|
@@ -48751,10 +49160,10 @@ var RichTextContainer = /* @__PURE__ */ forwardRef((props, ref,) => {
|
|
|
48751
49160
|
if (layoutId) {
|
|
48752
49161
|
rest.layout = 'preserve-aspect';
|
|
48753
49162
|
}
|
|
48754
|
-
const
|
|
49163
|
+
const Component18 = htmlElementAsMotionComponent(props.as,);
|
|
48755
49164
|
if (isString2(props.viewBox,)) {
|
|
48756
49165
|
if (props.as !== void 0) {
|
|
48757
|
-
return /* @__PURE__ */ jsx(
|
|
49166
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
48758
49167
|
...rest,
|
|
48759
49168
|
ref: containerRef,
|
|
48760
49169
|
style: containerStyle,
|
|
@@ -48787,7 +49196,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef((props, ref,) => {
|
|
|
48787
49196
|
},);
|
|
48788
49197
|
}
|
|
48789
49198
|
}
|
|
48790
|
-
return /* @__PURE__ */ jsx(
|
|
49199
|
+
return /* @__PURE__ */ jsx(Component18, {
|
|
48791
49200
|
...rest,
|
|
48792
49201
|
ref: containerRef,
|
|
48793
49202
|
style: containerStyle,
|
|
@@ -51623,6 +52032,7 @@ export {
|
|
|
51623
52032
|
sharedSVGManager,
|
|
51624
52033
|
shouldOpenLinkInNewTab,
|
|
51625
52034
|
Size,
|
|
52035
|
+
SmartComponentScopedContainer,
|
|
51626
52036
|
spring,
|
|
51627
52037
|
SpringAnimator,
|
|
51628
52038
|
SSRVariants,
|
|
@@ -51734,6 +52144,7 @@ export {
|
|
|
51734
52144
|
visualElementStore,
|
|
51735
52145
|
warning,
|
|
51736
52146
|
WindowContext,
|
|
52147
|
+
withCodeBoundaryForOverrides,
|
|
51737
52148
|
withCSS,
|
|
51738
52149
|
withFX,
|
|
51739
52150
|
withGeneratedLayoutId,
|
|
@@ -51800,4 +52211,5 @@ if (typeof document !== 'undefined') {
|
|
|
51800
52211
|
document.head.appendChild(fragment);
|
|
51801
52212
|
}
|
|
51802
52213
|
|
|
51803
|
-
export {
|
|
52214
|
+
export { Link as FramerLink }
|
|
52215
|
+
export { Router, FetchClientProvider, FormContext, LocaleInfoContext }
|