unframer 2.22.0 → 2.23.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/framer.js CHANGED
@@ -39,7 +39,7 @@ 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.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.isMotionValue = exports.isBrowser = exports.invariant = exports.InternalID = exports.Image = exports.GracefullyDegradingErrorBoundary = 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
41
  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 = exports.LazyValue = 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 = exports.SmartComponentScopedContainer = 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.SVG = exports.StyleSheetContext = exports.Stack = exports.SSRVariants = exports.SpringAnimator = exports.SmartComponentScopedContainer = void 0;
43
43
  exports._injectRuntime = _injectRuntime;
44
44
  exports.addActionControls = addActionControls;
45
45
  exports.addFonts = addFonts;
@@ -118,6 +118,7 @@ exports.isOverride = isOverride;
118
118
  exports.isReactDefinition = isReactDefinition;
119
119
  exports.isRelativeNumber = isRelativeNumber;
120
120
  exports.isShallowEqualArray = isShallowEqualArray;
121
+ exports.isStaticRenderer = isStaticRenderer;
121
122
  exports.isStraightCurve = isStraightCurve;
122
123
  exports.isValidMotionProp = isValidMotionProp;
123
124
  exports.keyframes = keyframes;
@@ -162,7 +163,6 @@ exports.stagger = stagger;
162
163
  exports.startAnimation = startAnimation;
163
164
  exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation;
164
165
  exports.steps = steps;
165
- exports.SVG = SVG;
166
166
  exports.throttle = throttle;
167
167
  exports.toFlexDirection = toFlexDirection;
168
168
  exports.toJustifyOrAlignment = toJustifyOrAlignment;
@@ -10015,7 +10015,7 @@ function steps(numSteps, direction = 'end') {
10015
10015
  return clamp(0, 1, rounded / numSteps);
10016
10016
  };
10017
10017
  }
10018
- // /:https://app.framerstatic.com/framer.WEKEHMWW.mjs
10018
+ // /:https://app.framerstatic.com/framer.H2TWMMQC.mjs
10019
10019
  const react_11 = __importDefault(require("react"));
10020
10020
  const react_12 = require("react");
10021
10021
  const react_13 = require("react");
@@ -13122,7 +13122,7 @@ var MarkSuspenseEffects = {
13122
13122
  function renderPage(Page4, defaultPageStyle) {
13123
13123
  const props = {
13124
13124
  style: defaultPageStyle,
13125
- 'data-framer-root': true,
13125
+ 'data-framer-root': '',
13126
13126
  };
13127
13127
  return react_11.default.isValidElement(Page4) ? react_11.default.cloneElement(Page4, props) : react_11.default.createElement(Page4, props);
13128
13128
  }
@@ -20673,10 +20673,14 @@ function supportsThemes(presetId, skin) {
20673
20673
  }
20674
20674
  return false;
20675
20675
  }
20676
- function useIsStaticRenderer() {
20676
+ function isStaticRenderer() {
20677
20677
  const currentTarget = RenderTarget.current();
20678
20678
  return currentTarget === RenderTarget.canvas || currentTarget === RenderTarget.export;
20679
20679
  }
20680
+ function useIsStaticRenderer() {
20681
+ const [isStatic,] = (0, react_9.useState)(() => isStaticRenderer());
20682
+ return isStatic;
20683
+ }
20680
20684
  var asRecord = (object) => object;
20681
20685
  function memoize(fn) {
20682
20686
  const cache2 = Object.create(Object.prototype);
@@ -22121,7 +22125,7 @@ function useStyleAndRect(props) {
22121
22125
  ...defaultStyle,
22122
22126
  };
22123
22127
  }
22124
- const isRenderingStaticContent = useIsStaticRenderer();
22128
+ const isRenderingStaticContent = isStaticRenderer();
22125
22129
  if (props.positionSticky) {
22126
22130
  if (!isRenderingStaticContent || inCodeComponent) {
22127
22131
  resultStyle.position = 'sticky';
@@ -22557,7 +22561,7 @@ function useRefEffect(ref, effect, deps) {
22557
22561
  (0, react_6.useMemo)(() => {
22558
22562
  if (depsChangedRef.current !== void 0)
22559
22563
  depsChangedRef.current = true;
22560
- }, [deps,]);
22564
+ }, deps ?? [{},]);
22561
22565
  if (!ref)
22562
22566
  return;
22563
22567
  const depsChanged = depsChangedRef.current;
@@ -29844,7 +29848,7 @@ var withFX = (Component18) => react_11.default.forwardRef((props, forwardedRef)
29844
29848
  ref: forwardedRef,
29845
29849
  });
29846
29850
  }
