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/dist/framer.js
CHANGED
|
@@ -38,8 +38,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.LayoutGroupContext = exports.DeprecatedLayoutGroupContext = exports.DeprecatedFrameWithEvents = exports.DeprecatedComponentContainer = exports.defaultDeviceProps = exports.DataObserverContext = exports.DataObserver = exports.DataContext = exports.Data = exports.CycleVariantState = exports.CustomCursorHost = exports.createBox = exports.ConvertColor = exports.ControlType = exports.Container = exports.ConstraintValues = exports.ConstraintMask = exports.ComponentViewportProvider = exports.ComponentContainerContext = exports.complex = exports.combinedCSSRulesForPreview = exports.ColorMixModelType = exports.ColorFormat = exports.color = exports.Color = exports.clamp = exports.circOut = exports.circInOut = exports.circIn = exports.cancelSync = exports.cancelFrame = exports.callEach = exports.BoxShadow = exports.BezierAnimator = exports.backOut = exports.backInOut = exports.backIn = exports.BackgroundImage = exports.AnyInterpolation = exports.anticipate = exports.animations = exports.AnimateSharedLayout = exports.AnimatePresence = exports.animateMini = exports.animate = exports.Animatable = exports.AnchorLinkTarget = exports.addPointerInfo = exports.AcceleratedAnimation = exports.combinedCSSRules = void 0;
|
|
40
40
|
exports.LazyValue = exports.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.isMotionValue = exports.isBrowser = exports.invariant = exports.InternalID = exports.Image = exports.GeneratedComponentContext = exports.GamepadContext = exports.FrameWithMotion = exports.frameSteps = exports.FramerEventSession = exports.FramerEventListener = exports.FramerEvent = exports.framerCSSMarker = exports.framerAppearTransformTemplateToken = exports.framerAppearIdKey = exports.framerAppearEffects = exports.framerAppearAnimationScriptKey = exports.FramerAnimation = exports.frameFromElements = exports.frameFromElement = exports.frameData = exports.frame = exports.Frame = exports.FormSelect = exports.FormPlainTextInput = exports.FormContainer = exports.FormBooleanInput = exports.fontStore = exports.FontSourceNames = exports.FlatTree = exports.Fetcher = exports.environment = exports.easeOut = exports.easeInOut = exports.easeIn = exports.Draggable = exports.DragControls = exports.domMin = exports.domMax = exports.domAnimation = exports.DOM = exports.distance = exports.dispatchKeyDownEvent = exports.DimensionType = exports.devicePresets = exports.DeviceCodeComponent = void 0;
|
|
41
|
-
exports.
|
|
42
|
-
exports.FormContext = exports.FetchClientProvider = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = exports.WindowContext = exports.warning = exports.visualElementStore = exports.VisualElement = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.ValueInterpolation = exports.useProvidedWindow = exports.useIsomorphicLayoutEffect = exports.useAnimation = exports.Text = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.StyleSheetContext = exports.Stack = exports.SSRVariants = void 0;
|
|
41
|
+
exports.SmartComponentScopedContainer = exports.Size = exports.sharedSVGManager = exports.Shadow = exports.Scroll = exports.RichText = exports.reverseEasing = exports.ResolveLinks = exports.RenderTarget = exports.Rect = exports.RadialGradient = exports.QueryEngine = exports.px = exports.PropertyStore = exports.PropertyOverrides = exports.progress = exports.PresenceContext = exports.Polygon = exports.pipe = exports.PathVariablesContext = exports.PathSegment = exports.pathDefaults = exports.ParentSizeState = exports.Page = exports.optimizedAppearDataAttribute = exports.optimizeAppearTransformTemplate = exports.optimizeAppear = exports.ObservableObject = exports.NotFoundError = exports.nestedLinksCollector = exports.NavigationTransitionType = exports.NavigationConsumer = exports.NavigationCallbackProvider = exports.NavigateTo = exports.Reorder = exports.MotionValue = exports.MotionGlobalConfig = exports.MotionContext = exports.MotionConfigContext = exports.motion = exports.mirrorEasing = exports.makeUseVisualState = exports.MainLoop = exports.m = exports.localPackageFallbackIdentifier = exports.loadFont = exports.Link = exports.LinearGradient = exports.Line = exports.LibraryFeaturesProvider = void 0;
|
|
42
|
+
exports.LocaleInfoContext = exports.FormContext = exports.FetchClientProvider = exports.FramerLink = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = exports.WindowContext = exports.warning = exports.visualElementStore = exports.VisualElement = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.ValueInterpolation = exports.useProvidedWindow = exports.useIsomorphicLayoutEffect = exports.useAnimation = exports.Text = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.StyleSheetContext = exports.Stack = exports.SSRVariants = exports.SpringAnimator = void 0;
|
|
43
43
|
exports._injectRuntime = _injectRuntime;
|
|
44
44
|
exports.addActionControls = addActionControls;
|
|
45
45
|
exports.addFonts = addFonts;
|
|
@@ -247,6 +247,7 @@ exports.useVelocity = useVelocity;
|
|
|
247
247
|
exports.useViewportScroll = useViewportScroll;
|
|
248
248
|
exports.useWillChange = useWillChange;
|
|
249
249
|
exports.valueToDimensionType = valueToDimensionType;
|
|
250
|
+
exports.withCodeBoundaryForOverrides = withCodeBoundaryForOverrides;
|
|
250
251
|
exports.withInfiniteScroll = withInfiniteScroll;
|
|
251
252
|
exports.withMappedReactProps = withMappedReactProps;
|
|
252
253
|
exports.WithNavigator = WithNavigator;
|
|
@@ -14914,7 +14915,7 @@ function steps(numSteps, direction = 'end') {
|
|
|
14914
14915
|
return clamp(0, 1, rounded / numSteps);
|
|
14915
14916
|
};
|
|
14916
14917
|
}
|
|
14917
|
-
// https :https://app.framerstatic.com/framer.
|
|
14918
|
+
// https :https://app.framerstatic.com/framer.K777Q2AQ.mjs
|
|
14918
14919
|
init_chunk_QLPHEVXG();
|
|
14919
14920
|
const react_11 = __importDefault(require("react"));
|
|
14920
14921
|
const react_12 = require("react");
|
|
@@ -16582,9 +16583,9 @@ function renderPage(Page4, defaultPageStyle) {
|
|
|
16582
16583
|
var NotFoundError = class extends Error {
|
|
16583
16584
|
};
|
|
16584
16585
|
exports.NotFoundError = NotFoundError;
|
|
16585
|
-
var
|
|
16586
|
+
var NotFoundErrorBoundaryCaughtError = class extends Error {
|
|
16586
16587
|
};
|
|
16587
|
-
var
|
|
16588
|
+
var NotFoundErrorBoundary = class extends react_7.Component {
|
|
16588
16589
|
constructor(props) {
|
|
16589
16590
|
super(props);
|
|
16590
16591
|
this.state = {
|
|
@@ -16615,7 +16616,7 @@ var ErrorBoundary = class extends react_7.Component {
|
|
|
16615
16616
|
return this.props.children;
|
|
16616
16617
|
}
|
|
16617
16618
|
if (!(this.state.error instanceof NotFoundError)) {
|
|
16618
|
-
const error = new
|
|
16619
|
+
const error = new NotFoundErrorBoundaryCaughtError();
|
|
16619
16620
|
error.cause = this.state.error;
|
|
16620
16621
|
throw error;
|
|
16621
16622
|
}
|
|
@@ -16626,6 +16627,162 @@ var ErrorBoundary = class extends react_7.Component {
|
|
|
16626
16627
|
return renderPage(notFoundPage, defaultPageStyle);
|
|
16627
16628
|
}
|
|
16628
16629
|
};
|
|
16630
|
+
function isObject(value) {
|
|
16631
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
16632
|
+
}
|
|
16633
|
+
function isString(value) {
|
|
16634
|
+
return typeof value === 'string';
|
|
16635
|
+
}
|
|
16636
|
+
var preloadKey = 'preload';
|
|
16637
|
+
function isLazyComponentType(componentType) {
|
|
16638
|
+
return typeof componentType === 'object' && componentType !== null && !react_11.default.isValidElement(componentType) &&
|
|
16639
|
+
preloadKey in componentType;
|
|
16640
|
+
}
|
|
16641
|
+
function lazy(factory) {
|
|
16642
|
+
const LazyComponent = react_11.default.lazy(factory);
|
|
16643
|
+
let factoryPromise;
|
|
16644
|
+
let LoadedComponent;
|
|
16645
|
+
const Component18 = react_11.default.forwardRef(function LazyWithPreload(props, ref) {
|
|
16646
|
+
return react_11.default.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, ref
|
|
16647
|
+
? {
|
|
16648
|
+
ref,
|
|
16649
|
+
...props,
|
|
16650
|
+
}
|
|
16651
|
+
: props);
|
|
16652
|
+
});
|
|
16653
|
+
Component18.preload = () => {
|
|
16654
|
+
if (!factoryPromise) {
|
|
16655
|
+
factoryPromise = factory().then((module) => {
|
|
16656
|
+
LoadedComponent = module.default;
|
|
16657
|
+
return LoadedComponent;
|
|
16658
|
+
});
|
|
16659
|
+
}
|
|
16660
|
+
return factoryPromise;
|
|
16661
|
+
};
|
|
16662
|
+
return Component18;
|
|
16663
|
+
}
|
|
16664
|
+
function getRouteElementId(route, hash2) {
|
|
16665
|
+
if (hash2 && route) {
|
|
16666
|
+
if (route.elements && hash2 in route.elements) {
|
|
16667
|
+
return route.elements[hash2];
|
|
16668
|
+
}
|
|
16669
|
+
else {
|
|
16670
|
+
return hash2;
|
|
16671
|
+
}
|
|
16672
|
+
}
|
|
16673
|
+
return void 0;
|
|
16674
|
+
}
|
|
16675
|
+
function isBot(userAgent) {
|
|
16676
|
+
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent);
|
|
16677
|
+
}
|
|
16678
|
+
function yieldToMain(options) {
|
|
16679
|
+
if ('scheduler' in window) {
|
|
16680
|
+
if ('yield' in scheduler)
|
|
16681
|
+
return scheduler.yield(options);
|
|
16682
|
+
if ('postTask' in scheduler)
|
|
16683
|
+
return scheduler.postTask(() => { }, options);
|
|
16684
|
+
}
|
|
16685
|
+
if ((options === null || options === void 0 ? void 0 : options.priority) === 'user-blocking') {
|
|
16686
|
+
return Promise.resolve();
|
|
16687
|
+
}
|
|
16688
|
+
return new Promise((resolve) => {
|
|
16689
|
+
setTimeout(resolve);
|
|
16690
|
+
});
|
|
16691
|
+
}
|
|
16692
|
+
async function yieldBefore(fn, options) {
|
|
16693
|
+
await yieldToMain(options);
|
|
16694
|
+
return fn();
|
|
16695
|
+
}
|
|
16696
|
+
function interactionResponse(options) {
|
|
16697
|
+
return new Promise((resolve) => {
|
|
16698
|
+
setTimeout(resolve, 100);
|
|
16699
|
+
requestAnimationFrame(() => {
|
|
16700
|
+
void yieldBefore(resolve, options);
|
|
16701
|
+
});
|
|
16702
|
+
});
|
|
16703
|
+
}
|
|
16704
|
+
function useAfterPaintEffect(effectFn, deps, opts, useEffectFn = react_3.useLayoutEffect) {
|
|
16705
|
+
useEffectFn(() => {
|
|
16706
|
+
const runAfterPaint = async (fn) => {
|
|
16707
|
+
await interactionResponse(opts);
|
|
16708
|
+
return fn();
|
|
16709
|
+
};
|
|
16710
|
+
const runPromise = runAfterPaint(effectFn);
|
|
16711
|
+
return () => {
|
|
16712
|
+
void (async () => {
|
|
16713
|
+
const cleanup = await runPromise;
|
|
16714
|
+
if (!cleanup)
|
|
16715
|
+
return;
|
|
16716
|
+
void runAfterPaint(cleanup);
|
|
16717
|
+
})();
|
|
16718
|
+
};
|
|
16719
|
+
}, deps);
|
|
16720
|
+
}
|
|
16721
|
+
var noop2 = () => { };
|
|
16722
|
+
var EMPTY_ARRAY = [];
|
|
16723
|
+
var requestIdleCallback = /* @__PURE__ */ (() => {
|
|
16724
|
+
return typeof window !== 'undefined' ? window.requestIdleCallback || window.setTimeout : setTimeout;
|
|
16725
|
+
})();
|
|
16726
|
+
var ErrorBoundaryCaughtError = class extends NotFoundErrorBoundaryCaughtError {
|
|
16727
|
+
constructor() {
|
|
16728
|
+
super(...arguments);
|
|
16729
|
+
this.caught = true;
|
|
16730
|
+
}
|
|
16731
|
+
};
|
|
16732
|
+
var GracefullyDegradingErrorBoundary = class extends react_7.Component {
|
|
16733
|
+
constructor() {
|
|
16734
|
+
super(...arguments);
|
|
16735
|
+
this.state = {
|
|
16736
|
+
error: void 0,
|
|
16737
|
+
};
|
|
16738
|
+
this.message = 'Made UI non-interactive due to the error above. We\'ve logged it, but also please report this to the Framer team.';
|
|
16739
|
+
}
|
|
16740
|
+
static getDerivedStateFromError(error) {
|
|
16741
|
+
return {
|
|
16742
|
+
error,
|
|
16743
|
+
};
|
|
16744
|
+
}
|
|
16745
|
+
componentDidCatch(error) {
|
|
16746
|
+
var _a;
|
|
16747
|
+
if ('cause' in error) {
|
|
16748
|
+
error = error.cause;
|
|
16749
|
+
}
|
|
16750
|
+
console.error(this.message);
|
|
16751
|
+
if (Math.random() > 0.01)
|
|
16752
|
+
return;
|
|
16753
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
16754
|
+
(_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push(['published_site_load_error', {
|
|
16755
|
+
message: String(error),
|
|
16756
|
+
stack,
|
|
16757
|
+
},]);
|
|
16758
|
+
}
|
|
16759
|
+
render() {
|
|
16760
|
+
var _a;
|
|
16761
|
+
const error = this.state.error;
|
|
16762
|
+
if (!error)
|
|
16763
|
+
return this.props.children;
|
|
16764
|
+
if (!isBot(navigator.userAgent)) {
|
|
16765
|
+
const fatalError = new ErrorBoundaryCaughtError();
|
|
16766
|
+
fatalError.cause = 'cause' in error ? error.cause : error;
|
|
16767
|
+
console.error(this.message, fatalError.cause);
|
|
16768
|
+
throw fatalError;
|
|
16769
|
+
}
|
|
16770
|
+
return (
|
|
16771
|
+
// This has the caveat that we will slightly modify the DOM, but it appears to be fine in this case.
|
|
16772
|
+
// 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.
|
|
16773
|
+
(0, jsx_runtime_1.jsx)('div', {
|
|
16774
|
+
style: {
|
|
16775
|
+
display: 'contents',
|
|
16776
|
+
},
|
|
16777
|
+
suppressHydrationWarning: true,
|
|
16778
|
+
// 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.
|
|
16779
|
+
dangerouslySetInnerHTML: {
|
|
16780
|
+
__html: '<!-- DOM replaced by GracefullyDegradingErrorBoundary -->' +
|
|
16781
|
+
(((_a = document.getElementById('main')) === null || _a === void 0 ? void 0 : _a.innerHTML) || ''),
|
|
16782
|
+
},
|
|
16783
|
+
}));
|
|
16784
|
+
}
|
|
16785
|
+
};
|
|
16629
16786
|
var pathVariablesRegExpRaw = ':([a-z]\\w*)';
|
|
16630
16787
|
var pathVariablesRegExp = /* @__PURE__ */ new RegExp(pathVariablesRegExpRaw, 'gi');
|
|
16631
16788
|
function fillPathVariables(path, variables) {
|
|
@@ -16799,99 +16956,6 @@ function forwardQueryParams(queryParamsString, href) {
|
|
|
16799
16956
|
}
|
|
16800
16957
|
return hrefWithoutHash.substring(0, startOfSearch + 1) + newSearchParams.toString() + hash2;
|
|
16801
16958
|
}
|
|
16802
|
-
function isObject(value) {
|
|
16803
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
16804
|
-
}
|
|
16805
|
-
function isString(value) {
|
|
16806
|
-
return typeof value === 'string';
|
|
16807
|
-
}
|
|
16808
|
-
var preloadKey = 'preload';
|
|
16809
|
-
function isLazyComponentType(componentType) {
|
|
16810
|
-
return typeof componentType === 'object' && componentType !== null && !react_11.default.isValidElement(componentType) &&
|
|
16811
|
-
preloadKey in componentType;
|
|
16812
|
-
}
|
|
16813
|
-
function lazy(factory) {
|
|
16814
|
-
const LazyComponent = react_11.default.lazy(factory);
|
|
16815
|
-
let factoryPromise;
|
|
16816
|
-
let LoadedComponent;
|
|
16817
|
-
const Component16 = react_11.default.forwardRef(function LazyWithPreload(props, ref) {
|
|
16818
|
-
return react_11.default.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, ref
|
|
16819
|
-
? {
|
|
16820
|
-
ref,
|
|
16821
|
-
...props,
|
|
16822
|
-
}
|
|
16823
|
-
: props);
|
|
16824
|
-
});
|
|
16825
|
-
Component16.preload = () => {
|
|
16826
|
-
if (!factoryPromise) {
|
|
16827
|
-
factoryPromise = factory().then((module) => {
|
|
16828
|
-
LoadedComponent = module.default;
|
|
16829
|
-
return LoadedComponent;
|
|
16830
|
-
});
|
|
16831
|
-
}
|
|
16832
|
-
return factoryPromise;
|
|
16833
|
-
};
|
|
16834
|
-
return Component16;
|
|
16835
|
-
}
|
|
16836
|
-
function getRouteElementId(route, hash2) {
|
|
16837
|
-
if (hash2 && route) {
|
|
16838
|
-
if (route.elements && hash2 in route.elements) {
|
|
16839
|
-
return route.elements[hash2];
|
|
16840
|
-
}
|
|
16841
|
-
else {
|
|
16842
|
-
return hash2;
|
|
16843
|
-
}
|
|
16844
|
-
}
|
|
16845
|
-
return void 0;
|
|
16846
|
-
}
|
|
16847
|
-
function isBot(userAgent) {
|
|
16848
|
-
return /bot|-google|google-|yandex|ia_archiver/iu.test(userAgent);
|
|
16849
|
-
}
|
|
16850
|
-
function yieldToMain(options) {
|
|
16851
|
-
if ('scheduler' in window) {
|
|
16852
|
-
if ('yield' in scheduler)
|
|
16853
|
-
return scheduler.yield(options);
|
|
16854
|
-
if ('postTask' in scheduler)
|
|
16855
|
-
return scheduler.postTask(() => { }, options);
|
|
16856
|
-
}
|
|
16857
|
-
if ((options === null || options === void 0 ? void 0 : options.priority) === 'user-blocking') {
|
|
16858
|
-
return Promise.resolve();
|
|
16859
|
-
}
|
|
16860
|
-
return new Promise((resolve) => {
|
|
16861
|
-
setTimeout(resolve);
|
|
16862
|
-
});
|
|
16863
|
-
}
|
|
16864
|
-
async function yieldBefore(fn, options) {
|
|
16865
|
-
await yieldToMain(options);
|
|
16866
|
-
return fn();
|
|
16867
|
-
}
|
|
16868
|
-
function interactionResponse(options) {
|
|
16869
|
-
return new Promise((resolve) => {
|
|
16870
|
-
setTimeout(resolve, 100);
|
|
16871
|
-
requestAnimationFrame(() => {
|
|
16872
|
-
void yieldBefore(resolve, options);
|
|
16873
|
-
});
|
|
16874
|
-
});
|
|
16875
|
-
}
|
|
16876
|
-
function useAfterPaintEffect(effectFn, deps, opts, useEffectFn = react_3.useLayoutEffect) {
|
|
16877
|
-
useEffectFn(() => {
|
|
16878
|
-
const runAfterPaint = async (fn) => {
|
|
16879
|
-
await interactionResponse(opts);
|
|
16880
|
-
return fn();
|
|
16881
|
-
};
|
|
16882
|
-
const runPromise = runAfterPaint(effectFn);
|
|
16883
|
-
return () => {
|
|
16884
|
-
void (async () => {
|
|
16885
|
-
const cleanup = await runPromise;
|
|
16886
|
-
if (!cleanup)
|
|
16887
|
-
return;
|
|
16888
|
-
void runAfterPaint(cleanup);
|
|
16889
|
-
})();
|
|
16890
|
-
};
|
|
16891
|
-
}, deps);
|
|
16892
|
-
}
|
|
16893
|
-
var noop2 = () => { };
|
|
16894
|
-
var EMPTY_ARRAY = [];
|
|
16895
16959
|
async function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {
|
|
16896
16960
|
var _a, _b, _c;
|
|
16897
16961
|
let resultPath = path;
|
|
@@ -17295,11 +17359,8 @@ function createViewTransitionStylesheet({ exit = defaultPageTransition, enter, }
|
|
|
17295
17359
|
styleElement.textContent = styleContent;
|
|
17296
17360
|
document.head.appendChild(styleElement);
|
|
17297
17361
|
}
|
|
17298
|
-
var _requestIdleCallback = /* @__PURE__ */ (() => {
|
|
17299
|
-
return typeof window !== 'undefined' ? window.requestIdleCallback || window.setTimeout : setTimeout;
|
|
17300
|
-
})();
|
|
17301
17362
|
function removeViewTransitionStylesheet() {
|
|
17302
|
-
|
|
17363
|
+
requestIdleCallback(() => {
|
|
17303
17364
|
frame.render(() => {
|
|
17304
17365
|
performance.mark('framer-vt-remove');
|
|
17305
17366
|
const element = document.getElementById(VIEW_TRANSITION_STYLES_ID);
|
|
@@ -17414,14 +17475,15 @@ async function pushRouteState(routeId, route, { currentRoutePath, currentPathVar
|
|
|
17414
17475
|
const { path, } = route;
|
|
17415
17476
|
if (!path)
|
|
17416
17477
|
return;
|
|
17478
|
+
const newPath = getPathForRoute(route, {
|
|
17479
|
+
currentRoutePath,
|
|
17480
|
+
currentPathVariables,
|
|
17481
|
+
hash: hash2,
|
|
17482
|
+
pathVariables,
|
|
17483
|
+
preserveQueryParams,
|
|
17484
|
+
});
|
|
17485
|
+
const currentUrl = window.location.href;
|
|
17417
17486
|
try {
|
|
17418
|
-
const newPath = getPathForRoute(route, {
|
|
17419
|
-
currentRoutePath,
|
|
17420
|
-
currentPathVariables,
|
|
17421
|
-
hash: hash2,
|
|
17422
|
-
pathVariables,
|
|
17423
|
-
preserveQueryParams,
|
|
17424
|
-
});
|
|
17425
17487
|
const urlUpdatePromise = pushHistoryState({
|
|
17426
17488
|
routeId,
|
|
17427
17489
|
hash: hash2,
|
|
@@ -17432,6 +17494,16 @@ async function pushRouteState(routeId, route, { currentRoutePath, currentPathVar
|
|
|
17432
17494
|
}
|
|
17433
17495
|
catch { }
|
|
17434
17496
|
}
|
|
17497
|
+
function updateCanonicalURL(url, prevUrl) {
|
|
17498
|
+
requestIdleCallback(() => {
|
|
17499
|
+
const canonical = document.querySelector('link[rel=\'canonical\']');
|
|
17500
|
+
if (!canonical)
|
|
17501
|
+
return;
|
|
17502
|
+
const newURL = new URL(url, prevUrl);
|
|
17503
|
+
newURL.search = '';
|
|
17504
|
+
canonical.setAttribute('href', newURL.toString());
|
|
17505
|
+
});
|
|
17506
|
+
}
|
|
17435
17507
|
function isHistoryState(data2) {
|
|
17436
17508
|
const routeIdKey = 'routeId';
|
|
17437
17509
|
return isObject(data2) && isString(data2[routeIdKey]);
|
|
@@ -17457,6 +17529,7 @@ async function pushHistoryState(data2, url, awaitPaintBeforeUpdate = false, isNa
|
|
|
17457
17529
|
});
|
|
17458
17530
|
}
|
|
17459
17531
|
performance.mark('framer-history-push');
|
|
17532
|
+
updateCanonicalURL(url, window.location.href);
|
|
17460
17533
|
if (!isNavigationTransition) {
|
|
17461
17534
|
window.history.pushState(data2, '', url);
|
|
17462
17535
|
return;
|
|
@@ -17525,8 +17598,9 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
|
|
|
17525
17598
|
return;
|
|
17526
17599
|
void monitorNextPaintAfterRender();
|
|
17527
17600
|
const changeRoute = () => {
|
|
17528
|
-
setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject(pathVariables) ? pathVariables : void 0,
|
|
17601
|
+
setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject(pathVariables) ? pathVariables : void 0, true, false);
|
|
17529
17602
|
};
|
|
17603
|
+
updateCanonicalURL(window.location.href);
|
|
17530
17604
|
const transition = await startViewTransition2(currentRouteId.current, routeId, changeRoute, false);
|
|
17531
17605
|
if (transition) {
|
|
17532
17606
|
void transition.updateCallbackDone.then((_d = viewTransitionReady.current) === null || _d === void 0 ? void 0 : _d.resolve).catch((_e = viewTransitionReady.current) === null || _e === void 0 ? void 0 : _e.reject);
|
|
@@ -17951,8 +18025,8 @@ var SuspenseErrorBoundary = class extends react_7.Component {
|
|
|
17951
18025
|
};
|
|
17952
18026
|
}
|
|
17953
18027
|
static getDerivedStateFromError(error) {
|
|
17954
|
-
if (!(error instanceof
|
|
17955
|
-
console.error('Derived error in SuspenseErrorBoundary', error);
|
|
18028
|
+
if (!(error instanceof NotFoundErrorBoundaryCaughtError)) {
|
|
18029
|
+
console.error('Derived error in SuspenseErrorBoundary:\n', error);
|
|
17956
18030
|
}
|
|
17957
18031
|
return {
|
|
17958
18032
|
error,
|
|
@@ -17960,26 +18034,25 @@ var SuspenseErrorBoundary = class extends react_7.Component {
|
|
|
17960
18034
|
}
|
|
17961
18035
|
componentDidCatch(error, errorInfo) {
|
|
17962
18036
|
var _a;
|
|
17963
|
-
if (error instanceof
|
|
18037
|
+
if (error instanceof NotFoundErrorBoundaryCaughtError) {
|
|
17964
18038
|
return;
|
|
17965
18039
|
}
|
|
17966
18040
|
const componentStack = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.componentStack;
|
|
17967
|
-
console.error('Caught error in SuspenseErrorBoundary', error, componentStack);
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
},]);
|
|
17976
|
-
}
|
|
18041
|
+
console.error('Caught error in SuspenseErrorBoundary:\n', error, componentStack);
|
|
18042
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
18043
|
+
(_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
18044
|
+
message: String(error),
|
|
18045
|
+
stack,
|
|
18046
|
+
// only log componentStack if we don't have a stack
|
|
18047
|
+
componentStack: stack ? void 0 : componentStack,
|
|
18048
|
+
},]);
|
|
17977
18049
|
}
|
|
17978
18050
|
render() {
|
|
17979
|
-
|
|
18051
|
+
const error = this.state.error;
|
|
18052
|
+
if (error === void 0)
|
|
17980
18053
|
return this.props.children;
|
|
17981
|
-
if (
|
|
17982
|
-
throw
|
|
18054
|
+
if (error instanceof NotFoundErrorBoundaryCaughtError) {
|
|
18055
|
+
throw error.cause;
|
|
17983
18056
|
}
|
|
17984
18057
|
window.__framer_STPD_OPT_OUT__ = true;
|
|
17985
18058
|
return (0, jsx_runtime_1.jsx)(react_13.Suspense, {
|
|
@@ -18014,6 +18087,7 @@ var defaultLocaleInfo = {
|
|
|
18014
18087
|
setLocale: noopAsync,
|
|
18015
18088
|
};
|
|
18016
18089
|
var LocaleInfoContext = /* @__PURE__ */ react_11.default.createContext(defaultLocaleInfo);
|
|
18090
|
+
exports.LocaleInfoContext = LocaleInfoContext;
|
|
18017
18091
|
function useLocaleInfo() {
|
|
18018
18092
|
return react_11.default.useContext(LocaleInfoContext);
|
|
18019
18093
|
}
|
|
@@ -18062,8 +18136,10 @@ function useNavigationTransition(enableAsyncURLUpdates) {
|
|
|
18062
18136
|
return (0, react_2.useCallback)(async (transitionFn, updateURL, isAbortable = true) => {
|
|
18063
18137
|
var _a;
|
|
18064
18138
|
setHydrationDone();
|
|
18139
|
+
const hasUpdateURL = updateURL !== void 0;
|
|
18065
18140
|
if (!enableAsyncURLUpdates) {
|
|
18066
|
-
|
|
18141
|
+
if (hasUpdateURL)
|
|
18142
|
+
await updateURL();
|
|
18067
18143
|
transitionFn();
|
|
18068
18144
|
void monitorNextPaintAfterRender();
|
|
18069
18145
|
return new Promise((resolve) => {
|
|
@@ -18075,7 +18151,7 @@ function useNavigationTransition(enableAsyncURLUpdates) {
|
|
|
18075
18151
|
navigationController.current = controller;
|
|
18076
18152
|
const signal = controller === null || controller === void 0 ? void 0 : controller.signal;
|
|
18077
18153
|
const nextRender = monitorNextPaintAfterRender();
|
|
18078
|
-
if (!
|
|
18154
|
+
if (!hasUpdateURL) {
|
|
18079
18155
|
navigationController.current = void 0;
|
|
18080
18156
|
transitionFn(signal);
|
|
18081
18157
|
return nextRender;
|
|
@@ -18193,7 +18269,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
18193
18269
|
startNavigation,
|
|
18194
18270
|
startViewTransition2,
|
|
18195
18271
|
]);
|
|
18196
|
-
const setCurrentRouteId = (0, react_2.useCallback)((routeId, localeId, hash2, pathVariables,
|
|
18272
|
+
const setCurrentRouteId = (0, react_2.useCallback)((routeId, localeId, hash2, pathVariables, isHistoryTransition, smoothScroll = false, updateURL) => {
|
|
18197
18273
|
const currentRouteId2 = currentRouteRef.current;
|
|
18198
18274
|
currentRouteRef.current = routeId;
|
|
18199
18275
|
currentPathVariablesRef.current = pathVariables;
|
|
@@ -18264,7 +18340,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
18264
18340
|
},
|
|
18265
18341
|
// we yield in startNavigation before updating the URL, so yielding again is not needed.
|
|
18266
18342
|
false, ignorePushStateWrapper);
|
|
18267
|
-
setCurrentRouteId(routeId, currentRouteLocaleId, routeElementId, pathVariables,
|
|
18343
|
+
setCurrentRouteId(routeId, currentRouteLocaleId, routeElementId, pathVariables, false, smoothScroll, disableHistory ? void 0 : updateURL);
|
|
18268
18344
|
}, [routes, setCurrentRouteId, disableHistory, preserveQueryParams, enableAsyncURLUpdates,]);
|
|
18269
18345
|
const getRoute = useGetRouteCallback(routes);
|
|
18270
18346
|
const currentRouteId = currentRouteRef.current;
|
|
@@ -18287,39 +18363,41 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
18287
18363
|
? fillPathVariables(current.path, currentPathVariables)
|
|
18288
18364
|
: current.path;
|
|
18289
18365
|
const remountKey = String(currentLocaleId) + pathWithFilledVariables;
|
|
18290
|
-
return (0, jsx_runtime_1.jsx)(
|
|
18291
|
-
|
|
18292
|
-
|
|
18293
|
-
|
|
18294
|
-
|
|
18295
|
-
children:
|
|
18296
|
-
|
|
18297
|
-
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
|
|
18301
|
-
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
children:
|
|
18305
|
-
|
|
18306
|
-
|
|
18307
|
-
|
|
18308
|
-
?
|
|
18309
|
-
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
|
|
18314
|
-
|
|
18315
|
-
|
|
18316
|
-
|
|
18366
|
+
return (0, jsx_runtime_1.jsx)(GracefullyDegradingErrorBoundary, {
|
|
18367
|
+
children: (0, jsx_runtime_1.jsx)(RouterAPIProvider, {
|
|
18368
|
+
api,
|
|
18369
|
+
children: (0, jsx_runtime_1.jsx)(LocaleInfoContext.Provider, {
|
|
18370
|
+
value: localeInfo,
|
|
18371
|
+
children: (0, jsx_runtime_1.jsxs)(SuspenseThatPreservesDom, {
|
|
18372
|
+
children: [
|
|
18373
|
+
(0, jsx_runtime_1.jsx)(NotFoundErrorBoundary, {
|
|
18374
|
+
notFoundPage,
|
|
18375
|
+
defaultPageStyle,
|
|
18376
|
+
forceUpdateKey: dep,
|
|
18377
|
+
children: (0, jsx_runtime_1.jsx)(WithLayoutTemplate, {
|
|
18378
|
+
LayoutTemplate,
|
|
18379
|
+
routeId: currentRouteId,
|
|
18380
|
+
children: (0, jsx_runtime_1.jsxs)(react_8.Fragment, {
|
|
18381
|
+
children: [
|
|
18382
|
+
(0, jsx_runtime_1.jsx)(MarkSuspenseEffects.Start, {}),
|
|
18383
|
+
pageExistsInCurrentLocale
|
|
18384
|
+
? renderPage(current.page, LayoutTemplate
|
|
18385
|
+
? {
|
|
18386
|
+
...defaultPageStyle,
|
|
18387
|
+
display: 'content',
|
|
18388
|
+
}
|
|
18389
|
+
: defaultPageStyle)
|
|
18390
|
+
: // LAYOUT_TEMPLATE @TODO: display: content for not found page?
|
|
18391
|
+
notFoundPage && renderPage(notFoundPage, defaultPageStyle),
|
|
18392
|
+
],
|
|
18393
|
+
}, remountKey),
|
|
18394
|
+
}),
|
|
18317
18395
|
}),
|
|
18318
|
-
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18322
|
-
|
|
18396
|
+
(0, jsx_runtime_1.jsx)(TurnOnReactEventHandling, {}),
|
|
18397
|
+
(0, jsx_runtime_1.jsx)(MarkSuspenseEffects.End, {}),
|
|
18398
|
+
editorBar,
|
|
18399
|
+
],
|
|
18400
|
+
}),
|
|
18323
18401
|
}),
|
|
18324
18402
|
}),
|
|
18325
18403
|
});
|
|
@@ -20762,6 +20840,7 @@ var mockWindow = {
|
|
|
20762
20840
|
scrollY: 0,
|
|
20763
20841
|
location: {
|
|
20764
20842
|
href: '',
|
|
20843
|
+
pathname: '',
|
|
20765
20844
|
},
|
|
20766
20845
|
document: {
|
|
20767
20846
|
cookie: '',
|
|
@@ -20790,6 +20869,7 @@ var mockWindow = {
|
|
|
20790
20869
|
innerWidth: 0,
|
|
20791
20870
|
SVGSVGElement: {},
|
|
20792
20871
|
open: function (_url, _target, _features) { },
|
|
20872
|
+
__framer_events: [],
|
|
20793
20873
|
};
|
|
20794
20874
|
var safeWindow = typeof window === 'undefined' ? mockWindow : window;
|
|
20795
20875
|
var _raf = (f) => {
|
|
@@ -21746,7 +21826,7 @@ function getColorsFromTheme(theme, type) {
|
|
|
21746
21826
|
screenColor: isDarkTheme ? '#333' : '#eee',
|
|
21747
21827
|
};
|
|
21748
21828
|
}
|
|
21749
|
-
var
|
|
21829
|
+
var ErrorBoundary = class extends react_7.Component {
|
|
21750
21830
|
constructor() {
|
|
21751
21831
|
super(...arguments);
|
|
21752
21832
|
__publicField(this, 'state', {});
|
|
@@ -21892,7 +21972,7 @@ function Device({ canResize = false, children, ResizeObserver: ResizeObserver2 =
|
|
|
21892
21972
|
ref: screenRef,
|
|
21893
21973
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MotionConfig, {
|
|
21894
21974
|
transformPagePoint: invertScale2,
|
|
21895
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
21975
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ErrorBoundary, {
|
|
21896
21976
|
children,
|
|
21897
21977
|
}),
|
|
21898
21978
|
}),
|
|
@@ -26596,7 +26676,7 @@ function useMeasuredSize(ref) {
|
|
|
26596
26676
|
return size.current;
|
|
26597
26677
|
}
|
|
26598
26678
|
var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
|
|
26599
|
-
var withMeasuredSize = (
|
|
26679
|
+
var withMeasuredSize = (Component18) => (props) => {
|
|
26600
26680
|
const ref = react_11.default.useRef(null);
|
|
26601
26681
|
const size = useMeasuredSize(ref);
|
|
26602
26682
|
const dataProps = {
|
|
@@ -26613,7 +26693,7 @@ var withMeasuredSize = (Component16) => (props) => {
|
|
|
26613
26693
|
},
|
|
26614
26694
|
ref,
|
|
26615
26695
|
...dataProps,
|
|
26616
|
-
children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
26696
|
+
children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
26617
26697
|
...props,
|
|
26618
26698
|
width: (size == null ? void 0 : size.width) ?? fallbackWidth,
|
|
26619
26699
|
height: (size == null ? void 0 : size.height) ?? fallbackHeight,
|
|
@@ -28124,7 +28204,7 @@ var clamp2 = (value, a, b) => {
|
|
|
28124
28204
|
var DraggingContext = /* @__PURE__ */ react_11.default.createContext({
|
|
28125
28205
|
dragging: false,
|
|
28126
28206
|
});
|
|
28127
|
-
function WithDragging(
|
|
28207
|
+
function WithDragging(Component18) {
|
|
28128
28208
|
const _WithDraggingHOC = class extends react_11.default.Component {
|
|
28129
28209
|
constructor(props, defaultProps) {
|
|
28130
28210
|
super(props, defaultProps);
|
|
@@ -28693,7 +28773,7 @@ function WithDragging(Component16) {
|
|
|
28693
28773
|
value: {
|
|
28694
28774
|
dragging: this.state.isDragging,
|
|
28695
28775
|
},
|
|
28696
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
28776
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
28697
28777
|
...originalProps,
|
|
28698
28778
|
}),
|
|
28699
28779
|
});
|
|
@@ -28731,9 +28811,9 @@ function WithDragging(Component16) {
|
|
|
28731
28811
|
constraints: {},
|
|
28732
28812
|
mouseWheel: false,
|
|
28733
28813
|
});
|
|
28734
|
-
__publicField(WithDraggingHOC, 'defaultProps', Object.assign({},
|
|
28814
|
+
__publicField(WithDraggingHOC, 'defaultProps', Object.assign({}, Component18.defaultProps, _WithDraggingHOC.draggingDefaultProps));
|
|
28735
28815
|
const withDragging = WithDraggingHOC;
|
|
28736
|
-
(0, import_hoist_non_react_statics.default)(withDragging,
|
|
28816
|
+
(0, import_hoist_non_react_statics.default)(withDragging, Component18);
|
|
28737
28817
|
return withDragging;
|
|
28738
28818
|
}
|
|
28739
28819
|
var hoverProps = {
|
|
@@ -31520,7 +31600,7 @@ function useInfiniteScroll({ ref: elementRef, loadMore, rootMargin = '0px', thre
|
|
|
31520
31600
|
};
|
|
31521
31601
|
}, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,]);
|
|
31522
31602
|
}
|
|
31523
|
-
function withInfiniteScroll(
|
|
31603
|
+
function withInfiniteScroll(Component18) {
|
|
31524
31604
|
return react_11.default.forwardRef(({ __paginationInfo, __loadMore, ...props }, ref) => {
|
|
31525
31605
|
const backupRef = react_11.default.useRef(null);
|
|
31526
31606
|
const infiniteScrollRef = ref ?? backupRef;
|
|
@@ -31530,7 +31610,7 @@ function withInfiniteScroll(Component16) {
|
|
|
31530
31610
|
ref: infiniteScrollRef,
|
|
31531
31611
|
paginationInfo: __paginationInfo,
|
|
31532
31612
|
});
|
|
31533
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
31613
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
31534
31614
|
...props,
|
|
31535
31615
|
ref: infiniteScrollRef,
|
|
31536
31616
|
});
|
|
@@ -34317,20 +34397,20 @@ function convertColorProps(props) {
|
|
|
34317
34397
|
}
|
|
34318
34398
|
return props;
|
|
34319
34399
|
}
|
|
34320
|
-
function WithOverride(
|
|
34400
|
+
function WithOverride(Component18, override) {
|
|
34321
34401
|
const useOverride = typeof override === 'function' ? (props) => override(convertColorProps(props)) : () => convertColorProps(override);
|
|
34322
34402
|
const ComponentWithOverride = function (props) {
|
|
34323
34403
|
(0, react_2.useContext)(DataObserverContext);
|
|
34324
34404
|
const overrideProps = useOverride(props);
|
|
34325
34405
|
const { style, ...rest } = props;
|
|
34326
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
34406
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
34327
34407
|
...rest,
|
|
34328
34408
|
...overrideProps,
|
|
34329
34409
|
_initialStyle: style,
|
|
34330
34410
|
});
|
|
34331
34411
|
};
|
|
34332
|
-
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride,
|
|
34333
|
-
ComponentWithOverride['displayName'] = `WithOverride(${
|
|
34412
|
+
(0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component18);
|
|
34413
|
+
ComponentWithOverride['displayName'] = `WithOverride(${Component18.displayName || Component18.name})`;
|
|
34334
34414
|
return ComponentWithOverride;
|
|
34335
34415
|
}
|
|
34336
34416
|
var prefix = '__framer__';
|
|
@@ -35134,10 +35214,10 @@ function addMotionValueStyle(style, values) {
|
|
|
35134
35214
|
function isVariantOrVariantList(value) {
|
|
35135
35215
|
return isString2(value) || Array.isArray(value);
|
|
35136
35216
|
}
|
|
35137
|
-
var withFX = (
|
|
35217
|
+
var withFX = (Component18) => react_11.default.forwardRef((props, forwardedRef) => {
|
|
35138
35218
|
var _a;
|
|
35139
35219
|
if (props.__withFX) {
|
|
35140
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
35220
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35141
35221
|
...props,
|
|
35142
35222
|
animate: void 0,
|
|
35143
35223
|
initial: void 0,
|
|
@@ -35148,7 +35228,7 @@ var withFX = (Component16) => react_11.default.forwardRef((props, forwardedRef)
|
|
|
35148
35228
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
35149
35229
|
const animate4 = isVariantOrVariantList(props.animate) ? props.animate : void 0;
|
|
35150
35230
|
const initial2 = isVariantOrVariantList(props.initial) ? props.initial : void 0;
|
|
35151
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
35231
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35152
35232
|
...props,
|
|
35153
35233
|
animate: animate4,
|
|
35154
35234
|
initial: initial2,
|
|
@@ -35226,7 +35306,7 @@ var withFX = (Component16) => react_11.default.forwardRef((props, forwardedRef)
|
|
|
35226
35306
|
exit,
|
|
35227
35307
|
}
|
|
35228
35308
|
: {};
|
|
35229
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
35309
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35230
35310
|
...forwardedProps,
|
|
35231
35311
|
...motionGestures,
|
|
35232
35312
|
__withFX: true,
|
|
@@ -35352,7 +35432,7 @@ var ComponentViewportContext = /* @__PURE__ */ react_11.default.createContext({}
|
|
|
35352
35432
|
function useComponentViewport() {
|
|
35353
35433
|
return react_11.default.useContext(ComponentViewportContext);
|
|
35354
35434
|
}
|
|
35355
|
-
var ComponentViewportProvider = /* @__PURE__ */ react_11.default.forwardRef(({ width, height, y, children, ...rest }, ref)
|
|
35435
|
+
var ComponentViewportProvider = /* @__PURE__ */ react_11.default.forwardRef(function ComponentViewportProvider2({ width, height, y, children, ...rest }, ref) {
|
|
35356
35436
|
const componentViewport = react_11.default.useMemo(() => {
|
|
35357
35437
|
return {
|
|
35358
35438
|
width,
|
|
@@ -35367,9 +35447,9 @@ var ComponentViewportProvider = /* @__PURE__ */ react_11.default.forwardRef(({ w
|
|
|
35367
35447
|
});
|
|
35368
35448
|
});
|
|
35369
35449
|
exports.ComponentViewportProvider = ComponentViewportProvider;
|
|
35370
|
-
var withGeneratedLayoutId = (
|
|
35450
|
+
var withGeneratedLayoutId = (Component18) => react_11.default.forwardRef((props, ref) => {
|
|
35371
35451
|
const layoutId = useLayoutId2(props);
|
|
35372
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
35452
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35373
35453
|
layoutId,
|
|
35374
35454
|
...props,
|
|
35375
35455
|
layoutIdKey: void 0,
|
|
@@ -35378,7 +35458,84 @@ var withGeneratedLayoutId = (Component16) => react_11.default.forwardRef((props,
|
|
|
35378
35458
|
});
|
|
35379
35459
|
});
|
|
35380
35460
|
exports.withGeneratedLayoutId = withGeneratedLayoutId;
|
|
35381
|
-
|
|
35461
|
+
function collectErrorToAnalytics(error, errorInfo) {
|
|
35462
|
+
var _a;
|
|
35463
|
+
if (typeof window === 'undefined')
|
|
35464
|
+
return;
|
|
35465
|
+
if (Math.random() > 0.01)
|
|
35466
|
+
return;
|
|
35467
|
+
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
35468
|
+
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
35469
|
+
(_a = safeWindow.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
35470
|
+
message: String(error),
|
|
35471
|
+
stack,
|
|
35472
|
+
// only log componentStack if we don't have a stack
|
|
35473
|
+
componentStack: stack ? void 0 : componentStack,
|
|
35474
|
+
},]);
|
|
35475
|
+
}
|
|
35476
|
+
function logError(...args) {
|
|
35477
|
+
if (false)
|
|
35478
|
+
return;
|
|
35479
|
+
console.error(...args);
|
|
35480
|
+
}
|
|
35481
|
+
function shouldEnableCodeBoundaries() {
|
|
35482
|
+
return RenderTarget.current() !== RenderTarget.canvas;
|
|
35483
|
+
}
|
|
35484
|
+
function CodeComponentBoundary({ errorMessage, fallback, children, }) {
|
|
35485
|
+
if (!shouldEnableCodeBoundaries()) {
|
|
35486
|
+
return children;
|
|
35487
|
+
}
|
|
35488
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ClientSideErrorBoundary, {
|
|
35489
|
+
fallback,
|
|
35490
|
+
errorMessage,
|
|
35491
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ServerSideErrorBoundary, {
|
|
35492
|
+
fallback,
|
|
35493
|
+
children,
|
|
35494
|
+
}),
|
|
35495
|
+
});
|
|
35496
|
+
}
|
|
35497
|
+
var ClientSideErrorBoundary = class extends react_7.Component {
|
|
35498
|
+
constructor() {
|
|
35499
|
+
super(...arguments);
|
|
35500
|
+
__publicField(this, 'state', {
|
|
35501
|
+
hasError: false,
|
|
35502
|
+
});
|
|
35503
|
+
}
|
|
35504
|
+
static getDerivedStateFromError() {
|
|
35505
|
+
return {
|
|
35506
|
+
hasError: true,
|
|
35507
|
+
};
|
|
35508
|
+
}
|
|
35509
|
+
componentDidCatch(error, errorInfo) {
|
|
35510
|
+
logError(this.props.errorMessage, errorInfo == null ? void 0 : errorInfo.componentStack);
|
|
35511
|
+
collectErrorToAnalytics(error, errorInfo);
|
|
35512
|
+
}
|
|
35513
|
+
render() {
|
|
35514
|
+
const { children, fallback = null, } = this.props;
|
|
35515
|
+
const { hasError, } = this.state;
|
|
35516
|
+
return hasError ? fallback : children;
|
|
35517
|
+
}
|
|
35518
|
+
};
|
|
35519
|
+
function ServerSideErrorBoundary({ children, fallback = null, }) {
|
|
35520
|
+
return typeof window === 'undefined'
|
|
35521
|
+
? // On the server, Suspense fallback is activated by errors. So we use the actual Suspense,
|
|
35522
|
+
// and render the actual error fallback if Suspense activates.
|
|
35523
|
+
/* @__PURE__ */
|
|
35524
|
+
(0, jsx_runtime_1.jsx)(react_13.Suspense, {
|
|
35525
|
+
fallback,
|
|
35526
|
+
children,
|
|
35527
|
+
})
|
|
35528
|
+
: // On the client, Suspense fallback is activated by data fetching. So we use SuspenseThatPreservesDom,
|
|
35529
|
+
// because we don’t want to render a fallback if the boundary gets inadvertently activated.
|
|
35530
|
+
//
|
|
35531
|
+
// “Why won’t you just render plain children without Suspense?” Because that would cause a hydration mismatch
|
|
35532
|
+
// (the server has Suspense, the client doesn’t).
|
|
35533
|
+
/* @__PURE__ */
|
|
35534
|
+
(0, jsx_runtime_1.jsx)(SuspenseThatPreservesDom, {
|
|
35535
|
+
children,
|
|
35536
|
+
});
|
|
35537
|
+
}
|
|
35538
|
+
var DeprecatedContainerErrorBoundary = class extends react_7.Component {
|
|
35382
35539
|
constructor() {
|
|
35383
35540
|
super(...arguments);
|
|
35384
35541
|
__publicField(this, 'state', {
|
|
@@ -35388,21 +35545,12 @@ var ContainerErrorBoundary = class extends react_7.Component {
|
|
|
35388
35545
|
// We use `componentDidCatch` instead of `static getDerivedStateFromError()` because the latter could also catch hydration errors.
|
|
35389
35546
|
// Hydration errors are recoverable by React, so we don't want to hide the coponent in that case (since the tree will not unmount).
|
|
35390
35547
|
componentDidCatch(error, errorInfo) {
|
|
35391
|
-
var _a;
|
|
35392
35548
|
const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
|
|
35393
35549
|
console.error('Error in component (see previous log). This component has been hidden. Please check any custom code or code overrides to fix.', componentStack);
|
|
35394
35550
|
this.setState({
|
|
35395
35551
|
hasError: true,
|
|
35396
35552
|
});
|
|
35397
|
-
|
|
35398
|
-
const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
|
|
35399
|
-
(_a = window.__framer_events) == null ? void 0 : _a.push(['published_site_load_recoverable_error', {
|
|
35400
|
-
message: String(error),
|
|
35401
|
-
stack,
|
|
35402
|
-
// only log componentStack if we don't have a stack
|
|
35403
|
-
componentStack: stack ? void 0 : componentStack,
|
|
35404
|
-
},]);
|
|
35405
|
-
}
|
|
35553
|
+
collectErrorToAnalytics(error, errorInfo);
|
|
35406
35554
|
}
|
|
35407
35555
|
render() {
|
|
35408
35556
|
const { children, } = this.props;
|
|
@@ -35410,9 +35558,63 @@ var ContainerErrorBoundary = class extends react_7.Component {
|
|
|
35410
35558
|
return hasError ? null : children;
|
|
35411
35559
|
}
|
|
35412
35560
|
};
|
|
35413
|
-
var
|
|
35561
|
+
var CRASH_ERROR_MESSAGE_PREFIX = 'code-crash:';
|
|
35562
|
+
function formatCodeCrashLocationFromSourceNode(scopeId, nodeId) {
|
|
35563
|
+
return `${CRASH_ERROR_MESSAGE_PREFIX}${scopeId}:${nodeId}`;
|
|
35564
|
+
}
|
|
35565
|
+
function getErrorMessageForComponent(scopeId, nodeId) {
|
|
35566
|
+
return getErrorMessageFor('component', scopeId, nodeId);
|
|
35567
|
+
}
|
|
35568
|
+
function getErrorMessageForOverride(scopeId, nodeId) {
|
|
35569
|
+
return getErrorMessageFor('override', scopeId, nodeId);
|
|
35570
|
+
}
|
|
35571
|
+
function getErrorMessageFor(element, scopeId, nodeId) {
|
|
35572
|
+
return `A code ${element} crashed while rendering due to the error above. To find and fix it, open the project in the editor \u2192 open Quick Actions (press Cmd+K or Ctrl+K) \u2192 paste this: ${formatCodeCrashLocationFromSourceNode(scopeId, nodeId)} \u2192 click \u201CShow Layer\u201D.`;
|
|
35573
|
+
}
|
|
35574
|
+
var IsInExternalComponentContext = /* @__PURE__ */ (() => react_11.default.createContext(0))();
|
|
35575
|
+
function useExternalComponentNestingLevel() {
|
|
35576
|
+
return react_11.default.useContext(IsInExternalComponentContext);
|
|
35577
|
+
}
|
|
35578
|
+
function IsExternalComponent({ children, }) {
|
|
35579
|
+
const count = react_11.default.useContext(IsInExternalComponentContext);
|
|
35580
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IsInExternalComponentContext.Provider, {
|
|
35581
|
+
value: count + 1,
|
|
35582
|
+
children,
|
|
35583
|
+
});
|
|
35584
|
+
}
|
|
35585
|
+
function shouldWrapComponentWithBoundary(externalModuleNestingLevel, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
35586
|
+
const isLocalComponentInstance =
|
|
35587
|
+
// We know a component instance is local when it’s not nested inside any external component...
|
|
35588
|
+
externalModuleNestingLevel === 0 ||
|
|
35589
|
+
// ...or – “Ticker edge case” – when it’s nested inside an external component during React rendering,
|
|
35590
|
+
// but is actually defined in a slot that’s passed into the component. (This is the “Ticker edge case”:
|
|
35591
|
+
// if a site has a Ticker (or any other component with slots), and something in a Ticker’s slot crashes,
|
|
35592
|
+
// we want to disable that something, not the whole ticker.)
|
|
35593
|
+
externalModuleNestingLevel === 1 && inComponentSlot;
|
|
35594
|
+
return (isAuthoredByUser || isExternalComponent) && isLocalComponentInstance;
|
|
35595
|
+
}
|
|
35596
|
+
function shouldWrapOverrideWithBoundary(externalModuleNestingLevel, inComponentSlot) {
|
|
35597
|
+
const isWrappingFrameLocalToProject =
|
|
35598
|
+
// We know a frame is local when it’s not nested inside any external component...
|
|
35599
|
+
externalModuleNestingLevel === 0 ||
|
|
35600
|
+
// ...or – “Ticker edge case” – when it’s nested inside an external component during React rendering,
|
|
35601
|
+
// but is actually defined in a slot that’s passed into the component. (This is the “Ticker edge case”:
|
|
35602
|
+
// if a site has a Ticker (or any other component with slots), and an override in a Ticker’s slot crashes,
|
|
35603
|
+
// we want to disable that override, not the whole ticker.)
|
|
35604
|
+
externalModuleNestingLevel === 1 && inComponentSlot;
|
|
35605
|
+
return isWrappingFrameLocalToProject;
|
|
35606
|
+
}
|
|
35607
|
+
var ContainerInner = /* @__PURE__ */ react_11.default.forwardRef(({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, ...props }, ref) => {
|
|
35414
35608
|
const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
|
|
35415
35609
|
const MotionComponent = htmlElementAsMotionComponent(as);
|
|
35610
|
+
const clonedChildren = react_11.default.Children.map(children, (child) => {
|
|
35611
|
+
return react_11.default.isValidElement(child)
|
|
35612
|
+
? react_11.default.cloneElement(child, {
|
|
35613
|
+
layoutId,
|
|
35614
|
+
})
|
|
35615
|
+
: child;
|
|
35616
|
+
});
|
|
35617
|
+
const childrenWithCodeBoundary = useWrapWithCodeBoundary(clonedChildren, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);
|
|
35416
35618
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MotionComponent, {
|
|
35417
35619
|
layoutId: outerLayoutId,
|
|
35418
35620
|
...props,
|
|
@@ -35424,22 +35626,64 @@ var Providers = /* @__PURE__ */ react_11.default.forwardRef(({ children, layoutI
|
|
|
35424
35626
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LayoutGroup, {
|
|
35425
35627
|
id: layoutId ?? '',
|
|
35426
35628
|
inherit: 'id',
|
|
35427
|
-
children:
|
|
35428
|
-
children: react_11.default.Children.map(children, (child) => {
|
|
35429
|
-
return react_11.default.isValidElement(child)
|
|
35430
|
-
? react_11.default.cloneElement(child, {
|
|
35431
|
-
layoutId,
|
|
35432
|
-
})
|
|
35433
|
-
: child;
|
|
35434
|
-
}),
|
|
35435
|
-
}),
|
|
35629
|
+
children: childrenWithCodeBoundary,
|
|
35436
35630
|
}),
|
|
35437
35631
|
}),
|
|
35438
35632
|
}),
|
|
35439
35633
|
});
|
|
35440
35634
|
});
|
|
35441
|
-
var Container = /* @__PURE__ */ withGeneratedLayoutId(
|
|
35635
|
+
var Container = /* @__PURE__ */ withGeneratedLayoutId(ContainerInner);
|
|
35442
35636
|
exports.Container = Container;
|
|
35637
|
+
var SmartComponentScopedContainer = /* @__PURE__ */ react_11.default.forwardRef((props, ref) => {
|
|
35638
|
+
const { as, layoutId, scopeId, nodeId, isAuthoredByUser, rendersWithMotion, isModuleExternal, inComponentSlot, style, children, ...renderableProps } = props;
|
|
35639
|
+
const childrenWithCodeBoundary = useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);
|
|
35640
|
+
const tagName = props.as ?? 'div';
|
|
35641
|
+
if (props.rendersWithMotion) {
|
|
35642
|
+
const Component18 = htmlElementAsMotionComponent(tagName);
|
|
35643
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35644
|
+
ref,
|
|
35645
|
+
style: props.style,
|
|
35646
|
+
...renderableProps,
|
|
35647
|
+
children: childrenWithCodeBoundary,
|
|
35648
|
+
});
|
|
35649
|
+
}
|
|
35650
|
+
else {
|
|
35651
|
+
const Component18 = tagName;
|
|
35652
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35653
|
+
ref,
|
|
35654
|
+
style: props.style,
|
|
35655
|
+
...renderableProps,
|
|
35656
|
+
children: childrenWithCodeBoundary,
|
|
35657
|
+
});
|
|
35658
|
+
}
|
|
35659
|
+
});
|
|
35660
|
+
exports.SmartComponentScopedContainer = SmartComponentScopedContainer;
|
|
35661
|
+
function useWrapWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isExternalComponent, inComponentSlot) {
|
|
35662
|
+
const externalModuleNestingLevel = useExternalComponentNestingLevel();
|
|
35663
|
+
if (
|
|
35664
|
+
// Those props will either be all undefined, which means the Container wasn’t codegenned yet,
|
|
35665
|
+
// and we should use the old ContainerErrorBoundary –
|
|
35666
|
+
// or all defined, which means we have enough information to use the new boundary.
|
|
35667
|
+
isUndefined(scopeId) || isUndefined(nodeId)) {
|
|
35668
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(DeprecatedContainerErrorBoundary, {
|
|
35669
|
+
children,
|
|
35670
|
+
});
|
|
35671
|
+
}
|
|
35672
|
+
const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(externalModuleNestingLevel, isAuthoredByUser ?? false, isExternalComponent ?? false, inComponentSlot ?? false);
|
|
35673
|
+
if (shouldWrapWithBoundary) {
|
|
35674
|
+
children = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
|
|
35675
|
+
errorMessage: getErrorMessageForComponent(scopeId, nodeId),
|
|
35676
|
+
fallback: null,
|
|
35677
|
+
children,
|
|
35678
|
+
});
|
|
35679
|
+
}
|
|
35680
|
+
if (isExternalComponent) {
|
|
35681
|
+
children = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IsExternalComponent, {
|
|
35682
|
+
children,
|
|
35683
|
+
});
|
|
35684
|
+
}
|
|
35685
|
+
return children;
|
|
35686
|
+
}
|
|
35443
35687
|
var StyleSheetContext = /* @__PURE__ */ react_11.default.createContext(void 0);
|
|
35444
35688
|
exports.StyleSheetContext = StyleSheetContext;
|
|
35445
35689
|
var framerPostSSRCSSSelector = 'style[data-framer-css-ssr-minified]';
|
|
@@ -35456,7 +35700,7 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
|
35456
35700
|
})();
|
|
35457
35701
|
var framerCSSMarker = 'data-framer-css-ssr';
|
|
35458
35702
|
exports.framerCSSMarker = framerCSSMarker;
|
|
35459
|
-
var withCSS = (
|
|
35703
|
+
var withCSS = (Component18, escapedCSS, componentSerializationId) => react_11.default.forwardRef((props, ref) => {
|
|
35460
35704
|
const { sheet, cache: cache2, } = react_11.default.useContext(StyleSheetContext) ?? {};
|
|
35461
35705
|
if (!isBrowser2()) {
|
|
35462
35706
|
if (isFunction(escapedCSS))
|
|
@@ -35473,7 +35717,7 @@ var withCSS = (Component16, escapedCSS, componentSerializationId) => react_11.de
|
|
|
35473
35717
|
__html: concatenatedCSS,
|
|
35474
35718
|
},
|
|
35475
35719
|
}),
|
|
35476
|
-
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
35720
|
+
/* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35477
35721
|
...props,
|
|
35478
35722
|
ref,
|
|
35479
35723
|
}),
|
|
@@ -35490,7 +35734,7 @@ var withCSS = (Component16, escapedCSS, componentSerializationId) => react_11.de
|
|
|
35490
35734
|
: escapedCSS.split('\n');
|
|
35491
35735
|
css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
|
|
35492
35736
|
}, []);
|
|
35493
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
35737
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
35494
35738
|
...props,
|
|
35495
35739
|
ref,
|
|
35496
35740
|
});
|
|
@@ -36468,10 +36712,10 @@ function ChildrenCanSuspend({ children, }) {
|
|
|
36468
36712
|
children,
|
|
36469
36713
|
});
|
|
36470
36714
|
}
|
|
36471
|
-
function withChildrenCanSuspend(
|
|
36715
|
+
function withChildrenCanSuspend(Component18) {
|
|
36472
36716
|
return (0, react_4.forwardRef)(function withChildrenCanSuspendInner(props, ref) {
|
|
36473
36717
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ChildrenCanSuspend, {
|
|
36474
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
36718
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
36475
36719
|
...props,
|
|
36476
36720
|
ref,
|
|
36477
36721
|
}),
|
|
@@ -37025,7 +37269,7 @@ function getRouteFromPageLink(pageLink, router, currentRoute) {
|
|
|
37025
37269
|
const { webPageId, } = pageLink;
|
|
37026
37270
|
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
37027
37271
|
}
|
|
37028
|
-
var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, react_4.forwardRef)(({ children, href, openInNewTab, smoothScroll, nodeId, ...restProps }, forwardedRef)
|
|
37272
|
+
var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, react_4.forwardRef)(function Link2({ children, href, openInNewTab, smoothScroll, nodeId, ...restProps }, forwardedRef) {
|
|
37029
37273
|
const router = useRouter();
|
|
37030
37274
|
const currentRoute = useCurrentRoute();
|
|
37031
37275
|
const implicitPathVariables = useImplicitPathVariables();
|
|
@@ -37082,6 +37326,7 @@ var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, react_4.fo
|
|
|
37082
37326
|
return getChildren(el);
|
|
37083
37327
|
}));
|
|
37084
37328
|
exports.Link = Link;
|
|
37329
|
+
exports.FramerLink = Link;
|
|
37085
37330
|
var ParentLinkContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
|
|
37086
37331
|
function useReplaceNestedLinks(nodeId, href, propsAddedByLink) {
|
|
37087
37332
|
const parentLink = (0, react_2.useContext)(ParentLinkContext);
|
|
@@ -38048,12 +38293,8 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
|
|
|
38048
38293
|
},
|
|
38049
38294
|
preserveQueryParams,
|
|
38050
38295
|
enableAsyncURLUpdates,
|
|
38051
|
-
editorBar:
|
|
38052
|
-
|
|
38053
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBar, {
|
|
38054
|
-
framerSiteId,
|
|
38055
|
-
}),
|
|
38056
|
-
}),
|
|
38296
|
+
editorBar: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBarLauncher, {
|
|
38297
|
+
EditorBar,
|
|
38057
38298
|
}),
|
|
38058
38299
|
}),
|
|
38059
38300
|
}),
|
|
@@ -38078,6 +38319,24 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
|
|
|
38078
38319
|
});
|
|
38079
38320
|
}
|
|
38080
38321
|
}
|
|
38322
|
+
function EditorBarLauncher({ EditorBar, }) {
|
|
38323
|
+
const [mounted, setMounted,] = (0, react_9.useState)(false);
|
|
38324
|
+
const framerSiteId = (0, react_2.useContext)(FormContext);
|
|
38325
|
+
(0, react_2.useEffect)(() => {
|
|
38326
|
+
(0, react_12.startTransition)(() => {
|
|
38327
|
+
setMounted(true);
|
|
38328
|
+
});
|
|
38329
|
+
}, []);
|
|
38330
|
+
if (!EditorBar || !framerSiteId || !mounted)
|
|
38331
|
+
return null;
|
|
38332
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(IgnoreErrors, {
|
|
38333
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_13.Suspense, {
|
|
38334
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EditorBar, {
|
|
38335
|
+
framerSiteId,
|
|
38336
|
+
}),
|
|
38337
|
+
}),
|
|
38338
|
+
});
|
|
38339
|
+
}
|
|
38081
38340
|
function cloneChildrenWithProps(children, props, asNode) {
|
|
38082
38341
|
const cloned = React2.Children.map(children, (child) => {
|
|
38083
38342
|
if (React2.isValidElement(child)) {
|
|
@@ -38676,61 +38935,61 @@ var DatabaseValue = {
|
|
|
38676
38935
|
* Checks if the left value is equal to the right value. Returns false if
|
|
38677
38936
|
* the values are not of the same type.
|
|
38678
38937
|
*/
|
|
38679
|
-
equal(left, right,
|
|
38938
|
+
equal(left, right, collation11) {
|
|
38680
38939
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38681
38940
|
return false;
|
|
38682
38941
|
}
|
|
38683
|
-
return compare(left, right,
|
|
38942
|
+
return compare(left, right, collation11) === 0;
|
|
38684
38943
|
},
|
|
38685
38944
|
/**
|
|
38686
38945
|
* Checks if the left value is less than the right value. Returns false if
|
|
38687
38946
|
* the values are not of the same type.
|
|
38688
38947
|
*/
|
|
38689
|
-
lessThan(left, right,
|
|
38948
|
+
lessThan(left, right, collation11) {
|
|
38690
38949
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38691
38950
|
return false;
|
|
38692
38951
|
}
|
|
38693
|
-
return compare(left, right,
|
|
38952
|
+
return compare(left, right, collation11) < 0;
|
|
38694
38953
|
},
|
|
38695
38954
|
/**
|
|
38696
38955
|
* Checks if the left value is less than or equal to the right value.
|
|
38697
38956
|
* Returns false if the values are not of the same type.
|
|
38698
38957
|
*/
|
|
38699
|
-
lessThanOrEqual(left, right,
|
|
38958
|
+
lessThanOrEqual(left, right, collation11) {
|
|
38700
38959
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38701
38960
|
return false;
|
|
38702
38961
|
}
|
|
38703
|
-
return compare(left, right,
|
|
38962
|
+
return compare(left, right, collation11) <= 0;
|
|
38704
38963
|
},
|
|
38705
38964
|
/**
|
|
38706
38965
|
* Checks if the left value is greater than the right value. Returns false
|
|
38707
38966
|
* if the values are not of the same type.
|
|
38708
38967
|
*/
|
|
38709
|
-
greaterThan(left, right,
|
|
38968
|
+
greaterThan(left, right, collation11) {
|
|
38710
38969
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38711
38970
|
return false;
|
|
38712
38971
|
}
|
|
38713
|
-
return compare(left, right,
|
|
38972
|
+
return compare(left, right, collation11) > 0;
|
|
38714
38973
|
},
|
|
38715
38974
|
/**
|
|
38716
38975
|
* Checks if the left value is greater than or equal to the right value.
|
|
38717
38976
|
* Returns false if the values are not of the same type.
|
|
38718
38977
|
*/
|
|
38719
|
-
greaterThanOrEqual(left, right,
|
|
38978
|
+
greaterThanOrEqual(left, right, collation11) {
|
|
38720
38979
|
if ((left == null ? void 0 : left.type) !== (right == null ? void 0 : right.type)) {
|
|
38721
38980
|
return false;
|
|
38722
38981
|
}
|
|
38723
|
-
return compare(left, right,
|
|
38982
|
+
return compare(left, right, collation11) >= 0;
|
|
38724
38983
|
},
|
|
38725
38984
|
/**
|
|
38726
38985
|
* Checks if the left value is in the right value. Returns false if the
|
|
38727
38986
|
* right value is not an array.
|
|
38728
38987
|
*/
|
|
38729
|
-
in(left, right,
|
|
38988
|
+
in(left, right, collation11) {
|
|
38730
38989
|
if ((right == null ? void 0 : right.type) !== 'array')
|
|
38731
38990
|
return false;
|
|
38732
38991
|
return right.value.some((item) => {
|
|
38733
|
-
return DatabaseValue.equal(item, left,
|
|
38992
|
+
return DatabaseValue.equal(item, left, collation11);
|
|
38734
38993
|
});
|
|
38735
38994
|
},
|
|
38736
38995
|
/**
|
|
@@ -38738,47 +38997,47 @@ var DatabaseValue = {
|
|
|
38738
38997
|
*
|
|
38739
38998
|
* If source has duplicates, the index of the first occurrence is always returned.
|
|
38740
38999
|
*/
|
|
38741
|
-
indexOf(source, target,
|
|
39000
|
+
indexOf(source, target, collation11) {
|
|
38742
39001
|
if ((source == null ? void 0 : source.type) !== 'array')
|
|
38743
39002
|
return -1;
|
|
38744
39003
|
return source.value.findIndex((item) => {
|
|
38745
|
-
return DatabaseValue.equal(item, target,
|
|
39004
|
+
return DatabaseValue.equal(item, target, collation11);
|
|
38746
39005
|
});
|
|
38747
39006
|
},
|
|
38748
|
-
contains(source, target,
|
|
39007
|
+
contains(source, target, collation11) {
|
|
38749
39008
|
let sourceValue = toString(source);
|
|
38750
39009
|
let targetValue = toString(target);
|
|
38751
39010
|
if (isNull(sourceValue))
|
|
38752
39011
|
return false;
|
|
38753
39012
|
if (isNull(targetValue))
|
|
38754
39013
|
return false;
|
|
38755
|
-
if (
|
|
39014
|
+
if (collation11.type === 0) {
|
|
38756
39015
|
sourceValue = sourceValue.toLowerCase();
|
|
38757
39016
|
targetValue = targetValue.toLowerCase();
|
|
38758
39017
|
}
|
|
38759
39018
|
return sourceValue.includes(targetValue);
|
|
38760
39019
|
},
|
|
38761
|
-
startsWith(source, target,
|
|
39020
|
+
startsWith(source, target, collation11) {
|
|
38762
39021
|
let sourceValue = toString(source);
|
|
38763
39022
|
let targetValue = toString(target);
|
|
38764
39023
|
if (isNull(sourceValue))
|
|
38765
39024
|
return false;
|
|
38766
39025
|
if (isNull(targetValue))
|
|
38767
39026
|
return false;
|
|
38768
|
-
if (
|
|
39027
|
+
if (collation11.type === 0) {
|
|
38769
39028
|
sourceValue = sourceValue.toLowerCase();
|
|
38770
39029
|
targetValue = targetValue.toLowerCase();
|
|
38771
39030
|
}
|
|
38772
39031
|
return sourceValue.startsWith(targetValue);
|
|
38773
39032
|
},
|
|
38774
|
-
endsWith(source, target,
|
|
39033
|
+
endsWith(source, target, collation11) {
|
|
38775
39034
|
let sourceValue = toString(source);
|
|
38776
39035
|
let targetValue = toString(target);
|
|
38777
39036
|
if (isNull(sourceValue))
|
|
38778
39037
|
return false;
|
|
38779
39038
|
if (isNull(targetValue))
|
|
38780
39039
|
return false;
|
|
38781
|
-
if (
|
|
39040
|
+
if (collation11.type === 0) {
|
|
38782
39041
|
sourceValue = sourceValue.toLowerCase();
|
|
38783
39042
|
targetValue = targetValue.toLowerCase();
|
|
38784
39043
|
}
|
|
@@ -38824,7 +39083,7 @@ var DatabaseValue = {
|
|
|
38824
39083
|
}
|
|
38825
39084
|
},
|
|
38826
39085
|
};
|
|
38827
|
-
function compare(left, right,
|
|
39086
|
+
function compare(left, right, collation11) {
|
|
38828
39087
|
if (isNull(left) || isNull(right)) {
|
|
38829
39088
|
assert(left === right);
|
|
38830
39089
|
return 0;
|
|
@@ -38843,7 +39102,7 @@ function compare(left, right, collation10) {
|
|
|
38843
39102
|
const rightItem = right.value[i];
|
|
38844
39103
|
assert(!isUndefined(leftItem), 'Left item must exist');
|
|
38845
39104
|
assert(!isUndefined(rightItem), 'Right item must exist');
|
|
38846
|
-
const result = compare(leftItem, rightItem,
|
|
39105
|
+
const result = compare(leftItem, rightItem, collation11);
|
|
38847
39106
|
if (result !== 0)
|
|
38848
39107
|
return result;
|
|
38849
39108
|
}
|
|
@@ -38930,7 +39189,7 @@ function compare(left, right, collation10) {
|
|
|
38930
39189
|
const rightValue = right.value[rightKey];
|
|
38931
39190
|
assert(!isUndefined(leftValue), 'Left value must exist');
|
|
38932
39191
|
assert(!isUndefined(rightValue), 'Right value must exist');
|
|
38933
|
-
const result = compare(leftValue, rightValue,
|
|
39192
|
+
const result = compare(leftValue, rightValue, collation11);
|
|
38934
39193
|
if (result !== 0)
|
|
38935
39194
|
return result;
|
|
38936
39195
|
}
|
|
@@ -38960,7 +39219,7 @@ function compare(left, right, collation10) {
|
|
|
38960
39219
|
assert(left.type === right.type);
|
|
38961
39220
|
let leftValue = left.value;
|
|
38962
39221
|
let rightValue = right.value;
|
|
38963
|
-
if (
|
|
39222
|
+
if (collation11.type === 0) {
|
|
38964
39223
|
leftValue = left.value.toLowerCase();
|
|
38965
39224
|
rightValue = right.value.toLowerCase();
|
|
38966
39225
|
}
|
|
@@ -38979,6 +39238,208 @@ var unknownDefinition = {
|
|
|
38979
39238
|
type: 'unknown',
|
|
38980
39239
|
isNullable: true,
|
|
38981
39240
|
};
|
|
39241
|
+
function getNetworkLatency() {
|
|
39242
|
+
return 25;
|
|
39243
|
+
}
|
|
39244
|
+
function getNetworkSpeed() {
|
|
39245
|
+
return 100 * 125;
|
|
39246
|
+
}
|
|
39247
|
+
var KB = 1e3;
|
|
39248
|
+
var Cost = class {
|
|
39249
|
+
constructor(network) {
|
|
39250
|
+
this.network = network;
|
|
39251
|
+
}
|
|
39252
|
+
static estimate(totalRequests, transferredBytes) {
|
|
39253
|
+
const latency = getNetworkLatency();
|
|
39254
|
+
const speed = getNetworkSpeed();
|
|
39255
|
+
const network = totalRequests * latency + transferredBytes / speed;
|
|
39256
|
+
return new Cost(network);
|
|
39257
|
+
}
|
|
39258
|
+
static max(left, right) {
|
|
39259
|
+
const network = Math.max(left.network, right.network);
|
|
39260
|
+
return new Cost(network);
|
|
39261
|
+
}
|
|
39262
|
+
static compare(left, right) {
|
|
39263
|
+
if (left.network < right.network)
|
|
39264
|
+
return -1;
|
|
39265
|
+
if (left.network > right.network)
|
|
39266
|
+
return 1;
|
|
39267
|
+
return 0;
|
|
39268
|
+
}
|
|
39269
|
+
add(cost) {
|
|
39270
|
+
this.network += cost.network;
|
|
39271
|
+
return this;
|
|
39272
|
+
}
|
|
39273
|
+
toString() {
|
|
39274
|
+
return `${this.network}ms`;
|
|
39275
|
+
}
|
|
39276
|
+
};
|
|
39277
|
+
function GroupId(id3) {
|
|
39278
|
+
return id3;
|
|
39279
|
+
}
|
|
39280
|
+
var Group = class {
|
|
39281
|
+
constructor(id3, relational) {
|
|
39282
|
+
this.id = id3;
|
|
39283
|
+
this.relational = relational;
|
|
39284
|
+
__publicField(this, 'nodes', []);
|
|
39285
|
+
__publicField(this, 'winners', /* @__PURE__ */ new Map());
|
|
39286
|
+
}
|
|
39287
|
+
/**
|
|
39288
|
+
* Adds a node to the group. Throws an error if the node is already in a
|
|
39289
|
+
* group.
|
|
39290
|
+
*/
|
|
39291
|
+
addNode(node) {
|
|
39292
|
+
this.nodes.push(node);
|
|
39293
|
+
node.setGroup(this);
|
|
39294
|
+
}
|
|
39295
|
+
/**
|
|
39296
|
+
* Returns the winner for the given required physical props. The winner
|
|
39297
|
+
* stores the best node and its cost. This is used to find the best node in
|
|
39298
|
+
* the group.
|
|
39299
|
+
*/
|
|
39300
|
+
getWinner(required) {
|
|
39301
|
+
const hash2 = required.getHash();
|
|
39302
|
+
const existing = this.winners.get(hash2);
|
|
39303
|
+
if (existing)
|
|
39304
|
+
return existing;
|
|
39305
|
+
const winner = new Winner();
|
|
39306
|
+
this.winners.set(hash2, winner);
|
|
39307
|
+
return winner;
|
|
39308
|
+
}
|
|
39309
|
+
/**
|
|
39310
|
+
* Returns the optimized version of the node. The optimized version is the
|
|
39311
|
+
* node with the lowest cost with all children replaced with their optimized
|
|
39312
|
+
* versions. This is used to create the final optimized query plan.
|
|
39313
|
+
*/
|
|
39314
|
+
getOptimized(required) {
|
|
39315
|
+
const winner = this.getWinner(required);
|
|
39316
|
+
assert(winner.node, 'Group not optimized');
|
|
39317
|
+
const optimizer = winner.node.getOptimized(required);
|
|
39318
|
+
optimizer.setGroup(this);
|
|
39319
|
+
return optimizer;
|
|
39320
|
+
}
|
|
39321
|
+
};
|
|
39322
|
+
var Winner = class {
|
|
39323
|
+
constructor() {
|
|
39324
|
+
__publicField(this, 'node');
|
|
39325
|
+
__publicField(this, 'cost', new Cost(Infinity));
|
|
39326
|
+
__publicField(this, 'nodes', []);
|
|
39327
|
+
}
|
|
39328
|
+
update(node, cost) {
|
|
39329
|
+
this.nodes.push(node);
|
|
39330
|
+
if (Cost.compare(cost, this.cost) < 0) {
|
|
39331
|
+
this.node = node;
|
|
39332
|
+
this.cost = cost;
|
|
39333
|
+
}
|
|
39334
|
+
}
|
|
39335
|
+
};
|
|
39336
|
+
function evaluateSync(generator) {
|
|
39337
|
+
const state2 = generator.next();
|
|
39338
|
+
assert(state2.done, 'Generator must not yield');
|
|
39339
|
+
return state2.value;
|
|
39340
|
+
}
|
|
39341
|
+
async function evaluateAsync(generator, state2 = generator.next()) {
|
|
39342
|
+
while (!state2.done) {
|
|
39343
|
+
const value = await state2.value;
|
|
39344
|
+
state2 = generator.next(value);
|
|
39345
|
+
}
|
|
39346
|
+
return state2.value;
|
|
39347
|
+
}
|
|
39348
|
+
function* evaluateObject(values) {
|
|
39349
|
+
const result = {};
|
|
39350
|
+
const keys3 = Object.keys(values);
|
|
39351
|
+
const promises = [];
|
|
39352
|
+
for (const key7 of keys3) {
|
|
39353
|
+
const generator = values[key7];
|
|
39354
|
+
if (isGenerator2(generator)) {
|
|
39355
|
+
const state2 = generator.next();
|
|
39356
|
+
if (state2.done) {
|
|
39357
|
+
result[key7] = state2.value;
|
|
39358
|
+
}
|
|
39359
|
+
else {
|
|
39360
|
+
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
39361
|
+
result[key7] = value;
|
|
39362
|
+
}));
|
|
39363
|
+
}
|
|
39364
|
+
}
|
|
39365
|
+
else {
|
|
39366
|
+
result[key7] = generator;
|
|
39367
|
+
}
|
|
39368
|
+
}
|
|
39369
|
+
if (promises.length > 0) {
|
|
39370
|
+
yield Promise.all(promises);
|
|
39371
|
+
}
|
|
39372
|
+
return result;
|
|
39373
|
+
}
|
|
39374
|
+
function* evaluateArray(values) {
|
|
39375
|
+
const result = [];
|
|
39376
|
+
const keys3 = values.keys();
|
|
39377
|
+
const promises = [];
|
|
39378
|
+
for (const key7 of keys3) {
|
|
39379
|
+
const generator = values[key7];
|
|
39380
|
+
if (isGenerator2(generator)) {
|
|
39381
|
+
const state2 = generator.next();
|
|
39382
|
+
if (state2.done) {
|
|
39383
|
+
result[key7] = state2.value;
|
|
39384
|
+
}
|
|
39385
|
+
else {
|
|
39386
|
+
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
39387
|
+
result[key7] = value;
|
|
39388
|
+
}));
|
|
39389
|
+
}
|
|
39390
|
+
}
|
|
39391
|
+
else {
|
|
39392
|
+
result[key7] = generator;
|
|
39393
|
+
}
|
|
39394
|
+
}
|
|
39395
|
+
if (promises.length > 0) {
|
|
39396
|
+
yield Promise.all(promises);
|
|
39397
|
+
}
|
|
39398
|
+
return result;
|
|
39399
|
+
}
|
|
39400
|
+
var AbstractNode = class {
|
|
39401
|
+
constructor(isSynchronous) {
|
|
39402
|
+
this.isSynchronous = isSynchronous;
|
|
39403
|
+
}
|
|
39404
|
+
};
|
|
39405
|
+
var RelationalNode = class extends AbstractNode {
|
|
39406
|
+
constructor() {
|
|
39407
|
+
super(...arguments);
|
|
39408
|
+
__publicField(this, 'group');
|
|
39409
|
+
}
|
|
39410
|
+
/**
|
|
39411
|
+
* Returns the group that the node belongs to. Throws an error if the node
|
|
39412
|
+
* is not in a group. This should only happen in the constructor because
|
|
39413
|
+
* every node is added to a group right after creation.
|
|
39414
|
+
*/
|
|
39415
|
+
getGroup() {
|
|
39416
|
+
assert(this.group, 'Node must be in a group');
|
|
39417
|
+
return this.group;
|
|
39418
|
+
}
|
|
39419
|
+
/**
|
|
39420
|
+
* Adds the node to the given group. Throws an error if the node is already
|
|
39421
|
+
* in a group.
|
|
39422
|
+
*/
|
|
39423
|
+
setGroup(group) {
|
|
39424
|
+
assert(!this.group, 'Node is already in a group');
|
|
39425
|
+
this.group = group;
|
|
39426
|
+
}
|
|
39427
|
+
/**
|
|
39428
|
+
* Evaluates the node and all children synchronously. Throws an error if the
|
|
39429
|
+
* node is not synchronous.
|
|
39430
|
+
*/
|
|
39431
|
+
evaluateSync() {
|
|
39432
|
+
const generator = this.evaluate(void 0);
|
|
39433
|
+
return evaluateSync(generator);
|
|
39434
|
+
}
|
|
39435
|
+
/**
|
|
39436
|
+
* Evaluates the node and all children asynchronously.
|
|
39437
|
+
*/
|
|
39438
|
+
evaluateAsync() {
|
|
39439
|
+
const generator = this.evaluate(void 0);
|
|
39440
|
+
return evaluateAsync(generator);
|
|
39441
|
+
}
|
|
39442
|
+
};
|
|
38982
39443
|
function Hash(value) {
|
|
38983
39444
|
return value;
|
|
38984
39445
|
}
|
|
@@ -38987,6 +39448,16 @@ function isHashable(value) {
|
|
|
38987
39448
|
}
|
|
38988
39449
|
function calculateHash(name, ...values) {
|
|
38989
39450
|
const hashes = values.map((value) => {
|
|
39451
|
+
const isCollectionMetadata = value instanceof CollectionMetadata;
|
|
39452
|
+
assert(!isCollectionMetadata, 'Pass CollectionMetadata.id instead');
|
|
39453
|
+
const isFieldMetadata = value instanceof FieldMetadata;
|
|
39454
|
+
assert(!isFieldMetadata, 'Pass FieldMetadata.id instead');
|
|
39455
|
+
const isIndexMetadata = value instanceof IndexMetadata;
|
|
39456
|
+
assert(!isIndexMetadata, 'Pass IndexMetadata.id instead');
|
|
39457
|
+
const isRelationalNode = value instanceof RelationalNode;
|
|
39458
|
+
assert(!isRelationalNode, 'Pass RelationalNode.group.id instead');
|
|
39459
|
+
const isGroup = value instanceof Group;
|
|
39460
|
+
assert(!isGroup, 'Pass Group.id instead');
|
|
38990
39461
|
if (isHashable(value)) {
|
|
38991
39462
|
return value.getHash();
|
|
38992
39463
|
}
|
|
@@ -39111,106 +39582,6 @@ var Fields = class extends Metadata {
|
|
|
39111
39582
|
__publicField(this, 'name', 'Fields');
|
|
39112
39583
|
}
|
|
39113
39584
|
};
|
|
39114
|
-
function getNetworkLatency() {
|
|
39115
|
-
return 25;
|
|
39116
|
-
}
|
|
39117
|
-
function getNetworkSpeed() {
|
|
39118
|
-
return 100 * 125;
|
|
39119
|
-
}
|
|
39120
|
-
var KB = 1e3;
|
|
39121
|
-
var Cost = class {
|
|
39122
|
-
constructor(network) {
|
|
39123
|
-
this.network = network;
|
|
39124
|
-
}
|
|
39125
|
-
static estimate(totalRequests, transferredBytes) {
|
|
39126
|
-
const latency = getNetworkLatency();
|
|
39127
|
-
const speed = getNetworkSpeed();
|
|
39128
|
-
const network = totalRequests * latency + transferredBytes / speed;
|
|
39129
|
-
return new Cost(network);
|
|
39130
|
-
}
|
|
39131
|
-
static max(left, right) {
|
|
39132
|
-
const network = Math.max(left.network, right.network);
|
|
39133
|
-
return new Cost(network);
|
|
39134
|
-
}
|
|
39135
|
-
static compare(left, right) {
|
|
39136
|
-
if (left.network < right.network)
|
|
39137
|
-
return -1;
|
|
39138
|
-
if (left.network > right.network)
|
|
39139
|
-
return 1;
|
|
39140
|
-
return 0;
|
|
39141
|
-
}
|
|
39142
|
-
add(cost) {
|
|
39143
|
-
this.network += cost.network;
|
|
39144
|
-
return this;
|
|
39145
|
-
}
|
|
39146
|
-
toString() {
|
|
39147
|
-
return `${this.network}ms`;
|
|
39148
|
-
}
|
|
39149
|
-
};
|
|
39150
|
-
function evaluateSync(generator) {
|
|
39151
|
-
const state2 = generator.next();
|
|
39152
|
-
assert(state2.done, 'Generator must not yield');
|
|
39153
|
-
return state2.value;
|
|
39154
|
-
}
|
|
39155
|
-
async function evaluateAsync(generator, state2 = generator.next()) {
|
|
39156
|
-
while (!state2.done) {
|
|
39157
|
-
const value = await state2.value;
|
|
39158
|
-
state2 = generator.next(value);
|
|
39159
|
-
}
|
|
39160
|
-
return state2.value;
|
|
39161
|
-
}
|
|
39162
|
-
function* evaluateObject(values) {
|
|
39163
|
-
const result = {};
|
|
39164
|
-
const keys3 = Object.keys(values);
|
|
39165
|
-
const promises = [];
|
|
39166
|
-
for (const key7 of keys3) {
|
|
39167
|
-
const generator = values[key7];
|
|
39168
|
-
if (isGenerator2(generator)) {
|
|
39169
|
-
const state2 = generator.next();
|
|
39170
|
-
if (state2.done) {
|
|
39171
|
-
result[key7] = state2.value;
|
|
39172
|
-
}
|
|
39173
|
-
else {
|
|
39174
|
-
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
39175
|
-
result[key7] = value;
|
|
39176
|
-
}));
|
|
39177
|
-
}
|
|
39178
|
-
}
|
|
39179
|
-
else {
|
|
39180
|
-
result[key7] = generator;
|
|
39181
|
-
}
|
|
39182
|
-
}
|
|
39183
|
-
if (promises.length > 0) {
|
|
39184
|
-
yield Promise.all(promises);
|
|
39185
|
-
}
|
|
39186
|
-
return result;
|
|
39187
|
-
}
|
|
39188
|
-
function* evaluateArray(values) {
|
|
39189
|
-
const result = [];
|
|
39190
|
-
const keys3 = values.keys();
|
|
39191
|
-
const promises = [];
|
|
39192
|
-
for (const key7 of keys3) {
|
|
39193
|
-
const generator = values[key7];
|
|
39194
|
-
if (isGenerator2(generator)) {
|
|
39195
|
-
const state2 = generator.next();
|
|
39196
|
-
if (state2.done) {
|
|
39197
|
-
result[key7] = state2.value;
|
|
39198
|
-
}
|
|
39199
|
-
else {
|
|
39200
|
-
promises.push(evaluateAsync(generator, state2).then((value) => {
|
|
39201
|
-
result[key7] = value;
|
|
39202
|
-
}));
|
|
39203
|
-
}
|
|
39204
|
-
}
|
|
39205
|
-
else {
|
|
39206
|
-
result[key7] = generator;
|
|
39207
|
-
}
|
|
39208
|
-
}
|
|
39209
|
-
if (promises.length > 0) {
|
|
39210
|
-
yield Promise.all(promises);
|
|
39211
|
-
}
|
|
39212
|
-
return result;
|
|
39213
|
-
}
|
|
39214
39585
|
var RequiredProps = class {
|
|
39215
39586
|
constructor(ordering, resolvedFields) {
|
|
39216
39587
|
this.ordering = ordering;
|
|
@@ -39263,8 +39634,11 @@ var Tuple = class {
|
|
|
39263
39634
|
__publicField(this, 'values', /* @__PURE__ */ new Map());
|
|
39264
39635
|
}
|
|
39265
39636
|
getKey() {
|
|
39266
|
-
const
|
|
39267
|
-
|
|
39637
|
+
const result = [];
|
|
39638
|
+
for (const [collection, pointer,] of this.pointers) {
|
|
39639
|
+
result.push(`${collection.id}-${pointer}`);
|
|
39640
|
+
}
|
|
39641
|
+
return result.sort().join('-');
|
|
39268
39642
|
}
|
|
39269
39643
|
addValue(field, value) {
|
|
39270
39644
|
this.values.set(field, value);
|
|
@@ -39361,49 +39735,6 @@ var Relation = class {
|
|
|
39361
39735
|
return result;
|
|
39362
39736
|
}
|
|
39363
39737
|
};
|
|
39364
|
-
var AbstractNode = class {
|
|
39365
|
-
constructor(isSynchronous) {
|
|
39366
|
-
this.isSynchronous = isSynchronous;
|
|
39367
|
-
}
|
|
39368
|
-
};
|
|
39369
|
-
var RelationalNode = class extends AbstractNode {
|
|
39370
|
-
constructor() {
|
|
39371
|
-
super(...arguments);
|
|
39372
|
-
__publicField(this, 'group');
|
|
39373
|
-
}
|
|
39374
|
-
/**
|
|
39375
|
-
* Returns the group that the node belongs to. Throws an error if the node
|
|
39376
|
-
* is not in a group. This should only happen in the constructor because
|
|
39377
|
-
* every node is added to a group right after creation.
|
|
39378
|
-
*/
|
|
39379
|
-
getGroup() {
|
|
39380
|
-
assert(this.group, 'Node must be in a group');
|
|
39381
|
-
return this.group;
|
|
39382
|
-
}
|
|
39383
|
-
/**
|
|
39384
|
-
* Adds the node to the given group. Throws an error if the node is already
|
|
39385
|
-
* in a group.
|
|
39386
|
-
*/
|
|
39387
|
-
setGroup(group) {
|
|
39388
|
-
assert(!this.group, 'Node is already in a group');
|
|
39389
|
-
this.group = group;
|
|
39390
|
-
}
|
|
39391
|
-
/**
|
|
39392
|
-
* Evaluates the node and all children synchronously. Throws an error if the
|
|
39393
|
-
* node is not synchronous.
|
|
39394
|
-
*/
|
|
39395
|
-
evaluateSync() {
|
|
39396
|
-
const generator = this.evaluate(void 0);
|
|
39397
|
-
return evaluateSync(generator);
|
|
39398
|
-
}
|
|
39399
|
-
/**
|
|
39400
|
-
* Evaluates the node and all children asynchronously.
|
|
39401
|
-
*/
|
|
39402
|
-
evaluateAsync() {
|
|
39403
|
-
const generator = this.evaluate(void 0);
|
|
39404
|
-
return evaluateAsync(generator);
|
|
39405
|
-
}
|
|
39406
|
-
};
|
|
39407
39738
|
var ProjectionField = class {
|
|
39408
39739
|
constructor(input, field) {
|
|
39409
39740
|
this.input = input;
|
|
@@ -39436,7 +39767,16 @@ var RelationalProject = class extends RelationalNode {
|
|
|
39436
39767
|
}
|
|
39437
39768
|
return fields;
|
|
39438
39769
|
}
|
|
39439
|
-
canProvideOrdering() {
|
|
39770
|
+
canProvideOrdering(ordering) {
|
|
39771
|
+
const projectionFields = new Fields();
|
|
39772
|
+
for (const projection of this.projections) {
|
|
39773
|
+
projectionFields.add(projection.field);
|
|
39774
|
+
}
|
|
39775
|
+
for (const { field, } of ordering.fields) {
|
|
39776
|
+
if (projectionFields.has(field)) {
|
|
39777
|
+
return false;
|
|
39778
|
+
}
|
|
39779
|
+
}
|
|
39440
39780
|
return true;
|
|
39441
39781
|
}
|
|
39442
39782
|
canProvideResolvedFields() {
|
|
@@ -40489,21 +40829,19 @@ var RelationalLeftJoin = class extends RelationalNode {
|
|
|
40489
40829
|
return new RelationalLeftJoin(left, right, constraint);
|
|
40490
40830
|
}
|
|
40491
40831
|
/** Optimized path for equality constraints that runs in O(n + m) time. */
|
|
40492
|
-
*evaluateScalarEquals(
|
|
40493
|
-
const { left, right, } = yield* evaluateObject({
|
|
40494
|
-
left: this.left.evaluate(context),
|
|
40495
|
-
right: this.right.evaluate(context),
|
|
40496
|
-
});
|
|
40832
|
+
*evaluateScalarEquals(left, right, leftConstraint, rightConstraint, context) {
|
|
40497
40833
|
const joinKeyMap = /* @__PURE__ */ new Map();
|
|
40498
40834
|
for (const rightTuple of right.tuples) {
|
|
40499
|
-
const rightValue = yield*
|
|
40835
|
+
const rightValue = yield* rightConstraint.evaluate(context, rightTuple);
|
|
40500
40836
|
const key7 = JSON.stringify((rightValue == null ? void 0 : rightValue.value) ?? null);
|
|
40501
40837
|
const tuplesForKey = joinKeyMap.get(key7) ?? [];
|
|
40502
40838
|
tuplesForKey.push(rightTuple);
|
|
40503
40839
|
joinKeyMap.set(key7, tuplesForKey);
|
|
40504
40840
|
}
|
|
40841
|
+
const outputFields = this.getOutputFields();
|
|
40842
|
+
const result = new Relation(outputFields);
|
|
40505
40843
|
for (const leftTuple of left.tuples) {
|
|
40506
|
-
const leftValue = yield*
|
|
40844
|
+
const leftValue = yield* leftConstraint.evaluate(context, leftTuple);
|
|
40507
40845
|
const key7 = JSON.stringify((leftValue == null ? void 0 : leftValue.value) ?? null);
|
|
40508
40846
|
const matches = joinKeyMap.get(key7) ?? [];
|
|
40509
40847
|
if (matches.length === 0) {
|
|
@@ -40521,16 +40859,22 @@ var RelationalLeftJoin = class extends RelationalNode {
|
|
|
40521
40859
|
return result;
|
|
40522
40860
|
}
|
|
40523
40861
|
*evaluate(context) {
|
|
40524
|
-
const outputFields = this.getOutputFields();
|
|
40525
|
-
const result = new Relation(outputFields);
|
|
40526
|
-
if (this.constraint instanceof ScalarEquals) {
|
|
40527
|
-
yield* this.evaluateScalarEquals(result.tuples, this.constraint, context);
|
|
40528
|
-
return result;
|
|
40529
|
-
}
|
|
40530
40862
|
const { left, right, } = yield* evaluateObject({
|
|
40531
40863
|
left: this.left.evaluate(context),
|
|
40532
40864
|
right: this.right.evaluate(context),
|
|
40533
40865
|
});
|
|
40866
|
+
if (this.constraint instanceof ScalarEquals) {
|
|
40867
|
+
if (this.constraint.left.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40868
|
+
this.constraint.right.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40869
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.left, this.constraint.right, context);
|
|
40870
|
+
}
|
|
40871
|
+
if (this.constraint.right.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40872
|
+
this.constraint.left.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40873
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.right, this.constraint.left, context);
|
|
40874
|
+
}
|
|
40875
|
+
}
|
|
40876
|
+
const outputFields = this.getOutputFields();
|
|
40877
|
+
const result = new Relation(outputFields);
|
|
40534
40878
|
for (const leftTuple of left.tuples) {
|
|
40535
40879
|
let hasMatch = false;
|
|
40536
40880
|
for (const rightTuple of right.tuples) {
|
|
@@ -40607,21 +40951,19 @@ var RelationalRightJoin = class extends RelationalNode {
|
|
|
40607
40951
|
return new RelationalRightJoin(left, right, constraint);
|
|
40608
40952
|
}
|
|
40609
40953
|
/** Optimized path for equality constraints that runs in O(n + m) time. */
|
|
40610
|
-
*evaluateScalarEquals(
|
|
40611
|
-
const { left, right, } = yield* evaluateObject({
|
|
40612
|
-
left: this.left.evaluate(context),
|
|
40613
|
-
right: this.right.evaluate(context),
|
|
40614
|
-
});
|
|
40954
|
+
*evaluateScalarEquals(left, right, leftConstraint, rightConstraint, context) {
|
|
40615
40955
|
const joinKeyMap = /* @__PURE__ */ new Map();
|
|
40616
40956
|
for (const leftTuple of left.tuples) {
|
|
40617
|
-
const leftValue = yield*
|
|
40957
|
+
const leftValue = yield* leftConstraint.evaluate(context, leftTuple);
|
|
40618
40958
|
const key7 = JSON.stringify((leftValue == null ? void 0 : leftValue.value) ?? null);
|
|
40619
40959
|
const tuplesForKey = joinKeyMap.get(key7) ?? [];
|
|
40620
40960
|
tuplesForKey.push(leftTuple);
|
|
40621
40961
|
joinKeyMap.set(key7, tuplesForKey);
|
|
40622
40962
|
}
|
|
40963
|
+
const outputFields = this.getOutputFields();
|
|
40964
|
+
const result = new Relation(outputFields);
|
|
40623
40965
|
for (const rightTuple of right.tuples) {
|
|
40624
|
-
const rightValue = yield*
|
|
40966
|
+
const rightValue = yield* rightConstraint.evaluate(context, rightTuple);
|
|
40625
40967
|
const key7 = JSON.stringify((rightValue == null ? void 0 : rightValue.value) ?? null);
|
|
40626
40968
|
const matches = joinKeyMap.get(key7) ?? [];
|
|
40627
40969
|
if (matches.length === 0) {
|
|
@@ -40639,16 +40981,22 @@ var RelationalRightJoin = class extends RelationalNode {
|
|
|
40639
40981
|
return result;
|
|
40640
40982
|
}
|
|
40641
40983
|
*evaluate(context) {
|
|
40642
|
-
const outputFields = this.getOutputFields();
|
|
40643
|
-
const result = new Relation(outputFields);
|
|
40644
|
-
if (this.constraint instanceof ScalarEquals) {
|
|
40645
|
-
yield* this.evaluateScalarEquals(result.tuples, this.constraint, context);
|
|
40646
|
-
return result;
|
|
40647
|
-
}
|
|
40648
40984
|
const { left, right, } = yield* evaluateObject({
|
|
40649
40985
|
left: this.left.evaluate(context),
|
|
40650
40986
|
right: this.right.evaluate(context),
|
|
40651
40987
|
});
|
|
40988
|
+
if (this.constraint instanceof ScalarEquals) {
|
|
40989
|
+
if (this.constraint.left.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40990
|
+
this.constraint.right.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40991
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.left, this.constraint.right, context);
|
|
40992
|
+
}
|
|
40993
|
+
if (this.constraint.right.referencedFields.subsetOf(this.leftGroup.relational.outputFields) &&
|
|
40994
|
+
this.constraint.left.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) {
|
|
40995
|
+
return yield* this.evaluateScalarEquals(left, right, this.constraint.right, this.constraint.left, context);
|
|
40996
|
+
}
|
|
40997
|
+
}
|
|
40998
|
+
const outputFields = this.getOutputFields();
|
|
40999
|
+
const result = new Relation(outputFields);
|
|
40652
41000
|
for (const rightTuple of right.tuples) {
|
|
40653
41001
|
let hasMatch = false;
|
|
40654
41002
|
for (const leftTuple of left.tuples) {
|
|
@@ -41246,7 +41594,7 @@ var Explorer = class {
|
|
|
41246
41594
|
explore(before) {
|
|
41247
41595
|
const group = before.getGroup();
|
|
41248
41596
|
if (before instanceof RelationalLeftJoin) {
|
|
41249
|
-
const after = new RelationalRightJoin(before.
|
|
41597
|
+
const after = new RelationalRightJoin(before.right, before.left, before.constraint);
|
|
41250
41598
|
this.memo.addRelational(after, group);
|
|
41251
41599
|
}
|
|
41252
41600
|
if (before instanceof RelationalFilter) {
|
|
@@ -41383,63 +41731,6 @@ function createIndexQueryAll(length) {
|
|
|
41383
41731
|
};
|
|
41384
41732
|
return new Array(length).fill(lookup);
|
|
41385
41733
|
}
|
|
41386
|
-
function GroupId(id3) {
|
|
41387
|
-
return id3;
|
|
41388
|
-
}
|
|
41389
|
-
var Group = class {
|
|
41390
|
-
constructor(id3, relational) {
|
|
41391
|
-
this.id = id3;
|
|
41392
|
-
this.relational = relational;
|
|
41393
|
-
__publicField(this, 'nodes', []);
|
|
41394
|
-
__publicField(this, 'winners', /* @__PURE__ */ new Map());
|
|
41395
|
-
}
|
|
41396
|
-
/**
|
|
41397
|
-
* Adds a node to the group. Throws an error if the node is already in a
|
|
41398
|
-
* group.
|
|
41399
|
-
*/
|
|
41400
|
-
addNode(node) {
|
|
41401
|
-
this.nodes.push(node);
|
|
41402
|
-
node.setGroup(this);
|
|
41403
|
-
}
|
|
41404
|
-
/**
|
|
41405
|
-
* Returns the winner for the given required physical props. The winner
|
|
41406
|
-
* stores the best node and its cost. This is used to find the best node in
|
|
41407
|
-
* the group.
|
|
41408
|
-
*/
|
|
41409
|
-
getWinner(required) {
|
|
41410
|
-
const hash2 = required.getHash();
|
|
41411
|
-
const existing = this.winners.get(hash2);
|
|
41412
|
-
if (existing)
|
|
41413
|
-
return existing;
|
|
41414
|
-
const winner = new Winner();
|
|
41415
|
-
this.winners.set(hash2, winner);
|
|
41416
|
-
return winner;
|
|
41417
|
-
}
|
|
41418
|
-
/**
|
|
41419
|
-
* Returns the optimized version of the node. The optimized version is the
|
|
41420
|
-
* node with the lowest cost with all children replaced with their optimized
|
|
41421
|
-
* versions. This is used to create the final optimized query plan.
|
|
41422
|
-
*/
|
|
41423
|
-
getOptimized(required) {
|
|
41424
|
-
const winner = this.getWinner(required);
|
|
41425
|
-
assert(winner.node, 'Group not optimized');
|
|
41426
|
-
const optimizer = winner.node.getOptimized(required);
|
|
41427
|
-
optimizer.setGroup(this);
|
|
41428
|
-
return optimizer;
|
|
41429
|
-
}
|
|
41430
|
-
};
|
|
41431
|
-
var Winner = class {
|
|
41432
|
-
constructor() {
|
|
41433
|
-
__publicField(this, 'node');
|
|
41434
|
-
__publicField(this, 'cost', new Cost(Infinity));
|
|
41435
|
-
}
|
|
41436
|
-
update(node, cost) {
|
|
41437
|
-
if (Cost.compare(cost, this.cost) < 0) {
|
|
41438
|
-
this.node = node;
|
|
41439
|
-
this.cost = cost;
|
|
41440
|
-
}
|
|
41441
|
-
}
|
|
41442
|
-
};
|
|
41443
41734
|
var RelationalProps = class {
|
|
41444
41735
|
constructor(outputFields) {
|
|
41445
41736
|
this.outputFields = outputFields;
|
|
@@ -41606,9 +41897,11 @@ var EnforcerSort = class extends EnforcerNode {
|
|
|
41606
41897
|
getInputRequiredProps(required) {
|
|
41607
41898
|
const resolvedFields = new Fields(required.resolvedFields);
|
|
41608
41899
|
for (const { field, } of this.ordering.fields) {
|
|
41609
|
-
if (field.name
|
|
41610
|
-
|
|
41611
|
-
|
|
41900
|
+
if (field.name === VIRTUAL_INDEX_FIELD)
|
|
41901
|
+
continue;
|
|
41902
|
+
if (isUndefined(field.collection))
|
|
41903
|
+
continue;
|
|
41904
|
+
resolvedFields.add(field);
|
|
41612
41905
|
}
|
|
41613
41906
|
const ordering = new Ordering();
|
|
41614
41907
|
return new RequiredProps(ordering, resolvedFields);
|
|
@@ -41799,6 +42092,8 @@ var ScalarArray = class extends ScalarNode {
|
|
|
41799
42092
|
const resolvedFields = new Fields();
|
|
41800
42093
|
const fields = Object.values(this.namedFields);
|
|
41801
42094
|
for (const field of fields) {
|
|
42095
|
+
if (isUndefined(field.collection))
|
|
42096
|
+
continue;
|
|
41802
42097
|
resolvedFields.add(field);
|
|
41803
42098
|
}
|
|
41804
42099
|
return new RequiredProps(this.ordering, resolvedFields);
|
|
@@ -41885,7 +42180,9 @@ var ScalarFlatArray = class extends ScalarNode {
|
|
|
41885
42180
|
}
|
|
41886
42181
|
getInputRequiredProps() {
|
|
41887
42182
|
const resolvedFields = new Fields();
|
|
41888
|
-
|
|
42183
|
+
if (!isUndefined(this.field.collection)) {
|
|
42184
|
+
resolvedFields.add(this.field);
|
|
42185
|
+
}
|
|
41889
42186
|
return new RequiredProps(this.ordering, resolvedFields);
|
|
41890
42187
|
}
|
|
41891
42188
|
optimize(optimizer) {
|
|
@@ -41913,7 +42210,7 @@ var ScalarFlatArray = class extends ScalarNode {
|
|
|
41913
42210
|
};
|
|
41914
42211
|
}
|
|
41915
42212
|
};
|
|
41916
|
-
var
|
|
42213
|
+
var collation8 = {
|
|
41917
42214
|
type: 0,
|
|
41918
42215
|
/* CaseInsensitive */
|
|
41919
42216
|
};
|
|
@@ -41957,11 +42254,11 @@ var ScalarIn = class extends ScalarNode {
|
|
|
41957
42254
|
});
|
|
41958
42255
|
return {
|
|
41959
42256
|
type: 'boolean',
|
|
41960
|
-
value: DatabaseValue.in(left, right,
|
|
42257
|
+
value: DatabaseValue.in(left, right, collation8),
|
|
41961
42258
|
};
|
|
41962
42259
|
}
|
|
41963
42260
|
};
|
|
41964
|
-
var
|
|
42261
|
+
var collation9 = {
|
|
41965
42262
|
type: 1,
|
|
41966
42263
|
/* CaseSensitive */
|
|
41967
42264
|
};
|
|
@@ -42005,7 +42302,7 @@ var ScalarIndexOf = class extends ScalarNode {
|
|
|
42005
42302
|
});
|
|
42006
42303
|
return {
|
|
42007
42304
|
type: 'number',
|
|
42008
|
-
value: DatabaseValue.indexOf(source, target,
|
|
42305
|
+
value: DatabaseValue.indexOf(source, target, collation9),
|
|
42009
42306
|
};
|
|
42010
42307
|
}
|
|
42011
42308
|
};
|
|
@@ -42069,7 +42366,7 @@ var ScalarNot = class extends ScalarNode {
|
|
|
42069
42366
|
};
|
|
42070
42367
|
}
|
|
42071
42368
|
};
|
|
42072
|
-
var
|
|
42369
|
+
var collation10 = {
|
|
42073
42370
|
type: 0,
|
|
42074
42371
|
/* CaseInsensitive */
|
|
42075
42372
|
};
|
|
@@ -42113,7 +42410,7 @@ var ScalarNotIn = class extends ScalarNode {
|
|
|
42113
42410
|
});
|
|
42114
42411
|
return {
|
|
42115
42412
|
type: 'boolean',
|
|
42116
|
-
value: !DatabaseValue.in(left, right,
|
|
42413
|
+
value: !DatabaseValue.in(left, right, collation10),
|
|
42117
42414
|
};
|
|
42118
42415
|
}
|
|
42119
42416
|
};
|
|
@@ -42491,6 +42788,11 @@ var Optimizer = class {
|
|
|
42491
42788
|
this.explorer.explore(node);
|
|
42492
42789
|
}
|
|
42493
42790
|
}
|
|
42791
|
+
if (false) {
|
|
42792
|
+
assert(winner.node, 'Group not optimized');
|
|
42793
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
42794
|
+
winner.node = new RelationalAssert(winner.node, required, cache2);
|
|
42795
|
+
}
|
|
42494
42796
|
return winner.cost;
|
|
42495
42797
|
}
|
|
42496
42798
|
createEnforcer(winner, node, required) {
|
|
@@ -42768,7 +43070,7 @@ var AnimationCollector = class {
|
|
|
42768
43070
|
_variantHashes = /* @__PURE__ */ new WeakMap();
|
|
42769
43071
|
var framerAppearEffects = /* @__PURE__ */ new AnimationCollector();
|
|
42770
43072
|
exports.framerAppearEffects = framerAppearEffects;
|
|
42771
|
-
function withOptimizedAppearEffect(
|
|
43073
|
+
function withOptimizedAppearEffect(Component18) {
|
|
42772
43074
|
return react_11.default.forwardRef(({ optimized, ...props }, ref) => {
|
|
42773
43075
|
const generatedComponentContext = react_11.default.useContext(GeneratedComponentContext);
|
|
42774
43076
|
const variants = react_11.default.useContext(SSRParentVariantsContext);
|
|
@@ -42782,7 +43084,7 @@ function withOptimizedAppearEffect(Component16) {
|
|
|
42782
43084
|
// should not be optimized.
|
|
42783
43085
|
optimized ? props : null, generatedComponentContext);
|
|
42784
43086
|
}
|
|
42785
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
43087
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
42786
43088
|
ref,
|
|
42787
43089
|
...props,
|
|
42788
43090
|
});
|
|
@@ -42907,7 +43209,9 @@ function activeBreakpointHashFromWindow(breakpoints) {
|
|
|
42907
43209
|
}
|
|
42908
43210
|
function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitial = true) {
|
|
42909
43211
|
const isInitialNavigation = (0, react_2.useContext)(IsInitialNavigationContext);
|
|
42910
|
-
const
|
|
43212
|
+
const onCanvas = useIsOnFramerCanvas();
|
|
43213
|
+
const usesMediaQueries = !onCanvas && isBrowser2();
|
|
43214
|
+
const baseVariant = (0, react_5.useRef)(usesMediaQueries ? activeMediaQueryFromWindow(mediaQueries) ?? initial : initial);
|
|
42911
43215
|
const basePropsVariant = (0, react_5.useRef)(hydratedWithInitial && isInitialNavigation ? initial : baseVariant.current);
|
|
42912
43216
|
const forceUpdate = useForceUpdate3();
|
|
42913
43217
|
const instantTransition = useInstantTransition();
|
|
@@ -42975,8 +43279,8 @@ function removeHiddenBreakpointLayersV2(breakpoints) {
|
|
|
42975
43279
|
(_a = hiddenLayer.parentNode) == null ? void 0 : _a.removeChild(hiddenLayer);
|
|
42976
43280
|
}
|
|
42977
43281
|
}
|
|
42978
|
-
const
|
|
42979
|
-
|
|
43282
|
+
const requestIdleCallback2 = safeWindow.requestIdleCallback ?? requestIdleCallbackFallback;
|
|
43283
|
+
requestIdleCallback2(() => {
|
|
42980
43284
|
var _a2;
|
|
42981
43285
|
(_a2 = document.querySelector(framerBreakpointCSSSelector)) == null ? void 0 : _a2.remove();
|
|
42982
43286
|
});
|
|
@@ -43349,49 +43653,49 @@ function usePrototypeNavigate({ preload, } = {}) {
|
|
|
43349
43653
|
navigation.goBack();
|
|
43350
43654
|
return false;
|
|
43351
43655
|
}
|
|
43352
|
-
const
|
|
43656
|
+
const Component18 = typeof target === 'string'
|
|
43353
43657
|
? await componentForRoute(getRoute == null ? void 0 : getRoute(target)).catch(() => { })
|
|
43354
43658
|
: react_11.default.isValidElement(target)
|
|
43355
43659
|
? target
|
|
43356
43660
|
: null;
|
|
43357
|
-
if (!
|
|
43661
|
+
if (!Component18)
|
|
43358
43662
|
return;
|
|
43359
43663
|
const { appearsFrom, backdropColor, animation, } = options;
|
|
43360
43664
|
const transitionType = options.transition || 'instant';
|
|
43361
43665
|
switch (transitionType) {
|
|
43362
43666
|
case 'instant':
|
|
43363
|
-
navigation.instant(
|
|
43667
|
+
navigation.instant(Component18);
|
|
43364
43668
|
break;
|
|
43365
43669
|
case 'fade':
|
|
43366
|
-
navigation.fade(
|
|
43670
|
+
navigation.fade(Component18, {
|
|
43367
43671
|
animation,
|
|
43368
43672
|
});
|
|
43369
43673
|
break;
|
|
43370
43674
|
case 'push':
|
|
43371
|
-
navigation.push(
|
|
43675
|
+
navigation.push(Component18, {
|
|
43372
43676
|
appearsFrom,
|
|
43373
43677
|
animation,
|
|
43374
43678
|
});
|
|
43375
43679
|
break;
|
|
43376
43680
|
case 'flip':
|
|
43377
|
-
navigation.flip(
|
|
43681
|
+
navigation.flip(Component18, {
|
|
43378
43682
|
appearsFrom,
|
|
43379
43683
|
animation,
|
|
43380
43684
|
});
|
|
43381
43685
|
break;
|
|
43382
43686
|
case 'magicMotion':
|
|
43383
|
-
navigation.magicMotion(
|
|
43687
|
+
navigation.magicMotion(Component18, {
|
|
43384
43688
|
animation,
|
|
43385
43689
|
});
|
|
43386
43690
|
break;
|
|
43387
43691
|
case 'modal':
|
|
43388
|
-
navigation.modal(
|
|
43692
|
+
navigation.modal(Component18, {
|
|
43389
43693
|
backdropColor,
|
|
43390
43694
|
animation,
|
|
43391
43695
|
});
|
|
43392
43696
|
break;
|
|
43393
43697
|
case 'overlay':
|
|
43394
|
-
navigation.overlay(
|
|
43698
|
+
navigation.overlay(Component18, {
|
|
43395
43699
|
appearsFrom,
|
|
43396
43700
|
backdropColor,
|
|
43397
43701
|
animation,
|
|
@@ -43765,6 +44069,71 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
|
|
|
43765
44069
|
variantClassNames,
|
|
43766
44070
|
]);
|
|
43767
44071
|
}
|
|
44072
|
+
function withCodeBoundaryForOverrides(Component18, { scopeId, nodeId, override, inComponentSlot, }) {
|
|
44073
|
+
if (!shouldEnableCodeBoundaries()) {
|
|
44074
|
+
return override(Component18);
|
|
44075
|
+
}
|
|
44076
|
+
const appliedOverride = tryToApplyOverride(Component18, override);
|
|
44077
|
+
let hasErrorBeenLogged = false;
|
|
44078
|
+
function CodeBoundaryForOverrides(props, ref) {
|
|
44079
|
+
const externalComponentNestingLevel = useExternalComponentNestingLevel();
|
|
44080
|
+
const shouldWrapWithBoundary = shouldWrapOverrideWithBoundary(externalComponentNestingLevel, inComponentSlot ?? false);
|
|
44081
|
+
if (shouldWrapWithBoundary) {
|
|
44082
|
+
if (appliedOverride.status === 'success') {
|
|
44083
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
|
|
44084
|
+
errorMessage: getErrorMessageForOverride(scopeId, nodeId),
|
|
44085
|
+
fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
44086
|
+
...props,
|
|
44087
|
+
ref,
|
|
44088
|
+
}),
|
|
44089
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(appliedOverride.Component, {
|
|
44090
|
+
...props,
|
|
44091
|
+
ref,
|
|
44092
|
+
}),
|
|
44093
|
+
});
|
|
44094
|
+
}
|
|
44095
|
+
else {
|
|
44096
|
+
if (!hasErrorBeenLogged) {
|
|
44097
|
+
logError(appliedOverride.error);
|
|
44098
|
+
logError(getErrorMessageForOverride(scopeId, nodeId));
|
|
44099
|
+
collectErrorToAnalytics(appliedOverride.error);
|
|
44100
|
+
hasErrorBeenLogged = true;
|
|
44101
|
+
}
|
|
44102
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
44103
|
+
...props,
|
|
44104
|
+
ref,
|
|
44105
|
+
});
|
|
44106
|
+
}
|
|
44107
|
+
}
|
|
44108
|
+
else {
|
|
44109
|
+
if (appliedOverride.status === 'success') {
|
|
44110
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(appliedOverride.Component, {
|
|
44111
|
+
...props,
|
|
44112
|
+
ref,
|
|
44113
|
+
});
|
|
44114
|
+
}
|
|
44115
|
+
else {
|
|
44116
|
+
throw appliedOverride.error;
|
|
44117
|
+
}
|
|
44118
|
+
}
|
|
44119
|
+
}
|
|
44120
|
+
return react_11.default.forwardRef(CodeBoundaryForOverrides);
|
|
44121
|
+
}
|
|
44122
|
+
function tryToApplyOverride(Component18, override) {
|
|
44123
|
+
try {
|
|
44124
|
+
const ComponentWithOverrides = override(Component18);
|
|
44125
|
+
return {
|
|
44126
|
+
status: 'success',
|
|
44127
|
+
Component: ComponentWithOverrides,
|
|
44128
|
+
};
|
|
44129
|
+
}
|
|
44130
|
+
catch (error) {
|
|
44131
|
+
return {
|
|
44132
|
+
status: 'error',
|
|
44133
|
+
error,
|
|
44134
|
+
};
|
|
44135
|
+
}
|
|
44136
|
+
}
|
|
43768
44137
|
function extractMappingFromInfo(info) {
|
|
43769
44138
|
var _a;
|
|
43770
44139
|
const json = (_a = info.__FramerMetadata__.exports.default.annotations) == null ? void 0 : _a.framerVariables;
|
|
@@ -43777,14 +44146,14 @@ function extractMappingFromInfo(info) {
|
|
|
43777
44146
|
return void 0;
|
|
43778
44147
|
}
|
|
43779
44148
|
}
|
|
43780
|
-
function withMappedReactProps(
|
|
44149
|
+
function withMappedReactProps(Component18, info) {
|
|
43781
44150
|
return (rawProps) => {
|
|
43782
44151
|
const props = {};
|
|
43783
44152
|
const mapping = extractMappingFromInfo(info);
|
|
43784
44153
|
for (const key7 in rawProps) {
|
|
43785
44154
|
asRecord(props)[(mapping == null ? void 0 : mapping[key7]) ?? key7] = rawProps[key7];
|
|
43786
44155
|
}
|
|
43787
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
44156
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
43788
44157
|
...props,
|
|
43789
44158
|
});
|
|
43790
44159
|
};
|
|
@@ -43827,9 +44196,9 @@ function createInputOutputRanges2(transformTargets, threshold, exitTarget) {
|
|
|
43827
44196
|
outputRange: [-1, -1, ...outputRange,],
|
|
43828
44197
|
};
|
|
43829
44198
|
}
|
|
43830
|
-
var withVariantAppearEffect = (
|
|
44199
|
+
var withVariantAppearEffect = (Component18) => react_11.default.forwardRef((props, forwardedRef) => {
|
|
43831
44200
|
if (RenderTarget.current() === RenderTarget.canvas) {
|
|
43832
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
44201
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
43833
44202
|
...props,
|
|
43834
44203
|
ref: forwardedRef,
|
|
43835
44204
|
});
|
|
@@ -43914,27 +44283,27 @@ var withVariantAppearEffect = (Component16) => react_11.default.forwardRef((prop
|
|
|
43914
44283
|
repeat: !animateOnce,
|
|
43915
44284
|
});
|
|
43916
44285
|
if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
|
|
43917
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
44286
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
43918
44287
|
...rest,
|
|
43919
44288
|
variant: activeVariant ?? props.variant,
|
|
43920
44289
|
ref: observerRef,
|
|
43921
44290
|
});
|
|
43922
44291
|
}
|
|
43923
44292
|
else {
|
|
43924
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
44293
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
43925
44294
|
...rest,
|
|
43926
44295
|
});
|
|
43927
44296
|
}
|
|
43928
44297
|
});
|
|
43929
44298
|
exports.withVariantAppearEffect = withVariantAppearEffect;
|
|
43930
|
-
var withVariantFX = (
|
|
44299
|
+
var withVariantFX = (Component18) => react_11.default.forwardRef(({ initial, animate: animate3, exit, ...props }, forwardedRef) => {
|
|
43931
44300
|
const observerRef = useObserverRef(forwardedRef);
|
|
43932
44301
|
const effect = usePresenceAnimation({
|
|
43933
44302
|
initial,
|
|
43934
44303
|
animate: animate3,
|
|
43935
44304
|
exit,
|
|
43936
44305
|
}, observerRef, true);
|
|
43937
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
44306
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
43938
44307
|
...props,
|
|
43939
44308
|
style: {
|
|
43940
44309
|
...(props == null ? void 0 : props.style),
|
|
@@ -47404,10 +47773,10 @@ var RichTextContainer = /* @__PURE__ */ (0, react_4.forwardRef)((props, ref) =>
|
|
|
47404
47773
|
if (layoutId) {
|
|
47405
47774
|
rest.layout = 'preserve-aspect';
|
|
47406
47775
|
}
|
|
47407
|
-
const
|
|
47776
|
+
const Component18 = htmlElementAsMotionComponent(props.as);
|
|
47408
47777
|
if (isString2(props.viewBox)) {
|
|
47409
47778
|
if (props.as !== void 0) {
|
|
47410
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
47779
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
47411
47780
|
...rest,
|
|
47412
47781
|
ref: containerRef,
|
|
47413
47782
|
style: containerStyle,
|
|
@@ -47441,7 +47810,7 @@ var RichTextContainer = /* @__PURE__ */ (0, react_4.forwardRef)((props, ref) =>
|
|
|
47441
47810
|
});
|
|
47442
47811
|
}
|
|
47443
47812
|
}
|
|
47444
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
47813
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component18, {
|
|
47445
47814
|
...rest,
|
|
47446
47815
|
ref: containerRef,
|
|
47447
47816
|
style: containerStyle,
|