unframer 2.22.0 → 2.22.1

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/esm/framer.js CHANGED
@@ -9693,7 +9693,7 @@ function steps(numSteps, direction = 'end') {
9693
9693
  return clamp(0, 1, rounded / numSteps);
9694
9694
  };
9695
9695
  }
9696
- // /:https://app.framerstatic.com/framer.WEKEHMWW.mjs
9696
+ // /:https://app.framerstatic.com/framer.VDKYGJXW.mjs
9697
9697
  import React4 from 'react';
9698
9698
  import { Suspense as Suspense3, } from 'react';
9699
9699
  import { memo as memo2, startTransition as startTransition2, } from 'react';
@@ -12799,7 +12799,7 @@ var MarkSuspenseEffects = {
12799
12799
  function renderPage(Page4, defaultPageStyle) {
12800
12800
  const props = {
12801
12801
  style: defaultPageStyle,
12802
- 'data-framer-root': true,
12802
+ 'data-framer-root': '',
12803
12803
  };
12804
12804
  return React4.isValidElement(Page4) ? React4.cloneElement(Page4, props) : React4.createElement(Page4, props);
12805
12805
  }
@@ -30054,26 +30054,36 @@ var CustomCursorContext = /* @__PURE__ */ createContext({
30054
30054
  });
30055
30055
  var replaceCursorClassName = 'framer-cursor-none';
30056
30056
  var cursorComponentClassName = 'framer-pointer-events-none';
30057
+ function getActiveDefinitions(map2, previousDefinitions, newDefinitions) {
30058
+ const allCursors = {};
30059
+ for (const [, hashes,] of map2) {
30060
+ for (const hash2 of hashes) {
30061
+ const value = allCursors[hash2] ?? previousDefinitions[hash2] ?? newDefinitions[hash2];
30062
+ if (value)
30063
+ allCursors[hash2] = value;
30064
+ }
30065
+ }
30066
+ return allCursors;
30067
+ }
30057
30068
  var CustomCursorContextProvider = /* @__PURE__ */ memo2(function CustomCursorList({ children, }) {
30058
30069
  const value = useConstant2(() => {
30059
30070
  const events = /* @__PURE__ */ new Set();
30060
30071
  let allCursors = {};
30072
+ const byCaller = /* @__PURE__ */ new Map();
30061
30073
  return {
30062
30074
  onRegisterCursors: (callback) => {
30063
30075
  callback(allCursors);
30064
30076
  events.add(callback);
30065
30077
  return () => events.delete(callback);
30066
30078
  },
30067
- registerCursors: (cursors) => {
30068
- const nextCursors = {};
30069
- for (const key7 in cursors) {
30070
- const cursor = allCursors[key7] ?? cursors[key7];
30071
- if (cursor)
30072
- nextCursors[key7] = cursor;
30073
- }
30074
- allCursors = nextCursors;
30079
+ registerCursors: (cursors, id3) => {
30080
+ byCaller.set(id3, Object.keys(cursors));
30081
+ allCursors = getActiveDefinitions(byCaller, allCursors, cursors);
30075
30082
  for (const callback of events)
30076
30083
  callback(allCursors);
30084
+ return () => {
30085
+ byCaller.delete(id3);
30086
+ };
30077
30087
  },
30078
30088
  };
30079
30089
  });
@@ -30321,9 +30331,10 @@ var CustomCursorComponent = /* @__PURE__ */ memo2(function CustomCursorComponent
30321
30331
  function useCustomCursors(webPageCursors) {
30322
30332
  const { registerCursors, } = useContext(CustomCursorContext);
30323
30333
  const cursors = useConstant2(() => webPageCursors);
30334
+ const id3 = useId();
30324
30335
  useLayoutEffect(() => {
30325
- registerCursors(cursors);
30326
- }, [registerCursors,]);
30336
+ return registerCursors(cursors, id3);
30337
+ }, [registerCursors, id3,]);
30327
30338
  }
30328
30339
  var Polygon = {
30329
30340
  /**
@@ -33382,6 +33393,22 @@ var CompatibilityDatabaseCollection = class {
33382
33393
  return Number(left.pointer) - Number(right.pointer);
33383
33394
  }
33384
33395
  };
33396
+ function compareArray(left, right, collation11) {
33397
+ const leftLength = left.value.length;
33398
+ const rightLength = right.value.length;
33399
+ if (leftLength < rightLength)
33400
+ return -1;
33401
+ if (leftLength > rightLength)
33402
+ return 1;
33403
+ for (let i = 0; i < leftLength; i++) {
33404
+ const leftItem = left.value[i];
33405
+ const rightItem = right.value[i];
33406
+ const result = compare(leftItem, rightItem, collation11);
33407
+ if (result !== 0)
33408
+ return result;
33409
+ }
33410
+ return 0;
33411
+ }
33385
33412
  function castArray(value, definition) {
33386
33413
  switch (value == null ? void 0 : value.type) {
33387
33414
  case 'array': {
@@ -33396,6 +33423,13 @@ function castArray(value, definition) {
33396
33423
  }
33397
33424
  return null;
33398
33425
  }
33426
+ function compareBoolean(left, right) {
33427
+ if (left.value < right.value)
33428
+ return -1;
33429
+ if (left.value > right.value)
33430
+ return 1;
33431
+ return 0;
33432
+ }
33399
33433
  function castBoolean(value) {
33400
33434
  switch (value == null ? void 0 : value.type) {
33401
33435
  case 'boolean': {
@@ -33411,10 +33445,17 @@ function castBoolean(value) {
33411
33445
  }
33412
33446
  return null;
33413
33447
  }
33414
- function toBoolean(value) {
33448
+ function valueToBoolean(value) {
33415
33449
  const cast = castBoolean(value);
33416
33450
  return (cast == null ? void 0 : cast.value) ?? false;
33417
33451
  }
33452
+ function compareColor(left, right) {
33453
+ if (left.value < right.value)
33454
+ return -1;
33455
+ if (left.value > right.value)
33456
+ return 1;
33457
+ return 0;
33458
+ }
33418
33459
  function castColor(value) {
33419
33460
  switch (value == null ? void 0 : value.type) {
33420
33461
  case 'color': {
@@ -33423,6 +33464,15 @@ function castColor(value) {
33423
33464
  }
33424
33465
  return null;
33425
33466
  }
33467
+ function compareDate(left, right) {
33468
+ const leftDate = new Date(left.value);
33469
+ const rightDate = new Date(right.value);
33470
+ if (leftDate < rightDate)
33471
+ return -1;
33472
+ if (leftDate > rightDate)
33473
+ return 1;
33474
+ return 0;
33475
+ }
33426
33476
  function castDate(value) {
33427
33477
  switch (value == null ? void 0 : value.type) {
33428
33478
  case 'date': {
@@ -33442,6 +33492,13 @@ function castDate(value) {
33442
33492
  }
33443
33493
  return null;
33444
33494
  }
33495
+ function compareEnum(left, right) {
33496
+ if (left.value < right.value)
33497
+ return -1;
33498
+ if (left.value > right.value)
33499
+ return 1;
33500
+ return 0;
33501
+ }
33445
33502
  function castEnum(value) {
33446
33503
  switch (value == null ? void 0 : value.type) {
33447
33504
  case 'enum': {
@@ -33456,6 +33513,13 @@ function castEnum(value) {
33456
33513
  }
33457
33514
  return null;
33458
33515
  }
33516
+ function compareFile(left, right) {
33517
+ if (left.value < right.value)
33518
+ return -1;
33519
+ if (left.value > right.value)
33520
+ return 1;
33521
+ return 0;
33522
+ }
33459
33523
  function castFile(value) {
33460
33524
  switch (value == null ? void 0 : value.type) {
33461
33525
  case 'file': {
@@ -33464,6 +33528,15 @@ function castFile(value) {
33464
33528
  }
33465
33529
  return null;
33466
33530
  }
33531
+ function compareLink(left, right) {
33532
+ const leftEncoded = JSON.stringify(left.value);
33533
+ const rightEncoded = JSON.stringify(right.value);
33534
+ if (leftEncoded < rightEncoded)
33535
+ return -1;
33536
+ if (leftEncoded > rightEncoded)
33537
+ return 1;
33538
+ return 0;
33539
+ }
33467
33540
  function castLink(value) {
33468
33541
  switch (value == null ? void 0 : value.type) {
33469
33542
  case 'link': {
@@ -33487,6 +33560,13 @@ function castLink(value) {
33487
33560
  }
33488
33561
  return null;
33489
33562
  }
33563
+ function compareNumber(left, right) {
33564
+ if (left.value < right.value)
33565
+ return -1;
33566
+ if (left.value > right.value)
33567
+ return 1;
33568
+ return 0;
33569
+ }
33490
33570
  function castNumber(value) {
33491
33571
  switch (value == null ? void 0 : value.type) {
33492
33572
  case 'number':
@@ -33503,10 +33583,32 @@ function castNumber(value) {
33503
33583
  }
33504
33584
  return null;
33505
33585
  }
33506
- function toNumber2(value) {
33586
+ function valueToNumber(value) {
33507
33587
  const cast = castNumber(value);
33508
33588
  return (cast == null ? void 0 : cast.value) ?? null;
33509
33589
  }
33590
+ function compareObject(left, right, collation11) {
33591
+ const leftKeys = Object.keys(left.value).sort();
33592
+ const rightKeys = Object.keys(right.value).sort();
33593
+ if (leftKeys.length < rightKeys.length)
33594
+ return -1;
33595
+ if (leftKeys.length > rightKeys.length)
33596
+ return 1;
33597
+ for (let i = 0; i < leftKeys.length; i++) {
33598
+ const leftKey = leftKeys[i];
33599
+ const rightKey = rightKeys[i];
33600
+ if (leftKey < rightKey)
33601
+ return -1;
33602
+ if (leftKey > rightKey)
33603
+ return 1;
33604
+ const leftValue = left.value[leftKey] ?? null;
33605
+ const rightValue = right.value[rightKey] ?? null;
33606
+ const result = compare(leftValue, rightValue, collation11);
33607
+ if (result !== 0)
33608
+ return result;
33609
+ }
33610
+ return 0;
33611
+ }
33510
33612
  function castObject(value, definition) {
33511
33613
  switch (value == null ? void 0 : value.type) {
33512
33614
  case 'object': {
@@ -33524,6 +33626,15 @@ function castObject(value, definition) {
33524
33626
  }
33525
33627
  return null;
33526
33628
  }
33629
+ function compareResponsiveImage(left, right) {
33630
+ const leftEncoded = JSON.stringify(left.value);
33631
+ const rightEncoded = JSON.stringify(right.value);
33632
+ if (leftEncoded < rightEncoded)
33633
+ return -1;
33634
+ if (leftEncoded > rightEncoded)
33635
+ return 1;
33636
+ return 0;
33637
+ }
33527
33638
  function castResponsiveImage(value) {
33528
33639
  switch (value == null ? void 0 : value.type) {
33529
33640
  case 'responsiveimage': {
@@ -33532,6 +33643,15 @@ function castResponsiveImage(value) {
33532
33643
  }
33533
33644
  return null;
33534
33645
  }
33646
+ function compareRichText(left, right) {
33647
+ const leftValue = left.value;
33648
+ const rightValue = right.value;
33649
+ if (leftValue < rightValue)
33650
+ return -1;
33651
+ if (leftValue > rightValue)
33652
+ return 1;
33653
+ return 0;
33654
+ }
33535
33655
  function castRichText(value) {
33536
33656
  switch (value == null ? void 0 : value.type) {
33537
33657
  case 'richtext': {
@@ -33540,6 +33660,19 @@ function castRichText(value) {
33540
33660
  }
33541
33661
  return null;
33542
33662
  }
33663
+ function compareString(left, right, collation11) {
33664
+ let leftValue = left.value;
33665
+ let rightValue = right.value;
33666
+ if (collation11.type === 0) {
33667
+ leftValue = left.value.toLowerCase();
33668
+ rightValue = right.value.toLowerCase();
33669
+ }
33670
+ if (leftValue < rightValue)
33671
+ return -1;
33672
+ if (leftValue > rightValue)
33673
+ return 1;
33674
+ return 0;
33675
+ }
33543
33676
  function castString(value) {
33544
33677
  switch (value == null ? void 0 : value.type) {
33545
33678
  case 'string': {
@@ -33554,7 +33687,7 @@ function castString(value) {
33554
33687
  }
33555
33688
  return null;
33556
33689
  }
33557
- function toString(value) {
33690
+ function valueToString(value) {
33558
33691
  const cast = castString(value);
33559
33692
  return (cast == null ? void 0 : cast.value) ?? null;
33560
33693
  }
@@ -33704,8 +33837,8 @@ var DatabaseValue = {
33704
33837
  });
33705
33838
  },
33706
33839
  contains(source, target, collation11) {
33707
- let sourceValue = toString(source);
33708
- let targetValue = toString(target);
33840
+ let sourceValue = valueToString(source);
33841
+ let targetValue = valueToString(target);
33709
33842
  if (isNull(sourceValue))
33710
33843
  return false;
33711
33844
  if (isNull(targetValue))
@@ -33717,8 +33850,8 @@ var DatabaseValue = {
33717
33850
  return sourceValue.includes(targetValue);
33718
33851
  },
33719
33852
  startsWith(source, target, collation11) {
33720
- let sourceValue = toString(source);
33721
- let targetValue = toString(target);
33853
+ let sourceValue = valueToString(source);
33854
+ let targetValue = valueToString(target);
33722
33855
  if (isNull(sourceValue))
33723
33856
  return false;
33724
33857
  if (isNull(targetValue))
@@ -33730,8 +33863,8 @@ var DatabaseValue = {
33730
33863
  return sourceValue.startsWith(targetValue);
33731
33864
  },
33732
33865
  endsWith(source, target, collation11) {
33733
- let sourceValue = toString(source);
33734
- let targetValue = toString(target);
33866
+ let sourceValue = valueToString(source);
33867
+ let targetValue = valueToString(target);
33735
33868
  if (isNull(sourceValue))
33736
33869
  return false;
33737
33870
  if (isNull(targetValue))
@@ -33790,143 +33923,51 @@ function compare(left, right, collation11) {
33790
33923
  switch (left.type) {
33791
33924
  case 'array': {
33792
33925
  assert(left.type === right.type);
33793
- const leftLength = left.value.length;
33794
- const rightLength = right.value.length;
33795
- if (leftLength < rightLength)
33796
- return -1;
33797
- if (leftLength > rightLength)
33798
- return 1;
33799
- for (let i = 0; i < leftLength; i++) {
33800
- const leftItem = left.value[i];
33801
- const rightItem = right.value[i];
33802
- assert(!isUndefined(leftItem), 'Left item must exist');
33803
- assert(!isUndefined(rightItem), 'Right item must exist');
33804
- const result = compare(leftItem, rightItem, collation11);
33805
- if (result !== 0)
33806
- return result;
33807
- }
33808
- return 0;
33926
+ return compareArray(left, right, collation11);
33809
33927
  }
33810
33928
  case 'boolean': {
33811
33929
  assert(left.type === right.type);
33812
- if (left.value < right.value)
33813
- return -1;
33814
- if (left.value > right.value)
33815
- return 1;
33816
- return 0;
33930
+ return compareBoolean(left, right);
33817
33931
  }
33818
33932
  case 'color': {
33819
33933
  assert(left.type === right.type);
33820
- if (left.value < right.value)
33821
- return -1;
33822
- if (left.value > right.value)
33823
- return 1;
33824
- return 0;
33934
+ return compareColor(left, right);
33825
33935
  }
33826
33936
  case 'date': {
33827
33937
  assert(left.type === right.type);
33828
- const leftDate = new Date(left.value);
33829
- const rightDate = new Date(right.value);
33830
- if (leftDate < rightDate)
33831
- return -1;
33832
- if (leftDate > rightDate)
33833
- return 1;
33834
- return 0;
33938
+ return compareDate(left, right);
33835
33939
  }
33836
33940
  case 'enum': {
33837
33941
  assert(left.type === right.type);
33838
- if (left.value < right.value)
33839
- return -1;
33840
- if (left.value > right.value)
33841
- return 1;
33842
- return 0;
33942
+ return compareEnum(left, right);
33843
33943
  }
33844
33944
  case 'file': {
33845
33945
  assert(left.type === right.type);
33846
- if (left.value < right.value)
33847
- return -1;
33848
- if (left.value > right.value)
33849
- return 1;
33850
- return 0;
33946
+ return compareFile(left, right);
33851
33947
  }
33852
33948
  case 'link': {
33853
33949
  assert(left.type === right.type);
33854
- const leftEncoded = JSON.stringify(left.value);
33855
- const rightEncoded = JSON.stringify(right.value);
33856
- if (leftEncoded < rightEncoded)
33857
- return -1;
33858
- if (leftEncoded > rightEncoded)
33859
- return 1;
33860
- return 0;
33950
+ return compareLink(left, right);
33861
33951
  }
33862
33952
  case 'number': {
33863
33953
  assert(left.type === right.type);
33864
- if (left.value < right.value)
33865
- return -1;
33866
- if (left.value > right.value)
33867
- return 1;
33868
- return 0;
33954
+ return compareNumber(left, right);
33869
33955
  }
33870
33956
  case 'object': {
33871
33957
  assert(left.type === right.type);
33872
- const leftKeys = Object.keys(left.value).sort();
33873
- const rightKeys = Object.keys(right.value).sort();
33874
- if (leftKeys.length < rightKeys.length)
33875
- return -1;
33876
- if (leftKeys.length > rightKeys.length)
33877
- return 1;
33878
- for (let i = 0; i < leftKeys.length; i++) {
33879
- const leftKey = leftKeys[i];
33880
- const rightKey = rightKeys[i];
33881
- assert(!isUndefined(leftKey), 'Left key must exist');
33882
- assert(!isUndefined(rightKey), 'Left key must exist');
33883
- if (leftKey < rightKey)
33884
- return -1;
33885
- if (leftKey > rightKey)
33886
- return 1;
33887
- const leftValue = left.value[leftKey];
33888
- const rightValue = right.value[rightKey];
33889
- assert(!isUndefined(leftValue), 'Left value must exist');
33890
- assert(!isUndefined(rightValue), 'Right value must exist');
33891
- const result = compare(leftValue, rightValue, collation11);
33892
- if (result !== 0)
33893
- return result;
33894
- }
33895
- return 0;
33958
+ return compareObject(left, right, collation11);
33896
33959
  }
33897
33960
  case 'responsiveimage': {
33898
33961
  assert(left.type === right.type);
33899
- const leftEncoded = JSON.stringify(left.value);
33900
- const rightEncoded = JSON.stringify(right.value);
33901
- if (leftEncoded < rightEncoded)
33902
- return -1;
33903
- if (leftEncoded > rightEncoded)
33904
- return 1;
33905
- return 0;
33962
+ return compareResponsiveImage(left, right);
33906
33963
  }
33907
33964
  case 'richtext': {
33908
33965
  assert(left.type === right.type);
33909
- const leftValue = left.value;
33910
- const rightValue = right.value;
33911
- if (leftValue < rightValue)
33912
- return -1;
33913
- if (leftValue > rightValue)
33914
- return 1;
33915
- return 0;
33966
+ return compareRichText(left, right);
33916
33967
  }
33917
33968
  case 'string': {
33918
33969
  assert(left.type === right.type);
33919
- let leftValue = left.value;
33920
- let rightValue = right.value;
33921
- if (collation11.type === 0) {
33922
- leftValue = left.value.toLowerCase();
33923
- rightValue = right.value.toLowerCase();
33924
- }
33925
- if (leftValue < rightValue)
33926
- return -1;
33927
- if (leftValue > rightValue)
33928
- return 1;
33929
- return 0;
33970
+ return compareString(left, right, collation11);
33930
33971
  }
33931
33972
  default: {
33932
33973
  assertNever(left);
@@ -34637,7 +34678,8 @@ var RelationalProject = class extends RelationalNode {
34637
34678
  this.input = input;
34638
34679
  this.projections = projections;
34639
34680
  this.passthrough = passthrough;
34640
- __publicField(this, 'inputGroup', this.input.getGroup());
34681
+ __publicField(this, 'inputGroup');
34682
+ this.inputGroup = input.getGroup();
34641
34683
  }
34642
34684
  getHash() {
34643
34685
  return calculateHash('RelationalProject', this.inputGroup.id, ...this.projections, this.passthrough);
@@ -34790,19 +34832,6 @@ var ScalarCase = class extends ScalarNode {
34790
34832
  getHash() {
34791
34833
  return calculateHash('ScalarCase', this.input, ...this.conditions, this.otherwise);
34792
34834
  }
34793
- toString() {
34794
- let result = 'CASE';
34795
- if (this.input) {
34796
- result = `${result} ${this.input}`;
34797
- }
34798
- for (const { when, then, } of this.conditions) {
34799
- result = `${result} WHEN ${when} THEN ${then}`;
34800
- }
34801
- if (this.otherwise) {
34802
- result = `${result} ELSE ${this.otherwise}`;
34803
- }
34804
- return `${result} END`;
34805
- }
34806
34835
  optimize(optimizer) {
34807
34836
  var _a, _b;
34808
34837
  (_a = this.input) == null ? void 0 : _a.optimize(optimizer);
@@ -34830,6 +34859,7 @@ var ScalarCase = class extends ScalarNode {
34830
34859
  input: ((_a = this.input) == null ? void 0 : _a.evaluate(context, tuple)) ?? null,
34831
34860
  conditions: evaluateArray(this.conditions.map((condition) => evaluateObject({
34832
34861
  when: condition.when.evaluate(context, tuple),
34862
+ // biome-ignore lint/suspicious/noThenProperty: Existing name.
34833
34863
  then: condition.then.evaluate(context, tuple),
34834
34864
  }))),
34835
34865
  otherwise: ((_b = this.otherwise) == null ? void 0 : _b.evaluate(context, tuple)) ?? null,
@@ -34843,7 +34873,7 @@ var ScalarCase = class extends ScalarNode {
34843
34873
  }
34844
34874
  else {
34845
34875
  for (const { when, then, } of conditions) {
34846
- if (toBoolean(when)) {
34876
+ if (valueToBoolean(when)) {
34847
34877
  return then;
34848
34878
  }
34849
34879
  }
@@ -35289,7 +35319,8 @@ var RelationalFilter = class extends RelationalNode {
35289
35319
  super(input.isSynchronous && predicate.isSynchronous);
35290
35320
  this.input = input;
35291
35321
  this.predicate = predicate;
35292
- __publicField(this, 'inputGroup', this.input.getGroup());
35322
+ __publicField(this, 'inputGroup');
35323
+ this.inputGroup = input.getGroup();
35293
35324
  }
35294
35325
  getHash() {
35295
35326
  return calculateHash('RelationalFilter', this.inputGroup.id, this.predicate);
@@ -35327,7 +35358,7 @@ var RelationalFilter = class extends RelationalNode {
35327
35358
  }));
35328
35359
  return input.filter((_, index) => {
35329
35360
  const predicate = predicates[index] ?? null;
35330
- return toBoolean(predicate);
35361
+ return valueToBoolean(predicate);
35331
35362
  });
35332
35363
  }
35333
35364
  };
@@ -35378,8 +35409,10 @@ var RelationalIntersection = class extends RelationalNode {
35378
35409
  super(left.isSynchronous && right.isSynchronous);
35379
35410
  this.left = left;
35380
35411
  this.right = right;
35381
- __publicField(this, 'leftGroup', this.left.getGroup());
35382
- __publicField(this, 'rightGroup', this.right.getGroup());
35412
+ __publicField(this, 'leftGroup');
35413
+ __publicField(this, 'rightGroup');
35414
+ this.leftGroup = left.getGroup();
35415
+ this.rightGroup = right.getGroup();
35383
35416
  }
35384
35417
  getHash() {
35385
35418
  return calculateHash('RelationalIntersection', this.leftGroup.id, this.rightGroup.id);
@@ -35447,9 +35480,6 @@ var ScalarEquals = class extends ScalarNode {
35447
35480
  getHash() {
35448
35481
  return calculateHash('ScalarEquals', this.left, this.right);
35449
35482
  }
35450
- toString() {
35451
- return `${this.left} == ${this.right}`;
35452
- }
35453
35483
  optimize(optimizer) {
35454
35484
  const leftCost = this.left.optimize(optimizer);
35455
35485
  const rightCost = this.right.optimize(optimizer);
@@ -35477,8 +35507,10 @@ var RelationalLeftJoin = class extends RelationalNode {
35477
35507
  this.left = left;
35478
35508
  this.right = right;
35479
35509
  this.constraint = constraint;
35480
- __publicField(this, 'leftGroup', this.left.getGroup());
35481
- __publicField(this, 'rightGroup', this.right.getGroup());
35510
+ __publicField(this, 'leftGroup');
35511
+ __publicField(this, 'rightGroup');
35512
+ this.leftGroup = left.getGroup();
35513
+ this.rightGroup = right.getGroup();
35482
35514
  }
35483
35515
  getHash() {
35484
35516
  return calculateHash('RelationalLeftJoin', this.leftGroup.id, this.rightGroup.id, this.constraint);
@@ -35581,7 +35613,7 @@ var RelationalLeftJoin = class extends RelationalNode {
35581
35613
  tuple.merge(leftTuple);
35582
35614
  tuple.merge(rightTuple);
35583
35615
  const value = yield* this.constraint.evaluate(context, tuple);
35584
- if (toBoolean(value)) {
35616
+ if (valueToBoolean(value)) {
35585
35617
  result.push(tuple);
35586
35618
  hasMatch = true;
35587
35619
  }
@@ -35599,8 +35631,10 @@ var RelationalRightJoin = class extends RelationalNode {
35599
35631
  this.left = left;
35600
35632
  this.right = right;
35601
35633
  this.constraint = constraint;
35602
- __publicField(this, 'leftGroup', this.left.getGroup());
35603
- __publicField(this, 'rightGroup', this.right.getGroup());
35634
+ __publicField(this, 'leftGroup');
35635
+ __publicField(this, 'rightGroup');
35636
+ this.leftGroup = left.getGroup();
35637
+ this.rightGroup = right.getGroup();
35604
35638
  }
35605
35639
  getHash() {
35606
35640
  return calculateHash('RelationalRightJoin', this.leftGroup.id, this.rightGroup.id, this.constraint);
@@ -35703,7 +35737,7 @@ var RelationalRightJoin = class extends RelationalNode {
35703
35737
  tuple.merge(rightTuple);
35704
35738
  tuple.merge(leftTuple);
35705
35739
  const value = yield* this.constraint.evaluate(context, tuple);
35706
- if (toBoolean(value)) {
35740
+ if (valueToBoolean(value)) {
35707
35741
  result.push(tuple);
35708
35742
  hasMatch = true;
35709
35743
  }
@@ -35759,8 +35793,10 @@ var RelationalUnion = class extends RelationalNode {
35759
35793
  super(left.isSynchronous && right.isSynchronous);
35760
35794
  this.left = left;
35761
35795
  this.right = right;
35762
- __publicField(this, 'leftGroup', this.left.getGroup());
35763
- __publicField(this, 'rightGroup', this.right.getGroup());
35796
+ __publicField(this, 'leftGroup');
35797
+ __publicField(this, 'rightGroup');
35798
+ this.leftGroup = left.getGroup();
35799
+ this.rightGroup = right.getGroup();
35764
35800
  }
35765
35801
  getHash() {
35766
35802
  return calculateHash('RelationalUnion', this.leftGroup.id, this.rightGroup.id);
@@ -35828,9 +35864,6 @@ var ScalarAnd = class extends ScalarNode {
35828
35864
  getHash() {
35829
35865
  return calculateHash('ScalarAnd', this.left, this.right);
35830
35866
  }
35831
- toString() {
35832
- return `${this.left} && ${this.right}`;
35833
- }
35834
35867
  optimize(optimizer) {
35835
35868
  const leftCost = this.left.optimize(optimizer);
35836
35869
  const rightCost = this.right.optimize(optimizer);
@@ -35848,7 +35881,7 @@ var ScalarAnd = class extends ScalarNode {
35848
35881
  });
35849
35882
  return {
35850
35883
  type: 'boolean',
35851
- value: toBoolean(left) && toBoolean(right),
35884
+ value: valueToBoolean(left) && valueToBoolean(right),
35852
35885
  };
35853
35886
  }
35854
35887
  };
@@ -35863,16 +35896,13 @@ var ScalarConstant = class extends ScalarNode {
35863
35896
  getHash() {
35864
35897
  return calculateHash('ScalarConstant', this.definition, this.value);
35865
35898
  }
35866
- toString() {
35867
- return DatabaseValue.stringify(this.value);
35868
- }
35869
35899
  optimize() {
35870
35900
  return new Cost(0);
35871
35901
  }
35872
35902
  getOptimized() {
35873
35903
  return this;
35874
35904
  }
35875
- // eslint-disable-next-line require-yield
35905
+ // biome-ignore lint/correctness/useYield: Required by the super class.
35876
35906
  *evaluate() {
35877
35907
  return this.value;
35878
35908
  }
@@ -35901,9 +35931,6 @@ var ScalarContains = class extends ScalarNode {
35901
35931
  getHash() {
35902
35932
  return calculateHash('ScalarContains', this.source, this.target);
35903
35933
  }
35904
- toString() {
35905
- return `CONTAINS(${this.source}, ${this.target})`;
35906
- }
35907
35934
  optimize(optimizer) {
35908
35935
  const sourceCost = this.source.optimize(optimizer);
35909
35936
  const targetCost = this.target.optimize(optimizer);
@@ -35949,9 +35976,6 @@ var ScalarEndsWith = class extends ScalarNode {
35949
35976
  getHash() {
35950
35977
  return calculateHash('ScalarEndsWith', this.source, this.target);
35951
35978
  }
35952
- toString() {
35953
- return `ENDS_WITH(${this.source}, ${this.target})`;
35954
- }
35955
35979
  optimize(optimizer) {
35956
35980
  const sourceCost = this.source.optimize(optimizer);
35957
35981
  const targetCost = this.target.optimize(optimizer);
@@ -35993,9 +36017,6 @@ var ScalarGreaterThan = class extends ScalarNode {
35993
36017
  getHash() {
35994
36018
  return calculateHash('ScalarGreaterThan', this.left, this.right);
35995
36019
  }
35996
- toString() {
35997
- return `${this.left} > ${this.right}`;
35998
- }
35999
36020
  optimize(optimizer) {
36000
36021
  const leftCost = this.left.optimize(optimizer);
36001
36022
  const rightCost = this.right.optimize(optimizer);
@@ -36037,9 +36058,6 @@ var ScalarGreaterThanOrEqual = class extends ScalarNode {
36037
36058
  getHash() {
36038
36059
  return calculateHash('ScalarGreaterThanOrEqual', this.left, this.right);
36039
36060
  }
36040
- toString() {
36041
- return `${this.left} >= ${this.right}`;
36042
- }
36043
36061
  optimize(optimizer) {
36044
36062
  const leftCost = this.left.optimize(optimizer);
36045
36063
  const rightCost = this.right.optimize(optimizer);
@@ -36081,9 +36099,6 @@ var ScalarLessThan = class extends ScalarNode {
36081
36099
  getHash() {
36082
36100
  return calculateHash('ScalarLessThan', this.left, this.right);
36083
36101
  }
36084
- toString() {
36085
- return `${this.left} < ${this.right}`;
36086
- }
36087
36102
  optimize(optimizer) {
36088
36103
  const leftCost = this.left.optimize(optimizer);
36089
36104
  const rightCost = this.right.optimize(optimizer);
@@ -36125,9 +36140,6 @@ var ScalarLessThanOrEqual = class extends ScalarNode {
36125
36140
  getHash() {
36126
36141
  return calculateHash('ScalarLessThanOrEqual', this.left, this.right);
36127
36142
  }
36128
- toString() {
36129
- return `${this.left} <= ${this.right}`;
36130
- }
36131
36143
  optimize(optimizer) {
36132
36144
  const leftCost = this.left.optimize(optimizer);
36133
36145
  const rightCost = this.right.optimize(optimizer);
@@ -36169,9 +36181,6 @@ var ScalarNotEquals = class extends ScalarNode {
36169
36181
  getHash() {
36170
36182
  return calculateHash('ScalarNotEquals', this.left, this.right);
36171
36183
  }
36172
- toString() {
36173
- return `${this.left} != ${this.right}`;
36174
- }
36175
36184
  optimize(optimizer) {
36176
36185
  const leftCost = this.left.optimize(optimizer);
36177
36186
  const rightCost = this.right.optimize(optimizer);
@@ -36213,9 +36222,6 @@ var ScalarOr = class extends ScalarNode {
36213
36222
  getHash() {
36214
36223
  return calculateHash('ScalarOr', this.left, this.right);
36215
36224
  }
36216
- toString() {
36217
- return `${this.left} || ${this.right}`;
36218
- }
36219
36225
  optimize(optimizer) {
36220
36226
  const leftCost = this.left.optimize(optimizer);
36221
36227
  const rightCost = this.right.optimize(optimizer);
@@ -36233,7 +36239,7 @@ var ScalarOr = class extends ScalarNode {
36233
36239
  });
36234
36240
  return {
36235
36241
  type: 'boolean',
36236
- value: toBoolean(left) || toBoolean(right),
36242
+ value: valueToBoolean(left) || valueToBoolean(right),
36237
36243
  };
36238
36244
  }
36239
36245
  };
@@ -36261,9 +36267,6 @@ var ScalarStartsWith = class extends ScalarNode {
36261
36267
  getHash() {
36262
36268
  return calculateHash('ScalarStartsWith', this.source, this.target);
36263
36269
  }
36264
- toString() {
36265
- return `STARTS_WITH(${this.source}, ${this.target})`;
36266
- }
36267
36270
  optimize(optimizer) {
36268
36271
  const sourceCost = this.source.optimize(optimizer);
36269
36272
  const targetCost = this.target.optimize(optimizer);
@@ -36288,7 +36291,8 @@ var ScalarStartsWith = class extends ScalarNode {
36288
36291
  var Explorer = class {
36289
36292
  constructor(normalizer) {
36290
36293
  this.normalizer = normalizer;
36291
- __publicField(this, 'memo', this.normalizer.memo);
36294
+ __publicField(this, 'memo');
36295
+ this.memo = normalizer.memo;
36292
36296
  }
36293
36297
  explore(before) {
36294
36298
  const group = before.getGroup();
@@ -36494,7 +36498,8 @@ var RelationalLimit = class extends RelationalNode {
36494
36498
  this.input = input;
36495
36499
  this.limit = limit;
36496
36500
  this.ordering = ordering;
36497
- __publicField(this, 'inputGroup', this.input.getGroup());
36501
+ __publicField(this, 'inputGroup');
36502
+ this.inputGroup = input.getGroup();
36498
36503
  }
36499
36504
  getHash() {
36500
36505
  return calculateHash('RelationalLimit', this.inputGroup.id, this.limit);
@@ -36530,7 +36535,7 @@ var RelationalLimit = class extends RelationalNode {
36530
36535
  input: this.input.evaluate(context),
36531
36536
  limit: this.limit.evaluate(context, void 0),
36532
36537
  });
36533
- const value = toNumber2(limit) ?? Infinity;
36538
+ const value = valueToNumber(limit) ?? Infinity;
36534
36539
  if (value === Infinity)
36535
36540
  return input;
36536
36541
  return input.slice(0, value);
@@ -36542,7 +36547,8 @@ var RelationalOffset = class extends RelationalNode {
36542
36547
  this.input = input;
36543
36548
  this.offset = offset;
36544
36549
  this.ordering = ordering;
36545
- __publicField(this, 'inputGroup', this.input.getGroup());
36550
+ __publicField(this, 'inputGroup');
36551
+ this.inputGroup = input.getGroup();
36546
36552
  }
36547
36553
  getHash() {
36548
36554
  return calculateHash('RelationalOffset', this.inputGroup.id, this.offset);
@@ -36578,7 +36584,7 @@ var RelationalOffset = class extends RelationalNode {
36578
36584
  input: this.input.evaluate(context),
36579
36585
  offset: this.offset.evaluate(context, void 0),
36580
36586
  });
36581
- const value = toNumber2(offset) ?? 0;
36587
+ const value = valueToNumber(offset) ?? 0;
36582
36588
  if (value === 0)
36583
36589
  return input;
36584
36590
  return input.slice(value);
@@ -36592,8 +36598,9 @@ var ScalarArray = class extends ScalarNode {
36592
36598
  this.ordering = ordering;
36593
36599
  this.referencedFields = referencedFields;
36594
36600
  this.referencedOuterFields = referencedOuterFields;
36595
- __publicField(this, 'inputGroup', this.input.getGroup());
36601
+ __publicField(this, 'inputGroup');
36596
36602
  __publicField(this, 'definition');
36603
+ this.inputGroup = input.getGroup();
36597
36604
  const itemDefinitions = {};
36598
36605
  const namedFieldEntries = Object.entries(namedFields);
36599
36606
  for (const [name, field,] of namedFieldEntries) {
@@ -36617,9 +36624,6 @@ var ScalarArray = class extends ScalarNode {
36617
36624
  }
36618
36625
  return calculateHash('ScalarArray', this.inputGroup.id, namedFieldIds, this.ordering, this.referencedFields, this.referencedOuterFields);
36619
36626
  }
36620
- toString() {
36621
- return `ARRAY(${this.inputGroup.id})`;
36622
- }
36623
36627
  getInputRequiredProps() {
36624
36628
  const resolvedFields = new Fields();
36625
36629
  const fields = Object.values(this.namedFields);
@@ -36673,9 +36677,6 @@ var ScalarCast = class extends ScalarNode {
36673
36677
  getHash() {
36674
36678
  return calculateHash('ScalarCast', this.input, this.definition);
36675
36679
  }
36676
- toString() {
36677
- return `CAST(${this.input} AS ${this.definition.type.toUpperCase()})`;
36678
- }
36679
36680
  optimize(optimizer) {
36680
36681
  return this.input.optimize(optimizer);
36681
36682
  }
@@ -36696,20 +36697,18 @@ var ScalarFlatArray = class extends ScalarNode {
36696
36697
  this.ordering = ordering;
36697
36698
  this.referencedFields = referencedFields;
36698
36699
  this.referencedOuterFields = referencedOuterFields;
36699
- __publicField(this, 'inputGroup', this.input.getGroup());
36700
+ __publicField(this, 'inputGroup');
36700
36701
  __publicField(this, 'definition');
36702
+ this.inputGroup = input.getGroup();
36701
36703
  this.definition = {
36702
36704
  type: 'array',
36703
36705
  isNullable: false,
36704
- definition: this.field.definition,
36706
+ definition: field.definition,
36705
36707
  };
36706
36708
  }
36707
36709
  getHash() {
36708
36710
  return calculateHash('ScalarFlatArray', this.inputGroup.id, this.field.id, this.ordering, this.referencedFields, this.referencedOuterFields);
36709
36711
  }
36710
- toString() {
36711
- return `FLAT_ARRAY(${this.inputGroup.id})`;
36712
- }
36713
36712
  getInputRequiredProps() {
36714
36713
  const resolvedFields = new Fields();
36715
36714
  if (!isUndefined(this.field.collection)) {
@@ -36766,9 +36765,6 @@ var ScalarIn = class extends ScalarNode {
36766
36765
  getHash() {
36767
36766
  return calculateHash('ScalarIn', this.left, this.right);
36768
36767
  }
36769
- toString() {
36770
- return `${this.left} IN ${this.right}`;
36771
- }
36772
36768
  optimize(optimizer) {
36773
36769
  const leftCost = this.left.optimize(optimizer);
36774
36770
  const rightCost = this.right.optimize(optimizer);
@@ -36814,9 +36810,6 @@ var ScalarIndexOf = class extends ScalarNode {
36814
36810
  getHash() {
36815
36811
  return calculateHash('ScalarIndexOf', this.source, this.target);
36816
36812
  }
36817
- toString() {
36818
- return `INDEX_OF(${this.source}, ${this.target})`;
36819
- }
36820
36813
  optimize(optimizer) {
36821
36814
  const sourceCost = this.source.optimize(optimizer);
36822
36815
  const targetCost = this.target.optimize(optimizer);
@@ -36850,9 +36843,6 @@ var ScalarLength = class extends ScalarNode {
36850
36843
  getHash() {
36851
36844
  return calculateHash('ScalarLength', this.input);
36852
36845
  }
36853
- toString() {
36854
- return `LENGTH(${this.input})`;
36855
- }
36856
36846
  optimize(optimizer) {
36857
36847
  return this.input.optimize(optimizer);
36858
36848
  }
@@ -36880,9 +36870,6 @@ var ScalarNot = class extends ScalarNode {
36880
36870
  getHash() {
36881
36871
  return calculateHash('ScalarNot', this.input);
36882
36872
  }
36883
- toString() {
36884
- return `NOT ${this.input}`;
36885
- }
36886
36873
  optimize(optimizer) {
36887
36874
  return this.input.optimize(optimizer);
36888
36875
  }
@@ -36894,7 +36881,7 @@ var ScalarNot = class extends ScalarNode {
36894
36881
  const input = yield* this.input.evaluate(context, tuple);
36895
36882
  return {
36896
36883
  type: 'boolean',
36897
- value: !toBoolean(input),
36884
+ value: !valueToBoolean(input),
36898
36885
  };
36899
36886
  }
36900
36887
  };
@@ -36922,9 +36909,6 @@ var ScalarNotIn = class extends ScalarNode {
36922
36909
  getHash() {
36923
36910
  return calculateHash('ScalarNotIn', this.left, this.right);
36924
36911
  }
36925
- toString() {
36926
- return `${this.left} NOT IN ${this.right}`;
36927
- }
36928
36912
  optimize(optimizer) {
36929
36913
  const leftCost = this.left.optimize(optimizer);
36930
36914
  const rightCost = this.right.optimize(optimizer);
@@ -36960,21 +36944,19 @@ var ScalarVariable = class extends ScalarNode {
36960
36944
  super(referencedFields, referencedOuterFields, true);
36961
36945
  this.field = field;
36962
36946
  this.isOuterField = isOuterField;
36963
- __publicField(this, 'definition', this.field.definition);
36947
+ __publicField(this, 'definition');
36948
+ this.definition = field.definition;
36964
36949
  }
36965
36950
  getHash() {
36966
36951
  return calculateHash('ScalarVariable', this.field.id, this.isOuterField);
36967
36952
  }
36968
- toString() {
36969
- return `"${this.field.name}" /* ${this.field.id} */`;
36970
- }
36971
36953
  optimize() {
36972
36954
  return new Cost(0);
36973
36955
  }
36974
36956
  getOptimized() {
36975
36957
  return this;
36976
36958
  }
36977
- // eslint-disable-next-line require-yield
36959
+ // biome-ignore lint/correctness/useYield: Required by the super class.
36978
36960
  *evaluate(context, tuple) {
36979
36961
  if (this.isOuterField) {
36980
36962
  assert(context, 'Context must exist');
@@ -37292,7 +37274,8 @@ var EnforcerResolve = class extends EnforcerNode {
37292
37274
  super(false);
37293
37275
  this.input = input;
37294
37276
  this.fields = fields;
37295
- __publicField(this, 'inputGroup', this.input.getGroup());
37277
+ __publicField(this, 'inputGroup');
37278
+ this.inputGroup = input.getGroup();
37296
37279
  }
37297
37280
  getHash() {
37298
37281
  return calculateHash('EnforcerResolve', this.inputGroup.id, this.fields);
@@ -37376,7 +37359,8 @@ var EnforcerSort = class extends EnforcerNode {
37376
37359
  super(input.isSynchronous);
37377
37360
  this.input = input;
37378
37361
  this.ordering = ordering;
37379
- __publicField(this, 'inputGroup', this.input.getGroup());
37362
+ __publicField(this, 'inputGroup');
37363
+ this.inputGroup = input.getGroup();
37380
37364
  }
37381
37365
  getHash() {
37382
37366
  return calculateHash('EnforcerSort', this.inputGroup.id, this.ordering);