@ibyar/expressions 3.1.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2024 @ibyar/expressions
3
+ Copyright (c) 2020-2026 @ibyar/expressions
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/api/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './utils.js';
1
2
  export * from './expression.js';
2
3
  export * from './abstract.js';
3
4
  export * from './deserialize/deserialize.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/expressions/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAE9B,cAAc,8BAA8B,CAAC;AAE7C,cAAc,cAAc,CAAC;AAE7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AAErC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;A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c,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAE5C,cAAc,sCAAsC,CAAC;AAErD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC"}
package/api/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './utils.js';
1
2
  export * from './expression.js';
2
3
  export * from './abstract.js';
3
4
  export * from './deserialize/deserialize.js';
package/api/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/expressions/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAE9B,cAAc,8BAA8B,CAAC;AAE7C,cAAc,cAAc,CAAC;AAE7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AAErC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAE5C,cAAc,sCAAsC,CAAC;AAErD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './expression.js';\nexport * from './abstract.js';\n\nexport * from './deserialize/deserialize.js';\n\nexport * from './program.js';\n\nexport * from './class/class.js';\nexport * from './class/decorator.js';\n\nexport * from './definition/values.js';\nexport * from './definition/array.js';\nexport * from './definition/comment.js';\nexport * from './definition/function.js';\nexport * from './definition/member.js';\nexport * from './definition/bind.js';\nexport * from './definition/object.js';\nexport * from './definition/statement.js';\n\nexport * from './computing/call.js';\nexport * from './computing/debugger.js';\nexport * from './computing/new.js';\nexport * from './computing/return.js';\nexport * from './computing/spread.js';\nexport * from './computing/rest.js';\nexport * from './computing/throw.js';\nexport * from './computing/yield.js';\n\nexport * from './operators/assignment.js';\nexport * from './operators/await.js';\nexport * from './operators/binary.js';\nexport * from './operators/chaining.js';\nexport * from './operators/comma.js';\nexport * from './operators/grouping.js';\nexport * from './operators/logical.js';\nexport * from './operators/pipeline.js';\nexport * from './operators/ternary.js';\nexport * from './operators/types.js';\nexport * from './operators/unary.js';\nexport * from './operators/update.js';\n\nexport * from './statement/control/block.js';\nexport * from './statement/control/empty.js';\nexport * from './statement/control/if.js';\nexport * from './statement/control/switch.js';\nexport * from './statement/control/terminate.js';\nexport * from './statement/control/with.js';\n\nexport * from './statement/declarations/declares.js';\n\nexport * from './statement/iterations/for.js';\nexport * from './statement/iterations/while.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/expressions/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAE9B,cAAc,8BAA8B,CAAC;AAE7C,cAAc,cAAc,CAAC;AAE7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AAErC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAE5C,cAAc,sCAAsC,CAAC;AAErD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './utils.js';\nexport * from './expression.js';\nexport * from './abstract.js';\n\nexport * from './deserialize/deserialize.js';\n\nexport * from './program.js';\n\nexport * from './class/class.js';\nexport * from './class/decorator.js';\n\nexport * from './definition/values.js';\nexport * from './definition/array.js';\nexport * from './definition/comment.js';\nexport * from './definition/function.js';\nexport * from './definition/member.js';\nexport * from './definition/bind.js';\nexport * from './definition/object.js';\nexport * from './definition/statement.js';\n\nexport * from './computing/call.js';\nexport * from './computing/debugger.js';\nexport * from './computing/new.js';\nexport * from './computing/return.js';\nexport * from './computing/spread.js';\nexport * from './computing/rest.js';\nexport * from './computing/throw.js';\nexport * from './computing/yield.js';\n\nexport * from './operators/assignment.js';\nexport * from './operators/await.js';\nexport * from './operators/binary.js';\nexport * from './operators/chaining.js';\nexport * from './operators/comma.js';\nexport * from './operators/grouping.js';\nexport * from './operators/logical.js';\nexport * from './operators/pipeline.js';\nexport * from './operators/ternary.js';\nexport * from './operators/types.js';\nexport * from './operators/unary.js';\nexport * from './operators/update.js';\n\nexport * from './statement/control/block.js';\nexport * from './statement/control/empty.js';\nexport * from './statement/control/if.js';\nexport * from './statement/control/switch.js';\nexport * from './statement/control/terminate.js';\nexport * from './statement/control/with.js';\n\nexport * from './statement/declarations/declares.js';\n\nexport * from './statement/iterations/for.js';\nexport * from './statement/iterations/while.js';\n"]}
@@ -77,14 +77,14 @@ export declare class ExportNamedDeclaration extends AbstractExpressionNode {
77
77
  private specifiers;
78
78
  private declaration?;
79
79
  private source?;
80
- private assertions?;
80
+ private attributes?;
81
81
  static fromJSON(node: ExportNamedDeclaration, deserializer: NodeDeserializer): ExportNamedDeclaration;
82
82
  static visit(node: ExportNamedDeclaration, visitNode: VisitNodeType): void;
83
- constructor(specifiers: ExportSpecifier[], declaration?: DeclarationExpression | undefined, source?: Literal<string> | undefined, assertions?: ImportAttribute[] | undefined, range?: [number, number], loc?: SourceLocation);
83
+ constructor(specifiers: ExportSpecifier[], declaration?: DeclarationExpression | undefined, source?: Literal<string> | undefined, attributes?: ImportAttribute[] | undefined, range?: [number, number], loc?: SourceLocation);
84
84
  getSource(): Literal<string> | undefined;
85
85
  getSpecifiers(): ExportSpecifier[];
86
86
  getDeclaration(): DeclarationExpression | undefined;
87
- getAssertions(): ImportAttribute[] | undefined;
87
+ getAttributes(): ImportAttribute[] | undefined;
88
88
  set(stack: Stack): void;
89
89
  get(stack: Stack): void;
90
90
  private exportDeclaration;
@@ -119,13 +119,13 @@ export declare class ExportDefaultDeclaration extends AbstractExpressionNode {
119
119
  export declare class ExportAllDeclaration extends AbstractExpressionNode {
120
120
  private source;
121
121
  private exported?;
122
- private assertions?;
122
+ private attributes?;
123
123
  static fromJSON(node: ExportAllDeclaration, deserializer: NodeDeserializer): ExportAllDeclaration;
124
124
  static visit(node: ExportAllDeclaration, visitNode: VisitNodeType): void;
125
- constructor(source: Literal<string>, exported?: Identifier | undefined, assertions?: ImportAttribute[] | undefined, range?: [number, number], loc?: SourceLocation);
125
+ constructor(source: Literal<string>, exported?: Identifier | undefined, attributes?: ImportAttribute[] | undefined, range?: [number, number], loc?: SourceLocation);
126
126
  getSource(): Literal<string>;
127
127
  getExported(): Identifier | undefined;
128
- getAssertions(): ImportAttribute[] | undefined;
128
+ getAttributes(): ImportAttribute[] | undefined;
129
129
  set(stack: Stack): void;
130
130
  get(stack: Stack): void;
131
131
  dependency(computed?: true): ExpressionNode[];
@@ -136,22 +136,22 @@ let ExportNamedDeclaration = (() => {
136
136
  specifiers;
137
137
  declaration;
138
138
  source;
139
- assertions;
139
+ attributes;
140
140
  static fromJSON(node, deserializer) {
141
- return new ExportNamedDeclaration(node.specifiers.map(deserializer), node.declaration ? deserializer(node.declaration) : void 0, node.source ? deserializer(node.source) : void 0, node.assertions ? node.assertions.map(deserializer) : void 0, node.range, node.loc);
141
+ return new ExportNamedDeclaration(node.specifiers.map(deserializer), node.declaration ? deserializer(node.declaration) : void 0, node.source ? deserializer(node.source) : void 0, node.attributes ? node.attributes.map(deserializer) : void 0, node.range, node.loc);
142
142
  }
143
143
  static visit(node, visitNode) {
144
144
  node.specifiers.map(visitNode);
145
145
  node.source && visitNode(node.source);
146
146
  node.declaration && visitNode(node.declaration);
147
- node.assertions?.forEach(visitNode);
147
+ node.attributes?.forEach(visitNode);
148
148
  }
149
- constructor(specifiers, declaration, source, assertions, range, loc) {
149
+ constructor(specifiers, declaration, source, attributes, range, loc) {
150
150
  super(range, loc);
151
151
  this.specifiers = specifiers;
152
152
  this.declaration = declaration;
153
153
  this.source = source;
154
- this.assertions = assertions;
154
+ this.attributes = attributes;
155
155
  }
156
156
  getSource() {
157
157
  return this.source;
@@ -162,8 +162,8 @@ let ExportNamedDeclaration = (() => {
162
162
  getDeclaration() {
163
163
  return this.declaration;
164
164
  }
165
- getAssertions() {
166
- return this.assertions;
165
+ getAttributes() {
166
+ return this.attributes;
167
167
  }
168
168
  set(stack) {
169
169
  throw new Error(`ExportNamedDeclaration.#set() has no implementation.`);
@@ -196,12 +196,12 @@ let ExportNamedDeclaration = (() => {
196
196
  return;
197
197
  }
198
198
  let importCallOptions;
199
- if (this.assertions) {
200
- const importAssertions = this.assertions
201
- .map(assertion => assertion.get(stack))
199
+ if (this.attributes) {
200
+ const importAttributes = this.attributes
201
+ .map(attribute => attribute.get(stack))
202
202
  .reduce((p, c) => Object.assign(p, c), {});
203
- if (importAssertions) {
204
- importCallOptions = { assert: importAssertions };
203
+ if (importAttributes) {
204
+ importCallOptions = { with: importAttributes };
205
205
  }
206
206
  }
207
207
  const sourceModule = stack.importModule(this.source.get(), importCallOptions);
@@ -254,14 +254,14 @@ let ExportNamedDeclaration = (() => {
254
254
  return `${exportStr};`;
255
255
  }
256
256
  const source = this.source.toString();
257
- return `${exportStr} from ${source}${this.assertions ? ` assert { ${this.assertions.map(assertion => assertion.toString()).join(', ')} }` : ''};`;
257
+ return `${exportStr} from ${source}${this.attributes ? ` with { ${this.attributes.map(attribute => attribute.toString()).join(', ')} }` : ''};`;
258
258
  }
259
259
  toJson() {
260
260
  return {
261
261
  specifiers: this.specifiers.map(specifier => specifier.toJSON()),
262
262
  source: this.source?.toJSON(),
263
263
  declaration: this.declaration?.toJSON(),
264
- assertions: this.assertions?.map(assertion => assertion.toJSON()),
264
+ attributes: this.attributes?.map(attribute => attribute.toJSON()),
265
265
  };
266
266
  }
267
267
  };
@@ -348,20 +348,20 @@ let ExportAllDeclaration = (() => {
348
348
  }
349
349
  source;
350
350
  exported;
351
- assertions;
351
+ attributes;
352
352
  static fromJSON(node, deserializer) {
353
- return new ExportAllDeclaration(deserializer(node.source), node.exported ? deserializer(node.exported) : void 0, node.assertions?.map(deserializer), node.range, node.loc);
353
+ return new ExportAllDeclaration(deserializer(node.source), node.exported ? deserializer(node.exported) : void 0, node.attributes?.map(deserializer), node.range, node.loc);
354
354
  }
355
355
  static visit(node, visitNode) {
356
356
  visitNode(node.source);
357
357
  node.exported && visitNode(node.exported);
358
- node.assertions?.forEach(visitNode);
358
+ node.attributes?.forEach(visitNode);
359
359
  }
360
- constructor(source, exported, assertions, range, loc) {
360
+ constructor(source, exported, attributes, range, loc) {
361
361
  super(range, loc);
362
362
  this.source = source;
363
363
  this.exported = exported;
364
- this.assertions = assertions;
364
+ this.attributes = attributes;
365
365
  }
366
366
  getSource() {
367
367
  return this.source;
@@ -369,20 +369,20 @@ let ExportAllDeclaration = (() => {
369
369
  getExported() {
370
370
  return this.exported;
371
371
  }
372
- getAssertions() {
373
- return this.assertions;
372
+ getAttributes() {
373
+ return this.attributes;
374
374
  }
375
375
  set(stack) {
376
376
  throw new Error(`ExportDefaultDeclaration.#set() has no implementation.`);
377
377
  }
378
378
  get(stack) {
379
379
  let importCallOptions;
380
- if (this.assertions) {
381
- const importAssertions = this.assertions
382
- .map(assertion => assertion.get(stack))
380
+ if (this.attributes) {
381
+ const importAttributes = this.attributes
382
+ .map(attribute => attribute.get(stack))
383
383
  .reduce((p, c) => Object.assign(p, c), {});
384
- if (importAssertions) {
385
- importCallOptions = { assert: importAssertions };
384
+ if (importAttributes) {
385
+ importCallOptions = { with: importAttributes };
386
386
  }
387
387
  }
388
388
  let localModule = stack.getModule();
@@ -411,13 +411,13 @@ let ExportAllDeclaration = (() => {
411
411
  return [];
412
412
  }
413
413
  toString() {
414
- return `export *${this.exported ? ` as ${this.exported.toString()}` : ''} from ${this.source.toString()}${this.assertions ? ` assert { ${this.assertions.map(assertion => assertion.toString()).join(', ')} }` : ''};`;
414
+ return `export *${this.exported ? ` as ${this.exported.toString()}` : ''} from ${this.source.toString()}${this.attributes ? ` with { ${this.attributes.map(attribute => attribute.toString()).join(', ')} }` : ''};`;
415
415
  }
416
416
  toJson() {
417
417
  return {
418
418
  source: this.source.toJSON(),
419
419
  exported: this.exported?.toJSON(),
420
- assertions: this.assertions?.map(assertion => assertion.toJSON()),
420
+ attributes: this.attributes?.map(attribute => attribute.toJSON()),
421
421
  };
422
422
  }
423
423
  };
@@ -1 +1 @@
1
- {"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/expressions/api/module/export.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;AAMH,OAAO,EAAiB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAmB,eAAe,EAAE,MAAM,aAAa,CAAC;AAK/D;;;;;;;;;;;;;GAaG;IAEU,eAAe;4BAD3B,YAAY,CAAC,iBAAiB,CAAC;;;;sBACK,eAAe;+BAAvB,SAAQ,WAAe;;;;YAApD,6KAiDC;;;YAjDY,uDAAe;;QA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5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE;gBACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;aACjE,CAAC;QACH,CAAC;;;;SAlFW,oBAAoB","sourcesContent":["\n/**\n * There are two types of exports:\n * 1- Named Exports (Zero or more exports per module)\n * 2- Default Exports (One per module)\n * \n * // Exporting individual features\n * export let name1, name2, …, nameN; // also var, const\n * export let name1 = …, name2 = …, …, nameN; // also var, const\n * export function functionName(){...}\n * export class ClassName {...}\n * \n * // Export list\n * export { name1, name2, …, nameN };\n * \n * // Renaming exports\n * export { variable1 as name1, variable2 as name2, …, nameN };\n * \n * // Exporting destructed assignments with renaming\n * export const { name1, name2: bar } = o;\n * \n * // Default exports\n * export default expression;\n * export default function (…) { … } // also class, function*\n * export default function name1(…) { … } // also class, function*\n * export { name1 as default, … };\n * \n * // Aggregating modules\n * export * from …; // does not set the default export\n * export * as name1 from …; // Draft ECMAScript® 2O21\n * export { name1, name2, …, nameN } from …;\n * export { import1 as name1, import2 as name2, …, nameN } from …;\n * export { default, … } from …;\n */\n\nimport type {\n\tNodeDeserializer, ExpressionNode, ExpressionEventPath,\n\tVisitNodeType, DeclarationExpression, SourceLocation\n} from '../expression.js';\nimport { ModuleContext, ReactiveScope } from '../../scope/scope.js';\nimport { Stack } from '../../scope/stack.js';\nimport { AbstractExpressionNode } from '../abstract.js';\nimport { Deserializer } from '../deserialize/deserialize.js';\nimport { Identifier, Literal } from '../definition/values.js';\nimport { ImportAttribute, ModuleSpecifier } from './common.js';\nimport { FunctionDeclaration } from '../definition/function.js';\nimport { ClassDeclaration } from '../class/class.js';\n\n\n/**\n * An exported variable binding, e.g., `{foo}` in `export {foo}` or `{bar as foo}` in `export {bar as foo}`.\n * \n * The `exported` field refers to the name exported in the module.\n * \n * The `local` field refers to the binding into the local module scope.\n * \n * If it is a basic named export, such as in `export {foo}`, both `exported` and `local` are equivalent `Identifier` nodes;\n * in this case an Identifier node representing `foo`.\n * \n * If it is an aliased export,\n * such as in `export {bar as foo}`, the `exported` field is an `Identifier` node representing `foo`,\n * and the `local` field is an `Identifier` node representing `bar`.\n */\n@Deserializer('ExportSpecifier')\nexport class ExportSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ExportSpecifier, deserializer: NodeDeserializer): ExportSpecifier {\n\t\treturn new ExportSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tdeserializer(node.exported) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t\tvisitNode(node.exported);\n\t}\n\tconstructor(\n\t\tlocal: Identifier,\n\t\tprivate exported: Identifier,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(local, range, loc);\n\t}\n\tgetExported() {\n\t\treturn this.exported;\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\tconst local = this.local.toString();\n\t\tconst exported = this.exported.toString();\n\t\tif (local == exported) {\n\t\t\treturn local;\n\t\t}\n\t\treturn `${local} as ${exported}`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tlocal: this.local.toJSON(),\n\t\t\texported: this.exported.toJSON()\n\t\t};\n\t}\n}\n\n\n/**\n * An export named declaration, e.g.,\n * `export {foo, bar};`,\n * `export {foo} from \"mod\";`\n * or `export var foo = 1;`.\n * \n * Note: Having `declaration` populated with non-empty `specifiers` or non-null `source` results in an invalid state.\n */\n@Deserializer('ExportNamedDeclaration')\nexport class ExportNamedDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ExportNamedDeclaration, deserializer: NodeDeserializer): ExportNamedDeclaration {\n\t\treturn new ExportNamedDeclaration(\n\t\t\tnode.specifiers.map(deserializer) as ExportSpecifier[],\n\t\t\tnode.declaration ? deserializer(node.declaration) as DeclarationExpression : void 0,\n\t\t\tnode.source ? deserializer(node.source) as Literal<string> : void 0,\n\t\t\tnode.assertions ? node.assertions.map(deserializer) as ImportAttribute[] : void 0,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportNamedDeclaration, visitNode: VisitNodeType): void {\n\t\tnode.specifiers.map(visitNode);\n\t\tnode.source && visitNode(node.source);\n\t\tnode.declaration && visitNode(node.declaration);\n\t\tnode.assertions?.forEach(visitNode);\n\t}\n\tconstructor(\n\t\tprivate specifiers: ExportSpecifier[],\n\t\tprivate declaration?: DeclarationExpression,\n\t\tprivate source?: Literal<string>,\n\t\tprivate assertions?: ImportAttribute[],\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tgetSpecifiers() {\n\t\treturn this.specifiers;\n\t}\n\tgetDeclaration() {\n\t\treturn this.declaration;\n\t}\n\tgetAssertions() {\n\t\treturn this.assertions;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ExportNamedDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack) {\n\t\tif (this.declaration) {\n\t\t\tthis.exportDeclaration(stack);\n\t\t}\n\t\telse if (this.source) {\n\t\t\tthis.exportFromSource(stack);\n\t\t} else {\n\t\t\tthis.exportLocal(stack);\n\t\t}\n\t}\n\n\tprivate exportDeclaration(stack: Stack) {\n\t\tif (!this.declaration) {\n\t\t\treturn\n\t\t}\n\t\tthis.declaration.get(stack);\n\t\tconst declaredName = this.declaration.getDeclarationName?.();\n\t\tif (!declaredName) {\n\t\t\tthrow new Error(`Name is not defined for ${this.declaration.toString()}`);\n\t\t}\n\t\tconst value = stack.get(declaredName);\n\t\tstack.getModule()!.set(declaredName, value);\n\t}\n\tprivate exportFromSource(stack: Stack) {\n\t\tif (!this.source) {\n\t\t\treturn;\n\t\t}\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.assertions) {\n\t\t\tconst importAssertions: ImportAssertions = this.assertions\n\t\t\t\t.map(assertion => assertion.get(stack))\n\t\t\t\t.reduce((p, c) => Object.assign(p, c), {});\n\t\t\tif (importAssertions) {\n\t\t\t\timportCallOptions = { assert: importAssertions };\n\t\t\t}\n\t\t}\n\t\tconst sourceModule = stack.importModule(this.source.get(), importCallOptions);\n\t\tconst localModule = stack.getModule()!;\n\t\tthis.specifiers.forEach(specifier => {\n\t\t\tconst localName = specifier.getLocal().get(stack);\n\t\t\tconst exportedName = specifier.getExported().get(stack);\n\t\t\tconst localValue = sourceModule.get(localName);\n\t\t\tlocalModule.set(exportedName, localValue);\n\t\t\tconst scopeSubscription = sourceModule.subscribe(localName, (newLocalValue, oldLocalValue) => {\n\t\t\t\tif (newLocalValue !== oldLocalValue) {\n\t\t\t\t\tlocalModule.set(exportedName, newLocalValue);\n\t\t\t\t}\n\t\t\t});\n\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t});\n\t}\n\tprivate exportLocal(stack: Stack, importCallOptions?: ImportCallOptions) {\n\t\tconst localModule = stack.getModule()!;\n\t\tthis.specifiers.forEach(specifier => {\n\t\t\tconst localName = specifier.getLocal().get(stack);\n\t\t\tconst exportedName = specifier.getExported().get(stack);\n\t\t\tconst localValue = stack.get(localName);\n\t\t\tlocalModule.set(exportedName, localValue);\n\t\t\tconst scope = stack.findScope(localName);\n\t\t\tif (scope instanceof ReactiveScope) {\n\t\t\t\tconst scopeSubscription = scope.subscribe(localName, (newLocalValue, oldLocalValue) => {\n\t\t\t\t\tif (newLocalValue !== oldLocalValue) {\n\t\t\t\t\t\tlocalModule.set(exportedName, newLocalValue);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t\t}\n\t\t});\n\t}\n\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString() {\n\t\tif (this.declaration) {\n\t\t\tconst declaration = this.declaration.toString();\n\t\t\treturn `export ${declaration}`;\n\t\t}\n\t\tconst specifiers = this.specifiers.map(specifier => specifier.toString()).join(',');\n\t\tlet exportStr = `export {${specifiers}}`;\n\t\tif (!this.source) {\n\t\t\treturn `${exportStr};`;\n\t\t}\n\t\tconst source = this.source.toString();\n\t\treturn `${exportStr} from ${source}${this.assertions ? ` assert { ${this.assertions.map(assertion => assertion.toString()).join(', ')} }` : ''};`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tspecifiers: this.specifiers.map(specifier => specifier.toJSON()),\n\t\t\tsource: this.source?.toJSON(),\n\t\t\tdeclaration: this.declaration?.toJSON(),\n\t\t\tassertions: this.assertions?.map(assertion => assertion.toJSON()),\n\t\t};\n\t}\n}\n\n\n/**\n * An export default declaration, e.g., \n * `export default function () {};`\n * or `export default 1;`.\n */\n@Deserializer('ExportDefaultDeclaration')\nexport class ExportDefaultDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ExportDefaultDeclaration, deserializer: NodeDeserializer): ExportDefaultDeclaration {\n\t\treturn new ExportDefaultDeclaration(\n\t\t\tdeserializer(node.declaration),\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportDefaultDeclaration, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.declaration);\n\t}\n\tconstructor(\n\t\tprivate declaration: FunctionDeclaration | ClassDeclaration | ExpressionNode,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetDeclaration() {\n\t\treturn this.declaration;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ExportDefaultDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack) {\n\t\tconst declaration = this.declaration.get(stack);\n\t\tstack.getModule()!.set('default', declaration);\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString() {\n\t\tconst declaration = this.declaration.toString();\n\t\treturn `export default ${declaration}`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tdeclaration: this.declaration.toJSON(),\n\t\t};\n\t}\n}\n\n/**\n * An export batch declaration, e.g., `export * from \"mod\";`.\n */\n@Deserializer('ExportAllDeclaration')\nexport class ExportAllDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ExportAllDeclaration, deserializer: NodeDeserializer): ExportAllDeclaration {\n\t\treturn new ExportAllDeclaration(\n\t\t\tdeserializer(node.source) as Literal<string>,\n\t\t\tnode.exported ? deserializer(node.exported) as Identifier : void 0,\n\t\t\tnode.assertions?.map(deserializer) as ImportAttribute[],\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportAllDeclaration, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.source);\n\t\tnode.exported && visitNode(node.exported);\n\t\tnode.assertions?.forEach(visitNode);\n\t}\n\tconstructor(\n\t\tprivate source: Literal<string>,\n\t\tprivate exported?: Identifier,\n\t\tprivate assertions?: ImportAttribute[],\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tgetExported() {\n\t\treturn this.exported;\n\t}\n\tgetAssertions() {\n\t\treturn this.assertions;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ExportDefaultDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack) {\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.assertions) {\n\t\t\tconst importAssertions: ImportAssertions = this.assertions\n\t\t\t\t.map(assertion => assertion.get(stack))\n\t\t\t\t.reduce((p, c) => Object.assign(p, c), {});\n\t\t\tif (importAssertions) {\n\t\t\t\timportCallOptions = { assert: importAssertions };\n\t\t\t}\n\t\t}\n\t\tlet localModule: ReactiveScope<ModuleContext> = stack.getModule()!;\n\t\tconst sourceModule = stack.importModule(this.source.get(), importCallOptions);\n\n\t\tif (this.exported) {\n\t\t\tconst exportedName = this.exported.get(stack);\n\t\t\tlocalModule.set(exportedName, {});\n\t\t\tlocalModule = localModule.getInnerScope(exportedName)!;\n\t\t}\n\n\t\tconst properties = Object.keys(sourceModule.getContext()) as (keyof ModuleContext)[];\n\t\tproperties.forEach(property => {\n\n\t\t\tconst localValue = sourceModule.get(property);\n\t\t\tlocalModule.set(property, localValue);\n\t\t\tconst scopeSubscription = sourceModule.subscribe(property, (newLocalValue, oldLocalValue) => {\n\t\t\t\tif (newLocalValue !== oldLocalValue) {\n\t\t\t\t\tlocalModule.set(property, newLocalValue);\n\t\t\t\t}\n\t\t\t});\n\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t});\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString() {\n\t\treturn `export *${this.exported ? ` as ${this.exported.toString()}` : ''} from ${this.source.toString()}${this.assertions ? ` assert { ${this.assertions.map(assertion => assertion.toString()).join(', ')} }` : ''};`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tsource: this.source.toJSON(),\n\t\t\texported: this.exported?.toJSON(),\n\t\t\tassertions: this.assertions?.map(assertion => assertion.toJSON()),\n\t\t};\n\t}\n}\n"]}
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/expressions/api/module/export.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAg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C,CAAC,EAAE,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;QACtN,CAAC;QACD,MAAM;YACL,OAAO;gBACN,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;gBAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE;gBACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;aACjE,CAAC;QACH,CAAC;;;;SAlFW,oBAAoB","sourcesContent":["\n/**\n * There are two types of exports:\n * 1- Named Exports (Zero or more exports per module)\n * 2- Default Exports (One per module)\n * \n * // Exporting individual features\n * export let name1, name2, …, nameN; // also var, const\n * export let name1 = …, name2 = …, …, nameN; // also var, const\n * export function functionName(){...}\n * export class ClassName {...}\n * \n * // Export list\n * export { name1, name2, …, nameN };\n * \n * // Renaming exports\n * export { variable1 as name1, variable2 as name2, …, nameN };\n * \n * // Exporting destructed assignments with renaming\n * export const { name1, name2: bar } = o;\n * \n * // Default exports\n * export default expression;\n * export default function (…) { … } // also class, function*\n * export default function name1(…) { … } // also class, function*\n * export { name1 as default, … };\n * \n * // Aggregating modules\n * export * from …; // does not set the default export\n * export * as name1 from …; // Draft ECMAScript® 2O21\n * export { name1, name2, …, nameN } from …;\n * export { import1 as name1, import2 as name2, …, nameN } from …;\n * export { default, … } from …;\n */\n\nimport type {\n\tNodeDeserializer, ExpressionNode, ExpressionEventPath,\n\tVisitNodeType, DeclarationExpression, SourceLocation\n} from '../expression.js';\nimport { ModuleContext, ReactiveScope } from '../../scope/scope.js';\nimport { Stack } from '../../scope/stack.js';\nimport { AbstractExpressionNode } from '../abstract.js';\nimport { Deserializer } from '../deserialize/deserialize.js';\nimport { Identifier, Literal } from '../definition/values.js';\nimport { ImportAttribute, ModuleSpecifier } from './common.js';\nimport { FunctionDeclaration } from '../definition/function.js';\nimport { ClassDeclaration } from '../class/class.js';\n\n\n/**\n * An exported variable binding, e.g., `{foo}` in `export {foo}` or `{bar as foo}` in `export {bar as foo}`.\n * \n * The `exported` field refers to the name exported in the module.\n * \n * The `local` field refers to the binding into the local module scope.\n * \n * If it is a basic named export, such as in `export {foo}`, both `exported` and `local` are equivalent `Identifier` nodes;\n * in this case an Identifier node representing `foo`.\n * \n * If it is an aliased export,\n * such as in `export {bar as foo}`, the `exported` field is an `Identifier` node representing `foo`,\n * and the `local` field is an `Identifier` node representing `bar`.\n */\n@Deserializer('ExportSpecifier')\nexport class ExportSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ExportSpecifier, deserializer: NodeDeserializer): ExportSpecifier {\n\t\treturn new ExportSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tdeserializer(node.exported) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t\tvisitNode(node.exported);\n\t}\n\tconstructor(\n\t\tlocal: Identifier,\n\t\tprivate exported: Identifier,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(local, range, loc);\n\t}\n\tgetExported() {\n\t\treturn this.exported;\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\tconst local = this.local.toString();\n\t\tconst exported = this.exported.toString();\n\t\tif (local == exported) {\n\t\t\treturn local;\n\t\t}\n\t\treturn `${local} as ${exported}`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tlocal: this.local.toJSON(),\n\t\t\texported: this.exported.toJSON()\n\t\t};\n\t}\n}\n\n\n/**\n * An export named declaration, e.g.,\n * `export {foo, bar};`,\n * `export {foo} from \"mod\";`\n * or `export var foo = 1;`.\n * \n * Note: Having `declaration` populated with non-empty `specifiers` or non-null `source` results in an invalid state.\n */\n@Deserializer('ExportNamedDeclaration')\nexport class ExportNamedDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ExportNamedDeclaration, deserializer: NodeDeserializer): ExportNamedDeclaration {\n\t\treturn new ExportNamedDeclaration(\n\t\t\tnode.specifiers.map(deserializer) as ExportSpecifier[],\n\t\t\tnode.declaration ? deserializer(node.declaration) as DeclarationExpression : void 0,\n\t\t\tnode.source ? deserializer(node.source) as Literal<string> : void 0,\n\t\t\tnode.attributes ? node.attributes.map(deserializer) as ImportAttribute[] : void 0,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportNamedDeclaration, visitNode: VisitNodeType): void {\n\t\tnode.specifiers.map(visitNode);\n\t\tnode.source && visitNode(node.source);\n\t\tnode.declaration && visitNode(node.declaration);\n\t\tnode.attributes?.forEach(visitNode);\n\t}\n\tconstructor(\n\t\tprivate specifiers: ExportSpecifier[],\n\t\tprivate declaration?: DeclarationExpression,\n\t\tprivate source?: Literal<string>,\n\t\tprivate attributes?: ImportAttribute[],\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tgetSpecifiers() {\n\t\treturn this.specifiers;\n\t}\n\tgetDeclaration() {\n\t\treturn this.declaration;\n\t}\n\tgetAttributes() {\n\t\treturn this.attributes;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ExportNamedDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack) {\n\t\tif (this.declaration) {\n\t\t\tthis.exportDeclaration(stack);\n\t\t}\n\t\telse if (this.source) {\n\t\t\tthis.exportFromSource(stack);\n\t\t} else {\n\t\t\tthis.exportLocal(stack);\n\t\t}\n\t}\n\n\tprivate exportDeclaration(stack: Stack) {\n\t\tif (!this.declaration) {\n\t\t\treturn\n\t\t}\n\t\tthis.declaration.get(stack);\n\t\tconst declaredName = this.declaration.getDeclarationName?.();\n\t\tif (!declaredName) {\n\t\t\tthrow new Error(`Name is not defined for ${this.declaration.toString()}`);\n\t\t}\n\t\tconst value = stack.get(declaredName);\n\t\tstack.getModule()!.set(declaredName, value);\n\t}\n\tprivate exportFromSource(stack: Stack) {\n\t\tif (!this.source) {\n\t\t\treturn;\n\t\t}\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.attributes) {\n\t\t\tconst importAttributes: ImportAttributes = this.attributes\n\t\t\t\t.map(attribute => attribute.get(stack))\n\t\t\t\t.reduce((p, c) => Object.assign(p, c), {});\n\t\t\tif (importAttributes) {\n\t\t\t\timportCallOptions = { with: importAttributes };\n\t\t\t}\n\t\t}\n\t\tconst sourceModule = stack.importModule(this.source.get(), importCallOptions);\n\t\tconst localModule = stack.getModule()!;\n\t\tthis.specifiers.forEach(specifier => {\n\t\t\tconst localName = specifier.getLocal().get(stack);\n\t\t\tconst exportedName = specifier.getExported().get(stack);\n\t\t\tconst localValue = sourceModule.get(localName);\n\t\t\tlocalModule.set(exportedName, localValue);\n\t\t\tconst scopeSubscription = sourceModule.subscribe(localName, (newLocalValue, oldLocalValue) => {\n\t\t\t\tif (newLocalValue !== oldLocalValue) {\n\t\t\t\t\tlocalModule.set(exportedName, newLocalValue);\n\t\t\t\t}\n\t\t\t});\n\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t});\n\t}\n\tprivate exportLocal(stack: Stack, importCallOptions?: ImportCallOptions) {\n\t\tconst localModule = stack.getModule()!;\n\t\tthis.specifiers.forEach(specifier => {\n\t\t\tconst localName = specifier.getLocal().get(stack);\n\t\t\tconst exportedName = specifier.getExported().get(stack);\n\t\t\tconst localValue = stack.get(localName);\n\t\t\tlocalModule.set(exportedName, localValue);\n\t\t\tconst scope = stack.findScope(localName);\n\t\t\tif (scope instanceof ReactiveScope) {\n\t\t\t\tconst scopeSubscription = scope.subscribe(localName, (newLocalValue, oldLocalValue) => {\n\t\t\t\t\tif (newLocalValue !== oldLocalValue) {\n\t\t\t\t\t\tlocalModule.set(exportedName, newLocalValue);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t\t}\n\t\t});\n\t}\n\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString() {\n\t\tif (this.declaration) {\n\t\t\tconst declaration = this.declaration.toString();\n\t\t\treturn `export ${declaration}`;\n\t\t}\n\t\tconst specifiers = this.specifiers.map(specifier => specifier.toString()).join(',');\n\t\tlet exportStr = `export {${specifiers}}`;\n\t\tif (!this.source) {\n\t\t\treturn `${exportStr};`;\n\t\t}\n\t\tconst source = this.source.toString();\n\t\treturn `${exportStr} from ${source}${this.attributes ? ` with { ${this.attributes.map(attribute => attribute.toString()).join(', ')} }` : ''};`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tspecifiers: this.specifiers.map(specifier => specifier.toJSON()),\n\t\t\tsource: this.source?.toJSON(),\n\t\t\tdeclaration: this.declaration?.toJSON(),\n\t\t\tattributes: this.attributes?.map(attribute => attribute.toJSON()),\n\t\t};\n\t}\n}\n\n\n/**\n * An export default declaration, e.g., \n * `export default function () {};`\n * or `export default 1;`.\n */\n@Deserializer('ExportDefaultDeclaration')\nexport class ExportDefaultDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ExportDefaultDeclaration, deserializer: NodeDeserializer): ExportDefaultDeclaration {\n\t\treturn new ExportDefaultDeclaration(\n\t\t\tdeserializer(node.declaration),\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportDefaultDeclaration, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.declaration);\n\t}\n\tconstructor(\n\t\tprivate declaration: FunctionDeclaration | ClassDeclaration | ExpressionNode,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetDeclaration() {\n\t\treturn this.declaration;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ExportDefaultDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack) {\n\t\tconst declaration = this.declaration.get(stack);\n\t\tstack.getModule()!.set('default', declaration);\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString() {\n\t\tconst declaration = this.declaration.toString();\n\t\treturn `export default ${declaration}`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tdeclaration: this.declaration.toJSON(),\n\t\t};\n\t}\n}\n\n/**\n * An export batch declaration, e.g., `export * from \"mod\";`.\n */\n@Deserializer('ExportAllDeclaration')\nexport class ExportAllDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ExportAllDeclaration, deserializer: NodeDeserializer): ExportAllDeclaration {\n\t\treturn new ExportAllDeclaration(\n\t\t\tdeserializer(node.source) as Literal<string>,\n\t\t\tnode.exported ? deserializer(node.exported) as Identifier : void 0,\n\t\t\tnode.attributes?.map(deserializer) as ImportAttribute[],\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ExportAllDeclaration, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.source);\n\t\tnode.exported && visitNode(node.exported);\n\t\tnode.attributes?.forEach(visitNode);\n\t}\n\tconstructor(\n\t\tprivate source: Literal<string>,\n\t\tprivate exported?: Identifier,\n\t\tprivate attributes?: ImportAttribute[],\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tgetExported() {\n\t\treturn this.exported;\n\t}\n\tgetAttributes() {\n\t\treturn this.attributes;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ExportDefaultDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack) {\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.attributes) {\n\t\t\tconst importAttributes: ImportAttributes = this.attributes\n\t\t\t\t.map(attribute => attribute.get(stack))\n\t\t\t\t.reduce((p, c) => Object.assign(p, c), {});\n\t\t\tif (importAttributes) {\n\t\t\t\timportCallOptions = { with: importAttributes };\n\t\t\t}\n\t\t}\n\t\tlet localModule: ReactiveScope<ModuleContext> = stack.getModule()!;\n\t\tconst sourceModule = stack.importModule(this.source.get(), importCallOptions);\n\n\t\tif (this.exported) {\n\t\t\tconst exportedName = this.exported.get(stack);\n\t\t\tlocalModule.set(exportedName, {});\n\t\t\tlocalModule = localModule.getInnerScope(exportedName)!;\n\t\t}\n\n\t\tconst properties = Object.keys(sourceModule.getContext()) as (keyof ModuleContext)[];\n\t\tproperties.forEach(property => {\n\n\t\t\tconst localValue = sourceModule.get(property);\n\t\t\tlocalModule.set(property, localValue);\n\t\t\tconst scopeSubscription = sourceModule.subscribe(property, (newLocalValue, oldLocalValue) => {\n\t\t\t\tif (newLocalValue !== oldLocalValue) {\n\t\t\t\t\tlocalModule.set(property, newLocalValue);\n\t\t\t\t}\n\t\t\t});\n\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t});\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString() {\n\t\treturn `export *${this.exported ? ` as ${this.exported.toString()}` : ''} from ${this.source.toString()}${this.attributes ? ` with { ${this.attributes.map(attribute => attribute.toString()).join(', ')} }` : ''};`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tsource: this.source.toJSON(),\n\t\t\texported: this.exported?.toJSON(),\n\t\t\tattributes: this.attributes?.map(attribute => attribute.toJSON()),\n\t\t};\n\t}\n}\n"]}
@@ -86,13 +86,13 @@ export declare class ImportNamespaceSpecifier extends ModuleSpecifier {
86
86
  export declare class ImportDeclaration extends AbstractExpressionNode {
87
87
  private source;
88
88
  private specifiers?;
89
- private assertions?;
89
+ private attributes?;
90
90
  static fromJSON(node: ImportDeclaration, deserializer: NodeDeserializer): ImportDeclaration;
91
91
  static visit(node: ImportDeclaration, visitNode: VisitNodeType): void;
92
- constructor(source: Literal<string>, specifiers?: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[] | undefined, assertions?: ImportAttribute[] | undefined, range?: [number, number], loc?: SourceLocation);
92
+ constructor(source: Literal<string>, specifiers?: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[] | undefined, attributes?: ImportAttribute[] | undefined, range?: [number, number], loc?: SourceLocation);
93
93
  getSource(): Literal<string>;
94
94
  getSpecifiers(): (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[] | undefined;
95
- getAssertions(): ImportAttribute[] | undefined;
95
+ getAttributes(): ImportAttribute[] | undefined;
96
96
  set(stack: Stack): void;
97
97
  get(stack: Stack): void;
98
98
  dependency(computed?: true): ExpressionNode[];
@@ -209,20 +209,20 @@ let ImportDeclaration = (() => {
209
209
  }
210
210
  source;
211
211
  specifiers;
212
- assertions;
212
+ attributes;
213
213
  static fromJSON(node, deserializer) {
214
- return new ImportDeclaration(deserializer(node.source), node.specifiers?.map(deserializer), node.assertions?.map(deserializer), node.range, node.loc);
214
+ return new ImportDeclaration(deserializer(node.source), node.specifiers?.map(deserializer), node.attributes?.map(deserializer), node.range, node.loc);
215
215
  }
216
216
  static visit(node, visitNode) {
217
217
  visitNode(node.source);
218
218
  node.specifiers?.forEach(visitNode);
219
- node.assertions?.forEach(visitNode);
219
+ node.attributes?.forEach(visitNode);
220
220
  }
221
- constructor(source, specifiers, assertions, range, loc) {
221
+ constructor(source, specifiers, attributes, range, loc) {
222
222
  super(range, loc);
223
223
  this.source = source;
224
224
  this.specifiers = specifiers;
225
- this.assertions = assertions;
225
+ this.attributes = attributes;
226
226
  }
227
227
  getSource() {
228
228
  return this.source;
@@ -230,20 +230,20 @@ let ImportDeclaration = (() => {
230
230
  getSpecifiers() {
231
231
  return this.specifiers;
232
232
  }
233
- getAssertions() {
234
- return this.assertions;
233
+ getAttributes() {
234
+ return this.attributes;
235
235
  }
236
236
  set(stack) {
237
237
  throw new Error(`ImportDeclaration.#set() has no implementation.`);
238
238
  }
239
239
  get(stack) {
240
240
  let importCallOptions;
241
- if (this.assertions) {
242
- const importAssertions = this.assertions
243
- .map(assertion => assertion.get(stack))
241
+ if (this.attributes) {
242
+ const importAttributes = this.attributes
243
+ .map(attribute => attribute.get(stack))
244
244
  .reduce((p, c) => Object.assign(p, c), {});
245
- if (importAssertions) {
246
- importCallOptions = { assert: importAssertions };
245
+ if (importAttributes) {
246
+ importCallOptions = { with: importAttributes };
247
247
  }
248
248
  }
249
249
  const module = stack.importModule(this.source.get(), importCallOptions);
@@ -302,13 +302,13 @@ let ImportDeclaration = (() => {
302
302
  const importSpecifiersString = importSpecifiers.map(importSpecifier => importSpecifier.toString()).join(',');
303
303
  parts.push(`{ ${importSpecifiersString} }`);
304
304
  }
305
- return `import ${parts.join(', ')} from ${this.source.toString()}${this.assertions ? ` assert { ${this.assertions.map(assertion => assertion.toString()).join(', ')} }` : ''};`;
305
+ return `import ${parts.join(', ')} from ${this.source.toString()}${this.attributes ? ` with { ${this.attributes.map(attribute => attribute.toString()).join(', ')} }` : ''};`;
306
306
  }
307
307
  toJson() {
308
308
  return {
309
309
  source: this.source.toJSON(),
310
310
  specifiers: this.specifiers?.map(specifier => specifier.toJSON()),
311
- assertions: this.assertions?.map(assertion => assertion.toJSON()),
311
+ attributes: this.attributes?.map(attribute => attribute.toJSON()),
312
312
  };
313
313
  }
314
314
  };
@@ -1 +1 @@
1
- {"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/expressions/api/module/import.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAmB,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;;;;;;;;;;;;GAgBG;IAEU,eAAe;4BAD3B,YAAY,CAAC,iBAAiB,CAAC;;;;sBACK,eAAe;+BAAvB,SAAQ,WAAe;;;;YAApD,6KAoDC;;;YApDY,uDAAe;;QAelB,QAAQ;QAdjB,MAAM,CAAC,QAAQ,CAAC,IAAqB,EAAE,YAA8B;YACpE,OAAO,IAAI,eAAe,CACzB,YAAY,CAAC,IAAI,CAAC,KAAK,CAAe,EACtC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAe,EACzC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,GAAG,CACR,CAAC;QACH,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,IAAqB,EAAE,SAAwB;YAC3D,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC;QACD,YACC,KAAiB,EACT,QAAoB,EAC5B,KAAwB,EACxB,GAAoB;YACpB,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;YAHjB,aAAQ,GAAR,QAAQ,CAAY;QAI7B,CAAC;QACD,WAAW;YACV,OAAO,IAAI,CAAC,QAAQ,CAAC;QACtB,CAAC;QACD,eAAe;YACd,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QAChC,CAAC;QACD,G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YACf,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACpE,CAAC;QACD,GAAG,CAAC,KAAY;YACf,IAAI,iBAAgD,CAAC;YACrD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC;YACD,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC;YACxE,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QACD,UAAU,CAAC,QAAe;YACzB,OAAO,EAAE,CAAC;QACX,CAAC;QACD,cAAc,CAAC,QAAe;YAC7B,OAAO,EAAE,CAAC;QACX,CAAC;QACD,QAAQ;YACP,OAAO,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;QACvG,CAAC;QACD,MAAM;YACL,OAAO;gBACN,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;aAC5B,CAAC;QACH,CAAC;;;;SA/CW,gBAAgB","sourcesContent":["import type {\n\tNodeDeserializer, ExpressionNode, ExpressionEventPath,\n\tVisitNodeType, SourceLocation,\n} from '../expression.js';\nimport type { ModuleScope } from '../../scope/scope.js';\nimport type { Stack } from '../../scope/stack.js';\nimport { AbstractExpressionNode } from '../abstract.js';\nimport { Deserializer } from '../deserialize/deserialize.js';\nimport { Identifier, Literal } from '../definition/values.js';\nimport { ImportAttribute, ModuleSpecifier } from './common.js';\n\n/**\n * An imported variable binding,\n * \n * e.g., {foo} in import {foo} from \"mod\"\n * or {foo as bar} in import {foo as bar} from \"mod\".\n * \n * The imported field refers to the name of the export imported from the module.\n * \n * The local field refers to the binding imported into the local module scope.\n * \n * If it is a basic named import, such as in import {foo} from \"mod\",\n * both imported and local are equivalent Identifier nodes; in this case an Identifier node representing foo.\n * \n * If it is an aliased import, such as in import {foo as bar} from \"mod\",\n * the imported field is an Identifier node representing foo,\n * and the local field is an Identifier node representing bar.\n */\n@Deserializer('ImportSpecifier')\nexport class ImportSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ImportSpecifier, deserializer: NodeDeserializer): ImportSpecifier {\n\t\treturn new ImportSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tdeserializer(node.imported) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t\tvisitNode(node.imported);\n\t}\n\tconstructor(\n\t\tlocal: Identifier,\n\t\tprivate imported: Identifier,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(local, range, loc);\n\t}\n\tgetImported() {\n\t\treturn this.imported;\n\t}\n\tgetImportedName() {\n\t\treturn this.imported.getName();\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\tconst local = this.local.toString();\n\t\tconst imported = this.imported.toString();\n\t\tif (local == imported) {\n\t\t\treturn local;\n\t\t}\n\t\treturn `${imported} as ${local}`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tlocal: this.local.toJSON(),\n\t\t\timported: this.imported.toJSON()\n\t\t};\n\t}\n}\n\n/**\n * A default import specifier, e.g., `foo` in `import foo from \"mod.js\";`.\n */\n@Deserializer('ImportDefaultSpecifier')\nexport class ImportDefaultSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ImportDefaultSpecifier, deserializer: NodeDeserializer): ImportDefaultSpecifier {\n\t\treturn new ImportDefaultSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportDefaultSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\treturn this.local.toString();\n\t}\n}\n\n/**\n * A namespace import specifier, e.g., `* as foo` in `import * as foo from \"mod.js\";`.\n */\n@Deserializer('ImportNamespaceSpecifier')\nexport class ImportNamespaceSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ImportNamespaceSpecifier, deserializer: NodeDeserializer): ImportNamespaceSpecifier {\n\t\treturn new ImportNamespaceSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportNamespaceSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\treturn `* as ${this.local.toString()}`;\n\t}\n}\n\n/**\n * An import declaration, e.g., import foo from \"mod\";.\n * \n * import defaultExport from \"module-name\";\n * \n * import * as name from \"module-name\";\n * \n * import { export1 } from \"module-name\";\n * \n * import { export1 as alias1 } from \"module-name\";\n * \n * import { export1 , export2 } from \"module-name\";\n * \n * import { foo , bar } from \"module-name/path/to/specific/un-exported/file\";\n * \n * import { export1 , export2 as alias2 , [...] } from \"module-name\";\n * \n * import defaultExport, { export1 [ , [...] ] } from \"module-name\";\n * \n * import defaultExport, * as name from \"module-name\";\n * \n * import \"module-name\";\n * \n */\n@Deserializer('ImportDeclaration')\nexport class ImportDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ImportDeclaration, deserializer: NodeDeserializer): ImportDeclaration {\n\t\treturn new ImportDeclaration(\n\t\t\tdeserializer(node.source) as Literal<string>,\n\t\t\tnode.specifiers?.map(deserializer) as (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[],\n\t\t\tnode.assertions?.map(deserializer) as (ImportAttribute)[],\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportDeclaration, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.source);\n\t\tnode.specifiers?.forEach(visitNode);\n\t\tnode.assertions?.forEach(visitNode);\n\t}\n\tconstructor(\n\t\tprivate source: Literal<string>,\n\t\tprivate specifiers?: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[],\n\t\tprivate assertions?: ImportAttribute[],\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tgetSpecifiers() {\n\t\treturn this.specifiers;\n\t}\n\tgetAssertions() {\n\t\treturn this.assertions;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ImportDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack): void {\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.assertions) {\n\t\t\tconst importAssertions: ImportAssertions = this.assertions\n\t\t\t\t.map(assertion => assertion.get(stack))\n\t\t\t\t.reduce((p, c) => Object.assign(p, c), {});\n\t\t\tif (importAssertions) {\n\t\t\t\timportCallOptions = { assert: importAssertions };\n\t\t\t}\n\t\t}\n\t\tconst module = stack.importModule(this.source.get(), importCallOptions);\n\t\tif (!this.specifiers) {\n\t\t\treturn;\n\t\t}\n\t\tthis.specifiers.forEach(specifier => {\n\t\t\tconst local = specifier.getLocalName();\n\t\t\tif (specifier instanceof ImportSpecifier) {\n\t\t\t\tconst imported = specifier.getImportedName();\n\t\t\t\tconst importedValue = module.get(imported);\n\t\t\t\tstack.getModule()?.set(local, importedValue);\n\t\t\t\tconst scopeSubscription = module.subscribe(local, (newValue, oldValue) => {\n\t\t\t\t\tif (newValue !== oldValue) {\n\t\t\t\t\t\tstack.getModule()?.set(local, newValue);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t\t} else if (specifier instanceof ImportDefaultSpecifier) {\n\t\t\t\tconst defaultValue = module.get('default');\n\t\t\t\tstack.getModule()?.set(local, defaultValue);\n\t\t\t\tconst scopeSubscription = module.subscribe('default', (newValue, oldValue) => {\n\t\t\t\t\tif (newValue !== oldValue) {\n\t\t\t\t\t\tstack.getModule()?.set(local, newValue);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t\t} else if (specifier instanceof ImportNamespaceSpecifier) {\n\t\t\t\tstack.getModule()?.importModule(local, module);\n\t\t\t}\n\t\t});\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\tif (!this.specifiers) {\n\t\t\treturn `import '${this.source.toString()}'`;\n\t\t}\n\t\tconst parts: string[] = [];\n\t\tconst importDefaultSpecifiers = this.specifiers.filter(specifier => specifier instanceof ImportDefaultSpecifier) as ImportDefaultSpecifier[];\n\t\tif (importDefaultSpecifiers?.length) {\n\t\t\tparts.push(importDefaultSpecifiers[0].toString());\n\t\t}\n\t\tconst importNamespaceSpecifiers = this.specifiers.filter(specifier => specifier instanceof ImportNamespaceSpecifier) as ImportNamespaceSpecifier[];\n\t\tif (importNamespaceSpecifiers?.length) {\n\t\t\tparts.push(importNamespaceSpecifiers[0].toString());\n\t\t}\n\t\tconst importSpecifiers = this.specifiers.filter(specifier => specifier instanceof ImportSpecifier) as ImportSpecifier[];\n\t\tif (importSpecifiers?.length) {\n\t\t\tconst importSpecifiersString = importSpecifiers.map(importSpecifier => importSpecifier.toString()).join(',');\n\t\t\tparts.push(`{ ${importSpecifiersString} }`);\n\t\t}\n\t\treturn `import ${parts.join(', ')} from ${this.source.toString()}${this.assertions ? ` assert { ${this.assertions.map(assertion => assertion.toString()).join(', ')} }` : ''};`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tsource: this.source.toJSON(),\n\t\t\tspecifiers: this.specifiers?.map(specifier => specifier.toJSON()),\n\t\t\tassertions: this.assertions?.map(assertion => assertion.toJSON()),\n\t\t};\n\t}\n}\n\n\n/**\n * `ImportExpression` node represents Dynamic Imports such as `import(source)`.\n * The `source` property is the importing source as similar to ImportDeclaration node,\n * but it can be an arbitrary expression node.\n * var promise = import(\"module-name\");\n */\n@Deserializer('ImportExpression')\nexport class ImportExpression extends AbstractExpressionNode {\n\tstatic fromJSON(node: ImportExpression, deserializer: NodeDeserializer): ImportExpression {\n\t\treturn new ImportExpression(\n\t\t\tdeserializer(node.source) as Literal<string>,\n\t\t\t(node.attributes && deserializer(node.attributes)) || undefined,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportExpression, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.source);\n\t\tnode.attributes && visitNode(node.attributes);\n\t}\n\tconstructor(\n\t\tprivate source: Literal<string>,\n\t\tprivate attributes?: ExpressionNode,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ImportDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack): Promise<ModuleScope> {\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.attributes) {\n\t\t\timportCallOptions = this.attributes.get(stack);\n\t\t}\n\t\tconst module = stack.importModule(this.source.get(), importCallOptions);\n\t\treturn Promise.resolve(module);\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\treturn `import(${this.source.toString()}${this.attributes ? `, ${this.attributes.toString()}` : ''})`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tsource: this.source.toJSON(),\n\t\t};\n\t}\n}\n"]}
1
+ {"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/expressions/api/module/import.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAmB,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;;;;;;;;;;;;GAgBG;IAEU,eAAe;4BAD3B,YAAY,CAAC,iBAAiB,CAAC;;;;sBACK,eAAe;+BAAvB,SAAQ,WAAe;;;;YAApD,6KAoDC;;;YApDY,uDAAe;;QAelB,QAAQ;QAdjB,MAAM,CAAC,QAAQ,CAAC,IAAqB,EAAE,YAA8B;YACpE,OAAO,IAAI,eAAe,CACzB,YAAY,CAAC,IAAI,CAAC,KAAK,CAAe,EACtC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAe,EACzC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,GAAG,CACR,CAAC;QACH,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,IAAqB,EAAE,SAAwB;YAC3D,SAAS,CAA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,CAAC;;;;SA/CW,gBAAgB","sourcesContent":["import type {\n\tNodeDeserializer, ExpressionNode, ExpressionEventPath,\n\tVisitNodeType, SourceLocation,\n} from '../expression.js';\nimport type { ModuleScope } from '../../scope/scope.js';\nimport type { Stack } from '../../scope/stack.js';\nimport { AbstractExpressionNode } from '../abstract.js';\nimport { Deserializer } from '../deserialize/deserialize.js';\nimport { Identifier, Literal } from '../definition/values.js';\nimport { ImportAttribute, ModuleSpecifier } from './common.js';\n\n/**\n * An imported variable binding,\n * \n * e.g., {foo} in import {foo} from \"mod\"\n * or {foo as bar} in import {foo as bar} from \"mod\".\n * \n * The imported field refers to the name of the export imported from the module.\n * \n * The local field refers to the binding imported into the local module scope.\n * \n * If it is a basic named import, such as in import {foo} from \"mod\",\n * both imported and local are equivalent Identifier nodes; in this case an Identifier node representing foo.\n * \n * If it is an aliased import, such as in import {foo as bar} from \"mod\",\n * the imported field is an Identifier node representing foo,\n * and the local field is an Identifier node representing bar.\n */\n@Deserializer('ImportSpecifier')\nexport class ImportSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ImportSpecifier, deserializer: NodeDeserializer): ImportSpecifier {\n\t\treturn new ImportSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tdeserializer(node.imported) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t\tvisitNode(node.imported);\n\t}\n\tconstructor(\n\t\tlocal: Identifier,\n\t\tprivate imported: Identifier,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(local, range, loc);\n\t}\n\tgetImported() {\n\t\treturn this.imported;\n\t}\n\tgetImportedName() {\n\t\treturn this.imported.getName();\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\tconst local = this.local.toString();\n\t\tconst imported = this.imported.toString();\n\t\tif (local == imported) {\n\t\t\treturn local;\n\t\t}\n\t\treturn `${imported} as ${local}`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tlocal: this.local.toJSON(),\n\t\t\timported: this.imported.toJSON()\n\t\t};\n\t}\n}\n\n/**\n * A default import specifier, e.g., `foo` in `import foo from \"mod.js\";`.\n */\n@Deserializer('ImportDefaultSpecifier')\nexport class ImportDefaultSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ImportDefaultSpecifier, deserializer: NodeDeserializer): ImportDefaultSpecifier {\n\t\treturn new ImportDefaultSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportDefaultSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\treturn this.local.toString();\n\t}\n}\n\n/**\n * A namespace import specifier, e.g., `* as foo` in `import * as foo from \"mod.js\";`.\n */\n@Deserializer('ImportNamespaceSpecifier')\nexport class ImportNamespaceSpecifier extends ModuleSpecifier {\n\tstatic fromJSON(node: ImportNamespaceSpecifier, deserializer: NodeDeserializer): ImportNamespaceSpecifier {\n\t\treturn new ImportNamespaceSpecifier(\n\t\t\tdeserializer(node.local) as Identifier,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportNamespaceSpecifier, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.local);\n\t}\n\tset(stack: Stack, value: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tget(stack: Stack, thisContext?: any) {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\treturn `* as ${this.local.toString()}`;\n\t}\n}\n\n/**\n * An import declaration, e.g., import foo from \"mod\";.\n * \n * import defaultExport from \"module-name\";\n * \n * import * as name from \"module-name\";\n * \n * import { export1 } from \"module-name\";\n * \n * import { export1 as alias1 } from \"module-name\";\n * \n * import { export1 , export2 } from \"module-name\";\n * \n * import { foo , bar } from \"module-name/path/to/specific/un-exported/file\";\n * \n * import { export1 , export2 as alias2 , [...] } from \"module-name\";\n * \n * import defaultExport, { export1 [ , [...] ] } from \"module-name\";\n * \n * import defaultExport, * as name from \"module-name\";\n * \n * import \"module-name\";\n * \n */\n@Deserializer('ImportDeclaration')\nexport class ImportDeclaration extends AbstractExpressionNode {\n\tstatic fromJSON(node: ImportDeclaration, deserializer: NodeDeserializer): ImportDeclaration {\n\t\treturn new ImportDeclaration(\n\t\t\tdeserializer(node.source) as Literal<string>,\n\t\t\tnode.specifiers?.map(deserializer) as (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[],\n\t\t\tnode.attributes?.map(deserializer) as (ImportAttribute)[],\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportDeclaration, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.source);\n\t\tnode.specifiers?.forEach(visitNode);\n\t\tnode.attributes?.forEach(visitNode);\n\t}\n\tconstructor(\n\t\tprivate source: Literal<string>,\n\t\tprivate specifiers?: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[],\n\t\tprivate attributes?: ImportAttribute[],\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tgetSpecifiers() {\n\t\treturn this.specifiers;\n\t}\n\tgetAttributes() {\n\t\treturn this.attributes;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ImportDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack): void {\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.attributes) {\n\t\t\tconst importAttributes: ImportAttributes = this.attributes\n\t\t\t\t.map(attribute => attribute.get(stack))\n\t\t\t\t.reduce((p, c) => Object.assign(p, c), {});\n\t\t\tif (importAttributes) {\n\t\t\t\timportCallOptions = { with: importAttributes };\n\t\t\t}\n\t\t}\n\t\tconst module = stack.importModule(this.source.get(), importCallOptions);\n\t\tif (!this.specifiers) {\n\t\t\treturn;\n\t\t}\n\t\tthis.specifiers.forEach(specifier => {\n\t\t\tconst local = specifier.getLocalName();\n\t\t\tif (specifier instanceof ImportSpecifier) {\n\t\t\t\tconst imported = specifier.getImportedName();\n\t\t\t\tconst importedValue = module.get(imported);\n\t\t\t\tstack.getModule()?.set(local, importedValue);\n\t\t\t\tconst scopeSubscription = module.subscribe(local, (newValue, oldValue) => {\n\t\t\t\t\tif (newValue !== oldValue) {\n\t\t\t\t\t\tstack.getModule()?.set(local, newValue);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t\t} else if (specifier instanceof ImportDefaultSpecifier) {\n\t\t\t\tconst defaultValue = module.get('default');\n\t\t\t\tstack.getModule()?.set(local, defaultValue);\n\t\t\t\tconst scopeSubscription = module.subscribe('default', (newValue, oldValue) => {\n\t\t\t\t\tif (newValue !== oldValue) {\n\t\t\t\t\t\tstack.getModule()?.set(local, newValue);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstack.onDestroy(() => scopeSubscription.unsubscribe());\n\t\t\t} else if (specifier instanceof ImportNamespaceSpecifier) {\n\t\t\t\tstack.getModule()?.importModule(local, module);\n\t\t\t}\n\t\t});\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\tif (!this.specifiers) {\n\t\t\treturn `import '${this.source.toString()}'`;\n\t\t}\n\t\tconst parts: string[] = [];\n\t\tconst importDefaultSpecifiers = this.specifiers.filter(specifier => specifier instanceof ImportDefaultSpecifier) as ImportDefaultSpecifier[];\n\t\tif (importDefaultSpecifiers?.length) {\n\t\t\tparts.push(importDefaultSpecifiers[0].toString());\n\t\t}\n\t\tconst importNamespaceSpecifiers = this.specifiers.filter(specifier => specifier instanceof ImportNamespaceSpecifier) as ImportNamespaceSpecifier[];\n\t\tif (importNamespaceSpecifiers?.length) {\n\t\t\tparts.push(importNamespaceSpecifiers[0].toString());\n\t\t}\n\t\tconst importSpecifiers = this.specifiers.filter(specifier => specifier instanceof ImportSpecifier) as ImportSpecifier[];\n\t\tif (importSpecifiers?.length) {\n\t\t\tconst importSpecifiersString = importSpecifiers.map(importSpecifier => importSpecifier.toString()).join(',');\n\t\t\tparts.push(`{ ${importSpecifiersString} }`);\n\t\t}\n\t\treturn `import ${parts.join(', ')} from ${this.source.toString()}${this.attributes ? ` with { ${this.attributes.map(attribute => attribute.toString()).join(', ')} }` : ''};`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tsource: this.source.toJSON(),\n\t\t\tspecifiers: this.specifiers?.map(specifier => specifier.toJSON()),\n\t\t\tattributes: this.attributes?.map(attribute => attribute.toJSON()),\n\t\t};\n\t}\n}\n\n\n/**\n * `ImportExpression` node represents Dynamic Imports such as `import(source)`.\n * The `source` property is the importing source as similar to ImportDeclaration node,\n * but it can be an arbitrary expression node.\n * var promise = import(\"module-name\");\n */\n@Deserializer('ImportExpression')\nexport class ImportExpression extends AbstractExpressionNode {\n\tstatic fromJSON(node: ImportExpression, deserializer: NodeDeserializer): ImportExpression {\n\t\treturn new ImportExpression(\n\t\t\tdeserializer(node.source) as Literal<string>,\n\t\t\t(node.attributes && deserializer(node.attributes)) || undefined,\n\t\t\tnode.range,\n\t\t\tnode.loc\n\t\t);\n\t}\n\tstatic visit(node: ImportExpression, visitNode: VisitNodeType): void {\n\t\tvisitNode(node.source);\n\t\tnode.attributes && visitNode(node.attributes);\n\t}\n\tconstructor(\n\t\tprivate source: Literal<string>,\n\t\tprivate attributes?: ExpressionNode,\n\t\trange?: [number, number],\n\t\tloc?: SourceLocation) {\n\t\tsuper(range, loc);\n\t}\n\tgetSource() {\n\t\treturn this.source;\n\t}\n\tset(stack: Stack) {\n\t\tthrow new Error(`ImportDeclaration.#set() has no implementation.`);\n\t}\n\tget(stack: Stack): Promise<ModuleScope> {\n\t\tlet importCallOptions: ImportCallOptions | undefined;\n\t\tif (this.attributes) {\n\t\t\timportCallOptions = this.attributes.get(stack);\n\t\t}\n\t\tconst module = stack.importModule(this.source.get(), importCallOptions);\n\t\treturn Promise.resolve(module);\n\t}\n\tdependency(computed?: true): ExpressionNode[] {\n\t\treturn [];\n\t}\n\tdependencyPath(computed?: true): ExpressionEventPath[] {\n\t\treturn [];\n\t}\n\ttoString(): string {\n\t\treturn `import(${this.source.toString()}${this.attributes ? `, ${this.attributes.toString()}` : ''})`;\n\t}\n\ttoJson(): object {\n\t\treturn {\n\t\t\tsource: this.source.toJSON(),\n\t\t};\n\t}\n}\n"]}
@@ -23,12 +23,12 @@ export declare class VariableDeclarator extends AbstractExpressionNode implement
23
23
  }
24
24
  export declare class VariableDeclarationNode extends AbstractExpressionNode implements DeclarationExpression {
25
25
  protected declarations: VariableDeclarator[];
26
- protected kind: 'var' | 'let' | 'const';
26
+ protected kind: 'var' | 'let' | 'const' | 'using' | 'await using';
27
27
  static fromJSON(node: VariableDeclarationNode, deserializer: NodeDeserializer): VariableDeclarationNode;
28
28
  static visit(node: VariableDeclarationNode, visitNode: VisitNodeType): void;
29
- constructor(declarations: VariableDeclarator[], kind: 'var' | 'let' | 'const', range?: [number, number], loc?: SourceLocation);
29
+ constructor(declarations: VariableDeclarator[], kind: 'var' | 'let' | 'const' | 'using' | 'await using', range?: [number, number], loc?: SourceLocation);
30
30
  getDeclarations(): VariableDeclarator[];
31
- getKind(): "var" | "let" | "const";
31
+ getKind(): "var" | "let" | "const" | "using" | "await using";
32
32
  set(stack: Stack, value: any): void;
33
33
  get(stack: Stack): void;
34
34
  getDeclarationName(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"declares.d.ts","sourceRoot":"","sources":["../../../../../src/expressions/api/statement/declarations/declares.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,gBAAgB,EAAE,cAAc,EAAE,qBAAqB,EACvD,mBAAmB,EAAE,aAAa,EAAE,cAAc,EAClD,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAgB,MAAM,mBAAmB,CAAC;AAGzE,qBACa,kBAAmB,SAAQ,sBAAuB,YAAW,qBAAqB;IActF,EAAE,EAAE,qBAAqB;IACzB,IAAI,CAAC,EAAE,cAAc;IAd7B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,GAAG,kBAAkB;IAQ7F,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,kBAAkB,EAAE,SAAS,EAAE,aAAa,GAAG,IAAI;gBAK9D,EAAE,EAAE,qBAAqB,EACzB,IAAI,CAAC,EAAE,cAAc,YAAA,EAC5B,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EACxB,GAAG,CAAC,EAAE,cAAc;IAGrB,KAAK;IAGL,OAAO;IAGP,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG;IAG5B,GAAG,CAAC,KAAK,EAAE,KAAK;I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