29847
- const isRenderingStaticContent = useIsStaticRenderer();
29851
+ const isRenderingStaticContent = isStaticRenderer();
29848
29852
  if (isRenderingStaticContent) {
29849
29853
  const animate4 = isVariantOrVariantList(props.animate) ? props.animate : void 0;
29850
29854
  const initial2 = isVariantOrVariantList(props.initial) ? props.initial : void 0;
@@ -30444,26 +30448,36 @@ var CustomCursorContext = /* @__PURE__ */ (0, react_1.createContext)({
30444
30448
  });
30445
30449
  var replaceCursorClassName = 'framer-cursor-none';
30446
30450
  var cursorComponentClassName = 'framer-pointer-events-none';
30451
+ function getActiveDefinitions(map2, previousDefinitions, newDefinitions) {
30452
+ const allCursors = {};
30453
+ for (const [, hashes,] of map2) {
30454
+ for (const hash2 of hashes) {
30455
+ const value = allCursors[hash2] ?? previousDefinitions[hash2] ?? newDefinitions[hash2];
30456
+ if (value)
30457
+ allCursors[hash2] = value;
30458
+ }
30459
+ }
30460
+ return allCursors;
30461
+ }
30447
30462
  var CustomCursorContextProvider = /* @__PURE__ */ (0, react_13.memo)(function CustomCursorList({ children, }) {
30448
30463
  const value = useConstant2(() => {
30449
30464
  const events = /* @__PURE__ */ new Set();
30450
30465
  let allCursors = {};
30466
+ const byCaller = /* @__PURE__ */ new Map();
30451
30467
  return {
30452
30468
  onRegisterCursors: (callback) => {
30453
30469
  callback(allCursors);
30454
30470
  events.add(callback);
30455
30471
  return () => events.delete(callback);
30456
30472
  },
30457
- registerCursors: (cursors) => {
30458
- const nextCursors = {};
30459
- for (const key7 in cursors) {
30460
- const cursor = allCursors[key7] ?? cursors[key7];
30461
- if (cursor)
30462
- nextCursors[key7] = cursor;
30463
- }
30464
- allCursors = nextCursors;
30473
+ registerCursors: (cursors, id3) => {
30474
+ byCaller.set(id3, Object.keys(cursors));
30475
+ allCursors = getActiveDefinitions(byCaller, allCursors, cursors);
30465
30476
  for (const callback of events)
30466
30477
  callback(allCursors);
30478
+ return () => {
30479
+ byCaller.delete(id3);
30480
+ };
30467
30481
  },
30468
30482
  };
30469
30483
  });
@@ -30712,9 +30726,10 @@ var CustomCursorComponent = /* @__PURE__ */ (0, react_13.memo)(function CustomCu
30712
30726
  function useCustomCursors(webPageCursors) {
30713
30727
  const { registerCursors, } = (0, react_2.useContext)(CustomCursorContext);
30714
30728
  const cursors = useConstant2(() => webPageCursors);
30729
+ const id3 = (0, react_2.useId)();
30715
30730
  (0, react_3.useLayoutEffect)(() => {
30716
- registerCursors(cursors);
30717
- }, [registerCursors,]);
30731
+ return registerCursors(cursors, id3);
30732
+ }, [registerCursors, id3,]);
30718
30733
  }
30719
30734
  var Polygon = {
30720
30735
  /**
@@ -31692,6 +31707,99 @@ function getObserveRouteForPreloadingFn() {
31692
31707
  var observeRouteForPreloading =
31693
31708
  // this also guards `window`
31694
31709
  !shouldPreloadBasedOnUA || typeof IntersectionObserver === 'undefined' ? null : /* @__PURE__ */ getObserveRouteForPreloadingFn();
31710
+ var isPressing = /* @__PURE__ */ new WeakSet();
31711
+ function filterEvents(callback) {
31712
+ return (event) => {
31713
+ if (event.key !== 'Enter')
31714
+ return;
31715
+ callback(event);
31716
+ };
31717
+ }
31718
+ function firePointerEvent(target, type) {
31719
+ target.dispatchEvent(new PointerEvent('pointer' + type, {
31720
+ isPrimary: true,
31721
+ bubbles: true,
31722
+ }));
31723
+ }
31724
+ var enableKeyboardPress = (focusEvent, eventOptions) => {
31725
+ const element = focusEvent.currentTarget;
31726
+ if (!element)
31727
+ return;
31728
+ const handleKeydown = filterEvents(() => {
31729
+ if (isPressing.has(element))
31730
+ return;
31731
+ firePointerEvent(element, 'down');
31732
+ const handleKeyup = filterEvents(() => {
31733
+ firePointerEvent(element, 'up');
31734
+ });
31735
+ const handleBlur = () => firePointerEvent(element, 'cancel');
31736
+ element.addEventListener('keyup', handleKeyup, eventOptions);
31737
+ element.addEventListener('blur', handleBlur, eventOptions);
31738
+ });
31739
+ element.addEventListener('keydown', handleKeydown, eventOptions);
31740
+ element.addEventListener('blur', () => element.removeEventListener('keydown', handleKeydown), eventOptions);
31741
+ };
31742
+ function isPointerEvent(event) {
31743
+ return 'pointerId' in event;
31744
+ }
31745
+ var isPrimaryPointer2 = (event) => {
31746
+ if (event.pointerType === 'mouse') {
31747
+ return typeof event.button !== 'number' || event.button <= 0;
31748
+ }
31749
+ else {
31750
+ return event.isPrimary !== false;
31751
+ }
31752
+ };
31753
+ function isValidPressEvent(event) {
31754
+ return isPointerEvent(event) && isPrimaryPointer2(event);
31755
+ }
31756
+ var isNodeOrChild2 = (parent, child) => {
31757
+ if (!child) {
31758
+ return false;
31759
+ }
31760
+ else if (parent === child) {
31761
+ return true;
31762
+ }
31763
+ else {
31764
+ return isNodeOrChild2(parent, child.parentElement);
31765
+ }
31766
+ };
31767
+ function press(element, onPressEnd) {
31768
+ const gestureAbortController = new AbortController();
31769
+ const cancel = () => gestureAbortController.abort();
31770
+ const eventOptions = {
31771
+ passive: true,
31772
+ signal: gestureAbortController.signal,
31773
+ };
31774
+ const startPress = (startEvent) => {
31775
+ const target = startEvent.currentTarget;
31776
+ if (!isValidPressEvent(startEvent) || isPressing.has(target))
31777
+ return;
31778
+ isPressing.add(target);
31779
+ const onPointerEnd = (endEvent, success) => {
31780
+ window.removeEventListener('pointerup', onPointerUp);
31781
+ window.removeEventListener('pointercancel', onPointerCancel);
31782
+ if (!isValidPressEvent(endEvent) || !isPressing.has(target)) {
31783
+ return;
31784
+ }
31785
+ isPressing.delete(target);
31786
+ if (success && typeof onPressEnd === 'function') {
31787
+ onPressEnd(endEvent);
31788
+ }
31789
+ };
31790
+ const onPointerUp = (upEvent) => {
31791
+ onPointerEnd(upEvent, isNodeOrChild2(target, upEvent.target));
31792
+ };
31793
+ const onPointerCancel = (cancelEvent) => {
31794
+ onPointerEnd(cancelEvent, false);
31795
+ };
31796
+ window.addEventListener('pointerup', onPointerUp, eventOptions);
31797
+ window.addEventListener('pointercancel', onPointerCancel, eventOptions);
31798
+ };
31799
+ element.addEventListener('pointerdown', startPress, eventOptions);
31800
+ element.addEventListener('focus', (event) => enableKeyboardPress(event, eventOptions), eventOptions);
31801
+ return cancel;
31802
+ }
31695
31803
  var noLocale = Symbol('noLocale');
31696
31804
  var resolveSlugCache = /* @__PURE__ */ new Map();
31697
31805
  function resolveSlug(unresolvedSlug, utilsByCollectionId, activeLocale) {
@@ -32085,16 +32193,39 @@ var Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, react_4.fo
32085
32193
  return;
32086
32194
  return observerCallback(node);
32087
32195
  }, [observerCallback,]);
32088
- const { navigate: _, ...linkProps } = props;
32196
+ const { navigate: _, onClick, ...linkProps } = props;
32197
+ const shouldReplaceClickWithPress = Boolean(isIOS() && onClick);
32198
+ useRefEffect(observerRef, (node) => {
32199
+ if (!shouldReplaceClickWithPress)
32200
+ return;
32201
+ if (node === null)
32202
+ return;
32203
+ const cancel = press(node, onClick);
32204
+ return () => {
32205
+ if (!observerRef.current)
32206
+ cancel();
32207
+ };
32208
+ }, [shouldReplaceClickWithPress, onClick,]);
32209
+ const onClickProp = onClick
32210
+ ? {
32211
+ // If we've replaced the click handler with press, make onClick noop so we don't try to
32212
+ // respond to the pointer event twice.
32213
+ onClick: shouldReplaceClickWithPress ? noopOnClick : onClick,
32214
+ }
32215
+ : {};
32089
32216
  const el = clone.cloneAsArray(children, {
32090
32217
  ...restProps,
32091
32218
  ...linkProps,
32219
+ ...onClickProp,
32092
32220
  ref: observerRef,
32093
32221
  });
32094
32222
  return getChildren(el);
32095
32223
  }));
32096
32224
  exports.Link = Link;
32097
32225
  exports.FramerLink = Link;
32226
+ function noopOnClick(event) {
32227
+ event.preventDefault();
32228
+ }
32098
32229
  var ParentLinkContext = /* @__PURE__ */ (0, react_1.createContext)(void 0);
