@stndrds/schema 1.0.0-alpha.280 → 1.0.0-alpha.282

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.
Files changed (75) hide show
  1. package/dist/{all-Ig0ig9wp.d.ts → all-C3EaFLCU.d.ts} +7 -17
  2. package/dist/{all-C0hXd79K.d.mts → all-CQMswOrw.d.mts} +7 -17
  3. package/dist/{attributes-D8eHv5Kf.d.ts → attributes-CU871AfG.d.ts} +12 -12
  4. package/dist/{attributes--M1ifW8_.d.mts → attributes-DoiGyNFk.d.mts} +12 -12
  5. package/dist/{chunk-FAEOVIDJ.js → chunk-DIMTNM3F.js} +7 -3
  6. package/dist/{chunk-NUEIGMYS.mjs → chunk-EFSS7PGC.mjs} +1 -1
  7. package/dist/{chunk-XDA5PZRT.mjs → chunk-HOVUEYEQ.mjs} +34 -0
  8. package/dist/{chunk-MXYCCUNB.js → chunk-KIMECN6D.js} +68 -44
  9. package/dist/{chunk-M3WFXOA4.js → chunk-L4KLYMUI.js} +34 -0
  10. package/dist/{chunk-XTBGGJ3G.js → chunk-LBGLB443.js} +3 -3
  11. package/dist/{chunk-PUMM6SPY.mjs → chunk-PLTLAMWJ.mjs} +1 -1
  12. package/dist/{chunk-TBAD2T7Q.mjs → chunk-QGRYOIHT.mjs} +37 -13
  13. package/dist/{chunk-MSIGO7JA.mjs → chunk-R34LOMT7.mjs} +5 -1
  14. package/dist/{chunk-3PGLMGTR.js → chunk-V4MZOTLV.js} +4 -4
  15. package/dist/exceptions.d.mts +22 -3
  16. package/dist/exceptions.d.ts +22 -3
  17. package/dist/exceptions.js +39 -39
  18. package/dist/exceptions.mjs +1 -1
  19. package/dist/{helpers-DyoPqiSz.d.ts → helpers-BNr-Dppk.d.ts} +3 -3
  20. package/dist/{helpers-BiABdSxK.d.mts → helpers-CfEOUBmB.d.mts} +3 -3
  21. package/dist/{index-SpFpkWVC.d.ts → index-Br7koyHF.d.ts} +53 -27
  22. package/dist/{index-C3P5Dnwt.d.mts → index-D9XBjFnu.d.mts} +53 -27
  23. package/dist/index.d.mts +568 -151
  24. package/dist/index.d.ts +568 -151
  25. package/dist/index.js +1389 -292
  26. package/dist/index.mjs +1174 -99
  27. package/dist/{migrations-B1kkIhIX.d.ts → migrations-BGWgXHXb.d.ts} +1 -1
  28. package/dist/{migrations-BNlQVzDC.d.mts → migrations-C-GN1xx_.d.mts} +1 -1
  29. package/dist/{objects-DmMqHn3L.d.mts → objects-BRypaBpi.d.mts} +2 -4
  30. package/dist/{objects-DgFojgwH.d.ts → objects-BiOMwzLL.d.ts} +2 -4
  31. package/dist/{types-DHqXzkgW.d.mts → types-80c2rOUZ.d.mts} +1 -1
  32. package/dist/{types-DYYFto8d.d.ts → types-DqYz8Iv_.d.ts} +1 -1
  33. package/dist/utils.js +8 -8
  34. package/dist/utils.mjs +2 -2
  35. package/dist/validation/all.d.mts +7 -7
  36. package/dist/validation/all.d.ts +7 -7
  37. package/dist/validation/all.js +29 -29
  38. package/dist/validation/all.mjs +4 -4
  39. package/dist/validation/complex/currency.d.mts +2 -2
  40. package/dist/validation/complex/currency.d.ts +2 -2
  41. package/dist/validation/complex/location.d.mts +2 -2
  42. package/dist/validation/complex/location.d.ts +2 -2
  43. package/dist/validation/complex/phone.d.mts +2 -2
  44. package/dist/validation/complex/phone.d.ts +2 -2
  45. package/dist/validation/complex/relation.d.mts +2 -2
  46. package/dist/validation/complex/relation.d.ts +2 -2
  47. package/dist/validation/complex/richtext.d.mts +2 -2
  48. package/dist/validation/complex/richtext.d.ts +2 -2
  49. package/dist/validation/complex/select.d.mts +2 -2
  50. package/dist/validation/complex/select.d.ts +2 -2
  51. package/dist/validation/complex/user.d.mts +2 -2
  52. package/dist/validation/complex/user.d.ts +2 -2
  53. package/dist/validation/computed/formula.d.mts +2 -2
  54. package/dist/validation/computed/formula.d.ts +2 -2
  55. package/dist/validation/computed/rollup.d.mts +2 -2
  56. package/dist/validation/computed/rollup.d.ts +2 -2
  57. package/dist/validation/config/index.d.mts +4 -4
  58. package/dist/validation/config/index.d.ts +4 -4
  59. package/dist/validation/config/index.js +11 -11
  60. package/dist/validation/config/index.mjs +2 -2
  61. package/dist/validation/core/index.d.mts +3 -3
  62. package/dist/validation/core/index.d.ts +3 -3
  63. package/dist/validation/object/index.d.mts +5 -5
  64. package/dist/validation/object/index.d.ts +5 -5
  65. package/dist/validation/object/index.js +14 -14
  66. package/dist/validation/object/index.mjs +2 -2
  67. package/dist/validation/primitives/checkbox.d.mts +2 -2
  68. package/dist/validation/primitives/checkbox.d.ts +2 -2
  69. package/dist/validation/primitives/date.d.mts +2 -2
  70. package/dist/validation/primitives/date.d.ts +2 -2
  71. package/dist/validation/primitives/number.d.mts +2 -2
  72. package/dist/validation/primitives/number.d.ts +2 -2
  73. package/dist/validation/primitives/text.d.mts +2 -2
  74. package/dist/validation/primitives/text.d.ts +2 -2
  75. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkXTBGGJ3G_js = require('./chunk-XTBGGJ3G.js');
4
- var chunkMXYCCUNB_js = require('./chunk-MXYCCUNB.js');
5
- var chunkFAEOVIDJ_js = require('./chunk-FAEOVIDJ.js');
6
- var chunk3PGLMGTR_js = require('./chunk-3PGLMGTR.js');
3
+ var chunkLBGLB443_js = require('./chunk-LBGLB443.js');
4
+ var chunkKIMECN6D_js = require('./chunk-KIMECN6D.js');
5
+ var chunkDIMTNM3F_js = require('./chunk-DIMTNM3F.js');
6
+ var chunkV4MZOTLV_js = require('./chunk-V4MZOTLV.js');
7
7
  require('./chunk-EW5XR2X3.js');
8
8
  require('./chunk-QWKLQRBX.js');
9
9
  require('./chunk-KNGWHQLR.js');
@@ -13,7 +13,7 @@ var chunk5WATIVCA_js = require('./chunk-5WATIVCA.js');
13
13
  var chunkSI34M4IC_js = require('./chunk-SI34M4IC.js');
14
14
  var chunkYIP5FJ5H_js = require('./chunk-YIP5FJ5H.js');
15
15
  var chunkZPFOKBIN_js = require('./chunk-ZPFOKBIN.js');
16
- var chunkM3WFXOA4_js = require('./chunk-M3WFXOA4.js');
16
+ var chunkL4KLYMUI_js = require('./chunk-L4KLYMUI.js');
17
17
  require('./chunk-ACKMC6FL.js');
18
18
  require('./chunk-E6JUYGJX.js');
19
19
  var chunkQ4SZAMJT_js = require('./chunk-Q4SZAMJT.js');
@@ -81,7 +81,7 @@ function inferInverseCardinality(cardinality) {
81
81
  return cardinality === "one" ? "many" : "many";
82
82
  }
83
83
  function isAttributeSortable2(attr) {
84
- return chunkMXYCCUNB_js.isAttributeSortable(attr);
84
+ return chunkKIMECN6D_js.isAttributeSortable(attr);
85
85
  }
86
86
 
87
87
  // src/types/audit.ts
