@contember/binding-common 2.2.0-alpha.18 → 2.2.0-alpha.19

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.
@@ -9,7 +9,7 @@ const TreeNodeUtils = require("./src/utils/TreeNodeUtils.cjs");
9
9
  const assertNever = require("./src/utils/assertNever.cjs");
10
10
  const createQueryBuilder = require("./src/utils/createQueryBuilder.cjs");
11
11
  const whereToFilter = require("./src/utils/whereToFilter.cjs");
12
- const uuid = require("uuid");
12
+ const utilities = require("@contember/utilities");
13
13
  const defaults = require("./src/treeParameters/defaults.cjs");
14
14
  const EntityFieldMarkersContainer = require("./src/markers/EntityFieldMarkersContainer.cjs");
15
15
  const EntityFieldsWithHoistablesMarker = require("./src/markers/EntityFieldsWithHoistablesMarker.cjs");
@@ -60,7 +60,7 @@ exports.createQueryBuilder = createQueryBuilder.createQueryBuilder;
60
60
  exports.whereToFilter = whereToFilter.whereToFilter;
61
61
  Object.defineProperty(exports, "generateUuid", {
62
62
  enumerable: true,
63
- get: () => uuid.v4
63
+ get: () => utilities.generateUuidV4
64
64
  });
65
65
  exports.EntityCreationParametersDefaults = defaults.EntityCreationParametersDefaults;
66
66
  exports.EntityListPreferencesDefaults = defaults.EntityListPreferencesDefaults;
@@ -7,7 +7,7 @@ import { TreeNodeUtils } from "./src/utils/TreeNodeUtils.js";
7
7
  import { assertNever } from "./src/utils/assertNever.js";
8
8
  import { createQueryBuilder } from "./src/utils/createQueryBuilder.js";
9
9
  import { whereToFilter } from "./src/utils/whereToFilter.js";
10
- import { v4 } from "uuid";
10
+ import { generateUuidV4 } from "@contember/utilities";
11
11
  import { EntityCreationParametersDefaults, EntityListPreferencesDefaults, LeafFieldDefaults, QualifiedEntityParametersDefaults, RelationDefaults } from "./src/treeParameters/defaults.js";
12
12
  import { EntityFieldMarkersContainer } from "./src/markers/EntityFieldMarkersContainer.js";
13
13
  import { EntityFieldsWithHoistablesMarker } from "./src/markers/EntityFieldsWithHoistablesMarker.js";
