@magic-xpa/engine 4.1100.0-dev4110.253 → 4.1100.0-dev4110.257

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/esm2022/src/ClientManager.mjs +1 -1
  2. package/esm2022/src/CommandsProcessorBase.mjs +1 -1
  3. package/esm2022/src/CommandsProcessorManager.mjs +1 -1
  4. package/esm2022/src/CommandsTable.mjs +1 -1
  5. package/esm2022/src/CurrentClientVersion.mjs +2 -2
  6. package/esm2022/src/GUIManager.mjs +1 -1
  7. package/esm2022/src/GuiEventsProcessor.mjs +1 -1
  8. package/esm2022/src/ServerConfig.mjs +1 -1
  9. package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +1 -1
  10. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +1 -1
  11. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +1 -1
  12. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +1 -1
  13. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +1 -1
  14. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +1 -1
  15. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +1 -1
  16. package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +1 -1
  17. package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +1 -1
  18. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +1 -1
  19. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +1 -1
  20. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +1 -1
  21. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +1 -1
  22. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +1 -1
  23. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +1 -1
  24. package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +1 -1
  25. package/esm2022/src/data/DataView.mjs +1 -1
  26. package/esm2022/src/data/DvCache.mjs +1 -1
  27. package/esm2022/src/data/Field.mjs +1 -1
  28. package/esm2022/src/data/FieldsTable.mjs +1 -1
  29. package/esm2022/src/data/Key.mjs +1 -1
  30. package/esm2022/src/data/Record.mjs +2 -2
  31. package/esm2022/src/data/RecordsTable.mjs +1 -1
  32. package/esm2022/src/data/TaskTransactionManager.mjs +1 -1
  33. package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +1 -1
  34. package/esm2022/src/env/EnvVariablesTable.mjs +1 -1
  35. package/esm2022/src/env/Environment.mjs +1 -1
  36. package/esm2022/src/env/LanguageData.mjs +1 -1
  37. package/esm2022/src/env/MirrorString.mjs +1 -1
  38. package/esm2022/src/event/ActionManager.mjs +1 -1
  39. package/esm2022/src/event/Event.mjs +1 -1
  40. package/esm2022/src/event/EventHandler.mjs +1 -1
  41. package/esm2022/src/event/EventHandlerPosition.mjs +1 -1
  42. package/esm2022/src/event/EventsManager.mjs +1 -1
  43. package/esm2022/src/event/RunTimeEvent.mjs +1 -1
  44. package/esm2022/src/event/UserEventsTable.mjs +1 -1
  45. package/esm2022/src/exp/ExpTable.mjs +1 -1
  46. package/esm2022/src/exp/Expression.mjs +1 -1
  47. package/esm2022/src/exp/ExpressionEvaluator.mjs +1 -1
  48. package/esm2022/src/exp/ExpressionLocalJpn.mjs +1 -1
  49. package/esm2022/src/exp/GlobalParamsTable.mjs +1 -1
  50. package/esm2022/src/exp/YesNoExp.mjs +1 -1
  51. package/esm2022/src/gui/FormsTable.mjs +1 -1
  52. package/esm2022/src/gui/MgControl.mjs +1 -1
  53. package/esm2022/src/gui/MgForm.mjs +1 -1
  54. package/esm2022/src/http/HttpManager.mjs +1 -1
  55. package/esm2022/src/http/client/HttpClientAsync.mjs +1 -1
  56. package/esm2022/src/http/client/HttpClientBase.mjs +1 -1
  57. package/esm2022/src/http/client/HttpClientEvents.mjs +1 -1
  58. package/esm2022/src/http/client/HttpClientSync.mjs +1 -1
  59. package/esm2022/src/http/client/HttpUtility.mjs +1 -1
  60. package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +1 -1
  61. package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +1 -1
  62. package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +1 -1
  63. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +1 -1
  64. package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +1 -1
  65. package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +1 -1
  66. package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +1 -1
  67. package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +1 -1
  68. package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +1 -1
  69. package/esm2022/src/remote/ServerError.mjs +1 -1
  70. package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +1 -1
  71. package/esm2022/src/rt/Argument.mjs +1 -1
  72. package/esm2022/src/rt/ArgumentsList.mjs +1 -1
  73. package/esm2022/src/rt/Boundary.mjs +1 -1
  74. package/esm2022/src/rt/CompMainPrgTable.mjs +1 -1
  75. package/esm2022/src/rt/DataviewHeaderBase.mjs +1 -1
  76. package/esm2022/src/rt/DataviewHeaders.mjs +1 -1
  77. package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +1 -1
  78. package/esm2022/src/rt/ExecutionStack.mjs +1 -1
  79. package/esm2022/src/rt/HandlersTable.mjs +1 -1
  80. package/esm2022/src/rt/LastFocusedManager.mjs +1 -1
  81. package/esm2022/src/rt/Operation.mjs +1 -1
  82. package/esm2022/src/rt/OperationTable.mjs +1 -1
  83. package/esm2022/src/rt/Recompute.mjs +1 -1
  84. package/esm2022/src/rt/RecomputeTable.mjs +1 -1
  85. package/esm2022/src/rt/RemoteDataviewHeader.mjs +1 -1
  86. package/esm2022/src/rt/TableCache.mjs +1 -1
  87. package/esm2022/src/rt/TableCacheManager.mjs +1 -1
  88. package/esm2022/src/rt/Transaction.mjs +1 -1
  89. package/esm2022/src/security/UserDetails.mjs +1 -1
  90. package/esm2022/src/tasks/MGData.mjs +1 -1
  91. package/esm2022/src/tasks/MGDataCollection.mjs +1 -1
  92. package/esm2022/src/tasks/RCTimer.mjs +1 -1
  93. package/esm2022/src/tasks/RemoteTaskService.mjs +1 -1
  94. package/esm2022/src/tasks/Task.mjs +1 -1
  95. package/esm2022/src/tasks/TaskBase.mjs +1 -1
  96. package/esm2022/src/tasks/TaskServiceBase.mjs +1 -1
  97. package/esm2022/src/tasks/TasksTable.mjs +1 -1
  98. package/esm2022/src/tasks/sort/SortCollection.mjs +1 -1
  99. package/esm2022/src/util/ConstUtils.mjs +1 -1
  100. package/esm2022/src/util/FlowMonitorQueue.mjs +1 -1
  101. package/esm2022/src/util/HeapSort.mjs +1 -1
  102. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +1 -1
  103. package/esm2022/src/util/MgPriorityQueue.mjs +1 -1
  104. package/esm2022/src/util/PrmMap.mjs +1 -1
  105. package/esm2022/src/util/Scrambler.mjs +1 -1
  106. package/esm2022/src/util/UniqueIDUtils.mjs +1 -1
  107. package/esm2022/src/util/cookie.service.mjs +1 -1
  108. package/fesm2022/magic-xpa-engine.mjs +2 -2
  109. package/fesm2022/magic-xpa-engine.mjs.map +1 -1
  110. package/package.json +4 -4
