javascript-obfuscator
Version:
JavaScript obfuscator
670 lines (634 loc) • 1.2 MB
JavaScript
/*! For license information please see index_debug.js.LICENSE.txt */
require("source-map-support").install(), (() => {
"use strict";
var e = {
128: (e, t) => {
var r;
Object.defineProperty(t, "__esModule", { value: !0 }), t.LoggingMessage = void 0, function (e) {
e.EmptySourceCode = "Empty source code. Obfuscation canceled...", e.ObfuscationCompleted = "Obfuscation completed. Total time: %s sec.", e.ObfuscationStarted = "Obfuscation started...", e.RandomGeneratorSeed = "Random generator seed: %s...", e.CodeTransformationStage = "Code transformation stage: %s...", e.NodeTransformationStage = "AST transformation stage: %s...", e.Version = "Version: %s"
}(r || (t.LoggingMessage = r = {}))
}, 605: (e, t) => {
Object.defineProperty(t, "__esModule", { value: !0 }), t.StringArrayCallsTransformThresholdRule = void 0, t.StringArrayCallsTransformThresholdRule = e => (0 === e.stringArrayCallsTransformThreshold && (e = {
...e,
stringArrayCallsTransform: !1,
stringArrayCallsTransformThreshold: 0
}), e)
}, 677: function (e, t, r) {
var o, n, i, a, s = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, c = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, l = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.BlockStatementControlFlowFlatteningNode = void 0;
const d = r(45337), p = r(31391), u = r(18741), f = r(52849), m = r(39032), g = r(76393), h = r(31142),
y = r(50164), S = r(8053), N = r(93571), b = r(27391), _ = r(33056);
let v = class extends S.AbstractCustomNode {
constructor(e, t, r, o) {
super(e, t, r, o)
}
initialize(e, t, r) {
this.blockStatementBody = e, this.shuffledKeys = t, this.originalKeysIndexesInShuffledArray = r
}
getNodeStructure() {
const e = this.randomGenerator.getRandomString(6), t = this.randomGenerator.getRandomString(6),
r = N.NodeFactory.blockStatementNode([N.NodeFactory.variableDeclarationNode([N.NodeFactory.variableDeclaratorNode(N.NodeFactory.identifierNode(e), N.NodeFactory.callExpressionNode(N.NodeFactory.memberExpressionNode(N.NodeFactory.literalNode(this.originalKeysIndexesInShuffledArray.join(f.StringSeparator.VerticalLine)), N.NodeFactory.identifierNode("split")), [N.NodeFactory.literalNode(f.StringSeparator.VerticalLine)]))], "const"), N.NodeFactory.variableDeclarationNode([N.NodeFactory.variableDeclaratorNode(N.NodeFactory.identifierNode(t), N.NodeFactory.literalNode(0))], "let"), N.NodeFactory.whileStatementNode(N.NodeFactory.literalNode(!0), N.NodeFactory.blockStatementNode([N.NodeFactory.switchStatementNode(N.NodeFactory.memberExpressionNode(N.NodeFactory.identifierNode(e), N.NodeFactory.updateExpressionNode("++", N.NodeFactory.identifierNode(t)), !0), this.shuffledKeys.map((e, t) => {
const r = this.blockStatementBody[e], o = [r];
return b.NodeGuards.isReturnStatementNode(r) || o.push(N.NodeFactory.continueStatement()), N.NodeFactory.switchCaseNode(N.NodeFactory.literalNode(String(t)), o)
})), N.NodeFactory.breakStatement()]))]);
return _.NodeUtils.parentizeAst(r), [r]
}
};
t.BlockStatementControlFlowFlatteningNode = v, s([(0, y.initializable)(), c("design:type", Array)], v.prototype, "blockStatementBody", void 0), s([(0, y.initializable)(), c("design:type", Array)], v.prototype, "originalKeysIndexesInShuffledArray", void 0), s([(0, y.initializable)(), c("design:type", Array)], v.prototype, "shuffledKeys", void 0), t.BlockStatementControlFlowFlatteningNode = v = s([(0, d.injectable)(), l(0, (0, d.inject)(p.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)), l(1, (0, d.inject)(p.ServiceIdentifiers.ICustomCodeHelperFormatter)), l(2, (0, d.inject)(p.ServiceIdentifiers.IRandomGenerator)), l(3, (0, d.inject)(p.ServiceIdentifiers.IOptions)), c("design:paramtypes", ["function" == typeof (o = void 0 !== u.TIdentifierNamesGeneratorFactory && u.TIdentifierNamesGeneratorFactory) ? o : Object, "function" == typeof (n = void 0 !== m.ICustomCodeHelperFormatter && m.ICustomCodeHelperFormatter) ? n : Object, "function" == typeof (i = void 0 !== h.IRandomGenerator && h.IRandomGenerator) ? i : Object, "function" == typeof (a = void 0 !== g.IOptions && g.IOptions) ? a : Object])], v)
}, 900: (e, t) => {
Object.defineProperty(t, "__esModule", { value: !0 }), t.SeedRule = void 0, t.SeedRule = e => e.seed ? {
...e,
seed: e.seed
} : { ...e, seed: Math.floor(1e9 * Math.random() + 0) }
}, 928: (e, t) => {
var r;
Object.defineProperty(t, "__esModule", { value: !0 }), t.StringArrayCustomNode = void 0, function (e) {
e.StringArrayCallNode = "StringArrayCallNode", e.StringArrayScopeCallsWrapperFunctionNode = "StringArrayScopeCallsWrapperFunctionNode", e.StringArrayScopeCallsWrapperVariableNode = "StringArrayScopeCallsWrapperVariableNode"
}(r || (t.StringArrayCustomNode = r = {}))
}, 1322: function (e, t, r) {
var o, n, i, a, s, c, l, d, p, u = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, f = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, m = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.StringArrayScopeCallsWrapperFunctionNode = void 0;
const g = r(45337), h = r(31391), y = r(18741), S = r(46293), N = r(26906), b = r(39032), _ = r(76393),
v = r(31142), I = r(70475), O = r(28523), C = r(50164), E = r(43382), T = r(93571), R = r(33056);
let M = class extends E.AbstractStringArrayCallNode {
constructor(e, t, r, o, n, i, a) {
super(e, t, r, o, n, i, a)
}
initialize(e, t) {
this.stringArrayScopeCallsWrapperData = e, this.upperStringArrayCallsWrapperData = t
}
getNodeStructure() {
var e, t, r, o, n, i, a, s;
const c = T.NodeFactory.identifierNode(this.randomGenerator.getRandomString(6)),
l = T.NodeFactory.identifierNode(this.randomGenerator.getRandomString(6)),
d = this.getUpperStringArrayCallNode(c, this.getStringArrayIndexNode(this.stringArrayScopeCallsWrapperData.index - this.upperStringArrayCallsWrapperData.index)),
p = this.arrayUtils.fillWithRange(this.stringArrayScopeCallsWrapperData.parameterIndexesData ? this.options.stringArrayWrappersParametersMaxCount : E.AbstractStringArrayCallNode.stringArrayRootCallsWrapperParametersCount, () => this.getFakeParameterNode());
p.splice(null !== (t = null === (e = this.stringArrayScopeCallsWrapperData.parameterIndexesData) || void 0 === e ? void 0 : e.valueIndexParameterIndex) && void 0 !== t ? t : 0, 1, c), p.splice(null !== (o = null === (r = this.stringArrayScopeCallsWrapperData.parameterIndexesData) || void 0 === r ? void 0 : r.decodeKeyParameterIndex) && void 0 !== o ? o : 1, 1, l);
const u = this.arrayUtils.fillWithRange(this.upperStringArrayCallsWrapperData.parameterIndexesData ? this.options.stringArrayWrappersParametersMaxCount : E.AbstractStringArrayCallNode.stringArrayRootCallsWrapperParametersCount, e => this.getUpperStringArrayCallNode(p[e], this.getFakeUpperStringArrayIndexNode()));
u.splice(null !== (i = null === (n = this.upperStringArrayCallsWrapperData.parameterIndexesData) || void 0 === n ? void 0 : n.valueIndexParameterIndex) && void 0 !== i ? i : 0, 1, d), u.splice(null !== (s = null === (a = this.upperStringArrayCallsWrapperData.parameterIndexesData) || void 0 === a ? void 0 : a.decodeKeyParameterIndex) && void 0 !== s ? s : 1, 1, l);
const f = T.NodeFactory.functionDeclarationNode(this.stringArrayScopeCallsWrapperData.name, p, T.NodeFactory.blockStatementNode([T.NodeFactory.returnStatementNode(T.NodeFactory.callExpressionNode(T.NodeFactory.identifierNode(this.upperStringArrayCallsWrapperData.name), u))])),
m = f;
R.NodeUtils.parentizeAst(m);
for (const e of p) e.name = this.identifierNamesGenerator.generateForLexicalScope(f);
return [m]
}
getUpperStringArrayCallNode(e, t) {
return T.NodeFactory.binaryExpressionNode("-", e, t)
}
getFakeParameterNode() {
return T.NodeFactory.identifierNode(this.randomGenerator.getRandomString(6))
}
getFakeUpperStringArrayIndexNode() {
return this.getStringArrayIndexNode(this.randomGenerator.getRandomInteger(0, 500))
}
};
t.StringArrayScopeCallsWrapperFunctionNode = M, u([(0, C.initializable)(), f("design:type", "function" == typeof (d = void 0 !== I.IStringArrayScopeCallsWrapperData && I.IStringArrayScopeCallsWrapperData) ? d : Object)], M.prototype, "upperStringArrayCallsWrapperData", void 0), u([(0, C.initializable)(), f("design:type", "function" == typeof (p = void 0 !== I.IStringArrayScopeCallsWrapperData && I.IStringArrayScopeCallsWrapperData) ? p : Object)], M.prototype, "stringArrayScopeCallsWrapperData", void 0), t.StringArrayScopeCallsWrapperFunctionNode = M = u([(0, g.injectable)(), m(0, (0, g.inject)(h.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)), m(1, (0, g.inject)(h.ServiceIdentifiers.Factory__IStringArrayIndexNode)), m(2, (0, g.inject)(h.ServiceIdentifiers.ICustomCodeHelperFormatter)), m(3, (0, g.inject)(h.ServiceIdentifiers.IStringArrayStorage)), m(4, (0, g.inject)(h.ServiceIdentifiers.IArrayUtils)), m(5, (0, g.inject)(h.ServiceIdentifiers.IRandomGenerator)), m(6, (0, g.inject)(h.ServiceIdentifiers.IOptions)), f("design:paramtypes", ["function" == typeof (o = void 0 !== y.TIdentifierNamesGeneratorFactory && y.TIdentifierNamesGeneratorFactory) ? o : Object, "function" == typeof (n = void 0 !== S.TStringArrayIndexNodeFactory && S.TStringArrayIndexNodeFactory) ? n : Object, "function" == typeof (i = void 0 !== b.ICustomCodeHelperFormatter && b.ICustomCodeHelperFormatter) ? i : Object, "function" == typeof (a = void 0 !== O.IStringArrayStorage && O.IStringArrayStorage) ? a : Object, "function" == typeof (s = void 0 !== N.IArrayUtils && N.IArrayUtils) ? s : Object, "function" == typeof (c = void 0 !== v.IRandomGenerator && v.IRandomGenerator) ? c : Object, "function" == typeof (l = void 0 !== _.IOptions && _.IOptions) ? l : Object])], M)
}, 1561: (e, t) => {
Object.defineProperty(t, "__esModule", { value: !0 })
}, 1851: function (e, t, r) {
var o, n, i = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, a = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, s = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.ParentificationTransformer = void 0;
const c = r(45337), l = r(31391), d = r(76393), p = r(31142), u = r(75716), f = r(13245), m = r(33056);
let g = class extends f.AbstractNodeTransformer {
constructor(e, t) {
super(e, t)
}
getVisitor(e) {
return e === u.NodeTransformationStage.Preparing ? { enter: (e, t) => this.transformNode(e, t) } : null
}
transformNode(e, t) {
return m.NodeUtils.parentizeNode(e, t)
}
};
t.ParentificationTransformer = g, t.ParentificationTransformer = g = i([(0, c.injectable)(), s(0, (0, c.inject)(l.ServiceIdentifiers.IRandomGenerator)), s(1, (0, c.inject)(l.ServiceIdentifiers.IOptions)), a("design:paramtypes", ["function" == typeof (o = void 0 !== p.IRandomGenerator && p.IRandomGenerator) ? o : Object, "function" == typeof (n = void 0 !== d.IOptions && d.IOptions) ? n : Object])], g)
}, 1896: function (e, t, r) {
var o, n, i = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, a = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.VMDeclarationCompiler = void 0;
const s = r(45337), c = r(20924), l = r(94487), d = r(31391), p = r(27391), u = r(59805);
let f = class {
compileVariableDeclaration(e, t) {
var r, o, n, i, a, s, c, l, d;
const f = this.vmCompilerUtils.createInstructionBuilder(t);
for (const m of e.declarations) if (p.NodeGuards.isIdentifierNode(m.id)) {
const l = m.id.name, d = "let" === e.kind || "const" === e.kind;
let p, g, h = !1;
const y = !d && t.parameters.has(l);
if (d ? (p = (0, u.getScopedVariableName)(l, t.blockScopeDepth), g = this.vmCompilerUtils.getNextLocalIndex(t)) : y ? (g = t.parameters.get(l), p = l, h = !0) : (p = l, t.localVariables.has(p) ? (g = t.localVariables.get(p), h = !0) : (g = t.localVariables.size, t.localVariables.set(p, g))), m.init) null === (r = t.dispatch) || void 0 === r || r.expression(m.init); else {
if (h) continue;
f.pushUndefined()
}
d && (t.variableScopes.set(p, {
depth: t.blockScopeDepth,
index: g
}), t.localVariables.set(p, g), null === (o = t.activeBlockScopes) || void 0 === o || o.add(p));
let S = !1;
if ((null === (n = t.perIterationLoopVars) || void 0 === n ? void 0 : n.has(l)) && t.blockScopeDepth > 1) {
for (let e = t.blockScopeDepth - 1; e >= 0; e--) {
const r = (0, u.getScopedVariableName)(l, e);
if (t.variableScopes.has(r) || t.localVariables.has(r) || 0 === e && t.localVariables.has(l)) {
S = !0;
break
}
}
!S && t.envVars.has(l) && t.parameters.has(l) && (S = !0)
}
const N = null !== (a = null === (i = t.perIterationLoopVars) || void 0 === i ? void 0 : i.has(l)) && void 0 !== a && a && !S;
N && d && (t.perIterationVarScopedKeys || (t.perIterationVarScopedKeys = new Set), t.perIterationVarScopedKeys.add(p));
let b = !1;
if (1 === t.blockScopeDepth && 1 === t.envDepth) {
const e = (0, u.getScopedVariableName)(l, 0);
(t.variableScopes.has(e) || t.variableScopes.has(l)) && t.envVars.has(l) && (b = !0)
}
const _ = d && (t.blockScopeDepth > 1 || b) && !N ? p : l;
if ((l !== t.functionName || d) && (t.envVars.has(_) || !S && t.envVars.has(l) || N && null !== (c = null === (s = t.perIterationLoopVars) || void 0 === s ? void 0 : s.has(l)) && void 0 !== c && c)) {
const r = t.constantPool.add(_), o = "const" === e.kind;
t.envDepth > 0 && d ? o ? f.storeToCurrentEnvConst(r) : f.storeToCurrentEnv(r) : o ? f.storeToEnvConst(r) : d ? f.storeToCurrentEnv(r) : f.storeToEnv(r)
} else if (y) f.storeArg(g); else {
const r = this.vmCompilerUtils.getActualLocalIndex(g, t);
f.storeLocal(r), "const" === e.kind && t.constLocalVariables.add(r)
}
d && this.scopeManager.exitLocalTDZ(t, l)
} else if (p.NodeGuards.isArrayPatternNode(m.id) || p.NodeGuards.isObjectPatternNode(m.id)) {
m.init ? null === (l = t.dispatch) || void 0 === l || l.expression(m.init) : f.pushUndefined();
const r = t._declarationKind;
t._declarationKind = e.kind, null === (d = t.dispatch) || void 0 === d || d.destructuring(m.id, !1), t._declarationKind = r, "let" !== e.kind && "const" !== e.kind || this.vmCompilerUtils.extractIdentifiersFromPattern(m.id).forEach(e => {
this.scopeManager.exitLocalTDZ(t, e)
})
}
}
compileFunctionDeclaration(e, t) {
var r, o;
if (!e.id) return;
const n = e.id.name;
if (0 === t.blockScopeDepth && t.hoistedFunctionDeclarations.has(n)) return;
const i = t.blockScopeDepth > 0, a = i ? (0, u.getScopedVariableName)(n, t.blockScopeDepth) : n;
let s;
t.localVariables.has(a) ? s = t.localVariables.get(a) : (s = t.localVariables.size, t.localVariables.set(a, s), i && (t.variableScopes.set(a, {
depth: t.blockScopeDepth,
index: s
}), null === (r = t.activeBlockScopes) || void 0 === r || r.add(a))), null === (o = t.dispatch) || void 0 === o || o.functionExpression(e);
const c = t.envVars.has(n), l = this.vmCompilerUtils.createInstructionBuilder(t);
if (c) {
const e = this.vmCompilerUtils.getActualLocalIndex(s, t);
l.dup(), l.storeLocal(e);
const r = t.constantPool.add(n);
l.storeToCurrentEnv(r)
} else {
const e = this.vmCompilerUtils.getActualLocalIndex(s, t);
l.storeLocal(e)
}
}
};
t.VMDeclarationCompiler = f, i([(0, s.inject)(d.ServiceIdentifiers.IVMCompilerUtils), a("design:type", "function" == typeof (o = void 0 !== c.IVMCompilerUtils && c.IVMCompilerUtils) ? o : Object)], f.prototype, "vmCompilerUtils", void 0), i([(0, s.inject)(d.ServiceIdentifiers.IVMScopeManager), a("design:type", "function" == typeof (n = void 0 !== l.IVMScopeManager && l.IVMScopeManager) ? n : Object)], f.prototype, "scopeManager", void 0), t.VMDeclarationCompiler = f = i([(0, s.injectable)()], f)
}, 2396: function (e, t, r) {
var o, n, i = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, a = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, s = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.CodeTransformersRunner = void 0;
const c = r(45337), l = r(31391), d = r(28031), p = r(44966);
let u = class {
constructor(e, t) {
this.codeTransformerFactory = e, this.codeTransformerNamesGroupsBuilder = t
}
transform(e, t, r) {
if (!t.length) return e;
const o = this.buildNormalizedCodeTransformers(t, r), n = this.codeTransformerNamesGroupsBuilder.build(o);
for (const t of n) for (const n of t) e = o[n].transformCode(e, r);
return e
}
buildNormalizedCodeTransformers(e, t) {
return e.reduce((e, t) => {
const r = this.codeTransformerFactory(t);
return { ...e, [t]: r }
}, {})
}
};
t.CodeTransformersRunner = u, t.CodeTransformersRunner = u = i([(0, c.injectable)(), s(0, (0, c.inject)(l.ServiceIdentifiers.Factory__ICodeTransformer)), s(1, (0, c.inject)(l.ServiceIdentifiers.ICodeTransformerNamesGroupsBuilder)), a("design:paramtypes", ["function" == typeof (o = void 0 !== d.TCodeTransformerFactory && d.TCodeTransformerFactory) ? o : Object, "function" == typeof (n = void 0 !== p.ITransformerNamesGroupsBuilder && p.ITransformerNamesGroupsBuilder) ? n : Object])], u)
}, 2566: function (e, t, r) {
var o, n, i, a, s, c, l, d, p, u = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, f = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, m = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.StringArrayScopeCallsWrapperVariableNode = void 0;
const g = r(45337), h = r(31391), y = r(18741), S = r(46293), N = r(26906), b = r(39032), _ = r(76393),
v = r(31142), I = r(70475), O = r(28523), C = r(50164), E = r(43382), T = r(93571), R = r(33056);
let M = class extends E.AbstractStringArrayCallNode {
constructor(e, t, r, o, n, i, a) {
super(e, t, r, o, n, i, a)
}
initialize(e, t) {
this.stringArrayScopeCallsWrapperData = e, this.stringArrayCallsWrapperData = t
}
getNodeStructure() {
const e = T.NodeFactory.variableDeclarationNode([T.NodeFactory.variableDeclaratorNode(T.NodeFactory.identifierNode(this.stringArrayScopeCallsWrapperData.name), T.NodeFactory.identifierNode(this.stringArrayCallsWrapperData.name))], "const");
return R.NodeUtils.parentizeAst(e), [e]
}
};
t.StringArrayScopeCallsWrapperVariableNode = M, u([(0, C.initializable)(), f("design:type", "function" == typeof (d = void 0 !== I.IStringArrayScopeCallsWrapperData && I.IStringArrayScopeCallsWrapperData) ? d : Object)], M.prototype, "stringArrayCallsWrapperData", void 0), u([(0, C.initializable)(), f("design:type", "function" == typeof (p = void 0 !== I.IStringArrayScopeCallsWrapperData && I.IStringArrayScopeCallsWrapperData) ? p : Object)], M.prototype, "stringArrayScopeCallsWrapperData", void 0), t.StringArrayScopeCallsWrapperVariableNode = M = u([(0, g.injectable)(), m(0, (0, g.inject)(h.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)), m(1, (0, g.inject)(h.ServiceIdentifiers.Factory__IStringArrayIndexNode)), m(2, (0, g.inject)(h.ServiceIdentifiers.ICustomCodeHelperFormatter)), m(3, (0, g.inject)(h.ServiceIdentifiers.IStringArrayStorage)), m(4, (0, g.inject)(h.ServiceIdentifiers.IArrayUtils)), m(5, (0, g.inject)(h.ServiceIdentifiers.IRandomGenerator)), m(6, (0, g.inject)(h.ServiceIdentifiers.IOptions)), f("design:paramtypes", ["function" == typeof (o = void 0 !== y.TIdentifierNamesGeneratorFactory && y.TIdentifierNamesGeneratorFactory) ? o : Object, "function" == typeof (n = void 0 !== S.TStringArrayIndexNodeFactory && S.TStringArrayIndexNodeFactory) ? n : Object, "function" == typeof (i = void 0 !== b.ICustomCodeHelperFormatter && b.ICustomCodeHelperFormatter) ? i : Object, "function" == typeof (a = void 0 !== O.IStringArrayStorage && O.IStringArrayStorage) ? a : Object, "function" == typeof (s = void 0 !== N.IArrayUtils && N.IArrayUtils) ? s : Object, "function" == typeof (c = void 0 !== v.IRandomGenerator && v.IRandomGenerator) ? c : Object, "function" == typeof (l = void 0 !== _.IOptions && _.IOptions) ? l : Object])], M)
}, 2784: (e, t) => {
Object.defineProperty(t, "__esModule", { value: !0 })
}, 2878: function (e, t, r) {
var o, n, i, a, s = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, c = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, l = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.VMLoopCompiler = void 0;
const d = r(45337), p = r(20924), u = r(94487), f = r(2784), m = r(46725), g = r(31391), h = r(27391),
y = r(59805);
let S = class {
constructor(e, t, r, o) {
this.vmCompilerUtils = e, this.scopeManager = t, this.destructuringCompiler = r, this.variableCollector = o
}
compileWhileStatement(e, t) {
var r, o;
const n = this.vmCompilerUtils.createInstructionBuilder(t), i = t.instructions.length;
null === (r = t.dispatch) || void 0 === r || r.expression(e.test);
const a = n.jumpIfFalse(), s = a.getIndex();
t.breakTargets.push(s), this.scopeManager.pushBreakEnvDepth(t), t.continueTargets.push(i), this.scopeManager.pushContinueEnvDepth(t), t.currentLabel && (t.labelContinueTargets.set(t.currentLabel, i), t.currentLabel = null), null === (o = t.dispatch) || void 0 === o || o.statement(e.body), n.jump().patchTo(i);
const c = t.instructions.length;
a.patchTo(c), this.vmCompilerUtils.patchLoopBreakStatements(s, c, t), t.breakTargets.pop(), this.scopeManager.popBreakEnvDepth(t), t.continueTargets.pop(), this.scopeManager.popContinueEnvDepth(t)
}
compileDoWhileStatement(e, t) {
var r, o;
const n = this.vmCompilerUtils.createInstructionBuilder(t), i = t.instructions.length,
a = t.instructions.length;
t.breakTargets.push(a), this.scopeManager.pushBreakEnvDepth(t);
const s = -(a + 1);
t.continueTargets.push(s), this.scopeManager.pushContinueEnvDepth(t), t.currentLabel && (t.labelContinueTargets.set(t.currentLabel, s), t.currentLabel = null), null === (r = t.dispatch) || void 0 === r || r.statement(e.body);
const c = t.instructions.length;
null === (o = t.dispatch) || void 0 === o || o.expression(e.test), n.jumpIfTrue().patchTo(i);
const l = t.instructions.length;
this.vmCompilerUtils.patchLoopBreakStatements(a, l, t), this.vmCompilerUtils.patchJumpTargets(i, l - 1, s, c, t), t.breakTargets.pop(), this.scopeManager.popBreakEnvDepth(t), t.continueTargets.pop(), this.scopeManager.popContinueEnvDepth(t)
}
compileForStatement(e, t) {
var r, o, n, i, a, s, c;
const l = this.vmCompilerUtils.createInstructionBuilder(t), d = [];
let p = !1, u = !1, f = !1;
if (e.init && h.NodeGuards.isVariableDeclarationNode(e.init) && ("let" === e.init.kind || "const" === e.init.kind)) {
u = !0;
for (const o of e.init.declarations) if (h.NodeGuards.isIdentifierNode(o.id)) {
const n = o.id.name;
this.vmCompilerUtils.containsFunction(e.body) && (p = !0, d.push(n), (null !== (r = t.parentContext && this.vmCompilerUtils.isDeclaredInParentScope(n, t.parentContext)) && void 0 !== r ? r : t.envVars.has(n)) ? (t.envVars.add(n), f = !0) : t.envVars.add(n), t.perIterationLoopVars || (t.perIterationLoopVars = new Set), t.perIterationLoopVars.add(n))
}
}
let m = null;
if (u && (m = this.scopeManager.enterBlock(t)), f && (l.getEnv(), l.createEnv(), t.envDepth++), e.init) if (h.NodeGuards.isVariableDeclarationNode(e.init)) {
if (u && m && ("let" === e.init.kind || "const" === e.init.kind)) for (const r of e.init.declarations) if (h.NodeGuards.isIdentifierNode(r.id)) {
const e = r.id.name, n = (0, y.getScopedVariableName)(e, t.blockScopeDepth);
this.scopeManager.trackBlockVariable(m, n), null === (o = t.activeBlockScopes) || void 0 === o || o.add(n)
}
null === (n = t.dispatch) || void 0 === n || n.statement(e.init)
} else null === (i = t.dispatch) || void 0 === i || i.expression(e.init), l.pop();
const g = t.instructions.length;
let S = null;
if (e.test) {
null === (a = t.dispatch) || void 0 === a || a.expression(e.test);
const r = l.jumpIfFalse(), o = r.getIndex();
r.patchTo(0), t.breakTargets.push(o), this.scopeManager.pushBreakEnvDepth(t), S = o
} else S = g, t.breakTargets.push(S), this.scopeManager.pushBreakEnvDepth(t);
if (p) {
l.getEnv(), l.createEnv(), t.envDepth++;
for (const e of d) l.loadFromEnvByName(e), l.storeToCurrentEnvByName(e)
}
const N = t.instructions.length;
t.continueTargets.push(N), this.scopeManager.pushContinueEnvDepth(t), t.currentLabel && (t.labelContinueTargets.set(t.currentLabel, N), t.currentLabel = null), null === (s = t.dispatch) || void 0 === s || s.statement(e.body), p && (l.restoreParentEnv(), t.envDepth--);
const b = t.instructions.length;
e.update && (null === (c = t.dispatch) || void 0 === c || c.expression(e.update), l.pop()), l.jump().patchTo(g);
const _ = t.instructions.length;
this.patchForLoopTargets(S, N, b, _, t), t.continueTargets.pop(), this.scopeManager.popContinueEnvDepth(t), f && (l.restoreParentEnv(), t.envDepth--), m && this.scopeManager.exitBlockWithHandle(t, m)
}
compileForOfStatement(e, t) {
var r, o;
const n = this.vmCompilerUtils.createInstructionBuilder(t);
null === (r = t.dispatch) || void 0 === r || r.expression(e.right), n.getIterator();
const { actualIndex: i } = this.vmCompilerUtils.createTempLocal(`__forof_iterator_${t.localVariables.size}`, t);
n.storeLocal(i), n.pop();
const a = this.analyzeIterableLoopVariable(e, t), s = t.instructions.length;
n.loadLocal(i), n.iteratorNext(), n.dup(), n.iteratorDone();
const c = n.jumpIfTrue(), l = c.getIndex(), d = t.instructions.length;
this.pushLoopTargets(l, d, t), a.needsNewEnv && this.enterIterationEnv(n, t), n.getProp("value"), this.storeSimpleLoopVariable(a, n, t) || (a.loopDestructuringPattern ? this.handleDestructuringLoopVariable(a, t) : n.pop());
const p = this.setupLoopVarEnvTracking(a, t);
null === (o = t.dispatch) || void 0 === o || o.statement(e.body), this.cleanupLoopVarEnvTracking(a, p, t), a.needsNewEnv && this.exitIterationEnv(n, t);
const u = t.instructions.length;
n.jump().patchTo(s);
const f = t.instructions.length;
n.pop();
const m = t.instructions.length;
c.patchTo(f), this.vmCompilerUtils.patchJumpTargets(d, f - 1, d, u, t), this.vmCompilerUtils.patchJumpTargets(d, f - 1, l, m, t), this.popLoopTargets(t)
}
compileForInStatement(e, t) {
var r, o;
const n = this.vmCompilerUtils.createInstructionBuilder(t);
null === (r = t.dispatch) || void 0 === r || r.expression(e.right), n.emitStaticMethodCall("Object", "keys", 1);
const { actualIndex: i } = this.vmCompilerUtils.createTempLocal(`__forin_keys_${t.localVariables.size}`, t);
n.storeLocal(i), n.pop();
const { actualIndex: a } = this.vmCompilerUtils.createTempLocal(`__forin_counter_${t.localVariables.size}`, t);
n.loadConst(0), n.storeLocal(a), n.pop();
const s = this.analyzeIterableLoopVariable(e, t), c = t.instructions.length;
n.loadLocal(a), n.loadLocal(i), n.getProp("length"), n.lessThan();
const l = n.jumpIfFalse(), d = l.getIndex(), p = t.instructions.length;
this.pushLoopTargets(d, p, t), s.needsNewEnv && this.enterIterationEnv(n, t), n.loadLocal(i), n.loadLocal(a), n.getComputed(), this.storeSimpleLoopVariable(s, n, t) || (s.loopDestructuringPattern ? this.handleDestructuringLoopVariable(s, t) : n.pop());
const u = this.setupLoopVarEnvTracking(s, t);
null === (o = t.dispatch) || void 0 === o || o.statement(e.body), this.cleanupLoopVarEnvTracking(s, u, t), s.needsNewEnv && this.exitIterationEnv(n, t);
const f = t.instructions.length;
this.emitCounterIncrement(a, n), n.jump().patchTo(c);
const m = t.instructions.length;
l.patchToHere(), this.vmCompilerUtils.patchJumpTargets(p, m - 1, p, f, t), this.popLoopTargets(t)
}
patchForLoopTargets(e, t, r, o, n) {
if (null !== e && n.breakTargets.length > 0) {
const e = n.breakTargets.pop();
this.scopeManager.popBreakEnvDepth(n), void 0 !== e && (n.instructions[e].target = o, this.vmCompilerUtils.patchJumpTargets(e, o - 1, e, o, n))
}
this.vmCompilerUtils.patchJumpTargets(t, o - 1, t, r, n)
}
pushLoopTargets(e, t, r) {
r.breakTargets.push(e), this.scopeManager.pushBreakEnvDepth(r), r.continueTargets.push(t), this.scopeManager.pushContinueEnvDepth(r), r.currentLabel && (r.labelContinueTargets.set(r.currentLabel, t), r.currentLabel = null)
}
popLoopTargets(e) {
e.breakTargets.pop(), this.scopeManager.popBreakEnvDepth(e), e.continueTargets.pop(), this.scopeManager.popContinueEnvDepth(e)
}
enterIterationEnv(e, t) {
e.getEnv(), e.createEnv(), t.envDepth++
}
exitIterationEnv(e, t) {
e.restoreParentEnv(), t.envDepth--
}
emitCounterIncrement(e, t) {
t.loadLocal(e), t.loadConst(1), t.add(), t.storeLocal(e), t.pop()
}
analyzeIterableLoopVariable(e, t) {
let r = null, o = null, n = null, i = !1, a = !1, s = "var";
if (h.NodeGuards.isVariableDeclarationNode(e.left)) {
i = "let" === e.left.kind || "const" === e.left.kind, s = e.left.kind;
const c = e.left.declarations[0];
if (c) if (h.NodeGuards.isIdentifierNode(c.id)) r = c.id.name, this.scopeManager.checkShadowing(t, r, {
variableKind: "loop",
hasBlockScopedDecl: i
}).shadows ? a = !0 : t.localVariables.has(r) ? o = t.localVariables.get(r) : (o = t.localVariables.size, t.localVariables.set(r, o)); else if ((h.NodeGuards.isArrayPatternNode(c.id) || h.NodeGuards.isObjectPatternNode(c.id)) && (n = c.id, i)) {
const e = new Set;
this.variableCollector.collectFromPattern(c.id, e);
for (const r of e) if (this.scopeManager.checkShadowing(t, r, {
variableKind: "loop",
hasBlockScopedDecl: !0
}).shadows) {
a = !0;
break
}
}
}
return {
loopVarName: r,
loopVarLocalIndex: o,
loopDestructuringPattern: n,
hasBlockScopedLoopVar: i,
needsNewEnv: a,
declarationKind: s
}
}
storeSimpleLoopVariable(e, t, r) {
if (!e.loopVarName) return !1;
if (e.needsNewEnv) {
const o = r.constantPool.add(e.loopVarName);
return "const" === e.declarationKind ? t.storeToCurrentEnvConst(o) : t.storeToCurrentEnv(o), !0
}
if (null !== e.loopVarLocalIndex) {
const o = this.vmCompilerUtils.getActualLocalIndex(e.loopVarLocalIndex, r);
return t.storeLocal(o), t.pop(), !0
}
return !1
}
handleDestructuringLoopVariable(e, t) {
if (e.loopDestructuringPattern) if (e.needsNewEnv && e.hasBlockScopedLoopVar) {
const r = new Set;
this.variableCollector.collectFromPattern(e.loopDestructuringPattern, r);
const o = Array.from(r), n = [];
for (const e of o) t.envVars.has(e) || (t.envVars.add(e), n.push(e));
t.perIterationLoopVars || (t.perIterationLoopVars = new Set);
for (const e of o) t.perIterationLoopVars.add(e);
const i = [];
if (t.activeBlockScopes) for (const e of o) for (let r = t.blockScopeDepth; r >= 0; r--) {
const o = (0, y.getScopedVariableName)(e, r);
t.activeBlockScopes.has(o) && (t.activeBlockScopes.delete(o), i.push(o))
}
void 0 !== t._removedFromActiveBlockScopes && (t._previousRemovedFromActiveBlockScopes = t._removedFromActiveBlockScopes), t._removedFromActiveBlockScopes = i;
const a = t._declarationKind;
t._declarationKind = e.declarationKind;
const s = new Set(t.localVariables.keys());
this.destructuringCompiler.compileDestructuringPattern(e.loopDestructuringPattern, t, !0), t._declarationKind = a;
const c = [];
for (const e of t.localVariables.keys()) !s.has(e) && o.includes(e) && c.push(e);
for (const e of c) t.localVariables.delete(e);
void 0 !== t._loopDestructuredVarsToCleanup && (t._previousLoopDestructuredVarsToCleanup = t._loopDestructuredVarsToCleanup), t._loopDestructuredVarsToCleanup = n
} else {
const r = t._declarationKind;
t._declarationKind = e.declarationKind, this.destructuringCompiler.compileDestructuringPattern(e.loopDestructuringPattern, t, !0), t._declarationKind = r
}
}
setupLoopVarEnvTracking(e, t) {
const r = e.loopVarName && t.envVars.has(e.loopVarName), o = !(!e.needsNewEnv || !e.loopVarName || r);
if (o && e.loopVarName && (t.envVars.add(e.loopVarName), t.perIterationLoopVars || (t.perIterationLoopVars = new Set), t.perIterationLoopVars.add(e.loopVarName)), e.needsNewEnv && e.loopVarName && e.hasBlockScopedLoopVar && t.activeBlockScopes) {
const r = [];
for (let o = t.blockScopeDepth; o >= 0; o--) {
const n = (0, y.getScopedVariableName)(e.loopVarName, o);
t.activeBlockScopes.has(n) && (t.activeBlockScopes.delete(n), r.push(n))
}
r.length > 0 && (void 0 !== t._removedFromActiveBlockScopes && (t._previousRemovedFromActiveBlockScopes = t._removedFromActiveBlockScopes), t._removedFromActiveBlockScopes = r)
}
return o
}
cleanupLoopVarEnvTracking(e, t, r) {
var o, n;
t && e.loopVarName && (r.envVars.delete(e.loopVarName), null === (o = r.perIterationLoopVars) || void 0 === o || o.delete(e.loopVarName));
const i = r._loopDestructuredVarsToCleanup, a = r._previousLoopDestructuredVarsToCleanup;
if (i) {
for (const e of i) r.envVars.delete(e), null === (n = r.perIterationLoopVars) || void 0 === n || n.delete(e);
void 0 !== a ? (r._loopDestructuredVarsToCleanup = a, delete r._previousLoopDestructuredVarsToCleanup) : delete r._loopDestructuredVarsToCleanup
}
const s = r._removedFromActiveBlockScopes, c = r._previousRemovedFromActiveBlockScopes;
if (s && r.activeBlockScopes) {
for (const e of s) r.activeBlockScopes.add(e);
void 0 !== c ? (r._removedFromActiveBlockScopes = c, delete r._previousRemovedFromActiveBlockScopes) : delete r._removedFromActiveBlockScopes
}
}
};
t.VMLoopCompiler = S, t.VMLoopCompiler = S = s([(0, d.injectable)(), l(0, (0, d.inject)(g.ServiceIdentifiers.IVMCompilerUtils)), l(1, (0, d.inject)(g.ServiceIdentifiers.IVMScopeManager)), l(2, (0, d.inject)(g.ServiceIdentifiers.IVMDestructuringBytecodeCompiler)), l(3, (0, d.inject)(g.ServiceIdentifiers.IVMVariableCollector)), c("design:paramtypes", ["function" == typeof (o = void 0 !== p.IVMCompilerUtils && p.IVMCompilerUtils) ? o : Object, "function" == typeof (n = void 0 !== u.IVMScopeManager && u.IVMScopeManager) ? n : Object, "function" == typeof (i = void 0 !== f.IVMDestructuringBytecodeCompiler && f.IVMDestructuringBytecodeCompiler) ? i : Object, "function" == typeof (a = void 0 !== m.IVMVariableCollector && m.IVMVariableCollector) ? a : Object])], S)
}, 2993: function (e, t, r) {
var o, n, i, a, s = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, c = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, l = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.ExpressionWithOperatorControlFlowStorageCallNode = void 0;
const d = r(45337), p = r(31391), u = r(18741), f = r(39032), m = r(76393), g = r(31142), h = r(50164),
y = r(8053), S = r(93571), N = r(33056);
let b = class extends y.AbstractCustomNode {
constructor(e, t, r, o) {
super(e, t, r, o)
}
initialize(e, t, r, o) {
this.controlFlowStorageName = e, this.controlFlowStorageKey = t, this.leftValue = r, this.rightValue = o
}
getNodeStructure() {
const e = S.NodeFactory.expressionStatementNode(S.NodeFactory.callExpressionNode(S.NodeFactory.memberExpressionNode(S.NodeFactory.identifierNode(this.controlFlowStorageName), S.NodeFactory.identifierNode(this.controlFlowStorageKey)), [this.leftValue, this.rightValue]));
return N.NodeUtils.parentizeAst(e), [e]
}
};
t.ExpressionWithOperatorControlFlowStorageCallNode = b, s([(0, h.initializable)(), c("design:type", String)], b.prototype, "controlFlowStorageKey", void 0), s([(0, h.initializable)(), c("design:type", String)], b.prototype, "controlFlowStorageName", void 0), t.ExpressionWithOperatorControlFlowStorageCallNode = b = s([(0, d.injectable)(), l(0, (0, d.inject)(p.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)), l(1, (0, d.inject)(p.ServiceIdentifiers.ICustomCodeHelperFormatter)), l(2, (0, d.inject)(p.ServiceIdentifiers.IRandomGenerator)), l(3, (0, d.inject)(p.ServiceIdentifiers.IOptions)), c("design:paramtypes", ["function" == typeof (o = void 0 !== u.TIdentifierNamesGeneratorFactory && u.TIdentifierNamesGeneratorFactory) ? o : Object, "function" == typeof (n = void 0 !== f.ICustomCodeHelperFormatter && f.ICustomCodeHelperFormatter) ? n : Object, "function" == typeof (i = void 0 !== g.IRandomGenerator && g.IRandomGenerator) ? i : Object, "function" == typeof (a = void 0 !== m.IOptions && m.IOptions) ? a : Object])], b)
}, 3147: function (e, t, r) {
var o, n, i, a = this && this.__createBinding || (Object.create ? function (e, t, r, o) {
void 0 === o && (o = r);
var n = Object.getOwnPropertyDescriptor(t, r);
n && !("get" in n ? !t.__esModule : n.writable || n.configurable) || (n = {
enumerable: !0, get: function () {
return t[r]
}
}), Object.defineProperty(e, o, n)
} : function (e, t, r, o) {
void 0 === o && (o = r), e[o] = t[r]
}), s = this && this.__setModuleDefault || (Object.create ? function (e, t) {
Object.defineProperty(e, "default", { enumerable: !0, value: t })
} : function (e, t) {
e.default = t
}), c = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, l = this && this.__importStar || (o = function (e) {
return o = Object.getOwnPropertyNames || function (e) {
var t = [];
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[t.length] = r);
return t
}, o(e)
}, function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e) for (var r = o(e), n = 0; n < r.length; n++) "default" !== r[n] && a(t, e, r[n]);
return s(t, e), t
}), d = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, p = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.CallsGraphAnalyzer = void 0;
const u = r(45337), f = r(31391), m = l(r(31659)), g = r(15914), h = r(21593), y = r(27391), S = r(43243);
let N = n = class {
constructor(e) {
this.calleeDataExtractorFactory = e
}
static getLimitIndex(e) {
const t = e - 1, r = n.limitThresholdActivationLength - 1;
let o = t;
return t > r && (o = Math.round(r + t * n.limitThreshold), o > t && (o = t)), o
}
analyze(e) {
return this.analyzeRecursive(e.body)
}
analyzeRecursive(e) {
const t = n.getLimitIndex(e.length), r = [], o = e.length;
for (let n = 0; n < o && !(n > t); n++) {
const t = e[n];
m.traverse(t, {
enter: o => {
if (y.NodeGuards.isCallExpressionNode(o)) return t.parentNode !== S.NodeStatementUtils.getParentNodeWithStatements(o) ? m.VisitorOption.Skip : void this.analyzeCallExpressionNode(r, e, o)
}
})
}
return r
}
analyzeCallExpressionNode(e, t, r) {
n.calleeDataExtractorsList.forEach(o => {
const n = this.calleeDataExtractorFactory(o).extract(t, r.callee);
n && e.push({ ...n, callsGraph: this.analyzeRecursive(n.callee.body) })
})
}
};
t.CallsGraphAnalyzer = N, N.calleeDataExtractorsList = [h.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor, h.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor, h.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor], N.limitThresholdActivationLength = 25, N.limitThreshold = .002, t.CallsGraphAnalyzer = N = n = c([(0, u.injectable)(), p(0, (0, u.inject)(f.ServiceIdentifiers.Factory__ICalleeDataExtractor)), d("design:paramtypes", ["function" == typeof (i = void 0 !== g.TCalleeDataExtractorFactory && g.TCalleeDataExtractorFactory) ? i : Object])], N)
}, 3437: (e, t) => {
Object.defineProperty(t, "__esModule", { value: !0 })
}, 3464: function (e, t, r) {
var o, n, i, a, s = this && this.__decorate || function (e, t, r, o) {
var n, i = arguments.length, a = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, r) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (a = (i < 3 ? n(a) : i > 3 ? n(t, r, a) : n(t, r)) || a);
return i > 3 && a && Object.defineProperty(t, r, a), a
}, c = this && this.__metadata || function (e, t) {
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t)
}, l = this && this.__param || function (e, t) {
return function (r, o) {
t(r, o, e)
}
}, d = this && this.__importDefault || function (e) {
return e && e.__esModule ? e : { default: e }
};
Object.defineProperty(t, "__esModule", { value: !0 }), t.RenamePropertiesReplacer = void 0;
const p = r(45337), u = r(31391), f = r(18741), m = r(76393), g = r(59290), h = d(r(7192)), y = r(27391),
S = r(93571);
let N = o = class {
constructor(e, t, r) {
this.excludedPropertyNames = new Set, this.pro