@@ -88,7 +88,7 @@ export {
88
88
  VariableInputTransformer,
89
89
  assertNever,
90
90
  createQueryBuilder,
91
- v4 as generateUuid,
91
+ generateUuidV4 as generateUuid,
92
92
  isEntityAccessor,
93
93
  isEntityListAccessor,
94
94
  isErrorPersistResult,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const BindingError = require("../BindingError.cjs");
4
- const equal = require("fast-deep-equal/es6/index.js");
4
+ const utilities = require("@contember/utilities");
5
5
  class Environment {
6
6
  constructor(options) {
7
7
  this.options = options;
@@ -121,7 +121,7 @@ class Environment {
121
121
  ...this.options.dimensions,
122
122
  ...dimensions
123
123
  };
124
- if (equal(newDimensions, this.options.dimensions)) {
124
+ if (utilities.deepEqual(newDimensions, this.options.dimensions)) {
125
125
  return this;
126
126
  }
127
127
  return new Environment({ ...this.options, dimensions: newDimensions });
@@ -158,7 +158,7 @@ class Environment {
158
158
  if (other === this) {
159
159
  return this;
160
160
  }
161
- if (!equal(this.options.node, other.options.node)) {
161
+ if (!utilities.deepEqual(this.options.node, other.options.node)) {
162
162
  throw new BindingError.BindingError(`Cannot merge two environments with different tree position.`);
163
163
  }
164
164
  if (this.options.parameters !== other.options.parameters) {
@@ -170,11 +170,11 @@ class Environment {
170
170
  if (this.options.extensions !== other.options.extensions) {
171
171
  throw new BindingError.BindingError(`Cannot merge two environments with different extensions.`);
172
172
  }
173
- if (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
173
+ if (utilities.deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
174
174
  return this;
175
175
  }
176
176
  for (const key in other.options.variables) {
177
- if (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {
177
+ if (key in this.options.variables && !utilities.deepEqual(this.options.variables[key], other.options.variables[key])) {
178
178
  throw new BindingError.BindingError(
179
179
  `Cannot merge two environments with different value of variable ${key}:
180
180
  ` + JSON.stringify(this.options.variables[key]) + "\n" + JSON.stringify(other.options.variables[key])
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.cjs","sources":["../../../../../packages/binding-common/src/environment/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport equal from 'fast-deep-equal/es6/index.js'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (equal(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!equal(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["BindingError","Environment"],"mappings":";;;;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AAC5C,aAAS,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AAC1E,YAAM,O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AoE;AAC5I,WAAO;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EAEL;AAAA,GAzFS,gBAAA,cAAA,CAAA,EAAA;;"}
1
+ {"version":3,"file":"Environment.cjs","sources":["../../../../../packages/binding-common/src/environment/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport { deepEqual } from '@contember/utilities'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (deepEqual(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!deepEqual(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !deepEqual(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["BindingError","deepEqual","Environment"],"mappings":";;;;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AA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AAA;AAAA,IAAU,CACnE;AAAA,EACF;AACD;AAAA,CAEA,CAAUE,iBAAV;AAoFcA,eAAA,kBAAkB,CAAO,QAAmC,iBAAoE;AAC5I,WAAO;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EAEL;AAAA,GAzFS,gBAAA,cAAA,CAAA,EAAA;;"}
@@ -1,5 +1,5 @@
1
1
  import { BindingError } from "../BindingError.js";
2
- import equal from "fast-deep-equal/es6/index.js";
2
+ import { deepEqual } from "@contember/utilities";
3
3
  class Environment {
4
4
  constructor(options) {
5
5
  this.options = options;
@@ -119,7 +119,7 @@ class Environment {
119
119
  ...this.options.dimensions,
120
120
  ...dimensions
121
121
  };
122
- if (equal(newDimensions, this.options.dimensions)) {
122
+ if (deepEqual(newDimensions, this.options.dimensions)) {
123
123
  return this;
124
124
  }
125
125
  return new Environment({ ...this.options, dimensions: newDimensions });
@@ -156,7 +156,7 @@ class Environment {
156
156
  if (other === this) {
157
157
  return this;
158
158
  }
159
- if (!equal(this.options.node, other.options.node)) {
159
+ if (!deepEqual(this.options.node, other.options.node)) {
160
160
  throw new BindingError(`Cannot merge two environments with different tree position.`);
161
161
  }
162
162
  if (this.options.parameters !== other.options.parameters) {
@@ -168,11 +168,11 @@ class Environment {
168
168
  if (this.options.extensions !== other.options.extensions) {
169
169
  throw new BindingError(`Cannot merge two environments with different extensions.`);
170
170
  }
171
- if (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
171
+ if (deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
172
172
  return this;
173
173
  }
174
174
  for (const key in other.options.variables) {
175
- if (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {
175
+ if (key in this.options.variables && !deepEqual(this.options.variables[key], other.options.variables[key])) {
176
176
  throw new BindingError(
177
177
  `Cannot merge two environments with different value of variable ${key}:
178
178
  ` + JSON.stringify(this.options.variables[key]) + "\n" + JSON.stringify(other.options.variables[key])
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.js","sources":["../../../../../packages/binding-common/src/environment/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport equal from 'fast-deep-equal/es6/index.js'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (equal(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!equal(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["Environment"],"mappings":";;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AAC5C,aAAS,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AAC1E,YAAM,OAAO,IAAI,QAAQ;AACzB,UAAI,KAAK,SAAS,oBAAoB,KAAK,SAAS,uBAAuB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Error } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport { deepEqual } from '@contember/utilities'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (deepEqual(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!deepEqual(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !deepEqual(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["Environment"],"mappings":";;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AAC5C,aAAS,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AAC1E,YAAM,OAAO,IAAI,QAAQ;AACzB,UAAI,KAAK,SAAS,oBAAoB,KAAK,SAAS,uBAAuB;AAC1E,eAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,IAAI,aAAa,kBA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KAAK,QAAQ,eAAe,MAAM,QAAQ,YAAY;AACzD,YAAM,IAAI,aAAa,0DAA0D;AAAA,IAClF;AACA,QAAI,KAAK,QAAQ,eAAe,MAAM,QAAQ,YAAY;AAEzD,YAAM,IAAI,aAAa,0DAA0D;AAAA,IAClF;AAEA,QAAI,UAAU,KAAK,QAAQ,WAAW,MAAM,QAAQ,SAAS,KAAK,KAAK,QAAQ,WAAW,MAAM,QAAQ,QAAQ;AAC/G,aAAO;AAAA,IACR;AACA,eAAW,OAAO,MAAM,QAAQ,WAAW;AAC1C,UAAI,OAAO,KAAK,QAAQ,aAAa,CAAC,UAAU,KAAK,QAAQ,UAAU,GAAG,GAAG,MAAM,QAAQ,UAAU,GAAG,CAAC,GAAG;AAC3G,cAAM,IAAI;AAAA,UACT,kEAAkE,GAAG;AAAA,IAClE,KAAK,UAAU,KAAK,QAAQ,UAAU,GAAG,CAAC,IAAI,OAC9C,KAAK,UAAU,MAAM,QAAQ,UAAU,GAAG,CAAC;AAAA,QAAA;AAAA,MAEhD;AAAA,IACD;AAEA,WAAO,IAAI,YAAY;AAAA,MACtB,GAAG,KAAK;AAAA,MACR,QAAQ,KAAK,QAAQ,UAAU,MAAM,QAAQ,SAAS,KAAK,QAAQ,OAAO,MAAM,MAAM,QAAQ,MAAM,IAAI;AAAA,MACxG,WAAW,EAAE,GAAG,KAAK,QAAQ,WAAW,GAAG,MAAM,QAAQ,UAAA;AAAA,IAAU,CACnE;AAAA,EACF;AACD;AAAA,CAEA,CAAUA,iBAAV;AAoFcA,eAAA,kBAAkB,CAAO,QAAmC,iBAAoE;AAC5I,WAAO;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EAEL;AAAA,GAzFS,gBAAA,cAAA,CAAA,EAAA;"}
@@ -9,7 +9,7 @@ const TreeNodeUtils = require("./src/utils/TreeNodeUtils.cjs");
9
9
  const assertNever = require("./src/utils/assertNever.cjs");
10
10
  const createQueryBuilder = require("./src/utils/createQueryBuilder.cjs");
11
11
  const whereToFilter = require("./src/utils/whereToFilter.cjs");
12
- const uuid = require("uuid");
12
+ const utilities = require("@contember/utilities");
13
13
  const defaults = require("./src/treeParameters/defaults.cjs");
14
14
  const EntityFieldMarkersContainer = require("./src/markers/EntityFieldMarkersContainer.cjs");
15
15
  const EntityFieldsWithHoistablesMarker = require("./src/markers/EntityFieldsWithHoistablesMarker.cjs");
@@ -60,7 +60,7 @@ exports.createQueryBuilder = createQueryBuilder.createQueryBuilder;
60
60
  exports.whereToFilter = whereToFilter.whereToFilter;
61
61
  Object.defineProperty(exports, "generateUuid", {
62
62
  enumerable: true,
63
- get: () => uuid.v4
63
+ get: () => utilities.generateUuidV4
64
64
  });
65
65
  exports.EntityCreationParametersDefaults = defaults.EntityCreationParametersDefaults;
66
66
  exports.EntityListPreferencesDefaults = defaults.EntityListPreferencesDefaults;
@@ -7,7 +7,7 @@ import { TreeNodeUtils } from "./src/utils/TreeNodeUtils.js";
7
7
  import { assertNever } from "./src/utils/assertNever.js";
8
8
  import { createQueryBuilder } from "./src/utils/createQueryBuilder.js";
9
9
  import { whereToFilter } from "./src/utils/whereToFilter.js";
10
- import { v4 } from "uuid";
10
+ import { generateUuidV4 } from "@contember/utilities";
11
11
  import { EntityCreationParametersDefaults, EntityListPreferencesDefaults, LeafFieldDefaults, QualifiedEntityParametersDefaults, RelationDefaults } from "./src/treeParameters/defaults.js";
12
12
  import { EntityFieldMarkersContainer } from "./src/markers/EntityFieldMarkersContainer.js";
13
13
  import { EntityFieldsWithHoistablesMarker } from "./src/markers/EntityFieldsWithHoistablesMarker.js";
@@ -88,7 +88,7 @@ export {
88
88
  VariableInputTransformer,
89
89
  assertNever,
90
90
  createQueryBuilder,
91
- v4 as generateUuid,
91
+ generateUuidV4 as generateUuid,
92
92
  isEntityAccessor,
93
93
  isEntityListAccessor,
94
94
  isErrorPersistResult,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const BindingError = require("../BindingError.cjs");
4
- const equal = require("fast-deep-equal/es6/index.js");
4
+ const utilities = require("@contember/utilities");
5
5
  class Environment {
6
6
  constructor(options) {
7
7
  this.options = options;
@@ -121,7 +121,7 @@ class Environment {
121
121
  ...this.options.dimensions,
122
122
  ...dimensions
123
123
  };
124
- if (equal(newDimensions, this.options.dimensions)) {
124
+ if (utilities.deepEqual(newDimensions, this.options.dimensions)) {
125
125
  return this;
126
126
  }
127
127
  return new Environment({ ...this.options, dimensions: newDimensions });
@@ -158,7 +158,7 @@ class Environment {
158
158
  if (other === this) {
159
159
  return this;
160
160
  }
161
- if (!equal(this.options.node, other.options.node)) {
161
+ if (!utilities.deepEqual(this.options.node, other.options.node)) {
162
162
  throw new BindingError.BindingError(`Cannot merge two environments with different tree position.`);
163
163
  }
164
164
  if (this.options.parameters !== other.options.parameters) {
@@ -170,11 +170,11 @@ class Environment {
170
170
  if (this.options.extensions !== other.options.extensions) {
171
171
  throw new BindingError.BindingError(`Cannot merge two environments with different extensions.`);
172
172
  }
173
- if (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
173
+ if (utilities.deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
174
174
  return this;
175
175
  }
176
176
  for (const key in other.options.variables) {
177
- if (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {
177
+ if (key in this.options.variables && !utilities.deepEqual(this.options.variables[key], other.options.variables[key])) {
178
178
  throw new BindingError.BindingError(
179
179
  `Cannot merge two environments with different value of variable ${key}:
180
180
  ` + JSON.stringify(this.options.variables[key]) + "\n" + JSON.stringify(other.options.variables[key])
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.cjs","sources":["../../../../../packages/binding-common/src/environment/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport equal from 'fast-deep-equal/es6/index.js'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (equal(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!equal(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["BindingError","Environment"],"mappings":";;;;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AAC5C,aAAS,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AAC1E,YAAM,OAAO,IAAI,QAAQ;AACzB,UAAI,KAAK,SAAS,oBAAoB,KAAK,SAAS,uBAAuB;AAC1E,eAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,IAAIA,aAAAA,aAAa,kBAAkB;AAAA,EAC1C;AAAA,EAEO,iBAA6C;AACnD,QAAI,CAAC,KAAK,QAAQ,MAAM;AACvB,YAAM,IAAIA,aAAAA,aAAA;AAAA,IACX;AACA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AACzD,YAAM,IAAIA,aAAAA,aAAa,0DAA0D;AAAA,IAClF;AACA,QAAI,KAAK,QAAQ,eAAe,MAAM,QAAQ,YAAY;AAEzD,YAAM,IAAIA,aAAAA,aAAa,0DAA0D;AAAA,IAClF;AAEA,QAAI,MAAM,KAAK,QAAQ,WAAW,MAAM,QAAQ,SAAS,KAAK,KAAK,QAAQ,WAAW,MAAM,QAAQ,QAAQ;AAC3G,aAAO;AAAA,IACR;AACA,eAAW,OAAO,MAAM,QAAQ,WAAW;AAC1C,UAAI,OAAO,KAAK,QAAQ,aAAa,CAAC,MAAM,KAAK,QAAQ,UAAU,GAAG,GAAG,MAAM,QAAQ,UAAU,GAAG,CAAC,GAAG;AACvG,cAAM,IAAIA,aAAAA;AAAAA,UACT,kEAAkE,GAAG;AAAA,IAClE,KAAK,UAAU,KAAK,QAAQ,UAAU,GAAG,CAAC,IAAI,OAC9C,KAAK,UAAU,MAAM,QAAQ,UAAU,GAAG,CAAC;AAAA,QAAA;AAAA,MAEhD;AAAA,IACD;AAEA,WAAO,IAAI,YAAY;AAAA,MACtB,GAAG,KAAK;AAAA,MACR,QAAQ,KAAK,QAAQ,UAAU,MAAM,QAAQ,SAAS,KAAK,QAAQ,OAAO,MAAM,MAAM,QAAQ,MAAM,IAAI;AAAA,MACxG,WAAW,EAAE,GAAG,KAAK,QAAQ,WAAW,GAAG,MAAM,QAAQ,UAAA;AAAA,IAAU,CACnE;AAAA,EACF;AACD;AAAA,CAEA,CAAUC,iBAAV;AAoFcA,eAAA,kBAAkB,CAAO,QAAmC,iBAAoE;AAC5I,WAAO;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EAEL;AAAA,GAzFS,gBAAA,cAAA,CAAA,EAAA;;"}
1
+ {"version":3,"file":"Environment.cjs","sources":["../../../../../packages/binding-common/src/environment/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport { deepEqual } from '@contember/utilities'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (deepEqual(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!deepEqual(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !deepEqual(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["BindingError","deepEqual","Environment"],"mappings":";;;;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AAC5C,aAAS,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AAC1E,YAAM,OAAO,IAAI,QAAQ;AACzB,UAAI,KAAK,SAAS,oBAAoB,KAAK,SAAS,uBAAuB;AAC1E,eAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,IAAIA,aAAAA,aAAa,kBAAkB;AAAA,EAC1C;AAAA,EAEO,iBAA6C;AACnD,QA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
2
- import equal from "fast-deep-equal/es6/index.js";
2
+ import { deepEqual } from "@contember/utilities";
3
3
  class Environment {
4
4
  constructor(options) {
5
5
  this.options = options;
@@ -119,7 +119,7 @@ class Environment {
119
119
  ...this.options.dimensions,
120
120
  ...dimensions
121
121
  };
122
- if (equal(newDimensions, this.options.dimensions)) {
122
+ if (deepEqual(newDimensions, this.options.dimensions)) {
123
123
  return this;
124
124
  }
125
125
  return new Environment({ ...this.options, dimensions: newDimensions });
@@ -156,7 +156,7 @@ class Environment {
156
156
  if (other === this) {
157
157
  return this;
158
158
  }
159
- if (!equal(this.options.node, other.options.node)) {
159
+ if (!deepEqual(this.options.node, other.options.node)) {
160
160
  throw new BindingError(`Cannot merge two environments with different tree position.`);
161
161
  }
162
162
  if (this.options.parameters !== other.options.parameters) {
@@ -168,11 +168,11 @@ class Environment {
168
168
  if (this.options.extensions !== other.options.extensions) {
169
169
  throw new BindingError(`Cannot merge two environments with different extensions.`);
170
170
  }
171
- if (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
171
+ if (deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
172
172
  return this;
173
173
  }
174
174
  for (const key in other.options.variables) {
175
- if (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {
175
+ if (key in this.options.variables && !deepEqual(this.options.variables[key], other.options.variables[key])) {
176
176
  throw new BindingError(
177
177
  `Cannot merge two environments with different value of variable ${key}:
178
178
  ` + JSON.stringify(this.options.variables[key]) + "\n" + JSON.stringify(other.options.variables[key])
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.js","sources":["../../../../../packages/binding-common/src/environment/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport equal from 'fast-deep-equal/es6/index.js'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (equal(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!equal(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["Environment"],"mappings":";;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AAC5C,aAAS,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AAC1E,YAAM,OAAO,IAAI,QAAQ;AACzB,UAAI,KAAK,SAAS,oBAAoB,KAAK,SAAS,uBAAuB;AAC1E,eAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,IAAI,aAAa,kBAAkB;AAAA,EAC1C;AAAA,EAEO,iBAA6C;AACnD,QAAI,CAAC,KAAK,QAAQ,MAAM;AACvB,YAAM,IAAI,aAAA;AAAA,IACX;AACA,WAAO,KAAK,QAAQ;AAAA,EACrB;AAAA,EAEO,YAAkD,SAAkC;AAC1F,UAAM,EAAE,QAAQ,G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,QAAQ,WAAW,MAAM,QAAQ,SAAS,KAAK,KAAK,QAAQ,WAAW,MAAM,QAAQ,QAAQ;AAC3G,aAAO;AAAA,IACR;AACA,eAAW,OAAO,MAAM,QAAQ,WAAW;AAC1C,UAAI,OAAO,KAAK,QAAQ,aAAa,CAAC,MAAM,KAAK,QAAQ,UAAU,GAAG,GAAG,MAAM,QAAQ,UAAU,GAAG,CAAC,GAAG;AACvG,cAAM,IAAI;AAAA,UACT,kEAAkE,GAAG;AAAA,IAClE,KAAK,UAAU,KAAK,QAAQ,UAAU,GAAG,CAAC,IAAI,OAC9C,KAAK,UAAU,MAAM,QAAQ,UAAU,GAAG,CAAC;AAAA,QAAA;AAAA,MAEhD;AAAA,IACD;AAEA,WAAO,IAAI,YAAY;AAAA,MACtB,GAAG,KAAK;AAAA,MACR,QAAQ,KAAK,QAAQ,UAAU,MAAM,QAAQ,SAAS,KAAK,QAAQ,OAAO,MAAM,MAAM,QAAQ,MAAM,IAAI;AAAA,MACxG,WAAW,EAAE,GAAG,KAAK,QAAQ,WAAW,GAAG,MAAM,QAAQ,UAAA;AAAA,IAAU,CACnE;AAAA,EACF;AACD;AAAA,CAEA,CAAUA,iBAAV;AAoFcA,eAAA,kBAAkB,CAAO,QAAmC,iBAAoE;AAC5I,WAAO;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EAEL;AAAA,GAzFS,gBAAA,cAAA,CAAA,EAAA;"}
1
+ {"version":3,"file":"Environment.js","sources":["../../../../../packages/binding-common/src/environment/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError.js'\nimport type { Filter } from '../treeParameters/index.js'\nimport { deepEqual } from '@contember/utilities'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (deepEqual(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\thasSchema(): boolean {\n\t\treturn this.options.schema !== undefined\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!deepEqual(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !deepEqual(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t\t+ JSON.stringify(other.options.variables[key]),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type Value = unknown\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n}\n\nexport { Environment }\n"],"names":["Environment"],"mappings":";;AAKA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,WAAW,CAAA;AAAA,MACX,YAAY,CAAA;AAAA,MACZ,gCAAgB,IAAA;AAAA,IAAI,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AAC5C,aAAS,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AAC1E,YAAM,OAAO,IAAI,QAAQ;AACzB,UAAI,KAAK,SAAS,oBAAoB,KAAK,SAAS,uBAAuB;AAC1E,eAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,IAAI,aAAa,kBAAkB;AAAA,EAC1C;AAAA,EAEO,iBAA6C;AACnD,QAAI,CAAC,KAAK,QAAQ,MAAM;AACvB,YAAM,IAAI,aAAA;AAAA,IACX;AACA,WAAO,KAAK,QAAQ;AAAA,EACrB;AAAA,EAEO,YAAkD,SAAkC;AAC1F,UAAM,EAAE,QAAQ,GAAG,QAAA,IAAY,KAAK;AACpC,WAAO,IAAI,YAAY;AAAA,MACtB,GAA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M,QAAQ,QAAQ;AAC/G,aAAO;AAAA,IACR;AACA,eAAW,OAAO,MAAM,QAAQ,WAAW;AAC1C,UAAI,OAAO,KAAK,QAAQ,aAAa,CAAC,UAAU,KAAK,QAAQ,UAAU,GAAG,GAAG,MAAM,QAAQ,UAAU,GAAG,CAAC,GAAG;AAC3G,cAAM,IAAI;AAAA,UACT,kEAAkE,GAAG;AAAA,IAClE,KAAK,UAAU,KAAK,QAAQ,UAAU,GAAG,CAAC,IAAI,OAC9C,KAAK,UAAU,MAAM,QAAQ,UAAU,GAAG,CAAC;AAAA,QAAA;AAAA,MAEhD;AAAA,IACD;AAEA,WAAO,IAAI,YAAY;AAAA,MACtB,GAAG,KAAK;AAAA,MACR,QAAQ,KAAK,QAAQ,UAAU,MAAM,QAAQ,SAAS,KAAK,QAAQ,OAAO,MAAM,MAAM,QAAQ,MAAM,IAAI;AAAA,MACxG,WAAW,EAAE,GAAG,KAAK,QAAQ,WAAW,GAAG,MAAM,QAAQ,UAAA;AAAA,IAAU,CACnE;AAAA,EACF;AACD;AAAA,CAEA,CAAUA,iBAAV;AAoFcA,eAAA,kBAAkB,CAAO,QAAmC,iBAAoE;AAC5I,WAAO;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EAEL;AAAA,GAzFS,gBAAA,cAAA,CAAA,EAAA;"}
@@ -13,5 +13,5 @@ export * from './utils/TreeNodeUtils.js';
13
13
  export * from './utils/assertNever.js';
14
14
  export * from './utils/createQueryBuilder.js';
15
15
  export * from './utils/whereToFilter.js';
16
- export { v4 as generateUuid } from 'uuid';
16
+ export { generateUuidV4 as generateUuid } from '@contember/utilities';
17
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AAExC,OAAO,EAAE,EAAE,IAAI,YAAY,EAAE,MAAM,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AAExC,OAAO,EAAE,cAAc,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1 +1 @@
1
- {"version":"7.0.1-rc","root":[[90,99],[101,115],[156,163],165,[179,253],271],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../../src/BindingError.ts","../../src/DataBindingExtendAborted.ts","../../src/treeParameters/primitives/Alias.ts","../../src/treeParameters/primitives/EntityId.ts","../../src/treeParameters/primitives/EntityName.ts","../../src/treeParameters/primitives/EntityRealmKey.ts","../../src/treeParameters/primitives/ExpectedEntityCount.ts","../../src/treeParameters/primitives/ExpectedQualifiedEntityMutation.ts","../../src/treeParameters/primitives/ExpectedRelationMutation.ts","../../src/treeParameters/primitives/FieldName.ts","../../../../node_modules/fast-deep-equal/es6/index.d.ts","../../src/schema/SchemaColumnType.ts","../../src/schema/SchemaEnums.ts","../../src/schema/SchemaColumn.ts","../../src/schema/SchemaRelationOrderBy.ts","../../src/schema/SchemaRelation.ts","../../src/schema/RawSchemaEntity.ts","../../src/schema/RawSchemaEnum.ts","../../src/schema/RawSchema.ts","../../src/schema/SchemaField.ts","../../src/schema/SchemaFields.ts","../../src/schema/SchemaUniqueConstraint.ts","../../src/schema/SchemaEntity.ts","../../src/schema/SchemaEntities.ts","../../src/schema/SchemaStore.ts","../../src/schema/Schema.ts","../../../graphql-builder/dist/types/nodes/GraphQlFragmentSpread.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlInlineFragment.d.ts","../../../schema/dist/types/schema/value.d.ts","../../../schema/dist/types/schema/input.d.ts","../../../schema/dist/types/schema/json.d.ts","../../../schema/dist/types/schema/acl.d.ts","../../../schema/dist/types/schema/actions.d.ts","../../../schema/dist/types/schema/actionsPayload.d.ts","../../../schema/dist/types/schema/model.d.ts","../../../schema/dist/types/schema/result.d.ts","../../../schema/dist/types/schema/settings.d.ts","../../../schema/dist/types/schema/validation.d.ts","../../../schema/dist/types/schema/index.d.ts","../../../schema/dist/types/ProjectRole.d.ts","../../../schema/dist/types/index.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlField.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlFragment.d.ts","../../../graphql-builder/dist/types/nodes/index.d.ts","../../../graphql-builder/dist/types/GraphQlQueryPrinter.d.ts","../../../graphql-builder/dist/types/index.d.ts","../../../client/dist/types/GenerateUploadUrlMutationBuilder.d.ts","../../../graphql-client/dist/types/PrimaryReadWindow.d.ts","../../../graphql-client/dist/types/GraphQlClientRequestOptions.d.ts","../../../graphql-client/dist/types/GraphQlClient.d.ts","../../../graphql-client/dist/types/GraphQlClientError.d.ts","../../../graphql-client/dist/types/index.d.ts","../../../client-content/dist/types/types/Schema.d.ts","../../../client-content/dist/types/types/Input.d.ts","../../../client-content/dist/types/types/Result.d.ts","../../../client-content/dist/types/types/index.d.ts","../../../client-content/dist/types/nodes/ContentEntitySelection.d.ts","../../../client-content/dist/types/nodes/ContentOperation.d.ts","../../../client-content/dist/types/nodes/TypedEntitySelection.d.ts","../../../client-content/dist/types/nodes/index.d.ts","../../../client-content/dist/types/ContentClient.d.ts","../../../client-content/dist/types/ContentQueryBuilder.d.ts","../../../client-content/dist/types/TypedContentQueryBuilder.d.ts","../../../client-content/dist/types/utils/mutationFragments.d.ts","../../../client-content/dist/types/index.d.ts","../../../client/dist/types/index.d.ts","../../src/schema/SchemaPreprocessor.ts","../../src/schema/SchemaLoader.ts","../../src/schema/index.ts","../../src/environment/Environment.ts","../../src/consts.ts","../../src/utils/assertNever.ts","../../src/treeParameters/TreeParameterMerger.ts","../../src/markers/MarkerMerger.ts","../../../../node_modules/chevrotain/lib/chevrotain.d.ts","../../src/queryLanguage/ParserResults.ts","../../../utilities/dist/types/assert-types/assertNever.d.ts","../../../utilities/dist/types/assert-types/index.d.ts","../../../utilities/dist/types/deprecate/types.d.ts","../../../utilities/dist/types/deprecate/deprecate.d.ts","../../../utilities/dist/types/deprecate/index.d.ts","../../../utilities/dist/types/dom/dataAttribute.d.ts","../../../utilities/dist/types/dom/svgSizeProps.d.ts","../../../utilities/dist/types/dom/index.d.ts","../../../utilities/dist/types/structures/BijectiveIndexedMap.d.ts","../../../utilities/dist/types/structures/LRUCache.d.ts","../../../utilities/dist/types/structures/WeakIdCache.d.ts","../../../utilities/dist/types/structures/index.d.ts","../../../utilities/dist/types/index.d.ts","../../src/queryLanguage/CacheStore.ts","../../src/queryLanguage/QueryLanguageError.ts","../../src/queryLanguage/tokenList.ts","../../src/queryLanguage/Parser.ts","../../src/environment/VariableFieldValue.ts","../../src/environment/VariableInputTransformer.ts","../../src/queryLanguage/QueryLanguage.ts","../../src/queryLanguage/MarkerFactory.ts","../../src/queryLanguage/index.ts","../../src/utils/TreeNodeUtils.ts","../../src/utils/whereToFilter.ts","../../src/environment/TreeNodeEnvironmentFactory.ts","../../src/environment/index.ts","../../src/treeParameters/primitives/Json.ts","../../src/treeParameters/primitives/FieldValue.ts","../../src/treeParameters/primitives/Filter.ts","../../src/treeParameters/primitives/Limit.ts","../../src/treeParameters/primitives/Offset.ts","../../src/treeParameters/primitives/OrderBy.ts","../../src/treeParameters/primitives/PlaceholderName.ts","../../src/treeParameters/primitives/RemovalType.ts","../../src/treeParameters/primitives/Scalar.ts","../../src/treeParameters/primitives/UniqueWhere.ts","../../src/treeParameters/primitives/SetOnCreate.ts","../../src/treeParameters/primitives/TreeRootId.ts","../../src/treeParameters/primitives/index.ts","../../src/treeParameters/helpers/wrapFilterInHasOnes.ts","../../src/treeParameters/helpers/index.ts","../../src/treeParameters/EventListenersStore.ts","../../src/types/ErrorAccessor.ts","../../src/types/Errorable.ts","../../src/types/PersistErrorOptions.ts","../../src/types/PersistSuccessOptions.ts","../../src/utils/generateEnumerabilityPreventingEntropy.ts","../../src/RuntimeId.ts","../../src/types/EntityListAccessor.ts","../../src/types/FieldAccessor.ts","../../src/types/EntityAccessor.ts","../../src/types/GetEntityByKey.ts","../../src/types/GetEntityListSubTree.ts","../../src/types/GetEntitySubTree.ts","../../src/types/BatchUpdatesOptions.ts","../../src/types/AsyncBatchUpdatesOptions.ts","../../src/types/ExtendTree.ts","../../src/types/QueryRequestResponse.ts","../../src/types/DataBindingTransactionResult.ts","../../src/types/PersistResult.ts","../../src/types/Persist.ts","../../src/types/DataBindingEvents.ts","../../src/types/BindingOperations.ts","../../src/types/TreeRootAccessor.ts","../../src/types/index.ts","../../src/treeParameters/Normalized.ts","../../src/treeParameters/Sugared.ts","../../src/treeParameters/defaults.ts","../../src/treeParameters/index.ts","../../src/utils/Hashing.ts","../../src/markers/PlaceholderParametersGenerator.ts","../../src/markers/PlaceholderGenerator.ts","../../src/markers/FieldMarker.ts","../../src/markers/EntityFieldPlaceholders.ts","../../src/markers/EntityFieldMarkersContainer.ts","../../src/markers/HasManyRelationMarker.ts","../../src/markers/HasOneRelationMarker.ts","../../src/markers/EntityFieldMarkers.ts","../../src/markers/EntityListSubTreeMarker.ts","../../src/markers/EntitySubTreeMarker.ts","../../src/markers/SubTreeMarkers.ts","../../src/markers/EntityFieldsWithHoistablesMarker.ts","../../src/markers/MarkerTreeRoot.ts","../../src/markers/MeaningfulMarker.ts","../../src/markers/MarkerComparator.ts","../../src/markers/index.ts","../../src/LocalizedBindingError.ts","../../src/utils/createQueryBuilder.ts","../../../../node_modules/uuid/dist/types.d.ts","../../../../node_modules/uuid/dist/max.d.ts","../../../../node_modules/uuid/dist/nil.d.ts","../../../../node_modules/uuid/dist/parse.d.ts","../../../../node_modules/uuid/dist/stringify.d.ts","../../../../node_modules/uuid/dist/v1.d.ts","../../../../node_modules/uuid/dist/v1ToV6.d.ts","../../../../node_modules/uuid/dist/v35.d.ts","../../../../node_modules/uuid/dist/v3.d.ts","../../../../node_modules/uuid/dist/v4.d.ts","../../../../node_modules/uuid/dist/v5.d.ts","../../../../node_modules/uuid/dist/v6.d.ts","../../../../node_modules/uuid/dist/v6ToV1.d.ts","../../../../node_modules/uuid/dist/v7.d.ts","../../../../node_modules/uuid/dist/validate.d.ts","../../../../node_modules/uuid/dist/version.d.ts","../../../../node_modules/uuid/dist/index.d.ts","../../src/index.ts","../../../../node_modules/vite/types/hmrPayload.d.ts","../../../../node_modules/vite/types/customEvent.d.ts","../../../../node_modules/vite/types/hot.d.ts","../../../../node_modules/vite/types/importGlob.d.ts","../../../../node_modules/vite/types/importMeta.d.ts","../../../../node_modules/vite/client.d.ts"],"fileInfos":[{"version":"a1aa1a5e065d48ef5c7bb99e38412f96","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237",{"version":"01ac052ec4a79e87229f90466a9645f8","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"edba5df642941aa062a62f6328c6df3d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bb3a710cbcda0533bb127712927cbe37","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7a42de379b489e8f7b647455bebfc576","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"692bcd75364db0f65d428801c7884466","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"942f397a25059abbd4bca48ba514893f","signature":"c3782ecc5f58f96f14c6e564a6fa564c","impliedNodeFormat":1},{"version":"baa8f59b4d4a5aad5dcc835d1170daeb","signature":"c0308885103be6d9573a4cd3cc0c4dd9","impliedNodeFormat":1},{"version":"f84dcdcdef717a372fadea451fc295de","signature":"00021f84663431ed35a2ca85a214ed70","impliedNodeFormat":1},{"version":"2604ecf968f25891f1b6186ebc0e0112","signature":"d635d74e443795ca365f3ea411e06b7f","impliedNodeFormat":1},{"version":"5684b6c31b7a58573add9c2cb29c17ec","signature":"9cf787570bad921a545ad70ae6382981","impliedNodeFormat":1},{"version":"d9a4c8f5319b3df1dbb70f435c77846a","signature":"e9148a1589e86fc9074c8960299cf045","impliedNodeFormat":1},{"version":"b46455cc45bb273cab7306b904b9a874","signature":"4273a6b3d10571017e01b72598370443","impliedNodeFormat":1},{"version":"4154544725367daf941d89f6e5a356d8","signature":"fdf64a94c5a4eca6335ded58633b313d","impliedNodeFormat":1},{"version":"f76b58e6e03e1c11db5848b86891f5a3","signature":"5262276accfaeae4bc4fefd8717382be","impliedNodeFormat":1},{"version":"3de612e5f30002f68c0517996389b719","signature":"5750abee6df6b23831a1d72df9735976","impliedNodeFormat":1},"25190845f008f24007f35cd58ca9b54a",{"version":"391730f7e5a77a378055ef30d38529f4","signature":"26979703e6bca1eef61a0b2f19adfdb6","impliedNodeFormat":1},{"version":"c99ce77853bc9d1f4233fcb06387be1d","signature":"5ad1fa277ed555ee93211d39fa086a63","impliedNodeFormat":1},{"version":"a10018acaf787167904f082700080706","signature":"eab7e3542689994979acc85f7752b680","impliedNodeFormat":1},{"version":"04939c2da10ac67319ce5b41cd6c1e15","signature":"5deded085d098815a4eec8487f35806e","impliedNodeFormat":1},{"version":"bea5212eae03289a4526641a076e8c04","signature":"f59bcbae7685bff03b028210cee106cb","impliedNodeFormat":1},{"version":"f00307a10184c041380f8ca5ce4e30de","signature":"64cd989cf476813a9138d47422649fd6","impliedNodeFormat":1},{"version":"03e52e6a4bebe8978e8c657cde94c1a6","signature":"565a8a9b9937a427a1179859c480aa01","impliedNodeFormat":1},{"version":"41cd2de68a7364a45e052ed675370552","signature":"b474036f0f007aa22f59101f7a971247","impliedNodeFormat":1},{"version":"1ddecc0039651d06dbc3fc258d53cc94","signature":"f49983586a0ec902ecdda10bc28077b2","impliedNodeFormat":1},{"version":"5031a11600cf791ef61296236349e7b5","signature":"a45d5fa4f4e0a7577823ad7e790b5363","impliedNodeFormat":1},{"version":"717215590c0205ee4495c2c9d6791710","signature":"49bdb710de14db22df040cc4a2072b57","impliedNodeFormat":1},{"version":"62e0f7e6d56dcc088167d859fe8863c7","signature":"13595d70f77d37b28dde67a3a997950c","impliedNodeFormat":1},{"version":"c199f32d87e373b6c56157ed1c8da561","signature":"5ef52c07993b2575143d39d7929f526d","impliedNodeFormat":1},{"version":"69c5bc59dfd12cacecfc387c8ed68470","signature":"ac2fc26c7b9e1846f0b8bdc883345580","impliedNodeFormat":1},{"version":"d0a72dfba461dd528bc775ba19fcd7e8","signature":"f944dc8d36e8b6510f15a6952cdb84b5","impliedNodeFormat":1},"4b7fe4d93992b2b9d079b1c3bae8707c","4f96fc5213ba46ab56ebce3ddd275393","6d13d72e6edde2776af61e7e6f43a6c7","1b3d3973208b0df323219a5f2f32bd83","db9837352169e3722270f39bd896d9eb","d60c3608e026e7ebb5ee17cb32901afe","c9bca94af23f5b6478f1caaec59168f5","af61cf343114f53162ee9cbf87dfc476","d6f4183eab98f156875bd4afc311ce22","133e63b3b844406000c3ef5e9633943c","d30401b9b670626dc86ca82ceb5b14b1","d6433f4eb936b57d58ca8052ee4f2c2a","994ba6dbd0849926f7cee07420f41cc1","814e4b695f97214aa97736b079e81225","ae757ed463a715a9571d836c0628e520","aaac8c2a681fadf5f4c0e5dc6530c477","e3cc1c890da57806846d019e3dcc94f8","bc9d90120bee546e143d11431237496e","1cff455284ebb3f8abb5b991cf140bfe","ae2a4a2167151e0797bb717b3efd2a83","7357dde96d70fec8e929123cf4c7778a","aa8e8b7fab38edc4eac217c965879b49","f3ab1bd5949cf3a31ddcb66fbb95e4ad","5bcef1d1b354649ef9901b60d4ae8d74","43dad7ac32d3648d3cb8d37aae30f14b","98a3613f689fdc2f21dc4a2e53baa352","15f9448236834eaeb54b8c0c9e47cdab","1038b8b32e05667ac99cbe3ac9b27dc4","a5d821d0671e1d115ed791ba4ad72403","f40566f9d429454c90597ef50db77e0e","712885b9ff68ff0b95f704fc9953ab51","3dfbb9dbbdfee223adad1f2be2deff37","f81d4f2748cfb62e2047515a3f350a80","dd5c05a6d99ec64e123f2831a4358151","5a2da875dd8f8db04bcd3e2a472674e6","79af01e4a4cd6e81a4566f378af669ac","f921d3af300289c7178e3e9a7b61ed89","1e1595ba7094c5d08498569ccccad2ed","d6c9fdd7b51c775b9cd093c9b6f7bd5f","f10fb32be389e69cc35e416c1761e1d9",{"version":"9d650d98fb7bed385d739ea4d720f7b0","signature":"f7249ac8565393e3435a0ee2f6fa41fb","impliedNodeFormat":1},{"version":"303d8f694501654ad442b00da5b3a6e5","signature":"769525462d5b5b8c8cf64979de244372","impliedNodeFormat":1},{"version":"c6c23367ed33f88754d3889b8489cef5","signature":"cc8899af4315695478aef7e5ac9c17c7","impliedNodeFormat":1},{"version":"57e15268969412044a55729c8658c51f","signature":"8a8bb2b8a9caaa567ee0dae6a9b41fb7","impliedNodeFormat":1},{"version":"c4b4415ee2e3341de992306b0b89c688","signature":"4f69ae7f2182e56ec2c6519ab1276c76","impliedNodeFormat":1},{"version":"8613cf79c9ffe0c38535f0f111fbded5","signature":"44058d29ff93b9ceaddca6f164244a30","impliedNodeFormat":1},{"version":"2ecf83f4ff1b7fe6b3ae1858b9ac47e4","signature":"e04954fd53c1d9318237c4dbff981cce","impliedNodeFormat":1},{"version":"c47c2f140faa467c57173e0ad04f8563","signature":"8c0884cbe35a0145029e760082e92e47","impliedNodeFormat":1},"c87c3ce0f441ef8c617db14ad5e66294",{"version":"c331f2a688f8b47e8a2c04168b3ffdd7","signature":"6cc8ce2fef185e8026b5820c5e8c0b83","impliedNodeFormat":1},"34171980a15ec5be19f102c95d9495e2","3715a3f4b3bd84ea36ed27e4215e5ab0","d8f003ba4a5b9aa7029eb57a44a86850","df1804c5dc3ddd2cb8276304519bbcd0","c09dea60079c9ee1a1a93822ea50e228","de17e043f79da7cd4e85821cd25d1db5","1d63154cea053fb35d1dd86b32ecc2c1","e22862e18afc2634bb64fd38d7cb9f05","c82b93f65c64fc5cc377b8cc7c100fc2","cf23c49d7f10fc30a5f10f43a72d554c","dc593ad1bf3398091a142d2f2295d062","f09c5497ccf71c9cf5ece945780b7935","d2b19807dc0402ca4c0599433079a627",{"version":"811be1d9835ac0f98965f935ae7b9ae1","signature":"d53919c7deb6ff8356d0a95665a7711f","impliedNodeFormat":1},{"version":"d40e4a7036b42089fc3769de34c4284d","signature":"335ebfe06eeef273fd38396d79faf1fa","impliedNodeFormat":1},{"version":"26a847fd684e89375afe4f7760e3e60d","signature":"1486e99a427b9b53733b06d1a49ad551","impliedNodeFormat":1},{"version":"64141c2acfc69a3c855fa25e1c62da17","signature":"0c09e685bf0efda21921e3ea3190142a","impliedNodeFormat":1},{"version":"65391906ccc351b4268834f5dc328bcf","signature":"be9983b43b40ec848b1267e89394085e","impliedNodeFormat":1},{"version":"4e0546eaeddff3981b12db56e17f65d2","signature":"777774accbb3506caea8893ee66e2479","impliedNodeFormat":1},{"version":"14cf3162337a329ca99884e9902c11c7","signature":"d351f49b676492c81883367524ab4258","impliedNodeFormat":1},{"version":"1e5e76175efe10da85d5aba1b3d6cdb9","signature":"7af08f89216963dcf0b5bbadb4d186b9","impliedNodeFormat":1},{"version":"915714704d15c77b5e5bda6a72162710","signature":"8abb771489f575629fb20f6fe3c1838f","impliedNodeFormat":1},{"version":"57daf950c161197bca04b64a2bd4e982","signature":"9e6cca4f0c487f83ac02cd81850dcc3f","impliedNodeFormat":1},{"version":"c557c45d60102a9283eca7f463817cc4","signature":"12b24f8c587789c5149a439d25604499","impliedNodeFormat":1},{"version":"6879234fe6da2198a7df6dcf6996d941","signature":"03133a64677f7bdc34974b5d4a1b53d1","impliedNodeFormat":1},{"version":"1351cf961707ea36627a40ae62263d10","signature":"29ba458592beca6b25ae4aa46f9fc2c1","impliedNodeFormat":1},{"version":"b02b2b54b1c4dac04c4964d7c02ebe77","signature":"4cd1b488e5a131457b4b59a610b2bd16","impliedNodeFormat":1},{"version":"764584c0d2aee817a9235402e1038516","signature":"39b91bce0712458380d3082f4cfeb953","impliedNodeFormat":1},{"version":"eeeca8e1cb089c4c6aa2691fffe1286f","signature":"65bd01db3f1e85c6e9a1b7ea057fd1ac","impliedNodeFormat":1},{"version":"5301531dec1e8dabcf004a3282793f84","signature":"d1549678b7ac423023001cfeccc77728","impliedNodeFormat":1},{"version":"cfa2abd684a429a3d610e68b9f923360","signature":"851ac49fdc287e1acc75e7cb30f8e625","impliedNodeFormat":1},{"version":"148e8a742d793476d148f825a0d45d45","signature":"3018dac4f537e2e5133aac782250a815","impliedNodeFormat":1},{"version":"a4c0ffcaa02bfef23d25c322eb086c40","signature":"1f7eca8280e3261c0af9fb7cefb6d116","impliedNodeFormat":1},{"version":"92bfdb7b2ea08e88cbe9ad6a7a8fef67","signature":"8b73ec026e4232314ebda6e9ae8e1bbb","impliedNodeFormat":1},{"version":"6bb32d77f50ad63965aa25410e9f0d75","signature":"c12e8eac709c20ad92d0266a2570471f","impliedNodeFormat":1},{"version":"1cf9e50502a4f23552dd52501572c511","signature":"f2e8bf047a71f5247d246c223adfb265","impliedNodeFormat":1},{"version":"6651f4e6b14ddd42672e65f698e49478","signature":"c248976f9002ea1f158dd1335a26ff06","impliedNodeFormat":1},{"version":"8de01101baf13cbbc01a37727d06f98e","signature":"400b3e491f911cc2cf679692074a8700","impliedNodeFormat":1},{"version":"5e02c5e841bbf14b5b4c663bf4469c51","signature":"33811014bd82922e841363771155b30d","impliedNodeFormat":1},{"version":"b6dae373d73adcd117a22720ba9eaacc","signature":"e4844513e26ed31edf5aad178d674260","impliedNodeFormat":1},{"version":"459bbcd0dacf4a90030270b7a9b8c96f","signature":"f2ef24a4a6ea788eae253da25144cb76","impliedNodeFormat":1},{"version":"7ef072e4e021d3bd4a595d4760ed5f6b","signature":"8f1fbeb4591804bb6dba0c05906d550b","impliedNodeFormat":1},{"version":"9e5dd338e86730f112939fe4864e6d65","signature":"202da0c0e5189389000b9d821cf87e75","impliedNodeFormat":1},{"version":"d2da3846c6a4f193acf1356f6d5c9f44","signature":"669291d131525074ad07ee611d822d9b","impliedNodeFormat":1},{"version":"6b8f80998d7092c2e537ab49e861fc44","signature":"14cce3f9cccd00d39b69a3c7752bd5e1","impliedNodeFormat":1},{"version":"c499eed7e40826770a76abb61ef08ee8","signature":"10824b3d7614c479a751896db529ac2e","impliedNodeFormat":1},{"version":"c9c9edff5968d731344bc74a7ab2b93d","signature":"91732910a0cd05726da629b5ddf70fb5","impliedNodeFormat":1},{"version":"b720c7f7c9d3a14faa4c840c8a9f5020","signature":"64f676cc48dcfb143d354e070186f8c1","impliedNodeFormat":1},{"version":"e62bef3599c32c91b4379ef6412e2bab","signature":"c6ad03e287d27c0f7edde9c2651c4efa","impliedNodeFormat":1},{"version":"528d59f1917eb1d8300737a94cb2a9db","signature":"2ef9b07e24ca7fe2502a4c85ffe57a25","impliedNodeFormat":1},{"version":"1e848ea1d8778b5bb2997cf06d496e79","signature":"3edc3262c78a02f0811d7633f9cdf934","impliedNodeFormat":1},{"version":"4cc8c8730e3f67a05d55c89cd925af4f","signature":"7a8cea4f61dbc83c16ef54368ca1e88c","impliedNodeFormat":1},{"version":"ca09f236f85138d0679756ffbb546680","signature":"9ea29ceb9a43854bd317d90dddb59bc8","impliedNodeFormat":1},{"version":"ce043628774d83a437aa2af330b904b2","signature":"df9719bbca08212dbd39a4c2982e6662","impliedNodeFormat":1},{"version":"a342bd408f2875c84e52d8e71d01397c","signature":"709887846ec8237a87d20b08ff71b46a","impliedNodeFormat":1},{"version":"9453a3c3b4f901fab762e23a85f6eddf","signature":"2d61c48f45cdcfdddb35ff4d2965a8f0","impliedNodeFormat":1},{"version":"f124f01b7ccce196fe923465b9a4e89b","signature":"63b033a134ad2e1e7c2a2a3ce96ab7e1","impliedNodeFormat":1},{"version":"7c5593047856326089e96031ff319a01","signature":"b3374645a81c5148475d32b579a5587c","impliedNodeFormat":1},{"version":"ede70b955f881da9508bbd26ca55ca79","signature":"7f6b4661be436b5463596c202bb3800c","impliedNodeFormat":1},{"version":"789921ea65a223f36ac038636b9de545","signature":"50b7595457fe5a1de2fb82f9fbb803a5","impliedNodeFormat":1},{"version":"ba85d0e5ceccac52fc2e19fd424d8bd7","signature":"3b6f0ba948fcad6fd1c846cbae833b61","impliedNodeFormat":1},{"version":"3d500c538716f3ae7ee836a6de1f9ea8","signature":"8198c78229cf3bf88cc218323a69da84","impliedNodeFormat":1},{"version":"d7bc55dbbc373cdaaf6c6b3ae702448d","signature":"ccbcf5b6f5d9a3cb663f083c03aa8497","impliedNodeFormat":1},{"version":"d0e672b87b5d94fd63cecdcf39232023","signature":"35f04b151655a226ab52897d6c70bba3","impliedNodeFormat":1},{"version":"633e1764ef4533388ce90a5303fbee27","signature":"c18dc0b48e5c79cc1b6699a7652e5550","impliedNodeFormat":1},{"version":"9e06f60e36caa8894636e97b1b1f93f1","signature":"20254e836f7cb5b6693b73df3a044e42","impliedNodeFormat":1},{"version":"4129b35a5a0907812e463dfb65a1824b","signature":"c5e616c7d1c67795c1f5d19f0c39c441","impliedNodeFormat":1},{"version":"b3d6008e49b8c10f4d135d89c6ab80fa","signature":"04eb069ae8cccc65f16c150e05de856c","impliedNodeFormat":1},{"version":"543fa0d0b99b43a97455a163a1b2feeb","signature":"0f9d8637b516dfd4540a96a6bf6351e4","impliedNodeFormat":1},{"version":"d7dcd4d97d3a780e6a8dd34dd629467b","signature":"6068ea575fdd6a1d01f34f1ca2f415c8","impliedNodeFormat":1},{"version":"0bc507a96dde2c33ebecee267e732835","signature":"348ffaa46594b899b46817dbea6c63f6","impliedNodeFormat":1},{"version":"8b95aa74886ddf8fdae35579d4ca65ea","signature":"65a249a4ef218e7e5994a743efa2904d","impliedNodeFormat":1},{"version":"039318c28f6e2d18252fd62342cb988c","signature":"5c92dbabcc1cad6e315a2ac3f3ad523a","impliedNodeFormat":1},{"version":"54866a72aaeb4a5ce0635d6985072c9c","signature":"1b0ad596d327f807ccc7176f78498e64","impliedNodeFormat":1},{"version":"6280ce6d408417e6c105d38fd4cb8792","signature":"3caa6a2208da555b428d4161ed700710","impliedNodeFormat":1},{"version":"a47b38708603ad4925e389de30b1856d","signature":"863f2be6c23a942902ce0ab2550bae19","impliedNodeFormat":1},{"version":"41c47e21c685e93e79a09030c08007c0","signature":"d1f0b7d7f89c18f2a88d2d6e991c359e","impliedNodeFormat":1},{"version":"f2e03eac75c9bb664ad31893983c2d1b","signature":"204c83625eb2e86287a973d4c003fefd","impliedNodeFormat":1},{"version":"343c54c2303aa2ead9d984d068adb8c4","signature":"c1f14ef6e74195657d4743eabd5cece0","impliedNodeFormat":1},{"version":"89c90cf67f8ca192611ea08ec0aae0a8","signature":"3b909c103e11c0c0ed015ab2f3cdd607","impliedNodeFormat":1},{"version":"6c08df1391feb31da72dad240e5e7bfa","signature":"b93b3118c0b9f248e1d96c334ec57292","impliedNodeFormat":1},{"version":"a2d87fdc4be4dbfb07e8d0b6411ecffe","signature":"1945a16fbb49f52278303d4b2735c2c6","impliedNodeFormat":1},{"version":"4ed753a43f1bbc387d055c105b9627f8","signature":"d45fbeabfed4ed6ca4b14b97ee0f5468","impliedNodeFormat":1},{"version":"2583d2bcd92e32f1acddce67d895159e","signature":"ba41b0e88ad9c3493549e572eb0ae9fd","impliedNodeFormat":1},{"version":"4caef49c07831c016be23fc52c1c5cec","signature":"ab05470ff71182f6fabad00fdf4bd215","impliedNodeFormat":1},{"version":"a85d2961d2aeac00053ca35b18c14715","signature":"3f2c95a561baf56d9c8ba937c36b238a","impliedNodeFormat":1},{"version":"dfa8ebc8939cf575e458a1c85e0da635","signature":"f31fd2047b3a20c03a7d81216060f0b8","impliedNodeFormat":1},{"version":"c9c9f0daa4793a28e74ba214c3e54a62","signature":"d53482e1f13310bdb7b6488962688e39","impliedNodeFormat":1},{"version":"a36c13283f16ab3631c2b1c90abe6ef8","impliedNodeFormat":99},{"version":"b50f87570a01f782cfa3401a3e6b3602","impliedNodeFormat":99},{"version":"6f47562fea657617d51178a6b628d1df","impliedNodeFormat":99},{"version":"ad12786d0b3f0dc2f1de4fe315b26b7e","impliedNodeFormat":99},{"version":"aa85a9e8e0f5ca21dde7e0298b2b8146","impliedNodeFormat":99},{"version":"1551f5acd9d5a85310b725414d0b4fa5","impliedNodeFormat":99},{"version":"3a625e8d4174dc6919bd049c31ca6b20","impliedNodeFormat":99},{"version":"394af2608e902900680cd67fa065f6c6","impliedNodeFormat":99},{"version":"cc4e641a1cb6c071372873d1ca2fee40","impliedNodeFormat":99},{"version":"150b410f8058ea9e39790e6d2ac3d32d","impliedNodeFormat":99},{"version":"1b0ea2d3e52774945764baea8eb10b91","impliedNodeFormat":99},{"version":"c6961b4ba8702bb2542fcfa461550151","impliedNodeFormat":99},{"version":"d6a199693f2d5a2a224c7e35b3826e9d","impliedNodeFormat":99},{"version":"e600b341a3395e7da358b367546a3fa3","impliedNodeFormat":99},{"version":"39328de4080d47acd2e4421605ab13df","impliedNodeFormat":99},{"version":"cb649b306728659696c74598e74c2b74","impliedNodeFormat":99},{"version":"23d47d5e271225f54f94ac4ff632b962","impliedNodeFormat":99},{"version":"e04031bd784b6d32148a6487fd2450a1","signature":"32a25befaba25c962f636e9227646f3b","impliedNodeFormat":1},"ab8e1ea59f16bc290a0451d09dc5a52e","24367c4ec7d778084b3a83bbdc5a23d4","edbf4843929ee5fe6521503f424e4464",{"version":"c15a3f94d92e048c199fe585e50b2297","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5b83f00203fc116f466f7588477a7cab","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fcb0cf1fa7d03295b48a25ebd55a6af9","affectsGlobalScope":true,"impliedNodeFormat":99}],"fileIdsList":[[277],[254,255,256,257,258,259,260,262,263,264,265,266,267,268,269,277],[254,277],[254,261,277],[276],[272,277],[273,277],[274,275,277],[90,251,277],[212,234,277],[90,100,158,234,277],[159,187,188,189,234,277],[90,159,183,234,277],[159,183,184,190,277],[90,91,158,160,161,187,188,189,191,213,230,234,251,252,253,270,277],[234,238,241,242,277],[239,243,277],[234,277],[234,240,246,277],[191,234,237,240,277],[234,237,277],[90,191,234,237,240,277],[160,161,251,252,277],[90,160,161,162,191,234,251,277],[234,246,277],[238,241,242,244,245,277],[191,234,235,236,277],[191,234,277],[234,244,245,277],[163,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,277],[178,182,191,277],[161,162,163,185,191,234,251,277],[90,155,164,165,179,180,181,191,234,277],[162,165,181,182,184,191,234,277],[180,181,182,185,186,277],[164,277],[106,107,277],[103,105,234,277],[102,277],[90,102,103,105,109,112,114,234,277],[101,102,234,277],[112,234,277],[110,111,234,277],[103,105,277],[109,234,277],[108,115,155,156,277],[102,106,107,108,110,113,114,277],[104,234,277],[102,113,277],[101,102,103,104,105,108,109,110,111,112,113,114,115,156,157,277],[204,207,230,277],[204,230,231,277],[90,155,234,277],[205,277],[189,234,277],[162,204,206,207,231,232,233,277],[191,192,277],[155,277],[201,277],[92,93,94,95,96,97,98,99,192,193,194,195,196,197,198,199,200,201,202,203,277],[155,220,277],[217,218,219,277],[191,220,221,222,223,226,227,251,277],[225,277],[155,223,277],[191,208,209,210,211,214,215,220,221,234,251,277],[191,208,209,210,211,213,216,220,221,234,251,277],[208,277],[158,208,209,216,220,234,277],[216,277],[191,214,234,277],[191,216,234,277],[210,211,225,277],[221,277],[208,224,234,277],[228,277],[208,209,210,211,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,277],[90,158,191,277],[90,277],[154,158,277],[141,145,149,277],[130,145,149,277],[145,149,151,277],[145,149,150,151,152,153,277],[130,135,145,277],[135,277],[145,146,277],[146,147,148,277],[130,142,277],[130,277],[142,143,144,277],[130,136,141,154,277],[130,133,277],[133,134,277],[116,117,130,277],[131,277],[116,117,131,132,277],[138,277],[137,277],[137,138,139,140,277],[128,129,277],[119,120,277],[120,277],[118,119,120,121,122,123,124,125,126,127,277],[118,277],[166,277],[168,277],[168,169,277],[171,172,277],[167,170,173,177,277],[174,175,176,277]],"options":{"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"strict":true,"sourceMap":true,"target":7,"useDefineForClassFields":true,"allowSyntheticDefaultImports":true,"esModuleInterop":true},"referencedMap":[[88,1],[89,1],[14,1],[15,1],[17,1],[16,1],[2,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[25,1],[3,1],[26,1],[27,1],[4,1],[28,1],[32,1],[29,1],[30,1],[31,1],[33,1],[34,1],[35,1],[5,1],[36,1],[37,1],[38,1],[39,1],[6,1],[43,1],[40,1],[41,1],[42,1],[44,1],[7,1],[45,1],[50,1],[51,1],[46,1],[47,1],[48,1],[49,1],[8,1],[55,1],[52,1],[53,1],[54,1],[56,1],[9,1],[57,1],[58,1],[59,1],[61,1],[60,1],[62,1],[63,1],[10,1],[64,1],[65,1],[66,1],[11,1],[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[12,1],[73,1],[74,1],[75,1],[76,1],[77,1],[1,1],[78,1],[79,1],[13,1],[80,1],[81,1],[82,1],[83,1],[84,1],[85,1],[86,1],[87,1],[164,1],[100,1],[270,2],[255,1],[256,1],[257,1],[258,1],[254,1],[259,3],[260,1],[262,4],[261,3],[263,3],[264,4],[265,3],[266,1],[267,3],[268,1],[269,1],[277,5],[273,6],[272,1],[274,7],[275,1],[276,8],[90,1],[91,1],[252,9],[213,10],[160,1],[159,11],[190,12],[183,1],[184,13],[191,14],[271,15],[243,16],[240,17],[239,18],[247,19],[244,20],[245,20],[238,21],[241,22],[242,20],[250,23],[163,24],[248,25],[249,26],[237,27],[236,28],[246,29],[251,30],[179,31],[186,32],[182,33],[165,18],[185,34],[180,1],[187,35],[181,36],[108,37],[106,38],[107,39],[115,40],[103,41],[101,1],[113,42],[112,43],[102,1],[109,44],[110,45],[157,46],[156,47],[105,48],[104,1],[114,49],[111,18],[158,50],[207,1],[231,51],[232,52],[162,53],[233,1],[206,54],[205,55],[234,56],[92,1],[93,1],[94,1],[95,1],[96,1],[97,1],[98,1],[99,1],[193,57],[194,58],[192,1],[195,1],[196,1],[197,58],[198,1],[199,1],[200,1],[202,59],[203,1],[201,58],[204,60],[221,61],[220,62],[228,63],[227,64],[224,65],[216,66],[214,67],[208,58],[209,68],[222,28],[215,69],[217,70],[218,71],[219,72],[226,73],[210,74],[225,75],[211,74],[223,18],[229,76],[230,77],[235,1],[188,78],[161,79],[253,80],[212,1],[189,58],[150,81],[151,82],[152,83],[154,84],[146,85],[147,86],[148,87],[149,88],[143,89],[144,90],[142,90],[145,91],[153,86],[136,86],[155,92],[134,93],[135,94],[131,95],[132,96],[116,1],[117,96],[133,97],[139,98],[140,1],[138,99],[137,1],[141,100],[129,1],[130,101],[121,102],[122,103],[123,102],[128,104],[119,105],[120,1],[124,102],[125,105],[126,1],[127,103],[118,1],[166,1],[167,106],[169,107],[170,108],[168,1],[171,1],[173,109],[172,1],[178,110],[174,1],[175,1],[176,1],[177,111]],"latestChangedDtsFile":"./index.d.ts"}
1
+ {"version":"7.0.1-rc","root":[[90,99],[118,132],[173,180],[182,258]],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../../src/BindingError.ts","../../src/DataBindingExtendAborted.ts","../../src/treeParameters/primitives/Alias.ts","../../src/treeParameters/primitives/EntityId.ts","../../src/treeParameters/primitives/EntityName.ts","../../src/treeParameters/primitives/EntityRealmKey.ts","../../src/treeParameters/primitives/ExpectedEntityCount.ts","../../src/treeParameters/primitives/ExpectedQualifiedEntityMutation.ts","../../src/treeParameters/primitives/ExpectedRelationMutation.ts","../../src/treeParameters/primitives/FieldName.ts","../../../utilities/dist/types/assert-types/assertNever.d.ts","../../../utilities/dist/types/assert-types/index.d.ts","../../../utilities/dist/types/deprecate/types.d.ts","../../../utilities/dist/types/deprecate/deprecate.d.ts","../../../utilities/dist/types/deprecate/index.d.ts","../../../utilities/dist/types/dom/composeEventHandlers.d.ts","../../../utilities/dist/types/dom/dataAttribute.d.ts","../../../utilities/dist/types/dom/svgSizeProps.d.ts","../../../utilities/dist/types/dom/index.d.ts","../../../utilities/dist/types/equality/deepEqual.d.ts","../../../utilities/dist/types/equality/index.d.ts","../../../utilities/dist/types/structures/BijectiveIndexedMap.d.ts","../../../utilities/dist/types/structures/LRUCache.d.ts","../../../utilities/dist/types/structures/WeakIdCache.d.ts","../../../utilities/dist/types/structures/index.d.ts","../../../utilities/dist/types/uuid/uuid.d.ts","../../../utilities/dist/types/uuid/index.d.ts","../../../utilities/dist/types/index.d.ts","../../src/schema/SchemaColumnType.ts","../../src/schema/SchemaEnums.ts","../../src/schema/SchemaColumn.ts","../../src/schema/SchemaRelationOrderBy.ts","../../src/schema/SchemaRelation.ts","../../src/schema/RawSchemaEntity.ts","../../src/schema/RawSchemaEnum.ts","../../src/schema/RawSchema.ts","../../src/schema/SchemaField.ts","../../src/schema/SchemaFields.ts","../../src/schema/SchemaUniqueConstraint.ts","../../src/schema/SchemaEntity.ts","../../src/schema/SchemaEntities.ts","../../src/schema/SchemaStore.ts","../../src/schema/Schema.ts","../../../graphql-builder/dist/types/nodes/GraphQlFragmentSpread.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlInlineFragment.d.ts","../../../schema/dist/types/schema/value.d.ts","../../../schema/dist/types/schema/input.d.ts","../../../schema/dist/types/schema/json.d.ts","../../../schema/dist/types/schema/acl.d.ts","../../../schema/dist/types/schema/actions.d.ts","../../../schema/dist/types/schema/actionsPayload.d.ts","../../../schema/dist/types/schema/model.d.ts","../../../schema/dist/types/schema/result.d.ts","../../../schema/dist/types/schema/settings.d.ts","../../../schema/dist/types/schema/validation.d.ts","../../../schema/dist/types/schema/index.d.ts","../../../schema/dist/types/ProjectRole.d.ts","../../../schema/dist/types/index.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlField.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlFragment.d.ts","../../../graphql-builder/dist/types/nodes/index.d.ts","../../../graphql-builder/dist/types/GraphQlQueryPrinter.d.ts","../../../graphql-builder/dist/types/index.d.ts","../../../client/dist/types/GenerateUploadUrlMutationBuilder.d.ts","../../../graphql-client/dist/types/PrimaryReadWindow.d.ts","../../../graphql-client/dist/types/GraphQlClientRequestOptions.d.ts","../../../graphql-client/dist/types/GraphQlClient.d.ts","../../../graphql-client/dist/types/GraphQlClientError.d.ts","../../../graphql-client/dist/types/index.d.ts","../../../client-content/dist/types/types/Schema.d.ts","../../../client-content/dist/types/types/Input.d.ts","../../../client-content/dist/types/types/Result.d.ts","../../../client-content/dist/types/types/index.d.ts","../../../client-content/dist/types/nodes/ContentEntitySelection.d.ts","../../../client-content/dist/types/nodes/ContentOperation.d.ts","../../../client-content/dist/types/nodes/TypedEntitySelection.d.ts","../../../client-content/dist/types/nodes/index.d.ts","../../../client-content/dist/types/ContentClient.d.ts","../../../client-content/dist/types/ContentQueryBuilder.d.ts","../../../client-content/dist/types/TypedContentQueryBuilder.d.ts","../../../client-content/dist/types/utils/mutationFragments.d.ts","../../../client-content/dist/types/index.d.ts","../../../client/dist/types/index.d.ts","../../src/schema/SchemaPreprocessor.ts","../../src/schema/SchemaLoader.ts","../../src/schema/index.ts","../../src/environment/Environment.ts","../../src/consts.ts","../../src/utils/assertNever.ts","../../src/treeParameters/TreeParameterMerger.ts","../../src/markers/MarkerMerger.ts","../../../../node_modules/chevrotain/lib/chevrotain.d.ts","../../src/queryLanguage/ParserResults.ts","../../src/queryLanguage/CacheStore.ts","../../src/queryLanguage/QueryLanguageError.ts","../../src/queryLanguage/tokenList.ts","../../src/queryLanguage/Parser.ts","../../src/environment/VariableFieldValue.ts","../../src/environment/VariableInputTransformer.ts","../../src/queryLanguage/QueryLanguage.ts","../../src/queryLanguage/MarkerFactory.ts","../../src/queryLanguage/index.ts","../../src/utils/TreeNodeUtils.ts","../../src/utils/whereToFilter.ts","../../src/environment/TreeNodeEnvironmentFactory.ts","../../src/environment/index.ts","../../src/treeParameters/primitives/Json.ts","../../src/treeParameters/primitives/FieldValue.ts","../../src/treeParameters/primitives/Filter.ts","../../src/treeParameters/primitives/Limit.ts","../../src/treeParameters/primitives/Offset.ts","../../src/treeParameters/primitives/OrderBy.ts","../../src/treeParameters/primitives/PlaceholderName.ts","../../src/treeParameters/primitives/RemovalType.ts","../../src/treeParameters/primitives/Scalar.ts","../../src/treeParameters/primitives/UniqueWhere.ts","../../src/treeParameters/primitives/SetOnCreate.ts","../../src/treeParameters/primitives/TreeRootId.ts","../../src/treeParameters/primitives/index.ts","../../src/treeParameters/helpers/wrapFilterInHasOnes.ts","../../src/treeParameters/helpers/index.ts","../../src/treeParameters/EventListenersStore.ts","../../src/types/ErrorAccessor.ts","../../src/types/Errorable.ts","../../src/types/PersistErrorOptions.ts","../../src/types/PersistSuccessOptions.ts","../../src/utils/generateEnumerabilityPreventingEntropy.ts","../../src/RuntimeId.ts","../../src/types/EntityListAccessor.ts","../../src/types/FieldAccessor.ts","../../src/types/EntityAccessor.ts","../../src/types/GetEntityByKey.ts","../../src/types/GetEntityListSubTree.ts","../../src/types/GetEntitySubTree.ts","../../src/types/BatchUpdatesOptions.ts","../../src/types/AsyncBatchUpdatesOptions.ts","../../src/types/ExtendTree.ts","../../src/types/QueryRequestResponse.ts","../../src/types/DataBindingTransactionResult.ts","../../src/types/PersistResult.ts","../../src/types/Persist.ts","../../src/types/DataBindingEvents.ts","../../src/types/BindingOperations.ts","../../src/types/TreeRootAccessor.ts","../../src/types/index.ts","../../src/treeParameters/Normalized.ts","../../src/treeParameters/Sugared.ts","../../src/treeParameters/defaults.ts","../../src/treeParameters/index.ts","../../src/utils/Hashing.ts","../../src/markers/PlaceholderParametersGenerator.ts","../../src/markers/PlaceholderGenerator.ts","../../src/markers/FieldMarker.ts","../../src/markers/EntityFieldPlaceholders.ts","../../src/markers/EntityFieldMarkersContainer.ts","../../src/markers/HasManyRelationMarker.ts","../../src/markers/HasOneRelationMarker.ts","../../src/markers/EntityFieldMarkers.ts","../../src/markers/EntityListSubTreeMarker.ts","../../src/markers/EntitySubTreeMarker.ts","../../src/markers/SubTreeMarkers.ts","../../src/markers/EntityFieldsWithHoistablesMarker.ts","../../src/markers/MarkerTreeRoot.ts","../../src/markers/MeaningfulMarker.ts","../../src/markers/MarkerComparator.ts","../../src/markers/index.ts","../../src/LocalizedBindingError.ts","../../src/utils/createQueryBuilder.ts","../../src/index.ts","../../../../node_modules/vite/types/hmrPayload.d.ts","../../../../node_modules/vite/types/customEvent.d.ts","../../../../node_modules/vite/types/hot.d.ts","../../../../node_modules/vite/types/importGlob.d.ts","../../../../node_modules/vite/types/importMeta.d.ts","../../../../node_modules/vite/client.d.ts"],"fileInfos":[{"version":"a1aa1a5e065d48ef5c7bb99e38412f96","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237",{"version":"01ac052ec4a79e87229f90466a9645f8","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"edba5df642941aa062a62f6328c6df3d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bb3a710cbcda0533bb127712927cbe37","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7a42de379b489e8f7b647455bebfc576","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"692bcd75364db0f65d428801c7884466","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"942f397a25059abbd4bca48ba514893f","signature":"c3782ecc5f58f96f14c6e564a6fa564c","impliedNodeFormat":1},{"version":"baa8f59b4d4a5aad5dcc835d1170daeb","signature":"c0308885103be6d9573a4cd3cc0c4dd9","impliedNodeFormat":1},{"version":"f84dcdcdef717a372fadea451fc295de","signature":"00021f84663431ed35a2ca85a214ed70","impliedNodeFormat":1},{"version":"2604ecf968f25891f1b6186ebc0e0112","signature":"d635d74e443795ca365f3ea411e06b7f","impliedNodeFormat":1},{"version":"5684b6c31b7a58573add9c2cb29c17ec","signature":"9cf787570bad921a545ad70ae6382981","impliedNodeFormat":1},{"version":"d9a4c8f5319b3df1dbb70f435c77846a","signature":"e9148a1589e86fc9074c8960299cf045","impliedNodeFormat":1},{"version":"b46455cc45bb273cab7306b904b9a874","signature":"4273a6b3d10571017e01b72598370443","impliedNodeFormat":1},{"version":"4154544725367daf941d89f6e5a356d8","signature":"fdf64a94c5a4eca6335ded58633b313d","impliedNodeFormat":1},{"version":"f76b58e6e03e1c11db5848b86891f5a3","signature":"5262276accfaeae4bc4fefd8717382be","impliedNodeFormat":1},{"version":"3de612e5f30002f68c0517996389b719","signature":"5750abee6df6b23831a1d72df9735976","impliedNodeFormat":1},"34171980a15ec5be19f102c95d9495e2","3715a3f4b3bd84ea36ed27e4215e5ab0","d8f003ba4a5b9aa7029eb57a44a86850","df1804c5dc3ddd2cb8276304519bbcd0","c09dea60079c9ee1a1a93822ea50e228","b212d98be739bccffd177e932ceb6aef","de17e043f79da7cd4e85821cd25d1db5","1d63154cea053fb35d1dd86b32ecc2c1","7eca5eb4a2afd7f14cad93e790fec5f3","d9f1dd13d74311956e8e445a7f826305","ca7eac8865032851b5aee27601ce8efa","c82b93f65c64fc5cc377b8cc7c100fc2","fad491ae822685b1a62c9cb66c10c21e","dc593ad1bf3398091a142d2f2295d062","f09c5497ccf71c9cf5ece945780b7935","b83a42af795d3ff7359e50adfacb1a2c","aeba358ab459fdd540142ed9cbc7a8a2","8d440e83e307414c27ec2592ea71ec5c",{"version":"391730f7e5a77a378055ef30d38529f4","signature":"26979703e6bca1eef61a0b2f19adfdb6","impliedNodeFormat":1},{"version":"c99ce77853bc9d1f4233fcb06387be1d","signature":"5ad1fa277ed555ee93211d39fa086a63","impliedNodeFormat":1},{"version":"a10018acaf787167904f082700080706","signature":"eab7e3542689994979acc85f7752b680","impliedNodeFormat":1},{"version":"04939c2da10ac67319ce5b41cd6c1e15","signature":"5deded085d098815a4eec8487f35806e","impliedNodeFormat":1},{"version":"bea5212eae03289a4526641a076e8c04","signature":"f59bcbae7685bff03b028210cee106cb","impliedNodeFormat":1},{"version":"f00307a10184c041380f8ca5ce4e30de","signature":"64cd989cf476813a9138d47422649fd6","impliedNodeFormat":1},{"version":"03e52e6a4bebe8978e8c657cde94c1a6","signature":"565a8a9b9937a427a1179859c480aa01","impliedNodeFormat":1},{"version":"41cd2de68a7364a45e052ed675370552","signature":"b474036f0f007aa22f59101f7a971247","impliedNodeFormat":1},{"version":"1ddecc0039651d06dbc3fc258d53cc94","signature":"f49983586a0ec902ecdda10bc28077b2","impliedNodeFormat":1},{"version":"5031a11600cf791ef61296236349e7b5","signature":"a45d5fa4f4e0a7577823ad7e790b5363","impliedNodeFormat":1},{"version":"717215590c0205ee4495c2c9d6791710","signature":"49bdb710de14db22df040cc4a2072b57","impliedNodeFormat":1},{"version":"62e0f7e6d56dcc088167d859fe8863c7","signature":"13595d70f77d37b28dde67a3a997950c","impliedNodeFormat":1},{"version":"c199f32d87e373b6c56157ed1c8da561","signature":"5ef52c07993b2575143d39d7929f526d","impliedNodeFormat":1},{"version":"69c5bc59dfd12cacecfc387c8ed68470","signature":"ac2fc26c7b9e1846f0b8bdc883345580","impliedNodeFormat":1},{"version":"d0a72dfba461dd528bc775ba19fcd7e8","signature":"f944dc8d36e8b6510f15a6952cdb84b5","impliedNodeFormat":1},"4b7fe4d93992b2b9d079b1c3bae8707c","4f96fc5213ba46ab56ebce3ddd275393","6d13d72e6edde2776af61e7e6f43a6c7","6a0734a43914fd5c79ed82ed393f6c57","db9837352169e3722270f39bd896d9eb","d60c3608e026e7ebb5ee17cb32901afe","c9bca94af23f5b6478f1caaec59168f5","af61cf343114f53162ee9cbf87dfc476","2fed1413de012a88e8db9644ec7f8f4f","f20a23a7412af08e90a1d7bb4a594d54","d30401b9b670626dc86ca82ceb5b14b1","d6433f4eb936b57d58ca8052ee4f2c2a","994ba6dbd0849926f7cee07420f41cc1","814e4b695f97214aa97736b079e81225","ae757ed463a715a9571d836c0628e520","aaac8c2a681fadf5f4c0e5dc6530c477","e3cc1c890da57806846d019e3dcc94f8","bc9d90120bee546e143d11431237496e","1cff455284ebb3f8abb5b991cf140bfe","ae2a4a2167151e0797bb717b3efd2a83","7357dde96d70fec8e929123cf4c7778a","aa8e8b7fab38edc4eac217c965879b49","f3ab1bd5949cf3a31ddcb66fbb95e4ad","5bcef1d1b354649ef9901b60d4ae8d74","43dad7ac32d3648d3cb8d37aae30f14b","98a3613f689fdc2f21dc4a2e53baa352","15f9448236834eaeb54b8c0c9e47cdab","ab3681d3f3ada64be5178bf6a2eea350","a5d821d0671e1d115ed791ba4ad72403","f40566f9d429454c90597ef50db77e0e","712885b9ff68ff0b95f704fc9953ab51","3dfbb9dbbdfee223adad1f2be2deff37","f81d4f2748cfb62e2047515a3f350a80","dd5c05a6d99ec64e123f2831a4358151","5a2da875dd8f8db04bcd3e2a472674e6","79af01e4a4cd6e81a4566f378af669ac","f921d3af300289c7178e3e9a7b61ed89","1e1595ba7094c5d08498569ccccad2ed","d6c9fdd7b51c775b9cd093c9b6f7bd5f","f10fb32be389e69cc35e416c1761e1d9",{"version":"9d650d98fb7bed385d739ea4d720f7b0","signature":"f7249ac8565393e3435a0ee2f6fa41fb","impliedNodeFormat":1},{"version":"303d8f694501654ad442b00da5b3a6e5","signature":"769525462d5b5b8c8cf64979de244372","impliedNodeFormat":1},{"version":"c6c23367ed33f88754d3889b8489cef5","signature":"cc8899af4315695478aef7e5ac9c17c7","impliedNodeFormat":1},{"version":"6277d3dfae46ee21f585ece72321521f","signature":"8a8bb2b8a9caaa567ee0dae6a9b41fb7","impliedNodeFormat":1},{"version":"c4b4415ee2e3341de992306b0b89c688","signature":"4f69ae7f2182e56ec2c6519ab1276c76","impliedNodeFormat":1},{"version":"8613cf79c9ffe0c38535f0f111fbded5","signature":"44058d29ff93b9ceaddca6f164244a30","impliedNodeFormat":1},{"version":"2ecf83f4ff1b7fe6b3ae1858b9ac47e4","signature":"e04954fd53c1d9318237c4dbff981cce","impliedNodeFormat":1},{"version":"c47c2f140faa467c57173e0ad04f8563","signature":"8c0884cbe35a0145029e760082e92e47","impliedNodeFormat":1},"c87c3ce0f441ef8c617db14ad5e66294",{"version":"c331f2a688f8b47e8a2c04168b3ffdd7","signature":"6cc8ce2fef185e8026b5820c5e8c0b83","impliedNodeFormat":1},{"version":"811be1d9835ac0f98965f935ae7b9ae1","signature":"d53919c7deb6ff8356d0a95665a7711f","impliedNodeFormat":1},{"version":"d40e4a7036b42089fc3769de34c4284d","signature":"335ebfe06eeef273fd38396d79faf1fa","impliedNodeFormat":1},{"version":"26a847fd684e89375afe4f7760e3e60d","signature":"1486e99a427b9b53733b06d1a49ad551","impliedNodeFormat":1},{"version":"64141c2acfc69a3c855fa25e1c62da17","signature":"0c09e685bf0efda21921e3ea3190142a","impliedNodeFormat":1},{"version":"65391906ccc351b4268834f5dc328bcf","signature":"be9983b43b40ec848b1267e89394085e","impliedNodeFormat":1},{"version":"4e0546eaeddff3981b12db56e17f65d2","signature":"777774accbb3506caea8893ee66e2479","impliedNodeFormat":1},{"version":"14cf3162337a329ca99884e9902c11c7","signature":"d351f49b676492c81883367524ab4258","impliedNodeFormat":1},{"version":"1e5e76175efe10da85d5aba1b3d6cdb9","signature":"7af08f89216963dcf0b5bbadb4d186b9","impliedNodeFormat":1},{"version":"915714704d15c77b5e5bda6a72162710","signature":"8abb771489f575629fb20f6fe3c1838f","impliedNodeFormat":1},{"version":"57daf950c161197bca04b64a2bd4e982","signature":"9e6cca4f0c487f83ac02cd81850dcc3f","impliedNodeFormat":1},{"version":"c557c45d60102a9283eca7f463817cc4","signature":"12b24f8c587789c5149a439d25604499","impliedNodeFormat":1},{"version":"6879234fe6da2198a7df6dcf6996d941","signature":"03133a64677f7bdc34974b5d4a1b53d1","impliedNodeFormat":1},{"version":"1351cf961707ea36627a40ae62263d10","signature":"29ba458592beca6b25ae4aa46f9fc2c1","impliedNodeFormat":1},{"version":"b02b2b54b1c4dac04c4964d7c02ebe77","signature":"4cd1b488e5a131457b4b59a610b2bd16","impliedNodeFormat":1},{"version":"764584c0d2aee817a9235402e1038516","signature":"39b91bce0712458380d3082f4cfeb953","impliedNodeFormat":1},{"version":"eeeca8e1cb089c4c6aa2691fffe1286f","signature":"65bd01db3f1e85c6e9a1b7ea057fd1ac","impliedNodeFormat":1},{"version":"5301531dec1e8dabcf004a3282793f84","signature":"d1549678b7ac423023001cfeccc77728","impliedNodeFormat":1},{"version":"cfa2abd684a429a3d610e68b9f923360","signature":"851ac49fdc287e1acc75e7cb30f8e625","impliedNodeFormat":1},{"version":"148e8a742d793476d148f825a0d45d45","signature":"3018dac4f537e2e5133aac782250a815","impliedNodeFormat":1},{"version":"a4c0ffcaa02bfef23d25c322eb086c40","signature":"1f7eca8280e3261c0af9fb7cefb6d116","impliedNodeFormat":1},{"version":"92bfdb7b2ea08e88cbe9ad6a7a8fef67","signature":"8b73ec026e4232314ebda6e9ae8e1bbb","impliedNodeFormat":1},{"version":"6bb32d77f50ad63965aa25410e9f0d75","signature":"c12e8eac709c20ad92d0266a2570471f","impliedNodeFormat":1},{"version":"1cf9e50502a4f23552dd52501572c511","signature":"f2e8bf047a71f5247d246c223adfb265","impliedNodeFormat":1},{"version":"6651f4e6b14ddd42672e65f698e49478","signature":"c248976f9002ea1f158dd1335a26ff06","impliedNodeFormat":1},{"version":"8de01101baf13cbbc01a37727d06f98e","signature":"400b3e491f911cc2cf679692074a8700","impliedNodeFormat":1},{"version":"5e02c5e841bbf14b5b4c663bf4469c51","signature":"33811014bd82922e841363771155b30d","impliedNodeFormat":1},{"version":"b6dae373d73adcd117a22720ba9eaacc","signature":"e4844513e26ed31edf5aad178d674260","impliedNodeFormat":1},{"version":"459bbcd0dacf4a90030270b7a9b8c96f","signature":"f2ef24a4a6ea788eae253da25144cb76","impliedNodeFormat":1},{"version":"7ef072e4e021d3bd4a595d4760ed5f6b","signature":"8f1fbeb4591804bb6dba0c05906d550b","impliedNodeFormat":1},{"version":"9e5dd338e86730f112939fe4864e6d65","signature":"202da0c0e5189389000b9d821cf87e75","impliedNodeFormat":1},{"version":"d2da3846c6a4f193acf1356f6d5c9f44","signature":"669291d131525074ad07ee611d822d9b","impliedNodeFormat":1},{"version":"6b8f80998d7092c2e537ab49e861fc44","signature":"14cce3f9cccd00d39b69a3c7752bd5e1","impliedNodeFormat":1},{"version":"c499eed7e40826770a76abb61ef08ee8","signature":"10824b3d7614c479a751896db529ac2e","impliedNodeFormat":1},{"version":"c9c9edff5968d731344bc74a7ab2b93d","signature":"91732910a0cd05726da629b5ddf70fb5","impliedNodeFormat":1},{"version":"b720c7f7c9d3a14faa4c840c8a9f5020","signature":"64f676cc48dcfb143d354e070186f8c1","impliedNodeFormat":1},{"version":"e62bef3599c32c91b4379ef6412e2bab","signature":"c6ad03e287d27c0f7edde9c2651c4efa","impliedNodeFormat":1},{"version":"528d59f1917eb1d8300737a94cb2a9db","signature":"2ef9b07e24ca7fe2502a4c85ffe57a25","impliedNodeFormat":1},{"version":"1e848ea1d8778b5bb2997cf06d496e79","signature":"3edc3262c78a02f0811d7633f9cdf934","impliedNodeFormat":1},{"version":"4cc8c8730e3f67a05d55c89cd925af4f","signature":"7a8cea4f61dbc83c16ef54368ca1e88c","impliedNodeFormat":1},{"version":"ca09f236f85138d0679756ffbb546680","signature":"9ea29ceb9a43854bd317d90dddb59bc8","impliedNodeFormat":1},{"version":"ce043628774d83a437aa2af330b904b2","signature":"df9719bbca08212dbd39a4c2982e6662","impliedNodeFormat":1},{"version":"a342bd408f2875c84e52d8e71d01397c","signature":"709887846ec8237a87d20b08ff71b46a","impliedNodeFormat":1},{"version":"9453a3c3b4f901fab762e23a85f6eddf","signature":"2d61c48f45cdcfdddb35ff4d2965a8f0","impliedNodeFormat":1},{"version":"f124f01b7ccce196fe923465b9a4e89b","signature":"63b033a134ad2e1e7c2a2a3ce96ab7e1","impliedNodeFormat":1},{"version":"7c5593047856326089e96031ff319a01","signature":"b3374645a81c5148475d32b579a5587c","impliedNodeFormat":1},{"version":"ede70b955f881da9508bbd26ca55ca79","signature":"7f6b4661be436b5463596c202bb3800c","impliedNodeFormat":1},{"version":"789921ea65a223f36ac038636b9de545","signature":"50b7595457fe5a1de2fb82f9fbb803a5","impliedNodeFormat":1},{"version":"ba85d0e5ceccac52fc2e19fd424d8bd7","signature":"3b6f0ba948fcad6fd1c846cbae833b61","impliedNodeFormat":1},{"version":"3d500c538716f3ae7ee836a6de1f9ea8","signature":"8198c78229cf3bf88cc218323a69da84","impliedNodeFormat":1},{"version":"d7bc55dbbc373cdaaf6c6b3ae702448d","signature":"ccbcf5b6f5d9a3cb663f083c03aa8497","impliedNodeFormat":1},{"version":"d0e672b87b5d94fd63cecdcf39232023","signature":"35f04b151655a226ab52897d6c70bba3","impliedNodeFormat":1},{"version":"633e1764ef4533388ce90a5303fbee27","signature":"c18dc0b48e5c79cc1b6699a7652e5550","impliedNodeFormat":1},{"version":"9e06f60e36caa8894636e97b1b1f93f1","signature":"20254e836f7cb5b6693b73df3a044e42","impliedNodeFormat":1},{"version":"4129b35a5a0907812e463dfb65a1824b","signature":"c5e616c7d1c67795c1f5d19f0c39c441","impliedNodeFormat":1},{"version":"b3d6008e49b8c10f4d135d89c6ab80fa","signature":"04eb069ae8cccc65f16c150e05de856c","impliedNodeFormat":1},{"version":"543fa0d0b99b43a97455a163a1b2feeb","signature":"0f9d8637b516dfd4540a96a6bf6351e4","impliedNodeFormat":1},{"version":"d7dcd4d97d3a780e6a8dd34dd629467b","signature":"6068ea575fdd6a1d01f34f1ca2f415c8","impliedNodeFormat":1},{"version":"0bc507a96dde2c33ebecee267e732835","signature":"348ffaa46594b899b46817dbea6c63f6","impliedNodeFormat":1},{"version":"8b95aa74886ddf8fdae35579d4ca65ea","signature":"65a249a4ef218e7e5994a743efa2904d","impliedNodeFormat":1},{"version":"039318c28f6e2d18252fd62342cb988c","signature":"5c92dbabcc1cad6e315a2ac3f3ad523a","impliedNodeFormat":1},{"version":"54866a72aaeb4a5ce0635d6985072c9c","signature":"1b0ad596d327f807ccc7176f78498e64","impliedNodeFormat":1},{"version":"6280ce6d408417e6c105d38fd4cb8792","signature":"3caa6a2208da555b428d4161ed700710","impliedNodeFormat":1},{"version":"a47b38708603ad4925e389de30b1856d","signature":"863f2be6c23a942902ce0ab2550bae19","impliedNodeFormat":1},{"version":"41c47e21c685e93e79a09030c08007c0","signature":"d1f0b7d7f89c18f2a88d2d6e991c359e","impliedNodeFormat":1},{"version":"f2e03eac75c9bb664ad31893983c2d1b","signature":"204c83625eb2e86287a973d4c003fefd","impliedNodeFormat":1},{"version":"343c54c2303aa2ead9d984d068adb8c4","signature":"c1f14ef6e74195657d4743eabd5cece0","impliedNodeFormat":1},{"version":"89c90cf67f8ca192611ea08ec0aae0a8","signature":"3b909c103e11c0c0ed015ab2f3cdd607","impliedNodeFormat":1},{"version":"6c08df1391feb31da72dad240e5e7bfa","signature":"b93b3118c0b9f248e1d96c334ec57292","impliedNodeFormat":1},{"version":"a2d87fdc4be4dbfb07e8d0b6411ecffe","signature":"1945a16fbb49f52278303d4b2735c2c6","impliedNodeFormat":1},{"version":"4ed753a43f1bbc387d055c105b9627f8","signature":"d45fbeabfed4ed6ca4b14b97ee0f5468","impliedNodeFormat":1},{"version":"2583d2bcd92e32f1acddce67d895159e","signature":"ba41b0e88ad9c3493549e572eb0ae9fd","impliedNodeFormat":1},{"version":"4caef49c07831c016be23fc52c1c5cec","signature":"ab05470ff71182f6fabad00fdf4bd215","impliedNodeFormat":1},{"version":"a85d2961d2aeac00053ca35b18c14715","signature":"3f2c95a561baf56d9c8ba937c36b238a","impliedNodeFormat":1},{"version":"dfa8ebc8939cf575e458a1c85e0da635","signature":"f31fd2047b3a20c03a7d81216060f0b8","impliedNodeFormat":1},{"version":"c9c9f0daa4793a28e74ba214c3e54a62","signature":"d53482e1f13310bdb7b6488962688e39","impliedNodeFormat":1},{"version":"e7c4fc3effc0dafd1dec8b57c8472273","signature":"7eaceb4d726f060cb799d271264f0340","impliedNodeFormat":1},"ab8e1ea59f16bc290a0451d09dc5a52e","24367c4ec7d778084b3a83bbdc5a23d4","edbf4843929ee5fe6521503f424e4464",{"version":"c15a3f94d92e048c199fe585e50b2297","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5b83f00203fc116f466f7588477a7cab","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fcb0cf1fa7d03295b48a25ebd55a6af9","affectsGlobalScope":true,"impliedNodeFormat":99}],"fileIdsList":[[264],[263],[259,264],[260,264],[261,262,264],[90,255,264],[216,238,264],[90,117,175,238,264],[176,191,192,193,238,264],[90,176,187,238,264],[176,187,188,194,264],[90,91,117,175,177,178,191,192,193,195,217,234,238,255,256,257,264],[238,242,245,246,264],[243,247,264],[238,264],[238,244,250,264],[195,238,241,244,264],[238,241,264],[90,195,238,241,244,264],[177,178,255,256,264],[90,177,178,179,195,238,255,264],[238,250,264],[242,245,246,248,249,264],[195,238,239,240,264],[195,238,264],[238,248,249,264],[180,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,264],[117,186,195,264],[178,179,180,189,195,238,255,264],[90,172,181,182,183,184,185,195,238,264],[179,182,185,186,188,195,238,264],[184,185,186,189,190,264],[181,264],[123,124,264],[120,122,238,264],[119,264],[90,119,120,122,126,129,131,238,264],[118,119,238,264],[129,238,264],[127,128,238,264],[120,122,264],[126,238,264],[125,132,172,173,264],[119,123,124,125,127,130,131,264],[121,238,264],[119,130,264],[118,119,120,121,122,125,126,127,128,129,130,131,132,173,174,264],[208,211,234,264],[208,234,235,264],[90,172,238,264],[209,264],[193,238,264],[179,208,210,211,235,236,237,264],[195,196,264],[172,264],[205,264],[92,93,94,95,96,97,98,99,196,197,198,199,200,201,202,203,204,205,206,207,264],[172,224,264],[221,222,223,264],[195,224,225,226,227,230,231,255,264],[229,264],[172,227,264],[195,212,213,214,215,218,219,224,225,238,255,264],[195,212,213,214,215,217,220,224,225,238,255,264],[212,264],[175,212,213,220,224,238,264],[220,264],[195,218,238,264],[195,220,238,264],[214,215,229,264],[225,264],[212,228,238,264],[232,264],[212,213,214,215,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,264],[90,175,195,264],[90,264],[171,175,264],[158,162,166,264],[147,162,166,264],[162,166,168,264],[162,166,167,168,169,170,264],[147,152,162,264],[152,264],[162,163,264],[163,164,165,264],[147,159,264],[147,264],[159,160,161,264],[147,153,158,171,264],[147,150,264],[150,151,264],[133,134,147,264],[148,264],[133,134,148,149,264],[155,264],[154,264],[154,155,156,157,264],[145,146,264],[136,137,264],[137,264],[135,136,137,138,139,140,141,142,143,144,264],[135,264],[100,264],[102,264],[102,103,264],[105,106,107,264],[109,264],[101,104,108,110,114,116,264],[111,112,113,264],[115,264]],"options":{"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"strict":true,"sourceMap":true,"target":7,"useDefineForClassFields":true,"allowSyntheticDefaultImports":true,"esModuleInterop":true},"referencedMap":[[88,1],[89,1],[14,1],[15,1],[17,1],[16,1],[2,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[25,1],[3,1],[26,1],[27,1],[4,1],[28,1],[32,1],[29,1],[30,1],[31,1],[33,1],[34,1],[35,1],[5,1],[36,1],[37,1],[38,1],[39,1],[6,1],[43,1],[40,1],[41,1],[42,1],[44,1],[7,1],[45,1],[50,1],[51,1],[46,1],[47,1],[48,1],[49,1],[8,1],[55,1],[52,1],[53,1],[54,1],[56,1],[9,1],[57,1],[58,1],[59,1],[61,1],[60,1],[62,1],[63,1],[10,1],[64,1],[65,1],[66,1],[11,1],[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[12,1],[73,1],[74,1],[75,1],[76,1],[77,1],[1,1],[78,1],[79,1],[13,1],[80,1],[81,1],[82,1],[83,1],[84,1],[85,1],[86,1],[87,1],[181,1],[264,2],[260,3],[259,1],[261,4],[262,1],[263,5],[90,1],[91,1],[256,6],[217,7],[177,1],[176,8],[194,9],[187,1],[188,10],[195,11],[258,12],[247,13],[244,14],[243,15],[251,16],[248,17],[249,17],[242,18],[245,19],[246,17],[254,20],[180,21],[252,22],[253,23],[241,24],[240,25],[250,26],[255,27],[183,28],[190,29],[186,30],[182,15],[189,31],[184,1],[191,32],[185,33],[125,34],[123,35],[124,36],[132,37],[120,38],[118,1],[130,39],[129,40],[119,1],[126,41],[127,42],[174,43],[173,44],[122,45],[121,1],[131,46],[128,15],[175,47],[211,1],[235,48],[236,49],[179,50],[237,1],[210,51],[209,52],[238,53],[92,1],[93,1],[94,1],[95,1],[96,1],[97,1],[98,1],[99,1],[197,54],[198,55],[196,1],[199,1],[200,1],[201,55],[202,1],[203,1],[204,1],[206,56],[207,1],[205,55],[208,57],[225,58],[224,59],[232,60],[231,61],[228,62],[220,63],[218,64],[212,55],[213,65],[226,25],[219,66],[221,67],[222,68],[223,69],[230,70],[214,71],[229,72],[215,71],[227,15],[233,73],[234,74],[239,1],[192,75],[178,76],[257,77],[216,1],[193,55],[167,78],[168,79],[169,80],[171,81],[163,82],[164,83],[165,84],[166,85],[160,86],[161,87],[159,87],[162,88],[170,83],[153,83],[172,89],[151,90],[152,91],[148,92],[149,93],[133,1],[134,93],[150,94],[156,95],[157,1],[155,96],[154,1],[158,97],[146,1],[147,98],[138,99],[139,100],[140,99],[145,101],[136,102],[137,1],[141,99],[142,102],[143,1],[144,100],[135,1],[100,1],[101,103],[103,104],[104,105],[102,1],[105,1],[106,1],[108,106],[107,1],[109,1],[110,107],[117,108],[111,1],[112,1],[113,1],[114,109],[116,110],[115,1]],"latestChangedDtsFile":"./index.d.ts"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contember/binding-common",
3
3
  "license": "Apache-2.0",
4
- "version": "2.2.0-alpha.18",
4
+ "version": "2.2.0-alpha.19",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/production/index.js",
@@ -29,12 +29,10 @@
29
29
  "ae:test": "api-extractor run"
30
30
  },
31
31
  "dependencies": {
32
- "@contember/client": "2.2.0-alpha.18",
33
- "@contember/client-content": "2.2.0-alpha.18",
34
- "@contember/utilities": "2.2.0-alpha.18",
35
- "chevrotain": "6.5.0",
36
- "fast-deep-equal": "^3.1.3",
37
- "uuid": "^13.0.0"
32
+ "@contember/client": "2.2.0-alpha.19",
33
+ "@contember/client-content": "2.2.0-alpha.19",
34
+ "@contember/utilities": "2.2.0-alpha.19",
35
+ "chevrotain": "6.5.0"
38
36
  },
39
37
  "peerDependencies": {
40
38
  "react": "^19.2.4",
@@ -1,6 +1,6 @@
1
1
  import { BindingError } from '../BindingError.js'
2
2
  import type { Filter } from '../treeParameters/index.js'
3
- import equal from 'fast-deep-equal/es6/index.js'
3
+ import { deepEqual } from '@contember/utilities'
4
4
  import { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../schema/index.js'
5
5
 
6
6
  class Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {
@@ -143,7 +143,7 @@ class Environment<Node extends Environment.AnyNode | undefined = Environment.Any
143
143
  ...this.options.dimensions,
144
144
  ...dimensions,
145
145
  }
146
- if (equal(newDimensions, this.options.dimensions)) {
146
+ if (deepEqual(newDimensions, this.options.dimensions)) {
147
147
  return this
148
148
  }
149
149
  return new Environment({ ...this.options, dimensions: newDimensions })
@@ -187,7 +187,7 @@ class Environment<Node extends Environment.AnyNode | undefined = Environment.Any
187
187
  if (other === this) {
188
188
  return this
189
189
  }
190
- if (!equal(this.options.node, other.options.node)) {
190
+ if (!deepEqual(this.options.node, other.options.node)) {
191
191
  throw new BindingError(`Cannot merge two environments with different tree position.`)
192
192
  }
193
193
  if (this.options.parameters !== other.options.parameters) {
@@ -201,11 +201,11 @@ class Environment<Node extends Environment.AnyNode | undefined = Environment.Any
201
201
  throw new BindingError(`Cannot merge two environments with different extensions.`)
202
202
  }
203
203
 
204
- if (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
204
+ if (deepEqual(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
205
205
  return this
206
206
  }
207
207
  for (const key in other.options.variables) {
208
- if (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {
208
+ if (key in this.options.variables && !deepEqual(this.options.variables[key], other.options.variables[key])) {
209
209
  throw new BindingError(
210
210
  `Cannot merge two environments with different value of variable ${key}:\n`
211
211
  + JSON.stringify(this.options.variables[key]) + '\n'
package/src/index.ts CHANGED
@@ -15,4 +15,4 @@ export * from './utils/assertNever.js'
15
15
  export * from './utils/createQueryBuilder.js'
16
16
  export * from './utils/whereToFilter.js'
17
17
 
18
- export { v4 as generateUuid } from 'uuid'
18
+ export { generateUuidV4 as generateUuid } from '@contember/utilities'