@@ -1221,4 +1221,4 @@ export class MgForm extends MgFormBase {
1221
1221
  return ctrlName;
1222
1222
  }
1223
1223
  }
1224
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWdGb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ndWkvTWdGb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxRQUFRLEVBQ1IsV0FBVyxFQUVYLHFCQUFxQixFQUNyQixjQUFjLEVBQ2QsT0FBTyxFQUVQLFVBQVUsRUFDVix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GZhbHNlKTtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICAgIHRoaXMudXBkYXRlRGlzcGxheUxpbmVCeURWKCk7XHJcblxyXG4gICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0ZPUk0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICBjYXRjaCAoZXgpIHtcclxuICAgICAgICAgIGlmIChleCBpbnN0YW5jZW9mIFJlY29yZE91dE9mRGF0YVZpZXdFeGNlcHRpb24pXHJcbiAgICAgICAgICAgIExvZ2dlci5JbnN0YW5jZS5Xcml0ZURldlRvTG9nKGV4Lk1lc3NhZ2UpO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICAvLyBwYWdlIGFuZCByb3cgbW92ZW1lbnRzXHJcbiAgICAgIGVsc2Uge1xyXG4gICAgICAgIHRoaXMuZ2V0VG9wSW5kZXhGcm9tR1VJKCk7XHJcbiAgICAgICAgLy8gY2FsY3VsYXRlIHRoZSBhbW91bnQgb2YgcmVjb3JkcyB0byBza2lwXHJcbiAgICAgICAgbGV0IHNpemU6IG51bWJlcjtcclxuICAgICAgICBpZiAodW5pdCA9PT0gQ29uc3RhbnRzLk1PVkVfVU5JVF9QQUdFICYmIHRoaXMuaXNMaW5lTW9kZSgpKSB7XHJcbiAgICAgICAgICBzd2l0Y2ggKGRpcmVjdGlvbikge1xyXG4gICAgICAgICAgICBjYXNlIENvbnN0YW50cy5NT1ZFX0RJUkVDVElPTl9CRUdJTjpcclxuICAgICAgICAgICAgICBzaXplID0gdGhpcy5HZXREYXRhdmlldygpLmdldEN1cnJSZWNJZHgoKSAtIHRoaXMuR2V0RGF0YXZpZXcoKS5nZXRUb3BSZWNJZHgoKTtcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSBDb25zdGFudHMuTU9WRV9ESVJFQ1RJT05fRU5EOlxyXG5cclxuICAgICAgICAgICAgICBsZXQgbGFzdDogbnVtYmVyID0gdGhpcy5HZXREYXRhdmlldygpLmdldFRvcFJlY0lkeCgpICsgdGhpcy5fcm93c0luUGFnZSAtIDE7XHJcbiAgICAgICAgICAgICAgbGFzdCA9IE1hdGgubWluKGxhc3QsIHRoaXMuR2V0RGF0YXZpZXcoKS5nZXRTaXplKCkgLSAxKTtcclxuICAgICAgICAgICAgICBzaXplID0gbGFzdCAtIHRoaXMuR2V0RGF0YXZpZXcoKS5nZXRDdXJyUmVjSWR4KCk7XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgcmV0dXJuVG9WaXNpYmxlTGluZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgc2l6ZSA9IHRoaXMuX3Jvd3NJblBhZ2U7XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2VcclxuICAgICAgICAgIHNpemUgPSAxO1xyXG5cclxuICAgICAgICBzaXplID0gKGRpcmVjdGlvbiA9PT0gQ29uc3RhbnRzLk1PVkVfRElSRUNUSU9OX1BSRVYgfHxcclxuICAgICAgICBkaXJlY3Rpb24gPT09IENvbnN0YW50cy5NT1ZFX0RJUkVDVElPTl9CRUdJTlxyXG4gICAgICAgICAgPyAtc2l6ZVxyXG4gICAgICAgICAgOiBzaXplKTtcclxuXHJcbiAgICAgICAgaWYgKHRoaXMuaXNMaW5lTW9kZSgpKSB7XHJcbiAgICAgICAgICB2aXNpYmxlTGluZSA9IHRoaXMuZ2V0VmlzaWJsZUxpbmUoKTtcclxuICAgICAgICAgIGlmICh2aXNpYmxlTGluZSA8IDApIHtcclxuICAgICAgICAgICAgdmlzaWJsZUxpbmUgPSAwO1xyXG4gICAgICAgICAgICByZWNvcmRPdXRPZlZpZXcgPSB0cnVlO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgaWYgKHZpc2libGVMaW5lID4gdGhpcy5fcm93c0luUGFnZSArIDEpIHtcclxuICAgICAgICAgICAgdmlzaWJsZUxpbmUgPSB0aGlzLl9yb3dzSW5QYWdlO1xyXG4gICAgICAgICAgICByZWNvcmRPdXRPZlZpZXcgPSB0cnVlO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgLy8gc2Nyb2xsaW5nIHRoZSB0YWJsZSBvbmUgcGFnZSBvciBvbmUgcm93IHVwIG9yIGRvd25cclxuICAgICAgICAgIGlmICh1bml0ID09PSBDb25zdGFudHMuTU9WRV9VTklUX1BBR0UgJiZcclxuICAgICAgICAgICAgKGRpcmVjdGlvbiA9PT0gQ29uc3RhbnRzLk1PVkVfRElSRUNUSU9OX05FWFQgfHxcclxuICAgICAgICAgICAgICBkaXJlY3Rpb24gPT09IENvbnN0YW50cy5NT1ZFX0RJUkVDVElPTl9QUkVWKSB8fFxyXG4gICAgICAgICAgICB1bml0ID09PSBDb25zdGFudHMuTU9WRV9VTklUX1JPVyAmJlxyXG4gICAgICAgICAgICAoZGlyZWN0aW9uID09PSBDb25zdGFudHMuTU9WRV9ESVJFQ1RJT05fTkVYVCAmJiB2aXNpYmxlTGluZSA9PT0gdGhpcy5fcm93c0luUGFnZSAtIDEgfHxcclxuICAgICAgICAgICAgICBkaXJlY3Rpb24gPT09IENvbnN0YW50cy5NT1ZFX0RJUkVDVElPTl9QUkVWICYmIHZpc2libGVMaW5lID09PSAwKSkge1xyXG4gICAgICAgICAgICAvLyBpZiB3ZSBtb3ZlIHRvIHRoZSBwcmV2aW91cyByb3cgYnV0IHdlIGFyZSBhdCB0aGUgZmlyc3Qgcm93IG9mIHRoZSB0YWJsZSBhbmQgZGF0YSB2aWV3XHJcbiAgICAgICAgICAgIC8vIHRoZW4gZG8gbm90aGluZ1xyXG4gICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09PSBDb25zdGFudHMuTU9WRV9ESVJFQ1RJT05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ICsgc2l6ZSk7XHJcbiAgICAgICAgICAgICg8RGF0YVZpZXc+dGhpcy5HZXREYXRhdmlldygpKS5zZXRUb3BSZWNJZHhNb2RpZmllZCh0cnVlKTtcclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICB0aGlzLl9zdWZmaXhEb25lID0gZmFsc2U7XHJcblxyXG4gICAgICAgICAgICAgIGF3YWl0IHRoaXMuc2V0Q3VyclJvd0J5RGlzcGxheUxpbmUodGhpcy5HZXREYXRhdmlldygpLmdldEN1cnJSZWNJZHgoKSArIHNpemUsIHRydWUsIGZhbHNlKTtcclxuICAgICAgICAgICAgICAoPERhdGFWaWV3PnRoaXMuR2V0RGF0YXZpZXcoKSkuc2V0VG9wUmVjSWR4TW9kaWZpZWQoZmFsc2UpO1xyXG4gICAgICAgICAgICAgIGF3YWl0IHRoaXMuUmVmcmVzaERpc3BsYXkoQ29uc3RhbnRzLlRBU0tfUkVGUkVTSF9GT1JNKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjYXRjaCAoZXgpIHtcclxuICAgICAgICAgICAgICBpZiAoZXggaW5zdGFuY2VvZiBSZWNvcmRPdXRPZkRhdGFWaWV3RXhjZXB0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICAoPERhdGFWaWV3PnRoaXMuR2V0RGF0YXZpZXcoKSkuc2V0VG9wUmVjSWR4TW9kaWZpZWQoZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgaWYgKEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkdldFN0b3BFeGVjdXRpb25GbGFnKCkpIHtcclxuICAgICAgICAgICAgICAgICAgKDxEYXRhVmlldz50aGlzLkdldERhdGF2aWV3KCkpLnJlc3RvcmVUb3BSZWNJZHgoKTtcclxuICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5yZXN0b3JlT2xkRGlzcGxheUxpbmUob2xkRGlzcGxheUxpbmUpO1xyXG4gICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5HZXREYXRhdmlldygpLmdldFRvcFJlY0lkeCgpIDwgMCkge1xyXG4gICAgICAgICAgICAgICAgICB0aGlzLkdldERhdGF2aWV3KCkuc2V0VG9wUmVjSWR4KDApO1xyXG4gICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMuc2V0Q3VyclJvd0J5RGlzcGxheUxpbmUoMCwgdHJ1ZSwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgIGNhdGNoIChleGNlcHRpb24pIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXhjZXB0aW9uIGluc3RhbmNlb2YgRXhjZXB0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAvLyBRQ1IgIzk5NTQ5Njogd2hlbiB0aGUgcmVjb3JkIHN1ZmZpeCBmYWlsZWQgZ28gYmFjayB0byB0aGVcclxuICAgICAgICAgICAgICAgICAgICAgIC8vIG9yaWdpbmFsIHJvd1xyXG4gICAgICAgICAgICAgICAgICAgICAgaWYgKEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkdldFN0b3BFeGVjdXRpb25GbGFnKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgKDxEYXRhVmlldz50aGlzLkdldERhdGF2aWV3KCkpLnJlc3RvcmVUb3BSZWNJZHgoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5yZXN0b3JlT2xkRGlzcGxheUxpbmUob2xkRGlzcGxheUxpbmUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgIGF3YWl0IHR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gICAoPERhdGFWaWV3PnRoaXMuR2V0RGF0YXZpZXcoKSkucmVzdG9yZVRvcFJlY0lkeCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5yZXN0b3JlT2xkRGlzcGxheUxpbmUob2xkRGlzcGxheUxpbmUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0ZPUk0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5zZXRDdXJyUm93QnlEaXNwbGF5TGluZSh0aGlzLkdldERhdGF2aWV3KCkuZ2V0VG9wUmVjSWR4KCkgKyB0aGlzLmdldExhc3RWYWxpZFJvdygpLCBmYWxzZSwgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICB2aXNpYmxlTGluZSA9IHRoaXMuZ2V0TGFzdFZhbGlkUm93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNhdGNoIChFeGNlcHRpb24pIHtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAoPERhdGFWaWV3PnRoaXMuR2V0RGF0YXZpZXcoKSkucmVzdG9yZVRvcFJlY0lkeCgpO1xyXG4gICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnJlc3RvcmVPbGREaXNwbGF5TGluZShvbGREaXNwbGF5TGluZSk7XHJcbiAgICAgICAgICAgICAgICAgIGlmICh1bml0ID09PSBDb25zdGFudHMuTU9WRV9VTklUX1JPVyAmJiBkaXJlY3Rpb24gPT09IENvbnN0YW50cy5NT1ZFX0RJUkVDVElPTl9ORVhUKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gbm9uIGludGVyYWN0aXZlLCBlbmQgb2YgZGF0YSBtZWFucyBlbmQgb2Ygb3duZXJUYXNrLCB1bmxlc3Mgd2UgYXJlIGluIGNyZWF0ZSBtb2RlLlxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5fdGFzay5Jc0ludGVyYWN0aXZlICYmIHRoaXMuX3Rhc2suZ2V0TW9kZSgpICE9PSBDb25zdGFudHMuVEFTS19NT0RFX0NSRUFURSlcclxuICAgICAgICAgICAgICAgICAgICAgICg8VGFza0Jhc2U+dGhpcy5fdGFzaykuc2V0RXhlY0VuZFRhc2soKTtcclxuICAgICAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICBhd2FpdCBBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5oYW5kbGVJbnRlcm5hbEV2ZW50V2l0aFRhc2sodGhpcy5fdGFzaywgSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX0NSRUxJTkUpO1xyXG4gICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIExvZ2dlci5JbnN0YW5jZS5Xcml0ZURldlRvTG9nKGV4Lk1lc3NhZ2UpO1xyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgLy8gbW92aW5nIHRoZSBtYXJraW5nIG9uZSByb3cgdXAgb3IgZG93blxyXG4gICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgb2xkVGFza01vZGUgPSB0aGlzLl90YXNrLmdldE1vZGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgb2xkUmVjSWQgPSAodGhpcy5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SRUFURSk7XHJcbiAgICAgICAgICAgICAgICAgICAgY3VyclJlYy5jbGVhck1vZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyUmVjLnNldE1vZGUoRGF0YU1vZGlmaWNhdGlvblR5cGVzLkluc2VydCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY3VyclJlYy5zZXROZXdSZWMoKTtcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAvLyBRQ1IgIzk4MDUyODogUmVmcmVzaCB0aGUgY3VycmVudCByb3cgYWZ0ZXIgY2FuY2VsIGVkaXQgdG8gcmVmbGVjdFxyXG4gICAgICAgICAgICAgICAgICAvLyB0aGUgcmVzdG9yZWQgdmFsdWVzXHJcbiAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMuUmVmcmVzaERpc3BsYXkoQ29uc3RhbnRzLlRBU0tfUkVGUkVTSF9DVVJSX1JFQyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgaWYgKG9sZFRhc2tNb2RlID09PSBDb25zdGFudHMuVEFTS19NT0RFX0NSRUFURSAmJiBvbGREaXNwbGF5TGluZSA+IDApXHJcbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5yZXN0b3JlT2xkRGlzcGxheUxpbmUob2xkRGlzcGxheUxpbmUgLSAxKTtcclxuICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0ZPUk0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKHNpemUgPD0gMCB8fCBBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5HZXRTdG9wRXhlY3V0aW9uRmxhZygpKVxyXG4gICAgICAgICAgICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVEZXZUb0xvZyhleC5NZXNzYWdlKTtcclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAvLyBub24gaW50ZXJhY3RpdmUsIGVuZCBvZiBkYXRhIG1lYW5zIGVuZCBvZiBvd25lclRhc2ssIHVubGVzcyB3ZSBhcmUgaW4gY3JlYXRlIG1vZGUuXHJcbiAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5fdGFzay5Jc0ludGVyYWN0aXZlICYmIHRoaXMuX3Rhc2suZ2V0TW9kZSgpICE9PSBDb25zdGFudHMuVEFTS19NT0RFX0NSRUFURSkge1xyXG4gICAgICAgICAgICAgICAgICAgICg8VGFza0Jhc2U+dGhpcy5fdGFzaykuc2V0RXhlY0VuZFRhc2soKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3Rhc2suQWN0aW9uTWFuYWdlci5pc0VuYWJsZWQoSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX0NSRUxJTkUpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgYXdhaXQgQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIuaGFuZGxlSW50ZXJuYWxFdmVudFdpdGhUYXNrKHRoaXMuX3Rhc2ssIEludGVybmFsSW50ZXJmYWNlLk1HX0FDVF9DUkVMSU5FKTtcclxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgIC8vIGZpeGVkIGJ1ZyAjOjk0MTc2Mywgd2hpbGUgY3JlYXRlIGlzbid0IGFsbG93ZWQgbmVlZCB0byBkbyBzdWZmaXggYW5kIHByZWZpeCBvZiB0aGUgY3VycmVudCByZWNvcmRcclxuICAgICAgICAgICAgICAgICAgICAgIGxldCBkb1JlY29yZFN1ZmZpeDogYm9vbGVhbiA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVmZG9SZWNvcmRTdWZmaXg6IFJlZlBhcmFtPGJvb2xlYW4+ID0gbmV3IFJlZlBhcmFtKGRvUmVjb3JkU3VmZml4KTtcclxuICAgICAgICAgICAgICAgICAgICAgIGlmICghIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkRvVGFza0xldmVsUmVjb3JkU3VmZml4KDxUYXNrQmFzZT50aGlzLl90YXNrLCByZWZkb1JlY29yZFN1ZmZpeCkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkRvVGFza0xldmVsUmVjb3JkUHJlZml4KHRoaXMuX3Rhc2spO1xyXG4gICAgICAgICAgICAgICAgICAgICAgZG9SZWNvcmRTdWZmaXggPSByZWZkb1JlY29yZFN1ZmZpeC52YWx1ZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgLy8gaWYgdGhlIGZvcm0gZG9lcyBub3QgaGF2ZSBhIHRhYmxlLCBtb3ZlIHRvIG9uZSByb3cgaW4gdGhlIGNob3NlbiBEaXJlY3Rpb25cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgIGF3YWl0IHRoaXMuR2V0RGF0YXZpZXcoKS5zZXRDdXJyUmVjQnlJZHgodGhpcy5HZXREYXRhdmlldygpLmdldEN1cnJSZWNJZHgoKSArIHNpemUsIHRydWUsIGZhbHNlLCB0cnVlLCBTRVRfRElTUExBWUxJTkVfQllfRFYpO1xyXG4gICAgICAgICAgICBhd2FpdCB0aGlzLlJlZnJlc2hEaXNwbGF5KENvbnN0YW50cy5UQVNLX1JFRlJFU0hfRk9STSk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBjYXRjaCAoZXgpIHtcclxuICAgICAgICAgICAgaWYgKGV4IGluc3RhbmNlb2YgUmVjb3JkT3V0T2ZEYXRhVmlld0V4Y2VwdGlvbikge1xyXG4gICAgICAgICAgICAgIGlmIChzaXplID4gMCkge1xyXG4gICAgICAgICAgICAgICAgLy8gbm9uIGludGVyYWN0aXZlLCBlbmQgb2YgZGF0YSBtZWFucyBlbmQgb2Ygb3duZXJUYXNrLCB1bmxlc3Mgd2UgYXJlIGluIGNyZWF0ZSBtb2RlLlxyXG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLl90YXNrLklzSW50ZXJhY3RpdmUgJiYgdGhpcy5fdGFzay5nZXRNb2RlKCkgIT09IENvbnN0YW50cy5UQVNLX01PREVfQ1JFQVRFKVxyXG4gICAgICAgICAgICAgICAgICAoPFRhc2tCYXNlPnRoaXMuX3Rhc2spLnNldEV4ZWNFbmRUYXNrKCk7XHJcbiAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLmhhbmRsZUludGVybmFsRXZlbnRXaXRoVGFzayh0aGlzLl90YXNrLCBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfQ1JFTElORSk7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgIExvZ2dlci5JbnN0YW5jZS5Xcml0ZURldlRvTG9nKGV4Lk1lc3NhZ2UpO1xyXG4gICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIGlmIChleCBpbnN0YW5jZW9mIFNlcnZlckVycm9yKSB7XHJcbiAgICAgICAgICAgICAgYXdhaXQgKDxUYXNrQmFzZT50aGlzLl90YXNrKS5zdG9wKCk7XHJcbiAgICAgICAgICAgICAgKDxUYXNrQmFzZT50aGlzLl90YXNrKS5hYm9ydCgpO1xyXG4gICAgICAgICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLlByb2Nlc3NBYm9ydGluZ0Vycm9yKGV4KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIGlmIChleCBpbnN0YW5jZW9mIEV4Y2VwdGlvbikge1xyXG4gICAgICAgICAgICAgIExvZ2dlci5JbnN0YW5jZS5Xcml0ZURldlRvTG9nKGV4Lk1lc3NhZ2UpO1xyXG4gICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBpZiAocmV0dXJuVG9WaXNpYmxlTGluZSkge1xyXG4gICAgICAgIGlmIChyZWNvcmRPdXRPZlZpZXcpIHtcclxuICAgICAgICAgIGlmICh2aXNpYmxlTGluZSA9PT0gMClcclxuICAgICAgICAgICAgdGhpcy5HZXREYXRhdmlldygpLnNldFRvcFJlY0lkeCh0aGlzLkdldERhdGF2aWV3KCkuZ2V0Q3VyclJlY0lkeCgpKTtcclxuICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgdGhpcy5HZXREYXRhdmlldygpLnNldFRvcFJlY0lkeCh0aGlzLkdldERhdGF2aWV3KCkuZ2V0Q3VyclJlY0lkeCgpIC0gdGhpcy5fcm93c0luUGFnZSk7XHJcbiAgICAgICAgICB0aGlzLlNldFRhYmxlVG9wSW5kZXgoKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICB0aGlzLlNldFRhYmxlVG9wSW5kZXgoKTtcclxuICAgICAgICAgIGF3YWl0IHRoaXMuc2V0Q3VyclJvd0J5RGlzcGxheUxpbmUodGhpcy5HZXREYXRhdmlldygpLmdldFRvcFJlY0lkeCgpICsgdmlzaWJsZUxpbmUsIGZhbHNlL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lkeDogbnVtYmVyID0gdGhpcy5HZXREYXRhdmlldygpLmdldFRvcFJlY0lkeCgpO1xyXG4gICAgICAgICAgICAgIGxldCBjdXJyUmVjSWR4OiBudW1iZXIgPSB0aGlzLkdldERhdGF2aWV3KCkuZ2V0Q3VyclJlY0lkeCgpO1xyXG4gICAgICAgICAgICAgIGlmICh0b3BSZWNJZHggPiBjdXJyUmVjSWR4KVxyXG4gICAgICAgICAgICAgICAgdGhpcy5HZXREYXRhdmlldygpLnNldFRvcFJlY0lkeChjdXJyUmVjSWR4KTtcclxuICAgICAgICAgICAgICByb3cgPSAwO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGF3YWl0IHRoaXMuc2V0Q3VyclJvd0J5RGlzcGxheUxpbmUodGhpcy5HZXREYXRhdmlldygpLmdldFRvcFJlY0lkeCgpICsgcm93LCBmYWxzZSwgdHJ1ZSk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNhdGNoIChleCkge1xyXG4gICAgICAgICAgaWYgKGV4IGluc3RhbmNlb2YgUmVjb3JkT3V0T2ZEYXRhVmlld0V4Y2VwdGlvbikge1xyXG4gICAgICAgICAgICAvLyBubyBleGNlcHRpb24gc2hvdWxkIHJlYWxseSBiZSBjYXVnaHQgaGVyZS5cclxuICAgICAgICAgICAgaWYgKHJvdyAhPT0gMClcclxuICAgICAgICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVEZXZUb0xvZyhOU3RyaW5nLkZvcm1hdChcImluIEZvcm0uY2FuY2VsRWRpdCgpIHswfVwiLCBleC5NZXNzYWdlKSk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgIHRocm93IGV4O1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoc3VwZXIuSGFzVGFibGUoKSkge1xyXG4gICAgICAgICAgLy8gRGVjcmVtZW50IHRoZSBUb3RhbFJlY29yZHNDb3VudCBhcyByZ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OX0JFR0lOOlxyXG4gICAgICAgICAgICAgIHNpemUgPSB0aGlzLkdldERhdGF2aWV3KCkuZ2V0Q3VyclJlY0lkeCgpIC0gdGhpcy5HZXREYXRhdmlldygpLmdldFRvcFJlY0lkeCgpO1xyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIENvbnN0YW50cy5NT1ZFX0RJUkVDVElPTl9FTkQ6XHJcblxyXG4gICAgICAgICAgICAgIGxldCBsYXN0OiBudW1iZXIgPSB0aGlzLkdldERhdGF2aWV3KCkuZ2V0VG9wUmVjSWR4KCkgKyB0aGlzLl9yb3dzSW5QYWdlIC0gMTtcclxuICAgICAgICAgICAgICBsYXN0ID0gTWF0aC5taW4obGFzdCwgdGhpcy5HZXREYXRhdmlldygpLmdldFNpemUoKSAtIDEpO1xyXG4gICAgICAgICAgICAgIHNpemUgPSBsYXN0IC0gdGhpcy5HZXREYXRhdmlldygpLmdldEN1cnJSZWNJZHgoKTtcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICByZXR1cm5Ub1Zpc2libGVMaW5lID0gdHJ1ZTtcclxuICAgICAgICAgICAgICBzaXplID0gdGhpcy5fcm93c0luUGFnZTtcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZVxyXG4gICAgICAgICAgc2l6ZSA9IDE7XHJcblxyXG4gICAgICAgIHNpemUgPSAoZGlyZWN0aW9uID09PSBDb25zdGFudHMuTU9WRV9ESVJFQ1RJT05fUFJFViB8fFxyXG4gICAgICAgIGRpcmVjdGlvbiA9PT0gQ29uc3RhbnRzLk1PVkVfRElSRUNUSU9OX0JFR0lOXHJcbiAgICAgICAgICA/IC1zaXplXHJcbiAgICAgICAgICA6IHNpemUpO1xyXG5cclxuICAgICAgICBpZiAodGhpcy5pc0xpbmVNb2RlKCkpIHtcclxuICAgICAgIC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AgICAgICAgcmV0dXJuO1xyXG5cclxuICAgICAgICAgICAgb2xkUmVjSWQgPSAodGhpcy5HZXREYXRhdmlldygpLmdldEN1cnJSZWMoKSkuZ2V0SWQoKTtcclxuICAgICAgICAgICAgdGhpcy5HZXREYXRhdmlldygpLnNldFRvcFJlY0lkeCh0aGlzLkdldERhdGF2aWV3KCkuZ2V0VG9wUmVjSWR4KCkgKyBzaXplKTtcclxuICAgICAgICAgICAgKDxEYXRhVmlldz50aGlzLkdldERhdGF2aWV3KCkpLnNldFRvcFJlY0lkeE1vZGlmaWVkKHRydWUpO1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgIHRoaXMuX3N1ZmZpeERvbmUgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgICAgYXdhaXQgdGhpcy5zZXRDdXJyUm93QnlEaXNwbGF5TGluZSh0aGlzLkdldERhdGF2aWV3KCkuZ2V0Q3VyclJlY0lkeCgpICsgc2l6ZSwgdHJ1ZSwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICg8RGF0YVZpZXc+dGhpcy5HZXREYXRhdmlldygpKS5zZXRUb3BSZWNJZHhNb2RpZmllZChmYWxzZSk7XHJcbiAgICAgICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0ZPUk0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNhdGNoIChleCkge1xyXG4gICAgICAgICAgICAgIGlmIChleCBpbnN0YW5jZW9mIFJlY29yZE91dE9mRGF0YVZpZXdFeGNlcHRpb24pIHtcclxuICAgICAgICAgICAgICAgICg8RGF0YVZpZXc+dGhpcy5HZXREYXRhdmlldygpKS5zZXRUb3BSZWNJZHhNb2RpZmllZChmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIuR2V0U3RvcEV4ZWN1dGlvbkZsYWcoKSkge1xyXG4gICAgICAgICAgICAgICAgICAoPERhdGFWaWV3PnRoaXMuR2V0RGF0YXZpZXcoKSkucmVzdG9yZVRvcFJlY0lkeCgpO1xyXG4gICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnJlc3RvcmVPbGREaXNwbGF5TGluZShvbGREaXNwbGF5TGluZSk7XHJcbiAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLkdldERhdGF2aWV3KCkuZ2V0VG9wUmVjSWR4KCkgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICAgIHRoaXMuR2V0RGF0YXZpZXcoKS5zZXRUb3BSZWNJZHgoMCk7XHJcbiAgICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5zZXRDdXJyUm93QnlEaXNwbGF5TGluZSgwLCB0cnVlLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgY2F0Y2ggKGV4Y2VwdGlvbikge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChleGNlcHRpb24gaW5zdGFuY2VvZiBFeGNlcHRpb24pIHtcclxuICAgICAgICAgICAgICAgICAgICAgIC8vIFFDUiAjOTk1NDk2OiB3aGVuIHRoZSByZWNvcmQgc3VmZml4IGZhaWxlZCBnbyBiYWNrIHRvIHRoZVxyXG4gICAgICAgICAgICAgICAgICAgICAgLy8gb3JpZ2luYWwgcm93XHJcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIuR2V0U3RvcEV4ZWN1dGlvbkZsYWcoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAoPERhdGFWaWV3PnRoaXMuR2V0RGF0YXZpZXcoKSkucmVzdG9yZVRvcFJlY0lkeCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnJlc3RvcmVPbGREaXNwbGF5TGluZShvbGREaXNwbGF5TGluZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0ZPUk0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodW5pdCAhPT0gQ29uc3RhbnRzLk1PVkVfVU5JVF9ST1cgJiYgKDxEYXRhVmlldz50aGlzLkdldERhdGF2aWV3KCkpLnJlY0V4aXN0cyh0aGlzLkdldERhdGF2aWV3KCkuZ2V0VG9wUmVjSWR4KCkpKSB7XHJcbiAgICAgICAgICAgICAgICAgIC8vIFFDUiAjOTkyMTAxOiBpZiB3ZSByZWFjaGVkIHRoaXMgcG9pbnQgaXQgbWVhbnMgdGhhdCB0aGUgcmVjIHN1ZmZpeFxyXG4gICAgICAgICAgICAgICAgICAvLyB3YXNuJ3QgZXhlY3V0ZWQgc28gd2UgbXVzdCBoYW5kbGUgaXQgYmVmb3JlIHdlIGdvIHRvIGEgbmV3IHJvd1xyXG4gICAgICAgICAgICAgICAgICBsZXQgbmV3UmVjSWQ6IG51bWJlciA9ICh0aGlzLkdldERhdGF2aWV3KCkuZ2V0Q3VyclJlYygpKS5nZXRJZCgpO1xyXG4gICAgICAgICAgICAgICAgICBpZiAobmV3UmVjSWQgPT09IG9sZFJlY0lkICYmICF0aGlzLl9zdWZmaXhEb25lKVxyXG4gICAgICAgICAgICAgICAgICAgIC8vIFFDUiA3NTg2MzlcclxuICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLmhhbmRsZUludGVybmFsRXZlbnRXaXRoVGFzayh0aGlzLl90YXNrLCBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfUkVDX1NVRkZJWCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkdldFN0b3BFeGVjdXRpb25GbGFnKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICg8RGF0YVZpZXc+dGhpcy5HZXREYXRhdmlldygpKS5yZXN0b3JlVG9wUmVjSWR4KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnJlc3RvcmVPbGREaXNwbGF5TGluZShvbGREaXNwbGF5TGluZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLlJlZnJlc2hEaXNwbGF5KENvbnN0YW50cy5UQVNLX1JFRlJFU0hfRk9STSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnNldEN1cnJSb3dCeURpc3BsYXlMaW5lKHRoaXMuR2V0RGF0YXZpZXcoKS5nZXRUb3BSZWNJZHgoKSArIHRoaXMuZ2V0TGFzdFZhbGlkUm93KCksIGZhbHNlLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgIHZpc2libGVMaW5lID0gdGhpcy5nZXRMYXN0VmFsaWRSb3coKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKEV4Y2VwdGlvbikge1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICg8RGF0YVZpZXc+dGhpcy5HZXREYXRhdmlldygpKS5yZXN0b3JlVG9wUmVjSWR4KCk7XHJcbiAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucmVzdG9yZU9sZERpc3BsYXlMaW5lKG9sZERpc3BsYXlMaW5lKTtcclxuICAgICAgICAgICAgICAgICAgaWYgKHVuaXQgPT09IENvbnN0YW50cy5NT1ZFX1VOSVRfUk9XICYmIGRpcmVjdGlvbiA9PT0gQ29uc3RhbnRzLk1PVkVfRElSRUNUSU9OX05FWFQpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBub24gaW50ZXJhY3RpdmUsIGVuZCBvZiBkYXRhIG1lYW5zIGVuZCBvZiBvd25lclRhc2ssIHVubGVzcyB3ZSBhcmUgaW4gY3JlYXRlIG1vZGUuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLl90YXNrLklzSW50ZXJhY3RpdmUgJiYgdGhpcy5fdGFzay5nZXRNb2RlKCkgIT09IENvbnN0YW50cy5UQVNLX01PREVfQ1JFQVRFKVxyXG4gICAgICAgICAgICAgICAgICAgICAgKDxUYXNrQmFzZT50aGlzLl90YXNrKS5zZXRFeGVjRW5kVGFzaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLmhhbmRsZUludGVybmFsRXZlbnRXaXRoVGFzayh0aGlzLl90YXNrLCBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfQ1JFTElORSk7XHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgTG9nZ2VyLkluc3RhbmNlLldyaXRlRGV2VG9Mb2coZXguTWVzc2FnZSk7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICAv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3JpdGVEZXZUb0xvZyhOU3RyaW5nLkZvcm1hdChcInNraXBwZWQgc2V0Y3VyclJvdyBmb3Igcm93IHswfVwiLCBvbGREaXNwbGF5TGluZSkpO1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0ZPUk0pO1xyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICBlbHNlIGlmIChBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5HZXRTdG9wRXhlY3V0aW9uRmxhZygpKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBwZXJmb3JtYW5jZSBpbXByb3ZlbWVudDogaWYgZXZlcnl0aGluZyBpcyBPSywgY3VyciByZWMgd2lsbCBsYXRlciBiZSByZWZyZXNoZWQgaW5cclxuICAgICAgICAgICAgICAgIC8vIFJFQ19QUkVGSVhcclxuICAgICAgICAgICAgICAgIC8vIHRodXMsIHJlZnJlc2ggb25seSBpbiBjYXNlIG9mIGVycm9yLlxyXG4gICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0NVUlJfUkVDKTtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY2F0Y2ggKGV4KSB7XHJcbiAgICAgICAgICAgICAgaWYgKGV4IGluc3RhbmNlb2YgUmVjb3JkT3V0T2ZEYXRhVmlld0V4Y2VwdGlvbikge1xyXG4gICAgICAgICAgICAgICAgLy8gU29tZXRpbWVzIHRoZSBlcnJvciBpcyBiZWNhdXNlIHRoZSBvbGQtcmVjIHdhcyByZW1vdmVkIChjYW5jZWxFZGl0J2VkKSwgc28gcmVmcmVzaCBmb3JtLlxyXG4gICAgICAgICAgICAgICAgaWYgKCg8RGF0YVZpZXc+dGhpcy5HZXREYXRhdmlldygpKS5yZWNFeGlzdHNCeUlkKG9sZFJlY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ydC5cclxuXHJcbiAgICAgICAgICAgICAgICAgIGlmICghY3VyclJlYy5TeW5jZWQgJiYgb2xkVGFza01vZGUgPT09IENvbnN0YW50cy5UQVNLX01PREVfQ1JFQVRFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdGFzay5zZXRNb2RlKENvbnN0YW50cy5UQVNLX01PREVfQ1JFQVRFKTtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyUmVjLmNsZWFyTW9kZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJSZWMuc2V0TW9kZShEYXRhTW9kaWZpY2F0aW9uVHlwZXMuSW5zZXJ0KTtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyUmVjLnNldE5ld1JlYygpO1xyXG4gICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgIC8vIFFDUiAjOTgwNTI4OiBSZWZyZXNoIHRoZSBjdXJyZW50IHJvdyBhZnRlciBjYW5jZWwgZWRpdCB0byByZWZsZWN0XHJcbiAgICAgICAgICAgICAgICAgIC8vIHRoZSByZXN0b3JlZCB2YWx1ZXNcclxuICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5SZWZyZXNoRGlzcGxheShDb25zdGFudHMuVEFTS19SRUZSRVNIX0NVUlJfUkVDKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICBpZiAob2xkVGFza01vZGUgPT09IENvbnN0YW50cy5UQVNLX01PREVfQ1JFQVRFICYmIG9sZERpc3BsYXlMaW5lID4gMClcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnJlc3RvcmVPbGREaXNwbGF5TGluZShvbGREaXNwbGF5TGluZSAtIDEpO1xyXG4gICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLlJlZnJlc2hEaXNwbGF5KENvbnN0YW50cy5UQVNLX1JFRlJFU0hfRk9STSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoc2l6ZSA8PSAwIHx8IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkdldFN0b3BFeGVjdXRpb25GbGFnKCkpXHJcbiAgICAgICAgICAgICAgICAgIExvZ2dlci5JbnN0YW5jZS5Xcml0ZURldlRvTG9nKGV4Lk1lc3NhZ2UpO1xyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgIC8vIG5vbiBpbnRlcmFjdGl2ZSwgZW5kIG9mIGRhdGEgbWVhbnMgZW5kIG9mIG93bmVyVGFzaywgdW5sZXNzIHdlIGFyZSBpbiBjcmVhdGUgbW9kZS5cclxuICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLl90YXNrLklzSW50ZXJhY3RpdmUgJiYgdGhpcy5fdGFzay5nZXRNb2RlKCkgIT09IENvbnN0YW50cy5UQVNLX01PREVfQ1JFQVRFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgKDxUYXNrQmFzZT50aGlzLl90YXNrKS5zZXRFeGVjRW5kVGFzaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fdGFzay5BY3Rpb25NYW5hZ2VyLmlzRW5hYmxlZChJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfQ1JFTElORSkpXHJcbiAgICAgICAgICAgICAgICAgICAgICBhd2FpdCBBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5oYW5kbGVJbnRlcm5hbEV2ZW50V2l0aFRhc2sodGhpcy5fdGFzaywgSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX0NSRUxJTkUpO1xyXG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgLy8gZml4ZWQgYnVnICM6OTQxNzYzLCB3aGlsZSBjcmVhdGUgaXNuJ3QgYWxsb3dlZCBuZWVkIHRvIGRvIHN1ZmZpeCBhbmQgcHJlZml4IG9mIHRoZSBjdXJyZW50IHJlY29yZFxyXG4gICAgICAgICAgICAgICAgICAgICAgbGV0IGRvUmVjb3JkU3VmZml4OiBib29sZWFuID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgIGxldCByZWZkb1JlY29yZFN1ZmZpeDogUmVmUGFyYW08Ym9vbGVhbj4gPSBuZXcgUmVmUGFyYW0oZG9SZWNvcmRTdWZmaXgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgaWYgKCEgYXdhaXQgQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIuRG9UYXNrTGV2ZWxSZWNvcmRTdWZmaXgoPFRhc2tCYXNlPnRoaXMuX3Rhc2ssIHJlZmRvUmVjb3JkU3VmZml4KSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIuRG9UYXNrTGV2ZWxSZWNvcmRQcmVmaXgodGhpcy5fdGFzayk7XHJcbiAgICAgICAgICAgICAgICAgICAgICBkb1JlY29yZFN1ZmZpeCA9IHJlZmRvUmVjb3JkU3VmZml4LnZhbHVlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBpZiB0aGUgZm9ybSBkb2VzIG5vdCBoYXZlIGEgdGFibGUsIG1vdmUgdG8gb25lIHJvdyBpbiB0aGUgY2hvc2VuIERpcmVjdGlvblxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgYXdhaX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