index.js 274 KB

12345678910111213141516171819202122232425
  1. /*!
  2. Copyright (C) 2016-2018 Timofey Kachalov <[email protected]>
  3. Redistribution and use in source and binary forms, with or without
  4. modification, are permitted provided that the following conditions are met:
  5. * Redistributions of source code must retain the above copyright
  6. notice, this list of conditions and the following disclaimer.
  7. * Redistributions in binary form must reproduce the above copyright
  8. notice, this list of conditions and the following disclaimer in the
  9. documentation and/or other materials provided with the distribution.
  10. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  11. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  12. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  13. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  14. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  15. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  16. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  17. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  18. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  19. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20. */
  21. require("source-map-support").install(),module.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=49)}([function(e,t){e.exports=require("inversify")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Factory__ICalleeDataExtractor="Factory<ICalleeDataExtractor>",e.Factory__IControlFlowCustomNode="Factory<IControlFlowCustomNode>",e.Factory__IControlFlowReplacer="Factory<IControlFlowReplacer>",e.Factory__ICustomNode="Factory<ICustomNode>",e.Factory__ICustomNodeGroup="Factory<ICustomNodeGroup>",e.Factory__IDeadCodeInjectionCustomNode="Factory<IDeadCodeInjectionCustomNode>",e.Factory__IIdentifierNamesGenerator="Factory<IIdentifierNamesGenerator>",e.Factory__IIdentifierObfuscatingReplacer="Factory<IIdentifierObfuscatingReplacer>",e.Factory__INodeGuard="Factory<INodeGuard>",e.Factory__INodeTransformer="Factory<INodeTransformer[]>",e.Factory__IObfuscationResult="Factory<IObfuscationResult>",e.Factory__IObfuscatingReplacer="Factory<IObfuscatingReplacer>",e.Factory__TControlFlowStorage="Factory<TControlFlowStorage>",e.IArrayUtils="IArrayUtils",e.ICalleeDataExtractor="ICalleeDataExtractor",e.ICryptUtils="ICryptUtils",e.ICustomNode="ICustomNode",e.ICustomNodeGroup="ICustomNodeGroup",e.IControlFlowReplacer="IControlFlowReplacer",e.IEscapeSequenceEncoder="IEscapeSequenceEncoder",e.IIdentifierNamesGenerator="IIdentifierNamesGenerator",e.IIdentifierObfuscatingReplacer="IIdentifierObfuscatingReplacer",e.IJavaScriptObfuscator="IJavaScriptObfuscator",e.ILogger="ILogger",e.INodeGuard="INodeGuard",e.INodeTransformer="INodeTransformer",e.IObfuscationEventEmitter="IObfuscationEventEmitter",e.IObfuscationResult="IObfuscationResult",e.IOptions="IOptions",e.IOptionsNormalizer="IOptionsNormalizer",e.IObfuscatingReplacer="IObfuscatingReplacer",e.IRandomGenerator="IRandomGenerator",e.ISourceCode="ISourceCode",e.ISourceMapCorrector="ISourceMapCorrector",e.IStackTraceAnalyzer="IStackTraceAnalyzer",e.ITransformersRunner="ITransformersRunner",e.Newable__ICustomNode="Newable<ICustomNode>",e.Newable__TControlFlowStorage="Newable<TControlFlowStorage>",e.TCustomNodeGroupStorage="TCustomNodeGroupStorage",e.TInputOptions="TInputOptions",e.TStringArrayStorage="TStringArrayStorage"}(t.ServiceIdentifiers||(t.ServiceIdentifiers={}))},function(e,t){e.exports=require("tslib")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(11),i=function(){function e(){n(this,e)}return o(e,null,[{key:"isArrayPatternNode",value:function(e){return e.type===a.NodeType.ArrayPattern}},{key:"isArrowFunctionExpressionNode",value:function(e){return e.type===a.NodeType.ArrowFunctionExpression}},{key:"isAssignmentPatternNode",value:function(e){return e.type===a.NodeType.AssignmentPattern}},{key:"isAwaitExpressionNode",value:function(e){return e.type===a.NodeType.AwaitExpression}},{key:"isBlockStatementNode",value:function(e){return e.type===a.NodeType.BlockStatement}},{key:"isBreakStatementNode",value:function(e){return e.type===a.NodeType.BreakStatement}},{key:"isCallExpressionNode",value:function(e){return e.type===a.NodeType.CallExpression}},{key:"isCatchClauseNode",value:function(e){return e.type===a.NodeType.CatchClause}},{key:"isClassDeclarationNode",value:function(e){return e.type===a.NodeType.ClassDeclaration}},{key:"isContinueStatementNode",value:function(e){return e.type===a.NodeType.ContinueStatement}},{key:"isExpressionStatementNode",value:function(e){return e.type===a.NodeType.ExpressionStatement}},{key:"isFunctionDeclarationNode",value:function(e){return e.type===a.NodeType.FunctionDeclaration}},{key:"isFunctionExpressionNode",value:function(e){return e.type===a.NodeType.FunctionExpression}},{key:"isIdentifierNode",value:function(e){return e.type===a.NodeType.Identifier}},{key:"isIfStatementNode",value:function(e){return e.type===a.NodeType.IfStatement}},{key:"isLabelIdentifierNode",value:function(t,r){var n=e.isLabeledStatementNode(r)&&r.label===t,o=e.isContinueStatementNode(r)&&r.label===t,a=e.isBreakStatementNode(r)&&r.label===t;return n||o||a}},{key:"isLabeledStatementNode",value:function(e){return e.type===a.NodeType.LabeledStatement}},{key:"isLiteralNode",value:function(e){return e.type===a.NodeType.Literal}},{key:"isMemberExpressionNode",value:function(e){return e.type===a.NodeType.MemberExpression}},{key:"isMethodDefinitionNode",value:function(e){return e.type===a.NodeType.MethodDefinition}},{key:"isNode",value:function(e){return e&&void 0!==!e.type}},{key:"isNodeHasBlockScope",value:function(t,r){return e.isProgramNode(t)||e.isBlockStatementNode(t)&&-1!==e.nodesWithBlockScope.indexOf(r.type)}},{key:"isNodeHasScope",value:function(t){return e.isProgramNode(t)||e.isBlockStatementNode(t)||e.isSwitchCaseNode(t)}},{key:"isNodeWithComments",value:function(e){return Boolean(e.leadingComments)||Boolean(e.trailingComments)}},{key:"isObjectPatternNode",value:function(e){return e.type===a.NodeType.ObjectPattern}},{key:"isObjectExpressionNode",value:function(e){return e.type===a.NodeType.ObjectExpression}},{key:"isProgramNode",value:function(e){return e.type===a.NodeType.Program}},{key:"isPropertyNode",value:function(e){return e.type===a.NodeType.Property}},{key:"isReplaceableIdentifierNode",value:function(t,r){if(!e.isIdentifierNode(t))return!1;var n=e.isPropertyNode(r)&&!r.computed&&r.key===t,o=e.isMemberExpressionNode(r)&&!r.computed&&r.property===t,a=e.isMethodDefinitionNode(r)&&!r.computed,i=e.isLabelIdentifierNode(t,r);return!(n||o||a||i)}},{key:"isRestElementNode",value:function(e){return e.type===a.NodeType.RestElement}},{key:"isReturnStatementNode",value:function(e){return e.type===a.NodeType.ReturnStatement}},{key:"isSuperNode",value:function(e){return e.type===a.NodeType.Super}},{key:"isSwitchCaseNode",value:function(e){return e.type===a.NodeType.SwitchCase}},{key:"isTemplateLiteralNode",value:function(e){return e.type===a.NodeType.TemplateLiteral}},{key:"isUnaryExpressionNode",value:function(e){return e.type===a.NodeType.UnaryExpression}},{key:"isUseStrictOperator",value:function(e){return e.type===a.NodeType.ExpressionStatement&&"use strict"===e.directive}},{key:"isVariableDeclarationNode",value:function(e){return e.type===a.NodeType.VariableDeclaration}},{key:"isVariableDeclaratorNode",value:function(e){return e.type===a.NodeType.VariableDeclarator}},{key:"isWhileStatementNode",value:function(e){return e.type===a.NodeType.WhileStatement}}]),e}();i.nodesWithBlockScope=[a.NodeType.ArrowFunctionExpression,a.NodeType.FunctionDeclaration,a.NodeType.FunctionExpression,a.NodeType.MethodDefinition],t.NodeGuards=i},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=__importStar(r(30)),s=__importStar(r(37)),c=__importStar(r(10)),u=r(3),l=function(){function e(){n(this,e)}return a(e,null,[{key:"addXVerbatimPropertyToLiterals",value:function(e){return c.replace(e,{leave:function(e){u.NodeGuards.isLiteralNode(e)&&(e["x-verbatim-property"]={content:e.raw,precedence:i.Precedence.Primary})}}),e}},{key:"clone",value:function(t){return e.parentize(e.cloneRecursive(t))}},{key:"convertCodeToStructure",value:function(t){var r=s.parseScript(t);return r=e.addXVerbatimPropertyToLiterals(r),r=e.parentize(r),r.body}},{key:"convertStructureToCode",value:function(e){return e.reduce(function(e,t){return e+i.generate(t,{sourceMapWithCode:!0}).code},"")}},{key:"getBlockScopesOfNode",value:function(t){return e.getBlockScopesOfNodeRecursive(t)}},{key:"getScopeOfNode",value:function(t){var r=t.parentNode;if(!r)throw new ReferenceError("`parentNode` property of given node is `undefined`");return u.NodeGuards.isNodeHasScope(r)?r:e.getScopeOfNode(r)}},{key:"getUnaryExpressionArgumentNode",value:function(t){return u.NodeGuards.isUnaryExpressionNode(t.argument)?e.getUnaryExpressionArgumentNode(t.argument):t.argument}},{key:"parentize",value:function(t){return c.replace(t,{enter:e.parentizeNode}),t}},{key:"parentizeNode",value:function(e,t){return e.parentNode=t||e,e.obfuscatedNode=!1,e}},{key:"cloneRecursive",value:function(t){if(null===t)return t;var r={};for(var n in t)if(t.hasOwnProperty(n)&&"parentNode"!==n){var a=t[n],i=void 0;i=null===a||a instanceof RegExp?a:Array.isArray(a)?a.map(e.cloneRecursive):"object"===(void 0===a?"undefined":o(a))?e.cloneRecursive(a):a,r[n]=i}return r}},{key:"getBlockScopesOfNodeRecursive",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=t.parentNode;if(!o)throw new ReferenceError("`parentNode` property of given node is `undefined`");return u.NodeGuards.isBlockStatementNode(t)&&o===t&&r.push(t),(u.NodeGuards.isProgramNode(t)||n&&u.NodeGuards.isNodeHasBlockScope(t,o))&&r.push(t),t!==o?e.getBlockScopesOfNodeRecursive(o,r,++n):r}}]),e}();t.NodeUtils=l},function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initialize",t=Object.keys(this)[0];return function(r,n){var o={configurable:!0,enumerable:!0},a=r[e];if(!a||"function"!=typeof a)throw new Error("`"+e+"` method with initialization logic not found. `@"+t+"` decorator requires `"+e+"` method");var i="_"+n,s=Object.getOwnPropertyDescriptor(r,i)||o,c=Object.getOwnPropertyDescriptor(r,e)||o,u=c.value;return Object.defineProperty(r,n,Object.assign({},s,{get:function(){if(void 0===this[i])throw new Error("Property `"+n+"` is not initialized! Initialize it first!");return this[i]},set:function(e){this[i]=e}})),Object.defineProperty(r,e,Object.assign({},c,{value:function(){u.apply(this,arguments),this[n]}})),s}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializable=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Preparing="Preparing",e.DeadCodeInjection="DeadCodeInjection",e.ControlFlowFlattening="ControlFlowFlattening",e.Converting="Converting",e.Obfuscating="Obfuscating",e.Finalizing="Finalizing"}(t.TransformationStage||(t.TransformationStage={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=r(5),u=function(){function e(t,r){n(this,e),this.randomGenerator=t,this.options=r}return o(e,[{key:"initialize",value:function(){this.nodeIdentifier=this.randomGenerator.getRandomInteger(0,1e4)}}]),e}();a.__decorate([c.initializable(),a.__metadata("design:type",Number)],u.prototype,"nodeIdentifier",void 0),a.__decorate([i.postConstruct(),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],u.prototype,"initialize",null),u=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(1,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object])],u),t.AbstractNodeTransformer=u},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=r(76),u=r(77),l=f=function(){function e(t,r,o){n(this,e),this.cachedNode=null,this.identifierNamesGenerator=t(o),this.randomGenerator=r,this.options=o}return o(e,[{key:"getNode",value:function(){return this.cachedNode||(this.cachedNode=this.getNodeStructure()),this.cachedNode}},{key:"getGlobalVariableTemplate",value:function(){return this.randomGenerator.getRandomGenerator().pickone(f.globalVariableTemplateFunctions)}}]),e}();l.globalVariableTemplateFunctions=[c.GlobalVariableTemplate1(),u.GlobalVariableTemplate2()],l=f=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),a.__param(1,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(2,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],l),t.AbstractCustomNode=l;var f},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=__importStar(r(30)),i=r(11),s=function(){function e(){n(this,e)}return o(e,null,[{key:"getProgramNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:i.NodeType.Program,body:e,sourceType:"script",obfuscatedNode:!1}}},{key:"getArrayExpressionNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:i.NodeType.ArrayExpression,elements:e}}},{key:"getAssignmentExpressionNode",value:function(e,t,r){return{type:i.NodeType.AssignmentExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getBinaryExpressionNode",value:function(e,t,r){return{type:i.NodeType.BinaryExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getBlockStatementNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:i.NodeType.BlockStatement,body:e,obfuscatedNode:!1}}},{key:"getBreakStatement",value:function(e){var t={type:i.NodeType.BreakStatement,obfuscatedNode:!1};return e&&(t.label=e),t}},{key:"getCallExpressionNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{type:i.NodeType.CallExpression,callee:e,arguments:t,obfuscatedNode:!1}}},{key:"getContinueStatement",value:function(e){var t={type:i.NodeType.ContinueStatement,obfuscatedNode:!1};return e&&(t.label=e),t}},{key:"getExpressionStatementNode",value:function(e){return{type:i.NodeType.ExpressionStatement,expression:e,obfuscatedNode:!1}}},{key:"getFunctionDeclarationNode",value:function(t,r,n){return{type:i.NodeType.FunctionDeclaration,id:e.getIdentifierNode(t),params:r,body:n,generator:!1,obfuscatedNode:!1}}},{key:"getFunctionExpressionNode",value:function(e,t){return{type:i.NodeType.FunctionExpression,params:e,body:t,generator:!1,obfuscatedNode:!1}}},{key:"getIfStatementNode",value:function(e,t,r){return Object.assign({type:i.NodeType.IfStatement,test:e,consequent:t},r&&{alternate:r},{obfuscatedNode:!1})}},{key:"getIdentifierNode",value:function(e){return{type:i.NodeType.Identifier,name:e,obfuscatedNode:!1}}},{key:"getLiteralNode",value:function(e,t){return t=void 0!==t?t:"'"+e+"'",{type:i.NodeType.Literal,value:e,raw:t,"x-verbatim-property":{content:t,precedence:a.Precedence.Primary},obfuscatedNode:!1}}},{key:"getLogicalExpressionNode",value:function(e,t,r){return{type:i.NodeType.LogicalExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getMemberExpressionNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:i.NodeType.MemberExpression,computed:r,object:e,property:t,obfuscatedNode:!1}}},{key:"getMethodDefinitionNode",value:function(e,t,r,n){return{type:i.NodeType.MethodDefinition,key:e,value:t,kind:r,computed:n,static:!1,obfuscatedNode:!1}}},{key:"getObjectExpressionNode",value:function(e){return{type:i.NodeType.ObjectExpression,properties:e,obfuscatedNode:!1}}},{key:"getPropertyNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:i.NodeType.Property,key:e,value:t,kind:"init",method:!1,shorthand:!1,computed:r,obfuscatedNode:!1}}},{key:"getUnaryExpressionNode",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:i.NodeType.UnaryExpression,operator:e,argument:t,prefix:r,obfuscatedNode:!1}}},{key:"getReturnStatementNode",value:function(e){return{type:i.NodeType.ReturnStatement,argument:e,obfuscatedNode:!1}}},{key:"getSwitchStatementNode",value:function(e,t){return{type:i.NodeType.SwitchStatement,discriminant:e,cases:t,obfuscatedNode:!1}}},{key:"getSwitchCaseNode",value:function(e,t){return{type:i.NodeType.SwitchCase,test:e,consequent:t,obfuscatedNode:!1}}},{key:"getUpdateExpressionNode",value:function(e,t){return{type:i.NodeType.UpdateExpression,operator:e,argument:t,prefix:!1,obfuscatedNode:!1}}},{key:"getVariableDeclarationNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"var";return{type:i.NodeType.VariableDeclaration,declarations:e,kind:t,obfuscatedNode:!1}}},{key:"getVariableDeclaratorNode",value:function(e,t){return{type:i.NodeType.VariableDeclarator,id:e,init:t,obfuscatedNode:!1}}},{key:"getWhileStatementNode",value:function(e,t){return{type:i.NodeType.WhileStatement,test:e,body:t,obfuscatedNode:!1}}}]),e}();t.Nodes=s},function(e,t){e.exports=require("estraverse")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.AwaitExpression="AwaitExpression",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ClassDeclaration="ClassDeclaration",e.ContinueStatement="ContinueStatement",e.ExpressionStatement="ExpressionStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.LabeledStatement="LabeledStatement",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MethodDefinition="MethodDefinition",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.Program="Program",e.Property="Property",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TemplateLiteral="TemplateLiteral",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement"}(t.NodeType||(t.NodeType={}))},function(e,t){e.exports=require("string-template")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BinaryExpressionFunctionNode="BinaryExpressionFunctionNode",e.BlockStatementControlFlowFlatteningNode="BlockStatementControlFlowFlatteningNode",e.CallExpressionControlFlowStorageCallNode="CallExpressionControlFlowStorageCallNode",e.CallExpressionFunctionNode="CallExpressionFunctionNode",e.ControlFlowStorageNode="ControlFlowStorageNode",e.ExpressionWithOperatorControlFlowStorageCallNode="ExpressionWithOperatorControlFlowStorageCallNode",e.LogicalExpressionFunctionNode="LogicalExpressionFunctionNode",e.StringLiteralControlFlowStorageCallNode="StringLiteralControlFlowStorageCallNode",e.StringLiteralNode="StringLiteralNode"}(t.ControlFlowCustomNode||(t.ControlFlowCustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Browser="browser",e.Extension="extension",e.Node="node"}(t.ObfuscationTarget||(t.ObfuscationTarget={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(0),i=r(1),s=r(51),c=r(56),u=r(64),l=r(69),f=r(116),d=r(117),p=r(120),m=r(121),y=r(134),b=r(149),g=r(158),v=r(163),_=r(169),h=r(171),N=r(173),S=r(175),O=r(176),j=r(177),C=r(178),w=function(){function e(){n(this,e),this.container=new a.Container}return o(e,[{key:"get",value:function(e){return this.container.get(e)}},{key:"getNamed",value:function(e,t){return this.container.getNamed(e,t)}},{key:"load",value:function(e,t){this.container.bind(i.ServiceIdentifiers.ISourceCode).toDynamicValue(function(){return new O.SourceCode(e)}).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.TInputOptions).toDynamicValue(function(){return t}).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.ILogger).to(h.Logger).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IJavaScriptObfuscator).to(_.JavaScriptObfuscator).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.ITransformersRunner).to(C.TransformersRunner).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IObfuscationResult).to(S.ObfuscationResult).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.Factory__IObfuscationResult).toFactory(function(e){return function(t,r){var n=e.container.get(i.ServiceIdentifiers.IObfuscationResult);return n.initialize(t,r),n}}),this.container.bind(i.ServiceIdentifiers.ISourceMapCorrector).to(j.SourceMapCorrector).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IObfuscationEventEmitter).to(N.ObfuscationEventEmitter).inSingletonScope(),this.container.load(s.analyzersModule),this.container.load(c.controlFlowTransformersModule),this.container.load(u.convertingTransformersModule),this.container.load(l.customNodesModule),this.container.load(f.finalizingTransformersModule),this.container.load(d.generatorsModule),this.container.load(p.nodeTransformersModule),this.container.load(m.obfuscatingTransformersModule),this.container.load(y.optionsModule),this.container.load(b.preparingTransformersModule),this.container.load(g.storagesModule),this.container.load(v.utilsModule)}},{key:"unload",value:function(){this.container.unbindAll()}}],[{key:"getFactory",value:function(e){return function(t){return function(r){return t.container.getNamed(e,r)}}}},{key:"getCacheFactory",value:function(e){return function(t){var r=new Map;return function(n){if(r.has(n))return r.get(n);var o=t.container.getNamed(e,n);return r.set(n,o),o}}}},{key:"getConstructorFactory",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(t){var n=new Map,o=[];return function(a){if(r.forEach(function(e,r){o[r]||(o[r]=t.container.get(e))}),n.has(a))return new(Function.prototype.bind.apply(n.get(a),[null].concat(o)));var i=t.container.getNamed(e,a);return n.set(a,i),new(Function.prototype.bind.apply(i,[null].concat(o)))}}}}]),e}();t.InversifyContainerFacade=w},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),s=function(){function e(){o(this,e)}return a(e,null,[{key:"appendNode",value:function(t,r){r=e.parentizeScopeStatementsBeforeAppend(t,r),e.setScopeNodeStatements(t,[].concat(n(e.getScopeNodeStatements(t)),n(r)))}},{key:"appendNodeToOptimalBlockScope",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=void 0;a=t.length?e.getOptimalBlockScope(t,o):r,e.prependNode(a,n)}},{key:"getOptimalBlockScope",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,o=t[r];if(n<=0)throw new Error("Invalid `deep` argument value. Value should be bigger then 0.");return n>1&&o.stackTrace.length?e.getOptimalBlockScope(o.stackTrace,0,--n):o.callee}},{key:"insertNodeAfter",value:function(t,r,n){var o=e.getScopeNodeStatements(t).indexOf(n);e.insertNodeAtIndex(t,r,o+1)}},{key:"insertNodeAtIndex",value:function(t,r,o){r=e.parentizeScopeStatementsBeforeAppend(t,r),e.setScopeNodeStatements(t,[].concat(n(e.getScopeNodeStatements(t).slice(0,o)),n(r),n(e.getScopeNodeStatements(t).slice(o))))}},{key:"prependNode",value:function(t,r){r=e.parentizeScopeStatementsBeforeAppend(t,r),e.setScopeNodeStatements(t,[].concat(n(r),n(e.getScopeNodeStatements(t))))}},{key:"getScopeNodeStatements",value:function(e){return i.NodeGuards.isSwitchCaseNode(e)?e.consequent:e.body}},{key:"parentizeScopeStatementsBeforeAppend",value:function(e,t){return t.forEach(function(t){t.parentNode=e}),t}},{key:"setScopeNodeStatements",value:function(e,t){if(i.NodeGuards.isSwitchCaseNode(e))return void(e.consequent=t);e.body=t}}]),e}();t.NodeAppender=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.AfterObfuscation="afterObfuscation",e.BeforeObfuscation="beforeObfuscation"}(t.ObfuscationEvent||(t.ObfuscationEvent={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BaseIdentifierObfuscatingReplacer="BaseIdentifierObfuscatingReplacer"}(t.IdentifierObfuscatingReplacer||(t.IdentifierObfuscatingReplacer={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0}),r(50);var a=r(1),i=r(15),s=r(34),c=function(){function e(){n(this,e)}return o(e,null,[{key:"obfuscate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new i.InversifyContainerFacade;r.load(e,t);var n=r.get(a.ServiceIdentifiers.IJavaScriptObfuscator),o=n.obfuscate(e);return r.unload(),o}},{key:"runCLI",value:function(e){var t=new s.JavaScriptObfuscatorCLI(e);t.initialize(),t.run()}}]),e}();t.JavaScriptObfuscator=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BlockStatementControlFlowTransformer="BlockStatementControlFlowTransformer",e.ClassDeclarationTransformer="ClassDeclarationTransformer",e.CommentsTransformer="CommentsTransformer",e.CustomNodesTransformer="CustomNodesTransformer",e.DeadCodeInjectionTransformer="DeadCodeInjectionTransformer",e.EvalCallExpressionTransformer="EvalCallExpressionTransformer",e.FunctionControlFlowTransformer="FunctionControlFlowTransformer",e.CatchClauseTransformer="CatchClauseTransformer",e.FunctionDeclarationTransformer="FunctionDeclarationTransformer",e.FunctionTransformer="FunctionTransformer",e.LabeledStatementTransformer="LabeledStatementTransformer",e.LiteralTransformer="LiteralTransformer",e.MemberExpressionTransformer="MemberExpressionTransformer",e.MethodDefinitionTransformer="MethodDefinitionTransformer",e.ObfuscatingGuardsTransformer="ObfuscatingGuardsTransformer",e.ObjectExpressionKeysTransformer="ObjectExpressionKeysTransformer",e.ObjectExpressionTransformer="ObjectExpressionTransformer",e.ParentificationTransformer="ParentificationTransformer",e.TemplateLiteralTransformer="TemplateLiteralTransformer",e.VariableDeclarationTransformer="VariableDeclarationTransformer"}(t.NodeTransformer||(t.NodeTransformer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.ConsoleOutputDisableExpressionNode="ConsoleOutputDisableExpressionNode",e.DebugProtectionFunctionCallNode="DebugProtectionFunctionCallNode",e.DebugProtectionFunctionIntervalNode="DebugProtectionFunctionIntervalNode",e.DebugProtectionFunctionNode="DebugProtectionFunctionNode",e.DomainLockNode="DomainLockNode",e.NodeCallsControllerFunctionNode="NodeCallsControllerFunctionNode",e.SelfDefendingUnicodeNode="SelfDefendingUnicodeNode",e.StringArrayCallsWrapper="StringArrayCallsWrapper",e.StringArrayNode="StringArrayNode",e.StringArrayRotateFunctionNode="StringArrayRotateFunctionNode"}(t.CustomNode||(t.CustomNode={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(113),i=function(){function e(){n(this,e)}return o(e,null,[{key:"decToHex",value:function(e){return e.toString(16)}},{key:"extractDomainFromUrl",value:function(e){var t=void 0;return t=e.indexOf("://")>-1||0===e.indexOf("//")?e.split("/")[2]:e.split("/")[0],t=t.split(":")[0]}},{key:"isCeilNumber",value:function(e){return e%1==0}},{key:"stringRotate",value:function(e,t){if(!e)throw new ReferenceError("Cannot rotate empty string.");for(var r=0;r<t;r++)e=e[e.length-1]+e.substring(0,e.length-1);return e}},{key:"stringToJSFuck",value:function(e){return Array.from(e).map(function(e){return a.JSFuck[e]||e}).join(" + ")}}]),e}();i.hexadecimalPrefix="0x",t.Utils=i},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=function(){function e(t,r,o){n(this,e),this.identifierNamesGenerator=t(o),this.randomGenerator=r,this.options=o}return o(e,[{key:"getAppendEvent",value:function(){return this.appendEvent}},{key:"getCustomNodes",value:function(){return this.customNodes}},{key:"appendCustomNodeIfExist",value:function(e,t){var r=this.customNodes.get(e);r&&t(r)}},{key:"getRandomStackTraceIndex",value:function(e){return this.randomGenerator.getRandomInteger(0,Math.max(0,Math.round(e-1)))}}]),e}();c=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),a.__param(1,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(2,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],c),t.AbstractCustomNodeGroup=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.HexadecimalIdentifierNamesGenerator="hexadecimal",e.MangledIdentifierNamesGenerator="mangled"}(t.IdentifierNamesGenerator||(t.IdentifierNamesGenerator={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Inline="inline",e.Separate="separate"}(t.SourceMapMode||(t.SourceMapMode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Base64="base64",e.Rc4="rc4"}(t.StringArrayEncoding||(t.StringArrayEncoding={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(24),o=r(14),a=r(25);t.NO_ADDITIONAL_NODES_PRESET=Object.freeze({compact:!0,controlFlowFlattening:!1,controlFlowFlatteningThreshold:0,deadCodeInjection:!1,deadCodeInjectionThreshold:0,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],identifierNamesGenerator:n.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",log:!1,renameGlobals:!1,reservedNames:[],rotateStringArray:!1,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:a.SourceMapMode.Separate,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0,target:o.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=r(0),i=r(1),s=function e(t){n(this,e),this.options=t};s=o.__decorate([a.injectable(),o.__param(0,a.inject(i.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object])],s),t.AbstractObfuscatingReplacer=s},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=r(0),i=function e(){n(this,e)};i=o.__decorate([a.injectable()],i),t.AbstractCalleeDataExtractor=i},function(e,t){e.exports=require("escodegen-wallaby")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=u=function(){function e(t,r,o){n(this,e),this.replacerDataByControlFlowStorageId=new Map,this.controlFlowCustomNodeFactory=t,this.randomGenerator=r,this.options=o}return o(e,[{key:"insertCustomNodeToControlFlowStorage",value:function(e,t,r,n){var o=this,a=t.getStorageId(),i=u.getStorageKeysByIdForCurrentStorage(this.replacerDataByControlFlowStorageId,a),s=i.get(r);if(this.randomGenerator.getMathRandom()<n&&s&&s.length)return this.randomGenerator.getRandomGenerator().pickone(s);var c=function e(r){var n=o.randomGenerator.getRandomString(r);return t.getStorage().has(n)?e(r):n}(5);return i.set(r,[c]),this.replacerDataByControlFlowStorageId.set(a,i),t.set(c,e),c}}],[{key:"getStorageKeysByIdForCurrentStorage",value:function(e,t){return e.has(t)?e.get(t):new Map}}]),e}();c=u=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__IControlFlowCustomNode)),a.__param(1,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(2,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],c),t.AbstractControlFlowReplacer=c;var u},function(e,t,r){"use strict";function n(){return"\n var that = (typeof window !== 'undefined'\n ? window\n : (typeof process === 'object' &&\n typeof require === 'function' &&\n typeof global === 'object')\n ? global\n : this);\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableNoEvalTemplate=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(24),o=r(14),a=r(25);t.DEFAULT_PRESET=Object.freeze({compact:!0,config:"",controlFlowFlattening:!1,controlFlowFlatteningThreshold:.75,deadCodeInjection:!1,deadCodeInjectionThreshold:.4,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],identifierNamesGenerator:n.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",log:!1,renameGlobals:!1,reservedNames:[],rotateStringArray:!0,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:a.SourceMapMode.Separate,stringArray:!0,stringArrayEncoding:!1,stringArrayThreshold:.75,target:o.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=a.__importStar(r(180)),s=a.__importStar(r(47)),c=a.__importStar(r(35)),u=r(5),l=r(33),f=r(181),d=r(182),p=r(183),m=r(184),y=r(185),b=r(186),g=r(187),v=r(19),_=r(190),h=function(){function e(t){n(this,e),this.rawArguments=t,this.arguments=t.slice(2)}return o(e,[{key:"initialize",value:function(){this.inputPath=c.normalize(this.arguments[0]||""),this.commands=new i.Command,this.configureCommands(),this.configureHelp(),this.inputCLIOptions=this.commands.opts()}},{key:"run",value:function(){if(!this.arguments.length||-1!==this.arguments.indexOf("--help"))return this.commands.outputHelp();var e=_.SourceCodeReader.readSourceCode(this.inputPath);this.processSourceCodeData(e)}},{key:"buildOptions",value:function(){var t=e.filterOptions(this.inputCLIOptions),r=this.inputCLIOptions.config,n=r?c.resolve(r,"."):"",o=n?g.CLIUtils.getUserConfig(n):{};return Object.assign({},l.DEFAULT_PRESET,o,t)}},{key:"configureCommands",value:function(){this.commands.usage("<inputPath> [options]").version(s.version,"-v, --version").option("-o, --output <path>","Output path for obfuscated code").option("--compact <boolean>","Disable one line output code compacting",d.BooleanSanitizer).option("--config <boolean>","Name of js / json config file").option("--control-flow-flattening <boolean>","Enables control flow flattening",d.BooleanSanitizer).option("--control-flow-flattening-threshold <number>","The probability that the control flow flattening transformation will be applied to the node",parseFloat).option("--dead-code-injection <boolean>","Enables dead code injection",d.BooleanSanitizer).option("--dead-code-injection-threshold <number>","The probability that the dead code injection transformation will be applied to the node",parseFloat).option("--debug-protection <boolean>","Disable browser Debug panel (can cause DevTools enabled browser freeze)",d.BooleanSanitizer).option("--debug-protection-interval <boolean>","Disable browser Debug panel even after page was loaded (can cause DevTools enabled browser freeze)",d.BooleanSanitizer).option("--disable-console-output <boolean>","Allow console.log, console.info, console.error and console.warn messages output into browser console",d.BooleanSanitizer).option("--domain-lock <list> (comma separated, without whitespaces)","Blocks the execution of the code in domains that do not match the passed RegExp patterns (comma separated)",f.ArraySanitizer).option("--identifier-names-generator <string> [hexadecimal, mangled]","Sets identifier names generator (Default: hexadecimal)",p.IdentifierNamesGeneratorSanitizer).option("--identifiers-prefix <string>","Sets prefix for all global generated identifiers.").option("--log <boolean>","Enables logging of the information to the console",d.BooleanSanitizer).option("--reserved-names <list> (comma separated, without whitespaces)","Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)",f.ArraySanitizer).option("--rename-globals <boolean>","Allows to enable obfuscation of global variable and function names with declaration.",d.BooleanSanitizer).option("--rotate-string-array <boolean>","Disable rotation of unicode array values during obfuscation",d.BooleanSanitizer).option("--seed <number>","Sets seed for random generator. This is useful for creating repeatable results.",parseFloat).option("--self-defending <boolean>","Disables self-defending for obfuscated code",d.BooleanSanitizer).option("--source-map <boolean>","Enables source map generation",d.BooleanSanitizer).option("--source-map-base-url <string>","Sets base url to the source map import url when `--source-map-mode=separate`").option("--source-map-file-name <string>","Sets file name for output source map when `--source-map-mode=separate`").option("--source-map-mode <string> [inline, separate]","Specify source map output mode",y.SourceMapModeSanitizer).option("--string-array <boolean>","Disables gathering of all literal strings into an array and replacing every literal string with an array call",d.BooleanSanitizer).option("--string-array-encoding <string|boolean> [true, false, base64, rc4]","Encodes all strings in strings array using base64 or rc4 (this option can slow down your code speed",b.StringArrayEncodingSanitizer).option("--string-array-threshold <number>","The probability that the literal string will be inserted into stringArray (Default: 0.8, Min: 0, Max: 1)",parseFloat).option("--target <string>","Allows to set target environment for obfuscated code.",m.ObfuscationTargetSanitizer).option("--transform-object-keys <boolean>","Enables transformation of object keys",d.BooleanSanitizer).option("--unicode-escape-sequence <boolean>","Allows to enable/disable string conversion to unicode escape sequence",d.BooleanSanitizer).parse(this.rawArguments)}},{key:"configureHelp",value:function(){this.commands.on("--help",function(){console.log(" Examples:\n"),console.log(" %> javascript-obfuscator input_file_name.js --compact true --self-defending false"),console.log(" %> javascript-obfuscator input_file_name.js --output output_file_name.js --compact true --self-defending false"),console.log(" %> javascript-obfuscator input_directory_name --compact true --self-defending false"),console.log("")})}},{key:"processSourceCodeData",value:function(e){var t=this,r=this.inputCLIOptions.output?c.normalize(this.inputCLIOptions.output):"";if(Array.isArray(e))e.forEach(function(e,n){var o=e.filePath,a=e.content,i=r?c.join(r,o):g.CLIUtils.getOutputCodePath(o);t.processSourceCode(a,i,n)});else{var n=r||g.CLIUtils.getOutputCodePath(this.inputPath);this.processSourceCode(e,n,null)}}},{key:"processSourceCode",value:function(t,r,n){var o=this.buildOptions();if(null!==n){var a=this.inputCLIOptions.identifiersPrefix||e.baseIdentifiersPrefix,i=""+a+n;o=Object.assign({},o,{identifiersPrefix:i})}o.sourceMap?e.processSourceCodeWithSourceMap(t,r,o):e.processSourceCodeWithoutSourceMap(t,r,o)}}],[{key:"filterOptions",value:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&(t[r]=e[r]);return t}},{key:"processSourceCodeWithoutSourceMap",value:function(e,t,r){var n=v.JavaScriptObfuscator.obfuscate(e,r).getObfuscatedCode();g.CLIUtils.writeFile(t,n)}},{key:"processSourceCodeWithSourceMap",value:function(e,t,r){var n=g.CLIUtils.getOutputSourceMapPath(t,r.sourceMapFileName||"");r=Object.assign({},r,{sourceMapFileName:c.basename(n)});var o=v.JavaScriptObfuscator.obfuscate(e,r);g.CLIUtils.writeFile(t,o.getObfuscatedCode()),"separate"===r.sourceMapMode&&o.getSourceMap()&&g.CLIUtils.writeFile(n,o.getSourceMap())}}]),e}();h.availableInputExtensions=[".js"],h.encoding="utf8",h.obfuscatedFilePrefix="-obfuscated",h.baseIdentifiersPrefix="a",a.__decorate([u.initializable(),a.__metadata("design:type",Object)],h.prototype,"commands",void 0),a.__decorate([u.initializable(),a.__metadata("design:type",Object)],h.prototype,"inputCLIOptions",void 0),a.__decorate([u.initializable(),a.__metadata("design:type",String)],h.prototype,"inputPath",void 0),t.JavaScriptObfuscatorCLI=h},function(e,t){e.exports=require("path")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.FunctionDeclarationCalleeDataExtractor="FunctionDeclarationCalleeDataExtractor",e.FunctionExpressionCalleeDataExtractor="FunctionExpressionCalleeDataExtractor",e.ObjectExpressionCalleeDataExtractor="ObjectExpressionCalleeDataExtractor"}(t.CalleeDataExtractor||(t.CalleeDataExtractor={}))},function(e,t){e.exports=require("esprima")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BinaryExpressionControlFlowReplacer="BinaryExpressionControlFlowReplacer",e.CallExpressionControlFlowReplacer="CallExpressionControlFlowReplacer",e.LogicalExpressionControlFlowReplacer="LogicalExpressionControlFlowReplacer",e.StringLiteralControlFlowReplacer="StringLiteralControlFlowReplacer"}(t.ControlFlowReplacer||(t.ControlFlowReplacer={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(13),f=r(31),d=r(3),p=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"getControlFlowStorageCallNode",value:function(e,t,r,n){var o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode);o.initialize(e,t,r,n);var a=o.getNode()[0];if(!a||!d.NodeGuards.isExpressionStatementNode(a))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return a.expression}}]),t}(f.AbstractControlFlowReplacer);p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],p),t.ExpressionWithOperatorControlFlowReplacer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BlockStatementDeadCodeInjectionNode="BlockStatementDeadCodeInjectionNode"}(t.DeadCodeInjectionCustomNode||(t.DeadCodeInjectionCustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.ConsoleOutputCustomNodeGroup="ConsoleOutputCustomNodeGroup",e.DebugProtectionCustomNodeGroup="DebugProtectionCustomNodeGroup",e.DomainLockCustomNodeGroup="DomainLockCustomNodeGroup",e.SelfDefendingCustomNodeGroup="SelfDefendingCustomNodeGroup",e.StringArrayCustomNodeGroup="StringArrayCustomNodeGroup"}(t.CustomNodeGroup||(t.CustomNodeGroup={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=r(0),i=r(1),s=function e(t,r){n(this,e),this.randomGenerator=t,this.options=r};s=o.__decorate([a.injectable(),o.__param(0,a.inject(i.ServiceIdentifiers.IRandomGenerator)),o.__param(1,a.inject(i.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object,Object])],s),t.AbstractIdentifierNamesGenerator=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BooleanLiteralObfuscatingReplacer="BooleanLiteralObfuscatingReplacer",e.NumberLiteralObfuscatingReplacer="NumberLiteralObfuscatingReplacer",e.StringLiteralObfuscatingReplacer="StringLiteralObfuscatingReplacer"}(t.LiteralObfuscatingReplacer||(t.LiteralObfuscatingReplacer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.BlackListNodeGuard="BlackListNodeGuard",e.ConditionalCommentNodeGuard="ConditionalCommentNodeGuard"}(t.ObfuscatingGuard||(t.ObfuscatingGuard={}))},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=function(){function e(t,r){o(this,e),this.randomGenerator=t,this.options=r}return i(e,[{key:"initialize",value:function(){this.storage=new Map,this.storageId=this.randomGenerator.getRandomString(6)}},{key:"get",value:function(e){var t=this.storage.get(e);if(!t)throw new Error("No value found in map storage with key `"+e+"`");return t}},{key:"getKeyOf",value:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i=this.storage[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=a(o.value,2),c=s[0];if(e===s[1])return c}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return null}},{key:"getLength",value:function(){return this.storage.size}},{key:"getStorage",value:function(){return this.storage}},{key:"getStorageId",value:function(){return this.storageId}},{key:"mergeWith",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.storage=new Map([].concat(n(this.storage),n(e.getStorage()))),t&&(this.storageId=e.getStorageId())}},{key:"set",value:function(e,t){this.storage.set(e,t)}}]),e}();s.__decorate([l.initializable(),s.__metadata("design:type",String)],f.prototype,"storageId",void 0),s.__decorate([l.initializable(),s.__metadata("design:type",Map)],f.prototype,"storage",void 0),s.__decorate([c.postConstruct(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],f.prototype,"initialize",null),f=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],f),t.MapStorage=f},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=a.__importDefault(r(166)),u=r(167),l=r(5),f=d=function(){function e(t,r){n(this,e),this.sourceCode=t,this.options=r}return o(e,[{key:"initialize",value:function(){var e=this;this.seed=0!==this.options.seed?this.options.seed:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)}(0,999999999),this.randomGenerator=new u.Chance(function(){var t=c.default(e.sourceCode.getSourceCode());return e.seed+Number(t.replace(/\D/g,""))}())}},{key:"getMathRandom",value:function(){return this.getRandomInteger(0,99999)/1e5}},{key:"getRandomFloat",value:function(e,t){return this.getRandomGenerator().floating({min:e,max:t,fixed:7})}},{key:"getRandomGenerator",value:function(){return this.randomGenerator}},{key:"getRandomInteger",value:function(e,t){return this.getRandomGenerator().integer({min:e,max:t})}},{key:"getRandomString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.randomGeneratorPool;return this.getRandomGenerator().string({length:e,pool:t})}},{key:"getSeed",value:function(){return this.seed}}]),e}();f.randomGeneratorPool="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",a.__decorate([l.initializable(),a.__metadata("design:type",Object)],f.prototype,"randomGenerator",void 0),a.__decorate([l.initializable(),a.__metadata("design:type",Number)],f.prototype,"seed",void 0),a.__decorate([i.postConstruct(),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],f.prototype,"initialize",null),f=d=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.ISourceCode)),a.__param(1,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object])],f),t.RandomGenerator=f;var d},function(e,t){e.exports=require("pjson")},function(e,t){e.exports=require("fs")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);e.exports=n.JavaScriptObfuscator},function(e,t){e.exports=require("reflect-metadata")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=r(0),a=r(1),i=r(36),s=r(52),c=r(53),u=r(54),l=r(55);t.analyzersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.IStackTraceAnalyzer).to(l.StackTraceAnalyzer).inSingletonScope(),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(s.FunctionDeclarationCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(c.FunctionExpressionCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(u.ObjectExpressionCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor),e(a.ServiceIdentifiers.Factory__ICalleeDataExtractor).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.ICalleeDataExtractor))})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=s.__importStar(r(10)),l=r(29),f=r(3),d=r(4),p=function(e){function t(){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"extract",value:function(e,t){if(!f.NodeGuards.isIdentifierNode(t))return null;var r=this.getCalleeBlockStatement(d.NodeUtils.getBlockScopesOfNode(e[0])[0],t.name);return r?{callee:r,name:t.name}:null}},{key:"getCalleeBlockStatement",value:function(e,t){var r=null;return u.traverse(e,{enter:function(e){if(f.NodeGuards.isFunctionDeclarationNode(e)&&e.id.name===t)return r=e.body,u.VisitorOption.Break}}),r}}]),t}(l.AbstractCalleeDataExtractor);p=s.__decorate([c.injectable()],p),t.FunctionDeclarationCalleeDataExtractor=p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=s.__importStar(r(10)),l=r(29),f=r(3),d=r(4),p=function(e){function t(){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"extract",value:function(e,t){var r=null;return f.NodeGuards.isIdentifierNode(t)&&(r=this.getCalleeBlockStatement(d.NodeUtils.getBlockScopesOfNode(e[0])[0],t.name)),f.NodeGuards.isFunctionExpressionNode(t)&&(r=t.body),r?{callee:r,name:t.name||null}:null}},{key:"getCalleeBlockStatement",value:function(e,t){var r=null;return u.traverse(e,{enter:function(e,n){if(f.NodeGuards.isFunctionExpressionNode(e)&&n&&f.NodeGuards.isVariableDeclaratorNode(n)&&f.NodeGuards.isIdentifierNode(n.id)&&n.id.name===t)return r=e.body,u.VisitorOption.Break}}),r}}]),t}(l.AbstractCalleeDataExtractor);p=s.__decorate([c.injectable()],p),t.FunctionExpressionCalleeDataExtractor=p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=s.__importStar(r(10)),l=r(29),f=r(3),d=r(4),p=function(e){function t(){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"extract",value:function(e,t){if(!f.NodeGuards.isMemberExpressionNode(t))return null;var r=this.createObjectMembersCallsChain([],t);if(!r.length)return null;var n=r[r.length-1],o=this.getCalleeBlockStatement(d.NodeUtils.getBlockScopesOfNode(e[0])[0],r);return o?{callee:o,name:n}:null}},{key:"createObjectMembersCallsChain",value:function(e,t){if(f.NodeGuards.isIdentifierNode(t.property)&&!1===t.computed)e.unshift(t.property.name);else{if(!f.NodeGuards.isLiteralNode(t.property)||"string"!=typeof t.property.value&&"number"!=typeof t.property.value)return e;e.unshift(t.property.value)}return f.NodeGuards.isMemberExpressionNode(t.object)?this.createObjectMembersCallsChain(e,t.object):(f.NodeGuards.isIdentifierNode(t.object)&&e.unshift(t.object.name),e)}},{key:"getCalleeBlockStatement",value:function(e,t){var r=this,n=t.shift();if(!n)return null;var o=null;return u.traverse(e,{enter:function(e){if(f.NodeGuards.isVariableDeclaratorNode(e)&&f.NodeGuards.isIdentifierNode(e.id)&&e.init&&f.NodeGuards.isObjectExpressionNode(e.init)&&e.id.name===n)return o=r.findCalleeBlockStatement(e.init.properties,t),u.VisitorOption.Break}}),o}},{key:"findCalleeBlockStatement",value:function(e,t){var r=t.shift();if(!r)return null;var n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var c=i.value,u=f.NodeGuards.isIdentifierNode(c.key)&&c.key.name===r,l=f.NodeGuards.isLiteralNode(c.key)&&Boolean(c.key.value)&&c.key.value===r;if(u||l){if(f.NodeGuards.isObjectExpressionNode(c.value))return this.findCalleeBlockStatement(c.value.properties,t);if(f.NodeGuards.isFunctionExpressionNode(c.value))return c.value.body}}}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return null}}]),t}(l.AbstractCalleeDataExtractor);p=s.__decorate([c.injectable()],p),t.ObjectExpressionCalleeDataExtractor=p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=a.__importStar(r(10)),u=r(36),l=r(3),f=r(4),d=p=function(){function e(t){n(this,e),this.calleeDataExtractorFactory=t}return o(e,[{key:"analyze",value:function(e){return this.analyzeRecursive(e.body)}},{key:"analyzeRecursive",value:function(e){for(var t=this,r=p.getLimitIndex(e.length),n=[],o=e.length,a=0;a<o;a++){if("break"===function(o){if(o>r)return"break";var a=e[o];c.traverse(a,{enter:function(r){if(l.NodeGuards.isCallExpressionNode(r))return a.parentNode!==f.NodeUtils.getBlockScopesOfNode(r)[0]?c.VisitorOption.Skip:void t.analyzeCallExpressionNode(n,e,r)}})}(a))break}return n}},{key:"analyzeCallExpressionNode",value:function(e,t,r){var n=this;p.calleeDataExtractorsList.forEach(function(o){var a=n.calleeDataExtractorFactory(o).extract(t,r.callee);a&&e.push(Object.assign({},a,{stackTrace:n.analyzeRecursive(a.callee.body)}))})}}],[{key:"getLimitIndex",value:function(e){var t=e-1,r=p.limitThresholdActivationLength-1,n=t;return t>r&&(n=Math.round(r+t*p.limitThreshold))>t&&(n=t),n}}]),e}();d.calleeDataExtractorsList=[u.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor,u.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor,u.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor],d.limitThresholdActivationLength=25,d.limitThreshold=.002,d=p=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__ICalleeDataExtractor)),a.__metadata("design:paramtypes",[Function])],d),t.StackTraceAnalyzer=d;var p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=r(0),a=r(1),i=r(38),s=r(20),c=r(57),u=r(58),l=r(59),f=r(60),d=r(61),p=r(62),m=r(63);t.controlFlowTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.INodeTransformer).to(u.BlockStatementControlFlowTransformer).whenTargetNamed(s.NodeTransformer.BlockStatementControlFlowTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(f.DeadCodeInjectionTransformer).whenTargetNamed(s.NodeTransformer.DeadCodeInjectionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(d.FunctionControlFlowTransformer).whenTargetNamed(s.NodeTransformer.FunctionControlFlowTransformer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(c.BinaryExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.BinaryExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(l.CallExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.CallExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(p.LogicalExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.LogicalExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(m.StringLiteralControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.StringLiteralControlFlowReplacer),e(a.ServiceIdentifiers.Factory__IControlFlowReplacer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.IControlFlowReplacer))})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(13),f=r(39),d=p=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"replace",value:function(e,t,r){var n=e.operator,o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.BinaryExpressionFunctionNode);o.initialize(n);var a=this.insertCustomNodeToControlFlowStorage(o,r,n,p.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a,e.left,e.right)}}]),t}(f.ExpressionWithOperatorControlFlowReplacer);d.usingExistingIdentifierChance=.5,d=p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],d),t.BinaryExpressionControlFlowReplacer=d;var p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(13),d=r(6),p=r(7),m=r(3),y=r(4),b=g=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a,i));return s.controlFlowCustomNodeFactory=e,s.arrayUtils=r,s}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case d.TransformationStage.ControlFlowFlattening:return{leave:function(e,r){if(r&&m.NodeGuards.isBlockStatementNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(this.randomGenerator.getMathRandom()>this.options.controlFlowFlatteningThreshold||!g.canTransformBlockStatementNode(e))return e;var r=e.body,n=this.arrayUtils.arrayRange(r.length),o=this.arrayUtils.arrayShuffle(n),a=n.map(function(e){return o.indexOf(e)}),i=this.controlFlowCustomNodeFactory(f.ControlFlowCustomNode.BlockStatementControlFlowFlatteningNode);i.initialize(r,o,a);var s=i.getNode()[0];return y.NodeUtils.parentizeNode(s,t),s}}],[{key:"blockStatementHasProhibitedStatements",value:function(e){return e.body.some(function(e){var t=m.NodeGuards.isBreakStatementNode(e)||m.NodeGuards.isContinueStatementNode(e),r=m.NodeGuards.isVariableDeclarationNode(e)&&("const"===e.kind||"let"===e.kind),n=m.NodeGuards.isClassDeclarationNode(e);return m.NodeGuards.isFunctionDeclarationNode(e)||t||r||n})}},{key:"canTransformBlockStatementNode",value:function(e){var t=!0;return l.traverse(e,{enter:function(e){if(m.NodeGuards.isWhileStatementNode(e))return l.VisitorOption.Skip;m.NodeGuards.isBlockStatementNode(e)&&g.blockStatementHasProhibitedStatements(e)&&(t=!1)}}),e.body.length<=4&&(t=!1),t}}]),t}(p.AbstractNodeTransformer);b=g=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.IArrayUtils)),s.__param(2,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object,Object])],b),t.BlockStatementControlFlowTransformer=b;var g},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(13),f=r(31),d=r(3),p=m=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"replace",value:function(e,t,r){var n=e.callee;if(!d.NodeGuards.isIdentifierNode(n))return e;var o=String(e.arguments.length),a=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.CallExpressionFunctionNode),i=e.arguments;a.initialize(i);var s=this.insertCustomNodeToControlFlowStorage(a,r,o,m.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),s,n,i)}},{key:"getControlFlowStorageCallNode",value:function(e,t,r,n){var o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.CallExpressionControlFlowStorageCallNode);o.initialize(e,t,r,n);var a=o.getNode()[0];if(!a||!d.NodeGuards.isExpressionStatementNode(a))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return a.expression}}]),t}(f.AbstractControlFlowReplacer);p.usingExistingIdentifierChance=.5,p=m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],p),t.CallExpressionControlFlowReplacer=p;var m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(40),d=r(20),p=r(11),m=r(6),y=r(7),b=r(3),g=r(9),v=r(4),_=h=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a,i));return s.deadCodeInjectionRootAstHostNodeSet=new Set,s.collectedBlockStatements=[],s.collectedBlockStatementsTotalLength=0,s.deadCodeInjectionCustomNodeFactory=e,s.transformersRunner=r,s}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case m.TransformationStage.DeadCodeInjection:return{enter:function(e,r){if(r&&b.NodeGuards.isProgramNode(e))return t.analyzeNode(e,r),e},leave:function(e,r){if(r&&b.NodeGuards.isBlockStatementNode(e))return t.transformNode(e,r)}};case m.TransformationStage.Finalizing:return this.deadCodeInjectionRootAstHostNodeSet.size?{enter:function(e,r){if(r&&t.isDeadCodeInjectionRootAstHostNode(e))return t.restoreNode(e,r)}}:null;default:return null}}},{key:"analyzeNode",value:function(e,t){var r=this;l.traverse(e,{enter:function(e){if(b.NodeGuards.isBlockStatementNode(e)){var t=v.NodeUtils.clone(e);h.isValidBlockStatementNode(t)&&(v.NodeUtils.parentizeNode(t,t),t=r.transformersRunner.transform(t,h.transformersToRenameBlockScopeIdentifiers,m.TransformationStage.Obfuscating),r.collectedBlockStatements.push(t))}}}),this.collectedBlockStatementsTotalLength=this.collectedBlockStatements.length}},{key:"transformNode",value:function(e,t){if(this.collectedBlockStatementsTotalLength<h.minCollectedBlockStatementsCount)return l.VisitorOption.Break;if(!this.collectedBlockStatements.length)return l.VisitorOption.Break;if(this.randomGenerator.getMathRandom()>this.options.deadCodeInjectionThreshold)return e;if(v.NodeUtils.getBlockScopesOfNode(e)[0].type===p.NodeType.Program)return e;var r=this.collectedBlockStatements.length-1,n=this.randomGenerator.getRandomInteger(0,r),o=this.collectedBlockStatements.splice(n,1)[0];return o===e?e:this.replaceBlockStatementNode(e,o,t)}},{key:"restoreNode",value:function(e,t){var r=e.body[0];if(!b.NodeGuards.isFunctionDeclarationNode(r))throw new Error("Wrong dead code injection root AST host node. Host node should contain `FunctionDeclaration` node");return r.body}},{key:"isDeadCodeInjectionRootAstHostNode",value:function(e){return b.NodeGuards.isBlockStatementNode(e)&&this.deadCodeInjectionRootAstHostNodeSet.has(e)}},{key:"replaceBlockStatementNode",value:function(e,t,r){var n=g.Nodes.getBlockStatementNode([g.Nodes.getFunctionDeclarationNode(h.deadCodeInjectionRootAstHostNodeName,[],t)]);this.deadCodeInjectionRootAstHostNodeSet.add(n);var o=this.deadCodeInjectionCustomNodeFactory(f.DeadCodeInjectionCustomNode.BlockStatementDeadCodeInjectionNode);o.initialize(e,n);var a=o.getNode()[0];return v.NodeUtils.parentizeNode(a,r),a}}],[{key:"isValidBlockStatementNode",value:function(e){var t=function(e){return b.NodeGuards.isBreakStatementNode(e)||b.NodeGuards.isContinueStatementNode(e)||b.NodeGuards.isAwaitExpressionNode(e)||b.NodeGuards.isSuperNode(e)},r=0,n=!0;return l.traverse(e,{enter:function(e){if(b.NodeGuards.isBlockStatementNode(e)&&r++,r>h.maxNestedBlockStatementsCount||t(e))return n=!1,l.VisitorOption.Break}}),n}}]),t}(y.AbstractNodeTransformer);_.deadCodeInjectionRootAstHostNodeName="deadCodeInjectionRootAstHostNode",_.maxNestedBlockStatementsCount=4,_.minCollectedBlockStatementsCount=5,_.transformersToRenameBlockScopeIdentifiers=[d.NodeTransformer.CatchClauseTransformer,d.NodeTransformer.ClassDeclarationTransformer,d.NodeTransformer.FunctionDeclarationTransformer,d.NodeTransformer.FunctionTransformer,d.NodeTransformer.LabeledStatementTransformer,d.NodeTransformer.VariableDeclarationTransformer],_=h=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IDeadCodeInjectionCustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.ITransformersRunner)),s.__param(2,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object,Object])],_),t.DeadCodeInjectionTransformer=_;var h},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(13),d=r(38),p=r(11),m=r(6),y=r(7),b=r(3),g=r(16),v=r(4),_=h=function(e){function t(e,r,a,i,s){n(this,t);var c=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i,s));return c.controlFlowData=new Map,c.visitedFunctionNodes=new Set,c.hostNodesWithControlFlowNode=new Set,c.controlFlowStorageFactory=e,c.controlFlowReplacerFactory=r,c.controlFlowCustomNodeFactory=a,c}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case m.TransformationStage.ControlFlowFlattening:return{leave:function(e,r){if(r&&(b.NodeGuards.isFunctionDeclarationNode(e)||b.NodeGuards.isFunctionExpressionNode(e)||b.NodeGuards.isArrowFunctionExpressionNode(e)))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(this.visitedFunctionNodes.add(e),!b.NodeGuards.isBlockStatementNode(e.body))return e;var r=this.getHostNode(e.body),n=this.getControlFlowStorage(r);if(this.controlFlowData.set(r,n),this.transformFunctionBody(e.body,n),!n.getLength())return e;var o=this.controlFlowCustomNodeFactory(f.ControlFlowCustomNode.ControlFlowStorageNode);return o.initialize(n),g.NodeAppender.prependNode(r,o.getNode()),this.hostNodesWithControlFlowNode.add(r),e}},{key:"getControlFlowStorage",value:function(e){var t=this.controlFlowStorageFactory();if(this.controlFlowData.has(e)){this.hostNodesWithControlFlowNode.has(e)&&e.body.shift();var r=this.controlFlowData.get(e);t.mergeWith(r,!0)}return t}},{key:"getHostNode",value:function(e){var t=v.NodeUtils.getBlockScopesOfNode(e);return 1===t.length?e:(t.pop(),t.length>h.hostNodeSearchMinDepth&&t.splice(0,h.hostNodeSearchMinDepth),t.length>h.hostNodeSearchMaxDepth&&(t.length=h.hostNodeSearchMaxDepth),this.randomGenerator.getRandomGenerator().pickone(t))}},{key:"isVisitedFunctionNode",value:function(e){return(b.NodeGuards.isFunctionDeclarationNode(e)||b.NodeGuards.isFunctionExpressionNode(e)||b.NodeGuards.isArrowFunctionExpressionNode(e))&&this.visitedFunctionNodes.has(e)}},{key:"transformFunctionBody",value:function(e,t){var r=this;l.replace(e,{enter:function(e,n){if(e.ignoredNode)return l.VisitorOption.Skip;if(r.isVisitedFunctionNode(e)||!n)return l.VisitorOption.Skip;if(!h.controlFlowReplacersMap.has(e.type))return e;if(r.randomGenerator.getMathRandom()>r.options.controlFlowFlatteningThreshold)return e;var o=h.controlFlowReplacersMap.get(e.type);return void 0===o?e:Object.assign({},r.controlFlowReplacerFactory(o).replace(e,n,t),{parentNode:n})}})}}]),t}(y.AbstractNodeTransformer);_.controlFlowReplacersMap=new Map([[p.NodeType.BinaryExpression,d.ControlFlowReplacer.BinaryExpressionControlFlowReplacer],[p.NodeType.CallExpression,d.ControlFlowReplacer.CallExpressionControlFlowReplacer],[p.NodeType.LogicalExpression,d.ControlFlowReplacer.LogicalExpressionControlFlowReplacer],[p.NodeType.Literal,d.ControlFlowReplacer.StringLiteralControlFlowReplacer]]),_.hostNodeSearchMinDepth=0,_.hostNodeSearchMaxDepth=2,_=h=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__TControlFlowStorage)),s.__param(1,c.inject(u.ServiceIdentifiers.Factory__IControlFlowReplacer)),s.__param(2,c.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),s.__param(3,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(4,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Function,Function,Object,Object])],_),t.FunctionControlFlowTransformer=_;var h},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(13),f=r(39),d=r(3),p=r(4),m=y=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"replace",value:function(e,t,r){if(this.checkForProhibitedExpressions(e.left,e.right))return e;var n=e.operator,o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.LogicalExpressionFunctionNode);o.initialize(n);var a=this.insertCustomNodeToControlFlowStorage(o,r,n,y.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a,e.left,e.right)}},{key:"checkForProhibitedExpressions",value:function(e,t){return[e,t].some(function(e){var t=void 0;return t=d.NodeGuards.isUnaryExpressionNode(e)?p.NodeUtils.getUnaryExpressionArgumentNode(e):e,!(d.NodeGuards.isLiteralNode(t)||d.NodeGuards.isIdentifierNode(t)||d.NodeGuards.isObjectExpressionNode(t)||d.NodeGuards.isExpressionStatementNode(t))})}}]),t}(f.ExpressionWithOperatorControlFlowReplacer);m.usingExistingIdentifierChance=.5,m=y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],m),t.LogicalExpressionControlFlowReplacer=m;var y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(13),f=r(31),d=r(3),p=m=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"replace",value:function(e,t,r){if(d.NodeGuards.isPropertyNode(t)&&t.key===e)return e;if("string"!=typeof e.value||e.value.length<3)return e;var n=String(e.value),o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.StringLiteralNode);o.initialize(e.value);var a=this.insertCustomNodeToControlFlowStorage(o,r,n,m.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a)}},{key:"getControlFlowStorageCallNode",value:function(e,t){var r=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.StringLiteralControlFlowStorageCallNode);r.initialize(e,t);var n=r.getNode()[0];if(!n||!d.NodeGuards.isExpressionStatementNode(n))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return n.expression}}]),t}(f.AbstractControlFlowReplacer);p.usingExistingIdentifierChance=1,p=m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],p),t.StringLiteralControlFlowReplacer=p;var m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1),a=r(20),i=r(65),s=r(66),c=r(67),u=r(68);t.convertingTransformersModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.INodeTransformer).to(i.MemberExpressionTransformer).whenTargetNamed(a.NodeTransformer.MemberExpressionTransformer),e(o.ServiceIdentifiers.INodeTransformer).to(s.MethodDefinitionTransformer).whenTargetNamed(a.NodeTransformer.MethodDefinitionTransformer),e(o.ServiceIdentifiers.INodeTransformer).to(c.ObjectExpressionKeysTransformer).whenTargetNamed(a.NodeTransformer.ObjectExpressionKeysTransformer),e(o.ServiceIdentifiers.INodeTransformer).to(u.TemplateLiteralTransformer).whenTargetNamed(a.NodeTransformer.TemplateLiteralTransformer)})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(11),f=r(6),d=r(7),p=r(3),m=function(e){function t(e,r){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Converting:return{enter:function(e,r){if(r&&p.NodeGuards.isMemberExpressionNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(p.NodeGuards.isIdentifierNode(e.property)){if(e.computed)return e;e.computed=!0,e.property={type:l.NodeType.Literal,value:e.property.name,raw:"'"+e.property.name+"'"}}return e}}]),t}(d.AbstractNodeTransformer);m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],m),t.MemberExpressionTransformer=m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(11),f=r(6),d=r(7),p=r(3),m=y=function(e){function t(e,r){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Converting:return{enter:function(e,r){if(r&&p.NodeGuards.isMethodDefinitionNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return p.NodeGuards.isIdentifierNode(e.key)&&-1===y.ignoredNames.indexOf(e.key.name)&&!1===e.computed&&(e.computed=!0,e.key={type:l.NodeType.Literal,value:e.key.name,raw:"'"+e.key.name+"'"}),e}}]),t}(d.AbstractNodeTransformer);m.ignoredNames=["constructor"],m=y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],m),t.MethodDefinitionTransformer=m;var y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=r(6),d=r(7),p=r(16),m=r(3),y=r(9),b=r(4),g=v=function(e){function t(e,r){n(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a.cachedScopeNodesMap=new Map,a}return a(t,e),s(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Converting:return{enter:function(e,r){if(t.options.transformObjectKeys&&r&&m.NodeGuards.isObjectExpressionNode(e)&&m.NodeGuards.isVariableDeclaratorNode(r))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(!m.NodeGuards.isIdentifierNode(t.id))return e;var r=b.NodeUtils.getScopeOfNode(t);return r&&m.NodeGuards.isNodeHasScope(r)?(this.cachedScopeNodesMap.set(t,r),this.transformObjectExpressionNode(e,t.id,t)):e}},{key:"extractPropertiesToExpressionStatements",value:function(e,t,r){for(var n=e.length,o=[],a=[],i=0;i<n;i++){var s=e[i],c=s.key;if(!(m.NodeGuards.isObjectPatternNode(s.value)||m.NodeGuards.isArrayPatternNode(s.value)||m.NodeGuards.isAssignmentPatternNode(s.value)||m.NodeGuards.isRestElementNode(s.value))){var u=void 0;if(m.NodeGuards.isLiteralNode(c)&&"string"==typeof c.value)u=c.value;else{if(!m.NodeGuards.isIdentifierNode(c))continue;u=c.name}var l=!s.computed||s.computed&&m.NodeGuards.isLiteralNode(s.key),f=l?y.Nodes.getLiteralNode(u):y.Nodes.getIdentifierNode(u),d=y.Nodes.getMemberExpressionNode(t,f,!0),p=s.value,b=y.Nodes.getExpressionStatementNode(y.Nodes.getAssignmentExpressionNode("=",d,p));m.NodeGuards.isObjectExpressionNode(s.value)&&this.transformObjectExpressionNode(s.value,d,r),o.push(b),a.push(i)}}return[o,a]}},{key:"transformObjectExpressionNode",value:function(e,t,r){var n=e.properties;if(!n.length)return e;var o=this.cachedScopeNodesMap.get(r);if(!o)return e;var a=this.extractPropertiesToExpressionStatements(n,t,r),s=i(a,2),c=s[0],u=s[1];return e.properties=v.filterObjectExpressionProperties(n,u),v.appendExpressionStatements(o,c,r),e}}],[{key:"appendExpressionStatements",value:function(e,t,r){var n=r.parentNode;if(!n||!m.NodeGuards.isVariableDeclarationNode(n))throw new Error("Cannot find variable declaration for variable declarator");p.NodeAppender.insertNodeAfter(e,t,n)}},{key:"filterObjectExpressionProperties",value:function(e,t){return e.filter(function(e,r){return!(-1!==t.indexOf(r))})}}]),t}(d.AbstractNodeTransformer);g=v=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(1,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Object,Object])],g),t.ObjectExpressionKeysTransformer=g;var v},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(6),f=r(7),d=r(3),p=r(9),m=y=function(e){function t(e,r){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case l.TransformationStage.Converting:return{enter:function(e,r){if(r&&d.NodeGuards.isTemplateLiteralNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=e.expressions,n=[];if(e.quasis.forEach(function(e){n.push(p.Nodes.getLiteralNode(e.value.cooked));var t=r.shift();t&&n.push(t)}),n=n.filter(function(e){return!(d.NodeGuards.isLiteralNode(e)&&""===e.value)}),y.isLiteralNodeWithStringValue(n[0])||y.isLiteralNodeWithStringValue(n[1])||n.unshift(p.Nodes.getLiteralNode("")),n.length>1){var o=p.Nodes.getBinaryExpressionNode("+",n.shift(),n.shift());return n.forEach(function(e){o=p.Nodes.getBinaryExpressionNode("+",o,e)}),o}return n[0]}}],[{key:"isLiteralNodeWithStringValue",value:function(e){return e&&d.NodeGuards.isLiteralNode(e)&&"string"==typeof e.value}}]),t}(f.AbstractNodeTransformer);m=y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],m),t.TemplateLiteralTransformer=m;var y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=r(0),a=r(1),i=r(13),s=r(21),c=r(41),u=r(40),l=r(70),f=r(71),d=r(72),p=r(73),m=r(74),y=r(75),b=r(78),g=r(79),v=r(80),_=r(81),h=r(82),N=r(83),S=r(85),O=r(87),j=r(89),C=r(93),w=r(95),I=r(96),T=r(97),F=r(99),E=r(101),k=r(108),P=r(110),x=r(114),R=r(115);t.customNodesModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.ICustomNode).to(N.ConsoleOutputDisableExpressionNode).whenTargetNamed(s.CustomNode.ConsoleOutputDisableExpressionNode),e(a.ServiceIdentifiers.ICustomNode).to(S.DebugProtectionFunctionCallNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionCallNode),e(a.ServiceIdentifiers.ICustomNode).to(O.DebugProtectionFunctionIntervalNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionIntervalNode),e(a.ServiceIdentifiers.ICustomNode).to(j.DebugProtectionFunctionNode).whenTargetNamed(s.CustomNode.DebugProtectionFunctionNode),e(a.ServiceIdentifiers.ICustomNode).to(C.DomainLockNode).whenTargetNamed(s.CustomNode.DomainLockNode),e(a.ServiceIdentifiers.ICustomNode).to(T.NodeCallsControllerFunctionNode).whenTargetNamed(s.CustomNode.NodeCallsControllerFunctionNode),e(a.ServiceIdentifiers.ICustomNode).to(F.SelfDefendingUnicodeNode).whenTargetNamed(s.CustomNode.SelfDefendingUnicodeNode),e(a.ServiceIdentifiers.ICustomNode).to(E.StringArrayCallsWrapper).whenTargetNamed(s.CustomNode.StringArrayCallsWrapper),e(a.ServiceIdentifiers.ICustomNode).to(k.StringArrayNode).whenTargetNamed(s.CustomNode.StringArrayNode),e(a.ServiceIdentifiers.ICustomNode).to(P.StringArrayRotateFunctionNode).whenTargetNamed(s.CustomNode.StringArrayRotateFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(y.BinaryExpressionFunctionNode).whenTargetNamed(i.ControlFlowCustomNode.BinaryExpressionFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(b.BlockStatementControlFlowFlatteningNode).whenTargetNamed(i.ControlFlowCustomNode.BlockStatementControlFlowFlatteningNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(v.CallExpressionControlFlowStorageCallNode).whenTargetNamed(i.ControlFlowCustomNode.CallExpressionControlFlowStorageCallNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(_.CallExpressionFunctionNode).whenTargetNamed(i.ControlFlowCustomNode.CallExpressionFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(h.ControlFlowStorageNode).whenTargetNamed(i.ControlFlowCustomNode.ControlFlowStorageNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(w.ExpressionWithOperatorControlFlowStorageCallNode).whenTargetNamed(i.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(I.LogicalExpressionFunctionNode).whenTargetNamed(i.ControlFlowCustomNode.LogicalExpressionFunctionNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(R.StringLiteralNode).whenTargetNamed(i.ControlFlowCustomNode.StringLiteralNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(x.StringLiteralControlFlowStorageCallNode).whenTargetNamed(i.ControlFlowCustomNode.StringLiteralControlFlowStorageCallNode),e(a.ServiceIdentifiers.Newable__ICustomNode).toConstructor(g.BlockStatementDeadCodeInjectionNode).whenTargetNamed(u.DeadCodeInjectionCustomNode.BlockStatementDeadCodeInjectionNode),e(a.ServiceIdentifiers.ICustomNodeGroup).to(l.ConsoleOutputCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.ConsoleOutputCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(f.DebugProtectionCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.DebugProtectionCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(d.DomainLockCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.DomainLockCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(p.SelfDefendingCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.SelfDefendingCustomNodeGroup),e(a.ServiceIdentifiers.ICustomNodeGroup).to(m.StringArrayCustomNodeGroup).whenTargetNamed(c.CustomNodeGroup.StringArrayCustomNodeGroup),e(a.ServiceIdentifiers.Factory__ICustomNode).toFactory(n.InversifyContainerFacade.getFactory(a.ServiceIdentifiers.ICustomNode)),e(a.ServiceIdentifiers.Factory__IControlFlowCustomNode).toFactory(n.InversifyContainerFacade.getConstructorFactory(a.ServiceIdentifiers.Newable__ICustomNode,a.ServiceIdentifiers.Factory__IIdentifierNamesGenerator,a.ServiceIdentifiers.IRandomGenerator,a.ServiceIdentifiers.IOptions)),e(a.ServiceIdentifiers.Factory__IDeadCodeInjectionCustomNode).toFactory(n.InversifyContainerFacade.getConstructorFactory(a.ServiceIdentifiers.Newable__ICustomNode,a.ServiceIdentifiers.Factory__IIdentifierNamesGenerator,a.ServiceIdentifiers.IRandomGenerator,a.ServiceIdentifiers.IOptions)),e(a.ServiceIdentifiers.Factory__ICustomNodeGroup).toFactory(n.InversifyContainerFacade.getFactory(a.ServiceIdentifiers.ICustomNodeGroup))})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(21),d=r(17),p=r(23),m=r(16),y=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a,i));return s.appendEvent=d.ObfuscationEvent.BeforeObfuscation,s.customNodeFactory=e,s}return a(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(f.CustomNode.ConsoleOutputDisableExpressionNode,function(n){m.NodeAppender.appendNodeToOptimalBlockScope(t,e,n.getNode(),r)}),this.appendCustomNodeIfExist(f.CustomNode.NodeCallsControllerFunctionNode,function(n){var o=void 0;o=t.length?m.NodeAppender.getOptimalBlockScope(t,r,1):e,m.NodeAppender.prependNode(o,n.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new Map,this.options.disableConsoleOutput){var e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(f.CustomNode.ConsoleOutputDisableExpressionNode),r=this.customNodeFactory(f.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(f.CustomNode.ConsoleOutputDisableExpressionNode,t),this.customNodes.set(f.CustomNode.NodeCallsControllerFunctionNode,r)}}}]),t}(p.AbstractCustomNodeGroup);s.__decorate([l.initializable(),s.__metadata("design:type",Map)],y.prototype,"customNodes",void 0),y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__ICustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Function,Object,Object])],y),t.ConsoleOutputCustomNodeGroup=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(21),d=r(17),p=r(23),m=r(16),y=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a,i));return s.appendEvent=d.ObfuscationEvent.BeforeObfuscation,s.customNodeFactory=e,s}return a(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this,n=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(f.CustomNode.DebugProtectionFunctionCallNode,function(r){m.NodeAppender.appendNodeToOptimalBlockScope(t,e,r.getNode(),n)}),this.appendCustomNodeIfExist(f.CustomNode.DebugProtectionFunctionNode,function(t){m.NodeAppender.appendNode(e,t.getNode())}),this.appendCustomNodeIfExist(f.CustomNode.DebugProtectionFunctionIntervalNode,function(t){var n=e.body.length,o=r.randomGenerator.getRandomInteger(0,n);m.NodeAppender.insertNodeAtIndex(e,t.getNode(),o)}),this.appendCustomNodeIfExist(f.CustomNode.NodeCallsControllerFunctionNode,function(r){var o=void 0;o=t.length?m.NodeAppender.getOptimalBlockScope(t,n,1):e,m.NodeAppender.prependNode(o,r.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new Map,this.options.debugProtection){var e=this.identifierNamesGenerator.generate(),t=this.identifierNamesGenerator.generate(),r=this.customNodeFactory(f.CustomNode.DebugProtectionFunctionNode),n=this.customNodeFactory(f.CustomNode.DebugProtectionFunctionCallNode),o=this.customNodeFactory(f.CustomNode.DebugProtectionFunctionIntervalNode),a=this.customNodeFactory(f.CustomNode.NodeCallsControllerFunctionNode);r.initialize(e),n.initialize(e,t),o.initialize(e),a.initialize(this.appendEvent,t),this.customNodes.set(f.CustomNode.DebugProtectionFunctionNode,r),this.customNodes.set(f.CustomNode.DebugProtectionFunctionCallNode,n),this.options.debugProtectionInterval&&this.customNodes.set(f.CustomNode.DebugProtectionFunctionIntervalNode,o),this.customNodes.set(f.CustomNode.NodeCallsControllerFunctionNode,a)}}}]),t}(p.AbstractCustomNodeGroup);s.__decorate([l.initializable(),s.__metadata("design:type",Map)],y.prototype,"customNodes",void 0),y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__ICustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Function,Object,Object])],y),t.DebugProtectionCustomNodeGroup=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(21),d=r(17),p=r(23),m=r(16),y=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a,i));return s.appendEvent=d.ObfuscationEvent.BeforeObfuscation,s.customNodeFactory=e,s}return a(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(f.CustomNode.DomainLockNode,function(n){m.NodeAppender.appendNodeToOptimalBlockScope(t,e,n.getNode(),r)}),this.appendCustomNodeIfExist(f.CustomNode.NodeCallsControllerFunctionNode,function(n){var o=void 0;o=t.length?m.NodeAppender.getOptimalBlockScope(t,r,1):e,m.NodeAppender.prependNode(o,n.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new Map,this.options.domainLock.length){var e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(f.CustomNode.DomainLockNode),r=this.customNodeFactory(f.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(f.CustomNode.DomainLockNode,t),this.customNodes.set(f.CustomNode.NodeCallsControllerFunctionNode,r)}}}]),t}(p.AbstractCustomNodeGroup);s.__decorate([l.initializable(),s.__metadata("design:type",Map)],y.prototype,"customNodes",void 0),y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__ICustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Function,Object,Object])],y),t.DomainLockCustomNodeGroup=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(21),d=r(17),p=r(23),m=r(16),y=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a,i));return s.appendEvent=d.ObfuscationEvent.AfterObfuscation,s.customNodeFactory=e,s}return a(t,e),i(t,[{key:"appendCustomNodes",value:function(e,t){var r=this.getRandomStackTraceIndex(t.length);this.appendCustomNodeIfExist(f.CustomNode.SelfDefendingUnicodeNode,function(n){m.NodeAppender.appendNodeToOptimalBlockScope(t,e,n.getNode(),r)}),this.appendCustomNodeIfExist(f.CustomNode.NodeCallsControllerFunctionNode,function(n){var o=void 0;o=t.length?m.NodeAppender.getOptimalBlockScope(t,r,1):e,m.NodeAppender.prependNode(o,n.getNode())})}},{key:"initialize",value:function(){if(this.customNodes=new Map,this.options.selfDefending){var e=this.identifierNamesGenerator.generate(),t=this.customNodeFactory(f.CustomNode.SelfDefendingUnicodeNode),r=this.customNodeFactory(f.CustomNode.NodeCallsControllerFunctionNode);t.initialize(e),r.initialize(this.appendEvent,e),this.customNodes.set(f.CustomNode.SelfDefendingUnicodeNode,t),this.customNodes.set(f.CustomNode.NodeCallsControllerFunctionNode,r)}}}]),t}(p.AbstractCustomNodeGroup);s.__decorate([l.initializable(),s.__metadata("design:type",Map)],y.prototype,"customNodes",void 0),y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__ICustomNode)),s.__param(1,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Function,Object,Object])],y),t.SelfDefendingCustomNodeGroup=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=r(5),d=r(21),p=r(17),m=r(23),y=r(16),b=function(e){function t(e,r,a,i,s){n(this,t);var c=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a,i,s));return c.appendEvent=p.ObfuscationEvent.AfterObfuscation,c.customNodeFactory=e,c.stringArrayStorage=r,c}return a(t,e),s(t,[{key:"appendCustomNodes",value:function(e,t){this.stringArrayStorage.getLength()&&(this.appendCustomNodeIfExist(d.CustomNode.StringArrayNode,function(t){y.NodeAppender.prependNode(e,t.getNode())}),this.appendCustomNodeIfExist(d.CustomNode.StringArrayCallsWrapper,function(t){y.NodeAppender.insertNodeAtIndex(e,t.getNode(),1)}),this.appendCustomNodeIfExist(d.CustomNode.StringArrayRotateFunctionNode,function(t){y.NodeAppender.insertNodeAtIndex(e,t.getNode(),1)}))}},{key:"initialize",value:function(){if(this.customNodes=new Map,this.options.stringArray){var e=this.customNodeFactory(d.CustomNode.StringArrayNode),t=this.customNodeFactory(d.CustomNode.StringArrayCallsWrapper),r=this.customNodeFactory(d.CustomNode.StringArrayRotateFunctionNode),n=this.stringArrayStorage.getStorageId(),o=n.split("|"),a=i(o,2),s=a[0],c=a[1],u=void 0;u=this.options.rotateStringArray?this.randomGenerator.getRandomInteger(100,500):0,e.initialize(this.stringArrayStorage,s,u),t.initialize(s,c),r.initialize(s,u),this.customNodes.set(d.CustomNode.StringArrayNode,e),this.customNodes.set(d.CustomNode.StringArrayCallsWrapper,t),this.options.rotateStringArray&&this.customNodes.set(d.CustomNode.StringArrayRotateFunctionNode,r)}}}]),t}(m.AbstractCustomNodeGroup);c.__decorate([f.initializable(),c.__metadata("design:type",Map)],b.prototype,"customNodes",void 0),b=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__ICustomNode)),c.__param(1,u.inject(l.ServiceIdentifiers.TStringArrayStorage)),c.__param(2,u.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(3,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(4,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Function,Object,Object])],b),t.StringArrayCustomNodeGroup=b},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(8),d=r(9),p=r(4),m=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e){this.operator=e}},{key:"getNodeStructure",value:function(){var e=d.Nodes.getExpressionStatementNode(d.Nodes.getFunctionExpressionNode([d.Nodes.getIdentifierNode("x"),d.Nodes.getIdentifierNode("y")],d.Nodes.getBlockStatementNode([d.Nodes.getReturnStatementNode(d.Nodes.getBinaryExpressionNode(this.operator,d.Nodes.getIdentifierNode("x"),d.Nodes.getIdentifierNode("y")))])));return p.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);s.__decorate([l.initializable(),s.__metadata("design:type",String)],m.prototype,"operator",void 0),m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],m),t.BinaryExpressionFunctionNode=m},function(e,t,r){"use strict";function n(){return"\n var that;\n \n try {\n var getGlobal = Function('return (function() ' + '{}.constructor(\"return this\")( )' + ');');\n \n that = getGlobal();\n } catch (e) {\n that = window;\n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableTemplate1=n},function(e,t,r){"use strict";function n(){return"\n var getGlobal = function () {\n var globalObject;\n \n try {\n globalObject = Function('return (function() ' + '{}.constructor(\"return this\")( )' + ');')();\n } catch (e) {\n globalObject = window;\n }\n \n return globalObject;\n };\n var that = getGlobal();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableTemplate2=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(8),d=r(3),p=r(9),m=r(4),y=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e,t,r){this.blockStatementBody=e,this.shuffledKeys=t,this.originalKeysIndexesInShuffledArray=r}},{key:"getNodeStructure",value:function(){var e=this,t=this.randomGenerator.getRandomString(6),r=this.randomGenerator.getRandomString(6),n=p.Nodes.getBlockStatementNode([p.Nodes.getVariableDeclarationNode([p.Nodes.getVariableDeclaratorNode(p.Nodes.getIdentifierNode(t),p.Nodes.getCallExpressionNode(p.Nodes.getMemberExpressionNode(p.Nodes.getLiteralNode(this.originalKeysIndexesInShuffledArray.join("|")),p.Nodes.getIdentifierNode("split")),[p.Nodes.getLiteralNode("|")])),p.Nodes.getVariableDeclaratorNode(p.Nodes.getIdentifierNode(r),p.Nodes.getLiteralNode(0))]),p.Nodes.getWhileStatementNode(p.Nodes.getLiteralNode(!0),p.Nodes.getBlockStatementNode([p.Nodes.getSwitchStatementNode(p.Nodes.getMemberExpressionNode(p.Nodes.getIdentifierNode(t),p.Nodes.getUpdateExpressionNode("++",p.Nodes.getIdentifierNode(r)),!0),this.shuffledKeys.map(function(t,r){var n=e.blockStatementBody[t],o=[n];return d.NodeGuards.isReturnStatementNode(n)||o.push(p.Nodes.getContinueStatement()),p.Nodes.getSwitchCaseNode(p.Nodes.getLiteralNode(String(r)),o)})),p.Nodes.getBreakStatement()]))]);return m.NodeUtils.parentize(n),[n]}}]),t}(f.AbstractCustomNode);s.__decorate([l.initializable(),s.__metadata("design:type",Array)],y.prototype,"blockStatementBody",void 0),s.__decorate([l.initializable(),s.__metadata("design:type",Array)],y.prototype,"originalKeysIndexesInShuffledArray",void 0),s.__decorate([l.initializable(),s.__metadata("design:type",Array)],y.prototype,"shuffledKeys",void 0),y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],y),t.BlockStatementControlFlowFlatteningNode=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=r(5),d=r(8),p=r(9),m=r(4),y=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),s(t,[{key:"initialize",value:function(e,t){this.blockStatementNode=e,this.deadCodeInjectionRootAstHostNode=t}},{key:"getNodeStructure",value:function(){var e=this.randomGenerator.getMathRandom()>.5,t=this.randomGenerator.getMathRandom()>.5,r=e?"===":"!==",n=this.randomGenerator.getRandomString(5),o=t?n:this.randomGenerator.getRandomString(5),a=e===t?[this.blockStatementNode,this.deadCodeInjectionRootAstHostNode]:[this.deadCodeInjectionRootAstHostNode,this.blockStatementNode],s=i(a,2),c=s[0],u=s[1],l=p.Nodes.getBlockStatementNode([p.Nodes.getIfStatementNode(p.Nodes.getBinaryExpressionNode(r,p.Nodes.getLiteralNode(n),p.Nodes.getLiteralNode(o)),c,u)]);return m.NodeUtils.parentize(l),[l]}}]),t}(d.AbstractCustomNode);c.__decorate([f.initializable(),c.__metadata("design:type",Object)],y.prototype,"blockStatementNode",void 0),c.__decorate([f.initializable(),c.__metadata("design:type",Object)],y.prototype,"deadCodeInjectionRootAstHostNode",void 0),y=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],y),t.BlockStatementDeadCodeInjectionNode=y},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=r(5),d=r(8),p=r(9),m=r(4),y=function(e){function t(e,r,n){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n))}return i(t,e),s(t,[{key:"initialize",value:function(e,t,r,n){this.controlFlowStorageName=e,this.controlFlowStorageKey=t,this.callee=r,this.expressionArguments=n}},{key:"getNodeStructure",value:function(){var e=p.Nodes.getExpressionStatementNode(p.Nodes.getCallExpressionNode(p.Nodes.getMemberExpressionNode(p.Nodes.getIdentifierNode(this.controlFlowStorageName),p.Nodes.getIdentifierNode(this.controlFlowStorageKey)),[this.callee].concat(n(this.expressionArguments))));return m.NodeUtils.parentize(e),[e]}}]),t}(d.AbstractCustomNode);c.__decorate([f.initializable(),c.__metadata("design:type",Object)],y.prototype,"callee",void 0),c.__decorate([f.initializable(),c.__metadata("design:type",String)],y.prototype,"controlFlowStorageKey",void 0),c.__decorate([f.initializable(),c.__metadata("design:type",String)],y.prototype,"controlFlowStorageName",void 0),c.__decorate([f.initializable(),c.__metadata("design:type",Array)],y.prototype,"expressionArguments",void 0),y=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],y),t.CallExpressionControlFlowStorageCallNode=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(8),d=r(9),p=r(4),m=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e){this.expressionArguments=e}},{key:"getNodeStructure",value:function(){for(var e=d.Nodes.getIdentifierNode("callee"),t=[],r=this.expressionArguments.length,n=0;n<r;n++)t.push(d.Nodes.getIdentifierNode("param"+(n+1)));var o=d.Nodes.getExpressionStatementNode(d.Nodes.getFunctionExpressionNode([e].concat(t),d.Nodes.getBlockStatementNode([d.Nodes.getReturnStatementNode(d.Nodes.getCallExpressionNode(e,t))])));return p.NodeUtils.parentize(o),[o]}}]),t}(f.AbstractCustomNode);s.__decorate([l.initializable(),s.__metadata("design:type",Array)],m.prototype,"expressionArguments",void 0),m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],m),t.CallExpressionFunctionNode=m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=r(5),d=r(8),p=r(3),m=r(9),y=r(4),b=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),s(t,[{key:"initialize",value:function(e){this.controlFlowStorage=e}},{key:"getNodeStructure",value:function(){var e=Array.from(this.controlFlowStorage.getStorage()).map(function(e){var t=i(e,2),r=t[0],n=t[1],o=n.getNode()[0];if(!p.NodeGuards.isExpressionStatementNode(o))throw new Error("Function node for control flow storage object should be passed inside the `ExpressionStatement` node!");return m.Nodes.getPropertyNode(m.Nodes.getIdentifierNode(r),o.expression)}),t=m.Nodes.getVariableDeclarationNode([m.Nodes.getVariableDeclaratorNode(m.Nodes.getIdentifierNode(this.controlFlowStorage.getStorageId()),m.Nodes.getObjectExpressionNode(e))]);return t=y.NodeUtils.parentize(t),[t]}}]),t}(d.AbstractCustomNode);c.__decorate([f.initializable(),c.__metadata("design:type",Object)],b.prototype,"controlFlowStorage",void 0),b=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],b),t.ControlFlowStorageNode=b},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(14),d=r(84),p=r(32),m=r(5),y=r(8),b=r(4),g=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e){this.callsControllerFunctionName=e}},{key:"getNodeStructure",value:function(){return b.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.options.target!==f.ObfuscationTarget.Extension?this.getGlobalVariableTemplate():p.GlobalVariableNoEvalTemplate();return l.default(d.ConsoleOutputDisableExpressionTemplate(),{consoleLogDisableFunctionName:this.identifierNamesGenerator.generate(),globalVariableTemplate:e,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(y.AbstractCustomNode);s.__decorate([m.initializable(),s.__metadata("design:type",String)],g.prototype,"callsControllerFunctionName",void 0),g=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],g),t.ConsoleOutputDisableExpressionNode=g},function(e,t,r){"use strict";function n(){return"\n var {consoleLogDisableFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n var func = function () {};\n \n {globalVariableTemplate}\n \n if (!that.console) {\n that.console = (function (func){\n var c = {};\n \n c.log = func;\n c.warn = func;\n c.debug = func;\n c.info = func;\n c.error = func;\n c.exception = func;\n c.trace = func;\n \n return c;\n })(func);\n } else {\n that.console.log = func;\n that.console.warn = func;\n that.console.debug = func;\n that.console.info = func;\n that.console.error = func;\n that.console.exception = func;\n that.console.trace = func;\n }\n });\n \n {consoleLogDisableFunctionName}();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleOutputDisableExpressionTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(5),d=r(86),p=r(8),m=r(4),y=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e,t){this.debugProtectionFunctionName=e,this.callsControllerFunctionName=t}},{key:"getNodeStructure",value:function(){return m.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return l.default(d.DebugProtectionFunctionCallTemplate(),{debugProtectionFunctionName:this.debugProtectionFunctionName,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(p.AbstractCustomNode);s.__decorate([f.initializable(),s.__metadata("design:type",String)],y.prototype,"callsControllerFunctionName",void 0),s.__decorate([f.initializable(),s.__metadata("design:type",String)],y.prototype,"debugProtectionFunctionName",void 0),y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],y),t.DebugProtectionFunctionCallNode=y},function(e,t,r){"use strict";function n(){return"\n (function () {\n {singleNodeCallControllerFunctionName}(this, function () {\n var regExp1 = new RegExp('function *\\\\( *\\\\)');\n var regExp2 = new RegExp('\\\\+\\\\+ *\\(?:_0x(?:[a-f0-9]){4,6}|(?:\\\\b|\\\\d)[a-z0-9]{1,4}(?:\\\\b|\\\\d)\\)', 'i');\n \n var result = {debugProtectionFunctionName}('init');\n \n if (!regExp1.test(result + 'chain') || !regExp2.test(result + 'input')) {\n result('0');\n } else {\n {debugProtectionFunctionName}();\n }\n })();\n })();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionCallTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(5),d=r(88),p=r(8),m=r(4),y=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e){this.debugProtectionFunctionName=e}},{key:"getNodeStructure",value:function(){return m.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return l.default(d.DebugProtectionFunctionIntervalTemplate(),{debugProtectionFunctionName:this.debugProtectionFunctionName})}}]),t}(p.AbstractCustomNode);s.__decorate([f.initializable(),s.__metadata("design:type",String)],y.prototype,"debugProtectionFunctionName",void 0),y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],y),t.DebugProtectionFunctionIntervalNode=y},function(e,t,r){"use strict";function n(){return"\n setInterval(function () {\n {debugProtectionFunctionName}();\n }, 4000);\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionIntervalTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(14),d=r(5),p=r(90),m=r(91),y=r(92),b=r(8),g=r(4),v=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e){this.debugProtectionFunctionName=e}},{key:"getNodeStructure",value:function(){return g.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.options.target!==f.ObfuscationTarget.Extension?p.DebuggerTemplate():m.DebuggerTemplateNoEval();return l.default(y.DebugProtectionFunctionTemplate(),{debuggerTemplate:e,debugProtectionFunctionName:this.debugProtectionFunctionName})}}]),t}(b.AbstractCustomNode);s.__decorate([d.initializable(),s.__metadata("design:type",String)],v.prototype,"debugProtectionFunctionName",void 0),v=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],v),t.DebugProtectionFunctionNode=v},function(e,t,r){"use strict";function n(){return"\n if (typeof counter === 'string') {\n return (function (arg) {}.constructor('while (true) {}').apply('counter'));\n } else {\n if (('' + counter / counter)['length'] !== 1 || counter % 20 === 0) {\n (function () {return true;}.constructor('debu' + 'gger').call('action'));\n } else {\n (function () {return false;}.constructor('debu' + 'gger').apply('stateObject'));\n }\n \n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerTemplate=n},function(e,t,r){"use strict";function n(){return"\n if (typeof counter === 'string') {\n var func = function () {\n while (true) {}\n };\n \n return func();\n } else {\n if (('' + counter / counter)['length'] !== 1 || counter % 20 === 0) {\n debugger;\n } else {\n debugger;\n }\n \n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerTemplateNoEval=n},function(e,t,r){"use strict";function n(){return"\n function {debugProtectionFunctionName} (ret) {\n function debuggerProtection (counter) {\n \n {debuggerTemplate}\n \n debuggerProtection(++counter);\n }\n \n try {\n if (ret) {\n return debuggerProtection;\n } else {\n debuggerProtection(0);\n }\n } catch (y) {}\n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProtectionFunctionTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=c.__importDefault(r(12)),d=r(14),p=r(5),m=r(94),y=r(32),b=r(8),g=r(4),v=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,i));return s.cryptUtils=a,s}return a(t,e),s(t,[{key:"initialize",value:function(e){this.callsControllerFunctionName=e}},{key:"getNodeStructure",value:function(){return g.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.options.domainLock.join(";"),t=this.cryptUtils.hideString(e,3*e.length),r=i(t,2),n=r[0],o=r[1],a=this.options.target!==d.ObfuscationTarget.Extension?this.getGlobalVariableTemplate():y.GlobalVariableNoEvalTemplate();return f.default(m.DomainLockNodeTemplate(),{domainLockFunctionName:this.identifierNamesGenerator.generate(),diff:o,domains:n,globalVariableTemplate:a,singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(b.AbstractCustomNode);c.__decorate([p.initializable(),c.__metadata("design:type",String)],v.prototype,"callsControllerFunctionName",void 0),v=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(l.ServiceIdentifiers.ICryptUtils)),c.__param(3,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object,Object])],v),t.DomainLockNode=v},function(e,t,r){"use strict";function n(){return'\n var {domainLockFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n \n {globalVariableTemplate}\n \n var func = function () {\n return {\n key: \'item\',\n value: \'attribute\',\n getAttribute: function () {\n for (var i = 0; i < 1000; i--) {\n var isPositive = i > 0;\n \n switch (isPositive) {\n case true:\n return this.item + \'_\' + this.value + \'_\' + i;\n default:\n this.item + \'_\' + this.value;\n }\n }\n }()\n };\n };\n \n var regExp = new RegExp("[{diff}]", "g");\n var domains = "{domains}".replace(regExp, "").split(";");\n var document;\n var domain;\n \n for (var d in that) {\n if (d.length == 8 && d.charCodeAt(7) == 116 && d.charCodeAt(5) == 101 && d.charCodeAt(3) == 117 && d.charCodeAt(0) == 100) {\n document = d;\n \n break;\n }\n }\n\n for (var d1 in that[document]) {\n if (d1.length == 6 && d1.charCodeAt(5) == 110 && d1.charCodeAt(0) == 100) {\n domain = d1;\n \n break;\n }\n }\n \n if ((!document && !domain) || (!that[document] && !that[document][domain])) {\n return;\n }\n \n var currentDomain = that[document][domain];\n\n var ok = false;\n \n for (var i = 0; i < domains.length; i++) {\n var domain = domains[i];\n var position = currentDomain.length - domain.length;\n var lastIndex = currentDomain.indexOf(domain, position);\n var endsWith = lastIndex !== -1 && lastIndex === position;\n \n if (endsWith) {\n if (currentDomain.length == domain.length || domain.indexOf(".") === 0) {\n ok = true;\n }\n \n break;\n }\n }\n \n if (!ok) {\n data;\n } else {\n return;\n }\n \n func();\n });\n\n {domainLockFunctionName}();\n '}Object.defineProperty(t,"__esModule",{value:!0}),t.DomainLockNodeTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(8),d=r(9),p=r(4),m=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e,t,r,n){this.controlFlowStorageName=e,this.controlFlowStorageKey=t,this.leftValue=r,this.rightValue=n}},{key:"getNodeStructure",value:function(){var e=d.Nodes.getExpressionStatementNode(d.Nodes.getCallExpressionNode(d.Nodes.getMemberExpressionNode(d.Nodes.getIdentifierNode(this.controlFlowStorageName),d.Nodes.getIdentifierNode(this.controlFlowStorageKey)),[this.leftValue,this.rightValue]));return p.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);s.__decorate([l.initializable(),s.__metadata("design:type",String)],m.prototype,"controlFlowStorageKey",void 0),s.__decorate([l.initializable(),s.__metadata("design:type",String)],m.prototype,"controlFlowStorageName",void 0),s.__decorate([l.initializable(),s.__metadata("design:type",Object)],m.prototype,"leftValue",void 0),s.__decorate([l.initializable(),s.__metadata("design:type",Object)],m.prototype,"rightValue",void 0),m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],m),t.ExpressionWithOperatorControlFlowStorageCallNode=m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(8),d=r(9),p=r(4),m=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e){this.operator=e}},{key:"getNodeStructure",value:function(){var e=d.Nodes.getExpressionStatementNode(d.Nodes.getFunctionExpressionNode([d.Nodes.getIdentifierNode("x"),d.Nodes.getIdentifierNode("y")],d.Nodes.getBlockStatementNode([d.Nodes.getReturnStatementNode(d.Nodes.getLogicalExpressionNode(this.operator,d.Nodes.getIdentifierNode("x"),d.Nodes.getIdentifierNode("y")))])));return p.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);s.__decorate([l.initializable(),s.__metadata("design:type",String)],m.prototype,"operator",void 0),m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],m),t.LogicalExpressionFunctionNode=m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(17),d=r(5),p=r(98),m=r(27),y=r(8),b=r(19),g=r(4),v=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e,t){this.appendEvent=e,this.callsControllerFunctionName=t}},{key:"getNodeStructure",value:function(){return g.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return this.appendEvent===f.ObfuscationEvent.AfterObfuscation?b.JavaScriptObfuscator.obfuscate(l.default(p.SingleNodeCallControllerTemplate(),{singleNodeCallControllerFunctionName:this.callsControllerFunctionName}),Object.assign({},m.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed})).getObfuscatedCode():l.default(p.SingleNodeCallControllerTemplate(),{singleNodeCallControllerFunctionName:this.callsControllerFunctionName})}}]),t}(y.AbstractCustomNode);s.__decorate([d.initializable(),s.__metadata("design:type",String)],v.prototype,"callsControllerFunctionName",void 0),s.__decorate([d.initializable(),s.__metadata("design:type",String)],v.prototype,"appendEvent",void 0),v=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],v),t.NodeCallsControllerFunctionNode=v},function(e,t,r){"use strict";function n(){return"\n var {singleNodeCallControllerFunctionName} = (function(){\n var firstCall = true;\n \n return function (context, fn){\n var rfn = firstCall ? function(){\n if(fn){\n var res = fn.apply(context, arguments);\n fn = null;\n return res;\n }\n } : function(){}\n \n firstCall = false;\n \n return rfn;\n }\n })();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.SingleNodeCallControllerTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(5),d=r(27),p=r(100),m=r(8),y=r(19),b=r(4),g=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,i));return s.escapeSequenceEncoder=a,s}return a(t,e),i(t,[{key:"initialize",value:function(e){this.callsControllerFunctionName=e}},{key:"getNodeStructure",value:function(){return b.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return y.JavaScriptObfuscator.obfuscate(l.default(p.SelfDefendingTemplate(this.escapeSequenceEncoder),{selfDefendingFunctionName:this.identifierNamesGenerator.generate(),singleNodeCallControllerFunctionName:this.callsControllerFunctionName}),Object.assign({},d.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed,unicodeEscapeSequence:!0})).getObfuscatedCode()}}]),t}(m.AbstractCustomNode);s.__decorate([f.initializable(),s.__metadata("design:type",String)],g.prototype,"callsControllerFunctionName",void 0),g=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IEscapeSequenceEncoder)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object,Object])],g),t.SelfDefendingUnicodeNode=g},function(e,t,r){"use strict";function n(e){return"\n var {selfDefendingFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n var func1 = function(){return 'dev';},\n func2 = function () {\n return 'window';\n };\n \n var test1 = function () {\n var regExp = new RegExp('"+e.encode("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}",!0)+"');\n \n return !regExp.test(func1.toString());\n };\n \n var test2 = function () {\n var regExp = new RegExp('"+e.encode("(\\\\[x|u](\\w){2,4})+",!0)+"');\n \n return regExp.test(func2.toString());\n };\n \n var recursiveFunc1 = function (string) {\n var i = ~-1 >> 1 + 255 % 0;\n \n if (string.indexOf('i' === i)) {\n recursiveFunc2(string)\n }\n };\n \n var recursiveFunc2 = function (string) {\n var i = ~-4 >> 1 + 255 % 0;\n \n if (string.indexOf((true+\"\")[3]) !== i) {\n recursiveFunc1(string)\n }\n };\n \n if (!test1()) {\n if (!test2()) {\n recursiveFunc1('indеxOf');\n } else {\n recursiveFunc1('indexOf');\n }\n } else {\n recursiveFunc1('indеxOf');\n }\n })\n \n {selfDefendingFunctionName}();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(14),d=r(26),p=r(5),m=r(27),y=r(102),b=r(32),g=r(103),v=r(104),_=r(105),h=r(106),N=r(107),S=r(8),O=r(19),j=r(4),C=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,i));return s.escapeSequenceEncoder=a,s}return a(t,e),i(t,[{key:"initialize",value:function(e,t){this.stringArrayName=e,this.stringArrayCallsWrapperName=t}},{key:"getNodeStructure",value:function(){return j.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.getDecodeStringArrayTemplate();return O.JavaScriptObfuscator.obfuscate(l.default(h.StringArrayCallsWrapperTemplate(),{decodeNodeTemplate:e,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName,stringArrayName:this.stringArrayName}),Object.assign({},m.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed})).getObfuscatedCode()}},{key:"getDecodeStringArrayTemplate",value:function(){var e=this.options.target!==f.ObfuscationTarget.Extension?this.getGlobalVariableTemplate():b.GlobalVariableNoEvalTemplate(),t=l.default(y.AtobTemplate(),{globalVariableTemplate:e}),r="",n="";switch(this.options.selfDefending&&(n=l.default(v.SelfDefendingTemplate(this.randomGenerator,this.escapeSequenceEncoder),{stringArrayCallsWrapperName:this.stringArrayCallsWrapperName,stringArrayName:this.stringArrayName})),this.options.stringArrayEncoding){case d.StringArrayEncoding.Rc4:r=l.default(N.StringArrayRc4DecodeNodeTemplate(this.randomGenerator),{atobPolyfill:t,rc4Polyfill:g.Rc4Template(),selfDefendingCode:n,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName});break;case d.StringArrayEncoding.Base64:r=l.default(_.StringArrayBase64DecodeNodeTemplate(this.randomGenerator),{atobPolyfill:t,selfDefendingCode:n,stringArrayCallsWrapperName:this.stringArrayCallsWrapperName})}return r}}]),t}(S.AbstractCustomNode);s.__decorate([p.initializable(),s.__metadata("design:type",String)],C.prototype,"stringArrayName",void 0),s.__decorate([p.initializable(),s.__metadata("design:type",String)],C.prototype,"stringArrayCallsWrapperName",void 0),C=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IEscapeSequenceEncoder)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object,Object])],C),t.StringArrayCallsWrapper=C},function(e,t,r){"use strict";function n(){return"\n (function () {\n {globalVariableTemplate}\n \n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n that.atob || (\n that.atob = function(input) {\n var str = String(input).replace(/=+$/, '');\n for (\n var bc = 0, bs, buffer, idx = 0, output = '';\n buffer = str.charAt(idx++);\n ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n ) {\n buffer = chars.indexOf(buffer);\n }\n return output;\n });\n })();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.AtobTemplate=n},function(e,t,r){"use strict";function n(){return"\n var rc4 = function (str, key) {\n var s = [], j = 0, x, res = '', newStr = '';\n \n str = atob(str);\n \n for (var k = 0, length = str.length; k < length; k++) {\n newStr += '%' + ('00' + str.charCodeAt(k).toString(16)).slice(-2);\n }\n \n str = decodeURIComponent(newStr);\n \t \n\t for (var i = 0; i < 256; i++) {\n s[i] = i;\n }\n \n for (i = 0; i < 256; i++) {\n j = (j + s[i] + key.charCodeAt(i % key.length)) % 256;\n x = s[i];\n s[i] = s[j];\n s[j] = x;\n }\n \n i = 0;\n j = 0;\n \n for (var y = 0; y < str.length; y++) {\n i = (i + 1) % 256;\n j = (j + s[i]) % 256;\n x = s[i];\n s[i] = s[j];\n s[j] = x;\n res += String.fromCharCode(str.charCodeAt(y) ^ s[(s[i] + s[j]) % 256]);\n }\n \n return res;\n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.Rc4Template=n},function(e,t,r){"use strict";function n(e,t){var r=e.getRandomString(6),n=e.getRandomString(6),o=e.getRandomString(6),a=e.getRandomString(6),i=e.getRandomString(6),s=e.getRandomString(6),c=e.getRandomString(6),u=e.getRandomString(6),l=e.getRandomString(6);return"\n var StatesClass = function ("+r+") {\n this."+r+" = "+r+";\n this."+n+" = [1, 0, 0];\n this."+o+" = function(){return 'newState';};\n this."+a+" = '"+t.encode("\\w+ *\\(\\) *{\\w+ *",!0)+"';\n this."+i+" = '"+t.encode("['|\"].+['|\"];? *}",!0)+"';\n };\n \n StatesClass.prototype."+s+" = function () {\n var regExp = new RegExp(this."+a+" + this."+i+");\n var expression = regExp.test(this."+o+".toString())\n ? --this."+n+"[1]\n : --this."+n+"[0];\n \n return this."+c+"(expression);\n };\n \n StatesClass.prototype."+c+" = function ("+l+") {\n if (!Boolean(~"+l+")) {\n return "+l+";\n }\n \n return this."+u+"(this."+r+");\n };\n\n StatesClass.prototype."+u+" = function ("+r+") {\n for (var i = 0, len = this."+n+".length; i < len; i++) {\n this."+n+".push(Math.round(Math.random()));\n len = this."+n+".length;\n }\n \n return "+r+"(this."+n+"[0]);\n };\n\n new StatesClass({stringArrayCallsWrapperName})."+s+"();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=n},function(e,t,r){"use strict";function n(e){var t=e.getRandomString(6),r=e.getRandomString(6),n=e.getRandomString(6);return"\n if ({stringArrayCallsWrapperName}."+t+" === undefined) {\n {atobPolyfill}\n \n {stringArrayCallsWrapperName}."+r+" = function (str) {\n var string = atob(str);\n var newStringChars = [];\n \n for (var i = 0, length = string.length; i < length; i++) {\n newStringChars += '%' + ('00' + string.charCodeAt(i).toString(16)).slice(-2);\n }\n \n return decodeURIComponent(newStringChars);\n };\n \n {stringArrayCallsWrapperName}."+n+" = {};\n \n {stringArrayCallsWrapperName}."+t+" = true;\n }\n \n var cachedValue = {stringArrayCallsWrapperName}."+n+"[index];\n \n if (cachedValue === undefined) {\n {selfDefendingCode}\n \n value = {stringArrayCallsWrapperName}."+r+"(value);\n {stringArrayCallsWrapperName}."+n+"[index] = value;\n } else {\n value = cachedValue;\n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayBase64DecodeNodeTemplate=n},function(e,t,r){"use strict";function n(){return"\n var {stringArrayCallsWrapperName} = function (index, key) {\n index = index - 0;\n \n var value = {stringArrayName}[index];\n \n {decodeNodeTemplate}\n \n return value;\n };\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayCallsWrapperTemplate=n},function(e,t,r){"use strict";function n(e){var t=e.getRandomString(6),r=e.getRandomString(6),n=e.getRandomString(6),o=e.getRandomString(6);return"\n if ({stringArrayCallsWrapperName}."+t+" === undefined) {\n {atobPolyfill}\n \n {rc4Polyfill}\n {stringArrayCallsWrapperName}."+r+" = rc4;\n \n {stringArrayCallsWrapperName}."+n+" = {};\n \n {stringArrayCallsWrapperName}."+t+" = true;\n }\n \n var cachedValue = {stringArrayCallsWrapperName}."+n+"[index];\n\n if (cachedValue === undefined) {\n if ({stringArrayCallsWrapperName}."+o+" === undefined) {\n {selfDefendingCode}\n \n {stringArrayCallsWrapperName}."+o+" = true;\n }\n \n value = {stringArrayCallsWrapperName}."+r+"(value, key);\n {stringArrayCallsWrapperName}."+n+"[index] = value;\n } else {\n value = cachedValue;\n }\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRc4DecodeNodeTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)};Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=c.__importDefault(r(12)),d=r(5),p=r(109),m=r(8),y=r(4),b=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e,t,r){this.stringArrayStorage=e,this.stringArrayName=t,this.stringArrayRotateValue=r}},{key:"getNode",value:function(){return this.stringArrayStorage.rotateArray(this.stringArrayRotateValue),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getNode",this).call(this)}},{key:"getNodeStructure",value:function(){return y.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){return f.default(p.StringArrayTemplate(),{stringArrayName:this.stringArrayName,stringArray:this.stringArrayStorage.toString()})}}]),t}(m.AbstractCustomNode);c.__decorate([d.initializable(),c.__metadata("design:type",Object)],b.prototype,"stringArrayStorage",void 0),c.__decorate([d.initializable(),c.__metadata("design:type",String)],b.prototype,"stringArrayName",void 0),c.__decorate([d.initializable(),c.__metadata("design:type",Number)],b.prototype,"stringArrayRotateValue",void 0),b=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],b),t.StringArrayNode=b},function(e,t,r){"use strict";function n(){return"\n var {stringArrayName} = [{stringArray}];\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayTemplate=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importDefault(r(12)),f=r(5),d=r(27),p=r(111),m=r(112),y=r(8),b=r(19),g=r(4),v=r(22),_=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,i));return s.escapeSequenceEncoder=a,s}return a(t,e),i(t,[{key:"initialize",value:function(e,t){this.stringArrayName=e,this.stringArrayRotateValue=t}},{key:"getNodeStructure",value:function(){return g.NodeUtils.convertCodeToStructure(this.getTemplate())}},{key:"getTemplate",value:function(){var e=this.identifierNamesGenerator.generate(),t=this.identifierNamesGenerator.generate(),r="";return r=this.options.selfDefending?l.default(p.SelfDefendingTemplate(this.escapeSequenceEncoder),{timesName:e,whileFunctionName:t}):t+"(++"+e+")",b.JavaScriptObfuscator.obfuscate(l.default(m.StringArrayRotateFunctionTemplate(),{code:r,timesName:e,stringArrayName:this.stringArrayName,stringArrayRotateValue:v.Utils.decToHex(this.stringArrayRotateValue),whileFunctionName:t}),Object.assign({},d.NO_ADDITIONAL_NODES_PRESET,{identifierNamesGenerator:this.options.identifierNamesGenerator,seed:this.options.seed})).getObfuscatedCode()}}]),t}(y.AbstractCustomNode);s.__decorate([f.initializable(),s.__metadata("design:type",String)],_.prototype,"stringArrayName",void 0),s.__decorate([f.initializable(),s.__metadata("design:type",Number)],_.prototype,"stringArrayRotateValue",void 0),_=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IEscapeSequenceEncoder)),s.__param(3,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object,Object])],_),t.StringArrayRotateFunctionNode=_},function(e,t,r){"use strict";function n(e){return"\n var selfDefendingFunc = function () {\n var object = {\n data: {\n key: 'cookie',\n value: 'timeout'\n },\n setCookie: function (options, name, value, document) {\n document = document || {};\n \n var updatedCookie = name + \"=\" + value;\n\n var i = 0;\n \n for (var i = 0, len = options.length; i < len; i++) {\n var propName = options[i];\n \n updatedCookie += \"; \" + propName;\n \n var propValue = options[propName];\n \n options.push(propValue);\n len = options.length;\n \n if (propValue !== true) {\n updatedCookie += \"=\" + propValue;\n }\n }\n\n document['cookie'] = updatedCookie;\n },\n removeCookie: function(){return 'dev';},\n getCookie: function (document, name) {\n document = document || function (value) { return value };\n var matches = document(new RegExp(\n \"(?:^|; )\" + name.replace(/([.$?*|{}()[]\\/+^])/g, '\\$1') + \"=([^;]*)\"\n ));\n \n var func = function (param1, param2) {\n param1(++param2);\n };\n \n func({whileFunctionName}, {timesName});\n \n return matches ? decodeURIComponent(matches[1]) : undefined;\n }\n };\n \n var test1 = function () {\n var regExp = new RegExp('"+e.encode("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}",!0)+"');\n \n return regExp.test(object.removeCookie.toString());\n };\n \n object['updateCookie'] = test1;\n \n var cookie = '';\n var result = object['updateCookie']();\n \n if (!result) {\n object['setCookie'](['*'], 'counter', 1);\n } else if (result) {\n cookie = object['getCookie'](null, 'counter');\n } else {\n object['removeCookie']();\n }\n };\n \n selfDefendingFunc();\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingTemplate=n},function(e,t,r){"use strict";function n(){return"\n (function (array, {timesName}) {\n var {whileFunctionName} = function (times) {\n while (--times) {\n array['push'](array['shift']());\n }\n };\n \n {code}\n })({stringArrayName}, 0x{stringArrayRotateValue});\n "}Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRotateFunctionTemplate=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.False="![]",e.True="!![]",e.a='(false+"")[1]',e.b='([]["entries"]()+"")[2]',e.c='([]["fill"]+"")[3]',e.d='(undefined+"")[2]',e.e='(true+"")[3]',e.f='(false+"")[0]',e.g="(false+[0]+String)[20]",e.h='(+(101))["toString"](21)[1]',e.i="([false]+undefined)[10]",e.j='([]["entries"]()+"")[3]',e.k='(+(20))["toString"](21)',e.l='(false+"")[2]',e.m='(Number+"")[11]',e.n='(undefined+"")[1]',e.o='(true+[]["fill"])[10]',e.p='(+(211))["toString"](31)[1]',e.q='(+(212))["toString"](31)[1]',e.r='(true+"")[1]',e.s='(false+"")[3]',e.t='(true+"")[0]',e.u='(undefined+"")[0]',e.v='(+(31))["toString"](32)',e.w='(+(32))["toString"](33)',e.x='(+(101))["toString"](34)[1]',e.y="(NaN+[Infinity])[10]",e.z='(+(35))["toString"](36)',e.A="(+[]+Array)[10]",e.B="(+[]+Boolean)[10]",e.C='Function("return escape")()(("")["italics"]())[2]',e.D='Function("return escape")()([]["fill"])["slice"]("-1")',e.E='(RegExp+"")[12]',e.F="(+[]+Function)[10]",e.G='(false+Function("return Date")()())[30]',e.H="'H'",e.I='(Infinity+"")[0]',e.J="'J'",e.K="'K'",e.L="'L'",e.M='(true+Function("return Date")()())[30]',e.N='(NaN+"")[0]',e.O='(NaN+Function("return{}")())[11]',e.P="'P'",e.Q="'Q'",e.R="(+[]+RegExp)[10]",e.S="(+[]+String)[10]",e.T='(NaN+Function("return Date")()())[30]',e.U='(NaN+Function("return{}")()["toString"]["call"]())[11]',e.V="'V'",e.W="'W'",e.X="'X'",e.Y="'Y'",e.Z="'Z'"}(t.JSFuck||(t.JSFuck={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(8),d=r(9),p=r(4),m=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e,t){this.controlFlowStorageName=e,this.controlFlowStorageKey=t}},{key:"getNodeStructure",value:function(){var e=d.Nodes.getExpressionStatementNode(d.Nodes.getMemberExpressionNode(d.Nodes.getIdentifierNode(this.controlFlowStorageName),d.Nodes.getIdentifierNode(this.controlFlowStorageKey)));return p.NodeUtils.parentize(e),[e]}}]),t}(f.AbstractCustomNode);s.__decorate([l.initializable(),s.__metadata("design:type",String)],m.prototype,"controlFlowStorageKey",void 0),s.__decorate([l.initializable(),s.__metadata("design:type",String)],m.prototype,"controlFlowStorageName",void 0),m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],m),t.StringLiteralControlFlowStorageCallNode=m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(5),f=r(8),d=r(9),p=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"initialize",value:function(e){this.literalValue=e}},{key:"getNodeStructure",value:function(){return[d.Nodes.getExpressionStatementNode(d.Nodes.getLiteralNode(this.literalValue))]}}]),t}(f.AbstractCustomNode);s.__decorate([l.initializable(),s.__metadata("design:type",String)],p.prototype,"literalValue",void 0),p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],p),t.StringLiteralNode=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.finalizingTransformersModule=new n.ContainerModule(function(e){})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1),a=r(24),i=r(118),s=r(119);t.generatorsModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.IIdentifierNamesGenerator).to(i.HexadecimalIdentifierNamesGenerator).inSingletonScope().whenTargetNamed(a.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator),e(o.ServiceIdentifiers.IIdentifierNamesGenerator).to(s.MangledIdentifierNamesGenerator).inSingletonScope().whenTargetNamed(a.IdentifierNamesGenerator.MangledIdentifierNamesGenerator),e(o.ServiceIdentifiers.Factory__IIdentifierNamesGenerator).toFactory(function(e){var t=null;return function(r){if(t)return t;var n=void 0;switch(r.identifierNamesGenerator){case a.IdentifierNamesGenerator.MangledIdentifierNamesGenerator:n=e.container.getNamed(o.ServiceIdentifiers.IIdentifierNamesGenerator,a.IdentifierNamesGenerator.MangledIdentifierNamesGenerator);break;case a.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator:default:n=e.container.getNamed(o.ServiceIdentifiers.IIdentifierNamesGenerator,a.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator)}return t=n,n}})})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(42),f=r(22),d=p=function(e){function t(e,r){n(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a.randomVariableNameSet=new Set,a}return a(t,e),i(t,[{key:"generate",value:function(){var e=this.randomGenerator.getRandomInteger(1e4,99999999),t=f.Utils.decToHex(e),r=t.substr(0,p.baseIdentifierNameLength),n="_"+f.Utils.hexadecimalPrefix+r;return this.randomVariableNameSet.has(n)?this.generate():(this.randomVariableNameSet.add(n),n)}},{key:"generateWithPrefix",value:function(){var e=this.generate();return(""+this.options.identifiersPrefix+e).replace("__","_")}}]),t}(l.AbstractIdentifierNamesGenerator);d.baseIdentifierNameLength=6,d=p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],d),t.HexadecimalIdentifierNamesGenerator=d;var p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(42),f=d=function(e){function t(e,r){n(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a.previousMangledName=d.initMangledNameCharacter,a}return a(t,e),i(t,[{key:"generate",value:function(){var e=d.generateNewMangledName(this.previousMangledName);return this.previousMangledName=e,e}},{key:"generateWithPrefix",value:function(){return(this.options.identifiersPrefix?this.options.identifiersPrefix+"_":"")+this.generate()}}],[{key:"generateNewMangledName",value:function(e){var t=function(e){var t=d.nameSequence,r=e.length,n=function(e){return"0".repeat(e)},o=r-1;do{var a=e.charAt(o),i=t.indexOf(a);if(i!==t.length-1){return e.substring(0,o)+t[i+1]+n(r-(o+1))}--o}while(o>=0);return"a"+n(r)}(e);return d.validateMangledName(t)||(t=d.generateNewMangledName(t)),t}},{key:"validateMangledName",value:function(e){return!(-1!==d.reservedNames.indexOf(e))}}]),t}(l.AbstractIdentifierNamesGenerator);f.initMangledNameCharacter="9",f.nameSequence="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),f.reservedNames=["byte","case","char","do","else","enum","eval","for","goto","if","in","int","let","long","new","null","this","true","try","var","void","with"],f=d=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],f),t.MangledIdentifierNamesGenerator=f;var d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=r(0),a=r(1);t.nodeTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.Factory__INodeTransformer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.INodeTransformer))})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=r(0),a=r(1),i=r(18),s=r(43),c=r(20),u=r(122),l=r(123),f=r(124),d=r(125),p=r(126),m=r(127),y=r(128),b=r(129),g=r(130),v=r(131),_=r(132),h=r(133);t.obfuscatingTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.INodeTransformer).to(f.CatchClauseTransformer).whenTargetNamed(c.NodeTransformer.CatchClauseTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(d.ClassDeclarationTransformer).whenTargetNamed(c.NodeTransformer.ClassDeclarationTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(p.FunctionDeclarationTransformer).whenTargetNamed(c.NodeTransformer.FunctionDeclarationTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(m.FunctionTransformer).whenTargetNamed(c.NodeTransformer.FunctionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(y.LabeledStatementTransformer).whenTargetNamed(c.NodeTransformer.LabeledStatementTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(b.LiteralTransformer).whenTargetNamed(c.NodeTransformer.LiteralTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(v.ObjectExpressionTransformer).whenTargetNamed(c.NodeTransformer.ObjectExpressionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(h.VariableDeclarationTransformer).whenTargetNamed(c.NodeTransformer.VariableDeclarationTransformer),e(a.ServiceIdentifiers.IObfuscatingReplacer).to(l.BooleanLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.BooleanLiteralObfuscatingReplacer),e(a.ServiceIdentifiers.IObfuscatingReplacer).to(g.NumberLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.NumberLiteralObfuscatingReplacer),e(a.ServiceIdentifiers.IObfuscatingReplacer).to(_.StringLiteralObfuscatingReplacer).whenTargetNamed(s.LiteralObfuscatingReplacer.StringLiteralObfuscatingReplacer),e(a.ServiceIdentifiers.IIdentifierObfuscatingReplacer).to(u.BaseIdentifierObfuscatingReplacer).whenTargetNamed(i.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),e(a.ServiceIdentifiers.Factory__IObfuscatingReplacer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.IObfuscatingReplacer)),e(a.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.IIdentifierObfuscatingReplacer))})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(28),f=r(9),d=function(e){function t(e,r){n(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r));return a.namesMap=new Map,a.identifierNamesGenerator=e(r),a}return a(t,e),i(t,[{key:"replace",value:function(e,t){var r=e+"-"+String(t);return this.namesMap.has(r)&&(e=this.namesMap.get(r)),f.Nodes.getIdentifierNode(e)}},{key:"storeGlobalName",value:function(e,t){if(!this.isReservedName(e)){var r=this.identifierNamesGenerator.generateWithPrefix();this.namesMap.set(e+"-"+String(t),r)}}},{key:"storeLocalName",value:function(e,t){if(!this.isReservedName(e)){var r=this.identifierNamesGenerator.generate();this.namesMap.set(e+"-"+String(t),r)}}},{key:"isReservedName",value:function(e){return this.options.reservedNames.some(function(t){return null!==new RegExp(t,"g").exec(e)})}}]),t}(l.AbstractObfuscatingReplacer);d=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object])],d),t.BaseIdentifierObfuscatingReplacer=d},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(28),f=r(9),d=p=function(e){function t(e){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),i(t,[{key:"replace",value:function(e){return e?p.getTrueUnaryExpressionNode():p.getFalseUnaryExpressionNode()}}],[{key:"getTrueUnaryExpressionNode",value:function(){return f.Nodes.getUnaryExpressionNode("!",p.getFalseUnaryExpressionNode())}},{key:"getFalseUnaryExpressionNode",value:function(){return f.Nodes.getUnaryExpressionNode("!",f.Nodes.getArrayExpressionNode())}}]),t}(l.AbstractObfuscatingReplacer);d=p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object])],d),t.BooleanLiteralObfuscatingReplacer=d;var p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(18),d=r(6),p=r(7),m=r(3),y=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),i}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case d.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&m.NodeGuards.isCatchClauseNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++;return this.storeCatchClauseParam(e,r),this.replaceCatchClauseParam(e,r),e}},{key:"storeCatchClauseParam",value:function(e,t){m.NodeGuards.isIdentifierNode(e.param)&&this.identifierObfuscatingReplacer.storeLocalName(e.param.name,t)}},{key:"replaceCatchClauseParam",value:function(e,t){var r=this;l.replace(e,{enter:function(e,n){if(n&&m.NodeGuards.isReplaceableIdentifierNode(e,n)){var o=r.identifierObfuscatingReplacer.replace(e.name,t),a=o.name;e.name!==a&&(e.name=a,e.obfuscatedNode=!0)}}})}}]),t}(p.AbstractNodeTransformer);y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],y),t.CatchClauseTransformer=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(18),d=r(11),p=r(6),m=r(7),y=r(3),b=r(4),g=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.replaceableIdentifiers=new Map,i.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),i}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&y.NodeGuards.isClassDeclarationNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++,n=b.NodeUtils.getBlockScopesOfNode(e)[0],o=n.type===d.NodeType.Program;return!this.options.renameGlobals&&o?e:(this.storeClassName(e,o,r),this.replaceableIdentifiers.has(n)?this.replaceScopeCachedIdentifiers(n,r):this.replaceScopeIdentifiers(n,r),e)}},{key:"storeClassName",value:function(e,t,r){t?this.identifierObfuscatingReplacer.storeGlobalName(e.id.name,r):this.identifierObfuscatingReplacer.storeLocalName(e.id.name,r)}},{key:"replaceScopeCachedIdentifiers",value:function(e,t){var r=this;this.replaceableIdentifiers.get(e).forEach(function(e){var n=r.identifierObfuscatingReplacer.replace(e.name,t);e.name=n.name})}},{key:"replaceScopeIdentifiers",value:function(e,t){var r=this,n=[];l.replace(e,{enter:function(e,o){if(o&&y.NodeGuards.isReplaceableIdentifierNode(e,o)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;e.name!==i?e.name=i:n.push(e)}}}),this.replaceableIdentifiers.set(e,n)}}]),t}(m.AbstractNodeTransformer);g=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],g),t.ClassDeclarationTransformer=g},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(18),d=r(11),p=r(6),m=r(7),y=r(3),b=r(4),g=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.replaceableIdentifiers=new Map,i.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),i}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&y.NodeGuards.isFunctionDeclarationNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++,n=b.NodeUtils.getBlockScopesOfNode(e)[0],o=n.type===d.NodeType.Program;return!this.options.renameGlobals&&o?e:(this.storeFunctionName(e,o,r),this.replaceableIdentifiers.has(n)?this.replaceScopeCachedIdentifiers(e,n,r):this.replaceScopeIdentifiers(n,r),e)}},{key:"storeFunctionName",value:function(e,t,r){t?this.identifierObfuscatingReplacer.storeGlobalName(e.id.name,r):this.identifierObfuscatingReplacer.storeLocalName(e.id.name,r)}},{key:"replaceScopeCachedIdentifiers",value:function(e,t,r){var n=this.replaceableIdentifiers.get(t);if(n){var o=n.get(e.id.name);if(o)for(var a=o.length,i=0;i<a;i++){var s=o[i],c=this.identifierObfuscatingReplacer.replace(s.name,r);s.name=c.name}}}},{key:"replaceScopeIdentifiers",value:function(e,t){var r=this,n=new Map;l.replace(e,{enter:function(e,o){if(o&&y.NodeGuards.isReplaceableIdentifierNode(e,o)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;if(e.name!==i)e.name=i;else{var s=n.get(e.name)||[];s.push(e),n.set(e.name,s)}}}}),this.replaceableIdentifiers.set(e,n)}}]),t}(m.AbstractNodeTransformer);g=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],g),t.FunctionDeclarationTransformer=g},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(18),d=r(6),p=r(7),m=r(3),y=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),i}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case d.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&(m.NodeGuards.isFunctionDeclarationNode(e)||m.NodeGuards.isFunctionExpressionNode(e)||m.NodeGuards.isArrowFunctionExpressionNode(e)))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++;return this.storeFunctionParams(e,r),this.replaceFunctionParams(e,r),e}},{key:"storeFunctionParams",value:function(e,t){var r=this;e.params.forEach(function(e){if(m.NodeGuards.isObjectPatternNode(e))return l.VisitorOption.Skip;l.traverse(e,{enter:function(e){if(m.NodeGuards.isAssignmentPatternNode(e)&&m.NodeGuards.isIdentifierNode(e.left))return r.identifierObfuscatingReplacer.storeLocalName(e.left.name,t),l.VisitorOption.Skip;m.NodeGuards.isIdentifierNode(e)&&r.identifierObfuscatingReplacer.storeLocalName(e.name,t)}})})}},{key:"addIdentifiersToIgnoredIdentifierNamesSet",value:function(e,t){e.forEach(function(e){m.NodeGuards.isIdentifierNode(e.key)&&t.add(e.key.name)})}},{key:"replaceFunctionParams",value:function(e,t){var r=this,n=new Set,o={enter:function(e,o){if(m.NodeGuards.isObjectPatternNode(e)&&r.addIdentifiersToIgnoredIdentifierNamesSet(e.properties,n),o&&m.NodeGuards.isReplaceableIdentifierNode(e,o)&&!n.has(e.name)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;e.name!==i&&(e.name=i,e.obfuscatedNode=!0)}}};e.params.forEach(function(e){return l.replace(e,o)}),l.replace(e.body,o)}}]),t}(p.AbstractNodeTransformer);y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],y),t.FunctionTransformer=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(18),d=r(6),p=r(7),m=r(3),y=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),i}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case d.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&m.NodeGuards.isLabeledStatementNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.nodeIdentifier++;return this.storeLabeledStatementName(e,r),this.replaceLabeledStatementName(e,r),e}},{key:"storeLabeledStatementName",value:function(e,t){this.identifierObfuscatingReplacer.storeLocalName(e.label.name,t)}},{key:"replaceLabeledStatementName",value:function(e,t){var r=this;l.replace(e,{enter:function(e,n){if(n&&m.NodeGuards.isLabelIdentifierNode(e,n)){var o=r.identifierObfuscatingReplacer.replace(e.name,t);e.name=o.name}}})}}]),t}(p.AbstractNodeTransformer);y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],y),t.LabeledStatementTransformer=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=r(43),d=r(6),p=r(7),m=r(3),y=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.literalObfuscatingReplacerFactory=e,i}return a(t,e),s(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case d.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&m.NodeGuards.isLiteralNode(e)&&!e.obfuscatedNode)return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){if(t&&m.NodeGuards.isPropertyNode(t)&&t.key===e)return e;switch(i(e.value)){case"boolean":return this.literalObfuscatingReplacerFactory(f.LiteralObfuscatingReplacer.BooleanLiteralObfuscatingReplacer).replace(e.value);case"number":return this.literalObfuscatingReplacerFactory(f.LiteralObfuscatingReplacer.NumberLiteralObfuscatingReplacer).replace(e.value);case"string":return this.literalObfuscatingReplacerFactory(f.LiteralObfuscatingReplacer.StringLiteralObfuscatingReplacer).replace(e.value);default:return e}}}]),t}(p.AbstractNodeTransformer);y=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__IObfuscatingReplacer)),c.__param(1,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(2,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],y),t.LiteralTransformer=y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(28),f=r(9),d=r(22),p=function(e){function t(e){n(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.numberLiteralCache=new Map,r}return a(t,e),i(t,[{key:"replace",value:function(e){var t=void 0;return this.numberLiteralCache.has(e)?t=this.numberLiteralCache.get(e):(t=d.Utils.isCeilNumber(e)?""+d.Utils.hexadecimalPrefix+d.Utils.decToHex(e):String(e),this.numberLiteralCache.set(e,t)),f.Nodes.getLiteralNode(e,t)}}]),t}(l.AbstractObfuscatingReplacer);p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object])],p),t.NumberLiteralObfuscatingReplacer=p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(11),f=r(6),d=r(7),p=r(3),m=y=function(e){function t(e,r){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&p.NodeGuards.isObjectExpressionNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return e.properties.forEach(function(e){e.computed||(e.shorthand&&(e.shorthand=!1),p.NodeGuards.isIdentifierNode(e.key)&&(e.key=y.transformIdentifierPropertyKey(e.key)))}),e}}],[{key:"transformIdentifierPropertyKey",value:function(e){return{type:l.NodeType.Literal,value:e.name,raw:"'"+e.name+"'"}}}]),t}(d.AbstractNodeTransformer);m=y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],m),t.ObjectExpressionTransformer=m;var y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(26),f=r(28),d=r(9),p=r(22),m=y=function(e){function t(e,r,a,i,s){n(this,t);var c=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,s));return c.nodesCache=new Map,c.stringLiteralHexadecimalIndexCache=new Map,c.stringArrayStorage=e,c.escapeSequenceEncoder=r,c.randomGenerator=a,c.cryptUtils=i,c.rc4Keys=c.randomGenerator.getRandomGenerator().n(function(){return c.randomGenerator.getRandomGenerator().string({length:y.rc4KeyLength})},y.rc4KeysCount),c}return a(t,e),i(t,[{key:"replace",value:function(e){var t=this.canUseStringArray(e),r=e+"-"+String(t);if(this.nodesCache.has(r)&&this.options.stringArrayEncoding!==l.StringArrayEncoding.Rc4)return this.nodesCache.get(r);var n=t?this.replaceWithStringArrayCallNode(e):this.replaceWithLiteralNode(e);return this.nodesCache.set(r,n),n}},{key:"canUseStringArray",value:function(e){return this.options.stringArray&&e.length>=y.minimumLengthForStringArray&&this.randomGenerator.getMathRandom()<=this.options.stringArrayThreshold}},{key:"getStringArrayHexadecimalIndex",value:function(e,t){if(this.stringLiteralHexadecimalIndexCache.has(e))return{fromCache:!0,index:this.stringLiteralHexadecimalIndexCache.get(e)};var r=p.Utils.decToHex(t),n=""+p.Utils.hexadecimalPrefix+r;return this.stringLiteralHexadecimalIndexCache.set(e,n),{fromCache:!1,index:n}}},{key:"getEncodedValue",value:function(e){var t=void 0,r=null;switch(this.options.stringArrayEncoding){case l.StringArrayEncoding.Rc4:r=this.randomGenerator.getRandomGenerator().pickone(this.rc4Keys),t=this.cryptUtils.btoa(this.cryptUtils.rc4(e,r));break;case l.StringArrayEncoding.Base64:t=this.cryptUtils.btoa(e);break;default:t=e}return{encodedValue:t,key:r}}},{key:"replaceWithLiteralNode",value:function(e){return d.Nodes.getLiteralNode(this.escapeSequenceEncoder.encode(e,this.options.unicodeEscapeSequence))}},{key:"replaceWithStringArrayCallNode",value:function(e){var t=this.getEncodedValue(e),r=t.encodedValue,n=t.key,o=this.escapeSequenceEncoder.encode(r,this.options.unicodeEscapeSequence),a=this.stringArrayStorage.getLength(),i=this.stringArrayStorage.getStorageId().split("|")[1],s=this.getStringArrayHexadecimalIndex(o,a),c=s.fromCache,u=s.index;c||this.stringArrayStorage.set(a,o);var l=[y.getHexadecimalLiteralNode(u)];n&&l.push(y.getRc4KeyLiteralNode(this.escapeSequenceEncoder.encode(n,this.options.unicodeEscapeSequence)));var f=d.Nodes.getIdentifierNode(i);return f.obfuscatedNode=!0,d.Nodes.getCallExpressionNode(f,l)}}],[{key:"getHexadecimalLiteralNode",value:function(e){var t=d.Nodes.getLiteralNode(e);return t.obfuscatedNode=!0,t}},{key:"getRc4KeyLiteralNode",value:function(e){var t=d.Nodes.getLiteralNode(e);return t.obfuscatedNode=!0,t}}]),t}(f.AbstractObfuscatingReplacer);m.minimumLengthForStringArray=3,m.rc4KeyLength=4,m.rc4KeysCount=50,m=y=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.TStringArrayStorage)),s.__param(1,c.inject(u.ServiceIdentifiers.IEscapeSequenceEncoder)),s.__param(2,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(3,c.inject(u.ServiceIdentifiers.ICryptUtils)),s.__param(4,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],m),t.StringLiteralObfuscatingReplacer=m;var y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=s.__importStar(r(10)),f=r(18),d=r(11),p=r(6),m=r(7),y=r(3),b=r(4),g=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.replaceableIdentifiers=new Map,i.identifierObfuscatingReplacer=e(f.IdentifierObfuscatingReplacer.BaseIdentifierObfuscatingReplacer),i}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case p.TransformationStage.Obfuscating:return{enter:function(e,r){if(r&&y.NodeGuards.isVariableDeclarationNode(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=b.NodeUtils.getBlockScopesOfNode(e)[0],n=r.type===d.NodeType.Program;if(!this.options.renameGlobals&&n)return e;var o=this.nodeIdentifier++,a="var"===e.kind?r:t;return this.storeVariableNames(e,n,o),this.replaceableIdentifiers.has(a)?this.replaceScopeCachedIdentifiers(e,a,o):this.replaceScopeIdentifiers(a,o),e}},{key:"storeVariableNames",value:function(e,t,r){var n=this;this.traverseDeclarationIdentifiers(e,function(e){t?n.identifierObfuscatingReplacer.storeGlobalName(e.name,r):n.identifierObfuscatingReplacer.storeLocalName(e.name,r)})}},{key:"replaceScopeCachedIdentifiers",value:function(e,t,r){var n=this,o=this.replaceableIdentifiers.get(t);if(o){var a=[];this.traverseDeclarationIdentifiers(e,function(e){a.push(e.name)}),a.forEach(function(e){var t=o.get(e);if(t)for(var a=t.length,i=0;i<a;i++){var s=t[i];if(e===s.name){var c=n.identifierObfuscatingReplacer.replace(s.name,r);s.name=c.name}}})}}},{key:"replaceScopeIdentifiers",value:function(e,t){var r=this,n=new Map;l.replace(e,{enter:function(e,o){if(o&&!e.obfuscatedNode&&y.NodeGuards.isReplaceableIdentifierNode(e,o)){var a=r.identifierObfuscatingReplacer.replace(e.name,t),i=a.name;if(e.name!==i)e.name=i;else{var s=n.get(e.name)||[];s.push(e),n.set(e.name,s)}}}}),this.replaceableIdentifiers.set(e,n)}},{key:"traverseDeclarationIdentifiers",value:function(e,t){e.declarations.forEach(function(e){if(y.NodeGuards.isObjectPatternNode(e.id))return l.VisitorOption.Skip;l.traverse(e.id,{enter:function(e){y.NodeGuards.isIdentifierNode(e)&&t(e)}})})}}]),t}(m.AbstractNodeTransformer);g=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],g),t.VariableDeclarationTransformer=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1),a=r(135),i=r(138);t.optionsModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.IOptions).to(a.Options).inSingletonScope(),e(o.ServiceIdentifiers.IOptionsNormalizer).to(i.OptionsNormalizer).inSingletonScope()})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=r(0),i=r(1),s=r(136),c=r(24),u=r(14),l=r(25),f=r(26),d=r(33),p=r(137),m=y=function e(t,r){n(this,e),Object.assign(this,d.DEFAULT_PRESET,t);var o=s.validateSync(this,y.validatorOptions);if(o.length)throw new ReferenceError("Validation failed. errors:\n"+p.ValidationErrorsFormatter.format(o));Object.assign(this,r.normalize(this))};m.validatorOptions={validationError:{target:!1}},o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"compact",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"controlFlowFlattening",void 0),o.__decorate([s.IsNumber(),s.Min(0),s.Max(1),o.__metadata("design:type",Number)],m.prototype,"controlFlowFlatteningThreshold",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"deadCodeInjection",void 0),o.__decorate([s.IsNumber(),o.__metadata("design:type",Number)],m.prototype,"deadCodeInjectionThreshold",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"debugProtection",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"debugProtectionInterval",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"disableConsoleOutput",void 0),o.__decorate([s.IsArray(),s.ArrayUnique(),s.IsString({each:!0}),o.__metadata("design:type",Array)],m.prototype,"domainLock",void 0),o.__decorate([s.IsIn([c.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,c.IdentifierNamesGenerator.MangledIdentifierNamesGenerator]),o.__metadata("design:type",String)],m.prototype,"identifierNamesGenerator",void 0),o.__decorate([s.IsString(),o.__metadata("design:type",String)],m.prototype,"identifiersPrefix",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"log",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"renameGlobals",void 0),o.__decorate([s.IsArray(),s.ArrayUnique(),s.IsString({each:!0}),o.__metadata("design:type",Array)],m.prototype,"reservedNames",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"rotateStringArray",void 0),o.__decorate([s.IsNumber(),o.__metadata("design:type",Number)],m.prototype,"seed",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"selfDefending",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"sourceMap",void 0),o.__decorate([s.IsString(),s.ValidateIf(function(e){return Boolean(e.sourceMapBaseUrl)}),s.IsUrl({require_protocol:!0,require_tld:!1,require_valid_protocol:!0}),o.__metadata("design:type",String)],m.prototype,"sourceMapBaseUrl",void 0),o.__decorate([s.IsString(),o.__metadata("design:type",String)],m.prototype,"sourceMapFileName",void 0),o.__decorate([s.IsIn([l.SourceMapMode.Inline,l.SourceMapMode.Separate]),o.__metadata("design:type",String)],m.prototype,"sourceMapMode",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"stringArray",void 0),o.__decorate([s.IsIn([!0,!1,f.StringArrayEncoding.Base64,f.StringArrayEncoding.Rc4]),o.__metadata("design:type",Object)],m.prototype,"stringArrayEncoding",void 0),o.__decorate([s.IsNumber(),s.Min(0),s.Max(1),o.__metadata("design:type",Number)],m.prototype,"stringArrayThreshold",void 0),o.__decorate([s.IsIn([u.ObfuscationTarget.Browser,u.ObfuscationTarget.Extension,u.ObfuscationTarget.Node]),o.__metadata("design:type",String)],m.prototype,"target",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"transformObjectKeys",void 0),o.__decorate([s.IsBoolean(),o.__metadata("design:type",Boolean)],m.prototype,"unicodeEscapeSequence",void 0),m=y=o.__decorate([a.injectable(),o.__param(0,a.inject(i.ServiceIdentifiers.TInputOptions)),o.__param(1,a.inject(i.ServiceIdentifiers.IOptionsNormalizer)),o.__metadata("design:paramtypes",[Object,Object])],m),t.Options=m;var y},function(e,t){e.exports=require("class-validator")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){n(this,e)}return o(e,null,[{key:"format",value:function(t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var c=i.value;r.push(e.formatError(c))}}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r.join("\n")}},{key:"formatError",value:function(e){var t=e.constraints,r="`"+e.property+"` errors:\n";for(var n in t)t.hasOwnProperty(n)&&(r+=" - "+t[n]+"\n");return r}}]),e}();t.ValidationErrorsFormatter=a},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(139),c=r(140),u=r(141),l=r(142),f=r(143),d=r(144),p=r(145),m=r(146),y=r(147),b=r(148),g=v=function(){function e(){n(this,e)}return o(e,[{key:"normalize",value:function(e){var t=Object.assign({},e),r=!0,n=!1,o=void 0;try{for(var a,i=v.normalizerRules[Symbol.iterator]();!(r=(a=i.next()).done);r=!0){t=(0,a.value)(t)}}catch(e){n=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(n)throw o}}return t}}]),e}();g.normalizerRules=[s.ControlFlowFlatteningThresholdRule,c.DeadCodeInjectionRule,u.DeadCodeInjectionThresholdRule,l.DomainLockRule,f.SelfDefendingRule,d.SourceMapBaseUrlRule,p.SourceMapFileNameRule,m.StringArrayRule,y.StringArrayEncodingRule,b.StringArrayThresholdRule],g=v=a.__decorate([i.injectable()],g),t.OptionsNormalizer=g;var v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ControlFlowFlatteningThresholdRule=function(e){return 0===e.controlFlowFlatteningThreshold&&(e=Object.assign({},e,{controlFlowFlattening:!1,controlFlowFlatteningThreshold:0})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(33);t.DeadCodeInjectionRule=function(e){return e.deadCodeInjection&&(e=Object.assign({},e,{deadCodeInjection:!0,stringArray:!0}),e.stringArrayThreshold||(e=Object.assign({},e,{stringArray:!0,stringArrayThreshold:n.DEFAULT_PRESET.stringArrayThreshold}))),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeadCodeInjectionThresholdRule=function(e){return 0===e.deadCodeInjectionThreshold&&(e=Object.assign({},e,{deadCodeInjection:!1,deadCodeInjectionThreshold:0})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22);t.DomainLockRule=function(e){if(e.domainLock.length){var t=[],r=!0,o=!1,a=void 0;try{for(var i,s=e.domainLock[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var c=i.value;t.push(n.Utils.extractDomainFromUrl(c))}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}e=Object.assign({},e,{domainLock:t})}return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelfDefendingRule=function(e){return e.selfDefending&&(e=Object.assign({},e,{compact:!0,selfDefending:!0})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceMapBaseUrlRule=function(e){var t=e,r=t.sourceMapBaseUrl;return e.sourceMapFileName?(r&&!r.endsWith("/")&&(e=Object.assign({},e,{sourceMapBaseUrl:r+"/"})),e):e=Object.assign({},e,{sourceMapBaseUrl:""})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceMapFileNameRule=function(e){var t=e,r=t.sourceMapFileName;return r&&(r=r.replace(/^\/+/,"").split(".")[0],e=Object.assign({},e,{sourceMapFileName:r+".js.map"})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayRule=function(e){return e.stringArray||(e=Object.assign({},e,{rotateStringArray:!1,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(26);t.StringArrayEncodingRule=function(e){return!0===e.stringArrayEncoding&&(e=Object.assign({},e,{stringArrayEncoding:n.StringArrayEncoding.Base64})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringArrayThresholdRule=function(e){return 0===e.stringArrayThreshold&&(e=Object.assign({},e,{rotateStringArray:!1,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=r(0),a=r(1),i=r(20),s=r(44),c=r(150),u=r(151),l=r(152),f=r(153),d=r(154),p=r(156),m=r(157);t.preparingTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.INodeTransformer).to(u.CommentsTransformer).whenTargetNamed(i.NodeTransformer.CommentsTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(f.CustomNodesTransformer).whenTargetNamed(i.NodeTransformer.CustomNodesTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(d.EvalCallExpressionTransformer).whenTargetNamed(i.NodeTransformer.EvalCallExpressionTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(p.ObfuscatingGuardsTransformer).whenTargetNamed(i.NodeTransformer.ObfuscatingGuardsTransformer),e(a.ServiceIdentifiers.INodeTransformer).to(m.ParentificationTransformer).whenTargetNamed(i.NodeTransformer.ParentificationTransformer),e(a.ServiceIdentifiers.INodeGuard).to(c.BlackListObfuscatingGuard).inSingletonScope().whenTargetNamed(s.ObfuscatingGuard.BlackListNodeGuard),e(a.ServiceIdentifiers.INodeGuard).to(l.ConditionalCommentObfuscatingGuard).inSingletonScope().whenTargetNamed(s.ObfuscatingGuard.ConditionalCommentNodeGuard),e(a.ServiceIdentifiers.Factory__INodeGuard).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.INodeGuard))})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(3),c=u=function(){function e(){n(this,e),this.blackListGuardsLength=u.blackListGuards.length}return o(e,[{key:"check",value:function(e){for(var t=0;t<this.blackListGuardsLength;t++)if(u.blackListGuards[t](e))return!1;return!0}}]),e}();c.blackListGuards=[s.NodeGuards.isUseStrictOperator],c=u=a.__decorate([i.injectable(),a.__metadata("design:paramtypes",[])],c),t.BlackListObfuscatingGuard=c;var u},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(6),f=r(7),d=r(3),p=m=function(e){function t(e,r){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case l.TransformationStage.Preparing:return{leave:function(e,r){if(r&&d.NodeGuards.isNodeWithComments(e))return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return e.leadingComments&&(e.leadingComments=this.transformComments(e.leadingComments)),e.trailingComments&&(e.trailingComments=this.transformComments(e.trailingComments)),e}},{key:"transformComments",value:function(e){return e.filter(function(e){return m.preservedWords.some(function(t){return-1!==e.value.indexOf(t)})})}}]),t}(f.AbstractNodeTransformer);p.preservedWords=["@license","@preserve"],p=m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],p),t.CommentsTransformer=p;var m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(3),c=u=function(){function e(){n(this,e),this.obfuscationAllowedForCurrentNode=!0,this.obfuscationAllowedForNextNode=null}return o(e,[{key:"check",value:function(e){if(this.obfuscationAllowedForNextNode&&(this.obfuscationAllowedForCurrentNode=this.obfuscationAllowedForNextNode,this.obfuscationAllowedForNextNode=null),!s.NodeGuards.isNodeWithComments(e))return this.obfuscationAllowedForCurrentNode;var t=e.leadingComments,r=e.trailingComments;return t&&(this.obfuscationAllowedForCurrentNode=this.checkComments(t)),r&&(this.obfuscationAllowedForNextNode=this.checkComments(r)),this.obfuscationAllowedForCurrentNode}},{key:"checkComments",value:function(e){for(var t=e.length,r=this.obfuscationAllowedForCurrentNode,n=0;n<t;n++){var o=e[n];u.obfuscationEnableCommentRegExp.test(o.value)?r=!0:u.obfuscationDisableCommentRegExp.test(o.value)&&(r=!1)}return r}}]),e}();c.obfuscationEnableCommentRegExp=new RegExp("javascript-obfuscator *: *enable"),c.obfuscationDisableCommentRegExp=new RegExp("javascript-obfuscator *: *disable"),c=u=a.__decorate([i.injectable()],c),t.ConditionalCommentObfuscatingGuard=c;var u},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(17),f=r(6),d=r(7),p=r(3),m=function(e){function t(e,r,a,i,s){n(this,t);var c=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i,s));return c.stackTraceData=[],c.stackTraceAnalyzer=e,c.obfuscationEventEmitter=r,c.customNodeGroupStorage=a,c}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Preparing:return{leave:function(e,r){if(p.NodeGuards.isProgramNode(e))return t.analyzeNode(e,r),t.appendCustomNodesBeforeObfuscation(e,r),t.transformNode(e,r)}};case f.TransformationStage.Finalizing:return{leave:function(e,r){p.NodeGuards.isProgramNode(e)&&t.appendCustomNodesAfterObfuscation(e,r)}};default:return null}}},{key:"analyzeNode",value:function(e,t){this.stackTraceData=this.stackTraceAnalyzer.analyze(e)}},{key:"transformNode",value:function(e,t){return e}},{key:"appendCustomNodesBeforeObfuscation",value:function(e,t){var r=this;this.customNodeGroupStorage.getStorage().forEach(function(e){e.initialize(),r.obfuscationEventEmitter.once(e.getAppendEvent(),e.appendCustomNodes.bind(e))}),this.obfuscationEventEmitter.emit(l.ObfuscationEvent.BeforeObfuscation,e,this.stackTraceData)}},{key:"appendCustomNodesAfterObfuscation",value:function(e,t){this.obfuscationEventEmitter.emit(l.ObfuscationEvent.AfterObfuscation,e,this.stackTraceData)}}]),t}(d.AbstractNodeTransformer);m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IStackTraceAnalyzer)),s.__param(1,c.inject(u.ServiceIdentifiers.IObfuscationEventEmitter)),s.__param(2,c.inject(u.ServiceIdentifiers.TCustomNodeGroupStorage)),s.__param(3,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(4,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],m),t.CustomNodesTransformer=m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(155),f=r(6),d=r(7),p=r(3),m=r(9),y=r(4),b=g=function(e){function t(e,r){n(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a.evalRootAstHostNodeSet=new Set,a}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Preparing:return{enter:function(e,r){if(r&&p.NodeGuards.isCallExpressionNode(e)&&p.NodeGuards.isIdentifierNode(e.callee)&&"eval"===e.callee.name)return t.transformNode(e,r)}};case f.TransformationStage.Finalizing:return this.evalRootAstHostNodeSet.size?{leave:function(e,r){if(r&&t.isEvalRootAstHostNode(e))return t.restoreNode(e,r)}}:null;default:return null}}},{key:"transformNode",value:function(e,t){var r=e.arguments[0];if(!r)return e;var n=g.extractEvalStringFromCallExpressionArgument(r);if(!n)return e;var o=void 0;try{o=y.NodeUtils.convertCodeToStructure(n)}catch(t){return e}var a=m.Nodes.getFunctionExpressionNode([],m.Nodes.getBlockStatementNode(o));return this.evalRootAstHostNodeSet.add(a),a}},{key:"restoreNode",value:function(e,t){var r=e.body.body,n=y.NodeUtils.convertStructureToCode(r);return m.Nodes.getCallExpressionNode(m.Nodes.getIdentifierNode("eval"),[m.Nodes.getLiteralNode(l(n))])}},{key:"isEvalRootAstHostNode",value:function(e){return p.NodeGuards.isFunctionExpressionNode(e)&&this.evalRootAstHostNodeSet.has(e)}}],[{key:"extractEvalStringFromCallExpressionArgument",value:function(e){return p.NodeGuards.isLiteralNode(e)?g.extractEvalStringFromLiteralNode(e):p.NodeGuards.isTemplateLiteralNode(e)?g.extractEvalStringFromTemplateLiteralNode(e):null}},{key:"extractEvalStringFromLiteralNode",value:function(e){return"string"==typeof e.value?e.value:null}},{key:"extractEvalStringFromTemplateLiteralNode",value:function(e){var t=e.quasis;return 1!==t.length||e.expressions.length?null:t[0].value.cooked}}]),t}(d.AbstractNodeTransformer);b=g=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],b),t.EvalCallExpressionTransformer=b;var g},function(e,t){e.exports=require("js-string-escape")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(44),f=r(6),d=r(7),p=m=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.obfuscatingGuards=m.obfuscatingGuardsList.map(e),i}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case f.TransformationStage.Preparing:return{enter:function(e,r){return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){var r=this.obfuscatingGuards.every(function(t){return t.check(e)});return e.ignoredNode=!r,e}}]),t}(d.AbstractNodeTransformer);p.obfuscatingGuardsList=[l.ObfuscatingGuard.BlackListNodeGuard,l.ObfuscatingGuard.ConditionalCommentNodeGuard],p=m=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__INodeGuard)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],p),t.ObfuscatingGuardsTransformer=p;var m},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(6),f=r(7),d=r(4),p=function(e){function t(e,r){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return a(t,e),i(t,[{key:"getVisitor",value:function(e){var t=this;switch(e){case l.TransformationStage.Preparing:return{enter:function(e,r){return t.transformNode(e,r)}};default:return null}}},{key:"transformNode",value:function(e,t){return d.NodeUtils.parentizeNode(e,t)}}]),t}(f.AbstractNodeTransformer);p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(1,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Object,Object])],p),t.ParentificationTransformer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1),a=r(159),i=r(160),s=r(161);t.storagesModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.TCustomNodeGroupStorage).to(i.CustomNodeGroupStorage).inSingletonScope(),e(o.ServiceIdentifiers.TStringArrayStorage).to(s.StringArrayStorage).inSingletonScope(),e(o.ServiceIdentifiers.Newable__TControlFlowStorage).toConstructor(a.ControlFlowStorage),e(o.ServiceIdentifiers.Factory__TControlFlowStorage).toFactory(function(e){return function(){var t=e.container.get(o.ServiceIdentifiers.Newable__TControlFlowStorage),r=e.container.get(o.ServiceIdentifiers.IRandomGenerator),n=e.container.get(o.ServiceIdentifiers.IOptions),a=new t(r,n);return a.initialize(),a}})})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),s=r(0),c=r(1),u=r(45),l=function(e){function t(e,r){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return a(t,e),t}(u.MapStorage);l=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i.__param(1,s.inject(c.ServiceIdentifiers.IOptions)),i.__metadata("design:paramtypes",[Object,Object])],l),t.ControlFlowStorage=l},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(0),u=r(1),l=r(41),f=r(45),d=p=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,a));return i.customNodeGroupFactory=e,i}return a(t,e),i(t,[{key:"initialize",value:function(){var e=this;this.storage=new Map,this.storageId=this.randomGenerator.getRandomString(6),p.customNodeGroupsList.forEach(function(t){var r=e.customNodeGroupFactory(t);r&&e.storage.set(t,r)})}}]),t}(f.MapStorage);d.customNodeGroupsList=[l.CustomNodeGroup.ConsoleOutputCustomNodeGroup,l.CustomNodeGroup.DebugProtectionCustomNodeGroup,l.CustomNodeGroup.DomainLockCustomNodeGroup,l.CustomNodeGroup.SelfDefendingCustomNodeGroup,l.CustomNodeGroup.StringArrayCustomNodeGroup],s.__decorate([c.postConstruct(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],d.prototype,"initialize",null),d=p=s.__decorate([c.injectable(),s.__param(0,c.inject(u.ServiceIdentifiers.Factory__ICustomNodeGroup)),s.__param(1,c.inject(u.ServiceIdentifiers.IRandomGenerator)),s.__param(2,c.inject(u.ServiceIdentifiers.IOptions)),s.__metadata("design:paramtypes",[Function,Object,Object])],d),t.CustomNodeGroupStorage=d;var p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)};Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(0),l=r(1),f=r(162),d=p=function(e){function t(e,r,a,i){n(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a,i));return s.identifierNamesGenerator=e(i),s.arrayUtils=r,s}return a(t,e),i(t,[{key:"initialize",value:function(){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"initialize",this).call(this);var e=this.identifierNamesGenerator.generate().slice(0,p.stringArrayNameLength),r=this.identifierNamesGenerator.generate().slice(0,p.stringArrayNameLength),n=""+this.options.identifiersPrefix+e,o=""+this.options.identifiersPrefix+r;this.storageId=n+"|"+o}},{key:"rotateArray",value:function(e){this.storage=this.arrayUtils.arrayRotate(this.storage,e)}},{key:"toString",value:function(){return this.storage.map(function(e){return"'"+e+"'"}).toString()}}]),t}(f.ArrayStorage);d.stringArrayNameLength=7,c.__decorate([u.postConstruct(),c.__metadata("design:type",Function),c.__metadata("design:paramtypes",[]),c.__metadata("design:returntype",void 0)],d.prototype,"initialize",null),d=p=c.__decorate([u.injectable(),c.__param(0,u.inject(l.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),c.__param(1,u.inject(l.ServiceIdentifiers.IArrayUtils)),c.__param(2,u.inject(l.ServiceIdentifiers.IRandomGenerator)),c.__param(3,u.inject(l.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object,Object])],d),t.StringArrayStorage=d;var p},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),s=r(0),c=r(1),u=r(5),l=function(){function e(t,r){o(this,e),this.storageLength=0,this.randomGenerator=t,this.options=r}return a(e,[{key:"initialize",value:function(){this.storage=[],this.storageId=this.randomGenerator.getRandomString(6)}},{key:"get",value:function(e){var t=this.storage[e];if(!t)throw new Error("No value found in array storage with key `"+e+"`");return t}},{key:"getKeyOf",value:function(e){var t=this.storage.indexOf(e);return t>=0?t:null}},{key:"getLength",value:function(){return this.storageLength}},{key:"getStorage",value:function(){return this.storage}},{key:"getStorageId",value:function(){return this.storageId}},{key:"mergeWith",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.storage=[].concat(n(this.storage),n(e.getStorage())),t&&(this.storageId=e.getStorageId())}},{key:"set",value:function(e,t){e===this.storageLength?this.storage.push(t):this.storage.splice(e,0,t),this.storageLength++}}]),e}();i.__decorate([u.initializable(),i.__metadata("design:type",Array)],l.prototype,"storage",void 0),i.__decorate([u.initializable(),i.__metadata("design:type",String)],l.prototype,"storageId",void 0),i.__decorate([s.postConstruct(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],l.prototype,"initialize",null),l=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i.__param(1,s.inject(c.ServiceIdentifiers.IOptions)),i.__metadata("design:paramtypes",[Object,Object])],l),t.ArrayStorage=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1),a=r(164),i=r(165),s=r(168),c=r(46);t.utilsModule=new n.ContainerModule(function(e){e(o.ServiceIdentifiers.IArrayUtils).to(a.ArrayUtils).inSingletonScope(),e(o.ServiceIdentifiers.IRandomGenerator).to(c.RandomGenerator).inSingletonScope(),e(o.ServiceIdentifiers.ICryptUtils).to(i.CryptUtils).inSingletonScope(),e(o.ServiceIdentifiers.IEscapeSequenceEncoder).to(s.EscapeSequenceEncoder).inSingletonScope()})},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),s=r(0),c=r(1),u=function(){function e(t){o(this,e),this.randomGenerator=t}return a(e,[{key:"arrayRange",value:function(e){for(var t=[],r=0;r<e;r++)t.push(r);return t}},{key:"arrayRotate",value:function(e,t){if(!e.length)throw new ReferenceError("Cannot rotate empty array.");if(t<=0)return e;for(var r=e,n=void 0;t--;)n=r.pop(),r.unshift(n);return r}},{key:"arrayShuffle",value:function(e){for(var t=[].concat(n(e)),r=t.length;r;r--){var o=Math.floor(this.randomGenerator.getMathRandom()*r),a=[t[o],t[r-1]];t[r-1]=a[0],t[o]=a[1]}return t}}]),e}();u=i.__decorate([s.injectable(),i.__param(0,s.inject(c.ServiceIdentifiers.IRandomGenerator)),i.__metadata("design:paramtypes",[Object])],u),t.ArrayUtils=u},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=r(46),u=r(22),l=function(){function e(t){n(this,e),this.randomGenerator=t}return o(e,[{key:"btoa",value:function(e){var t="";e=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(""+u.Utils.hexadecimalPrefix+t))});for(var r,n,o=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.charAt(0|o)||(a="=",o%1);t+=a.charAt(63&r>>8-o%1*8)){if((n=e.charCodeAt(o+=.75))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|n}return t}},{key:"hideString",value:function(e,t){var r=this,n=this.randomGenerator.getRandomGenerator().string({length:t,pool:c.RandomGenerator.randomGeneratorPool}),o=n.replace(new RegExp("["+function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e)+"]","g"),""),a=o.split("");return this.randomGenerator.getRandomGenerator().shuffle(a),o=a.join(""),[function(e,t){for(var n=-1,o=-1,a="";n<e.length||o<t.length;)r.randomGenerator.getMathRandom()<.5&&o<t.length?a+=t.charAt(++o):a+=e.charAt(++n);return a}(e,o),o]}},{key:"rc4",value:function(e,t){for(var r=[],n=0,o=void 0,a="",i=0;i<256;i++)r[i]=i;for(i=0;i<256;i++)n=(n+r[i]+t.charCodeAt(i%t.length))%256,o=r[i],r[i]=r[n],r[n]=o;i=0,n=0;for(var s=0;s<e.length;s++)i=(i+1)%256,n=(n+r[i])%256,o=r[i],r[i]=r[n],r[n]=o,a+=String.fromCharCode(e.charCodeAt(s)^r[(r[i]+r[n])%256]);return a}}]),e}();l=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__metadata("design:paramtypes",[Object])],l),t.CryptUtils=l},function(e,t){e.exports=require("md5")},function(e,t){e.exports=require("chance")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=function(){function e(){n(this,e),this.stringsCache=new Map}return o(e,[{key:"encode",value:function(e,t){var r=e+"-"+String(t);if(this.stringsCache.has(r))return this.stringsCache.get(r);var n=new RegExp("[\\s\\S]","g"),o=new RegExp("['\"\\\\\\s]"),a=new RegExp("[\\x00-\\x7F]"),i=void 0,s=void 0,c=e.replace(n,function(e){return t||o.exec(e)?(a.exec(e)?(i="\\x",s="00"):(i="\\u",s="0000"),""+i+(s+e.charCodeAt(0).toString(16)).slice(-s.length)):e});return this.stringsCache.set(r,c),c}}]),e}();s=a.__decorate([i.injectable()],s),t.EscapeSequenceEncoder=s},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=a.__importStar(r(37)),u=a.__importStar(r(30)),l=a.__importStar(r(47)),f=r(170),d=r(20),p=r(6),m=r(3),y=b=function(){function e(t,r,o,a,i){n(this,e),this.transformersRunner=t,this.sourceMapCorrector=r,this.randomGenerator=o,this.logger=a,this.options=i}return o(e,[{key:"obfuscate",value:function(e){var t=Date.now();this.logger.info(f.LoggingMessage.Version,l.version),this.logger.info(f.LoggingMessage.ObfuscationStarted),this.logger.info(f.LoggingMessage.RandomGeneratorSeed,this.randomGenerator.getSeed());var r=this.parseCode(e),n=this.transformAstTree(r),o=this.generateCode(e,n),a=(Date.now()-t)/1e3;return this.logger.success(f.LoggingMessage.ObfuscationCompleted,a),this.getObfuscationResult(o)}},{key:"parseCode",value:function(e){return c.parseScript(e,{attachComment:!0,loc:this.options.sourceMap})}},{key:"transformAstTree",value:function(e){return!m.NodeGuards.isProgramNode(e)||e.body.length||e.leadingComments?(e=this.runTransformationStage(e,p.TransformationStage.Preparing),this.options.deadCodeInjection&&(e=this.runTransformationStage(e,p.TransformationStage.DeadCodeInjection)),this.options.controlFlowFlattening&&(e=this.runTransformationStage(e,p.TransformationStage.ControlFlowFlattening)),e=this.runTransformationStage(e,p.TransformationStage.Converting),e=this.runTransformationStage(e,p.TransformationStage.Obfuscating),e=this.runTransformationStage(e,p.TransformationStage.Finalizing)):(this.logger.warn(f.LoggingMessage.EmptySourceCode),e)}},{key:"generateCode",value:function(e,t){var r=Object.assign({},b.escodegenParams);this.options.sourceMap&&(r.sourceMap="sourceMap",r.sourceContent=e);var n=u.generate(t,Object.assign({},r,{format:{compact:this.options.compact}}));return n.map=n.map?n.map.toString():"",n}},{key:"getObfuscationResult",value:function(e){return this.sourceMapCorrector.correct(e.code,e.map)}},{key:"runTransformationStage",value:function(e,t){return this.logger.info(f.LoggingMessage.TransformationStage,t),this.transformersRunner.transform(e,b.transformersList,t)}}]),e}();y.escodegenParams={comment:!0,verbatim:"x-verbatim-property",sourceMapWithCode:!0},y.transformersList=[d.NodeTransformer.BlockStatementControlFlowTransformer,d.NodeTransformer.ClassDeclarationTransformer,d.NodeTransformer.CommentsTransformer,d.NodeTransformer.CustomNodesTransformer,d.NodeTransformer.DeadCodeInjectionTransformer,d.NodeTransformer.EvalCallExpressionTransformer,d.NodeTransformer.FunctionControlFlowTransformer,d.NodeTransformer.CatchClauseTransformer,d.NodeTransformer.FunctionDeclarationTransformer,d.NodeTransformer.FunctionTransformer,d.NodeTransformer.LabeledStatementTransformer,d.NodeTransformer.LiteralTransformer,d.NodeTransformer.MemberExpressionTransformer,d.NodeTransformer.MethodDefinitionTransformer,d.NodeTransformer.ObfuscatingGuardsTransformer,d.NodeTransformer.ObjectExpressionKeysTransformer,d.NodeTransformer.ObjectExpressionTransformer,d.NodeTransformer.ParentificationTransformer,d.NodeTransformer.TemplateLiteralTransformer,d.NodeTransformer.VariableDeclarationTransformer],y=b=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.ITransformersRunner)),a.__param(1,i.inject(s.ServiceIdentifiers.ISourceMapCorrector)),a.__param(2,i.inject(s.ServiceIdentifiers.IRandomGenerator)),a.__param(3,i.inject(s.ServiceIdentifiers.ILogger)),a.__param(4,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],y),t.JavaScriptObfuscator=y;var b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!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.TransformationStage="Transformation stage: %s...",e.Version="Version: %s"}(t.LoggingMessage||(t.LoggingMessage={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=a.__importDefault(r(172)),u=r(5),l=f=function(){function e(t){n(this,e),this.options=t}return o(e,[{key:"initialize",value:function(){this.colorInfo=c.default.cyan,this.colorSuccess=c.default.green,this.colorWarn=c.default.yellow}},{key:"info",value:function(e,t){this.log(this.colorInfo,e,t)}},{key:"success",value:function(e,t){this.log(this.colorSuccess,e,t)}},{key:"warn",value:function(e,t){this.log(this.colorWarn,e,t)}},{key:"log",value:function(e,t,r){if(this.options.log){var n=e("\n"+f.loggingPrefix+" "+t);r?console.log(n,r):console.log(n)}}}]),e}();l.loggingPrefix="[javascript-obfuscator]",a.__decorate([u.initializable(),a.__metadata("design:type",Function)],l.prototype,"colorInfo",void 0),a.__decorate([u.initializable(),a.__metadata("design:type",Function)],l.prototype,"colorSuccess",void 0),a.__decorate([u.initializable(),a.__metadata("design:type",Function)],l.prototype,"colorWarn",void 0),a.__decorate([i.postConstruct(),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],l.prototype,"initialize",null),l=f=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object])],l),t.Logger=l;var f},function(e,t){e.exports=require("chalk")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),s=r(0),c=r(174);s.decorate(s.injectable(),c.EventEmitter);var u=function(e){function t(){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(c.EventEmitter);u=i.__decorate([s.injectable()],u),t.ObfuscationEventEmitter=u},function(e,t){e.exports=require("events")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(5),c=function(){function e(){n(this,e)}return o(e,[{key:"initialize",value:function(e,t){this.obfuscatedCode=e,this.sourceMap=t}},{key:"getObfuscatedCode",value:function(){return this.obfuscatedCode}},{key:"getSourceMap",value:function(){return this.sourceMap}},{key:"toString",value:function(){return this.obfuscatedCode}}]),e}();a.__decorate([s.initializable(),a.__metadata("design:type",String)],c.prototype,"obfuscatedCode",void 0),a.__decorate([s.initializable(),a.__metadata("design:type",String)],c.prototype,"sourceMap",void 0),c=a.__decorate([i.injectable()],c),t.ObfuscationResult=c},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(t){n(this,e),this.sourceCode=t}return o(e,[{key:"getSourceCode",value:function(){return this.sourceCode}}]),e}();t.SourceCode=a},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=r(25),u=function(){function e(t,r,o){n(this,e),this.obfuscationResultFactory=t,this.cryptUtils=r,this.options=o}return o(e,[{key:"correct",value:function(e,t){return this.obfuscationResultFactory(this.correctObfuscatedCode(e,t),t)}},{key:"correctObfuscatedCode",value:function(e,t){if(!t)return e;var r=this.options.sourceMapBaseUrl+this.options.sourceMapFileName,n="//# sourceMappingURL=";switch(this.options.sourceMapMode){case c.SourceMapMode.Inline:n+="data:application/json;base64,"+this.cryptUtils.btoa(t);break;case c.SourceMapMode.Separate:default:if(!r)return e;n+=r}return e+"\n"+n}}]),e}();u=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__IObfuscationResult)),a.__param(1,i.inject(s.ServiceIdentifiers.ICryptUtils)),a.__param(2,i.inject(s.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],u),t.SourceMapCorrector=u},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),s=r(1),c=a.__importStar(r(10)),u=r(179),l=r(3),f=function(){function e(t){n(this,e),this.nodeTransformerFactory=t}return o(e,[{key:"transform",value:function(e,t,r){if(!t.length)return e;for(var n=[],o=[],a=t.length,i=void 0,s=0;s<a;s++)(i=this.nodeTransformerFactory(t[s]).getVisitor(r))&&(i.enter&&n.push({enter:i.enter}),i.leave&&o.push({leave:i.leave}));return n.length||o.length?(c.replace(e,{enter:this.mergeVisitorsForDirection(n,u.VisitorDirection.Enter),leave:this.mergeVisitorsForDirection(o,u.VisitorDirection.Leave)}),e):e}},{key:"mergeVisitorsForDirection",value:function(e,t){var r=e.length;return r?function(n,o){if(n.ignoredNode)return c.VisitorOption.Skip;for(var a=0;a<r;a++){var i=e[a][t];if(i){var s=i(n,o);s&&l.NodeGuards.isNode(s)&&(n=s)}}return n}:function(e,t){return e}}}]),e}();f=a.__decorate([i.injectable(),a.__param(0,i.inject(s.ServiceIdentifiers.Factory__INodeTransformer)),a.__metadata("design:paramtypes",[Function])],f),t.TransformersRunner=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Enter="enter",e.Leave="leave"}(t.VisitorDirection||(t.VisitorDirection={}))},function(e,t){e.exports=require("commander")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArraySanitizer=function(e){if(/,$/.test(e))throw new SyntaxError("Multiple <list> values should be wrapped inside quotes: --option-name 'value1, value2'");return e.split(",").map(function(e){return e.trim()})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanSanitizer=function(e){return"true"===e||"1"===e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(24);t.IdentifierNamesGeneratorSanitizer=function(e){if(!Object.keys(n.IdentifierNamesGenerator).some(function(t){return n.IdentifierNamesGenerator[t]===e}))throw new ReferenceError("Invalid value of `--identifier-names-generator` option");return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14);t.ObfuscationTargetSanitizer=function(e){if(!Object.keys(n.ObfuscationTarget).some(function(t){return n.ObfuscationTarget[t]===e}))throw new ReferenceError("Invalid value of `--target` option");return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25);t.SourceMapModeSanitizer=function(e){if(!Object.keys(n.SourceMapMode).some(function(t){return n.SourceMapMode[t]===e}))throw new ReferenceError("Invalid value of `--source-map-mode` option");return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(26);t.StringArrayEncodingSanitizer=function(e){switch(e){case"true":case"1":case n.StringArrayEncoding.Base64:return!0;case n.StringArrayEncoding.Rc4:return n.StringArrayEncoding.Rc4;default:return!1}}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=__importStar(r(48)),i=__importStar(r(188)),s=__importStar(r(35)),c=r(34),u=function(){function e(){n(this,e)}return o(e,null,[{key:"getOutputCodePath",value:function(e){return s.normalize(e).split(".").map(function(e,t){return 0===t?""+e+c.JavaScriptObfuscatorCLI.obfuscatedFilePrefix:e}).join(".")}},{key:"getOutputSourceMapPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t&&(e=e.substring(0,e.lastIndexOf("/"))+"/"+t),/\.js\.map$/.test(e)?/\.js$/.test(e)&&(e+=".map"):e=e.split(".")[0]+".js.map",e}},{key:"getUserConfig",value:function(e){var t=void 0;try{t=!function(){var e=new Error('Cannot find module "."');throw e.code="MODULE_NOT_FOUND",e}()}catch(r){try{t=require(e)}catch(e){throw new ReferenceError("Given config path must be a valid file path")}}return t}},{key:"writeFile",value:function(e,t){i.sync(s.dirname(e)),a.writeFileSync(e,t,{encoding:c.JavaScriptObfuscatorCLI.encoding})}}]),e}();t.CLIUtils=u},function(e,t){e.exports=require("mkdirp")},function(e,t){function r(e){throw new Error("Cannot find module '"+e+"'.")}r.keys=function(){return[]},r.resolve=r,e.exports=r,r.id=189},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=__importStar(r(48)),s=__importStar(r(35)),c=r(34),u=function(){function e(){o(this,e)}return a(e,null,[{key:"readSourceCode",value:function(t){if(e.isFilePath(t))return e.readFile(t);if(e.isDirectoryPath(t))return e.readDirectoryRecursive(t);throw new ReferenceError("Given input path must be a valid source code file or directory path")}},{key:"isDirectoryPath",value:function(e){try{return i.statSync(e).isDirectory()}catch(e){return!1}}},{key:"isFilePath",value:function(e){try{return i.statSync(e).isFile()}catch(e){return!1}}},{key:"readDirectoryRecursive",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i.readdirSync(t,c.JavaScriptObfuscatorCLI.encoding).forEach(function(o){var a=t+"/"+o;if(e.isDirectoryPath(a))r.push.apply(r,n(e.readDirectoryRecursive(a)));else if(e.isFilePath(a)&&e.isValidFile(o)){var s=i.readFileSync(a,c.JavaScriptObfuscatorCLI.encoding);r.push({filePath:a,content:s})}}),r}},{key:"readFile",value:function(t){if(!e.isValidFile(t))throw new ReferenceError("Input file must have .js extension");return i.readFileSync(t,c.JavaScriptObfuscatorCLI.encoding)}},{key:"isValidFile",value:function(e){return-1!==c.JavaScriptObfuscatorCLI.availableInputExtensions.indexOf(s.extname(e))&&!(-1!==e.indexOf(c.JavaScriptObfuscatorCLI.obfuscatedFilePrefix))}}]),e}();t.SourceCodeReader=u}]);
  22. //# sourceMappingURL=index.js.map