{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap e952f21ca4bd9943871b","webpack:///external \"NeoCommon\"","webpack:///./src/ForceToolApi.ts","webpack:///./src/ForceToolUI.ts","webpack:///./src/index.ts","webpack:///./src/TestApp.ts","webpack:///./node_modules/blueimp-md5/js/md5.js","webpack:///./src/ForceToolInterceptor.ts","webpack:///external \"NeoGames\""],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;;;;;;;AC7DA,+C;;;;;;;;;;ACAA,4CAA4E;AAK5E,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,cAAc,GAAG,GAAG,UAAU,kBAAkB,CAAC;AAEvD,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC,MAAM,UAAU,GAAG;IACf,UAAU,EAAE,eAAe,GAAG,YAAY;IAC1C,OAAO,EAAE;QACL,QAAQ,EAAE,eAAe,GAAG,kBAAkB;QAC9C,IAAI,EAAE,eAAe,GAAG,cAAc;QACtC,YAAY,EAAE,eAAe,GAAG,sBAAsB;KACzD;CACJ,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,gBAAgB,EAAE,OAAO;CAC5B,CAAC;AAEF,MAAM,WAAW,GAAG;IAChB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACf,CAAC;AAUF,MAAa,YAAY;IACd,MAAM,CAAC,qBAAqB;QAC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C,MAAM,KAAK,CAAC,EAAE;YAC5B,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,WAAW,CAAC,CAAC;SACnC;aAAM;YACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC7B,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,WAAW,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;aAC1E;SACJ;KACJ;AACL,CAAC;;;;;;;ACjCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAA0C;AAChD,IAAI,kCAAO;AACX;AACA,KAAK;AAAA,oGAAC;AACN,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;ACvRD,4CAA8E;AAC9E,2CAAwC;AACxC,6CAA6E;AAC7E,8CAA4C;AAS5C,IAAI,YAAY,GAAG,yBAAa,CAAC,IAAI,CAAC,YAAY,CAAC;AACnD,IAAI,YAAY,GAAG,yBAAa,CAAC,IAAI,CAAC,YAAY,CAAC;AACnD,IAAI,WAAW,GAAG,yBAAa,CAAC,IAAI,CAAC,WAAW,CAAC;AACjD,IAAI,WAAW,GAAG,yBAAa,CAAC,IAAI,CAAC,WAAW,CAAC;AACjD,IAAI,WAAW,GAAG,yBAAa,CAAC,IAAI,CAAC,WAAW,CAAC;AACjD,IAAI,cAAc,GAAG,yBAAa,CAAC,IAAI,CAAC,cAAc,CAAC;AAEvD,SAAS,QAAQ,CAAC,GAAW;IACzB,IAAI,IAAK,EAAE;QACP,mBAAM,CAAC,UAAU,CAAC,sBAAsB,E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kB,GAAG,kBAAK,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC;QACrG,IAAI,kBAAkB,EAAE;YACpB,yBAAW,CAAC,WAAW,CAAC,8BAAgB,CAAC,OAAO,CAAC,CAAC;YAClD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;SACxD;IACL,CAAC;CACJ;AAtNY,oBAAoB;IADhC,yBAAa,CAAC,IAAI,CAAC,qBAAqB,EAAE;GAC9B,oBAAoB,CAsNhC;AAtNY,oDAAoB;;;;;;;ACtCjC,+C","file":"neo-forcetool.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"NeoCommon\"), require(\"NeoGames\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"NeoCommon\", \"NeoGames\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"NeoForceTool\"] = factory(require(\"NeoCommon\"), require(\"NeoGames\"));\n\telse\n\t\troot[\"NeoForceTool\"] = factory(root[\"NeoCommon\"], root[\"NeoGames\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_8__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e952f21ca4bd9943871b","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"NeoCommon\"\n// module id = 0\n// module chunks = 0","import {Utils, FileUtils, StringUtils, UriHelper, lodash} from 'neo-common';\nimport {ForceToolCommand, ForceToolDefinition, ForceToolSet, ForceToolSetFile, SetCategory, SetDefinition, SetFileDefinition} from './Types';\nimport {IHashItem} from \"neo-common/Engine/Utils/UriHelper\";\n//import {readLocalJsonFile} from './ForceUtils';\n\nconst baseFolder = 'ForceTool';\nconst fileDefinition = `${baseFolder}/definition.json`;\n\nconst windowKeyPrefix = 'NEO_ForceTool_';\n\nconst windowKeys = {\n Definition: windowKeyPrefix + 'Definition',\n Current: {\n Category: windowKeyPrefix + 'Current_Category',\n File: windowKeyPrefix + 'Current_File',\n CommandIndex: windowKeyPrefix + 'Current_CommandIndex',\n }\n};\n\nconst queryStrings = {\n forceToolEnabled: 'force'\n};\n\nconst queryHashes = {\n category: 'category',\n file: 'file'\n};\n\ntype FileCategoryDefinition = {\n [SetName: string]: SetFileDefinition;\n}\n\ntype FileDefinition = {\n Categories: {[CategoryName: string]: FileCategoryDefinition};\n}\n\nexport class ForceToolApi {\n public static getSampleForceSetFile(): ForceToolSetFile {\n return {\n Name: 'SampleSet',\n Description: 'Sample Force Set Commands File',\n Commands: [\n {\n Description: 'Command 1',\n Module: 'base',\n Action: 'spin',\n Command: '/S'\n },\n {\n Description: 'Command 2',\n Module: 'freespin',\n Action: 'spin',\n Command: '/S /S'\n }\n ]\n };\n }\n\n public static updateCurrentForceSet(newForceSet: ForceToolSet): Promise {\n return Promise.resolve()\n .then(() => {\n const categoryName = window[windowKeys.Current.Category] as string;\n const fileName = window[windowKeys.Current.File] as string;\n return !StringUtils.isNullOrEmpty(categoryName) && !StringUtils.isNullOrEmpty(fileName)\n ? ForceToolApi.getFileSet(categoryName, fileName)\n : null;\n })\n .then(set => {\n if (set) {\n if ('File' in newForceSet) {\n delete newForceSet.File;\n }\n\n lodash.assign(set, newForceSet);\n return true;\n }\n\n return false;\n });\n }\n\n public static clearCurrent(): void {\n ForceToolApi.setCurrentCommandIndex(-1);\n window[windowKeys.Current.Category] = '';\n window[windowKeys.Current.File] = '';\n ForceToolApi.removeUrlHash();\n }\n\n public static resetCurrentForceSet(): Promise {\n return Promise.resolve()\n .then(() => {\n const categoryName = window[windowKeys.Current.Category] as string;\n const fileName = window[windowKeys.Current.File] as string;\n return !StringUtils.isNullOrEmpty(categoryName) && !StringUtils.isNullOrEmpty(fileName)\n ? ForceToolApi.getFileSet(categoryName, fileName, true)\n : null;\n });\n }\n\n public static getFileSet(categoryName: string, fileName: string, restoreFromFile: boolean = false): Promise {\n\n function updateCurrent(set: ForceToolSet, categoryName: string, fileName: string) {\n window[windowKeys.Current.Category] = categoryName;\n window[windowKeys.Current.File] = fileName;\n\n let currentCommandIndex = ForceToolApi.getCurrentCommandIndex();\n if (currentCommandIndex >= set.Commands.length) {\n currentCommandIndex = -1;\n ForceToolApi.setCurrentCommandIndex(currentCommandIndex);\n }\n\n if (set.Commands.length > 0 && currentCommandIndex === -1) {\n currentCommandIndex = 0;\n ForceToolApi.setCurrentCommandIndex(currentCommandIndex);\n }\n\n // update current URL hash to include 'category' and 'file' with its values\n const hashGroups = UriHelper.getHashGroups();\n let itemCategory = lodash.find(hashGroups, (item: IHashItem) => item.name === queryHashes.category);\n if (Utils.isNullOrUndefined(itemCategory)) {\n itemCategory = {\n name: queryHashes.category,\n value: ''\n };\n hashGroups.push(itemCategory);\n }\n\n let itemFile = lodash.find(hashGroups, (item: IHashItem) => item.name === queryHashes.file);\n if (Utils.isNullOrUndefined(itemFile)) {\n itemFile = {\n name: queryHashes.file,\n value: ''\n };\n hashGroups.push(itemFile);\n }\n\n itemCategory.value = categoryName;\n itemFile.value = ForceToolApi.extractFileBaseName(fileName);\n UriHelper.updateHash(hashGroups);\n }\n\n return ForceToolApi.getDefinition()\n .then(definition => {\n const category = lodash.find(definition.Categories, (categ: any) => categ.Name === categoryName);\n if (!Utils.isNullOrUndefined(category)) {\n const categorySet = lodash.find(category.Sets, (set: any) => set.File === fileName);\n if (!Utils.isNullOrUndefined(categorySet)) {\n if (restoreFromFile === true) {\n categorySet.Set = null;\n }\n\n if (Utils.isNullOrUndefined(categorySet.Set)) {\n return ForceToolApi.readForceSetFile(fileName)\n .then(set => {\n categorySet.Set = set;\n updateCurrent(set, categoryName, fileName);\n return set;\n });\n }\n\n updateCurrent(categorySet.Set, categoryName, fileName);\n return categorySet.Set;\n }\n }\n\n return null;\n });\n }\n\n public static removeUrlHash(): void {\n const hashGroups = UriHelper.getHashGroups();\n lodash.remove(hashGroups, (item: IHashItem) => item.name === queryHashes.category);\n lodash.remove(hashGroups, (item: IHashItem) => item.name === queryHashes.file);\n\n if (hashGroups.length === 0) {\n if ('pushState' in history) {\n history.replaceState('', document.title, window.location.pathname + window.location.search);\n } else {\n location.hash = '';\n }\n } else {\n UriHelper.updateHash(hashGroups);\n }\n }\n\n private static readForceSetFile(fileName: string): Promise {\n //return readLocalJsonFile(UriHelper.setTimeStamp(fileName))\n return readLocalJsonFile(UriHelper.setTimeStamp(fileName))\n .catch(err => {\n if (DEBUG) {\n console.warn(`Read force tool set from file '${fileName}' failed`, err);\n }\n\n return null;\n })\n .then(setFile => {\n const fileExist = !Utils.isNullOrUndefined(setFile);\n\n const result: ForceToolSet = ForceToolApi.isValidForceSetFile(setFile) ? setFile : {\n File: fileName,\n Name: '-',\n Description: fileExist ? 'Invalid file format!' : 'File does not exist',\n Commands: []\n };\n\n result.File = fileName;\n\n return result;\n });\n }\n\n private static requiredCommandKeys = ['Action', 'Command', 'Module'];\n\n public static isValidForceSetFile(setFile: ForceToolSet): boolean {\n let valid = !Utils.isNullOrUndefined(setFile) &&\n !Utils.isNullOrUndefined(setFile.Name) &&\n !Utils.isNullOrUndefined(setFile.Commands);\n\n if (valid && lodash.isArray(setFile.Commands) && setFile.Commands.length > 0) {\n valid = lodash.every(setFile.Commands, (cmd: ForceToolCommand) => {\n return ForceToolApi.isValidForceCommand(cmd);\n });\n }\n return valid;\n }\n\n public static get hasSelectedForceSet(): boolean {\n var categoryName = window[windowKeys.Current.Category];\n var fileName = window[windowKeys.Current.File];\n return !StringUtils.isNullOrEmpty(categoryName) && !StringUtils.isNullOrEmpty(fileName);\n }\n\n public static isValidForceCommand(command: ForceToolCommand): boolean {\n const validKeys = lodash.intersection(lodash.keys(command), ForceToolApi.requiredCommandKeys);\n return !Utils.isNullOrUndefined(command.Description) &&\n validKeys.length === ForceToolApi.requiredCommandKeys.length;\n }\n\n public static getCurrentForceSet(): Promise {\n return Promise.resolve()\n .then(() => {\n const categoryName = window[windowKeys.Current.Category] as string;\n const fileName = window[windowKeys.Current.File] as string;\n return !StringUtils.isNullOrEmpty(categoryName) && !StringUtils.isNullOrEmpty(fileName)\n ? ForceToolApi.getFileSet(categoryName, fileName)\n : null;\n })\n .then(set => {\n if (!Utils.isNullOrUndefined(set)) {\n return set;\n }\n\n const hashGroups = UriHelper.getHashGroups();\n const itemCategory = lodash.find(hashGroups, (item: IHashItem) => item.name === queryHashes.category);\n const itemFile = lodash.find(hashGroups, (item: IHashItem) => item.name === queryHashes.file);\n const category = itemCategory ? itemCategory.value : null;\n let file = itemFile ? itemFile.value : null;\n const validData = !Utils.isNullOrUndefined(category) && !Utils.isNullOrUndefined(file);\n if (validData) {\n file = ForceToolApi.createFileName(category, file);\n }\n\n return validData ? ForceToolApi.getFileSet(category, file) : null;\n });\n }\n\n public static getCurrentCommandIndex(): number {\n let currentCommandIndex = window[windowKeys.Current.CommandIndex] as number;\n if (Utils.isNullOrUndefined(currentCommandIndex)) {\n currentCommandIndex = -1;\n ForceToolApi.setCurrentCommandIndex(currentCommandIndex);\n }\n\n return currentCommandIndex;\n }\n\n public static setCurrentCommandIndex(value: number): void {\n window[windowKeys.Current.CommandIndex] = value;\n }\n\n public static getDefinition(): Promise {\n let definition = window[windowKeys.Definition] as ForceToolDefinition;\n if (!Utils.isNullOrUndefined(definition)) {\n return Promise.resolve(definition);\n }\n\n return ForceToolApi.readDefinition()\n .then(definition => {\n if (!Utils.isNullOrUndefined(definition)) {\n // cache it in window obj\n window[windowKeys.Definition] = definition;\n }\n return definition;\n });\n }\n\n public static getNonBaseFilePath(fileName: string): string {\n if (!Utils.isNullOrUndefined(fileName)) {\n var parts = fileName.split('/');\n if (parts.length > 0) {\n if (parts[0].toLowerCase() === baseFolder.toLowerCase()) {\n parts.splice(0, 1);\n }\n return parts.join('/');\n }\n }\n return fileName;\n }\n\n private static extractFileBaseName(fileName: string): string {\n if (!Utils.isNullOrUndefined(fileName)) {\n const parts = fileName.split('/');\n if (parts.length === 3) {\n return parts[2];\n }\n }\n\n return fileName;\n }\n\n private static createFileName(category: string, file: string): string {\n return `${baseFolder}/${category}/${file}`;\n }\n\n private static readDefinition(): Promise {\n return readLocalJsonFile(UriHelper.setTimeStamp(fileDefinition))\n .catch(err => {\n if (DEBUG) {\n console.warn(`Read force tool definition from file '${fileDefinition}' failed`, err);\n }\n\n return null;\n })\n .then(fileDefinition => {\n const result: ForceToolDefinition = {\n Categories: []\n };\n\n if (!Utils.isNullOrUndefined(fileDefinition) && !Utils.isNullOrUndefined(fileDefinition.Categories)) {\n for (const categoryName in fileDefinition.Categories) {\n if (fileDefinition.Categories.hasOwnProperty(categoryName)) {\n const setCategory: SetCategory = {\n Name: categoryName,\n Sets: []\n };\n\n const categoryDefinition = fileDefinition.Categories[categoryName] as FileCategoryDefinition;\n\n for (const setName in categoryDefinition) {\n if (categoryDefinition.hasOwnProperty(setName)) {\n const setDefinition = categoryDefinition[setName] as SetDefinition;\n setDefinition.Name = setName;\n //setDefinition.File = `${baseFolder}/${categoryName}/${setDefinition.File}`;\n setDefinition.File = ForceToolApi.createFileName(categoryName, setDefinition.File);\n\n setCategory.Sets.push(setDefinition);\n }\n }\n\n result.Categories.push(setCategory);\n }\n }\n }\n\n return result;\n });\n }\n}\n\nfunction readLocalJsonFile(file: string, throwError?: boolean): Promise {\n return FileUtils.readLocalJsonFile(file, throwError) as Promise;\n}\n\n\n// WEBPACK FOOTER //\n// ./src/ForceToolApi.ts","import {Utils, StringUtils, HtmlUtils, lodash} from 'neo-common';\nimport {ForceToolApi} from './ForceToolApi';\nimport {ForceToolCommand, ForceToolDefinition, ForceToolExternalSetupInfo, ForceToolSet, SetCategory, SetDefinition} from './Types';\nimport md5 = require('blueimp-md5');\n\nconst elementIds = {\n demoContainer: 'forceToolDemo',\n container: 'forceToolContainer',\n overlay: 'forceToolOverlay',\n demoCloseOverlay: 'forceToolDemoCloseOverlay',\n title: 'forceToolTitle',\n titleText: 'title-text',\n titleBtn: 'title-btn',\n titleActionsPanel: 'title-actions',\n forceToolDemoBtn: 'forceToolDemoBtn',\n forceToolList: 'forceToolList',\n forceToolContent: 'forceToolContent',\n currentForceSet: 'currentForceSet',\n linkContentCurrent: 'linkContentCurrent',\n linkContentAll: 'linkContentAll',\n\n txtCurrentForceSet: 'txtCurrentForceSet',\n txtCurrentForceSetFile: 'txtCurrentForceSetFile',\n\n divForceSetCommands: 'divForceSetCommands',\n divForceSetRawContent: 'divForceSetRawContent',\n txtRawForceSetCommands: 'txtRawForceSetCommands',\n divCommandsFooterNextCommand: 'divCommandsFooterNextCommand',\n divCommandsFooterLinks: 'divCommandsFooterLinks',\n lblCommandsFooterNextCommand: 'lblCommandsFooterNextCommand',\n linkCommandsFooterEdit: 'linkCommandsFooterEdit',\n linkCommandsFooterEditCancel: 'linkCommandsFooterEditCancel',\n linkCommandsFooterEditRestore: 'linkCommandsFooterEditRestore'\n};\n\nconst elements = {\n demoContainer: null as HTMLDivElement,\n container: null as HTMLDivElement,\n overlay: null as HTMLDivElement,\n title: null as HTMLHeadingElement,\n titleText: null as HTMLSpanElement,\n titleBtn: null as HTMLSpanElement,\n titleActionsPanel: null as HTMLDivElement,\n forceToolDemoBtn: null as HTMLButtonElement,\n forceToolList: null as HTMLDivElement,\n forceToolContent: null as HTMLDivElement,\n demoCloseOverlay: null as HTMLDivElement,\n\n currentForceSet: null as HTMLDivElement,\n linkContentCurrent: null as HTMLAnchorElement,\n linkContentAll: null as HTMLAnchorElement,\n txtCurrentForceSet: null as HTMLLabelElement,\n txtCurrentForceSetFile: null as HTMLLabelElement,\n\n divForceSetCommands: null as HTMLDivElement,\n divForceSetRawContent: null as HTMLDivElement,\n txtRawForceSetCommands: null as HTMLTextAreaElement,\n divCommandsFooterNextCommand: null as HTMLDivElement,\n divCommandsFooterLinks: null as HTMLDivElement,\n lblCommandsFooterNextCommand: null as HTMLSpanElement,\n linkCommandsFooterEdit: null as HTMLAnchorElement,\n linkCommandsFooterEditCancel: null as HTMLAnchorElement,\n linkCommandsFooterEditRestore: null as HTMLAnchorElement\n};\n\ntype ForceEditorMode = 'list' | 'editor';\n\nconst HREF_VOID = 'javascript: void(0);';\n\nconst htmlTemplates = {\n demoContainer: `
\n \n
`,\n\n container: `
\n
\n
\n\n\n
\n Current\n All\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n \n \n
\n
\n Cancel\n Edit\n Restore\n
\n
\n
\n
`,\n\n categoryName: (category: SetCategory) => ``,\n\n categorySetItem: (category: SetCategory, set: SetDefinition) =>\n `
  • \n \n
  • `\n};\n\nconst NEWLINE = '\\n';\n\nexport enum ForceToolUIState {\n Enabled,\n Disabled\n}\n\nexport enum ForceToolLayout {\n Debug = 'debug',\n DemoDebug = 'demodebug',\n Demo = 'demo'\n}\n\nexport class ForceToolUI {\n private static _initialized = false;\n private static _state = ForceToolUIState.Enabled;\n private static _layout = ForceToolLayout.Debug;\n private static _demoRunning = false;\n private static _externalSetupInfo: ForceToolExternalSetupInfo;\n private static _pinDialogVisible: boolean;\n\n public static initialize(layout: ForceToolLayout, externalSetupInfo: ForceToolExternalSetupInfo): Promise {\n return Promise.resolve()\n .then(() => {\n if (!ForceToolUI._initialized) {\n ForceToolUI._externalSetupInfo = externalSetupInfo;\n ForceToolUI._layout = layout;\n ForceToolUI.initHtml();\n ForceToolUI._initialized = true;\n return ForceToolApi.getDefinition()\n .then(definition => ForceToolUI.drawList(definition))\n .then(() => ForceToolUI.afterDrawList())\n .catch(err => ForceToolUI.drawError(err, 'Error loading force tool definition file'));\n }\n });\n }\n\n public static updateState(state: ForceToolUIState): void {\n if (state !== ForceToolUI._state) {\n ForceToolUI._state = state;\n //ForceToolUI.refresh();\n\n HtmlUtils.toggleShow(elements.overlay, state === ForceToolUIState.Disabled);\n setTimeout(() => {\n ForceToolUI.refresh();\n }, 10);\n }\n }\n\n public static get demoRunning(): boolean {\n return this._demoRunning;\n }\n\n public static set demoRunning(value: boolean) {\n this._demoRunning = value;\n }\n\n private static get layoutIsDemo(): boolean {\n return ForceToolUI._layout === ForceToolLayout.Demo;\n }\n\n private static get layoutIsDemoLike(): boolean {\n return Utils.valueIsIn(ForceToolUI._layout, [ForceToolLayout.Demo, ForceToolLayout.DemoDebug]);\n }\n\n private static get layoutIsDebugLike(): boolean {\n return Utils.valueIsIn(ForceToolUI._layout, [ForceToolLayout.Debug, ForceToolLayout.DemoDebug]);\n }\n\n private static initHtml() {\n // force tool container ...\n let container = document.getElementById(elementIds.container);\n if (container) {\n container.parentElement.removeChild(container);\n }\n\n container = document.createElement('div');\n container.setAttribute('id', elementIds.container);\n container.classList.add('expanded');\n container.innerHTML = htmlTemplates.container;\n container.dataset['layout'] = ForceToolUI._layout;\n\n if (ForceToolUI.layoutIsDemoLike && !ForceToolApi.hasSelectedForceSet) {\n container.style.display = 'none';\n }\n\n document.body.insertBefore(container, document.body.firstChild);\n\n // forceToolDemo\n let demoContainer = document.getElementById(elementIds.demoContainer);\n if (demoContainer) {\n demoContainer.parentElement.removeChild(demoContainer);\n }\n\n if (ForceToolUI.layoutIsDemoLike) {\n demoContainer = document.createElement('div');\n demoContainer.setAttribute('id', elementIds.demoContainer);\n demoContainer.innerHTML = htmlTemplates.demoContainer;\n document.body.insertBefore(demoContainer, document.body.firstChild);\n }\n\n ForceToolUI._pinDialogVisible = false;\n\n // find elements\n ForceToolUI.findElements(ForceToolUI.layoutIsDebugLike);\n\n if (ForceToolUI.layoutIsDemoLike) {\n const clearFix = document.createElement('div');\n clearFix.classList.add('clearfix');\n elements.demoContainer.parentNode.insertBefore(clearFix, elements.demoContainer.nextSibling);\n\n elements.forceToolDemoBtn.addEventListener('click', ForceToolUI.demoButtonClick);\n\n elements.demoCloseOverlay.addEventListener('click', ForceToolUI.demoButtonClick);\n } else {\n container.removeChild(elements.demoCloseOverlay);\n }\n\n elements.titleText.innerText = ForceToolUI.layoutIsDemoLike ? 'Select Demo Set' : 'Force Tool Sets';\n\n if (!ForceToolUI.layoutIsDebugLike) {\n HtmlUtils.toggleShow(elements.titleActionsPanel, false);\n }\n HtmlUtils.toggleShow(elements.txtCurrentForceSetFile, ForceToolUI.layoutIsDebugLike);\n HtmlUtils.toggleShow(elements.txtCurrentForceSet, ForceToolUI.layoutIsDebugLike);\n\n if (!ForceToolUI.layoutIsDebugLike) {\n elements.divForceSetRawContent.parentElement.removeChild(elements.divForceSetRawContent);\n //elements.divCommandsFooterNextCommand.parentElement.removeChild(elements.divCommandsFooterNextCommand);\n elements.divCommandsFooterLinks.parentElement.removeChild(elements.divCommandsFooterLinks);\n }\n\n // attach handlers to html events of elements\n elements.titleBtn.addEventListener('click', ForceToolUI.expandCollapse);\n elements.linkContentAll.addEventListener('click', ForceToolUI.changeContent);\n elements.linkContentCurrent.addEventListener('click', ForceToolUI.changeContent);\n elements.linkCommandsFooterEdit.addEventListener('click', ForceToolUI.editCancelRawEditor);\n elements.linkCommandsFooterEditCancel.addEventListener('click', ForceToolUI.editCancelRawEditor);\n elements.linkCommandsFooterEditRestore.addEventListener('click', ForceToolUI.editCancelRawEditor);\n\n const forceFileSetSample = JSON.stringify(ForceToolApi.getSampleForceSetFile(), null, ' ');\n elements.txtRawForceSetCommands.placeholder = `Enter valid force set commands JSON.\\nExample:\\n\\n` + forceFileSetSample;\n\n //elements.forceToolList.innerHTML = 'Loading...';\n elements.forceToolList.innerHTML = '';\n }\n\n private static afterDrawList(allowedPinDetection: boolean = true) {\n // attach click on list buttons (sets)\n const setsButtons = HtmlUtils.queryElements('#forceToolList button[data-file]') as HTMLButtonElement[];\n lodash.each(setsButtons, (btn: HTMLButtonElement) => {\n btn.addEventListener('click', ForceToolUI.openSetButtonClick);\n });\n\n if (ForceToolUI.layoutIsDemo) {\n ForceToolApi.clearCurrent();\n }\n\n ForceToolUI.redrawCurrentForceSet();\n\n if (allowedPinDetection) {\n const genDemoPin = ForceToolUI.generatePinHashMode;\n if (genDemoPin && ForceToolUI.layoutIsDebugLike) {\n ForceToolUI.renderPINDialog(true);\n } else {\n ForceToolUI.renderEnterPINDialog();\n }\n }\n }\n\n private static get generatePinHashMode(): boolean {\n return Utils.asBool(Utils.valueOrDefault(Utils.getURIQuery()['gen.hash'], 'false'))\n && ForceToolUI.layoutIsDebugLike;\n }\n\n private static renderEnterPINDialog(): void {\n if (!Utils.isNullOrUndefined(this._externalSetupInfo) && ForceToolUI.layoutIsDemoLike) {\n const demoPINHash = this._externalSetupInfo.forceToolDemoPINHash();\n if (!StringUtils.isNullOrEmpty(demoPINHash)) {\n ForceToolUI.renderPINDialog(false);\n }\n }\n }\n\n private static renderPINDialog(generatePin: boolean): void {\n const title = generatePin ? 'Generate PIN HASH' : 'Enter DEMO PIN:';\n const submitText = generatePin ? 'Generate HASH' : 'Continue';\n const submitMode = generatePin ? 'generate' : 'validate';\n\n const pinPadHtml = ForceToolUI.renderNumericPINPad(!generatePin);\n\n /*\n ${title}\n */\n\n const pinInputType = generatePin ? 'text' : 'password';\n\n let html = `\n \n \n \n \n \n \n \n `;\n\n if (generatePin) {\n html += `\n \n \n `;\n }\n\n html += `
    \n \n
    \n ${pinPadHtml}\n
    \n \n
    `;\n elements.forceToolContent.innerHTML = html;\n\n const pinPadButtons = HtmlUtils.queryElements('button[data-pin-button]');\n lodash.each(pinPadButtons, (btn: HTMLButtonElement) => {\n btn.addEventListener('click', ForceToolUI.pinPadButtonClicked);\n });\n\n ForceToolUI._pinDialogVisible = true;\n }\n\n private static pinPadButtonClicked(event: Event): void {\n const button = event.currentTarget as HTMLButtonElement;\n const btnValue = Number(button.dataset['pinButton']);\n const edDemoPin = document.getElementById('edDemoPin') as HTMLInputElement;\n\n let generatePinHash = ForceToolUI.layoutIsDebugLike;\n let canSubmit = ForceToolUI.generatePinHashMode;\n\n if (btnValue > -1) {\n edDemoPin.value += btnValue;\n } else {\n if (btnValue === -1) {\n const value = edDemoPin.value;\n if (!StringUtils.isNullOrEmpty(value) && value.length > 0) {\n edDemoPin.value = value.length === 1 ? '' : value.substr(0, value.length - 1);\n }\n } else if (btnValue === -2) {\n generatePinHash = false;\n canSubmit = true;\n }\n }\n\n if (canSubmit) {\n ForceToolUI.submitDemoPinHash(generatePinHash);\n }\n }\n\n private static renderNumericPINPad(renderAccept: boolean = true): string {\n const acceptHtml = renderAccept ? '' : '';\n return `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ${acceptHtml}\n \n
    `;\n }\n\n private static submitDemoPinHash(generatePinHash: boolean): void {\n const edDemoPin = document.getElementById('edDemoPin') as HTMLInputElement;\n const demoPin = edDemoPin.value;\n const hasDemoPin = !StringUtils.isNullOrEmpty(demoPin);\n\n if (generatePinHash) {\n const hash = hasDemoPin ? md5(demoPin, null, false) : '';\n\n const edDemoPinHash = document.getElementById('edDemoPinHash') as HTMLInputElement;\n edDemoPinHash.value = hash;\n\n if (hasDemoPin) {\n edDemoPinHash.select();\n edDemoPinHash.focus();\n }\n } else {\n const demoPINHash = ForceToolUI._externalSetupInfo.forceToolDemoPINHash();\n const hash = md5(demoPin, null, false);\n if (demoPINHash === hash) {\n ForceToolUI.initHtml();\n ForceToolApi.getDefinition()\n .then(definition => ForceToolUI.drawList(definition))\n .then(() => ForceToolUI.afterDrawList(false))\n .then(() => {\n ForceToolUI.demoButtonClick();\n })\n .catch(err => ForceToolUI.drawError(err, 'Error loading force tool definition file'));\n } else {\n edDemoPin.value = '';\n alert('Invalid PIN!');\n }\n }\n }\n\n public static refresh(): void {\n ForceToolApi.getCurrentForceSet()\n .then(forceSet => {\n const hasCurrent = !Utils.isNullOrUndefined(forceSet);\n const content = hasCurrent ? 'Current' : 'All';\n ForceToolUI.changeContentTo(content, forceSet);\n if (hasCurrent) {\n ForceToolUI.setCurrentForceSet(forceSet);\n }\n });\n\n }\n\n private static redrawCurrentForceSet(): void {\n ForceToolApi.getCurrentForceSet()\n .then(forceSet => {\n if (!Utils.isNullOrUndefined(forceSet)) {\n ForceToolUI.setCurrentForceSet(forceSet);\n }\n });\n }\n\n private static setCurrentForceSet(forceSet: ForceToolSet): boolean {\n elements.txtRawForceSetCommands.value = '';\n ForceToolUI.changeContentTo('Current', forceSet);\n\n elements.txtCurrentForceSet.innerText = forceSet.Description;\n elements.txtCurrentForceSet.title = `${forceSet.Description} [${forceSet.Name}] File: ${forceSet.File}`;\n elements.txtCurrentForceSetFile.innerText = ForceToolApi.getNonBaseFilePath(forceSet.File);\n\n elements.divForceSetCommands.innerHTML = '';\n\n //let html = htmlTemplates.commandsTable.begin;\n let html = `\n \n \n `;\n\n if (ForceToolUI.layoutIsDebugLike) {\n html += ``;\n }\n\n html += ``;\n\n const nextCommandIndex = ForceToolApi.getCurrentCommandIndex();\n let nextCommand: ForceToolCommand = null;\n let activeCommandIndex = -1;\n\n for (let i = 0; i < forceSet.Commands.length; i++) {\n const command = forceSet.Commands[i];\n const isNextCommand = i === nextCommandIndex;\n if (isNextCommand) {\n nextCommand = command;\n activeCommandIndex = i;\n }\n const nextCommandCssClass = isNextCommand ? 'current' : '';\n const nextCommandHtml = isNextCommand ? '➤' : '';\n const rowCssClass = (!isNextCommand && i < nextCommandIndex) ? 'inactive' : '';\n const idx = i + 1 + '.';\n const isEmptyCommand = StringUtils.isNullOrEmpty(command.Command);\n\n html +=\n `\n \n `;\n\n const cellCss = isEmptyCommand ? 'no-cmd-cell' : '';\n\n const commandItemTitle = isEmptyCommand ? '<EMPTY COMMAND>' : command.Description;\n html += ``;\n\n if (ForceToolUI.layoutIsDebugLike) {\n html += `` + NEWLINE;\n }\n\n html += `` + NEWLINE;\n }\n\n //html += htmlTemplates.commandsTable.end;\n html += `
     #NameModuleAction
    ${nextCommandHtml}${idx}\n ${commandItemTitle}\n ${command.Module}${command.Action}
    `;\n elements.divForceSetCommands.innerHTML = html;\n\n const hasNextCommand = !Utils.isNullOrUndefined(nextCommand);\n\n elements.lblCommandsFooterNextCommand.innerText = hasNextCommand\n ? `${nextCommandIndex + 1}. ${nextCommand.Description} (${nextCommand.Module}/${nextCommand.Action})`\n : '';\n\n elements.lblCommandsFooterNextCommand.title = hasNextCommand\n ? `Command: ${nextCommand.Command}`\n : '';\n\n const commandsLinks = HtmlUtils.queryElements('#divForceSetCommands a[data-command=\"true\"]') as HTMLAnchorElement[];\n lodash.each(commandsLinks, (link: HTMLAnchorElement) => {\n link.addEventListener('click', ForceToolUI.changeCommandIndex);\n });\n\n if (activeCommandIndex > -1) {\n const activeCommandLinks = HtmlUtils.queryElements(`a[data-commandindex=\"${activeCommandIndex}\"]`);\n if (activeCommandLinks.length > 0) {\n (activeCommandLinks[0] as any).scrollIntoView(false);\n }\n }\n\n return hasNextCommand;\n }\n\n private static demoButtonClick(): void {\n if (ForceToolUI.demoRunning) {\n return;\n }\n\n function toggleContainerVisible() {\n const containerVisible = elements.container.style.display === 'block';\n HtmlUtils.toggleShow(elements.container, !containerVisible);\n }\n\n if (ForceToolUI._pinDialogVisible) {\n return toggleContainerVisible();\n }\n\n const hasCurrentCssClass = elements.forceToolContent.classList.contains('current');\n //HtmlUtils.toggleShow(elements.container, true);\n\n if (hasCurrentCssClass) {\n HtmlUtils.toggleShow(elements.container, true);\n ForceToolUI.changeContentTo('All', null);\n } else {\n return toggleContainerVisible();\n }\n }\n\n private static expandCollapse(): void {\n if (ForceToolUI.layoutIsDemo) {\n ForceToolUI.demoButtonClick();\n } else {\n const elem = elements.container;\n const expanded = elem.classList.contains('expanded');\n const currentClass = expanded ? 'expanded' : 'collapsed';\n const newClass = expanded ? 'collapsed' : 'expanded';\n elem.classList.remove(currentClass);\n elem.classList.add(newClass);\n }\n }\n\n private static openSetButtonClick(event: Event): void {\n const self = ForceToolUI;\n const button = event.currentTarget as HTMLButtonElement;\n const category = button.dataset['category'];\n const file = button.dataset['file'];\n ForceToolApi.setCurrentCommandIndex(-1);\n ForceToolApi.getFileSet(category, file)\n .then(setFile => {\n if (!Utils.isNullOrUndefined(setFile)) {\n const wasSet = ForceToolUI.setCurrentForceSet(setFile);\n self.demoRunning = wasSet && self.layoutIsDemoLike;\n if (self.demoRunning && self.layoutIsDemo) {\n HtmlUtils.toggleShow(elements.container, false);\n elements.forceToolDemoBtn.classList.remove('ready');\n elements.forceToolDemoBtn.classList.add('busy');\n }\n }\n });\n }\n\n public static notifyCommandSent(forceSet: ForceToolSet, commandIndex: number): void {\n let forceSetEnded = false;\n let newCommandIndex = commandIndex + 1;\n if (newCommandIndex >= forceSet.Commands.length) {\n newCommandIndex = 0;\n forceSetEnded = true;\n }\n\n ForceToolApi.setCurrentCommandIndex(newCommandIndex);\n ForceToolUI.refresh();\n\n if (forceSetEnded) {\n // when all force commands was sent and if demo is running, turn off demo\n if (ForceToolUI.demoRunning && ForceToolUI.layoutIsDemo) {\n setTimeout(() => {\n elements.forceToolDemoBtn.classList.remove('busy');\n elements.forceToolDemoBtn.classList.add('ready');\n ForceToolApi.clearCurrent();\n\n ForceToolUI.demoRunning = false;\n elements.titleText.innerText = ForceToolUI.layoutIsDemoLike ? 'Select Demo Set' : 'Force Tool Sets';\n ForceToolUI.renderEnterPINDialog();\n }, 1 * 1000);\n }\n }\n }\n\n private static changeCommandIndex(event: Event): void {\n const link = event.target as HTMLAnchorElement;\n const commandindex = Number(link.dataset['commandindex']);\n ForceToolApi.setCurrentCommandIndex(commandindex);\n ForceToolUI.redrawCurrentForceSet();\n }\n\n private static editCancelRawEditor(event: Event): void {\n const link = event.target as HTMLAnchorElement;\n const clickedEdit = link.id === elementIds.linkCommandsFooterEdit;\n const currentMode = elements.currentForceSet.dataset['mode'] as ForceEditorMode;\n\n function setNewMode(newMode: ForceEditorMode) {\n elements.currentForceSet.dataset['mode'] = newMode;\n elements.linkCommandsFooterEdit.innerText = newMode === 'editor' ? 'Apply' : 'Edit';\n }\n\n if (clickedEdit) {\n if (currentMode === 'list') {\n setNewMode('editor');\n\n if (StringUtils.isNullOrEmpty(elements.txtRawForceSetCommands.value)) {\n ForceToolApi.getCurrentForceSet()\n .then(forceSet => {\n if (!Utils.isNullOrUndefined(forceSet)) {\n const json = lodash.cloneDeep(forceSet) as ForceToolSet;\n delete json.File;\n\n elements.txtRawForceSetCommands.value = JSON.stringify(json, null, ' ');\n }\n });\n }\n } else {\n let forceSet: ForceToolSet = null;\n try {\n forceSet = StringUtils.isNullOrEmpty(elements.txtRawForceSetCommands.value) ? null : JSON.parse(elements.txtRawForceSetCommands.value);\n } catch (err) {\n alert('Error parsing text, its not valid JSON!');\n }\n\n if (forceSet) {\n if (!ForceToolApi.isValidForceSetFile(forceSet)) {\n alert('Invalid file format!');\n } else {\n ForceToolApi.updateCurrentForceSet(forceSet)\n .then(success => {\n if (success) {\n setNewMode('list');\n ForceToolUI.setCurrentForceSet(forceSet);\n }\n });\n }\n }\n }\n } else {\n const clickedRestore = link.id === elementIds.linkCommandsFooterEditRestore;\n if (clickedRestore) {\n if (confirm('Do you want to restore editor with definition from file?')) {\n ForceToolApi.resetCurrentForceSet()\n .then(forceSet => {\n if (forceSet) {\n ForceToolUI.setCurrentForceSet(forceSet);\n const json = lodash.cloneDeep(forceSet) as ForceToolSet;\n delete json.File;\n\n elements.txtRawForceSetCommands.value = JSON.stringify(json, null, ' ');\n }\n });\n }\n } else {\n const hasSomeData = !StringUtils.isNullOrEmpty(elements.txtRawForceSetCommands.value) && elements.txtRawForceSetCommands.value.length > 0;\n\n if (hasSomeData) {\n if (!confirm('Do you want to keep current changes in editor?\\n' +\n 'OK - Keep editor text\\n' +\n 'Cancel - Clear editor text')) {\n elements.txtRawForceSetCommands.value = '';\n }\n }\n setNewMode('list');\n }\n }\n }\n\n private static changeContent(event: Event): void {\n const link = event.target as HTMLAnchorElement;\n const clickedAll = (link.id === elementIds.linkContentAll);\n if (clickedAll) {\n ForceToolUI.changeContentTo('All', null);\n } else {\n ForceToolApi.getCurrentForceSet()\n .then(forceSet => {\n ForceToolUI.changeContentTo('Current', forceSet);\n });\n }\n }\n\n private static changeContentTo(content: 'Current' | 'All', forceSet: ForceToolSet): void {\n const changeToAll = content === 'All';\n const hasCurrentCssClass = elements.forceToolContent.classList.contains('current');\n\n if (changeToAll) {\n ForceToolApi.clearCurrent();\n\n if (hasCurrentCssClass) {\n elements.forceToolContent.classList.remove('current');\n }\n\n if (elements.linkContentCurrent.classList.contains('selected')) {\n elements.linkContentCurrent.classList.remove('selected');\n }\n\n if (!elements.linkContentAll.classList.contains('selected')) {\n elements.linkContentAll.classList.add('selected');\n }\n\n elements.titleText.innerText = ForceToolUI.layoutIsDemoLike ? 'Select Demo Set' : 'Force Tool Sets';\n } else {\n if (!hasCurrentCssClass) {\n elements.forceToolContent.classList.add('current');\n }\n\n if (elements.linkContentAll.classList.contains('selected')) {\n elements.linkContentAll.classList.remove('selected');\n }\n\n if (!elements.linkContentCurrent.classList.contains('selected')) {\n elements.linkContentCurrent.classList.add('selected');\n }\n\n //elements.titleText.innerText = ForceToolUI.layoutIsDemoLike ? 'Demo Set' : 'Force Tool Set';\n elements.titleText.innerText = forceSet ? forceSet.Description : '-';\n }\n }\n\n private static findElements(layoutIsDebugLike: boolean): boolean {\n let hasElements = true;\n\n for (const key in elementIds) {\n const elementId = elementIds[key];\n elements[key] = document.getElementById(elementId);\n\n if (Utils.isNullOrUndefined(elements[key])) {\n if (layoutIsDebugLike && Utils.valueIsIn(elementId, [elementIds.demoContainer, elementIds.forceToolDemoBtn])) {\n continue;\n }\n\n hasElements = false;\n if (DEBUG) {\n console.error(`Could not find element with id '${elementId}' `);\n }\n break;\n }\n }\n\n return hasElements;\n }\n\n private static drawList(definition: ForceToolDefinition | undefined) {\n let html = '';\n for (let i = 0; i < definition.Categories.length; i++) {\n const category = definition.Categories[i];\n html += htmlTemplates.categoryName(category) + NEWLINE;\n html += '
      ' + NEWLINE;\n\n if (category.Sets.length === 0) {\n html += '
    • CATEGORY HAS NO SETS
    • ' + NEWLINE;\n } else {\n for (let j = 0; j < category.Sets.length; j++) {\n const set = category.Sets[j];\n html += htmlTemplates.categorySetItem(category, set) + NEWLINE;\n }\n }\n\n html += '
    ' + NEWLINE;\n }\n\n elements.forceToolList.innerHTML = html;\n }\n\n private static drawError(error: any, message: string) {\n elements.forceToolList.innerHTML = message;\n\n if (error) {\n console.error(error);\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/ForceToolUI.ts","import {\n libraryInitialize as neoCommonInitialize,\n} from 'neo-common';\n\nneoCommonInitialize();\n\nimport {runTestApp} from './TestApp';\nimport {ForceToolApi} from './ForceToolApi';\nimport * as Types from './Types';\n\nimport './ForceToolInterceptor';\n\nexport {\n runTestApp,\n ForceToolApi,\n Types\n}\n\n\n// WEBPACK FOOTER //\n// ./src/index.ts","import {ForceToolApi} from './ForceToolApi';\nimport * as Types from './Types';\nimport {ForceToolLayout, ForceToolUI} from './ForceToolUI';\nimport {ForceToolExternalSetupInfo} from './Types';\n\nexport function runTestApp() {\n ForceToolApi.getDefinition()\n .then(definition => displayDefinition(definition));\n\n const externalSetupInfo: ForceToolExternalSetupInfo = {\n isForceToolDebugEnabled: () => true,\n isForceToolEnabled: () => true,\n forceToolDemoPINHash: () => 'e10adc3949ba59abbe56e057f20f883e',\n isGameCollectable: () => false\n };\n ForceToolUI.initialize(ForceToolLayout.Debug, externalSetupInfo);\n}\n\nfunction displayDefinition(definition: Types.ForceToolDefinition) {\n console.log(`Categories (${definition.Categories.length}) and sets:`);\n\n for (let i = 0; i < definition.Categories.length; i++) {\n const category = definition.Categories[i];\n console.log(`\\t${category.Name}`);\n if (category.Sets.length === 0) {\n console.log('\\t' + '- NO SETS');\n } else {\n for (let j = 0; j < category.Sets.length; j++) {\n const set = category.Sets[j];\n console.log('\\t' + `- ${set.Name} [${set.Description}] | ${set.File}`);\n }\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/TestApp.ts","/*\n * JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\n\n/* global define */\n\n;(function ($) {\n 'use strict'\n\n /*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n function safeAdd (x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff)\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16)\n return (msw << 16) | (lsw & 0xffff)\n }\n\n /*\n * Bitwise rotate a 32-bit number to the left.\n */\n function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }\n\n /*\n * These functions implement the four basic operations the algorithm uses.\n */\n function md5cmn (q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)\n }\n function md5ff (a, b, c, d, x, s, t) {\n return md5cmn((b & c) | (~b & d), a, b, x, s, t)\n }\n function md5gg (a, b, c, d, x, s, t) {\n return md5cmn((b & d) | (c & ~d), a, b, x, s, t)\n }\n function md5hh (a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t)\n }\n function md5ii (a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t)\n }\n\n /*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n function binlMD5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[((len + 64) >>> 9 << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n }\n\n /*\n * Convert an array of little-endian words to a string\n */\n function binl2rstr (input) {\n var i\n var output = ''\n var length32 = input.length * 32\n for (i = 0; i < length32; i += 8) {\n output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff)\n }\n return output\n }\n\n /*\n * Convert a raw string to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n function rstr2binl (input) {\n var i\n var output = []\n output[(input.length >> 2) - 1] = undefined\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0\n }\n var length8 = input.length * 8\n for (i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32)\n }\n return output\n }\n\n /*\n * Calculate the MD5 of a raw string\n */\n function rstrMD5 (s) {\n return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))\n }\n\n /*\n * Calculate the HMAC-MD5, of a key and some data (raw strings)\n */\n function rstrHMACMD5 (key, data) {\n var i\n var bkey = rstr2binl(key)\n var ipad = []\n var opad = []\n var hash\n ipad[15] = opad[15] = undefined\n if (bkey.length > 16) {\n bkey = binlMD5(bkey, key.length * 8)\n }\n for (i = 0; i < 16; i += 1) {\n ipad[i] = bkey[i] ^ 0x36363636\n opad[i] = bkey[i] ^ 0x5c5c5c5c\n }\n hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)\n return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))\n }\n\n /*\n * Convert a raw string to a hex string\n */\n function rstr2hex (input) {\n var hexTab = '0123456789abcdef'\n var output = ''\n var x\n var i\n for (i = 0; i < input.length; i += 1) {\n x = input.charCodeAt(i)\n output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)\n }\n return output\n }\n\n /*\n * Encode a string as utf-8\n */\n function str2rstrUTF8 (input) {\n return unescape(encodeURIComponent(input))\n }\n\n /*\n * Take string arguments and return either raw or hex encoded strings\n */\n function rawMD5 (s) {\n return rstrMD5(str2rstrUTF8(s))\n }\n function hexMD5 (s) {\n return rstr2hex(rawMD5(s))\n }\n function rawHMACMD5 (k, d) {\n return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))\n }\n function hexHMACMD5 (k, d) {\n return rstr2hex(rawHMACMD5(k, d))\n }\n\n function md5 (string, key, raw) {\n if (!key) {\n if (!raw) {\n return hexMD5(string)\n }\n return rawMD5(string)\n }\n if (!raw) {\n return hexHMACMD5(key, string)\n }\n return rawHMACMD5(key, string)\n }\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return md5\n })\n } else if (typeof module === 'object' && module.exports) {\n module.exports = md5\n } else {\n $.md5 = md5\n }\n})(this)\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/blueimp-md5/js/md5.js\n// module id = 5\n// module chunks = 0","import {Logger, StringUtils, Utils, ApiClientCommunication} from 'neo-common';\nimport {Communication} from 'neo-games';\nimport {ForceToolLayout, ForceToolUI, ForceToolUIState} from './ForceToolUI';\nimport {ForceToolApi} from './ForceToolApi';\nimport {ForceToolExternalSetup, ForceToolExternalSetupInfo, ForceToolSet} from './Types';\n\ntype ApiClientError = ApiClientCommunication.Types.ApiClientError;\ntype ResponseBase = ApiClientCommunication.ResponseBase;\ntype IRequest = Communication.Game.IRequest;\ntype SendRequestFunctionType = Communication.Game.SendRequestFunctionType;\ntype IGameClientInterceptor = Communication.Game.IGameClientInterceptor;\ntype InterceptorRequestContext = Communication.Game.InterceptorRequestContext;\nvar InitResponse = Communication.Game.InitResponse;\nvar GameResponse = Communication.Game.GameResponse;\nvar InitRequest = Communication.Game.InitRequest;\nvar SpinRequest = Communication.Game.SpinRequest;\nvar GameModules = Communication.Game.GameModules;\nvar CollectRequest = Communication.Game.CollectRequest;\n\nfunction logDebug(msg: string): void {\n if (DEBUG) {\n Logger.debugGroup('ForceToolInterceptor', msg);\n }\n}\n\nfunction logError(msg: string): void {\n if (DEBUG) {\n Logger.errorGroup('ForceToolInterceptor', msg);\n }\n}\n\nconst contextKeys = {\n ForceSet: 'ForceSet',\n ForceCommandIndex: 'ForceCommandIndex',\n ForceUIDisabled: 'ForceUIDisabled'\n};\n\n@Communication.Game.gameClientInterceptor()\nexport class ForceToolInterceptor implements IGameClientInterceptor {\n private _initialized: boolean;\n private _externalSetupInfo: ForceToolExternalSetupInfo;\n private _forceLayout: ForceToolLayout;\n\n constructor() {\n const self = this;\n this._externalSetupInfo = null;\n this._forceLayout = null;\n const externalSetup: ForceToolExternalSetup = {\n initialize: function (info: ForceToolExternalSetupInfo) {\n self._externalSetupInfo = info;\n }\n };\n window['ForceToolExternalSetup'] = externalSetup;\n }\n\n private get isEnabled(): boolean {\n const query = URI().query(true);\n let forceToolEnabled = Utils.asBool(Utils.valueOrDefault(query['force'], false));\n\n if (forceToolEnabled !== true) {\n const Symbol = window['Symbol'] as any;\n if (typeof Symbol === 'function') {\n // if Symbol is supported (newer browsers) check force flag here...\n const forFn = Symbol.for;\n if (typeof forFn === 'function') {\n const symbolVar = forFn('NeoForceToolEnabledSymbol');\n if (symbolVar) {\n const enabledValue = window[symbolVar];\n forceToolEnabled = Utils.asBool(Utils.valueOrDefault(enabledValue, false));\n }\n }\n }\n }\n\n if (forceToolEnabled) {\n if (DEBUG) {\n logDebug('Force tool is enabled in query string.');\n }\n\n const isForceToolEnabledInApp = this._externalSetupInfo ? this._externalSetupInfo.isForceToolEnabled : null;\n\n if (Utils.isNullOrUndefined(isForceToolEnabledInApp)) {\n if (DEBUG) {\n logDebug('Force tool will be disabled, app does not register callback to tell if forcetool can be enabled.');\n }\n\n forceToolEnabled = false;\n } else {\n forceToolEnabled = isForceToolEnabledInApp();\n\n if (DEBUG) {\n const enabMsg = forceToolEnabled ? 'enabled' : 'disabled';\n logDebug(`Force tool will be ${enabMsg}, app callback returns that!`);\n }\n }\n } else {\n if (DEBUG) {\n logDebug('Force tool is not enabled in query string!');\n }\n }\n\n return forceToolEnabled;\n }\n\n private get layout(): ForceToolLayout {\n if (this._forceLayout === null) {\n let forceLayout = ForceToolLayout.Demo;\n\n if (DEBUG) {\n const query = URI().query(true);\n const layout = Utils.valueOrDefault(query['force.layout'], ForceToolLayout.Demo);\n if (Utils.valueIsIn(layout, [ForceToolLayout.Debug, ForceToolLayout.Demo, ForceToolLayout.DemoDebug])) {\n forceLayout = layout;\n }\n } else {\n if (!Utils.isNullOrUndefined(this._externalSetupInfo)) {\n const demoDebugEnabled = this._externalSetupInfo.isForceToolDebugEnabled();\n forceLayout = demoDebugEnabled ? ForceToolLayout.DemoDebug : ForceToolLayout.Demo;\n }\n }\n\n this._forceLayout = forceLayout;\n }\n\n return this._forceLayout;\n }\n\n private get initialized(): boolean {\n return this._initialized;\n }\n\n private initialize(): Promise {\n const self = this;\n return Promise.resolve()\n .then(() => {\n if (!self.initialized) {\n self._initialized = true;\n return ForceToolUI.initialize(self.layout, self._externalSetupInfo);\n }\n });\n }\n\n private force(context: InterceptorRequestContext): Promise {\n const self = this;\n return this.initialize()\n .then(ForceToolApi.getCurrentForceSet)\n .then(forceSet => {\n if (forceSet) {\n const msgHeader = `ForceSet[${forceSet.Name}/${forceSet.File}] `;\n const requestModule = context.module.toLowerCase();\n const requestAction = context.request.actionName().toLowerCase();\n const requestRoute = `${requestModule}/${requestAction}`;\n\n const commandIndex = ForceToolApi.getCurrentCommandIndex();\n if (forceSet.Commands && commandIndex > -1 && forceSet.Commands.length > commandIndex) {\n const command = forceSet.Commands[commandIndex];\n const commandIsValid = ForceToolApi.isValidForceCommand(command);\n\n if (commandIsValid) {\n const commandModule = command.Module;\n const commandHasModule = !StringUtils.isNullOrEmpty(commandModule);\n const commandAction = command.Action;\n const commandHasAction = !StringUtils.isNullOrEmpty(commandAction);\n const commandRoute = `${command.Module}/${command.Action}`.toLowerCase();\n\n let routeMatch = true;\n if (commandHasModule && commandHasAction) {\n routeMatch = requestRoute === commandRoute;\n } else if (!commandHasAction && commandHasModule) {\n routeMatch = requestModule === commandModule;\n } else if (!commandHasModule && commandHasAction) {\n routeMatch = requestAction === commandAction;\n }\n\n if (routeMatch) {\n if (StringUtils.isNullOrEmpty(command.Command)) {\n if (DEBUG) {\n logDebug(msgHeader + `Force command skipped, command at index (${commandIndex}) is empty.`);\n }\n } else {\n if (DEBUG) {\n logDebug(msgHeader + `Sending force command [${command.Command}] to '${requestRoute}'`);\n }\n\n // Set force attribute on request to specified force set command\n (context.request as any).force = command.Command;\n\n // update interceptor request context to mark that for current request, force command was used.\n context.context[contextKeys.ForceUIDisabled] = true;\n\n ForceToolUI.updateState(ForceToolUIState.Disabled);\n }\n\n // update interceptor request context to mark that for current request, force command was used.\n context.context[contextKeys.ForceCommandIndex] = commandIndex;\n context.context[contextKeys.ForceSet] = forceSet;\n } else {\n if (DEBUG) {\n logDebug(msgHeader + `Force command skipped, current route '${requestRoute}' does not match command's '${commandRoute}'.`);\n }\n }\n } else {\n if (DEBUG) {\n logError(msgHeader + `No force command was sent, command at index (${commandIndex}) points to invalid command data.`);\n }\n }\n } else {\n if (DEBUG) {\n const cmdCount = Utils.isNullOrUndefined(forceSet.Commands) ? 0 : forceSet.Commands.length;\n logError(msgHeader + `No force command was sent, command index (${commandIndex}) is out of range of force set (${cmdCount}) commands.`);\n }\n }\n } else {\n if (DEBUG) {\n logDebug(`No force command to send, no force set is selected yet!`);\n }\n }\n });\n }\n\n public onSendGameRequest(context: InterceptorRequestContext, sendRequestFn: SendRequestFunctionType): Promise {\n return this.isEnabled\n ? this.force(context)\n : Promise.resolve();\n }\n\n public onRequestError(context: InterceptorRequestContext, clientError: ApiClientError): void {\n const forceUIWasDisabled = Utils.valueOrDefault(context.context[contextKeys.ForceUIDisabled], false);\n if (forceUIWasDisabled) {\n // enable force UI on error!\n ForceToolUI.updateState(ForceToolUIState.Enabled);\n context.context[contextKeys.ForceUIDisabled] = false;\n }\n }\n\n public onResponseReceived(context: InterceptorRequestContext, response: TResponse): Promise {\n return Promise.resolve();\n }\n\n public onSendGameRequestFinal(context: InterceptorRequestContext): void {\n const forceCommandIndex = Utils.valueOrDefault(context.context[contextKeys.ForceCommandIndex], -1);\n const forceSet = context.context[contextKeys.ForceSet] as ForceToolSet;\n if (forceCommandIndex > -1 && !Utils.isNullOrUndefined(forceSet)) {\n ForceToolUI.notifyCommandSent(forceSet, forceCommandIndex);\n }\n\n const forceUIWasDisabled = Utils.valueOrDefault(context.context[contextKeys.ForceUIDisabled], false);\n if (forceUIWasDisabled) {\n ForceToolUI.updateState(ForceToolUIState.Enabled);\n context.context[contextKeys.ForceUIDisabled] = false;\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/ForceToolInterceptor.ts","module.exports = __WEBPACK_EXTERNAL_MODULE_8__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"NeoGames\"\n// module id = 8\n// module chunks = 0"],"sourceRoot":""}