@@ -148,14 +148,14 @@ function sessionStateToLegacyStatus(state) {
148
148
  return "idle";
149
149
  case "parked":
150
150
  if (state.parkedOn === void 0) {
151
- throw new chunkM3WFXOA4_js.SchemaError("parked state without parkedOn", chunkM3WFXOA4_js.SchemaErrorCode.INVARIANT_VIOLATION);
151
+ throw new chunkL4KLYMUI_js.SchemaError("parked state without parkedOn", chunkL4KLYMUI_js.SchemaErrorCode.INVARIANT_VIOLATION);
152
152
  }
153
153
  return state.parkedOn === "agents" ? "waiting_agents" : "waiting_human";
154
154
  case "terminal":
155
155
  if (state.outcome === void 0) {
156
- throw new chunkM3WFXOA4_js.SchemaError(
156
+ throw new chunkL4KLYMUI_js.SchemaError(
157
157
  "terminal state without outcome",
158
- chunkM3WFXOA4_js.SchemaErrorCode.INVARIANT_VIOLATION
158
+ chunkL4KLYMUI_js.SchemaErrorCode.INVARIANT_VIOLATION
159
159
  );
160
160
  }
161
161
  return state.outcome;
@@ -185,6 +185,18 @@ var SESSION_TERMINAL_STATUSES = [
185
185
  function isTerminalSessionStatus(status2) {
186
186
  return SESSION_TERMINAL_STATUSES.includes(status2);
187
187
  }
188
+ var CLAIMABLE_SESSION_STATUSES = [
189
+ "idle",
190
+ "completed",
191
+ "waiting_human",
192
+ "waiting_agents",
193
+ "cancelled",
194
+ "failed",
195
+ "timeout"
196
+ ];
197
+ function isClaimableSessionStatus(status2) {
198
+ return CLAIMABLE_SESSION_STATUSES.includes(status2);
199
+ }
188
200
  var DEFAULT_APPROVAL_POLICY = Object.freeze({
189
201
  mutation: "ask",
190
202
  destructive: "ask",
@@ -194,6 +206,18 @@ var TODO_PLAN_STATUSES = ["active", "completed", "abandoned"];
194
206
  function agentDisplayName(agent2) {
195
207
  return agent2.label?.trim() || agent2.name;
196
208
  }
209
+ var TOOL_APPROVAL_STATES = [
210
+ "approval-requested",
211
+ "approval-responded",
212
+ "approval-dispatched"
213
+ ];
214
+ var OPEN_TOOL_PART_STATES = ["streaming", "running", ...TOOL_APPROVAL_STATES];
215
+ function isOpenToolPartState(state) {
216
+ return OPEN_TOOL_PART_STATES.includes(state);
217
+ }
218
+ function isToolApprovalState(state) {
219
+ return TOOL_APPROVAL_STATES.includes(state);
220
+ }
197
221
  var TODO_STATUSES = ["pending", "in_progress", "completed", "blocked"];
198
222
  var MAX_TODOS = 50;
199
223
  var MAX_TODO_ID_CHARS = 80;
@@ -205,7 +229,7 @@ var NATIVE_AGENT_UI_PART_IDS_METADATA_KEY = "__stndrdsNativeUiPartIds";
205
229
  var NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION = 1;
206
230
  var INVALID_NATIVE_PART_IDS = "Native agent UI part IDs metadata is invalid";
207
231
  function invalidNativePartIds() {
208
- throw new chunkM3WFXOA4_js.ValidationError(INVALID_NATIVE_PART_IDS, []);
232
+ throw new chunkL4KLYMUI_js.ValidationError(INVALID_NATIVE_PART_IDS, []);
209
233
  }
210
234
  function isPlainRecord(value) {
211
235
  if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
@@ -297,6 +321,15 @@ function resolveFieldRequired(input) {
297
321
  function getSlotFieldTargets(field) {
298
322
  return field.additionalSlotIds?.length ? [field.slotId, ...field.additionalSlotIds] : [field.slotId];
299
323
  }
324
+ function formFieldKey(field) {
325
+ return isFormSlotFieldRef(field) ? `${field.slotId}.${field.attribute}` : `free.${field.attribute.name}`;
326
+ }
327
+ function formFieldFlatKey(field) {
328
+ return isFormSlotFieldRef(field) ? field.attribute : field.attribute.name;
329
+ }
330
+ function readFormFieldValue(values, field) {
331
+ return values[formFieldKey(field)] ?? values[formFieldFlatKey(field)];
332
+ }
300
333
 
301
334
  // src/types/forms/rows.ts
302
335
  function isFormFieldsRow(row) {
@@ -376,9 +409,6 @@ function isListView(view) {
376
409
  function isFieldGroup(group2) {
377
410
  return group2.type === "fields";
378
411
  }
379
- function isRelationGroup(group2) {
380
- return group2.type === "relation";
381
- }
382
412
 
383
413
  // src/types/pagination.ts
384
414
  var COUNT_MODES = ["none", "estimated", "exact"];
@@ -386,9 +416,8 @@ function parseCountMode(value) {
386
416
  if (typeof value === "string" && COUNT_MODES.includes(value)) {
387
417
  return value;
388
418
  }
389
- throw new chunkM3WFXOA4_js.ValidationError(
390
- // biome-ignore lint/style/useTemplate: see the comment above.
391
- "countMode must be one of: " + COUNT_MODES.join(", ") + " (received: " + String(value) + ")",
419
+ throw new chunkL4KLYMUI_js.ValidationError(
420
+ `countMode must be one of: ${COUNT_MODES.join(", ")} (received: ${String(value)})`,
392
421
  []
393
422
  );
394
423
  }
@@ -493,7 +522,7 @@ function isDateRangeValue(value) {
493
522
  return typeof value === "object" && value !== null && typeof value.start === "string";
494
523
  }
495
524
  function normalizeDateValue(value, attr) {
496
- if (chunk3PGLMGTR_js.isNullishOrEmptyString(value)) return null;
525
+ if (chunkV4MZOTLV_js.isNullishOrEmptyString(value)) return null;
497
526
  if (isDateRangeValue(value)) {
498
527
  return attr.endDate ? { start: value.start, end: value.end ?? null } : value.start;
499
528
  }
@@ -631,7 +660,7 @@ function formatMultiselect(value, attribute) {
631
660
  return value.join(", ");
632
661
  }
633
662
  function formatAttributeValue(value, attribute) {
634
- if (chunk3PGLMGTR_js.isNullishOrEmptyString(value)) {
663
+ if (chunkV4MZOTLV_js.isNullishOrEmptyString(value)) {
635
664
  return EMPTY_VALUE_PLACEHOLDER;
636
665
  }
637
666
  switch (attribute.type) {
@@ -784,7 +813,7 @@ function renderLabelExpression(template, values, fallback = DEFAULT_LABEL_FALLBA
784
813
  break;
785
814
  }
786
815
  }
787
- const isEmpty2 = chunk3PGLMGTR_js.isNullishOrEmptyString(value);
816
+ const isEmpty2 = chunkV4MZOTLV_js.isNullishOrEmptyString(value);
788
817
  if (isEmpty2 && pipes.length === 0) return "";
789
818
  for (const pipeExpr of pipes) {
790
819
  const { name: pipeName, args } = parsePipeExpression(pipeExpr);
@@ -860,8 +889,14 @@ function relationPropertyDefs(attribute) {
860
889
  if (attribute?.type !== "relation") return void 0;
861
890
  return attribute.properties?.definitions;
862
891
  }
892
+ function qualifiedPropertyDefs(attribute) {
893
+ if (attribute?.type === "relation" || attribute?.type === "document") {
894
+ return attribute.properties?.definitions;
895
+ }
896
+ return void 0;
897
+ }
863
898
  function extractValueRefs(value) {
864
- if (chunk3PGLMGTR_js.isNullishOrEmptyString(value)) return [];
899
+ if (chunkV4MZOTLV_js.isNullishOrEmptyString(value)) return [];
865
900
  if (typeof value === "string") return [{ id: value }];
866
901
  if (Array.isArray(value)) return value.flatMap((item) => extractValueRefs(item));
867
902
  if (typeof value === "object" && "id" in value) {
@@ -1065,24 +1100,24 @@ function validateObjectName(name) {
1065
1100
  OBJECT_NAME_SCHEMA.parse(name);
1066
1101
  } catch (error) {
1067
1102
  if (error instanceof z2__default.default.ZodError) {
1068
- throw new chunkM3WFXOA4_js.SchemaError(error.issues[0].message, chunkM3WFXOA4_js.SchemaErrorCode.INVALID_OBJECT_NAME);
1103
+ throw new chunkL4KLYMUI_js.SchemaError(error.issues[0].message, chunkL4KLYMUI_js.SchemaErrorCode.INVALID_OBJECT_NAME);
1069
1104
  }
1070
1105
  throw error;
1071
1106
  }
1072
1107
  }
1073
1108
  function validateViewName(name) {
1074
1109
  if (!name || name.length === 0) {
1075
- throw new chunkM3WFXOA4_js.ValidationError("View name cannot be empty", [
1110
+ throw new chunkL4KLYMUI_js.ValidationError("View name cannot be empty", [
1076
1111
  { path: ["name"], message: "View name cannot be empty" }
1077
1112
  ]);
1078
1113
  }
1079
1114
  if (name.length > MAX_NAME_LENGTH) {
1080
- throw new chunkM3WFXOA4_js.ValidationError("View name is too long", [
1115
+ throw new chunkL4KLYMUI_js.ValidationError("View name is too long", [
1081
1116
  { path: ["name"], message: `View name is too long (max ${MAX_NAME_LENGTH} characters)` }
1082
1117
  ]);
1083
1118
  }
1084
1119
  if (!VIEW_NAME_REGEX.test(name)) {
1085
- throw new chunkM3WFXOA4_js.ValidationError("Invalid view name format", [
1120
+ throw new chunkL4KLYMUI_js.ValidationError("Invalid view name format", [
1086
1121
  {
1087
1122
  path: ["name"],
1088
1123
  message: "View name must be in kebab-case (e.g., 'detail', 'list-view')"
@@ -1114,10 +1149,10 @@ function validateAttributeName(name) {
1114
1149
  "[AttributeBuilder] Invalid attribute name format.\nName must be a valid variable identifier:\n \u2705 Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'\n \u274C Invalid: 'first-name', 'first name', '123name', 'first.name'"
1115
1150
  );
1116
1151
  }
1117
- if (chunkMXYCCUNB_js.RESERVED_ATTRIBUTE_NAMES.includes(name)) {
1152
+ if (chunkKIMECN6D_js.RESERVED_ATTRIBUTE_NAMES.includes(name)) {
1118
1153
  throw new Error(
1119
1154
  `[AttributeBuilder] "${name}" is a reserved name and cannot be used as an attribute name.
1120
- Reserved names: ${chunkMXYCCUNB_js.RESERVED_ATTRIBUTE_NAMES.join(", ")}`
1155
+ Reserved names: ${chunkKIMECN6D_js.RESERVED_ATTRIBUTE_NAMES.join(", ")}`
1121
1156
  );
1122
1157
  }
1123
1158
  }
@@ -1184,7 +1219,7 @@ var DEFAULT_AGENT_EXECUTION_CONFIG = {
1184
1219
  var AgentBuilder = class {
1185
1220
  constructor(config) {
1186
1221
  if (!config.name || config.name.trim().length === 0) {
1187
- throw new chunkM3WFXOA4_js.ValidationError("Agent name is required", []);
1222
+ throw new chunkL4KLYMUI_js.ValidationError("Agent name is required", []);
1188
1223
  }
1189
1224
  this.bp = { name: config.name, system: true, visibility: "workspace", triggers: [] };
1190
1225
  }
@@ -1318,13 +1353,13 @@ var AgentBuilder = class {
1318
1353
  }
1319
1354
  build() {
1320
1355
  if (!this.bp.systemPrompt) {
1321
- throw new chunkM3WFXOA4_js.ValidationError(`Agent "${this.bp.name}": systemPrompt is required`, []);
1356
+ throw new chunkL4KLYMUI_js.ValidationError(`Agent "${this.bp.name}": systemPrompt is required`, []);
1322
1357
  }
1323
1358
  if (!this.bp.model) {
1324
- throw new chunkM3WFXOA4_js.ValidationError(`Agent "${this.bp.name}": model is required`, []);
1359
+ throw new chunkL4KLYMUI_js.ValidationError(`Agent "${this.bp.name}": model is required`, []);
1325
1360
  }
1326
1361
  if (this.bp.system && this.bp.visibility === "private") {
1327
- throw new chunkM3WFXOA4_js.ValidationError(
1362
+ throw new chunkL4KLYMUI_js.ValidationError(
1328
1363
  `Agent "${this.bp.name}": system agents must use workspace visibility`,
1329
1364
  []
1330
1365
  );
@@ -1332,7 +1367,7 @@ var AgentBuilder = class {
1332
1367
  assertUniqueBy(
1333
1368
  this.bp.triggers,
1334
1369
  (t) => t.name,
1335
- (name) => new chunkM3WFXOA4_js.ValidationError(`Agent "${this.bp.name}": duplicate trigger name "${name}"`, [])
1370
+ (name) => new chunkL4KLYMUI_js.ValidationError(`Agent "${this.bp.name}": duplicate trigger name "${name}"`, [])
1336
1371
  );
1337
1372
  return {
1338
1373
  ...this.bp,
@@ -1387,7 +1422,7 @@ var BaseAttributeBuilder = class {
1387
1422
  * @see https://standardschema.dev/
1388
1423
  */
1389
1424
  get "~standard"() {
1390
- const zodSchema = chunk3PGLMGTR_js.createAttributeValidator(this.build());
1425
+ const zodSchema = chunkV4MZOTLV_js.createAttributeValidator(this.build());
1391
1426
  return createStandardSchemaProps(zodSchema);
1392
1427
  }
1393
1428
  constructor(type, name, label) {
@@ -2123,6 +2158,16 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
2123
2158
  this.attr.targetAttributeOptions = options;
2124
2159
  return this;
2125
2160
  }
2161
+ /**
2162
+ * Set the currency code a sum/avg over a currency target renders with
2163
+ * (#2644). Mirror of the target attribute's `defaultCurrency` — the stored
2164
+ * value stays a bare number; this only carries the symbol to the screen.
2165
+ * @param code - ISO 4217 code (e.g. "EUR")
2166
+ */
2167
+ targetCurrency(code) {
2168
+ this.attr.targetCurrencyCode = code;
2169
+ return this;
2170
+ }
2126
2171
  /**
2127
2172
  * Build the attribute, validating computed-field configuration eagerly so a
2128
2173
  * misconfiguration surfaces at schema-definition time (with a fix-it hint)
@@ -2134,9 +2179,9 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
2134
2179
  if (fn === "original" && targetType !== void 0 && targetType !== "select" && targetType !== "status" && targetType !== "multiselect") {
2135
2180
  const relation2 = this.attr.relationAttribute ?? "relation";
2136
2181
  const target = this.attr.targetAttribute ?? "field";
2137
- throw new chunkM3WFXOA4_js.SchemaError(
2182
+ throw new chunkL4KLYMUI_js.SchemaError(
2138
2183
  `Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${targetType}") was given. To surface a plain ${targetType} value from a related record, use a formula instead \u2014 e.g. formula({ name: "${this.attr.name}", label: "\u2026" }).expression("${relation2}.${target}").`,
2139
- chunkM3WFXOA4_js.SchemaErrorCode.VALIDATION_FAILED
2184
+ chunkL4KLYMUI_js.SchemaErrorCode.VALIDATION_FAILED
2140
2185
  );
2141
2186
  }
2142
2187
  return super.build();
@@ -2646,7 +2691,7 @@ var ObjectBuilder = class {
2646
2691
  * @see https://standardschema.dev/
2647
2692
  */
2648
2693
  get "~standard"() {
2649
- const zodSchema = chunk3PGLMGTR_js.createObjectValidator(this.build());
2694
+ const zodSchema = chunkV4MZOTLV_js.createObjectValidator(this.build());
2650
2695
  return createStandardSchemaProps(zodSchema);
2651
2696
  }
2652
2697
  /**
@@ -2774,7 +2819,7 @@ var ObjectBuilder = class {
2774
2819
  assertUniqueBy(
2775
2820
  [...this.obj.attributes, ...finalAttrs],
2776
2821
  (attribute) => attribute.name,
2777
- (name) => new chunkM3WFXOA4_js.DuplicateError(
2822
+ (name) => new chunkL4KLYMUI_js.DuplicateError(
2778
2823
  "attribute",
2779
2824
  name,
2780
2825
  `Object "${this.obj.name}": duplicate attribute name "${name}"`
@@ -2799,6 +2844,21 @@ var ObjectBuilder = class {
2799
2844
  this.obj.metadata = { ...this.obj.metadata, order: value };
2800
2845
  return this;
2801
2846
  }
2847
+ /**
2848
+ * Hide this object from navigation surfaces — the sidebar data section and
2849
+ * the command palette, which already honour `metadata.hidden`. For objects
2850
+ * that own a dedicated surface: `drives` has the Drive page, so listing it
2851
+ * beside business objects would offer the same thing twice under two
2852
+ * different affordances.
2853
+ *
2854
+ * The object stays whole everywhere else: API, search, permissions, agent
2855
+ * tools, filters and record pages all continue to see it. This hides a
2856
+ * navigation entry; it never restricts access.
2857
+ */
2858
+ hidden() {
2859
+ this.obj.metadata = { ...this.obj.metadata, hidden: true };
2860
+ return this;
2861
+ }
2802
2862
  /**
2803
2863
  * Set the label expression template for displaying records
2804
2864
  * This is REQUIRED for every object.
@@ -2888,26 +2948,26 @@ var ObjectBuilder = class {
2888
2948
  throw new Error("[ObjectBuilder] Missing required field: label");
2889
2949
  }
2890
2950
  if (!this._labelExpression) {
2891
- throw new chunkM3WFXOA4_js.SchemaError(
2951
+ throw new chunkL4KLYMUI_js.SchemaError(
2892
2952
  `Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
2893
- chunkM3WFXOA4_js.SchemaErrorCode.VALIDATION_FAILED
2953
+ chunkL4KLYMUI_js.SchemaErrorCode.VALIDATION_FAILED
2894
2954
  );
2895
2955
  }
2896
2956
  const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
2897
2957
  if (!labelResult.success) {
2898
2958
  const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
2899
- throw new chunkM3WFXOA4_js.SchemaError(
2959
+ throw new chunkL4KLYMUI_js.SchemaError(
2900
2960
  `Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
2901
- chunkM3WFXOA4_js.SchemaErrorCode.VALIDATION_FAILED
2961
+ chunkL4KLYMUI_js.SchemaErrorCode.VALIDATION_FAILED
2902
2962
  );
2903
2963
  }
2904
2964
  if (this._embeddingExpression !== void 0) {
2905
2965
  const embeddingResult = labelExpressionSchema.safeParse(this._embeddingExpression);
2906
2966
  if (!embeddingResult.success) {
2907
2967
  const errorMsg = embeddingResult.error.issues[0]?.message ?? "Invalid embeddingExpression";
2908
- throw new chunkM3WFXOA4_js.SchemaError(
2968
+ throw new chunkL4KLYMUI_js.SchemaError(
2909
2969
  `Invalid embeddingExpression for "${this.obj.name}": ${errorMsg}`,
2910
- chunkM3WFXOA4_js.SchemaErrorCode.VALIDATION_FAILED
2970
+ chunkL4KLYMUI_js.SchemaErrorCode.VALIDATION_FAILED
2911
2971
  );
2912
2972
  }
2913
2973
  }
@@ -2949,7 +3009,7 @@ function object(config) {
2949
3009
  }
2950
3010
  function validatePresetStructure(presetId, nodes, depth) {
2951
3011
  const fail = (message, detail) => {
2952
- throw new chunkM3WFXOA4_js.ValidationError(message, [
3012
+ throw new chunkL4KLYMUI_js.ValidationError(message, [
2953
3013
  { path: ["documentLayout", "presets", presetId], message: detail }
2954
3014
  ]);
2955
3015
  };
@@ -3048,74 +3108,6 @@ var GroupBuilder = class {
3048
3108
  return this.data;
3049
3109
  }
3050
3110
  };
3051
- var RelationGroupBuilder = class {
3052
- constructor(id, label, attribute) {
3053
- this.data = { type: "relation" };
3054
- this.data.id = id;
3055
- this.data.label = label;
3056
- this.data.attribute = attribute;
3057
- }
3058
- /**
3059
- * Set group description
3060
- */
3061
- description(value) {
3062
- this.data.description = value;
3063
- return this;
3064
- }
3065
- /**
3066
- * Make group collapsible
3067
- * @param collapsed - Initial collapsed state (default: false)
3068
- */
3069
- collapsible(collapsed = false) {
3070
- this.data.collapsible = true;
3071
- this.data.collapsed = collapsed;
3072
- return this;
3073
- }
3074
- /**
3075
- * Set display order
3076
- */
3077
- order(value) {
3078
- this.data.order = value;
3079
- return this;
3080
- }
3081
- /**
3082
- * Set columns to display in the relations table
3083
- * @example .columns("name", "email", "phone")
3084
- */
3085
- columns(...names) {
3086
- this.data.columns = names;
3087
- return this;
3088
- }
3089
- /**
3090
- * Set the group as read-only (no add/remove/edit)
3091
- */
3092
- readOnly(value = true) {
3093
- this.data.readOnly = value;
3094
- return this;
3095
- }
3096
- /**
3097
- * Allow creating new related records inline
3098
- */
3099
- allowCreate(value = true) {
3100
- this.data.allowCreate = value;
3101
- return this;
3102
- }
3103
- /**
3104
- * Build the relation group definition
3105
- */
3106
- build() {
3107
- if (!this.data.id) {
3108
- throw new Error("[RelationGroupBuilder] id is required");
3109
- }
3110
- if (!this.data.label) {
3111
- throw new Error("[RelationGroupBuilder] label is required");
3112
- }
3113
- if (!this.data.attribute) {
3114
- throw new Error("[RelationGroupBuilder] attribute is required");
3115
- }
3116
- return this.data;
3117
- }
3118
- };
3119
3111
  var TableTabConfig = class {
3120
3112
  /** @internal */
3121
3113
  constructor(view, tabData) {
@@ -3466,7 +3458,7 @@ var TabBuilder = class {
3466
3458
  // ─────────────────────────────────────────────────────────────────────────
3467
3459
  /**
3468
3460
  * Create a form tab with groups
3469
- * @example .form(group("info", "Info").fields("name", "email"), relationGroup("contacts", "Contacts", "contacts"))
3461
+ * @example .form(group("info", "Info").fields("name", "email"))
3470
3462
  */
3471
3463
  form(...groups) {
3472
3464
  if (groups.length === 0) {
@@ -3477,9 +3469,7 @@ var TabBuilder = class {
3477
3469
  const tab = {
3478
3470
  ...this.base,
3479
3471
  type: "form",
3480
- groups: groups.map(
3481
- (g) => g instanceof GroupBuilder || g instanceof RelationGroupBuilder ? g.build() : g
3482
- )
3472
+ groups: groups.map((g) => g instanceof GroupBuilder ? g.build() : g)
3483
3473
  };
3484
3474
  return this.view._addTab(tab);
3485
3475
  }
@@ -3790,7 +3780,7 @@ var ListViewBuilder = class {
3790
3780
  }
3791
3781
  const config = {
3792
3782
  defaultFilters: this.data.defaultFilters ? {
3793
- id: chunkXTBGGJ3G_js.generateId(),
3783
+ id: chunkLBGLB443_js.generateId(),
3794
3784
  combinator: this.data.defaultFilters.combinator,
3795
3785
  rules: this.data.defaultFilters.rules
3796
3786
  } : void 0,
@@ -3805,7 +3795,7 @@ var ListViewBuilder = class {
3805
3795
  visibility: tab.visibility,
3806
3796
  columns: tab.columns,
3807
3797
  filters: tab.filters ? {
3808
- id: chunkXTBGGJ3G_js.generateId(),
3798
+ id: chunkLBGLB443_js.generateId(),
3809
3799
  combinator: tab.filters.combinator,
3810
3800
  rules: tab.filters.rules
3811
3801
  } : void 0,
@@ -3971,7 +3961,7 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
3971
3961
  const protectedAttribute = findProtectedTabFilterAttribute(filters);
3972
3962
  if (protectedAttribute) {
3973
3963
  const message = `Tab filters cannot target "${protectedAttribute}". Use .visibility("private")`;
3974
- throw new chunkM3WFXOA4_js.ValidationError(message, [{ path: ["filters"], message }]);
3964
+ throw new chunkL4KLYMUI_js.ValidationError(message, [{ path: ["filters"], message }]);
3975
3965
  }
3976
3966
  this.tabData.filters = filters;
3977
3967
  return this;
@@ -4023,9 +4013,6 @@ function listView(name, label) {
4023
4013
  function group(id, label) {
4024
4014
  return new GroupBuilder(id, label);
4025
4015
  }
4026
- function relationGroup(id, label, attribute) {
4027
- return new RelationGroupBuilder(id, label, attribute);
4028
- }
4029
4016
 
4030
4017
  // src/feature-flags/flag-builder.ts
4031
4018
  function validateFlagName(name) {
@@ -4185,7 +4172,7 @@ function jsonFlag(name, defaultValue) {
4185
4172
 
4186
4173
  // src/feature-flags/flag-registry.ts
4187
4174
  function duplicateFlagError(name) {
4188
- return new chunkM3WFXOA4_js.DuplicateError(
4175
+ return new chunkL4KLYMUI_js.DuplicateError(
4189
4176
  "feature flag",
4190
4177
  name,
4191
4178
  `Flag "${name}" is already registered. Each flag name must be unique.`
@@ -4263,7 +4250,7 @@ var FlagRegistry = class {
4263
4250
  getOrThrow(name) {
4264
4251
  const flag = this.get(name);
4265
4252
  if (!flag) {
4266
- throw new chunkM3WFXOA4_js.NotFoundError(
4253
+ throw new chunkL4KLYMUI_js.NotFoundError(
4267
4254
  "Feature flag",
4268
4255
  name,
4269
4256
  void 0,
@@ -4362,7 +4349,25 @@ var FlagService = class {
4362
4349
  * @returns Map of flag names to resolved values
4363
4350
  */
4364
4351
  async resolveAll(context = {}) {
4365
- const resolved = /* @__PURE__ */ new Map();
4352
+ const flagNames = this.collectFlagNames();
4353
+ const overrides = this.repository && flagNames.size > 0 ? await this.getAllOverrides(context, [...flagNames]) : emptyOverrides();
4354
+ return this.resolveNames(flagNames, overrides, context);
4355
+ }
4356
+ /**
4357
+ * Resolve every flag from static defaults only, never touching the
4358
+ * overrides repository.
4359
+ *
4360
+ * For callers running outside any tenant context (e.g. tenant-less public
4361
+ * HTTP routes such as the connectors OAuth callback): overrides are
4362
+ * tenant-scoped in storage, so without a tenant there is nothing to fetch —
4363
+ * and asking the repository anyway would require the very context that is
4364
+ * absent.
4365
+ */
4366
+ resolveAllStatic() {
4367
+ return this.resolveNames(this.collectFlagNames(), emptyOverrides(), {});
4368
+ }
4369
+ /** Flag names known to this service: registry entries plus static defaults. */
4370
+ collectFlagNames() {
4366
4371
  const flagNames = /* @__PURE__ */ new Set();
4367
4372
  for (const name of this.registry.listNames()) {
4368
4373
  flagNames.add(name);
@@ -4370,10 +4375,12 @@ var FlagService = class {
4370
4375
  for (const name of this.staticDefaults.keys()) {
4371
4376
  flagNames.add(name);
4372
4377
  }
4373
- const overrides = this.repository && flagNames.size > 0 ? await this.getAllOverrides(context, [...flagNames]) : emptyOverrides();
4378
+ return flagNames;
4379
+ }
4380
+ resolveNames(flagNames, overrides, context) {
4381
+ const resolved = /* @__PURE__ */ new Map();
4374
4382
  for (const name of flagNames) {
4375
- const value = this.resolveValue(name, overrides, context);
4376
- resolved.set(name, value);
4383
+ resolved.set(name, this.resolveValue(name, overrides, context));
4377
4384
  }
4378
4385
  return resolved;
4379
4386
  }
@@ -4420,19 +4427,19 @@ var FlagService = class {
4420
4427
  */
4421
4428
  async setOverride(flagName, level, value, options = {}) {
4422
4429
  if (!this.repository) {
4423
- throw new chunkM3WFXOA4_js.SchemaError(
4430
+ throw new chunkL4KLYMUI_js.SchemaError(
4424
4431
  "Cannot set override: no FeatureFlagsRepository configured. Add featureFlags to your DatabaseAdapter to enable runtime overrides.",
4425
- chunkM3WFXOA4_js.SchemaErrorCode.CONFIGURATION_REQUIRED
4432
+ chunkL4KLYMUI_js.SchemaErrorCode.CONFIGURATION_REQUIRED
4426
4433
  );
4427
4434
  }
4428
4435
  const flag = this.registry.get(flagName);
4429
4436
  if (flag && !flag.allowedLevels.includes(level)) {
4430
4437
  const message = `Flag "${flagName}" does not allow ${level}-level overrides. Allowed levels: ${flag.allowedLevels.join(", ")}`;
4431
- throw new chunkM3WFXOA4_js.ValidationError(message, [{ path: ["level"], message }]);
4438
+ throw new chunkL4KLYMUI_js.ValidationError(message, [{ path: ["level"], message }]);
4432
4439
  }
4433
4440
  if (flag?.system) {
4434
4441
  const message = `Flag "${flagName}" is a system flag and cannot be overridden via API.`;
4435
- throw new chunkM3WFXOA4_js.ValidationError(message, [{ path: ["flagName"], message }]);
4442
+ throw new chunkL4KLYMUI_js.ValidationError(message, [{ path: ["flagName"], message }]);
4436
4443
  }
4437
4444
  await this.repository.setOverride({
4438
4445
  flagName,
@@ -4452,9 +4459,9 @@ var FlagService = class {
4452
4459
  */
4453
4460
  async deleteOverride(flagName, level, targetId) {
4454
4461
  if (!this.repository) {
4455
- throw new chunkM3WFXOA4_js.SchemaError(
4462
+ throw new chunkL4KLYMUI_js.SchemaError(
4456
4463
  "Cannot delete override: no FeatureFlagsRepository configured.",
4457
- chunkM3WFXOA4_js.SchemaErrorCode.CONFIGURATION_REQUIRED
4464
+ chunkL4KLYMUI_js.SchemaErrorCode.CONFIGURATION_REQUIRED
4458
4465
  );
4459
4466
  }
4460
4467
  await this.repository.deleteOverride(flagName, level, targetId);
@@ -4591,7 +4598,7 @@ var NativeObjectRegistryClass = class {
4591
4598
  if (!object2.system) {
4592
4599
  const message = `[NativeObjectRegistry] Cannot register object "${object2.name}" (id: ${object2.id}): missing system flag.
4593
4600
  Native objects must have system=true. Did you call .runtime() on the builder? Remove that call \u2014 objects are system:true by default.`;
4594
- throw new chunkM3WFXOA4_js.ValidationError(message, []);
4601
+ throw new chunkL4KLYMUI_js.ValidationError(message, []);
4595
4602
  }
4596
4603
  if (this.objects.has(object2.name)) {
4597
4604
  const existing = this.objects.get(object2.name);
@@ -4599,7 +4606,7 @@ Native objects must have system=true. Did you call .runtime() on the builder? Re
4599
4606
  - Existing: "${existing?.label}" (id: ${existing?.id})
4600
4607
  - New: "${object2.label}" (id: ${object2.id})
4601
4608
  Please use unique names for each native object.`;
4602
- throw new chunkM3WFXOA4_js.DuplicateError("object", object2.name, message);
4609
+ throw new chunkL4KLYMUI_js.DuplicateError("object", object2.name, message);
4603
4610
  }
4604
4611
  this.objects.set(object2.name, cloneObjectDefinition(object2));
4605
4612
  }
@@ -4631,7 +4638,7 @@ Please use unique names for each native object.`;
4631
4638
  if (!object2) {
4632
4639
  const message = `[NativeObjectRegistry] Native object "${name}" not found.
4633
4640
  Available objects: ${this.listNames().join(", ")}`;
4634
- throw new chunkM3WFXOA4_js.NotFoundError("Native object", name, chunkM3WFXOA4_js.SchemaErrorCode.OBJECT_NOT_FOUND, message);
4641
+ throw new chunkL4KLYMUI_js.NotFoundError("Native object", name, chunkL4KLYMUI_js.SchemaErrorCode.OBJECT_NOT_FOUND, message);
4635
4642
  }
4636
4643
  return object2;
4637
4644
  }
@@ -4761,6 +4768,12 @@ var MEMORY_VIEW = detailView("memory-detail", "Memory").for("memory").default().
4761
4768
  }).tab("content", "Content").richtext("content").titleAttribute("name").build();
4762
4769
  var MEMORY_LIST_VIEW = listView("memory-list", "Memories").for("memory").default().tab("workspace", "Memories").default().icon("table").visibility("workspace").table().columns("name", "kind", "description", "createdAt").sort("name", "asc").tab("mine", "My memories").icon("lock").visibility("private").table().columns("name", "kind", "description", "createdAt").sort("name", "asc").build();
4763
4770
 
4771
+ // src/native/drive.object.ts
4772
+ var DRIVE_OBJECT_NAME = "drives";
4773
+ var DRIVE_OBJECT = object({ name: DRIVE_OBJECT_NAME, label: "Drive" }).sealed().icon("folder").hidden().pluralLabel("Drives").labelExpression("{{ name }}").embeddingExpression("{{ name }}\n{{ description }}").attribute(text({ name: "name", label: "Name" }).required()).attribute(text({ name: "description", label: "Description" }).multiline()).build();
4774
+ var DRIVE_VIEW = detailView("drive-detail", "Drive").for(DRIVE_OBJECT_NAME).default().sidePanel({ attributes: ["description"] }).tab("documents", "Documents").documents().build();
4775
+ var DRIVE_LIST_VIEW = listView("drive-list", "Drives").for(DRIVE_OBJECT_NAME).default().tab("workspace", "Shared").default().icon("users").visibility("workspace").table().columns("name", "description", "updatedAt").sort("name", "asc").tab("mine", "My drives").icon("lock").visibility("private").table().columns("name", "description", "updatedAt").sort("name", "asc").build();
4776
+
4764
4777
  // src/views/registry.ts
4765
4778
  function cloneViewDefinition(view) {
4766
4779
  return structuredClone(view);
@@ -4787,7 +4800,7 @@ var ViewRegistry = class {
4787
4800
  const key = this.makeKey(view.object, view.name, view.type);
4788
4801
  if (this.views.has(key)) {
4789
4802
  const message = `[ViewRegistry] Duplicate view: "${view.name}" (${view.type}) for object "${view.object}"`;
4790
- throw new chunkM3WFXOA4_js.DuplicateError("view", key, message);
4803
+ throw new chunkL4KLYMUI_js.DuplicateError("view", key, message);
4791
4804
  }
4792
4805
  const storedView = cloneViewDefinition(view);
4793
4806
  this.views.set(key, storedView);
@@ -4832,7 +4845,7 @@ var ViewRegistry = class {
4832
4845
  const availableNames = available.map((v) => `${v.name} (${v.type})`).join(", ") || "(none)";
4833
4846
  const message = `[ViewRegistry] View "${viewName}" not found for object "${objectName}".
4834
4847
  Available views: ${availableNames}`;
4835
- throw new chunkM3WFXOA4_js.NotFoundError("View", `${objectName}:${viewName}`, void 0, message);
4848
+ throw new chunkL4KLYMUI_js.NotFoundError("View", `${objectName}:${viewName}`, void 0, message);
4836
4849
  }
4837
4850
  return view;
4838
4851
  }
@@ -4920,7 +4933,7 @@ var viewRegistry = new ViewRegistry();
4920
4933
  // src/views/auto-generator.ts
4921
4934
  function getRuntimeAttributes(attributes, excludeNames = []) {
4922
4935
  return attributes.filter(
4923
- (attr) => !(!chunkMXYCCUNB_js.getAttributeCapabilities(attr).lifecycle.visibleInRuntime || attr.system || excludeNames.includes(attr.name))
4936
+ (attr) => !(!chunkKIMECN6D_js.getAttributeCapabilities(attr).lifecycle.visibleInRuntime || attr.system || excludeNames.includes(attr.name))
4924
4937
  );
4925
4938
  }
4926
4939
  function sortAttributes(attributes) {
@@ -4953,7 +4966,7 @@ function generateDefaultDetailView(object2, options = {}) {
4953
4966
  const { includeActivityTab = true, includeDocumentsTab = true, excludeAttributes = [] } = options;
4954
4967
  const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
4955
4968
  const sortedAttrs = sortAttributes(
4956
- runtimeAttrs.filter((attr) => chunkMXYCCUNB_js.getAttributeCapabilities(attr).presentation.formField)
4969
+ runtimeAttrs.filter((attr) => chunkKIMECN6D_js.getAttributeCapabilities(attr).presentation.formField)
4957
4970
  );
4958
4971
  const formTab = {
4959
4972
  id: "form",
@@ -5010,7 +5023,7 @@ function generateDefaultListView(object2, options = {}) {
5010
5023
  const { excludeAttributes = [], maxListColumns = 5 } = options;
5011
5024
  const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
5012
5025
  const sortedAttrs = sortAttributes(
5013
- runtimeAttrs.filter((attr) => chunkMXYCCUNB_js.getAttributeCapabilities(attr).presentation.defaultColumn)
5026
+ runtimeAttrs.filter((attr) => chunkKIMECN6D_js.getAttributeCapabilities(attr).presentation.defaultColumn)
5014
5027
  );
5015
5028
  const columns = sortedAttrs.slice(0, maxListColumns).map((attr) => attr.name);
5016
5029
  const config = {
@@ -5140,7 +5153,7 @@ var FormRegistry = class {
5140
5153
  const forms = Array.isArray(formOrForms) ? formOrForms : [formOrForms];
5141
5154
  for (const f of forms) {
5142
5155
  if (this.forms.has(f.name)) {
5143
- throw new chunkM3WFXOA4_js.DuplicateError("form", f.name, `[FormRegistry] Duplicate form: "${f.name}"`);
5156
+ throw new chunkL4KLYMUI_js.DuplicateError("form", f.name, `[FormRegistry] Duplicate form: "${f.name}"`);
5144
5157
  }
5145
5158
  this.forms.set(f.name, cloneFormDefinition(f));
5146
5159
  }
@@ -5307,6 +5320,9 @@ var LIVE_EVENT_TYPE_REGISTRY = {
5307
5320
  "notification.count.patch": true,
5308
5321
  "conversation.renamed": true,
5309
5322
  "browser.preview.updated": true,
5323
+ "reflex.state.changed": true,
5324
+ "reflex.run.completed": true,
5325
+ "reflex.authoring.progress": true,
5310
5326
  "channel.revoked": true
5311
5327
  };
5312
5328
  var LIVE_EVENT_TYPES = Object.keys(LIVE_EVENT_TYPE_REGISTRY);
@@ -5410,6 +5426,12 @@ function isLiveEventPayloadForType(type, payload) {
5410
5426
  return isConversationRenamedPayload(payload);
5411
5427
  case "browser.preview.updated":
5412
5428
  return isBrowserPreviewUpdatedPayload(payload);
5429
+ case "reflex.state.changed":
5430
+ return isReflexStateChangedPayload(payload);
5431
+ case "reflex.run.completed":
5432
+ return isReflexRunCompletedPayload(payload);
5433
+ case "reflex.authoring.progress":
5434
+ return isReflexAuthoringProgressPayload(payload);
5413
5435
  case "channel.revoked":
5414
5436
  return isChannelRevokedPayload(payload);
5415
5437
  default:
@@ -5484,7 +5506,9 @@ function isRecordFieldPatch(value) {
5484
5506
  return isRecord2(value) && hasString(value, "fieldKey") && Object.hasOwn(value, "value") && hasVersion(value, "version");
5485
5507
  }
5486
5508
  function isRecordPatchPayload(payload) {
5487
- return payload.type === "record.patch" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasOptional(payload, "label", isString) && hasOptional(payload, "metadata", isRecord2) && Array.isArray(payload.fieldPatches) && payload.fieldPatches.every(isRecordFieldPatch) && hasString(payload, "updatedAt");
5509
+ return payload.type === "record.patch" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasOptional(payload, "label", isString) && hasOptional(payload, "metadata", isRecord2) && // Strictly `true`: the applier evicts an entity on this bit, so truthy
5510
+ // junk on the wire must not pass as the presence flag (#2637).
5511
+ hasOptional(payload, "fieldsWithheld", (value) => value === true) && Array.isArray(payload.fieldPatches) && payload.fieldPatches.every(isRecordFieldPatch) && hasString(payload, "updatedAt");
5488
5512
  }
5489
5513
  function isRecordDeletedPayload(payload) {
5490
5514
  return payload.type === "record.deleted" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasString(payload, "deletedAt");
@@ -5540,6 +5564,27 @@ function isBrowserPreviewUpdatedPayload(payload) {
5540
5564
  const preview = payload.preview;
5541
5565
  return payload.type === "browser.preview.updated" && hasOnlyKeys(payload, BROWSER_PREVIEW_UPDATED_PAYLOAD_KEYS) && isRecord2(preview) && hasOnlyKeys(preview, BROWSER_PREVIEW_DESCRIPTOR_KEYS) && hasNonEmptyString(preview, "previewId") && hasNonEmptyString(preview, "rootSessionId") && hasNonEmptyString(preview, "agentSessionId") && hasNonEmptyString(preview, "browserSession") && isOneOf(preview.status, BROWSER_PREVIEW_STATUSES) && hasVersion(preview, "sequence") && hasIsoDateString(preview, "updatedAt") && preview.previewId === `browser:${preview.agentSessionId}:${preview.browserSession}`;
5542
5566
  }
5567
+ var REFLEX_STATES = ["armed", "disarmed"];
5568
+ var REFLEX_AUTHORING_STATUSES = [
5569
+ "authoring",
5570
+ "compiling",
5571
+ "replaying",
5572
+ "promoted",
5573
+ "failed"
5574
+ ];
5575
+ var REFLEX_SERVED_MODES = [
5576
+ "promoted",
5577
+ "lkg"
5578
+ ];
5579
+ function isReflexStateChangedPayload(payload) {
5580
+ return payload.type === "reflex.state.changed" && hasNonEmptyString(payload, "reflexId") && isOneOf(payload.state, REFLEX_STATES) && hasIsoDateString(payload, "updatedAt");
5581
+ }
5582
+ function isReflexRunCompletedPayload(payload) {
5583
+ return payload.type === "reflex.run.completed" && hasNonEmptyString(payload, "reflexId") && hasNonEmptyString(payload, "runId") && isOneOf(payload.served, REFLEX_SERVED_MODES) && hasVersion(payload, "version") && hasVersion(payload, "wallMs") && hasIsoDateString(payload, "completedAt");
5584
+ }
5585
+ function isReflexAuthoringProgressPayload(payload) {
5586
+ return payload.type === "reflex.authoring.progress" && hasNonEmptyString(payload, "reflexId") && isOneOf(payload.status, REFLEX_AUTHORING_STATUSES) && hasIsoDateString(payload, "updatedAt");
5587
+ }
5543
5588
  function isChannelRevokedPayload(payload) {
5544
5589
  return payload.type === "channel.revoked" && hasString(payload, "channel") && isOneOf(payload.reason, CHANNEL_REVOKED_REASONS);
5545
5590
  }
@@ -5701,7 +5746,7 @@ function assertAcyclicComputedDependencies(nodes) {
5701
5746
  }
5702
5747
  function parseCompileFormula(expression) {
5703
5748
  try {
5704
- return chunkFAEOVIDJ_js.parseComputedFormula(expression);
5749
+ return chunkDIMTNM3F_js.parseComputedFormula(expression);
5705
5750
  } catch (error) {
5706
5751
  if (error instanceof Error) {
5707
5752
  throw new ComputedFormulaCompileError(error.message);
@@ -6329,7 +6374,11 @@ function evaluateCallNode(functionName, args, input) {
6329
6374
  assertComputedFunctionName(functionName);
6330
6375
  validateArity(functionName, args.length);
6331
6376
  if (functionName === "if") {
6332
- return evaluateAst(args[0], input) ? evaluateAst(args[1], input) : evaluateAst(args[2], input);
6377
+ const condition = evaluateAst(args[0], input);
6378
+ if (condition === null) {
6379
+ return null;
6380
+ }
6381
+ return condition ? evaluateAst(args[1], input) : evaluateAst(args[2], input);
6333
6382
  }
6334
6383
  return evaluateCall(
6335
6384
  functionName,
@@ -6375,8 +6424,10 @@ function evaluateBinary(operator, left, right) {
6375
6424
  return compareWith(left, right, (result) => result <= 0);
6376
6425
  case "==":
6377
6426
  return equalScalar(left, right);
6378
- case "!=":
6379
- return !equalScalar(left, right);
6427
+ case "!=": {
6428
+ const equal = equalScalar(left, right);
6429
+ return equal === null ? null : !equal;
6430
+ }
6380
6431
  default:
6381
6432
  return unreachable(operator);
6382
6433
  }
@@ -6392,6 +6443,9 @@ function compareWith(left, right, predicate) {
6392
6443
  return result === null ? null : predicate(result);
6393
6444
  }
6394
6445
  function compare(left, right) {
6446
+ if (!areCommensurable([left, right])) {
6447
+ return null;
6448
+ }
6395
6449
  const leftNumber = toFiniteNumber(left);
6396
6450
  const rightNumber = toFiniteNumber(right);
6397
6451
  if (leftNumber !== null && rightNumber !== null) {
@@ -6408,6 +6462,9 @@ function equalScalar(left, right) {
6408
6462
  if (left === null || left === void 0 || right === null || right === void 0) {
6409
6463
  return false;
6410
6464
  }
6465
+ if (!areCommensurable([left, right])) {
6466
+ return null;
6467
+ }
6411
6468
  return compare(left, right) === 0;
6412
6469
  }
6413
6470
  function assertComputedFunctionName(name) {
@@ -6428,8 +6485,14 @@ function evaluateCall(functionName, args) {
6428
6485
  case "concat":
6429
6486
  return args.filter((arg) => arg !== null && arg !== void 0).map(String).join("");
6430
6487
  case "sum":
6488
+ if (!areCommensurable(args)) {
6489
+ return null;
6490
+ }
6431
6491
  return numericValues(args).reduce((total, value) => total + value, 0);
6432
6492
  case "avg": {
6493
+ if (!areCommensurable(args)) {
6494
+ return null;
6495
+ }
6433
6496
  const values = numericValues(args);
6434
6497
  return values.length > 0 ? values.reduce((total, value) => total + value, 0) / values.length : null;
6435
6498
  }
@@ -6452,9 +6515,9 @@ function evaluateCall(functionName, args) {
6452
6515
  case "percent_not_empty":
6453
6516
  return percentByEmptyState(args[0], false);
6454
6517
  case "count_empty":
6455
- return collectionItems(args[0]).filter(chunk3PGLMGTR_js.isNullishOrEmptyString).length;
6518
+ return collectionItems(args[0]).filter(chunkV4MZOTLV_js.isNullishOrEmptyString).length;
6456
6519
  case "count_not_empty":
6457
- return collectionItems(args[0]).filter((item) => !chunk3PGLMGTR_js.isNullishOrEmptyString(item)).length;
6520
+ return collectionItems(args[0]).filter((item) => !chunkV4MZOTLV_js.isNullishOrEmptyString(item)).length;
6458
6521
  case "count_unique":
6459
6522
  return uniqueNonEmpty(collectionItems(args[0])).length;
6460
6523
  default:
@@ -6467,7 +6530,22 @@ function unreachable(value) {
6467
6530
  function numericValues(values) {
6468
6531
  return flatten(values).map(toFiniteNumber).filter((value) => value !== null);
6469
6532
  }
6533
+ function areCommensurable(values) {
6534
+ const codes = /* @__PURE__ */ new Set();
6535
+ for (const value of flatten(values)) {
6536
+ if (isCurrencyValue(value)) {
6537
+ codes.add(currencyCode(value));
6538
+ }
6539
+ }
6540
+ return codes.size <= 1;
6541
+ }
6542
+ function currencyCode(value) {
6543
+ return value.code.toUpperCase();
6544
+ }
6470
6545
  function numericBinary(left, right, operation) {
6546
+ if (!areCommensurable([left, right])) {
6547
+ return null;
6548
+ }
6471
6549
  const leftNumber = toFiniteNumber(left);
6472
6550
  const rightNumber = toFiniteNumber(right);
6473
6551
  if (leftNumber === null || rightNumber === null) {
@@ -6477,6 +6555,9 @@ function numericBinary(left, right, operation) {
6477
6555
  return Number.isFinite(result) ? result : null;
6478
6556
  }
6479
6557
  function minMax(values, mode) {
6558
+ if (!areCommensurable(values)) {
6559
+ return null;
6560
+ }
6480
6561
  const numbers = numericValues(values);
6481
6562
  if (numbers.length > 0) {
6482
6563
  return mode === "min" ? Math.min(...numbers) : Math.max(...numbers);
@@ -6497,14 +6578,14 @@ function percentByEmptyState(value, countEmpty) {
6497
6578
  if (items.length === 0) {
6498
6579
  return 0;
6499
6580
  }
6500
- const count = items.filter((item) => chunk3PGLMGTR_js.isNullishOrEmptyString(item) === countEmpty).length;
6581
+ const count = items.filter((item) => chunkV4MZOTLV_js.isNullishOrEmptyString(item) === countEmpty).length;
6501
6582
  return count / items.length;
6502
6583
  }
6503
6584
  function uniqueNonEmpty(values) {
6504
6585
  const seen = /* @__PURE__ */ new Set();
6505
6586
  const result = [];
6506
6587
  for (const value of values) {
6507
- if (chunk3PGLMGTR_js.isNullishOrEmptyString(value)) {
6588
+ if (chunkV4MZOTLV_js.isNullishOrEmptyString(value)) {
6508
6589
  continue;
6509
6590
  }
6510
6591
  const key = uniqueKey(value);
@@ -6555,6 +6636,9 @@ function toDate(value) {
6555
6636
  return Number.isNaN(date2.getTime()) ? null : date2;
6556
6637
  }
6557
6638
  function uniqueKey(value) {
6639
+ if (isCurrencyValue(value)) {
6640
+ return `currency:${currencyCode(value)}:${value.value}`;
6641
+ }
6558
6642
  const numberValue = toFiniteNumber(value);
6559
6643
  if (numberValue !== null) {
6560
6644
  return `number:${numberValue}`;
@@ -6618,11 +6702,11 @@ function evaluateComputedAst(node, input) {
6618
6702
  return evaluateAst(node, input);
6619
6703
  }
6620
6704
  function evaluateComputedFormula(expression, input) {
6621
- return evaluateAst(chunkFAEOVIDJ_js.parseComputedFormula(expression), input);
6705
+ return evaluateAst(chunkDIMTNM3F_js.parseComputedFormula(expression), input);
6622
6706
  }
6623
6707
  function evaluateComputedFormulaWithResult(expression, input, returnType, decimals) {
6624
6708
  try {
6625
- const raw = evaluateAst(chunkFAEOVIDJ_js.parseComputedFormula(expression), input);
6709
+ const raw = evaluateAst(chunkDIMTNM3F_js.parseComputedFormula(expression), input);
6626
6710
  const value = returnType ? formatComputedResult(raw, returnType, decimals) : raw;
6627
6711
  return { value };
6628
6712
  } catch (error) {
@@ -6747,10 +6831,10 @@ var COMPUTED_FUNCTION_METADATA = [
6747
6831
  ];
6748
6832
 
6749
6833
  // src/filters/operators.ts
6750
- var isEmpty = (v) => chunk3PGLMGTR_js.isNullishOrEmptyString(v) || Array.isArray(v) && v.length === 0;
6834
+ var isEmpty = (v) => chunkV4MZOTLV_js.isNullishOrEmptyString(v) || Array.isArray(v) && v.length === 0;
6751
6835
  var toStr = (v) => v == null ? "" : String(v);
6752
6836
  var toNum = (v) => {
6753
- if (chunk3PGLMGTR_js.isNullishOrEmptyString(v)) return null;
6837
+ if (chunkV4MZOTLV_js.isNullishOrEmptyString(v)) return null;
6754
6838
  const n = typeof v === "number" ? v : Number(v);
6755
6839
  return Number.isFinite(n) ? n : null;
6756
6840
  };
@@ -6883,7 +6967,7 @@ var OPERATOR_SPECS = {
6883
6967
  appliesTo: ["date"],
6884
6968
  evaluateInMemory: (v, rv) => {
6885
6969
  const d = toDate2(v);
6886
- const bounds = chunkMXYCCUNB_js.resolveIsWithinBounds(rv);
6970
+ const bounds = chunkKIMECN6D_js.resolveIsWithinBounds(rv);
6887
6971
  if (!(d && bounds)) return false;
6888
6972
  return d.getTime() >= bounds.startMs && d.getTime() < bounds.endMs;
6889
6973
  }
@@ -6919,7 +7003,7 @@ var OPERATOR_SPECS = {
6919
7003
  // src/filters/evaluate.ts
6920
7004
  var systemAttribute = (name, type) => ({ id: `system:${name}`, name, label: name, type, system: true });
6921
7005
  var RECORD_SYSTEM_ATTRIBUTES = [
6922
- ...Object.entries(chunkMXYCCUNB_js.SYSTEM_FILTER_ATTRIBUTE_TYPES).map(
7006
+ ...Object.entries(chunkKIMECN6D_js.SYSTEM_FILTER_ATTRIBUTE_TYPES).map(
6923
7007
  ([name, type]) => systemAttribute(name, type)
6924
7008
  )
6925
7009
  ];
@@ -6960,7 +7044,7 @@ function evaluateRule(rule, values, attrByName) {
6960
7044
  (definition) => definition.name === rule.property
6961
7045
  );
6962
7046
  if (!property) return false;
6963
- const positiveOperator = chunkMXYCCUNB_js.normalizeForEdgeRpc(rule.operator);
7047
+ const positiveOperator = chunkKIMECN6D_js.normalizeForEdgeRpc(rule.operator);
6964
7048
  const propertySpec = OPERATOR_SPECS[positiveOperator];
6965
7049
  if (!propertySpec?.appliesTo.includes(property.type)) return false;
6966
7050
  const rootValue = values[rule.attribute];
@@ -6978,7 +7062,7 @@ function evaluateRule(rule, values, attrByName) {
6978
7062
  property
6979
7063
  );
6980
7064
  });
6981
- return (rule.quantifier ?? chunkMXYCCUNB_js.getOperatorPolarity(rule.operator)) === "none" ? !matches : matches;
7065
+ return (rule.quantifier ?? chunkKIMECN6D_js.getOperatorPolarity(rule.operator)) === "none" ? !matches : matches;
6982
7066
  }
6983
7067
  const spec = OPERATOR_SPECS[rule.operator];
6984
7068
  if (!spec) return false;
@@ -7027,7 +7111,7 @@ function normalizePhoneComparands(stored, rule) {
7027
7111
  return [normalizeOne(stored), normalizeOne(rule)];
7028
7112
  }
7029
7113
  function normalizeComparableValue(type, value) {
7030
- if (type === "currency") return chunkMXYCCUNB_js.extractCurrencyFilterValue(value);
7114
+ if (type === "currency") return chunkKIMECN6D_js.extractCurrencyFilterValue(value);
7031
7115
  if (type === "date") {
7032
7116
  if (isDateRangeValue(value)) return dateValueStart(value);
7033
7117
  if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value.toISOString();
@@ -7136,10 +7220,10 @@ var attributeNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
7136
7220
  'The attribute\'s machine name \u2014 the record\'s field key, and what `{{ name }}` refers to in a labelExpression. Must be a valid identifier: starts with a letter or underscore, then only letters/digits/underscores ("montantHt", "first_name", "FIRST_NAME" are valid; "first-name", "first name", "123name" are not). Max 63 characters. Cannot be a name reserved by the record shape itself (id, createdAt, updatedAt, createdBy, lastUpdatedBy, objectId, label, embeddingText, values, metadata, deletedAt, deletedBy, schemaVersion).'
7137
7221
  );
7138
7222
  var objectNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
7139
- if (chunkMXYCCUNB_js.RESERVED_OBJECT_NAMES.includes(name)) {
7223
+ if (chunkKIMECN6D_js.RESERVED_OBJECT_NAMES.includes(name)) {
7140
7224
  ctx.addIssue({
7141
7225
  code: z2.z.ZodIssueCode.custom,
7142
- message: `"${name}" is a reserved object name (${chunkMXYCCUNB_js.RESERVED_OBJECT_NAMES.join(", ")}) and cannot be used for a new object.`
7226
+ message: `"${name}" is a reserved object name (${chunkKIMECN6D_js.RESERVED_OBJECT_NAMES.join(", ")}) and cannot be used for a new object.`
7143
7227
  });
7144
7228
  }
7145
7229
  try {
@@ -7153,7 +7237,7 @@ var objectNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
7153
7237
  function withConfigCheck(schema) {
7154
7238
  return schema.superRefine((attribute, ctx) => {
7155
7239
  try {
7156
- const parsedConfig = chunkFAEOVIDJ_js.parseAttributeConfigForCreate(attribute.type, {
7240
+ const parsedConfig = chunkDIMTNM3F_js.parseAttributeConfigForCreate(attribute.type, {
7157
7241
  ...attribute.config ?? {},
7158
7242
  description: attribute.description
7159
7243
  });
@@ -7169,7 +7253,7 @@ function withConfigCheck(schema) {
7169
7253
  });
7170
7254
  }
7171
7255
  } catch (error) {
7172
- if (error instanceof chunkM3WFXOA4_js.ValidationError) {
7256
+ if (error instanceof chunkL4KLYMUI_js.ValidationError) {
7173
7257
  for (const issue of error.errors) {
7174
7258
  ctx.addIssue({
7175
7259
  code: z2.z.ZodIssueCode.custom,
@@ -7216,7 +7300,7 @@ var plannedObjectSchema = z2.z.object({
7216
7300
  'Human-readable plural display label (e.g. "Devis"/"Invoices"). Defaults from `label` if omitted.'
7217
7301
  ),
7218
7302
  description: z2.z.string().optional().describe("Help text describing what this object represents."),
7219
- icon: chunkFAEOVIDJ_js.iconNameSchema.describe(
7303
+ icon: chunkDIMTNM3F_js.iconNameSchema.describe(
7220
7304
  "Required icon name for the object. Must be a catalogue value \u2014 call `search_icons` and use a name it returns verbatim. A name that is not in the catalogue is rejected without any hint as to what would have worked, so never guess one."
7221
7305
  ),
7222
7306
  labelExpression: labelExpressionSchema.describe(
@@ -7274,13 +7358,13 @@ var proposedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
7274
7358
  z2.z.object({
7275
7359
  objectName: viewTargetObjectNameSchema,
7276
7360
  viewType: z2.z.literal("list").describe("Targets the object's default list view (the grid)."),
7277
- canonicalConfig: chunkMXYCCUNB_js.listViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7361
+ canonicalConfig: chunkKIMECN6D_js.listViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7278
7362
  baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
7279
7363
  }).strict(),
7280
7364
  z2.z.object({
7281
7365
  objectName: viewTargetObjectNameSchema,
7282
7366
  viewType: z2.z.literal("detail").describe("Targets the object's default detail view (the single-record view)."),
7283
- canonicalConfig: chunkMXYCCUNB_js.detailViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7367
+ canonicalConfig: chunkKIMECN6D_js.detailViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7284
7368
  baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
7285
7369
  }).strict()
7286
7370
  ]);
@@ -7294,13 +7378,13 @@ var persistedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
7294
7378
  z2.z.object({
7295
7379
  objectName: z2.z.string().min(1),
7296
7380
  viewType: z2.z.literal("list"),
7297
- canonicalConfig: chunkMXYCCUNB_js.listViewConfigSchema,
7381
+ canonicalConfig: chunkKIMECN6D_js.listViewConfigSchema,
7298
7382
  ...persistedBaselineFields
7299
7383
  }).strict(),
7300
7384
  z2.z.object({
7301
7385
  objectName: z2.z.string().min(1),
7302
7386
  viewType: z2.z.literal("detail"),
7303
- canonicalConfig: chunkMXYCCUNB_js.detailViewConfigSchema,
7387
+ canonicalConfig: chunkKIMECN6D_js.detailViewConfigSchema,
7304
7388
  ...persistedBaselineFields
7305
7389
  }).strict()
7306
7390
  ]).superRefine((target, ctx) => {
@@ -7447,7 +7531,7 @@ function boundSerializedPlanInput(input, ctx) {
7447
7531
  });
7448
7532
  return z2.z.NEVER;
7449
7533
  }
7450
- const serializedBytes = new TextEncoder().encode(chunkXTBGGJ3G_js.canonicalStringify(input)).byteLength;
7534
+ const serializedBytes = new TextEncoder().encode(chunkLBGLB443_js.canonicalStringify(input)).byteLength;
7451
7535
  if (serializedBytes > SCHEMA_PLAN_LIMITS.serializedBytes) {
7452
7536
  ctx.addIssue({
7453
7537
  code: "too_big",
@@ -7507,329 +7591,1320 @@ var persistedSchemaPlanSchema = z2.z.preprocess(
7507
7591
  structuralPersistedSchemaPlanSchema
7508
7592
  );
7509
7593
 
7594
+ // src/architect/define-operation.ts
7595
+ function defineOperation(def) {
7596
+ return def;
7597
+ }
7598
+ var operationBase = { id: z2.z.string().min(1) };
7599
+ var viewOperationBase = { ...operationBase, viewId: z2.z.string().min(1) };
7600
+ function mapView(state, viewId, fn) {
7601
+ if (!state.views.some((v) => v.id === viewId)) {
7602
+ throw new chunkL4KLYMUI_js.ValidationError(`View "${viewId}" is not in the draftable state`, []);
7603
+ }
7604
+ return { ...state, views: state.views.map((v) => v.id === viewId ? fn(v) : v) };
7605
+ }
7606
+ function moveWithin(items, from, toIndex) {
7607
+ const next = [...items];
7608
+ const [item] = next.splice(from, 1);
7609
+ next.splice(toIndex, 0, item);
7610
+ return next;
7611
+ }
7612
+ function reorderById(items, order, what) {
7613
+ if (order.length !== items.length) {
7614
+ throw new chunkL4KLYMUI_js.ValidationError(
7615
+ `${what} order lists ${order.length} ids for ${items.length} items`,
7616
+ []
7617
+ );
7618
+ }
7619
+ return order.map((id) => {
7620
+ const found = items.find((item) => item.id === id);
7621
+ if (!found) throw new chunkL4KLYMUI_js.ValidationError(`${what} "${id}" is not in this collection`, []);
7622
+ return found;
7623
+ });
7624
+ }
7625
+
7626
+ // src/architect/operations/detail-view.ts
7627
+ function mapFormTab(view, tabId, fn) {
7628
+ const found = view.tabs.find((t) => t.id === tabId);
7629
+ if (!found) throw new chunkL4KLYMUI_js.ValidationError(`Tab "${tabId}" is not in view "${view.id}"`, []);
7630
+ if (found.type !== "form") {
7631
+ throw new chunkL4KLYMUI_js.ValidationError(`Tab "${tabId}" is not a form tab`, []);
7632
+ }
7633
+ return { ...view, tabs: view.tabs.map((t) => t.id === tabId ? fn(found) : t) };
7634
+ }
7635
+ function requireGroup(tab, groupId) {
7636
+ const found = tab.groups.find((g) => g.id === groupId);
7637
+ if (!found) throw new chunkL4KLYMUI_js.ValidationError(`Group "${groupId}" is not in tab "${tab.id}"`, []);
7638
+ return found;
7639
+ }
7640
+ function locateField(tab, fieldId) {
7641
+ for (const group2 of tab.groups) {
7642
+ const field = group2.fields.find((f) => f.id === fieldId);
7643
+ if (field) return { group: group2, field };
7644
+ }
7645
+ throw new chunkL4KLYMUI_js.ValidationError(`Field slot "${fieldId}" is not in tab "${tab.id}"`, []);
7646
+ }
7647
+ var tabPayload = z2.z.custom(
7648
+ (value) => typeof value === "object" && value !== null && "id" in value && "type" in value,
7649
+ { message: "A tab must be an object carrying id and type" }
7650
+ );
7651
+ var groupPayload = z2.z.custom(
7652
+ (value) => typeof value === "object" && value !== null && "id" in value && "fields" in value,
7653
+ { message: "A group must be an object carrying id and fields" }
7654
+ );
7655
+ var fieldPayload = z2.z.custom(
7656
+ (value) => typeof value === "object" && value !== null && "id" in value,
7657
+ { message: "A field slot must be an object carrying an id" }
7658
+ );
7659
+ var addTabSchema = z2.z.object({
7660
+ ...viewOperationBase,
7661
+ type: z2.z.literal("add_tab"),
7662
+ tab: tabPayload
7663
+ });
7664
+ var addTab = defineOperation({
7665
+ type: "add_tab",
7666
+ schema: addTabSchema,
7667
+ apply: (state, op) => mapView(state, op.viewId, (view) => {
7668
+ if (view.tabs.some((t) => t.id === op.tab.id)) {
7669
+ throw new chunkL4KLYMUI_js.ValidationError(`Tab "${op.tab.id}" already exists in view "${op.viewId}"`, []);
7670
+ }
7671
+ return { ...view, tabs: [...view.tabs, op.tab] };
7672
+ }),
7673
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tab.id }),
7674
+ describe: (op) => `Ajoute l'onglet \xAB ${op.tab.label} \xBB`
7675
+ });
7676
+ var removeTabSchema = z2.z.object({
7677
+ ...viewOperationBase,
7678
+ type: z2.z.literal("remove_tab"),
7679
+ tabId: z2.z.string().min(1)
7680
+ });
7681
+ var removeTab = defineOperation({
7682
+ type: "remove_tab",
7683
+ schema: removeTabSchema,
7684
+ apply: (state, op) => mapView(state, op.viewId, (view) => {
7685
+ if (!view.tabs.some((t) => t.id === op.tabId)) {
7686
+ throw new chunkL4KLYMUI_js.ValidationError(`Tab "${op.tabId}" is not in view "${op.viewId}"`, []);
7687
+ }
7688
+ return { ...view, tabs: view.tabs.filter((t) => t.id !== op.tabId) };
7689
+ }),
7690
+ focus: (op) => ({ viewId: op.viewId }),
7691
+ describe: (op) => `Supprime l'onglet ${op.tabId}`
7692
+ });
7693
+ var updateTabSchema = z2.z.object({
7694
+ ...viewOperationBase,
7695
+ type: z2.z.literal("update_tab"),
7696
+ tabId: z2.z.string().min(1),
7697
+ changes: z2.z.object({
7698
+ label: z2.z.string().min(1).optional(),
7699
+ icon: z2.z.custom((v) => typeof v === "string" && v.length > 0).optional(),
7700
+ order: z2.z.number().int().optional()
7701
+ }).refine((c) => Object.keys(c).length > 0, "update_tab needs at least one change")
7702
+ });
7703
+ var updateTab = defineOperation({
7704
+ type: "update_tab",
7705
+ schema: updateTabSchema,
7706
+ apply: (state, op) => mapView(state, op.viewId, (view) => {
7707
+ if (!view.tabs.some((t) => t.id === op.tabId)) {
7708
+ throw new chunkL4KLYMUI_js.ValidationError(`Tab "${op.tabId}" is not in view "${op.viewId}"`, []);
7709
+ }
7710
+ return {
7711
+ ...view,
7712
+ tabs: view.tabs.map((t) => t.id === op.tabId ? { ...t, ...op.changes } : t)
7713
+ };
7714
+ }),
7715
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
7716
+ describe: (op) => op.changes.label ? `Renomme l'onglet en \xAB ${op.changes.label} \xBB` : `Modifie l'onglet ${op.tabId}`
7717
+ });
7718
+ var reorderTabsSchema = z2.z.object({
7719
+ ...viewOperationBase,
7720
+ type: z2.z.literal("reorder_tabs"),
7721
+ tabOrder: z2.z.array(z2.z.string().min(1))
7722
+ });
7723
+ var reorderTabs = defineOperation({
7724
+ type: "reorder_tabs",
7725
+ schema: reorderTabsSchema,
7726
+ apply: (state, op) => mapView(state, op.viewId, (view) => ({
7727
+ ...view,
7728
+ tabs: reorderById(view.tabs, op.tabOrder, "Tab")
7729
+ })),
7730
+ focus: (op) => ({ viewId: op.viewId }),
7731
+ describe: () => "R\xE9ordonne les onglets"
7732
+ });
7733
+ var addGroupSchema = z2.z.object({
7734
+ ...viewOperationBase,
7735
+ type: z2.z.literal("add_group"),
7736
+ tabId: z2.z.string().min(1),
7737
+ group: groupPayload
7738
+ });
7739
+ var addGroup = defineOperation({
7740
+ type: "add_group",
7741
+ schema: addGroupSchema,
7742
+ apply: (state, op) => mapView(
7743
+ state,
7744
+ op.viewId,
7745
+ (view) => mapFormTab(view, op.tabId, (tab) => {
7746
+ if (tab.groups.some((g) => g.id === op.group.id)) {
7747
+ throw new chunkL4KLYMUI_js.ValidationError(
7748
+ `Group "${op.group.id}" already exists in tab "${op.tabId}"`,
7749
+ []
7750
+ );
7751
+ }
7752
+ return { ...tab, groups: [...tab.groups, op.group] };
7753
+ })
7754
+ ),
7755
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId, groupId: op.group.id }),
7756
+ describe: (op) => `Ajoute le groupe \xAB ${op.group.label} \xBB`
7757
+ });
7758
+ var removeGroupSchema = z2.z.object({
7759
+ ...viewOperationBase,
7760
+ type: z2.z.literal("remove_group"),
7761
+ tabId: z2.z.string().min(1),
7762
+ groupId: z2.z.string().min(1)
7763
+ });
7764
+ var removeGroup = defineOperation({
7765
+ type: "remove_group",
7766
+ schema: removeGroupSchema,
7767
+ apply: (state, op) => mapView(
7768
+ state,
7769
+ op.viewId,
7770
+ (view) => mapFormTab(view, op.tabId, (tab) => {
7771
+ requireGroup(tab, op.groupId);
7772
+ return { ...tab, groups: tab.groups.filter((g) => g.id !== op.groupId) };
7773
+ })
7774
+ ),
7775
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
7776
+ describe: (op) => `Supprime le groupe ${op.groupId}`
7777
+ });
7778
+ var updateGroupSchema = z2.z.object({
7779
+ ...viewOperationBase,
7780
+ type: z2.z.literal("update_group"),
7781
+ tabId: z2.z.string().min(1),
7782
+ groupId: z2.z.string().min(1),
7783
+ changes: z2.z.object({
7784
+ label: z2.z.string().min(1).optional(),
7785
+ description: z2.z.string().optional(),
7786
+ collapsible: z2.z.boolean().optional(),
7787
+ collapsed: z2.z.boolean().optional(),
7788
+ order: z2.z.number().int().optional()
7789
+ }).refine((c) => Object.keys(c).length > 0, "update_group needs at least one change")
7790
+ });
7791
+ var updateGroup = defineOperation({
7792
+ type: "update_group",
7793
+ schema: updateGroupSchema,
7794
+ apply: (state, op) => mapView(
7795
+ state,
7796
+ op.viewId,
7797
+ (view) => mapFormTab(view, op.tabId, (tab) => {
7798
+ requireGroup(tab, op.groupId);
7799
+ return {
7800
+ ...tab,
7801
+ groups: tab.groups.map((g) => g.id === op.groupId ? { ...g, ...op.changes } : g)
7802
+ };
7803
+ })
7804
+ ),
7805
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId, groupId: op.groupId }),
7806
+ describe: (op) => op.changes.label ? `Renomme le groupe en \xAB ${op.changes.label} \xBB` : "Modifie le groupe"
7807
+ });
7808
+ var reorderGroupsSchema = z2.z.object({
7809
+ ...viewOperationBase,
7810
+ type: z2.z.literal("reorder_groups"),
7811
+ tabId: z2.z.string().min(1),
7812
+ groupOrder: z2.z.array(z2.z.string().min(1))
7813
+ });
7814
+ var reorderGroups = defineOperation({
7815
+ type: "reorder_groups",
7816
+ schema: reorderGroupsSchema,
7817
+ apply: (state, op) => mapView(
7818
+ state,
7819
+ op.viewId,
7820
+ (view) => mapFormTab(view, op.tabId, (tab) => ({
7821
+ ...tab,
7822
+ groups: reorderById(tab.groups, op.groupOrder, "Group")
7823
+ }))
7824
+ ),
7825
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
7826
+ describe: () => "R\xE9ordonne les groupes"
7827
+ });
7828
+ var addFieldSchema = z2.z.object({
7829
+ ...viewOperationBase,
7830
+ type: z2.z.literal("add_field"),
7831
+ tabId: z2.z.string().min(1),
7832
+ groupId: z2.z.string().min(1),
7833
+ field: fieldPayload,
7834
+ index: z2.z.number().int().min(0).optional()
7835
+ });
7836
+ var addField = defineOperation({
7837
+ type: "add_field",
7838
+ schema: addFieldSchema,
7839
+ apply: (state, op) => mapView(
7840
+ state,
7841
+ op.viewId,
7842
+ (view) => mapFormTab(view, op.tabId, (tab) => {
7843
+ requireGroup(tab, op.groupId);
7844
+ if (tab.groups.some((g) => g.fields.some((f) => f.id === op.field.id))) {
7845
+ throw new chunkL4KLYMUI_js.ValidationError(
7846
+ `Field slot "${op.field.id}" already exists in tab "${op.tabId}"`,
7847
+ []
7848
+ );
7849
+ }
7850
+ return {
7851
+ ...tab,
7852
+ groups: tab.groups.map((group2) => {
7853
+ if (group2.id !== op.groupId) return group2;
7854
+ const at = op.index ?? group2.fields.length;
7855
+ return {
7856
+ ...group2,
7857
+ fields: [...group2.fields.slice(0, at), op.field, ...group2.fields.slice(at)]
7858
+ };
7859
+ })
7860
+ };
7861
+ })
7862
+ ),
7863
+ focus: (op) => ({
7864
+ viewId: op.viewId,
7865
+ tabId: op.tabId,
7866
+ groupId: op.groupId,
7867
+ fieldId: op.field.id
7868
+ }),
7869
+ describe: (op) => `Ajoute le champ ${op.field.attribute ?? op.field.id}`
7870
+ });
7871
+ var removeFieldSchema = z2.z.object({
7872
+ ...viewOperationBase,
7873
+ type: z2.z.literal("remove_field"),
7874
+ tabId: z2.z.string().min(1),
7875
+ fieldId: z2.z.string().min(1)
7876
+ });
7877
+ var removeField = defineOperation({
7878
+ type: "remove_field",
7879
+ schema: removeFieldSchema,
7880
+ apply: (state, op) => mapView(
7881
+ state,
7882
+ op.viewId,
7883
+ (view) => mapFormTab(view, op.tabId, (tab) => {
7884
+ const { group: group2 } = locateField(tab, op.fieldId);
7885
+ return {
7886
+ ...tab,
7887
+ groups: tab.groups.map(
7888
+ (g) => g.id === group2.id ? { ...g, fields: g.fields.filter((f) => f.id !== op.fieldId) } : g
7889
+ )
7890
+ };
7891
+ })
7892
+ ),
7893
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
7894
+ describe: (op) => `Retire le champ ${op.fieldId}`
7895
+ });
7896
+ var moveFieldSchema = z2.z.object({
7897
+ ...viewOperationBase,
7898
+ type: z2.z.literal("move_field"),
7899
+ tabId: z2.z.string().min(1),
7900
+ fieldId: z2.z.string().min(1),
7901
+ toGroupId: z2.z.string().min(1),
7902
+ toIndex: z2.z.number().int().min(0)
7903
+ });
7904
+ var moveField = defineOperation({
7905
+ type: "move_field",
7906
+ schema: moveFieldSchema,
7907
+ apply: (state, op) => mapView(
7908
+ state,
7909
+ op.viewId,
7910
+ (view) => mapFormTab(view, op.tabId, (tab) => {
7911
+ const { group: source, field } = locateField(tab, op.fieldId);
7912
+ const target = requireGroup(tab, op.toGroupId);
7913
+ if (source.id === target.id) {
7914
+ const from = source.fields.findIndex((f) => f.id === op.fieldId);
7915
+ return {
7916
+ ...tab,
7917
+ groups: tab.groups.map(
7918
+ (g) => g.id === source.id ? { ...g, fields: moveWithin(g.fields, from, op.toIndex) } : g
7919
+ )
7920
+ };
7921
+ }
7922
+ return {
7923
+ ...tab,
7924
+ groups: tab.groups.map((group2) => {
7925
+ if (group2.id === source.id) {
7926
+ return { ...group2, fields: group2.fields.filter((f) => f.id !== op.fieldId) };
7927
+ }
7928
+ if (group2.id === target.id) {
7929
+ return {
7930
+ ...group2,
7931
+ fields: [
7932
+ ...group2.fields.slice(0, op.toIndex),
7933
+ field,
7934
+ ...group2.fields.slice(op.toIndex)
7935
+ ]
7936
+ };
7937
+ }
7938
+ return group2;
7939
+ })
7940
+ };
7941
+ })
7942
+ ),
7943
+ focus: (op) => ({
7944
+ viewId: op.viewId,
7945
+ tabId: op.tabId,
7946
+ groupId: op.toGroupId,
7947
+ fieldId: op.fieldId
7948
+ }),
7949
+ describe: (op) => `D\xE9place le champ ${op.fieldId} vers le groupe ${op.toGroupId}`
7950
+ });
7951
+ var updateFieldSchema = z2.z.object({
7952
+ ...viewOperationBase,
7953
+ type: z2.z.literal("update_field"),
7954
+ tabId: z2.z.string().min(1),
7955
+ fieldId: z2.z.string().min(1),
7956
+ changes: z2.z.object({
7957
+ label: z2.z.string().optional(),
7958
+ readOnly: z2.z.boolean().optional(),
7959
+ span: z2.z.number().int().min(1).max(12).optional()
7960
+ }).refine((c) => Object.keys(c).length > 0, "update_field needs at least one change")
7961
+ });
7962
+ var updateField = defineOperation({
7963
+ type: "update_field",
7964
+ schema: updateFieldSchema,
7965
+ apply: (state, op) => mapView(
7966
+ state,
7967
+ op.viewId,
7968
+ (view) => mapFormTab(view, op.tabId, (tab) => {
7969
+ locateField(tab, op.fieldId);
7970
+ return {
7971
+ ...tab,
7972
+ groups: tab.groups.map((group2) => ({
7973
+ ...group2,
7974
+ fields: group2.fields.map(
7975
+ (f) => f.id === op.fieldId ? { ...f, ...op.changes } : f
7976
+ )
7977
+ }))
7978
+ };
7979
+ })
7980
+ ),
7981
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId, fieldId: op.fieldId }),
7982
+ describe: (op) => `Modifie le champ ${op.fieldId}`
7983
+ });
7984
+ var updateTableTabSchema = z2.z.object({
7985
+ ...viewOperationBase,
7986
+ type: z2.z.literal("update_table_tab"),
7987
+ tabId: z2.z.string().min(1),
7988
+ changes: z2.z.object({
7989
+ columns: z2.z.array(z2.z.string().min(1)).optional(),
7990
+ filters: z2.z.custom().optional(),
7991
+ sorts: z2.z.custom().optional(),
7992
+ allowCreate: z2.z.boolean().optional(),
7993
+ allowEdit: z2.z.boolean().optional(),
7994
+ allowDelete: z2.z.boolean().optional(),
7995
+ createMode: z2.z.enum(["redirect", "inline", "peek"]).optional()
7996
+ }).refine((c) => Object.keys(c).length > 0, "update_table_tab needs at least one change")
7997
+ });
7998
+ var updateTableTab = defineOperation({
7999
+ type: "update_table_tab",
8000
+ schema: updateTableTabSchema,
8001
+ apply: (state, op) => mapView(state, op.viewId, (view) => {
8002
+ const found = view.tabs.find((t) => t.id === op.tabId);
8003
+ if (!found) throw new chunkL4KLYMUI_js.ValidationError(`Tab "${op.tabId}" is not in view "${view.id}"`, []);
8004
+ if (found.type !== "table") {
8005
+ throw new chunkL4KLYMUI_js.ValidationError(`Tab "${op.tabId}" is not a table tab`, []);
8006
+ }
8007
+ return {
8008
+ ...view,
8009
+ tabs: view.tabs.map((t) => t.id === op.tabId ? { ...t, ...op.changes } : t)
8010
+ };
8011
+ }),
8012
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
8013
+ describe: (op) => op.changes.columns ? `Affiche ${op.changes.columns.length} colonne(s) dans l'onglet ${op.tabId}` : `Modifie l'onglet ${op.tabId}`
8014
+ });
8015
+ var setSidePanelSchema = z2.z.object({
8016
+ ...viewOperationBase,
8017
+ type: z2.z.literal("set_side_panel"),
8018
+ sidePanel: z2.z.object({ attributes: z2.z.array(z2.z.string().min(1)), width: z2.z.number().int().min(1).optional() }).nullable()
8019
+ });
8020
+ var setSidePanel = defineOperation({
8021
+ type: "set_side_panel",
8022
+ schema: setSidePanelSchema,
8023
+ apply: (state, op) => mapView(state, op.viewId, (view) => ({
8024
+ ...view,
8025
+ config: {
8026
+ ...view.config,
8027
+ sidePanel: op.sidePanel ?? void 0
8028
+ }
8029
+ })),
8030
+ focus: (op) => ({ viewId: op.viewId }),
8031
+ describe: (op) => op.sidePanel ? "Active le panneau lat\xE9ral" : "Retire le panneau lat\xE9ral"
8032
+ });
8033
+ var DETAIL_VIEW_OPERATIONS = [
8034
+ addTab,
8035
+ removeTab,
8036
+ updateTab,
8037
+ reorderTabs,
8038
+ addGroup,
8039
+ removeGroup,
8040
+ updateGroup,
8041
+ reorderGroups,
8042
+ addField,
8043
+ removeField,
8044
+ moveField,
8045
+ updateField,
8046
+ updateTableTab,
8047
+ setSidePanel
8048
+ ];
8049
+ var listTabBase = { ...viewOperationBase, tabId: z2.z.string().min(1) };
8050
+ function mapListTab(state, viewId, tabId, fn) {
8051
+ return mapView(state, viewId, (view) => {
8052
+ const tabs = view.config.tabs ?? [];
8053
+ if (!tabs.some((t) => t.id === tabId)) {
8054
+ throw new chunkL4KLYMUI_js.ValidationError(`List tab "${tabId}" is not in view "${viewId}"`, []);
8055
+ }
8056
+ return {
8057
+ ...view,
8058
+ config: { ...view.config, tabs: tabs.map((t) => t.id === tabId ? fn(t) : t) }
8059
+ };
8060
+ });
8061
+ }
8062
+ var listTabPayload = z2.z.custom(
8063
+ (value) => typeof value === "object" && value !== null && "id" in value,
8064
+ { message: "A list tab must be an object carrying an id" }
8065
+ );
8066
+ var filterGroupPayload = z2.z.custom(
8067
+ (value) => value === null || typeof value === "object"
8068
+ );
8069
+ var sortRulesPayload = z2.z.custom((value) => Array.isArray(value));
8070
+ function setOnTab(type, key, valueSchema, describe) {
8071
+ const schema = z2.z.object({ ...listTabBase, type: z2.z.literal(type), value: valueSchema });
8072
+ return defineOperation({
8073
+ type,
8074
+ schema,
8075
+ apply: (state, op) => mapListTab(state, op.viewId, op.tabId, (tab) => {
8076
+ if (op.value === null) {
8077
+ const { [key]: _dropped, ...rest } = tab;
8078
+ return rest;
8079
+ }
8080
+ return { ...tab, [key]: op.value };
8081
+ }),
8082
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
8083
+ describe: (op) => describe(op.value)
8084
+ });
8085
+ }
8086
+ var addListTabSchema = z2.z.object({
8087
+ ...viewOperationBase,
8088
+ type: z2.z.literal("add_list_tab"),
8089
+ tab: listTabPayload
8090
+ });
8091
+ var addListTab = defineOperation({
8092
+ type: "add_list_tab",
8093
+ schema: addListTabSchema,
8094
+ apply: (state, op) => mapView(state, op.viewId, (view) => {
8095
+ const tabs = view.config.tabs ?? [];
8096
+ if (tabs.some((t) => t.id === op.tab.id)) {
8097
+ throw new chunkL4KLYMUI_js.ValidationError(
8098
+ `List tab "${op.tab.id}" already exists in view "${op.viewId}"`,
8099
+ []
8100
+ );
8101
+ }
8102
+ return { ...view, config: { ...view.config, tabs: [...tabs, op.tab] } };
8103
+ }),
8104
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tab.id }),
8105
+ describe: (op) => `Ajoute l'onglet \xAB ${op.tab.label} \xBB`
8106
+ });
8107
+ var removeListTabSchema = z2.z.object({
8108
+ ...listTabBase,
8109
+ type: z2.z.literal("remove_list_tab")
8110
+ });
8111
+ var removeListTab = defineOperation({
8112
+ type: "remove_list_tab",
8113
+ schema: removeListTabSchema,
8114
+ apply: (state, op) => mapView(state, op.viewId, (view) => {
8115
+ const tabs = view.config.tabs ?? [];
8116
+ if (!tabs.some((t) => t.id === op.tabId)) {
8117
+ throw new chunkL4KLYMUI_js.ValidationError(`List tab "${op.tabId}" is not in view "${op.viewId}"`, []);
8118
+ }
8119
+ return {
8120
+ ...view,
8121
+ config: { ...view.config, tabs: tabs.filter((t) => t.id !== op.tabId) }
8122
+ };
8123
+ }),
8124
+ focus: (op) => ({ viewId: op.viewId }),
8125
+ describe: (op) => `Supprime l'onglet ${op.tabId}`
8126
+ });
8127
+ var updateListTabSchema = z2.z.object({
8128
+ ...listTabBase,
8129
+ type: z2.z.literal("update_list_tab"),
8130
+ changes: z2.z.object({
8131
+ label: z2.z.string().min(1).optional(),
8132
+ icon: z2.z.custom((v) => typeof v === "string" && v.length > 0).optional(),
8133
+ default: z2.z.boolean().optional(),
8134
+ visibility: z2.z.enum(chunkKIMECN6D_js.LIST_VIEW_TAB_VISIBILITIES).optional()
8135
+ }).refine((c) => Object.keys(c).length > 0, "update_list_tab needs at least one change")
8136
+ });
8137
+ var updateListTab = defineOperation({
8138
+ type: "update_list_tab",
8139
+ schema: updateListTabSchema,
8140
+ apply: (state, op) => mapListTab(state, op.viewId, op.tabId, (tab) => ({ ...tab, ...op.changes })),
8141
+ focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
8142
+ describe: (op) => op.changes.label ? `Renomme l'onglet en \xAB ${op.changes.label} \xBB` : `Modifie l'onglet ${op.tabId}`
8143
+ });
8144
+ var reorderListTabsSchema = z2.z.object({
8145
+ ...viewOperationBase,
8146
+ type: z2.z.literal("reorder_list_tabs"),
8147
+ tabOrder: z2.z.array(z2.z.string().min(1))
8148
+ });
8149
+ var reorderListTabs = defineOperation({
8150
+ type: "reorder_list_tabs",
8151
+ schema: reorderListTabsSchema,
8152
+ apply: (state, op) => mapView(state, op.viewId, (view) => ({
8153
+ ...view,
8154
+ config: {
8155
+ ...view.config,
8156
+ tabs: reorderById(view.config.tabs ?? [], op.tabOrder, "List tab")
8157
+ }
8158
+ })),
8159
+ focus: (op) => ({ viewId: op.viewId }),
8160
+ describe: () => "R\xE9ordonne les onglets"
8161
+ });
8162
+ var setColumns = setOnTab(
8163
+ "set_columns",
8164
+ "columns",
8165
+ z2.z.array(z2.z.string().min(1)),
8166
+ // Defensive on shape: a summary is rendered in a list beside other summaries,
8167
+ // and one malformed payload must not take the page down with it.
8168
+ (value) => `Affiche ${Array.isArray(value) ? value.length : 0} colonne(s)`
8169
+ );
8170
+ var setColumnSizing = setOnTab(
8171
+ "set_column_sizing",
8172
+ "columnSizing",
8173
+ z2.z.record(z2.z.string(), z2.z.number().int().positive()),
8174
+ () => "Ajuste la largeur des colonnes"
8175
+ );
8176
+ var setLayout = setOnTab(
8177
+ "set_layout",
8178
+ "layout",
8179
+ z2.z.enum(["table", "kanban"]),
8180
+ (value) => `Passe en affichage ${value}`
8181
+ );
8182
+ var setGroupBy = setOnTab(
8183
+ "set_group_by",
8184
+ "groupByAttribute",
8185
+ z2.z.string().min(1).nullable(),
8186
+ (value) => value ? `Regroupe par ${value}` : "Retire le regroupement"
8187
+ );
8188
+ var setFilters = setOnTab(
8189
+ "set_filters",
8190
+ "filters",
8191
+ filterGroupPayload.nullable(),
8192
+ (value) => value ? "Modifie les filtres" : "Retire les filtres"
8193
+ );
8194
+ var setSorts = setOnTab(
8195
+ "set_sorts",
8196
+ "sorts",
8197
+ sortRulesPayload.nullable(),
8198
+ (value) => value ? "Modifie le tri" : "Retire le tri"
8199
+ );
8200
+ var setCreateMode = setOnTab(
8201
+ "set_create_mode",
8202
+ "createMode",
8203
+ z2.z.enum(["redirect", "inline", "peek"]),
8204
+ (value) => `Cr\xE9ation en mode ${value}`
8205
+ );
8206
+ var setReadOnly = setOnTab(
8207
+ "set_read_only",
8208
+ "readOnly",
8209
+ z2.z.boolean(),
8210
+ (value) => value ? "Passe l'onglet en lecture seule" : "Rend l'onglet modifiable"
8211
+ );
8212
+ var setCardUserAttribute = setOnTab(
8213
+ "set_card_user_attribute",
8214
+ "cardUserAttribute",
8215
+ z2.z.string().min(1).nullable(),
8216
+ (value) => value ? `Affiche ${value} sur les cartes` : "Retire l'utilisateur des cartes"
8217
+ );
8218
+ var setCardDateAttribute = setOnTab(
8219
+ "set_card_date_attribute",
8220
+ "cardDateAttribute",
8221
+ z2.z.string().min(1).nullable(),
8222
+ (value) => value ? `Affiche ${value} sur les cartes` : "Retire la date des cartes"
8223
+ );
8224
+ var setDefaultFiltersSchema = z2.z.object({
8225
+ ...viewOperationBase,
8226
+ type: z2.z.literal("set_default_filters"),
8227
+ filters: filterGroupPayload.nullable()
8228
+ });
8229
+ var setDefaultFilters = defineOperation({
8230
+ type: "set_default_filters",
8231
+ schema: setDefaultFiltersSchema,
8232
+ apply: (state, op) => mapView(state, op.viewId, (view) => {
8233
+ if (op.filters === null) {
8234
+ const { defaultFilters: _dropped, ...rest } = view.config;
8235
+ return { ...view, config: rest };
8236
+ }
8237
+ return { ...view, config: { ...view.config, defaultFilters: op.filters } };
8238
+ }),
8239
+ focus: (op) => ({ viewId: op.viewId }),
8240
+ describe: (op) => op.filters ? "Modifie les filtres de la vue" : "Retire les filtres de la vue"
8241
+ });
8242
+ var LIST_VIEW_OPERATIONS = [
8243
+ setDefaultFilters,
8244
+ addListTab,
8245
+ removeListTab,
8246
+ updateListTab,
8247
+ reorderListTabs,
8248
+ setColumns,
8249
+ setColumnSizing,
8250
+ setLayout,
8251
+ setGroupBy,
8252
+ setFilters,
8253
+ setSorts,
8254
+ setCreateMode,
8255
+ setReadOnly,
8256
+ setCardUserAttribute,
8257
+ setCardDateAttribute
8258
+ ];
8259
+ function requireObject(state, objectId) {
8260
+ if (!state.objects.some((o) => o.id === objectId)) {
8261
+ throw new chunkL4KLYMUI_js.ValidationError(`Object "${objectId}" is not in the draftable state`, []);
8262
+ }
8263
+ }
8264
+ var objectOperationBase = { ...operationBase, objectId: z2.z.string().min(1) };
8265
+ var addObjectSchema = z2.z.object({
8266
+ ...objectOperationBase,
8267
+ type: z2.z.literal("add_object"),
8268
+ name: z2.z.string().min(1),
8269
+ label: z2.z.string().min(1),
8270
+ icon: z2.z.string().min(1).optional()
8271
+ });
8272
+ var addObject = defineOperation({
8273
+ type: "add_object",
8274
+ schema: addObjectSchema,
8275
+ apply: (state, op) => {
8276
+ if (state.objects.some((o) => o.name === op.name)) {
8277
+ throw new chunkL4KLYMUI_js.ValidationError(`Object "${op.name}" already exists`, []);
8278
+ }
8279
+ if (state.objects.some((o) => o.id === op.objectId)) {
8280
+ throw new chunkL4KLYMUI_js.ValidationError(`Object id "${op.objectId}" is already taken`, []);
8281
+ }
8282
+ const created = {
8283
+ id: op.objectId,
8284
+ name: op.name,
8285
+ label: op.label,
8286
+ ...op.icon === void 0 ? {} : { icon: op.icon }
8287
+ };
8288
+ return { ...state, objects: [...state.objects, created] };
8289
+ },
8290
+ // The caller generates objectId, so a draft object is addressable by route
8291
+ // before it exists — that is what lets the app navigate to it live.
8292
+ focus: (op) => ({ objectId: op.objectId }),
8293
+ describe: (op) => `Cr\xE9e l'objet \xAB ${op.label} \xBB`
8294
+ });
8295
+ var updateObjectSchema = z2.z.object({
8296
+ ...objectOperationBase,
8297
+ type: z2.z.literal("update_object"),
8298
+ changes: z2.z.object({ label: z2.z.string().min(1).optional(), icon: z2.z.string().min(1).optional() }).refine((c) => Object.keys(c).length > 0, "update_object needs at least one change")
8299
+ });
8300
+ var updateObject = defineOperation({
8301
+ type: "update_object",
8302
+ schema: updateObjectSchema,
8303
+ apply: (state, op) => {
8304
+ requireObject(state, op.objectId);
8305
+ return {
8306
+ ...state,
8307
+ objects: state.objects.map((o) => o.id === op.objectId ? { ...o, ...op.changes } : o)
8308
+ };
8309
+ },
8310
+ focus: (op) => ({ objectId: op.objectId }),
8311
+ describe: (op) => op.changes.label ? `Renomme l'objet en \xAB ${op.changes.label} \xBB` : "Modifie l'objet"
8312
+ });
8313
+ var removeObjectSchema = z2.z.object({ ...objectOperationBase, type: z2.z.literal("remove_object") });
8314
+ var removeObject = defineOperation({
8315
+ type: "remove_object",
8316
+ schema: removeObjectSchema,
8317
+ apply: (state, op) => {
8318
+ requireObject(state, op.objectId);
8319
+ const objectName = state.objects.find((o) => o.id === op.objectId)?.name;
8320
+ return {
8321
+ ...state,
8322
+ objects: state.objects.filter((o) => o.id !== op.objectId),
8323
+ attributes: state.attributes.filter((a) => a.objectId !== op.objectId),
8324
+ sampleRecords: state.sampleRecords.filter((r) => r.objectId !== op.objectId),
8325
+ views: state.views.filter((v) => v.objectName !== objectName)
8326
+ };
8327
+ },
8328
+ focus: () => ({}),
8329
+ describe: (op) => `Supprime l'objet ${op.objectId}`
8330
+ });
8331
+ var addAttributeSchema = z2.z.object({
8332
+ ...objectOperationBase,
8333
+ type: z2.z.literal("add_attribute"),
8334
+ attributeId: z2.z.string().min(1),
8335
+ name: z2.z.string().min(1),
8336
+ label: z2.z.string().min(1),
8337
+ attributeType: z2.z.string().min(1)
8338
+ });
8339
+ var addAttribute = defineOperation({
8340
+ type: "add_attribute",
8341
+ schema: addAttributeSchema,
8342
+ apply: (state, op) => {
8343
+ requireObject(state, op.objectId);
8344
+ if (state.attributes.some((a) => a.objectId === op.objectId && a.name === op.name)) {
8345
+ throw new chunkL4KLYMUI_js.ValidationError(
8346
+ `Attribute "${op.name}" already exists on object "${op.objectId}"`,
8347
+ []
8348
+ );
8349
+ }
8350
+ return {
8351
+ ...state,
8352
+ attributes: [
8353
+ ...state.attributes,
8354
+ {
8355
+ id: op.attributeId,
8356
+ objectId: op.objectId,
8357
+ name: op.name,
8358
+ label: op.label,
8359
+ attributeType: op.attributeType
8360
+ }
8361
+ ]
8362
+ };
8363
+ },
8364
+ focus: (op) => ({ objectId: op.objectId }),
8365
+ describe: (op) => `Ajoute l'attribut \xAB ${op.label} \xBB`
8366
+ });
8367
+ var updateAttributeSchema = z2.z.object({
8368
+ ...objectOperationBase,
8369
+ type: z2.z.literal("update_attribute"),
8370
+ attributeId: z2.z.string().min(1),
8371
+ changes: z2.z.object({ label: z2.z.string().min(1).optional() }).refine((c) => Object.keys(c).length > 0, "update_attribute needs at least one change")
8372
+ });
8373
+ var updateAttribute = defineOperation({
8374
+ type: "update_attribute",
8375
+ schema: updateAttributeSchema,
8376
+ apply: (state, op) => {
8377
+ if (!state.attributes.some((a) => a.id === op.attributeId)) {
8378
+ throw new chunkL4KLYMUI_js.ValidationError(`Attribute "${op.attributeId}" is not in the draftable state`, []);
8379
+ }
8380
+ return {
8381
+ ...state,
8382
+ attributes: state.attributes.map(
8383
+ (a) => a.id === op.attributeId ? { ...a, ...op.changes } : a
8384
+ )
8385
+ };
8386
+ },
8387
+ // Carries objectId so the scope can load the attribute's parent. Without it
8388
+ // the reader returns an empty state and the fold rejects the operation before
8389
+ // the draft is ever persisted — renaming an existing field was impossible.
8390
+ focus: (op) => ({ objectId: op.objectId }),
8391
+ describe: (op) => op.changes.label ? `Renomme l'attribut en \xAB ${op.changes.label} \xBB` : "Modifie l'attribut"
8392
+ });
8393
+ var removeAttributeSchema = z2.z.object({
8394
+ ...objectOperationBase,
8395
+ type: z2.z.literal("remove_attribute"),
8396
+ attributeId: z2.z.string().min(1)
8397
+ });
8398
+ var removeAttribute = defineOperation({
8399
+ type: "remove_attribute",
8400
+ schema: removeAttributeSchema,
8401
+ apply: (state, op) => {
8402
+ if (!state.attributes.some((a) => a.id === op.attributeId)) {
8403
+ throw new chunkL4KLYMUI_js.ValidationError(`Attribute "${op.attributeId}" is not in the draftable state`, []);
8404
+ }
8405
+ return { ...state, attributes: state.attributes.filter((a) => a.id !== op.attributeId) };
8406
+ },
8407
+ // Same reason as update_attribute: the parent object must be in scope.
8408
+ focus: (op) => ({ objectId: op.objectId }),
8409
+ describe: (op) => `Supprime l'attribut ${op.attributeId}`
8410
+ });
8411
+ var addSampleRecordSchema = z2.z.object({
8412
+ ...objectOperationBase,
8413
+ type: z2.z.literal("add_sample_record"),
8414
+ recordId: z2.z.string().min(1),
8415
+ values: z2.z.record(z2.z.string(), z2.z.unknown())
8416
+ });
8417
+ var addSampleRecord = defineOperation({
8418
+ type: "add_sample_record",
8419
+ schema: addSampleRecordSchema,
8420
+ apply: (state, op) => {
8421
+ requireObject(state, op.objectId);
8422
+ if (state.sampleRecords.some((r) => r.id === op.recordId)) {
8423
+ throw new chunkL4KLYMUI_js.ValidationError(`Sample record "${op.recordId}" already exists`, []);
8424
+ }
8425
+ return {
8426
+ ...state,
8427
+ sampleRecords: [
8428
+ ...state.sampleRecords,
8429
+ { id: op.recordId, objectId: op.objectId, values: op.values }
8430
+ ]
8431
+ };
8432
+ },
8433
+ // A sample is a draft record, not a render-time fiction: publishing
8434
+ // materialises it, discarding the draft discards it.
8435
+ focus: (op) => ({ objectId: op.objectId, recordId: op.recordId }),
8436
+ describe: () => "Ajoute un exemple"
8437
+ });
8438
+ var removeSampleRecordSchema = z2.z.object({
8439
+ ...operationBase,
8440
+ type: z2.z.literal("remove_sample_record"),
8441
+ recordId: z2.z.string().min(1)
8442
+ });
8443
+ var removeSampleRecord = defineOperation({
8444
+ type: "remove_sample_record",
8445
+ schema: removeSampleRecordSchema,
8446
+ apply: (state, op) => {
8447
+ if (!state.sampleRecords.some((r) => r.id === op.recordId)) {
8448
+ throw new chunkL4KLYMUI_js.ValidationError(`Sample record "${op.recordId}" is not in the draft`, []);
8449
+ }
8450
+ return { ...state, sampleRecords: state.sampleRecords.filter((r) => r.id !== op.recordId) };
8451
+ },
8452
+ focus: () => ({}),
8453
+ describe: () => "Retire un exemple"
8454
+ });
8455
+ var SCHEMA_OPERATIONS = [
8456
+ addObject,
8457
+ updateObject,
8458
+ removeObject,
8459
+ addAttribute,
8460
+ updateAttribute,
8461
+ removeAttribute,
8462
+ addSampleRecord,
8463
+ removeSampleRecord
8464
+ ];
8465
+
8466
+ // src/architect/registry.ts
8467
+ function build() {
8468
+ const map = /* @__PURE__ */ new Map();
8469
+ for (const definition of [
8470
+ ...SCHEMA_OPERATIONS,
8471
+ ...DETAIL_VIEW_OPERATIONS,
8472
+ ...LIST_VIEW_OPERATIONS
8473
+ ]) {
8474
+ if (map.has(definition.type)) {
8475
+ throw new chunkL4KLYMUI_js.DuplicateError("architect operation", definition.type);
8476
+ }
8477
+ map.set(definition.type, definition);
8478
+ }
8479
+ return map;
8480
+ }
8481
+ var OPERATION_REGISTRY = build();
8482
+ var ALL_OPERATION_TYPES = [...OPERATION_REGISTRY.keys()];
8483
+
8484
+ // src/architect/apply.ts
8485
+ function defOf(operation) {
8486
+ const definition = OPERATION_REGISTRY.get(operation.type);
8487
+ if (!definition) {
8488
+ throw new chunkL4KLYMUI_js.ValidationError(
8489
+ `Operation "${operation.id}" has unknown type "${operation.type}"`,
8490
+ []
8491
+ );
8492
+ }
8493
+ return definition;
8494
+ }
8495
+ function applyOperations(state, operations) {
8496
+ return operations.reduce(
8497
+ (acc, operation) => defOf(operation).apply(acc, operation),
8498
+ state
8499
+ );
8500
+ }
8501
+ function focusOf(operation) {
8502
+ return defOf(operation).focus(operation);
8503
+ }
8504
+ function describeOperations(operations, ctx) {
8505
+ return operations.map((operation) => defOf(operation).describe(operation, ctx));
8506
+ }
8507
+ function parseOperation(candidate) {
8508
+ if (typeof candidate !== "object" || candidate === null || !("type" in candidate)) {
8509
+ throw new chunkL4KLYMUI_js.ValidationError("An operation must be an object carrying a type", []);
8510
+ }
8511
+ const type = candidate.type;
8512
+ if (typeof type !== "string") {
8513
+ throw new chunkL4KLYMUI_js.ValidationError("An operation's type must be a string", []);
8514
+ }
8515
+ const definition = OPERATION_REGISTRY.get(type);
8516
+ if (!definition) {
8517
+ throw new chunkL4KLYMUI_js.ValidationError(`Unknown operation type "${type}"`, []);
8518
+ }
8519
+ const parsed = definition.schema.safeParse(candidate);
8520
+ if (!parsed.success) {
8521
+ throw new chunkL4KLYMUI_js.ValidationError(
8522
+ `Operation "${type}" is invalid: ${parsed.error.issues.map((i) => `${i.path.join(".")} ${i.message}`).join("; ")}`,
8523
+ []
8524
+ );
8525
+ }
8526
+ return parsed.data;
8527
+ }
8528
+
8529
+ // src/architect/field-ids.ts
8530
+ function makeFieldId(groupId, seed, collisionIndex) {
8531
+ const base = `fld_${groupId}_${seed}`;
8532
+ return collisionIndex === 0 ? base : `${base}_${collisionIndex}`;
8533
+ }
8534
+ function seedOf(field, index) {
8535
+ if (field.attributeGroup) return field.attributeGroup.id;
8536
+ if (field.attribute) return field.attribute;
8537
+ return `slot${index}`;
8538
+ }
8539
+ function withIds(group2) {
8540
+ const seen = /* @__PURE__ */ new Map();
8541
+ const fields = group2.fields.map((field, index) => {
8542
+ if (field.id) return field;
8543
+ const seed = seedOf(field, index);
8544
+ const collisionIndex = seen.get(seed) ?? 0;
8545
+ seen.set(seed, collisionIndex + 1);
8546
+ return { ...field, id: makeFieldId(group2.id, seed, collisionIndex) };
8547
+ });
8548
+ return { ...group2, fields };
8549
+ }
8550
+ function ensureFieldIds(tabs) {
8551
+ return tabs.map(
8552
+ (tab) => tab.type === "form" ? { ...tab, groups: tab.groups.map(withIds) } : tab
8553
+ );
8554
+ }
8555
+
8556
+ // src/architect/view-projection.ts
8557
+ function toDraftableView(view) {
8558
+ return {
8559
+ id: view.id ?? "",
8560
+ objectName: view.object,
8561
+ type: view.type,
8562
+ label: view.label,
8563
+ tabs: isDetailView(view) ? view.config.tabs ?? [] : [],
8564
+ config: view.config
8565
+ };
8566
+ }
8567
+ function fromDraftableView(original, drafted) {
8568
+ if (original.type === "detail") {
8569
+ return {
8570
+ ...original,
8571
+ label: drafted.label,
8572
+ config: {
8573
+ ...drafted.config,
8574
+ tabs: drafted.tabs
8575
+ }
8576
+ };
8577
+ }
8578
+ return {
8579
+ ...original,
8580
+ label: drafted.label,
8581
+ config: drafted.config
8582
+ };
8583
+ }
8584
+
7510
8585
  Object.defineProperty(exports, "asTenantId", {
7511
8586
  enumerable: true,
7512
- get: function () { return chunkXTBGGJ3G_js.asTenantId; }
8587
+ get: function () { return chunkLBGLB443_js.asTenantId; }
7513
8588
  });
7514
8589
  Object.defineProperty(exports, "asUserId", {
7515
8590
  enumerable: true,
7516
- get: function () { return chunkXTBGGJ3G_js.asUserId; }
8591
+ get: function () { return chunkLBGLB443_js.asUserId; }
7517
8592
  });
7518
8593
  Object.defineProperty(exports, "canonicalStringify", {
7519
8594
  enumerable: true,
7520
- get: function () { return chunkXTBGGJ3G_js.canonicalStringify; }
8595
+ get: function () { return chunkLBGLB443_js.canonicalStringify; }
7521
8596
  });
7522
8597
  Object.defineProperty(exports, "deepEqual", {
7523
8598
  enumerable: true,
7524
- get: function () { return chunkXTBGGJ3G_js.deepEqual; }
8599
+ get: function () { return chunkLBGLB443_js.deepEqual; }
7525
8600
  });
7526
8601
  Object.defineProperty(exports, "generateId", {
7527
8602
  enumerable: true,
7528
- get: function () { return chunkXTBGGJ3G_js.generateId; }
8603
+ get: function () { return chunkLBGLB443_js.generateId; }
7529
8604
  });
7530
8605
  Object.defineProperty(exports, "indexBy", {
7531
8606
  enumerable: true,
7532
- get: function () { return chunkXTBGGJ3G_js.indexBy; }
8607
+ get: function () { return chunkLBGLB443_js.indexBy; }
7533
8608
  });
7534
8609
  Object.defineProperty(exports, "ATTRIBUTE_FILTER_OPERATORS", {
7535
8610
  enumerable: true,
7536
- get: function () { return chunkMXYCCUNB_js.ATTRIBUTE_FILTER_OPERATORS; }
8611
+ get: function () { return chunkKIMECN6D_js.ATTRIBUTE_FILTER_OPERATORS; }
7537
8612
  });
7538
8613
  Object.defineProperty(exports, "LIST_VIEW_TAB_VISIBILITIES", {
7539
8614
  enumerable: true,
7540
- get: function () { return chunkMXYCCUNB_js.LIST_VIEW_TAB_VISIBILITIES; }
8615
+ get: function () { return chunkKIMECN6D_js.LIST_VIEW_TAB_VISIBILITIES; }
7541
8616
  });
7542
8617
  Object.defineProperty(exports, "NO_VALUE_OPERATORS", {
7543
8618
  enumerable: true,
7544
- get: function () { return chunkMXYCCUNB_js.NO_VALUE_OPERATORS; }
8619
+ get: function () { return chunkKIMECN6D_js.NO_VALUE_OPERATORS; }
7545
8620
  });
7546
8621
  Object.defineProperty(exports, "OPERATORS_BY_TYPE", {
7547
8622
  enumerable: true,
7548
- get: function () { return chunkMXYCCUNB_js.OPERATORS_BY_TYPE; }
8623
+ get: function () { return chunkKIMECN6D_js.OPERATORS_BY_TYPE; }
7549
8624
  });
7550
8625
  Object.defineProperty(exports, "REMOVED_OPERATOR_REPLACEMENTS", {
7551
8626
  enumerable: true,
7552
- get: function () { return chunkMXYCCUNB_js.REMOVED_OPERATOR_REPLACEMENTS; }
8627
+ get: function () { return chunkKIMECN6D_js.REMOVED_OPERATOR_REPLACEMENTS; }
7553
8628
  });
7554
8629
  Object.defineProperty(exports, "RESERVED_ATTRIBUTE_NAMES", {
7555
8630
  enumerable: true,
7556
- get: function () { return chunkMXYCCUNB_js.RESERVED_ATTRIBUTE_NAMES; }
8631
+ get: function () { return chunkKIMECN6D_js.RESERVED_ATTRIBUTE_NAMES; }
7557
8632
  });
7558
8633
  Object.defineProperty(exports, "RESERVED_OBJECT_NAMES", {
7559
8634
  enumerable: true,
7560
- get: function () { return chunkMXYCCUNB_js.RESERVED_OBJECT_NAMES; }
8635
+ get: function () { return chunkKIMECN6D_js.RESERVED_OBJECT_NAMES; }
7561
8636
  });
7562
8637
  Object.defineProperty(exports, "RESOURCE_VISIBILITIES", {
7563
8638
  enumerable: true,
7564
- get: function () { return chunkMXYCCUNB_js.RESOURCE_VISIBILITIES; }
8639
+ get: function () { return chunkKIMECN6D_js.RESOURCE_VISIBILITIES; }
7565
8640
  });
7566
8641
  Object.defineProperty(exports, "SYNONYM_ALIASES", {
7567
8642
  enumerable: true,
7568
- get: function () { return chunkMXYCCUNB_js.SYNONYM_ALIASES; }
8643
+ get: function () { return chunkKIMECN6D_js.SYNONYM_ALIASES; }
7569
8644
  });
7570
8645
  Object.defineProperty(exports, "SYSTEM_ATTRIBUTES", {
7571
8646
  enumerable: true,
7572
- get: function () { return chunkMXYCCUNB_js.SYSTEM_ATTRIBUTES; }
8647
+ get: function () { return chunkKIMECN6D_js.SYSTEM_ATTRIBUTES; }
7573
8648
  });
7574
8649
  Object.defineProperty(exports, "SYSTEM_ATTRIBUTE_I18N_KEYS", {
7575
8650
  enumerable: true,
7576
- get: function () { return chunkMXYCCUNB_js.SYSTEM_ATTRIBUTE_I18N_KEYS; }
8651
+ get: function () { return chunkKIMECN6D_js.SYSTEM_ATTRIBUTE_I18N_KEYS; }
7577
8652
  });
7578
8653
  Object.defineProperty(exports, "SYSTEM_FIELD_NAMES", {
7579
8654
  enumerable: true,
7580
- get: function () { return chunkMXYCCUNB_js.SYSTEM_FIELD_NAMES; }
8655
+ get: function () { return chunkKIMECN6D_js.SYSTEM_FIELD_NAMES; }
7581
8656
  });
7582
8657
  Object.defineProperty(exports, "SYSTEM_FILTER_ATTRIBUTE_TYPES", {
7583
8658
  enumerable: true,
7584
- get: function () { return chunkMXYCCUNB_js.SYSTEM_FILTER_ATTRIBUTE_TYPES; }
8659
+ get: function () { return chunkKIMECN6D_js.SYSTEM_FILTER_ATTRIBUTE_TYPES; }
7585
8660
  });
7586
8661
  Object.defineProperty(exports, "canonicalizeFilterValue", {
7587
8662
  enumerable: true,
7588
- get: function () { return chunkMXYCCUNB_js.canonicalizeFilterValue; }
8663
+ get: function () { return chunkKIMECN6D_js.canonicalizeFilterValue; }
7589
8664
  });
7590
8665
  Object.defineProperty(exports, "collectQualifiedRuleIssues", {
7591
8666
  enumerable: true,
7592
- get: function () { return chunkMXYCCUNB_js.collectQualifiedRuleIssues; }
8667
+ get: function () { return chunkKIMECN6D_js.collectQualifiedRuleIssues; }
7593
8668
  });
7594
8669
  Object.defineProperty(exports, "currentActor", {
7595
8670
  enumerable: true,
7596
- get: function () { return chunkMXYCCUNB_js.currentActor; }
8671
+ get: function () { return chunkKIMECN6D_js.currentActor; }
7597
8672
  });
7598
8673
  Object.defineProperty(exports, "detailTabSchema", {
7599
8674
  enumerable: true,
7600
- get: function () { return chunkMXYCCUNB_js.detailTabSchema; }
8675
+ get: function () { return chunkKIMECN6D_js.detailTabSchema; }
7601
8676
  });
7602
8677
  Object.defineProperty(exports, "detailViewConfigSchema", {
7603
8678
  enumerable: true,
7604
- get: function () { return chunkMXYCCUNB_js.detailViewConfigSchema; }
8679
+ get: function () { return chunkKIMECN6D_js.detailViewConfigSchema; }
7605
8680
  });
7606
8681
  Object.defineProperty(exports, "extractCurrencyFilterValue", {
7607
8682
  enumerable: true,
7608
- get: function () { return chunkMXYCCUNB_js.extractCurrencyFilterValue; }
8683
+ get: function () { return chunkKIMECN6D_js.extractCurrencyFilterValue; }
7609
8684
  });
7610
8685
  Object.defineProperty(exports, "extractFilterValue", {
7611
8686
  enumerable: true,
7612
- get: function () { return chunkMXYCCUNB_js.extractFilterValue; }
8687
+ get: function () { return chunkKIMECN6D_js.extractFilterValue; }
7613
8688
  });
7614
8689
  Object.defineProperty(exports, "getAttributeCapabilities", {
7615
8690
  enumerable: true,
7616
- get: function () { return chunkMXYCCUNB_js.getAttributeCapabilities; }
8691
+ get: function () { return chunkKIMECN6D_js.getAttributeCapabilities; }
7617
8692
  });
7618
8693
  Object.defineProperty(exports, "getAttributeFilterOperators", {
7619
8694
  enumerable: true,
7620
- get: function () { return chunkMXYCCUNB_js.getAttributeFilterOperators; }
8695
+ get: function () { return chunkKIMECN6D_js.getAttributeFilterOperators; }
7621
8696
  });
7622
8697
  Object.defineProperty(exports, "getOperatorPolarity", {
7623
8698
  enumerable: true,
7624
- get: function () { return chunkMXYCCUNB_js.getOperatorPolarity; }
8699
+ get: function () { return chunkKIMECN6D_js.getOperatorPolarity; }
7625
8700
  });
7626
8701
  Object.defineProperty(exports, "getRollupFilterOperators", {
7627
8702
  enumerable: true,
7628
- get: function () { return chunkMXYCCUNB_js.getRollupFilterOperators; }
8703
+ get: function () { return chunkKIMECN6D_js.getRollupFilterOperators; }
7629
8704
  });
7630
8705
  Object.defineProperty(exports, "getSystemAttributeI18nKey", {
7631
8706
  enumerable: true,
7632
- get: function () { return chunkMXYCCUNB_js.getSystemAttributeI18nKey; }
8707
+ get: function () { return chunkKIMECN6D_js.getSystemAttributeI18nKey; }
7633
8708
  });
7634
8709
  Object.defineProperty(exports, "getSystemAttributeList", {
7635
8710
  enumerable: true,
7636
- get: function () { return chunkMXYCCUNB_js.getSystemAttributeList; }
8711
+ get: function () { return chunkKIMECN6D_js.getSystemAttributeList; }
7637
8712
  });
7638
8713
  Object.defineProperty(exports, "inverseSourceSchema", {
7639
8714
  enumerable: true,
7640
- get: function () { return chunkMXYCCUNB_js.inverseSourceSchema; }
8715
+ get: function () { return chunkKIMECN6D_js.inverseSourceSchema; }
7641
8716
  });
7642
8717
  Object.defineProperty(exports, "isAttributeFilterable", {
7643
8718
  enumerable: true,
7644
- get: function () { return chunkMXYCCUNB_js.isAttributeFilterable; }
8719
+ get: function () { return chunkKIMECN6D_js.isAttributeFilterable; }
7645
8720
  });
7646
8721
  Object.defineProperty(exports, "isAttributeGroupable", {
7647
8722
  enumerable: true,
7648
- get: function () { return chunkMXYCCUNB_js.isAttributeGroupable; }
8723
+ get: function () { return chunkKIMECN6D_js.isAttributeGroupable; }
7649
8724
  });
7650
8725
  Object.defineProperty(exports, "isAttributeKanbanGroupable", {
7651
8726
  enumerable: true,
7652
- get: function () { return chunkMXYCCUNB_js.isAttributeKanbanGroupable; }
8727
+ get: function () { return chunkKIMECN6D_js.isAttributeKanbanGroupable; }
7653
8728
  });
7654
8729
  Object.defineProperty(exports, "isAttributeSearchable", {
7655
8730
  enumerable: true,
7656
- get: function () { return chunkMXYCCUNB_js.isAttributeSearchable; }
8731
+ get: function () { return chunkKIMECN6D_js.isAttributeSearchable; }
7657
8732
  });
7658
8733
  Object.defineProperty(exports, "isDynamicValue", {
7659
8734
  enumerable: true,
7660
- get: function () { return chunkMXYCCUNB_js.isDynamicValue; }
8735
+ get: function () { return chunkKIMECN6D_js.isDynamicValue; }
7661
8736
  });
7662
8737
  Object.defineProperty(exports, "isManagedSystemAttribute", {
7663
8738
  enumerable: true,
7664
- get: function () { return chunkMXYCCUNB_js.isManagedSystemAttribute; }
8739
+ get: function () { return chunkKIMECN6D_js.isManagedSystemAttribute; }
7665
8740
  });
7666
8741
  Object.defineProperty(exports, "isNoValueOperator", {
7667
8742
  enumerable: true,
7668
- get: function () { return chunkMXYCCUNB_js.isNoValueOperator; }
8743
+ get: function () { return chunkKIMECN6D_js.isNoValueOperator; }
7669
8744
  });
7670
8745
  Object.defineProperty(exports, "isRelativeDateValue", {
7671
8746
  enumerable: true,
7672
- get: function () { return chunkMXYCCUNB_js.isRelativeDateValue; }
8747
+ get: function () { return chunkKIMECN6D_js.isRelativeDateValue; }
7673
8748
  });
7674
8749
  Object.defineProperty(exports, "isSetMembershipOperator", {
7675
8750
  enumerable: true,
7676
- get: function () { return chunkMXYCCUNB_js.isSetMembershipOperator; }
8751
+ get: function () { return chunkKIMECN6D_js.isSetMembershipOperator; }
7677
8752
  });
7678
8753
  Object.defineProperty(exports, "listViewConfigSchema", {
7679
8754
  enumerable: true,
7680
- get: function () { return chunkMXYCCUNB_js.listViewConfigSchema; }
8755
+ get: function () { return chunkKIMECN6D_js.listViewConfigSchema; }
7681
8756
  });
7682
8757
  Object.defineProperty(exports, "listViewTabSchema", {
7683
8758
  enumerable: true,
7684
- get: function () { return chunkMXYCCUNB_js.listViewTabSchema; }
8759
+ get: function () { return chunkKIMECN6D_js.listViewTabSchema; }
7685
8760
  });
7686
8761
  Object.defineProperty(exports, "normalizeFilterRule", {
7687
8762
  enumerable: true,
7688
- get: function () { return chunkMXYCCUNB_js.normalizeFilterRule; }
8763
+ get: function () { return chunkKIMECN6D_js.normalizeFilterRule; }
7689
8764
  });
7690
8765
  Object.defineProperty(exports, "normalizeForEdgeRpc", {
7691
8766
  enumerable: true,
7692
- get: function () { return chunkMXYCCUNB_js.normalizeForEdgeRpc; }
8767
+ get: function () { return chunkKIMECN6D_js.normalizeForEdgeRpc; }
7693
8768
  });
7694
8769
  Object.defineProperty(exports, "normalizeOperator", {
7695
8770
  enumerable: true,
7696
- get: function () { return chunkMXYCCUNB_js.normalizeOperator; }
8771
+ get: function () { return chunkKIMECN6D_js.normalizeOperator; }
7697
8772
  });
7698
8773
  Object.defineProperty(exports, "now", {
7699
8774
  enumerable: true,
7700
- get: function () { return chunkMXYCCUNB_js.now; }
8775
+ get: function () { return chunkKIMECN6D_js.now; }
7701
8776
  });
7702
8777
  Object.defineProperty(exports, "parseResourceVisibility", {
7703
8778
  enumerable: true,
7704
- get: function () { return chunkMXYCCUNB_js.parseResourceVisibility; }
8779
+ get: function () { return chunkKIMECN6D_js.parseResourceVisibility; }
7705
8780
  });
7706
8781
  Object.defineProperty(exports, "parseViewConfig", {
7707
8782
  enumerable: true,
7708
- get: function () { return chunkMXYCCUNB_js.parseViewConfig; }
8783
+ get: function () { return chunkKIMECN6D_js.parseViewConfig; }
7709
8784
  });
7710
8785
  Object.defineProperty(exports, "relationSourceSchema", {
7711
8786
  enumerable: true,
7712
- get: function () { return chunkMXYCCUNB_js.relationSourceSchema; }
8787
+ get: function () { return chunkKIMECN6D_js.relationSourceSchema; }
7713
8788
  });
7714
8789
  Object.defineProperty(exports, "resolveEffectiveFilterType", {
7715
8790
  enumerable: true,
7716
- get: function () { return chunkMXYCCUNB_js.resolveEffectiveFilterType; }
8791
+ get: function () { return chunkKIMECN6D_js.resolveEffectiveFilterType; }
7717
8792
  });
7718
8793
  Object.defineProperty(exports, "resolveIsWithinBounds", {
7719
8794
  enumerable: true,
7720
- get: function () { return chunkMXYCCUNB_js.resolveIsWithinBounds; }
8795
+ get: function () { return chunkKIMECN6D_js.resolveIsWithinBounds; }
7721
8796
  });
7722
8797
  Object.defineProperty(exports, "resolveUtcDayBounds", {
7723
8798
  enumerable: true,
7724
- get: function () { return chunkMXYCCUNB_js.resolveUtcDayBounds; }
8799
+ get: function () { return chunkKIMECN6D_js.resolveUtcDayBounds; }
7725
8800
  });
7726
8801
  Object.defineProperty(exports, "tableSourceSchema", {
7727
8802
  enumerable: true,
7728
- get: function () { return chunkMXYCCUNB_js.tableSourceSchema; }
8803
+ get: function () { return chunkKIMECN6D_js.tableSourceSchema; }
7729
8804
  });
7730
8805
  Object.defineProperty(exports, "toMultiValueOperator", {
7731
8806
  enumerable: true,
7732
- get: function () { return chunkMXYCCUNB_js.toMultiValueOperator; }
8807
+ get: function () { return chunkKIMECN6D_js.toMultiValueOperator; }
7733
8808
  });
7734
8809
  Object.defineProperty(exports, "toUtcDayString", {
7735
8810
  enumerable: true,
7736
- get: function () { return chunkMXYCCUNB_js.toUtcDayString; }
8811
+ get: function () { return chunkKIMECN6D_js.toUtcDayString; }
7737
8812
  });
7738
8813
  Object.defineProperty(exports, "today", {
7739
8814
  enumerable: true,
7740
- get: function () { return chunkMXYCCUNB_js.today; }
8815
+ get: function () { return chunkKIMECN6D_js.today; }
7741
8816
  });
7742
8817
  Object.defineProperty(exports, "validateQualifiedRule", {
7743
8818
  enumerable: true,
7744
- get: function () { return chunkMXYCCUNB_js.validateQualifiedRule; }
8819
+ get: function () { return chunkKIMECN6D_js.validateQualifiedRule; }
7745
8820
  });
7746
8821
  Object.defineProperty(exports, "viewConfigByTypeSchema", {
7747
8822
  enumerable: true,
7748
- get: function () { return chunkMXYCCUNB_js.viewConfigByTypeSchema; }
8823
+ get: function () { return chunkKIMECN6D_js.viewConfigByTypeSchema; }
7749
8824
  });
7750
8825
  Object.defineProperty(exports, "viewTypeSchema", {
7751
8826
  enumerable: true,
7752
- get: function () { return chunkMXYCCUNB_js.viewTypeSchema; }
8827
+ get: function () { return chunkKIMECN6D_js.viewTypeSchema; }
7753
8828
  });
7754
8829
  Object.defineProperty(exports, "ComputedFormulaParseError", {
7755
8830
  enumerable: true,
7756
- get: function () { return chunkFAEOVIDJ_js.ComputedFormulaParseError; }
8831
+ get: function () { return chunkDIMTNM3F_js.ComputedFormulaParseError; }
7757
8832
  });
7758
8833
  Object.defineProperty(exports, "SCHEMA_LIMITS", {
7759
8834
  enumerable: true,
7760
- get: function () { return chunkFAEOVIDJ_js.SCHEMA_LIMITS; }
8835
+ get: function () { return chunkDIMTNM3F_js.SCHEMA_LIMITS; }
7761
8836
  });
7762
8837
  Object.defineProperty(exports, "colorIdSchema", {
7763
8838
  enumerable: true,
7764
- get: function () { return chunkFAEOVIDJ_js.colorIdSchema; }
8839
+ get: function () { return chunkDIMTNM3F_js.colorIdSchema; }
7765
8840
  });
7766
8841
  Object.defineProperty(exports, "iconNameSchema", {
7767
8842
  enumerable: true,
7768
- get: function () { return chunkFAEOVIDJ_js.iconNameSchema; }
8843
+ get: function () { return chunkDIMTNM3F_js.iconNameSchema; }
7769
8844
  });
7770
8845
  Object.defineProperty(exports, "multiselectOptionWriteSchema", {
7771
8846
  enumerable: true,
7772
- get: function () { return chunkFAEOVIDJ_js.multiselectOptionWriteSchema; }
8847
+ get: function () { return chunkDIMTNM3F_js.multiselectOptionWriteSchema; }
7773
8848
  });
7774
8849
  Object.defineProperty(exports, "parseAttributeConfig", {
7775
8850
  enumerable: true,
7776
- get: function () { return chunkFAEOVIDJ_js.parseAttributeConfig; }
8851
+ get: function () { return chunkDIMTNM3F_js.parseAttributeConfig; }
7777
8852
  });
7778
8853
  Object.defineProperty(exports, "parseAttributeConfigForCreate", {
7779
8854
  enumerable: true,
7780
- get: function () { return chunkFAEOVIDJ_js.parseAttributeConfigForCreate; }
8855
+ get: function () { return chunkDIMTNM3F_js.parseAttributeConfigForCreate; }
7781
8856
  });
7782
8857
  Object.defineProperty(exports, "parseAttributeConfigForUpdate", {
7783
8858
  enumerable: true,
7784
- get: function () { return chunkFAEOVIDJ_js.parseAttributeConfigForUpdate; }
8859
+ get: function () { return chunkDIMTNM3F_js.parseAttributeConfigForUpdate; }
7785
8860
  });
7786
8861
  Object.defineProperty(exports, "parseComputedFormula", {
7787
8862
  enumerable: true,
7788
- get: function () { return chunkFAEOVIDJ_js.parseComputedFormula; }
8863
+ get: function () { return chunkDIMTNM3F_js.parseComputedFormula; }
7789
8864
  });
7790
8865
  Object.defineProperty(exports, "selectOptionWriteSchema", {
7791
8866
  enumerable: true,
7792
- get: function () { return chunkFAEOVIDJ_js.selectOptionWriteSchema; }
8867
+ get: function () { return chunkDIMTNM3F_js.selectOptionWriteSchema; }
7793
8868
  });
7794
8869
  Object.defineProperty(exports, "statusGroupSchema", {
7795
8870
  enumerable: true,
7796
- get: function () { return chunkFAEOVIDJ_js.statusGroupSchema; }
8871
+ get: function () { return chunkDIMTNM3F_js.statusGroupSchema; }
7797
8872
  });
7798
8873
  Object.defineProperty(exports, "statusOptionWriteSchema", {
7799
8874
  enumerable: true,
7800
- get: function () { return chunkFAEOVIDJ_js.statusOptionWriteSchema; }
8875
+ get: function () { return chunkDIMTNM3F_js.statusOptionWriteSchema; }
7801
8876
  });
7802
8877
  Object.defineProperty(exports, "createFormAttributeValidator", {
7803
8878
  enumerable: true,
7804
- get: function () { return chunk3PGLMGTR_js.createFormAttributeValidator; }
8879
+ get: function () { return chunkV4MZOTLV_js.createFormAttributeValidator; }
7805
8880
  });
7806
8881
  Object.defineProperty(exports, "isNullishOrEmptyString", {
7807
8882
  enumerable: true,
7808
- get: function () { return chunk3PGLMGTR_js.isNullishOrEmptyString; }
8883
+ get: function () { return chunkV4MZOTLV_js.isNullishOrEmptyString; }
7809
8884
  });
7810
8885
  Object.defineProperty(exports, "isValuePresent", {
7811
8886
  enumerable: true,
7812
- get: function () { return chunk3PGLMGTR_js.isValuePresent; }
8887
+ get: function () { return chunkV4MZOTLV_js.isValuePresent; }
7813
8888
  });
7814
8889
  Object.defineProperty(exports, "rejectUnknownAttributesOrThrow", {
7815
8890
  enumerable: true,
7816
- get: function () { return chunk3PGLMGTR_js.rejectUnknownAttributesOrThrow; }
8891
+ get: function () { return chunkV4MZOTLV_js.rejectUnknownAttributesOrThrow; }
7817
8892
  });
7818
8893
  Object.defineProperty(exports, "validateDraft", {
7819
8894
  enumerable: true,
7820
- get: function () { return chunk3PGLMGTR_js.validateDraft; }
8895
+ get: function () { return chunkV4MZOTLV_js.validateDraft; }
7821
8896
  });
7822
8897
  Object.defineProperty(exports, "validateDraftOrThrow", {
7823
8898
  enumerable: true,
7824
- get: function () { return chunk3PGLMGTR_js.validateDraftOrThrow; }
8899
+ get: function () { return chunkV4MZOTLV_js.validateDraftOrThrow; }
7825
8900
  });
7826
8901
  Object.defineProperty(exports, "validateObject", {
7827
8902
  enumerable: true,
7828
- get: function () { return chunk3PGLMGTR_js.validateObject; }
8903
+ get: function () { return chunkV4MZOTLV_js.validateObject; }
7829
8904
  });
7830
8905
  Object.defineProperty(exports, "validateObjectOrThrow", {
7831
8906
  enumerable: true,
7832
- get: function () { return chunk3PGLMGTR_js.validateObjectOrThrow; }
8907
+ get: function () { return chunkV4MZOTLV_js.validateObjectOrThrow; }
7833
8908
  });
7834
8909
  Object.defineProperty(exports, "createCheckboxValidator", {
7835
8910
  enumerable: true,
@@ -7857,155 +8932,155 @@ Object.defineProperty(exports, "resolveTextPattern", {
7857
8932
  });
7858
8933
  Object.defineProperty(exports, "AccessDeniedError", {
7859
8934
  enumerable: true,
7860
- get: function () { return chunkM3WFXOA4_js.AccessDeniedError; }
8935
+ get: function () { return chunkL4KLYMUI_js.AccessDeniedError; }
7861
8936
  });
7862
8937
  Object.defineProperty(exports, "AttributeInUseError", {
7863
8938
  enumerable: true,
7864
- get: function () { return chunkM3WFXOA4_js.AttributeInUseError; }
8939
+ get: function () { return chunkL4KLYMUI_js.AttributeInUseError; }
7865
8940
  });
7866
8941
  Object.defineProperty(exports, "AttributeNotFoundError", {
7867
8942
  enumerable: true,
7868
- get: function () { return chunkM3WFXOA4_js.AttributeNotFoundError; }
8943
+ get: function () { return chunkL4KLYMUI_js.AttributeNotFoundError; }
7869
8944
  });
7870
8945
  Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
7871
8946
  enumerable: true,
7872
- get: function () { return chunkM3WFXOA4_js.ChangeTypeNotSupportedError; }
8947
+ get: function () { return chunkL4KLYMUI_js.ChangeTypeNotSupportedError; }
7873
8948
  });
7874
8949
  Object.defineProperty(exports, "ConcurrentModificationError", {
7875
8950
  enumerable: true,
7876
- get: function () { return chunkM3WFXOA4_js.ConcurrentModificationError; }
8951
+ get: function () { return chunkL4KLYMUI_js.ConcurrentModificationError; }
7877
8952
  });
7878
8953
  Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
7879
8954
  enumerable: true,
7880
- get: function () { return chunkM3WFXOA4_js.DestructiveSyncNotAllowedError; }
8955
+ get: function () { return chunkL4KLYMUI_js.DestructiveSyncNotAllowedError; }
7881
8956
  });
7882
8957
  Object.defineProperty(exports, "DuplicateError", {
7883
8958
  enumerable: true,
7884
- get: function () { return chunkM3WFXOA4_js.DuplicateError; }
8959
+ get: function () { return chunkL4KLYMUI_js.DuplicateError; }
7885
8960
  });
7886
8961
  Object.defineProperty(exports, "ForbiddenError", {
7887
8962
  enumerable: true,
7888
- get: function () { return chunkM3WFXOA4_js.ForbiddenError; }
8963
+ get: function () { return chunkL4KLYMUI_js.ForbiddenError; }
7889
8964
  });
7890
8965
  Object.defineProperty(exports, "MemoryNotFoundError", {
7891
8966
  enumerable: true,
7892
- get: function () { return chunkM3WFXOA4_js.MemoryNotFoundError; }
8967
+ get: function () { return chunkL4KLYMUI_js.MemoryNotFoundError; }
7893
8968
  });
7894
8969
  Object.defineProperty(exports, "MigrationTimeoutError", {
7895
8970
  enumerable: true,
7896
- get: function () { return chunkM3WFXOA4_js.MigrationTimeoutError; }
8971
+ get: function () { return chunkL4KLYMUI_js.MigrationTimeoutError; }
7897
8972
  });
7898
8973
  Object.defineProperty(exports, "NotFoundError", {
7899
8974
  enumerable: true,
7900
- get: function () { return chunkM3WFXOA4_js.NotFoundError; }
8975
+ get: function () { return chunkL4KLYMUI_js.NotFoundError; }
7901
8976
  });
7902
8977
  Object.defineProperty(exports, "NotImplementedError", {
7903
8978
  enumerable: true,
7904
- get: function () { return chunkM3WFXOA4_js.NotImplementedError; }
8979
+ get: function () { return chunkL4KLYMUI_js.NotImplementedError; }
7905
8980
  });
7906
8981
  Object.defineProperty(exports, "ObjectNotFoundError", {
7907
8982
  enumerable: true,
7908
- get: function () { return chunkM3WFXOA4_js.ObjectNotFoundError; }
8983
+ get: function () { return chunkL4KLYMUI_js.ObjectNotFoundError; }
7909
8984
  });
7910
8985
  Object.defineProperty(exports, "ObjectReferencedError", {
7911
8986
  enumerable: true,
7912
- get: function () { return chunkM3WFXOA4_js.ObjectReferencedError; }
8987
+ get: function () { return chunkL4KLYMUI_js.ObjectReferencedError; }
7913
8988
  });
7914
8989
  Object.defineProperty(exports, "OrphanSystemAttributeError", {
7915
8990
  enumerable: true,
7916
- get: function () { return chunkM3WFXOA4_js.OrphanSystemAttributeError; }
8991
+ get: function () { return chunkL4KLYMUI_js.OrphanSystemAttributeError; }
7917
8992
  });
7918
8993
  Object.defineProperty(exports, "ProtectedResourceError", {
7919
8994
  enumerable: true,
7920
- get: function () { return chunkM3WFXOA4_js.ProtectedResourceError; }
8995
+ get: function () { return chunkL4KLYMUI_js.ProtectedResourceError; }
7921
8996
  });
7922
8997
  Object.defineProperty(exports, "ProtectedRoleError", {
7923
8998
  enumerable: true,
7924
- get: function () { return chunkM3WFXOA4_js.ProtectedRoleError; }
8999
+ get: function () { return chunkL4KLYMUI_js.ProtectedRoleError; }
7925
9000
  });
7926
9001
  Object.defineProperty(exports, "RecordNotFoundError", {
7927
9002
  enumerable: true,
7928
- get: function () { return chunkM3WFXOA4_js.RecordNotFoundError; }
9003
+ get: function () { return chunkL4KLYMUI_js.RecordNotFoundError; }
7929
9004
  });
7930
9005
  Object.defineProperty(exports, "RecordReferencedError", {
7931
9006
  enumerable: true,
7932
- get: function () { return chunkM3WFXOA4_js.RecordReferencedError; }
9007
+ get: function () { return chunkL4KLYMUI_js.RecordReferencedError; }
7933
9008
  });
7934
9009
  Object.defineProperty(exports, "RepositoryError", {
7935
9010
  enumerable: true,
7936
- get: function () { return chunkM3WFXOA4_js.RepositoryError; }
9011
+ get: function () { return chunkL4KLYMUI_js.RepositoryError; }
7937
9012
  });
7938
9013
  Object.defineProperty(exports, "RoleNotFoundError", {
7939
9014
  enumerable: true,
7940
- get: function () { return chunkM3WFXOA4_js.RoleNotFoundError; }
9015
+ get: function () { return chunkL4KLYMUI_js.RoleNotFoundError; }
7941
9016
  });
7942
9017
  Object.defineProperty(exports, "SchemaError", {
7943
9018
  enumerable: true,
7944
- get: function () { return chunkM3WFXOA4_js.SchemaError; }
9019
+ get: function () { return chunkL4KLYMUI_js.SchemaError; }
7945
9020
  });
7946
9021
  Object.defineProperty(exports, "SchemaErrorCode", {
7947
9022
  enumerable: true,
7948
- get: function () { return chunkM3WFXOA4_js.SchemaErrorCode; }
9023
+ get: function () { return chunkL4KLYMUI_js.SchemaErrorCode; }
7949
9024
  });
7950
9025
  Object.defineProperty(exports, "SchemaPlanNotFoundError", {
7951
9026
  enumerable: true,
7952
- get: function () { return chunkM3WFXOA4_js.SchemaPlanNotFoundError; }
9027
+ get: function () { return chunkL4KLYMUI_js.SchemaPlanNotFoundError; }
7953
9028
  });
7954
9029
  Object.defineProperty(exports, "SearchBackendError", {
7955
9030
  enumerable: true,
7956
- get: function () { return chunkM3WFXOA4_js.SearchBackendError; }
9031
+ get: function () { return chunkL4KLYMUI_js.SearchBackendError; }
7957
9032
  });
7958
9033
  Object.defineProperty(exports, "StorageError", {
7959
9034
  enumerable: true,
7960
- get: function () { return chunkM3WFXOA4_js.StorageError; }
9035
+ get: function () { return chunkL4KLYMUI_js.StorageError; }
7961
9036
  });
7962
9037
  Object.defineProperty(exports, "SyncCascadeError", {
7963
9038
  enumerable: true,
7964
- get: function () { return chunkM3WFXOA4_js.SyncCascadeError; }
9039
+ get: function () { return chunkL4KLYMUI_js.SyncCascadeError; }
7965
9040
  });
7966
9041
  Object.defineProperty(exports, "SyncConflictError", {
7967
9042
  enumerable: true,
7968
- get: function () { return chunkM3WFXOA4_js.SyncConflictError; }
9043
+ get: function () { return chunkL4KLYMUI_js.SyncConflictError; }
7969
9044
  });
7970
9045
  Object.defineProperty(exports, "SyncError", {
7971
9046
  enumerable: true,
7972
- get: function () { return chunkM3WFXOA4_js.SyncError; }
9047
+ get: function () { return chunkL4KLYMUI_js.SyncError; }
7973
9048
  });
7974
9049
  Object.defineProperty(exports, "SystemEntityImmutableError", {
7975
9050
  enumerable: true,
7976
- get: function () { return chunkM3WFXOA4_js.SystemEntityImmutableError; }
9051
+ get: function () { return chunkL4KLYMUI_js.SystemEntityImmutableError; }
7977
9052
  });
7978
9053
  Object.defineProperty(exports, "ValidationError", {
7979
9054
  enumerable: true,
7980
- get: function () { return chunkM3WFXOA4_js.ValidationError; }
9055
+ get: function () { return chunkL4KLYMUI_js.ValidationError; }
7981
9056
  });
7982
9057
  Object.defineProperty(exports, "isAttributeInUseError", {
7983
9058
  enumerable: true,
7984
- get: function () { return chunkM3WFXOA4_js.isAttributeInUseError; }
9059
+ get: function () { return chunkL4KLYMUI_js.isAttributeInUseError; }
7985
9060
  });
7986
9061
  Object.defineProperty(exports, "isNotFoundError", {
7987
9062
  enumerable: true,
7988
- get: function () { return chunkM3WFXOA4_js.isNotFoundError; }
9063
+ get: function () { return chunkL4KLYMUI_js.isNotFoundError; }
7989
9064
  });
7990
9065
  Object.defineProperty(exports, "isObjectReferencedError", {
7991
9066
  enumerable: true,
7992
- get: function () { return chunkM3WFXOA4_js.isObjectReferencedError; }
9067
+ get: function () { return chunkL4KLYMUI_js.isObjectReferencedError; }
7993
9068
  });
7994
9069
  Object.defineProperty(exports, "isProtectedResourceError", {
7995
9070
  enumerable: true,
7996
- get: function () { return chunkM3WFXOA4_js.isProtectedResourceError; }
9071
+ get: function () { return chunkL4KLYMUI_js.isProtectedResourceError; }
7997
9072
  });
7998
9073
  Object.defineProperty(exports, "isRecordReferencedError", {
7999
9074
  enumerable: true,
8000
- get: function () { return chunkM3WFXOA4_js.isRecordReferencedError; }
9075
+ get: function () { return chunkL4KLYMUI_js.isRecordReferencedError; }
8001
9076
  });
8002
9077
  Object.defineProperty(exports, "isSchemaError", {
8003
9078
  enumerable: true,
8004
- get: function () { return chunkM3WFXOA4_js.isSchemaError; }
9079
+ get: function () { return chunkL4KLYMUI_js.isSchemaError; }
8005
9080
  });
8006
9081
  Object.defineProperty(exports, "isValidationError", {
8007
9082
  enumerable: true,
8008
- get: function () { return chunkM3WFXOA4_js.isValidationError; }
9083
+ get: function () { return chunkL4KLYMUI_js.isValidationError; }
8009
9084
  });
8010
9085
  Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
8011
9086
  enumerable: true,
@@ -8019,6 +9094,7 @@ exports.AGENT_UI_BATCH_MAX_BYTES = AGENT_UI_BATCH_MAX_BYTES;
8019
9094
  exports.AGENT_UI_BATCH_MAX_ITEMS = AGENT_UI_BATCH_MAX_ITEMS;
8020
9095
  exports.ALLOWED_PROPERTY_TYPES = ALLOWED_PROPERTY_TYPES;
8021
9096
  exports.ALL_ACTIONS = ALL_ACTIONS;
9097
+ exports.ALL_OPERATION_TYPES = ALL_OPERATION_TYPES;
8022
9098
  exports.ALL_SYSTEM_RESOURCES = ALL_SYSTEM_RESOURCES;
8023
9099
  exports.AUDIT_ACTIONS = AUDIT_ACTIONS;
8024
9100
  exports.AUDIT_RESOURCE_TYPES = AUDIT_RESOURCE_TYPES;
@@ -8027,6 +9103,7 @@ exports.AgentBuilder = AgentBuilder;
8027
9103
  exports.BEHAVIOR_PROPERTIES = BEHAVIOR_PROPERTIES;
8028
9104
  exports.BROWSER_PREVIEW_STATUSES = BROWSER_PREVIEW_STATUSES;
8029
9105
  exports.BYTE_UNIT_LABELS = BYTE_UNIT_LABELS;
9106
+ exports.CLAIMABLE_SESSION_STATUSES = CLAIMABLE_SESSION_STATUSES;
8030
9107
  exports.COMPUTED_FUNCTIONS = COMPUTED_FUNCTIONS;
8031
9108
  exports.COMPUTED_FUNCTION_METADATA = COMPUTED_FUNCTION_METADATA;
8032
9109
  exports.COMPUTED_FUNCTION_NAMES = COMPUTED_FUNCTION_NAMES;
@@ -8043,6 +9120,10 @@ exports.DEFAULT_ROLE_DESCRIPTIONS = DEFAULT_ROLE_DESCRIPTIONS;
8043
9120
  exports.DEFAULT_ROLE_LABELS = DEFAULT_ROLE_LABELS;
8044
9121
  exports.DEFAULT_ROLE_PERMISSIONS = DEFAULT_ROLE_PERMISSIONS;
8045
9122
  exports.DOCUMENT_SYSTEM_ATTRIBUTES = DOCUMENT_SYSTEM_ATTRIBUTES;
9123
+ exports.DRIVE_LIST_VIEW = DRIVE_LIST_VIEW;
9124
+ exports.DRIVE_OBJECT = DRIVE_OBJECT;
9125
+ exports.DRIVE_OBJECT_NAME = DRIVE_OBJECT_NAME;
9126
+ exports.DRIVE_VIEW = DRIVE_VIEW;
8046
9127
  exports.DetailViewBuilder = DetailViewBuilder;
8047
9128
  exports.DocumentsTabConfig = DocumentsTabConfig;
8048
9129
  exports.EMPTY_VALUE_PLACEHOLDER = EMPTY_VALUE_PLACEHOLDER;
@@ -8084,13 +9165,14 @@ exports.NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN = NOTIFICATION_TYPE_AGENT_
8084
9165
  exports.NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED = NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED;
8085
9166
  exports.NOTIFICATION_WORK_STATES = NOTIFICATION_WORK_STATES;
8086
9167
  exports.NoopGeocodingAdapter = NoopGeocodingAdapter;
9168
+ exports.OPEN_TOOL_PART_STATES = OPEN_TOOL_PART_STATES;
9169
+ exports.OPERATION_REGISTRY = OPERATION_REGISTRY;
8087
9170
  exports.OPERATOR_SPECS = OPERATOR_SPECS;
8088
9171
  exports.ObjectBuilder = ObjectBuilder;
8089
9172
  exports.PRESENTATION_PROPERTIES = PRESENTATION_PROPERTIES;
8090
9173
  exports.QUALIFIED_SEPARATOR = QUALIFIED_SEPARATOR;
8091
9174
  exports.RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY = RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY;
8092
9175
  exports.RELATION_TARGET_ANY = RELATION_TARGET_ANY;
8093
- exports.RelationGroupBuilder = RelationGroupBuilder;
8094
9176
  exports.RichtextTabConfig = RichtextTabConfig;
8095
9177
  exports.SCHEMA_PLAN_LIMITS = SCHEMA_PLAN_LIMITS;
8096
9178
  exports.SESSION_TERMINAL_STATUSES = SESSION_TERMINAL_STATUSES;
@@ -8103,6 +9185,7 @@ exports.SYSTEM_RESOURCE_LABELS = SYSTEM_RESOURCE_LABELS;
8103
9185
  exports.TODAY_DEFAULT = TODAY_DEFAULT;
8104
9186
  exports.TODO_PLAN_STATUSES = TODO_PLAN_STATUSES;
8105
9187
  exports.TODO_STATUSES = TODO_STATUSES;
9188
+ exports.TOOL_APPROVAL_STATES = TOOL_APPROVAL_STATES;
8106
9189
  exports.TabBuilder = TabBuilder;
8107
9190
  exports.TableTabConfig = TableTabConfig;
8108
9191
  exports.USER_STATUSES = USER_STATUSES;
@@ -8111,6 +9194,7 @@ exports.accessLevelToActions = accessLevelToActions;
8111
9194
  exports.actionsToAccessLevel = actionsToAccessLevel;
8112
9195
  exports.agent = agent;
8113
9196
  exports.agentDisplayName = agentDisplayName;
9197
+ exports.applyOperations = applyOperations;
8114
9198
  exports.applyPipes = applyPipes;
8115
9199
  exports.applyRelationProps = applyRelationProps;
8116
9200
  exports.assertAcyclicComputedDependencies = assertAcyclicComputedDependencies;
@@ -8131,10 +9215,13 @@ exports.currency = currency;
8131
9215
  exports.date = date;
8132
9216
  exports.dateInTimezone = dateInTimezone;
8133
9217
  exports.dateValueStart = dateValueStart;
9218
+ exports.defineOperation = defineOperation;
8134
9219
  exports.deriveInitials = deriveInitials;
9220
+ exports.describeOperations = describeOperations;
8135
9221
  exports.destructiveSchema = destructiveSchema;
8136
9222
  exports.detailView = detailView;
8137
9223
  exports.document = document;
9224
+ exports.ensureFieldIds = ensureFieldIds;
8138
9225
  exports.evaluateComputedAst = evaluateComputedAst;
8139
9226
  exports.evaluateComputedFormula = evaluateComputedFormula;
8140
9227
  exports.evaluateComputedFormulaWithResult = evaluateComputedFormulaWithResult;
@@ -8143,13 +9230,17 @@ exports.evaluateRecordFilterState = evaluateRecordFilterState;
8143
9230
  exports.extractAttributeNames = extractAttributeNames;
8144
9231
  exports.extractValueRefs = extractValueRefs;
8145
9232
  exports.flagRegistry = flagRegistry;
9233
+ exports.focusOf = focusOf;
8146
9234
  exports.form = form;
9235
+ exports.formFieldFlatKey = formFieldFlatKey;
9236
+ exports.formFieldKey = formFieldKey;
8147
9237
  exports.formRegistry = formRegistry;
8148
9238
  exports.formatAttributeValue = formatAttributeValue;
8149
9239
  exports.formatByteSize = formatByteSize;
8150
9240
  exports.formatComputedResult = formatComputedResult;
8151
9241
  exports.formatLocationValue = formatLocationValue;
8152
9242
  exports.formula = formula;
9243
+ exports.fromDraftableView = fromDraftableView;
8153
9244
  exports.generateDefaultDetailView = generateDefaultDetailView;
8154
9245
  exports.generateDefaultListView = generateDefaultListView;
8155
9246
  exports.getActiveTab = getActiveTab;
@@ -8168,6 +9259,7 @@ exports.isAgentUIMessageBatch = isAgentUIMessageBatch;
8168
9259
  exports.isAttributeSortable = isAttributeSortable2;
8169
9260
  exports.isBilateralRelation = isBilateralRelation;
8170
9261
  exports.isCheckboxEquality = isCheckboxEquality;
9262
+ exports.isClaimableSessionStatus = isClaimableSessionStatus;
8171
9263
  exports.isComputedFunctionName = isComputedFunctionName;
8172
9264
  exports.isDateRangeValue = isDateRangeValue;
8173
9265
  exports.isDefaultRole = isDefaultRole;
@@ -8189,17 +9281,19 @@ exports.isLiveEventPayload = isLiveEventPayload;
8189
9281
  exports.isLiveEventPayloadForType = isLiveEventPayloadForType;
8190
9282
  exports.isLiveEventType = isLiveEventType;
8191
9283
  exports.isNotEmpty = isNotEmpty;
9284
+ exports.isOpenToolPartState = isOpenToolPartState;
8192
9285
  exports.isPlainRecord = isPlainRecord2;
8193
- exports.isRelationGroup = isRelationGroup;
8194
9286
  exports.isStandardSchema = isStandardSchema;
8195
9287
  exports.isTerminalSessionStatus = isTerminalSessionStatus;
8196
9288
  exports.isTerminalState = isTerminalState;
9289
+ exports.isToolApprovalState = isToolApprovalState;
8197
9290
  exports.isUniversalRelation = isUniversalRelation;
8198
9291
  exports.jsonFlag = jsonFlag;
8199
9292
  exports.legacyStatusToSessionState = legacyStatusToSessionState;
8200
9293
  exports.listView = listView;
8201
9294
  exports.liveChannelKey = liveChannelKey;
8202
9295
  exports.location = location;
9296
+ exports.makeFieldId = makeFieldId;
8203
9297
  exports.matchesAccepts = matchesAccepts;
8204
9298
  exports.multiselect = multiselect;
8205
9299
  exports.nativeAgentUIPartIdMetadataKey = nativeAgentUIPartIdMetadataKey;
@@ -8210,6 +9304,7 @@ exports.object = object;
8210
9304
  exports.parseCountMode = parseCountMode;
8211
9305
  exports.parseLiveChannelKey = parseLiveChannelKey;
8212
9306
  exports.parseNativeAgentUIPartIdsMetadata = parseNativeAgentUIPartIdsMetadata;
9307
+ exports.parseOperation = parseOperation;
8213
9308
  exports.parseOptionalCountMode = parseOptionalCountMode;
8214
9309
  exports.parseQualifiedAttribute = parseQualifiedAttribute;
8215
9310
  exports.persistedDefaultViewTargetSchema = persistedDefaultViewTargetSchema;
@@ -8219,9 +9314,10 @@ exports.plannedAttributeSchema = plannedAttributeSchema;
8219
9314
  exports.plannedInlineAttributeSchema = plannedInlineAttributeSchema;
8220
9315
  exports.plannedObjectSchema = plannedObjectSchema;
8221
9316
  exports.proposedDefaultViewTargetSchema = proposedDefaultViewTargetSchema;
9317
+ exports.qualifiedPropertyDefs = qualifiedPropertyDefs;
9318
+ exports.readFormFieldValue = readFormFieldValue;
8222
9319
  exports.registry = registry;
8223
9320
  exports.relation = relation;
8224
- exports.relationGroup = relationGroup;
8225
9321
  exports.relationPropertyDefs = relationPropertyDefs;
8226
9322
  exports.renderLabelExpression = renderLabelExpression;
8227
9323
  exports.resetViewToDefault = resetViewToDefault;
@@ -8237,6 +9333,7 @@ exports.sessionStateToLegacyStatus = sessionStateToLegacyStatus;
8237
9333
  exports.status = status;
8238
9334
  exports.stringFlag = stringFlag;
8239
9335
  exports.text = text;
9336
+ exports.toDraftableView = toDraftableView;
8240
9337
  exports.toUndefinedIfEmpty = toUndefinedIfEmpty;
8241
9338
  exports.user = user;
8242
9339
  exports.validateAttributeName = validateAttributeName;