32099
32230
  function useReplaceNestedLinks(nodeId, href, propsAddedByLink) {
32100
32231
  const parentLink = (0, react_2.useContext)(ParentLinkContext);
@@ -32801,23 +32932,26 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
32801
32932
  value: localeInfo,
32802
32933
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsxs)(SuspenseThatPreservesDom, {
32803
32934
  children: [
32804
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NotFoundErrorBoundary, {
32935
+ /* @__PURE__ */ (0, jsx_runtime_1.jsxs)(NotFoundErrorBoundary, {
32805
32936
  notFoundPage,
32806
32937
  defaultPageStyle,
32807
32938
  forceUpdateKey: dep,
32808
- children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(WithLayoutTemplate, {
32809
- LayoutTemplate,
32810
- routeId: currentRouteId,
32811
- children: (inLayoutTemplate) => {
32812
- return /* @__PURE__ */ (0, jsx_runtime_1.jsxs)(react_8.Fragment, {
32813
- children: [
32814
- /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.Start, {}),
32815
- pageExistsInCurrentLocale ? renderPage(current.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle) : // LAYOUT_TEMPLATE @TODO: display: content for not found page?
32816
- notFoundPage && renderPage(notFoundPage, defaultPageStyle),
32817
- ],
32818
- }, remountKey);
32819
- },
32820
- }),
32939
+ children: [
32940
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.Start, {}),
32941
+ /* @__PURE__ */ (0, jsx_runtime_1.jsx)(WithLayoutTemplate, {
32942
+ LayoutTemplate,
32943
+ routeId: currentRouteId,
32944
+ style: defaultPageStyle,
32945
+ children: (inLayoutTemplate) => {
32946
+ return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(react_8.Fragment, {
32947
+ children: pageExistsInCurrentLocale
32948
+ ? renderPage(current.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle)
32949
+ : // LAYOUT_TEMPLATE @TODO: display: content for not found page?
32950
+ notFoundPage && renderPage(notFoundPage, defaultPageStyle),
32951
+ }, remountKey);
32952
+ },
32953
+ }),
32954
+ ],
32821
32955
  }),
32822
32956
  /* @__PURE__ */ (0, jsx_runtime_1.jsx)(TurnOnReactEventHandling, {}),
32823
32957
  /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MarkSuspenseEffects.End, {}),
@@ -32827,11 +32961,12 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
32827
32961
  }),
32828
32962
  });
32829
32963
  }
32830
- function WithLayoutTemplate({ LayoutTemplate, routeId, children, }) {
32964
+ function WithLayoutTemplate({ LayoutTemplate, routeId, style, children, }) {
32831
32965
  if (!LayoutTemplate)
32832
32966
  return children(false);
32833
32967
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(LayoutTemplate, {
32834
32968
  routeId,
32969
+ style,
32835
32970
  children,
32836
32971
  });
32837
32972
  }
@@ -33791,6 +33926,22 @@ var CompatibilityDatabaseCollection = class {
33791
33926
  return Number(left.pointer) - Number(right.pointer);
33792
33927
  }
33793
33928
  };
33929
+ function compareArray(left, right, collation11) {
33930
+ const leftLength = left.value.length;
33931
+ const rightLength = right.value.length;
33932
+ if (leftLength < rightLength)
33933
+ return -1;
33934
+ if (leftLength > rightLength)
33935
+ return 1;
33936
+ for (let i = 0; i < leftLength; i++) {
33937
+ const leftItem = left.value[i];
33938
+ const rightItem = right.value[i];
33939
+ const result = compare(leftItem, rightItem, collation11);
33940
+ if (result !== 0)
33941
+ return result;
33942
+ }
33943
+ return 0;
33944
+ }
33794
33945
  function castArray(value, definition) {
33795
33946
  switch (value == null ? void 0 : value.type) {
33796
33947
  case 'array': {
@@ -33805,6 +33956,13 @@ function castArray(value, definition) {
33805
33956
  }
33806
33957
  return null;
33807
33958
  }
33959
+ function compareBoolean(left, right) {
33960
+ if (left.value < right.value)
33961
+ return -1;
33962
+ if (left.value > right.value)
33963
+ return 1;
33964
+ return 0;
33965
+ }
33808
33966
  function castBoolean(value) {
33809
33967
  switch (value == null ? void 0 : value.type) {
33810
33968
  case 'boolean': {
@@ -33820,10 +33978,17 @@ function castBoolean(value) {
33820
33978
  }
33821
33979
  return null;
33822
33980
  }
33823
- function toBoolean(value) {
33981
+ function valueToBoolean(value) {
33824
33982
  const cast = castBoolean(value);
33825
33983
  return (cast == null ? void 0 : cast.value) ?? false;
33826
33984
  }
33985
+ function compareColor(left, right) {
33986
+ if (left.value < right.value)
33987
+ return -1;
33988
+ if (left.value > right.value)
33989
+ return 1;
33990
+ return 0;
33991
+ }
33827
33992
  function castColor(value) {
33828
33993
  switch (value == null ? void 0 : value.type) {
33829
33994
  case 'color': {
@@ -33832,6 +33997,15 @@ function castColor(value) {
33832
33997
  }
33833
33998
  return null;
33834
33999
  }
34000
+ function compareDate(left, right) {
34001
+ const leftDate = new Date(left.value);
34002
+ const rightDate = new Date(right.value);
34003
+ if (leftDate < rightDate)
34004
+ return -1;
34005
+ if (leftDate > rightDate)
34006
+ return 1;
34007
+ return 0;
34008
+ }
33835
34009
  function castDate(value) {
33836
34010
  switch (value == null ? void 0 : value.type) {
33837
34011
  case 'date': {
@@ -33851,6 +34025,13 @@ function castDate(value) {
33851
34025
  }
33852
34026
  return null;
33853
34027
  }
34028
+ function compareEnum(left, right) {
34029
+ if (left.value < right.value)
34030
+ return -1;
34031
+ if (left.value > right.value)
34032
+ return 1;
34033
+ return 0;
34034
+ }
33854
34035
  function castEnum(value) {
33855
34036
  switch (value == null ? void 0 : value.type) {
33856
34037
  case 'enum': {
@@ -33865,6 +34046,13 @@ function castEnum(value) {
33865
34046
  }
33866
34047
  return null;
33867
34048
  }
34049
+ function compareFile(left, right) {
34050
+ if (left.value < right.value)
34051
+ return -1;
34052
+ if (left.value > right.value)
34053
+ return 1;
34054
+ return 0;
34055
+ }
33868
34056
  function castFile(value) {
33869
34057
  switch (value == null ? void 0 : value.type) {
33870
34058
  case 'file': {
@@ -33873,6 +34061,15 @@ function castFile(value) {
33873
34061
  }
33874
34062
  return null;
33875
34063
  }
34064
+ function compareLink(left, right) {
34065
+ const leftEncoded = JSON.stringify(left.value);
34066
+ const rightEncoded = JSON.stringify(right.value);
34067
+ if (leftEncoded < rightEncoded)
34068
+ return -1;
34069
+ if (leftEncoded > rightEncoded)
34070
+ return 1;
34071
+ return 0;
34072
+ }
33876
34073
  function castLink(value) {
33877
34074
  switch (value == null ? void 0 : value.type) {
33878
34075
  case 'link': {
@@ -33896,6 +34093,13 @@ function castLink(value) {
33896
34093
  }
33897
34094
  return null;
33898
34095
  }
34096
+ function compareNumber(left, right) {
34097
+ if (left.value < right.value)
34098
+ return -1;
34099
+ if (left.value > right.value)
34100
+ return 1;
34101
+ return 0;
34102
+ }
33899
34103
  function castNumber(value) {
33900
34104
  switch (value == null ? void 0 : value.type) {
33901
34105
  case 'number':
@@ -33912,10 +34116,32 @@ function castNumber(value) {
33912
34116
  }
33913
34117
  return null;
33914
34118
  }
33915
- function toNumber2(value) {
34119
+ function valueToNumber(value) {
33916
34120
  const cast = castNumber(value);
33917
34121
  return (cast == null ? void 0 : cast.value) ?? null;
33918
34122
  }
34123
+ function compareObject(left, right, collation11) {
34124
+ const leftKeys = Object.keys(left.value).sort();
34125
+ const rightKeys = Object.keys(right.value).sort();
34126
+ if (leftKeys.length < rightKeys.length)
34127
+ return -1;
34128
+ if (leftKeys.length > rightKeys.length)
34129
+ return 1;
34130
+ for (let i = 0; i < leftKeys.length; i++) {
34131
+ const leftKey = leftKeys[i];
34132
+ const rightKey = rightKeys[i];
34133
+ if (leftKey < rightKey)
34134
+ return -1;
34135
+ if (leftKey > rightKey)
34136
+ return 1;
34137
+ const leftValue = left.value[leftKey] ?? null;
34138
+ const rightValue = right.value[rightKey] ?? null;
34139
+ const result = compare(leftValue, rightValue, collation11);
34140
+ if (result !== 0)
34141
+ return result;
34142
+ }
34143
+ return 0;
34144
+ }
33919
34145
  function castObject(value, definition) {
33920
34146
  switch (value == null ? void 0 : value.type) {
33921
34147
  case 'object': {
@@ -33933,6 +34159,15 @@ function castObject(value, definition) {
33933
34159
  }
33934
34160
  return null;
33935
34161
  }
34162
+ function compareResponsiveImage(left, right) {
34163
+ const leftEncoded = JSON.stringify(left.value);
34164
+ const rightEncoded = JSON.stringify(right.value);
34165
+ if (leftEncoded < rightEncoded)
34166
+ return -1;
34167
+ if (leftEncoded > rightEncoded)
34168
+ return 1;
34169
+ return 0;
34170
+ }
33936
34171
  function castResponsiveImage(value) {
33937
34172
  switch (value == null ? void 0 : value.type) {
33938
34173
  case 'responsiveimage': {
@@ -33941,6 +34176,15 @@ function castResponsiveImage(value) {
33941
34176
  }
33942
34177
  return null;
33943
34178
  }
34179
+ function compareRichText(left, right) {
34180
+ const leftValue = left.value;
34181
+ const rightValue = right.value;
34182
+ if (leftValue < rightValue)
34183
+ return -1;
34184
+ if (leftValue > rightValue)
34185
+ return 1;
34186
+ return 0;
34187
+ }
33944
34188
  function castRichText(value) {
33945
34189
  switch (value == null ? void 0 : value.type) {
33946
34190
  case 'richtext': {
@@ -33949,6 +34193,19 @@ function castRichText(value) {
33949
34193
  }
33950
34194
  return null;
33951
34195
  }
34196
+ function compareString(left, right, collation11) {
34197
+ let leftValue = left.value;
34198
+ let rightValue = right.value;
34199
+ if (collation11.type === 0) {
34200
+ leftValue = left.value.toLowerCase();
34201
+ rightValue = right.value.toLowerCase();
34202
+ }
34203
+ if (leftValue < rightValue)
34204
+ return -1;
34205
+ if (leftValue > rightValue)
34206
+ return 1;
34207
+ return 0;
34208
+ }
33952
34209
  function castString(value) {
33953
34210
  switch (value == null ? void 0 : value.type) {
33954
34211
  case 'string': {
@@ -33963,7 +34220,7 @@ function castString(value) {
33963
34220
  }
33964
34221
  return null;
33965
34222
  }
33966
- function toString(value) {
34223
+ function valueToString(value) {
33967
34224
  const cast = castString(value);
33968
34225
  return (cast == null ? void 0 : cast.value) ?? null;
33969
34226
  }
@@ -34113,8 +34370,8 @@ var DatabaseValue = {
34113
34370
  });
34114
34371
  },
34115
34372
  contains(source, target, collation11) {
34116
- let sourceValue = toString(source);
34117
- let targetValue = toString(target);
34373
+ let sourceValue = valueToString(source);
34374
+ let targetValue = valueToString(target);
34118
34375
  if (isNull(sourceValue))
34119
34376
  return false;
34120
34377
  if (isNull(targetValue))
@@ -34126,8 +34383,8 @@ var DatabaseValue = {
34126
34383
  return sourceValue.includes(targetValue);
34127
34384
  },
34128
34385
  startsWith(source, target, collation11) {
34129
- let sourceValue = toString(source);
34130
- let targetValue = toString(target);
34386
+ let sourceValue = valueToString(source);
34387
+ let targetValue = valueToString(target);
34131
34388
  if (isNull(sourceValue))
34132
34389
  return false;
34133
34390
  if (isNull(targetValue))
@@ -34139,8 +34396,8 @@ var DatabaseValue = {
34139
34396
  return sourceValue.startsWith(targetValue);
34140
34397
  },
34141
34398
  endsWith(source, target, collation11) {
34142
- let sourceValue = toString(source);
34143
- let targetValue = toString(target);
34399
+ let sourceValue = valueToString(source);
34400
+ let targetValue = valueToString(target);
34144
34401
  if (isNull(sourceValue))
34145
34402
  return false;
34146
34403
  if (isNull(targetValue))
@@ -34199,143 +34456,51 @@ function compare(left, right, collation11) {
34199
34456
  switch (left.type) {
34200
34457
  case 'array': {
34201
34458
  assert(left.type === right.type);
34202
- const leftLength = left.value.length;
34203
- const rightLength = right.value.length;
34204
- if (leftLength < rightLength)
34205
- return -1;
34206
- if (leftLength > rightLength)
34207
- return 1;
34208
- for (let i = 0; i < leftLength; i++) {
34209
- const leftItem = left.value[i];
34210
- const rightItem = right.value[i];
34211
- assert(!isUndefined(leftItem), 'Left item must exist');
34212
- assert(!isUndefined(rightItem), 'Right item must exist');
34213
- const result = compare(leftItem, rightItem, collation11);
34214
- if (result !== 0)
34215
- return result;
34216
- }
34217
- return 0;
34459
+ return compareArray(left, right, collation11);
34218
34460
  }
34219
34461
  case 'boolean': {
34220
34462
  assert(left.type === right.type);
34221
- if (left.value < right.value)
34222
- return -1;
34223
- if (left.value > right.value)
34224
- return 1;
34225
- return 0;
34463
+ return compareBoolean(left, right);
34226
34464
  }
34227
34465
  case 'color': {
34228
34466
  assert(left.type === right.type);
34229
- if (left.value < right.value)
34230
- return -1;
34231
- if (left.value > right.value)
34232
- return 1;
34233
- return 0;
34467
+ return compareColor(left, right);
34234
34468
  }
34235
34469
  case 'date': {
34236
34470
  assert(left.type === right.type);
34237
- const leftDate = new Date(left.value);
34238
- const rightDate = new Date(right.value);
34239
- if (leftDate < rightDate)
34240
- return -1;
34241
- if (leftDate > rightDate)
34242
- return 1;
34243
- return 0;
34471
+ return compareDate(left, right);
34244
34472
  }
34245
34473
  case 'enum': {
34246
34474
  assert(left.type === right.type);
34247
- if (left.value < right.value)
34248
- return -1;
34249
- if (left.value > right.value)
34250
- return 1;
34251
- return 0;
34475
+ return compareEnum(left, right);
34252
34476
  }
34253
34477
  case 'file': {
34254
34478
  assert(left.type === right.type);
34255
- if (left.value < right.value)
34256
- return -1;
34257
- if (left.value > right.value)
34258
- return 1;
34259
- return 0;
34479
+ return compareFile(left, right);
34260
34480
  }
34261
34481
  case 'link': {
34262
34482
  assert(left.type === right.type);
34263
- const leftEncoded = JSON.stringify(left.value);
34264
- const rightEncoded = JSON.stringify(right.value);
34265
- if (leftEncoded < rightEncoded)
34266
- return -1;
34267
- if (leftEncoded > rightEncoded)
34268
- return 1;
34269
- return 0;
34483
+ return compareLink(left, right);
34270
34484
  }
34271
34485
  case 'number': {
34272
34486
  assert(left.type === right.type);
34273
- if (left.value < right.value)
34274
- return -1;
34275
- if (left.value > right.value)
34276
- return 1;
34277
- return 0;
34487
+ return compareNumber(left, right);
34278
34488
  }
34279
34489
  case 'object': {
34280
34490
  assert(left.type === right.type);
34281
- const leftKeys = Object.keys(left.value).sort();
34282
- const rightKeys = Object.keys(right.value).sort();
34283
- if (leftKeys.length < rightKeys.length)
34284
- return -1;
34285
- if (leftKeys.length > rightKeys.length)
34286
- return 1;
34287
- for (let i = 0; i < leftKeys.length; i++) {
34288
- const leftKey = leftKeys[i];
34289
- const rightKey = rightKeys[i];
34290
- assert(!isUndefined(leftKey), 'Left key must exist');
34291
- assert(!isUndefined(rightKey), 'Left key must exist');
34292
- if (leftKey < rightKey)
34293
- return -1;
34294
- if (leftKey > rightKey)
34295
- return 1;
34296
- const leftValue = left.value[leftKey];
34297
- const rightValue = right.value[rightKey];
34298
- assert(!isUndefined(leftValue), 'Left value must exist');
34299
- assert(!isUndefined(rightValue), 'Right value must exist');
34300
- const result = compare(leftValue, rightValue, collation11);
34301
- if (result !== 0)
34302
- return result;
34303
- }
34304
- return 0;
34491
+ return compareObject(left, right, collation11);
34305
34492
  }
34306
34493
  case 'responsiveimage': {
34307
34494
  assert(left.type === right.type);
34308
- const leftEncoded = JSON.stringify(left.value);
34309
- const rightEncoded = JSON.stringify(right.value);
34310
- if (leftEncoded < rightEncoded)
34311
- return -1;
34312
- if (leftEncoded > rightEncoded)
34313
- return 1;
34314
- return 0;
34495
+ return compareResponsiveImage(left, right);
34315
34496
  }
34316
34497
  case 'richtext': {
34317
34498
  assert(left.type === right.type);
34318
- const leftValue = left.value;
34319
- const rightValue = right.value;
34320
- if (leftValue < rightValue)
34321
- return -1;
34322
- if (leftValue > rightValue)
34323
- return 1;
34324
- return 0;
34499
+ return compareRichText(left, right);
34325
34500
  }
34326
34501
  case 'string': {
34327
34502
  assert(left.type === right.type);
34328
- let leftValue = left.value;
34329
- let rightValue = right.value;
34330
- if (collation11.type === 0) {
34331
- leftValue = left.value.toLowerCase();
34332
- rightValue = right.value.toLowerCase();
34333
- }
34334
- if (leftValue < rightValue)
34335
- return -1;
34336
- if (leftValue > rightValue)
34337
- return 1;
34338
- return 0;
34503
+ return compareString(left, right, collation11);
34339
34504
  }
34340
34505
  default: {
34341
34506
  assertNever(left);
@@ -35046,7 +35211,8 @@ var RelationalProject = class extends RelationalNode {
35046
35211
  this.input = input;
35047
35212
  this.projections = projections;
35048
35213
  this.passthrough = passthrough;
35049
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
35214
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
35215
+ this.inputGroup = input.getGroup();
35050
35216
  }
35051
35217
  getHash() {
35052
35218
  return calculateHash('RelationalProject', this.inputGroup.id, ...this.projections, this.passthrough);
@@ -35199,19 +35365,6 @@ var ScalarCase = class extends ScalarNode {
35199
35365
  getHash() {
35200
35366
  return calculateHash('ScalarCase', this.input, ...this.conditions, this.otherwise);
35201
35367
  }
35202
- toString() {
35203
- let result = 'CASE';
35204
- if (this.input) {
35205
- result = `${result} ${this.input}`;
35206
- }
35207
- for (const { when, then, } of this.conditions) {
35208
- result = `${result} WHEN ${when} THEN ${then}`;
35209
- }
35210
- if (this.otherwise) {
35211
- result = `${result} ELSE ${this.otherwise}`;
35212
- }
35213
- return `${result} END`;
35214
- }
35215
35368
  optimize(optimizer) {
35216
35369
  var _a, _b;
35217
35370
  (_a = this.input) == null ? void 0 : _a.optimize(optimizer);
@@ -35239,6 +35392,7 @@ var ScalarCase = class extends ScalarNode {
35239
35392
  input: ((_a = this.input) == null ? void 0 : _a.evaluate(context, tuple)) ?? null,
35240
35393
  conditions: evaluateArray(this.conditions.map((condition) => evaluateObject({
35241
35394
  when: condition.when.evaluate(context, tuple),
35395
+ // biome-ignore lint/suspicious/noThenProperty: Existing name.
35242
35396
  then: condition.then.evaluate(context, tuple),
35243
35397
  }))),
35244
35398
  otherwise: ((_b = this.otherwise) == null ? void 0 : _b.evaluate(context, tuple)) ?? null,
@@ -35252,7 +35406,7 @@ var ScalarCase = class extends ScalarNode {
35252
35406
  }
35253
35407
  else {
35254
35408
  for (const { when, then, } of conditions) {
35255
- if (toBoolean(when)) {
35409
+ if (valueToBoolean(when)) {
35256
35410
  return then;
35257
35411
  }
35258
35412
  }
@@ -35698,7 +35852,8 @@ var RelationalFilter = class extends RelationalNode {
35698
35852
  super(input.isSynchronous && predicate.isSynchronous);
35699
35853
  this.input = input;
35700
35854
  this.predicate = predicate;
35701
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
35855
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
35856
+ this.inputGroup = input.getGroup();
35702
35857
  }
35703
35858
  getHash() {
35704
35859
  return calculateHash('RelationalFilter', this.inputGroup.id, this.predicate);
@@ -35736,7 +35891,7 @@ var RelationalFilter = class extends RelationalNode {
35736
35891
  }));
35737
35892
  return input.filter((_, index) => {
35738
35893
  const predicate = predicates[index] ?? null;
35739
- return toBoolean(predicate);
35894
+ return valueToBoolean(predicate);
35740
35895
  });
35741
35896
  }
35742
35897
  };
@@ -35787,8 +35942,10 @@ var RelationalIntersection = class extends RelationalNode {
35787
35942
  super(left.isSynchronous && right.isSynchronous);
35788
35943
  this.left = left;
35789
35944
  this.right = right;
35790
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup', this.left.getGroup());
35791
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup', this.right.getGroup());
35945
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup');
35946
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup');
35947
+ this.leftGroup = left.getGroup();
35948
+ this.rightGroup = right.getGroup();
35792
35949
  }
35793
35950
  getHash() {
35794
35951
  return calculateHash('RelationalIntersection', this.leftGroup.id, this.rightGroup.id);
@@ -35856,9 +36013,6 @@ var ScalarEquals = class extends ScalarNode {
35856
36013
  getHash() {
35857
36014
  return calculateHash('ScalarEquals', this.left, this.right);
35858
36015
  }
35859
- toString() {
35860
- return `${this.left} == ${this.right}`;
35861
- }
35862
36016
  optimize(optimizer) {
35863
36017
  const leftCost = this.left.optimize(optimizer);
35864
36018
  const rightCost = this.right.optimize(optimizer);
@@ -35886,8 +36040,10 @@ var RelationalLeftJoin = class extends RelationalNode {
35886
36040
  this.left = left;
35887
36041
  this.right = right;
35888
36042
  this.constraint = constraint;
35889
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup', this.left.getGroup());
35890
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup', this.right.getGroup());
36043
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup');
36044
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup');
36045
+ this.leftGroup = left.getGroup();
36046
+ this.rightGroup = right.getGroup();
35891
36047
  }
35892
36048
  getHash() {
35893
36049
  return calculateHash('RelationalLeftJoin', this.leftGroup.id, this.rightGroup.id, this.constraint);
@@ -35990,7 +36146,7 @@ var RelationalLeftJoin = class extends RelationalNode {
35990
36146
  tuple.merge(leftTuple);
35991
36147
  tuple.merge(rightTuple);
35992
36148
  const value = yield* this.constraint.evaluate(context, tuple);
35993
- if (toBoolean(value)) {
36149
+ if (valueToBoolean(value)) {
35994
36150
  result.push(tuple);
35995
36151
  hasMatch = true;
35996
36152
  }
@@ -36008,8 +36164,10 @@ var RelationalRightJoin = class extends RelationalNode {
36008
36164
  this.left = left;
36009
36165
  this.right = right;
36010
36166
  this.constraint = constraint;
36011
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup', this.left.getGroup());
36012
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup', this.right.getGroup());
36167
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup');
36168
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup');
36169
+ this.leftGroup = left.getGroup();
36170
+ this.rightGroup = right.getGroup();
36013
36171
  }
36014
36172
  getHash() {
36015
36173
  return calculateHash('RelationalRightJoin', this.leftGroup.id, this.rightGroup.id, this.constraint);
@@ -36112,7 +36270,7 @@ var RelationalRightJoin = class extends RelationalNode {
36112
36270
  tuple.merge(rightTuple);
36113
36271
  tuple.merge(leftTuple);
36114
36272
  const value = yield* this.constraint.evaluate(context, tuple);
36115
- if (toBoolean(value)) {
36273
+ if (valueToBoolean(value)) {
36116
36274
  result.push(tuple);
36117
36275
  hasMatch = true;
36118
36276
  }
@@ -36168,8 +36326,10 @@ var RelationalUnion = class extends RelationalNode {
36168
36326
  super(left.isSynchronous && right.isSynchronous);
36169
36327
  this.left = left;
36170
36328
  this.right = right;
36171
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup', this.left.getGroup());
36172
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup', this.right.getGroup());
36329
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'leftGroup');
36330
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'rightGroup');
36331
+ this.leftGroup = left.getGroup();
36332
+ this.rightGroup = right.getGroup();
36173
36333
  }
36174
36334
  getHash() {
36175
36335
  return calculateHash('RelationalUnion', this.leftGroup.id, this.rightGroup.id);
@@ -36237,9 +36397,6 @@ var ScalarAnd = class extends ScalarNode {
36237
36397
  getHash() {
36238
36398
  return calculateHash('ScalarAnd', this.left, this.right);
36239
36399
  }
36240
- toString() {
36241
- return `${this.left} && ${this.right}`;
36242
- }
36243
36400
  optimize(optimizer) {
36244
36401
  const leftCost = this.left.optimize(optimizer);
36245
36402
  const rightCost = this.right.optimize(optimizer);
@@ -36257,7 +36414,7 @@ var ScalarAnd = class extends ScalarNode {
36257
36414
  });
36258
36415
  return {
36259
36416
  type: 'boolean',
36260
- value: toBoolean(left) && toBoolean(right),
36417
+ value: valueToBoolean(left) && valueToBoolean(right),
36261
36418
  };
36262
36419
  }
36263
36420
  };
@@ -36272,16 +36429,13 @@ var ScalarConstant = class extends ScalarNode {
36272
36429
  getHash() {
36273
36430
  return calculateHash('ScalarConstant', this.definition, this.value);
36274
36431
  }
36275
- toString() {
36276
- return DatabaseValue.stringify(this.value);
36277
- }
36278
36432
  optimize() {
36279
36433
  return new Cost(0);
36280
36434
  }
36281
36435
  getOptimized() {
36282
36436
  return this;
36283
36437
  }
36284
- // eslint-disable-next-line require-yield
36438
+ // biome-ignore lint/correctness/useYield: Required by the super class.
36285
36439
  *evaluate() {
36286
36440
  return this.value;
36287
36441
  }
@@ -36310,9 +36464,6 @@ var ScalarContains = class extends ScalarNode {
36310
36464
  getHash() {
36311
36465
  return calculateHash('ScalarContains', this.source, this.target);
36312
36466
  }
36313
- toString() {
36314
- return `CONTAINS(${this.source}, ${this.target})`;
36315
- }
36316
36467
  optimize(optimizer) {
36317
36468
  const sourceCost = this.source.optimize(optimizer);
36318
36469
  const targetCost = this.target.optimize(optimizer);
@@ -36358,9 +36509,6 @@ var ScalarEndsWith = class extends ScalarNode {
36358
36509
  getHash() {
36359
36510
  return calculateHash('ScalarEndsWith', this.source, this.target);
36360
36511
  }
36361
- toString() {
36362
- return `ENDS_WITH(${this.source}, ${this.target})`;
36363
- }
36364
36512
  optimize(optimizer) {
36365
36513
  const sourceCost = this.source.optimize(optimizer);
36366
36514
  const targetCost = this.target.optimize(optimizer);
@@ -36402,9 +36550,6 @@ var ScalarGreaterThan = class extends ScalarNode {
36402
36550
  getHash() {
36403
36551
  return calculateHash('ScalarGreaterThan', this.left, this.right);
36404
36552
  }
36405
- toString() {
36406
- return `${this.left} > ${this.right}`;
36407
- }
36408
36553
  optimize(optimizer) {
36409
36554
  const leftCost = this.left.optimize(optimizer);
36410
36555
  const rightCost = this.right.optimize(optimizer);
@@ -36446,9 +36591,6 @@ var ScalarGreaterThanOrEqual = class extends ScalarNode {
36446
36591
  getHash() {
36447
36592
  return calculateHash('ScalarGreaterThanOrEqual', this.left, this.right);
36448
36593
  }
36449
- toString() {
36450
- return `${this.left} >= ${this.right}`;
36451
- }
36452
36594
  optimize(optimizer) {
36453
36595
  const leftCost = this.left.optimize(optimizer);
36454
36596
  const rightCost = this.right.optimize(optimizer);
@@ -36490,9 +36632,6 @@ var ScalarLessThan = class extends ScalarNode {
36490
36632
  getHash() {
36491
36633
  return calculateHash('ScalarLessThan', this.left, this.right);
36492
36634
  }
36493
- toString() {
36494
- return `${this.left} < ${this.right}`;
36495
- }
36496
36635
  optimize(optimizer) {
36497
36636
  const leftCost = this.left.optimize(optimizer);
36498
36637
  const rightCost = this.right.optimize(optimizer);
@@ -36534,9 +36673,6 @@ var ScalarLessThanOrEqual = class extends ScalarNode {
36534
36673
  getHash() {
36535
36674
  return calculateHash('ScalarLessThanOrEqual', this.left, this.right);
36536
36675
  }
36537
- toString() {
36538
- return `${this.left} <= ${this.right}`;
36539
- }
36540
36676
  optimize(optimizer) {
36541
36677
  const leftCost = this.left.optimize(optimizer);
36542
36678
  const rightCost = this.right.optimize(optimizer);
@@ -36578,9 +36714,6 @@ var ScalarNotEquals = class extends ScalarNode {
36578
36714
  getHash() {
36579
36715
  return calculateHash('ScalarNotEquals', this.left, this.right);
36580
36716
  }
36581
- toString() {
36582
- return `${this.left} != ${this.right}`;
36583
- }
36584
36717
  optimize(optimizer) {
36585
36718
  const leftCost = this.left.optimize(optimizer);
36586
36719
  const rightCost = this.right.optimize(optimizer);
@@ -36622,9 +36755,6 @@ var ScalarOr = class extends ScalarNode {
36622
36755
  getHash() {
36623
36756
  return calculateHash('ScalarOr', this.left, this.right);
36624
36757
  }
36625
- toString() {
36626
- return `${this.left} || ${this.right}`;
36627
- }
36628
36758
  optimize(optimizer) {
36629
36759
  const leftCost = this.left.optimize(optimizer);
36630
36760
  const rightCost = this.right.optimize(optimizer);
@@ -36642,7 +36772,7 @@ var ScalarOr = class extends ScalarNode {
36642
36772
  });
36643
36773
  return {
36644
36774
  type: 'boolean',
36645
- value: toBoolean(left) || toBoolean(right),
36775
+ value: valueToBoolean(left) || valueToBoolean(right),
36646
36776
  };
36647
36777
  }
36648
36778
  };
@@ -36670,9 +36800,6 @@ var ScalarStartsWith = class extends ScalarNode {
36670
36800
  getHash() {
36671
36801
  return calculateHash('ScalarStartsWith', this.source, this.target);
36672
36802
  }
36673
- toString() {
36674
- return `STARTS_WITH(${this.source}, ${this.target})`;
36675
- }
36676
36803
  optimize(optimizer) {
36677
36804
  const sourceCost = this.source.optimize(optimizer);
36678
36805
  const targetCost = this.target.optimize(optimizer);
@@ -36697,7 +36824,8 @@ var ScalarStartsWith = class extends ScalarNode {
36697
36824
  var Explorer = class {
36698
36825
  constructor(normalizer) {
36699
36826
  this.normalizer = normalizer;
36700
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'memo', this.normalizer.memo);
36827
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'memo');
36828
+ this.memo = normalizer.memo;
36701
36829
  }
36702
36830
  explore(before) {
36703
36831
  const group = before.getGroup();
@@ -36903,7 +37031,8 @@ var RelationalLimit = class extends RelationalNode {
36903
37031
  this.input = input;
36904
37032
  this.limit = limit;
36905
37033
  this.ordering = ordering;
36906
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
37034
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
37035
+ this.inputGroup = input.getGroup();
36907
37036
  }
36908
37037
  getHash() {
36909
37038
  return calculateHash('RelationalLimit', this.inputGroup.id, this.limit);
@@ -36939,7 +37068,7 @@ var RelationalLimit = class extends RelationalNode {
36939
37068
  input: this.input.evaluate(context),
36940
37069
  limit: this.limit.evaluate(context, void 0),
36941
37070
  });
36942
- const value = toNumber2(limit) ?? Infinity;
37071
+ const value = valueToNumber(limit) ?? Infinity;
36943
37072
  if (value === Infinity)
36944
37073
  return input;
36945
37074
  return input.slice(0, value);
@@ -36951,7 +37080,8 @@ var RelationalOffset = class extends RelationalNode {
36951
37080
  this.input = input;
36952
37081
  this.offset = offset;
36953
37082
  this.ordering = ordering;
36954
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
37083
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
37084
+ this.inputGroup = input.getGroup();
36955
37085
  }
36956
37086
  getHash() {
36957
37087
  return calculateHash('RelationalOffset', this.inputGroup.id, this.offset);
@@ -36987,7 +37117,7 @@ var RelationalOffset = class extends RelationalNode {
36987
37117
  input: this.input.evaluate(context),
36988
37118
  offset: this.offset.evaluate(context, void 0),
36989
37119
  });
36990
- const value = toNumber2(offset) ?? 0;
37120
+ const value = valueToNumber(offset) ?? 0;
36991
37121
  if (value === 0)
36992
37122
  return input;
36993
37123
  return input.slice(value);
@@ -37001,8 +37131,9 @@ var ScalarArray = class extends ScalarNode {
37001
37131
  this.ordering = ordering;
37002
37132
  this.referencedFields = referencedFields;
37003
37133
  this.referencedOuterFields = referencedOuterFields;
37004
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
37134
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
37005
37135
  (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'definition');
37136
+ this.inputGroup = input.getGroup();
37006
37137
  const itemDefinitions = {};
37007
37138
  const namedFieldEntries = Object.entries(namedFields);
37008
37139
  for (const [name, field,] of namedFieldEntries) {
@@ -37026,9 +37157,6 @@ var ScalarArray = class extends ScalarNode {
37026
37157
  }
37027
37158
  return calculateHash('ScalarArray', this.inputGroup.id, namedFieldIds, this.ordering, this.referencedFields, this.referencedOuterFields);
37028
37159
  }
37029
- toString() {
37030
- return `ARRAY(${this.inputGroup.id})`;
37031
- }
37032
37160
  getInputRequiredProps() {
37033
37161
  const resolvedFields = new Fields();
37034
37162
  const fields = Object.values(this.namedFields);
@@ -37082,9 +37210,6 @@ var ScalarCast = class extends ScalarNode {
37082
37210
  getHash() {
37083
37211
  return calculateHash('ScalarCast', this.input, this.definition);
37084
37212
  }
37085
- toString() {
37086
- return `CAST(${this.input} AS ${this.definition.type.toUpperCase()})`;
37087
- }
37088
37213
  optimize(optimizer) {
37089
37214
  return this.input.optimize(optimizer);
37090
37215
  }
@@ -37105,20 +37230,18 @@ var ScalarFlatArray = class extends ScalarNode {
37105
37230
  this.ordering = ordering;
37106
37231
  this.referencedFields = referencedFields;
37107
37232
  this.referencedOuterFields = referencedOuterFields;
37108
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
37233
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
37109
37234
  (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'definition');
37235
+ this.inputGroup = input.getGroup();
37110
37236
  this.definition = {
37111
37237
  type: 'array',
37112
37238
  isNullable: false,
37113
- definition: this.field.definition,
37239
+ definition: field.definition,
37114
37240
  };
37115
37241
  }
37116
37242
  getHash() {
37117
37243
  return calculateHash('ScalarFlatArray', this.inputGroup.id, this.field.id, this.ordering, this.referencedFields, this.referencedOuterFields);
37118
37244
  }
37119
- toString() {
37120
- return `FLAT_ARRAY(${this.inputGroup.id})`;
37121
- }
37122
37245
  getInputRequiredProps() {
37123
37246
  const resolvedFields = new Fields();
37124
37247
  if (!isUndefined(this.field.collection)) {
@@ -37175,9 +37298,6 @@ var ScalarIn = class extends ScalarNode {
37175
37298
  getHash() {
37176
37299
  return calculateHash('ScalarIn', this.left, this.right);
37177
37300
  }
37178
- toString() {
37179
- return `${this.left} IN ${this.right}`;
37180
- }
37181
37301
  optimize(optimizer) {
37182
37302
  const leftCost = this.left.optimize(optimizer);
37183
37303
  const rightCost = this.right.optimize(optimizer);
@@ -37223,9 +37343,6 @@ var ScalarIndexOf = class extends ScalarNode {
37223
37343
  getHash() {
37224
37344
  return calculateHash('ScalarIndexOf', this.source, this.target);
37225
37345
  }
37226
- toString() {
37227
- return `INDEX_OF(${this.source}, ${this.target})`;
37228
- }
37229
37346
  optimize(optimizer) {
37230
37347
  const sourceCost = this.source.optimize(optimizer);
37231
37348
  const targetCost = this.target.optimize(optimizer);
@@ -37259,9 +37376,6 @@ var ScalarLength = class extends ScalarNode {
37259
37376
  getHash() {
37260
37377
  return calculateHash('ScalarLength', this.input);
37261
37378
  }
37262
- toString() {
37263
- return `LENGTH(${this.input})`;
37264
- }
37265
37379
  optimize(optimizer) {
37266
37380
  return this.input.optimize(optimizer);
37267
37381
  }
@@ -37289,9 +37403,6 @@ var ScalarNot = class extends ScalarNode {
37289
37403
  getHash() {
37290
37404
  return calculateHash('ScalarNot', this.input);
37291
37405
  }
37292
- toString() {
37293
- return `NOT ${this.input}`;
37294
- }
37295
37406
  optimize(optimizer) {
37296
37407
  return this.input.optimize(optimizer);
37297
37408
  }
@@ -37303,7 +37414,7 @@ var ScalarNot = class extends ScalarNode {
37303
37414
  const input = yield* this.input.evaluate(context, tuple);
37304
37415
  return {
37305
37416
  type: 'boolean',
37306
- value: !toBoolean(input),
37417
+ value: !valueToBoolean(input),
37307
37418
  };
37308
37419
  }
37309
37420
  };
@@ -37331,9 +37442,6 @@ var ScalarNotIn = class extends ScalarNode {
37331
37442
  getHash() {
37332
37443
  return calculateHash('ScalarNotIn', this.left, this.right);
37333
37444
  }
37334
- toString() {
37335
- return `${this.left} NOT IN ${this.right}`;
37336
- }
37337
37445
  optimize(optimizer) {
37338
37446
  const leftCost = this.left.optimize(optimizer);
37339
37447
  const rightCost = this.right.optimize(optimizer);
@@ -37369,21 +37477,19 @@ var ScalarVariable = class extends ScalarNode {
37369
37477
  super(referencedFields, referencedOuterFields, true);
37370
37478
  this.field = field;
37371
37479
  this.isOuterField = isOuterField;
37372
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'definition', this.field.definition);
37480
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'definition');
37481
+ this.definition = field.definition;
37373
37482
  }
37374
37483
  getHash() {
37375
37484
  return calculateHash('ScalarVariable', this.field.id, this.isOuterField);
37376
37485
  }
37377
- toString() {
37378
- return `"${this.field.name}" /* ${this.field.id} */`;
37379
- }
37380
37486
  optimize() {
37381
37487
  return new Cost(0);
37382
37488
  }
37383
37489
  getOptimized() {
37384
37490
  return this;
37385
37491
  }
37386
- // eslint-disable-next-line require-yield
37492
+ // biome-ignore lint/correctness/useYield: Required by the super class.
37387
37493
  *evaluate(context, tuple) {
37388
37494
  if (this.isOuterField) {
37389
37495
  assert(context, 'Context must exist');
@@ -37701,7 +37807,8 @@ var EnforcerResolve = class extends EnforcerNode {
37701
37807
  super(false);
37702
37808
  this.input = input;
37703
37809
  this.fields = fields;
37704
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
37810
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
37811
+ this.inputGroup = input.getGroup();
37705
37812
  }
37706
37813
  getHash() {
37707
37814
  return calculateHash('EnforcerResolve', this.inputGroup.id, this.fields);
@@ -37785,7 +37892,8 @@ var EnforcerSort = class extends EnforcerNode {
37785
37892
  super(input.isSynchronous);
37786
37893
  this.input = input;
37787
37894
  this.ordering = ordering;
37788
- (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup', this.input.getGroup());
37895
+ (0, chunk_H7SXYDQJ_js_1.__publicField)(this, 'inputGroup');
37896
+ this.inputGroup = input.getGroup();
37789
37897
  }
37790
37898
  getHash() {
37791
37899
  return calculateHash('EnforcerSort', this.inputGroup.id, this.ordering);
@@ -38721,7 +38829,7 @@ function callbackForVariant(map2, variant) {
38721
38829
  return map2.default;
38722
38830
  }
38723
38831
  function useOnVariantChange(variant, callbackMap) {
38724
- const isRenderingStaticContent = useIsStaticRenderer();
38832
+ const isRenderingStaticContent = isStaticRenderer();
38725
38833
  if (isRenderingStaticContent)
38726
38834
  return;
38727
38835
  const isActiveScreenRef = react_11.default.useRef(true);
@@ -42735,7 +42843,7 @@ function getInitialEffectStyle(canPlay, canAnimate2, effect) {
42735
42843
  }
42736
42844
  function useTextEffect(config, ref, preview) {
42737
42845
  const elements = useConstant2(() => /* @__PURE__ */ new Set());
42738
- const isRenderingStaticContent = useIsStaticRenderer();
42846
+ const isRenderingStaticContent = isStaticRenderer();
42739
42847
  const canPlay = preview || !isRenderingStaticContent;
42740
42848
  const state2 = React2.useRef({
42741
42849
  hasMounted: false,
@@ -43750,20 +43858,22 @@ function getSVGSize(svg) {
43750
43858
  height,
43751
43859
  };
43752
43860
  }
43753
- function SVG(props) {
43861
+ var SVG = /* @__PURE__ */ (0, react_4.forwardRef)(function SVG2(props, forwardedRef) {
43754
43862
  const parentSize = useParentSize();
43755
43863
  const layoutId = useLayoutId2(props);
43756
43864
  const layoutRef = react_11.default.useRef(null);
43865
+ const ref = forwardedRef ?? layoutRef;
43757
43866
  const providedWindow = useProvidedWindow();
43758
43867
  useMeasureLayout(props, layoutRef);
43759
43868
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(SVGComponent, {
43760
43869
  ...props,
43761
- innerRef: layoutRef,
43870
+ innerRef: ref,
43762
43871
  parentSize,
43763
43872
  layoutId,
43764
43873
  providedWindow,
43765
43874
  });
43766
- }
43875
+ });
43876
+ exports.SVG = SVG;
43767
43877
  var MAX_BACKGROUND_SVG_TEXT_LENGTH = 5e4;
43768
43878
  function containsImageReference(svg) {
43769
43879
  return svg.indexOf('image') >= 0;
@@ -43955,6 +44065,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
43955
44065
  style: {
43956
44066
  position: 'absolute',
43957
44067
  },
44068
+ role: 'presentation',
43958
44069
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('linearGradient', {
43959
44070
  id: gradientId,
43960
44071
  x1,
@@ -43983,6 +44094,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
43983
44094
  style: {
43984
44095
  position: 'absolute',
43985
44096
  },
44097
+ role: 'presentation',
43986
44098
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('radialGradient', {
43987
44099
  id: gradientId,
43988
44100
  cy: gradient.centerAnchorY,
@@ -44009,6 +44121,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
44009
44121
  style: {
44010
44122
  position: 'absolute',
44011
44123
  },
44124
+ role: 'presentation',
44012
44125
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)('defs', {
44013
44126
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ImagePatternElement, {
44014
44127
  ...imagePattern,