From c7012e0f9aa774dfdcd0004f6b46307b3511f75d Mon Sep 17 00:00:00 2001 From: Lasana Murray Date: Tue, 7 Nov 2017 00:19:59 -0400 Subject: [PATCH] fix: See https://github.com/Microsoft/TypeScript/issues/842 --- example/public/app.js | 6 +++--- lib/common/util.js | 4 ++-- lib/common/util.js.map | 2 +- lib/common/util.ts | 4 ++-- src/common/util.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/public/app.js b/example/public/app.js index 8f79a756..60feeb2a 100644 --- a/example/public/app.js +++ b/example/public/app.js @@ -3005,11 +3005,11 @@ exports.debounce = function (f, delay) { var timer = null; return delay === 0 ? f : function (a) { if (!timer) { - timer = setTimeout(function () { return f(a); }, delay); + timer = window.setTimeout(function () { return f(a); }, delay); } else { clearTimeout(timer); - timer = setTimeout(function () { return f(a); }, delay); + timer = window.setTimeout(function () { return f(a); }, delay); } }; }; @@ -29284,4 +29284,4 @@ exports.default = default_1; ; },{}]},{},[1]) -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJleGFtcGxlL2J1aWxkL2FwcC5qcyIsImV4YW1wbGUvYnVpbGQvcGFnZXMvUGFnZS5qcyIsImV4YW1wbGUvYnVpbGQvcGFnZXMvYXV0b2NvbXBsZXRlL2luZGV4LmpzIiwiZXhhbXBsZS9idWlsZC9wYWdlcy9hdXRvY29tcGxldGUvd21sL2F1dG9jb21wbGV0ZS5qcyIsImV4YW1wbGUvYnVpbGQvcGFnZXMvYnJlYWRjcnVtYnMvaW5kZXguanMiLCJleGFtcGxlL2J1aWxkL3BhZ2VzL2JyZWFkY3J1bWJzL3dtbC9icmVhZGNydW1icy5qcyIsImV4YW1wbGUvYnVpbGQvcGFnZXMvYnVzeS1pbmRpY2F0b3IvaW5kZXguanMiLCJleGFtcGxlL2J1aWxkL3BhZ2VzL2J1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V0OiAnbGF5b3V0J1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogdmlldyBpcyB0aGUgY3VycmVudCBhcHBsaWNhdGlvbiB2aWV3LlxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy52aWV3ID0gbmV3IGFwcF8xLk1haW4odGhpcyk7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBjb250ZW50IGRpc3BsYXllZCBhcyB0aGUgbWFpbiBjb250ZW50LlxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5jb250ZW50ID0gdGhpcy5wYWdlcy5ob21lLnZpZXc7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiB0b2dnbGVEcmF3ZXJcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMudG9nZ2xlRHJhd2VyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgX3RoaXNcbiAgICAgICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgICAgIC5maW5kQnlJZChfdGhpcy52YWx1ZXMuaWQubGF5b3V0KVxuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQudG9nZ2xlRHJhd2VyKCk7IH0pO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogbmF2aWdhdGUgaXMgY2FsbGVkIHdoZW4gdGhlIHVzZXIgY2xpY2tzIG9uIGFcbiAgICAgICAgICogbmF2aWdhdGlvbiBsaW5rLlxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5uYXZpZ2F0ZSA9IGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgdmFyIG5hbWUgPSBfYS5uYW1lO1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzLnJvdXRlKG5hbWUpO1xuICAgICAgICB9O1xuICAgIH1cbiAgICAvKipcbiAgICAgKiByb3V0ZSB0aGUgbWFpbiBjb250ZW50IGJhc2VkIG9uIHRoZSBwYXNzZWQgc3RyaW5nLlxuICAgICAqL1xuICAgIEFwcC5wcm90b3R5cGUucm91dGUgPSBmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICBjb25zb2xlLmluZm8oJ25hbWUtPiAnLCBuYW1lKTtcbiAgICAgICAgY29uc29sZS5pbmZvKHRoaXMucGFnZXMuaGFzT3duUHJvcGVydHkobmFtZSkpO1xuICAgICAgICB0aGlzLnBhZ2UgPSBuYW1lO1xuICAgICAgICBpZiAodGhpcy5wYWdlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSlcbiAgICAgICAgICAgIHRoaXMuY29udGVudCA9IHRoaXMucGFnZXNbbmFtZV0udmlldztcbiAgICAgICAgdGhpcy52aWV3LmludmFsaWRhdGUoKTtcbiAgICAgICAgdGhpcy5uYXZpZ2F0aW9uLmludmFsaWRhdGUoKTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHJ1biB0aGUgYXBwbGljYXRpb24uXG4gICAgICovXG4gICAgQXBwLnByb3RvdHlwZS5ydW4gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciByb290ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2FwcCcpO1xuICAgICAgICB3aGlsZSAocm9vdC5sYXN0Q2hpbGQpXG4gICAgICAgICAgICByb290LnJlbW92ZUNoaWxkKHJvb3QubGFzdENoaWxkKTtcbiAgICAgICAgcm9vdC5hcHBlbmRDaGlsZCh0aGlzLnZpZXcucmVuZGVyKCkpO1xuICAgICAgICB0aGlzLmxheW91dCA9IHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5sYXlvdXQpO1xuICAgICAgICB2YXIgcGF0aCA9IHdpbmRvdy5sb2NhdGlvbi5oYXNoLnNwbGl0KCcjJylbMV07XG4gICAgICAgIHBhdGggPSBwYXRoID8gcGF0aC5zcGxpdCgnLycpLmpvaW4oJycpIDogJyc7XG4gICAgICAgIHRoaXMucm91dGUocGF0aCk7XG4gICAgfTtcbiAgICBBcHAubWFpbi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192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IHNlbGVjdGVkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcInNlbGVjdGVkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIihub3RoaW5nKVwiKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoYXV0b2NvbXBsZXRlXzEuQXV0b2NvbXBsZXRlLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3RyaW5naWZpZXInOiBmdW5jdGlvbiAocikgeyByZXR1cm4gci52YWx1ZTsgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvblNlYXJjaCc6IF9fX2NvbnRleHQub25TZWFyY2gsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25TZWxlY3QnOiBfX19jb250ZXh0Lm9uU2VsZWN0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwc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0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChCcmVhZENydW1ic18xLkJyZWFkQ3J1bWJzLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoSXRlbV8xLkl0ZW0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChMaW5rXzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiT25lXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoSXRlbV8xLkl0ZW0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChMaW5rXzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVHdvXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoSXRlbV8xLkl0ZW0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChMaW5rXzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVGhyZWVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJyZWFkY3J1bWJzLmpzLm1hcCIsIlwidXNlIHN0cmlj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pbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBCdXN5SW5kaWNhdG9yXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi9hcHAvYnVzeS1pbmRpY2F0b3IvQnVzeUluZGljYXRvclwiKTtcbjtcbnZhciBHcmlkXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi9sYXlvdXQvZ3JpZC9HcmlkXCIpO1xuO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChCdXN5SW5kaWNhdG9yXzEuQn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SB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoYnV0dG9uX21lbnVfMS5CdXR0b25NZW51LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkNsaWNrIE1lXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5vbkNsaWNrKFwiWW91IGNsaWNrZWQgb25lXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJPbmVcIildLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5vbkNsaWNrKFwiWW91IGNsaWNrZWQgdHdvXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUd29cIildLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5vbkNsaWNrKFwiWW91IGNsaWNrZWQgdGhyZWVcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIlRocmVlXCIpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJj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gQnV0dG9uU2VsZWN0UGFnZSgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIG9wdGlvbnM6IFtcbiAgICAgICAgICAgICAgICB7IHRleHQ6ICdBc3VzJywgdmFsdWU6ICdBc3VzJyB9LFxuICAgICAgICAgICAgICAgIHsgdGV4dDogJ01TSScsIHZhbHVlOiAnTVNJJyB9LFxuICAgICAgICAgICAgICAgIHsgdGV4dDogJ0dpZ2FieXRlJywgdmFsdWU6ICdHaWdhYnl0ZScgfVxuICAgICAgICAgICAgXVxuICAgICAgICB9O1xuICAgICAgICBfdGhpcy5vbkNoYW5nZSA9IGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgdmFyIHZhbHVlID0gX2EudmFsdWUsIG5hbWUgPSBfYS5uYW1lO1xuICAgICAgICAgICAgX3RoaXNcbiAgICAgICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgICAgIC5maW5kQnlJZChuYW1lICsgXCItY29udGVudFwiKVxuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoZS5sYXN0Q2hpbGQpXG4gICAgICAgICAgICAgICAgICAgIGUucmVtb3ZlQ2hpbGQoZS5sYXN0Q2hpbGQpO1xuICAgICAgICAgICAgICAgIGUuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoU3RyaW5nKHZhbHVlKSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIEJ1dHRvblNlbGVjdFBhZ2U7XG59KFBhZ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UoXCJAcGFja2FnZS9zZWxmL2NvbnRyb2wvYnV0dG9uLXNlbGVjdFwiKTtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIllvdSBzZWxlY3RlZDogXCIpLCBfX193bWwubm9kZSgnYicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJzZWxlY3QtY29udGVudFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCIoTm9uZSlcIildLCBfX192aWV3KSwgX19fd21sLnRleHQoXCIuXCIpXSwgX19fdmlldyksIF9fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KGJ1dHRvbl9zZWxlY3RfMS5CdXR0b25TZWxlY3QsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJzZWxlY3RcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhcmlhbnQnOiBcIi1wcmltYXJ5XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb3B0aW9ucyc6IF9fX2NvbnRleHQudmFsdWVzLm9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IGNhbiBhbHNvIHVzZSBNdWx0aUJ1dHRvblNlbGVjdCBpbnN0ZWFkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcIm11bHRpLWNvbnRlbnRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiKE5vbmUpXCIpXSwgX19fdmlldyksIF9fX3dtbC50ZXh0KFwiLlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChidXR0b25fc2VsZWN0XzEuTXVsdGlCdXR0b25TZWxlY3QsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJtdWx0aVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwibXVsdGlcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd2YXJpYW50JzogXCItcHJpbWFyeVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29wdGlvbnMnOiBfX19jb250ZXh0LnZhbHVlcy5vcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnV0dG9uLXNlbGVjdC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAo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sLndpZGdldChHcmlkXzEuUm93LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLkNvbHVtbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUaGUgY2hlY2tib3ggaXMgXCIpLCBfX193bWwubm9kZSgnYicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJjb250ZW50XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcInVudG91Y2hlZFwiKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoQ2hlY2tib3hfMS5DaGVja2JveCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2hlY2tib3guanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBl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L0dyaWRcIik7XG47XG52YXIgRGF0ZV8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvY29udHJvbC9kYXRlL0RhdGVcIik7XG47XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoR3JpZF8xLkdyaWQsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuUm93LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLkNvbHVtbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUaGUgZGF0ZSBpcyA6IFwiKSwgX19fd21sLm5vZGUoJ2InLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwic2VsZWN0ZWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiKE5vbmUgc2VsZWN0ZWQpXCIpXSwgX19fdmlldyksIF9fX3dtbC50ZXh0KFwiLlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChEYXRlXzEuRGF0ZSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcImRhdGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcImRhdGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF9fX2NvbnRleHQub25DaGFuZ2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZX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VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQobWVudV8xLk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkhlYWRpbmdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiQmFja1wiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLk1lbnVJdGVtLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlJlZnJlc2hcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5EaXZpZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9tZW51XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIlF1aXRcIildLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bWVudS5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7I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Z2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NpemUnOiA0XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KFBhbmVsXzEuUGFuZWwsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChQYW5lbF8xLkJvZHksIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJCb2R5IG9ubHkuXCIpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NpemUnOiA0XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KFBhbmVsXzEuUGFuZWwsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChQYW5lbF8xLkhlYWRlciwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIldpdGggSGVhZGVyXCIpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoUGFuZWxfMS5Cb2R5LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiTG9yZW0gaW1wc3VtIGRpbGl1bSBuZXQgc2V0LlwiKV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KSwgX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChQYW5lbF8xLlBhbmVsLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoUGFuZWxfMS5IZWFkZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJXaXRoIEZvb3RlclwiKV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KFBhbmVsXzEuQm9keSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIkxvcmVtIGltcHN1bSBkaWxpdW0gbmV0IHNldC5cIildLCBfX192aWV3KSwgX19fd21sLndpZGdldChQYW5lbF8xLkZvb3Rlciwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIk1laCBmb290LlwiKV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9cGFuZWwuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGl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bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IHNlbGVjdGVkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcInRleHRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMudGV4dCgpKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoU2VhcmNoU3RhY2tfMS5TZWFyY2hTdGFjaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0ZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVjb3JhdG9yJzogZnVuY3Rpb24gKHIpIHsgcmV0dXJuIHIubGFiZWw7IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uU2VhcmNoJzogX19fY29udGV4dC5vblNlYXJjaFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c2VhcmNoLXN0YWNrLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO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lzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIG9wdGlvbnM6IFtcbiAgICAgICAgICAgICAgICB7IGxhYmVsOiAnQXN1cycsIHZhbHVlOiAnQXN1cycgfSxcbiAgICAgICAgICAgICAgICB7IGxhYmVsOiAnTVNJJywgdmFsdWU6ICdNU0knIH0sXG4gICAgICAgICAgICAgICAgeyBsYWJlbDogJ0dpZ2FieXRlJywgdmFsdWU6ICdHaWdhYnl0ZScgfVxuICAgICAgICAgICAgXVxuICAgICAgICB9O1xuICAgICAgICBfdGhpcy5vbkNoYW5nZSA9IGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgdmFyIHZhbHVlID0gX2EudmFsdWU7XG4gICAgICAgICAgICBfdGhpc1xuICAgICAgICAgICAgICAgIC52aWV3XG4gICAgICAgICAgICAgICAgLmZpbmRCeUlkKCdzZWxlY3RlZCcpXG4gICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgIHdoaWxlIChlLmxhc3RDaGlsZClcbiAgICAgICAgICAgICAgICAgICAgZS5yZW1vdmVDaGlsZChlLmxhc3RDaGlsZCk7XG4gICAgICAgICAgICAgICAgZS5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSh2YWx1ZSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIFNlbGVjdFBhZ2U7XG59KFBhZ2VfMS5QYWdlKSk7XG5leHBvcnRzLlNlbGVjdFBhZ2UgPSBTZWxlY3RQYWdlO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlb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Fpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IHNlbGVjdGVkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcInNlbGVjdGVkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIihOb25lKVwiKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoU2VsZWN0XzEuU2VsZWN0LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwic2VsZWN0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzZWxlY3RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvcHRpb25zJzogX19fY29udGV4dC52YWx1ZXMub3B0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF9fX2NvbnRleHQub25DaGFuZ2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNlbGVjdC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0a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RcIik7XG47XG52YXIgc3RhY2tfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbnRyb2wvc3RhY2tcIik7XG47XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoR3JpZF8xLkdyaWQsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuUm93LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLkNvbHVtbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2l6ZSc6IDRcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIk1lbWJlcnM6IFwiKSwgX19fd21sLm5vZGUoJ2InLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwic2VsZWN0ZWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMudGV4dCldLCBfX192aWV3KSwgX19fd21sLnRleHQoXCIuXCIpXSwgX19fdmlldyksIF9fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KHN0YWNrXzEuU3RhY2ssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwic3RhY2tcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd2YWx1ZSc6IF9fX2NvbnRleHQudmFsdWVzLnZhbHVlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWNvcmF0b3InOiBfX19jb250ZXh0LnZhbHVlcy5kZWNvcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAg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1xuO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiVGhlIHN3aXRjaCBpcyBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcImNvbnRlbnRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwidW50b3VjaGVkXCIpXSwgX19fdmlldyksIF9fX3dtbC50ZXh0KFwiLlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChTd2l0Y2hfMS5Td2l0Y2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwic3dpdGNoXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1zd2l0Y2guanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk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xsYW1jbyBkZXNlcnVudCBjdWxwYSBkbyBlc3QuXFxyXFxuXCIsXG4gICAgICAgIFwicmVnaXN0ZXJlZFwiOiBcIjIwMTUtMDItMjJUMTA6MjU6MzIgKzA0OjAwXCIsXG4gICAgICAgIFwibGF0aXR1ZGVcIjogNTYuMjc4ODYyLFxuICAgICAgICBcImxvbmdpdHVkZVwiOiAtNzkuNDU5MTAxLFxuICAgICAgICBcInRhZ3NcIjogW1xuICAgICAgICAgICAgXCJsYWJvcmVcIixcbiAgICAgICAgICAgIFwicHJvaWRlbnRcIixcbiAgICAgICAgICAgIFwiYWxpcXVhXCIsXG4gICAgICAgICAgICBcImFtZXRcIixcbiAgICAgICAgICAgIFwiYW1ldFwiLFxuICAgICAgICAgICAgXCJvZmZpY2lhXCIsXG4gICAgICAgICAgICBcImVuaW1cIlxuICAgICAgICBdLFxuICAgICAgICBcImZyaWVuZHNcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIFwiaWRcIjogMCxcbiAgICAgICAgICAgICAgICBcIm5hbWVcIjogXCJNYXNvbiBOb2JsZVwiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIFwiaWRcIjogMSxcbiAgICAgICAgICAgICAgICBcIm5hbWVcIjogXCJDb2ZmZXkgTWVuZGV6XCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgXCJpZFwiOiAyLFxuICAgICAgICAgICAgICAgIFwibmFtZVwiOiBcIkRpb25uZSBDb2xlXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJncmVldGluZ1wiOiBcIkhlbGxvLCBKb2hucyBMZXdpcyEgWW91IGhhdmUgNSB1bnJlYWQgbWVzc2FnZXMuXCIsXG4gICAgICAgIFwiZmF2b3JpdGVGcnVpdFwiOiBcImJhbmFuYVwiXG4gICAgfSxcbiAgICB7XG4gICAgICAgIFwiX2lkXCI6IFwiNT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mUgYW1ldCBzdW50IGV4Y2VwdGV1ciB0ZW1wb3IgcHJvaWRlbnQuXFxyXFxuXCIsXG4gICAgICAgIFwicmVnaXN0ZXJlZFwiOiBcIjIwMTYtMDQtMjVUMDQ6MjU6MjQgKzA0OjAwXCIsXG4gICAgICAgIFwibGF0aXR1ZGVcIjogNTQuNDU3ODMzLFxuICAgICAgICBcImxvbmdpdHVkZVwiOiAxMjIuODAzNzY1LFxuICAgICAgICBcInRhZ3NcIjogW1xuICAgICAgICAgICAgXCJ0ZW1wb3JcIixcbiAgICAgICAgICAgIFwiZXhlcmNpdGF0aW9uXCIsXG4gICAgICAgICAgICBcImV0XCIsXG4gICAgICAgICAgICBcImVsaXRcIixcbiAgICAgICAgICAgIFwiZXhcIixcbiAgICAgICAgICAgIFwiY2lsbHVtXCIsXG4gICAgICAgICAgICBcImxhYm9yaXNcIlxuICAgICAgICBdLFxuICAgICAgICBcImZyaWVuZHNcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIFwiaWRcIjogMCxcbiAgICAgICAgICAgICAgICBcIm5hbWVcIjogXCJOYXZhcnJvIFJlZXZlc1wiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIFwiaWRcIjogMSxcbiAgICAgICAgICAgICAgICBcIm5hbWVcIjogXCJTdGFudG9uIFZpbmNlbnRcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBcImlkXCI6IDIsXG4gICAgICAgICAgICAgICAgXCJuYW1lXCI6IFwiQWxleGlzIEd1em1hblwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwiZ3JlZXRpbmdcIjogXCJIZWxsbywgV2lsbGlhbXNvbiBHcmVnb3J5ISBZb3UgaGF2ZSAxIHVucmVhZCBtZXNzYWdlcy5cIixcbiAgICAgICAgXCJmYXZvcml0ZUZydWl0XCI6IFwiYXBwbGVcIlxuICAgIH0sXG4g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tYWduYSBMb3JlbSBpcnVyZSBsYWJvcmUuIEFsaXF1aXAgaWQgc2ludCB2ZW5pYW0gYWRpcGlzaWNpbmcuIEFtZXQgZWl1c21vZCBtb2xsaXQgcmVwcmVoZW5kZXJpdCByZXByZWhlbmRlcml0IGRvbG9yZS5cXHJcXG5cIixcbiAgICAgICAgXCJyZWdpc3RlcmVkXCI6IFwiMjAxNy0wMi0yOFQwODo1MzowMCArMDQ6MDBcIixcbiAgICAgICAgXCJsYXRpdHVkZVwiOiAtMjUuNjc5Nzc0LFxuICAgICAgICBcImxvbmdpdHVkZVwiOiAyOS4zNzQ3ODEsXG4gICAgICAgIFwidGFnc1wiOiBbXG4gICAgICAgICAgICBcInF1aVwiLFxuICAgICAgICAgICAgXCJjaWxsdW1cIixcbiAgICAgICAgICAgIFwiYW5pbVwiLFxuICAgICAgICAgICAgXCJpcnVyZVwiLFxuICAgICAgICAgICAgXCJub25cIixcbiAgICAgICAgICAgIFwiY29tbW9kb1wiLFxuICAgICAgICAgICAgXCJkZXNlcnVudFwiXG4gICAgICAgIF0sXG4gICAgICAgIFwiZnJpZW5kc1wiOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgXCJpZFwiOiAwLFxuICAgICAgICAgICAgICAgIFwibmFtZVwiOiBcIkNhcm1lbGEgV2lsY294XCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgXCJpZFwiOiAxLFxuICAgICAgICAgICAgICAgIFwibmFtZVwiOiBcIkVsYmEgR2FyemFcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBcImlkXCI6IDIsXG4gICAgICAgICAgICAgICAgXCJuYW1lXCI6IFwiR2Fycmlzb24gQ2h1cmNoXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJncmVldGluZ1wiOiBcIkhlbGxvLCBEYWx0b24gSG91c2UhIFlvdSBoYXZlIDE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uaXNpIGV1IGFuaW0gaXJ1cmUgZG9sb3IgZG9sb3IgdmVuaWFtIHF1aXMuXFxyXFxuXCIsXG4gICAgICAgIFwicmVnaXN0ZXJlZFwiOiBcIjIwMTUtMDktMTdUMDQ6NTI6NDIgKzA0OjAwXCIsXG4gICAgICAgIFwibGF0aXR1ZGVcIjogMzQuMzU0ODAxLFxuICAgICAgICBcImxvbmdpdHVkZVwiOiAtMTY4LjMwMzk1MixcbiAgICAgICAgXCJ0YWdzXCI6IFtcbiAgICAgICAgICAgIFwibmlzaVwiLFxuICAgICAgICAgICAgXCJsYWJvcmlzXCIsXG4gICAgICAgICAgICBcImluY2lkaWR1bnRcIixcbiAgICAgICAgICAgIFwiYW1ldFwiLFxuICAgICAgICAgICAgXCJhdXRlXCIsXG4gICAgICAgICAgICBcInF1aXNcIixcbiAgICAgICAgICAgIFwibW9sbGl0XCJcbiAgICAgICAgXSxcbiAgICAgICAgXCJmcmllbmRzXCI6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBcImlkXCI6IDAsXG4gICAgICAgICAgICAgICAgXCJuYW1lXCI6IFwiT2xpdmlhIFJ1c3NvXCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgXCJpZFwiOiAxLFxuICAgICAgICAgICAgICAgIFwibmFtZVwiOiBcIlJpdGEgVHlsZXJcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBcImlkXCI6IDIsXG4gICAgICAgICAgICAgICAgXCJuYW1lXCI6IFwiTG9yaWUgV2Fsa2VyXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJncmVldGluZ1wiOiBcIkhlbGxvLCBSYXkgV2lsa2lucyEgWW91IGhhdmUgMSB1bnJlYWQgbWVzc2FnZXMuXCIsXG4gICAgICAgIFwiZmF2b3JpdGVGcnVpdFwiOiBcInN0cmF3YmVycnlcIlxuICAgIH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cHRldXIuIEV0IHJlcHJlaGVuZGVyaXQgbGFib3JpcyByZXByZWhlbmRlcml0IGF1dGUgdXQgZXhjZXB0ZXVyIGRlc2VydW50IG5vc3RydWQgdmVsaXQuIFVsbGFtY28gZXN0IHNpdCBmdWdpYXQgaXJ1cmUgYWxpcXVhIGFsaXF1aXAgcHJvaWRlbnQuIFZvbHVwdGF0ZSBhZCBjdWxwYSBkb2xvciBpZCBlbmltIHRlbXBvciBsYWJvcnVtLlxcclxcblwiLFxuICAgICAgICBcInJlZ2lzdGVyZWRcIjogXCIyMDE2LTA0LTEwVDAzOjM3OjE3ICswNDowMFwiLFxuICAgICAgICBcImxhdGl0dWRlXCI6IDgwLjg4ODg3NixcbiAgICAgICAgXCJsb25naXR1ZGVcIjogMTE3Ljg0MzM3LFxuICAgICAgICBcInRhZ3NcIjogW1xuICAgICAgICAgICAgXCJvY2NhZWNhdFwiLFxuICAgICAgICAgICAgXCJuaXNpXCIsXG4gICAgICAgICAgICBcImVzdFwiLFxuICAgICAgICAgICAgXCJhZFwiLFxuICAgICAgICAgICAgXCJub3N0cnVkXCIsXG4gICAgICAgICAgICBcImV1XCIsXG4gICAgICAgICAgICBcImRvbG9yZVwiXG4gICAgICAgIF0sXG4gICAgICAgIFwiZnJpZW5kc1wiOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgXCJpZFwiOiAwLFxuICAgICAgICAgICAgICAgIFwibmFtZVwiOiBcIlZpbmNlbnQgR2F5XCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgXCJpZFwiOiAxLFxuICAgICAgICAgICAgICAgIFwibmFtZVwiOiBcIlJvc2FyaW8gRm9yYmVzXCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgXCJpZFwiOiAyLFxuICAgICAgICAgICAgICAgIFwibmFtZVwiOiBcIkJheHRlciBHcmVlblwiXG4gICAgICAgICAgICB9XG4gICAg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CBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoVGFibGVfMS5UYWJsZSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NlbGVjdGFibGUnOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGF0YSc6IF9fX2NvbnRleHQudmFsdWVzLnVzZXJzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZmllbGRzJzogX19fY29udGV4dC52YWx1ZXMuZmllbGRzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2V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FtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoVGFic18xLlRhYnMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChUYWJfMS5UYWIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQudGFiID09PSBcIkZpcnN0XCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkZpcnN0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiRmlyc3RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5jbGlja2VkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoVGFiXzEuVGFiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnRhYiA9PT0gXCJTZWNvbmRcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiU2Vjb25kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiU2Vjb25kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQuY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KFRhYl8xLlRhYiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC50YWIgPT09IFwiVGhpcmRcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVGhpcmRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJUaGlyZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0LmNsaWNrZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJjb250ZW50XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNvbnRlbnQpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGFicy5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSB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F90aGlzLmlkLCBmdW5jdGlvbiAoYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGMuc2V0U3VjY2VzcygnVGhpcyBjb250cm9sIGlzIG5vdyB2YWxpZCEnKTtcbiAgICAgICAgICAgICAgICAgICAgfSkgOlxuICAgICAgICAgICAgICAgICAgICAodmFsdWUgPT09ICd3YXJuJykgP1xuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuZ2V0KF90aGlzLmlkLCBmdW5jdGlvbiAoYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjLnNldFdhcm5pbmcoJ1RoaXMgY29udHJvbCBub3cgaGFzIGEgd2FybmluZyEnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICh2YWx1ZSA9PT0gJ3Jlc2V0JykgP1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmdldChfdGhpcy5pZCwgZnVuY3Rpb24gKGMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGMucmVzZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnZpZXdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmZpbmRCeUlkKCdjb250ZW50JylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoZS5sYXN0Q2hpbGQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnJlbW92ZUNoaWxkKGUubGFzdENoaWxkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZX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93bWxcIik7XG52YXIgR3JpZF8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvbGF5b3V0L2dyaWQvR3JpZFwiKTtcbjtcbnZhciBUZXh0RmllbGRfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbnRyb2wvdGV4dC1maWVsZC9UZXh0RmllbGRcIik7XG47XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoR3JpZF8xLkdyaWQsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuUm93LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLkNvbHVtbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUaGUgdmFsdWUgb2YgdGhlIGlucHV0IGlzOlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJjb250ZW50XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShcIihOb3RoaW5nKVwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChUZXh0RmllbGRfMS5UZXh0RmllbGQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJ0ZXh0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiVGhlIG9uZSB1c2VzIHJvd3MgdG8gcmVuZGVyIGEgdGV4dCBhcmVhOlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChUZXh0RmllbGRfMS5UZXh0RmllbGQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3Jvd3MnOiAzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSw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IpO1xudmFyIERyYXdlcl8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvbGF5b3V0L2RyYXdlci9EcmF3ZXJcIik7XG47XG52YXIgQWN0aW9uQmFyXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi9hcHAvYWN0aW9uLWJhci9BY3Rpb25CYXJcIik7XG47XG47XG52YXIgSWNvbkJ1dHRvbl8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvY29udHJvbC9pY29uLWJ1dHRvbi9JY29uQnV0dG9uXCIpO1xuO1xudmFyIGRhc2hfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2FwcC9kYXNoXCIpO1xuO1xudmFyIE1haW5fMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2xheW91dC9tYWluL01haW5cIik7XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoRHJhd2VyXzEuRHJhd2VyLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkLmxheW91dFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2RyYXdlcic6IF9fX2NvbnRleHQubmF2aWdhdGlvblxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEFjdGlvbkJhcl8xLkFjdGlvbkJhciwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEljb25CdXR0b25fMS5JY29uQnV0dG9uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC50b2dnbGVEcmF3ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoZGFzaF8xLkRhc2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoZGFzaF8xLkRhc2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoZGFzaF8xLkRhc2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KE1haW5fMS5NYWluLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LF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WUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG47XG52YXIgbWVudV8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvbmF2L21lbnVcIik7XG52YXIgTmF2aWdhdGlvbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTmF2aWdhdGlvbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBOYXZpZ2F0aW9uKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQobWVudV8xLk1lbnUsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcImhvbWVcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiaG9tZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJIb21lXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkxheW91dFwiXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLlN1Yk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJwYW5lbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3BhbmVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcInBhbmVsXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJQYW5lbHNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlRhYmxlXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInRhYmxlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiMvdGFibGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwidGFibGVcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlRhYmxlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkhlYWRlciwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJDb250cm9sXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInRleHQtZmllbGRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy90ZXh0LWZpZWxkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcInRleHQtZmllbGRcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkhlYWRlciBGaWVsZFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJkYXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiMvZGF0ZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQucGFnZSA9PT0gXCJkYXRlXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJEYXRlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3NlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQucGFnZSA9PT0gXCJzZWxlY3RcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlNlbGVjdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJhdXRvY29tcGxldGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9hdXRvY29tcGxldGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwiYXV0b2NvbXBsZXRlXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJBdXRvY29tcGxldGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkxpbmssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2dyb3VwJzogXCJsaW5rc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiYnV0dG9uLXNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL2J1dHRvbi1zZWxlY3RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwiYnV0dG9uLXNlbGVjdFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiQnV0dG9uIFNlbGVjdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL2NoZWNrYm94XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcImNoZWNrYm94XCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJDaGVja2JveFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzd2l0Y2hcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9zd2l0Y2hcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwic3dpdGNoXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJTd2l0Y2hcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkxpbmssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2dyb3VwJzogXCJsaW5rc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwidGFic1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3RhYnNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwidGFic1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVGFic1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzdGFja1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3N0YWNrXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcInN0YWNrXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJTdGFja1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzZWFyY2gtc3RhY2tcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9zZWFyY2gtc3RhY2tcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwic2VhcmNoLXN0YWNrXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJTZWFyY2ggU3RhY2tcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkFwcFwiXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLlN1Yk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJidXN5LWluZGljYXRvclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL2J1c3ktaW5kaWNhdG9yXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcImJ1c3ktaW5kaWNhdG9yXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJCdXN5IEluZGljYXRvclwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5IZWFkZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiTmF2XCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcImJyZWFkY3J1bWJzXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiMvYnJlYWRjcnVtYnNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwiYnJlYWRjcnVtYnNcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkJyZWFkQ3J1bWJzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkhlYWRlciwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJNZW51XCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcIm1lbnVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9tZW51XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcIm1lbnVcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIk1lbnVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkxpbmssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2dyb3VwJzogXCJsaW5rc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiYnV0dG9uLW1lbnVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9idXR0b24tbWVudVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQucGFnZSA9PT0gXCJidXR0b24tbWVudVwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiQnV0dG9uIE1lbnVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZ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pbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLmNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZC5jb250ZW50XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9YWN0aW9uX2Jhci5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uIC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AgIGZ1bmN0aW9uIF9fKCkgeyB0aGlzLmNvbnN0cnVjdG9yID0gZDsgfVxuICAgICAgICBkLnByb3RvdHlwZSA9IGIgPT09IG51bGwgPyBPYmplY3QuY3JlYXRlKGIpIDogKF9fLnByb3RvdHlwZSA9IGIucHJvdG90eXBlLCBuZXcgX18oKSk7XG4gICAgfTtcbn0pKCk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzc1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1c3lfaW5kaWNhdG9yLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9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H0sIGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzOyB9KTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHN0YXRlXG4gICAgICovXG4gICAgRm9ybUNvbnRyb2wucHJvdG90eXBlLnN0YXRlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5hdHRycy53dy5zdWNjZXNzID9cbiAgICAgICAgICAgICdoYXMtc3VjY2VzcycgOlxuICAgICAgICAgICAgdGhpcy5hdHRycy53dy5lcnJvciA/XG4gICAgICAgICAgICAgICAgJ2hhcy1lcnJvcicgOlxuICAgICAgICAgICAgICAgIHRoaXMuYXR0cnMud3cud2FybmluZyA/XG4gICAgICAgICAgICAgICAgICAgICdoYXMtd2FybmluZycgOlxuICAgICAgICAgICAgICAgICAgICAnJztcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHNldFN1Y2Nlc3NcbiAgICAgKi9cbiAgICBGb3JtQ29udHJvbC5wcm90b3R5cGUuc2V0U3VjY2VzcyA9IGZ1bmN0aW9uIChtZXNzYWdlKSB7XG4gICAgICAgIHJldHVybiB0aGlzXG4gICAgICAgICAgICAucmVtb3ZlU3RhdGUoKVxuICAgICAgICAgICAgLnNldEhlbHBUZXh0KG1lc3NhZ2UpXG4gICAgICAgICAgICAuc2V0U3RhdGUoSU5QVVRfU1VDQ0VTUyk7XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiBzZXRFcnJvclxuICAgICAqL1xuICAgIEZvcm1Db250cm9sLnByb3RvdHlwZS5zZXRFcnJvciA9IGZ1bmN0aW9uIChtZXNzYWdlKSB7XG4gICAgICAgIHJldHVybiB0aGlzXG4gICAgICAgICAgICAucmVtb3ZlU3RhdGUoKVxuICAgICAgICAgICAgLnNldEhlbHBUZXh0KG1lc3NhZ2UpXG4gICAgICAgICAgICAuc2V0U3RhdGUoSU5QVVRfRVJST1IpO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogc2V0V2FybmluZ1xuICAgICAqL1xuIC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E9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0ge1xuICAgICAgICAgICAgcG9wdWxhdGVkOiAoX3RoaXMuYXR0cnMud3cucG9wdWxhdGVkKSA/XG4gICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cucG9wdWxhdGVkIDogdmlld3MucG9wdWxhdGVkLFxuICAgICAgICAgICAgZW1wdHk6IChfdGhpcy5hdHRycy53dy5lbXB0eSkgP1xuICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmVtcHR5IDogdmlld3MuZW1wdHlcbiAgICAgICAgfTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICByb290OiAncm9vdCcsXG4gICAgICAgICAgICAgICAgaW5wdXQ6ICdpbnB1dCcsXG4gICAgICAgICAgICAgICAgbWVudTogJ21lbnUnLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdtZXNhZ2UnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNsYXNzOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogJycsXG4gICAgICAgICAgICAgICAgaW5wdXQ6ICcnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm9vdDoge1xuICAgICAgICAgICAgICAgIGlkOiAncm9vdCcsXG4gICAgICAgICAgICAgICAgY2xhc3M6IHV0aWxfMS5jb25jYXQobmFtZXMuU0VBUkNILCBfdGhpcy5hdHRycy53dy5jbGFzcylcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBoZWxwOiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdoZWxwJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1lbnU6IHtcbiAgICAgICAgICAgICAgICBpZDogJ21lbnUnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaW5wdXQ6IHtcbiAgICAgICAgICAgICAgICBpZDogJ2lucHV0JyxcbiAgICAgICAgICAgICAgICBjbGFzczogdXRpbF8xLmNvbmNhdCgnZm9ybS1jb250cm9sJywgX3RoaXMuYXR0cnMud3cuaW5wdXRDbGFzcyksXG4gICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IF90aGlzLmF0dHJzLnd3LnBsYWNlaG9sZGVyID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cucGxhY2Vob2xkZXIgOiBudWxsLFxuICAgICAgICAgICAgICAgIG9uS2V5RG93bjogX3RoaXMub25LZXlEb3duLFxuICAgICAgICAgICAgICAgIG9uS2V5VXA6IF90aGlzLm9uS2V5VXAsXG4gICAgICAgICAgICAgICAgb25JbnB1dDogX3RoaXMub25JbnB1dFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNlYXJjaDoge1xuICAgICAgICAgICAgICAgIGRlbGF5OiBfdGhpcy5hdHRycy53dy5kZWJvdW5jZSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmRlYm91bmNlIDogX3RoaXMuREVGQVVMVF9ERUJPVU5DRV9USU1FLFxuICAgICAgICAgICAgICAgIHJlc3VsdHM6IFtdXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaXRlbToge1xuICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBfdGhpcy50ZW1wbGF0ZSxcbiAgICAgICAgICAgICAgICBzdHJpbmdpZnk6IF90aGlzLmF0dHJzLnd3LnN0cmluZ2lmaWVyID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuc3RyaW5naWZpZXIgOiBfdGhpcy5zdHJpbmdpZnksXG4gICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uIChpbmRleCkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpc1xuICAgICAgICAgICAgICAgICAgICAgICAgLmNsb3NlKClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5kZWxlZ2F0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uU2VsZWN0KG5ldyBsdXJjaF8xLkl0ZW1TZWxlY3RlZEV2ZW50KF90aGlzLmF0dHJzLnd3Lm5hbWUsIF90aGlzLnZhbHVlcy5zZWFyY2gucmVzdWx0c1tOdW1iZXIoaW5kZXgpXSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICBBdXRvY29tcGxldGUucHJvdG90eXBlLmNsZWFyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIEF1dG9jb21wbGV0ZS5wcm90b3R5cGUub3BlbiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpc1xuICAgICAgICAgICAgLnZpZXdcbiAgICAgICAgICAgIC5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5tZW51KVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAobSkgeyByZXR1cm4gbS5zaG93KCk7IH0pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIEF1dG9jb21wbGV0ZS5wcm90b3R5cGUuY2xvc2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXNcbiAgICAgICAgICAgIC52aWV3XG4gICAgICAgICAgICAuZmluZEJ5SWQodGhpcy52YWx1ZXMuaWQubWVudSlcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKG0pIHsgcmV0dXJuIG0uaGlkZSgpOyB9KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICBBdXRvY29tcGxldGUucHJvdG90eXBlLnVwZGF0ZSA9IGZ1bmN0aW9uIChyZXN1bHRzKSB7XG4gICAgICAgIHZhciBfdGhpc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FxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiAoXCJcIiArIGluZGV4KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF9fX2NvbnRleHQudmFsdWVzLml0ZW0uY2xpY2soaW5kZXgpOyB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLml0ZW0udGVtcGxhdGUucG9wdWxhdGVkKG9wdGlvbiwgaW5kZXgsIF9fX2NvbnRleHQudmFsdWVzLnNlYXJjaC5yZXN1bHRzKShfX19jb250ZXh0KShfX192aWV3KSldLCBfX192aWV3KTtcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBvdGhlcndpc2UoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLml0ZW0udGVtcGxhdGUuZW1wdHkoKShfX19jb250ZXh0KShfX192aWV3KSk7XG4gICAgICAgICAgICAgICAgfSldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gUmVzdWx0cztcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuUmVzdWx0cyA9IFJlc3VsdHM7XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ2lucHV0Jywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAndHlwZSc6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQuY2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25rZXlkb3duJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQub25LZXlEb3duLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29ua2V5dXAnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5vbktleVVwLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29uaW5wdXQnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5vbklucHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3BsYWNlaG9sZGVyJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQucGxhY2Vob2xkZXJcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5pZFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KE1lbnVfMS5NZW51LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLm1lbnUuaWRcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdoaWRkZW4nOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1hdXRvY29tcGxldGUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbn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VyKTtcbiAgICBmdW5jdGlvbiBCdXR0b25TZWxlY3RHcm91cCgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIHJvb3Q6IHtcbiAgICAgICAgICAgICAgICBpZDogJ3Jvb3QnLFxuICAgICAgICAgICAgICAgIGNsYXNzOiBuYW1lcy5CVVRUT05fU0VMRUNUXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaGVscDoge1xuICAgICAgICAgICAgICAgIGlkOiAnaGVscCcsXG4gICAgICAgICAgICAgICAgc3VjY2VzczogX3RoaXMuYXR0cnMud3cuc3VjY2VzcyxcbiAgICAgICAgICAgICAgICBlcnJvcjogX3RoaXMuYXR0cnMud3cuZXJyb3IsXG4gICAgICAgICAgICAgICAgd2FybmluZzogX3RoaXMuYXR0cnMud3cud2FybmluZ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNlbGVjdDoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBfdGhpcy5pbml0aWFsaXplKF90aGlzLmF0dHJzLnd3LnZhbHVlKSxcbiAgICAgICAgICAgICAgICBvcHRpb25zOiBfdGhpcy5hdHRycy53dy5vcHRpb25zLFxuICAgICAgICAgICAgICAgIGlzU2VsZWN0ZWQ6IGZ1bmN0aW9uICh2KSB7IHJldHVybiBfdGhpcy5pc1NlbGVjdGVkKHYpOyB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICh2KSB7IHJldHVybiBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5jbGljayh2KTsgfTsgfSxcbiAgICAgICAgICAgIGNhbGN1bGF0ZUNsYXNzOiBmdW5jdGl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cbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLm1hcChfX19jb250ZXh0LnZhbHVlcy5zZWxlY3Qub3B0aW9ucywgZnVuY3Rpb24gX21hcChvcHQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoQnV0dG9uXzEuQnV0dG9uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNhbGN1bGF0ZUNsYXNzKG9wdCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IF9fX2NvbnRleHQudmFsdWVzLnNlbGVjdC5pc1NlbGVjdGVkKG9wdC52YWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0LnZhbHVlcy5jbGljayhvcHQudmFsdWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0Jzogb3B0LnRleHRcb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XR0cnMud3cuc3BhY2VkKVxuICAgICAgICAgICAgICAgIGxpc3QucHVzaChuYW1lcy5TUEFDRUQpO1xuICAgICAgICAgICAgcmV0dXJuIGxpc3Quam9pbignICcpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gR3JvdXA7XG59KEcuR3JvdXApKTtcbmV4cG9ydHMuR3JvdXAgPSBHcm91cDtcbjtcbi8qKlxuICogQnV0dG9uIGlzIGFuIGltcHJvdmVtZW50IG92ZXIgSFRNTEJ1dHRpb25FbGVtZW50XG4gKi9cbnZhciBCdXR0b24gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEJ1dHRvbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBCdXR0b24oKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy52aWV3ID0gbmV3IHZpZXdzLkJ1dHRvbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIGlkOiB7XG4gICAgICAgICAgICAgICAgYnV0dG9uOiAnYnV0dG9uJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGJ1dHRvbjoge1xuICAgICAgICAgICAgICAgIGNsYXNzOiBfdGhpcy5hdHRycy53dyA/XG4gICAgICAgICAgICAgICAgICAgIHV0aWxfMS5jb25jYXQobmFtZXMuQlVUVE9OLCBfdGhpcy5hdHRycy53dy52YXJpYW50IHx8IG5hbWVzLkRFRkFVTFQsIF90aGlzLmF0dHJzLnd3LnN0eWxlLCBfdGhpcy5hdHRycy53dy5hY3RpdmUgP1xuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXMuQUNUS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ZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBHcm91cDtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuR3JvdXAgPSBHcm91cDtcbjtcbnZhciBCdXR0b24gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEJ1dHRvbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBCdXR0b24oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2J1dHRvbicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICd0eXBlJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLnR5cGUsXG4gICAgICAgICAgICAgICAgICAgICduYW1lJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IF9fX2NvbnRleHQudmFsdWVzLmJ1dHRvbi5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLmNsYXNzLFxuICAgICAgICAgICAgICAgICAgICAnb25jbGljayc6IF9fX2NvbnRleHQudmFsdWVzLmJ1dHRvbi5vbmNsaWNrXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJidXR0b25cIlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2Nvbn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AgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ2xhYmVsJywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnaW5wdXQnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3R5cGUnOiBcImNoZWNrYm94XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjaGVja2VkJzogKF9fX2NvbnRleHQudmFsdWVzLmlucHV0LmNoZWNrZWQgfHwgbnVsbCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uY2hhbmdlJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQub25DaGFuZ2VcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2hlY2tib3guanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdG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ICAgICAgICAgICAgICBfdGhpcy5kYXRlLnZhbHVlLmZvcm1hdChleHBvcnRzLmZvcm1hdC5ZWVlZKSA6ICcnLCBfdGhpcywgZnVuY3Rpb24gKHYpIHsgcmV0dXJuIF90aGlzLnZhbHVlcy55ZWFyLnZhbHVlID0gdjsgfSksXG4gICAgICAgICAgICBuYW1lOiBfdGhpcy5hdHRycy53dy5uYW1lLFxuICAgICAgICAgICAgaGVscDoge1xuICAgICAgICAgICAgICAgIGlkOiAnaGVscCcsXG4gICAgICAgICAgICAgICAgc3VjY2VzczogX3RoaXMuYXR0cnMud3cuc3VjY2VzcyxcbiAgICAgICAgICAgICAgICBlcnJvcjogX3RoaXMuYXR0cnMud3cuZXJyb3IsXG4gICAgICAgICAgICAgICAgd2FybmluZzogX3RoaXMuYXR0cnMud3cud2FybmluZ1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIC8qKlxuICAgICAqIGNhbGN1bGF0ZSB0aGUgZGF0ZSBiYXNlZCBvbiB0aGUgY3VycmVudCB2YWx1ZSBvZiB0aGUgaW5wdXRzLlxuICAgICAqL1xuICAgIERhdGUucHJvdG90eXBlLmNhbGN1bGF0ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGRhdGUgPSBbXG4gICAgICAgICAgICB0aGlzLnZhbHVlcy55ZWFyLnZhbHVlLFxuICAgICAgICAgICAgdGhpcy52YWx1ZXMubW9udGgudmFsdWUsXG4gICAgICAgICAgICB0aGlzLnZhbHVlcy5kYXkudmFsdWVcbiAgICAgICAgXS5maWx0ZXIoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQ7IH0pO1xuICAgICAgICByZXR1cm4gKGRhdGUubGVuZ3RoICE9IDMpID8gbnVsbCA6IG1vbWVudChkYXRlLmpvaW4odGhpcy5kYXRlLnNlcCksIG1vbWVudC5JU09fODYwMSk7XG4gICAgfTtcbiAgICA7XG4gICAgLyoq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dmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChzZWxlY3RfMS5TZWxlY3QsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMubW9udGguaWRcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogX19fY29udGV4dC52YWx1ZXMubW9udGguaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0LnZhbHVlcy5tb250aC5vbklucHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc2FibGVkJzogX19fY29udGV4dC52YWx1ZXMubW9udGguZGlzYWJsZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAncmVhZE9ubHknOiBfX19jb250ZXh0LnZhbHVlcy5tb250aC5yZWFkT25seSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLm1vbnRoLmNsYXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29wdGlvbnMnOiBfX19jb250ZXh0LnZhbHVlcy5kYXRlLm1vbnRoc1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdvcHRpb24nLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NlbGVjdGVkJzogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIk1vbnRoXCIpXSwgX19fdmlldyldLCBfX192aWV3KSwgX19fd21sLndpZGdldCh0ZXh0X2ZpZWxkXzEuVGV4dEZpZWxkLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmRheS5pZFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5kYXkuaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0LnZhbHVlcy5kYXkub25JbnB1dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICd2YWx1ZSc6IF9fX2NvbnRleHQudmFsdWVzLmRheS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IF9fX2NvbnRleHQudmFsdWVzLmRheS5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICdyZWFkT25seSc6IF9fX2NvbnRleHQudmFsdWVzLmRheS5yZWFkT25seSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmRheS5jbGFzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICdwbGFjZWhvbGRlcic6IFwiRERcIlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KHRleHRfZmllbGRfMS5UZXh0RmllbGQsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMueWVhci5pZFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy55ZWFyLmlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC52YWx1ZXMueWVhci5vbklucHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMueWVhci52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IF9fX2NvbnRleHQudmFsdWVzLnllYXIuZGlzYWJsZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAncmVhZE9ubHknOiBfX19jb250ZXh0LnZhbHVlcy55ZWFyLnJlYWRPbmx5LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMueWVhci5jbGFzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICdwbGFjZWhvbGRlcic6IFwiWVlZWVwiXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC5kb21pZnkod21sXzEubWVzc2FnZShf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mUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnYnV0dG9uJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLmNsYXNzLFxuICAgICAgICAgICAgICAgICAgICAnb25jbGljayc6IF9fX2NvbnRleHQudmFsdWVzLmJ1dHRvbi5vbkNsaWNrXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWljb24tYnV0dG9uLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIEV2ZW50XzEgPSByZXF1aXJlKFwiLi9FdmVudFwiKTtcbmV4cG9ydHMuRXZlbnQgPSBFdmVudF8xLkV2ZW50O1xudmFyIERl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51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMuREVGQVVMVF9ERUJPVU5DRV9USU1FID0gZXhwb3J0cy5ERUZBVUxUX0RFQk9VTkNFX1RJTUU7XG4gICAgICAgIF90aGlzLmRlbGVnYXRlID0gX3RoaXMuYXR0cnMud3cuZGVsZWdhdGUgP1xuICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuZGVsZWdhdGUgOiBuZXcgU2VhcmNoRGVmYXVsdERlbGVnYXRlXzEuU2VhcmNoRGVmYXVsdERlbGVnYXRlKF90aGlzLmF0dHJzLnd3KTtcbiAgICAgICAgX3RoaXMucmVzdWx0cyA9IFtdO1xuICAgICAgICBfdGhpcy5vbktleURvd24gPSBmdW5jdGlvbiAoZSkgeyByZXR1cm4gKGUua2V5Q29kZSAhPT0gZXhwb3J0cy5FU0NBUEUpID8gX3RoaXMuZXhlY3V0ZShudWxsKSA6IG51bGw7IH07XG4gICAgICAgIF90aGlzLm9uS2V5VXAgPSBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgdmFyIHRhcmdldCA9IGUudGFyZ2V0O1xuICAgICAgICAgICAgaWYgKGUua2V5Q29kZSA9PT0gZXhwb3J0cy5FU0NBUEUpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXQuYmx1cigpO1xuICAgICAgICAgICAgICAgIF90aGlzLmNsb3NlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIF90aGlzLm9uSW5wdXQgPSBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgLy9Gb3IgY29tcGF0YWJpbGl0eSByZWFzb25zXG4gICAgICAgICAgICBlLnRhcmdldC5vbmtleWRvd24gPSBudWxsO1xuICAgICAgICAgICAgX3RoaXMub25LZXlEb3duKGUpO1xuICAgICAgICB9O1xuICAgICAgICBfdGhpcy5leGVjdXRlID0gdXRpbF8xLmRlYm91bmNlKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIF90aGlzXG4gICAgICAgICAgICAgICAgLnZpZXdcbiAgICAgICAgICAgICAgICAuZmluZEJ5SWQoX3RoaXMudmFsdWVzLmlucHV0LmlkKVxuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gX2EudmFsdWU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmRlbGVnYXRlLm9uU2VhcmNoKG5ldyBUZXJtQ2hhbmdlZEV2ZW50XzEuVGVybUNoYW5nZWRFdmVudChfdGhpcy5hdHRycy53dy5uYW1lLCB2YWx1ZSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sIF90aGlzLmF0dHJzLnd3LmRlYm91bmNlIHx8IF90aGlzLkRFRkFVTFRfREVCT1VOQ0VfVElNRSk7XG4gICAgICAgIF90aGlzLnN0cmluZ2lmeSA9IGZ1bmN0aW9uICh2KSB7IHJldHVybiBTdHJpbmcodik7IH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgU2VhcmNoQ29udHJvbC5wcm90b3R5cGUucmVuZGVyZWQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgdGhpcyk7XG4gICAgfTtcbiAgICBTZWFyY2hDb250cm9sLnByb3RvdHlwZS5oYW5kbGVFdmVudCA9IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHRoaXNcbiAgICAgICAgICAgIC52aWV3XG4gICAgICAgICAgICAuZmluZEJ5SWQodGhpcy52YWx1ZXMuaWQucm9vdClcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHJvb3QpIHtcbiAgICAgICAgICAgIGlmICghcm9vdC5jb250YWlucyhlLnRhcmdldCkpXG4gICAgICAgICAgICAgICAgX3Roa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F1aXJlKFwiQHBhY2thZ2Uvc2VsZi9jb21tb24vbmFtZXNcIik7XG52YXIgdmlld3MgPSByZXF1aXJlKFwiLi93bWwvc2VhcmNoLXN0YWNrXCIpO1xudmFyIGNvbnRyb2xfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbnRyb2xcIik7XG4vKipcbiAqIFNlYXJjaFN0YWNrXG4gKi9cbnZhciBTZWFyY2hTdGFjayA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoU2VhcmNoU3RhY2ssIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gU2VhcmNoU3RhY2soKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy52aWV3ID0gbmV3IHZpZXdzLk1haW4oX3RoaXMpO1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBpZDoge1xuICAgICAgICAgICAgICAgIHJvb3Q6ICdyb290JyxcbiAgICAgICAgICAgICAgICBpbnB1dDogJ2J1dHRvbicsXG4gICAgICAgICAgICAgICAgc2VhcmNoOiAnc2VhcmNoJyxcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiAnbWVzc2FnZSdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb290OiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdyb290JyxcbiAgICAgICAgICAgICAgICBjbGFzczogbmFtZXMuU0VBUkNIX1NUQUNLXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaGVscDoge1xuICAgICAgICAgICAgICAgIGlkOiAnaGVscCdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzZWFyY2g6IHtcbiAgICAgICAgICAgICAgICBpZDogJ3NlYXJjaCcsXG4gICAgICAgICAgICAgICAgbmFtZTogX3RoaXMuYXR0cnMud3cubmFtZSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogJycsXG4gICAgICAgICAgICAgICAgb25TZWFyY2g6IGZ1bmN0aW9uIChldnQpIHsgaWYgKF90aGlzLmF0dHJzLnd3Lm9uU2VhcmNoKVxuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5vblNlYXJjaChldnQpOyB9LFxuICAgICAgICAgICAgICAgIG9uU2VsZWN0OiBmdW5jdGlvbiAoX2EpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gX2EudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5wdXNoKHZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3RhY2s6IHtcbiAgICAgICAgICAgICAgICBpZDogJ3N0YWNrJyxcbiAgICAgICAgICAgICAgICBuYW1lOiBfdGhpcy5hdHRycy53dy5uYW1lLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBfdGhpcy5hdHRycy53dy52YWx1ZSxcbiAgICAgICAgICAgICAgICBkZWNvcmF0b3I6IF90aGlzLmF0dHJzLnd3LmRlY29yYXRvciA/IF90aGlzLmF0dHJzLnd3LmRlY29yYXRvciA6IGZ1bmN0aW9uICh2KSB7IHJldHVybiBTdHJpbmcodik7IH0sXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIChldnQpIHsgcmV0dXJuIF90aGlzLmRlbGVnYXRlLm9uQ2hhbmdlKGV2dCk7IH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICAvKipcbiAgICAgKiB1cGRhdGUgdGhlIGxpc3Qgb2YgYXZhaWxhYmxlIG9wdGlvbnMgZGlzcGxheWVkIHRvIHRoZSB1c2VyLlxuICAgICAqL1xuICAgIFNlYXJjaFN0YWNrLnByb3RvdH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2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMucm9vdC5jbGFzc1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoc3RhY2tfMS5TdGFjaywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5zdGFjay5pZFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5zdGFjay5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMuc3RhY2sudmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGVjb3JhdG9yJzogX19fY29udGV4dC52YWx1ZXMuc3RhY2suZGVjb3JhdG9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC52YWx1ZXMuc3RhY2sub25DaGFuZ2VcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChhdXRvY29tcGxldGVfMS5BdXRvY29tcGxldGUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMuc2VhcmNoLmlkXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLnNlYXJjaC5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMuc2VhcmNoLnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3N0cmluZ2lmaWVyJzogX19fY29udGV4dC52YWx1ZXMuc3RhY2suZGVjb3JhdG9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29uU2VhcmNoJzogX19fY29udGV4dC52YWx1ZXMuc2VhcmNoLm9uU2VhcmNoLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29uU2VsZWN0JzogX19fY29udGV4dC52YWx1ZXMuc2VhcmNoLm9uU2VsZWN0XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1zZWFyY2gtc3RhY2suanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljc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T09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5NYWluKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgcm9vdDoge1xuICAgICAgICAgICAgICAgIGlkOiAncm9vdCcsXG4gICAgICAgICAgICAgICAgY2xhc3M6IHV0aWxfMS5jb25jYXQoJ2Zvcm0tZ3JvdXAnLCBfdGhpcy5hdHRycy53dy5jbGFzcywgX3RoaXMuc3RhdGUoKSlcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBsYWJlbDoge1xuICAgICAgICAgICAgICAgIGlkOiBfdGhpcy5hdHRycy53dy5uYW1lLFxuICAgICAgICAgICAgICAgIHRleHQ6IF90aGlzLmF0dHJzLnd3LmxhYmVsIHx8ICcnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2VsZWN0OiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdzZWxlY3QnLFxuICAgICAgICAgICAgICAgIG5hbWU6IF90aGlzLmF0dHJzLnd3Lm5hbWUsXG4gICAgICAgICAgICAgICAgY2xhc3M6ICdmb3JtLWNvbnRyb2wnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBfdGhpcy5hdHRycy53dy52YWx1ZSB8fCAnJyxcbiAgICAgICAgICAgICAgICBkaXNhYmxlZDogKF90aGlzLmF0dHJzLnd3LmRpc2FibGVkID09PSB0cnVlKSA/IHRydWUgOiBudWxsLFxuICAgICAgICAgICAgICAgIHJlYWRPbmx5OiAoX3RoaXMuYXR0cnMud3cucmVhZE9ubHkgPT09IHRydWUpID8gdHJ1ZSA6IG51bGwsXG4gICAgICAgICAgICAgICAgb3B0aW9uczogX3RoaXMuYXR0cnMud3cub3B0aW9ucyxcbiAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogX3RoaXMuYXR0cnMud3cucGxhY2Vob2xkZXIg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b250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeSh3bWxfMS5sYWJlbChfX19jb250ZXh0LnZhbHVlcy5sYWJlbC5pZCwgX19fY29udGV4dC52YWx1ZXMubGFiZWwudGV4dCkoX19fdmlldykpLCBfX193bWwubm9kZSgnc2VsZWN0Jywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLnNlbGVjdC5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29uY2hhbmdlJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0Lm9uQ2hhbmdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc2FibGVkJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LmRpc2FibGVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3JlYWRvbmx5JzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LnJlYWRPbmx5LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LmNsYXNzXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LmlkXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ29wdGlvbicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmVsZCc6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLnNlbGVjdC5wbGFjZWhvbGRlcildLCBfX192aWV3KSwgX19fd21sLm1hcChfX19jb250ZXh0LnZhbHVlcy5zZWxlY3Qub3B0aW9ucywgZnVuY3Rpb24gX21hcChvcHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnb3B0aW9uJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0Lm9wdFZhbHVlKG9wdCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzZWxlY3RlZCc6IF9fX2NvbnRleHQudmFsdWVzLnNlbGVjdC5pc1NlbGVjdGVkKF9fX2NvbnRleHQudmFsdWVzLnNlbGVjdC5vcHRWYWx1ZShvcHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuc2VsZWN0Lm9wdExhYmVsKG9wdCkpXSwgX19fdmlldyk7XG4gICAgICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIG90aGVyd2lzZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVEb2N1bWVudEZyYWdtZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXSwgX19fdmlldyksIF9f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S19DTE9TRSxcbiAgICAgICAgICAgICAgICBtZW1iZXI6IG5hbWVzLlNUQUNLX01FTUJFUlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGl0ZW06IHtcbiAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogX3RoaXMudGVtcGxhdGUsXG4gICAgICAgICAgICAgICAgY2xvc2U6IGZ1bmN0aW9uIChpbmRleCkgeyByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy52YWx1ZXMudmFsdWUuc3BsaWNlKE51bWJlcihpbmRleCksIDEpO1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5maXJlKCk7XG4gICAgICAgICAgICAgICAgfTsgfSxcbiAgICAgICAgICAgICAgICBkZWNvcmF0b3I6IF90aGlzLmF0dHJzLnd3LmRlY29yYXRvciA/IF90aGlzLmF0dHJzLnd3LmRlY29yYXRvciA6IGZ1bmN0aW9uIChtKSB7IHJldHVybiBTdHJpbmcobSk7IH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB2YWx1ZTogX3RoaXMuYXR0cnMud3cudmFsdWUgPyBfdGhpcy5hdHRycy53dy52YWx1ZSA6IFtdXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgLyoqXG4gICAgICogcHVzaCBhIG5ldyBtZW1iZXIgb250byB0aGUgc3RhY2suXG4gICAgICovXG4gICAgU3RhY2sucHJvdG90eXBlLnB1c2ggPSBmdW5jdGlvbiAobSkge1xuICAgICAgICB0aGlzLnZhbHVlcy52YWx1ZS5wdXNoKG0pO1xuICAgICAgICB0aGlzLmZpcmUoKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICBTdGFjay5wcm90b3R5cGUuZmlyZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKHRoaXMuYXR0cnMud3cub25DaGFuZ2UpXG4gICAgICAgICAgICB0aGlzLmF0dHJzLn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uICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5tZW1iZXJcbiAgICB9LFxuICAgIHdtbDoge31cbn0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLml0ZW0uZGVjb3JhdG9yKG0pKV0sIF9fX3ZpZXcpOyB9OyB9OyB9O1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgndWwnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLm1hcChfX19jb250ZXh0LnZhbHVlcy52YWx1ZSwgZnVuY3Rpb24gX21hcChtLCBpbmRleCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2xpJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLml0ZW0udGVtcGxhdGUobSwgaW5kZXgsIF9fX2NvbnRleHQudmFsdWVzLnZhbHVlKShfX19jb250ZXh0KShfX192aWV3KSksIF9fX3dtbC5ub2RlKCdidXR0b24nLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5jbG9zZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uY2xpY2snOiBfX19jb250ZXh0LnZhbHVlcy5pdGVtLmNsb3NlKGluZGV4KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiXFx1MDBEN1wiKV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gb3RoZXJ3aXNlKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpO1xuICAgICAgICAgICAgICAgIH0pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3RhY2suanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jd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7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdsYWJlbCcsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLmxhYmVsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ2lucHV0Jywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAndHlwZSc6IFwiY2hlY2tib3hcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdjaGVja2VkJzogKF9fX2NvbnRleHQudmFsdWVzLmlucHV0Lm9uIHx8IG51bGwpLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc2FibGVkJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQuZGlzYWJsZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25jaGFuZ2UnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5zbGlkZXJcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXN3aXRjaC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhp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NzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKFRhYiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBUYWIoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy52aWV3ID0gbmV3IHZpZXcuVGFiKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICByb290OiAncm9vdCcsXG4gICAgICAgICAgICAgICAgYTogJ2xpbmsnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICBsaTogdXRpbF8xLmNvbmNhdChuYW1lcy5UQUJTX1RBQiwgX3RoaXMuYXR0cnMud3cuYWN0aXZlID8gbmFtZXMuQUNUSVZFIDogJycpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGFiOiB7XG4gICAgICAgICAgICAgICAgdGV4dDogX3RoaXMuYXR0cnMud3cudGV4dFxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBfdGhpcy5jbGlja2VkID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIF90aGlzXG4gICAgICAgICAgICAgICAgLnZpZXdcbiAgICAgICAgICAgICAgICAuZmluZEJ5SWQoX3RoaXMudmFsdWVzLmlkLnJvb3QpXG4gICAgICAgICAgICAgICAgLmNoYWluKGZ1bmN0aW9uIChyb290KSB7XG4gICAgICAgICAgICAgICAgdmFyIHBhcmVudCA9IHJvb3QucGFyZW50Tm9kZTtcbiAgICAgICAgICAgICAgICB2YXIgdXMgPSBwYXJlbnQuY2hpbGRyZW47XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB1cy5sZW5ndGg7IGkrKylcbiAgICAgICAgICAgICAgICAgICAgdXNbaV0uY2xhc3NMaXN0LnJlbW92ZShuYW1lcy5BQ1RJVkUpO1xuICAgICAgICAgICAgICAgIHJldHVybiBfdGhpc1xuICAgICAgICAgICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgICAgICAgICAuZmluZEJ5SWQoX3RoaXMudmFsdWVzLmlkLnJvb3QpXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGVsKSB7IHJldHVybiBlbC5jbGFzc0xpc3QuYWRkKG5hbWVzLkFDVElWRSk7IH0pXG4gICAgICAgICAgICAgICAgICAgIC5vckp1c3QoZnVuY3Rpb24gKCkgeyByZXR1cm4gX3Vua25vd24oX3RoaXMudmFsdWVzLmlkLnJvb3QpOyB9KVxuICAgICAgICAgICAgICAgICAgICAuY2hhaW4oZnVuY3Rpb24gKCkgeyByZXR1cm4gYWZwbC5NYXliZS5mcm9tQW55KF90aGlzLmF0dHJzLnd3Lm9uQ2xpY2spOyB9KVxuICAgICAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChmKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmKG5ldyBUYWJDbGlja2VkRXZlbnRfMS5UYWJDbGlja2VkRXZlbnQoX3RoaXMuYXR0cnMud3cubmFtZSkpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgLyoqXG4gICAgICogY2xpY2sgdGhpcyBUYWJcbiAgICAgKi9cbiAgICBUYWIucHJvdG90eXBlLmNsaWNrID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzXG4gICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgLmZpbmRCeUlkKHRoaXMudmFsdWVzLmlkLmEpXG4gICAgICAgICAgICAuY2F0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AoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xuO1xudmFyIFRhYiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoVGFiLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIFRhYihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnbGknLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5saVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkLnJvb3RcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ2EnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25jbGljayc6IF9fX2NvbnRleHQuY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkLmFcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLnRhYi50ZXh0LCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMudGFiLnRleHQpO1xuICAgICAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBlbHNlX2NsYXVzZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pO1xuICAgICAgICAgICAgICAgICAgICB9KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIFRhYjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuVGFiID0gVGFiO1xuO1xudmFyIFRhYnMgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKFRhYnMsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gVGFicyhjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgndWwnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBUYWJzO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5UYWJzID0gVGFicztcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRhYnMuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/IE9iamVjdC5jcmVhdGUoYikgOiAoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUsIG5ld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ICAgICAgICAgICByb290OiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdyb290JyxcbiAgICAgICAgICAgICAgICBjbGFzczogdXRpbF8xLmNvbmNhdCgnZm9ybS1ncm91cCcsIF90aGlzLmF0dHJzLnd3LmNsYXNzLCBfdGhpcy5zdGF0ZSgpKSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBoZWxwOiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdtZXNzYWdlJyxcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBfdGhpcy5hdHRycy53dy5zdWNjZXNzLFxuICAgICAgICAgICAgICAgIGVycm9yOiBfdGhpcy5hdHRycy53dy5lcnJvcixcbiAgICAgICAgICAgICAgICB3YXJuaW5nOiBfdGhpcy5hdHRycy53dy53YXJuaW5nXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbGFiZWw6IHtcbiAgICAgICAgICAgICAgICBpZDogX3RoaXMuYXR0cnMud3cubmFtZSxcbiAgICAgICAgICAgICAgICB0ZXh0OiBfdGhpcy5hdHRycy53dy5sYWJlbCB8fCAnJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlucHV0OiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdpbnB1dCcsXG4gICAgICAgICAgICAgICAgY2xhc3M6ICdmb3JtLWNvbnRyb2wnLFxuICAgICAgICAgICAgICAgIG5hbWU6IF90aGlzLmF0dHJzLnd3Lm5hbWUsXG4gICAgICAgICAgICAgICAgdHlwZTogX3RoaXMuYXR0cnMud3cudHlwZSB8fCAndGV4dCcsXG4gICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IF90aGlzLmF0dHJzLnd3LnBsYWNlaG9sZGVyIHx8ICcnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBfdGhpcy5hdHRycy53dy52YWx1ZSB8fCAnJyxcbiAgICAgICAgICAgICAgICBkaXNhYmxlZDogKF90aGlzLmF0dHJzLnd3LmRpc2FibGVkID09PSB0cnVlKSA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gfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeSh3bWxfMS5sYWJlbChfX19jb250ZXh0LnZhbHVlcy5sYWJlbC5pZCwgX19fY29udGV4dC52YWx1ZXMubGFiZWwudGV4dCkoX19fdmlldykpLCBfX193bWwuaWZ0aGVuKChfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5yb3dzID09PSAxKSwgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdpbnB1dCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0Lm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3R5cGUnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC50eXBlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdwbGFjZWhvbGRlcic6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnBsYWNlaG9sZGVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmlucHV0JzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQub25JbnB1dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGlzYWJsZWQnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAncmVhZG9ubHknOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5yZWFkT25seSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5jbGFzc1xuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwiaW5wdXRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyk7XG4gICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gZWxzZV9jbGF1c2UoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgndGV4dGFyZWEnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdwbGFjZWhvbGRlcic6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnBsYWNlaG9sZGVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmlucHV0JzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQub25JbnB1dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGlzYWJsZWQnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAncmVhZG9ubHknOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5yZWFkT25seSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAncm93cyc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnJvd3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQuY2xhc3NcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcImlucHV0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuaW5wdXQudmFsdWUpXSwgX19fdmlldyk7XG4gICAgICAgICAgICAgICAgfSksIF9fX3dtbC5kb21pZnkod21sXzEubWVzc2FnZShfX19jb250ZXh0LnZhbHVlcy5oZWxwLmlkLCBfX19jb250ZXh0LnZhbHVlcy5oZWxwKShfX192aWV3KSldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD10ZXh0LWZpZWxkLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xuZXhwb3J0cy5sYWJlbCA9IGZ1bmN0aW9uIChpZCwgdGV4dCkgeyByZXR1cm4gZnVuY3Rpb24gKF9fX3ZpZXcpIHsgcmV0dXJuIF9fX3dtbC5ub2RlKCdsYWJlbCcsIHtcbiAgICBodG1sOiB7XG4gICAgICAgICdmb3InOiBpZCxcbiAgICAgICAgJ2NsYXNzJzogXCJjb250cm9sLWxhYmVsXCJcbiAgICB9LFxuICAgIHdtbDoge31cbn0sIFtfX193bWwuZG9taWZ5KHRleHQpXSwgX19fdmlldyk7IH07IH07XG47XG5leHBvcnRzLm1lc3NhZ2UgPSBmdW5jdGlvbiAoaWQsIG0pIHsgcmV0dXJuIGZ1bmN0aW9uIChfX192aWV3KSB7IHJldHVybiBfX193bWwuaWZ0aGVuKG0uc3VjY2VzcywgZnVuY3Rpb24gdGhlbigpIHtcbiAgICByZXR1cm4gX19fd21sLm5vZGUoJ3NwYW4nLCB7XG4gICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICdjbGFzcyc6IFwiaGVscC10ZXh0XCJcbiAgICAgICAgfSxcbiAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAnaWQnOiBpZFxuICAgICAgICB9XG4gICAgfSwgW19fX3dtbC5kb21pZnkobS5zdWNjZXNzKV0sIF9fX3ZpZXcpO1xufSwgZnVuY3Rpb24gZWxzZWlmKCkge1xuICAgIHJldHVybiBfX193bWwuaWZ0aGVuKG0uZXJyb3IsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgIHJldHVybiBfX193bWwubm9kZSgnc3BhbicsIHtcbiAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAnY2xhc3MnOiBcImhlbHAtdGV4dFwiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgJ2lkJzogaWRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgW19fX3dtbC5kb21pZnkobS5lcnJvcildLCBfX192aWV3KTtcbiAgICB9LCBmdW5jdGlvbiBlbHNlaWYoKSB7XG4gICAgICAgIHJldHVybiBfX193bWwuaWZ0aGVuKG0ud2FybmluZywgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnc3BhbicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgIC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XMgaXMgYSBoYXNoIG9mIHZhbHVlcyB1c2VkIGluIHRoZSB0ZW1wbGF0ZVxuICAgICAgICAgKi9cbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICByb290OiAnYXNpZGUnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNsYXNzOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogbmFtZXMuQVNJREUsXG4gICAgICAgICAgICAgICAgY29udGVudDogbmFtZXMuQVNJREVfQ09OVEVOVFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgY29udGVudDogJ3d3OmNvbnRlbnQnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY29udGVudDogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmNvbnRlbnQpID8gX3RoaXMuYXR0cnMud3cuY29udGVudCA6IG51bGxcbiAgICAgICAgfTtcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyBhc2lkZV8xLk1haW4oX3RoaXMpO1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIEFzaWRlLnByb3RvdHlwZS5fZ2V0RHJhd2VyRE9NID0gZnVuY3Rpb24gKGYpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5yb290KS5jYXRhKGZ1bmN0aW9uICgpIHsgcmV0dXJuIG51bGw7IH0sIGYpO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogdmlzaWJsZSBxdWVyaWVzIHdoZXRoZXIgdGhlIERyYXdlciBpcyB2aXNpYmxlIG9yIG5vdC5cbiAgICAgKi9cbiAgICBBc2lkZS5wcm90b3R5cGUudmlzaWJsZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuICF0aGlzLl9nZXREcmF3ZXJET00oZnVuY3R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WV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZC5yb290XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLmNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLmNvbnRlbnQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy5jb250ZW50LnJlbmRlcigpKTtcbiAgICAgICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gZWxzZV9jbGF1c2UoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKTtcbiAgICAgICAgICAgICAgICAgICAgfSldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJM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gd2l0aCB0aGUgZmlyc3QgdHlwaWNhbGx5IHVzZWQgYXMgbmF2YWlnYXRpb25cbiAqIGFuZCB0aGUgc2Vjb25kIG1haW4gYXBwbGljYXRpb24gY29udGVudC5cbiAqXG4gKiBgYGB3bWxcbiAqXG4gKiAgPERyYXdlclxuICogICB3bWw6aWQ9XCJsYXlvdXRcIlxuICogICBjb250ZW50PXt7dGhpcy5nZXRDb250ZW50KCl9fSAvPlxuICpcbiAqIGBgYFxuICovXG52YXIgRHJhd2VyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhEcmF3ZXIsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gRHJhd2VyKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyBkcmF3ZXJfMS5NYWluKF90aGlzKTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIHZhbHVlcyBpcyBhIGhhc2ggb2YgdmFsdWVzIHVzZWQgaW4gdGhlIHRlbXBsYXRlLlxuICAgICAgICAgKi9cbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICByb290OiAnY29udGVudCcsXG4gICAgICAgICAgICAgICAgZHJhd2VyOiAnZHJhd2VyJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNsYXNzOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogbmFtZXMuRFJBV0VSLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgRFJBV0VSOiAnd3c6ZHJhd2VyJyxcbiAgICAgICAgICAgICAgICBDT05URU5UOiAnd3c6Y29udGVudCdcbiAgICAgICAgICAgIH0sXG4gICAgIC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ogX19fY29udGV4dC52YWx1ZXMuaWQucm9vdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEFzaWRlXzEuQXNpZGUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMuaWQuZHJhd2VyXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnY29udGVudCc6IF9fX2NvbnRleHQudmFsdWVzLmFzaWRlLmNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLmlmdGhlbihfX19jb250ZXh0LmNvbnRlbnQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY29udGVudCk7XG4gICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gZWxzZWlmKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmlmdGhlbihfX19jb250ZXh0LnZhbHVlcy5jb250ZW50LCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuY29udGVudC5yZW5kZXIoKSk7XG4gICAgICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pXSwgX19fdmlldyk7XG4gICAgIC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R0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cuY2xhc3MpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuY2xhc3MgOiAnJylcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gUm93O1xufSh3bWxfMS5Db21wb25lbnQpKTtcbmV4cG9ydHMuUm93ID0gUm93O1xudmFyIENvbHVtbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoQ29sdW1uLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIENvbHVtbigpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuQ29sdW1uKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICByb290OiBfdGhpcy5hdHRycy53dyA/IHV0aWxfMS5jb25jYXQoX3RoaXMuYXR0cnMud3cuc2l6ZSA/XG4gICAgICAgICAgICAgICAgICAgIFwiY29sLW1kLVwiICsgX3RoaXMuYXR0cnMud3cuc2l6ZSA6ICdjb2wtbWQtMTInLCBfdGhpcy5hdHRycy53dy5jbGFzcykgOiAnY29sLW1kLTEyJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBDb2x1bW47XG59KHdtbF8xLkNvbXBvbmVudCkpO1xuZXhwb3J0cy5Db2x1bW4gPSBDb2x1bW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1HcmlkLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZ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ICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdzZWN0aW9uJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbildLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gR3JpZDtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuR3JpZCA9IEdyaWQ7XG47XG52YXIgUm93ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhSb3csIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gUm93KGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBSb3c7XG59KF9fX3dtbC5BcHBW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LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbildLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1tYWluLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1x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IF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy52aWV3ID0gbmV3IHZpZXdzLlBhbmVsKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICByb290OiB1dGlsXzEuY29uY2F0KG5hbWVzLlBBTkVMLCBfdGhpcy5hdHRycy53dyA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LnN0eWxlIDogbmFtZXMuREVGQVVMVCwgX3RoaXMuYXR0cnMud3cgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5jbGFzcyA6ICcnKVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBQYW5lbDtcbn0od21sXzEuQ29tcG9uZW50KSk7XG5leHBvcnRzLlBhbmVsID0gUGFuZWw7XG52YXIgSGVhZGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhIZWFkZXIsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gSGVhZGVyKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5IZWFkZXIoX3RoaXMpO1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBjbGFzczoge1xuICAgICAgICAgICAgICAgIHJvb3Q6IHV0aWxfMS5jb25jYXQobmFtZXMuUEFORUxfSEVBREVSLCBfdGhpcy5hdHRycy53dyA/IF90aGlzLmF0dHJzLnd3LmNsYXNzIDogJycpXG4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Ttcbn0pKCk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG52YXIgUGFuZWwgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKFBhbmVsLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIFBhbmVsKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBQYW5lbDtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuUGFuZWwgPSBQYW5lbDtcbjtcbnZhciBIZWFkZXIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEhlYWRlciwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBIZWFkZXIoY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIEhlYWRlcjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuSGVhZGVyID0gSGVhZGVyO1xuO1xudmFyIEJvZHkgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEJvZHksIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gQm9keShjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbildLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gQm9keTtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuQm9keSA9IEJvZHk7XG47XG52YXIgRm9vdGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhGb290ZXIsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gRm9vdGVyKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBGb290ZXI7XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLkZvb3RlciA9IEZvb3Rlcjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXBhbmVsLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAg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1lbnUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1lbnUsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWVudSgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgbWVudV8xLk1haW4oX3RoaXMpO1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBpZDoge1xuICAgICAgICAgICAgICAgIHJvb3Q6ICdyb290JyxcbiAgICAgICAgICAgICAgICB0YXJnZXQ6ICdtZW51J1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNsYXNzOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogdXRpbF8xLmNvbmNhdChuYW1lcy5NRU5VLCAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cuY2xhc3MpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuY2xhc3MgOiAnJywgKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmhpZGRlbikgP1xuICAgICAgICAgICAgICAgICAgICBuYW1lcy5ISURERU4gOiAnJylcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjb250ZW50OiBfdGhpcy5jaGlsZHJlbixcbiAgICAgICAgICAgIGNsaWNrOiB7XG4gICAgICAgICAgICAgICAgaGlkZU9uQ2xpY2s6IChfdGhpcy5hdHRycy53dyAmJiAoX3RoaXMuYXR0cnMud3cuaGlkZU9uQ2xpY2sgIT0gbnVsbCkpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuaGlkZU9uQ2xpY2sgOiB0cnVlLFxuICAgICAgICAgICAgICAgIGhpZGVPbkV4dGVybmFsQ2xpY2s6IChfdGhpcy5hdHRycy53dyAmJiAoX3RoaXMuYXR0cnMud3cuaGlkZU9uRXh0ZXJuYWxDbGljayAhPSBudWxsKSkgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5oaWRlT25FeHRlcm5hbENsaWNrIDogdHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIC8qKlxuICAgICAqIGlzSGlkZGVuXG4gICAgICovXG4gICAgTWVudS5wcm90b3R5cGUuaXNIaWRkZW4gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnZpZXcuZmluZEJ5SWQodGhpcy52YWx1ZXMuaWQucm9vdClcbiAgICAgICAgICAgIC5jYXRhKGZ1bmN0aW9uICgpIHsgcmV0dXJuIGZhbHNlOyB9LCBmdW5jdGlvbiAoZSkgeyByZXR1cm4gZS5jbGFzc0xpc3QuY29udGFpbnMobmFtZXMuSElEREVOKTsgfSk7XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiBoaWRlIHRoZSBtZW51LlxuICAgICAqL1xuICAgIE1lbnUucHJvdG90eXBlLmhpZGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5yb290KVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgcmV0dXJuIGUuY2xhc3NMaXN0LmFkZChuYW1lcy5ISURERU4pO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiBzaG93IHRoaXMgbWVudS5cbiAgICAgKi9cbiAgICBNZW51LnByb3RvdHlwZS5zaG93ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLnZpZXcuZmluZEJ5SWQodGhpcy52YWx1ZXMuaWQucm9vdClcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgIHJldHVybiBlLmNsYXNzTGlzdC5yZW1vdmUobmFtZXMuSElEREVOKTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogdG9nZ2xlIHRoaXMgbWVudSdzIHZpc2liaWxpdHlcbiAgICAgKi9cbiAgICBNZW51LnByb3RvdHlwZS50b2dnbGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5yb290KVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgcmV0dXJuIGUuY2xhc3NMaXN0LnRvZ2dsZShuYW1lcy5ISURERU4pO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiBzZXRDb250ZW50IG9mIHRoaXMgbWVudS5cbiAgICAgKi9cbiAgICBNZW51LnByb3RvdHlwZS5zZXRDb250ZW50ID0gZnVuY3Rpb24gKHZpZXcpIHtcbiAgICAgICAgdGhpcy52YWx1ZXMuY29udGVudCA9IFt2aWV3LnJlbmRlcigpXTtcbiAgICAgICAgdGhpcy52aWV3LmludmFsaWRhdGUoKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICBNZW51LnByb3RvdHlwZS5oYW5kbGVFdmVudCA9IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHRoaXNcbiAgICAgICAgICAgIC52aWV3XG4gICAgICAgICAgICAuZmluZEJ5SWQodGhpcy52YWx1ZXMuaWQucm9vdClcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHJvb3QpIHtcbiAgICAgICAgICAgIGlmICghZG9jdW1lbnQuYm9keS5jb250YWlucyhyb290KSlcbiAgICAgICAgICAgICAgICBkb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WlyZShcIkBwYWNrYWdlL3NlbGYvY29tbW9uL25hbWVzXCIpO1xudmFyIHZpZXdzID0gcmVxdWlyZShcIi4vd21sL2J1dHRvbi1tZW51XCIpO1xudmFyIHV0aWxfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbW1vbi91dGlsXCIpO1xuLyoqXG4gKiBCdXR0b25NZW51XG4gKi9cbnZhciBCdXR0b25NZW51ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhCdXR0b25NZW51LCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEJ1dHRvbk1lbnUoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy52aWV3ID0gbmV3IHZpZXdzLk1haW4oX3RoaXMpO1xuICAgICAgICBfdGhpcy5fYnV0dG9uVGVtcGxhdGUgPSBfdGhpcy5hdHRycy53dy5idXR0b25UZW1wbGF0ZSA/XG4gICAgICAgICAgICBfdGhpcy5hdHRycy53dy5idXR0b25UZW1wbGF0ZSA6IHZpZXdzLmJ1dHRvbjtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICByb290OiAncm9vdCcsXG4gICAgICAgICAgICAgICAgdGFyZ2V0OiAnbWVudSdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb290OiB7XG4gICAgICAgICAgICAgICAgY2xhc3M6IHV0aWxfMS5jb25jYXQobmFtZXMuQlVUVE9OX01FTlUsIChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5jbGFzcykgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5jbGFzcyA6ICcnKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGJ1dHRvbjoge1xuICAgICAgICAgICAgICAgIHRleHQ6IF90aGlzLmF0dHJzLnd3LnRleHQgPyBfdGhpcy5hdHRycy53dy50ZXh0IDogJycsXG4gICAgICAgICAgICAgICAgdGVtcGxhdGU6IF90aGlzLl9idXR0b25UZW1wbGF0ZSxcbiAgICAgICAgICAgICAgICBjbGFzczogbmFtZXMuQlVUVE9OX01FTlVfQlVUVE9OLFxuICAgICAgICAgICAgICAgIG9uQ2xpY2s6IGZ1bmN0aW9uICgpIHsgX3RoaXMudmlldy5maW5kQnlJZChfdGhpcy52YWx1ZXMubWVudS5pZCkubWFwKGZ1bmN0aW9uIChtKSB7IHJldHVybiBtLnRvZ2dsZSgpOyB9KTsgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1lbnU6IHtcbiAgICAgICAgICAgICAgICBpZDogJ21lbnUnLFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IF90aGlzLmF0dHJzLnd3LmNvbnRlbnQgPyBfdGhpcy5hdHRycy53dy5jb250ZW50IDogX3RoaXMuY2hpbGRyZW5cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICAvKipcbiAgICAgKiBoaWRlIHRoZSBtZW51LlxuICAgICAqL1xuICAgIEJ1dHRvbk1lbnUucHJvdG90eXBlLmhpZGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5tZW51LmlkKVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAobSkgeyByZXR1cm4gbS5oaWRlKCk7IH0pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHNob3cgdGhlIG1lbnUuXG4gICAgICovXG4gICAgQnV0dG9uTWVudS5wcm90b3R5cGUuc2hvdyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy52aWV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XJuIGZ1bmN0aW9uIChfX192aWV3KSB7IHJldHVybiBfX193bWwubm9kZSgnYnV0dG9uJywge1xuICAgIGh0bWw6IHtcbiAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLmNsYXNzLFxuICAgICAgICAndHlwZSc6IFwiYnV0dG9uXCIsXG4gICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLm9uQ2xpY2tcbiAgICB9LFxuICAgIHdtbDoge31cbn0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLmJ1dHRvbi50ZXh0KV0sIF9fX3ZpZXcpOyB9OyB9OyB9O1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMucm9vdC5jbGFzc1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLnRlbXBsYXRlKCkoX19fY29udGV4dCkoX19fdmlldykpLCBfX193bWwud2lkZ2V0KE1lbnVfMS5NZW51LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3b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HRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnbGknLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmlmdGhlbihfX19jb250ZXh0LnZhbHVlcy50ZXh0LCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy50ZXh0KTtcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBlbHNlX2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cbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2xpJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdCxcbiAgICAgICAgICAgICAgICAgICAgJ29uY2xpY2snOiBfX19jb250ZXh0LnZhbHVlcy5jbGlja2VkXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmlmdGhlbihfX19jb250ZXh0LnZhbHVlcy50ZXh0LCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy50ZXh0KTtcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBlbHNlX2NsYXVzZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbik7XG4gICAgICAgICAgICAgICAgfSldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9yd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RleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIEJyZWFkQ3J1bWJzO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5CcmVhZENydW1icyA9IEJyZWFkQ3J1bWJzO1xuO1xudmFyIEl0ZW0gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEl0ZW0sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gSXRlbShjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnbGknLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBJdGVtO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5JdGVtID0gSXRlbTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJyZWFkY3J1bWJzLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0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yKSB7XG4gICAgX19leHRlbmRzKExpbmssIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTGluaygpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBuYW1lIGFzc2lnbmVkIHRvIHRoaXMgTGluay5cbiAgICAgICAgICovXG4gICAgICAgIF90aGlzLm5hbWUgPSAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cubmFtZSkgP1xuICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cubmFtZSA6ICcnO1xuICAgICAgICAvKipcbiAgICAgICAgICogdGl0bGUgYXNzaWduZWQgdG8gdGhpcyBMaW5rLlxuICAgICAgICAgKi9cbiAgICAgICAgX3RoaXMudGl0bGUgPSAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cudGl0bGUpID9cbiAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LnRpdGxlIDogJyc7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBocmVmIGFzc2lnbmVkIHRvIHRoaXMgbGlua1xuICAgICAgICAgKi9cbiAgICAgICAgX3RoaXMuaHJlZiA9IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5ocmVmKSA/XG4gICAgICAgICAgICBfdGhpcy5hdHRycy53dy5ocmVmIDogJyc7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIGlkOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogJ3Jvb3QnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICByb290OiB1dGlsXzEuY29uY2F0KG5hbWVzLk5BVl9MSU5LLCBfdGhpcy5hdHRycy53dyA/IF90aGlzLmF0dHJzLnd3LmNsYXNzIDogJycsIChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5hY3RpdmUpID9cbiAgICAgICAgICAgICAgICAgICAgbmFtZXMuQUNUSVZFIDogJycpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYToge1xuICAgICAgICAgICAgICAgIHRpdGxlOiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cudGl0bGUpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cudGl0bGUgOiBudWxsLFxuICAgICAgICAgICAgICAgIG5hbWU6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5uYW1lKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3Lm5hbWUgOiBudWxsLFxuICAgICAgICAgICAgICAgIGhyZWY6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5ocmVmKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmhyZWYgOiAnIycsXG4gICAgICAgICAgICAgICAgYWN0aXZlOiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cuYWN0aXZlKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHRleHQ6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy50ZXh0KSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LnRleHQgOiAnJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBfdGhpcy5jbGlja2VkID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgIGlmIChfdGhpcy5hdHRycy53dykge1xuICAgICAgICAgICAgICAgIHZhciBfYSA9IF90aGlzLmF0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gICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdhJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdCxcbiAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBfX19jb250ZXh0LnZhbHVlcy5hLmhyZWYsXG4gICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF9fX2NvbnRleHQudmFsdWVzLmEudGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5jbGlja2VkXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmlmdGhlbihfX19jb250ZXh0LnZhbHVlcy5hLnRleHQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLmEudGV4dCk7XG4gICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gZWxzZV9jbGF1c2UoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pO1xuICAgICAgICAgICAgICAgIH0pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bGluay5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgf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hc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoSGVhZGVyLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEhlYWRlcigpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIGl0ZW06IHtcbiAgICAgICAgICAgICAgICBjbGFzczogJydcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzcGFuOiB7XG4gICAgICAgICAgICAgICAgY2xhc3M6IHV0aWxfMS5jb25jYXQobmFtZXMuTkFWX01FTlVfSEVBREVSLCBfdGhpcy5hdHRycy53dyA/IF90aGlzLmF0dHJzLnd3LmNsYXNzIDogJycpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGV4dDogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LnRleHQpID9cbiAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy50ZXh0IDogbnVsbFxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBIZWFkZXI7XG59KHdtbC5Db21wb25lbnQpKTtcbmV4cG9ydHMuSGVhZGVyID0gSGVhZGVyO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9SGVhZGVyLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICh7IF9fcHJvdG9fXzogW10gfSBp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tcbiAgICBmdW5jdGlvbiBJdGVtKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5NYWluKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICByb290OiAncm9vdCdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjbGFzczoge1xuICAgICAgICAgICAgICAgIHJvb3Q6IHV0aWxfMS5jb25jYXQobmFtZXMuTkFWX01FTlVfSVRFTSwgKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSkgPyBuYW1lcy5BQ1RJVkUgOiBudWxsKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHRleHQ6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy50ZXh0KSA/XG4gICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cudGV4dCA6IG51bGxcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICAvKipcbiAgICAgKiBhY3RpdmF0ZSB0aGlzIG5hdiBsaXN0IEl0ZW0uXG4gICAgICovXG4gICAgSXRlbS5wcm90b3R5cGUuYWN0aXZhdGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5yb290KVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAodykge1xuICAgICAgICAgICAgdy5jbGFzc0xpc3QucmVtb3ZlKG5hbWVzLkFDVElWRSk7XG4gICAgICAgICAgICB3LmNsYXNzTGlzdC5hZGQobmFtZXMuQUNUSVZFKTtcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICAvKipc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bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTGluaywgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBMaW5rKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5NYWluKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHsgcm9vdDogJycgfSxcbiAgICAgICAgICAgIGNsYXNzOiB7IHJvb3Q6ICcnIH0sXG4gICAgICAgICAgICBpdGVtOiB7XG4gICAgICAgICAgICAgICAgY2xhc3M6IHV0aWxfMS5jb25jYXQobmFtZXMuTkFWX01FTlVfSVRFTSwgKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSkgPyBuYW1lcy5BQ1RJVkUgOiAnJylcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhOiB7XG4gICAgICAgICAgICAgICAgY2xhc3M6IHV0aWxfMS5jb25jYXQoKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSkgP1xuICAgICAgICAgICAgICAgICAgICBuYW1lcy5BQ1RJVkUgOiAnJyksXG4gICAgICAgICAgICAgICAgdGl0bGU6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy50aXRsZSkgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy50aXRsZSA6ICcnLFxuICAgICAgICAgICAgICAgIG5hbWU6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5uYW1lKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3Lm5hbWUgOiAnJyxcbiAgICAgICAgICAgICAgICBocmVmOiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cuaHJlZikgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5ocmVmIDogJyMnLFxuICAgICAgICAgICAgICAgIGFjdGl2ZTogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSkgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5hY3RpdmUgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB0ZXh0OiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cudGV4dCkgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy50ZXh0IDogJycsXG4gICAgICAgICAgICAgICAgb25DbGljazogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3Lm9uQ2xpY2spID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cub25DbGljayA6IG51bGxcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTGluaztcbn0obGluay5MaW5rKSk7XG5leHBvcnRzLkxpbmsgPSBMaW5rO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9TGluay5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIua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1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBJdGVtXzEgPSByZXF1aXJlKFwiLi4vSXRlbVwiKTtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChJdGVtXzEuSXRlbSwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuaXRlbS5jbGFzc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnc3BhbicsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuc3Bhbi5jbGFzc1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC5pZnRoZW4oX19fY29udGV4dC52YWx1ZXMudGV4dCwgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLnRleHQpO1xuICAg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HJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdsaScsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLnRleHQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLnRleHQpO1xuICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKTtcbiAgICAgICAgICAgICAgICB9KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpb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cyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChJdGVtXzEuSXRlbSwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuaXRlbS5jbGFzc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KGxpbmtfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuYS5jbGFzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogX19fY29udGV4dC52YWx1ZXMuYS5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogX19fY29udGV4dC52YWx1ZXMuYS50aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogX19fY29udGV4dC52YWx1ZXMuYS5ocmVmLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBfX19jb250ZXh0LnZhbHVlcy5hLnRleHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogX19fY29udGV4dC52YWx1ZXMuYS5hY3RpdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25D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gIGZ1bmN0aW9uIFRhYmxlKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMub3JpZ2luYWxEYXRhID0gX3RoaXMuYXR0cnMud3cuZGF0YTtcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3LlRhYmxlKF90aGlzKTtcbiAgICAgICAgX3RoaXMubW9kZWwgPSBfdGhpcy5hdHRycy53dy5tb2RlbCA/XG4gICAgICAgICAgICBfdGhpcy5hdHRycy53dy5tb2RlbCA6XG4gICAgICAgICAgICBuZXcgU29ydFRhYmxlTW9kZWwoX3RoaXMpO1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBpZDoge1xuICAgICAgICAgICAgICAgIHJvb3Q6ICdyb290JyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjbGFzczoge1xuICAgICAgICAgICAgICAgIHJvb3Q6IHV0aWxfMS5jb25jYXQobmFtZXMuVEFCTEUsIF90aGlzLmF0dHJzLnd3LmNsYXNzKSxcbiAgICAgICAgICAgICAgICByb3c6IF90aGlzLmF0dHJzLnd3LnJvd0NsYXNzIHx8ICcnLFxuICAgICAgICAgICAgICAgIGNlbGw6IF90aGlzLmF0dHJzLnd3LmNlbGxDbGFzcyB8fCAnJyxcbiAgICAgICAgICAgICAgICBoZWFkaW5nOiBfdGhpcy5hdHRycy53dy5oZWFkaW5nQ2xhc3MgfHwgJydcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBmcmFnbWVudDoge1xuICAgICAgICAgICAgICAgIGVtcHR5OiBfdGhpcy5hdHRycy53dy5lbXB0eVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9wdGlvbnM6IHtcbiAgICAgICAgICAgICAgICBzZWxlY3RhYmxlOiBfdGhpcy5hdHRycy53dy5zZWxlY3RhYmxl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dGlvbiBfbWFwKGZpZWxkKSB7XG4gICAgcmV0dXJuIF9fX3dtbC5pZnRoZW4oZmllbGQuc29ydEFzLCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ3RoJywge1xuICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICdjbGFzcyc6IHV0aWxfMS5jb25jYXQoX19fY29udGV4dC52YWx1ZXMuY2xhc3MuaGVhZGluZywgKChfX19jb250ZXh0LnZhbHVlcy5zb3J0ZWRPbiA9PT0gZmllbGQubmFtZSkpID8gbmFtZXMuQUNUSVZFIDogXCJcIiksXG4gICAgICAgICAgICAgICAgJ29uY2xpY2snOiBmdW5jdGlvbiAoKSB7IHJldHVybiBfX19jb250ZXh0Lm1vZGVsLmhlYWRpbmdDbGlja2VkKG5ldyBIZWFkaW5nQ2xpY2tlZEV2ZW50XzEuSGVhZGluZ0NsaWNrZWRFdmVudChmaWVsZC5uYW1lLCBmaWVsZCkpOyB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICB9LCBbX19fd21sLmRvbWlmeShmaWVsZC5oZWFkaW5nKSwgX19fd21sLmlmdGhlbigoX19fY29udGV4dC52YWx1ZXMuc29ydGVkT24gPT09IGZpZWxkLm5hbWUpLCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLmFycm93KTtcbiAgICAgICAgICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KFwiXCIpO1xuICAgICAgICAgICAgfSldLCBfX192aWV3KTtcbiAgICB9LCBmdW5jdGlvbiBlbHNlX2NsYXVzZSgpIHtcbiAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCd0aCcsIHtcbiAgICAgICAgICAgIGh0bWw6I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fX3dtbC5kb21pZnkoZXhwb3J0cy5hbGxTZWxlY3RlZENoZWNrYm94KCkoX19fY29udGV4dCkoX19fdmlldykpLCBfX193bWwuZG9taWZ5KGV4cG9ydHMuaGVhZGluZ3MoZmllbGRzKShfX19jb250ZXh0KShfX192aWV3KSkpO1xuICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShleHBvcnRzLmhlYWRpbmdzKGZpZWxkcykoX19fY29udGV4dCkoX19fdmlldykpO1xuICAgIH0pXSwgX19fdmlldyk7IH07IH07IH07XG47XG5leHBvcnRzLnJvd1NlbGVjdENoZWNrYm94ID0gZnVuY3Rpb24gKHJvdywgaW5kZXgsIGRhdGEpIHsgcmV0dXJuIGZ1bmN0aW9uIChfX19jb250ZXh0KSB7IHJldHVybiBmdW5jdGlvbiAoX19fdmlldykgeyByZXR1cm4gX19fd21sLmlmdGhlbihfX19jb250ZXh0LnZhbHVlcy5vcHRpb25zLnNlbGVjdGFibGUsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgcmV0dXJuIF9fX3dtbC5ub2RlKCd0ZCcsIHtcbiAgICAgICAgaHRtbDoge30sXG4gICAgICAgIHdtbDoge31cbiAgICB9LCBbX19fd21sLm5vZGUoJ2lucHV0Jywge1xuICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICd0eXBlJzogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgICdvbmNsaWNrJzogZnVuY3Rpb24gKCkgeyByZXR1cm4gX19fY29udGV4dC5tb2RlbC5yb3dTZWxlY3RlZChuZXcgUm93U2VsZWN0ZWRFdmVudF8xLlJvd1NlbGVjdGVkRXZlbnQocm93LCBpbmRleCwgZGF0YSkpOyB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KTtcbn0sIGZ1bmN0aW9uIGVs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Xhwb3J0cy5yb3dzKHJvdywgaW5kZXgsIGZpZWxkcykoX19fY29udGV4dCkoX19fdmlldykpO1xuICAgICAgICB9KV0sIF9fX3ZpZXcpO1xufSwgZnVuY3Rpb24gb3RoZXJ3aXNlKCkge1xuICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVEb2N1bWVudEZyYWdtZW50KCk7XG59KTsgfTsgfTsgfTtcbjtcbmV4cG9ydHMudGFibGUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBmdW5jdGlvbiAoX19fY29udGV4dCkgeyByZXR1cm4gZnVuY3Rpb24gKF9fX3ZpZXcpIHsgcmV0dXJuIF9fX3dtbC5ub2RlKCd0YWJsZScsIHtcbiAgICBodG1sOiB7XG4gICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICB9LFxuICAgIHdtbDoge1xuICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZC5yb290XG4gICAgfVxufSwgW19fX3dtbC5ub2RlKCd0aGVhZCcsIHtcbiAgICAgICAgaHRtbDoge30sXG4gICAgICAgIHdtbDoge1xuICAgICAgICAgICAgJ2lkJzogXCJoZWFkXCJcbiAgICAgICAgfVxuICAgIH0sIFtfX193bWwuZG9taWZ5KGV4cG9ydHMudGhlYWQoX19fY29udGV4dC52YWx1ZXMuZmllbGRzKShfX19jb250ZXh0KShfX192aWV3KSldLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3Rib2R5Jywge1xuICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAnaWQnOiBcImJvZHlcIlxuICAgICAgICB9XG4gICAgfSwgW19fX3dtbC5kb21pZnkoZXhwb3J0cy50Ym9keShfX19jb250ZXh0LnZhbHVlcy5kYXRhLCBfX19jb250ZXh0LnZhbHVlcy5maWVsZHMpKF9fX2NvbnRleHQpKF9fX3ZpZXcpKV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7IH07IH07IH07XG47XG52YXIgVGFibGUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKFRhYmxlLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIFRhYmxlKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoRnJhZ21lbnRfMS5GcmFnbWVudCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuaWZ0aGVuKChfX19jb250ZXh0LnZhbHVlcy5kYXRhLmxlbmd0aCA9PT0gMCksIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLmZyYWdtZW50LmVtcHR5LCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuZnJhZ21lbnQuZW1wdHkucmVuZGVyKCkpO1xuICAgICAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBlbHNlX2NsYXVzZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KGV4cG9ydHMudGFibGUoKShfX19jb250ZXh0KShfX192aWV3KSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShleHB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hhbmR5IHdoZW4geW91IGFyZSBnb2luZyB0byBkbyBhZHZhbmNlZCB0aGluZ3MgdG8gdGhlIHBhcnNlclxuICogICAgICAgICAgICAgICAgIHN0YWNrcywgYWxsIG9mIHdoaWNoIGFyZSBhY2Nlc3NpYmxlIGZyb20geW91ciBhY3Rpb24gY29kZSAoc2VlIHRoZSBuZXh0IGVudHJpZXMgYmVsb3cpLlxuICpcbiAqICAgICAgICAgICAgICAgLSBgeXl2c3RhY2tgOiByZWZlcmVuY2UgdG8gdGhlIHBhcnNlciB2YWx1ZSBzdGFjay4gQWxzbyBhY2Nlc3NlZCB2aWEgdGhlIGAkMWAgZXRjLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cnVjdHMuXG4gKlxuICogICAgICAgICAgICAgICAtIGB5eWxzdGFja2A6IHJlZmVyZW5jZSB0byB0aGUgcGFyc2VyIHRva2VuIGxvY2F0aW9uIHN0YWNrLiBBbHNvIGFjY2Vzc2VkIHZpYVxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBgQDFgIGV0Yy4gY29uc3RydWN0cy5cbiAqXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV0FSTklORzogc2luY2Ugamlzb24gMC40LjE4LTE4NiB0aGlzIGFycmF5IE1BWSBjb250YWluIHNsb3RzIHdoaWNoIGFyZVxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVOREVGSU5FRCByYXRoZXIgdGhhbiBhbiBlbXB0eSAobG9jYXRpb24pIG9iamVjdCwgd2hlbiB0aGUgbGV4ZXIvcGFyc2VyXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uIGNvZGUgZGlkIG5vdCBwcm92aWRlIGEgc3VpdGFibGUgbG9jYXRpb24gaW5mbyBvYmplY3Qgd2hlbiBzdWNoIGFcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbG90IHdhcyBmaWxsZWQhXG4gKlxuICogICAgICAgICAg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Xg6ICBmdW5jdGlvbigpXG4gKiAgICAgICAgICAgICAgICAgb3B0aW9uYWw6IGlzIGludm9rZWQgYmVmb3JlIHRoZSBsZXhlciBpcyBpbnZva2VkIHRvIHByb2R1Y2UgYW5vdGhlciB0b2tlbi5cbiAqICAgICAgICAgICAgICAgICBgdGhpc2AgcmVmZXJzIHRvIHRoZSBMZXhlciBvYmplY3QuXG4gKiAgICAgIHBvc3RfbGV4OiBmdW5jdGlvbih0b2tlbikgeyByZXR1cm4gdG9rZW47IH1cbiAqICAgICAgICAgICAgICAgICBvcHRpb25hbDogaXMgaW52b2tlZCB3aGVuIHRoZSBsZXhlciBoYXMgcHJvZHVjZWQgYSB0b2tlbiBgdG9rZW5gO1xuICogICAgICAgICAgICAgICAgIHRoaXMgZnVuY3Rpb24gY2FuIG92ZXJyaWRlIHRoZSByZXR1cm5lZCB0b2tlbiB2YWx1ZSBieSByZXR1cm5pbmcgYW5vdGhlci5cbiAqICAgICAgICAgICAgICAgICBXaGVuIGl0IGRvZXMgbm90IHJldHVybiBhbnkgKHRydXRoeSkgdmFsdWUsIHRoZSBsZXhlciB3aWxsIHJldHVyblxuICogICAgICAgICAgICAgICAgIHRoZSBvcmlnaW5hbCBgdG9rZW5gLlxuICogICAgICAgICAgICAgICAgIGB0aGlzYCByZWZlcnMgdG8gdGhlIExleGVyIG9iamVjdC5cbiAqXG4gKiAgICAgIHJhbmdlczogYm9vbGVhblxuICogICAgICAgICAgICAgICAgIG9wdGlvbmFsOiBgdHJ1ZWAgPT0+IHRva2VuIGxvY2F0aW9uIGluZm8gd2lsbCBpbmNsdWRlIGEgLnJhbmdlW10gbWVtYmVyLlxuICogICAgICBmbGV4OiBib29sZWFuXG4gKiAgICAgICAgICAgICAgICAgb3B0aW9uYWw6IGB0cnVlYCA9PT4gZmxleC1saWtlIGxleGluZyBiZWhhdmlvdXIgd2hlcmUgdGhlIHJ1bGVzIGFyZSB0ZXN0ZWRcbiAqICAgICAgICAgICAgICAgICBleGhhdXN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gICAgICAgICAgRXJyb3IuY2FwdHVyZVN0YWNrVHJhY2UodGhpcywgdGhpcy5jb25zdHJ1Y3Rvcik7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzdGFja3RyYWNlID0gKG5ldyBFcnJvcihtc2cpKS5zdGFjaztcbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAoc3RhY2t0cmFjZSkge1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGhpcywgJ3N0YWNrJywge1xuICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICB3cml0YWJsZTogZmFsc2UsXG4gICAgICAgICAgICB2YWx1ZTogc3RhY2t0cmFjZVxuICAgICAgICB9KTtcbiAgICB9XG59XG5cbmlmICh0eXBlb2YgT2JqZWN0LnNldFByb3RvdHlwZU9mID09PSAnZnVuY3Rpb24nKSB7XG4gICAgT2JqZWN0LnNldFByb3RvdHlwZU9mKEppc29uUGFyc2VyRXJyb3IucHJvdG90eXBlLCBFcnJvci5wcm90b3R5cGUpO1xufSBlbHNlIHtcbiAgICBKaXNvblBhcnNlckVycm9yLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoRXJyb3IucHJvdG90eXBlKTtcbn1cbkppc29uUGFyc2VyRXJyb3IucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gSmlzb25QYXJzZXJFcnJvcjtcbkppc29uUGFyc2VyRXJyb3IucHJvdG90eXBlLm5hbWUgPSAnSmlzb25QYXJzZXJFcnJvcic7XG5cblxuXG4gICAgICAgIC8vIGhlbHBlcjogcmVjb25zdHJ1Y3QgdGhlIHByb2R1Y3Rpb25zW10gdGFibGVcbiAgICAgICAgZnVuY3Rpb24gYnAocykge1xuICAgICAgICAgICAgdmFyIHJ2ID0gW107XG4gICAgICAgICAgICB2YXIgcCA9IHMucG9wO1xuICAgICAgICAgICAgdmFyIHIgPSBzLnJ1bGU7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IHAubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgcnYucHVzaChbXG4gICAgICAgICAgICAgICAgICAgIHBbaV0sXG4gICAgICAgICAgICAgICAgICAgIHJbaV1cbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBydjtcbiAgICAgICAgfVxuICAgIFxuXG5cbiAgICAgICAgLy8gaGVscGVyOiByZWNvbnN0cnVjdCB0aGUgZGVmYXVsdEFjdGlvbnNbXSB0YWJsZVxuICAgICAgICBmdW5jdGlvbiBiZGEocykge1xuICAgICAgICAgICAgdmFyIHJ2ID0ge307XG4gICAgICAgICAgICB2YXIgZCA9IHMuaWR4O1xuICAgICAgICAgICAgdmFyIGcgPSBzLmdvdG87XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IGQubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGogPSBkW2ldO1xuICAgICAgICAgICAgICAgIHJ2W2pdID0gZ1tpXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBydjtcbiAgICAgICAgfVxuICAgIFxuXG5cbiAgICAgICAgLy8gaGVscGVyOiByZWNvbnN0cnVjdCB0aGUgJ2dvdG8nIHRhYmxlXG4gICAgICAgIGZ1bmN0aW9uIGJ0KHMpIHtcbiAgICAgICAgICAgIHZhciBydiA9IFtdO1xuICAgICAgICAgICAgdmFyIGQgPSBzLmxlbjtcbiAgICAgICAgICAgIHZhciB5ID0gcy5zeW1ib2w7XG4gICAgICAgICAgICB2YXIgdCA9IHMudHlwZTtcbiAgICAgICAgICAgIHZhciBhID0gcy5zdGF0ZTtcbiAgICAgICAgICAgIHZhciBtID0gcy5tb2RlO1xuICAgICAgICAgICAgdmFyIGcgPSBzLmdvdG87XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IGQubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIG4gPSBkW2ldO1xuICAgICAgICAgICAgICAgIHZhciBxID0ge307XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBuOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHogPSB5LnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodC5zaGlmdCgpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHFbel0gPSBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbS5zaGlmdCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcuc2hpZnQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHFbel0gPSBhLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdHlwZSA9PT0gMTogYWNjZXB0XG4gICAgICAgICAgICAgICAgICAgICAgICBxW3pdID0gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDNcbiAgICAgICAgICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcnYucHVzaChxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBydjtcbiAgICAgICAgfVxuICAgIFxuXG5cbiAgICAgICAgLy8gaGVscGVyOiBydW5sZW5ndGggZW5jb2Rpbmcgd2l0aCBpbmNyZW1lbnQgc3RlcDogY29kZSwgbGVuZ3RoOiBzdGVwIChkZWZhdWx0IHN0ZXAgPSAwKVxuICAgICAgICAvLyBgdGhpc2AgcmVmZXJlbmNlcyBhbiBhcnJheVxuICAgICAgICBmdW5jdGlvbiBzKGMsIGwsIGEpIHtcbiAgICAgICAgICAgIGEgPSBhIHx8IDA7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgICAgIHRoaXMucHVzaChjKTtcbiAgICAgICAgICAgICAgICBjICs9IGE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBoZWxwZXI6IGR1cGxpY2F0ZSBzZXF1ZW5jZSBmcm9tICpyZWxhdGl2ZSogb2Zmc2V0IGFuZCBsZW5ndGguXG4gICAgICAgIC8vIGB0aGlzYCByZWZlcmVuY2VzIGFuIGFycmF5XG4gICAgICAgIGZ1bmN0aW9uIGMoaSwgbCkge1xuICAgICAgICAgICAgaSA9IHRoaXMubGVuZ3RoIC0gaTtcbiAgICAgICAgICAgIGZvciAobCArPSBpOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wdXNoKHRoaXNbaV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gaGVscGVyOiB1bnBhY2sgYW4gYXJyYXkgdXNpbmcgaGVscGVycyBhbmQgZGF0YSwgYWxsIHBhc3NlZCBpbiBhbiBhcnJheSBhcmd1bWVudCAnYScuXG4gICAgICAgIGZ1bmN0aW9uIHUoYSkge1xuICAgICAgICAgICAgdmFyIHJ2ID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IGEubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGUgPSBhW2ldO1xuICAgICAgICAgICAgICAgIC8vIElzIHRoaXMgZW50cnkgYSBoZWxwZXIgZnVuY3Rpb24/XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICA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gICAvLyByYXRoZXIgdGhhbiBhIHNpbXBsZSBzdHJpbmcvdmFsdWUuXG4gICAgZnVuY3Rpb24gc2hhbGxvd19jb3B5KHNyYykge1xuICAgICAgICBpZiAodHlwZW9mIHNyYyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgIHZhciBkc3QgPSB7fTtcbiAgICAgICAgICAgIGZvciAodmFyIGsgaW4gc3JjKSB7XG4gICAgICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChzcmMsIGspKSB7XG4gICAgICAgICAgICAgICAgICAgIGRzdFtrXSA9IHNyY1trXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZHN0O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBzcmM7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHNoYWxsb3dfY29weV9ub2Nsb2JiZXIoZHN0LCBzcmMpIHtcbiAgICAgICAgZm9yICh2YXIgayBpbiBzcmMpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgZHN0W2tdID09PSAndW5kZWZpbmVkJyAmJiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc3JjLCBrKSkge1xuICAgICAgICAgICAgICAgIGRzdFtrXSA9IHNyY1trXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBjb3B5X3l5bGxvYyhsb2MpIHtcbiAgICAgICAgdmFyIHJ2ID0gc2hhbGxvd19jb3B5KGxvYyk7XG4gICAgICAgIGlmIChydiAmJiBydi5yYW5nZSkge1xuICAgICAgICAgICAgcnYucmFuZ2UgPSBydi5yYW5nZS5zbGljZSgwKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcnY7XG4gICAgfVxuXG4gICAgLy8gY29weSBzdGF0ZVxuICAgIHNoYWxsb3dfY29weV9ub2Nsb2JiZXIoc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4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWwyKSB7XG4gICAgICAgICAgICBpZiAobGFzdF9pbmRleCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IGkyOyBpID49IGkxOyBpLS0pIHtcbiAgICAgICAgICAgICAgICAgICAgbDIgPSBsc3RhY2tbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChsMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyAtIGRldGVjdCBpZiBhbiBlcHNpbG9uIHJ1bGUgaXMgYmVpbmcgcHJvY2Vzc2VkIGFuZCBhY3QgYWNjb3JkaW5nbHk6XG4gICAgICAgIGlmICghbDEgJiYgZmlyc3RfaW5kZXggPT0gbnVsbCkge1xuICAgICAgICAgICAgLy8gZXBzaWxvbiBydWxlIHNwYW4gbWVyZ2VyLiBXaXRoIG9wdGlvbmFsIGxvb2stYWhlYWQgaW4gbDIuXG4gICAgICAgICAgICBpZiAoIWRvbnRfbG9va19iYWNrKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IChpMSB8fCBzcCkgLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgICAgICAgICBsMSA9IGxzdGFja1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGwxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghbDEpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWwyKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHdoZW4gd2Ugc3RpbGwgZG9uJ3QgaGF2ZSBhbnkgdmFsaWQgeXlsbG9jIGluZm8sIHdlJ3JlIGxvb2tpbmcgYXQgYW4gZXBzaWxvbiBydWxlXG4gICAgICAgICAgICAgICAgICAgIC8vIHdpdGhvdXQgbG9vay1haGVhZCBhbmQgbm8gcHJlY2VkaW5nIHRlcm1zIGFuZC9vciBgZG9udF9sb29rX2JhY2tgIHNldDpcbiAgICAgICAgICAgICAgICAgICAgLy8gaW4gdGhhdCBjYXNlIHdlIGNhIGRvIG5vdGhpbmcgYnV0IHJldHVybiBOVUxML1VOREVGSU5FRDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBzaGFsbG93LWNvcHkgTDI6IGFmdGVyIGFsbCwgd2UgTUFZIGJlIGxvb2tpbmdcbiAgICAgICAgICAgICAgICAgICAgLy8gYXQgdW5jb252ZW50aW9uYWwgeXlsbG9jIGluZm8gb2JqZWN0cy4uLlxuICAgICAgICAgICAgICAgICAgICBydiA9IHNoYWxsb3dfY29weShsMik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChydi5yYW5nZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hhbGxvdyBjb3B5IHRoZSB5eWxsb2MgcmFuZ2VzIGluZm8gdG8gcHJldmVudCB1cyBmcm9tIG1vZGlmeWluZyB0aGUgb3JpZ2luYWwgYXJndW1lbnRzJyBlbnRyaWVzOlxuICAgICAgICAgICAgICAgICAgICAgICAgcnYucmFuZ2UgPSBydi5yYW5nZS5zbGljZSgwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcnY7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBzaGFsbG93LWNvcHkgTDEsIHRoZW4gYWRqdXN0IGZpcnN0IGNvbC9yb3cgMSBjb2x1bW4gcGFzdCB0aGUgZW5kLlxuICAgICAgICAgICAgICAgIHJ2ID0gc2hhbGxvd19jb3B5KGwxKTtcbiAgICAgICAgICAgICAgICBydi5maXJzdF9saW5lID0gcnYubGFzdF9saW5lO1xuICAgICAgICAgICAgICAgIHJ2LmZpcnN0X2NvbHVtbiA9IHJ2Lmxhc3RfY29sdW1uO1xuICAgICAgICAgICAgICAgIGlmIChydi5yYW5nZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBzaGFsbG93IGNvcHkgdGhlIHl5bGxvYyByYW5nZXMgaW5mbyB0byBwcmV2ZW50IHVzIGZyb20gbW9kaWZ5aW5nIHRoZSBvcmlnaW5hbCBhcmd1bWVudHMnIGVudHJpZXM6XG4gICAgICAgICAgICAgICAgICAgIHJ2LnJhbmdlID0gcnYucmFuZ2Uuc2xpY2UoMCk7XG4gICAgICAgICAgICAgICAgICAgIHJ2LnJhbmdlWzBdID0gcnYucmFuZ2VbMV07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGwyKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHNoYWxsb3ctbWl4aW4gTDIsIHRoZW4gYWRqdXN0IGxhc3QgY29sL3JvdyBhY2NvcmRpbmdseS5cbiAgICAgICAgICAgICAgICAgICAgc2hhbGxvd19jb3B5X25vY2xvYmJlcihydiwgbDIpO1xuICAgICAgICAgICAgICAgICAgICBydi5sYXN0X2xpbmUgPSBsMi5sYXN0X2xpbmU7XG4gICAgICAgICAgICAgICAgICAgIHJ2Lmxhc3RfY29sdW1uID0gbDIubGFzdF9jb2x1bW47XG4gICAgICAgICAgICAgICAgICAgIGlmIChydi5yYW5nZSAmJiBsMi5yYW5nZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcnYucmFuZ2VbMV0gPSBsMi5yYW5nZVsxXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcnY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWwxKSB7XG4gICAgICAgICAgICBsMSA9IGwyO1xuICAgICAgICAgICAgbDIgPSBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGlmICghbDEpIHtcbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzaGFsbG93LWNvcHkgTDF8TDIsIGJlZm9yZSB3ZSB0cnkgdG8gYWRqdXN0IHRoZSB5eWxsb2MgdmFsdWVzOiBhZnRlciBhbGwsIHdlIE1BWSBiZSBsb29raW5nXG4gICAgICAgIC8vIGF0IHVuY29udmVudGlvbmFsIHl5bGxvYyBpbmZvIG9iamVjdHMuLi5cbiAgICAgICAgcnYgPSBzaGFsbG93X2NvcHkobDEpO1xuXG4gICAgICAgIC8vIGZpcnN0X2xpbmU6IC4uLixcbiAgICAgICAgLy8gZmlyc3RfY29sdW1uOiAuLi4sXG4gICAgICAgIC8vIGxhc3RfbGluZTogLi4uLFxuICAgICAgICAvLyBsYXN0X2NvbHVtbjogLi4uLFxuICAgICAgICBpZiAocnYucmFuZ2UpIHtcbiAgICAgICAgICAgIC8vIHNoYWxsb3cgY29weSB0aGUgeXlsbG9jIHJhbmdlcyBpbmZvIHRvIHByZXZlbnQgdXMgZnJvbSBtb2RpZnlpbmcgdGhlIG9yaWdpbmFsIGFyZ3VtZW50cycgZW50cmllczpcbiAgICAgICAgICAgIHJ2LnJhbmdlID0gcnYucmFuZ2Uuc2xpY2UoMCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobDIpIHtcbiAgICAgICAgICAgIHNoYWxsb3dfY29weV9ub2Nsb2JiZXIocnYsIGwyKTtcbiAgICAgICAgICAgIHJ2Lmxhc3RfbGluZSA9IGwyLmxhc3RfbGluZTtcbiAgICAgICAgICAgIHJ2Lmxhc3RfY29sdW1uID0gbDIubGFzdF9jb2x1bW47XG4gICAgICA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dFBhcnNlRXJyb3JJbmZvKCkge1xuICAgICAgICAgICAgICAgIC8vIHJlbW92ZSBjeWNsaWMgcmVmZXJlbmNlcyBhZGRlZCB0byBlcnJvciBpbmZvOlxuICAgICAgICAgICAgICAgIC8vIGluZm8ueXkgPSBudWxsO1xuICAgICAgICAgICAgICAgIC8vIGluZm8ubGV4ZXIgPSBudWxsO1xuICAgICAgICAgICAgICAgIC8vIGluZm8udmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgICAgIC8vIGluZm8udmFsdWVfc3RhY2sgPSBudWxsO1xuICAgICAgICAgICAgICAgIC8vIC4uLlxuICAgICAgICAgICAgICAgIHZhciByZWMgPSAhIXRoaXMucmVjb3ZlcmFibGU7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIHRoaXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaGFzT3duUHJvcGVydHkoa2V5KSAmJiB0eXBlb2Yga2V5ID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1trZXldID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMucmVjb3ZlcmFibGUgPSByZWM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIC8vIHRyYWNrIHRoaXMgaW5zdGFuY2Ugc28gd2UgY2FuIGBkZXN0cm95KClgIGl0IG9uY2Ugd2UgZGVlbSBpdCBzdXBlcmZsdW91cyBhbmQgcmVhZHkgZm9yIGdhcmJhZ2UgY29sbGVjdGlvbiFcbiAgICAgICAgdGhpcy5fX2Vycm9yX2luZm9zLnB1c2gocGVpKTtcbiAgICAgICAgcmV0dXJuIHBlaTtcbiAgICB9O1xuXG5cblxuXG5cblxuXG5cblxuXG5cblxuXG4gICAgZnVuY3Rpb24gZ2V0Tm9uVGVybWluYWxGcm9tQ29kZShzeW1ib2wpIHtcbiAgICA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gICAgaWYgKHN5bWJvbCA9PT0gbnVsbCB8fCB0eXBlb2Ygc3ltYm9sID09PSAndW5kZWZpbmVkJykgLi4uXG4gICAgICAgICAgICAgICAgaWYgKCFzeW1ib2wpIHtcbiAgICAgICAgICAgICAgICAgICAgc3ltYm9sID0gbGV4KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHJlYWQgYWN0aW9uIGZvciBjdXJyZW50IHN0YXRlIGFuZCBmaXJzdCBpbnB1dFxuICAgICAgICAgICAgICAgIHQgPSAodGFibGVbc3RhdGVdICYmIHRhYmxlW3N0YXRlXVtzeW1ib2xdKSB8fCBOT19BQ1RJT047XG4gICAgICAgICAgICAgICAgbmV3U3RhdGUgPSB0WzFdO1xuICAgICAgICAgICAgICAgIGFjdGlvbiA9IHRbMF07XG5cblxuXG5cblxuXG5cblxuXG5cblxuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBwYXJzZSBlcnJvclxuICAgICAgICAgICAgICAgIGlmICghYWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBlcnJTdHI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBlcnJTeW1ib2xEZXNjciA9ICh0aGlzLmRlc2NyaWJlU3ltYm9sKHN5bWJvbCkgfHwgc3ltYm9sKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cGVjdGVkID0gdGhpcy5jb2xsZWN0X2V4cGVjdGVkX3Rva2VuX3NldChzdGF0ZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gUmVwb3J0IGVycm9yXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbGV4ZXIueXlsaW5lbm8gPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJTdHIgPSAnUGFyc2UgZXJyb3Igb24gbGluZSAnICsgKGxleGVyLnl5bGluZW5vICsgMSkgKyAnOiAnO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXJyU3RyID0gJ1BhcnNlIGVycm9yOiAnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbGV4ZXIuc2hvd1Bvc2l0aW9uID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJTdHIgKz0gJ1xcbicgKyBsZXhlci5zaG93UG9zaXRpb24oNzkgLSAxMCwgMTApICsgJ1xcbic7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4cGVjdGVkLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXJyU3RyICs9ICdFeHBlY3RpbmcgJyArIGV4cGVjdGVkLmpvaW4oJywgJykgKyAnLCBnb3QgdW5leHBlY3RlZCAnICsgZXJyU3ltYm9sRGVzY3I7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJTdHIgKz0gJ1VuZXhwZWN0ZWQgJyArIGVyclN5bWJvbERlc2NyO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIHdlIGNhbm5vdCByZWNvdmVyIGZyb20gdGhlIGVycm9yIVxuICAgICAgICAgICAgICAgICAgICBwID0gdGhpcy5jb25zdHJ1Y3RQYXJzZUVycm9ySW5mbyhlcnJTdHIsIG51bGwsIGV4cGVjdGVkLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHZhbCA9IHRoaXMucGFyc2VFcnJvcihwLmVyclN0ciwgcCwgdGhpcy5KaXNvblBhcnNlckVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG5cbiAgICAgICAgICAgIH1cblxuXG5cblxuXG5cblxuXG5cblxuICAgICAgICAgICAgc3dpdGNoIChhY3Rpb24pIHtcbiAgICAgICA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R1Y3Rpb25bMV07XG5cblxuXG5cblxuXG5cblxuXG5cbiAgICAgICAgICAgICAgICByID0gdGhpcy5wZXJmb3JtQWN0aW9uLmNhbGwoeXl2YWwsIHl5bG9jLCBuZXdTdGF0ZSwgc3AgLSAxLCB2c3RhY2ssIGxzdGFjayk7XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHIgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHZhbCA9IHI7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIHBvcCBvZmYgc3RhY2tcbiAgICAgICAgICAgICAgICBzcCAtPSB5eXJ1bGVsZW47XG5cbiAgICAgICAgICAgICAgICAvLyBkb24ndCBvdmVyd3JpdGUgdGhlIGBzeW1ib2xgIHZhcmlhYmxlOiB1c2UgYSBsb2NhbCB2YXIgdG8gc3BlZWQgdGhpbmdzIHVwOlxuICAgICAgICAgICAgICAgIHZhciBudHN5bWJvbCA9IHRoaXNfcHJvZHVjdGlvblswXTsgICAgLy8gcHVzaCBub250ZXJtaW5hbCAocmVkdWNlKVxuICAgICAgICAgICAgICAgIHN0YWNrW3NwXSA9IG50c3ltYm9sO1xuICAgICAgICAgICAgICAgIHZzdGFja1tzcF0gPSB5eXZhbC4kO1xuICAgICAgICAgICAgICAgIGxzdGFja1tzcF0gPSB5eXZhbC5fJDtcbiAgICAgICAgICAgICAgICAvLyBnb3RvIG5ldyBzdGF0ZSA9IHRhYmxlW1NUQVRFXVtOT05URVJNSU5BTF1cbiAgICAgICAgICAgICAgICBuZXdTdGF0ZSA9IHRhYmxlW3NzdGFja1tzcCAtIDFdXVtudHN5bWJvbF07XG4gICAgICAgICAgICAgICAgc3N0YWNrW3NwXSA9IG5ld1N0YXRlO1xuICAgICAgICAgICAgICAgICsrc3A7XG5cblxuXG5cblxuXG5cblxuXG4gICAgICAgICAgICAgICAgY29udGludWU7XG5cbiAgICAgICAgICAgIC8vIGFjY2VwdDpcbiAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICByZXR2YWwgPSB0cnVlO1xuICAgICAgICAgICAgICAgIC8vIFJldHVybiB0aGUgYCRhY2NlcHRgIHJ1bGUncyBgJCRgIHJlc3VsdCwgaWYgYXZhaWxhYmxlLlxuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gQWxzbyBub3RlIHRoYXQgSklTT04gYWx3YXlzIGFkZHMgdGhpcyB0b3AtbW9zdCBgJGFjY2VwdGAgcnVsZSAod2l0aCBpbXBsaWNpdCxcbiAgICAgICAgICAgICAgICAvLyBkZWZhdWx0LCBhY3Rpb24pOlxuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gICAgICRhY2NlcHQ6IDxzdGFydFN5bWJvbD4gJGVuZFxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgJXsgJCQgPSAkMTsgQCQgPSBAMTsgJX1cbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIC8vIHdoaWNoLCBjb21iaW5lZCB3aXRoIHRoZSBwYXJzZSBrZXJuZWwncyBgJGFjY2VwdGAgc3RhdGUgYmVoYXZpb3VyIGNvZGVkIGJlbG93LFxuICAgICAgICAgICAgICAgIC8vIHdpbGwgcHJvZHVjZSB0aGUgYCQkYCB2YWx1ZSBvdXRwdXQgb2YgdGhlIDxzdGFydFN5bWJvbD4gcnVsZSBhcyB0aGUgcGFyc2UgcmVzdWx0LFxuICAgICAgICAgICAgICAgIC8vIElGRiB0aGF0IHJlc3VsdCBpcyAqbm90KiBgdW5kZWZpbmVkYC4gKFNlZSBhbHNvIHRoZSBwYXJzZXIga2VybmVsIGNvZGUuKVxuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gSW4gY29kZTpcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgJXtcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICBAJCA9IEAxOyAgICAgICAgICAgIC8vIGlmIGxvY2F0aW9uIHRyYWNraW5nIHN1cHBvcnQgaXMgaW5jbHVkZWRcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mICQxICE9PSAndW5kZWZpbmVkJylcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQxO1xuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7ICAgICAgICAgICAvLyB0aGUgZGVmYXVsdCBwYXJzZSByZXN1bHQgaWYgdGhlIHJ1bGUgYWN0aW9ucyBkb24ndCBwcm9kdWNlIGFueXRoaW5nXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAlfVxuICAgICAgICAgICAgICAgIHNwLS07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2c3RhY2tbc3BdICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgICByZXR2YWwgPSB2c3RhY2tbc3BdO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBicmVhayBvdXQgb2YgbG9vcDogd2UgYWNjZXB0IG9yIGZhaWwgd2l0aCBlcnJvclxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9IGNhdGNoIChleCkge1xuICAgICAgICAvLyByZXBvcnQgZXhjZXB0aW9ucyB0aHJvdWdoIHRoZSBwYXJzZUVycm9yIGNhbGxiYWNrIHRvbywgYnV0IGtlZXAgdGhlIGV4Y2VwdGlvbiBpbnRhY3RcbiAgICAgICAgLy8gaWYga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G4gICAgICAgICAqIFxuICAgICAgICAgKiBAcHVibGljXG4gICAgICAgICAqIEB0aGlzIHtMZXhFcnJvckluZm99XG4gICAgICAgICAqL1xuICAgICAgICBkZXN0cm95OiBmdW5jdGlvbiBkZXN0cnVjdExleEVycm9ySW5mbygpIHtcbiAgICAgICAgICAvLyByZW1vdmUgY3ljbGljIHJlZmVyZW5jZXMgYWRkZWQgdG8gZXJyb3IgaW5mbzpcbiAgICAgICAgICAvLyBpbmZvLnl5ID0gbnVsbDtcbiAgICAgICAgICAvLyBpbmZvLmxleGVyID0gbnVsbDtcbiAgICAgICAgICAvLyAuLi5cbiAgICAgICAgICB2YXIgcmVjID0gISF0aGlzLnJlY292ZXJhYmxlO1xuXG4gICAgICAgICAgZm9yICh2YXIga2V5IGluIHRoaXMpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmhhc093blByb3BlcnR5KGtleSkgJiYgdHlwZW9mIGtleSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgdGhpc1trZXldID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHRoaXMucmVjb3ZlcmFibGUgPSByZWM7XG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIC8vIHRyYWNrIHRoaXMgaW5zdGFuY2Ugc28gd2UgY2FuIGBkZXN0cm95KClgIGl0IG9uY2Ugd2UgZGVlbSBpdCBzdXBlcmZsdW91cyBhbmQgcmVhZHkgZm9yIGdhcmJhZ2UgY29sbGVjdGlvbiFcbiAgICAgIHRoaXMuX19lcnJvcl9pbmZvcy5wdXNoKHBlaSk7XG5cbiAgICAgIHJldHVybiBwZWk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGhhbmRsZXIgd2hpY2ggaXMgaW52b2tlZCB3aGVuIGEgbGV4ZXIgZXJyb3Igb2NjdXJzLlxuICAgICAqIFxuICAgICAqIEBwdWJsaWNcbiAgICAgKiBAdGhpcyB7UmVnRXh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saW5lbm9fZGlzcGxheV93aWR0aCk7XG4gICAgICAgIHZhciBydiA9IGxub19wZnggKyAnOiAnICsgbGluZTtcbiAgICAgICAgdmFyIGVycnBmeCA9IG5ldyBBcnJheShsaW5lbm9fZGlzcGxheV93aWR0aCArIDEpLmpvaW4oJ14nKTtcblxuICAgICAgICBpZiAobG5vID09PSBsb2MuZmlyc3RfbGluZSkge1xuICAgICAgICAgIHZhciBvZmZzZXQgPSBsb2MuZmlyc3RfY29sdW1uICsgMjtcblxuICAgICAgICAgIHZhciBsZW4gPSBNYXRoLm1heChcbiAgICAgICAgICAgIDIsXG4gICAgICAgICAgICAoKGxubyA9PT0gbG9jLmxhc3RfbGluZSA/IGxvYy5sYXN0X2NvbHVtbiA6IGxpbmUubGVuZ3RoKSkgLSBsb2MuZmlyc3RfY29sdW1uICsgMVxuICAgICAgICAgICk7XG5cbiAgICAgICAgICB2YXIgbGVhZCA9IG5ldyBBcnJheShvZmZzZXQpLmpvaW4oJy4nKTtcbiAgICAgICAgICB2YXIgbWFyayA9IG5ldyBBcnJheShsZW4pLmpvaW4oJ14nKTtcbiAgICAgICAgICBydiArPSAnXFxuJyArIGVycnBmeCArIGxlYWQgKyBtYXJrO1xuXG4gICAgICAgICAgaWYgKGxpbmUudHJpbSgpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIG5vbmVtcHR5X2xpbmVfaW5kZXhlcy5wdXNoKGluZGV4KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobG5vID09PSBsb2MubGFzdF9saW5lKSB7XG4gICAgICAgICAgdmFyIG9mZnNldCA9IDIgKyAxO1xuICAgICAgICAgIHZhciBsZW4gPSBNYXRoLm1heCgyLCBsb2MubGFzdF9jb2x1bW4gKyAxKTtcbiAgICAgICAgICB2YXIgbGVhZCA9IG5ldyBBcnJheShvZmZzZXQpLmpvaW4oJy4nKTtcbiAgICAgICAgICB2YXIgbWFyayA9IG5ldyBBcnJheShsZW4pLmpvaW4oJ14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gICB0aGlzLmJlZ2luKCdDT05UUk9MJyk7XG5cbiAgICAgICAgcmV0dXJuIDI4O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA2OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICA8IS0tICovXG4gICAgICAgIHRoaXMuYmVnaW4oJ0NPTU1FTlQnKTtcblxuICAgICAgICByZXR1cm47XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDc6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIDwgKi9cbiAgICAgICAgdGhpcy5iZWdpbignVEFHJyk7XG5cbiAgICAgICAgcmV0dXJuIDEzO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA4OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHtcXHsgKi9cbiAgICAgICAgdGhpcy5iZWdpbignRVhQUkVTU0lPTicpO1xuXG4gICAgICAgIHJldHVybiAzOTtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgMTc6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogVEFHICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgXFwvPiAqL1xuICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG5cbiAgICAgICAgcmV0dXJuIDM4O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAxOTpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICA+ICovXG4gICAgICAgIHRoaXMuYmVnaW4oJ0NISUxEUkVOJyk7XG5cbiAgICAgICAgcmV0dXJuIDE0O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAyMDpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHtcXHsgKi9cbiAgICAgICAgdGhpcy5iZWdpbignRVhQUkVTU0lPTicpO1xuXG4gICAgICAgIHJldHVybiAzOTtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgMjM6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogQ0hJTERSRU4gKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHtcXHsgKi9cbiAgICAgICAgdGhpcy5iZWdpbignRVhQUkVTU0lPTicpO1xuXG4gICAgICAgIHJldHVybiAzOTtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgMjQ6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogQ0hJTERSRU4gKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHslICovXG4gICAgICAgIHRoaXMuYmVnaW4oJ0NPTlRST0wnKTtcblxuICAgICAgICByZXR1cm4gMjg7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDI1OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IENISUxEUkVOICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgPCEtLSAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdDT01NRU5UJyk7XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAyNjpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDSElMRFJFTiAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIDxcXC8gKi9cbiAgICAgICAgdGhpcy5iZWdpbignVEFHJyk7XG5cbiAgICAgICAgcmV0dXJuIDM3O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAyNzpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDSElMRFJFTiAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIDwgKi9cbiAgICAgICAgdGhpcy5iZWdpbignVEFHJyk7XG5cbiAgICAgICAgcmV0dXJuIDEzO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA1NzpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgPSAqL1xuICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG5cbiAgICAgICAgdGhpcy5iZWdpbignQ09OVFJPTF9DSElMRCcpO1xuICAgICAgICByZXR1cm4gOTtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgNjA6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgICVcXH0gKi9cbiAgICAgICAgdGhpcy5wb3BTdGF0ZSgpO1xuXG4gICAgICAgIHJldHVybiAzMDtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgNjM6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTF9DSElMRCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIDwgKi9cbiAgICAgICAgdGhpcy5iZWdpbignVEFHJyk7XG5cbiAgICAgICAgcmV0dXJuIDEzO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA2NDpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MX0NISUxEICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgXFx7XFx7ICovXG4gICAgICAgIHRoaXMuYmVnaW4oJ0VYUFJFU1NJT04nKTtcblxuICAgICAgICByZXR1cm4gMzk7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDY1OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0xfQ0hJTEQgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICAlXFx9ICovXG4gICAgICAgIHRoaXMucG9wU3RhdGUoKTtcblxuICAgICAgICByZXR1cm4gMzA7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDgzOlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXH1cXH0gKi9cbiAgICAgICAgdGhpcy5wb3BTdGF0ZSgpO1xuXG4gICAgICAgIHJldHVybiA0MDtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgODY6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogQ09NTUVOVCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgICgufFxccnxcXG4pKj8tLT4gKi9cbiAgICAgICAgdGhpcy5wb3BTdGF0ZSgpO1xuXG4gICAgICAgIHJldHVybjtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgMTE1OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICAuICovXG4gICAgICAgIGNvbnNvbGUubG9nKCcnLCB5eV8ueXl0ZXh0KTtcblxuICAgICAgICAvKiBgZmxleGAgbGV4aW5nIG1vZGU6IHRoZSBsYXN0IHJlc29ydCBydWxlISAqL1xuICAgICAgICBicmVhaztcblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuIHRoaXMuc2ltcGxlQ2FzZUFjdGlvbkNsdXN0ZXJzW3l5cnVsZW51bWJlcl07XG4gICAgICB9XG4gICAgfSxcblxuICAgIHNpbXBsZUNhc2VBY3Rpb25DbHVzdGVyczoge1xuICAgICAgLyohIENvbmRpdGlvbnM6OiBJTklUSUFMICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGltcG9ydCAqL1xuICAgICAgMTogMjUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBmcm9tICovXG4gICAgICAyOiAyNixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBJTklUSUFMICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHVzaW5nICovXG4gICAgICAzOiAnVVNJTkcnLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgYXMgKi9cbiAgICAgIDQ6IDI3LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge0NvbnN0cnVjdG9yfSAqL1xuICAgICAgOTogNTYsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7SWRlbnRpZmllcn0gKi9cbiAgICAgIDEwOiA1NSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBJTklUSUFMICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxceyAqL1xuICAgICAgMTE6IDQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXH0gKi9cbiAgICAgIDEyOiA1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IFRBRyAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB0cnVlICovXG4gICAgICAxMzogNTMsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogVEFHICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGZhbHNlICovXG4gICAgICAxNDogNTQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogVEFHICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtDb25zdHJ1Y3Rvcn0gKi9cbiAgICAgIDE1OiA1NixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge0lkZW50aWZpZXJ9ICovXG4gICAgICAxNjogNTUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogVEFHICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcLyAqL1xuICAgICAgMTg6ICdOT1NFJyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx7ICovXG4gICAgICAyMTogNCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx9ICovXG4gICAgICAyMjogNSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDSElMRFJFTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHsgKi9cbiAgICAgIDI4OiA0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENISUxEUkVOICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcfSAqL1xuICAgICAgMjk6IDUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ0hJTERSRU4gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgW14vPD57JX1dKyAqL1xuICAgICAgMzA6IDQ3LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgbWFpbiAqL1xuICAgICAgMzE6IDI5LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZW5kbWFpbiAqL1xuICAgICAgMzI6IDMxLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgbWFjcm8gKi9cbiAgICAgIDMzOiAnTUFDUk8nLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZW5kbWFjcm8gKi9cbiAgICAgIDM0OiAnRU5ETUFDUk8nLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZm9yICovXG4gICAgICAzNTogNDEsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBlbmRmb3IgKi9cbiAgICAgIDM2OiA0MyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGlmICovXG4gICAgICAzNzogNDUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBlbmRpZiAqL1xuICAgICAgMzg6IDQ2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZWxzZSAqL1xuICAgICAgMzk6IDQ0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZWxzZWlmICovXG4gICAgICA0MDogJ0VMU0VJRicsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBpbiAqL1xuICAgICAgNDE6IDQyLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgY2FzZSAqL1xuICAgICAgNDI6ICdDQVNFJyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGVuZGNhc2UgKi9cbiAgICAgIDQzOiAnRU5EQ0FTRScsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBleHBvcnQgKi9cbiAgICAgIDQ0OiAzMixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGZyb20gKi9cbiAgICAgIDQ1OiAyNixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHZpZXcgKi9cbiAgICAgIDQ2OiAzMyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHVzaW5nICovXG4gICAgICA0NzogJ1VTSU5HJyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGVuZHZpZXcgKi9cbiAgICAgIDQ4OiAzNCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGluc3RhbmNlb2YgKi9cbiAgICAgIDQ5OiA2MyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHRoaXMgKi9cbiAgICAgIDUwOiAnVEhJUycsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBmdW4gKi9cbiAgICAgIDUxOiAzNSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGVuZGZ1biAqL1xuICAgICAgNTI6IDM2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgYXMgKi9cbiAgICAgIDUzOiAyNyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIDo6ICovXG4gICAgICA1NDogJzo6JyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIEAgKi9cbiAgICAgIDU1OiAxOSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcKFxcKSAqL1xuICAgICAgNTY6ICcoKScsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7Q29uc3RydWN0b3J9ICovXG4gICAgICA1ODogNTYsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7SWRlbnRpZmllcn0gKi9cbiAgICAgIDU5OiA1NSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxceyAqL1xuICAgICAgNjE6IDQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXH0gKi9cbiAgICAgIDYyOiA1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0xfQ0hJTEQgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge0NvbnN0cnVjdG9yfSAqL1xuICAgICAgNjY6IDU2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0xfQ0hJTEQgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge0lkZW50aWZpZXJ9ICovXG4gICAgICA2NzogNTUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTF9DSElMRCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHsgKi9cbiAgICAgIDY4OiA0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0xfQ0hJTEQgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx9ICovXG4gICAgICA2OTogNSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcfCAqL1xuICAgICAgNzA6IDE1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgPT4gKi9cbiAgICAgIDcxOiA1MCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIC0+ICovXG4gICAgICA3MjogJy0+JyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIEAgKi9cbiAgICAgIDczOiAxOSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGluc3RhbmNlb2YgKi9cbiAgICAgIDc0OiA2MyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHRydWUgKi9cbiAgICAgIDc1OiA1MyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGZhbHNlICovXG4gICAgICA3NjogNTQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogRVhQUkVTU0lPTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBpZiAqL1xuICAgICAgNzc6IDQ1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgdGhlbiAqL1xuICAgICAgNzg6IDQ4LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZWxzZSAqL1xuICAgICAgNzk6IDQ0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgYXMgKi9cbiAgICAgIDgwOiAyNyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtDb25zdHJ1Y3Rvcn0gKi9cbiAgICAgIDgxOiA1NixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtJZGVudGlmaWVyfSAqL1xuICAgICAgODI6IDU1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx7ICovXG4gICAgICA4NDogNCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcfSAqL1xuICAgICAgODU6IDUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7TnVtYmVyTGl0ZXJhbH0gKi9cbiAgICAgIDg3OiA1MixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtTdHJpbmdMaXRlcmFsfSAqL1xuICAgICAgODg6IDUxLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgPiAqL1xuICAgICAgODk6IDE0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgPCAqL1xuICAgICAgOTA6IDEzLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFwoICovXG4gICAgICA5MTogNyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcKSAqL1xuICAgICAgOTI6IDgsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXFsgKi9cbiAgICAgIDkzOiAxMCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcXSAqL1xuICAgICAgOTQ6IDExLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgOyAqL1xuICAgICAgOTU6IDIwLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgOiAqL1xuICAgICAgOTY6IDEyLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgPSAqL1xuICAgICAgOTc6IDksXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA9PSAqL1xuICAgICAgOTg6IDU5LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgIT0gKi9cbiAgICAgIDk5OiA2MCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgID49ICovXG4gICAgICAxMDA6IDU3LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgPD0gKi9cbiAgICAgIDEwMTogNTgsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXCsgKi9cbiAgICAgIDEwMjogMjEsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICAtICovXG4gICAgICAxMDM6IDIzLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFwqICovXG4gICAgICAxMDQ6IDMsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXC8gKi9cbiAgICAgIDEwNTogMjIsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXFxcICovXG4gICAgICAxMDY6IDQ5LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgJiYgKi9cbiAgICAgIDEwNzogNjEsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHxcXHwgKi9cbiAgICAgIDEwODogNjIsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXF4gKi9cbiAgICAgIDEwOTogMjQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICAhICovXG4gICAgICAxMTA6IDE2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgLCAqL1xuICAgICAgMTExOiA2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFw/ICovXG4gICAgICAxMTI6IDE4LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFwuICovXG4gICAgICAxMTM6IDE3LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgJCAqL1xuICAgICAgMTE0OiAxXG4gICAgfSxcblxuICAgIHJ1bGVzOiBbXG4gICAgICAvKiAgIDA6ICovICAvXig/OlxccyspLyxcbiAgICAgIC8qICAgMTogKi8gIC9eKD86aW1wb3J0KS8sXG4gICAgICAvKiAgIDI6ICovICAvXig/OmZyb20pLyxcbiAgICAgIC8qICAgMzogKi8gIC9eKD86dXNpbmcpLyxcbiAgICAgIC8qICAgNDogKi8gIC9eKD86YXMpLyxcbiAgICAgIC8qICAgNTogKi8gIC9eKD86XFx7JSkvLFxuICAgICAgLyogICA2OiAqLyAgL14oPzo8IS0tKS8sXG4gICAgICAvKiAgIDc6ICovICAvXig/OjwpLyxcbiAgICAgIC8qICAgODogKi8gIC9eKD86XFx7XFx7KS8sXG4gICAgICAvKiAgIDk6ICovICAvXig/OihbQS1aXVtcXHckXFwtXSopKS8sXG4gICAgICAvKiAgMTA6ICovICAvXig/OihbJF9hLXpdW1xcdyRcXC1dKikpLyxcbiAgICAgIC8qICAxMTogKi8gIC9eKD86XFx7KS8sXG4gICAgICAvKiAgMTI6ICovICAvXig/OlxcfSkvLFxuICAgICAgLyogIDEzOiAqLyAgL14oPzp0cnVlKS8sXG4gICAgICAvKiAgMTQ6ICovICAvXig/OmZhbHNlKS8sXG4gICAgICAvKiAgMTU6ICovICAvXig/OihbQS1aXVtcXHckXFwtXSopKS8sXG4gICAgICAvKiAgMTY6ICovICAvXig/OihbJF9hLXpdW1xcdyRcXC1dKikpLyxcbiAgICAgIC8qICAxNzogKi8gIC9eKD86XFwvPikvLFxuICAgICAgLyogIDE4OiAqLyAgL14oPzpcXC8pLyxcbiAgICAgIC8qICAxOTogKi8gIC9eKD86PikvLFxuICAgICAgLyogIDIwOiAqLyAgL14oPzpcXHtcXHspLyxcbiAgICAgIC8qICAyMTogKi8gIC9eKD86XFx7KS8sXG4gICAgICAvKiAgMjI6ICovICAvXig/OlxcfSkvLFxuICAgICAgLyogIDIzOiAqLyAgL14oPzpcXHtcXHspLyxcbiAgICAgIC8qICAyNDogKi8gIC9eKD86XFx7JSkvLFxuICAgICAgLyogIDI1OiAqLyAgL14oPzo8IS0tKS8sXG4gICAgICAvKiAgMjY6ICovICAvXig/OjxcXC8pLyxcbiAgICAgIC8qICAyNzogKi8gIC9eKD86PCkvLFxuICAgICAgLyogIDI4OiAqLyAgL14oPzpcXHspLyxcbiAgICAgIC8qICAyOTogKi8gIC9eKD86XFx9KS8sXG4gICAgICAvKiAgMzA6ICovICAvXig/OlteXFwvPD57JX1dKykvLFxuICAgICAgLyogIDMxOiAqLyAgL14oPzptYWluKS8sXG4gICAgICAvKiAgMzI6ICovICAvXig/OmVuZG1haW4pLyxcbiAgICAgIC8qICAzMzogKi8gIC9eKD86bWFjcm8pLyxcbiAgICAgIC8qICAzNDogKi8gIC9eKD86ZW5kbWFjcm8pLyxcbiAgICAgIC8qICAzNTogKi8gIC9eKD86Zm9yKS8sXG4gICAgICAvKiAgMzY6ICovICAvXig/OmVuZGZvcikvLFxuICAgICAgLyogIDM3OiAqLyAgL14oPzppZikvLFxuICAgICAgLyogIDM4OiAqLyAgL14oPzplbmRpZikvLFxuICAgICAgLyogIDM5OiAqLyAgL14oPzplbHNlKS8sXG4gICAgICAvKiAgNDA6ICovICAvXig/OmVsc2VpZikvLFxuICAgICAgLyogIDQxOiAqLyAgL14oPzppbikvLFxuICAgICAgLyogIDQyOiAqLyAgL14oPzpjYXNlKS8sXG4gICAgICAvKiAgNDM6ICovICAvXig/OmVuZGNhc2UpLyxcbiAgICAgIC8qICA0NDogKi8gIC9eKD86ZXhwb3J0KS8sXG4gICAgICAvKiAgNDU6ICovICAvXig/OmZyb20pLyxcbiAgICAgIC8qICA0NjogKi8gIC9eKD86dmlldykvLFxuICAgICAgLyogIDQ3OiAqLyAgL14oPzp1c2luZykvLFxuICAgICAgLyogIDQ4OiAqLyAgL14oPzplbmR2aWV3KS8sXG4gICAgICAvKiAgNDk6ICovICAvXig/Omluc3RhbmNlb2YpLyxcbiAgICAgIC8qICA1MDogKi8gIC9eKD86dGhpcykvLFxuICAgICAgLyogIDUxOiAqLyAgL14oPzpmdW4pLyxcbiAgICAgIC8qICA1MjogKi8gIC9eKD86ZW5kZnVuKS8sXG4gICAgICAvKiAgNTM6ICovICAvXig/OmFzKS8sXG4gICAgICAvKiAgNTQ6ICovICAvXig/Ojo6KS8sXG4gICAgICAvKiAgNTU6ICovICAvXig/OkApLyxcbiAgICAgIC8qICA1NjogKi8gIC9eKD86XFwoXFwpKS8sXG4gICAgICAvKiAgNTc6ICovICAvXig/Oj0pLyxcbiAgICAgIC8qICA1ODogKi8gIC9eKD86KFtBLVpdW1xcdyRcXC1dKikpLyxcbiAgICAgIC8qICA1OTogKi8gIC9eKD86KFskX2Etel1bXFx3JFxcLV0qKSkvLFxuICAgICAgLyogIDYwOiAqLyAgL14oPzolXFx9KS8sXG4gICAgICAvKiAgNjE6ICovICAvXig/OlxceykvLFxuICAgICAgLyogIDYyOiAqLyAgL14oPzpcXH0pLyxcbiAgICAgIC8qICA2MzogKi8gIC9eKD86PCkvLFxuICAgICAgLyogIDY0OiAqLyAgL14oPzpcXHtcXHspLyxcbiAgICAgIC8qICA2NTogKi8gIC9eKD86JVxcfSkvLFxuICAgICAgLyogIDY2OiAqLyAgL14oPzooW0EtWl1bXFx3JFxcLV0qKSkvLFxuICAgICAgLyogIDY3OiAqLyAgL14oPzooWyRfYS16XVtcXHckXFwtXSopKS8sXG4gICAgICAvKiAgNjg6ICovICAvXig/OlxceykvLFxuICAgICAgLyogIDY5OiAqLyAgL14oPzpcXH0pLyxcbiAgICAgIC8qICA3MDogKi8gIC9eKD86XFx8KS8sXG4gICAgICAvKiAgNzE6ICovICAvXig/Oj0+KS8sXG4gICAgICAvKiAgNzI6ICovICAvXig/Oi0+KS8sXG4gICAgICAvKiAgNzM6ICovICAvXig/OkApLyxcbiAgICAgIC8qICA3NDogKi8gIC9eKD86aW5zdGFuY2VvZikvLFxuICAgICAgLyogIDc1OiAqLyAgL14oPzp0cnVlKS8sXG4gICAgICAvKiAgNzY6ICovICAvXig/OmZhbHNlKS8sXG4gICAgICAvKiAgNzc6ICovICAvXig/OmlmKS8sXG4gICAgICAvKiAgNzg6ICovICAvXig/OnRoZW4pLyxcbiAgICAgIC8qICA3OTogKi8gIC9eKD86ZWxzZSkvLFxuICAgICAgLyogIDgwOiAqLyAgL14oPzphcykvLFxuICAgICAgLyogIDgxOiAqLyAgL14oPzooW0EtWl1bXFx3JFxcLV0qKSkvLFxuICAgICAgLyogIDgyOiAqLyAgL14oPzooWyRfYS16XVtcXHckXFwtXSopKS8sXG4gICAgICAvKiAgODM6ICovICAvXig/OlxcfVxcfSkvLFxuICAgICAgLyogIDg0OiAqLyAgL14oPzpcXHspLyxcbiAgICAgIC8qICA4NTogKi8gIC9eKD86XFx9KS8sXG4gICAgICAvKiAgODY6ICovICAvXig/OigufFxccnxcXG4pKj8tLT4pLyxcbiAgICAgIC8qICA4NzogKi8gIC9eKD86KCg/OihbLV0/KD86Wy1dPyhbMF18KCg/OlsxLTldKSg/OlxcZCspKikpKVxcLig/OlxcZCspKig/Oig/OltFZV0pKD86WystXT9cXGQrKSk/KXwoXFwuKD86XFxkKykoPzooPzpbRWVdKSg/OlsrLV0/XFxkKykpPyl8KCg/OlstXT8oWzBdfCgoPzpbMS05XSkoPzpcXGQrKSopKSkoPzooPzpbRWVdKSg/OlsrLV0/XFxkKykpPykpfCg/OlswXVtYeF0oPzpbXFxkQS1GYS1mXSkrKXwoPzpbMF0oPzpbMC03XSkrKSkpLyxcbiAgICAgIC8qICA4ODogKi8gIC9eKD86KChcIig/OihbXlxcblxcclwiXFxcXF0rKXwoXFxcXCg/Oig/Oig/OltcIidcXFxcYmZucnR2XSl8KD86W15cXGRcIidcXFxcYmZucnQtdnhdKSl8KD86KD86WzEtN11bMC03XXswLDJ9fFswLTddezIsM30pKXwoPzpbeF0oPzpbXFxkQS1GYS1mXSl7Mn0pfCg/Olt1XSg/OltcXGRBLUZhLWZdKXs0fSkpKXwoPzpcXFxcKFxcclxcbnxcXHJ8XFxuKSkpKlwiKXwoJyg/OihbXlxcblxccidcXFxcXSspfChcXFxcKD86KD86KD86W1wiJ1xcXFxiZm5ydHZdKXwoPzpbXlxcZFwiJ1xcXFxiZm5ydC12eF0pKXwoPzooPzpbMS03XVswLTddezAsMn18WzAtN117MiwzfSkpfCg/Olt4XSg/OltcXGRBLUZhLWZdKXsyfSl8KD86W3VdKD86W1xcZEEtRmEtZl0pezR9KSkpfCg/OlxcXFwoXFxyXFxufFxccnxcXG4pKSkqJyl8KGAoPzooW15cXG5cXHJcXFxcYF0rKXwoXFxcXCg/Oig/Oig/OltcIidcXFxcYmZucnR2XSl8KD86W15cXGRcIidcXFxcYmZucnQtdnhdKSl8KD86KD86WzEtN11bMC03XXswLDJ9fFswLTddezIsM30pKXwoPzpbeF0oPzpbXFxkQS1GYS1mXSl7Mn0pfCg/Olt1XSg/OltcXGRBLUZhLWZdKXs0fSkpKXwoPzpcXFxcKFxcclxcbnxcXHJ8XFxuKSkpKmApKSkvLFxuICAgICAgLyogIDg5OiAqLyAgL14oPzo+KS8sXG4gICAgICAvKiAgOTA6ICovICAvXig/OjwpLyxcbiAgICAgIC8qICA5MTogKi8gIC9eKD86XFwoKS8sXG4gICAgICAvKiAgOTI6ICovICAvXig/OlxcKSkvLFxuICAgICAgLyogIDkzOiAqLyAgL14oPzpcXFspLyxcbiAgICAgIC8qICA5NDogKi8gIC9eKD86XFxdKS8sXG4gICAgICAvKiAgOTU6ICovICAvXig/OjspLyxcbiAgICAgIC8qICA5NjogKi8gIC9eKD86OikvLFxuICAgICAgLyogIDk3OiAqLyAgL14oPzo9KS8sXG4gICAgICAvKiAgOTg6ICovICAvXig/Oj09KS8sXG4gICAgICAvKiAgOTk6ICovICAvXig/OiE9KS8sXG4gICAgICAvKiAxMDA6ICovICAvXig/Oj49KS8sXG4gICAgICAvKiAxMDE6ICovICAvXig/Ojw9KS8sXG4gICAgICAvKiAxMDI6ICovICAvXig/OlxcKykvLFxuICAgICAgLyogMTAzOiAqLyAgL14oPzotKS8sXG4gICAgICAvKiAxMDQ6ICovICAvXig/OlxcKikvLFxuICAgICAgLyogMTA1OiAqLyAgL14oPzpcXC8pLyxcbiAgICAgIC8qIDEwNjogKi8gIC9eKD86XFxcXCkvLFxuICAgICAgLyogMTA3OiAqLyAgL14oPzomJikvLFxuICAgICAgLyogMTA4OiAqLyAgL14oPzpcXHxcXHwpLyxcbiAgICAgIC8qIDEwOTogKi8gIC9eKD86XFxeKS8sXG4gICAgICAvKiAxMTA6ICovICAvXig/OiEpLyxcbiAgICAgIC8qIDExMTogKi8gIC9eKD86LCkvLFxuICAgICAgLyogMTEyOiAqLyAgL14oPzpcXD8pLyxcbiAgICAgIC8qIDExMzogKi8gIC9eKD86XFwuKS8sXG4gICAgICAvKiAxMTQ6ICovICAvXig/OiQpLyxcbiAgICAgIC8qIDExNTogKi8gIC9eKD86LikvXG4gICAgXSxcblxuICAgIGNvbmRpdGlvbnM6IHtcbiAgICAgICdDSElMRFJFTic6IHtcbiAgICAgICAgcnVsZXM6IFtcbiAgICAgICAgICAwLFxuICAgICAgICAgIDIzLFxuICAgICAgICAgIDI0LFxuICAgICAgICAgIDI1LFxuICAgICAgICAgIDI2LFxuICAgICAgICAgIDI3LFxuICAgICAgICAgIDI4LFxuICAgICAgICAgIDI5LFxuICAgICAgICAgIDMwLFxuICAgICAgICAgIDg3LFxuICAgICAgICAgIDg4LFxuICAgICAgICAgIDg5LFxuICAgICAgICAgIDkwLFxuICAgICAgICAgIDkxLFxuICAgICAgICAgIDkyLFxuICAgICAgICAgIDkzLFxuICAgICAgICAgIDk0LFxuICAgICAgICAgIDk1LFxuICAgICAgICAgIDk2LFxuICAgICAgICAgIDk3LFxuICAgICAgICAgIDk4LFxuICAgICAgICAgIDk5LFxuICAgICAgICAgIDEwMCxcbiAgICAgICAgICAxMDEsXG4gICAgICAgICAgMTAyLFxuICAgICAgICAgIDEwMyxcbiAgICAgICAgICAxMDQsXG4gICAgICAgICAgMTA1LFxuICAgICAgICAgIDEwNixcbiAgICAgICAgICAxMDcsXG4gICAgICAgICAgMTA4LFxuICAgICAgICAgIDEwOSxcbiAgICAgICAgICAxMTAsXG4gICAgICAgICAgMTExLFxuICAgICAgICAgIDExMixcbiAgICAgICAgICAxMTMsXG4gICAgICAgICAgMTE0XG4gICAgICAgIF0sXG5cbiAgICAgICAgaW5jbHVzaXZlOiBmYWxzZVxuICAgICAgfSxcblxuICAgICAgJ0NPTU1FTlQnOiB7XG4gICAgICAgIHJ1bGVzOiBbXG4gICAgICAgICAgMCxcbiAgICAgICAgICA4NixcbiAgICAgICAgICA4NyxcbiAgICAgICAgICA4OCxcbiAgICAgICAgICA4OSxcbiAgICAgICAgICA5MCxcbiAgICAgICAgICA5MSxcbiAgICAgICAgICA5MixcbiAgICAgICAgICA5MyxcbiAgICAgICAgICA5NCxcbiAgICAgICAgICA5NSxcbiAgICAgICAgICA5NixcbiAgICAgICAgICA5NyxcbiAgICAgICAgICA5OCxcbiAgICAgICAgICA5OSxcbiAgICAgICAgICAxMDAsXG4gICAgICAgICAgMTAxLFxuICAgICAgICAgIDEwMixcbiAgICAgICAgICAxMDMsXG4gICAgICAgICAgMTA0LFxuICAgICAgICAgIDEwNSxcbiAgICAgICAgICAxMDYsXG4gICAgICAgICAgMTA3LFxuICAgICAgICAgIDEwOCxcbiAgICAgICAgICAxMDksXG4gICAgICAgICAgMTEwLFxuICAgICAgICAgIDExMSxcbiAgICAgICAgICAxMTIsXG4gICAgICAgICAgMTEzLFxuICAgICAgICAgIDExNFxuICAgICAgICBdLFxuXG4gICAgICAgIGluY2x1c2l2ZTogZmFsc2VcbiAgICAgIH0sXG5cbiAgICAgICdDT05UUk9MJzoge1xuICAgICAgICBydWxlczogW1xuICAgICAgICAgIDAsXG4gICAgICAgICAgMzEsXG4gICAgICAgICAgMzIsXG4gICAgICAgICAgMzMsXG4gICAgICAgICAgMzQsXG4gICAgICAgICAgMzUsXG4gICAgICAgICAgMzYsXG4gICAgICAgICAgMzcsXG4gICAgICAgICAgMzgsXG4gICAgICAgICAgMzksXG4gICAgICAgICAgNDAsXG4gICAgICAgICAgNDEsXG4gICAgICAgICAgNDIsXG4gICAgICAgICAgNDMsXG4gICAgICAgICAgNDQsXG4gICAgICAgICAgNDUsXG4gICAgICAgICAgNDYsXG4gICAgICAgICAgNDcsXG4gICAgICAgICAgNDgsXG4gICAgICAgICAgNDksXG4gICAgICAgICAgNTAsXG4gICAgICAgICAgNTEsXG4gICAgICAgICAgNTIsXG4gICAgICAgICAgNTMsXG4gICAgICAgICAgNTQsXG4gICAgICAgICAgNTUsXG4gICAgICAgICAgNTYsXG4gICAgICAgICAgNTcsXG4gICAgICAgICAgNTgsXG4gICAgICAgICAgNTksXG4gICAgICAgICAgNjAsXG4gICAgICAgICAgNjEsXG4gICAgICAgICAgNjIsXG4gICAgICAgICAgODcsXG4gICAgICAgICAgODgsXG4gICAgICAgICAgODksXG4gICAgICAgICAgOTAsXG4gICAgICAgICAgOTEsXG4gICAgICAgICAgOTIsXG4gICAgICAgICAgOTMsXG4gICAgICAgICAgOTQsXG4gICAgICAgICAgOTUsXG4gICAgICAgICAgOTYsXG4gICAgICAgICAgOTcsXG4gICAgICAgICAgOTgsXG4gICAgICAgICAgOTksXG4gICAgICAgICAgMTAwLFxuICAgICAgICAgIDEwMSxcbiAgICAgICAgICAxMDIsXG4gICAgICAgICAgMTAzLFxuICAgICAgICAgIDEwNCxcbiAgICAgICAgICAxMDUsXG4gICAgICAgICAgMTA2LFxuICAgICAgICAgIDEwNyxcbiAgICAgICAgICAxMDgsXG4gICAgICAgICAgMTA5LFxuICAgICAgICAgIDExMCxcbiAgICAgICAgICAxMTEsXG4gICAgICAgICAgMTEyLFxuICAgICAgICAgIDExMyxcbiAgICAgICAgICAxMTRcbiAgICAgICAgXSxcblxuICAgICAgICBpbmNsdXNpdmU6IGZhbHNlXG4gICAgICB9LFxuXG4gICAgICAnRVhQUkVTU0lPTic6IHtcbiAgICAgICAgcnVsZXM6IFtcbiAgICAgICAgICAwLFxuICAgICAgICAgIDcwLFxuICAgICAgICAgIDcxLFxuICAgICAgICAgIDcyLFxuICAgICAgICAgIDczLFxuICAgICAgICAgIDc0LFxuICAgICAgICAgIDc1LFxuICAgICAgICAgIDc2LFxuICAgICAgICAgIDc3LFxuICAgICAgICAgIDc4LFxuICAgICAgICAgIDc5LFxuICAgICAgICAgIDgwLFxuICAgICAgICAgIDgxLFxuICAgICAgICAgIDgyLFxuICAgICAgICAgIDgzLFxuICAgICAgICAgIDg0LFxuICAgICAgICAgIDg1LFxuICAgICAgICAgIDg3LFxuICAgICAgICAgIDg4LFxuICAgICAgICAgIDg5LFxuICAgICAgICAgIDkwLFxuICAgICAgICAgIDkxLFxuICAgICAgICAgIDkyLFxuICAgICAgICAgIDkzLFxuICAgICAgICAgIDk0LFxuICAgICAgICAgIDk1LFxuICAgICAgICAgIDk2LFxuICAgICAgICAgIDk3LFxuICAgICAgICAgIDk4LFxuICAgICAgICAgIDk5LFxuICAgICAgICAgIDEwMCxcbiAgICAgICAgICAxMDEsXG4gICAgICAgICAgMTAyLFxuICAgICAgICAgIDEwMyxcbiAgICAgICAgICAxMDQsXG4gICAgICAgICAgMTA1LFxuICAgICAgICAgIDEwNixcbiAgICAgICAgICAxMDcsXG4gICAgICAgICAgMTA4LFxuICAgICAgICAgIDEwOSxcbiAgICAgICAgICAxMTAsXG4gICAgICAgICAgMTExLFxuICAgICAgICAgIDExMixcbiAgICAgICAgICAxMTMsXG4gICAgICAgICAgMTE0XG4gICAgICAgIF0sXG5cbiAgICAgICAgaW5jbHVzaXZlOiBmYWxzZVxuICAgICAgfSxcblxuICAgICAgJ0NPTlRST0xfQ0hJTEQnOiB7XG4gICAgICAgIHJ1bGVzOiBbXG4gICAgICAgICAgMCxcbiAgICAgICAgICA2MyxcbiAgICAgICAgICA2NCxcbiAgICAgICAgICA2NSxcbiAgICAgICAgICA2NixcbiAgICAgICAgICA2NyxcbiAgICAgICAgICA2OCxcbiAgICAgICAgICA2OSxcbiAgICAgICAgICA4NyxcbiAgICAgICAgICA4OCxcbiAgICAgICAgICA4OSxcbiAgICAgICAgICA5MCxcbiAgICAgICAgICA5MSxcbiAgICAgICAgICA5MixcbiAgICAgICAgICA5MyxcbiAgICAgICAgICA5NCxcbiAgICAgICAgICA5NSxcbiAgICAgICAgICA5NixcbiAgICAgICAgICA5NyxcbiAgICAgICAgICA5OCxcbiAgICAgICAgICA5OSxcbiAgICAgICAgICAxMDAsXG4gICAgICAgICAgMTAxLFxuICAgICAgICAgIDEwMixcbiAgICAgICAgICAxMDMsXG4gICAgICAgICAgMTA0LFxuICAgICAgICAgIDEwNSxcbiAgICAgICAgICAxMDYsXG4gICAgICAgICAgMTA3LFxuICAgICAgICAgIDEwOCxcbiAgICAgICAgICAxMDksXG4gICAgICAgICAgMTEwLFxuICAgICAgICAgIDExMSxcbiAgICAgICAgICAxMTIsXG4gICAgICAgICAgMTEzLFxuICAgICAgICAgIDExNFxuICAgICAgICBdLFxuXG4gICAgICAgIGluY2x1c2l2ZTogZmFsc2VcbiAgICAgIH0sXG5cbiAgICAgICdUQUcnOiB7XG4gICAgICAgIHJ1bGVzOiBbXG4gICAgICAgICAgMCxcbiAgICAgICAgICAxMyxcbiAgICAgICAgICAxNCxcbiAgICAgICAgICAxNSxcbiAgICAgICAgICAxNixcbiAgICAgICAgICAxNyxcbiAgICAgICAgICAxOCxcbiAgICAgICAgICAxOSxcbiAgICAgICAgICAyMCxcbiAgICAgICAgICAyMSxcbiAgICAgICAgICAyMixcbiAgICAgICAgICA4NyxcbiAgICAgICAgICA4OCxcbiAgICAgICAgICA4OSxcbiAgICAgICAgICA5MCxcbiAgICAgICAgICA5MSxcbiAgICAgICAgICA5MixcbiAgICAgICAgICA5MyxcbiAgICAgICAgICA5NCxcbiAgICAgICAgICA5NSxcbiAgICAgICAgICA5NixcbiAgICAgICAgICA5NyxcbiAgICAgICAgICA5OCxcbiAgICAgICAgICA5OSxcbiAgICAgICAgICAxMDAsXG4gICAgICAgICAgMTAxLFxuICAgICAgICAgIDEwMixcbiAgICAgICAgICAxMDMsXG4gICAgICAgICAgMTA0LFxuICAgICAgICAgIDEwNSxcbiAgICAgICAgICAxMDYsXG4gICAgICAgICAgMTA3LFxuICAgICAgICAgIDEwOCxcbiAgICAgICAgICAxMDksXG4gICAgICAgICAgMTEwLFxuICAgICAgICAgIDExMSxcbiAgICAgICAgICAxMTIsXG4gICAgICAgICAgMTEzLFxuICAgICAgICAgIDExNFxuICAgICAgICBdLFxuXG4gICAgICAgIGluY2x1c2l2ZTogZmFsc2VcbiAgICAgIH0sXG5cbiAgICAgICdJTklUSUFMJzoge1xuICAgICAgICBydWxlczogW1xuICAgICAgICAgIDAsXG4gICAgICAgICAgMSxcbiAgICAgICAgICAyLFxuICAgICAgICAgIDMsXG4gICAgICAgICAgNCxcbiAgICAgICAgICA1LFxuICAgICAgICAgIDYsXG4gICAgICAgICAgNyxcbiAgICAgICAgICA4LFxuICAgICAgICAgIDksXG4gICAgICAgICAgMTAsXG4gICAgICAgICAgMTEsXG4gICAgICAgICAgMTIsXG4gICAgICAgICAgODcsXG4gICAgICAgICAgODgsXG4gICAgICAgICAgODksXG4gICAgICAgICAgOTAsXG4gICAgICAgICAgOTEsXG4gICAgICAgICAgOTIsXG4gICAgICAgICAgOTMsXG4gICAgICAgICAgOTQsXG4gICAgICAgICAgOTUsXG4gICAgICAgICAgOTYsXG4gICAgICAgICAgOTcsXG4gICAgICAgICAgOTgsXG4gICAgICAgICAgOTksXG4gICAgICAgICAgMTAwLFxuICAgICAgICAgIDEwMSxcbiAgICAgICAgICAxMDIsXG4gICAgICAgICAgMTAzLFxuICAgICAgICAgIDEwNCxcbiAgICAgICAgICAxMDUsXG4gICAgICAgICAgMTA2LFxuICAgICAgICAgIDEwNyxcbiAgICAgICAgICAxMDgsXG4gICAgICAgICAgMTA5LFxuICAgICAgICAgIDExMCxcbiAgICAgICAg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ICAgcmV0dXJuIG5ldyBSaWdodChmKHRoaXMucikpO1xuICAgIH07XG4gICAgUmlnaHQucHJvdG90eXBlLm1hcExlZnQgPSBmdW5jdGlvbiAoXykge1xuICAgICAgICByZXR1cm4gbmV3IFJpZ2h0KHRoaXMucik7XG4gICAgfTtcbiAgICBSaWdodC5wcm90b3R5cGUuYmltYXAgPSBmdW5jdGlvbiAoXywgZykge1xuICAgICAgICByZXR1cm4gZXhwb3J0cy5yaWdodChnKHRoaXMucikpO1xuICAgIH07XG4gICAgUmlnaHQucHJvdG90eXBlLmNoYWluID0gZnVuY3Rpb24gKGYpIHtcbiAgICAgICAgcmV0dXJuIGYodGhpcy5yKTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIG9yRWxzZSByZXR1cm5zIHRoZSByZXN1bHQgb2YgZiBpZiB0aGUgRWl0aGVyIGlzIGxlZnQuXG4gICAgICovXG4gICAgUmlnaHQucHJvdG90eXBlLm9yRWxzZSA9IGZ1bmN0aW9uIChfKSB7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgUmlnaHQucHJvdG90eXBlLm9yUmlnaHQgPSBmdW5jdGlvbiAoXykge1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIGFwXG4gICAgICovXG4gICAgUmlnaHQucHJvdG90eXBlLmFwID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgcmV0dXJuIGUubWFwKGZ1bmN0aW9uIChmKSB7IHJldHVybiBmKF90aGlzLnIpOyB9KTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAgKiB0YWtlTGVmdCBleHRyYWN0cyB0aGUgbGVmdCB2YWx1ZSBvZiBhbiBFaXRoZXIsIHRocm93aW5nIGFuIGVycm9yIGlmIHRoZSBFaXRoZXIgaXMgcmlnaHQuXG4gICAgICAqL1xuICAgIFJpZ2h0LnByb3RvdHlwZS50YWtlTGVmd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gICogbWFwXG4gICAgICogQHN1bW1hcnkgU3RhdGU8UyDihpIge0EsU30+IOKGkiAgKEEg4oaSICBCKSDihpIgIFN0YXRlPFMg4oaSICB7QywgU30+XG4gICAgICovXG4gICAgU3RhdGUucHJvdG90eXBlLm1hcCA9IGZ1bmN0aW9uIChmKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHJldHVybiBuZXcgU3RhdGUoZnVuY3Rpb24gKHhzKSB7XG4gICAgICAgICAgICB2YXIgX2EgPSBfdGhpcy5ydW4oeHMpLCBhID0gX2FbMF0sIHMgPSBfYVsxXTtcbiAgICAgICAgICAgIHJldHVybiBbZihhKSwgc107XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogam9pbiByZXBsYWNlcyB0aGUgb3V0ZXIgU3RhdGUgd2l0aCBhbiBpbm5lciBTdGF0ZVxuICAgICAqL1xuICAgIFN0YXRlLnByb3RvdHlwZS5qb2luID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICByZXR1cm4gbmV3IFN0YXRlKGZ1bmN0aW9uICh4cykge1xuICAgICAgICAgICAgdmFyIF9hID0gX3RoaXMucnVuKHhzKSwgYSA9IF9hWzBdLCBzID0gX2FbMV07XG4gICAgICAgICAgICByZXR1cm4gYS5ydW4ocyk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogY2hhaW5cbiAgICAgKi9cbiAgICBTdGF0ZS5wcm90b3R5cGUuY2hhaW4gPSBmdW5jdGlvbiAoZikge1xuICAgICAgICByZXR1cm4gdGhpcy5tYXAoZikuam9pbigpO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogZXZhbHVhdGUgdGhlIFN0YXRlIHJldHVybmluZyB0aGUgZmluYWwgdmFsdWVcbiAgICAgKi9cbiAgICBTdGF0ZS5wcm90b3R5cGUuZXZhbHVhdGUgPSBmdW5jdGlvbiAocykge1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nZShjbywgKF9iID0ge30sIF9iW2tdID0gY2MubWFwKGV4cG9ydHMuY29weSksIF9iKSkpIDpcbiAgICAgICAgICAgICAgICB0eXBlb2YgY2MgIT09ICdvYmplY3QnID9cbiAgICAgICAgICAgICAgICAgICAgZXhwb3J0cy5tZXJnZShjbywgKF9jID0ge30sIF9jW2tdID0gY2MsIF9jKSkgOlxuICAgICAgICAgICAgICAgICAgICBleHBvcnRzLm1lcmdlKGNvLCAoX2QgPSB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9kW2tdID0gKHR5cGVvZiBjb1trXSAhPT0gJ29iamVjdCcpID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBvcnRzLm1lcmdlKGNvW2tdLCBjYykgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9ydHMuZnVzZShjb1trXSwgY2MpLFxuICAgICAgICAgICAgICAgICAgICAgICAgX2QpKTtcbiAgICAgICAgICAgIHZhciBfYSwgX2IsIF9jLCBfZDtcbiAgICAgICAgfSwgbyk7XG4gICAgfSwge30pO1xufTtcbmV4cG9ydHMuY29weSA9IGZ1bmN0aW9uIChvKSB7XG4gICAgcmV0dXJuIChBcnJheS5pc0FycmF5KG8pKSA/XG4gICAgICAgIG8ubWFwKGV4cG9ydHMuY29weSkgOlxuICAgICAgICAodHlwZW9mIG8gPT09ICdvYmplY3QnKSA/XG4gICAgICAgICAgICBleHBvcnRzLnJlZHVjZShvLCBmdW5jdGlvbiAocCwgYywgaykge1xuICAgICAgICAgICAgICAgIHJldHVybiBleHBvcnRzLm1lcmdlKHAsIChfYSA9IHt9LCBfYVtrXSA9IGV4cG9ydHMuY29weShjKSwgX2EpKTtcbiAgICAgICAgICAgICAgICB2YXIgX2E7XG4gICAgICAgICAgICB9LCB7fSkgOiBvO1xufTtcbi8qKlxuICogcmVkdWNlIGFuIG9iamVjdCdzIGtleXMgKGluIG5vIGd1YXJhbnRlZWQgb3JkZXIpXG4gKi9cbmV4cG9ydHM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pbiBicmFja2V0cyk6XG4gICAgICAgIGluZGVudF9zaXplICg0KSAgICAgICAgICAgICAgICAgICAgICAgICDigJQgaW5kZW50YXRpb24gc2l6ZSxcbiAgICAgICAgaW5kZW50X2NoYXIgKHNwYWNlKSAgICAgICAgICAgICAgICAgICAgIOKAlCBjaGFyYWN0ZXIgdG8gaW5kZW50IHdpdGgsXG4gICAgICAgIHNlbGVjdG9yX3NlcGFyYXRvcl9uZXdsaW5lICh0cnVlKSAgICAgICAtIHNlcGFyYXRlIHNlbGVjdG9ycyB3aXRoIG5ld2xpbmUgb3JcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90IChlLmcuIFwiYSxcXG5iclwiIG9yIFwiYSwgYnJcIilcbiAgICAgICAgZW5kX3dpdGhfbmV3bGluZSAoZmFsc2UpICAgICAgICAgICAgICAgIC0gZW5kIHdpdGggYSBuZXdsaW5lXG4gICAgICAgIG5ld2xpbmVfYmV0d2Vlbl9ydWxlcyAodHJ1ZSkgICAgICAgICAgICAtIGFkZCBhIG5ldyBsaW5lIGFmdGVyIGV2ZXJ5IGNzcyBydWxlXG4gICAgICAgIHNwYWNlX2Fyb3VuZF9zZWxlY3Rvcl9zZXBhcmF0b3IgKGZhbHNlKSAtIGVuc3VyZSBzcGFjZSBhcm91bmQgc2VsZWN0b3Igc2VwYXJhdG9yczpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJz4nLCAnKycsICd+JyAoZS5nLiBcImE+YlwiIC0+IFwiYSA+IGJcIilcbiAgICBlLmdcblxuICAgIGNzc19iZWF1dGlmeShjc3Nfc291cmNlX3RleHQsIHtcbiAgICAgICdpbmRlbnRfc2l6ZSc6IDEsXG4gICAgICAnaW5kZW50X2NoYXInOiAnXFx0JyxcbiAgICAgICdzZWxlY3Rvcl9zZXBhcmF0b3InOiAnICcsXG4gICAgICAnZW5kX3dpdGhfbmV3bGluZSc6IGZhbHN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cFdoaXRlc3BhY2UpIHtcbiAgICAgICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgICAgICB2YXIgcHJldl9wb3MgPSBwb3M7XG4gICAgICAgIGlmIChza2lwV2hpdGVzcGFjZSkge1xuICAgICAgICAgICAgZWF0V2hpdGVzcGFjZSgpO1xuICAgICAgICB9XG4gICAgICAgIHJlc3VsdCA9IHNvdXJjZV90ZXh0LmNoYXJBdChwb3MgKyAxKSB8fCAnJztcbiAgICAgICAgcG9zID0gcHJldl9wb3MgLSAxO1xuICAgICAgICBuZXh0KCk7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZWF0U3RyaW5nKGVuZENoYXJzKSB7XG4gICAgICAgIHZhciBzdGFydCA9IHBvcztcbiAgICAgICAgd2hpbGUgKG5leHQoKSkge1xuICAgICAgICAgICAgaWYgKGNoID09PSBcIlxcXFxcIikge1xuICAgICAgICAgICAgICAgIG5leHQoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZW5kQ2hhcnMuaW5kZXhPZihjaCkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSBcIlxcblwiKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNvdXJjZV90ZXh0LnN1YnN0cmluZyhzdGFydCwgcG9zICsgMSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGVla1N0cmluZyhlbmRDaGFyKSB7XG4gICAgICAgIHZhciBwcmV2X3BvcyA9IHBvcztcbiAgICAgICAgdmFyIHN0ciA9IGVhdFN0cmluZyhlbmRDaGFyKTtcbiAgICAgICAgcG9zID0gcHJldl9wb3MgLSAxO1xuICAgICAgICBuZXh0KCk7XG4gICAgICAgIHJldHVybiBzdHI7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZWF0V2hpdGVzcGFjZShwcmVzZXJ2ZV9uZXdsaW5lc19sb2NhbCkge1xuICAgICAgICB2YXIgcmVzdWx0ID0gMDtcbiAgICAgICAgd2hpbGUgKHdoaXRlUmUudGVzdChwZWVrKCkpKSB7XG4gICAgICAgICAgICBuZXh0KCk7XG4gICAgICAgICAgICBpZiAoY2ggPT09ICdcXG4nICYmIHByZXNlcnZlX25ld2xpbmVzX2xvY2FsICYmIHByZXNlcnZlX25ld2xpbmVzKSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSh0cnVlKTtcbiAgICAgICAgICAgICAgICByZXN1bHQrKztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBuZXdsaW5lc0Zyb21MYXN0V1NFYXQgPSByZXN1bHQ7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2tpcFdoaXRlc3BhY2UoKSB7XG4gICAgICAgIHZhciByZXN1bHQgPSAnJztcbiAgICAgICAgaWYgKGNoICYmIHdoaXRlUmUudGVzdChjaCkpIHtcbiAgICAgICAgICAgIHJlc3VsdCA9IGNoO1xuICAgICAgICB9XG4gICAgICAgIHdoaWxlICh3aGl0ZVJlLnRlc3QobmV4dCgpKSkge1xuICAgICAgICAgICAgcmVzdWx0ICs9IGNoO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZWF0Q29tbWVudCgpIHtcbiAgICAgICAgdmFyIHN0YXJ0ID0gcG9zO1xuICAgICAgICB2YXIgc2luZ2xlTGluZSA9IHBlZWsoKSA9PT0gXCIvXCI7XG4gICAgICAgIG5leHQoKTtcbiAgICAgICAgd2hpbGUgKG5leHQoKSkge1xuICAgICAgICAgICAgaWYgKCFzaW5nbGVMaW5lICYmIGNoID09PSBcIipcIiAmJiBwZWVrKCkgPT09IFwiL1wiKSB7XG4gICAgICAgICAgICAgICAgbmV4dCgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChzaW5nbGVMaW5lICYmIGNoID09PSBcIlxcblwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHNvdXJjZV90ZXh0LnN1YnN0cmluZyhzdGFydCwgcG9zKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBzb3VyY2VfdGV4dC5zdWJzdHJpbmcoc3RhcnQsIHBvcykgKyBjaDtcbiAgICB9XG5cblxuICAgIGZ1bmN0aW9uIGxvb2tCYWNrKHN0cikge1xuICAgICAgICByZXR1cm4gc291cmNlX3RleHQuc3Vic3RyaW5nKHBvcyAtIHN0ci5sZW5ndGgsIHBvcykudG9Mb3dlckNhc2UoKSA9PT1cbiAgICAgICAgICAgIHN0cjtcbiAgICB9XG5cbiAgICAvLyBOZXN0ZWQgcHNldWRvLWNsYXNzIGlmIHdlIGFyZSBpbnNpZGVSdWxlXG4gICAgLy8gYW5kIHRoZSBuZXh0IHNwZWNpYWwgY2hhcmFjdGVyIGZvdW5kIG9wZW5zXG4gICAgLy8gYSBuZXcgYmxvY2tcbiAgICBmdW5jdGlvbiBmb3VuZE5lc3RlZFBzZXVkb0NsYXNzKCkge1xuICAgICAgICB2YXIgb3BlblBhcmVuID0gMDtcbiAgICAgICAgZm9yICh2YXIgaSA9IHBvcyArIDE7IGkgPCBzb3VyY2VfdGV4dC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGNoID0gc291cmNlX3RleHQuY2hhckF0KGkpO1xuICAgICAgICAgICAgaWYgKGNoID09PSBcIntcIikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJygnKSB7XG4gICAgICAgICAgICAgICAgLy8gcHNldWRvY2xhc3NlcyBjYW4gY29udGFpbiAoKVxuICAgICAgICAgICAgICAgIG9wZW5QYXJlbiArPSAxO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJyknKSB7XG4gICAgICAgICAgICAgICAgaWYgKG9wZW5QYXJlbiA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG9wZW5QYXJlbiAtPSAxO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gXCI7XCIgfHwgY2ggPT09IFwifVwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICAvLyBwcmludGVyXG4gICAgdmFyIGJhc2VJbmRlbnRTdHJpbmcgPSAnJztcbiAgICB2YXIgcHJlaW5kZW50X2luZGV4ID0gMDtcbiAgICBpZiAoc291cmNlX3RleHQgJiYgc291cmNlX3RleHQubGVuZ3RoKSB7XG4gICAgICAgIHdoaWxlICgoc291cmNlX3RleHQuY2hhckF0KHByZWluZGVudF9pbmRleCkgPT09ICcgJyB8fFxuICAgICAgICAgICAgICAgIHNvdXJjZV90ZXh0LmNoYXJBdChwcmVpbmRlbnRfaW5kZXgpID09PSAnXFx0JykpIHtcbiAgICAgICAgICAgIHByZWluZGVudF9pbmRleCArPSAxO1xuICAgICAgICB9XG4gICAgICAgIGJhc2VJbmRlbnRTdHJpbmcgPSBzb3VyY2VfdGV4dC5zdWJzdHJpbmcoMCwgcHJlaW5kZW50X2luZGV4KTtcbiAgICAgICAganNfc291cmNlX3RleHQgPSBzb3VyY2VfdGV4dC5zdWJzdHJpbmcocHJlaW5kZW50X2luZGV4KTtcbiAgICB9XG5cblxuICAgIHZhciBzaW5nbGVJbmRlbnQgPSBuZXcgQXJyYXkoaW5kZW50U2l6ZSArIDEpLmpvaW4oaW5kZW50Q2hhcmFjdGVyKTtcbiAgICB2YXIgaW5kZW50TGV2ZWw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cGFyZW5MZXZlbCA9IDA7XG5cbiAgICAgICAgdmFyIGluc2lkZVJ1bGUgPSBmYWxzZTtcbiAgICAgICAgdmFyIGluc2lkZVByb3BlcnR5VmFsdWUgPSBmYWxzZTtcbiAgICAgICAgdmFyIGVudGVyaW5nQ29uZGl0aW9uYWxHcm91cCA9IGZhbHNlO1xuICAgICAgICB2YXIgdG9wX2NoID0gJyc7XG4gICAgICAgIHZhciBsYXN0X3RvcF9jaCA9ICcnO1xuXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICB2YXIgd2hpdGVzcGFjZSA9IHNraXBXaGl0ZXNwYWNlKCk7XG4gICAgICAgICAgICB2YXIgaXNBZnRlclNwYWNlID0gd2hpdGVzcGFjZSAhPT0gJyc7XG4gICAgICAgICAgICB2YXIgaXNBZnRlck5ld2xpbmUgPSB3aGl0ZXNwYWNlLmluZGV4T2YoJ1xcbicpICE9PSAtMTtcbiAgICAgICAgICAgIGxhc3RfdG9wX2NoID0gdG9wX2NoO1xuICAgICAgICAgICAgdG9wX2NoID0gY2g7XG5cbiAgICAgICAgICAgIGlmICghY2gpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICcvJyAmJiBwZWVrKCkgPT09ICcqJykgeyAvKiBjc3MgY29tbWVudCAqL1xuICAgICAgICAgICAgICAgIHZhciBoZWFkZXIgPSBpbmRlbnRMZXZlbCA9PT0gMDtcblxuICAgICAgICAgICAgICAgIGlmIChpc0FmdGVyTmV3bGluZSB8fCBoZWFkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhlYXRDb21tZW50KCkpO1xuICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUoKTtcbiAgICAgICAgICAgICAgICBpZiAoaGVhZGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUodHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJy8nICYmIHBlZWsoKSA9PT0gJy8nKSB7IC8vIHNpbmdsZSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgICAgICBpZiAoIWlzQWZ0ZXJOZXdsaW5lICYmIGxhc3RfdG9wX2NoICE9PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnRyaW0odHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhlYXRDb21tZW50KCkpO1xuICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICdAJykge1xuICAgICAgICAgICAgICAgIHByZXNlcnZlU2luZ2xlU3BhY2UoaXNBZnRlclNwYWNlKTtcblxuICAgICAgICAgICAgICAgIC8vIGRlYWwgd2l0aCBsZXNzIHByb3BlcnkgbWl4aW5zIEB7Li4ufVxuICAgICAgICAgICAgICAgIGlmIChwZWVrKCkgPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoZWF0U3RyaW5nKCd9JykpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhjaCk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gc3RyaXAgdHJhaWxpbmcgc3BhY2UsIGlmIHByZXNlbnQsIGZvciBoYXNoIHByb3BlcnR5IGNoZWNrc1xuICAgICAgICAgICAgICAgICAgICB2YXIgdmFyaWFibGVPclJ1bGUgPSBwZWVrU3RyaW5nKFwiOiAsO3t9KClbXS89J1xcXCJcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhcmlhYmxlT3JSdWxlLm1hdGNoKC9bIDpdJC8pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSBoYXZlIGEgdmFyaWFibGUgb3IgcHNldWRvLWNsYXNzLCBhZGQgaXQgYW5kIGluc2VydCBvbmUgc3BhY2UgYmVmb3JlIGNvbnRpbnVpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhcmlhYmxlT3JSdWxlID0gZWF0U3RyaW5nKFwiOiBcIikucmVwbGFjZSgvXFxzJC8sICcnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyh2YXJpYWJsZU9yUnVsZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHZhcmlhYmxlT3JSdWxlID0gdmFyaWFibGVPclJ1bGUucmVwbGFjZSgvXFxzJC8sICcnKTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBtaWdodCBiZSBhIG5lc3RpbmcgYXQtcnVsZVxuICAgICAgICAgICAgICAgICAgICBpZiAodmFyaWFibGVPclJ1bGUgaW4gdGhpcy5ORVNURURfQVRfUlVMRSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmVzdGVkTGV2ZWwgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YXJpYWJsZU9yUnVsZSBpbiB0aGlzLkNPTkRJVElPTkFMX0dST1VQX1JVTEUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRlcmluZ0NvbmRpdGlvbmFsR3JvdXAgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJyMnICYmIHBlZWsoKSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgcHJlc2VydmVTaW5nbGVTcGFjZShpc0FmdGVyU3BhY2UpO1xuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhlYXRTdHJpbmcoJ30nKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAneycpIHtcbiAgICAgICAgICAgICAgICBpZiAocGVlayh0cnVlKSA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgICAgIGVhdFdoaXRlc3BhY2UoKTtcbiAgICAgICAgICAgICAgICAgICAgbmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKFwie31cIik7XG4gICAgICAgICAgICAgICAgICAgIGlmICghZWF0V2hpdGVzcGFjZSh0cnVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKG5ld2xpbmVzRnJvbUxhc3RXU0VhdCA8IDIgJiYgbmV3bGluZV9iZXR3ZWVuX3J1bGVzICYmIGluZGVudExldmVsID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQuYWRkX25ld19saW5lKHRydWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaW5kZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoY2gpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWVhdFdoaXRlc3BhY2UodHJ1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIHdoZW4gZW50ZXJpbmcgY29uZGl0aW9uYWwgZ3JvdXBzLCBvbmx5IHJ1bGVzZXRzIGFyZSBhbGxvd2VkXG4gICAgICAgICAgICAgICAgICAgIGlmIChlbnRlcmluZ0NvbmRpdGlvbmFsR3JvdXApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVudGVyaW5nQ29uZGl0aW9uYWxHcm91cCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5zaWRlUnVsZSA9IChpbmRlbnRMZXZlbCA+IG5lc3RlZExldmVsKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG90aGVyd2lzZSwgZGVjbGFyYXRpb25zIGFyZSBhbHNvIGFsbG93ZWRcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc2lkZVJ1bGUgPSAoaW5kZW50TGV2ZWwgPj0gbmVzdGVkTGV2ZWwpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgb3V0ZGVudCgpO1xuICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUoKTtcbiAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoY2gpO1xuICAgICAgICAgICAgICAgIGluc2lkZVJ1bGUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBpbnNpZGVQcm9wZXJ0eVZhbHVlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaWYgKG5lc3RlZExldmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIG5lc3RlZExldmVsLS07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCFlYXRXaGl0ZXNwYWNlKHRydWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAobmV3bGluZXNGcm9tTGFzdFdTRWF0IDwgMiAmJiBuZXdsaW5lX2JldHdlZW5fcnVsZXMgJiYgaW5kZW50TGV2ZWwgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSh0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSBcIjpcIikge1xuICAgICAgICAgICAgICAgIGVhdFdoaXRlc3BhY2UoKTtcbiAgICAgICAgICAgICAgICBpZiAoKGluc2lkZVJ1bGUgfHwgZW50ZXJpbmdDb25kaXRpb25hbEdyb3VwKSAmJlxuICAgICAgICAgICAgICAgICAgICAhKGxvb2tCYWNrKFwiJlwiKSB8fCBmb3VuZE5lc3RlZFBzZXVkb0NsYXNzKCkpICYmXG4gICAgICAgICAgICAgICAgICAgICFsb29rQmFjayhcIihcIikpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gJ3Byb3BlcnR5OiB2YWx1ZScgZGVsaW1pdGVyXG4gICAgICAgICAgICAgICAgICAgIC8vIHdoaWNoIGNvdWxkIGJlIGluIGEgY29uZGl0aW9uYWwgZ3JvdXAgcXVlcnlcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKCc6Jyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghaW5zaWRlUHJvcGVydHlWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5zaWRlUHJvcGVydHlWYWx1ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHNhc3MvbGVzcyBwYXJlbnQgcmVmZXJlbmNlIGRvbid0IHVzZSBhIHNwYWNlXG4gICAgICAgICAgICAgICAgICAgIC8vIHNhc3MgbmVzdGVkIHBzZXVkby1jbGFzcyBkb24ndCB1c2UgYSBzcGFjZVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIHByZXNlcnZlIHNwYWNlIGJlZm9yZSBwc2V1ZG9jbGFzc2VzL3BzZXVkb2VsZW1lbnRzLCBhcyBpdCBtZWFucyBcImluIGFueSBjaGlsZFwiXG4gICAgICAgICAgICAgICAgICAgIGlmIChsb29rQmFjayhcIiBcIikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChwZWVrKCkgPT09IFwiOlwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwc2V1ZG8tZWxlbWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKFwiOjpcIik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwc2V1ZG8tY2xhc3NcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50X3N0cmluZygnOicpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ1wiJyB8fCBjaCA9PT0gJ1xcJycpIHtcbiAgICAgICAgICAgICAgICBwcmVzZXJ2ZVNpbmdsZVNwYWNlKGlzQWZ0ZXJTcGFjZSk7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGVhdFN0cmluZyhjaCkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJzsnKSB7XG4gICAgICAgICAgICAgICAgaW5zaWRlUHJvcGVydHlWYWx1ZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhjaCk7XG4gICAgICAgICAgICAgICAgaWYgKCFlYXRXaGl0ZXNwYWNlKHRydWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnKCcpIHsgLy8gbWF5IGJlIGEgdXJsXG4gICAgICAgICAgICAgICAgaWYgKGxvb2tCYWNrKFwidXJsXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhjaCk7XG4gICAgICAgICAgICAgICAgICAgIGVhdFdoaXRlc3BhY2UoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoICE9PSAnKScgJiYgY2ggIT09ICdcIicgJiYgY2ggIT09ICdcXCcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGVhdFN0cmluZygnKScpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zLS07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwYXJlbkxldmVsKys7XG4gICAgICAgICAgICAgICAgICAgIHByZXNlcnZlU2luZ2xlU3BhY2UoaXNBZnRlclNwYWNlKTtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgICAgICAgICAgZWF0V2hpdGVzcGFjZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICcpJykge1xuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhjaCk7XG4gICAgICAgICAgICAgICAgcGFyZW5MZXZlbC0tO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJywnKSB7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgICAgICBpZiAoIWVhdFdoaXRlc3BhY2UodHJ1ZSkgJiYgc2VsZWN0b3JTZXBhcmF0b3JOZXdsaW5lICYmICFpbnNpZGVQcm9wZXJ0eVZhbHVlICYmIHBhcmVuTGV2ZWwgPCAxKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKChjaCA9PT0gJz4nIHx8IGNoID09PSAnKycgfHwgY2ggPT09ICd+JykgJiZcbiAgICAgICAgICAgICAgICAhaW5zaWRlUHJvcGVydHlWYWx1ZSAmJiBwYXJlbkxldmVsIDwgMSkge1xuICAgICAgICAgICAgICAgIC8vaGFuZGxlIGNvbWJpbmF0b3Igc3BhY2luZ1xuICAgICAgICAgICAgICAgIGlmIChzcGFjZV9hcm91bmRfY29tYmluYXRvcikge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgICAgICAgICAgZWF0V2hpdGVzcGFjZSgpO1xuICAgICAgICAgICAgICAgICAgICAvLyBzcXVhc2ggZXh0cmEgd2hpdGVzcGFjZVxuICAgICAgICAgICAgICAgICAgICBpZiAoY2ggJiYgd2hpdGVSZS50ZXN0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2ggPSAnJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICddJykge1xuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhjaCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnWycpIHtcbiAgICAgICAgICAgICAgICBwcmVzZXJ2ZVNpbmdsZVNwYWNlKGlzQWZ0ZXJTcGFjZSk7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICc9JykgeyAvLyBubyB3aGl0ZXNwYWNlIGJlZm9yZSBvciBhZnRlclxuICAgICAgICAgICAgICAgIGVhdFdoaXRlc3BhY2UoKTtcbiAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoJz0nKTtcbiAgICAgICAgICAgICAgICBpZiAod2hpdGVSZS50ZXN0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICBjaCA9ICcnO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwcmVzZXJ2ZVNpbmdsZVNwYWNlKGlzQWZ0ZXJTcGFjZSk7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBzd2VldENvZGUgPSBvdXRwdXQuZ2V0X2NvZ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aGlzLnRyaW0gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgd2hpbGUgKHRoaXMubGFzdCgpID09PSAnICcpIHtcbiAgICAgICAgICAgIF9pdGVtcy5wb3AoKTtcbiAgICAgICAgICAgIF9jaGFyYWN0ZXJfY291bnQgLT0gMTtcbiAgICAgICAgfVxuICAgICAgICBfZW1wdHkgPSBfaXRlbXMubGVuZ3RoID09PSAwO1xuICAgIH07XG5cbiAgICB0aGlzLnRvU3RyaW5nID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciByZXN1bHQgPSAnJztcbiAgICAgICAgaWYgKCF0aGlzLl9lbXB0eSkge1xuICAgICAgICAgICAgaWYgKF9pbmRlbnRfY291bnQgPj0gMCkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHBhcmVudC5pbmRlbnRfY2FjaGVbX2luZGVudF9jb3VudF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXN1bHQgKz0gX2l0ZW1zLmpvaW4oJycpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gT3V0cHV0KGluZGVudF9zdHJpbmcsIGJhc2VJbmRlbnRTdHJpbmcpIHtcbiAgICBiYXNlSW5kZW50U3RyaW5nID0gYmFzZUluZGVudFN0cmluZyB8fCAnJztcbiAgICB0aGlzLmluZGVudF9jYWNoZSA9IFtiYXNlSW5kZW50U3RyaW5nXTtcbiAgICB0aGlzLmJhc2VJbmRlbnRMZW5ndGggPSBiYXNlSW5kZW50U3RyaW5nLmxlbmd0aDtcbiAgICB0aGlzLmluZGVudF9sZW5ndGggPSBpbmRlbnRfc3RyaW5nLmxlbmd0aDtcbiAgICB0aGlzLnJhdyA9IGZhbHNlO1xuXG4gICAgdmFyIGxpbmVzID0gW107XG4gICAgdGhpcy5iYXNlSW5kZW50U3RyaW5nID0gYmFzZUluZGVudFN0cmluZztcbiAgICB0aGlzLmluZGVudF9zdHJpbmcgPSB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9IGFjb3JuLmFsbExpbmVCcmVha3M7XG5cbi8vIGZ1bmN0aW9uIHRyaW0ocykge1xuLy8gICAgIHJldHVybiBzLnJlcGxhY2UoL15cXHMrfFxccyskL2csICcnKTtcbi8vIH1cblxuZnVuY3Rpb24gbHRyaW0ocykge1xuICAgIHJldHVybiBzLnJlcGxhY2UoL15cXHMrL2csICcnKTtcbn1cblxuZnVuY3Rpb24gcnRyaW0ocykge1xuICAgIHJldHVybiBzLnJlcGxhY2UoL1xccyskL2csICcnKTtcbn1cblxuZnVuY3Rpb24gQmVhdXRpZmllcihodG1sX3NvdXJjZSwgb3B0aW9ucywganNfYmVhdXRpZnksIGNzc19iZWF1dGlmeSkge1xuICAgIC8vV3JhcHBlciBmdW5jdGlvbiB0byBpbnZva2UgYWxsIHRoZSBuZWNlc3NhcnkgY29uc3RydWN0b3JzIGFuZCBkZWFsIHdpdGggdGhlIG91dHB1dC5cbiAgICBodG1sX3NvdXJjZSA9IGh0bWxfc291cmNlIHx8ICcnO1xuXG4gICAgdmFyIG11bHRpX3BhcnNlcixcbiAgICAgICAgaW5kZW50X2lubmVyX2h0bWwsXG4gICAgICAgIGluZGVudF9ib2R5X2lubmVyX2h0bWwsXG4gICAgICAgIGluZGVudF9oZWFkX2lubmVyX2h0bWwsXG4gICAgICAgIGluZGVudF9zaXplLFxuICAgICAgICBpbmRlbnRfY2hhcmFjdGVyLFxuICAgICAgICB3cmFwX2xpbmVfbGVuZ3RoLFxuICAgICAgICBicmFjZV9zdHlsZSxcbiAgICAgICAgdW5mb3JtYXR0ZWQsXG4gICAgICAgIGNvbnRlbnRfdW5mb3JtYXR0ZWQsXG4gICAgICAgIHByZXNlcnZlX25ld2xpbmVzLFxuICAgICAgICBtYXhfcHJlc2VydmVfbmV3bGluZXMsXG4gICAgICAgIGluZGVudF9oYW5kbGViYXJzLFxuICAgICAgICB3cmFwX2F0dHJpYnV0ZXMsXG4gICAgICAgIHdyYXBfYXR0cmlidXRlc19pbmRlbnRfc2l6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IHNpbmdsZV90b2tlbjogb3B0aW9ucy52b2lkX2VsZW1lbnRzIHx8IFtcbiAgICAgICAgICAgICAgICAvLyBIVExNIHZvaWQgZWxlbWVudHMgLSBha2Egc2VsZi1jbG9zaW5nIHRhZ3MgLSBha2Egc2luZ2xldG9uc1xuICAgICAgICAgICAgICAgIC8vIGh0dHBzOi8vd3d3LnczLm9yZy9odG1sL3dnL2RyYWZ0cy9odG1sL21hc3Rlci9zeW50YXguaHRtbCN2b2lkLWVsZW1lbnRzXG4gICAgICAgICAgICAgICAgJ2FyZWEnLCAnYmFzZScsICdicicsICdjb2wnLCAnZW1iZWQnLCAnaHInLCAnaW1nJywgJ2lucHV0JywgJ2tleWdlbicsXG4gICAgICAgICAgICAgICAgJ2xpbmsnLCAnbWVudWl0ZW0nLCAnbWV0YScsICdwYXJhbScsICdzb3VyY2UnLCAndHJhY2snLCAnd2JyJyxcbiAgICAgICAgICAgICAgICAvLyBOT1RFOiBPcHRpb25hbCB0YWdzIC0gYXJlIG5vdCB1bmRlcnN0b29kLlxuICAgICAgICAgICAgICAgIC8vIGh0dHBzOi8vd3d3LnczLm9yZy9UUi9odG1sNS9zeW50YXguaHRtbCNvcHRpb25hbC10YWdzXG4gICAgICAgICAgICAgICAgLy8gVGhlIHJ1bGVzIGZvciBvcHRpb25hbCB0YWdzIGFyZSB0b28gY29tcGxleCBmb3IgYSBzaW1wbGUgbGlzdFxuICAgICAgICAgICAgICAgIC8vIEFsc28sIHRoZSBjb250ZW50IG9mIHRoZXNlIHRhZ3Mgc2hvdWxkIHN0aWxsIGJlIGluZGVudGVkIGluIG1hbnkgY2FzZXMuXG4gICAgICAgICAgICAgICAgLy8gJ2xpJyBpcyBhIGdvb2QgZXhtcGxlLlxuXG4gICAgICAgICAgICAgICAgLy8gRG9jdHlwZSBhbmQgeG1sIGVsZW1lbnRzXG4gICAgICAgICAgICAgICAgJyFkb2N0eXBlJywgJz94bWwnLFxuICAgICAgICAgICAgICAgIC8vID9waHAgdGFnXG4gICAgICAgICAgICAgICAgJz9waHAnLFxuICAgICAgICAgICAgICAgIC8vIG90aGVyIHRhZ3MgdGhhdCB3ZXJlIGluIHRoaXMgbGlzdCwga2VlcGluZyBqdXN0IGluIGNhc2VcbiAgICAgICAgICAgICAgICAnYmFzZWZvbnQnLCAnaXNpbmRleCdcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICBleHRyYV9saW5lcnM6IGV4dHJhX2xpbmVycywgLy9mb3IgdGFncyB0aGF0IG5lZWQgYSBsaW5lIG9mIHdoaXRlc3BhY2UgYmVmb3JlIHRoZW1cbiAgICAgICAgICAgIGluX2FycmF5OiBmdW5jdGlvbih3aGF0LCBhcnIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAod2hhdCA9PT0gYXJyW2ldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gUmV0dXJuIHRydWUgaWYgdGhlIGdpdmVuIHRleHQgaXMgY29tcG9zZWQgZW50aXJlbHkgb2Ygd2hpdGVzcGFjZS5cbiAgICAgICAgdGhpcy5pc193aGl0ZXNwYWNlID0gZnVuY3Rpb24odGV4dCkge1xuICAgICAgICAgICAgZm9yICh2YXIgbiA9IDA7IG4gPCB0ZXh0Lmxlbmd0aDsgbisrKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLlV0aWxzLmluX2FycmF5KHRleHQuY2hhckF0KG4pLCB0aGlzLlV0aWxzLndoaXRlc3BhY2UpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLnRyYXZlcnNlX3doaXRlc3BhY2UgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBpbnB1dF9jaGFyID0gJyc7XG5cbiAgICAgICAgICAgIGlucHV0X2NoYXIgPSB0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcyk7XG4gICAgICAgICAgICBpZiAodGhpcy5VdGlscy5pbl9hcnJheShpbnB1dF9jaGFyLCB0aGlzLlV0aWxzLndoaXRlc3BhY2UpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5uZXdsaW5lcyA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuVXRpbHMuaW5fYXJyYXkoaW5wdXRfY2hhciwgdGhpcy5VdGlscy53aGl0ZXNwYWNlKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocHJlc2VydmVfbmV3bGluZXMgJiYgaW5wdXRfY2hhciA9PT0gJ1xcbicgJiYgdGhpcy5uZXdsaW5lcyA8PSBtYXhfcHJlc2VydmVfbmV3bGluZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmV3bGluZXMgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucG9zKys7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0X2NoYXIgPSB0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIEFwcGVuZCBhIHNwYWNlIHRvIHRoZSBnaXZlbiBjb250ZW50IChzdHJpbmcgYXJyYXkpIG9yLCBpZiB3ZSBhcmVcbiAgICAgICAgLy8gYXQgdGhlIHdyYXBfbGluZV9sZW5ndGgsIGFwcGVuZCBhIG5ld2xpbmUvaW5kZW50YXRpb24uXG4gICAgICAgIC8vIHJldHVybiB0cnVlIGlmIGEgbmV3bGluZSB3YXMgYWRkZWQsIGZhbHNlIGlmIGEgc3BhY2Ugd2FzIGFkZGVkXG4gICAgICAgIHRoaXMuc3BhY2Vfb3Jfd3JhcCA9IGZ1bmN0aW9uKGNvbnRlbnQpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmxpbmVfY2hhcl9jb3VudCA+PSB0aGlzLndyYXBfbGluZV9sZW5ndGgpIHsgLy9pbnNlcnQgYSBsaW5lIHdoZW4gdGhlIHdyYXBfbGluZV9sZW5ndGggaXMgcmVhY2hlZFxuICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfbmV3bGluZShmYWxzZSwgY29udGVudCk7XG4gICAgICAgICAgICAgICAgdGhpcy5wcmludF9pbmRlbnRhdGlvbihjb250ZW50KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5saW5lX2NoYXJfY291bnQrKztcbiAgICAgICAgICAgICAgICBjb250ZW50LnB1c2goJyAnKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5nZXRfY29udGVudCA9IGZ1bmN0aW9uKCkgeyAvL2Z1bmN0aW9uIHRvIGNhcHR1cmUgcmVndWxhciBjb250ZW50IGJldHdlZW4gdGFnc1xuICAgICAgICAgICAgdmFyIGlucHV0X2NoYXIgPSAnJyxcbiAgICAgICAgICAgICAgICBjb250ZW50ID0gW10sXG4gICAgICAgICAgICAgICAgaGFuZGxlYmFyc1N0YXJ0ZWQgPSAwO1xuXG4gICAgICAgICAgICB3aGlsZSAodGhpcy5pbnB1dC5jaGFyQXQodGhpcy5wb3MpICE9PSAnPCcgfHwgaGFuZGxlYmFyc1N0YXJ0ZWQgPT09IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5pbnB1dC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnQubGVuZ3RoID8gY29udGVudC5qb2luKCcnKSA6IFsnJywgJ1RLX0VPRiddO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChoYW5kbGViYXJzU3RhcnRlZCA8IDIgJiYgdGhpcy50cmF2ZXJzZV93aGl0ZXNwYWNlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGFjZV9vcl93cmFwKGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpbnB1dF9jaGFyID0gdGhpcy5pbnB1dC5jaGFyQXQodGhpcy5wb3MpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGluZGVudF9oYW5kbGViYXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dF9jaGFyID09PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZWJhcnNTdGFydGVkICs9IDE7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaGFuZGxlYmFyc1N0YXJ0ZWQgPCAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGViYXJzU3RhcnRlZCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXRfY2hhciA9PT0gJ30nICYmIGhhbmRsZWJhcnNTdGFydGVkID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhbmRsZWJhcnNTdGFydGVkLS0gPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBIYW5kbGViYXJzIHBhcnNpbmcgaXMgY29tcGxpY2F0ZWQuXG4gICAgICAgICAgICAgICAgICAgIC8vIHt7I2Zvb319IGFuZCB7ey9mb299fSBhcmUgZm9ybWF0dGVkIHRhZ3MuXG4gICAgICAgICAgICAgICAgICAgIC8vIHt7c29tZXRoaW5nfX0gc2hvdWxkIGdldCB0cmVhdGVkIGFzIGNvbnRlbnQsIGV4Y2VwdDpcbiAgICAgICAgICAgICAgICAgICAgLy8ge3tlbHNlfX0gc3BlY2lmaWNhbGx5IGJlaGF2ZXMgbGlrZSB7eyNpZn19IGFuZCB7ey9pZn19XG4gICAgICAgICAgICAgICAgICAgIHZhciBwZWVrMyA9IHRoaXMuaW5wdXQuc3Vic3RyKHRoaXMucG9zLCAzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBlZWszID09PSAne3sjJyB8fCBwZWVrMyA9PT0gJ3t7LycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZXNlIGFyZSB0YWdzIGFuZCBub3QgY29udGVudC5cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBlZWszID09PSAne3shJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFt0aGlzLmdldF90YWcoKSwgJ1RLX1RBR19IQU5ETEVCQVJTX0NPTU1FTlQnXTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmlucHV0LnN1YnN0cih0aGlzLnBvcywgMikgPT09ICd7eycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmdldF90YWcodHJ1ZSkgPT09ICd7e2Vsc2V9fScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMucG9zKys7XG4gICAgICAgICAgICAgICAgdGhpcy5saW5lX2NoYXJfY291bnQrKztcbiAgICAgICAgICAgICAgICBjb250ZW50LnB1c2goaW5wdXRfY2hhcik7IC8vbGV0dGVyIGF0LWEtdGltZSAob3Igc3RyaW5nKSBpbnNlcnRlZCB0byBhbiBhcnJheVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnQubGVuZ3RoID8gY29udGVudC5qb2luKCcnKSA6ICcnO1xuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMuZ2V0X2NvbnRlbnRzX3RvID0gZnVuY3Rpb24obmFtZSkgeyAvL2dldCB0aGUgZnVsbCBjb250ZW50IG9mIGEgc2NyaXB0IG9yIHN0eWxlIHRvIHBhc3MgdG8ganNfYmVhdXRpZnlcbiAgICAgICAgICAgIGlmICh0aGlzLnBvcyA9PT0gdGhpcy5pbnB1dC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gWycnLCAnVEtfRU9GJ107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgY29udGVudCA9ICcnO1xuICAgICAgICAgICAgdmFyIHJlZ19tYXRjaCA9IG5ldyBSZWdFeHAoJzwvJyArIG5hbWUgKyAnXFxcXHMqPicsICdpZ20nKTtcbiAgICAgICAgICAgIHJlZ19tYXRjaC5sYXN0SW5kZXggPSB0aGlzLnBvcztcbiAgICAgICAgICAgIHZhciByZWdfYXJyYXkgPSByZWdfbWF0Y2guZXhlYyh0aGlzLmlucHV0KTtcbiAgICAgICAgICAgIHZhciBlbmRfc2NyaXB0ID0gcmVnX2FycmF5ID8gcmVnX2FycmF5LmluZGV4IDogdGhpcy5pbnB1dC5sZW5ndGg7IC8vYWJzb2x1dGUgZW5kIG9mIHNjcmlwdFxuICAgICAgICAgICAgaWYgKHRoaXMucG9zIDwgZW5kX3NjcmlwdCkg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c1t0ZW1wX3BhcmVudCArICdwYXJlbnQnXTsgLy9vdGhlcndpc2Uga2VlcCBvbiBjbGltYmluZyB1cCB0aGUgRE9NIFRyZWVcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRlbXBfcGFyZW50KSB7IC8vaWYgd2UgY2F1Z2h0IHNvbWV0aGluZ1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluZGVudF9sZXZlbCA9IHRoaXMudGFnc1t0YWcgKyB0aGlzLnRhZ3NbdGFnICsgJ2NvdW50J11dOyAvL3NldCB0aGUgaW5kZW50X2xldmVsIGFjY29yZGluZ2x5XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFncy5wYXJlbnQgPSB0aGlzLnRhZ3NbdGVtcF9wYXJlbnQgKyAncGFyZW50J107IC8vYW5kIHNldCB0aGUgY3VycmVudCBwYXJlbnRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMudGFnc1t0YWcgKyB0aGlzLnRhZ3NbdGFnICsgJ2NvdW50J10gKyAncGFyZW50J107IC8vZGVsZXRlIHRoZSBjbG9zZWQgdGFncyBwYXJlbnQgcmVmZXJlbmNlLi4uXG4gICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMudGFnc1t0YWcgKyB0aGlzLnRhZ3NbdGFnICsgJ2NvdW50J11dOyAvLy4uLmFuZCB0aGUgdGFnIGl0c2VsZlxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnRhZ3NbdGFnICsgJ2NvdW50J10gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMudGFnc1t0YWcgKyAnY291bnQnXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRhZ3NbdGFnICsgJ2NvdW50J10tLTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5pbmRlbnRfdG9fdGFnID0gZnVuY3Rpb24odGFnKSB7XG4gICAgICAgICAgICAvLyBNYXRjaCB0aGUgaW5kZW50YXRpb24gbGV2ZWwgdG8gdGhlIGxhc3QgdXNlIG9mIHRoaXMgdGFnLCBidXQgZG9uJ3QgcmVtb3ZlIGl0LlxuICAgICAgICAgICAgaWYgKCF0aGlzLnRhZ3NbdGFnICsgJ2NvdW50J10pIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgdGVtcF9wYXJlbnQgPSB0aGlzLnRhZ3MucGFyZW50O1xuICAgICAgICAgICAgd2hpbGUgKHRlbXBfcGFyZW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKHRhZyArIHRoaXMudGFnc1t0YWcgKyAnY291bnQnXSA9PT0gdGVtcF9wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRlbXBfcGFyZW50ID0gdGhpcy50YWdzW3RlbXBfcGFyZW50ICsgJ3BhcmVudCddO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRlbXBfcGFyZW50KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbmRlbnRfbGV2ZWwgPSB0aGlzLnRhZ3NbdGFnICsgdGhpcy50YWdzW3RhZyArICdjb3VudCddXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLmdldF90YWcgPSBmdW5jdGlvbihwZWVrKSB7IC8vZnVuY3Rpb24gdG8gZ2V0IGEgZnVsbCB0YWcgYW5kIHBhcnNlIGl0cyB0eXBlXG4gICAgICAgICAgICB2YXIgaW5wdXRfY2hhciA9ICcnLFxuICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBbXSxcbiAgICAgICAgICAgICAgICBjb21tZW50ID0gJycsXG4gICAgICAgICAgICAgICAgc3BhY2UgPSBmYWxzZSxcbiAgICAgICAgICAgICAgICBmaXJzdF9hdHRyID0gdHJ1ZSxcbiAgICAgICAgICAgICAgICBoYXNfd3JhcHBlZF9hdHRycyA9IGZhbHNlLFxuICAgICAgICAgICAgICAgIHRhZ19zdGFydCwgdGFnX2VuZCxcbiAgICAgICAgICAgICAgICB0YWdfc3RhcnRfY2hhcixcbiAgICAgICAgICAgICAgICBvcmlnX3BvcyA9IHRoaXMucG9zLFxuICAgICAgICAgICAgICAgIG9yaWdfbGluZV9jaGFyX2NvdW50ID0gdGhpcy5saW5lX2NoYXJfY291bnQsXG4gICAgICAgICAgICAgICAgaXNfdGFnX2Nsb3NlZCA9IGZhbHNlLFxuICAgICAgICAgICAgICAgIHRhaWw7XG5cbiAgICAgICAgICAgIHBlZWsgPSBwZWVrICE9PSB1bmRlZmluZWQgPyBwZWVrIDogZmFsc2U7XG5cbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5pbnB1dC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBlZWspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucG9zID0gb3JpZ19wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCA9IG9yaWdfbGluZV9jaGFyX2NvdW50O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb250ZW50Lmxlbmd0aCA/IGNvbnRlbnQuam9pbignJykgOiBbJycsICdUS19FT0YnXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpbnB1dF9jaGFyID0gdGhpcy5pbnB1dC5jaGFyQXQodGhpcy5wb3MpO1xuICAgICAgICAgICAgICAgIHRoaXMucG9zKys7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5VdGlscy5pbl9hcnJheShpbnB1dF9jaGFyLCB0aGlzLlV0aWxzLndoaXRlc3BhY2UpKSB7IC8vZG9uJ3Qgd2FudCB0byBpbnNlcnQgdW5uZWNlc3Nhcnkgc3BhY2VcbiAgICAgICAgICAgICAgICAgICAgc3BhY2UgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5wdXRfY2hhciA9PT0gXCInXCIgfHwgaW5wdXRfY2hhciA9PT0gJ1wiJykge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dF9jaGFyICs9IHRoaXMuZ2V0X3VuZm9ybWF0dGVkKGlucHV0X2NoYXIpO1xuICAgICAgICAgICAgICAgICAgICBzcGFjZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0X2NoYXIgPT09ICc9JykgeyAvL25vIHNwYWNlIGJlZm9yZSA9XG4gICAgICAgICAgICAgICAgICAgIHNwYWNlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRhaWwgPSB0aGlzLmlucHV0LnN1YnN0cih0aGlzLnBvcyAtIDEpO1xuICAgICAgICAgICAgICAgIGlmIChpc193cmFwX2F0dHJpYnV0ZXNfZm9yY2VfZXhwYW5kX211bHRpbGluZSAmJiBoYXNfd3JhcHBlZF9hdHRycyAmJiAhaXNfdGFnX2Nsb3NlZCAmJiAoaW5wdXRfY2hhciA9PT0gJz4nIHx8IGlucHV0X2NoYXIgPT09ICcvJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhaWwubWF0Y2goL15cXC8/XFxzKj4vKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3BhY2UgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzX3RhZ19jbG9zZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcmludF9uZXdsaW5lKGZhbHNlLCBjb250ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfaW5kZW50YXRpb24oY29udGVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRlbnQubGVuZ3RoICYmIGNvbnRlbnRbY29udGVudC5sZW5ndGggLSAxXSAhPT0gJz0nICYmIGlucHV0X2NoYXIgIT09ICc+JyAmJiBzcGFjZSkge1xuICAgICAgICAgICAgICAgICAgICAvL25vIHNwYWNlIGFmdGVyID0gb3IgYmVmb3JlID5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHdyYXBwZWQgPSB0aGlzLnNwYWNlX29yX3dyYXAoY29udGVudCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbmRlbnRBdHRycyA9IHdyYXBwZWQgJiYgaW5wdXRfY2hhciAhPT0gJy8nICYmICFpc193cmFwX2F0dHJpYnV0ZXNfZm9yY2U7XG4gICAgICAgICAgICAgICAgICAgIHNwYWNlID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzX3dyYXBfYXR0cmlidXRlc19mb3JjZSAmJiBpbnB1dF9jaGFyICE9PSAnLycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmb3JjZV9maXJzdF9hdHRyX3dyYXAgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc193cmFwX2F0dHJpYnV0ZXNfZm9yY2VfZXhwYW5kX211bHRpbGluZSAmJiBmaXJzdF9hdHRyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlzX29ubHlfYXR0cmlidXRlID0gdGFpbC5tYXRjaCgvXlxcUyooPVwiKFteXCJdfFxcXFxcIikqXCIpP1xccypcXC8/XFxzKj4vKSAhPT0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JjZV9maXJzdF9hdHRyX3dyYXAgPSAhaXNfb25seV9hdHRyaWJ1dGU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWZpcnN0X2F0dHIgfHwgZm9yY2VfZmlyc3RfYXR0cl93cmFwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcmludF9uZXdsaW5lKGZhbHNlLCBjb250ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByaW50X2luZGVudGF0aW9uKGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGVudEF0dHJzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZW50QXR0cnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhc193cmFwcGVkX2F0dHJzID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy9pbmRlbnQgYXR0cmlidXRlcyBhbiBhdXRvLCBmb3JjZWQsIG9yIGZvcmNlZC1hbGlnbiBsaW5lLXdyYXBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhbGlnbm1lbnRfc2l6ZSA9IHdyYXBfYXR0cmlidXRlc19pbmRlbnRfc2l6ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc193cmFwX2F0dHJpYnV0ZXNfZm9yY2VfYWxpZ25lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWdubWVudF9zaXplID0gY29udGVudC5pbmRleE9mKCcgJykgKyAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBjb3VudCA9IDA7IGNvdW50IDwgYWxpZ25tZW50X3NpemU7IGNvdW50KyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IGV2ZXIgZnVydGhlciBpbmRlbnQgd2l0aCBzcGFjZXMgc2luY2Ugd2UncmUgdHJ5aW5nIHRvIGFsaWduIGNoYXJhY3RlcnNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50LnB1c2goJyAnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoZmlyc3RfYXR0cikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb250ZW50Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRlbnRbaV0gPT09ICcgJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdF9hdHRyID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpbmRlbnRfaGFuZGxlYmFycyAmJiB0YWdfc3RhcnRfY2hhciA9PT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdoZW4gaW5zaWRlIGFuIGFuZ2xlLWJyYWNrZXQgdGFnLCBwdXQgc3BhY2VzIGFyb3VuZFxuICAgICAgICAgICAgICAgICAgICAvLyBoYW5kbGViYXJzIG5vdCBpbnNpZGUgb2Ygc3RyaW5ncy5cbiAgICAgICAgICAgICAgICAgICAgaWYgKChpbnB1dF9jaGFyICsgdGhpcy5pbnB1dC5jaGFyQXQodGhpcy5wb3MpKSA9PT0gJ3t7Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRfY2hhciArPSB0aGlzLmdldF91bmZvcm1hdHRlZCgnfX0nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb250ZW50Lmxlbmd0aCAmJiBjb250ZW50W2NvbnRlbnQubGVuZ3RoIC0gMV0gIT09ICcgJyAmJiBjb250ZW50W2NvbnRlbnQubGVuZ3RoIC0gMV0gIT09ICc8Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0X2NoYXIgPSAnICcgKyBpbnB1dF9jaGFyO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc3BhY2UgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0X2NoYXIgPT09ICc8JyAmJiAhdGFnX3N0YXJ0X2NoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGFnX3N0YXJ0ID0gdGhpcy5wb3MgLSAxO1xuICAgICAgICAgICAgICAgICAgICB0YWdfc3RhcnRfY2hhciA9ICc8JztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5kZW50X2hhbmRsZWJhcnMgJiYgIXRhZ19zdGFydF9jaGFyKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250ZW50Lmxlbmd0aCA+PSAyICYmIGNvbnRlbnRbY29udGVudC5sZW5ndGggLSAxXSA9PT0gJ3snICYmIGNvbnRlbnRbY29udGVudC5sZW5ndGggLSAyXSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXRfY2hhciA9PT0gJyMnIHx8IGlucHV0X2NoYXIgPT09ICcvJyB8fCBpbnB1dF9jaGFyID09PSAnIScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWdfc3RhcnQgPSB0aGlzLnBvcyAtIDM7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZ19zdGFydCA9IHRoaXMucG9zIC0gMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ19zdGFydF9jaGFyID0gJ3snO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5saW5lX2NoYXJfY291bnQrKztcbiAgICAgICAgICAgICAgICBjb250ZW50LnB1c2goaW5wdXRfY2hhcik7IC8vaW5zZXJ0cyBjaGFyYWN0ZXIgYXQtYS10aW1lIChvciBzdHJpbmcpXG5cbiAgICAgICAgICAgICAgICBpZiAoY29udGVudFsxXSAmJiAoY29udGVudFsxXSA9PT0gJyEnIHx8IGNvbnRlbnRbMV0gPT09ICc/JyB8fCBjb250ZW50WzFdID09PSAnJScpKSB7IC8vaWYgd2UncmUgaW4gYSBjb21tZW50LCBkbyBzb21ldGhpbmcgc3BlY2lhbFxuICAgICAgICAgICAgICAgICAgICAvLyBXZSB0cmVhdCBhbGwgY29tbWVudHMgYXMgbGl0ZXJhbHMsIGV2ZW4gbW9yZSB0aGFuIHByZWZvcm1hdHRlZCB0YWdzXG4gICAgICAgICAgICAgICAgICAgIC8vIHdlIGp1c3QgbG9vayBmb3IgdGhlIGFwcHJvcHJpYXRlIGNsb3NlIHRhZ1xuICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gW3RoaXMuZ2V0X2NvbW1lbnQodGFnX3N0YXJ0KV07XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpbmRlbnRfaGFuZGxlYmFycyAmJiBjb250ZW50WzFdICYmIGNvbnRlbnRbMV0gPT09ICd7JyAmJiBjb250ZW50WzJdICYmIGNvbnRlbnRbMl0gPT09ICchJykgeyAvL2lmIHdlJ3JlIGluIGEgY29tbWVudCwgZG8gc29tZXRoaW5nIHNwZWNpYWxcbiAgICAgICAgICAgICAgICAgICAgLy8gV2UgdHJlYXQgYWxsIGNvbW1lbnRzIGFzIG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Zm9ybWF0dGVkXCIgdGFnc1xuICAgICAgICAgICAgICAgIGNvbW1lbnQgPSB0aGlzLmdldF91bmZvcm1hdHRlZCgnPC8nICsgdGFnX2NoZWNrICsgJz4nLCB0YWdfY29tcGxldGUpOyAvLy4uLmRlbGVnYXRlIHRvIGdldF91bmZvcm1hdHRlZCBmdW5jdGlvblxuICAgICAgICAgICAgICAgIGNvbnRlbnQucHVzaChjb21tZW50KTtcbiAgICAgICAgICAgICAgICB0YWdfZW5kID0gdGhpcy5wb3MgLSAxO1xuICAgICAgICAgICAgICAgIHRoaXMudGFnX3R5cGUgPSAnU0lOR0xFJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGFnX2NoZWNrID09PSAnc2NyaXB0JyAmJlxuICAgICAgICAgICAgICAgICh0YWdfY29tcGxldGUuc2VhcmNoKCd0eXBlJykgPT09IC0xIHx8XG4gICAgICAgICAgICAgICAgICAgICh0YWdfY29tcGxldGUuc2VhcmNoKCd0eXBlJykgPiAtMSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgdGFnX2NvbXBsZXRlLnNlYXJjaCgvXFxiKHRleHR8YXBwbGljYXRpb258ZG9qbylcXC8oeC0pPyhqYXZhc2NyaXB0fGVjbWFzY3JpcHR8anNjcmlwdHxsaXZlc2NyaXB0fChsZFxcKyk/anNvbnxtZXRob2R8YXNwZWN0KS8pID4gLTEpKSkge1xuICAgICAgICAgICAgICAgIGlmICghcGVlaykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlY29yZF90YWcodGFnX2NoZWNrKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50YWdfdHlwZSA9ICdTQ1JJUFQnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGFnX2NoZWNrID09PSAnc3R5bGUnICYmXG4gICAgICAgICAgICAgICAgKHRhZ19jb21wbGV0ZS5zZWFyY2goJ3R5cGUnKSA9PT0gLTEgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRhZ19jb21wbGV0ZS5zZWFyY2goJ3R5cGUnKSA+IC0xICYmIHRhZ19jb21wbGV0ZS5zZWFyY2goJ3RleHQvY3NzJykgPiAtMSkpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFwZWVrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVjb3JkX3RhZyh0YWdfY2hlY2spO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRhZ190eXBlID0gJ1NUWUxFJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRhZ19jaGVjay5jaGFyQXQoMCkgPT09ICchJykgeyAvL3BlZWsgZm9yIDwhIGNvbW1lbnRcbiAgICAgICAgICAgICAgICAvLyBmb3IgY29tbWVudHMgY29udGVudCBpcyBhbHJlYWR5IGNvcnJlY3QuXG4gICAgICAgICAgICAgICAgaWYgKCFwZWVrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFnX3R5cGUgPSAnU0lOR0xFJztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50cmF2ZXJzZV93aGl0ZXNwYWNlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICghcGVlaykge1xuICAgICAgICAgICAgICAgIGlmICh0YWdfY2hlY2suY2hhckF0KDApID09PSAnLycpIHsgLy90aGlzIHRhZyBpcyBhIGRvdWJsZSB0YWcgc28gY2hlY2sgZm9yIHRhZy1lbmRpbmdcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXRyaWV2ZV90YWcodGFnX2NoZWNrLnN1YnN0cmluZygxKSk7IC8vcmVtb3ZlIGl0IGFuZCBhbGwgYW5jZXN0b3JzXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFnX3R5cGUgPSAnRU5EJztcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvL290aGVyd2lzZSBpdCdzIGEgc3RhcnQtdGFnXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVjb3JkX3RhZyh0YWdfY2hlY2spOyAvL3B1c2ggaXQgb24gdGhlIHRhZyBzdGFja1xuICAgICAgICAgICAgICAgICAgICBpZiAodGFnX2NoZWNrLnRvTG93ZXJDYXNlKCkgIT09ICdodG1sJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbmRlbnRfY29udGVudCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy50YWdfdHlwZSA9ICdTVEFSVCc7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQWxsb3cgcHJlc2VydmluZyBvZiBuZXdsaW5lcyBhZnRlciBhIHN0YXJ0IG9yIGVuZCB0YWdcbiAgICAgICAgICAgICAgICBpZiAodGhpcy50cmF2ZXJzZV93aGl0ZXNwYWNlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGFjZV9vcl93cmFwKGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLlV0aWxzLmluX2FycmF5KHRhZ19jaGVjaywgdGhpcy5VdGlscy5leHRyYV9saW5lcnMpKSB7IC8vY2hlY2sgaWYgdGhpcyBkb3VibGUgbmVlZHMgYW4gZXh0cmEgbGluZVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnByaW50X25ld2xpbmUoZmFsc2UsIHRoaXMub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMub3V0cHV0Lmxlbmd0aCAmJiB0aGlzLm91dHB1dFt0aGlzLm91dHB1dC5sZW5ndGggLSAyXSAhPT0gJ1xcbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfbmV3bGluZSh0cnVlLCB0aGlzLm91dHB1dCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwZWVrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wb3MgPSBvcmlnX3BvcztcbiAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCA9IG9yaWdfbGluZV9jaGFyX2NvdW50O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gY29udGVudC5qb2luKCcnKTsgLy9yZXR1cm5zIGZ1bGx5IGZvcm1hdHRlZCB0YWdcbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLmdldF9jb21tZW50ID0gZnVuY3Rpb24oc3RhcnRfcG9zKSB7IC8vZnVuY3Rpb24gdG8gcmV0dXJuIGNvbW1lbnQgY29udGVudCBpbiBpdHMgZW50aXJldHlcbiAgICAgICAgICAgIC8vIHRoaXMgaXMgd2lsbCBoYXZlIHZlcnkgcG9vciBwZXJmLCBidXQgd2lsbCB3b3JrIGZvciBub3cuXG4gICAgICAgICAgICB2YXIgY29tbWVudCA9ICcnLFxuICAgICAgICAgICAgICAgIGRlbGltaXRlciA9ICc+JyxcbiAgICAgICAgICAgICAgICBtYXRjaGVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgIHRoaXMucG9zID0gc3RhcnRfcG9zO1xuICAgICAgICAgICAgdmFyIGlucHV0X2NoYXIgPSB0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcyk7XG4gICAgICAgICAgICB0aGlzLnBvcysrO1xuXG4gICAgICAgICAgICB3aGlsZSAodGhpcy5wb3MgPD0gdGhpcy5pbnB1dC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjb21tZW50ICs9IGlucHV0X2NoYXI7XG5cbiAgICAgICAgICAgICAgICAvLyBvbmx5IG5lZWQgdG8gY2hlY2sgZm9yIHRoZSBkZWxpbWl0ZXIgaWYgdGhlIGxhc3QgY2hhcnMgbWF0Y2hcbiAgICAgICAgICAgICAgICBpZiAoY29tbWVudC5jaGFyQXQoY29tbWVudC5sZW5ndGggLSAxKSA9PT0gZGVsaW1pdGVyLmNoYXJBdChkZWxpbWl0ZXIubGVuZ3RoIC0gMSkgJiZcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudC5pbmRleE9mKGRlbGltaXRlcikgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIG9ubHkgbmVlZCB0byBzZWFyY2ggZm9yIGN1c3RvbSBkZWxpbWl0ZXIgZm9yIHRoZSBmaXJzdCBmZXcgY2hhcmFjdGVyc1xuICAgICAgICAgICAgICAgIGlmICghbWF0Y2hlZCAmJiBjb21tZW50Lmxlbmd0aCA8IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50LmluZGV4T2YoJzwhW2lmJykgPT09IDApIHsgLy9wZWVrIGZvciA8IVtpZiBjb25kaXRpb25hbCBjb21tZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxpbWl0ZXIgPSAnPCFbZW5kaWZdPic7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb21tZW50LmluZGV4T2YoJzwhW2NkYXRhWycpID09PSAwKSB7IC8vaWYgaXQncyBhIDxbY2RhdGFbIGNvbW1lbnQuLi5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGltaXRlciA9ICddXT4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29tbWVudC5pbmRleE9mKCc8IVsnKSA9PT0gMCkgeyAvLyBzb21lIG90aGVyICFbIGNvbW1lbnQ/IC4uLlxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJ10+JztcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvbW1lbnQuaW5kZXhPZignPCEtLScpID09PSAwKSB7IC8vIDwhLS0gY29tbWVudCAuLi5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGltaXRlciA9ICctLT4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29tbWVudC5pbmRleE9mKCd7eyEtLScpID09PSAwKSB7IC8vIHt7IS0tIGhhbmRsZWJhcnMgY29tbWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJy0tfX0nO1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29tbWVudC5pbmRleE9mKCd7eyEnKSA9PT0gMCkgeyAvLyB7eyEgaGFuZGxlYmFycyBjb21tZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWVudC5sZW5ndGggPT09IDUgJiYgY29tbWVudC5pbmRleE9mKCd7eyEtLScpID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGltaXRlciA9ICd9fSc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29tbWVudC5pbmRleE9mKCc8PycpID09PSAwKSB7IC8vIHt7ISBoYW5kbGViYXJzIGNvbW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGltaXRlciA9ICc/Pic7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb21tZW50LmluZGV4T2YoJzwlJykgPT09IDApIHsgLy8ge3shIGhhbmRsZWJhcnMgY29tbWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJyU+JztcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaW5wdXRfY2hhciA9IHRoaXMuaW5wdXQuY2hhckF0KHRoaXMucG9zKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBvcysrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gY29tbWVudDtcbiAgICAgICAgfTtcblxuICAgICAgICBmdW5jdGlvbiB0b2tlbk1hdGNoZXIoZGVsaW1pdGVyKSB7XG4gICAgICAgICAgICB2YXIgdG9rZW4gPSAnJztcblxuICAgICAgICAgICAgdmFyIGFkZCA9IGZ1bmN0aW9uKHN0cikge1xuICAgICAgICAgICAgICAgIHZhciBuZXdUb2tlbiA9IHRva2VuICsgc3RyLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBuZXdUb2tlbi5sZW5ndGggPD0gZGVsaW1pdGVyLmxlbmd0aCA/IG5ld1Rva2VuIDogbmV3VG9rZW4uc3Vic3RyKG5ld1Rva2VuLmxlbmd0aCAtIGRlbGltaXRlci5sZW5ndGgsIGRlbGltaXRlci5sZW5ndGgpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdmFyIGRvZXNOb3RNYXRjaCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbi5pbmRleE9mKGRlbGltaXRlcikgPT09IC0xO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBhZGQ6IGFkZCxcbiAgICAgICAgICAgICAgICBkb2VzTm90TWF0Y2g6IGRvZXNOb3RNYXRjaFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuZ2V0X3VuZm9ybWF0dGVkID0gZnVuY3Rpb24oZGVsaW1pdGVyLCBvcmlnX3RhZykgeyAvL2Z1bmN0aW9uIHRvIHJldHVybiB1bmZvcm1hdHRlZCBjb250ZW50IGluIGl0cyBlbnRpcmV0eVxuICAgICAgICAgICAgaWYgKG9yaWdfdGFnICYmIG9yaWdfdGFnLnRvTG93ZXJDYXNlKCkuaW5kZXhPZihkZWxpbWl0ZXIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBpbnB1dF9jaGFyID0gJyc7XG4gICAgICAgICAgICB2YXIgY29udGVudCA9ICcnO1xuICAgICAgICAgICAgdmFyIHNwYWNlID0gdHJ1ZTtcblxuICAgICAgICAgICAgdmFyIGRlbGltaXRlck1hdGNoZXIgPSB0b2tlbk1hdGNoZXIoZGVsaW1pdGVyKTtcblxuICAgICAgICAgICAgZG8ge1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucG9zID49IHRoaXMuaW5wdXQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlucHV0X2NoYXIgPSB0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5wb3MrKztcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLlV0aWxzLmluX2FycmF5KGlucHV0X2NoYXIsIHRoaXMuVXRpbHMud2hpdGVzcGFjZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzcGFjZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5saW5lX2NoYXJfY291bnQtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dF9jaGFyID09PSAnXFxuJyB8fCBpbnB1dF9jaGFyID09PSAnXFxyJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSAnXFxuJztcbiAgICAgICAgICAgICAgICAgICAgICAgIC8qICBEb24ndCBjaGFuZ2UgdGFiIGluZGVudGlvbiBmb3IgdW5mb3JtYXR0ZWQgYmxvY2tzLiAgSWYgdXNpbmcgY29kZSBmb3IgaHRtbCBlZGl0aW5nLCB0aGlzIHdpbGwgZ3JlYXRseSBhZmZlY3QgPHByZT4gdGFncyBpZiB0aGV5IGFyZSBzcGVjaWZpZWQgaW4gdGhlICd1bmZvcm1hdHRlZCBhcnJheSdcbiAgICAgICAgICAgIGZvciAodmFyIGk9MDsgaTx0aGlzLmluZGVudF9sZXZlbDsgaSsrKSB7XG4gICAgICAgICAgICAgIGNvbnRlbnQgKz0gdGhpcy5pbmRlbnRfc3RyaW5nO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3BhY2UgPSBmYWxzZTsgLy8uLi5hbmQgbWFrZSBzdXJlIG90aGVyIGluZGVudGF0aW9uIGlzIGVyYXNlZFxuICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGluZV9jaGFyX2NvdW50ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnRlbnQgKz0gaW5wdXRfY2hhcjtcbiAgICAgICAgICAgICAgICBkZWxpbWl0ZXJNYXRjaGVyLmFkZChpbnB1dF9jaGFyKTtcbiAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCsrO1xuICAgICAgICAgICAgICAgIHNwYWNlID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIGlmIChpbmRlbnRfaGFuZGxlYmFycyAmJiBpbnB1dF9jaGFyID09PSAneycgJiYgY29udGVudC5sZW5ndGggJiYgY29udGVudC5jaGFyQXQoY29udGVudC5sZW5ndGggLSAyKSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEhhbmRsZWJhcnMgZXhwcmVzc2lvbnMgaW4gc3RyaW5ncyBzaG91bGQgYWxzbyBiZSB1bmZvcm1hdHRlZC5cbiAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSB0aGlzLmdldF91bmZvcm1hdHRlZCgnfX0nKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gRG9uJ3QgY29uc2lkZXIgd2hlbiBzdG9wcGluZyBmb3IgZGVsaW1pdGVycy5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlIChkZWxpbWl0ZXJNYXRjaGVyLmRvZXNOb3RNYXRjaCgpKTtcblxuICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnQ7XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5nZXRfdG9rZW4gPSBmdW5jdGlvbigpIHsgLy9pbml0aWFsIGhhbmRsZXIgZm9yIHRva2VuLXJldHJpZXZhbFxuICAgICAgICAgICAgdmFyIHRva2VuO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5sYXN0X3Rva2VuID09PSAnVEtfVEFHX1NDUklQVCcgfHwgdGhpcy5sYXN0X3Rva2VuID09PSAnVEtfVEFHX1NUWUxFJykgeyAvL2NoZWNrIGlmIHdlIG5lZWQgdG8gZm9ybWF0IGphdmFzY3JpcHRcbiAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IHRoaXMubGFzdF90b2tlbi5zdWJzdHIoNyk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0aGlzLmdldF9jb250ZW50c190byh0eXBlKTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRva2VuICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBbdG9rZW4sICdUS18nICsgdHlwZV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5jdXJyZW50X21vZGUgPT09ICdDT05URU5UJykge1xuICAgICAgICAgICAgICAgIHRva2VuID0gdGhpcy5nZXRfY29udGVudCgpO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdG9rZW4gIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW3Rva2VuLCAnVEtfQ09OVEVOVCddO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuY3VycmVudF9tb2RlID09PSAnVEFHJykge1xuICAgICAgICAgICAgICAgIHRva2VuID0gdGhpcy5nZXRfdGFnKCk7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0b2tlbiAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0YWdfbmFtZV90eXBlID0gJ1RLX1RBR18nICsgdGhpcy50YWdfdHlwZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFt0b2tlbiwgdGFnX25hbWVfdHlwZV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMuZ2V0X2Z1bGxfaW5kZW50ID0gZnVuY3Rpb24obGV2ZWwpIHtcbiAgICAgICAgICAgIGxldmVsID0gdGhpcy5pbmRlbnRfbGV2ZWwgKyBsZXZlbCB8fCAwO1xuICAgICAgICAgICAgaWYgKGxldmVsIDwgMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIE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hpcy5pbmRlbnRfc3RyaW5nID0gJyc7XG4gICAgICAgICAgICB0aGlzLmluZGVudF9zaXplID0gaW5kZW50X3NpemU7XG4gICAgICAgICAgICB0aGlzLmJyYWNlX3N0eWxlID0gYnJhY2Vfc3R5bGU7XG4gICAgICAgICAgICB0aGlzLmluZGVudF9sZXZlbCA9IDA7XG4gICAgICAgICAgICB0aGlzLndyYXBfbGluZV9sZW5ndGggPSB3cmFwX2xpbmVfbGVuZ3RoO1xuICAgICAgICAgICAgdGhpcy5saW5lX2NoYXJfY291bnQgPSAwOyAvL2NvdW50IHRvIHNlZSBpZiB3cmFwX2xpbmVfbGVuZ3RoIHdhcyBleGNlZWRlZFxuXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuaW5kZW50X3NpemU7IGkrKykge1xuICAgICAgICAgICAgICAgIHRoaXMuaW5kZW50X3N0cmluZyArPSB0aGlzLmluZGVudF9jaGFyYWN0ZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMucHJpbnRfbmV3bGluZSA9IGZ1bmN0aW9uKGZvcmNlLCBhcnIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKCFhcnIgfHwgIWFyci5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZm9yY2UgfHwgKGFyclthcnIubGVuZ3RoIC0gMV0gIT09ICdcXG4nKSkgeyAvL3dlIG1pZ2h0IHdhbnQgdGhlIGV4dHJhIGxpbmVcbiAgICAgICAgICAgICAgICAgICAgaWYgKChhcnJbYXJyLmxlbmd0aCAtIDFdICE9PSAnXFxuJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyclthcnIubGVuZ3RoIC0gMV0gPSBydHJpbShhcnJbYXJyLmxlbmd0aCAtIDFdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBhcnIucHVzaCgnXFxuJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5wcmludF9pbmRlbnRhdGlvbiA9IGZ1bmN0aW9uKGFycikge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5pbmRlbnRfbGV2ZWw7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBhcnIucHVzaCh0aGlzLmluZGVudF9zdHJpbmcpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCArPSB0aGlzLmluZGVudF9zdHJpbmcubGVuZ3RoO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMucHJpbnRfdG9rZW4gPSBmdW5jdGlvbih0ZXh0KSB7XG4gICAgICAgICAgICAgICAgLy8gQXZvaWQgcHJpbnRpbmcgaW5pdGlhbCB3aGl0ZXNwYWNlLlxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzX3doaXRlc3BhY2UodGV4dCkgJiYgIXRoaXMub3V0cHV0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0ZXh0IHx8IHRleHQgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLm91dHB1dC5sZW5ndGggJiYgdGhpcy5vdXRwdXRbdGhpcy5vdXRwdXQubGVuZ3RoIC0gMV0gPT09ICdcXG4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByaW50X2luZGVudGF0aW9uKHRoaXMub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQgPSBsdHJpbSh0ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnByaW50X3Rva2VuX3Jhdyh0ZXh0KTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMucHJpbnRfdG9rZW5fcmF3ID0gZnVuY3Rpb24odGV4dCkge1xuICAgICAgICAgICAgICAgIC8vIElmIHdlIGFyZSBnb2luZyB0byBwcmludCBuZXdsaW5lcywgdHJ1bmNhdGUgdHJhaWxpbmdcbiAgICAgICAgICAgICAgICAvLyB3aGl0ZXNwYWNlLCBhcyB0aGUgbmV3bGluZXMgd2lsbCByZXByZXNlbnQgdGhlIHNwYWNlLlxuICAgICAgICAgICAgICAgIGlmICh0aGlzLm5ld2xpbmVzID4gMCkge1xuICAgICAgICAgICAgICAgICAgICB0ZXh0ID0gcnRyaW0odGV4dCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRleHQgJiYgdGV4dCAhPT0gJycpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRleHQubGVuZ3RoID4gMSAmJiB0ZXh0LmNoYXJBdCh0ZXh0Lmxlbmd0aCAtIDEpID09PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdW5mb3JtYXR0ZWQgdGFncyBjYW4gZ3JhYiBuZXdsaW5lcyBhcyB0aGVpciBsYXN0IGNoYXJhY3RlclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vdXRwdXQucHVzaCh0ZXh0LnNsaWNlKDAsIC0xKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByaW50X25ld2xpbmUoZmFsc2UsIHRoaXMub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub3V0cHV0LnB1c2godGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmb3IgKHZhciBuID0gMDsgbiA8IHRoaXMubmV3bGluZXM7IG4rKykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnByaW50X25ld2xpbmUobiA+IDAsIHRoaXMub3V0cHV0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5uZXdsaW5lcyA9IDA7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLmluZGVudCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuaW5kZW50X2xldmVsKys7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLnVuaW5kZW50ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaW5kZW50X2xldmVsID4gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluZGVudF9sZXZlbC0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIC8qX19fX19fX19fX19fX19fX19fX19fLS0tLS0tLS0tLS0tLS0tLS0tLS1fX19fX19fX19fX19fX19fX19fX18qL1xuXG4gICAgdGhpcy5iZWF1dGlmeSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBtdWx0aV9wYXJzZXIgPSBuZXcgUGFyc2VyKCk7IC8vd3JhcHBpbmcgZnVuY3Rpb25zIFBhcnNlclxuICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRlcihodG1sX3NvdXJjZSwgaW5kZW50X2NoYXJhY3RlciwgaW5kZW50X3NpemUsIHdyYXBfbGluZV9sZW5ndGgsIGJyYWNlX3N0eWxlKTsgLy9pbml0aWFsaXplIHN0YXJ0aW5nIHZhbHVlc1xuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgICAgdmFyIHQgPSBtdWx0aV9wYXJzZXIuZ2V0X3Rva2VuKCk7XG4gICAgICAgICAgICBtdWx0aV9wYXJzZXIudG9rZW5fdGV4dCA9IHRbMF07XG4gICAgICAgICAgICBtdWx0aV9wYXJzZXIudG9rZW5fdHlwZSA9IHRbMV07XG5cbiAgICAgICAgICAgIGlmIChtdWx0aV9wYXJzZXIudG9rZW5fdHlwZSA9PT0gJ1RLX0VPRicpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc3dpdGNoIChtdWx0aV9wYXJzZXIudG9rZW5fdHlwZSkge1xuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1RBR19TVEFSVCc6XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF9uZXdsaW5lKGZhbHNlLCBtdWx0aV9wYXJzZXIub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X3Rva2VuKG11bHRpX3BhcnNlci50b2tlbl90ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci5pbmRlbnRfY29udGVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChtdWx0aV9wYXJzZXIuaW5kZW50X2JvZHlfaW5uZXJfaHRtbCB8fCAhbXVsdGlfcGFyc2VyLnRva2VuX3RleHQubWF0Y2goLzxib2R5KD86LiopPi8pKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtdWx0aV9wYXJzZXIuaW5kZW50X2hlYWRfaW5uZXJfaHRtbCB8fCAhbXVsdGlfcGFyc2VyLnRva2VuX3RleHQubWF0Y2goLzxoZWFkKD86LiopPi8pKSkge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmluZGVudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIuaW5kZW50X2NvbnRlbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIuY3VycmVudF9tb2RlID0gJ0NPTlRFTlQnO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlICdUS19UQUdfU1RZTEUnOlxuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1RBR19TQ1JJUFQnOlxuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfbmV3bGluZShmYWxzZSwgbXVsdGlfcGFyc2VyLm91dHB1dCk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF90b2tlbihtdWx0aV9wYXJzZXIudG9rZW5fdGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5jdXJyZW50X21vZGUgPSAnQ09OVEVOVCc7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1RBR19FTkQnOlxuICAgICAgICAgICAgICAgICAgICAvL1ByaW50IG5ldyBsaW5lIG9ubHkgaWYgdGhlIHRhZyBoYXMgbm8gY29udGVudCBhbmQgaGFzIGNoaWxkXG4gICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aV9wYXJzZXIubGFzdF90b2tlbiA9PT0gJ1RLX0NPTlRFTlQnICYmIG11bHRpX3BhcnNlci5sYXN0X3RleHQgPT09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnX25hbWUgPSAobXVsdGlfcGFyc2VyLnRva2VuX3RleHQubWF0Y2goL1xcdysvKSB8fCBbXSlbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnX2V4dHJhY3RlZF9mcm9tX2xhc3Rfb3V0cHV0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aV9wYXJzZXIub3V0cHV0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZ19leHRyYWN0ZWRfZnJvbV9sYXN0X291dHB1dCA9IG11bHRpX3BhcnNlci5vdXRwdXRbbXVsdGlfcGFyc2VyLm91dHB1dC5sZW5ndGggLSAxXS5tYXRjaCgvKD86PHx7eyMpXFxzKihcXHcrKS8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRhZ19leHRyYWN0ZWRfZnJvbV9sYXN0X291dHB1dCA9PT0gbnVsbCB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0YWdfZXh0cmFjdGVkX2Zyb21fbGFzdF9vdXRwdXRbMV0gIT09IHRhZ19uYW1lICYmICFtdWx0aV9wYXJzZXIuVXRpbHMuaW5fYXJyYXkodGFnX2V4dHJhY3RlZF9mcm9tX2xhc3Rfb3V0cHV0WzFdLCB1bmZvcm1hdHRlZCkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X25ld2xpbmUoZmFsc2UsIG11bHRpX3BhcnNlci5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF90b2tlbihtdWx0aV9wYXJzZXIudG9rZW5fdGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5jdXJyZW50X21vZGUgPSAnQ09OVEVOVCc7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1RBR19TSU5HTEUnOlxuICAgICAgICAgICAgICAgICAgICAvLyBEb24ndCBhZGQgYSBuZXdsaW5lIGJlZm9yZSBlbGVtZW50cyB0aGF0IHNob3VsZCByZW1haW4gdW5mb3JtYXR0ZWQuXG4gICAgICAgICAgICAgICAgICAgIHZhciB0YWdfY2hlY2sgPSBtdWx0aV9wYXJzZXIudG9rZW5fdGV4dC5tYXRjaCgvXlxccyo8KFthLXotXSspL2kpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXRhZ19jaGVjayB8fCAhbXVsdGlfcGFyc2VyLlV0aWxzLmluX2FycmF5KHRhZ19jaGVja1sxXSwgdW5mb3JtYXR0ZWQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfbmV3bGluZShmYWxzZSwgbXVsdGlfcGFyc2VyLm91dHB1dCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X3Rva2VuKG11bHRpX3BhcnNlci50b2tlbl90ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmN1cnJlbnRfbW9kZSA9ICdDT05URU5UJztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfVEFHX0hBTkRMRUJBUlNfRUxTRSc6XG4gICAgICAgICAgICAgICAgICAgIC8vIERvbid0IGFkZCBhIG5ld2xpbmUgaWYgb3BlbmluZyB7eyNpZn19IHRhZyBpcyBvbiB0aGUgY3VycmVudCBsaW5lXG4gICAgICAgICAgICAgICAgICAgIHZhciBmb3VuZElmT25DdXJyZW50TGluZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBsYXN0Q2hlY2tlZE91dHB1dCA9IG11bHRpX3BhcnNlci5vdXRwdXQubGVuZ3RoIC0gMTsgbGFzdENoZWNrZWRPdXRwdXQgPj0gMDsgbGFzdENoZWNrZWRPdXRwdXQtLSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci5vdXRwdXRbbGFzdENoZWNrZWRPdXRwdXRdID09PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlfcGFyc2VyLm91dHB1dFtsYXN0Q2hlY2tlZE91dHB1dF0ubWF0Y2goL3t7I2lmLykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRJZk9uQ3VycmVudExpbmUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFmb3VuZElmT25DdXJyZW50TGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X25ld2xpbmUoZmFsc2UsIG11bHRpX3BhcnNlci5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF90b2tlbihtdWx0aV9wYXJzZXIudG9rZW5fdGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aV9wYXJzZXIuaW5kZW50X2NvbnRlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5pbmRlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5pbmRlbnRfY29udGVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5jdXJyZW50X21vZGUgPSAnQ09OVEVOVCc7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1RBR19IQU5ETEVCQVJTX0NPTU1FTlQnOlxuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfdG9rZW4obXVsdGlfcGFyc2VyLnRva2VuX3RleHQpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIuY3VycmVudF9tb2RlID0gJ1RBRyc7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX0NPTlRFTlQnOlxuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfdG9rZW4obXVsdGlfcGFyc2VyLnRva2VuX3RleHQpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIuY3VycmVudF9tb2RlID0gJ1RBRyc7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1NUWUxFJzpcbiAgICAgICAgICAgICAgICBjYXNlICdUS19TQ1JJUFQnOlxuICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlfcGFyc2VyLnRva2VuX3RleHQgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfbmV3bGluZShmYWxzZSwgbXVsdGlfcGFyc2VyLm91dHB1dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IG11bHRpX3BhcnNlci50b2tlbl90ZXh0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9iZWF1dGlmaWVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjcmlwdF9pbmRlbnRfbGV2ZWwgPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci50b2tlbl90eXBlID09PSAnVEtfU0NSSVBUJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9iZWF1dGlmaWVyID0gdHlwZW9mIGpzX2JlYXV0aWZ5ID09PSAnZnVuY3Rpb24nICYmIGpzX2JlYXV0aWZ5O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtdWx0aV9wYXJzZXIudG9rZW5fdHlwZSA9PT0gJ1RLX1NUWUxFJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9iZWF1dGlmaWVyID0gdHlwZW9mIGNzc19iZWF1dGlmeSA9PT0gJ2Z1bmN0aW9uJyAmJiBjc3NfYmVhdXRpZnk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmluZGVudF9zY3JpcHRzID09PSBcImtlZXBcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjcmlwdF9pbmRlbnRfbGV2ZWwgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChvcHRpb25zLmluZGVudF9zY3JpcHRzID09PSBcInNlcGFyYXRlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY3JpcHRfaW5kZW50X2xldmVsID0gLW11bHRpX3BhcnNlci5pbmRlbnRfbGV2ZWw7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpbmRlbnRhdGlvbiA9IG11bHRpX3BhcnNlci5nZXRfZnVsbF9pbmRlbnQoc2NyaXB0X2luZGVudF9sZXZlbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoX2JlYXV0aWZpZXIpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNhbGwgdGhlIEJlYXV0aWZpZXIgaWYgYXZhbGlhYmxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIENoaWxkX29wdGlvbnMgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lb2wgPSAnXFxuJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIENoaWxkX29wdGlvbnMucHJvdG90eXBlID0gb3B0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2hpbGRfb3B0aW9ucyA9IG5ldyBDaGlsZF9vcHRpb25zKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IF9iZWF1dGlmaWVyKHRleHQucmVwbGFjZSgvXlxccyovLCBpbmRlbnRhdGlvbiksIGNoaWxkX29wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzaW1wbHkgaW5kZW50IHRoZSBzdHJpbmcgb3RoZXJ3aXNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHdoaXRlID0gdGV4dC5tYXRjaCgvXlxccyovKVswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgX2xldmVsID0gd2hpdGUubWF0Y2goL1teXFxuXFxyXSokLylbMF0uc3BsaXQobXVsdGlfcGFyc2VyLmluZGVudF9zdHJpbmcpLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlaW5kZW50ID0gbXVsdGlfcGFyc2VyLmdldF9mdWxsX2luZGVudChzY3JpcHRfaW5kZW50X2xldmVsIC0gX2xldmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0ID0gdGV4dC5yZXBsYWNlKC9eXFxzKi8sIGluZGVudGF0aW9uKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFxyXFxufFxccnxcXG4vZywgJ1xcbicgKyByZWluZGVudClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoL1xccyskLywgJycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfdG9rZW5fcmF3KHRleHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF9uZXdsaW5lKHRydWUsIG11bHRpX3BhcnNlci5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5jdXJyZW50X21vZGUgPSAnVEFHJztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgLy8gV2Ugc2hvdWxkIG5vdCBiZSBnZXR0aW5nIGhlcmUgYnV0IHdlIGRvbid0IHdhbnQgdG8gZHJvcCBpbnB1dCBvbiB0aGUgZmxvb3JcbiAgICAgICAgICAgICAgICAgICAgLy8gSnVzdCBvdXRwdXQgdGhlIHRleHQgYW5kIG1vdmUgb25cbiAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci50b2tlbl90ZXh0ICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X3Rva2VuKG11bHRpX3BhcnNlci50b2tlbl90ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG11bHRpX3BhcnNlci5sYXN0X3Rva2VuID0gbXVsdGlfcGFyc2VyLnRva2VuX3R5cGU7XG4gICAgICAgICAgICBtdWx0aV9wYXJzZXIubGFzdF90ZXh0ID0gbXVsdGlfcGFyc2VyLnRva2VuX3RleHQ7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHN3ZWV0X2NvZGUgPSBtdWx0aV9wYXJzZXIub3V0cHV0LmpvaW4oJycpLnJlcGxhY2UoL1tcXHJcXG5cXHQgXSskLywgJycpO1xuXG4gICAgICAgIC8vIGVzdGFibGlzaCBlbmRfd2l0aF9uZXdsaW5lXG4gICAgICAgIGlmIChlbmRfd2l0aF9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uZF9jb21tZW50cyhjdXJyZW50X3Rva2VuLCBwcmVzZXJ2ZV9zdGF0ZW1lbnRfZmxhZ3MpO1xuICAgICAgICAgICAgaGFuZGxlcnNbY3VycmVudF90b2tlbi50eXBlXShwcmVzZXJ2ZV9zdGF0ZW1lbnRfZmxhZ3MpO1xuICAgICAgICB9XG4gICAgICAgIGN1cnJlbnRfdG9rZW4gPSB0ZW1wX3Rva2VuO1xuXG4gICAgICAgIGlmIChrZWVwX3doaXRlc3BhY2UpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbmV3bGluZXM7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoaSA+IDAsIHByZXNlcnZlX3N0YXRlbWVudF9mbGFncyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAob3B0Lm1heF9wcmVzZXJ2ZV9uZXdsaW5lcyAmJiBuZXdsaW5lcyA+IG9wdC5tYXhfcHJlc2VydmVfbmV3bGluZXMpIHtcbiAgICAgICAgICAgICAgICBuZXdsaW5lcyA9IG9wdC5tYXhfcHJlc2VydmVfbmV3bGluZXM7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChvcHQucHJlc2VydmVfbmV3bGluZXMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9jYWxfdG9rZW4ubmV3bGluZXMgPiAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoZmFsc2UsIHByZXNlcnZlX3N0YXRlbWVudF9mbGFncyk7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAxOyBqIDwgbmV3bGluZXM7IGogKz0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSh0cnVlLCBwcmVzZXJ2ZV9zdGF0ZW1lbnRfZmxhZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfV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ICAgICAgIH1cblxuICAgICAgICBpZiAoc2hvdWxkUHJlc2VydmVPckZvcmNlKSB7XG4gICAgICAgICAgICBwcmludF9uZXdsaW5lKGZhbHNlLCB0cnVlKTtcbiAgICAgICAgfSBlbHNlIGlmIChvcHQud3JhcF9saW5lX2xlbmd0aCkge1xuICAgICAgICAgICAgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpbl9hcnJheShmbGFncy5sYXN0X3RleHQsIG5ld2xpbmVfcmVzdHJpY3RlZF90b2tlbnMpKSB7XG4gICAgICAgICAgICAgICAgLy8gVGhlc2UgdG9rZW5zIHNob3VsZCBuZXZlciBoYXZlIGEgbmV3bGluZSBpbnNlcnRlZFxuICAgICAgICAgICAgICAgIC8vIGJldHdlZW4gdGhlbSBhbmQgdGhlIGZvbGxvd2luZyBleHByZXNzaW9uLlxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBwcm9wb3NlZF9saW5lX2xlbmd0aCA9IG91dHB1dC5jdXJyZW50X2xpbmUuZ2V0X2NoYXJhY3Rlcl9jb3VudCgpICsgY3VycmVudF90b2tlbi50ZXh0Lmxlbmd0aCArXG4gICAgICAgICAgICAgICAgKG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPyAxIDogMCk7XG4gICAgICAgICAgICBpZiAocHJvcG9zZWRfbGluZV9sZW5ndGggPj0gb3B0LndyYXBfbGluZV9sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKGZhbHNlLCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHByaW50X25ld2xpbmUoZm9yY2VfbmV3bGluZSwgcHJlc2VydmVfc3RhdGVtZW50X2ZsYWdzKSB7XG4gICAgICAgIGlmICghcHJlc2VydmVfc3RhdGVtZW50X2ZsYWdzKSB7XG4gICAgICAgICAgICBpZiAoZmxhZ3MubGFzdF90ZXh0ICE9PSAnOycgJiYgZmxhZ3MubGFzdF90ZXh0ICE9PSAnLCcgJiYgZmxhZ3MubGFzdF90ZXh0ICE9PSAnPScgJiYgbGFzdF90eXBlICE9PSAnVEtfT1BFUkFUT1InKSB7XG4gICAgICAgICAgICAgICAgdmFyIG5leHRfdG9rZW4gPSBnZXRfdG9rZW4oMSk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGZsYWdzLm1vZGUgPT09IE1PREUuU3RhdGVtZW50ICYmXG4gICAgICAgICAgICAgICAgICAgICEoZmxhZ3MuaWZfYmxvY2sgJiYgbmV4dF90b2tlbiAmJiBuZXh0X3Rva2VuLnR5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgbmV4dF90b2tlbi50ZXh0ID09PSAnZWxzZScpICYmXG4gICAgICAgICAgICAgICAgICAgICFmbGFncy5kb19ibG9jaykge1xuICAgICAgICAgICAgICAgICAgICByZXN0b3JlX21vZGUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3V0cHV0LmFkZF9uZXdfbGluZShmb3JjZV9uZXdsaW5lKSkge1xuICAgICAgICAgICAgZmxhZ3MubXVsdGlsaW5lX2ZyYW1lID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHByaW50X3Rva2VuX2xpbmVfaW5kZW50YXRpb24oKSB7XG4gICAgICAgIGlmIChvdXRwdXQuanVzdF9hZGRlZF9uZXdsaW5lKCkpIHtcbiAgICAgICAgICAgIGlmIChvcHQua2VlcF9hcnJheV9pbmRlbnRhdGlvbiAmJiBpc19hcnJheShmbGFncy5tb2RlKSAmJiBjdXJyZW50X3Rva2VuLndhbnRlZF9uZXdsaW5lKSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0LmN1cnJlbnRfbGluZS5wdXNoKGN1cnJlbnRfdG9rZW4ud2hpdGVzcGFjZV9iZWZvcmUpO1xuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAob3V0cHV0LnNldF9pbmRlbnQoZmxhZ3MuaW5kZW50YXRpb25fbGV2ZWwpKSB7XG4gICAgICAgICAgICAgICAgZmxhZ3MubGluZV9pbmRlbnRfbGV2ZWwgPSBmbGFncy5pbmRlbnRhdGlvbl9sZXZlbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHByaW50X3Rva2VuKHByaW50YWJsZV90b2tlbikge1xuICAgICAgICBpZiAob3V0cHV0LnJhdykge1xuICAgICAgICAgICAgb3V0cHV0LmFkZF9yYXdfdG9rZW4oY3VycmVudF90b2tlbik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0LmNvbW1hX2ZpcnN0ICYmIGxhc3RfdHlwZSA9PT0gJ1RLX0NPTU1BJyAmJlxuICAgICAgICAgICAgb3V0cHV0Lmp1c3RfYWRkZWRfbmV3bGluZSgpKSB7XG4gICAgICAgICAgICBpZiAob3V0cHV0LnByZXZpb3VzX2xpbmUubGFzdCgpID09PSAnLCcpIHtcbiAgICAgICAgICAgICAgICB2YXIgcG9wcGVkID0gb3V0cHV0LnByZXZpb3VzX2xpbmUucG9wKCk7XG4gICAgICAgICAgICAgICAgLy8gaWYgdGhlIGNvbW1hIHdhcyBhbHJlYWR5IGF0IHRoZSBzdGFydCBvZiB0aGUgbGluZSxcbiAgICAgICAgICAgICAgICAvLyBwdWxsIGJhY2sgb250byB0aGF0IGxpbmUgYW5kIHJlcHJpbnQgdGhlIGluZGVudGF0aW9uXG4gICAgICAgICAgICAgICAgaWYgKG91dHB1dC5wcmV2aW91c19saW5lLmlzX2VtcHR5KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnByZXZpb3VzX2xpbmUucHVzaChwb3BwZWQpO1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQudHJpbSh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmN1cnJlbnRfbGluZS5wb3AoKTtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnRyaW0oKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBhZGQgdGhlIGNvbW1hIGluIGZyb250IG9mIHRoZSBuZXh0IHRva2VuXG4gICAgICAgICAgICAgICAgcHJpbnRfdG9rZW5fbGluZV9pbmRlbnRhdGlvbigpO1xuICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfdG9rZW4oJywnKTtcbiAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHByaW50YWJsZV90b2tlbiA9IHByaW50YWJsZV90b2tlbiB8fCBjdXJyZW50X3Rva2VuLnRleHQ7XG4gICAgICAgIHByaW50X3Rva2VuX2xpbmVfaW5kZW50YXRpb24oKTtcbiAgICAgICAgb3V0cHV0LmFkZF90b2tlbihwcmludGFibGVfdG9rZW4pO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGluZGVudCgpIHtcbiAgICAgICAgZmxhZ3MuaW5kZW50YXRpb25fbGV2ZWwgKz0gMTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBkZWluZGVudCgpIHtcbiAgICAgICAgaWYgKGZsYWdzLmluZGVudGF0aW9uX2xldmVsID4gMCAmJlxuICAgICAgICAgICAgKCghZmxhZ3MucGFyZW50KSB8fCBmbGFncy5pbmRlbnRhdGlvbl9sZXZlbCA+IGZsYWdzLnBhcmVudC5pbmRlbnRhdGlvbl9sZXZlbCkpIHtcbiAgICAgICAgICAgIGZsYWdzLmluZGVudGF0aW9uX2xldmVsIC09IDE7XG5cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN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gICAgICAgICAgICAgaW5kZW50KCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGhhbmRsZV93aGl0ZXNwYWNlX2FuZF9jb21tZW50cyhjdXJyZW50X3Rva2VuLCB0cnVlKTtcblxuICAgICAgICAgICAgLy8gSXNzdWUgIzI3NjpcbiAgICAgICAgICAgIC8vIElmIHN0YXJ0aW5nIGEgbmV3IHN0YXRlbWVudCB3aXRoIFtpZiwgZm9yLCB3aGlsZSwgZG9dLCBwdXNoIHRvIGEgbmV3IGxpbmUuXG4gICAgICAgICAgICAvLyBpZiAoYSkgaWYgKGIpIGlmKGMpIGQoKTsgZWxzZSBlKCk7IGVsc2UgZigpO1xuICAgICAgICAgICAgaWYgKCFzdGFydF9vZl9vYmplY3RfcHJvcGVydHkoKSkge1xuICAgICAgICAgICAgICAgIGFsbG93X3dyYXBfb3JfcHJlc2VydmVkX25ld2xpbmUoXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpbl9hcnJheShjdXJyZW50X3Rva2VuLnRleHQsIFsnZG8nLCAnZm9yJywgJ2lmJywgJ3doaWxlJ10pKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGFsbF9saW5lc19zdGFydF93aXRoKGxpbmVzLCBjKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGluZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBsaW5lID0gdHJpbShsaW5lc1tpXSk7XG4gICAgICAgICAgICBpZiAobGluZS5jaGFyQXQoMCkgIT09IGMpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZWFjaF9saW5lX21hdGNoZXNfaW5kZW50KGxpbmVzLCBpbmRlbnQpIHtcbiAgICAgICAgdmFyIGkgPSAwLFxuICAgICAgICAgICAgbGVuID0gbGluZXMubGVuZ3RoLFxuICAgICAgICAgICAgbGluZTtcbiAgICAgICAgZm9yICg7IGkgPCBsZW47IGkrKykge1xuICAgICAgICAgICAgbGluZSA9IGxpbmVzW2ldO1xuICAgICAgICAgICAgLy8gYWxsb3cgZW1wdHkgbGluZXMgdG8gcGFzcyB0aHJvdWdoXG4gICAgICAgICAgICBpZiAobGluZSAmJiBsaW5lLmluZGV4T2YoaW5kZW50KSAhPT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpc19zcGVjaWFsX3dvcmQod29yZCkge1xuICAgICAgICByZXR1cm4gaW5fYXJyYXkod29yZCwgWydjYXNlJywgJ3JldHVybicsICdkbycsICdpZicsICd0aHJvdycsICdlbHNlJ10pO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGdldF90b2tlbihvZmZzZXQpIHtcbiAgICAgICAgdmFyIGluZGV4ID0gdG9rZW5fcG9zICsgKG9mZnNldCB8fCAwKTtcbiAgICAgICAgcmV0dXJuIChpbmRleCA8IDAgfHwgaW5kZXggPj0gdG9rZW5zLmxlbmd0aCkgPyBudWxsIDogdG9rZW5zW2luZGV4XTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBoYW5kbGVfc3RhcnRfZXhwcigpIHtcbiAgICAgICAgLy8gVGhlIGNvbmRpdGlvbmFsIHN0YXJ0cyB0aGUgc3RhdGVtZW50IGlmIGFwcHJvcHJpYXRlLlxuICAgICAgICBpZiAoIXN0YXJ0X29mX3N0YXRlbWVudCgpKSB7XG4gICAgICAgICAgICBoYW5kbGVfd2hpdGVzcGFjZV9hbmRfY29tbWVudHMoY3VycmVudF90b2tlbik7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbmV4dF9tb2RlID0gTU9ERS5FeHByZXNzaW9uO1xuICAgICAgICBpZiAoY3VycmVudF90b2tlbi50ZXh0ID09PSAnWycpIHtcblxuICAgICAgICAgICAgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1dPUkQnIHx8IGZsYWdzLmxhc3RfdGV4dCA9PT0gJyknKSB7XG4gICAgICAgICAgICAgICAgLy8gdGhpcyBpcyBhcnJheSBpbmRleCBzcGVjaWZpZXIsIGJyZWFrIGltbWVkaWF0ZWx5XG4gICAgICAgICAgICAgICAgLy8gYVt4XSwgZm4oKVt4XVxuICAgICAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgaW5fYXJyYXkoZmxhZ3MubGFzdF90ZXh0LCB0b2tlbml6ZXIubGluZV9zdGFydGVycykpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHNldF9tb2RlKG5leHRfbW9kZSk7XG4gICAgICAgICAgICAgICAgcHJpbnRfdG9rZW4oKTtcbiAgICAgICAgICAgICAgICBpbmRlbnQoKTtcbiAgICAgICAgICAgICAgICBpZiAob3B0LnNwYWNlX2luX3BhcmVuKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG5leHRfbW9kZSA9IE1PREUuQXJyYXlMaXRlcmFsO1xuICAgICAgICAgICAgaWYgKGlzX2FycmF5KGZsYWdzLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGZsYWdzLmxhc3RfdGV4dCA9PT0gJ1snIHx8XG4gICAgICAgICAgICAgICAgICAgIChmbGFncy5sYXN0X3RleHQgPT09ICcsJyAmJiAobGFzdF9sYXN0X3RleHQgPT09ICddJyB8fCBsYXN0X2xhc3RfdGV4dCA9PT0gJ30nKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gXSwgWyBnb2VzIHRvIG5ldyBsaW5lXG4gICAgICAgICAgICAgICAgICAgIC8vIH0sIFsgZ29lcyB0byBuZXcgbGluZVxuICAgICAgICAgICAgICAgICAgICBpZiAoIW9wdC5rZWVwX2FycmF5X2luZGVudGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgZmxhZ3MubGFzdF90ZXh0ID09PSAnZm9yJykge1xuICAgICAgICAgICAgICAgIG5leHRfbW9kZSA9IE1PREUuRm9ySW5pdGlhbGl6ZXI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpbl9hcnJheShmbGFncy5sYXN0X3RleHQsIFsnaWYnLCAnd2hpbGUnXSkpIHtcbiAgICAgICAgICAgICAgICBuZXh0X21vZGUgPSBNT0RFLkNvbmRpdGlvbmFsO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBuZXh0X21vZGUgPSBNT0RFLkV4cHJlc3Npb247XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZmxhZ3MubGFzdF90ZXh0ID09PSAnOycgfHwgbGFzdF90eXBlID09PSAnVEtfU1RBUlRfQkxPQ0snKSB7XG4gICAgICAgICAgICBwcmludF9uZXdsaW5l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FuZXh0X3Rva2VuLmNvbW1lbnRzX2JlZm9yZS5sZW5ndGggJiYgbmV4dF90b2tlbi50ZXh0ID09PSAnfSc7XG4gICAgICAgIHZhciBlbXB0eV9hbm9ueW1vdXNfZnVuY3Rpb24gPSBlbXB0eV9icmFjZXMgJiYgZmxhZ3MubGFzdF93b3JkID09PSAnZnVuY3Rpb24nICYmXG4gICAgICAgICAgICBsYXN0X3R5cGUgPT09ICdUS19FTkRfRVhQUic7XG5cbiAgICAgICAgaWYgKG9wdC5icmFjZV9wcmVzZXJ2ZV9pbmxpbmUpIC8vIGNoZWNrIGZvciBpbmxpbmUsIHNldCBpbmxpbmVfZnJhbWUgaWYgc29cbiAgICAgICAge1xuICAgICAgICAgICAgLy8gc2VhcmNoIGZvcndhcmQgZm9yIGEgbmV3bGluZSB3YW50ZWQgaW5zaWRlIHRoaXMgYmxvY2tcbiAgICAgICAgICAgIHZhciBpbmRleCA9IDA7XG4gICAgICAgICAgICB2YXIgY2hlY2tfdG9rZW4gPSBudWxsO1xuICAgICAgICAgICAgZmxhZ3MuaW5saW5lX2ZyYW1lID0gdHJ1ZTtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBpbmRleCArPSAxO1xuICAgICAgICAgICAgICAgIGNoZWNrX3Rva2VuID0gZ2V0X3Rva2VuKGluZGV4KTtcbiAgICAgICAgICAgICAgICBpZiAoY2hlY2tfdG9rZW4ud2FudGVkX25ld2xpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3MuaW5saW5lX2ZyYW1lID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gd2hpbGUgKGNoZWNrX3Rva2VuLnR5cGUgIT09ICdUS19FT0YnICYmXG4gICAgICAgICAgICAgICAgIShjaGVja190b2tlbi50eXBlID09PSAnVEtfRU5EX0JMT0NLJyAmJiBjaGVja190b2tlbi5vcGVuZWQgPT09IGN1cnJlbnRfdG9rZW4pKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICgob3B0LmJyYWNlX3N0eWxlID09PSBcImV4cGFuZFwiIHx8XG4gICAgICAgICAgICAgICAgKG9wdC5icmFjZV9zdHlsZSA9PT0gXCJub25lXCIgJiYgY3VycmVudF90b2tlbi53YW50ZWRfbmV3bGluZSkpICYmXG4gICAgICAgICAgICAhZmxhZ3MuaW5saW5lX2ZyYW1lKSB7XG4gICAgICAgICAgICBpZiAobGFzdF90eXBlICE9PSAnVEtfT1BFUkFUT1InICYmXG4gICAgICAgICAgICAgICAgKGVtcHR5X2Fub255bW91c19mdW5jdGlvbiB8fFxuICAgICAgICAgICAgICAgICAgICBsYXN0X3R5cGUgPT09ICdUS19FUVVBTFMnIHx8XG4gICAgICAgICAgICAgICAgICAgIChsYXN0X3R5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgaXNfc3BlY2lhbF93b3JkKGZsYWdzLmxhc3RfdGV4dCkgJiYgZmxhZ3MubGFzdF90ZXh0ICE9PSAnZWxzZScpKSkge1xuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKGZhbHNlLCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHsgLy8gY29sbGFwc2UgfHwgaW5saW5lX2ZyYW1lXG4gICAgICAgICAgICBpZiAoaXNfYXJyYXkocHJldmlvdXNfZmxhZ3MubW9kZSkgJiYgKGxhc3RfdHlwZSA9PT0gJ1RLX1NUQVJUX0VYUFInIHx8IGxhc3RfdHlwZSA9PT0gJ1RLX0NPTU1BJykpIHtcbiAgICAgICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfQ09NTUEnIHx8IG9wdC5zcGFjZV9pbl9wYXJlbikge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfQ09NTUEnIHx8IChsYXN0X3R5cGUgPT09ICdUS19TVEFSVF9FWFBSJyAmJiBmbGFncy5pbmxpbmVfZnJhbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGFsbG93X3dyYXBfb3JfcHJlc2VydmVkX25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNfZmxhZ3MubXVsdGlsaW5lX2ZyYW1lID0gcHJldmlvdXNfZmxhZ3MubXVsdGlsaW5lX2ZyYW1lIHx8IGZsYWdzLm11bHRpbGluZV9mcmFtZTtcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3MubXVsdGlsaW5lX2ZyYW1lID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGxhc3RfdHlwZSAhPT0gJ1RLX09QRVJBVE9SJyAmJiBsYXN0X3R5cGUgIT09ICdUS19TVEFSVF9FWFBSJykge1xuICAgICAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19TVEFSVF9CTE9DSycgJiYgIWZsYWdzLmlubGluZV9mcmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHByaW50X3Rva2VuKCk7XG4gICAgICAgIGluZGVudCgpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGhhbmRsZV9lbmRfYmxvY2soKSB7XG4gICAgICAgIC8vIHN0YXRlbWVudHMgbXVzdCBhbGwgYmUgY2xvc2VkIHdoZW4gdGhlaXIgY29udGFpbmVyIGNsb3Nlc1xuICAgICAgICBoYW5kbGVfd2hpdGVzcGFjZV9hbmRfY29tbWVudHMoY3VycmVudF90b2tlbik7XG5cbiAgICAgICAgd2hpbGUgKGZsYWdzLm1vZGUgPT09IE1PREUuU3RhdGVtZW50KSB7XG4gICAgICAgICAgICByZXN0b3JlX21vZGUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBlbXB0eV9icmFjZXMgPSBsYXN0X3R5cGUgPT09ICdUS19TVEFSVF9CTE9DSyc7XG5cbiAgICAgICAgaWYgKGZsYWdzLmlubGluZV9mcmFtZSAmJiAhZW1wdHlfYnJhY2VzKSB7IC8vIHRyeSBpbmxpbmVfZnJhbWUgKG9ubHkgc2V0IGlmIG9wdC5icmFjZXMtcHJlc2VydmUtaW5saW5lKSBmaXJzdFxuICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgIH0gZWxzZSBpZiAob3B0LmJyYWNlX3N0eWxlID09PSBcImV4cGFuZFwiKSB7XG4gICAgICAgICAgICBpZiAoIWVtcHR5X2JyYWNlcykge1xuICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIHNraXAge31cbiAgICAgICAgICAgIGlmICghZW1wdHlfYnJhY2VzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzX2FycmF5KGZsYWdzLm1vZGUpICYmIG9wdC5rZWVwX2FycmF5X2luZGVudGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHdlIFJFQUxMWSBuZWVkIGEgbmV3bGluZSBoZXJlLCBidXQgbmV3bGluZXIgd291bGQgc2tpcCB0aGF0XG4gICAgICAgICAgICAgICAgICAgIG9wdC5rZWVwX2FycmF5X2luZGVudGF0aW9uID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgb3B0LmtlZXBfYXJyYXlfaW5kZW50YXRpb24gPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXN0b3JlX21vZGUoKTtcbiAgICAgICAgcHJpbnRfdG9rZW4oKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBoYW5kbGVfd29yZCgpIHtcbiAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJykge1xuICAgICAgICAgICAgaWYgKGluX2FycmF5KGN1cnJlbnRfdG9rZW4udGV4dCwgWydzZXQnLCAnZ2V0J10pICYmIGZsYWdzLm1vZGUgIT09IE1PREUuT2JqZWN0TGl0ZXJhbCkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRfdG9rZW4udHlwZSA9ICdUS19XT1JEJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5fYXJyYXkoY3VycmVudF90b2tlbi50ZXh0LCBbJ2FzJywgJ2Zyb20nXSkgJiYgIWZsYWdzLmltcG9ydF9ibG9jaykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRfdG9rZW4udHlwZSA9ICdUS19XT1JEJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZmxhZ3MubW9kZSA9PT0gTU9ERS5PYmplY3RMaXRlcmFsKSB7XG4gICAgICAgICAgICAgICAgdmFyIG5leHRfdG9rZW4gPSBnZXRfdG9rZW4oMSk7XG4gICAgICAgICAgICAgICAgaWYgKG5leHRfdG9rZW4udGV4dCA9PT0gJzonKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfdG9rZW4udHlwZSA9ICdUS19XT1JEJztcbiAgICAgICAgICAgICAgICB9XG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ZV93aGl0ZXNwYWNlX2FuZF9jb21tZW50cyhjdXJyZW50X3Rva2VuKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmbGFncy5kb19ibG9jayAmJiAhZmxhZ3MuZG9fd2hpbGUpIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50X3Rva2VuLnR5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgY3VycmVudF90b2tlbi50ZXh0ID09PSAnd2hpbGUnKSB7XG4gICAgICAgICAgICAgICAgLy8gZG8ge30gIyMgd2hpbGUgKClcbiAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIGZsYWdzLmRvX3doaWxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIGRvIHt9IHNob3VsZCBhbHdheXMgaGF2ZSB3aGlsZSBhcyB0aGUgbmV4dCB3b3JkLlxuICAgICAgICAgICAgICAgIC8vIGlmIHdlIGRvbid0IHNlZSB0aGUgZXhwZWN0ZWQgd2hpbGUsIHJlY292ZXJcbiAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgZmxhZ3MuZG9fYmxvY2sgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGlmIG1heSBiZSBmb2xsb3dlZCBieSBlbHNlLCBvciBub3RcbiAgICAgICAgLy8gQmFyZS9pbmxpbmUgaWZzIGFyZSB0cmlja3lcbiAgICAgICAgLy8gTmVlZCB0byB1bndpbmQgdGhlIG1vZGVzIGNvcnJlY3RseTogaWYgKGEpIGlmIChiKSBjKCk7IGVsc2U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KCFvdXRwdXQuanVzdF9hZGRlZF9ibGFua2xpbmUoKSAmJiAhY3VycmVudF90b2tlbi5jb21tZW50c19iZWZvcmUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSh0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnIHx8IGxhc3RfdHlwZSA9PT0gJ1RLX1dPUkQnKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbl9hcnJheShmbGFncy5sYXN0X3RleHQsIFsnZ2V0JywgJ3NldCcsICduZXcnLCAnZXhwb3J0JywgJ2FzeW5jJ10pIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBpbl9hcnJheShmbGFncy5sYXN0X3RleHQsIG5ld2xpbmVfcmVzdHJpY3RlZF90b2tlbnMpKSkge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBmbGFncy5sYXN0X3RleHQgPT09ICdkZWZhdWx0JyAmJiBsYXN0X2xhc3RfdGV4dCA9PT0gJ2V4cG9ydCcpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGFzdF90eXBlID09PSAnVEtfT1BFUkFUT1InIHx8IGZsYWdzLmxhc3RfdGV4dCA9PT0gJz0nKSB7XG4gICAgICAgICAgICAgICAgLy8gZm9vID0gZnVuY3Rpb25cbiAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIWZsYWdzLm11bHRpbGluZV9mcmFtZSAmJiAoaXNfZXhwcmVzc2lvbihmbGFncy5tb2RlKSB8fCBpc19hcnJheShmbGFncy5tb2RlKSkpIHtcbiAgICAgICAgICAgICAgICAvLyAoZnVuY3Rpb25cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgZmxhZ3MubGFzdF93b3JkID0gY3VycmVudF90b2tlbi50ZXh0O1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgcHJlZml4ID0gJ05PTkUnO1xuXG4gICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19FTkRfQkxPQ0snKSB7XG5cbiAgICAgICAgICAgIGlmIChwcmV2aW91c19mbGFncy5pbmxpbmVfZnJhbWUpIHtcbiAgICAgICAgICAgICAgICBwcmVmaXggPSAnU1BBQ0UnO1xuICAgICAgICAgICAgfSBlbHNlIGlmICghKGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpbl9hcnJheShjdXJyZW50X3Rva2VuLnRleHQsIFsnZWxzZScsICdjYXRjaCcsICdmaW5hbGx5JywgJ2Zyb20nXSkpKSB7XG4gICAgICAgICAgICAgICAgcHJlZml4ID0gJ05FV0xJTkUnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAob3B0LmJyYWNlX3N0eWxlID09PSBcImV4cGFuZFwiIHx8XG4gICAgICAgICAgICAgICAgICAgIG9wdC5icmFjZV9zdHlsZSA9PT0gXCJlbmQtZXhwYW5kXCIgfHxcbiAgICAgICAgICAgICAgICAgICAgKG9wdC5icmFjZV9zdHlsZSA9PT0gXCJub25lXCIgJiYgY3VycmVudF90b2tlbi53YW50ZWRfbmV3bGluZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gJ05FV0xJTkUnO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHByZWZpeCA9ICdTUEFDRSc7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19TRU1JQ09MT04nICYmIGZsYWdzLm1vZGUgPT09IE1PREUuQmxvY2tTdGF0ZW1lbnQpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IFNob3VsZCB0aGlzIGJlIGZvciBTVEFURU1FTlQgYXMgd2VsbD9cbiAgICAgICAgICAgIHByZWZpeCA9ICdORVdMSU5FJztcbiAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19TRU1JQ09MT04nICYmIGlzX2V4cHJlc3Npb24oZmxhZ3MubW9kZSkpIHtcbiAgICAgICAgICAgIHByZWZpeCA9ICdTUEFDRSc7XG4gICAgICAgIH0gZWxzZSBpZiAobGFzdF90eXBlID09PSAnVEtfU1RSSU5HJykge1xuICAgICAgICAgICAgcHJlZml4ID0gJ05FV0xJTkUnO1xuICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyB8fCBsYXN0X3R5cGUgPT09ICdUS19XT1JEJyB8fFxuICAgICAgICAgICAgKGZsYWdzLmxhc3RfdGV4dCA9PT0gJyonICYmXG4gICAgICAgICAgICAgICAgKGluX2FycmF5KGxhc3RfbGFzdF90ZXh0LCBbJ2Z1bmN0aW9uJywgJ3lpZWxkJ10pIHx8XG4gICAgICAgICAgICAgICAgICAgIChmbGFncy5tb2RlID09PSBNT0RFLk9iamVjdExpdGVyYWwgJiYgaW5fYXJyYXkobGFzdF9sYXN0X3RleHQsIFsneycsICcsJ10pKSkpKSB7XG4gICAgICAgICAgICBwcmVmaXggPSAnU1BBQ0UnO1xuICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1NUQVJUX0JMT0NLJykge1xuICAgICAgICAgICAgaWYgKGZsYWdzLmlubGluZV9mcmFtZSkge1xuICAgICAgICAgICAgICAgIHByZWZpeCA9ICdTUEFDRSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHByZWZpeCA9ICdORVdMSU5FJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19FTkRfRVhQUicpIHtcbiAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgcHJlZml4ID0gJ05FV0xJTkUnO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpbl9hcnJheShjdXJyZW50X3Rva2VuLnRleHQsIHRva2VuaXplci5saW5lX3N0YXJ0ZXJzKSAmJiBmbGFncy5sYXN0X3RleHQgIT09ICcpJykge1xuICAgICAgICAgICAgaWYgKGZsYWdzLmlubGluZV9mcmFtZSB8fCBmbGFncy5sYXN0X3RleHQgPT09ICdlbHNlJyB8fCBmbGFncy5sYXN0X3RleHQgPT09ICdleHBvcnQnKSB7XG4gICAgICAgICAgICAgICAgcHJlZml4ID0gJ1NQQUNFJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcHJlZml4ID0gJ05FV0xJTkUnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGluX2FycmF5KGN1cnJlbnRfdG9rZW4udGV4dCwgWydlbHNlJywgJ2NhdGNoJywgJ2ZpbmFsbHknXSkpIHtcbiAgICAgICAgICAgIGlmICgoIShsYXN0X3R5cGUgPT09ICdUS19FTkRfQkxPQ0snICYmIHByZXZpb3VzX2ZsYWdzLm1vZGUgPT09IE1PREUuQmxvY2tTdGF0ZW1lbnQpIHx8XG4gICAgICAgICAgICAgICAgICAgIG9wdC5icmFjZV9zdHlsZSA9PT0gXCJleHBhbmRcIiB8fFxuICAgICAgICAgICAgICAgICAgICBvcHQuYnJhY2Vfc3R5bGUgPT09IFwiZW5kLWV4cGFuZFwiIHx8XG4gICAgICAgICAgICAgICAgICAgIChvcHQuYnJhY2Vfc3R5bGUgPT09IFwibm9uZVwiICYmIGN1cnJlbnRfdG9rZW4ud2FudGVkX25ld2xpbmUpKSAmJlxuICAgICAgICAgICAgICAgICFmbGFncy5pbmxpbmVfZnJhbWUpIHtcbiAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG91dHB1dC50cmltKHRydWUpO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gb3V0cHV0LmN1cnJlbnRfbGluZTtcbiAgICAgICAgICAgICAgICAvLyBJZiB3ZSB0cmltbWVkIGFuZCB0aGVyZSdzIHNvbWV0aGluZyBvdGhlciB0aGFuIGEgY2xvc2UgYmxvY2sgYmVmb3JlIHVzXG4gICAgICAgICAgICAgICAgLy8gcHV0IGEgbmV3bGluZSBiYWNrIGluLiAgSGFuZGxlcyAnfSAvLyBjb21tZW50JyBzY2VuYXJpby5cbiAgICAgICAgICAgICAgICBpZiAobGluZS5sYXN0KCkgIT09ICd9Jykge1xuICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHByZWZpeCA9PT0gJ05FV0xJTkUnKSB7XG4gICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGlzX3NwZWNpYWxfd29yZChmbGFncy5sYXN0X3RleHQpKSB7XG4gICAgICAgICAgICAgICAgLy8gbm8gbmV3bGluZSBiZXR3ZWVuICdyZXR1cm4gbm5uJ1xuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgIT09ICdUS19FTkRfRVhQUicpIHtcbiAgICAgICAgICAgICAgICBpZiAoKGxhc3RfdHlwZSAhPT0gJ1RLX1NUQVJUX0VYUFInIHx8ICEoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGluX2FycmF5KGN1cnJlbnRfdG9rZW4udGV4dCwgWyd2YXInLCAnbGV0JywgJ2NvbnN0J10pKSkgJiYgZmxhZ3MubGFzdF90ZXh0ICE9PSAnOicpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gbm8gbmVlZCB0byBmb3JjZSBuZXdsaW5lIG9uICd2YXInOiBmb3IgKHZhciB4ID0gMC4uLilcbiAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBjdXJyZW50X3Rva2VuLnRleHQgPT09ICdpZicgJiYgZmxhZ3MubGFzdF90ZXh0ID09PSAnZWxzZScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vIG5ld2xpbmUgZm9yIH0gZWxzZSBpZiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGluX2FycmF5KGN1cnJlbnRfdG9rZW4udGV4dCwgdG9rZW5pemVyLmxpbmVfc3RhcnRlcnMpICYmIGZsYWdzLmxhc3RfdGV4dCAhPT0gJyknKSB7XG4gICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGZsYWdzLm11bHRpbGluZV9mcmFtZSAmJiBpc19hcnJheShmbGFncy5tb2RlKSAmJiBmbGFncy5sYXN0X3RleHQgPT09ICcsJyAmJiBsYXN0X2xhc3RfdGV4dCA9PT0gJ30nKSB7XG4gICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7IC8vIH0sIGluIGxpc3RzIGdldCBhIG5ld2xpbmUgdHJlYXRtZW50XG4gICAgICAgIH0gZWxzZSBpZiAocHJlZml4ID09PSAnU1BBQ0UnKSB7XG4gICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICBmbGFncy5sYXN0X3dvcmQgPSBjdXJyZW50X3Rva2VuLnRleHQ7XG5cbiAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJykge1xuICAgICAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4udGV4dCA9PT0gJ2RvJykge1xuICAgICAgICAgICAgICAgIGZsYWdzLm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AgICAgICAgICAgICAgICAgIGFsbG93X3dyYXBfb3JfcHJlc2VydmVkX25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgICAgICBjYXNlIE9QRVJBVE9SX1BPU0lUSU9OLmFmdGVyX25ld2xpbmU6XG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZSBjdXJyZW50IHRva2VuIGlzIGFueXRoaW5nIGJ1dCBjb2xvbiwgb3IgKHZpYSBkZWR1Y3Rpb24pIGl0J3MgYSBjb2xvbiBhbmQgaW4gYSB0ZXJuYXJ5IHN0YXRlbWVudCxcbiAgICAgICAgICAgICAgICAgICAgLy8gICB0aGVuIHByaW50IGEgbmV3bGluZS5cblxuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzQ29sb24gfHwgaXNUZXJuYXJ5Q29sb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnZXRfdG9rZW4oMSkud2FudGVkX25ld2xpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKGZhbHNlLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsb3dfd3JhcF9vcl9wcmVzZXJ2ZWRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfdG9rZW4oKTtcblxuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBPUEVSQVRPUl9QT1NJVElPTi5wcmVzZXJ2ZV9uZXdsaW5lOlxuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzT3RoZXJDb2xvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWxsb3dfd3JhcF9vcl9wcmVzZXJ2ZWRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgd2UganVzdCBhZGRlZCBhIG5ld2xpbmUsIG9yIHRoZSBjdXJyZW50IHRva2VuIGlzIDogYW5kIGl0J3Mgbm90IGEgdGVybmFyeSBzdGF0ZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgIC8vICAgdGhlbiB3ZSBzZXQgc3BhY2VfYmVmb3JlIHRvIGZhbHNlXG4gICAgICAgICAgICAgICAgICAgIHNwYWNlX2JlZm9yZSA9ICEob3V0cHV0Lmp1c3RfYWRkZWRfbmV3bGluZSgpIHx8IGlzT3RoZXJDb2xvbik7XG5cbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHNwYWNlX2JlZm9yZTtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfdG9rZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0dlbmVyYXRvckFzdGVyaXNrKSB7XG4gICAgICAgICAgICBhbGxvd193cmFwX29yX3ByZXNlcnZlZF9uZXdsaW5lKC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9uZXdsaW5lICYmIChjdXJyZW50X3Rva2VuLnRleHQgPT09ICctLScgfHwgY3VycmVudF90b2tlbi50ZXh0ID09PSAnKysnKSkge1xuICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoZmFsc2UsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZmxhZ3MubGFzdF90ZXh0ID09PSAnOycgJiYgaXNfZXhwcmVzc2lvbihmbGFncy5tb2RlKSkge1xuICAgICAgICAgICAgICAgIC8vIGZvciAoOzsgKytpKVxuICAgICAgICAgICAgICAgIC8vICAgICAgICBeXl5cbiAgICAgICAgICAgICAgICBzcGFjZV9iZWZvcmUgPSB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnKSB7XG4gICAgICAgICAgICAgICAgc3BhY2VfYmVmb3JlID0gdHJ1ZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGFzdF90eXBlID09PSAnVEtfRU5EX0VYUFInKSB7XG4gICAgICAgICAgICAgICAgc3BhY2VfYmVmb3JlID0gIShmbGFncy5sYXN0X3RleHQgPT09ICddJyAmJiAoY3VycmVudF90b2tlbi50ZXh0ID09PSAnLS0nIHx8IGN1cnJlbnRfdG9rZW4udGV4dCA9PT0gJysrJykpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19PUEVSQVRPUicpIHtcbiAgICAgICAgICAgICAgICAvLyBhKysgKyArK2I7XG4gICAgICAgICAgICAgICAgLy8gYSAtIC1iXG4gICAgICAgICAgICAgICAgc3BhY2VfYmVmb3JlID0gaW5fYXJyYXkoY3VycmVudF90b2tlbi50ZXh0LCBbJy0tJywgJy0nLCAnKysnLCAnKyddKSAmJiBpbl9hcnJheShmbGFncy5sYXN0X3RleHQsIFsnLS0nLCAnLScsICcrKycsICcrJ10pO1xuICAgICAgICAgICAgICAgIC8vICsgYW5kIC0gYXJlIG5vdCB1bmFyeSB3aGVuIHByZWNlZWRlZCBieSAtLSBvciArKyBvcGVyYXRvclxuICAgICAgICAgICAgICAgIC8vIGEtLSArIGJcbiAgICAgICAgICAgICAgICAvLyBhICogK2JcbiAgICAgICAgICAgICAgICAvLyBhIC0gLWJcbiAgICAgICAgICAgICAgICBpZiAoaW5fYXJyYXkoY3VycmVudF90b2tlbi50ZXh0LCBbJysnLCAnLSddKSAmJiBpbl9hcnJheShmbGFncy5sYXN0X3RleHQsIFsnLS0nLCAnKysnXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgc3BhY2VfYWZ0ZXIgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICBpZiAoKChmbGFncy5tb2RlID09PSBNT0RFLkJsb2NrU3RhdGVtZW50ICYmICFmbGFncy5pbmxpbmVfZnJhbWUpIHx8IGZsYWdzLm1vZGUgPT09IE1PREUuU3RhdGVtZW50KSAmJlxuICAgICAgICAgICAgICAgIChmbGFncy5sYXN0X3RleHQgPT09ICd7JyB8fCBmbGFncy5sYXN0X3RleHQgPT09ICc7JykpIHtcbiAgICAgICAgICAgICAgICAvLyB7IGZvbzsgLS1pIH1cbiAgICAgICAgICAgICAgICAvLyBmb28oKTsgLS1iYXI7XG4gICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gfHwgc3BhY2VfYmVmb3JlO1xuICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gc3BhY2VfYWZ0ZXI7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaGFuZGxlX2Jsb2NrX2NvbW1lbnQocHJlc2VydmVfc3RhdGVtZW50X2ZsYWdzKSB7XG4gICAgICAgIGlmIChvdXRwdXQucmF3KSB7XG4gICAgICAgICAgICBvdXRwdXQuYWRkX3Jhd190b2tlbihjdXJyZW50X3Rva2VuKTtcbiAgICAgICAgICAgIGlmIChjdXJyZW50X3Rva2VuLmRpcmVjdGl2ZXMgJiYgY3VycmVudF90b2tlbi5kaXJlY3RpdmVzLnByZXNlcnZlID09PSAnZW5kJykge1xuICAgICAgICAgICAgICAgIC8vIElmIHdlJ3JlIHRlc3RpbmcgdGhlIHJhdyBvdXRwdXQgYmVoYXZpb3IsIGRvIG5vdCBhbGxvdyBhIGRpcmVjdGl2ZSB0byB0dXJuIGl0IG9mZi5cbiAgICAgICAgICAgICAgICBvdXRwdXQucmF3ID0gb3B0LnRlc3Rfb3V0cHV0X3JhdztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjdXJyZW50X3Rva2VuLmRpcmVjdGl2ZXMpIHtcbiAgICAgICAgICAgIHByaW50X25ld2xpbmUoZmFsc2UsIHByZXNlcnZlX3N0YXRlbWVudF9mbGFncyk7XG4gICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4uZGlyZWN0aXZlcy5wcmVzZXJ2ZSA9PT0gJ3N0YXJ0Jykge1xuICAgICAgICAgICAgICAgIG91dHB1dC5yYXcgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcHJpbnRfbmV3bGluZShmYWxzZSwgdHJ1ZSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBpbmxpbmUgYmxvY2tcbiAgICAgICAgaWYgKCFhY29ybi5uZXdsaW5lLnRlc3QoY3VycmVudF90b2tlbi50ZXh0KSAmJiAhY3VycmVudF90b2tlbi53YW50ZWRfbmV3bGluZSkge1xuICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbGluZXMgPSBzcGxpdF9saW5lYnJlYWtzKGN1cnJlbnRfdG9rZW4udGV4dCk7XG4gICAgICAgIHZhciBqOyAvLyBpdGVyYXRvciBmb3IgdGhpcyBjYXNlXG4gICAgICAgIHZhciBqYXZhZG9jID0gZmFsc2U7XG4gICAgICAgIHZhciBzdGFybGVzcyA9IGZhbHNlO1xuICAgICAgICB2YXIgbGFzdEluZGVudCA9IGN1cnJlbnRfdG9rZW4ud2hpdGVzcGFjZV9iZWZvcmU7XG4gICAgICAgIHZhciBsYXN0SW5kZW50TGVuZ3RoID0gbGFzdEluZGVudC5sZW5ndGg7XG5cbiAgICAgICAgLy8gYmxvY2sgY29tbWVudCBzdGFydHMgd2l0aCBhIG5ldyBsaW5lXG4gICAgICAgIHByaW50X25ld2xpbmUoZmFsc2UsIHByZXNlcnZlX3N0YXRlbWVudF9mbGFncyk7XG4gICAgICAgIGlmIChsaW5lcy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBqYXZhZG9jID0gYWxsX2xpbmVzX3N0YXJ0X3dpdGgobGluZXMuc2xpY2UoMSksICcqJyk7XG4gICAgICAgICAgICBzdGFybGVzcyA9IGVhY2hfbGluZV9tYXRjaGVzX2luZGVudChsaW5lcy5zbGljZSgxKSwgbGFzdEluZGVudCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBmaXJzdCBsaW5lIGFsd2F5cyBpbmRlbnRlZFxuICAgICAgICBwcmludF90b2tlbihsaW5lc1swXSk7XG4gICAgICAgIGZvciAoaiA9IDE7IGogPCBsaW5lcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgcHJpbnRfbmV3bGluZShmYWxzZSwgdHJ1ZSk7XG4gICAgICAgICAgICBpZiAoamF2YWRvYykge1xuICAgICAgICAgICAgICAgIC8vIGphdmFkb2M6IHJlZm9ybWF0IGFuZCByZS1pbmRlbnRcbiAgICAgICAgICAgICAgICBwcmludF90b2tlbignICcgKyBsdHJpbShsaW5lc1tqXSkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChzdGFybGVzcyAmJiBsaW5lc1tqXS5sZW5ndGggPiBsYXN0SW5kZW50TGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgLy8gc3Rhcmxlc3M6IHJlLWluZGVudCBub24tZW1wdHkgY29udGVudCwgYXZvaWRpbmcgdHJpbVxuICAgICAgICAgICAgICAgIHByaW50X3Rva2VuKGxpbmVzW2pdLnN1YnN0cmluZyhsYXN0SW5kZW50TGVuZ3RoKSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIG5vcm1hbCBjb21tZW50cyBvdXRwdXQgcmF3XG4gICAgICAgICAgICAgICAgb3V0cHV0LmFkZF90b2tlbihsaW5lc1tqXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBmb3IgY29tbWVudHMgb2YgbW9yZSB0aGFuIG9uZSBsaW5lLCBtYWtlIHN1cmUgdGhlcmUncyBhIG5ldyBsaW5lIGFmdGVyXG4gICAgICAgIHByaW50X25ld2xpbmUoZmFsc2UsIHByZXNlcnZlX3N0YXRlbWVudF9mbGFncyk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaGFuZGxlX2NvbW1lbnQocHJlc2VydmVfc3RhdGVtZW50X2ZsYWdzKSB7XG4gICAgICAgIGlmIChjdXJyZW50X3Rva2VuLndhbnRlZF9uZXdsaW5lKSB7XG4gICAgICAgICAgICBwcmludF9uZXdsaW5lKGZhbHNlLCBwcmVzZXJ2ZV9zdGF0ZW1lbnRfZmxhZ3MpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb3V0cHV0LnRyaW0odHJ1ZSk7XG4gICA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luZGVudCgpO1xuICAgICAgICAgICAgaW5kZXgrKztcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLnRyaW0gPSBmdW5jdGlvbihlYXRfbmV3bGluZXMpIHtcbiAgICAgICAgZWF0X25ld2xpbmVzID0gKGVhdF9uZXdsaW5lcyA9PT0gdW5kZWZpbmVkKSA/IGZhbHNlIDogZWF0X25ld2xpbmVzO1xuXG4gICAgICAgIHRoaXMuY3VycmVudF9saW5lLnRyaW0oaW5kZW50X3N0cmluZywgYmFzZUluZGVudFN0cmluZyk7XG5cbiAgICAgICAgd2hpbGUgKGVhdF9uZXdsaW5lcyAmJiBsaW5lcy5sZW5ndGggPiAxICYmXG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRfbGluZS5pc19lbXB0eSgpKSB7XG4gICAgICAgICAgICBsaW5lcy5wb3AoKTtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudF9saW5lID0gbGluZXNbbGluZXMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRfbGluZS50cmltKCk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnByZXZpb3VzX2xpbmUgPSBsaW5lcy5sZW5ndGggPiAxID8gbGluZXNbbGluZXMubGVuZ3RoIC0gMl0gOiBudWxsO1xuICAgIH07XG5cbiAgICB0aGlzLmp1c3RfYWRkZWRfbmV3bGluZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5jdXJyZW50X2xpbmUuaXNfZW1wdHkoKTtcbiAgICB9O1xuXG4gICAgdGhpcy5qdXN0X2FkZGVkX2JsYW5rbGluZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAodGhpcy5qdXN0X2FkZGVkX25ld2xpbmUoKSkge1xuICAgICAgICAgICAgaWYgKGxpbmVzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOyAvLyBzdGFydCBvZiB0aGUgZmlsZSBhbmQ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pZiAoY29tbWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgbmV4dC5jb21tZW50c19iZWZvcmUgPSBjb21tZW50cztcbiAgICAgICAgICAgICAgICBjb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAobmV4dC50eXBlID09PSAnVEtfU1RBUlRfQkxPQ0snIHx8IG5leHQudHlwZSA9PT0gJ1RLX1NUQVJUX0VYUFInKSB7XG4gICAgICAgICAgICAgICAgbmV4dC5wYXJlbnQgPSBsYXN0O1xuICAgICAgICAgICAgICAgIG9wZW5fc3RhY2sucHVzaChvcGVuKTtcbiAgICAgICAgICAgICAgICBvcGVuID0gbmV4dDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKG5leHQudHlwZSA9PT0gJ1RLX0VORF9CTE9DSycgfHwgbmV4dC50eXBlID09PSAnVEtfRU5EX0VYUFInKSAmJlxuICAgICAgICAgICAgICAgIChvcGVuICYmIChcbiAgICAgICAgICAgICAgICAgICAgKG5leHQudGV4dCA9PT0gJ10nICYmIG9wZW4udGV4dCA9PT0gJ1snKSB8fFxuICAgICAgICAgICAgICAgICAgICAobmV4dC50ZXh0ID09PSAnKScgJiYgb3Blbi50ZXh0ID09PSAnKCcpIHx8XG4gICAgICAgICAgICAgICAgICAgIChuZXh0LnRleHQgPT09ICd9JyAmJiBvcGVuLnRleHQgPT09ICd7JykpKSkge1xuICAgICAgICAgICAgICAgIG5leHQucGFyZW50ID0gb3Blbi5wYXJlbnQ7XG4gICAgICAgICAgICAgICAgbmV4dC5vcGVuZWQgPSBvcGVuO1xuXG4gICAgICAgICAgICAgICAgb3BlbiA9IG9wZW5fc3RhY2sucG9wKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRva2Vucy5wdXNoKG5leHQpO1xuICAgICAgICAgICAgbGFzdCA9IG5leHQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdG9rZW5zO1xuICAgIH07XG5cbiA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b2tlbiA9IHRva2Vuc1t0b2tlbnMubGVuZ3RoIC0gMV07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBGb3IgdGhlIHNha2Ugb2YgdG9rZW5pemluZyB3ZSBjYW4gcHJldGVuZCB0aGF0IHRoZXJlIHdhcyBvbiBvcGVuIGJyYWNlIHRvIHN0YXJ0XG4gICAgICAgICAgICBsYXN0X3Rva2VuID0gbmV3IFRva2VuKCdUS19TVEFSVF9CTE9DSycsICd7Jyk7XG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoaW5fYXJyYXkoYywgd2hpdGVzcGFjZSkpIHtcblxuICAgICAgICAgICAgaWYgKGFjb3JuLm5ld2xpbmUudGVzdChjKSkge1xuICAgICAgICAgICAgICAgIGlmICghKGMgPT09ICdcXG4nICYmIGlucHV0LnBlZWsoLTIpID09PSAnXFxyJykpIHtcbiAgICAgICAgICAgICAgICAgICAgbl9uZXdsaW5lcyArPSAxO1xuICAgICAgICAgICAgICAgICAgICB3aGl0ZXNwYWNlX29uX3RoaXNfbGluZSA9IFtdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgd2hpdGVzcGFjZV9vbl90aGlzX2xpbmUucHVzaChjKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYyA9IGlucHV0Lm5leHQoKTtcblxuICAgICAgICAgICAgaWYgKGMgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gWycnLCAnVEtfRU9GJ107XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAod2hpdGVzcGFjZV9vbl90aGlzX2xpbmUubGVuZ3RoKSB7XG4gICAgICAgICAgICB3aGl0ZXNwYWNlX2JlZm9yZV90b2tlbiA9IHdoaXRlc3BhY2Vfb25fdGhpc19saW5lLmpvaW4oJycpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRpZ2l0LnRlc3QoYykgfHwgKGMgPT09ICcuJyAmJiBpbnB1dC50ZXN0Q2hhcihkaWdpdCkpKSB7XG4gICAgICAgICAgICB2YXIgYWxsb3dfZGVjaW1hbCA9IHRydWU7XG4gICAgICAgICAgICB2YXIgYWxsb3dfZSA9IHRydWU7XG4gICAgICAgICAgICB2YXIgbG9jYWxfZGlnaXQgPSBkaWdpdDtcblxuICAgICAgICAgICAgaWYgKGMgPT09ICcwJyAmJiBpbnB1dC50ZXN0Q2hhcigvW1h4T29CYl0vKSkge1xuICAgICAgICAgICAgICAgIC8vIHN3aXRjaCB0byBoZXgvb2N0L2JpbiBudW1iZXIsIG5vIGRlY2ltYWwgb3IgZSwganVzdCBoZXgvb2N0L2JpbiBkaWdpdHNcbiAgICAgICAgICAgICAgICBhbGxvd19kZWNpbWFsID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgYWxsb3dfZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGlmIChpbnB1dC50ZXN0Q2hhcigvW0JiXS8pKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2FsX2RpZ2l0ID0gZGlnaXRfYmluO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQudGVzdENoYXIoL1tPb10vKSkge1xuICAgICAgICAgICAgICAgICAgICBsb2NhbF9kaWdpdCA9IGRpZ2l0X29jdDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsb2NhbF9kaWdpdCA9IGRpZ2l0X2hleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYyArPSBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGMgPT09ICcuJykge1xuICAgICAgICAgICAgICAgIC8vIEFscmVhZHkgaGF2ZSBhIGRlY2ltYWwgZm9yIHRoaXMgbGl0ZXJhbCwgZG9uJ3QgYWxsb3cgYW5vdGhlclxuICAgICAgICAgICAgICAgIGFsbG93X2RlY2ltYWwgPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gd2Uga25vdyB0aGlzIGZpcnN0IGxvb3Agd2lsbCBydW4uICBJdCBrZWVwcyB0aGUgbG9naWMgc2ltcGxlci5cbiAgICAgICAgICAgICAgICBjID0gJyc7XG4gICAgICAgICAgICAgICAgaW5wdXQuYmFjaygpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBBZGQgdGhlIGRpZ2l0c1xuICAgICAgICAgICAgd2hpbGUgKGlucHV0LnRlc3RDaGFyKGxvY2FsX2RpZ2l0KSkge1xuICAgICAgICAgICAgICAgIGMgKz0gaW5wdXQubmV4dCgpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGFsbG93X2RlY2ltYWwgJiYgaW5wdXQucGVlaygpID09PSAnLicpIHtcbiAgICAgICAgICAgICAgICAgICAgYyArPSBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIGFsbG93X2RlY2ltYWwgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBhID0gMS5lLTcgaXMgdmFsaWQsIHNvIHdlIHRlc3QgZm9yIC4gdGhlbiBlIGluIG9uZSBsb29wXG4gICAgICAgICAgICAgICAgaWYgKGFsbG93X2UgJiYgaW5wdXQudGVzdENoYXIoL1tFZV0vKSkge1xuICAgICAgICAgICAgICAgICAgICBjICs9IGlucHV0Lm5leHQoKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQudGVzdENoYXIoL1srLV0vKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYyArPSBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBhbGxvd19lID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGFsbG93X2RlY2ltYWwgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX1dPUkQnXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChhY29ybi5pc0lkZW50aWZpZXJTdGFydChpbnB1dC5wZWVrQ2hhckNvZGUoLTEpKSkge1xuICAgICAgICAgICAgaWYgKGlucHV0Lmhhc05leHQoKSkge1xuICAgICAgICAgICAgICAgIHdoaWxlIChhY29ybi5pc0lkZW50aWZpZXJDaGFyKGlucHV0LnBlZWtDaGFyQ29kZSgpKSkge1xuICAgICAgICAgICAgICAgICAgICBjICs9IGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpbnB1dC5oYXNOZXh0KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIShsYXN0X3Rva2VuLnR5cGUgPT09ICdUS19ET1QnIHx8XG4gICAgICAgICAgICAgICAgICAgIChsYXN0X3Rva2VuLnR5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgaW5fYXJyYXkobGFzdF90b2tlbi50ZXh0LCBbJ3NldCcsICdnZXQnXSkpKSAmJlxuICAgICAgICAgICAgICAgIGluX2FycmF5KGMsIHJlc2VydmVkX3dvcmRzKSkge1xuICAgICAgICAgICAgICAgIGlmIChjID09PSAnaW4nIHx8IGMgPT09ICdvZicpIHsgLy8gaGFjayBmb3IgJ2luJyBhbmQgJ29mJyBvcGVyYXRvcnNcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfT1BFUkFUT1InXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfUkVTRVJWRUQnXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfV09SRCddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICcoJyB8fCBjID09PSAnWycpIHtcbiAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX1NUQVJUX0VYUFInXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjID09PSAnKScgfHwgYyA9PT0gJ10nKSB7XG4gICAgICAgICAgICByZXR1cm4gW2MsICdUS19FTkRfRVhQUiddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICd7Jykge1xuICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfU1RBUlRfQkxPQ0snXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjID09PSAnfScpIHtcbiAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX0VORF9CTE9DSyddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICc7Jykge1xuICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfU0VNSUNPTE9OJ107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYyA9PT0gJy8nKSB7XG4gICAgICAgICAgICB2YXIgY29tbWVudCA9ICcnO1xuICAgICAgICAgICAgdmFyIGNvbW1lbnRfbWF0Y2g7XG4gICAgICAgICAgICAvLyBwZWVrIGZvciBjb21tZW50IC8qIC4uLiAqL1xuICAgICAgICAgICAgaWYgKGlucHV0LnBlZWsoKSA9PT0gJyonKSB7XG4gICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgIGNvbW1lbnRfbWF0Y2ggPSBpbnB1dC5tYXRjaChibG9ja19jb21tZW50X3BhdHRlcm4pO1xuICAgICAgICAgICAgICAgIGNvbW1lbnQgPSAnLyonICsgY29tbWVudF9tYXRjaFswXTtcbiAgICAgICAgICAgICAgICB2YXIgZGlyZWN0aXZlcyA9IGdldF9kaXJlY3RpdmVzKGNvbW1lbnQpO1xuICAgICAgICAgICAgICAgIGlmIChkaXJlY3RpdmVzICYmIGRpcmVjdGl2ZXMuaWdub3JlID09PSAnc3RhcnQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1lbnRfbWF0Y2ggPSBpbnB1dC5tYXRjaChkaXJlY3RpdmVzX2VuZF9pZ25vcmVfcGF0dGVybik7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgKz0gY29tbWVudF9tYXRjaFswXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29tbWVudCA9IGNvbW1lbnQucmVwbGFjZShhY29ybi5hbGxMaW5lQnJlYWtzLCAnXFxuJyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtjb21tZW50LCAnVEtfQkxPQ0tfQ09NTUVOVCcsIGRpcmVjdGl2ZXNdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gcGVlayBmb3IgY29tbWVudCAvLyAuLi5cbiAgICAgICAgICAgIGlmIChpbnB1dC5wZWVrKCkgPT09ICcvJykge1xuICAgICAgICAgICAgICAgIGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICBjb21tZW50X21hdGNoID0gaW5wdXQubWF0Y2goY29tbWVudF9wYXR0ZXJuKTtcbiAgICAgICAgICAgICAgICBjb21tZW50ID0gJy8vJyArIGNvbW1lbnRfbWF0Y2hbMF07XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtjb21tZW50LCAnVEtfQ09NTUVOVCddO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc3RhcnRYbWxSZWdFeHAgPSAvPCgpKFstYS16QS1aOjAtOV8uXSt8e1tcXHNcXFNdKz99fCFcXFtDREFUQVxcW1tcXHNcXFNdKj9cXF1cXF0pKFxccyt7W1xcc1xcU10rP318XFxzK1stYS16QS1aOjAtOV8uXSt8XFxzK1stYS16QS1aOjAtOV8uXStcXHMqPVxccyooJ1teJ10qJ3xcIlteXCJdKlwifHtbXFxzXFxTXSs/fSkpKlxccyooXFwvPylcXHMqPi9nO1xuXG4gICAgICAgIGlmIChjID09PSAnYCcgfHwgYyA9PT0gXCInXCIgfHwgYyA9PT0gJ1wiJyB8fCAvLyBzdHJpbmdcbiAgICAgICAgICAgIChcbiAgICAgICAgICAgICAgICAoYyA9PT0gJy8nKSB8fCAvLyByZWdleHBcbiAgICAgICAgICAgICAgICAob3B0cy5lNHggJiYgYyA9PT0gXCI8XCIgJiYgaW5wdXQudGVzdChzdGFydFhtbFJlZ0V4cCwgLTEpKSAvLyB4bWxcbiAgICAgICAgICAgICkgJiYgKCAvLyByZWdleCBhbmQgeG1sIGNhbiBvbmx5IGFwcGVhciBpbiBzcGVjaWZpYyBsb2NhdGlvbnMgZHVyaW5nIHBhcnNpbmdcbiAgICAgICAgICAgICAgICAobGFzdF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGluX2FycmF5KGxhc3RfdG9rZW4udGV4dCwgWydyZXR1cm4nLCAnY2FzZScsICd0aHJvdycsICdlbHNlJywgJ2RvJywgJ3R5cGVvZicsICd5aWVsZCddKSkgfHxcbiAgICAgICAgICAgICAgICAobGFzdF90b2tlbi50eXBlID09PSAnVEtfRU5EX0VYUFInICYmIGxhc3RfdG9rZW4udGV4dCA9PT0gJyknICYmXG4gICAgICAgICAgICAgICAgICAgIGxhc3RfdG9rZW4ucGFyZW50ICYmIGxhc3RfdG9rZW4ucGFyZW50LnR5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgaW5fYXJyYXkobGFzdF90b2tlbi5wYXJlbnQudGV4dCwgWydpZicsICd3aGlsZScsICdmb3InXSkpIHx8XG4gICAgICAgICAgICAgICAgKGluX2FycmF5KGxhc3RfdG9rZW4udHlwZSwgWydUS19DT01NRU5UJywgJ1RLX1NUQVJUX0VYUFInLCAnVEtfU1RBUlRfQkxPQ0snLFxuICAgICAgICAgICAgICAgICAgICAnVEtfRU5EX0JMT0NLJywgJ1RLX09QRVJBVE9SJywgJ1RLX0VRVUFMUycsICdUS19FT0YnLCAnVEtfU0VNSUNPTE9OJywgJ1RLX0NPTU1BJ1xuICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgKSkge1xuXG4gICAgICAgICAgICB2YXIgc2VwID0gYyxcbiAgICAgICAgICAgICAgICBlc2MgPSBmYWxzZSxcbiAgICAgICAgICAgICAgICBoYXNfY2hhcl9lc2NhcGVzID0gZmFsc2U7XG5cbiAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgPSBjO1xuXG4gICAgICAgICAgICBpZiAoc2VwID09PSAnLycpIHtcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSByZWdleHBcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIHZhciBpbl9jaGFyX2NsYXNzID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGlucHV0Lmhhc05leHQoKSAmJlxuICAgICAgICAgICAgICAgICAgICAoKGVzYyB8fCBpbl9jaGFyX2NsYXNzIHx8IGlucHV0LnBlZWsoKSAhPT0gc2VwKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgIWlucHV0LnRlc3RDaGFyKGFjb3JuLm5ld2xpbmUpKSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHRpbmdfc3RyaW5nICs9IGlucHV0LnBlZWsoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFlc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVzYyA9IGlucHV0LnBlZWsoKSA9PT0gJ1xcXFwnO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0LnBlZWsoKSA9PT0gJ1snKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5fY2hhcl9jbGFzcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LnBlZWsoKSA9PT0gJ10nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5fY2hhcl9jbGFzcyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXNjID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAob3B0cy5lNHggJiYgc2VwID09PSAnPCcpIHtcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBlNHggeG1sIGxpdGVyYWxzXG4gICAgICAgICAgICAgICAgLy9cblxuICAgICAgICAgICAgICAgIHZhciB4bWxSZWdFeHAgPSAvW1xcc1xcU10qPzwoXFwvPykoWy1hLXpBLVo6MC05Xy5dK3x7W1xcc1xcU10rP318IVxcW0NEQVRBXFxbW1xcc1xcU10qP1xcXVxcXSkoXFxzK3tbXFxzXFxTXSs/fXxcXHMrWy1hLXpBLVo6MC05Xy5dK3xcXHMrWy1hLXpBLVo6MC05Xy5dK1xccyo9XFxzKignW14nXSonfFwiW15cIl0qXCJ8e1tcXHNcXFNdKz99KSkqXFxzKihcXC8/KVxccyo+L2c7XG4gICAgICAgICAgICAgICAgaW5wdXQuYmFjaygpO1xuICAgICAgICAgICAgICAgIHZhciB4bWxTdHIgPSAnJztcbiAgICAgICAgICAgICAgICB2YXIgbWF0Y2ggPSBpbnB1dC5tYXRjaChzdGFydFhtbFJlZ0V4cCk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRyaW0gcm9vdCB0YWcgdG8gYXR0ZW1wdCB0b1xuICAgICAgICAgICAgICAgICAgICB2YXIgcm9vdFRhZyA9IG1hdGNoWzJdLnJlcGxhY2UoL157XFxzKy8sICd7JykucmVwbGFjZSgvXFxzK30kLywgJ30nKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGlzQ3VybHlSb290ID0gcm9vdFRhZy5pbmRleE9mKCd7JykgPT09IDA7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXB0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChtYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlzRW5kVGFnID0gISFtYXRjaFsxXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YWdOYW1lID0gbWF0Y2hbMl07XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXNTaW5nbGV0b25UYWcgPSAoISFtYXRjaFttYXRjaC5sZW5ndGggLSAxXSkgfHwgKHRhZ05hbWUuc2xpY2UoMCwgOCkgPT09IFwiIVtDREFUQVtcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzU2luZ2xldG9uVGFnICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRhZ05hbWUgPT09IHJvb3RUYWcgfHwgKGlzQ3VybHlSb290ICYmIHRhZ05hbWUucmVwbGFjZSgvXntcXHMrLywgJ3snKS5yZXBsYWNlKC9cXHMrfSQvLCAnfScpKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNFbmRUYWcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1kZXB0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArK2RlcHRoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHhtbFN0ciArPSBtYXRjaFswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXB0aCA8PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaCA9IGlucHV0Lm1hdGNoKHhtbFJlZ0V4cCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgd2UgZGlkbid0IGNsb3NlIGNvcnJlY3RseSwga2VlcCB1bmZvcm1hdHRlZC5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFtYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgeG1sU3RyICs9IGlucHV0Lm1hdGNoKC9bXFxzXFxTXSovZylbMF07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgeG1sU3RyID0geG1sU3RyLnJlcGxhY2UoYWNvcm4uYWxsTGluZUJyZWFrcywgJ1xcbicpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW3htbFN0ciwgXCJUS19TVFJJTkdcIl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBzdHJpbmdcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIHZhciBwYXJzZV9zdHJpbmcgPSBmdW5jdGlvbihkZWxpbWl0ZXIsIGFsbG93X3VuZXNjYXBlZF9uZXdsaW5lcywgc3RhcnRfc3ViKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRlbXBsYXRlIHN0cmluZ3MgY2FuIHRyYXZlcnMgbGluZXMgd2l0aG91dCBlc2NhcGUgY2hhcmFjdGVycy5cbiAgICAgICAgICAgICAgICAgICAgLy8gT3RoZXIgc3RyaW5ncyBjYW5ub3RcbiAgICAgICAgICAgICAgICAgICAgdmFyIGN1cnJlbnRfY2hhcjtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGlucHV0Lmhhc05leHQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudF9jaGFyID0gaW5wdXQucGVlaygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoZXNjIHx8IChjdXJyZW50X2NoYXIgIT09IGRlbGltaXRlciAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWxsb3dfdW5lc2NhcGVkX25ld2xpbmVzIHx8ICFhY29ybi5uZXdsaW5lLnRlc3QoY3VycmVudF9jaGFyKSkpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBIYW5kbGUgXFxyXFxuIGxpbmVicmVha3MgYWZ0ZXIgZXNjYXBlcyBvciBpbiB0ZW1wbGF0ZSBzdHJpbmdzXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGVzYyB8fCBhbGxvd191bmVzY2FwZWRfbmV3bGluZXMpICYmIGFjb3JuLm5ld2xpbmUudGVzdChjdXJyZW50X2NoYXIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRfY2hhciA9PT0gJ1xccicgJiYgaW5wdXQucGVlaygxKSA9PT0gJ1xcbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X2NoYXIgPSBpbnB1dC5wZWVrKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgKz0gJ1xcbic7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgKz0gY3VycmVudF9jaGFyO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXNjKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRfY2hhciA9PT0gJ3gnIHx8IGN1cnJlbnRfY2hhciA9PT0gJ3UnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc19jaGFyX2VzY2FwZXMgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc2MgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNjID0gY3VycmVudF9jaGFyID09PSAnXFxcXCc7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0Lm5leHQoKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXJ0X3N1YiAmJiByZXN1bHRpbmdfc3RyaW5nLmluZGV4T2Yoc3RhcnRfc3ViLCByZXN1bHRpbmdfc3RyaW5nLmxlbmd0aCAtIHN0YXJ0X3N1Yi5sZW5ndGgpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZWxpbWl0ZXIgPT09ICdgJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZV9zdHJpbmcoJ30nLCBhbGxvd191bmVzY2FwZWRfbmV3bGluZXMsICdgJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2Vfc3RyaW5nKCdgJywgYWxsb3dfdW5lc2NhcGVkX25ld2xpbmVzLCAnJHsnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQuaGFzTmV4dCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgKz0gaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VwID09PSAnYCcpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2Vfc3RyaW5nKCdgJywgdHJ1ZSwgJyR7Jyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2Vfc3RyaW5nKHNlcCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaGFzX2NoYXJfZXNjYXBlcyAmJiBvcHRzLnVuZXNjYXBlX3N0cmluZ3MpIHtcbiAgICAgICAgICAgICAgICByZXN1bHRpbmdfc3RyaW5nID0gdW5lc2NhcGVfc3RyaW5nKHJlc3VsdGluZ19zdHJpbmcpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaW5wdXQucGVlaygpID09PSBzZXApIHtcbiAgICAgICAgICAgICAgICByZXN1bHRpbmdfc3RyaW5nICs9IHNlcDtcbiAgICAgICAgICAgICAgICBpbnB1dC5uZXh0KCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VwID09PSAnLycpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gcmVnZXhwcyBtYXkgaGF2ZSBtb2RpZmllcnMgL3JlZ2V4cC9NT0QgLCBzbyBmZXRjaCB0aG9zZSwgdG9vXG4gICAgICAgICAgICAgICAgICAgIC8vIE9ubHkgW2dpbV0gYXJlIHZhbGlkLCBidXQgaWYgdGhlIHVzZXIgcHV0cyBpbiBnYXJiYWdlLCBkbyB3aGF0IHdlIGNhbiB0byB0YWtlIGl0LlxuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoaW5wdXQuaGFzTmV4dCgpICYmIGFjb3JuLmlzSWRlbnRpZmllclN0YXJ0KGlucHV0LnBlZWtDaGFyQ29kZSgpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0aW5nX3N0cmluZyArPSBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW3Jlc3VsdGluZ19zdHJpbmcsICdUS19TVFJJTkcnXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjID09PSAnIycpIHtcblxuICAgICAgICAgICAgaWYgKHRva2Vucy5sZW5ndGggPT09IDAgJiYgaW5wdXQucGVlaygpID09PSAnIScpIHtcbiAgICAgICAgICAgICAgICAvLyBzaGViYW5nXG4gICAgICAgICAgICAgICAgcmVzdWx0aW5nX3N0cmluZyA9IGM7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGlucHV0Lmhhc05leHQoKSAmJiBjICE9PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICBjID0gaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHRpbmdfc3RyaW5nICs9IGM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBbdHJpbShyZXN1bHRpbmdfc3RyaW5nKSArICdcXG4nLCAnVEtfVU5LTk9XTiddO1xuICAgICAgICAgICAgfVxuXG5cblxuICAgICAgICAgICAgLy8gU3BpZGVybW9ua2V5LXNwZWNpZmljIHNoYXJwIHZhcmlhYmxlcyBmb3IgY2lyY3VsYXIgcmVmZXJlbmNlc1xuICAgICAgICAgICAgLy8gaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvRW4vU2hhcnBfdmFyaWFibGVzX2luX0phdmFTY3JpcHRcbiAgICAgICAgICAgIC8vIGh0dHA6Ly9teHIubW96aWxsYS5vcmcvbW96aWxsYS1jZW50cmFsL3NvdXJjZS9qcy9zcmMvanNzY2FuLmNwcCBhcm91bmQgbGluZSAxOTM1XG4gICAgICAgICAgICB2YXIgc2hhcnAgPSAnIyc7XG4gICAgICAgICAgICBpZiAoaW5wdXQuaGFzTmV4dCgpICYmIGlucHV0LnRlc3RDaGFyKGRpZ2l0KSkge1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgYyA9IGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgc2hhcnAgKz0gYztcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChpbnB1dC5oYXNOZXh0KCkgJiYgYyAhPT0gJyMnICYmIGMgIT09ICc9Jyk7XG4gICAgICAgICAgICAgICAgaWYgKGMgPT09ICcjJykge1xuICAgICAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQucGVlaygpID09PSAnWycgJiYgaW5wdXQucGVlaygxKSA9PT0gJ10nKSB7XG4gICAgICAgICAgICAgICAgICAgIHNoYXJwICs9ICdbXSc7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQucGVlaygpID09PSAneycgJiYgaW5wdXQucGVlaygxKSA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgICAgIHNoYXJwICs9ICd7fSc7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gW3NoYXJwLCAnVEtfV09SRCddO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICc8JyAmJiAoaW5wdXQucGVlaygpID09PSAnPycgfHwgaW5wdXQucGVlaygpID09PSAnJScpKSB7XG4gICAgICAgICAgICBpbnB1dC5iYWNrKCk7XG4gICAgICAgICAgICB2YXIgdGVtcGxhdGVfbWF0Y2ggPSBpbnB1dC5tYXRjaCh0ZW1wbGF0ZV9wYXR0ZXJuKTtcbiAgICAgICAgICAgIGlmICh0ZW1wbGF0ZV9tYXRjaCkge1xuICAgICAgICAgICAgICAgIGMgPSB0ZW1wbGF0ZV9tYXRjaFswXTtcbiAgICAgICAgICAgICAgICBjID0gYy5yZXBsYWNlKGFjb3JuLmFsbExpbmVCcmVha3MsICdcXG4nKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW2MsICdUS19TVFJJTkcnXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjID09PSAnPCcgJiYgaW5wdXQubWF0Y2goL1xcIS0tL2cpKSB7XG4gICAgICAgICAgICBjID0gJzwhLS0nO1xuICAgICAgICAgICAgd2hpbGUgKGlucHV0Lmhhc05leHQoKSAmJiAhaW5wdXQudGVzdENoYXIoYWNvcm4ubmV3bGluZSkpIHtcbiAgICAgICAgICAgICAgICBjICs9IGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGluX2h0bWxfY29tbWVudCA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm4gW2MsICdUS19DT01NRU5UJ107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYyA9PT0gJy0nICYmIGluX2h0bWxfY29tbWVudCAmJiBpbnB1dC5tYXRjaCgvLT4vZykpIHtcbiAgICAgICAgICAgIGluX2h0bWxfY29tbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgcmV0dXJuIFsnLS0+JywgJ1RLX0NPTU1FTlQnXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjID09PSAnLicpIHtcbiAgICAgICAgICAgIGlmIChpbnB1dC5wZWVrKCkgPT09ICcuJyAmJiBpbnB1dC5wZWVrKDEpID09PSAnLicpIHtcbiAgICAgICAgICAgICAgICBjICs9IGlucHV0Lm5leHQoKSArIGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW2MsICdUS19PUEVSQVRPUiddO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfRE9UJ107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaW5fYXJyYXkoYywgcHVuY3QpKSB7XG4gICAgICAgICAgICB3aGlsZSAoaW5wdXQuaGFzTmV4dCgpICYmIGluX2FycmF5KGMgKyBpbnB1dC5wZWVrKCksIHB1bmN0KSkge1xuICAgICAgICAgICAgICAgIGMgKz0gaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgIGlmICghaW5wdXQuaGFzTmV4dCgpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGMgPT09ICcsJykge1xuICAgICAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX0NPTU1BJ107XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGMgPT09ICc9Jykge1xuICAgICAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX0VRVUFMUyddO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gW2MsICdUS19PUEVSQVRPUiddO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFtjLCAnVEtfVU5LTk9XTiddO1xuICAgIH1cblxuXG4gICAgZnVuY3Rpb24gdW5lc2NhcGVfc3RyaW5nKHMpIHtcbiAgICAgICAgLy8gWW91IHRoaW5rIHRoYXQgYSByZWdleCB3b3VsZCB3b3JrIGZvciB0aGlzXG4gICAgICAgIC8vIHJldHVybiBzLnJlcGxhY2UoL1xcXFx4KFswLTlhLWZdezJ9KS9naSwgZnVuY3Rpb24obWF0Y2gsIHZhbCkge1xuICAgICAgICAvLyAgICAgICAgIHJldHVybiBTdHJpbmcuZnJvbUNoYXJDb2RlKHBhcnNlSW50KHZhbCwgMTYpKTtcbiAgICAgICAgL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l17NH0pL2cpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG91dCArPSAnXFxcXCc7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dF9zY2FuLmhhc05leHQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0ICs9IGlucHV0X3NjYW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlJ3Mgc29tZSBlcnJvciBkZWNvZGluZywgcmV0dXJuIHRoZSBvcmlnaW5hbCBzdHJpbmdcbiAgICAgICAgICAgICAgICBpZiAoIW1hdGNoZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHM7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZXNjYXBlZCA9IHBhcnNlSW50KG1hdGNoZWRbMV0sIDE2KTtcblxuICAgICAgICAgICAgICAgIGlmIChlc2NhcGVkID4gMHg3ZSAmJiBlc2NhcGVkIDw9IDB4ZmYgJiYgbWF0Y2hlZFswXS5pbmRleE9mKCd4JykgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gd2UgYmFpbCBvdXQgb24gXFx4N2YuLlxceGZmLFxuICAgICAgICAgICAgICAgICAgICAvLyBsZWF2aW5nIHdob2xlIHN0cmluZyBlc2NhcGVkLFxuICAgICAgICAgICAgICAgICAgICAvLyBhcyBpdCdzIHByb2JhYmx5IGNvbXBsZXRlbHkgYmluYXJ5XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXNjYXBlZCA+PSAweDAwICYmIGVzY2FwZWQgPCAweDIwKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGxlYXZlIDB4MDAuLi4weDFmIGVzY2FwZWRcbiAgICAgICAgICAgICAgICAgICAgb3V0ICs9ICdcXFxcJyArIG1hdGNoZWRbMF07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXNjYXBlZCA9PT0gMHgyMiB8fCBlc2NhcGVkID09PSAweDI3IHx8IGVzY2FwZWQgPT09IDB4NWMpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gc2luZ2xlLXF1b3RlLCBhcG9zdHJvcGhlLCBiYWNrc2xhc2ggLSBlc2NhcGUgdGhlc2VcbiAgICAgICAgICAgICAgICAgICAgb3V0ICs9ICdcXFxcJyArIFN0cmluZy5mcm9tQ2hhckNvZGUoZXNjYXBlZCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0ICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoZXNjYXBlZCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG91dDtcbiAgICB9XG59XG5cbm1vZHVsZS5leHBvcnRzLlRva2VuaXplciA9IFRva2VuaXplcjtcblxuLyoqKi8gfSlcbi8qKioqKiovIF0pO1xudmFyIGpzX2JlYXV0aWZ5ID0gbGVnYWN5X2JlYXV0aWZ5X2pzO1xuLyogRm9vdGVyICovXG5pZiAodHlwZW9mIGRlZmluZSA9PT0gXCJmdW5jdGlvblwiICYmIGRlZmluZS5hbWQpIHtcbiAgICAvLyBBZGQgc3VwcG9ydCBmb3IgQU1EICggaHR0cHM6Ly9naXRodWIuY29tL2FtZGpzL2FtZGpzLWFwaS93aWtpL0FNRCNkZWZpbmVhbWQtcHJvcGVydHktIClcbiAgICBkZWZpbmUoW10sIGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4geyBqc19iZWF1dGlmeToganNfYmVhdXRpZnkgfTtcbiAgICB9KTtcbn0gZWxzZSBpZiAodHlwZW9mIGV4cG9yd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S5oYXNPd25Qcm9wZXJ0eS5jYWxsKGEsIGIpO1xufVxuXG5mdW5jdGlvbiBleHRlbmQoYSwgYikge1xuICAgIGZvciAodmFyIGkgaW4gYikge1xuICAgICAgICBpZiAoaGFzT3duUHJvcChiLCBpKSkge1xuICAgICAgICAgICAgYVtpXSA9IGJbaV07XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaGFzT3duUHJvcChiLCAndG9TdHJpbmcnKSkge1xuICAgICAgICBhLnRvU3RyaW5nID0gYi50b1N0cmluZztcbiAgICB9XG5cbiAgICBpZiAoaGFzT3duUHJvcChiLCAndmFsdWVPZicpKSB7XG4gICAgICAgIGEudmFsdWVPZiA9IGIudmFsdWVPZjtcbiAgICB9XG5cbiAgICByZXR1cm4gYTtcbn1cblxuZnVuY3Rpb24gY3JlYXRlVVRDIChpbnB1dCwgZm9ybWF0LCBsb2NhbGUsIHN0cmljdCkge1xuICAgIHJldHVybiBjcmVhdGVMb2NhbE9yVVRDKGlucHV0LCBmb3JtYXQsIGxvY2FsZSwgc3RyaWN0LCB0cnVlKS51dGMoKTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdFBhcnNpbmdGbGFncygpIHtcbiAgICAvLyBXZSBuZWVkIHRvIGRlZXAgY2xvbmUgdGhpcyBvYmplY3QuXG4gICAgcmV0dXJuIHtcbiAgICAgICAgZW1wdHkgICAgICAgICAgIDogZmFsc2UsXG4gICAgICAgIHVudXNlZFRva2VucyAgICA6IFtdLFxuICAgICAgICB1bnVzZWRJbnB1dCAgICAgOiBbXSxcbiAgICAgICAgb3ZlcmZsb3cgICAgICAgIDogLTIsXG4gICAgICAgIGNoYXJzTGVmdE92ZXIgICA6IDAsXG4gICAgICAgIG51bGxJbnB1dCAgICAgICA6IGZhbHNlLFxuICAgICAgICBpbnZhbGlkTW9udGggICAgOiBudWxsLFxuICAgICAgICBpbnZhbGlkRm9ybWF0ICAgOiBmYWxzZSxcbiAgICAgICAgdXNlckludmFsaWRhdGVkID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lUGFydHMsIGZ1bmN0aW9uIChpKSB7XG4gICAgICAgICAgICByZXR1cm4gaSAhPSBudWxsO1xuICAgICAgICB9KTtcbiAgICAgICAgdmFyIGlzTm93VmFsaWQgPSAhaXNOYU4obS5fZC5nZXRUaW1lKCkpICYmXG4gICAgICAgICAgICBmbGFncy5vdmVyZmxvdyA8IDAgJiZcbiAgICAgICAgICAgICFmbGFncy5lbXB0eSAmJlxuICAgICAgICAgICAgIWZsYWdzLmludmFsaWRNb250aCAmJlxuICAgICAgICAgICAgIWZsYWdzLmludmFsaWRXZWVrZGF5ICYmXG4gICAgICAgICAgICAhZmxhZ3Mud2Vla2RheU1pc21hdGNoICYmXG4gICAgICAgICAgICAhZmxhZ3MubnVsbElucHV0ICYmXG4gICAgICAgICAgICAhZmxhZ3MuaW52YWxpZEZvcm1hdCAmJlxuICAgICAgICAgICAgIWZsYWdzLnVzZXJJbnZhbGlkYXRlZCAmJlxuICAgICAgICAgICAgKCFmbGFncy5tZXJpZGllbSB8fCAoZmxhZ3MubWVyaWRpZW0gJiYgcGFyc2VkUGFydHMpKTtcblxuICAgICAgICBpZiAobS5fc3RyaWN0KSB7XG4gICAgICAgICAgICBpc05vd1ZhbGlkID0gaXNOb3dWYWxpZCAmJlxuICAgICAgICAgICAgICAgIGZsYWdzLmNoYXJzTGVmdE92ZXIgPT09IDAgJiZcbiAgICAgICAgICAgICAgICBmbGFncy51bnVzZWRUb2tlbnMubGVuZ3RoID09PSAwICYmXG4gICAgICAgICAgICAgICAgZmxhZ3MuYmlnSG91ciA9PT0gdW5kZWZpbmVkO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKE9iamVjdC5pc0Zyb3plbiA9PSBudWxsIHx8ICFPYmplY3QuaXNGcm96ZW4obSkpIHtcbiAgICAgICAgICAgIG0uX2lzVmFsaWQgPSBpc05vd1ZhbGlkO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGlzTm93VmFsaWQ7X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cpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gZGVwcmVjYXRlKG1zZywgZm4pIHtcbiAgICB2YXIgZmlyc3RUaW1lID0gdHJ1ZTtcblxuICAgIHJldHVybiBleHRlbmQoZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAoaG9va3MuZGVwcmVjYXRpb25IYW5kbGVyICE9IG51bGwpIHtcbiAgICAgICAgICAgIGhvb2tzLmRlcHJlY2F0aW9uSGFuZGxlcihudWxsLCBtc2cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChmaXJzdFRpbWUpIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gW107XG4gICAgICAgICAgICB2YXIgYXJnO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmd1bWVudHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBhcmcgPSAnJztcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGFyZ3VtZW50c1tpXSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJnICs9ICdcXG5bJyArIGkgKyAnXSAnO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gYXJndW1lbnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcmcgKz0ga2V5ICsgJzogJyArIGFyZ3VtZW50c1swXVtrZXldICsgJywgJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBhcmcgPSBhcmcuc2xpY2UoMCwgLTIpOyAvLyBSZW1vdmUgdHJhaWxpbmcgY29tbWEgYW5kIHNwYWNlXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYXJnID0gYXJndW1lbnRzW2ldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhcmdzLnB1c2goYXJnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdhcm4obXNnICsgJ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3BdKTtcbiAgICAgICAgICAgICAgICBleHRlbmQocmVzW3Byb3BdLCBjaGlsZENvbmZpZ1twcm9wXSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoaWxkQ29uZmlnW3Byb3BdICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXNbcHJvcF0gPSBjaGlsZENvbmZpZ1twcm9wXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHJlc1twcm9wXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmb3IgKHByb3AgaW4gcGFyZW50Q29uZmlnKSB7XG4gICAgICAgIGlmIChoYXNPd25Qcm9wKHBhcmVudENvbmZpZywgcHJvcCkgJiZcbiAgICAgICAgICAgICAgICAhaGFzT3duUHJvcChjaGlsZENvbmZpZywgcHJvcCkgJiZcbiAgICAgICAgICAgICAgICBpc09iamVjdChwYXJlbnRDb25maWdbcHJvcF0pKSB7XG4gICAgICAgICAgICAvLyBtYWtlIHN1cmUgY2hhbmdlcyB0byBwcm9wZXJ0aWVzIGRvbid0IG1vZGlmeSBwYXJlbnQgY29uZmlnXG4gICAgICAgICAgICByZXNbcHJvcF0gPSBleHRlbmQoe30sIHJlc1twcm9wXSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJlcztcbn1cblxuZnVuY3Rpb24gTG9jYWxlKGNvbmZpZykge1xuICAgIGlmIChjb25maWcgIT0gbnVsbCkge1xuICAgICAgICB0aGlzLnNldChjb25maWcpO1xuICAgIH1cbn1cblxudmFyIGtleXM7XG5cbmlmIChPYmplY3Qua2V5cykge1xuICAgIGtleXMgPSBPYmplY3Qua2V5cztcbn0gZWxzZSB7XG4gICAga2V5cyA9IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgdmFyIGksIHJlcyA9IFtdO1xuICAgICAgICBmb3IgKGkgaW4gb2JqKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duU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y5tb250aHNTaG9ydChtb20sICcnKS50b0xvY2FsZUxvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgdGhpcy5fbG9uZ01vbnRoc1BhcnNlW2ldID0gdGhpcy5tb250aHMobW9tLCAnJykudG9Mb2NhbGVMb3dlckNhc2UoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChzdHJpY3QpIHtcbiAgICAgICAgaWYgKGZvcm1hdCA9PT0gJ01NTScpIHtcbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX3Nob3J0TW9udGhzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICByZXR1cm4gaWkgIT09IC0xID8gaWkgOiBudWxsO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fbG9uZ01vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChmb3JtYXQgPT09ICdNTU0nKSB7XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YuY2FsbCh0aGlzLl9zaG9ydE1vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX2xvbmdNb250aHNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YuY2FsbCh0aGlzLl9sb25nTW9udGhzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlp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X2xvbmdNb250aHNQYXJzZVtpXSA9IG5ldyBSZWdFeHAoJ14nICsgdGhpcy5tb250aHMobW9tLCAnJykucmVwbGFjZSgnLicsICcnKSArICckJywgJ2knKTtcbiAgICAgICAgICAgIHRoaXMuX3Nob3J0TW9udGhzUGFyc2VbaV0gPSBuZXcgUmVnRXhwKCdeJyArIHRoaXMubW9udGhzU2hvcnQobW9tLCAnJykucmVwbGFjZSgnLicsICcnKSArICckJywgJ2knKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIXN0cmljdCAmJiAhdGhpcy5fbW9udGhzUGFyc2VbaV0pIHtcbiAgICAgICAgICAgIHJlZ2V4ID0gJ14nICsgdGhpcy5tb250aHMobW9tLCAnJykgKyAnfF4nICsgdGhpcy5tb250aHNTaG9ydChtb20sICcnKTtcbiAgICAgICAgICAgIHRoaXMuX21vbnRoc1BhcnNlW2ldID0gbmV3IFJlZ0V4cChyZWdleC5yZXBsYWNlKCcuJywgJycpLCAnaScpO1xuICAgICAgICB9XG4gICAgICAgIC8vIHRlc3QgdGhlIHJlZ2V4XG4gICAgICAgIGlmIChzdHJpY3QgJiYgZm9ybWF0ID09PSAnTU1NTScgJiYgdGhpcy5fbG9uZ01vbnRoc1BhcnNlW2ldLnRlc3QobW9udGhOYW1lKSkge1xuICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgIH0gZWxzZSBpZiAoc3RyaWN0ICYmIGZvcm1hdCA9PT0gJ01NTScgJiYgdGhpcy5fc2hvcnRNb250aHNQYXJzZVtpXS50ZXN0KG1vbnRoTmFtZSkpIHtcbiAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICB9IGVsc2UgaWYgKCFzdHJpY3QgJiYgdGhpcy5fbW9udGhzUGFyc2VbaV0udGVzdChtb250aE5hbWUpKSB7XG4gICAgICAgICAgICByZXR1cm4gaTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuLy8gTU9NRU5UU1xuXG5mdW5jdGlvbiBzZXRNb250aCAobW9tL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PZi5jYWxsKHRoaXMuX3dlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fc2hvcnRXZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX21pbldlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICByZXR1cm4gaWkgIT09IC0xID8gaWkgOiBudWxsO1xuICAgICAgICB9IGVsc2UgaWYgKGZvcm1hdCA9PT0gJ2RkZCcpIHtcbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX3Nob3J0V2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaWk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YuY2FsbCh0aGlzLl93ZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX21pbldlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICByZXR1cm4gaWkgIT09IC0xID8gaWkgOiBudWxsO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIGlmIChpaSAh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ICAgICAgICAgICAgICAnY29uZmlnKSBzaG91bGQgb25seSBiZSB1c2VkIGZvciBjcmVhdGluZyBhIG5ldyBsb2NhbGUgJyArXG4gICAgICAgICAgICAgICAgICAgICdTZWUgaHR0cDovL21vbWVudGpzLmNvbS9ndWlkZXMvIy93YXJuaW5ncy9kZWZpbmUtbG9jYWxlLyBmb3IgbW9yZSBpbmZvLicpO1xuICAgICAgICAgICAgcGFyZW50Q29uZmlnID0gbG9jYWxlc1tuYW1lXS5fY29uZmlnO1xuICAgICAgICB9IGVsc2UgaWYgKGNvbmZpZy5wYXJlbnRMb2NhbGUgIT0gbnVsbCkge1xuICAgICAgICAgICAgaWYgKGxvY2FsZXNbY29uZmlnLnBhcmVudExvY2FsZV0gIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHBhcmVudENvbmZpZyA9IGxvY2FsZXNbY29uZmlnLnBhcmVudExvY2FsZV0uX2NvbmZpZztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKCFsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXSkge1xuICAgICAgICAgICAgICAgICAgICBsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXSA9IFtdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnOiBjb25maWdcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBsb2NhbGVzW25hbWVdID0gbmV3IExvY2FsZShtZXJnZUNvbmZpZ3MocGFyZW50Q29uZmlnLCBjb25maWcpKTtcblxuICAgICAgICBpZiAobG9jYWxlRmFtaWxpZXNbbm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CBldmVyeXRoaW5nIGVsc2VcbiAgICAgICAgbG9jYWxlID0gbG9hZExvY2FsZShrZXkpO1xuICAgICAgICBpZiAobG9jYWxlKSB7XG4gICAgICAgICAgICByZXR1cm4gbG9jYWxlO1xuICAgICAgICB9XG4gICAgICAgIGtleSA9IFtrZXldO1xuICAgIH1cblxuICAgIHJldHVybiBjaG9vc2VMb2NhbGUoa2V5KTtcbn1cblxuZnVuY3Rpb24gbGlzdExvY2FsZXMoKSB7XG4gICAgcmV0dXJuIGtleXMobG9jYWxlcyk7XG59XG5cbmZ1bmN0aW9uIGNoZWNrT3ZlcmZsb3cgKG0pIHtcbiAgICB2YXIgb3ZlcmZsb3c7XG4gICAgdmFyIGEgPSBtLl9hO1xuXG4gICAgaWYgKGEgJiYgZ2V0UGFyc2luZ0ZsYWdzKG0pLm92ZXJmbG93ID09PSAtMikge1xuICAgICAgICBvdmVyZmxvdyA9XG4gICAgICAgICAgICBhW01PTlRIXSAgICAgICA8IDAgfHwgYVtNT05USF0gICAgICAgPiAxMSAgPyBNT05USCA6XG4gICAgICAgICAgICBhW0RBVEVdICAgICAgICA8IDEgfHwgYVtEQVRFXSAgICAgICAgPiBkYXlzSW5Nb250aChhW1lFQVJdLCBhW01PTlRIXSkgPyBEQVRFIDpcbiAgICAgICAgICAgIGFbSE9VUl0gICAgICAgIDwgMCB8fCBhW0hPVVJdICAgICAgICA+IDI0IHx8IChhW0hPVVJdID09PSAyNCAmJiAoYVtNSU5VVEVdICE9PSAwIHx8IGFbU0VDT05EXSAhPT0gMCB8fCBhW01JTExJU0VDT05EXSAhPT0gMCkpID8gSE9VUiA6XG4gICAgICAgICAgICBhW01JTlVURV0gICAgICA8IDAgfHwgYVtNSU5VVEVdICAgICAgPiA1OSAgPyBNSU5VVEUgOlxuICAgICAgICAgICAgYVtTRUNPTkRdICAgICAgPCAwIHx8IGFbU0VDT05EXSAgICAgID4gNTkgID8gU0VDT05EIDpcbiAgICAgICAgICAgIGFbTUlMTElTRUNPTk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sraSkge1xuICAgICAgICBjb25maWcuX2FbaV0gPSBpbnB1dFtpXSA9IGN1cnJlbnREYXRlW2ldO1xuICAgIH1cblxuICAgIC8vIFplcm8gb3V0IHdoYXRldmVyIHdhcyBub3QgZGVmYXVsdGVkLCBpbmNsdWRpbmcgdGltZVxuICAgIGZvciAoOyBpIDwgNzsgaSsrKSB7XG4gICAgICAgIGNvbmZpZy5fYVtpXSA9IGlucHV0W2ldID0gKGNvbmZpZy5fYVtpXSA9PSBudWxsKSA/IChpID09PSAyID8gMSA6IDApIDogY29uZmlnLl9hW2ldO1xuICAgIH1cblxuICAgIC8vIENoZWNrIGZvciAyNDowMDowMC4wMDBcbiAgICBpZiAoY29uZmlnLl9hW0hPVVJdID09PSAyNCAmJlxuICAgICAgICAgICAgY29uZmlnLl9hW01JTlVURV0gPT09IDAgJiZcbiAgICAgICAgICAgIGNvbmZpZy5fYVtTRUNPTkRdID09PSAwICYmXG4gICAgICAgICAgICBjb25maWcuX2FbTUlMTElTRUNPTkRdID09PSAwKSB7XG4gICAgICAgIGNvbmZpZy5fbmV4dERheSA9IHRydWU7XG4gICAgICAgIGNvbmZpZy5fYVtIT1VSXSA9IDA7XG4gICAgfVxuXG4gICAgY29uZmlnLl9kID0gKGNvbmZpZy5fdXNlVVRDID8gY3JlYXRlVVRDRGF0ZSA6IGNyZWF0ZURhdGUpLmFwcGx5KG51bGwsIGlucHV0KTtcbiAgICAvLyBBcHBseSB0aW1lem9uZSBvZmZzZXQgZnJvbSBpbnB1dC4gVGhlIGFjdHVhbCB1dGNPZmZzZXQgY2FuIGJlIGNoYW5nZWRcbiAgICAvLyB3aXRoIHBhcnNlWm9uZS5cbiAgICBpZiAoY29uZmlnLl90em0gIT0gbnVsbCkge1xuICAgICAgICBjb25maWcuX2Quc2V0VVRDTWludXRlcyhjb25maWcuX2QuZ2V0VVRDTWludXRlcygpIC0gY29uZmlnLl90em0pO1xuICAgIH1cblxuICAgIGlmIChjb25maWcuX25leHREYXkpIHtcbi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0UGFyc2luZ0ZsYWdzKGNvbmZpZykuaXNvID0gdHJ1ZTtcblxuICAgICAgICBmb3IgKGkgPSAwLCBsID0gaXNvRGF0ZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaXNvRGF0ZXNbaV1bMV0uZXhlYyhtYXRjaFsxXSkpIHtcbiAgICAgICAgICAgICAgICBkYXRlRm9ybWF0ID0gaXNvRGF0ZXNbaV1bMF07XG4gICAgICAgICAgICAgICAgYWxsb3dUaW1lID0gaXNvRGF0ZXNbaV1bMl0gIT09IGZhbHNlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChkYXRlRm9ybWF0ID09IG51bGwpIHtcbiAgICAgICAgICAgIGNvbmZpZy5faXNWYWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtYXRjaFszXSkge1xuICAgICAgICAgICAgZm9yIChpID0gMCwgbCA9IGlzb1RpbWVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChpc29UaW1lc1tpXVsxXS5leGVjKG1hdGNoWzNdKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBtYXRjaFsyXSBzaG91bGQgYmUgJ1QnIG9yIHNwYWNlXG4gICAgICAgICAgICAgICAgICAgIHRpbWVGb3JtYXQgPSAobWF0Y2hbMl0gfHwgJyAnKSArIGlzb1RpbWVzW2ldWzBdO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGltZUZvcm1hdCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLl9pc1ZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAg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gICAgLy8gICAgICAgICAncmVnZXgnLCBnZXRQYXJzZVJlZ2V4Rm9yVG9rZW4odG9rZW4sIGNvbmZpZykpO1xuICAgICAgICBpZiAocGFyc2VkSW5wdXQpIHtcbiAgICAgICAgICAgIHNraXBwZWQgPSBzdHJpbmcuc3Vic3RyKDAsIHN0cmluZy5pbmRleE9mKHBhcnNlZElucHV0KSk7XG4gICAgICAgICAgICBpZiAoc2tpcHBlZC5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgZ2V0UGFyc2luZ0ZsYWdzKGNvbmZpZykudW51c2VkSW5wdXQucHVzaChza2lwcGVkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHN0cmluZyA9IHN0cmluZy5zbGljZShzdHJpbmcuaW5kZXhPZihwYXJzZWRJbnB1dCkgKyBwYXJzZWRJbnB1dC5sZW5ndGgpO1xuICAgICAgICAgICAgdG90YWxQYXJzZWRJbnB1dExlbmd0aCArPSBwYXJzZWRJbnB1dC5sZW5ndGg7XG4gICAgICAgIH1cbiAgICAgICAgLy8gZG9uJ3QgcGFyc2UgaWYgaXQncyBub3QgYSBrbm93biB0b2tlblxuICAgICAgICBpZiAoZm9ybWF0VG9rZW5GdW5jdGlvbnNbdG9rZW5dKSB7XG4gICAgICAgICAgICBpZiAocGFyc2VkSW5wdXQpIHtcbiAgICAgICAgICAgICAgICBnZXRQYXJzaW5nRmxhZ3MoY29uZmlnKS5lbXB0eSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZ2V0UGFyc2luZ0ZsYWdzKGNvbmZpZykudW51c2VkVG9rZW5zLnB1c2godG9rZW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYWRkVGltZVRvQXJyYXlGcm9tVG9rZW4odG9rZW4sIHBhcnNlZElucHV0LCBjb25maWcpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGNvbmZpZy5fc3RyaWN0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bUFycmF5KGNvbmZpZyk7XG4gICAgY2hlY2tPdmVyZmxvdyhjb25maWcpO1xufVxuXG5cbmZ1bmN0aW9uIG1lcmlkaWVtRml4V3JhcCAobG9jYWxlLCBob3VyLCBtZXJpZGllbSkge1xuICAgIHZhciBpc1BtO1xuXG4gICAgaWYgKG1lcmlkaWVtID09IG51bGwpIHtcbiAgICAgICAgLy8gbm90aGluZyB0byBkb1xuICAgICAgICByZXR1cm4gaG91cjtcbiAgICB9XG4gICAgaWYgKGxvY2FsZS5tZXJpZGllbUhvdXIgIT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gbG9jYWxlLm1lcmlkaWVtSG91cihob3VyLCBtZXJpZGllbSk7XG4gICAgfSBlbHNlIGlmIChsb2NhbGUuaXNQTSAhPSBudWxsKSB7XG4gICAgICAgIC8vIEZhbGxiYWNrXG4gICAgICAgIGlzUG0gPSBsb2NhbGUuaXNQTShtZXJpZGllbSk7XG4gICAgICAgIGlmIChpc1BtICYmIGhvdXIgPCAxMikge1xuICAgICAgICAgICAgaG91ciArPSAxMjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIWlzUG0gJiYgaG91ciA9PT0gMTIpIHtcbiAgICAgICAgICAgIGhvdXIgPSAwO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBob3VyO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHRoaXMgaXMgbm90IHN1cHBvc2VkIHRvIGhhcHBlblxuICAgICAgICByZXR1cm4gaG91cjtcbiAgICB9XG59XG5cbi8vIGRhdGUgZnJvbSBzdHJpbmcgYW5kIGFycmF5IG9mIGZvcm1hdCBzdHJpbmdzXG5mdW5jdGlvbiBjb25maWdGcm9tU3RyaW5nQW5kQXJyYXkoY29uZmlnKSB7XG4gICAgdmFyIHRlbXBDb25maWcsXG4gICAgICAgIGJlc3RNb21lbnQsXG5cbiAgICAgICAgc2NvcmVUb0JlYXQsXG4gICAgICAgIGksXG4gICAgICAgIGN1cnJlbnRTY29yZTtcbl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2NvcmU7XG5cbiAgICAgICAgaWYgKHNjb3JlVG9CZWF0ID09IG51bGwgfHwgY3VycmVudFNjb3JlIDwgc2NvcmVUb0JlYXQpIHtcbiAgICAgICAgICAgIHNjb3JlVG9CZWF0ID0gY3VycmVudFNjb3JlO1xuICAgICAgICAgICAgYmVzdE1vbWVudCA9IHRlbXBDb25maWc7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBleHRlbmQoY29uZmlnLCBiZXN0TW9tZW50IHx8IHRlbXBDb25maWcpO1xufVxuXG5mdW5jdGlvbiBjb25maWdGcm9tT2JqZWN0KGNvbmZpZykge1xuICAgIGlmIChjb25maWcuX2QpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHZhciBpID0gbm9ybWFsaXplT2JqZWN0VW5pdHMoY29uZmlnLl9pKTtcbiAgICBjb25maWcuX2EgPSBtYXAoW2kueWVhciwgaS5tb250aCwgaS5kYXkgfHwgaS5kYXRlLCBpLmhvdXIsIGkubWludXRlLCBpLnNlY29uZCwgaS5taWxsaXNlY29uZF0sIGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgcmV0dXJuIG9iaiAmJiBwYXJzZUludChvYmosIDEwKTtcbiAgICB9KTtcblxuICAgIGNvbmZpZ0Zyb21BcnJheShjb25maWcpO1xufVxuXG5mdW5jdGlvbiBjcmVhdGVGcm9tQ29uZmlnIChjb25maWcpIHtcbiAgICB2YXIgcmVzID0gbmV3IE1vbWVudChjaGVja092ZXJmbG93KHByZXBhcmVDb25maWcoY29uZmlnKSkpO1xuICAgIGlmIChyZXMuX25leHREYXkpIHtcbiAgICAgICAgLy8gQWRkaW5nIGlzIHNtYXJ0IGVub3VnaCBhcm91bmQgRFNUXG4gICAgICAgIHJlcy5hZGQoMSwgJ2QnKTtcbiAgICAgICAgcmVzLl9uZXh0RGF5ID0gdW5kZWZpbmVkO1xuICAgIH1cblxuICAgIHJldHVybiByZXM7XG59XG5cbmZ1bmN0aW9uIHByZXBhcmVDb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oPzooWy0rXT9bMC05LC5dKilZKT8oPzooWy0rXT9bMC05LC5dKilNKT8oPzooWy0rXT9bMC05LC5dKilXKT8oPzooWy0rXT9bMC05LC5dKilEKT8oPzpUKD86KFstK10/WzAtOSwuXSopSCk/KD86KFstK10/WzAtOSwuXSopTSk/KD86KFstK10/WzAtOSwuXSopUyk/KT8kLztcblxuZnVuY3Rpb24gY3JlYXRlRHVyYXRpb24gKGlucHV0LCBrZXkpIHtcbiAgICB2YXIgZHVyYXRpb24gPSBpbnB1dCxcbiAgICAgICAgLy8gbWF0Y2hpbmcgYWdhaW5zdCByZWdleHAgaXMgZXhwZW5zaXZlLCBkbyBpdCBvbiBkZW1hbmRcbiAgICAgICAgbWF0Y2ggPSBudWxsLFxuICAgICAgICBzaWduLFxuICAgICAgICByZXQsXG4gICAgICAgIGRpZmZSZXM7XG5cbiAgICBpZiAoaXNEdXJhdGlvbihpbnB1dCkpIHtcbiAgICAgICAgZHVyYXRpb24gPSB7XG4gICAgICAgICAgICBtcyA6IGlucHV0Ll9taWxsaXNlY29uZHMsXG4gICAgICAgICAgICBkICA6IGlucHV0Ll9kYXlzLFxuICAgICAgICAgICAgTSAgOiBpbnB1dC5fbW9udGhzXG4gICAgICAgIH07XG4gICAgfSBlbHNlIGlmIChpc051bWJlcihpbnB1dCkpIHtcbiAgICAgICAgZHVyYXRpb24gPSB7fTtcbiAgICAgICAgaWYgKGtleSkge1xuICAgICAgICAgICAgZHVyYXRpb25ba2V5XSA9IGlucHV0O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZHVyYXRpb24ubWlsbGlzZWNvbmRzID0gaW5wdXQ7XG4gICAgICAgIH1cbiAgICB9IGVsc2UgaWYgKCEhKG1hdGNoID0gYXNwTmV0UmVnZXguZXhlYyhpbnB1dCkpKSB7XG4gICAgICAgIHNpZ24gPSAobWF0Y2hbMV0gPT09ICctJykgPyAtMSA6IDE7XG4gICAgICAgIGR1cmF0aW9uID0ge1xuICAgICAgICAgICAgeSAgOiAwLFxuICAgICAgICAgICAgZCAgOiB0b0ludChtYXRjaFtEQVRFXSkgICAgICAgICAgICAgICAgICAgICAgICAgKiBzaWduLFxuICAgICAgICAgICAgaCAgOiB0b0ludChtYXRjaFtIT1VSXSkgICAgICAgICAgICAgICAgICAgICAgICAgKiBzaWduLFxuICAgICAgICAgICAgbSAgOiB0b0ludChtYXRjaFtNSU5VVEVdKSAgICAgICAgICAgICAgICAgICAgICAgKiBzaWduLFxuICAgICAgICAgICAgcyAgOiB0b0ludChtYXRjaFtTRUNPTkRdKSAgICAgICAgICAgICAgICAgICAgICAgKiBzaWduLFxuICAgICAgICAgICAgbXMgOiB0b0ludChhYnNSb3VuZChtYXRjaFtNSUxMSVNFQ09ORF0gKiAxMDAwKSkgKiBzaWduIC8vIHRoZSBtaWxsaXNlY29uZCBkZWNpbWFsIHBvaW50IGlzIGluY2x1ZGVkIGluIHRoZSBtYXRjaFxuICAgICAgICB9O1xuICAgIH0gZWxzZSBpZiAoISEobWF0Y2ggPSBpc29SZWdleC5leGVjKGlucHV0KSkpIHtcbiAgICAgICAgc2lnbiA9IChtYXRjaFsxXSA9PT0gJy0nKSA/IC0xIDogKG1hdGNoWzFdID09PSAnKycpID8gMSA6IDE7XG4gICAgICAgIGR1cmF0aW9uID0ge1xuICAgICAgICAgICAgeSA6IHBhcnNlSXNvKG1hdGNoWzJdLCBzaWduKSxcbiAgICAgICAgICAgIE0gOiBwYXJzZUlzbyhtYXRjaFszXSwgc2lnbiksXG4gICAgICAgICAgICB3IDogcGFyc2VJc28obWF0Y2hbNF0sIHNpZ24pLFxuICAgICAgICAgICAgZCA6IHBhcnNlSXNvKG1hdGNoWzVdLCBzaWduKSxcbiAgICAgICAgICAgIGggOiBwYXJzZUlzbyhtYXRjaFs2XSwgc2lnbiksXG4gICAgICAgICAgICBtIDogcGFyc2VJc28obWF0Y2hbN10sIHNpZ24pLFxuICAgICAgICAgICAgcyA6IHBhcnNlSXNvKG1hdGNoWzhdLCBza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0YSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMubG9jYWxlKGtleSk7XG4gICAgICAgIH1cbiAgICB9XG4pO1xuXG5mdW5jdGlvbiBsb2NhbGVEYXRhICgpIHtcbiAgICByZXR1cm4gdGhpcy5fbG9jYWxlO1xufVxuXG5mdW5jdGlvbiBzdGFydE9mICh1bml0cykge1xuICAgIHVuaXRzID0gbm9ybWFsaXplVW5pdHModW5pdHMpO1xuICAgIC8vIHRoZSBmb2xsb3dpbmcgc3dpdGNoIGludGVudGlvbmFsbHkgb21pdHMgYnJlYWsga2V5d29yZHNcbiAgICAvLyB0byB1dGlsaXplIGZhbGxpbmcgdGhyb3VnaCB0aGUgY2FzZXMuXG4gICAgc3dpdGNoICh1bml0cykge1xuICAgICAgICBjYXNlICd5ZWFyJzpcbiAgICAgICAgICAgIHRoaXMubW9udGgoMCk7XG4gICAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJ3F1YXJ0ZXInOlxuICAgICAgICBjYXNlICdtb250aCc6XG4gICAgICAgICAgICB0aGlzLmRhdGUoMSk7XG4gICAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJ3dlZWsnOlxuICAgICAgICBjYXNlICdpc29XZWVrJzpcbiAgICAgICAgY2FzZSAnZGF5JzpcbiAgICAgICAgY2FzZSAnZGF0ZSc6XG4gICAgICAgICAgICB0aGlzLmhvdXJzKDApO1xuICAgICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgICBjYXNlICdob3VyJzpcbiAgICAgICAgICAgIHRoaXMubWludXRlcygwKTtcbiAgICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgICAgY2FzZSAnbWludXRlJzpcbiAgICAgICAgICAgIHRoaXMuc2Vjb25kcygwKTtcbiAgICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAg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gICAgICAgICAgICAgPSBhZGQ7XG5wcm90by5jYWxlbmRhciAgICAgICAgICA9IGNhbGVuZGFyJDE7XG5wcm90by5jbG9uZSAgICAgICAgICAgICA9IGNsb25lO1xucHJvdG8uZGlmZiAgICAgICAgICAgICAgPSBkaWZmO1xucHJvdG8uZW5kT2YgICAgICAgICAgICAgPSBlbmRPZjtcbnByb3RvLmZvcm1hdCAgICAgICAgICAgID0gZm9ybWF0O1xucHJvdG8uZnJvbSAgICAgICAgICAgICAgPSBmcm9tO1xucHJvdG8uZnJvbU5vdyAgICAgICAgICAgPSBmcm9tTm93O1xucHJvdG8udG8gICAgICAgICAgICAgICAgPSB0bztcbnByb3RvLnRvTm93ICAgICAgICAgICAgID0gdG9Ob3c7XG5wcm90by5nZXQgICAgICAgICAgICAgICA9IHN0cmluZ0dldDtcbnByb3RvLmludmFsaWRBdCAgICAgICAgID0gaW52YWxpZEF0O1xucHJvdG8uaXNBZnRlciAgICAgICAgICAgPSBpc0FmdGVyO1xucHJvdG8uaXNCZWZvcmUgICAgICAgICAgPSBpc0JlZm9yZTtcbnByb3RvLmlzQmV0d2VlbiAgICAgICAgID0gaXNCZXR3ZWVuO1xucHJvdG8uaXNTYW1lICAgICAgICAgICAgPSBpc1NhbWU7XG5wcm90by5pc1NhbWVPckFmdGVyICAgICA9IGlzU2FtZU9yQWZ0ZXI7XG5wcm90by5pc1NhbWVPckJlZm9yZSAgICA9IGlzU2FtZU9yQmVmb3JlO1xucHJvdG8uaXNWYWxpZCAgICAgICAgICAgPSBpc1ZhbGlkJDI7XG5wcm90by5sYW5nICAgICAgICAgICAgICA9IGxhbmc7XG5wcm90by5sb2NhbGUgICAgICAgICAgICA9IGxvY2FsZTtcbnByb3RvLmxvY2FsZURhdGEgICAgICAgID0gbG9jYWxlRGF0YTtcbnByb3RvLm1heCAgICAgICAgICAgICAgID0gcHJvdG90eXBlTWF4O1xucHJvdG8ubWluICAgICAgICAgICAgICAgPSBwcm90b3R5cGVNaW47XG5wcm90by5wYXJzaW5nRmxhZ3MgICAgICA9IHBhcnNpbmdGbGFncztcbnByb3RvLnNldCAgICAgICAgICAgICAgID0gc3RyaW5nU2V0O1xucHJvdG8uc3RhcnRPZiAgICAgICAgICAgPSBzdGFydE9mO1xucHJvdG8uc3VidHJhY3QgICAgICAgICAgPSBzdWJ0cmFjdDtcbnByb3RvLnRvQXJyYXkgICAgICAgICAgID0gdG9BcnJheTtcbnByb3RvLnRvT2JqZWN0ICAgICAgICAgID0gdG9PYmplY3Q7XG5wcm90by50b0RhdGUgICAgICAgICAgICA9IHRvRGF0ZTtcbnByb3RvLnRvSVNPU3RyaW5nICAgICAgID0gdG9JU09TdHJpbmc7XG5wcm90by5pbnNwZWN0ICAgICAgICAgICA9IGluc3BlY3Q7XG5wcm90by50b0pTT04gICAgICAgICAgICA9IHRvSlNPTjtcbnByb3RvLnRvU3RyaW5nICAgICAgICAgID0gdG9TdHJpbmc7XG5wcm90by51bml4ICAgICAgICAgICAgICA9IHVuaXg7XG5wcm90by52YWx1ZU9mICAgICAgICAgICA9IHZhbHVlT2Y7XG5wcm90by5jcmVhdGlvbkRhdGEgICAgICA9IGNyZWF0aW9uRGF0YTtcblxuLy8gWWVhclxucHJvdG8ueWVhciAgICAgICA9IGdldFNldFllYXI7XG5wcm90by5pc0xlYXBZZWFyID0gZ2V0SXNMZWFwWWVhcjtcblxuLy8gV2VlayBZZWFyXG5wcm90by53ZWVrWWVhciAgICA9IGdldFNldFdlZWtZZWFyO1xucHJvdG8uaXNvV2Vla1llYXIgPSBnZXRTZXRJU09XZWVrWWVhcjtcblxuLy8gUXVhcnRlclxucHJvdG8ucXVhcnRlciA9IHByb3RvLnF1YXJ0ZXJzID0gZ2V0U2V0UXVhcnRlcjtcblxuLy8gTW9udGhcbnByb3RvLm1vbnRoICAgICAgID0gZ2V0U2V0TW9udGg7XG5wcm90by5kYXlzSW5Nb250aCA9IGdldERheXNJbk1vbnRoO1xuXG4vLyBXZWVrXG5wcm90by53ZWVrICA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AgICAgICAgICAgPSAgICAgICAgbG9jYWxlTW9udGhzO1xucHJvdG8kMS5tb250aHNTaG9ydCAgICAgICA9ICAgICAgICBsb2NhbGVNb250aHNTaG9ydDtcbnByb3RvJDEubW9udGhzUGFyc2UgICAgICAgPSAgICAgICAgbG9jYWxlTW9udGhzUGFyc2U7XG5wcm90byQxLm1vbnRoc1JlZ2V4ICAgICAgID0gbW9udGhzUmVnZXg7XG5wcm90byQxLm1vbnRoc1Nob3J0UmVnZXggID0gbW9udGhzU2hvcnRSZWdleDtcblxuLy8gV2Vla1xucHJvdG8kMS53ZWVrID0gbG9jYWxlV2VlaztcbnByb3RvJDEuZmlyc3REYXlPZlllYXIgPSBsb2NhbGVGaXJzdERheU9mWWVhcjtcbnByb3RvJDEuZmlyc3REYXlPZldlZWsgPSBsb2NhbGVGaXJzdERheU9mV2VlaztcblxuLy8gRGF5IG9mIFdlZWtcbnByb3RvJDEud2Vla2RheXMgICAgICAgPSAgICAgICAgbG9jYWxlV2Vla2RheXM7XG5wcm90byQxLndlZWtkYXlzTWluICAgID0gICAgICAgIGxvY2FsZVdlZWtkYXlzTWluO1xucHJvdG8kMS53ZWVrZGF5c1Nob3J0ICA9ICAgICAgICBsb2NhbGVXZWVrZGF5c1Nob3J0O1xucHJvdG8kMS53ZWVrZGF5c1BhcnNlICA9ICAgICAgICBsb2NhbGVXZWVrZGF5c1BhcnNlO1xuXG5wcm90byQxLndlZWtkYXlzUmVnZXggICAgICAgPSAgICAgICAgd2Vla2RheXNSZWdleDtcbnByb3RvJDEud2Vla2RheXNTaG9ydFJlZ2V4ICA9ICAgICAgICB3ZWVrZGF5c1Nob3J0UmVnZXg7XG5wcm90byQxLndlZWtkYXlzTWluUmVnZXggICAgPSAgICAgICAgd2Vla2RheXNNaW5SZWdleDtcblxuLy8gSG91cnNcbnByb3RvJDEuaXNQTSA9IGxvY2FsZUlzUE07XG5wcm90byQxLm1lcmlkaWVtID0gbG9jYWxlTWVyaWRpZW07XG5cbmZ1b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9IHJvdW5kKGR1cmF0aW9uLmFzKCdoJykpO1xuICAgIHZhciBkYXlzICAgICA9IHJvdW5kKGR1cmF0aW9uLmFzKCdkJykpO1xuICAgIHZhciBtb250aHMgICA9IHJvdW5kKGR1cmF0aW9uLmFzKCdNJykpO1xuICAgIHZhciB5ZWFycyAgICA9IHJvdW5kKGR1cmF0aW9uLmFzKCd5JykpO1xuXG4gICAgdmFyIGEgPSBzZWNvbmRzIDw9IHRocmVzaG9sZHMuc3MgJiYgWydzJywgc2Vjb25kc10gIHx8XG4gICAgICAgICAgICBzZWNvbmRzIDwgdGhyZXNob2xkcy5zICAgJiYgWydzcycsIHNlY29uZHNdIHx8XG4gICAgICAgICAgICBtaW51dGVzIDw9IDEgICAgICAgICAgICAgJiYgWydtJ10gICAgICAgICAgIHx8XG4gICAgICAgICAgICBtaW51dGVzIDwgdGhyZXNob2xkcy5tICAgJiYgWydtbScsIG1pbnV0ZXNdIHx8XG4gICAgICAgICAgICBob3VycyAgIDw9IDEgICAgICAgICAgICAgJiYgWydoJ10gICAgICAgICAgIHx8XG4gICAgICAgICAgICBob3VycyAgIDwgdGhyZXNob2xkcy5oICAgJiYgWydoaCcsIGhvdXJzXSAgIHx8XG4gICAgICAgICAgICBkYXlzICAgIDw9IDEgICAgICAgICAgICAgJiYgWydkJ10gICAgICAgICAgIHx8XG4gICAgICAgICAgICBkYXlzICAgIDwgdGhyZXNob2xkcy5kICAgJiYgWydkZCcsIGRheXNdICAgIHx8XG4gICAgICAgICAgICBtb250aHMgIDw9IDEgICAgICAgICAgICAgJiYgWydNJ10gICAgICAgICAgIHx8XG4gICAgICAgICAgICBtb250aHMgIDwgdGhyZXNob2xkcy5NICAgJiYgWydNTScsIG1vbnRoc10gIHx8XG4gICAgICAgICAgICB5ZWFycyAgIDw9IDEgICAgICAgICAgICAgJiYgWyd5J10gICAgICAgICAgIHx8IFsneXknLCB5ZWFyc107XG5cbiAgICBhWzJdID0gd2l0aG91dFN1ZmZpeDtcbiAgICB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uLnByb3RvdHlwZTtcblxucHJvdG8kMi5pc1ZhbGlkICAgICAgICA9IGlzVmFsaWQkMTtcbnByb3RvJDIuYWJzICAgICAgICAgICAgPSBhYnM7XG5wcm90byQyLmFkZCAgICAgICAgICAgID0gYWRkJDE7XG5wcm90byQyLnN1YnRyYWN0ICAgICAgID0gc3VidHJhY3QkMTtcbnByb3RvJDIuYXMgICAgICAgICAgICAgPSBhcztcbnByb3RvJDIuYXNNaWxsaXNlY29uZHMgPSBhc01pbGxpc2Vjb25kcztcbnByb3RvJDIuYXNTZWNvbmRzICAgICAgPSBhc1NlY29uZHM7XG5wcm90byQyLmFzTWludXRlcyAgICAgID0gYXNNaW51dGVzO1xucHJvdG8kMi5hc0hvdXJzICAgICAgICA9IGFzSG91cnM7XG5wcm90byQyLmFzRGF5cyAgICAgICAgID0gYXNEYXlzO1xucHJvdG8kMi5hc1dlZWtzICAgICAgICA9IGFzV2Vla3M7XG5wcm90byQyLmFzTW9udGhzICAgICAgID0gYXNNb250aHM7XG5wcm90byQyLmFzWWVhcnMgICAgICAgID0gYXNZZWFycztcbnByb3RvJDIudmFsdWVPZiAgICAgICAgPSB2YWx1ZU9mJDE7XG5wcm90byQyLl9idWJibGUgICAgICAgID0gYnViYmxlO1xucHJvdG8kMi5jbG9uZSAgICAgICAgICA9IGNsb25lJDE7XG5wcm90byQyLmdldCAgICAgICAgICAgID0gZ2V0JDI7XG5wcm90byQyLm1pbGxpc2Vjb25kcyAgID0gbWlsbGlzZWNvbmRzO1xucHJvdG8kMi5zZWNvbmRzICAgICAgICA9IHNlY29uZHM7XG5wcm90byQyLm1pbnV0ZXMgICAgICAgID0gbWludXRlcztcbnByb3RvJDIuaG91cnMgICAgICAgICAgPSBob3VycztcbnByb3RvJDIuZGF5cyAgICAgICAgICAgPSBkYXlzO1xucHJvdG8kMi53ZWVrcyAgICAgICAgICA9IHdlZWtzO1xucHJvdG8kMi5tb250aHMgICAgICAgICA9IG1vbnRocztcbnByb3RvJDIueWVhc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A9IG5ldyBEYXRlKHRvSW50KGlucHV0KSk7XG59KTtcblxuLy8gU2lkZSBlZmZlY3QgaW1wb3J0c1xuXG5cbmhvb2tzLnZlcnNpb24gPSAnMi4xOS4xJztcblxuc2V0SG9va0NhbGxiYWNrKGNyZWF0ZUxvY2FsKTtcblxuaG9va3MuZm4gICAgICAgICAgICAgICAgICAgID0gcHJvdG87XG5ob29rcy5taW4gICAgICAgICAgICAgICAgICAgPSBtaW47XG5ob29rcy5tYXggICAgICAgICAgICAgICAgICAgPSBtYXg7XG5ob29rcy5ub3cgICAgICAgICAgICAgICAgICAgPSBub3c7XG5ob29rcy51dGMgICAgICAgICAgICAgICAgICAgPSBjcmVhdGVVVEM7XG5ob29rcy51bml4ICAgICAgICAgICAgICAgICAgPSBjcmVhdGVVbml4O1xuaG9va3MubW9udGhzICAgICAgICAgICAgICAgID0gbGlzdE1vbnRocztcbmhvb2tzLmlzRGF0ZSAgICAgICAgICAgICAgICA9IGlzRGF0ZTtcbmhvb2tzLmxvY2FsZSAgICAgICAgICAgICAgICA9IGdldFNldEdsb2JhbExvY2FsZTtcbmhvb2tzLmludmFsaWQgICAgICAgICAgICAgICA9IGNyZWF0ZUludmFsaWQ7XG5ob29rcy5kdXJhdGlvbiAgICAgICAgICAgICAgPSBjcmVhdGVEdXJhdGlvbjtcbmhvb2tzLmlzTW9tZW50ICAgICAgICAgICAgICA9IGlzTW9tZW50O1xuaG9va3Mud2Vla2RheXMgICAgICAgICAgICAgID0gbGlzdFdlZWtkYXlzO1xuaG9va3MucGFyc2Vab25lICAgICAgICAgICAgID0gY3JlYXRlSW5ab25lO1xuaG9va3MubG9jYWxlRGF0YSAgICAgICAgICAgID0gZ2V0TG9jYWxlO1xuaG9va3MuaXNEdXJhdGlvbiAgICAgICAgICAgID0gaXNEdXJhdGlvbjtcbmhvb2tzLm1vbnRoc1Nob3J0ICAgICAgICAgICA9IGxpc3RNb250aHNTaG9ydDtcbmhvb2tzLndlZWtkYXlzTWluICAgICAg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FwnJyk7XG4gICAgcmV0dXJuICh2YWwubGVuZ3RoIDwgMykgPyB2YWwuam9pbignXFwnJykgOiB2YWwubWFwKGZ1bmN0aW9uIChzZWcpIHtcbiAgICAgICAgaWYgKHNlZy5sZW5ndGggPCAzKVxuICAgICAgICAgICAgcmV0dXJuIHNlZztcbiAgICAgICAgaWYgKChzZWdbMF0gPT09ICcuJykgfHwgKHNlZ1tzZWcubGVuZ3RoIC0gMV0gPT09ICcuJykpXG4gICAgICAgICAgICByZXR1cm4gc2VnO1xuICAgICAgICByZXR1cm4gc2VnLnNwbGl0KCcuJykuam9pbignJiYnKTtcbiAgICB9KS5qb2luKCcnKTtcbn1cbmZ1bmN0aW9uIHVuZXNjYXBlX2RvdHModmFsdWUpIHtcbiAgICByZXR1cm4gdmFsdWUuc3BsaXQoJyYmJykuam9pbignLicpO1xufVxuZnVuY3Rpb24gcGFydGlmeSh2YWx1ZSkge1xuICAgIGlmICghdmFsdWUpXG4gICAgICAgIHJldHVybjtcbiAgICByZXR1cm4gZXNjYXBlX2RvdHMoc3RyaXBfYnJhY2VzKGJvdW5kYXJ5X3RvX2RvdCgnJyArIHZhbHVlKSkpLnNwbGl0KCcuJyk7XG59XG5mdW5jdGlvbiBjYW5DbG9uZShvKSB7XG4gICAgcmV0dXJuICh0eXBlb2Ygby5fX0NMT05FX18gPT09ICdmdW5jdGlvbicpO1xufVxuZnVuY3Rpb24gY2xvbmUobykge1xuICAgIGlmICgodHlwZW9mIG8gIT09ICdvYmplY3QnKSB8fCAobyA9PT0gbnVsbCkpXG4gICAgICAgIHJldHVybiBvO1xuICAgIGlmIChBcnJheS5pc0FycmF5KG8pKVxuICAgICAgICByZXR1cm4gby5tYXAoY2xvbmUpO1xuICAgIHJldHVybiAoY2FuQ2xvbmUobykpID9cbiAgICAgICAgby5fX0NMT05FX18oY2xvbmUpIDogKG8uY29uc3RydWN0b3IgIT09IE9iamVjdCkgPyBvIDpcbiAgICAgICAgT2JqZWN0LmtleXMobykucmVkdWNlKGZ1bmN0aW9uIChwcmUsIGspIHtcbiAgICAgICAgICAgIHByZVtrXSA9ICh0eXBlb2Ygb1trXSA9PT0gJ29iamVjdCcpID9cbiAgICAgICAgICAgICAgICBjbG9uZShvW2tdKSA6IG9ba107XG4gICAgICAgICAgICByZXR1cm4gcHJlO1xuICAgICAgICB9LCB7fSk7XG59XG5mdW5jdGlvbiBnZXQocGF0aCwgbykge1xuICAgIHZhciBwYXJ0cyA9IHBhcnRpZnkocGF0aCk7XG4gICAgdmFyIGZpcnN0O1xuICAgIGlmICh0eXBlb2YgbyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgaWYgKHBhcnRzLmxlbmd0aCA9PT0gMSlcbiAgICAgICAgICAgIHJldHVybiBvW3VuZXNjYXBlX2RvdHMocGFydHNbMF0pXTtcbiAgICAgICAgaWYgKHBhcnRzLmxlbmd0aCA9PT0gMClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgZmlyc3QgPSBvW3BhcnRzLnNoaWZ0KCldO1xuICAgICAgICByZXR1cm4gKCh0eXBlb2YgbyA9PT0gJ29iamVjdCcpICYmIChvICE9PSBudWxsKSkgP1xuICAgICAgICAgICAgcGFydHMucmVkdWNlKGZ1bmN0aW9uICh0YXJnZXQsIHByb3ApIHtcbiAgICAgICAgICAgICAgICBpZiAodGFyZ2V0ID09IG51bGwpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhcmdldFt1bmVzY2FwZV9kb3RzKHByb3ApXTtcbiAgICAgICAgICAgIH0sIGZpcnN0KSA6IG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdnZXQoKTogZXhwZWN0cyBhbiBvYmplY3QgZ290ICcgKyB0eXBlb2Ygbyk7XG4gICAgfVxufVxuZXhwb3J0cy5nZXQgPSBnZXQ7XG47XG5mdW5jdGlvbiBzZXQocGF0aCwgdmFsdWUsIG9iaikge1xuICAgIHZhciBwYXJ0cyA9IHBhcnRpZnkocGF0aCk7XG4gICAgaWYgKCh0eXBlb2Ygb2JqICE9PSAnb2JqZWN0JykgfHwgKG9iaiA9PSBudWxsKSkge1xuICAgICAgICByZXR1cm4gY2xvbmUob2JqKTtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIHJldHVybiBfc2V0KG9iaiwgdmFsdWUsIHBhcnRzKTtcbiAgICB9XG59XG5leHBvcnRzLnNldCA9IHNldDtcbjtcbmZ1bmN0aW9uIF9zZXQob2JqLCB2YWx1ZSwgcGFydHMpIHtcbiAgICB2YXIgbztcbiAgICB2YXIgaztcbiAgICBpZiAocGFydHMubGVuZ3RoID09PSAwKVxuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgbyA9ICgodHlwZW9mIG9iaiAhPT0gJ29iamVjdCcpIHx8IChvYmogPT09IG51bGwpKSA/IHt9IDogY2xvbmUob2JqKTtcbiAgICBrID0gdW5lc2NhcGVfZG90cyhwYXJ0c1swXSk7XG4gICAgb1trXSA9IF9zZXQob1trXSwgdmFsdWUsIHBhcnRzLnNsaWNlKDEpKTtcbiAgICByZXR1cm4gbztcbn1cbmZ1bmN0aW9uIGRlZmF1bHRfMShrLCB2LCBvKSB7XG4gICAgaWYgKG8gPT0gbnVsbClcbiAgICAgICAgcmV0dXJuIGdldChrLCB2KTtcbiAgICBlbHNlXG4gICAgICAgIHJldHVybiBzZXQoaywgdiwgbyk7XG59XG5leHBvcnRzLmRlZmF1bHQgPSBkZWZhdWx0XzE7XG47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5qcy5tYXAiXX0= +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJleGFtcGxlL2J1aWxkL2FwcC5qcyIsImV4YW1wbGUvYnVpbGQvcG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WIvbGF5b3V0L3BhbmVsL3dtbC9wYW5lbC5qcyIsImxpYi9tZW51L0RpdmlkZXIuanMiLCJsaWIvbWVudS9IZWFkZXIuanMiLCJsaWIvbWVudS9NZW51LmpzIiwibGliL21lbnUvTWVudUl0ZW0uanMiLCJsaWIvbWVudS9NZW51SXRlbUNsaWNrZWRFdmVudC5qcyIsImxpYi9tZW51L2J1dHRvbi1tZW51L0J1dHRvbk1lbnUuanMiLCJsaWIvbWVudS9idXR0b24tbWVudS9pbmRleC5qcyIsImxpYi9tZW51L2J1dHRvbi1tZW51L3dtbC9idXR0b24tbWVudS5qcyIsImxpYi9tZW51L2luZGV4LmpzIiwibGliL21lbnUvd21sL2RpdmlkZXIuanMiLCJsaWIvbWVudS93bWwvaGVhZGVyLmpzIiwibGliL21lbnUvd21sL21lbnUtaXRlbS5qcyIsImxpYi9tZW51L3dtbC9tZW51LmpzIiwibGliL25hdi9icmVhZGNydW1icy9CcmVhZENydW1icy5qcyIsImxpYi9uYXYvYnJlYWRjcnVtYnMvSXRlbS5qcyIsImxpYi9uYXYvYnJlYWRjcnVtYnMvd21sL2JyZWFkY3J1bWJzLmpzIiwibGliL25hdi9saW5rL0xpbmsuanMiLCJsaWIvbmF2L2xpbmsvTGlua0NsaWNrZWRFdmVudC5qcyIsImxpYi9uYXYvbGluay9pbmRleC5qcyIsImxpYi9uYXYvbGluay93bWwvbGluay5qcyIsImxpYi9uYXYvbWVudS9IZWFkZXIuanMiLCJsaWIvbmF2L21lbnUvSXRlbS5qcyIsImxpYi9uYXYvbWVudS9JdGVtQ2xpY2tlZEV2ZW50LmpzIiwibGliL25hdi9tZW51L0xpbmsuanMiLCJsaWIvbmF2L21lbnUvTWVudS5qcyIsImxpYi9uYXYvbWVudS9TdWJNZW51LmpzIiwibGliL25hdi9tZW51L2luZGV4LmpzIiwibGliL25hdi9tZW51L3dtbC9oZWFkZXIuanMiLCJsaWIvbmF2L21lbnUvd21sL2l0ZW0uanMiLCJsaWIvbmF2L21lb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VudV8xLkJ1dHRvbk1lbnVQYWdlKHRoaXMpXG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBuYXZpZ2F0aW9uIHZpZXdcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMubmF2aWdhdGlvbiA9IG5ldyBuYXZpZ2F0aW9uXzEuTmF2aWdhdGlvbih0aGlzKTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIHZhbHVlcyB1c2VkIHdpdGhpbiB0aGUgdGVtcGxhdGUuXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIGlkOiB7XG4gICAgICAgICAgICAgICAgbGF5b3V0OiAnbGF5b3V0J1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogdmlldyBpcyB0aGUgY3VycmVudCBhcHBsaWNhdGlvbiB2aWV3LlxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy52aWV3ID0gbmV3IGFwcF8xLk1haW4odGhpcyk7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBjb250ZW50IGRpc3BsYXllZCBhcyB0aGUgbWFpbiBjb250ZW50LlxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5jb250ZW50ID0gdGhpcy5wYWdlcy5ob21lLnZpZXc7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiB0b2dnbGVEcmF3ZXJcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMudG9nZ2xlRHJhd2VyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgX3RoaXNcbiAgICAgICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgICAgIC5maW5kQnlJZChfdGhpcy52YWx1ZXMuaWQubGF5b3V0KVxuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQudG9nZ2xlRHJhd2VyKCk7IH0pO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAg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ZTogJ0FzdW5kZXInIH1cbiAgICAgICAgICAgIF1cbiAgICAgICAgfTtcbiAgICAgICAgX3RoaXMub25TZWFyY2ggPSBmdW5jdGlvbiAoX2EpIHtcbiAgICAgICAgICAgIHZhciB2YWx1ZSA9IF9hLnZhbHVlO1xuICAgICAgICAgICAgX3RoaXNcbiAgICAgICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgICAgIC5maW5kQnlJZChfdGhpcy52YWx1ZXMuaWQpXG4gICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgICAgIHZhciBoaXQgPSBfdGhpcy52YWx1ZXMucmVzdWx0cy5maWx0ZXIoZnVuY3Rpb24gKGMpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGMudmFsdWUudG9Mb3dlckNhc2UoKS5zdGFydHNXaXRoKHZhbHVlKSA/IHRydWUgOiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBzLnVwZGF0ZShoaXQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG4gICAgICAgIF90aGlzLm9uU2VsZWN0ID0gZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICB2YXIgdmFsdWUgPSBfYS52YWx1ZTtcbiAgICAgICAgICAgIF90aGlzLnZpZXcuZmluZEJ5SWQoJ3NlbGVjdGVkJylcbiAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGUubGFzdENoaWxkKVxuICAgICAgICAgICAgICAgICAgICBlLnJlbW92ZUNoaWxkKGUubGFzdENoaWxkKTtcbiAgICAgICAgICAgICAgICBlLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHZhbHVlLnZhbHVlKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm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V0b2NvbXBsZXRlXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi9jb250cm9sL2F1dG9jb21wbGV0ZVwiKTtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IHNlbGVjdGVkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcInNlbGVjdGVkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIihub3RoaW5nKVwiKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoYXV0b2NvbXBsZXRlXzEuQXV0b2NvbXBsZXRlLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3RyaW5naWZpZXInOiBmdW5jdGlvbiAocikgeyByZXR1cm4gci52YWx1ZTsgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvblNlYXJjaCc6IF9fX2NvbnRleHQub25TZWFyY2gsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25TZWxlY3QnOiBfX19jb250ZXh0Lm9uU2VsZWN0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1hdXRvY29tcGxldGUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/IE9iamVjdC5jcmVhdGUoYikgOiAoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUsIG5ldyBfXygpKTtcbiAgICB9O1x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x8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChCcmVhZENydW1ic18xLkJyZWFkQ3J1bWJzLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoSXRlbV8xLkl0ZW0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChMaW5rXzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiT25lXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoSXRlbV8xLkl0ZW0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChMaW5rXzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVHdvXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoSXRlbV8xLkl0ZW0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChMaW5rXzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVGhy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HRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChCdXN5SW5kaWNhdG9yXzEuQnVzeUluZGljYXRvciwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1idXN5LWluZGljYXRvci5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiK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kL0dyaWRcIik7XG47XG52YXIgYnV0dG9uX21lbnVfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL21lbnUvYnV0dG9uLW1lbnVcIik7XG47XG52YXIgbWVudV8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvbWVudVwiKTtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoYnV0dG9uX21lbnVfMS5CdXR0b25NZW51LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkNsaWNrIE1lXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5vbkNsaWNrKFwiWW91IGNsaWNrZWQgb25lXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJPbmVcIildLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5vbkNsaWNrKFwiWW91IGNsaWNrZWQgdHdvXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUd29cIildLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5vbkNsaWNrKFwiWW91IGNsaWNrZWQgdGhyZWVcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIlRocmVlXCIpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnV0dG9uLW1lbnUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/IE9iamVjdC5jcmVhdGUoYikgOiAoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUsIG5ldyBfXygpKTtcbiA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gICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIllvdSBzZWxlY3RlZDogXCIpLCBfX193bWwubm9kZSgnYicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJzZWxlY3QtY29udGVudFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCIoTm9uZSlcIildLCBfX192aWV3KSwgX19fd21sLnRleHQoXCIuXCIpXSwgX19fdmlldyksIF9fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KGJ1dHRvbl9zZWxlY3RfMS5CdXR0b25TZWxlY3QsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJzZWxlY3RcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhcmlhbnQnOiBcIi1wcmltYXJ5XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb3B0aW9ucyc6IF9fX2NvbnRleHQudmFsdWVzLm9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IGNhbiBhbHNvIHVzZSBNdWx0aUJ1dHRvblNlbGVjdCBpbnN0ZWFkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcIm11bHRpLWNvbnRlbnRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiKE5vbmUpXCIpXSwgX19fdmlldyksIF9fX3dtbC50ZXh0KFwiLlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChidXR0b25fc2VsZWN0XzEuTXVsdGlCdXR0b25TZWxlY3QsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJtdWx0aVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwibXVsdGlcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd2YXJpYW50JzogXCItcHJpbWFyeVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29wdGlvbnMnOiBfX19jb250ZXh0LnZhbHVlcy5vcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7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cbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoR3JpZF8xLkdyaWQsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuUm93LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLkNvbHVtbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUaGUgY2hlY2tib3ggaXMgXCIpLCBfX193bWwubm9kZSgnYicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJjb250ZW50XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcInVudG91Y2hlZFwiKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoQ2hlY2tib3hfMS5DaGVja2JveCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2hlY2tib3guanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX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jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIEdyaWRfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2xheW91dC9ncmlkL0dyaWRcIik7XG47XG52YXIgRGF0ZV8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvY29udHJvbC9kYXRlL0RhdGVcIik7XG47XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoR3JpZF8xLkdyaWQsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuUm93LCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLkNvbHVtbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUaGUgZGF0ZSBpcyA6IFwiKSwgX19fd21sLm5vZGUoJ2InLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwic2VsZWN0ZWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiKE5vbmUgc2VsZWN0ZWQpXCIpXSwgX19fdmlldyksIF9fX3dtbC50ZXh0KFwiLlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChEYXRlXzEuRGF0ZSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcImRhdGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcImRhdGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF9fX2NvbnRleHQub25DaGFuZ2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRhdGUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/IE9iamVjdC5jcmVhdGUoYikgOiAoX18ucHJvdG90eXBlID0gYi5wc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gaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnYicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJJbmRleFwiKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2V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H0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIEdyaWRfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2xheW91dC9ncmlkL0dyaWRcIik7XG47XG52YXIgbWVudV8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvbWVudVwiKTtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQobWVudV8xLk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkhlYWRpbmdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiQmFja1wiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLk1lbnVJdGVtLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlJlZnJlc2hcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5EaXZpZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9tZW51XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIlF1aXRcIildLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bWVudS5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGV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dlL3NlbGYvbGF5b3V0L3BhbmVsL1BhbmVsXCIpO1xuO1xuO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NpemUnOiA0XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KFBhbmVsXzEuUGFuZWwsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChQYW5lbF8xLkJvZHksIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJCb2R5IG9ubHkuXCIpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NpemUnOiA0XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KFBhbmVsXzEuUGFuZWwsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChQYW5lbF8xLkhlYWRlciwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIldpdGggSGVhZGVyXCIpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoUGFuZWxfMS5Cb2R5LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiTG9yZW0gaW1wc3VtIGRpbGl1bSBuZXQgc2V0LlwiKV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KSwgX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChQYW5lbF8xLlBhbmVsLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoUGFuZWxfMS5IZWFkZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJXaXRoIEZvb3RlclwiKV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KFBhbmVsXzEuQm9keSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIkxvcmVtIGltcHN1bSBkaWxpdW0gbmV0IHNldC5cIildLCBfX192aWV3KSwgX19fd21sLndpZGdldChQYW5lbF8xLkZvb3Rlciwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFt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xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogNlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IHNlbGVjdGVkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcInRleHRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMudGV4dCgpKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoU2VhcmNoU3RhY2tfMS5TZWFyY2hTdGFjaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0ZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVjb3JhdG9yJzogZnVuY3Rpb24gKHIpIHsgcmV0dXJuIHIubGFiZWw7IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uU2VhcmNoJzogX19fY29ud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CJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgdmlld3MgPSByZXF1aXJlKFwiLi93bWwvc2VsZWN0XCIpO1xudmFyIFBhZ2VfMSA9IHJlcXVpcmUoXCIuLi9QYWdlXCIpO1xudmFyIFNlbGVjdFBhZ2UgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKFNlbGVjdFBhZ2UsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gU2VsZWN0UGFnZSgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIG9wdGlvbnM6IFtcbiAgICAgICAgICAgICAgICB7IGxhYmVsOiAnQXN1cycsIHZhbHVlOiAnQXN1cycgfSxcbiAgICAgICAgICAgICAgICB7IGxhYmVsOiAnTVNJJywgdmFsdWU6ICdNU0knIH0sXG4gICAgICAgICAgICAgICAgeyBsYWJlbDogJ0dpZ2FieXRlJywgdmFsdWU6ICdHaWdhYnl0ZScgfVxuICAgICAgICAgICAgXVxuICAgICAgICB9O1xuICAgICAgICBfdGhpcy5vbkNoYW5nZSA9IGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgdmFyIHZhbHVlID0gX2EudmFsdWU7XG4gICAgICAgICAgICBfdGhpc1xuICAgICAgICAgICAgICAgIC52aWV3XG4gICAgICAgICAgICAgICAgLmZpbmRCeUlkKCdzZWxlY3RlZCcpXG4gICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgIHdoaWxlIChlLmxhc3RDaGlsZClcbiAgICAgICAgICAgICAgICAgICAgZS5yZW1vdmV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yB2YWx1ZTogdHJ1ZSB9KTtcbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBHcmlkXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi9sYXlvdXQvZ3JpZC9HcmlkXCIpO1xuO1xudmFyIFNlbGVjdF8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvY29udHJvbC9zZWxlY3QvU2VsZWN0XCIpO1xuO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiWW91IHNlbGVjdGVkOiBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcInNlbGVjdGVkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIihOb25lKVwiKV0sIF9fX3ZpZXcpLCBfX193bWwudGV4dChcIi5cIildLCBfX192aWV3KSwgX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoU2VsZWN0XzEuU2VsZWN0LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwic2VsZWN0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzZWxlY3RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvcHRpb25zJzogX19fY29udGV4dC52YWx1ZXMub3B0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF9fX2NvbnRleHQub25DaGFuZ2VcbiAgICAgICAgIC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ICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2l6ZSc6IDRcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwudGV4dChcIk1lbWJlcnM6IFwiKSwgX19fd21sLm5vZGUoJ2InLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwic2VsZWN0ZWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMudGV4dCldLCBfX192aWV3KSwgX19fd21sLnRleHQoXCIuXCIpXSwgX19fdmlldyksIF9fX3dtbC5ub2RlKCdwJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KHN0YWNrXzEuU3RhY2ssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwic3RhY2tcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd2YWx1ZSc6IF9fX2NvbnRleHQudmFsdWVzLnZhbHVlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWNvcmF0b3InOiBfX19jb250ZXh0LnZhbHVlcy5kZWNvcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1zdGFjay5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1x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BlID0gYi5wcm90b3R5cGUsIG5ldyBfXygpKTtcbiAgICB9O1xufSkoKTtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBHcmlkXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi9sYXlvdXQvZ3JpZC9HcmlkXCIpO1xuO1xudmFyIFN3aXRjaF8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvY29udHJvbC9zd2l0Y2gvU3dpdGNoXCIpO1xuO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEdyaWRfMS5HcmlkLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiVGhlIHN3aXRjaCBpcyBcIiksIF9fX3dtbC5ub2RlKCdiJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBcImNvbnRlbnRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwidW50b3VjaGVkXCIpXSwgX19fdmlldyksIF9fX3dtbC50ZXh0KFwiLlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChTd2l0Y2hfMS5Td2l0Y2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwic3dpdGNoXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICA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CIpO1xuO1xudmFyIFRhYmxlXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi90YWJsZS90YWJsZS9UYWJsZVwiKTtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoVGFibGVfMS5UYWJsZSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NlbGVjdGFibGUnOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGF0YSc6IF9fX2NvbnRleHQudmFsdWVzLnVzZXJzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZmllbGRzJzogX19fY29udGV4dC52YWx1ZXMuZmllbGRzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRhYmxlLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICh7IF9fcHJvdG9fXzogW10gfSBpbnN0YW5jZW9mIEFycmF5ICYmIGZ1bmN0aW9uIChkLCBiKSB7IGQuX19wcm90b19fID0gYjsgfSkgfHxcbiAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoYi5oYXNPd25Qcm9wZXJ0eShwKSkgZFtwXSA9IGJbcF07IH07XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgIGV4dGVuZFN0YXRpY3MoZCwgYik7XG4gICAgICAgIGZ1bmN0aW9uIF9fKCkgeyB0aGlzLmNvbnN0cnVjdG9yID0gZDsgfVxuICAgICAgICBkLnByb3RvdHlwZSA9IGIgPT09IG51bGwgPyBPYmplY3QuY3JlYXRlKGIpIDogKF9fLnByb3RvdHlwZSA9IGIucHJvdG90eXBlLCBuZXcgX18oKSk7XG4gICAgfT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lcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChHcmlkXzEuR3JpZCwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Sb3csIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChHcmlkXzEuQ29sdW1uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoVGFic18xLlRhYnMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChUYWJfMS5UYWIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQudGFiID09PSBcIkZpcnN0XCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkZpcnN0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiRmlyc3RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5jbGlja2VkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoVGFiXzEuVGFiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnRhYiA9PT0gXCJTZWNvbmRcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiU2Vjb25kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiU2Vjb25kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQuY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KFRhYl8xLlRhYiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC50YWIgPT09IFwiVGhpcmRcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVGhpcmRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJUaGlyZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0LmNsaWNrZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJjb250ZW50XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNvbnRlbnQpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGFicy5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdI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3Rpb24gKF9hKSB7XG4gICAgICAgICAgICB2YXIgdmFsdWUgPSBfYS52YWx1ZTtcbiAgICAgICAgICAgICh2YWx1ZSA9PT0gJ2ludmFsaWQnKSA/XG4gICAgICAgICAgICAgICAgX3RoaXMuZ2V0KF90aGlzLmlkLCBmdW5jdGlvbiAoYykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYy5zZXRFcnJvcignVGhpcyBjb250cm9sIGlzIG5vdyBpbnZhbGlkIScpO1xuICAgICAgICAgICAgICAgIH0pIDpcbiAgICAgICAgICAgICAgICAodmFsdWUgPT09ICd2YWxpZCcpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuZ2V0KF90aGlzLmlkLCBmdW5jdGlvbiAoYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGMuc2V0U3VjY2VzcygnVGhpcyBjb250cm9sIGlzIG5vdyB2YWxpZCEnKTtcbiAgICAgICAgICAgICAgICAgICAgfSkgOlxuICAgICAgICAgICAgICAgICAgICAodmFsdWUgPT09ICd3YXJuJykgP1xuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuZ2V0KF90aGlzLmlkLCBmdW5jdGlvbiAoYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjLnNldFdhcm5pbmcoJ1RoaXMgY29udHJvbCBub3cgaGFzIGEgd2FybmluZyEnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICh2YWx1ZSA9PT0gJ3Jlc2V0JykgP1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmdldChfdGhpcy5pZCwgZnVuY3Rpb24gKGMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGMucmVzZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnZpZXdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmZpbmRCeUlkKCdjb250ZW50JylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoZS5sYXN0Q2hpbGQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnJlbW92ZUNoaWxkKGUubGFzdENoaWxkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSh2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBUZXh0RmllbGRQYWdlO1xufShQYWdlXzEuUGFnZSkpO1xuZXhwb3J0cy5UZXh0RmllbGRQYWdlID0gVGV4dEZpZWxkUGFnZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICh7IF9fcHJvdG9fXzogW10gfSBpbnN0YW5jZW9mIEFycmF5ICYmIGZ1bmN0aW9uIChkLCBiKSB7IGQuX19wcm90b19fID0gYjsgfSkgfHxcbiAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoYi5oYXNPd25Qcm9wZXJ0eShwKSkgZFtwXSA9IGJbcF07IH07XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChkLCBiKSB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ICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoR3JpZF8xLkNvbHVtbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJUaGUgdmFsdWUgb2YgdGhlIGlucHV0IGlzOlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJjb250ZW50XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShcIihOb3RoaW5nKVwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChUZXh0RmllbGRfMS5UZXh0RmllbGQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJ0ZXh0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoR3JpZF8xLlJvdywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEdyaWRfMS5Db2x1bW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ3AnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiVGhlIG9uZSB1c2VzIHJvd3MgdG8gcmVuZGVyIGEgdGV4dCBhcmVhOlwiKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgncCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChUZXh0RmllbGRfMS5UZXh0RmllbGQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3Jvd3MnOiAzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogX19fY29udGV4dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGV4dC1maWVsZC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICA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mdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoRHJhd2VyXzEuRHJhd2VyLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkLmxheW91dFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2RyYXdlcic6IF9fX2NvbnRleHQubmF2aWdhdGlvblxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEFjdGlvbkJhcl8xLkFjdGlvbkJhciwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KEljb25CdXR0b25fMS5JY29uQnV0dG9uLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC50b2dnbGVEcmF3ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoZGFzaF8xLkRhc2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoZGFzaF8xLkRhc2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoZGFzaF8xLkRhc2gsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KE1haW5fMS5NYWluLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC5jb250ZW50LnJlbmRlcigpKV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9YXBwLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICh7IF9fcHJvdG9fXzogW10gfSBpbnN0YW5jZW9mIEFycmF5ICYmIGZ1bmN0aW9uIChkLCBiKSB7IGQuX19wcm90b19fID0gYjsgfSkgfHxcbiAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoYi5oYXNPd25Qcm9wZXJ0eShwKSkgZFtwXSA9IGJbcF07IH07XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgIGV4dGVuZFN0YXRpY3MoZCwgYik7XG4gICAgICAgIGZ1bmN0aW9uIF9fKCkgeyB0aGlzLmNvbnN0cnVjdG9yID0gZDsgfVxuICAgICAgICBkLnByb3RvdHlwZSA9IGIgPT09IG51bGwgPyBPYmplY3QuY3JlYXRlKGIpIDogKF9fLnByb3RvdHlwZSA9IGIucHJvdG90eXBlLCBuZXcgX18oKSk7XG4gICAgfTtcbn0pKCk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG47XG52YXIgbWVudV8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvbmF2L21lbnVcIik7XG52YXIgTmF2aWdhdGlvbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTmF2aWdhdGlvbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBOYXZpZ2F0aW9uKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQobWVudV8xLk1lbnUsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcImhvbWVcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiaG9tZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJIb21lXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkxheW91dFwiXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLlN1Yk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJwYW5lbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3BhbmVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcInBhbmVsXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJQYW5lbHNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlRhYmxlXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInRhYmxlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiMvdGFibGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwidGFibGVcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlRhYmxlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkhlYWRlciwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJDb250cm9sXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInRleHQtZmllbGRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy90ZXh0LWZpZWxkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcInRleHQtZmllbGRcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkhlYWRlciBGaWVsZFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJkYXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiMvZGF0ZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQucGFnZSA9PT0gXCJkYXRlXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJEYXRlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcInNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3NlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQucGFnZSA9PT0gXCJzZWxlY3RcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIlNlbGVjdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJhdXRvY29tcGxldGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9hdXRvY29tcGxldGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwiYXV0b2NvbXBsZXRlXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJBdXRvY29tcGxldGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkxpbmssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2dyb3VwJzogXCJsaW5rc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiYnV0dG9uLXNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL2J1dHRvbi1zZWxlY3RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwiYnV0dG9uLXNlbGVjdFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiQnV0dG9uIFNlbGVjdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL2NoZWNrYm94XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcImNoZWNrYm94XCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJDaGVja2JveFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzd2l0Y2hcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9zd2l0Y2hcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwic3dpdGNoXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJTd2l0Y2hcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkxpbmssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2dyb3VwJzogXCJsaW5rc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwidGFic1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3RhYnNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwidGFic1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiVGFic1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzdGFja1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL3N0YWNrXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcInN0YWNrXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJTdGFja1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJzZWFyY2gtc3RhY2tcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9zZWFyY2gtc3RhY2tcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwic2VhcmNoLXN0YWNrXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJTZWFyY2ggU3RhY2tcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuSGVhZGVyLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkFwcFwiXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLlN1Yk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChtZW51XzEuTGluaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ3JvdXAnOiBcImxpbmtzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogXCJidXN5LWluZGljYXRvclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdocmVmJzogXCIjL2J1c3ktaW5kaWNhdG9yXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcImJ1c3ktaW5kaWNhdG9yXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJCdXN5IEluZGljYXRvclwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KG1lbnVfMS5IZWFkZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiTmF2XCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcImJyZWFkY3J1bWJzXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiMvYnJlYWRjcnVtYnNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQubmF2aWdhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FjdGl2ZSc6IChfX19jb250ZXh0LnBhZ2UgPT09IFwiYnJlYWRjcnVtYnNcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIkJyZWFkQ3J1bWJzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkhlYWRlciwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICd0ZXh0JzogXCJNZW51XCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLndpZGdldChtZW51XzEuU3ViTWVudSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KG1lbnVfMS5MaW5rLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncm91cCc6IFwibGlua3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBcIm1lbnVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9tZW51XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2xpY2snOiBfX19jb250ZXh0Lm5hdmlnYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiAoX19fY29udGV4dC5wYWdlID09PSBcIm1lbnVcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBcIk1lbnVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQobWVudV8xLkxpbmssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2dyb3VwJzogXCJsaW5rc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IFwiYnV0dG9uLW1lbnVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaHJlZic6IFwiIy9idXR0b24tbWVudVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC5uYXZpZ2F0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogKF9fX2NvbnRleHQucGFnZSA9PT0gXCJidXR0b24tbWVudVwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IFwiQnV0dG9uIE1lbnVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBOYXZpZ2F0aW9uO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5OYXZpZ2F0aW9uID0gTmF2aWdhdGlvbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPW5hdmlnYXRpb24uanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3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PSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLmNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZC5jb250ZW50XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICA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AgIC52aWV3XG4gICAgICAgICAgICAuZmluZEJ5SWQodGhpcy52YWx1ZXMucm9vdC5pZClcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGgpIHtcbiAgICAgICAgICAgIGguY2xhc3NMaXN0LnJlbW92ZShJTlBVVF9TVUNDRVNTKTtcbiAgICAgICAgICAgIGguY2xhc3NMaXN0LnJlbW92ZShJTlBVVF9FUlJPUik7XG4gICAgICAgICAgICBoLmNsYXNzTGlzdC5yZW1vdmUoSU5QVVRfV0FSTklORyk7XG4gICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0YShmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpczsgfSwgZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXM7IH0pO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogc3RhdGVcbiAgICAgKi9cbiAgICBGb3JtQ29udHJvbC5wcm90b3R5cGUuc3RhdGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmF0dHJzLnd3LnN1Y2Nlc3MgP1xuICAgICAgICAgICAgJ2hhcy1zdWNjZXNzJyA6XG4gICAgICAgICAgICB0aGlzLmF0dHJzLnd3LmVycm9yID9cbiAgICAgICAgICAgICAgICAnaGFzLWVycm9yJyA6XG4gICAgICAgICAgICAgICAgdGhpcy5hdHRycy53dy53YXJuaW5nID9cbiAgICAgICAgICAgICAgICAgICAgJ2hhcy13YXJuaW5nJyA6XG4gICAgICAgICAgICAgICAgICAgICcnO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogc2V0U3VjY2Vzc1xuICAgICAqL1xuICAgIEZvcm1Db250cm9sLnByb3RvdHlwZS5zZXRTdWNjZXNzID0gZnVuY3Rpb24gKG1lc3NhZ2UpIHtcbiAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgICAgIC5yZW1vdmVTdGF0ZSgpXG4gICAgICAgICAgICAuc2V0SGVscFRleHQobWVzc2FnZSlcbiAgICAgICAgICAgIC5zZXRTdGF0ZShJTlBVVF9TVUNDRVNTKTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHNldEVycm9yXG4gICAgICovXG4gICAgRm9ybUNvbnRyb2wucHJvdG90eXBlLnNldEVycm9yID0gZnVuY3Rpb24gKG1lc3NhZ2UpIHtcbiAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgICAgIC5yZW1vdmVTdGF0ZSgpXG4gICAgICAgICAgICAuc2V0SGVscFRleHQobWVzc2FnZSlcbiAgICAgICAgICAgIC5zZXRTdGF0ZShJTlBVVF9FUlJPUik7XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiBzZXRXYXJuaW5nXG4gICAgICovXG4gICAgRm9ybUNvbnRyb2wucHJvdG90eXBlLnNldFdhcm5pbmcgPSBmdW5jdGlvbiAobWVzc2FnZSkge1xuICAgICAgICByZXR1cm4gdGhpc1xuICAgICAgICAgICAgLnJlbW92ZVN0YXRlKClcbiAgICAgICAgICAgIC5zZXRIZWxwVGV4dChtZXNzYWdlKVxuICAgICAgICAgICAgLnNldFN0YXRlKElOUFVUX1dBUk5JTkcpO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogcmVzZXRcbiAgICAgKi9cbiAgICBGb3JtQ29udHJvbC5wcm90b3R5cGUucmVzZXQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHJldHVybiB0aGlzXG4gICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgLmZpbmRCeUlkKHRoaXMudmFsdWVzLmhlbHAuaWQpXG4gICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChtKSB7XG4gICAgICAgICAgICBfdGhpcy5yZW1vdmVTdGF0ZSgpO1xuICAgICAgICAgICAgd2hpbGUgKG0uZmlyc3RDaGlsZClcbiAgICAgICAgICAgICAgICBtLnJlbW92ZUNoaWxkKG0uZmlyc3RDaGlsZCk7XG4gICAgICAgICAgICAvLyAgdGhpcy5jbGVhcigp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pZGVzIGFuIGlucHV0IHdpdGggYSBkcm9wZG93biBtZW51IHRoYXQgYWxsb3dzXG4gKiB0aGUgdXNlciB0byBzZWFyY2ggYW5kIHNlbGVjdCBmb3JtIGEgbGlzdCBvZiBvcHRpb25zLlxuICovXG52YXIgQXV0b2NvbXBsZXRlID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhBdXRvY29tcGxldGUsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gQXV0b2NvbXBsZXRlKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5NYWluKF90aGlzKTtcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSB7XG4gICAgICAgICAgICBwb3B1bGF0ZWQ6IChfdGhpcy5hdHRycy53dy5wb3B1bGF0ZWQpID9cbiAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5wb3B1bGF0ZWQgOiB2aWV3cy5wb3B1bGF0ZWQsXG4gICAgICAgICAgICBlbXB0eTogKF90aGlzLmF0dHJzLnd3LmVtcHR5KSA/XG4gICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuZW1wdHkgOiB2aWV3cy5lbXB0eVxuICAgICAgICB9O1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBpZDoge1xuICAgICAgICAgICAgICAgIHJvb3Q6ICdyb290JyxcbiAgICAgICAgICAgICAgICBpbnB1dDogJ2lucHV0JyxcbiAgICAgICAgICAgICAgICBtZW51OiAnbWVudScsXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogJ21lc2FnZScsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICByb290OiAnJyxcbiAgICAgICAgICAgICAgICBpbnB1dDogJydcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb290OiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdyb290JyxcbiAgICAgICAgICAgICAgICBjbGFzczogdXRpbF8xLmNvbmNhdChuYW1lcy5TRUFSQ0gsIF90aGlzLmF0dHJzLnd3LmNsYXNzKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGhlbHA6IHtcbiAgICAgICAgICAgICAgICBpZDogJ2hlbHAnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbWVudToge1xuICAgICAgICAgICAgICAgIGlkOiAnbWVudSdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbnB1dDoge1xuICAgICAgICAgICAgICAgIGlkOiAnaW5wdXQnLFxuICAgICAgICAgICAgICAgIGNsYXNzOiB1dGlsXzEuY29uY2F0KCdmb3JtLWNvbnRyb2wnLCBfdGhpcy5hdHRycy53dy5pbnB1dENsYXNzKSxcbiAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogX3RoaXMuYXR0cnMud3cucGxhY2Vob2xkZXIgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5wbGFjZWhvbGRlciA6IG51bGwsXG4gICAgICAgICAgICAgICAgb25LZXlEb3duOiBfdGhpcy5vbktleURvd24sXG4gICAgICAgICAgICAgICAgb25LZXlVcDogX3RoaXMub25LZXlVcCxcbiAgICAgICAgICAgICAgICBvbklucHV0OiBfdGhpcy5vbklucHV0XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2VhcmNoOiB7XG4gICAgICAgICAgICAgICAgZGVsYXk6IF90aGlzLmF0dHJzLnd3LmRlYm91bmNlID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuZGVib3VuY2UgOiBfdGhpcy5ERUZBVUxUX0RFQk9VTkNFX1RJTUUsXG4gICAgICAgICAgICAgICAgcmVzdWx0czogW11cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpdGVtOiB7XG4gICAgICAgICAgICAgICAgdGVtcGxhdGU6IF90aGlzLnRlbXBsYXRlLFxuICAgICAgICAgICAgICAgIHN0cmluZ2lmeTogX3RoaXMuYXR0cnMud3cuc3RyaW5naWZpZXIgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5zdHJpbmdpZmllciA6IF90aGlzLnN0cmluZ2lmeSxcbiAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24gKGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAuY2xvc2UoKVxuICAgICAgICAgICAgICAgICAgICAgICAgLmRlbGVnYXRlXG4gICAgICAgICAgICAgICAgICAgICAgICAub25TZWxlY3QobmV3IGx1cmNoXzEuSXRlbVNlbGVjdGVkRXZlbnQoX3RoaXMuYXR0cnMud3cubmFtZSwgX3RoaXMudmFsdWVzLnNlYXJjaC5yZXN1bHRzW051bWJlcihpbmRleCldKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIEF1dG9jb21wbGV0ZS5wcm90b3R5cGUuY2xlYXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgQXV0b2NvbXBsZXRlLnByb3RvdHlwZS5vcGVuID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzXG4gICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgLmZpbmRCeUlkKHRoaXMudmFsdWVzLmlkLm1lbnUpXG4gICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChtKSB7IHJldHVybiBtLnNob3coKTsgfSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgQXV0b2NvbXBsZXRlLnByb3RvdHlwZS5jbG9zZSA9IGZ1bmN0aW9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gICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwubWFwKF9fX2NvbnRleHQudmFsdWVzLnNlYXJjaC5yZXN1bHRzLCBmdW5jdGlvbiBfbWFwKG9wdGlvbiwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC53aWRnZXQoTWVudUl0ZW1fMS5NZW51SXRlbSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IChcIlwiICsgaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogZnVuY3Rpb24gKCkgeyByZXR1cm4gX19fY29udGV4dC52YWx1ZXMuaXRlbS5jbGljayhpbmRleCk7IH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuaXRlbS50ZW1wbGF0ZS5wb3B1bGF0ZWQob3B0aW9uLCBpbmRleCwgX19fY29udGV4dC52YWx1ZXMuc2VhcmNoLnJlc3VsdHMpKF9fX2NvbnRleHQpKF9fX3ZpZXcpKV0sIF9fX3ZpZXcpO1xuICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIG90aGVyd2lzZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuaXRlbS50ZW1wbGF0ZS5lbXB0eSgpKF9fX2NvbnRleHQpKF9fX3ZpZXcpKTtcbiAgICAgICAgICAgICAgICB9KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBSZXN1bHRzO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5SZXN1bHRzID0gUmVzdWx0cztcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLnJvb3QuY2xhc3NcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnaW5wdXQnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5jbGFzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbmtleWRvd24nOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5vbktleURvd24sXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25rZXl1cCc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0Lm9uS2V5VXAsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25pbnB1dCc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0Lm9uSW5wdXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAncGxhY2Vob2xkZXInOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5wbGFjZWhvbGRlclxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LmlkXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQoTWVudV8xLk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMubWVudS5pZFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2hpZGRlbic6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWF1dG9jb21wbGV0ZS5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9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aXJlKFwiQHBhY2thZ2Uvc2VsZi9jb250cm9sXCIpO1xudmFyIHV0aWxfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbW1vbi91dGlsXCIpO1xuLyoqXG4gKiBCdXR0b25TZWxlY3RHcm91cFxuICovXG52YXIgQnV0dG9uU2VsZWN0R3JvdXAgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEJ1dHRvblNlbGVjdEdyb3VwLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEJ1dHRvblNlbGVjdEdyb3VwKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5NYWluKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgcm9vdDoge1xuICAgICAgICAgICAgICAgIGlkOiAncm9vdCcsXG4gICAgICAgICAgICAgICAgY2xhc3M6IG5hbWVzLkJVVFRPTl9TRUxFQ1RcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBoZWxwOiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdoZWxwJyxcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBfdGhpcy5hdHRycy53dy5zdWNjZXNzLFxuICAgICAgICAgICAgICAgIGVycm9yOiBfdGhpcy5hdHRycy53dy5lcnJvcixcbiAgICAgICAgICAgICAgICB3YXJuaW5nOiBfdGhpcy5hdHRycy53dy53YXJuaW5nXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2VsZWN0OiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IF90aGlzLmluaXRpYWxpemUoX3RoaXMuYXR0cnMud3cudmFsdWUpLFxuICAgICAgICAgICAgICAgIG9wdGlvbnM6IF90aGlzLmF0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VjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBCdXR0b25fMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbnRyb2wvYnV0dG9uL0J1dHRvblwiKTtcbjtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLnJvb3QuY2xhc3NcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwubWFwKF9fX2NvbnRleHQudmFsdWVzLnNlbGVjdC5vcHRpb25zLCBmdW5jdGlvbiBfbWFwKG9wdCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChCdXR0b25fMS5CdXR0b24sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2FsY3VsYXRlQ2xhc3Mob3B0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LmlzU2VsZWN0ZWQob3B0LnZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DbGljayc6IF9fX2NvbnRleHQudmFsdWVzLmNsaWNrKG9wdC52YWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RleHQnOiBvcHQudGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyk7XG4gICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gb3RoZXJ3aXNlKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpO1xuICAgICAgICAgICAgICAgIH0pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnV0dG9uLXNlbGVjdC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWY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ztcbiAgICB9XG4gICAgR3JvdXAucHJvdG90eXBlLmdldENsYXNzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbGlzdCA9IFsnYnRuLWdyb3VwJ107XG4gICAgICAgIGlmICh0aGlzLmF0dHJzLnd3KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5hdHRycy53dy5jbGFzcylcbiAgICAgICAgICAgICAgICBsaXN0LnB1c2godGhpcy5hdHRycy53dy5jbGFzcyk7XG4gICAgICAgICAgICBpZiAodGhpcy5hdHRycy53dy5zcGFjZWQpXG4gICAgICAgICAgICAgICAgbGlzdC5wdXNoKG5hbWVzLlNQQUNFRCk7XG4gICAgICAgICAgICByZXR1cm4gbGlzdC5qb2luKCcgJyk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHJldHVybiBHcm91cDtcbn0oRy5Hcm91cCkpO1xuZXhwb3J0cy5Hcm91cCA9IEdyb3VwO1xuO1xuLyoqXG4gKiBCdXR0b24gaXMgYW4gaW1wcm92ZW1lbnQgb3ZlciBIVE1MQnV0dGlvbkVsZW1lbnRcbiAqL1xudmFyIEJ1dHRvbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoQnV0dG9uLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEJ1dHRvbigpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuQnV0dG9uKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICBidXR0b246ICdidXR0b24nXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYnV0dG9uOiB7XG4gICAgICAgICAgICAgICAgY2xhc3M6IF90aGlzLmF0dHJzLnd3ID9cbiAgICAgICAgICAgICAgICAgICAgdXRpbF8xLmNvbmNhdChuYW1lcy5CVVRUT04sIF90aGlzLmF0dHJzLnd3LnZhcmlhbnQgfHwgbmFtZXMuREVGQVVMVCwgX3RoaXMuYXR0cnMud3cuc3R5bGUsIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSA/XG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lcy5BQ1RJVkUgOiAnJywgX3RoaXMuYXR0cnMud3cuY2xhc3MpIDpcbiAgICAgICAgICAgICAgICAgICAgbmFtZXMuQlVUVE9OLFxuICAgICAgICAgICAgICAgIHR5cGU6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy50eXBlKSA/IF90aGlzLmF0dHJzLnd3LnR5cGUgOiAnYnV0dG9uJyxcbiAgICAgICAgICAgICAgICBuYW1lOiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cubmFtZSkgPyBfdGhpcy5hdHRycy53dy5uYW1lIDogJycsXG4gICAgICAgICAgICAgICAgZGlzYWJsZWQ6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5kaXNhYmxlZCkgPyBfdGhpcy5hdHRycy53dy5kaXNhYmxlZCA6IG51bGwsXG4gICAgICAgICAgICAgICAgb25jbGljazogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3Lm9uQ2xpY2spID8gX3RoaXMuYXR0cnMud3cub25DbGljayA6IGZ1bmN0aW9uICgpIHsgfSxcbiAgICAgICAgICAgICAgICB0ZXh0OiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cudGV4dCkgPyBfdGhpcy5hdHRycy53dy50ZXh0IDogJydcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuIC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AgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQuZ2V0Q2xhc3NcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIEdyb3VwO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5Hcm91cCA9IEdyb3VwO1xuO1xudmFyIEJ1dHRvbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoQnV0dG9uLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEJ1dHRvbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnYnV0dG9uJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ3R5cGUnOiBfX19jb250ZXh0LnZhbHVlcy5idXR0b24udHlwZSxcbiAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5idXR0b24ubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgJ2Rpc2FibGVkJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLmRpc2FibGVkLFxuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5idXR0b24uY2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLm9uY2xpY2tcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAnaWQnOiBcImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLnRleHQpLCBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIEJ1dHRvbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuQnV0dG9uID0gQnV0dG9uO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnV0dG9uLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICh7IF9fcHJvdG9fXzogW10gfSBpbnN0YW5jZW9mIEFycmF5ICYmIGZ1bmN0aW9uIChkLCBiKSB7IGQuX19wcm90b19fID0gYjsgfSkgfHxcbiAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoYi5oYXNPd25Qcm9wZXJ0eShwKSkgZFtwXSA9IGJbcF07IH07XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgIGV4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gICAgICAgICBjbGFzczoge1xuICAgICAgICAgICAgICAgIHJvb3Q6IG5hbWVzLkNIRUNLQk9YLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlucHV0OiB7XG4gICAgICAgICAgICAgICAgbmFtZTogX3RoaXMuYXR0cnMud3cubmFtZSxcbiAgICAgICAgICAgICAgICBjaGVja2VkOiBfdGhpcy5hdHRycy53dy5jaGVja2VkIHx8IGZhbHNlLFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLnZhbHVlcy5pbnB1dC5jaGVja2VkID0gIV90aGlzLnZhbHVlcy5pbnB1dC5jaGVja2VkO1xuICAgICAgICAgICAgICAgICAgICBpZiAoX3RoaXMuYXR0cnMud3cub25DaGFuZ2UpXG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5vbkNoYW5nZShuZXcgQ2hlY2tib3hDaGFuZ2VkRXZlbnRfMS5DaGVja2JveENoYW5nZWRFdmVudChfdGhpcy52YWx1ZXMuaW5wdXQubmFtZSwgX3RoaXMudmFsdWVzLmlucHV0LmNoZWNrZWQpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIENoZWNrYm94O1xufSh3bWxfMS5Db21wb25lbnQpKTtcbmV4cG9ydHMuQ2hlY2tib3ggPSBDaGVja2JveDtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUNoZWNrYm94LmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICh7IF9fcHJvdG9fX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1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnbGFiZWwnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdpbnB1dCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndHlwZSc6IFwiY2hlY2tib3hcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0Lm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NoZWNrZWQnOiAoX19fY29udGV4dC52YWx1ZXMuaW5wdXQuY2hlY2tlZCB8fCBudWxsKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25jaGFuZ2UnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICA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FwiKTtcbjtcbnZhciBzZWxlY3RfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbnRyb2wvc2VsZWN0XCIpO1xuO1xudmFyIHRleHRfZmllbGRfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL2NvbnRyb2wvdGV4dC1maWVsZFwiKTtcbjtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLnJvb3QuY2xhc3NcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwud2lkZ2V0KHNlbGVjdF8xLlNlbGVjdCwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5tb250aC5pZFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5tb250aC5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF9fX2NvbnRleHQudmFsdWVzLm1vbnRoLm9uSW5wdXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGlzYWJsZWQnOiBfX19jb250ZXh0LnZhbHVlcy5tb250aC5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICdyZWFkT25seSc6IF9fX2NvbnRleHQudmFsdWVzLm1vbnRoLnJlYWRPbmx5LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMubW9udGguY2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb3B0aW9ucyc6IF9fX2NvbnRleHQudmFsdWVzLmRhdGUubW9udGhzXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ29wdGlvbicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2VsZWN0ZWQnOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd2YWx1ZSc6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc2FibGVkJzogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC50ZXh0KFwiTW9udGhcIildLCBfX192aWV3KV0sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KHRleHRfZmllbGRfMS5UZXh0RmllbGQsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMuZGF5LmlkXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLmRheS5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF9fX2NvbnRleHQudmFsdWVzLmRheS5vbklucHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJzogX19fY29udGV4dC52YWx1ZXMuZGF5LnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc2FibGVkJzogX19fY29udGV4dC52YWx1ZXMuZGF5LmRpc2FibGVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3JlYWRPbmx5JzogX19fY29udGV4dC52YWx1ZXMuZGF5LnJlYWRPbmx5LFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuZGF5LmNsYXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3BsYWNlaG9sZGVyJzogXCJERFwiXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC53aWRnZXQodGV4dF9maWVsZF8xLlRleHRGaWVsZCwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy55ZWFyLmlkXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLnllYXIuaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0LnZhbHVlcy55ZWFyLm9uSW5wdXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBfX19jb250ZXh0LnZhbHVlcy55ZWFyLnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc2FibGVkJzogX19fY29udGV4dC52YWx1ZXMueWVhci5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICdyZWFkT25seSc6IF9fX2NvbnRleHQudmFsdWVzLnllYXIucmVhZE9ubHksXG4gICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy55ZWFyLmNsYXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3BsYWNlaG9sZGVyJzogXCJZWVlZXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KSwgX19fd21sLmRvbWlmeSh3bWxfMS5tZXNzYWdlKF9fX2NvbnRleHQudmFsdWVzLmhlbHAuaWQsIF9fX2NvbnRleHQudmFsdWVzLmhlbHApKF9fX3ZpZXcpKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRhdGUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIH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4dGVuZFN0YXRpY3MoZCwgYik7XG4gICAgICAgIGZ1bmN0aW9uIF9fKCkgeyB0aGlzLmNvbnN0cnVjdG9yID0gZDsgfVxuICAgICAgICBkLnByb3RvdHlwZSA9IGIgPT09IG51bGwgPyBPYmplY3QuY3JlYXRlKGIpIDogKF9fLnByb3RvdHlwZSA9IGIucHJvdG90eXBlLCBuZXcgX18oKSk7XG4gICAgfTtcbn0pKCk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdidXR0b24nLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5idXR0b24uY2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLm9uQ2xpY2tcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9X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ICdzZWFyY2gnLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdtZXNzYWdlJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHJvb3Q6IHtcbiAgICAgICAgICAgICAgICBpZDogJ3Jvb3QnLFxuICAgICAgICAgICAgICAgIGNsYXNzOiBuYW1lcy5TRUFSQ0hfU1RBQ0tcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBoZWxwOiB7XG4gICAgICAgICAgICAgICAgaWQ6ICdoZWxwJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNlYXJjaDoge1xuICAgICAgICAgICAgICAgIGlkOiAnc2VhcmNoJyxcbiAgICAgICAgICAgICAgICBuYW1lOiBfdGhpcy5hdHRycy53dy5uYW1lLFxuICAgICAgICAgICAgICAgIHZhbHVlOiAnJyxcbiAgICAgICAgICAgICAgICBvblNlYXJjaDogZnVuY3Rpb24gKGV2dCkgeyBpZiAoX3RoaXMuYXR0cnMud3cub25TZWFyY2gpXG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3Lm9uU2VhcmNoKGV2dCk7IH0sXG4gICAgICAgICAgICAgICAgb25TZWxlY3Q6IGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSBfYS52YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLnB1c2godmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzdGFjazoge1xuICAgICAgICAgICAgICAgIGlkOiAnc3RhY2snLFxuICAgICAgICAgICAgICAgIG5hbWU6IF90aGlzLmF0dHJzLnd3Lm5hbWUsXG4gICAgICAgICAgICAgICAgdmFsdWU6IF90aGlzLmF0dHJzLnd3LnZhbHVlLFxuICAgICAgICAgICAgICAgIGRlY29yYXRvcjogX3RoaXMuYXR0cnMud3cuZGVjb3JhdG9yID8gX3RoaXMuYXR0cn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WFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLndpZGdldChzdGFja18xLlN0YWNrLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLnN0YWNrLmlkXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLnN0YWNrLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBfX19jb250ZXh0LnZhbHVlcy5zdGFjay52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdkZWNvcmF0b3InOiBfX19jb250ZXh0LnZhbHVlcy5zdGFjay5kZWNvcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfX19jb250ZXh0LnZhbHVlcy5zdGFjay5vbkNoYW5nZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwud2lkZ2V0KGF1dG9jb21wbGV0ZV8xLkF1dG9jb21wbGV0ZSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5zZWFyY2guaWRcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogX19fY29udGV4dC52YWx1ZXMuc2VhcmNoLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBfX19jb250ZXh0LnZhbHVlcy5zZWFyY2gudmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAnc3RyaW5naWZpZXInOiBfX19jb250ZXh0LnZhbHVlcy5zdGFjay5kZWNvcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25TZWFyY2gnOiBfX19jb250ZXh0LnZhbHVlcy5zZWFyY2gub25TZWFyY2gsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25TZWxlY3QnOiBfX19jb250ZXh0LnZhbHVlcy5zZWFyY2gub25TZWxlY3RcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNlYXJjaC1zdGFjay5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh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ICAgICAgICAgICAgICAgdmFsdWU6IF90aGlzLmF0dHJzLnd3LnZhbHVlIHx8ICcnLFxuICAgICAgICAgICAgICAgIGRpc2FibGVkOiAoX3RoaXMuYXR0cnMud3cuZGlzYWJsZWQgPT09IHRydWUpID8gdHJ1ZSA6IG51bGwsXG4gICAgICAgICAgICAgICAgcmVhZE9ubHk6IChfdGhpcy5hdHRycy53dy5yZWFkT25seSA9PT0gdHJ1ZSkgPyB0cnVlIDogbnVsbCxcbiAgICAgICAgICAgICAgICBvcHRpb25zOiBfdGhpcy5hdHRycy53dy5vcHRpb25zLFxuICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBfdGhpcy5hdHRycy53dy5wbGFjZWhvbGRlciB8fCAnU2VsZWN0IG9uZS4nLFxuICAgICAgICAgICAgICAgIG9wdFZhbHVlOiBmdW5jdGlvbiAobykgeyByZXR1cm4gdHlwZW9mIG8gPT09ICdzdHJpbmcnID8gbyA6IG8udmFsdWU7IH0sXG4gICAgICAgICAgICAgICAgb3B0TGFiZWw6IGZ1bmN0aW9uIChvKSB7IHJldHVybiB0eXBlb2YgbyA9PT0gJ3N0cmluZycgPyBvIDogby5sYWJlbDsgfSxcbiAgICAgICAgICAgICAgICBpc1NlbGVjdGVkOiBmdW5jdGlvbiAocykgeyByZXR1cm4gX3RoaXMudmFsdWVzLnNlbGVjdC52YWx1ZSA9PT0gczsgfSxcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IGUudGFyZ2V0O1xuICAgICAgICAgICAgICAgICAgICBfdGhpc1xuICAgICAgICAgICAgICAgICAgICAgICAgLmRlbGVnYXRlXG4gICAgICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UobmV3IFNlbGVjdENoYW5nZWRFdmVudF8xLlNlbGVjdENoYW5nZWRFdmVudChfdGhpcy5hdHRycy53dy5uYW1lLCB0YXJnZXQudmFsdWUpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaGVscDoge1xuICAgICAgICAgICAgICAgIGlkOiAnbWVzc2FnZScsXG4gICAgICAgICAgICAgICAgc3VjY2VzczogX3RoaXMuYXR0cnMud3cuc3VjY2VzcyxcbiAgICAgICAgICAgICAgICBlcnJvcjogX3RoaXMuYXR0cnMud3cuZXJyb3IsXG4gICAgICAgICAgICAgICAgd2FybmluZzogX3RoaXMuYXR0cnMud3cud2FybmluZ1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBTZWxlY3Q7XG59KGNvbnRyb2xfMS5Gb3JtQ29udHJvbCkpO1xuZXhwb3J0cy5TZWxlY3QgPSBTZWxlY3Q7XG4vLyMgc291cmNlTWFwcGluZ1VSTD1TZWxlY3QuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/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lcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLnJvb3QuY2xhc3NcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KHdtbF8xLmxhYmVsKF9fX2NvbnRleHQudmFsdWVzLmxhYmVsLmlkLCBfX19jb250ZXh0LnZhbHVlcy5sYWJlbC50ZXh0KShfX192aWV3KSksIF9fX3dtbC5ub2RlKCdzZWxlY3QnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0Lm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAnb25jaGFuZ2UnOiBfX19jb250ZXh0LnZhbHVlcy5zZWxlY3Qub25DaGFuZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBfX19jb250ZXh0LnZhbHVlcy5zZWxlY3QudmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGlzYWJsZWQnOiBfX19jb250ZXh0LnZhbHVlcy5zZWxlY3QuZGlzYWJsZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAncmVhZG9ubHknOiBfX19jb250ZXh0LnZhbHVlcy5zZWxlY3QucmVhZE9ubHksXG4gICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5zZWxlY3QuY2xhc3NcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5zZWxlY3QuaWRcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnb3B0aW9uJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd2YWx1ZSc6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc2FiZWxkJzogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LnBsYWNlaG9sZGVyKV0sIF9fX3ZpZXcpLCBfX193bWwubWFwKF9fX2NvbnRleHQudmFsdWVzLnNlbGVjdC5vcHRpb25zLCBmdW5jdGlvbiBfbWFwKG9wdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdvcHRpb24nLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndmFsdWUnOiBfX19jb250ZXh0LnZhbHVlcy5zZWxlY3Qub3B0VmFsdWUob3B0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NlbGVjdGVkJzogX19fY29udGV4dC52YWx1ZXMuc2VsZWN0LmlzU2VsZWN0ZWQoX19fY29udGV4dC52YWx1ZXMuc2VsZWN0Lm9wdFZhbHVlKG9wdCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy5zZWxlY3Qub3B0TGFiZWwob3B0KSldLCBfX192aWV3KTtcbiAgICAgICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gb3RoZXJ3aXNlKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZURvY3VtZW50RnJhZ21lbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgfSldLCBfX192aWV3KSwgX19fd21sLmRvbWlmeSh3bWxfMS5tZXNzYWdlKF9fX2NvbnRleHQudmFsdWVzLmhlbHAuaWQsIF9fX2NvbnRleHQudmFsdWVzLmhlbHApKF9fX3ZpZXcpKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNlbGVjdC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9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MudGVtcGxhdGUgPSBfdGhpcy5hdHRycy53dy50ZW1wbGF0ZSA/XG4gICAgICAgICAgICBfdGhpcy5hdHRycy53dy50ZW1wbGF0ZSA6IHZpZXdzLmNvbnRlbnQ7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIGlkOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogJ3Jvb3QnLFxuICAgICAgICAgICAgICAgIGE6ICdsaW5rJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNsYXNzOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogbmFtZXMuU1RBQ0ssXG4gICAgICAgICAgICAgICAgY2xvc2U6IG5hbWVzLlNUQUNLX0NMT1NFLFxuICAgICAgICAgICAgICAgIG1lbWJlcjogbmFtZXMuU1RBQ0tfTUVNQkVSXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaXRlbToge1xuICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBfdGhpcy50ZW1wbGF0ZSxcbiAgICAgICAgICAgICAgICBjbG9zZTogZnVuY3Rpb24gKGluZGV4KSB7IHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLnZhbHVlcy52YWx1ZS5zcGxpY2UoTnVtYmVyKGluZGV4KSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmZpcmUoKTtcbiAgICAgICAgICAgICAgICB9OyB9LFxuICAgICAgICAgICAgICAgIGRlY29yYXRvcjogX3RoaXMuYXR0cnMud3cuZGVjb3JhdG9yID8gX3RoaXMuYXR0cnMud3cuZGVjb3JhdG9yIDogZnVuY3Rpb24gKG0pIHsgcmV0dXJuIFN0cmluZyhtKTsgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHZhbHVlOiBfdGhpcy5hdHRycy53dy52YWx1ZSA/IF90aGlzLmF0dHJzLnd3LnZhbHVlIDogW11cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJ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JvdG90eXBlLCBuZXcgX18oKSk7XG4gICAgfTtcbn0pKCk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG47XG5leHBvcnRzLmNvbnRlbnQgPSBmdW5jdGlvbiAobSkgeyByZXR1cm4gZnVuY3Rpb24gKF9fX2NvbnRleHQpIHsgcmV0dXJuIGZ1bmN0aW9uIChfX192aWV3KSB7IHJldHVybiBfX193bWwubm9kZSgnc3BhbicsIHtcbiAgICBodG1sOiB7XG4gICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLm1lbWJlclxuICAgIH0sXG4gICAgd21sOiB7fVxufSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuaXRlbS5kZWNvcmF0b3IobSkpXSwgX19fdmlldyk7IH07IH07IH07XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCd1bCcsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwubWFwKF9fX2NvbnRleHQudmFsdWVzLnZhbHVlLCBmdW5jdGlvbiBfbWFwKG0sIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnbGknLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuaXRlbS50ZW1wbGF0ZShtLCBpbmRleCwgX19fY29udGV4dC52YWx1ZXMudmFsdWUpKF9fX2NvbnRleHQpKF9fX3ZpZXcpKSwgX19fd21sLm5vZGUoJ2J1dHRvbicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLmNsb3NlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25jbGljayc6IF9fX2NvbnRleHQudmFsdWVzLml0ZW0uY2xvc2UoaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLnRleHQoXCJcXHUwMEQ3XCIpXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBvdGhlcndpc2UoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVEb2N1bWVudEZyYWdtZW50KCk7XG4gICAgICAgICAgICAgICAgfSldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1ha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1xuLyoqXG4gKiBTd2l0Y2ggYWxsb3dzIHRoZSB1c2VyIHRvIHNlbGVjdCBiZXR3ZWVuIG9uZSBvciB0d28gdmFsdWVzLlxuICovXG52YXIgU3dpdGNoID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhTd2l0Y2gsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gU3dpdGNoKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyBzd2l0Y2hfMS5NYWluKF90aGlzKTtcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICBsYWJlbDogbmFtZXMuU1dJVENILFxuICAgICAgICAgICAgICAgIHNsaWRlcjogbmFtZXMuU1dJVENIX1NMSURFUlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlucHV0OiB7XG4gICAgICAgICAgICAgICAgbmFtZTogX3RoaXMuYXR0cnMud3cubmFtZSxcbiAgICAgICAgICAgICAgICBvbjogX3RoaXMuYXR0cnMud3cub24gfHwgZmFsc2UsXG4gICAgICAgICAgICAgICAgZGlzYWJsZWQ6IF90aGlzLmF0dHJzLnd3LmRpc2FibGVkID8gdHJ1ZSA6IG51bGwsXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMudmFsdWVzLmlucHV0Lm9uID0gIV90aGlzLnZhbHVlcy5pbnB1dC5vbjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKF90aGlzLmF0dHJzLnd3Lm9uQ2hhbmdlKVxuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cub25DaGFuZ2Uobm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IChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/IE9iamVjdC5jcmVhdGUoYikgOiAoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUsIG5ldyBfXygpKTtcbiAgICB9O1xufSkoKTtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2xhYmVsJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3MubGFiZWxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnaW5wdXQnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NoZWNrZWQnOiAoX19fY29udGV4dC52YWx1ZXMuaW5wdXQub24gfHwgbnVsbCksXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGlzYWJsZWQnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbmNoYW5nZSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0Lm9uQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbXSwgX19fdmlldyksIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnNsaWRlclxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3dpdGNoLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIH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biAoZSkge1xuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgX3RoaXNcbiAgICAgICAgICAgICAgICAudmlld1xuICAgICAgICAgICAgICAgIC5maW5kQnlJZChfdGhpcy52YWx1ZXMuaWQucm9vdClcbiAgICAgICAgICAgICAgICAuY2hhaW4oZnVuY3Rpb24gKHJvb3QpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFyZW50ID0gcm9vdC5wYXJlbnROb2RlO1xuICAgICAgICAgICAgICAgIHZhciB1cyA9IHBhcmVudC5jaGlsZHJlbjtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHVzLmxlbmd0aDsgaSsrKVxuICAgICAgICAgICAgICAgICAgICB1c1tpXS5jbGFzc0xpc3QucmVtb3ZlKG5hbWVzLkFDVElWRSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzXG4gICAgICAgICAgICAgICAgICAgIC52aWV3XG4gICAgICAgICAgICAgICAgICAgIC5maW5kQnlJZChfdGhpcy52YWx1ZXMuaWQucm9vdClcbiAgICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZWwpIHsgcmV0dXJuIGVsLmNsYXNzTGlzdC5hZGQobmFtZXMuQUNUSVZFKTsgfSlcbiAgICAgICAgICAgICAgICAgICAgLm9ySnVzdChmdW5jdGlvbiAoKSB7IHJldHVybiBfdW5rbm93bihfdGhpcy52YWx1ZXMuaWQucm9vdCk7IH0pXG4gICAgICAgICAgICAgICAgICAgIC5jaGFpbihmdW5jdGlvbiAoKSB7IHJldHVybiBhZnBsLk1heWJlLmZyb21BbnkoX3RoaXMuYXR0cnMud3cub25DbGljayk7IH0pXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGYpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGYobmV3IFRhYkNsaWNrZWRFdmVudF8xLlRhYkNsaWNrZWRFdmVudChfdGhpcy5hdH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ub2RlKCdsaScsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLmxpXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMuaWQucm9vdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBcIiNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJzogX19fY29udGV4dC5jbGlja2VkXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMuaWQuYVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC5pZnRoZW4oX19fY29udGV4dC52YWx1ZXMudGFiLnRleHQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy50YWIudGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gVGFiO1xufShfX193bWwuQXBwVmlldykpO1xu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aWVsZCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoVGV4dEZpZWxkLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIFRleHRGaWVsZCgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnZpZXcgPSBuZXcgdmlld3MuTWFpbihfdGhpcyk7XG4gICAgICAgIF90aGlzLnZhbHVlcyA9IHtcbiAgICAgICAgICAgIHJvb3Q6IHtcbiAgICAgICAgICAgICAgICBpZDogJ3Jvb3QnLFxuICAgICAgICAgICAgICAgIGNsYXNzOiB1dGlsXzEuY29uY2F0KCdmb3JtLWdyb3VwJywgX3RoaXMuYXR0cnMud3cuY2xhc3MsIF90aGlzLnN0YXRlKCkpLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGhlbHA6IHtcbiAgICAgICAgICAgICAgICBpZDogJ21lc3NhZ2UnLFxuICAgICAgICAgICAgICAgIHN1Y2Nlc3M6IF90aGlzLmF0dHJzLnd3LnN1Y2Nlc3MsXG4gICAgICAgICAgICAgICAgZXJyb3I6IF90aGlzLmF0dHJzLnd3LmVycm9yLFxuICAgICAgICAgICAgICAgIHdhcm5pbmc6IF90aGlzLmF0dHJzLnd3Lndhcm5pbmdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBsYWJlbDoge1xuICAgICAgICAgICAgICAgIGlkOiBfdGhpcy5hdHRycy53dy5uYW1lLFxuICAgICAgICAgICAgICAgIHRleHQ6IF90aGlzLmF0dHJzLnd3LmxhYmVsIHx8ICcnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaW5wdXQ6IHtcbiAgICAgICAgICAgICAgICBpZDogJ2lucHV0JyxcbiAgICAgICAgICAgICAgICBjbGFzczogJ2Zvcm0tY29udHJvbCc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CIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG47XG52YXIgd21sXzEgPSByZXF1aXJlKFwiQHBhY2thZ2Uvc2VsZi9jb250cm9sL3dtbFwiKTtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLnJvb3QuY2xhc3NcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KHdtbF8xLmxhYmVsKF9fX2NvbnRleHQudmFsdWVzLmxhYmVsLmlkLCBfX19jb250ZXh0LnZhbHVlcy5sYWJlbC50ZXh0KShfX192aWV3KSksIF9fX3dtbC5pZnRoZW4oKF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnJvd3MgPT09IDEpLCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2lucHV0Jywge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndHlwZSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnR5cGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3BsYWNlaG9sZGVyJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQucGxhY2Vob2xkZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uaW5wdXQnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5vbklucHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd2YWx1ZSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LmRpc2FibGVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdyZWFkb25seSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnJlYWRPbmx5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LmNsYXNzXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogXCJpbnB1dFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KTtcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBlbHNlX2NsYXVzZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCd0ZXh0YXJlYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0Lm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3BsYWNlaG9sZGVyJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQucGxhY2Vob2xkZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uaW5wdXQnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5vbklucHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkaXNhYmxlZCc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LmRpc2FibGVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdyZWFkb25seSc6IF9fX2NvbnRleHQudmFsdWVzLmlucHV0LnJlYWRPbmx5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdyb3dzJzogX19fY29udGV4dC52YWx1ZXMuaW5wdXQucm93cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5pbnB1dC5jbGFzc1xuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpZCc6IFwiaW5wdXRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy5pbnB1dC52YWx1ZSldLCBfX192aWV3KTtcbiAgICAgICAgICAgICAgICB9KSwgX19fd21sLmRvbWlmeSh3bWxfMS5tZXNzYWdlKF9fX2NvbnRleHQudmFsdWVzLmhlbHAuaWQsIF9fX2NvbnRleHQudmFsdWVzLmhlbHApKF9fX3ZpZXcpKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRleHQtZmllbGQuanMubWFwIiwiXCJ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cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICAgICAnaWQnOiBpZFxuICAgICAgICAgICAgfVxuICAgICAgICB9LCBbX19fd21sLmRvbWlmeShtLmVycm9yKV0sIF9fX3ZpZXcpO1xuICAgIH0sIGZ1bmN0aW9uIGVsc2VpZigpIHtcbiAgICAgICAgcmV0dXJuIF9fX3dtbC5pZnRoZW4obS53YXJuaW5nLCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdzcGFuJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogXCJoZWxwLXRleHRcIlxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICdpZCc6IGlkXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkobS53YXJuaW5nKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9LCBmdW5jdGlvbiBlbHNlX2NsYXVzZSgpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KFwiXCIpO1xuICAgICAgICB9KTtcbiAgICB9KTtcbn0pOyB9OyB9O1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlv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bnRlbnQuIEFkanVzdCB0aGUgcmVzcGVjdGl2ZSBzdHlsZSB2YXJpYWJsZXMgdG8gY2hhbmdlLlxuICovXG52YXIgQXNpZGUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEFzaWRlLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEFzaWRlKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgLyoqXG4gICAgICAgICAqIHZhbHVlcyBpcyBhIGhhc2ggb2YgdmFsdWVzIHVzZWQgaW4gdGhlIHRlbXBsYXRlXG4gICAgICAgICAqL1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBpZDoge1xuICAgICAgICAgICAgICAgIHJvb3Q6ICdhc2lkZScsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICByb290OiBuYW1lcy5BU0lERSxcbiAgICAgICAgICAgICAgICBjb250ZW50OiBuYW1lcy5BU0lERV9DT05URU5UXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICBjb250ZW50OiAnd3c6Y29udGVudCdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjb250ZW50OiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cuY29udGVudCkgPyBfdGhpcy5hdHRycy53dy5jb250ZW50IDogbnVsbFxuICAgICAgICB9O1xuICAgICAgICBfdGhpcy52aWV3ID0gbmV3IGFzaWRlXzEuTWFpbihfdGhpcyk7XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgQXNpZGUucHJvdG90eXBlLl9nZXREcmF3ZXJET00gPSBmdW5jdGlvbiAoZikge1xuICAg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X3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkLnJvb3RcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCBbX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3MuY29udGVudFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICAgICAgfSwgW19fX3dtbC5pZnRoZW4oX19fY29udGV4dC52YWx1ZXMuY29udGVudCwgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLmNvbnRlbnQucmVuZGVyKCkpO1xuICAgICAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiB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jb250ZW50JyxcbiAgICAgICAgICAgICAgICBkcmF3ZXI6ICdkcmF3ZXInXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICByb290OiBuYW1lcy5EUkFXRVIsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICBEUkFXRVI6ICd3dzpkcmF3ZXInLFxuICAgICAgICAgICAgICAgIENPTlRFTlQ6ICd3dzpjb250ZW50J1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGFzaWRlOiB7XG4gICAgICAgICAgICAgICAgY29udGVudDogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmRyYXdlcikgPyBfdGhpcy5hdHRycy53dy5kcmF3ZXIgOiBudWxsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY29udGVudDogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmNvbnRlbnQpID8gX3RoaXMuYXR0cnMud3cuY29udGVudCA6IG51bGxcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICBEcmF3ZXIucHJvdG90eXBlLl9nZXRBc2lkZSA9IGZ1bmN0aW9uIChmKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnZpZXcuZmluZEJ5SWQodGhpcy52YWx1ZXMuaWQuZHJhd2VyKS5jYXRhKGZ1bmN0aW9uICgpIHsgcmV0dXJuIG51bGw7IH0sIGYpO1xuICAgIH07XG4gICAgRHJhd2VyLnByb3RvdHlwZS5fY29tYmluZSA9IGZ1bmN0aW9uIChjbGFzc2VzKSB7XG4gICAgICAgIHJldHVybiBjbGFzc2VzLmpvaW4oJyAnKTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIGRyYXdlclZpc2libGUgcXVlcmllcyB3aGV0aGVyIHRoZSBBc2lkZSBpcyB2aXNpYmxlIG9yIG5vdC5cbi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AgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZC5yb290XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQoQXNpZGVfMS5Bc2lkZSwge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnaWQnOiBfX19jb250ZXh0LnZhbHVlcy5pZC5kcmF3ZXJcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3c6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdjb250ZW50JzogX19fY29udGV4dC52YWx1ZXMuYXNpZGUuY29udGVudFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgW10sIF9fX3ZpZXcpLCBfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQuY29udGVudCwgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC5jb250ZW50KTtcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBlbHNlaWYoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLmNvbnRlbnQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy5jb250ZW50LnJlbmRlcigpKTtcbiAgICAgICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gZWxzZV9jbGF1c2UoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1kcmF3ZXIuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTsgfTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9XG4gICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/IE9iamVjdC5jcmVh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AgZnVuY3Rpb24gUm93KCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5Sb3coX3RoaXMpO1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBjbGFzczoge1xuICAgICAgICAgICAgICAgIHJvb3Q6IHV0aWxfMS5jb25jYXQobmFtZXMuR1JJRF9ST1csIChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5jbGFzcykgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5jbGFzcyA6ICcnKVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBSb3c7XG59KHdtbF8xLkNvbXBvbmVudCkpO1xuZXhwb3J0cy5Sb3cgPSBSb3c7XG52YXIgQ29sdW1uID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhDb2x1bW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gQ29sdW1uKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudmlldyA9IG5ldyB2aWV3cy5Db2x1bW4oX3RoaXMpO1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBjbGFzczoge1xuICAgICAgICAgICAgICAgIHJvb3Q6IF90aGlzLmF0dHJzLnd3ID8gdXRpbF8xLmNvbmNhdChfdGhpcy5hdHRycy53dy5zaXplID9cbiAgICAgICAgICAgICAgICAgICAgXCJjb2wtbWQtXCIgKyBfdGhpc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1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBHcmlkID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhHcmlkLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEdyaWQoY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ3NlY3Rpb24nLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBHcmlkO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5HcmlkID0gR3JpZDtcbjtcbnZhciBSb3cgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKFJvdywgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBSb3coY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIFJvdztcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuUm93ID0gUm93O1xuO1xudmFyIENvbHVtbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoQ29sdW1uLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIENvbHVtbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbildLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gQ29sdW1uO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5Db2x1bW4gPSB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iBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIFBhbmVsO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5QYW5lbCA9IFBhbmVsO1xuO1xudmFyIEhlYWRlciA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoSGVhZGVyLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIEhlYWRlcihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnZGl2Jywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbildLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gSGVhZGVyO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5IZWFkZXIgPSBIZWFkZXI7XG47XG52YXIgQm9keSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoQm9keSwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBCb2R5KGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBCb2R5O1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5Cb2R5ID0gQm9keTtcbjtcbnZhciBGb290ZXIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKEZvb3RlciwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBGb290ZXIoY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2RpdicsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpc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5hbWVzLkhJRERFTiA6ICcnKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNvbnRlbnQ6IF90aGlzLmNoaWxkcmVuLFxuICAgICAgICAgICAgY2xpY2s6IHtcbiAgICAgICAgICAgICAgICBoaWRlT25DbGljazogKF90aGlzLmF0dHJzLnd3ICYmIChfdGhpcy5hdHRycy53dy5oaWRlT25DbGljayAhPSBudWxsKSkgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5oaWRlT25DbGljayA6IHRydWUsXG4gICAgICAgICAgICAgICAgaGlkZU9uRXh0ZXJuYWxDbGljazogKF90aGlzLmF0dHJzLnd3ICYmIChfdGhpcy5hdHRycy53dy5oaWRlT25FeHRlcm5hbENsaWNrICE9IG51bGwpKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmhpZGVPbkV4dGVybmFsQ2xpY2sgOiB0cnVlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgLyoqXG4gICAgICogaXNIaWRkZW5cbiAgICAgKi9cbiAgICBNZW51LnByb3RvdHlwZS5pc0hpZGRlbiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5yb290KVxuICAgICAgICAgICAgLmNhdGEoZnVuY3Rpb24gKCkgeyByZXR1cm4gZmFsc2U7IH0sIGZ1bmN0aW9uIChlKSB7IHJldHVybiBlLmNsYXNzTGlzdC5jb250YWlucyhuYW1lcy5ISURERU4pOyB9KTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIGhpZGUgdGhlIG1lbnUuXG4gICAgICovXG4gICAgTWVudS5wcm90b3R5cGUuaGlkZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy52aWV3LmZpbmRCeUlkKHRoaXMudmFsdWVzLmlkLnJvb3QpXG4gICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICByZXR1cm4gZS5jbGFzc0xpc3QuYWRkKG5hbWVzLkhJRERFTik7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHNob3cgdGhpcyBtZW51LlxuICAgICAqL1xuICAgIE1lbnUucHJvdG90eXBlLnNob3cgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5yb290KVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgcmV0dXJuIGUuY2xhc3NMaXN0LnJlbW92ZShuYW1lcy5ISURERU4pO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiB0b2dnbGUgdGhpcyBtZW51J3MgdmlzaWJpbGl0eVxuICAgICAqL1xuICAgIE1lbnUucHJvdG90eXBlLnRvZ2dsZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy52aWV3LmZpbmRCeUlkKHRoaXMudmFsdWVzLmlkLnJvb3QpXG4gICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICByZXR1cm4gZS5jbGFzc0xpc3QudG9nZ2xlKG5hbWVzLkhJRERFTik7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHNldENvbnRlbnQgb2YgdGhpcyBtZW51LlxuICAgICAqL1xuICAgIE1lbnUucHJvdG90eXBlLnNldENvbnRlbnQgPSBmdW5jdGlvbiAodmlldykge1xuICAgICAgICB0aGlzLnZhbHVlcy5jb250ZW50ID0gW3ZpZXcucmVuZGVyKCldO1xuICAgICAgICB0aGlzLnZpZXcuaW52YWxpZGF0ZSgpO1xuICAgICAgICByZXR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AhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy52aWV3ID0gbmV3IHZpZXdzLk1haW4oX3RoaXMpO1xuICAgICAgICBfdGhpcy52YWx1ZXMgPSB7XG4gICAgICAgICAgICBpZDoge1xuICAgICAgICAgICAgICAgIHJvb3Q6ICdyb290J1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNsYXNzOiB7XG4gICAgICAgICAgICAgICAgcm9vdDogdXRpbF8xLmNvbmNhdChuYW1lcy5NRU5VX0lURU0sIChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5kaXNhYmxlZCkgP1xuICAgICAgICAgICAgICAgICAgICBuYW1lcy5ESVNBQkxFRCA6IG51bGwpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGV4dDogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LnRleHQpID9cbiAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy50ZXh0IDogbnVsbCxcbiAgICAgICAgICAgIGNsaWNrZWQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5vbkNsaWNrKSA/XG4gICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cub25DbGljayhuZXcgTWVudUl0ZW1DbGlja2VkRXZlbnRfMS5NZW51SXRlbUNsaWNrZWRFdmVudChfdGhpcy5hdHRycy53dy5uYW1lKSkgOiBmdW5jdGlvbiAoKSB7IH07IH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWVudUl0ZW07XG59KHdtbC5Db21wb25lbnQpKTtcbmV4cG9ydHMuTWVudUl0ZW0gPSBNZW51SXRlbTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPU1lbnVJdGVtLmpzLm1hcCIsIl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4gICAgICAgICAgICBpZDoge1xuICAgICAgICAgICAgICAgIHJvb3Q6ICdyb290JyxcbiAgICAgICAgICAgICAgICB0YXJnZXQ6ICdtZW51J1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHJvb3Q6IHtcbiAgICAgICAgICAgICAgICBjbGFzczogdXRpbF8xLmNvbmNhdChuYW1lcy5CVVRUT05fTUVOVSwgKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmNsYXNzKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmNsYXNzIDogJycpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYnV0dG9uOiB7XG4gICAgICAgICAgICAgICAgdGV4dDogX3RoaXMuYXR0cnMud3cudGV4dCA/IF90aGlzLmF0dHJzLnd3LnRleHQgOiAnJyxcbiAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogX3RoaXMuX2J1dHRvblRlbXBsYXRlLFxuICAgICAgICAgICAgICAgIGNsYXNzOiBuYW1lcy5CVVRUT05fTUVOVV9CVVRUT04sXG4gICAgICAgICAgICAgICAgb25DbGljazogZnVuY3Rpb24gKCkgeyBfdGhpcy52aWV3LmZpbmRCeUlkKF90aGlzLnZhbHVlcy5tZW51LmlkKS5tYXAoZnVuY3Rpb24gKG0pIHsgcmV0dXJuIG0udG9nZ2xlKCk7IH0pOyB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbWVudToge1xuICAgICAgICAgICAgICAgIGlkOiAnbWVudScsXG4gICAgICAgICAgICAgICAgY29udGVudDogX3RoaXMuYXR0cnMud3cuY29udGVudCA/IF90aGlzLmF0dHJzLnd3LmNvbnRlbnQgOiBfdGhpcy5jaGlsZHJlblxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIC8qKlxuICAgICAqIGhpZGUgdGhlIG1lbnUuXG4gICAgICovXG4gICAgQnV0dG9uTWVudS5wcm90b3R5cGUuaGlkZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy52aWV3LmZpbmRCeUlkKHRoaXMudmFsdWVzLm1lbnUuaWQpXG4gICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChtKSB7IHJldHVybiBtLmhpZGUoKTsgfSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogc2hvdyB0aGUgbWVudS5cbiAgICAgKi9cbiAgICBCdXR0b25NZW51LnByb3RvdHlwZS5zaG93ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLnZpZXcuZmluZEJ5SWQodGhpcy52YWx1ZXMubWVudS5pZClcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKG0pIHsgcmV0dXJuIG0uc2hvdygpOyB9KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiB0b2dnbGUgdGhlIG1lbnUuXG4gICAgICovXG4gICAgQnV0dG9uTWVudS5wcm90b3R5cGUudG9nZ2xlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLnZpZXcuZmluZEJ5SWQodGhpcy52YWx1ZXMubWVudS5pZClcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKG0pIHsgcmV0dXJuIG0udG9nZ2xlKCk7IH0pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHNldENvbnRlbnQgb2YgdGhpcyBtZW51LlxuICAgICAqL1xuICAgIEJ1dHRvbk1lbnUucHJvdG90eXBlLnNldENvbnRlbnQgPSBmdW5jdGlvbiAodmlldykge1xuICAgICAgICB0aGlzLnZhbHVlcy5tZW51LmNvbnRlbnQgPSBbdmlldy5yZW5kZXIoKV07XG4gICAgICAgIHRoaXMudmlldy5pbnZhbGlkYXRlKCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgcmV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eXBlLCBuZXcgX18oKSk7XG4gICAgfTtcbn0pKCk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG52YXIgTWVudV8xID0gcmVxdWlyZShcIkBwYWNrYWdlL3NlbGYvbWVudS9NZW51XCIpO1xuO1xuZXhwb3J0cy5idXR0b24gPSBmdW5jdGlvbiAoKSB7IHJldHVybiBmdW5jdGlvbiAoX19fY29udGV4dCkgeyByZXR1cm4gZnVuY3Rpb24gKF9fX3ZpZXcpIHsgcmV0dXJuIF9fX3dtbC5ub2RlKCdidXR0b24nLCB7XG4gICAgaHRtbDoge1xuICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5idXR0b24uY2xhc3MsXG4gICAgICAgICd0eXBlJzogXCJidXR0b25cIixcbiAgICAgICAgJ29uY2xpY2snOiBfX19jb250ZXh0LnZhbHVlcy5idXR0b24ub25DbGlja1xuICAgIH0sXG4gICAgd21sOiB7fVxufSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuYnV0dG9uLnRleHQpXSwgX19fdmlldyk7IH07IH07IH07XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5yb290LmNsYXNzXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy5idXR0b24udGVtcGxhdGUoKShfX19jb250ZXh0KShfX192aWV3KSksIF9fX3dtbC53aWRnZXQoTWVudV8xLk1lbnUsIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJzogX19fY29udGV4dC52YWx1ZXMubWVudS5pZFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2hpZGRlbic6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLm1lbnUuY29udGVudCldLCBfX192aWV3KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1dHRvbi1tZW51LmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIERpdmlkZXJfMSA9IHJlcXVpcmUoXCIuL0RpdmlkZXJcIik7XG5leHBvcnRzLkRpdmlkZXIgPSBEaXZpZGVyXzEuRGl2aWRlcjtcbnZhciBIZWFkZXJfMSA9IHJlcXVpcmUoXCIuL0hlYWRl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GwgPyBPYmplY3QuY3JlYXRlKGIpIDogKF9fLnByb3RvdHlwZSA9IGIucHJvdG90eXBlLCBuZXcgX18oKSk7XG4gICAgfTtcbn0pKCk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgX19fd21sID0gcmVxdWlyZShcIkBxdWVuay93bWxcIik7XG52YXIgTWFpbiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoTWFpbiwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBNYWluKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdsaScsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtdLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1kaXZpZGVyLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xudmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgIHZhciBleHRlbmRTdGF0aWNz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jbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLnRleHQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2NvbnRleHQudmFsdWVzLnRleHQpO1xuICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKTtcbiAgICAgICAgICAgICAgICB9KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWhlYWRlci5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgnbGknLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290LFxuICAgICAgICAgICAgICAgICAgICAnb25jbGljayc6IF9fX2NvbnRleHQudmFsdWVzLmNsaWNrZWRcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLnRleHQsIGZ1bmN0aW9uIHRoZW4oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfX193bWwuZG9taWZ5KF9fX2Nv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ZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgndWwnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LnZhbHVlcy5jb250ZW50KV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBNYWluO1xufShfX193bWwuQXBwVmlldykpO1xuZXhwb3J0cy5NYWluID0gTWFpbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPW1lbnUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGlu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y50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ29sJywge1xuICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbildLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gQnJlYWRDcnVtYnM7XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLkJyZWFkQ3J1bWJzID0gQnJlYWRDcnVtYnM7XG47XG52YXIgSXRlbSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoSXRlbSwgX3N1cGVyKTtcbiAgICBmdW5jdGlvbiBJdGVtKGNvbnRleHQpIHtcbiAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgY29udGV4dCkgfHwgdGhpcztcbiAgICAgICAgX3RoaXMudGVtcGxhdGUgPSBmdW5jdGlvbiAoX19fY29udGV4dCwgX19fdmlldykge1xuICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5ub2RlKCdsaScsIHtcbiAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyk7X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pcy5ocmVmID0gKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmhyZWYpID9cbiAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmhyZWYgOiAnJztcbiAgICAgICAgX3RoaXMudmFsdWVzID0ge1xuICAgICAgICAgICAgaWQ6IHtcbiAgICAgICAgICAgICAgICByb290OiAncm9vdCdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjbGFzczoge1xuICAgICAgICAgICAgICAgIHJvb3Q6IHV0aWxfMS5jb25jYXQobmFtZXMuTkFWX0xJTkssIF90aGlzLmF0dHJzLnd3ID8gX3RoaXMuYXR0cnMud3cuY2xhc3MgOiAnJywgKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSkgP1xuICAgICAgICAgICAgICAgICAgICBuYW1lcy5BQ1RJVkUgOiAnJylcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhOiB7XG4gICAgICAgICAgICAgICAgdGl0bGU6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy50aXRsZSkgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy50aXRsZSA6IG51bGwsXG4gICAgICAgICAgICAgICAgbmFtZTogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3Lm5hbWUpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cubmFtZSA6IG51bGwsXG4gICAgICAgICAgICAgICAgaHJlZjogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LmhyZWYpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuaHJlZiA6ICcjJyxcbiAgICAgICAgICAgICAgICBhY3RpdmU6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5hY3RpdmUpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cuYWN0aXZlIDogZmFsc2UsXG4gICAgICAgICAgICAgICAgdGV4dDogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LnRleHQpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cudGV4dCA6ICcnXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIF90aGlzLmNsaWNrZWQgPSBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgaWYgKF90aGlzLmF0dHJzLnd3KSB7XG4gICAgICAgICAgICAgICAgdmFyIF9hID0gX3RoaXMuYXR0cnMud3csIG5hbWVfMSA9IF9hLm5hbWUsIGhyZWYgPSBfYS5ocmVmLCBvbkNsaWNrID0gX2Eub25DbGljaztcbiAgICAgICAgICAgICAgICBpZiAoIWhyZWYpXG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBpZiAob25DbGljaylcbiAgICAgICAgICAgICAgICAgICAgb25DbGljayhuZXcgTGlua0NsaWNrZWRFdmVudF8xLkxpbmtDbGlja2VkRXZlbnQobmFtZV8xLCBocmVmKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgLyoqXG4gICAgICAqIGFjdGl2YXRlIHRoaXMgbmF2IGxpc3QgSXRlbS5cbiAgICAgICovXG4gICAgTGluay5wcm90b3R5cGUuYWN0aXZhdGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMudmlldy5maW5kQnlJZCh0aGlzLnZhbHVlcy5pZC5yb290KVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAodykge1xuICAgICAgICAgICAgdy5jbGFzc0xpc3QucmVtb3ZlKG5hbWVzLkFDVElWRSk7XG4gICAgICAgICAgICB3LmNsYXNzTGlzdC5hZGQobmFtZXMuQUNUSVZFKTtcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICAv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9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbnZhciBfX193bWwgPSByZXF1aXJlKFwiQHF1ZW5rL3dtbFwiKTtcbnZhciBNYWluID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgIF9fZXh0ZW5kcyhNYWluLCBfc3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLm5vZGUoJ2EnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290LFxuICAgICAgICAgICAgICAgICAgICAnaHJlZic6IF9fX2NvbnRleHQudmFsdWVzLmEuaHJlZixcbiAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogX19fY29udGV4dC52YWx1ZXMuYS50aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgJ29uY2xpY2snOiBfX19jb250ZXh0LmNsaWNrZWRcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLmEudGV4dCwgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMuYS50ZXh0KTtcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBlbHNlX2NsYXVzZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZn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5hbWVzLkFDVElWRSA6ICcnKSxcbiAgICAgICAgICAgICAgICB0aXRsZTogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3LnRpdGxlKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LnRpdGxlIDogJycsXG4gICAgICAgICAgICAgICAgbmFtZTogKF90aGlzLmF0dHJzLnd3ICYmIF90aGlzLmF0dHJzLnd3Lm5hbWUpID9cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYXR0cnMud3cubmFtZSA6ICcnLFxuICAgICAgICAgICAgICAgIGhyZWY6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy5ocmVmKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmhyZWYgOiAnIycsXG4gICAgICAgICAgICAgICAgYWN0aXZlOiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cuYWN0aXZlKSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LmFjdGl2ZSA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHRleHQ6IChfdGhpcy5hdHRycy53dyAmJiBfdGhpcy5hdHRycy53dy50ZXh0KSA/XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmF0dHJzLnd3LnRleHQgOiAnJyxcbiAgICAgICAgICAgICAgICBvbkNsaWNrOiAoX3RoaXMuYXR0cnMud3cgJiYgX3RoaXMuYXR0cnMud3cub25DbGljaykgP1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hdHRycy53dy5vbkNsaWNrIDogbnVsbFxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIHJldHVybiBMaW5rO1xufShsaW5rLkxpbmspKTtcbmV4cG9ydHMuTGluayA9IExpbms7XG4vLyMgc291cmNlTWFwcGluZ1VSTD1MaW5rLmpzLm1hcCIsIl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W3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIEl0ZW1fMSA9IHJlcXVpcmUoXCIuLi9JdGVtXCIpO1xuO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEl0ZW1fMS5JdGVtLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5pdGVtLmNsYXNzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgW19fX3dtbC5ub2RlKCdzcGFuJywge1xuICAgICAgICAgICAgICAgICAgICBodG1sOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5zcGFuLmNsYXNzXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLmlmdGhlbihfX19jb250ZXh0LnZhbHVlcy50ZXh0LCBmdW5jdGlvbiB0aGVuKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC52YWx1ZXMudGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIGVsc2VfY2xhdXNlKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5kb21pZnkoX19fY29udGV4dC5jaGlsZHJlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1oZWFkZXIuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgX19leHRlbmRzID0gKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8IChmdW5jdGlvbiAoKSB7XG4gICAgdmFyIGV4dGVuZFN0YXRpY3MgPSBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fFxuICAgICAgICBmdW5jdGlvbiAoZCwgYikgeyBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093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G59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIGxpbmtfMSA9IHJlcXVpcmUoXCJAcGFja2FnZS9zZWxmL25hdi9saW5rXCIpO1xuO1xuO1xudmFyIEl0ZW1fMSA9IHJlcXVpcmUoXCIuLi9JdGVtXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwud2lkZ2V0KEl0ZW1fMS5JdGVtLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fSxcbiAgICAgICAgICAgICAgICB3dzoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5pdGVtLmNsYXNzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgW19fX3dtbC53aWRnZXQobGlua18xLkxpbmssIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHdtbDoge30sXG4gICAgICAgICAgICAgICAgICAgIHd3OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5hLmNsYXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnOiBfX19jb250ZXh0LnZhbHVlcy5hLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfX19jb250ZXh0LnZhbHVlcy5hLnRpdGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2hyZWYnOiBfX19jb250ZXh0LnZhbHVlcy5hLmhyZWYsXG4gICAgICAgICAgICAgICAgICAgICAgICAndGV4dCc6IF9fX2NvbnRleHQudmFsdWVzLmEudGV4dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICdhY3RpdmUnOiBfX19jb250ZXh0LnZhbHVlcy5hLmFjdGl2ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbkNsaWNrJzogX19fY29udGV4dC52YWx1ZXMuYS5vbkNsaWNrXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpXSwgX19fdmlldyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgcmV0dXJuIE1haW47XG59KF9fX3dtbC5BcHBWaWV3KSk7XG5leHBvcnRzLk1haW4gPSBNYWluO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bGluay5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbnZhciBfX2V4dGVuZHMgPSAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHwgKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAoeyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheSAmJiBmdW5jdGlvbiAoZCwgYikgeyBkLl9fcHJvdG9fXyA9IGI7IH0pIHx8XG4gICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7IGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdOyB9O1xuICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICBmdW5jdGlvbiBfXygpIHsgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7IH1cbiAgICAgICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xuICAgIH07XG59KSgpO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIF9fX3dtbCA9IHJlcXVpcmUoXCJAcXVlbmsvd21sXCIpO1xudmFyIE1haW4gPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlbmRzKE1haW4sIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gTWFpbihjb250ZXh0KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGNvbnRleHQpIHx8IHRoaXM7XG4gICAgICAgIF90aGlzLnRlbXBsYXRlID0gZnVuY3Rpb24gKF9fX2NvbnRleHQsIF9fX3ZpZXcpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwubm9kZSgndWwnLCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge1xuICAgICAgICAgICAgICAgICAgICAnY2xhc3MnOiBfX19jb250ZXh0LnZhbHVlcy5jbGFzcy5yb290XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3bWw6IHt9XG4gICAgICAgICAgICB9LCBbX19fd21sLmRvbWlmeShfX19jb250ZXh0LmNoaWxkcmVuKV0sIF9fX3ZpZXcpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIH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c3VwZXIpO1xuICAgIGZ1bmN0aW9uIE1haW4oY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChJdGVtXzEuSXRlbSwge1xuICAgICAgICAgICAgICAgIGh0bWw6IHt9LFxuICAgICAgICAgICAgICAgIHdtbDoge31cbiAgICAgICAgICAgIH0sIFtfX193bWwubm9kZSgndWwnLCB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzcyc6IF9fX2NvbnRleHQudmFsdWVzLmNsYXNzLnJvb3RcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgICAgIH0sIFtfX193bWwuZG9taWZ5KF9fX2NvbnRleHQuY2hpbGRyZW4pXSwgX19fdmlldyldLCBfX192aWV3KTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICByZXR1cm4gTWFpbjtcbn0oX19fd21sLkFwcFZpZXcpKTtcbmV4cG9ydHMuTWFpbiA9IE1haW47XG4vLyMgc291cmNlTWFwcGluZ1VSTD1zdWItbWVudS5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbi8qKlxuICogQ2VsbENsaWNrZWRFdmVudCBpcyB0cmlnZ2VyZWQgd2hlbiB0aGUgd2hpdGVzcGFjZSBvZiBhIGNlbGwgaXMgY2xpY2tlZC5cbiAqL1xudmFyIENlbGxDbGlja2VkRXZlbnQg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NOYU4oQkludCkpIHtcbiAgICAgICAgdmFyIGFBID0gYS5yZXBsYWNlKHJlQSwgJycpO1xuICAgICAgICB2YXIgYkEgPSBiLnJlcGxhY2UocmVBLCAnJyk7XG4gICAgICAgIGlmIChhQSA9PT0gYkEpIHtcbiAgICAgICAgICAgIHZhciBhTiA9IHBhcnNlSW50KGEucmVwbGFjZShyZU4sICcnKSwgMTApO1xuICAgICAgICAgICAgdmFyIGJOID0gcGFyc2VJbnQoYi5yZXBsYWNlKHJlTiwgJycpLCAxMCk7XG4gICAgICAgICAgICByZXR1cm4gYU4gPT09IGJOID8gMCA6IGFOID4gYk4gPyAtMSA6IDE7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gYUEgPiBiQSA/IC0xIDogMTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBlbHNlIGlmIChpc05hTihBSW50KSkge1xuICAgICAgICByZXR1cm4gLTE7IC8vdG8gbWFrZSBhbHBoYW51bWVyaWMgc29ydCBmaXJzdCByZXR1cm4gLTEgaGVyZVxuICAgIH1cbiAgICBlbHNlIGlmIChpc05hTihCSW50KSkge1xuICAgICAgICByZXR1cm4gMTsgLy90byBtYWtlIGFscGhhbnVtZXJpYyBzb3J0IGZpcnN0IHJldHVybiAxIGhlcmVcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIHJldHVybiBBSW50ID4gQkludCA/IC0xIDogMTtcbiAgICB9XG59O1xuZXhwb3J0cy5udW1iZXJTb3J0ID0gZnVuY3Rpb24gKGEsIGIpIHtcbiAgICB2YXIgbmEgPSBwYXJzZUZsb2F0KGEpO1xuICAgIHZhciBuYiA9IHBhcnNlRmxvYXQoYik7XG4gICAgbmEgPSAoaXNOYU4oYSkpID8gLUluZmluaXR5IDogYTtcbiAgICBuYiA9IChpc05hTihiKSkgPyAtSW5maW5pdHkgOiBiO1xuICAgIHJldHVybiAobmEgPiBuYikgPyAtMSA6IChuYSA8IG5iKSA/IDEgO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gICAgICAgICAgICAgICAgY2VsbDogX3RoaXMuYXR0cnMud3cuY2VsbENsYXNzIHx8ICcnLFxuICAgICAgICAgICAgICAgIGhlYWRpbmc6IF90aGlzLmF0dHJzLnd3LmhlYWRpbmdDbGFzcyB8fCAnJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZyYWdtZW50OiB7XG4gICAgICAgICAgICAgICAgZW1wdHk6IF90aGlzLmF0dHJzLnd3LmVtcHR5XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgICAgICAgIHNlbGVjdGFibGU6IF90aGlzLmF0dHJzLnd3LnNlbGVjdGFibGVcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzb3J0ZWRPbjogJycsXG4gICAgICAgICAgICBkYXRhOiBfdGhpcy5vcmlnaW5hbERhdGEuc2xpY2UoKSxcbiAgICAgICAgICAgIGZpZWxkczogX3RoaXMuYXR0cnMud3cuZmllbGRzLFxuICAgICAgICAgICAgYXJyb3c6ICcnXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgVGFibGUucHJvdG90eXBlLnNvcnQgPSBmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICB2YXIgZmllbGRzID0gdGhpcy5hdHRycy53dyA/IHRoaXMuYXR0cnMud3cuZmllbGRzID8gdGhpcy5hdHRycy53dy5maWVsZHMgOiBbXSA6IFtdO1xuICAgICAgICB2YXIgZmllbGQgPSBmaWVsZHMucmVkdWNlKGZ1bmN0aW9uIChwLCBjKSB7IHJldHVybiBwID8gcCA6IChjLm5hbWUgPT09IG5hbWUgPyBjIDogbnVsbCk7IH0pO1xuICAgICAgICB2YXIgc29ydE9uO1xuICAgICAgICB2YXIgc3RyYXRlZ3k7XG4gICAgICAgIGlmICghZmllbGQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJUYWJsZSNzb3J0OiB1bmtub3duIGZpZWxkICdcIiArIG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B7fVxuICAgIH0sIFtfX193bWwuaWZ0aGVuKF9fX2NvbnRleHQudmFsdWVzLm9wdGlvbnMuc2VsZWN0YWJsZSwgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgIHJldHVybiBfX193bWwuYm94KF9fX3dtbC5kb21pZnkoZXhwb3J0cy5yb3dTZWxlY3RDaGVja2JveChyb3csIGluZGV4LCBkYXRhKShfX19jb250ZXh0KShfX192aWV3KSksIF9fX3dtbC5kb21pZnkoZXhwb3J0cy5yb3dzKHJvdywgaW5kZXgsIGZpZWxkcykoX19fY29udGV4dCkoX19fdmlldykpKTtcbiAgICAgICAgfSwgZnVuY3Rpb24gZWxzZV9jbGF1c2UoKSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLmRvbWlmeShleHBvcnRzLnJvd3Mocm93LCBpbmRleCwgZmllbGRzKShfX19jb250ZXh0KShfX192aWV3KSk7XG4gICAgICAgIH0pXSwgX19fdmlldyk7XG59LCBmdW5jdGlvbiBvdGhlcndpc2UoKSB7XG4gICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZURvY3VtZW50RnJhZ21lbnQoKTtcbn0pOyB9OyB9OyB9O1xuO1xuZXhwb3J0cy50YWJsZSA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGZ1bmN0aW9uIChfX19jb250ZXh0KSB7IHJldHVybiBmdW5jdGlvbiAoX19fdmlldykgeyByZXR1cm4gX19fd21sLm5vZGUoJ3RhYmxlJywge1xuICAgIGh0bWw6IHtcbiAgICAgICAgJ2NsYXNzJzogX19fY29udGV4dC52YWx1ZXMuY2xhc3Mucm9vdFxuICAgIH0sXG4gICAgd21sOiB7XG4gICAgICAgICdpZCc6IF9fX2NvbnRleHQudmFsdWVzLmlkLnJvb3RcbiAgICB9XG59LCBbX19fd21sLm5vZGUoJ3RoZWFkJywge1xuICAgICAgICBodG1sOiB7fSxcbiAgICAgICAgd21sOiB7XG4gICAgICAgICAgICAnaWQnOiBcImhlYWRcIlxuICAgICAgICB9XG4gICAgfSwgW19fX3dtbC5kb21pZnkoZXhwb3J0cy50aGVhZChfX19jb250ZXh0LnZhbHVlcy5maWVsZHMpKF9fX2NvbnRleHQpKF9fX3ZpZXcpKV0sIF9fX3ZpZXcpLCBfX193bWwubm9kZSgndGJvZHknLCB7XG4gICAgICAgIGh0bWw6IHt9LFxuICAgICAgICB3bWw6IHtcbiAgICAgICAgICAgICdpZCc6IFwiYm9keVwiXG4gICAgICAgIH1cbiAgICB9LCBbX19fd21sLmRvbWlmeShleHBvcnRzLnRib2R5KF9fX2NvbnRleHQudmFsdWVzLmRhdGEsIF9fX2NvbnRleHQudmFsdWVzLmZpZWxkcykoX19fY29udGV4dCkoX19fdmlldykpXSwgX19fdmlldyldLCBfX192aWV3KTsgfTsgfTsgfTtcbjtcbnZhciBUYWJsZSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICBfX2V4dGVuZHMoVGFibGUsIF9zdXBlcik7XG4gICAgZnVuY3Rpb24gVGFibGUoY29udGV4dCkge1xuICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBjb250ZXh0KSB8fCB0aGlzO1xuICAgICAgICBfdGhpcy50ZW1wbGF0ZSA9IGZ1bmN0aW9uIChfX19jb250ZXh0LCBfX192aWV3KSB7XG4gICAgICAgICAgICByZXR1cm4gX19fd21sLndpZGdldChGcmFnbWVudF8xLkZyYWdtZW50LCB7XG4gICAgICAgICAgICAgICAgaHRtbDoge30sXG4gICAgICAgICAgICAgICAgd21sOiB7fVxuICAgICAgICAgICAgfSwgW19fX3dtbC5pZnRoZW4oKF9fX2NvbnRleHQudmFsdWVzLmRhdGEubGVuZ3RoID09PSAwKSwgZnVuY3Rpb24gdGhlbigpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9fX3dtbC5pZnRoZW4oX19fY29udGV4dC52YWx1ZXMuZnJhZ21lbnQuZW1wdHksIGZ1bmN0a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IGFib3ZlIVxuICpcbiAqICAgICAgICAgICAgICAgICBOb3RlIHRoYXQgdGhpcyBzdGFjayBzdG9yZXMgdGhlIGN1cnJlbnQgc3RhY2sgb2YgKnRva2VucyosIHRoYXQgaXMgdGhlIHNlcXVlbmNlIG9mXG4gKiAgICAgICAgICAgICAgICAgYWxyZWFkeSBwYXJzZWQ9cmVkdWNlZCAqbm9udGVybWluYWxzKiAodG9rZW5zIHJlcHJlc2VudGluZyBydWxlcykgYW5kICp0ZXJtaW5hbHMqXG4gKiAgICAgICAgICAgICAgICAgKGxleGVyIHRva2VucyAqc2hpZnRlZCogb250byB0aGUgc3RhY2sgdW50aWwgdGhlIHJ1bGUgdGhleSBiZWxvbmcgdG8gaXMgZm91bmQgYW5kXG4gKiAgICAgICAgICAgICAgICAgKnJlZHVjZWQqLlxuICpcbiAqICAgICAgICAgICAgICAgLSBgeXlzc3RhY2tgOiByZWZlcmVuY2UgdG8gdGhlIHBhcnNlciBzdGF0ZSBzdGFjay4gVGhpcyBvbmUgY2FycmllcyB0aGUgaW50ZXJuYWwgcGFyc2VyXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnN0YXRlcyogc3VjaCBhcyB0aGUgb25lIGluIGB5eXN0YXRlYCwgd2hpY2ggYXJlIHVzZWQgdG8gcmVwcmVzZW50XG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHBhcnNlciBzdGF0ZSBtYWNoaW5lIGluIHRoZSAqcGFyc2UgdGFibGUqLiAqVmVyeSogKmludGVybmFsKiBzdHVmZixcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGF0IGNhbiBJIHNheT8gSWYgeW91IGFjY2VzcyB0aGlzIG9uZSwgeW91J3JlIGNsZWFybHkgZG9pbmcgd2lja2VkIHRoaW5nc1xuICpcbiAqICAgICAgICAgICAgICAgLSBgLi4uYCAgICAgOiB0aGUgZXh0cmEgYXJndW1lbnRzIHlvdSBzcGVjaWZpZWQgaW4gdGhlIGAlcGFyc2UtcGFyYW1gIHN0YXRlbWVudCBpbiB5b3VyXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JhbW1hciBkZWZpbml0aW9uIGZpbGUuXG4gKlxuICogICAgdGFibGU6IFsuLi5dLFxuICogICAgICAgICAgICAgICBTdGF0ZSB0cmFuc2l0aW9uIHRhYmxlXG4gKiAgICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbiAqXG4gKiAgICAgICAgICAgICAgIGluZGV4IGxldmVscyBhcmU6XG4gKiAgICAgICAgICAgICAgIC0gYHN0YXRlYCAgLS0+IGhhc2ggdGFibGVcbiAqICAgICAgICAgICAgICAgLSBgc3ltYm9sYCAtLT4gYWN0aW9uIChudW1iZXIgb3IgYXJyYXkpXG4gKlxuICogICAgICAgICAgICAgICAgIElmIHRoZSBgYWN0aW9uYCBpcyBhbiBhcnJheSwgdGhlc2UgYXJlIHRoZSBlbGVtZW50cycgbWVhbmluZzpcbiAqICAgICAgICAgICAgICAgICAtIGluZGV4IFswXTogMSA9IHNoaWZ0LCAyID0gcmVkdWNlLCAzID0gYWNjZXB0XG4gKiAgICAgICAgICAgICAgICAgLSBpbmRleCBbMV06IEdPVE8gYHN0YXRlYFxuICpcbiAqICAgICAgICAgICAgICAgICBJZiB0aGUgYGFjdGlvbmAgaXMgYSBudW1iZXIsIGl0IGlzIHRoZSBHT1RPIGBzdGF0ZWBcbiAqXG4gKiAgICBkZWZhdWx0QWN0aW9uczogey4uLn0sXG4gKlxuICogICAgcGFyc2VFcnJvcjogZnVuY3Rpb24oc3RyLCBoYXNoLCBFeGNlcHRpb25DbGFzcyksXG4gKiAgICB5eUVycm9yOiBmdW5jdGlvbihzdHIsIC4uLiksXG4gKiAgICB5eVJlY292ZXJpbmc6IGZ1bmN0aW9uKCksXG4gKiAgICB5eUVyck9rOiBmdW5jdGlvbigpLFxuICogICAgeXlDbGVhckluOiBmdW5jdGlvbigpLFxuICpcbiAqICAgIGN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0ZShFcnJvci5wcm90b3R5cGUpO1xufVxuSmlzb25QYXJzZXJFcnJvci5wcm90b3R5cGUuY29uc3RydWN0b3IgPSBKaXNvblBhcnNlckVycm9yO1xuSmlzb25QYXJzZXJFcnJvci5wcm90b3R5cGUubmFtZSA9ICdKaXNvblBhcnNlckVycm9yJztcblxuXG5cbiAgICAgICAgLy8gaGVscGVyOiByZWNvbnN0cnVjdCB0aGUgcHJvZHVjdGlvbnNbXSB0YWJsZVxuICAgICAgICBmdW5jdGlvbiBicChzKSB7XG4gICAgICAgICAgICB2YXIgcnYgPSBbXTtcbiAgICAgICAgICAgIHZhciBwID0gcy5wb3A7XG4gICAgICAgICAgICB2YXIgciA9IHMucnVsZTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gcC5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICBydi5wdXNoKFtcbiAgICAgICAgICAgICAgICAgICAgcFtpXSxcbiAgICAgICAgICAgICAgICAgICAgcltpXVxuICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJ2O1xuICAgICAgICB9XG4gICAgXG5cblxuICAgICAgICAvLyBoZWxwZXI6IHJlY29uc3RydWN0IHRoZSBkZWZhdWx0QWN0aW9uc1tdIHRhYmxlXG4gICAgICAgIGZ1bmN0aW9uIGJkYShzKSB7XG4gICAgICAgICAgICB2YXIgcnYgPSB7fTtcbiAgICAgICAgICAgIHZhciBkID0gcy5pZHg7XG4gICAgICAgICAgICB2YXIgZyA9IHMuZ290bztcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gZC5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgaiA9IGRbaV07XG4gICAgICAgICAgICAgICAgcnZbal0gPSBnW2ldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJ2O1xuICAgICAgICB9XG4gICAgXG5cblxuICAgICAgICAvLyBoZWxwZXI6IHJlY29uc3RydWN0IHRoZSAnZ290bycgdGFibGVcbiAgICAgICAgZnVuY3Rpb24gYnQocykge1xuICAgICAgICAgICAgdmFyIHJ2ID0gW107XG4gICAgICAgICAgICB2YXIgZCA9IHMubGVuO1xuICAgICAgICAgICAgdmFyIHkgPSBzLnN5bWJvbDtcbiAgICAgICAgICAgIHZhciB0ID0gcy50eXBlO1xuICAgICAgICAgICAgdmFyIGEgPSBzLnN0YXRlO1xuICAgICAgICAgICAgdmFyIG0gPSBzLm1vZGU7XG4gICAgICAgICAgICB2YXIgZyA9IHMuZ290bztcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gZC5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgbiA9IGRbaV07XG4gICAgICAgICAgICAgICAgdmFyIHEgPSB7fTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IG47IGorKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgeiA9IHkuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh0LnNoaWZ0KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICAgICAgcVt6XSA9IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtLnNoaWZ0KCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZy5zaGlmdCgpXG4gICAgICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgcVt6XSA9IGEuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0eXBlID09PSAxOiBhY2NlcHRcbiAgICAgICAgICAgICAgICAgICAgICAgIHFbel0gPSBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgM1xuICAgICAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBydi5wdXNoKHEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJ2O1xuICAgICAgICB9XG4gICAgXG5cblxuICAgICAgICAvLyBoZWxwZXI6IHJ1bmxlbmd0aCBlbmNvZGluZyB3aXRoIGluY3JlbWVudCBzdGVwOiBjb2RlLCBsZW5ndGg6IHN0ZXAgKGRlZmF1bHQgc3RlcCA9IDApXG4gICAgICAgIC8vIGB0aGlzYCByZWZlcmVuY2VzIGFuIGFycmF5XG4gICAgICAgIGZ1bmN0aW9uIHMoYywgbCwgYSkge1xuICAgICAgICAgICAgYSA9IGEgfHwgMDtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wdXNoKGMpO1xuICAgICAgICAgICAgICAgIGMgKz0gYTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGhlbHBlcjogZHVwbGljYXRlIHNlcXVlbmNlIGZyb20gKnJlbGF0aXZlKiBvZmZzZXQgYW5kIGxlbmd0aC5cbiAgICAgICAgLy8gYHRoaXNgIHJlZmVyZW5jZXMgYW4gYXJyYXlcbiAgICAgICAgZnVuY3Rpb24gYyhpLCBsKSB7XG4gICAgICAgICAgICBpID0gdGhpcy5sZW5ndGggLSBpO1xuICAgICAgICAgICAgZm9yIChsICs9IGk7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLnB1c2godGhpc1tpXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBoZWxwZXI6IHVucGFjayBhbiBhcnJheSB1c2luZyBoZWxwZXJzIGFuZCBkYXRhLCBhbGwgcGFzc2VkIGluIGFuIGFycmF5IGFyZ3VtZW50ICdhJy5cbiAgICAgICAgZnVuY3Rpb24gdShhKSB7XG4gICAgICAgICAgICB2YXIgcnYgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gYS5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgZSA9IGFbaV07XG4gICAgICAgICAgICAgICAgLy8gSXMgdGhpcyBlbnRyeSBhIGhlbHBlciBmdW5jdGlvbj9cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgaSsrO1xuICAgICAgICAgICAgICAgICAgICBlLmFwcGx5KHJ2LCBhW2ldKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBydi5wdXNoKGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBydjtcbiAgICAgICAgfVxuICAgIFxuXG52YXIgcGFyc2VyID0ge1xuICAgIC8vIENvZGUgR2VuZXJhdG9yIEluZm9ybWF0aW9uIFJlcG9ydFxuICAgIC8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuICAgIC8vXG4gICAgLy8gT3B0aW9uczpcbiAgICAvL1xuICAgIC8vICAgZGVmYXVsdCBhY3Rpb24gbW9kZTogLi4uLi4uLi4uLi4uLiBjbGFzc2ljLG1lcmdlXG4gICAgLy8gICBubyB0cnkuLmNhdGNoOiAuLi4uLi4uLi4uLi4uLi4uLi4uIGZhbHNlXG4gICAgLy8gICBubyBkZWZhdWx0IHJlc29sdmUgb24gY29uZmxpY3Q6ICAgIGZhbHNlXG4gICAgLy8gICBvbi1kZW1hbmQgbG9vay1haGVhZDogLi4uLi4uLi4u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iAgICB0aGlzLnl5R2V0U2hhcmVkU3RhdGUgPSBmdW5jdGlvbiB5eUdldFNoYXJlZFN0YXRlKCkge1xuICAgICAgICByZXR1cm4gc2hhcmVkU3RhdGVfeXk7XG4gICAgfTtcblxuXG4gICAgLy8gc2hhbGxvdyBjbG9uZSBvYmplY3RzLCBzdHJhaWdodCBjb3B5IG9mIHNpbXBsZSBgc3JjYCB2YWx1ZXNcbiAgICAvLyBlLmcuIGBsZXhlci55eXRleHRgIE1BWSBiZSBhIGNvbXBsZXggdmFsdWUgb2JqZWN0LFxuICAgIC8vIHJhdGhlciB0aGFuIGEgc2ltcGxlIHN0cmluZy92YWx1ZS5cbiAgICBmdW5jdGlvbiBzaGFsbG93X2NvcHkoc3JjKSB7XG4gICAgICAgIGlmICh0eXBlb2Ygc3JjID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgdmFyIGRzdCA9IHt9O1xuICAgICAgICAgICAgZm9yICh2YXIgayBpbiBzcmMpIHtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHNyYywgaykpIHtcbiAgICAgICAgICAgICAgICAgICAgZHN0W2tdID0gc3JjW2tdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkc3Q7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNyYztcbiAgICB9XG4gICAgZnVuY3Rpb24gc2hhbGxvd19jb3B5X25vY2xvYmJlcihkc3QsIHNyYykge1xuICAgICAgICBmb3IgKHZhciBrIGluIHNyYykge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBkc3Rba10gPT09ICd1bmRlZmluZWQnICYmIE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChzcmMsIGspKSB7XG4gICAgICAgICAgICAgICAgZHN0W2tdID0gc3JjW2tdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9X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tIGZpcnN0L2xhc3QgeXlsbG9jIGVudHJpZXMgb3ZlcnJpZGUgZmlyc3QvbGFzdCBpbmRleGVzXG5cbiAgICAgICAgaWYgKCFsMSkge1xuICAgICAgICAgICAgaWYgKGZpcnN0X2luZGV4ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gaTE7IGkgPD0gaTI7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBsMSA9IGxzdGFja1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGwxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghbDIpIHtcbiAgICAgICAgICAgIGlmIChsYXN0X2luZGV4ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gaTI7IGkgPj0gaTE7IGktLSkge1xuICAgICAgICAgICAgICAgICAgICBsMiA9IGxzdGFja1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGwyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIC0gZGV0ZWN0IGlmIGFuIGVwc2lsb24gcnVsZSBpcyBiZWluZyBwcm9jZXNzZWQgYW5kIGFjdCBhY2NvcmRpbmdseTpcbiAgICAgICAgaWYgKCFsMSAmJiBmaXJzdF9pbmRleCA9PSBudWxsKSB7XG4gICAgICAgICAgICAvLyBlcHNpbG9uIHJ1bGUgc3BhbiBtZXJnZXIuIFdpdGggb3B0aW9uYWwgbG9vay1haGVhZCBpbiBsMi5cbiAgICAgICAgICAgIGlmICghZG9udF9sb29rX2JhY2spIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gKGkxIHx8IHNwKSAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICAgICAgICAgIGwxID0gbHN0YWNrW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAobDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFsMSkge1xuICAgICAgICAgICAgICAgIGlmICghbDIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gd2hlbiB3ZSBzdGlsbCBkb24ndCBoYXZlIGFueSB2YWxpZCB5eWxsb2MgaW5mbywgd2UncmUgbG9va2luZyBhdCBhbiBlcHNpbG9uIHJ1bGVcbiAgICAgICAgICAgICAgICAgICAgLy8gd2l0aG91dCBsb29rLWFoZWFkIGFuZCBubyBwcmVjZWRpbmcgdGVybXMgYW5kL29yIGBkb250X2xvb2tfYmFja2Agc2V0OlxuICAgICAgICAgICAgICAgICAgICAvLyBpbiB0aGF0IGNhc2Ugd2UgY2EgZG8gbm90aGluZyBidXQgcmV0dXJuIE5VTEwvVU5ERUZJTkVEOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHNoYWxsb3ctY29weSBMMjogYWZ0ZXIgYWxsLCB3ZSBNQVkgYmUgbG9va2luZ1xuICAgICAgICAgICAgICAgICAgICAvLyBhdCB1bmNvbnZlbnRpb25hbCB5eWxsb2MgaW5mbyBvYmplY3RzLi4uXG4gICAgICAgICAgICAgICAgICAgIHJ2ID0gc2hhbGxvd19jb3B5KGwyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJ2LnJhbmdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzaGFsbG93IGNvcHkgdGhlIHl5bGxvYyByYW5nZXMgaW5mbyB0byBwcmV2ZW50IHVzIGZyb20gbW9kaWZ5aW5nIHRoZSBvcmlnaW5hbCBhcmd1bWVudHMnIGVudHJpZXM6XG4gICAgICAgICAgICAgICAgICAgICAgICBydi5yYW5nZSA9IHJ2LnJhbmdlLnNsaWNlKDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBydjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIHNoYWxsb3ctY29weSBMMSwgdGhlbiBhZGp1c3QgZmlyc3QgY29sL3JvdyAxIGNvbHVtbiBwYXN0IHRoZSBlbmQuXG4gICAgICAgICAgICAgICAgcnYgPSBzaGFsbG93X2NvcHkobDEpO1xuICAgICAgICAgICAgICAgIHJ2LmZpcnN0X2xpbmUgPSBydi5sYXN0X2xpbmU7XG4gICAgICAgICAgICAgICAgcnYuZmlyc3RfY29sdW1uID0gcnYubGFzdF9jb2x1bW47XG4gICAgICAgICAgICAgICAgaWYgKHJ2LnJhbmdlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHNoYWxsb3cgY29weSB0aGUgeXlsbG9jIHJhbmdlcyBpbmZvIHRvIHByZXZlbnQgdXMgZnJvbSBtb2RpZnlpbmcgdGhlIG9yaWdpbmFsIGFyZ3VtZW50cycgZW50cmllczpcbiAgICAgICAgICAgICAgICAgICAgcnYucmFuZ2UgPSBydi5yYW5nZS5zbGljZSgwKTtcbiAgICAgICAgICAgICAgICAgICAgcnYucmFuZ2VbMF0gPSBydi5yYW5nZVsxXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAobDIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gc2hhbGxvdy1taXhpbiBMMiwgdGhlbiBhZGp1c3QgbGFzdCBjb2wvcm93IGFjY29yZGluZ2x5LlxuICAgICAgICAgICAgICAgICAgICBzaGFsbG93X2NvcHlfbm9jbG9iYmVyKHJ2LCBsMik7XG4gICAgICAgICAgICAgICAgICAgIHJ2Lmxhc3RfbGluZSA9IGwyLmxhc3RfbGluZTtcbiAgICAgICAgICAgICAgICAgICAgcnYubGFzdF9jb2x1bW4gPSBsMi5sYXN0X2NvbHVtbjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJ2LnJhbmdlICYmIGwyLnJhbmdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBydi5yYW5nZVsxXSA9IGwyLnJhbmdlWzFdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBydjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghbDEpIHtcbiAgICAgICAgICAgIGwxID0gbDI7XG4gICAgICAgICAgICBsMiA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsMSkge1xuICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNoYWxsb3ctY29weSBMMXxMMiwgYmVmb3JlIHdlIHRyeSB0byBhZGp1c3QgdGhlIHl5bGxvYyB2YWx1ZXM6IGFmdGVyIGFsbCwgd2UgTUFZIGJlIGxvb2tpbmdcbiAgICAgICAgLy8gYXQgdW5jb252ZW50aW9uYWwgeXlsbG9jIGluZm8gb2JqZWN0cy4uLlxuICAgICAgICBydiA9IHNoYWxsb3dfY29weShsMSk7XG5cbiAgICAgICAgLy8gZmlyc3RfbGluZTogLi4uLFxuICAgICAgICAvLyBmaXJzdF9jb2x1bW46IC4uLixcbiAgICAgICAgLy8gbGFzdF9saW5lOiAuLi4sXG4gICAgICAgIC8vIGxhc3RfY29sdW1uOiAuLi4sXG4gICAgICAgIGlmIChydi5yYW5nZSkge1xuICAgICAgICAgICAgLy8gc2hhbGxvdyBjb3B5IHRoZSB5eWxsb2MgcmFuZ2VzIGluZm8gdG8gcHJldmVudCB1cyBmcm9tIG1vZGlmeWluZyB0aGUgb3JpZ2luYWwgYXJndW1lbnRzJyBlbnRyaWVzOlxuICAgICAgICAgICAgcnYucmFuZ2UgPSBydi5yYW5nZS5zbGljZSgwKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChsMikge1xuICAgICAgICAgICAgc2hhbGxvd19jb3B5X25vY2xvYmJlcihydiwgbDIpO1xuICAgICAgICAgICAgcnYubGFzdF9saW5lID0gbDIubGFzdF9saW5lO1xuICAgICAgICAgICAgcnYubGFzdF9jb2x1bW4gPSBsMi5sYXN0X2NvbHVtbjtcbiAgICAgICAgICAgIGlmIChydi5yYW5nZSAmJiBsMi5yYW5nZSkge1xuICAgICAgICAgICAgICAgIHJ2LnJhbmdlWzFdID0gbDIucmFuZ2VbMV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcnY7XG4gICAgfTtcblxuICAgIC8vIE5PVEU6IGFzIHRoaXMgQVBJIHVzZXMgcGFyc2UoKSBhcyBhIGNsb3N1cmUsIGl0IE1VU1QgYmUgc2V0IGFnYWluIG9uIGV2ZXJ5IHBhcnNlKCkgaW52b2NhdGlvbixcbiAgICAvLyAgICAgICBvciBlbHNlIHlvdXIgYGxleGVyYCwgYHNoYXJlZFN0YXRlYCwgZXRjLiByZWZlcmVuY2VzIHdpbGwgYmUgKndyb25nKiFcbiAgICB0aGlzLmNvbnN0cnVjdFBhcnNlRXJyb3JJbmZvID0gZnVuY3Rpb24gcGFyc2VyX2NvbnN0cnVjdFBhcnNlRXJyb3JJbmZvKG1zZywgZXgsIGV4cGVjdGVkLCByZWNvdmVyYWJsZSkge1xuICAgICAgICB2YXIgcGVpID0ge1xuICAgICAgICAgICAgZXJyU3RyOiBtc2csXG4gICAgICAgICAgICBleGNlcHRpb246IGV4LFxuICAgICAgICAgICAgdGV4dDogbGV4ZXIubWF0Y2gsXG4gICAgICAgICAgICB2YWx1ZTogbGV4ZXIueXl0ZXh0LFxuICAgICAgICAgICAgdG9rZW46IHRoaXMuZGVzY3JpYmVTeW1ib2woc3ltYm9sKSB8fCBzeW1ib2wsXG4gICAgICAgICAgICB0b2tlbl9pZDogc3ltYm9sLFxuICAgICAgICAgICAgbGluZTogbGV4ZXIueXlsaW5lbm8sXG4gICAgICAgICAgICBsb2M6IGNvcHlfeXlsbG9jKGxleGVyLnl5bGxvYyksXG4gICAgICAgICAgICBleHBlY3RlZDogZXhwZWN0ZWQsXG4gICAgICAgICAgICByZWNvdmVyYWJsZTogcmVjb3ZlcmFibGUsXG4gICAgICAgICAgICBzdGF0ZTogc3RhdGUsXG4gICAgICAgICAgICBhY3Rpb246IGFjdGlvbixcbiAgICAgICAgICAgIG5ld19zdGF0ZTogbmV3U3RhdGUsXG4gICAgICAgICAgICBzeW1ib2xfc3RhY2s6IHN0YWNrLFxuICAgICAgICAgICAgc3RhdGVfc3RhY2s6IHNzdGFjayxcbiAgICAgICAgICAgIHZhbHVlX3N0YWNrOiB2c3RhY2ssXG4gICAgICAgICAgICBsb2NhdGlvbl9zdGFjazogbHN0YWNrLFxuICAgICAgICAgICAgc3RhY2tfcG9pbnRlcjogc3AsXG4gICAgICAgICAgICB5eTogc2hhcmVkU3RhdGVfeXksXG4gICAgICAgICAgICBsZXhlcjogbGV4ZXIsXG4gICAgICAgICAgICBwYXJzZXI6IHRoaXMsXG5cbiAgICAgICAgICAgIC8vIGFuZCBtYWtlIHN1cmUgdGhlIGVycm9yIGluZm8gZG9lc24ndCBzdGF5IGR1ZSB0byBwb3RlbnRpYWxcbiAgICAgICAgICAgIC8vIHJlZiBjeWNsZSB2aWEgdXNlcmxhbmQgY29kZSBtYW5pcHVsYXRpb25zLlxuICAgICAgICAgICAgLy8gVGhlc2Ugd291bGQgb3RoZXJ3aXNlIGFsbCBiZSBtZW1vcnkgbGVhayBvcHBvcnR1bml0aWVzIVxuICAgICAgICAgICAgLy9cbiAgICAgICAgICAgIC8vIE5vdGUgdGhhdCBvbmx5IGFycmF5IGFuZCBvYmplY3QgcmVmZXJlbmNlcyBhcmUgbnVrZWQgYXMgdGhvc2VcbiAgICAgICAgICAgIC8vIGNvbnN0aXR1dGUgdGhlIHNldCBvZiBlbGVtZW50cyB3aGljaCBjYW4gcHJvZHVjZSBhIGN5Y2xpYyByZWYuXG4gICAgICAgICAgICAvLyBUaGUgcmVzdCBvZiB0aGUgbWVtYmVycyBpcyBrZXB0IGludGFjdCBhcyB0aGV5IGFyZSBoYXJtbGVzcy5cbiAgICAgICAgICAgIGRlc3Ryb3k6IGZ1bmN0aW9uIGRlc3RydWN0UGFyc2VFcnJvckluZm8oKSB7XG4gICAgICAgICAgICAgICAgLy8gcmVtb3ZlIGN5Y2xpYyByZWZlcmVuY2VzIGFkZGVkIHRvIGVycm9yIGluZm86XG4gICAgICAgICAgICAgICAgLy8gaW5mby55eSA9IG51bGw7XG4gICAgICAgICAgICAgICAgLy8gaW5mby5sZXhlciA9IG51bGw7XG4gICAgICAgICAgICAgICAgLy8gaW5mby52YWx1ZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgLy8gaW5mby52YWx1ZV9zdGFjayA9IG51bGw7XG4gICAgICAgICAgICAgICAgLy8gLi4uXG4gICAgICAgICAgICAgICAgdmFyIHJlYyA9ICEhdGhpcy5yZWNvdmVyYWJsZTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gdGhpcykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5oYXNPd25Qcm9wZXJ0eShrZXkpICYmIHR5cGVvZiBrZXkgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW2tleV0gPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5yZWNvdmVyYWJsZSA9IHJlYztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgLy8gdHJhY2sgdGhpcyBpbnN0YW5jZSBzbyB3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AgICAgICAgICAgbmV3U3RhdGUgPSB0aGlzLmRlZmF1bHRBY3Rpb25zW3N0YXRlXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gVGhlIHNpbmdsZSBgPT1gIGNvbmRpdGlvbiBiZWxvdyBjb3ZlcnMgYm90aCB0aGVzZSBgPT09YCBjb21wYXJpc29ucyBpbiBhIHNpbmdsZVxuICAgICAgICAgICAgICAgIC8vIG9wZXJhdGlvbjpcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIC8vICAgICBpZiAoc3ltYm9sID09PSBudWxsIHx8IHR5cGVvZiBzeW1ib2wgPT09ICd1bmRlZmluZWQnKSAuLi5cbiAgICAgICAgICAgICAgICBpZiAoIXN5bWJvbCkge1xuICAgICAgICAgICAgICAgICAgICBzeW1ib2wgPSBsZXgoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gcmVhZCBhY3Rpb24gZm9yIGN1cnJlbnQgc3RhdGUgYW5kIGZpcnN0IGlucHV0XG4gICAgICAgICAgICAgICAgdCA9ICh0YWJsZVtzdGF0ZV0gJiYgdGFibGVbc3RhdGVdW3N5bWJvbF0pIHx8IE5PX0FDVElPTjtcbiAgICAgICAgICAgICAgICBuZXdTdGF0ZSA9IHRbMV07XG4gICAgICAgICAgICAgICAgYWN0aW9uID0gdFswXTtcblxuXG5cblxuXG5cblxuXG5cblxuXG4gICAgICAgICAgICAgICAgLy8gaGFuZGxlIHBhcnNlIGVycm9yXG4gICAgICAgICAgICAgICAgaWYgKCFhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGVyclN0cjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGVyclN5bWJvbERlc2NyID0gKHRoaXMuZGVzY3JpYmVTeW1ib2woc3ltYm9sKSB8fCBzeW1ib2wpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgZXhwZWN0ZWQgPSB0aGlzLmNvbGxlY3RfZXhwZWN0ZWRfdG9rZW5fc2V0KHN0YXRlKTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBSZXBvcnQgZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBsZXhlci55eWxpbmVubyA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVyclN0ciA9ICdQYXJzZSBlcnJvciBvbiBsaW5lICcgKyAobGV4ZXIueXlsaW5lbm8gKyAxKSArICc6ICc7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJTdHIgPSAnUGFyc2UgZXJyb3I6ICc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBsZXhlci5zaG93UG9zaXRpb24gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVyclN0ciArPSAnXFxuJyArIGxleGVyLnNob3dQb3NpdGlvbig3OSAtIDEwLCAxMCkgKyAnXFxuJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoZXhwZWN0ZWQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJTdHIgKz0gJ0V4cGVjdGluZyAnICsgZXhwZWN0ZWQuam9pbignLCAnKSArICcsIGdvdCB1bmV4cGVjdGVkICcgKyBlcnJTeW1ib2xEZXNjcjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVyclN0ciArPSAnVW5leHBlY3RlZCAnICsgZXJyU3ltYm9sRGVzY3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gd2UgY2Fubm90IHJlY292ZXIgZnJvbSB0aGUgZXJyb3IhXG4gICAgICAgICAgICAgICAgICAgIHAgPSB0aGlzLmNvbnN0cnVjdFBhcnNlRXJyb3JJbmZvKGVyclN0ciwgbnVsbCwgZXhwZWN0ZWQsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dmFsID0gdGhpcy5wYXJzZUVycm9yKHAuZXJyU3RyLCBwLCB0aGlzLkppc29uUGFyc2VyRXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgfVxuXG5cblxuXG5cblxuXG5cblxuXG4gICAgICAgICAgICBzd2l0Y2ggKGFjdGlvbikge1xuICAgICAgICAgICAgLy8gY2F0Y2ggbWlzYy4gcGFyc2UgZmFpbHVyZXM6XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIC8vIHRoaXMgc2hvdWxkbid0IGhhcHBlbiwgdW5sZXNzIHJlc29sdmUgZGVmYXVsdHMgYXJlIG9mZlxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24gaW5zdGFuY2VvZiBBcnJheSkge1xuICAgICAgICAgICAgICAgICAgICBwID0gdGhpcy5jb25zdHJ1Y3RQYXJzZUVycm9ySW5mbygnUGFyc2UgRXJyb3I6IG11bHRpcGxlIGFjdGlvbnMgcG9zc2libGUgYXQgc3RhdGU6ICcgKyBzdGF0ZSArICcsIHRva2VuOiAnICsgc3ltYm9sLCBudWxsLCBudWxsLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHZhbCA9IHRoaXMucGFyc2VFcnJvcihwLmVyclN0ciwgcCwgdGhpcy5KaXNvblBhcnNlckVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIEFub3RoZXIgY2FzZSBvZiBiZXR0ZXIgc2FmZSB0aGFuIHNvcnJ5OiBpbiBjYXNlIHN0YXRlIHRyYW5zaXRpb25zIGNvbWUgb3V0IG9mIGFub3RoZXIgZXJyb3IgcmVjb3ZlcnkgcHJvY2Vzc1xuICAgICAgICAgICAgICAgIC8vIG9yIGEgYnVnZ3kgTFVUIChMb29rVXAgVGFibGUpOlxuICAgICAgICAgICAgICAgIHAgPSB0aGlzLmNvbnN0cnVjdFBhcnNlRXJyb3JJbmZvKCdQYXJzaW5nIGhhbHRlZC4gTm8gdmlhYmxlIGVycm9yIHJlY292ZXJ5IGFwcHJvYWNoIGF2YWlsYWJsZSBkdWUgdG8gaW50ZXJuYWwgc3lzdGVtIGZhaWx1cmUuJywgbnVsbCwgbnVsbCwgZmFsc2UpO1xuICAgICAgICAgICAgICAgIHJldHZhbCA9IHRoaXMucGFyc2VFcnJvcihwLmVyclN0ciwgcCwgdGhpcy5KaXNvblBhcnNlckVycm9yKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy8gc2hpZnQ6XG4gICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgc3RhY2tbc3BdID0gc3ltYm9sO1xuICAgICAgICAgICAgICAgIHZzdGFja1tzcF0gPSBsZXhlci55eXRleHQ7XG4gICAgICAgICAgICAgICAgbHN0YWNrW3NwXSA9IGNvcHlfeXlsbG9jKGxleGVyLnl5bGxvYyk7XG4gICAgICAgICAgICAgICAgc3N0YWNrW3NwXSA9IG5ld1N0YXRlOyAvLyBwdXNoIHN0YXRlXG5cbiAgICAgICAgICAgICAgICArK3NwO1xuICAgICAgICAgICAgICAgIHN5bWJvbCA9IDA7XG5cblxuICAgICAgICAgICAgICAgICAgICAvLyBQaWNrIHVwIHRoZSBsZXhlciBkZXRhaWxzIGZvciB0aGUgY3VycmVudCBzeW1ib2wgYXMgdGhhdCBvbmUgaXMgbm90ICdsb29rLWFoZWFkJyBhbnkgbW9yZTpcblxuXG5cbiAgICAgICAgICAgICAgICAgICAgeXlsb2MgPSBsZXhlci55eWxsb2M7XG5cblxuXG5cblxuXG4gICAgICAgICAgICAgICAgXG5cblxuXG5cbiAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgLy8gcmVkdWNlOlxuICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIHRoaXNfcHJvZHVjdGlvbiA9IHRoaXMucHJvZHVjdGlvbnNfW25ld1N0YXRlIC0gMV07ICAvLyBgdGhpcy5wcm9kdWN0aW9uc19bXWAgaXMgemVyby1iYXNlZCBpbmRleGVkIHdoaWxlIHN0YXRlcyBzdGFydCBmcm9tIDEgdXB3YXJkcy4uLlxuICAgICAgICAgICAgICAgIHl5cnVsZWxlbiA9IHRoaXNfcHJvZHVjdGlvblsxXTtcblxuXG5cblxuXG5cblxuXG5cblxuICAgICAgICAgICAgICAgIHIgPSB0aGlzLnBlcmZvcm1BY3Rpb24uY2FsbCh5eXZhbCwgeXlsb2MsIG5ld1N0YXRlLCBzcCAtIDEsIHZzdGFjaywgbHN0YWNrKTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgciAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dmFsID0gcjtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gcG9wIG9mZiBzdGFja1xuICAgICAgICAgICAgICAgIHNwIC09IHl5cnVsZWxlbjtcblxuICAgICAgICAgICAgICAgIC8vIGRvbid0IG92ZXJ3cml0ZSB0aGUgYHN5bWJvbGAgdmFyaWFibGU6IHVzZSBhIGxvY2FsIHZhciB0byBzcGVlZCB0aGluZ3MgdXA6XG4gICAgICAgICAgICAgICAgdmFyIG50c3ltYm9sID0gdGhpc19wcm9kdWN0aW9uWzBdOyAgICAvLyBwdXNoIG5vbnRlcm1pbmFsIChyZWR1Y2UpXG4gICAgICAgICAgICAgICAgc3RhY2tbc3BdID0gbnRzeW1ib2w7XG4gICAgICAgICAgICAgICAgdnN0YWNrW3NwXSA9IHl5dmFsLiQ7XG4gICAgICAgICAgICAgICAgbHN0YWNrW3NwXSA9IHl5dmFsLl8kO1xuICAgICAgICAgICAgICAgIC8vIGdvdG8gbmV3IHN0YXRlID0gdGFibGVbU1RBVEVdW05PTlRFUk1JTkFMXVxuICAgICAgICAgICAgICAgIG5ld1N0YXRlID0gdGFibGVbc3N0YWNrW3NwIC0gMV1dW250c3ltYm9sXTtcbiAgICAgICAgICAgICAgICBzc3RhY2tbc3BdID0gbmV3U3RhdGU7XG4gICAgICAgICAgICAgICAgKytzcDtcblxuXG5cblxuXG5cblxuXG5cbiAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgLy8gYWNjZXB0OlxuICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgIHJldHZhbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgLy8gUmV0dXJuIHRoZSBgJGFjY2VwdGAgcnVsZSdzIGAkJGAgcmVzdWx0LCBpZiBhdmFpbGFibGUuXG4gICAgICAgICAgICAgICAgLy9cbiAgICAgICAgICAgICAgICAvLyBBbHNvIG5vdGUgdGhhdCBKSVNPTiBhbHdheXMgYWRkcyB0aGlzIHRvcC1tb3N0IGAkYWNjZXB0YCBydWxlICh3aXRoIGltcGxpY2l0LFxuICAgICAgICAgICAgICAgIC8vIGRlZmF1bHQsIGFjdGlvbik6XG4gICAgICAgICAgICAgICAgLy9cbiAgICAgICAgICAgICAgICAvLyAgICAgJGFjY2VwdDogPHN0YXJ0U3ltYm9sPiAkZW5kXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAleyAkJCA9ICQxOyBAJCA9IEAxOyAlfVxuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gd2hpY2gsIGNvbWJpbmVkIHdpdGggdGhlIHBhcnNlIGtlcm5lbCdzIGAkYWNjZXB0YCBzdGF0ZSBiZWhhdmlvdXIgY29kZWQgYmVsb3csXG4gICAgICAgICAgICAgICAgLy8gd2lsbCBwcm9kdWNlIHRoZSBgJCRgIHZhbHVlIG91dHB1dCBvZiB0aGUgPHN0YXJ0U3ltYm9sPiBydWxlIGFzIHRoZSBwYXJzZSByZXN1bHQsXG4gICAgICAgICAgICAgICAgLy8gSUZGIHRoYXQgcmVzdWx0IGlzICpub3QqIGB1bmRlZmluZWRgLiAoU2VlIGFsc28gdGhlIHBhcnNlciBrZXJuZWwgY29kZS4pXG4gICAgICAgICAgICAgICAgLy9cbiAgICAgICAgICAgICAgICAvLyBJbiBjb2RlOlxuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAle1xuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgIEAkID0gQDE7ICAgICAgICAgICAgLy8gaWYgbG9jYXRpb24gdHJhY2tpbmcgc3VwcG9ydCBpcyBpbmNsdWRlZFxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgJDEgIT09ICd1bmRlZmluZWQnKVxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJDE7XG4gICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsgICAgICAgICAgIC8vIHRoZSBkZWZhdWx0IHBhcnNlIHJlc3VsdCBpZiB0aGUgcnVsZSBhY3Rpb25zIGRvbid0IHByb2R1Y2UgYW55dGhpbmdcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICV9XG4gICAgICAgICAgICAgICAgc3AtLTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZzdGFja1tzcF0gIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHZhbCA9IHZzdGFja1tzcF07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbi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CBzaW5jZSB0aGUgbGFzdCBjbGVhbnVwICBcbiAgICBfX2RlY29tcHJlc3NlZDogZmFsc2UsICAgICAgICAgICAgICAgICAgICAgIC8vLyBJTlRFUk5BTCBVU0UgT05MWTogbWFyayB3aGV0aGVyIHRoZSBsZXhlciBpbnN0YW5jZSBoYXMgYmVlbiAndW5mb2xkZWQnIGNvbXBsZXRlbHkgYW5kIGlzIG5vdyByZWFkeSBmb3IgdXNlICBcbiAgICBkb25lOiBmYWxzZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vLyBJTlRFUk5BTCBVU0UgT05MWSAgXG4gICAgX2JhY2t0cmFjazogZmFsc2UsICAgICAgICAgICAgICAgICAgICAgICAgICAvLy8gSU5URVJOQUwgVVNFIE9OTFkgIFxuICAgIF9pbnB1dDogJycsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8vIElOVEVSTkFMIFVTRSBPTkxZICBcbiAgICBfbW9yZTogZmFsc2UsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vLyBJTlRFUk5BTCBVU0UgT05MWSAgXG4gICAgX3NpZ25hbGVkX2Vycm9yX3Rva2VuOiBmYWxzZSwgICAgICAgICAgICAgICAvLy8gSU5URVJOQUwgVVNFIE9OTFkgIFxuICAgIGNvbmRpdGlvblN0YWNrOiBbXSwgICAgICAgICAgICAgICAgICAgICAgICAgLy8vIElOVEVSTkFMIFVTRSBPTkxZOyBtYW5hZ2VkIHZpYSBgcHVzaFN0YXRlKClgLCBgcG9wU3RhdGUoKWAsIGB0b3BTdGF0ZSgpYCBhbmQgYHN0YXRlU3RhY2tTaXplKClgICBcbiAgICBtYXRjaDogJycsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vLyBSRUFELU9OTFkgRVhURVJOQUwgQUNDRVNTIC0gQURWQU5DRUQgVVNFIE9OTFk6IHRyYWNrcyBpbnB1dCB3aGljaCBoYXMgYmVlbiBtYXRjaGVkIHNvIGZhciBmb3Igd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O1xuICAgICAgICB2YXIgY2gyID0gdGhpcy5faW5wdXRbMV07XG5cbiAgICAgICAgaWYgKGNoMiA9PT0gJ1xcbicpIHtcbiAgICAgICAgICBzbGljZV9sZW4rKztcbiAgICAgICAgICBjaCArPSBjaDI7XG4gICAgICAgICAgdGhpcy55eXRleHQgKz0gY2gyO1xuICAgICAgICAgIHRoaXMueXlsZW5nKys7XG4gICAgICAgICAgdGhpcy5vZmZzZXQrKztcbiAgICAgICAgICB0aGlzLm1hdGNoICs9IGNoMjtcbiAgICAgICAgICB0aGlzLm1hdGNoZWQgKz0gY2gyO1xuICAgICAgICAgIHRoaXMueXlsbG9jLnJhbmdlWzFdKys7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGxpbmVzKSB7XG4gICAgICAgIHRoaXMueXlsaW5lbm8rKztcbiAgICAgICAgdGhpcy55eWxsb2MubGFzdF9saW5lKys7XG4gICAgICAgIHRoaXMueXlsbG9jLmxhc3RfY29sdW1uID0gMDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMueXlsbG9jLmxhc3RfY29sdW1uKys7XG4gICAgICB9XG5cbiAgICAgIHRoaXMueXlsbG9jLnJhbmdlWzFdKys7XG4gICAgICB0aGlzLl9pbnB1dCA9IHRoaXMuX2lucHV0LnNsaWNlKHNsaWNlX2xlbik7XG4gICAgICByZXR1cm4gY2g7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHVuc2hpZnRzIG9uZSBjaGFyIChvciBhbiBlbnRpcmUgc3RyaW5nKSBpbnRvIHRoZSBpbnB1dFxuICAgICAqIFxuICAgICAqIEBwdWJsaWNcbiAgICAgKiBAdGhpcyB7UmVnRXhwTGV4ZXJ9XG4gICAgICovXG4gICAgdW5wdXQ6IGZ1bmN0aW9uIGxleGVyX3VucHV0KGNoKSB7XG4gICAgICB2YXIgbGVuID0gY2gubGVuZ3RoO1xuICAgICAgdmFyIGxpbmVzID0gY2guc3BsaXQoLyg/Olxcclxc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cicgdG9rZW4gdG8gYmUgcHJvZHVjZWQgZm9yIHRoZSBjdXJyZW50XG4gICAgICAgIC8vIGAubGV4KClgIHJ1bi5cbiAgICAgICAgdmFyIGxpbmVub19tc2cgPSAnJztcblxuICAgICAgICBpZiAodGhpcy5vcHRpb25zLnRyYWNrUG9zaXRpb24pIHtcbiAgICAgICAgICBsaW5lbm9fbXNnID0gJyBvbiBsaW5lICcgKyAodGhpcy55eWxpbmVubyArIDEpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHBvc19zdHIgPSAnJztcblxuICAgICAgICBpZiAodHlwZW9mIHRoaXMuc2hvd1Bvc2l0aW9uID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgcG9zX3N0ciA9IHRoaXMuc2hvd1Bvc2l0aW9uKCk7XG5cbiAgICAgICAgICBpZiAocG9zX3N0ciAmJiBwb3Nfc3RyWzBdICE9PSAnXFxuJykge1xuICAgICAgICAgICAgcG9zX3N0ciA9ICdcXG4nICsgcG9zX3N0cjtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcCA9IHRoaXMuY29uc3RydWN0TGV4RXJyb3JJbmZvKFxuICAgICAgICAgICdMZXhpY2FsIGVycm9yJyArIGxpbmVub19tc2cgKyAnOiBZb3UgY2FuIG9ubHkgaW52b2tlIHJlamVjdCgpIGluIHRoZSBsZXhlciB3aGVuIHRoZSBsZXhlciBpcyBvZiB0aGUgYmFja3RyYWNraW5nIHBlcnN1YXNpb24gKG9wdGlvbnMuYmFja3RyYWNrX2xleGVyID0gdHJ1ZSkuJyArIHBvc19zdHIsXG4gICAgICAgICAgZmFsc2VcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLl9zaWduYWxlZF9lcnJvcl90b2tlbiA9IHRoaXMucGFyc2VFcnJvcihwLmVyclN0ciwgcCwgdGhpcy5KaXNvbkxleGVyRXJyb3IpIHx8IHRoaXMuRVJST1I7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB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LnNsaWNlKGwwIC0gMSwgbDEgKyAxKS5tYXAoZnVuY3Rpb24gaW5qZWN0TGluZU51bWJlcihsaW5lLCBpbmRleCkge1xuICAgICAgICB2YXIgbG5vID0gaW5kZXggKyBsMDtcbiAgICAgICAgdmFyIGxub19wZnggPSAod3NfcHJlZml4ICsgbG5vKS5zdWJzdHIoLWxpbmVub19kaXNwbGF5X3dpZHRoKTtcbiAgICAgICAgdmFyIHJ2ID0gbG5vX3BmeCArICc6ICcgKyBsaW5lO1xuICAgICAgICB2YXIgZXJycGZ4ID0gbmV3IEFycmF5KGxpbmVub19kaXNwbGF5X3dpZHRoICsgMSkuam9pbignXicpO1xuXG4gICAgICAgIGlmIChsbm8gPT09IGxvYy5maXJzdF9saW5lKSB7XG4gICAgICAgICAgdmFyIG9mZnNldCA9IGxvYy5maXJzdF9jb2x1bW4gKyAyO1xuXG4gICAgICAgICAgdmFyIGxlbiA9IE1hdGgubWF4KFxuICAgICAgICAgICAgMixcbiAgICAgICAgICAgICgobG5vID09PSBsb2MubGFzdF9saW5lID8gbG9jLmxhc3RfY29sdW1uIDogbGluZS5sZW5ndGgpKSAtIGxvYy5maXJzdF9jb2x1bW4gKyAxXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIHZhciBsZWFkID0gbmV3IEFycmF5KG9mZnNldCkuam9pbignLicpO1xuICAgICAgICAgIHZhciBtYXJrID0gbmV3IEFycmF5KGxlbikuam9pbignXicpO1xuICAgICAgICAgIHJ2ICs9ICdcXG4nICsgZXJycGZ4ICsgbGVhZCArIG1hcms7XG5cbiAgICAgICAgICBpZiAobGluZS50cmltKCkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgbm9uZW1wdHlfbGluZV9pbmRleGVzLnB1c2goaW5kZXgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChsbm8gPT09IGxvYy5sYXN0X2xpbmUpIHtcbiAgICAgICAgICB2YXIgb2Zmc2V0ID0gMiArIDE7XG4gICAgICAgICAgdmFyIGxlbiA9IE1hdGgubWF4KDIsIGxvYy5sYXN0X2NvbHVtbiArIDEpO1xuICAgICAgICAgIHZhciBsZWFkID0gbmV3IEFycmF5KG9mZnNldCkuam9pbignLicpO1xuICAgICAgICAgIHZhciBtYXJrID0gbmV3IEFycmF5KGxlbikuam9pbignXicpO1xuICAgICAgICAgIHJ2ICs9ICdcXG4nICsgZXJycGZ4ICsgbGVhZCArIG1hcms7XG5cbiAgICAgICAgICBpZiAobGluZS50cmltKCkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgbm9uZW1wdHlfbGluZV9pbmRleGVzLnB1c2goaW5kZXgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChsbm8gPiBsb2MuZmlyc3RfbGluZSAmJiBsbm8gPCBsb2MubGFzdF9saW5lKSB7XG4gICAgICAgICAgdmFyIG9mZnNldCA9IDIgKyAxO1xuICAgICAgICAgIHZhciBsZW4gPSBNYXRoLm1heCgyLCBsaW5lLmxlbmd0aCArIDEpO1xuICAgICAgICAgIHZhciBsZWFkID0gbmV3IEFycmF5KG9mZnNldCkuam9pbignLicpO1xuICAgICAgICAgIHZhciBtYXJrID0gbmV3IEFycmF5KGxlbikuam9pbignXicpO1xuICAgICAgICAgIHJ2ICs9ICdcXG4nICsgZXJycGZ4ICsgbGVhZCArIG1hcms7XG5cbiAgICAgICAgICBpZiAobGluZS50cmltKCkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgbm9uZW1wdHlfbGluZV9pbmRleGVzLnB1c2goaW5kZXgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJ2ID0gcnYucmVwbGFjZSgvXFx0L2csICcgJyk7XG4gICAgICAgIHJldHVybiBydjtcbiAgICAgIH0pO1xuXG4gICAgICAvLyBub3cgbWFrZSBzdXJlIHdlIGRvbid0IHByaW50IGFuIG92ZXJseSBsYXJnZSBhbW91bnQgb2YgZXJyb3IgYXJlYTogbGltaXQgaXQgXG4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ICovXG4gICAgICAgIHJldHVybjtcblxuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA1OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHslICovXG4gICAgICAgIHRoaXMuYmVnaW4oJ0NPTlRST0wnKTtcblxuICAgICAgICByZXR1cm4gMjg7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDY6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIDwhLS0gKi9cbiAgICAgICAgdGhpcy5iZWdpbignQ09NTUVOVCcpO1xuXG4gICAgICAgIHJldHVybjtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgNzpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBJTklUSUFMICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgPCAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdUQUcnKTtcblxuICAgICAgICByZXR1cm4gMTM7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDg6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIFxce1xceyAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdFWFBSRVNTSU9OJyk7XG5cbiAgICAgICAgcmV0dXJuIDM5O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAxNzpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXC8+ICovXG4gICAgICAgIHRoaXMucG9wU3RhdGUoKTtcblxuICAgICAgICByZXR1cm4gMzg7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDE5OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IFRBRyAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgID4gKi9cbiAgICAgICAgdGhpcy5iZWdpbignQ0hJTERSRU4nKTtcblxuICAgICAgICByZXR1cm4gMTQ7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDIwOlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IFRBRyAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIFxce1xceyAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdFWFBSRVNTSU9OJyk7XG5cbiAgICAgICAgcmV0dXJuIDM5O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAyMzpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDSElMRFJFTiAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIFxce1xceyAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdFWFBSRVNTSU9OJyk7XG5cbiAgICAgICAgcmV0dXJuIDM5O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAyNDpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDSElMRFJFTiAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIFxceyUgKi9cbiAgICAgICAgdGhpcy5iZWdpbignQ09OVFJPTCcpO1xuXG4gICAgICAgIHJldHVybiAyODtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgMjU6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogQ0hJTERSRU4gKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICA8IS0tICovXG4gICAgICAgIHRoaXMuYmVnaW4oJ0NPTU1FTlQnKTtcblxuICAgICAgICByZXR1cm47XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDI2OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IENISUxEUkVOICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgPFxcLyAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdUQUcnKTtcblxuICAgICAgICByZXR1cm4gMzc7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDI3OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IENISUxEUkVOICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgPCAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdUQUcnKTtcblxuICAgICAgICByZXR1cm4gMTM7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDU3OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICA9ICovXG4gICAgICAgIHRoaXMucG9wU3RhdGUoKTtcblxuICAgICAgICB0aGlzLmJlZ2luKCdDT05UUk9MX0NISUxEJyk7XG4gICAgICAgIHJldHVybiA5O1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA2MDpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgJVxcfSAqL1xuICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG5cbiAgICAgICAgcmV0dXJuIDMwO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA2MzpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MX0NISUxEICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgPCAqL1xuICAgICAgICB0aGlzLmJlZ2luKCdUQUcnKTtcblxuICAgICAgICByZXR1cm4gMTM7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDY0OlxuICAgICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0xfQ0hJTEQgKi9cbiAgICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHtcXHsgKi9cbiAgICAgICAgdGhpcy5iZWdpbignRVhQUkVTU0lPTicpO1xuXG4gICAgICAgIHJldHVybiAzOTtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgNjU6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTF9DSElMRCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgICVcXH0gKi9cbiAgICAgICAgdGhpcy5wb3BTdGF0ZSgpO1xuXG4gICAgICAgIHJldHVybiAzMDtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgODM6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogRVhQUkVTU0lPTiAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIFxcfVxcfSAqL1xuICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG5cbiAgICAgICAgcmV0dXJuIDQwO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSA4NjpcbiAgICAgICAgLyohIENvbmRpdGlvbnM6OiBDT01NRU5UICovXG4gICAgICAgIC8qISBSdWxlOjogICAgICAgKC58XFxyfFxcbikqPy0tPiAqL1xuICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAxMTU6XG4gICAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgICAvKiEgUnVsZTo6ICAgICAgIC4gKi9cbiAgICAgICAgY29uc29sZS5sb2coJycsIHl5Xy55eXRleHQpO1xuXG4gICAgICAgIC8qIGBmbGV4YCBsZXhpbmcgbW9kZTogdGhlIGxhc3QgcmVzb3J0IHJ1bGUhICovXG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICByZXR1cm4gdGhpcy5zaW1wbGVDYXNlQWN0aW9uQ2x1c3RlcnNbeXlydWxlbnVtYmVyXTtcbiAgICAgIH1cbiAgICB9LFxuXG4gICAgc2ltcGxlQ2FzZUFjdGlvbkNsdXN0ZXJzOiB7XG4gICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgaW1wb3J0ICovXG4gICAgICAxOiAyNSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBJTklUSUFMICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGZyb20gKi9cbiAgICAgIDI6IDI2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgdXNpbmcgKi9cbiAgICAgIDM6ICdVU0lORycsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBhcyAqL1xuICAgICAgNDogMjcsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogSU5JVElBTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7Q29uc3RydWN0b3J9ICovXG4gICAgICA5OiA1NixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBJTklUSUFMICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtJZGVudGlmaWVyfSAqL1xuICAgICAgMTA6IDU1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IElOSVRJQUwgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx7ICovXG4gICAgICAxMTogNCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBJTklUSUFMICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcfSAqL1xuICAgICAgMTI6IDUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogVEFHICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHRydWUgKi9cbiAgICAgIDEzOiA1MyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZmFsc2UgKi9cbiAgICAgIDE0OiA1NCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge0NvbnN0cnVjdG9yfSAqL1xuICAgICAgMTU6IDU2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IFRBRyAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7SWRlbnRpZmllcn0gKi9cbiAgICAgIDE2OiA1NSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBUQUcgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFwvICovXG4gICAgICAxODogJ05PU0UnLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IFRBRyAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHsgKi9cbiAgICAgIDIxOiA0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IFRBRyAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXH0gKi9cbiAgICAgIDIyOiA1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENISUxEUkVOICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxceyAqL1xuICAgICAgMjg6IDQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ0hJTERSRU4gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx9ICovXG4gICAgICAyOTogNSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDSElMRFJFTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBbXi88PnslfV0rICovXG4gICAgICAzMDogNDcsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBtYWluICovXG4gICAgICAzMTogMjksXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBlbmRtYWluICovXG4gICAgICAzMjogMzEsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBtYWNybyAqL1xuICAgICAgMzM6ICdNQUNSTycsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBlbmRtYWNybyAqL1xuICAgICAgMzQ6ICdFTkRNQUNSTycsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBmb3IgKi9cbiAgICAgIDM1OiA0MSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGVuZGZvciAqL1xuICAgICAgMzY6IDQzLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgaWYgKi9cbiAgICAgIDM3OiA0NSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGVuZGlmICovXG4gICAgICAzODogNDYsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBlbHNlICovXG4gICAgICAzOTogNDQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBlbHNlaWYgKi9cbiAgICAgIDQwOiAnRUxTRUlGJyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGluICovXG4gICAgICA0MTogNDIsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBjYXNlICovXG4gICAgICA0MjogJ0NBU0UnLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZW5kY2FzZSAqL1xuICAgICAgNDM6ICdFTkRDQVNFJyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGV4cG9ydCAqL1xuICAgICAgNDQ6IDMyLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZnJvbSAqL1xuICAgICAgNDU6IDI2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgdmlldyAqL1xuICAgICAgNDY6IDMzLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgdXNpbmcgKi9cbiAgICAgIDQ3OiAnVVNJTkcnLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZW5kdmlldyAqL1xuICAgICAgNDg6IDM0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgaW5zdGFuY2VvZiAqL1xuICAgICAgNDk6IDYzLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgdGhpcyAqL1xuICAgICAgNTA6ICdUSElTJyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGZ1biAqL1xuICAgICAgNTE6IDM1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZW5kZnVuICovXG4gICAgICA1MjogMzYsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBhcyAqL1xuICAgICAgNTM6IDI3LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgOjogKi9cbiAgICAgIDU0OiAnOjonLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgQCAqL1xuICAgICAgNTU6IDE5LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFwoXFwpICovXG4gICAgICA1NjogJygpJyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtDb25zdHJ1Y3Rvcn0gKi9cbiAgICAgIDU4OiA1NixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtJZGVudGlmaWVyfSAqL1xuICAgICAgNTk6IDU1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IENPTlRST0wgKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx7ICovXG4gICAgICA2MTogNCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcfSAqL1xuICAgICAgNjI6IDUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTF9DSElMRCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7Q29uc3RydWN0b3J9ICovXG4gICAgICA2NjogNTYsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTF9DSElMRCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB7SWRlbnRpZmllcn0gKi9cbiAgICAgIDY3OiA1NSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBDT05UUk9MX0NISUxEICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxceyAqL1xuICAgICAgNjg6IDQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogQ09OVFJPTF9DSElMRCAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXH0gKi9cbiAgICAgIDY5OiA1LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx8ICovXG4gICAgICA3MDogMTUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogRVhQUkVTU0lPTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA9PiAqL1xuICAgICAgNzE6IDUwLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgLT4gKi9cbiAgICAgIDcyOiAnLT4nLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgQCAqL1xuICAgICAgNzM6IDE5LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgaW5zdGFuY2VvZiAqL1xuICAgICAgNzQ6IDYzLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgdHJ1ZSAqL1xuICAgICAgNzU6IDUzLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgZmFsc2UgKi9cbiAgICAgIDc2OiA1NCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiBFWFBSRVNTSU9OICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIGlmICovXG4gICAgICA3NzogNDUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogRVhQUkVTU0lPTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICB0aGVuICovXG4gICAgICA3ODogNDgsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogRVhQUkVTU0lPTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBlbHNlICovXG4gICAgICA3OTogNDQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogRVhQUkVTU0lPTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBhcyAqL1xuICAgICAgODA6IDI3LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge0NvbnN0cnVjdG9yfSAqL1xuICAgICAgODE6IDU2LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge0lkZW50aWZpZXJ9ICovXG4gICAgICA4MjogNTUsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogRVhQUkVTU0lPTiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXHsgKi9cbiAgICAgIDg0OiA0LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6IEVYUFJFU1NJT04gKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFx9ICovXG4gICAgICA4NTogNSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIHtOdW1iZXJMaXRlcmFsfSAqL1xuICAgICAgODc6IDUyLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAge1N0cmluZ0xpdGVyYWx9ICovXG4gICAgICA4ODogNTEsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA+ICovXG4gICAgICA4OTogMTQsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA8ICovXG4gICAgICA5MDogMTMsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXCggKi9cbiAgICAgIDkxOiA3LFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFwpICovXG4gICAgICA5MjogOCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcWyAqL1xuICAgICAgOTM6IDEwLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgXFxdICovXG4gICAgICA5NDogMTEsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA7ICovXG4gICAgICA5NTogMjAsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA6ICovXG4gICAgICA5NjogMTIsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA9ICovXG4gICAgICA5NzogOSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgID09ICovXG4gICAgICA5ODogNTksXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICAhPSAqL1xuICAgICAgOTk6IDYwLFxuXG4gICAgICAvKiEgQ29uZGl0aW9uczo6ICogKi9cbiAgICAgIC8qISBSdWxlOjogICAgICAgPj0gKi9cbiAgICAgIDEwMDogNTcsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICA8PSAqL1xuICAgICAgMTAxOiA1OCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcKyAqL1xuICAgICAgMTAyOiAyMSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIC0gKi9cbiAgICAgIDEwMzogMjMsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXCogKi9cbiAgICAgIDEwNDogMyxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcLyAqL1xuICAgICAgMTA1OiAyMixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcXFwgKi9cbiAgICAgIDEwNjogNDksXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICAmJiAqL1xuICAgICAgMTA3OiA2MSxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcfFxcfCAqL1xuICAgICAgMTA4OiA2MixcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgIFxcXiAqL1xuICAgICAgMTA5OiAyNCxcblxuICAgICAgLyohIENvbmRpdGlvbnM6OiAqICovXG4gICAgICAvKiEgUnVsZTo6ICAgICAgICEgKi9cbiAgICAgIDExMDogMTYsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICAsICovXG4gICAgICAxMTE6IDYsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXD8gKi9cbiAgICAgIDExMjogMTgsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICBcXC4gKi9cbiAgICAgIDExMzogMTcsXG5cbiAgICAgIC8qISBDb25kaXRpb25zOjogKiAqL1xuICAgICAgLyohIFJ1bGU6OiAgICAgICAkICovXG4gICAgICAxMTQ6IDFcbiAgICB9LFxuXG4gICAgcnVsZXM6IFtcbiAgICAgIC8qICAgMDogKi8gIC9eKD86XFxzKykvLFxuICAgICAgLyogICAxOiAqLyAgL14oPzppbXBvcnQpLyxcbiAgICAgIC8qICAgMjogKi8gIC9eKD86ZnJvbSkvLFxuICAgICAgLyogICAzOiAqLyAgL14oPzp1c2luZykvLFxuICAgICAgLyogICA0OiAqLyAgL14oPzphcykvLFxuICAgICAgLyogICA1OiAqLyAgL14oPzpcXHslKS8sXG4gICAgICAvKiAgIDY6ICovICAvXig/OjwhLS0pLyxcbiAgICAgIC8qICAgNzogKi8gIC9eKD86PCkvLFxuICAgICAgLyogICA4OiAqLyAgL14oPzpcXHtcXHspLyxcbiAgICAgIC8qICAgOTogKi8gIC9eKD86KFtBLVpdW1xcdyRcXC1dKikpLyxcbiAgICAgIC8qICAxMDogKi8gIC9eKD86KFskX2Etel1bXFx3JFxcLV0qKSkvLFxuICAgICAgLyogIDExOiAqLyAgL14oPzpcXHspLyxcbiAgICAgIC8qICAxMjogKi8gIC9eKD86XFx9KS8sXG4gICAgICAvKiAgMTM6ICovICAvXig/OnRydWUpLyxcbiAgICAgIC8qICAxNDogKi8gIC9eKD86ZmFsc2UpLyxcbiAgICAgIC8qICAxNTogKi8gIC9eKD86KFtBLVpdW1xcdyRcXC1dKikpLyxcbiAgICAgIC8qICAxNjogKi8gIC9eKD86KFskX2Etel1bXFx3JFxcLV0qKSkvLFxuICAgICAgLyogIDE3OiAqLyAgL14oPzpcXC8+KS8sXG4gICAgICAvKiAgMTg6ICovICAvXig/OlxcLykvLFxuICAgICAgLyogIDE5OiAqLyAgL14oPzo+KS8sXG4gICAgICAvKiAgMjA6ICovICAvXig/Olxce1xceykvLFxuICAgICAgLyogIDIxOiAqLyAgL14oPzpcXHspLyxcbiAgICAgIC8qICAyMjogKi8gIC9eKD86XFx9KS8sXG4gICAgICAvKiAgMjM6ICovICAvXig/Olxce1xceykvLFxuICAgICAgLyogIDI0OiAqLyAgL14oPzpcXHslKS8sXG4gICAgICAvKiAgMjU6ICovICAvXig/OjwhLS0pLyxcbiAgICAgIC8qICAyNjogKi8gIC9eKD86PFxcLykvLFxuICAgICAgLyogIDI3OiAqLyAgL14oPzo8KS8sXG4gICAgICAvKiAgMjg6ICovICAvXig/OlxceykvLFxuICAgICAgLyogIDI5OiAqLyAgL14oPzpcXH0pLyxcbiAgICAgIC8qICAzMDogKi8gIC9eKD86W15cXC88PnslfV0rKS8sXG4gICAgICAvKiAgMzE6ICovICAvXig/Om1haW4pLyxcbiAgICAgIC8qICAzMjogKi8gIC9eKD86ZW5kbWFpbikvLFxuICAgICAgLyogIDMzOiAqLyAgL14oPzptYWNybykvLFxuICAgICAgLyogIDM0OiAqLyAgL14oPzplbmRtYWNybykvLFxuICAgICAgLyogIDM1OiAqLyAgL14oPzpmb3IpLyxcbiAgICAgIC8qICAzNjogKi8gIC9eKD86ZW5kZm9yKS8sXG4gICAgICAvKiAgMzc6ICovICAvXig/OmlmKS8sXG4gICAgICAvKiAgMzg6ICovICAvXig/OmVuZGlmKS8sXG4gICAgICAvKiAgMzk6ICovICAvXig/OmVsc2UpLyxcbiAgICAgIC8qICA0MDogKi8gIC9eKD86ZWxzZWlmKS8sXG4gICAgICAvKiAgNDE6ICovICAvXig/OmluKS8sXG4gICAgICAvKiAgNDI6ICovICAvXig/OmNhc2UpLyxcbiAgICAgIC8qICA0MzogKi8gIC9eKD86ZW5kY2FzZSkvLFxuICAgICAgLyogIDQ0OiAqLyAgL14oPzpleHBvcnQpLyxcbiAgICAgIC8qICA0NTogKi8gIC9eKD86ZnJvbSkvLFxuICAgICAgLyogIDQ2OiAqLyAgL14oPzp2aWV3KS8sXG4gICAgICAvKiAgNDc6ICovICAvXig/OnVzaW5nKS8sXG4gICAgICAvKiAgNDg6ICovICAvXig/OmVuZHZpZXcpLyxcbiAgICAgIC8qICA0OTogKi8gIC9eKD86aW5zdGFuY2VvZikvLFxuICAgICAgLyogIDUwOiAqLyAgL14oPzp0aGlzKS8sXG4gICAgICAvKiAgNTE6ICovICAvXig/OmZ1bikvLFxuICAgICAgLyogIDUyOiAqLyAgL14oPzplbmRmdW4pLyxcbiAgICAgIC8qICA1MzogKi8gIC9eKD86YXMpLyxcbiAgICAgIC8qICA1NDogKi8gIC9eKD86OjopLyxcbiAgICAgIC8qICA1NTogKi8gIC9eKD86QCkvLFxuICAgICAgLyogIDU2OiAqLyAgL14oPzpcXChcXCkpLyxcbiAgICAgIC8qICA1NzogKi8gIC9eKD86PSkvLFxuICAgICAgLyogIDU4OiAqLyAgL14oPzooW0EtWl1bXFx3JFxcLV0qKSkvLFxuICAgICAgLyogIDU5OiAqLyAgL14oPzooWyRfYS16XVtcXHckXFwtXSopKS8sXG4gICAgICAvKiAgNjA6ICovICAvXig/OiVcXH0pLyxcbiAgICAgIC8qICA2MTogKi8gIC9eKD86XFx7KS8sXG4gICAgICAvKiAgNjI6ICovICAvXig/OlxcfSkvLFxuICAgICAgLyogIDYzOiAqLyAgL14oPzo8KS8sXG4gICAgICAvKiAgNjQ6ICovICAvXig/Olxce1xceykvLFxuICAgICAgLyogIDY1OiAqLyAgL14oPzolXFx9KS8sXG4gICAgICAvKiAgNjY6ICovICAvXig/OihbQS1aXVtcXHckXFwtXSopKS8sXG4gICAgICAvKiAgNjc6ICovICAvXig/OihbJF9hLXpdW1xcdyRcXC1dKikpLyxcbiAgICAgIC8qICA2ODogKi8gIC9eKD86XFx7KS8sXG4gICAgICAvKiAgNjk6ICovICAvXig/OlxcfSkvLFxuICAgICAgLyogIDcwOiAqLyAgL14oPzpcXHwpLyxcbiAgICAgIC8qICA3MTogKi8gIC9eKD86PT4pLyxcbiAgICAgIC8qICA3MjogKi8gIC9eKD86LT4pLyxcbiAgICAgIC8qICA3MzogKi8gIC9eKD86QCkvLFxuICAgICAgLyogIDc0OiAqLyAgL14oPzppbnN0YW5jZW9mKS8sXG4gICAgICAvKiAgNzU6ICovICAvXig/OnRydWUpLyxcbiAgICAgIC8qICA3NjogKi8gIC9eKD86ZmFsc2UpLyxcbiAgICAgIC8qICA3NzogKi8gIC9eKD86aWYpLyxcbiAgICAgIC8qICA3ODogKi8gIC9eKD86dGhlbikvLFxuICAgICAgLyogIDc5OiAqLyAgL14oPzplbHNlKS8sXG4gICAgICAvKiAgODA6ICovICAvXig/OmFzKS8sXG4gICAgICAvKiAgODE6ICovICAvXig/OihbQS1aXVtcXHckXFwtXSopKS8sXG4gICAgICAvKiAgODI6ICovICAvXig/OihbJF9hLXpdW1xcdyRcXC1dKikpLyxcbiAgICAgIC8qICA4MzogKi8gIC9eKD86XFx9XFx9KS8sXG4gICAgICAvKiAgODQ6ICovICAvXig/OlxceykvLFxuICAgICAgLyogIDg1OiAqLyAgL14oPzpcXH0pLyxcbiAgICAgIC8qICA4NjogKi8gIC9eKD86KC58XFxyfFxcbikqPy0tPikvLFxuICAgICAgLyogIDg3OiAqLyAgL14oPzooKD86KFstXT8oPzpbLV0/KFswXXwoKD86WzEtOV0pKD86XFxkKykqKSkpXFwuKD86XFxkKykqKD86KD86W0VlXSkoPzpbKy1dP1xcZCspKT8pfChcXC4oPzpcXGQrKSg/Oig/OltFZV0pKD86WystXT9cXGQrKSk/KXwoKD86Wy1dPyhbMF18KCg/OlsxLTldKSg/OlxcZCspKikpKSg/Oig/OltFZV0pKD86WystXT9cXGQrKSk/KSl8KD86WzBdW1h4XSg/OltcXGRBLUZhLWZdKSspfCg/OlswXSg/OlswLTddKSspKSkvLFxuICAgICAgLyogIDg4OiAqLyAgL14oPzooKFwiKD86KFteXFxuXFxyXCJcXFxcXSspfChcXFxcKD86KD86KD86W1wiJ1xcXFxiZm5ydHZdKXwoPzpbXlxcZFwiJ1xcXFxiZm5ydC12eF0pKXwoPzooPzpb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LyxcbiAgICAgIC8qIDEwMDogKi8gIC9eKD86Pj0pLyxcbiAgICAgIC8qIDEwMTogKi8gIC9eKD86PD0pLyxcbiAgICAgIC8qIDEwMjogKi8gIC9eKD86XFwrKS8sXG4gICAgICAvKiAxMDM6ICovICAvXig/Oi0pLyxcbiAgICAgIC8qIDEwNDogKi8gIC9eKD86XFwqKS8sXG4gICAgICAvKiAxMDU6ICovICAvXig/OlxcLykvLFxuICAgICAgLyogMTA2OiAqLyAgL14oPzpcXFxcKS8sXG4gICAgICAvKiAxMDc6ICovICAvXig/OiYmKS8sXG4gICAgICAvKiAxMDg6ICovICAvXig/OlxcfFxcfCkvLFxuICAgICAgLyogMTA5OiAqLyAgL14oPzpcXF4pLyxcbiAgICAgIC8qIDExMDogKi8gIC9eKD86ISkvLFxuICAgICAgLyogMTExOiAqLyAgL14oPzosKS8sXG4gICAgICAvKiAxMTI6ICovICAvXig/OlxcPykvLFxuICAgICAgLyogMTEzOiAqLyAgL14oPzpcXC4pLyxcbiAgICAgIC8qIDExNDogKi8gIC9eKD86JCkvLFxuICAgICAgLyogMTE1OiAqLyAgL14oPzouKS9cbiAgICBdLFxuXG4gICAgY29uZGl0aW9uczoge1xuICAgICAgJ0NISUxEUkVOJzoge1xuICAgICAgICBydWxlczogW1xuICAgICAgICAgIDAsXG4gICAgICAgICAgMjMsXG4gICAgICAgICAgMjQsXG4gICAgICAgICAgMjUsXG4gICAgICAgICAgMjYsXG4gICAgICAgICAgMjcsXG4gICAgICAgICAgMjgsXG4gICAgICAgICAgMjksXG4gICAgICAgICAgMzAsXG4gICAgICAgICAgODcsXG4gICAgICAgICAgODgsXG4gICAgICAgICAgODksXG4gICAgICAgICAgOTAsXG4gICAgICAgICAgOTEsXG4gICAgICAgICAgOTIsXG4gICAgICAgICAgOTMsXG4gICAgICAgICAgOTQsXG4gICAgICAgICAgOTUsXG4gICAgICAgICAgOTYsXG4gICAgICAgICAgOTcsXG4gICAgICAgICAgOTgsXG4gICAgICAgICAgOTksXG4gICAgICAgICAgMTAwLFxuICAgICAgICAgIDEwMSxcbiAgICAgICAgICAxMDIsXG4gICAgICAgICAgMTAzLFxuICAgICAgICAgIDEwNCxcbiAgICAgICAgICAxMDUsXG4gICAgICAgICAgMTA2LFxuICAgICAgICAgIDEwNyxcbiAgICAgICAgICAxMDgsXG4gICAgICAgICAgMTA5LFxuICAgICAgICAgIDExMCxcbiAgICAgICAgICAxMTEsXG4gICAgICAgICAgMTEyLFxuICAgICAgICAgIDExMyxcbiAgICAgICAgICAxMTRcbiAgICAgICAgXSxcblxuICAgICAgICBpbmNsdXNpdmU6IGZhbHNlXG4gICAgICB9LFxuXG4gICAgICAnQ09NTUVOVCc6IHtcbiAgICAgICAgcnVsZXM6IFtcbiAgICAgICAgICAwLFxuICAgICAgICAgIDg2LFxuICAgICAgICAgIDg3LFxuICAgICAgICAgIDg4LFxuICAgICAgICAgIDg5LFxuICAgICAgICAgIDkwLFxuICAgICAgICAgIDkxLFxuICAgICAgICAgIDkyLFxuICAgICAgICAgIDkzLFxuICAgICAgICAgIDk0LFxuICAgICAgICAgIDk1LFxuICAgICAgICAgIDk2LFxuICAgICAgICAgIDk3LFxuICAgICAgICAgIDk4LFxuICAgICAgICAgIDk5LFxuICAgICAgICAgIDEwMCxcbiAgICAgICAgICAxMDEsXG4gICAgICAgICAgMTAyLFxuICAgICAgICAgIDEwMyxcbiAgICAgICAgICAxMDQsXG4gICAgICAgICAgMTA1LFxuICAgICAgICAgIDEwNixcbiAgICAgICAgICAxMDcsXG4gICAgICAgICAgMTA4LFxuICAgICAgICAgIDEwOSxcbiAgICAgICAgICAxMTAsXG4gICAgICAgICAgMTExLFxuICAgICAgICAgIDExMixcbiAgICAgICAgICAxMTMsXG4gICAgICAgICAgMTE0XG4gICAgICAgIF0sXG5cbiAgICAgICAgaW5jbHVzaXZlOiBmYWxzZVxuICAgICAgfSxcblxuICAgICAgJ0NPTlRST0wnOiB7XG4gICAgICAgIHJ1bGVzOiBbXG4gICAgICAgICAgMCxcbiAgICAgICAgICAzMSxcbiAgICAgICAgICAzMixcbiAgICAgICAgICAzMyxcbiAgICAgICAgICAzNCxcbiAgICAgICAgICAzNSxcbiAgICAgICAgICAzNixcbiAgICAgICAgICAzNyxcbiAgICAgICAgICAzOCxcbiAgICAgICAgICAzOSxcbiAgICAgICAgICA0MCxcbiAgICAgICAgICA0MSxcbiAgICAgICAgICA0MixcbiAgICAgICAgICA0MyxcbiAgICAgICAgICA0NCxcbiAgICAgICAgICA0NSxcbiAgICAgICAgICA0NixcbiAgICAgICAgICA0NyxcbiAgICAgICAgICA0OCxcbiAgICAgICAgICA0OSxcbiAgICAgICAgICA1MCxcbiAgICAgICAgICA1MSxcbiAgICAgICAgICA1MixcbiAgICAgICAgICA1MyxcbiAgICAgICAgICA1NCxcbiAgICAgICAgICA1NSxcbiAgICAgICAgICA1NixcbiAgICAgICAgICA1NyxcbiAgICAgICAgICA1OCxcbiAgICAgICAgICA1OSxcbiAgICAgICAgICA2MCxcbiAgICAgICAgICA2MSxcbiAgICAgICAgICA2MixcbiAgICAgICAgICA4NyxcbiAgICAgICAgICA4OCxcbiAgICAgICAgICA4OSxcbiAgICAgICAgICA5MCxcbiAgICAgICAgICA5MSxcbiAgICAgICAgICA5MixcbiAgICAgICAgICA5MyxcbiAgICAgICAgICA5NCxcbiAgICAgICAgICA5NSxcbiAgICAgICAgICA5NixcbiAgICAgICAgICA5NyxcbiAgICAgICAgICA5OCxcbiAgICAgICAgICA5OSxcbiAgICAgICAgICAxMDAsXG4gICAgICAgICAgMTAxLFxuICAgICAgICAgIDEwMixcbiAgICAgICAgICAxMDMsXG4gICAgICAgICAgMTA0LFxuICAgICAgICAgIDEwNSxcbiAgICAgICAgICAxMDYsXG4gICAgICAgICAgMTA3LFxuICAgICAgICAgIDEwOCxcbiAgICAgICAgICAxMDksXG4gICAgICAgICAgMTEwLFxuICAgICAgICAgIDExMSxcbiAgICAgICAgICAxMTIsXG4gICAgICAgICAgMTEzLFxuICAgICAgICAgIDExNFxuICAgICAgICBdLFxuXG4gICAgICAgIGluY2x1c2l2ZTogZmFsc2VcbiAgICAgIH0sXG5cbiAgICAgICdFWFBSRVNTSU9OJzoge1xuICAgICAgICBydWxlczogW1xuICAgICAgICAgIDAsXG4gICAgICAgICAgNzAsXG4gICAgICAgICAgNzEsXG4gICAgICAgICAgNzIsXG4gICAgICAgICAgNzMsXG4gICAgICAgICAgNzQsXG4gICAgICAgICAgNzUsXG4gICAgICAgICAgNzYsXG4gICAgICAgICAgNzcsXG4gICAgICAgICAgNzgsXG4gICAgICAgICAgNzksXG4gICAgICAgICAgODAsXG4gICAgICAgICAgODEsXG4gICAgICAgICAgODIsXG4gICAgICAgICAgODMsXG4gICAgICAgICAgODQsXG4gICAgICAgICAgODUsXG4gICAgICAgICAgODcsXG4gICAgICAgICAgODgsXG4gICAgICAgICAgODksXG4gICAgICAgICAgOTAsXG4gICAgICAgICAgOTEsXG4gICAgICAgICAgOTIsXG4gICAgICAgICAgOTMsXG4gICAgICAgICAgOTQsXG4gICAgICAgICAgOTUsXG4gICAgICAgICAgOTYsXG4gICAgICAgICAgOTcsXG4gICAgICAgICAgOTgsXG4gICAgICAgICAgOTksXG4gICAgICAgICAgMTAwLFxuICAgICAgICAgIDEwMSxcbiAgICAgICAgICAxMDIsXG4gICAgICAgICAgMTAzLFxuICAgICAgICAgIDEwNCxcbiAgICAgICAgICAxMDUsXG4gICAgICAgICAgMTA2LFxuICAgICAgICAgIDEwNyxcbiAgICAgICAgICAxMDgsXG4gICAgICAgICAgMTA5LFxuICAgICAgICAgIDExMCxcbiAgICAgICAgICAxMTEsXG4gICAgICAgICAgMTEyLFxuICAgICAgICAgIDExMyxcbiAgICAgICAgICAxMTRcbiAgICAgICAgXSxcblxuICAgICAgICBpbmNsdXNpdmU6IGZhbHNlXG4gICAgICB9LFxuXG4gICAgICAnQ09OVFJPTF9DSElMRCc6IHtcbiAgICAgICAgcnVsZXM6IFtcbiAgICAgICAgICAwLFxuICAgICAgICAgIDYzLFxuICAgICAgICAgIDY0LFxuICAgICAgICAgIDY1LFxuICAgICAgICAgIDY2LFxuICAgICAgICAgIDY3LFxuICAgICAgICAgIDY4LFxuICAgICAgICAgIDY5LFxuICAgICAgICAgIDg3LFxuICAgICAgICAgIDg4LFxuICAgICAgICAgIDg5LFxuICAgICAgICAgIDkwLFxuICAgICAgICAgIDkxLFxuICAgICAgICAgIDkyLFxuICAgICAgICAgIDkzLFxuICAgICAgICAgIDk0LFxuICAgICAgICAgIDk1LFxuICAgICAgICAgIDk2LFxuICAgICAgICAgIDk3LFxuICAgICAgICAgIDk4LFxuICAgICAgICAgIDk5LFxuICAgICAgICAgIDEwMCxcbiAgICAgICAgICAxMDEsXG4gICAgICAgICAgMTAyLFxuICAgICAgICAgIDEwMyxcbiAgICAgICAgICAxMDQsXG4gICAgICAgICAgMTA1LFxuICAgICAgICAgIDEwNixcbiAgICAgICAgICAxMDcsXG4gICAgICAgICAgMTA4LFxuICAgICAgICAgIDEwOSxcbiAgICAgICAgICAxMTAsXG4gICAgICAgICAgMTExLFxuICAgICAgICAgIDExMixcbiAgICAgICAgICAxMTMsXG4gICAgICAgICAgMTE0XG4gICAgICAgIF0sXG5cbiAgICAgICAgaW5jbHVzaXZlOiBmYWxzZVxuICAgICAgfSxcblxuICAgICAgJ1RBRyc6IHtcbiAgICAgICAgcnVsZXM6IFtcbiAgICAgICAgICAwLFxuICAgICAgICAgIDEzLFxuICAgICAgICAgIDE0LFxuICAgICAgICAgIDE1LFxuICAgICAgICAgIDE2LFxuICAgICAgICAgIDE3LFxuICAgICAgICAgIDE4LFxuICAgICAgICAgIDE5LFxuICAgICAgICAgIDIwLFxuICAgICAgICAgIDIxLFxuICAgICAgICAgIDIyLFxuICAgICAgICAgIDg3LFxuICAgICAgICAgIDg4LFxuICAgICAgICAgIDg5LFxuICAgICAgICAgIDkwLFxuICAgICAgICAgIDkxLFxuICAgICAgICAgIDkyLFxuICAgICAgICAgIDkzLFxuICAgICAgICAgIDk0LFxuICAgICAgICAgIDk1LFxuICAgICAgICAgIDk2LFxuICAgICAgICAgIDk3LFxuICAgICAgICAgIDk4LFxuICAgICAgICAgIDk5LFxuICAgICAgICAgIDEwMCxcbiAgICAgICAgICAxMDEsXG4gICAgICAgICAgMTAyLFxuICAgICAgICAgIDEwMyxcbiAgICAgICAgICAxMDQsXG4gICAgICAgICAgMTA1LFxuICAgICAgICAgIDEwNixcbiAgICAgICAgICAxMDcsXG4gICAgICAgICAgMTA4LFxuICAgICAgICAgIDEwOSxcbiAgICAgICAgICAxMTAsXG4gICAgICAgICAgMTExLFxuICAgICAgICAgIDExMixcbiAgICAgICAgICAxMTMsXG4gICAgICAgICAgMTE0XG4gICAgICAgIF0sXG5cbiAgICAgICAgaW5jbHVzaXZlOiBmYWxzZVxuICAgICAgfSxcblxuICAgICAgJ0lOSVRJQUwnOiB7XG4gICAgICAgIHJ1bGVzOiBbXG4gICAgICAgICAgMCxcbiAgICAgICAgICAxLFxuICAgICAgICAgIDIsXG4gICAgICAgICAgMyxcbiAgICAgICAgICA0LFxuICAgICAgICAgIDUsXG4gICAgICAgICAgNixcbiAgICAgICAgICA3LFxuICAgICAgICAgIDgsXG4gICAgICAgICAgOSxcbiAgICAgICAgICAxMCxcbiAgICAgICAgICAxMSxcbiAgICAgICAgICAxMixcbiAgICAgICAgICA4NyxcbiAgICAgICAgICA4OCxcbiAgICAgICAgICA4OSxcbiAgICAgICAgICA5MCxcbiAgICAgICAgICA5MSxcbiAgICAgICAgICA5MixcbiAgICAgICAgICA5MyxcbiAgICAgICAgICA5NCxcbiAgICAgICAgICA5NSxcbiAgICAgICAgICA5NixcbiAgICAgICAgICA5NyxcbiAgICAgICAgICA5OCxcbiAgICAgICAgICA5OSxcbiAgICAgICAgICAxMDAsXG4gICAgICAgICAgMTAxLFxuICAgICAgICAgIDEwMixcbiAgICAgICAgICAxMDMsXG4gICAgICAgICAgMTA0LFxuICAgICAgICAgIDEwNSxcbiAgICAgICAgICAxMDYsXG4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10pLm1hcChleHBvcnRzLmNvcHkpLmNvbmNhdChjYy5tYXAoZXhwb3J0cy5jb3B5KSksIF9hKSkgOlxuICAgICAgICAgICAgICAgICAgICBleHBvcnRzLm1lcmdlKGNvLCAoX2IgPSB7fSwgX2Jba10gPSBjYy5tYXAoZXhwb3J0cy5jb3B5KSwgX2IpKSkgOlxuICAgICAgICAgICAgICAgIHR5cGVvZiBjYyAhPT0gJ29iamVjdCcgP1xuICAgICAgICAgICAgICAgICAgICBleHBvcnRzLm1lcmdlKGNvLCAoX2MgPSB7fSwgX2Nba10gPSBjYywgX2MpKSA6XG4gICAgICAgICAgICAgICAgICAgIGV4cG9ydHMubWVyZ2UoY28sIChfZCA9IHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgX2Rba10gPSAodHlwZW9mIGNvW2tdICE9PSAnb2JqZWN0JykgP1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9ydHMubWVyZ2UoY29ba10sIGNjKSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwb3J0cy5mdXNlKGNvW2tdLCBjYyksXG4gICAgICAgICAgICAgICAgICAgICAgICBfZCkpO1xuICAgICAgICAgICAgdmFyIF9hLCBfYiwgX2MsIF9kO1xuICAgICAgICB9LCBvKTtcbiAgICB9LCB7fSk7XG59O1xuZXhwb3J0cy5jb3B5ID0gZnVuY3Rpb24gKG8pIHtcbiAgICByZXR1cm4gKEFycmF5LmlzQXJyYXkobykpID9cbiAgICAgICAgby5tYXAoZXhwb3J0cy5jb3B5KSA6XG4gICAgICAgICh0eXBlb2YgbyA9PT0gJ29iamVjdCcpID9cbiAgICAgICAgICAgIGV4cG9ydHMucmVkdWNlKG8sIGZ1bmN0aW9uIChwLCBjLCBrKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGV4cG9ydHMubWVyZ2UocCwgKF9hID0ge30sIF9hW2tdID0gZXhwb3J0cy5jb3B5KGMpLCBfYSkpO1xuICAgICAgICAgICAgICAgIHZhci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IFVzYWdlOlxuICAgICAgICBjc3NfYmVhdXRpZnkoc291cmNlX3RleHQpO1xuICAgICAgICBjc3NfYmVhdXRpZnkoc291cmNlX3RleHQsIG9wdGlvbnMpO1xuXG4gICAgVGhlIG9wdGlvbnMgYXJlIChkZWZhdWx0IGluIGJyYWNrZXRzKTpcbiAgICAgICAgaW5kZW50X3NpemUgKDQpICAgICAgICAgICAgICAgICAgICAgICAgIOKAlCBpbmRlbnRhdGlvbiBzaXplLFxuICAgICAgICBpbmRlbnRfY2hhciAoc3BhY2UpICAgICAgICAgICAgICAgICAgICAg4oCUIGNoYXJhY3RlciB0byBpbmRlbnQgd2l0aCxcbiAgICAgICAgc2VsZWN0b3Jfc2VwYXJhdG9yX25ld2xpbmUgKHRydWUpICAgICAgIC0gc2VwYXJhdGUgc2VsZWN0b3JzIHdpdGggbmV3bGluZSBvclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3QgKGUuZy4gXCJhLFxcbmJyXCIgb3IgXCJhLCBiclwiKVxuICAgICAgICBlbmRfd2l0aF9uZXdsaW5lIChmYWxzZSkgICAgICAgICAgICAgICAgLSBlbmQgd2l0aCBhIG5ld2xpbmVcbiAgICAgICAgbmV3bGluZV9iZXR3ZWVuX3J1bGVzICh0cnVlKSAgICAgICAgICAgIC0gYWRkIGEgbmV3IGxpbmUgYWZ0ZXIgZXZlcnkgY3NzIHJ1bGVcbiAgICAgICAgc3BhY2VfYXJvdW5kX3NlbGVjdG9yX3NlcGFyYXRvciAoZmFsc2UpIC0gZW5zdXJlIHNwYWNlIGFyb3VuZCBzZWxlY3RvciBzZXBhcmF0b3JzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPicsICcrJywgJ34nIChlLmcuIFwiYT5iXCIgLT4gXCJhID4gYlwiKVxuICAgIGUuZ1xuXG4gICAgY3NzX2JlYXV0aWZ5KGNzc19zb3VyY2VfdGV4dCwge1xu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KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnKCcpIHtcbiAgICAgICAgICAgICAgICAvLyBwc2V1ZG9jbGFzc2VzIGNhbiBjb250YWluICgpXG4gICAgICAgICAgICAgICAgb3BlblBhcmVuICs9IDE7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnKScpIHtcbiAgICAgICAgICAgICAgICBpZiAob3BlblBhcmVuID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3BlblBhcmVuIC09IDE7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSBcIjtcIiB8fCBjaCA9PT0gXCJ9XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIC8vIHByaW50ZXJcbiAgICB2YXIgYmFzZUluZGVudFN0cmluZyA9ICcnO1xuICAgIHZhciBwcmVpbmRlbnRfaW5kZXggPSAwO1xuICAgIGlmIChzb3VyY2VfdGV4dCAmJiBzb3VyY2VfdGV4dC5sZW5ndGgpIHtcbiAgICAgICAgd2hpbGUgKChzb3VyY2VfdGV4dC5jaGFyQXQocHJlaW5kZW50X2luZGV4KSA9PT0gJyAnIHx8XG4gICAgICAgICAgICAgICAgc291cmNlX3RleHQuY2hhckF0KHByZWluZGVudF9pbmRleCkgPT09ICdcXHQnKSkge1xuICAgICAgICAgICAgcHJlaW5kZW50X2luZGV4ICs9IDE7XG4gICAgICAgIH1cbiAgICAgICAgYmFzZUluZGVudFN0cmluZyA9IHNvdXJjZV90ZXh0LnN1YnN0cmluZygwLCBwcmVpbmRlbnRfaW5kZXgpO1xuICAgICAgICBqc19zb3VyY2VfdGV4dCA9IHNvdXJjZV90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nbGVJbmRlbnQsIGJhc2VJbmRlbnRTdHJpbmcpO1xuICAgICAgICBpbmRlbnRMZXZlbCA9IDA7XG4gICAgICAgIG5lc3RlZExldmVsID0gMDtcblxuICAgICAgICBwb3MgPSAtMTtcbiAgICAgICAgY2ggPSBudWxsO1xuICAgICAgICBwYXJlbkxldmVsID0gMDtcblxuICAgICAgICB2YXIgaW5zaWRlUnVsZSA9IGZhbHNlO1xuICAgICAgICB2YXIgaW5zaWRlUHJvcGVydHlWYWx1ZSA9IGZhbHNlO1xuICAgICAgICB2YXIgZW50ZXJpbmdDb25kaXRpb25hbEdyb3VwID0gZmFsc2U7XG4gICAgICAgIHZhciB0b3BfY2ggPSAnJztcbiAgICAgICAgdmFyIGxhc3RfdG9wX2NoID0gJyc7XG5cbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICAgIHZhciB3aGl0ZXNwYWNlID0gc2tpcFdoaXRlc3BhY2UoKTtcbiAgICAgICAgICAgIHZhciBpc0FmdGVyU3BhY2UgPSB3aGl0ZXNwYWNlICE9PSAnJztcbiAgICAgICAgICAgIHZhciBpc0FmdGVyTmV3bGluZSA9IHdoaXRlc3BhY2UuaW5kZXhPZignXFxuJykgIT09IC0xO1xuICAgICAgICAgICAgbGFzdF90b3BfY2ggPSB0b3BfY2g7XG4gICAgICAgICAgICB0b3BfY2ggPSBjaDtcblxuICAgICAgICAgICAgaWYgKCFjaCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJy8nICYmIHBlZWsoKSA9PT0gJyonKSB7IC8qIGNzcyBjb21tZW50ICovXG4gICAgICAgICAgICAgICAgdmFyIGhlYWRlciA9IGluZGVudExldmVsID09PSAwO1xuXG4gICAgICAgICAgICAgICAgaWYgKGlzQWZ0ZXJOZXdsaW5lIHx8IGhlYWRlcikge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuYWRkX25ld19saW5lKCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGVhdENvbW1lbnQoKSk7XG4gICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgIGlmIChoZWFkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSh0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnLycgJiYgcGVlaygpID09PSAnLycpIHsgLy8gc2luZ2xlIGxpbmUgY29tbWVudFxuICAgICAgICAgICAgICAgIGlmICghaXNBZnRlck5ld2xpbmUgJiYgbGFzdF90b3BfY2ggIT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQudHJpbSh0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGVhdENvbW1lbnQoKSk7XG4gICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ0AnKSB7XG4gICAgICAgICAgICAgICAgcHJlc2VydmVTaW5nbGVTcGFjZShpc0FmdGVyU3BhY2UpO1xuXG4gICAgICAgICAgICAgICAgLy8gZGVhbCB3aXRoIGxlc3MgcHJvcGVyeSBtaXhpbnMgQHsuLi59XG4gICAgICAgICAgICAgICAgaWYgKHBlZWsoKSA9PT0gJ3snKSB7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhlYXRTdHJpbmcoJ30nKSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBzdHJpcCB0cmFpbGluZyBzcGFjZSwgaWYgcHJlc2VudCwgZm9yIGhhc2ggcHJvcGVydHkgY2hlY2tzXG4gICAgICAgICAgICAgICAgICAgIHZhciB2YXJpYWJsZU9yUnVsZSA9IHBlZWtTdHJpbmcoXCI6ICw7e30oKVtdLz0nXFxcIlwiKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAodmFyaWFibGVPclJ1bGUubWF0Y2goL1sgOl0kLykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIGhhdmUgYSB2YXJpYWJsZSBvciBwc2V1ZG8tY2xhc3MsIGFkZCBpdCBhbmQgaW5zZXJ0IG9uZSBzcGFjZSBiZWZvcmUgY29udGludWluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyaWFibGVPclJ1bGUgPSBlYXRTdHJpbmcoXCI6IFwiKS5yZXBsYWNlKC9cXHMkLywgJycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKHZhcmlhYmxlT3JSdWxlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyaWFibGVPclJ1bGUgPSB2YXJpYWJsZU9yUnVsZS5yZXBsYWNlKC9cXHMkLywgJycpO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIG1pZ2h0IGJlIGEgbmVzdGluZyBhdC1ydWxlXG4gICAgICAgICAgICAgICAgICAgIGlmICh2YXJpYWJsZU9yUnVsZSBpbiB0aGlzLk5FU1RFRF9BVF9SVUxFKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXN0ZWRMZXZlbCArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhcmlhYmxlT3JSdWxlIGluIHRoaXMuQ09ORElUSU9OQUxfR1JPVVBfUlVMRSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudGVyaW5nQ29uZGl0aW9uYWxHcm91cCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnIycgJiYgcGVlaygpID09PSAneycpIHtcbiAgICAgICAgICAgICAgICBwcmVzZXJ2ZVNpbmdsZVNwYWNlKGlzQWZ0ZXJTcGFjZSk7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGVhdFN0cmluZygnfScpKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICd7Jykge1xuICAgICAgICAgICAgICAgIGlmIChwZWVrKHRydWUpID09PSAnfScpIHtcbiAgICAgICAgICAgICAgICAgICAgZWF0V2hpdGVzcGFjZSgpO1xuICAgICAgICAgICAgICAgICAgICBuZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoXCJ7fVwiKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFlYXRXaGl0ZXNwYWNlKHRydWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQuYWRkX25ld19saW5lKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAobmV3bGluZXNGcm9tTGFzdFdTRWF0IDwgMiAmJiBuZXdsaW5lX2JldHdlZW5fcnVsZXMgJiYgaW5kZW50TGV2ZWwgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dC5hZGRfbmV3X2xpbmUodHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpbmRlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhjaCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghZWF0V2hpdGVzcGFjZSh0cnVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gd2hlbiBlbnRlcmluZyBjb25kaXRpb25hbCBncm91cHMsIG9ubHkgcnVsZXNldHMgYXJlIGFsbG93ZWRcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudGVyaW5nQ29uZGl0aW9uYWxHcm91cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZW50ZXJpbmdDb25kaXRpb25hbEdyb3VwID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnNpZGVSdWxlID0gKGluZGVudExldmVsID4gbmVzdGVkTGV2ZWwpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb3RoZXJ3aXNlLCBkZWNsYXJhdGlvbnMgYXJlIGFsc28gYWxsb3dlZFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zaWRlUnVsZSA9IChpbmRlbnRMZXZlbCA+PSBuZXN0ZWRMZXZlbCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnfScpIHtcbiAgICAgICAgICAgICAgICBvdXRkZW50KCk7XG4gICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZyhjaCk7XG4gICAgICAgICAgICAgICAgaW5zaWRlUnVsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGluc2lkZVByb3BlcnR5VmFsdWUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBpZiAobmVzdGVkTGV2ZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgbmVzdGVkTGV2ZWwtLTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIWVhdFdoaXRlc3BhY2UodHJ1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChuZXdsaW5lc0Zyb21MYXN0V1NFYXQgPCAyICYmIG5ld2xpbmVfYmV0d2Vlbl9ydWxlcyAmJiBpbmRlbnRMZXZlbCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuYWRkX25ld19saW5lKHRydWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09IFwiOlwiKSB7XG4gICAgICAgICAgICAgICAgZWF0V2hpdGVzcGFjZSgpO1xuICAgICAgICAgICAgICAgIGlmICgoaW5zaWRlUnVsZSB8fCBlbnRlcmluZ0NvbmRpdGlvbmFsR3JvdXApICYmXG4gICAgICAgICAgICAgICAgICAgICEobG9va0JhY2soXCImXCIpIHx8IGZvdW5kTmVzdGVkUHNldWRvQ2xhc3MoKSkgJiZcbiAgICAgICAgICAgICAgICAgICAgIWxvb2tCYWNrKFwiKFwiKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyAncHJvcGVydHk6IHZhbHVlJyBkZWxpbWl0ZXJcbiAgICAgICAgICAgICAgICAgICAgLy8gd2hpY2ggY291bGQgYmUgaW4gYSBjb25kaXRpb25hbCBncm91cCBxdWVyeVxuICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoJzonKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpbnNpZGVQcm9wZXJ0eVZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnNpZGVQcm9wZXJ0eVZhbHVlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gc2Fzcy9sZXNzIHBhcmVudCByZWZlcmVuY2UgZG9uJ3QgdXNlIGEgc3BhY2VcbiAgICAgICAgICAgICAgICAgICAgLy8gc2FzcyBuZXN0ZWQgcHNldWRvLWNsYXNzIGRvbid0IHVzZSBhIHNwYWNlXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gcHJlc2VydmUgc3BhY2UgYmVmb3JlIHBzZXVkb2NsYXNzZXMvcHNldWRvZWxlbWVudHMsIGFzIGl0IG1lYW5zIFwiaW4gYW55IGNoaWxkXCJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxvb2tCYWNrKFwiIFwiKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHBlZWsoKSA9PT0gXCI6XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHBzZXVkby1lbGVtZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoXCI6OlwiKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHBzZXVkby1jbGFzc1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKCc6Jyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnXCInIHx8IGNoID09PSAnXFwnJykge1xuICAgICAgICAgICAgICAgIHByZXNlcnZlU2luZ2xlU3BhY2UoaXNBZnRlclNwYWNlKTtcbiAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoZWF0U3RyaW5nKGNoKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnOycpIHtcbiAgICAgICAgICAgICAgICBpbnNpZGVQcm9wZXJ0eVZhbHVlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgICAgICBpZiAoIWVhdFdoaXRlc3BhY2UodHJ1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICcoJykgeyAvLyBtYXkgYmUgYSB1cmxcbiAgICAgICAgICAgICAgICBpZiAobG9va0JhY2soXCJ1cmxcIikpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgICAgICAgICAgZWF0V2hpdGVzcGFjZSgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobmV4dCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2ggIT09ICcpJyAmJiBjaCAhPT0gJ1wiJyAmJiBjaCAhPT0gJ1xcJycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoZWF0U3RyaW5nKCcpJykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3MtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmVuTGV2ZWwrKztcbiAgICAgICAgICAgICAgICAgICAgcHJlc2VydmVTaW5nbGVTcGFjZShpc0FmdGVyU3BhY2UpO1xuICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoY2gpO1xuICAgICAgICAgICAgICAgICAgICBlYXRXaGl0ZXNwYWNlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJyknKSB7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgICAgICBwYXJlbkxldmVsLS07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnLCcpIHtcbiAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoY2gpO1xuICAgICAgICAgICAgICAgIGlmICghZWF0V2hpdGVzcGFjZSh0cnVlKSAmJiBzZWxlY3RvclNlcGFyYXRvck5ld2xpbmUgJiYgIWluc2lkZVByb3BlcnR5VmFsdWUgJiYgcGFyZW5MZXZlbCA8IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LmFkZF9uZXdfbGluZSgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGNoID09PSAnPicgfHwgY2ggPT09ICcrJyB8fCBjaCA9PT0gJ34nKSAmJlxuICAgICAgICAgICAgICAgICFpbnNpZGVQcm9wZXJ0eVZhbHVlICYmIHBhcmVuTGV2ZWwgPCAxKSB7XG4gICAgICAgICAgICAgICAgLy9oYW5kbGUgY29tYmluYXRvciBzcGFjaW5nXG4gICAgICAgICAgICAgICAgaWYgKHNwYWNlX2Fyb3VuZF9jb21iaW5hdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoY2gpO1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoY2gpO1xuICAgICAgICAgICAgICAgICAgICBlYXRXaGl0ZXNwYWNlKCk7XG4gICAgICAgICAgICAgICAgICAgIC8vIHNxdWFzaCBleHRyYSB3aGl0ZXNwYWNlXG4gICAgICAgICAgICAgICAgICAgIGlmIChjaCAmJiB3aGl0ZVJlLnRlc3QoY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaCA9ICcnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ10nKSB7XG4gICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nKGNoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICdbJykge1xuICAgICAgICAgICAgICAgIHByZXNlcnZlU2luZ2xlU3BhY2UoaXNBZnRlclNwYWNlKTtcbiAgICAgICAgICAgICAgICBwcmludF9zdHJpbmcoY2gpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJz0nKSB7IC8vIG5vIHdoaXRlc3BhY2UgYmVmb3JlIG9yIGFmdGVyXG4gICAgICAgICAgICAgICAgZWF0V2hpdGVzcGFjZSgpO1xuICAgICAgICAgICAgICAgIHByaW50X3N0cmluZygnPScpO1xuICAgICAgICAgICAgICAgIGlmICh3aGl0ZVJlLnRlc3QoY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNoID0gJyc7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHByZXNlcnZlU2luZ2xlU3BhY2UoaXNBZnRlclNwYWN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gICAgICBfaW5kZW50X2NvdW50IC09IDE7XG4gICAgICAgICAgICBfY2hhcmFjdGVyX2NvdW50IC09IHBhcmVudC5pbmRlbnRfbGVuZ3RoO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMudHJpbSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB3aGlsZSAodGhpcy5sYXN0KCkgPT09ICcgJykge1xuICAgICAgICAgICAgX2l0ZW1zLnBvcCgpO1xuICAgICAgICAgICAgX2NoYXJhY3Rlcl9jb3VudCAtPSAxO1xuICAgICAgICB9XG4gICAgICAgIF9lbXB0eSA9IF9pdGVtcy5sZW5ndGggPT09IDA7XG4gICAgfTtcblxuICAgIHRoaXMudG9TdHJpbmcgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgICAgICBpZiAoIXRoaXMuX2VtcHR5KSB7XG4gICAgICAgICAgICBpZiAoX2luZGVudF9jb3VudCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gcGFyZW50LmluZGVudF9jYWNoZVtfaW5kZW50X2NvdW50XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlc3VsdCArPSBfaXRlbXMuam9pbignJyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9O1xufVxuXG5mdW5jdGlvbiBPdXRwdXQoaW5kZW50X3N0cmluZywgYmFzZUluZGVudFN0cmluZykge1xuICAgIGJhc2VJbmRlbnRTdHJpbmcgPSBiYXNlSW5kZW50U3RyaW5nIHx8ICcnO1xuICAgIHRoaXMuaW5kZW50X2NhY2hlID0gW2Jhc2VJbmRlbnRTdHJpbmddO1xuICAgIHRoaXMuYmFzZUluZGVudExlbmd0aCA9IGJhc2VJbmRlbnRTdHJpbmcubGVuZ3RoO1xuICAgIHRoaXMuaW5kZW50X2xlbmd0aCA9IGluZGVudF9zdHJpbmcubGVuZ3RoO1xuICAgIHRoaXMucmF3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AnIWRvY3R5cGUnLCAnP3htbCcsXG4gICAgICAgICAgICAgICAgLy8gP3BocCB0YWdcbiAgICAgICAgICAgICAgICAnP3BocCcsXG4gICAgICAgICAgICAgICAgLy8gb3RoZXIgdGFncyB0aGF0IHdlcmUgaW4gdGhpcyBsaXN0LCBrZWVwaW5nIGp1c3QgaW4gY2FzZVxuICAgICAgICAgICAgICAgICdiYXNlZm9udCcsICdpc2luZGV4J1xuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIGV4dHJhX2xpbmVyczogZXh0cmFfbGluZXJzLCAvL2ZvciB0YWdzIHRoYXQgbmVlZCBhIGxpbmUgb2Ygd2hpdGVzcGFjZSBiZWZvcmUgdGhlbVxuICAgICAgICAgICAgaW5fYXJyYXk6IGZ1bmN0aW9uKHdoYXQsIGFycikge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh3aGF0ID09PSBhcnJbaV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICAvLyBSZXR1cm4gdHJ1ZSBpZiB0aGUgZ2l2ZW4gdGV4dCBpcyBjb21wb3NlZCBlbnRpcmVseSBvZiB3aGl0ZXNwYWNlLlxuICAgICAgICB0aGlzLmlzX3doaXRlc3BhY2UgPSBmdW5jdGlvbih0ZXh0KSB7XG4gICAgICAgICAgICBmb3IgKHZhciBuID0gMDsgbiA8IHRleHQubGVuZ3RoOyBuKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuVXRpbHMuaW5fYXJyYXkodGV4dC5jaGFyQXQobiksIHRoaXMuVXRpbHMud2hpdGVzcGFjZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMudHJhdmVyc2Vfd2hpdGVzcGFjZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdmFyIGlucHV0X2NoYXIgPSAnJztcblxuICAgICAgICAgICAgaW5wdXRfY2hhciA9IHRoaXMuaW5wdXQuY2hhckF0KHRoaXMucG9zKTtcbiAgICAgICAgICAgIGlmICh0aGlzLlV0aWxzLmluX2FycmF5KGlucHV0X2NoYXIsIHRoaXMuVXRpbHMud2hpdGVzcGFjZSkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLm5ld2xpbmVzID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5VdGlscy5pbl9hcnJheShpbnB1dF9jaGFyLCB0aGlzLlV0aWxzLndoaXRlc3BhY2UpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmVzZXJ2ZV9uZXdsaW5lcyAmJiBpbnB1dF9jaGFyID09PSAnXFxuJyAmJiB0aGlzLm5ld2xpbmVzIDw9IG1heF9wcmVzZXJ2ZV9uZXdsaW5lcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXdsaW5lcyArPSAxO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wb3MrKztcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRfY2hhciA9IHRoaXMuaW5wdXQuY2hhckF0KHRoaXMucG9zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gQXBwZW5kIGEgc3BhY2UgdG8gdGhlIGdpdmVuIGNvbnRlbnQgKHN0cmluZyBhcnJheSkgb3IsIGlmIHdlIGFyZVxuICAgICAgICAvLyBhdCB0aGUgd3JhcF9saW5lX2xlbmd0aCwgYXBwZW5kIGEgbmV3bGluZS9pbmRlbnRhdGlvbi5cbiAgICAgICAgLy8gcmV0dXJuIHRydWUgaWYgYSBuZXdsaW5lIHdhcyBhZGRlZCwgZmFsc2UgaWYgYSBzcGFjZSB3YXMgYWRkZWRcbiAgICAgICAgdGhpcy5zcGFjZV9vcl93cmFwID0gZnVuY3Rpb24oY29udGVudCkge1xuICAgICAgICAgICAgaWYgKHRoaXMubGluZV9jaGFyX2NvdW50ID49IHRoaXMud3JhcF9saW5lX2xlbmd0aCkgeyAvL2luc2VydCBhIGxpbmUgd2hlbiB0aGUgd3JhcF9saW5lX2xlbmd0aCBpcyByZWFjaGVkXG4gICAgICAgICAgICAgICAgdGhpcy5wcmludF9uZXdsaW5lKGZhbHNlLCBjb250ZW50KTtcbiAgICAgICAgICAgICAgICB0aGlzLnByaW50X2luZGVudGF0aW9uKGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCsrO1xuICAgICAgICAgICAgICAgIGNvbnRlbnQucHVzaCgnICcpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLmdldF9jb250ZW50ID0gZnVuY3Rpb24oKSB7IC8vZnVuY3Rpb24gdG8gY2FwdHVyZSByZWd1bGFyIGNvbnRlbnQgYmV0d2VlbiB0YWdzXG4gICAgICAgICAgICB2YXIgaW5wdXRfY2hhciA9ICcnLFxuICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBbXSxcbiAgICAgICAgICAgICAgICBoYW5kbGViYXJzU3RhcnRlZCA9IDA7XG5cbiAgICAgICAgICAgIHdoaWxlICh0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcykgIT09ICc8JyB8fCBoYW5kbGViYXJzU3RhcnRlZCA9PT0gMikge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnBvcyA+PSB0aGlzLmlucHV0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29udGVudC5sZW5ndGggPyBjb250ZW50LmpvaW4oJycpIDogWycnLCAnVEtfRU9GJ107XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGhhbmRsZWJhcnNTdGFydGVkIDwgMiAmJiB0aGlzLnRyYXZlcnNlX3doaXRlc3BhY2UoKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNwYWNlX29yX3dyYXAoY29udGVudCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlucHV0X2NoYXIgPSB0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcyk7XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5kZW50X2hhbmRsZWJhcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0X2NoYXIgPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlYmFyc1N0YXJ0ZWQgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChoYW5kbGViYXJzU3RhcnRlZCA8IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZWJhcnNTdGFydGVkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dF9jaGFyID09PSAnfScgJiYgaGFuZGxlYmFyc1N0YXJ0ZWQgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFuZGxlYmFyc1N0YXJ0ZWQtLSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIEhhbmRsZWJhcnMgcGFyc2luZyBpcyBjb21wbGljYXRlZC5cbiAgICAgICAgICAgICAgICAgICAgLy8ge3sjZm9vfX0gYW5kIHt7L2Zvb319IGFyZSBmb3JtYXR0ZWQgdGFncy5cbiAgICAgICAgICAgICAgICAgICAgLy8ge3tzb21ldGhpbmd9fSBzaG91bGQgZ2V0IHRyZWF0ZWQgYXMgY29udGVudCwgZXhjZXB0OlxuICAgICAgICAgICAgICAgICAgICAvLyB7e2Vsc2V9fSBzcGVjaWZpY2FsbHkgYmVoYXZlcyBsaWtlIHt7I2lmfX0gYW5kIHt7L2lmfX1cbiAgICAgICAgICAgICAgICAgICAgdmFyIHBlZWszID0gdGhpcy5pbnB1dC5zdWJzdHIodGhpcy5wb3MsIDMpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGVlazMgPT09ICd7eyMnIHx8IHBlZWszID09PSAne3svJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlc2UgYXJlIHRhZ3MgYW5kIG5vdCBjb250ZW50LlxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGVlazMgPT09ICd7eyEnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gW3RoaXMuZ2V0X3RhZygpLCAnVEtfVEFHX0hBTkRMRUJBUlNfQ09NTUVOVCddO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuaW5wdXQuc3Vic3RyKHRoaXMucG9zLCAyKSA9PT0gJ3t7Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZ2V0X3RhZyh0cnVlKSA9PT0gJ3t7ZWxzZX19Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5wb3MrKztcbiAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCsrO1xuICAgICAgICAgICAgICAgIGNvbnRlbnQucHVzaChpbnB1dF9jaGFyKTsgLy9sZXR0ZXIgYXQtYS10aW1lIChvciBzdHJpbmcpIGluc2VydGVkIHRvIGFuIGFycmF5XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29udGVudC5sZW5ndGggPyBjb250ZW50LmpvaW4oJycpIDogJyc7XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5nZXRfY29udGVudHNfdG8gPSBmdW5jdGlvbihuYW1lKSB7IC8vZ2V0IHRoZSBmdWxsIGNvbnRlbnQgb2YgYSBzY3JpcHQgb3Igc3R5bGUgdG8gcGFzcyB0byBqc19iZWF1dGlmeVxuICAgICAgICAgICAgaWYgKHRoaXMucG9zID09PSB0aGlzLmlucHV0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBbJycsICdUS19FT0YnXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBjb250ZW50ID0gJyc7XG4gICAgICAgICAgICB2YXIgcmVnX21hdGNoID0gbmV3IFJlZ0V4cCgnPC8nICsgbmFtZSArICdcXFxccyo+JywgJ2lnbScpO1xuICAgICAgICAgICAgcmVnX21hdGNoLmxhc3RJbmRleCA9IHRoaXMucG9zO1xuICAgICAgICAgICAgdmFyIHJlZ19hcnJheSA9IHJlZ19tYXRjaC5leGVjKHRoaXMuaW5wdXQpO1xuICAgICAgICAgICAgdmFyIGVuZF9zY3JpcHQgPSByZWdfYXJyYXkgPyByZWdfYXJyYXkuaW5kZXggOiB0aGlzLmlucHV0Lmxlbmd0aDsgLy9hYnNvbHV0ZSBlbmQgb2Yg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FrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRlbXBfcGFyZW50ID0gdGhpcy50YWdzW3RlbXBfcGFyZW50ICsgJ3BhcmVudCddOyAvL290aGVyd2lzZSBrZWVwIG9uIGNsaW1iaW5nIHVwIHRoZSBET00gVHJlZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodGVtcF9wYXJlbnQpIHsgLy9pZiB3ZSBjYXVnaHQgc29tZXRoaW5nXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5kZW50X2xldmVsID0gdGhpcy50YWdzW3RhZyArIHRoaXMudGFnc1t0YWcgKyAnY291bnQnXV07IC8vc2V0IHRoZSBpbmRlbnRfbGV2ZWwgYWNjb3JkaW5nbHlcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50YWdzLnBhcmVudCA9IHRoaXMudGFnc1t0ZW1wX3BhcmVudCArICdwYXJlbnQnXTsgLy9hbmQgc2V0IHRoZSBjdXJyZW50IHBhcmVudFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy50YWdzW3RhZyArIHRoaXMudGFnc1t0YWcgKyAnY291bnQnXSArICdwYXJlbnQnXTsgLy9kZWxldGUgdGhlIGNsb3NlZCB0YWdzIHBhcmVudCByZWZlcmVuY2UuLi5cbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy50YWdzW3RhZyArIHRoaXMudGFnc1t0YWcgKyAnY291bnQnXV07IC8vLi4uYW5kIHRoZSB0YWcgaXRzZWxmXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudGFnc1t0YWcgKyAnY291bnQnXSA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy50YWdzW3RhZyArICdjb3VudCddO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFnc1t0YWcgKyAnY291bnQnXS0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLmluZGVudF90b190YWcgPSBmdW5jdGlvbih0YWcpIHtcbiAgICAgICAgICAgIC8vIE1hdGNoIHRoZSBpbmRlbnRhdGlvbiBsZXZlbCB0byB0aGUgbGFzdCB1c2Ugb2YgdGhpcyB0YWcsIGJ1dCBkb24ndCByZW1vdmUgaXQuXG4gICAgICAgICAgICBpZiAoIXRoaXMudGFnc1t0YWcgKyAnY291bnQnXSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB0ZW1wX3BhcmVudCA9IHRoaXMudGFncy5wYXJlbnQ7XG4gICAgICAgICAgICB3aGlsZSAodGVtcF9wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAodGFnICsgdGhpcy50YWdzW3RhZyArICdjb3VudCddID09PSB0ZW1wX3BhcmVudCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGVtcF9wYXJlbnQgPSB0aGlzLnRhZ3NbdGVtcF9wYXJlbnQgKyAncGFyZW50J107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGVtcF9wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmluZGVudF9sZXZlbCA9IHRoaXMudGFnc1t0YWcgKyB0aGlzLnRhZ3NbdGFnICsgJ2NvdW50J11dO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMuZ2V0X3RhZyA9IGZ1bmN0aW9uKHBlZWspIHsgLy9mdW5jdGlvbiB0byBnZXQgYSBmdWxsIHRhZyBhbmQgcGFyc2UgaXRzIHR5cGVcbiAgICAgICAgICAgIHZhciBpbnB1dF9jaGFyID0gJycsXG4gICAgICAgICAgICAgICAgY29udGVudCA9IFtdLFxuICAgICAgICAgICAgICAgIGNvbW1lbnQgPSAnJyxcbiAgICAgICAgICAgICAgICBzcGFjZSA9IGZhbHNlLFxuICAgICAgICAgICAgICAgIGZpcnN0X2F0dHIgPSB0cnVlLFxuICAgICAgICAgICAgICAgIGhhc193cmFwcGVkX2F0dHJzID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgdGFnX3N0YXJ0LCB0YWdfZW5kLFxuICAgICAgICAgICAgICAgIHRhZ19zdGFydF9jaGFyLFxuICAgICAgICAgICAgICAgIG9yaWdfcG9zID0gdGhpcy5wb3MsXG4gICAgICAgICAgICAgICAgb3JpZ19saW5lX2NoYXJfY291bnQgPSB0aGlzLmxpbmVfY2hhcl9jb3VudCxcbiAgICAgICAgICAgICAgICBpc190YWdfY2xvc2VkID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgdGFpbDtcblxuICAgICAgICAgICAgcGVlayA9IHBlZWsgIT09IHVuZGVmaW5lZCA/IHBlZWsgOiBmYWxzZTtcblxuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnBvcyA+PSB0aGlzLmlucHV0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocGVlaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wb3MgPSBvcmlnX3BvcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGluZV9jaGFyX2NvdW50ID0gb3JpZ19saW5lX2NoYXJfY291bnQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnQubGVuZ3RoID8gY29udGVudC5qb2luKCcnKSA6IFsnJywgJ1RLX0VPRiddO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlucHV0X2NoYXIgPSB0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5wb3MrKztcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLlV0aWxzLmluX2FycmF5KGlucHV0X2NoYXIsIHRoaXMuVXRpbHMud2hpdGVzcGFjZSkpIHsgLy9kb24ndCB3YW50IHRvIGluc2VydCB1bm5lY2Vzc2FyeSBzcGFjZVxuICAgICAgICAgICAgICAgICAgICBzcGFjZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpbnB1dF9jaGFyID09PSBcIidcIiB8fCBpbnB1dF9jaGFyID09PSAnXCInKSB7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0X2NoYXIgKz0gdGhpcy5nZXRfdW5mb3JtYXR0ZWQoaW5wdXRfY2hhcik7XG4gICAgICAgICAgICAgICAgICAgIHNwYWNlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5wdXRfY2hhciA9PT0gJz0nKSB7IC8vbm8gc3BhY2UgYmVmb3JlID1cbiAgICAgICAgICAgICAgICAgICAgc3BhY2UgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGFpbCA9IHRoaXMuaW5wdXQuc3Vic3RyKHRoaXMucG9zIC0gMSk7XG4gICAgICAgICAgICAgICAgaWYgKGlzX3dyYXBfYXR0cmlidXRlc19mb3JjZV9leHBhbmRfbXVsdGlsaW5lICYmIGhhc193cmFwcGVkX2F0dHJzICYmICFpc190YWdfY2xvc2VkICYmIChpbnB1dF9jaGFyID09PSAnPicgfHwgaW5wdXRfY2hhciA9PT0gJy8nKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGFpbC5tYXRjaCgvXlxcLz9cXHMqPi8pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzcGFjZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaXNfdGFnX2Nsb3NlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByaW50X25ld2xpbmUoZmFsc2UsIGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcmludF9pbmRlbnRhdGlvbihjb250ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoY29udGVudC5sZW5ndGggJiYgY29udGVudFtjb250ZW50Lmxlbmd0aCAtIDFdICE9PSAnPScgJiYgaW5wdXRfY2hhciAhPT0gJz4nICYmIHNwYWNlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vbm8gc3BhY2UgYWZ0ZXIgPSBvciBiZWZvcmUgPlxuICAgICAgICAgICAgICAgICAgICB2YXIgd3JhcHBlZCA9IHRoaXMuc3BhY2Vfb3Jfd3JhcChjb250ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGVudEF0dHJzID0gd3JhcHBlZCAmJiBpbnB1dF9jaGFyICE9PSAnLycgJiYgIWlzX3dyYXBfYXR0cmlidXRlc19mb3JjZTtcbiAgICAgICAgICAgICAgICAgICAgc3BhY2UgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNfd3JhcF9hdHRyaWJ1dGVzX2ZvcmNlICYmIGlucHV0X2NoYXIgIT09ICcvJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZvcmNlX2ZpcnN0X2F0dHJfd3JhcCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzX3dyYXBfYXR0cmlidXRlc19mb3JjZV9leHBhbmRfbXVsdGlsaW5lICYmIGZpcnN0X2F0dHIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXNfb25seV9hdHRyaWJ1dGUgPSB0YWlsLm1hdGNoKC9eXFxTKig9XCIoW15cIl18XFxcXFwiKSpcIik/XFxzKlxcLz9cXHMqPi8pICE9PSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmNlX2ZpcnN0X2F0dHJfd3JhcCA9ICFpc19vbmx5X2F0dHJpYnV0ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZmlyc3RfYXR0ciB8fCBmb3JjZV9maXJzdF9hdHRyX3dyYXApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByaW50X25ld2xpbmUoZmFsc2UsIGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfaW5kZW50YXRpb24oY29udGVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZW50QXR0cnMgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmRlbnRBdHRycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGFzX3dyYXBwZWRfYXR0cnMgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2luZGVudCBhdHRyaWJ1dGVzIGFuIGF1dG8sIGZvcmNlZCwgb3IgZm9yY2VkLWFsaWduIGxpbmUtd3JhcFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFsaWdubWVudF9zaXplID0gd3JhcF9hdHRyaWJ1dGVzX2luZGVudF9zaXplO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzX3dyYXBfYXR0cmlidXRlc19mb3JjZV9hbGlnbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25tZW50X3NpemUgPSBjb250ZW50LmluZGV4T2YoJyAnKSArIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGNvdW50ID0gMDsgY291bnQgPCBhbGlnbm1lbnRfc2l6ZTsgY291bnQrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9ubHkgZXZlciBmdXJ0aGVyIGluZGVudCB3aXRoIHNwYWNlcyBzaW5jZSB3ZSdyZSB0cnlpbmcgdG8gYWxpZ24gY2hhcmFjdGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQucHVzaCgnICcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChmaXJzdF9hdHRyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbnRlbnQubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29udGVudFtpXSA9PT0gJyAnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpcnN0X2F0dHIgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGluZGVudF9oYW5kbGViYXJzICYmIHRhZ19zdGFydF9jaGFyID09PSAnPCcpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gV2hlbiBpbnNpZGUgYW4gYW5nbGUtYnJhY2tldCB0YWcsIHB1dCBzcGFjZXMgYXJvdW5kXG4gICAgICAgICAgICAgICAgICAgIC8vIGhhbmRsZWJhcnMgbm90IGluc2lkZSBvZiBzdHJpbmdzLlxuICAgICAgICAgICAgICAgICAgICBpZiAoKGlucHV0X2NoYXIgKyB0aGlzLmlucHV0LmNoYXJBdCh0aGlzLnBvcykpID09PSAne3snKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dF9jaGFyICs9IHRoaXMuZ2V0X3VuZm9ybWF0dGVkKCd9fScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRlbnQubGVuZ3RoICYmIGNvbnRlbnRbY29udGVudC5sZW5ndGggLSAxXSAhPT0gJyAnICYmIGNvbnRlbnRbY29udGVudC5sZW5ndGggLSAxXSAhPT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRfY2hhciA9ICcgJyArIGlucHV0X2NoYXI7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBzcGFjZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5wdXRfY2hhciA9PT0gJzwnICYmICF0YWdfc3RhcnRfY2hhcikge1xuICAgICAgICAgICAgICAgICAgICB0YWdfc3RhcnQgPSB0aGlzLnBvcyAtIDE7XG4gICAgICAgICAgICAgICAgICAgIHRhZ19zdGFydF9jaGFyID0gJzwnO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpbmRlbnRfaGFuZGxlYmFycyAmJiAhdGFnX3N0YXJ0X2NoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRlbnQubGVuZ3RoID49IDIgJiYgY29udGVudFtjb250ZW50Lmxlbmd0aCAtIDFdID09PSAneycgJiYgY29udGVudFtjb250ZW50Lmxlbmd0aCAtIDJdID09PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dF9jaGFyID09PSAnIycgfHwgaW5wdXRfY2hhciA9PT0gJy8nIHx8IGlucHV0X2NoYXIgPT09ICchJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZ19zdGFydCA9IHRoaXMucG9zIC0gMztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnX3N0YXJ0ID0gdGhpcy5wb3MgLSAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdGFnX3N0YXJ0X2NoYXIgPSAneyc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCsrO1xuICAgICAgICAgICAgICAgIGNvbnRlbnQucHVzaChpbnB1dF9jaGFyKTsgLy9pbnNlcnRzIGNoYXJhY3RlciBhdC1hLXRpbWUgKG9yIHN0cmluZylcblxuICAgICAgICAgICAgICAgIGlmIChjb250ZW50WzFdICYmIChjb250ZW50WzFdID09PSAnIScgfHwgY29udGVudFsxXSA9PT0gJz8nIHx8IGNvbnRlbnRbMV0gPT09ICclJykpIHsgLy9pZiB3ZSdyZSBpbiBhIGNvbW1lbnQsIGRvIHNvbWV0aGluZyBzcGVjaWFsXG4gICAgICAgICAgICAgICAgICAgIC8vIFdlIHRyZWF0IGFsbCBjb21tZW50cyBhcyBsaXRlcmFscywgZXZlbiBtb3JlIHRoYW4gcHJlZm9ybWF0dGVkIHRhZ3NcbiAgICAgICAgICAgICAgICAgICAgLy8gd2UganVzdCBsb29rIGZvciB0aGUgYXBwcm9wcmlhdGUgY2xvc2UgdGFnXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBbdGhpcy5nZXRfY29tbWVudCh0YWdfc3RhcnQpXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGluZGVudF9oYW5kbGViYXJzICYmIGNvbnRlbnRbMV0gJiYgY29udGVudFsxXSA9PT0gJ3snICYmIGNvbnRlbnRbMl0gJiYgY29udGVudFsyXSA9PT0gJyEnKSB7IC8vaWYgd2UncmUgaW4gYSBjb21tZW50LCBkbyBzb21ldGhpbmcgc3BlY2lhbFxuICAgICAgICAgICAgICAgICAgICAvLyBXZSB0cmVhdCBhbGwgY29tbWVudHMgYXMgbGl0ZXJhbHMsIGV2ZW4gbW9yZSB0aGFuIHByZWZvcm1hdHRlZCB0YWdzXG4gICAgICAgICAgICAgICAgICAgIC8vIHdlIGp1c3QgbG9vayBmb3IgdGhlIGFwcHJvcHJpYXRlIGNsb3NlIHRhZ1xuICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gW3RoaXMuZ2V0X2NvbW1lbnQodGFnX3N0YXJ0KV07XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpbmRlbnRfaGFuZGxlYmFycyAmJiB0YWdfc3RhcnRfY2hhciA9PT0gJ3snICYmIGNvbnRlbnQubGVuZ3RoID4gMiAmJiBjb250ZW50W2NvbnRlbnQubGVuZ3RoIC0gMl0gPT09ICd9JyAmJiBjb250ZW50W2NvbnRlbnQubGVuZ3RoIC0gMV0gPT09ICd9Jykge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlIChpbnB1dF9jaGFyICE9PSAnPicpO1xuXG4gICAgICAgICAgICB2YXIgdGFnX2NvbXBsZXRlID0gY29udGVudC5qb2luKCcnKTtcbiAgICAgICAgICAgIHZhciB0YWdfaW5kZXg7XG4gICAgICAgICAgICB2YXIgdGFnX29mZnNldDtcblxuICAgICAgICAgICAgLy8gbXVzdCBjaGVjayBmb3Igc3BhY2UgZmlyc3Qgb3RoZXJ3aXNlIHRoZSB0YWcgY291bGQgaGF2ZSB0aGUgZmlyc3QgYXR0cmlidXRlIGluY2x1ZGVkLCBhbmRcbiAgICAgICAgICAgIC8vIHRoZW4gbm90IHVuLWluZGVudCBjb3JyZWN0bHlcbiAgICAgICAgICAgIGlmICh0YWdfY29tcGxldGUuaW5kZXhPZignICcpICE9PSAtMSkgeyAvL2lmIHRoZXJlJ3Mgd2hpdGVzcGFjZSwgdGhhdHMgd2hlcmUgdGhlIHRhZyBuYW1lIGVuZHNcbiAgICAgICAgICAgICAgICB0YWdfaW5kZXggPSB0YWdfY29tcGxldGUuaW5kZXhPZignICcpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0YWdfY29tcGxldGUuaW5kZXhPZignXFxuJykgIT09IC0xKSB7IC8vaWYgdGhlcmUncyBhIGxpbmUgYnJlYWssIHRoYXRzIHdoZXJlIHRoZSB0YWcgbmFtZSBlbmRzXG4gICAgICAgICAgICAgICAgdGFnX2luZGV4ID0gdGFnX2NvbXBsZXRlLmluZGV4T2YoJ1xcbicpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0YWdfY29tcGxldGUuY2hhckF0KDApID09PSAneycpIHtcbiAgICAgICAgICAgICAgICB0YWdfaW5kZXggPSB0YWdfY29tcGxldGUuaW5kZXhPZignfScpO1xuICAgICAgICAgICAgfSBlbHNlIHsgLy9vdGhlcndpc2UgZ28gd2l0aCB0aGUgdGFnIGVuZGluZ1xuICAgICAgICAgICAgICAgIHRhZ19pbmRleCA9IHRhZ19jb21wbGV0ZS5pbmRleE9mKCc+Jyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGFnX2NvbXBsZXRlLmNoYXJBdCgwKSA9PT0gJzwnIHx8ICFpbmRlbnRfaGFuZGxlYmFycykge1xuICAgICAgICAgICAgICAgIHRhZ19vZmZzZXQgPSAxO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0YWdfb2Zmc2V0ID0gdGFnX2NvbXBsZXRlLmNoYXJBdCgyKSA9PT0gJyMnID8gMyA6IDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgdGFnX2NoZWNrID0gdGFnX2NvbXBsZXRlLnN1YnN0cmluZyh0YWdfb2Zmc2V0LCB0YWdfaW5kZXgpLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICBpZiAodGFnX2NvbXBsZXRlLmNoYXJBdCh0YWdfY29tcGxldGUubGVuZ3RoIC0gMikgPT09ICcvJyB8fFxuICAgICAgICAgICAgICAgIHRoaXMuVXRpbHMuaW5fYXJyYXkodGFnX2NoZWNrLCB0aGlzLlV0aWxzLnNpbmdsZV90b2tlbikpIHsgLy9pZiB0aGlzIHRhZyBuYW1lIGlzIGEgc2luZ2xlIHRhZyB0eXBlIChlaXRoZXIgaW4gdGhlIGxpc3Qgb3IgaGFzIGEgY2xvc2luZyAvKVxuICAgICAgICAgICAgICAgIGlmICghcGVlaykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRhZ190eXBlID0gJ1NJTkdMRSc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbmRlbnRfaGFuZGxlYmFycyAmJiB0YWdfY29tcGxldGUuY2hhckF0KDApID09PSAneycgJiYgdGFnX2NoZWNrID09PSAnZWxzZScpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXBlZWspIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbmRlbnRfdG9fdGFnKCdpZicpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRhZ190eXBlID0gJ0hBTkRMRUJBUlNfRUxTRSc7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5kZW50X2NvbnRlbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYXZlcnNlX3doaXRlc3BhY2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuaXNfdW5mb3JtYXR0ZWQodGFnX2NoZWNrLCB1bmZvcm1hdHRlZCkgfHxcbiAgICAgICAgICAgICAgICB0aGlzLmlzX3VuZm9ybWF0dGVkKHRhZ19jaGVjaywgY29udGVudF91bmZvcm1hdHRlZCkpIHtcbiAgICAgICAgICAgICAgICAvLyBkbyBub3QgcmVmb3JtYXQgdGhlIFwidW5mb3JtYXR0ZWRcIiBvciBcImNvbnRlbnRfdW5mb3JtYXR0ZWRcIiB0YWdzXG4gICAgICAgICAgICAgICAgY29tbWVudCA9IHRoaXMuZ2V0X3VuZm9ybWF0dGVkKCc8LycgKyB0YWdfY2hlY2sgKyAnPicsIHRhZ19jb21wbGV0ZSk7IC8vLi4uZGVsZWdhdGUgdG8gZ2V0X3VuZm9ybWF0dGVkIGZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgY29udGVudC5wdXNoKGNvbW1lbnQpO1xuICAgICAgICAgICAgICAgIHRhZ19lbmQgPSB0aGlzLnBvcyAtIDE7XG4gICAgICAgICAgICAgICAgdGhpcy50YWdfdHlwZSA9ICdTSU5HTEUnO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0YWdfY2hlY2sgPT09ICdzY3JpcHQnICYmXG4gICAgICAgICAgICAgICAgKHRhZ19jb21wbGV0ZS5zZWFyY2goJ3R5cGUnKSA9PT0gLTEgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRhZ19jb21wbGV0ZS5zZWFyY2goJ3R5cGUnKSA+IC0xICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0YWdfY29tcGxldGUuc2VhcmNoKC9cXGIodGV4dHxhcHBsaWNhdGlvbnxkb2pvKVxcLyh4LSk/KGphdmFzY3JpcHR8ZWNtYXNjcmlwdHxqc2NyaXB0fGxpdmVzY3JpcHR8KGxkXFwrKT9qc29ufG1ldGhvZHxhc3BlY3QpLykgPiAtMSkpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFwZWVrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVjb3JkX3RhZyh0YWdfY2hlY2spO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRhZ190eXBlID0gJ1NDUklQVCc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0YWdfY2hlY2sgPT09ICdzdHlsZScgJiZcbiAgICAgICAgICAgICAgICAodGFnX2NvbXBsZXRlLnNlYXJjaCgndHlwZScpID09PSAtMSB8fFxuICAgICAgICAgICAgICAgICAgICAodGFnX2NvbXBsZXRlLnNlYXJjaCgndHlwZScpID4gLTEgJiYgdGFnX2NvbXBsZXRlLnNlYXJjaCgndGV4dC9jc3MnKSA+IC0xKSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXBlZWspIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWNvcmRfdGFnKHRhZ19jaGVjayk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFnX3R5cGUgPSAnU1RZTEUnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGFnX2NoZWNrLmNoYXJBdCgwKSA9PT0gJyEnKSB7IC8vcGVlayBmb3IgPCEgY29tbWVudFxuICAgICAgICAgICAgICAgIC8vIGZvciBjb21tZW50cyBjb250ZW50IGlzIGFscmVhZHkgY29ycmVjdC5cbiAgICAgICAgICAgICAgICBpZiAoIXBlZWspIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50YWdfdHlwZSA9ICdTSU5HTEUnO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYXZlcnNlX3doaXRlc3BhY2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCFwZWVrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRhZ19jaGVjay5jaGFyQXQoMCkgPT09ICcvJykgeyAvL3RoaXMgdGFnIGlzIGEgZG91YmxlIHRhZyBzbyBjaGVjayBmb3IgdGFnLWVuZGluZ1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJldHJpZXZlX3RhZyh0YWdfY2hlY2suc3Vic3RyaW5nKDEpKTsgLy9yZW1vdmUgaXQgYW5kIGFsbCBhbmNlc3RvcnNcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50YWdfdHlwZSA9ICdFTkQnO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7IC8vb3RoZXJ3aXNlIGl0J3MgYSBzdGFydC10YWdcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWNvcmRfdGFnKHRhZ19jaGVjayk7IC8vcHVzaCBpdCBvbiB0aGUgdGFnIHN0YWNrXG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWdfY2hlY2sudG9Mb3dlckNhc2UoKSAhPT0gJ2h0bWwnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmluZGVudF9jb250ZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRhZ190eXBlID0gJ1NUQVJUJztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBBbGxvdyBwcmVzZXJ2aW5nIG9mIG5ld2xpbmVzIGFmdGVyIGEgc3RhcnQgb3IgZW5kIHRhZ1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnRyYXZlcnNlX3doaXRlc3BhY2UoKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNwYWNlX29yX3dyYXAoY29udGVudCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuVXRpbHMuaW5fYXJyYXkodGFnX2NoZWNrLCB0aGlzLlV0aWxzLmV4dHJhX2xpbmVycykpIHsgLy9jaGVjayBpZiB0aGlzIGRvdWJsZSBuZWVkcyBhbiBleHRyYSBsaW5lXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfbmV3bGluZShmYWxzZSwgdGhpcy5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5vdXRwdXQubGVuZ3RoICYmIHRoaXMub3V0cHV0W3RoaXMub3V0cHV0Lmxlbmd0aCAtIDJdICE9PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcmludF9uZXdsaW5lKHRydWUsIHRoaXMub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHBlZWspIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBvcyA9IG9yaWdfcG9zO1xuICAgICAgICAgICAgICAgIHRoaXMubGluZV9jaGFyX2NvdW50ID0gb3JpZ19saW5lX2NoYXJfY291bnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBjb250ZW50LmpvaW4oJycpOyAvL3JldHVybnMgZnVsbHkgZm9ybWF0dGVkIHRhZ1xuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMuZ2V0X2NvbW1lbnQgPSBmdW5jdGlvbihzdGFydF9wb3MpIHsgLy9mdW5jdGlvbiB0byByZXR1cm4gY29tbWVudCBjb250ZW50IGluIGl0cyBlbnRpcmV0eVxuICAgICAgICAgICAgLy8gdGhpcyBpcyB3aWxsIGhhdmUgdmVyeSBwb29yIHBlcmYsIGJ1dCB3aWxsIHdvcmsgZm9yIG5vdy5cbiAgICAgICAgICAgIHZhciBjb21tZW50ID0gJycsXG4gICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJz4nLFxuICAgICAgICAgICAgICAgIG1hdGNoZWQgPSBmYWxzZTtcblxuICAgICAgICAgICAgdGhpcy5wb3MgPSBzdGFydF9wb3M7XG4gICAgICAgICAgICB2YXIgaW5wdXRfY2hhciA9IHRoaXMuaW5wdXQuY2hhckF0KHRoaXMucG9zKTtcbiAgICAgICAgICAgIHRoaXMucG9zKys7XG5cbiAgICAgICAgICAgIHdoaWxlICh0aGlzLnBvcyA8PSB0aGlzLmlucHV0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGNvbW1lbnQgKz0gaW5wdXRfY2hhcjtcblxuICAgICAgICAgICAgICAgIC8vIG9ubHkgbmVlZCB0byBjaGVjayBmb3IgdGhlIGRlbGltaXRlciBpZiB0aGUgbGFzdCBjaGFycyBtYXRjaFxuICAgICAgICAgICAgICAgIGlmIChjb21tZW50LmNoYXJBdChjb21tZW50Lmxlbmd0aCAtIDEpID09PSBkZWxpbWl0ZXIuY2hhckF0KGRlbGltaXRlci5sZW5ndGggLSAxKSAmJlxuICAgICAgICAgICAgICAgICAgICBjb21tZW50LmluZGV4T2YoZGVsaW1pdGVyKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gb25seSBuZWVkIHRvIHNlYXJjaCBmb3IgY3VzdG9tIGRlbGltaXRlciBmb3IgdGhlIGZpcnN0IGZldyBjaGFyYWN0ZXJzXG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaGVkICYmIGNvbW1lbnQubGVuZ3RoIDwgMTApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1lbnQuaW5kZXhPZignPCFbaWYnKSA9PT0gMCkgeyAvL3BlZWsgZm9yIDwhW2lmIGNvbmRpdGlvbmFsIGNvbW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGltaXRlciA9ICc8IVtlbmRpZl0+JztcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvbW1lbnQuaW5kZXhPZignPCFbY2RhdGFbJykgPT09IDApIHsgLy9pZiBpdCdzIGEgPFtjZGF0YVsgY29tbWVudC4uLlxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJ11dPic7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb21tZW50LmluZGV4T2YoJzwhWycpID09PSAwKSB7IC8vIHNvbWUgb3RoZXIgIVsgY29tbWVudD8gLi4uXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxpbWl0ZXIgPSAnXT4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29tbWVudC5pbmRleE9mKCc8IS0tJykgPT09IDApIHsgLy8gPCEtLSBjb21tZW50IC4uLlxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJy0tPic7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb21tZW50LmluZGV4T2YoJ3t7IS0tJykgPT09IDApIHsgLy8ge3shLS0gaGFuZGxlYmFycyBjb21tZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxpbWl0ZXIgPSAnLS19fSc7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb21tZW50LmluZGV4T2YoJ3t7IScpID09PSAwKSB7IC8vIHt7ISBoYW5kbGViYXJzIGNvbW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50Lmxlbmd0aCA9PT0gNSAmJiBjb21tZW50LmluZGV4T2YoJ3t7IS0tJykgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJ319JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb21tZW50LmluZGV4T2YoJzw/JykgPT09IDApIHsgLy8ge3shIGhhbmRsZWJhcnMgY29tbWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGVyID0gJz8+JztcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvbW1lbnQuaW5kZXhPZignPCUnKSA9PT0gMCkgeyAvLyB7eyEgaGFuZGxlYmFycyBjb21tZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxpbWl0ZXIgPSAnJT4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpbnB1dF9jaGFyID0gdGhpcy5pbnB1dC5jaGFyQXQodGhpcy5wb3MpO1xuICAgICAgICAgICAgICAgIHRoaXMucG9zKys7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBjb21tZW50O1xuICAgICAgICB9O1xuXG4gICAgICAgIGZ1bmN0aW9uIHRva2VuTWF0Y2hlcihkZWxpbWl0ZXIpIHtcbiAgICAgICAgICAgIHZhciB0b2tlbiA9ICcnO1xuXG4gICAgICAgICAgICB2YXIgYWRkID0gZnVuY3Rpb24oc3RyKSB7XG4gICAgICAgICAgICAgICAgdmFyIG5ld1Rva2VuID0gdG9rZW4gKyBzdHIudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IG5ld1Rva2VuLmxlbmd0aCA8PSBkZWxpbWl0ZXIubGVuZ3RoID8gbmV3VG9rZW4gOiBuZXdUb2tlbi5zdWJzdHIobmV3VG9rZW4ubGVuZ3RoIC0gZGVsaW1pdGVyLmxlbmd0aCwgZGVsaW1pdGVyLmxlbmd0aCk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB2YXIgZG9lc05vdE1hdGNoID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuLmluZGV4T2YoZGVsaW1pdGVyKSA9PT0gLTE7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGFkZDogYWRkLFxuICAgICAgICAgICAgICAgIGRvZXNOb3RNYXRjaDogZG9lc05vdE1hdGNoXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5nZXRfdW5mb3JtYXR0ZWQgPSBmdW5jdGlvbihkZWxpbWl0ZXIsIG9yaWdfdGFnKSB7IC8vZnVuY3Rpb24gdG8gcmV0dXJuIHVuZm9ybWF0dGVkIGNvbnRlbnQgaW4gaXRzIGVudGlyZXR5XG4gICAgICAgICAgICBpZiAob3JpZ190YWcgJiYgb3JpZ190YWcudG9Mb3dlckNhc2UoKS5pbmRleE9mKGRlbGltaXRlcikgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGlucHV0X2NoYXIgPSAnJztcbiAgICAgICAgICAgIHZhciBjb250ZW50ID0gJyc7XG4gICAgICAgICAgICB2YXIgc3BhY2UgPSB0cnVlO1xuXG4gICAgICAgICAgICB2YXIgZGVsaW1pdGVyTWF0Y2hlciA9IHRva2VuTWF0Y2hlcihkZWxpbWl0ZXIpO1xuXG4gICAgICAgICAgICBkbyB7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5pbnB1dC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnQ7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaW5wdXRfY2hhciA9IHRoaXMuaW5wdXQuY2hhckF0KHRoaXMucG9zKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBvcysrO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuVXRpbHMuaW5fYXJyYXkoaW5wdXRfY2hhciwgdGhpcy5VdGlscy53aGl0ZXNwYWNlKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNwYWNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudC0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0X2NoYXIgPT09ICdcXG4nIHx8IGlucHV0X2NoYXIgPT09ICdcXHInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9ICdcXG4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgLyogIERvbid0IGNoYW5nZSB0YWIgaW5kZW50aW9uIGZvciB1bmZvcm1hdHRlZCBibG9ja3MuICBJZiB1c2luZyBjb2RlIGZvciBodG1sIGVkaXRpbmcsIHRoaXMgd2lsbCBncmVhdGx5IGFmZmVjdCA8cHJlPiB0YWdzIGlmIHRoZXkgYXJlIHNwZWNpZmllZCBpbiB0aGUgJ3VuZm9ybWF0dGVkIGFycmF5J1xuICAgICAgICAgICAgZm9yICh2YXIgaT0wOyBpPHRoaXMuaW5kZW50X2xldmVsOyBpKyspIHtcbiAgICAgICAgICAgICAgY29udGVudCArPSB0aGlzLmluZGVudF9zdHJpbmc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzcGFjZSA9IGZhbHNlOyAvLy4uLmFuZCBtYWtlIHN1cmUgb3RoZXIgaW5kZW50YXRpb24gaXMgZXJhc2VkXG4gICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5saW5lX2NoYXJfY291bnQgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29udGVudCArPSBpbnB1dF9jaGFyO1xuICAgICAgICAgICAgICAgIGRlbGltaXRlck1hdGNoZXIuYWRkKGlucHV0X2NoYXIpO1xuICAgICAgICAgICAgICAgIHRoaXMubGluZV9jaGFyX2NvdW50Kys7XG4gICAgICAgICAgICAgICAgc3BhY2UgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgaWYgKGluZGVudF9oYW5kbGViYXJzICYmIGlucHV0X2NoYXIgPT09ICd7JyAmJiBjb250ZW50Lmxlbmd0aCAmJiBjb250ZW50LmNoYXJBdChjb250ZW50Lmxlbmd0aCAtIDIpID09PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSGFuZGxlYmFycyBleHByZXNzaW9ucyBpbiBzdHJpbmdzIHNob3VsZCBhbHNvIGJlIHVuZm9ybWF0dGVkLlxuICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IHRoaXMuZ2V0X3VuZm9ybWF0dGVkKCd9fScpO1xuICAgICAgICAgICAgICAgICAgICAvLyBEb24ndCBjb25zaWRlciB3aGVuIHN0b3BwaW5nIGZvciBkZWxpbWl0ZXJzLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gd2hpbGUgKGRlbGltaXRlck1hdGNoZXIuZG9lc05vdE1hdGNoKCkpO1xuXG4gICAgICAgICAgICByZXR1cm4gY29udGVudDtcbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLmdldF90b2tlbiA9IGZ1bmN0aW9uKCkgeyAvL2luaXRpYWwgaGFuZGxlciBmb3IgdG9rZW4tcmV0cmlldmFsXG4gICAgICAgICAgICB2YXIgdG9rZW47XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmxhc3RfdG9rZW4gPT09ICdUS19UQUdfU0NSSVBUJyB8fCB0aGlzLmxhc3RfdG9rZW4gPT09ICdUS19UQUdfU1RZTEUnKSB7IC8vY2hlY2sgaWYgd2UgbmVlZCB0byBmb3JtYXQgamF2YXNjcmlwdFxuICAgICAgICAgICAgICAgIHZhciB0eXBlID0gdGhpcy5sYXN0X3Rva2VuLnN1YnN0cig3KTtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IHRoaXMuZ2V0X2NvbnRlbnRzX3RvKHR5cGUpO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdG9rZW4gIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIFt0b2tlbiwgJ1RLXycgKyB0eXBlXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLmN1cnJlbnRfbW9kZSA9PT0gJ0NPTlRFTlQnKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0aGlzLmdldF9jb250ZW50KCk7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0b2tlbiAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbdG9rZW4sICdUS19DT05URU5UJ107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5jdXJyZW50X21vZGUgPT09ICdUQUcnKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0aGlzLmdldF90YWcoKTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRva2VuICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhZ19uYW1lX3R5cGUgPSAnVEtfVEFHXycgKyB0aGlzLnRhZ190eXBlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW3Rva2VuLCB0YWdfbmFtZV90eXBlXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5nZXRfZnVsbF9pbmRlbnQgPSBmdW5jdGlvbihsZXZlbCkge1xuICAgICAgICAgICAgbGV2ZWwgPSB0aGlzLmluZGVudF9sZXZlbCArIGxldmVsIHx8IDA7XG4gICAgICAgICAgICBpZiAobGV2ZWwgPCAxKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gQXJyYXkobGV2ZWwgKyAxKS5qb2luKHRoaXMuaW5kZW50X3N0cmluZyk7XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5pc191bmZvcm1hdHRlZCA9IGZ1bmN0aW9uKHRhZ19jaGVjaywgdW5mb3JtYXR0ZWQpIHtcbiAgICAgICAgICAgIC8vaXMgdGhpcyBhbiBIVE1MNSBibG9jay1sZXZlbCBsaW5rP1xuICAgICAgICAgICAgaWYgKCF0aGlzLlV0aWxzLmluX2FycmF5KHRhZ19jaGVjaywgdW5mb3JtYXR0ZWQpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGFnX2NoZWNrLnRvTG93ZXJDYXNlKCkgIT09ICdhJyB8fCAhdGhpcy5VdGlscy5pbl9hcnJheSgnYScsIHVuZm9ybWF0dGVkKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvL2F0IHRoaXMgcG9pbnQgd2UgaGF2ZSBhbiAgdGFnOyBpcyBpdHMgZmlyc3QgY2hpbGQgc29tZXRoaW5nIHdlIHdhbnQgdG8gcmVtYWluXG4gICAgICAgICAgICAvL3VuZm9ybWF0dGVkP1xuICAgICAgICAgICAgdmFyIG5leHRfdGFnID0gdGhpcy5nZXRfdGFnKHRydWUgLyogcGVlay4gKi8gKTtcblxuICAgICAgICAgICAgLy8gdGVzdCBuZXh0X3RhZyB0byBzZWUgaWYgaXQgaXMganVzdCBodG1sIHRhZyAobm8gZXh0ZXJuYWwgY29udGVudClcbiAgICAgICAgICAgIHZhciB0YWcgPSAobmV4dF90YWcgfHwgXCJcIikubWF0Y2goL15cXHMqPFxccypcXC8/KFthLXpdKilcXHMqW14+XSo+XFxzKiQvKTtcblxuICAgICAgICAgICAgLy8gaWYgbmV4dF90YWcgY29tZXMgYmFjayBid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G4gICAgICAgICAgICB0aGlzLmluZGVudF9zdHJpbmcgPSAnJztcbiAgICAgICAgICAgIHRoaXMuaW5kZW50X3NpemUgPSBpbmRlbnRfc2l6ZTtcbiAgICAgICAgICAgIHRoaXMuYnJhY2Vfc3R5bGUgPSBicmFjZV9zdHlsZTtcbiAgICAgICAgICAgIHRoaXMuaW5kZW50X2xldmVsID0gMDtcbiAgICAgICAgICAgIHRoaXMud3JhcF9saW5lX2xlbmd0aCA9IHdyYXBfbGluZV9sZW5ndGg7XG4gICAgICAgICAgICB0aGlzLmxpbmVfY2hhcl9jb3VudCA9IDA7IC8vY291bnQgdG8gc2VlIGlmIHdyYXBfbGluZV9sZW5ndGggd2FzIGV4Y2VlZGVkXG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5pbmRlbnRfc2l6ZTsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbmRlbnRfc3RyaW5nICs9IHRoaXMuaW5kZW50X2NoYXJhY3RlcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5wcmludF9uZXdsaW5lID0gZnVuY3Rpb24oZm9yY2UsIGFycikge1xuICAgICAgICAgICAgICAgIHRoaXMubGluZV9jaGFyX2NvdW50ID0gMDtcbiAgICAgICAgICAgICAgICBpZiAoIWFyciB8fCAhYXJyLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChmb3JjZSB8fCAoYXJyW2Fyci5sZW5ndGggLSAxXSAhPT0gJ1xcbicpKSB7IC8vd2UgbWlnaHQgd2FudCB0aGUgZXh0cmEgbGluZVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGFyclthcnIubGVuZ3RoIC0gMV0gIT09ICdcXG4nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXJyW2Fyci5sZW5ndGggLSAxXSA9IHJ0cmltKGFyclthcnIubGVuZ3RoIC0gMV0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGFyci5wdXNoKCdcXG4nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLnByaW50X2luZGVudGF0aW9uID0gZnVuY3Rpb24oYXJyKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmluZGVudF9sZXZlbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyci5wdXNoKHRoaXMuaW5kZW50X3N0cmluZyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGluZV9jaGFyX2NvdW50ICs9IHRoaXMuaW5kZW50X3N0cmluZy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5wcmludF90b2tlbiA9IGZ1bmN0aW9uKHRleHQpIHtcbiAgICAgICAgICAgICAgICAvLyBBdm9pZCBwcmludGluZyBpbml0aWFsIHdoaXRlc3BhY2UuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaXNfd2hpdGVzcGFjZSh0ZXh0KSAmJiAhdGhpcy5vdXRwdXQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRleHQgfHwgdGV4dCAhPT0gJycpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMub3V0cHV0Lmxlbmd0aCAmJiB0aGlzLm91dHB1dFt0aGlzLm91dHB1dC5sZW5ndGggLSAxXSA9PT0gJ1xcbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfaW5kZW50YXRpb24odGhpcy5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IGx0cmltKHRleHQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfdG9rZW5fcmF3KHRleHQpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5wcmludF90b2tlbl9yYXcgPSBmdW5jdGlvbih0ZXh0KSB7XG4gICAgICAgICAgICAgICAgLy8gSWYgd2UgYXJlIGdvaW5nIHRvIHByaW50IG5ld2xpbmVzLCB0cnVuY2F0ZSB0cmFpbGluZ1xuICAgICAgICAgICAgICAgIC8vIHdoaXRlc3BhY2UsIGFzIHRoZSBuZXdsaW5lcyB3aWxsIHJlcHJlc2VudCB0aGUgc3BhY2UuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubmV3bGluZXMgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRleHQgPSBydHJpbSh0ZXh0KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodGV4dCAmJiB0ZXh0ICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGV4dC5sZW5ndGggPiAxICYmIHRleHQuY2hhckF0KHRleHQubGVuZ3RoIC0gMSkgPT09ICdcXG4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1bmZvcm1hdHRlZCB0YWdzIGNhbiBncmFiIG5ld2xpbmVzIGFzIHRoZWlyIGxhc3QgY2hhcmFjdGVyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm91dHB1dC5wdXNoKHRleHQuc2xpY2UoMCwgLTEpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfbmV3bGluZShmYWxzZSwgdGhpcy5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vdXRwdXQucHVzaCh0ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZvciAodmFyIG4gPSAwOyBuIDwgdGhpcy5uZXdsaW5lczsgbisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHJpbnRfbmV3bGluZShuID4gMCwgdGhpcy5vdXRwdXQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLm5ld2xpbmVzID0gMDtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMuaW5kZW50ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbmRlbnRfbGV2ZWwrKztcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMudW5pbmRlbnQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5pbmRlbnRfbGV2ZWwgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5kZW50X2xldmVsLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgLypfX19fX19fX19fX19fX19fX19fX18tLS0tLS0tLS0tLS0tLS0tLS0tLV9fX19fX19fX19fX19fX19fX19fXyovXG5cbiAgICB0aGlzLmJlYXV0aWZ5ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIG11bHRpX3BhcnNlciA9IG5ldyBQYXJzZXIoKTsgLy93cmFwcGluZyBmdW5jdGlvbnMgUGFyc2VyXG4gICAgICAgIG11bHRpX3BhcnNlci5wcmludGVyKGh0bWxfc291cmNlLCBpbmRlbnRfY2hhcmFjdGVyLCBpbmRlbnRfc2l6ZSwgd3JhcF9saW5lX2xlbmd0aCwgYnJhY2Vfc3R5bGUpOyAvL2luaXRpYWxpemUgc3RhcnRpbmcgdmFsdWVzXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICB2YXIgdCA9IG11bHRpX3BhcnNlci5nZXRfdG9rZW4oKTtcbiAgICAgICAgICAgIG11bHRpX3BhcnNlci50b2tlbl90ZXh0ID0gdFswXTtcbiAgICAgICAgICAgIG11bHRpX3BhcnNlci50b2tlbl90eXBlID0gdFsxXTtcblxuICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci50b2tlbl90eXBlID09PSAnVEtfRU9GJykge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzd2l0Y2ggKG11bHRpX3BhcnNlci50b2tlbl90eXBlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfVEFHX1NUQVJUJzpcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X25ld2xpbmUoZmFsc2UsIG11bHRpX3BhcnNlci5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfdG9rZW4obXVsdGlfcGFyc2VyLnRva2VuX3RleHQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlfcGFyc2VyLmluZGVudF9jb250ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG11bHRpX3BhcnNlci5pbmRlbnRfYm9keV9pbm5lcl9odG1sIHx8ICFtdWx0aV9wYXJzZXIudG9rZW5fdGV4dC5tYXRjaCgvPGJvZHkoPzouKik+LykpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKG11bHRpX3BhcnNlci5pbmRlbnRfaGVhZF9pbm5lcl9odG1sIHx8ICFtdWx0aV9wYXJzZXIudG9rZW5fdGV4dC5tYXRjaCgvPGhlYWQoPzouKik+LykpKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIuaW5kZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5pbmRlbnRfY29udGVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5jdXJyZW50X21vZGUgPSAnQ09OVEVOVCc7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1RBR19TVFlMRSc6XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfVEFHX1NDUklQVCc6XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF9uZXdsaW5lKGZhbHNlLCBtdWx0aV9wYXJzZXIub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X3Rva2VuKG11bHRpX3BhcnNlci50b2tlbl90ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmN1cnJlbnRfbW9kZSA9ICdDT05URU5UJztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfVEFHX0VORCc6XG4gICAgICAgICAgICAgICAgICAgIC8vUHJpbnQgbmV3IGxpbmUgb25seSBpZiB0aGUgdGFnIGhhcyBubyBjb250ZW50IGFuZCBoYXMgY2hpbGRcbiAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci5sYXN0X3Rva2VuID09PSAnVEtfQ09OVEVOVCcgJiYgbXVsdGlfcGFyc2VyLmxhc3RfdGV4dCA9PT0gJycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YWdfbmFtZSA9IChtdWx0aV9wYXJzZXIudG9rZW5fdGV4dC5tYXRjaCgvXFx3Ky8pIHx8IFtdKVswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YWdfZXh0cmFjdGVkX2Zyb21fbGFzdF9vdXRwdXQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci5vdXRwdXQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnX2V4dHJhY3RlZF9mcm9tX2xhc3Rfb3V0cHV0ID0gbXVsdGlfcGFyc2VyLm91dHB1dFttdWx0aV9wYXJzZXIub3V0cHV0Lmxlbmd0aCAtIDFdLm1hdGNoKC8oPzo8fHt7IylcXHMqKFxcdyspLyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFnX2V4dHJhY3RlZF9mcm9tX2xhc3Rfb3V0cHV0ID09PSBudWxsIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRhZ19leHRyYWN0ZWRfZnJvbV9sYXN0X291dHB1dFsxXSAhPT0gdGFnX25hbWUgJiYgIW11bHRpX3BhcnNlci5VdGlscy5pbl9hcnJheSh0YWdfZXh0cmFjdGVkX2Zyb21fbGFzdF9vdXRwdXRbMV0sIHVuZm9ybWF0dGVkKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfbmV3bGluZShmYWxzZSwgbXVsdGlfcGFyc2VyLm91dHB1dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X3Rva2VuKG11bHRpX3BhcnNlci50b2tlbl90ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmN1cnJlbnRfbW9kZSA9ICdDT05URU5UJztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfVEFHX1NJTkdMRSc6XG4gICAgICAgICAgICAgICAgICAgIC8vIERvbid0IGFkZCBhIG5ld2xpbmUgYmVmb3JlIGVsZW1lbnRzIHRoYXQgc2hvdWxkIHJlbWFpbiB1bmZvcm1hdHRlZC5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhZ19jaGVjayA9IG11bHRpX3BhcnNlci50b2tlbl90ZXh0Lm1hdGNoKC9eXFxzKjwoW2Etei1dKykvaSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdGFnX2NoZWNrIHx8ICFtdWx0aV9wYXJzZXIuVXRpbHMuaW5fYXJyYXkodGFnX2NoZWNrWzFdLCB1bmZvcm1hdHRlZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF9uZXdsaW5lKGZhbHNlLCBtdWx0aV9wYXJzZXIub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfdG9rZW4obXVsdGlfcGFyc2VyLnRva2VuX3RleHQpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIuY3VycmVudF9tb2RlID0gJ0NPTlRFTlQnO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlICdUS19UQUdfSEFORExFQkFSU19FTFNFJzpcbiAgICAgICAgICAgICAgICAgICAgLy8gRG9uJ3QgYWRkIGEgbmV3bGluZSBpZiBvcGVuaW5nIHt7I2lmfX0gdGFnIGlzIG9uIHRoZSBjdXJyZW50IGxpbmVcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZvdW5kSWZPbkN1cnJlbnRMaW5lID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGxhc3RDaGVja2VkT3V0cHV0ID0gbXVsdGlfcGFyc2VyLm91dHB1dC5sZW5ndGggLSAxOyBsYXN0Q2hlY2tlZE91dHB1dCA+PSAwOyBsYXN0Q2hlY2tlZE91dHB1dC0tKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlfcGFyc2VyLm91dHB1dFtsYXN0Q2hlY2tlZE91dHB1dF0gPT09ICdcXG4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aV9wYXJzZXIub3V0cHV0W2xhc3RDaGVja2VkT3V0cHV0XS5tYXRjaCgve3sjaWYvKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZElmT25DdXJyZW50TGluZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWZvdW5kSWZPbkN1cnJlbnRMaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfbmV3bGluZShmYWxzZSwgbXVsdGlfcGFyc2VyLm91dHB1dCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X3Rva2VuKG11bHRpX3BhcnNlci50b2tlbl90ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpX3BhcnNlci5pbmRlbnRfY29udGVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmluZGVudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmluZGVudF9jb250ZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmN1cnJlbnRfbW9kZSA9ICdDT05URU5UJztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfVEFHX0hBTkRMRUJBUlNfQ09NTUVOVCc6XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF90b2tlbihtdWx0aV9wYXJzZXIudG9rZW5fdGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5jdXJyZW50X21vZGUgPSAnVEFHJztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfQ09OVEVOVCc6XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF90b2tlbihtdWx0aV9wYXJzZXIudG9rZW5fdGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5jdXJyZW50X21vZGUgPSAnVEFHJztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnVEtfU1RZTEUnOlxuICAgICAgICAgICAgICAgIGNhc2UgJ1RLX1NDUklQVCc6XG4gICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aV9wYXJzZXIudG9rZW5fdGV4dCAhPT0gJycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF9uZXdsaW5lKGZhbHNlLCBtdWx0aV9wYXJzZXIub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0ZXh0ID0gbXVsdGlfcGFyc2VyLnRva2VuX3RleHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2JlYXV0aWZpZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NyaXB0X2luZGVudF9sZXZlbCA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlfcGFyc2VyLnRva2VuX3R5cGUgPT09ICdUS19TQ1JJUFQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2JlYXV0aWZpZXIgPSB0eXBlb2YganNfYmVhdXRpZnkgPT09ICdmdW5jdGlvbicgJiYganNfYmVhdXRpZnk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG11bHRpX3BhcnNlci50b2tlbl90eXBlID09PSAnVEtfU1RZTEUnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2JlYXV0aWZpZXIgPSB0eXBlb2YgY3NzX2JlYXV0aWZ5ID09PSAnZnVuY3Rpb24nICYmIGNzc19iZWF1dGlmeTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuaW5kZW50X3NjcmlwdHMgPT09IFwia2VlcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NyaXB0X2luZGVudF9sZXZlbCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG9wdGlvbnMuaW5kZW50X3NjcmlwdHMgPT09IFwic2VwYXJhdGVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjcmlwdF9pbmRlbnRfbGV2ZWwgPSAtbXVsdGlfcGFyc2VyLmluZGVudF9sZXZlbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGluZGVudGF0aW9uID0gbXVsdGlfcGFyc2VyLmdldF9mdWxsX2luZGVudChzY3JpcHRfaW5kZW50X2xldmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfYmVhdXRpZmllcikge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2FsbCB0aGUgQmVhdXRpZmllciBpZiBhdmFsaWFibGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgQ2hpbGRfb3B0aW9ucyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVvbCA9ICdcXG4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2hpbGRfb3B0aW9ucy5wcm90b3R5cGUgPSBvcHRpb25zO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZF9vcHRpb25zID0gbmV3IENoaWxkX29wdGlvbnMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0ID0gX2JlYXV0aWZpZXIodGV4dC5yZXBsYWNlKC9eXFxzKi8sIGluZGVudGF0aW9uKSwgY2hpbGRfb3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpbXBseSBpbmRlbnQgdGhlIHN0cmluZyBvdGhlcndpc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgd2hpdGUgPSB0ZXh0Lm1hdGNoKC9eXFxzKi8pWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfbGV2ZWwgPSB3aGl0ZS5tYXRjaCgvW15cXG5cXHJdKiQvKVswXS5zcGxpdChtdWx0aV9wYXJzZXIuaW5kZW50X3N0cmluZykubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVpbmRlbnQgPSBtdWx0aV9wYXJzZXIuZ2V0X2Z1bGxfaW5kZW50KHNjcmlwdF9pbmRlbnRfbGV2ZWwgLSBfbGV2ZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQgPSB0ZXh0LnJlcGxhY2UoL15cXHMqLywgaW5kZW50YXRpb24pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXHJcXG58XFxyfFxcbi9nLCAnXFxuJyArIHJlaW5kZW50KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFxzKyQvLCAnJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGV4dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpX3BhcnNlci5wcmludF90b2tlbl9yYXcodGV4dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLnByaW50X25ld2xpbmUodHJ1ZSwgbXVsdGlfcGFyc2VyLm91dHB1dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmN1cnJlbnRfbW9kZSA9ICdUQUcnO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAvLyBXZSBzaG91bGQgbm90IGJlIGdldHRpbmcgaGVyZSBidXQgd2UgZG9uJ3Qgd2FudCB0byBkcm9wIGlucHV0IG9uIHRoZSBmbG9vclxuICAgICAgICAgICAgICAgICAgICAvLyBKdXN0IG91dHB1dCB0aGUgdGV4dCBhbmQgbW92ZSBvblxuICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlfcGFyc2VyLnRva2VuX3RleHQgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtdWx0aV9wYXJzZXIucHJpbnRfdG9rZW4obXVsdGlfcGFyc2VyLnRva2VuX3RleHQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbXVsdGlfcGFyc2VyLmxhc3RfdG9rZW4gPSBtdWx0aV9wYXJzZXIudG9rZW5fdHlwZTtcbiAgICAgICAgICAgIG11bHRpX3BhcnNlci5sYXN0X3RleHQgPSBtdWx0aV9wYXJzZXIudG9rZW5fdGV4dDtcbiAgICAgICAgfVxuICAgICAgICB2YXIgc3dlZXRfY29kZSA9IG11bHRpX3BhcnNlci5vdXRwdXQuam9pbignJykucmVwbGFjZSgvW1xcclxcblxcdCBdKyQvLCAnJyk7XG5cbiAgICAgICAgLy8gZXN0YWJsaXNoIGVuZ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YgYWNvcm4ubGluZUJyZWFrLnRlc3QoanNfc291cmNlX3RleHQgfHwgJycpKSB7XG4gICAgICAgICAgICBvcHQuZW9sID0ganNfc291cmNlX3RleHQubWF0Y2goYWNvcm4ubGluZUJyZWFrKVswXTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9wdC5lb2wgPSBvcHQuZW9sLnJlcGxhY2UoL1xcXFxyLywgJ1xccicpLnJlcGxhY2UoL1xcXFxuLywgJ1xcbicpO1xuXG4gICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXG4gICAgaW5kZW50X3N0cmluZyA9ICcnO1xuICAgIHdoaWxlIChvcHQuaW5kZW50X3NpemUgPiAwKSB7XG4gICAgICAgIGluZGVudF9zdHJpbmcgKz0gb3B0LmluZGVudF9jaGFyO1xuICAgICAgICBvcHQuaW5kZW50X3NpemUgLT0gMTtcbiAgICB9XG5cbiAgICB2YXIgcHJlaW5kZW50X2luZGV4ID0gMDtcbiAgICBpZiAoanNfc291cmNlX3RleHQgJiYganNfc291cmNlX3RleHQubGVuZ3RoKSB7XG4gICAgICAgIHdoaWxlICgoanNfc291cmNlX3RleHQuY2hhckF0KHByZWluZGVudF9pbmRleCkgPT09ICcgJyB8fFxuICAgICAgICAgICAgICAgIGpzX3NvdXJjZV90ZXh0LmNoYXJBdChwcmVpbmRlbnRfaW5kZXgpID09PSAnXFx0JykpIHtcbiAgICAgICAgICAgIHByZWluZGVudF9pbmRleCArPSAxO1xuICAgICAgICB9XG4gICAgICAgIGJhc2VJbmRlbnRTdHJpbmcgPSBqc19zb3VyY2VfdGV4dC5zdWJzdHJpbmcoMCwgcHJlaW5kZW50X2luZGV4KTtcbiAgICAgICAganNfc291cmNlX3RleHQgPSBqc19zb3VyY2VfdGV4dC5zdWJzdHJpbmcocHJlaW5kZW50X2luZGV4KTtcbiAgICB9XG5cbiAgICBsYXN0X3R5cGUgPSAnVEtfU1RBUlRfQkxPQ0snOyAvLyBsYXN0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0YXRlbWVudF9mbGFncyk7XG4gICAgICAgICAgICBoYW5kbGVyc1tjdXJyZW50X3Rva2VuLnR5cGVdKHByZXNlcnZlX3N0YXRlbWVudF9mbGFncyk7XG4gICAgICAgIH1cbiAgICAgICAgY3VycmVudF90b2tlbiA9IHRlbXBfdG9rZW47XG5cbiAgICAgICAgaWYgKGtlZXBfd2hpdGVzcGFjZSkge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBuZXdsaW5lczsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZShpID4gMCwgcHJlc2VydmVfc3RhdGVtZW50X2ZsYWdzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChvcHQubWF4X3ByZXNlcnZlX25ld2xpbmVzICYmIG5ld2xpbmVzID4gb3B0Lm1heF9wcmVzZXJ2ZV9uZXdsaW5lcykge1xuICAgICAgICAgICAgICAgIG5ld2xpbmVzID0gb3B0Lm1heF9wcmVzZXJ2ZV9uZXdsaW5lcztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKG9wdC5wcmVzZXJ2ZV9uZXdsaW5lcykge1xuICAgICAgICAgICAgICAgIGlmIChsb2NhbF90b2tlbi5uZXdsaW5lcyA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZShmYWxzZSwgcHJlc2VydmVfc3RhdGVtZW50X2ZsYWdzKTtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDE7IGogPCBuZXdsaW5lczsgaiArPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKHRydWUsIHByZXNlcnZlX3N0YXRlbWVudF9mbGFncyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgIH1cblxuICAgIC8vIHdlIGN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5sYXN0X3RleHQgIT09ICcsJyAmJiBmbGFncy5sYXN0X3RleHQgIT09ICc9JyAmJiBsYXN0X3R5cGUgIT09ICdUS19PUEVSQVRPUicpIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dF90b2tlbiA9IGdldF90b2tlbigxKTtcbiAgICAgICAgICAgICAgICB3aGlsZSAoZmxhZ3MubW9kZSA9PT0gTU9ERS5TdGF0ZW1lbnQgJiZcbiAgICAgICAgICAgICAgICAgICAgIShmbGFncy5pZl9ibG9jayAmJiBuZXh0X3Rva2VuICYmIG5leHRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBuZXh0X3Rva2VuLnRleHQgPT09ICdlbHNlJykgJiZcbiAgICAgICAgICAgICAgICAgICAgIWZsYWdzLmRvX2Jsb2NrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RvcmVfbW9kZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvdXRwdXQuYWRkX25ld19saW5lKGZvcmNlX25ld2xpbmUpKSB7XG4gICAgICAgICAgICBmbGFncy5tdWx0aWxpbmVfZnJhbWUgPSB0cnVlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcHJpbnRfdG9rZW5fbGluZV9pbmRlbnRhdGlvbigpIHtcbiAgICAgICAgaWYgKG91dHB1dC5qdXN0X2FkZGVkX25ld2xpbmUoKSkge1xuICAgICAgICAgICAgaWYgKG9wdC5rZWVwX2FycmF5X2luZGVudGF0aW9uICYmIGlzX2FycmF5KGZsYWdzLm1vZGUpICYmIGN1cnJlbnRfdG9rZW4ud2FudGVkX25ld2xpbmUpIHtcbiAgICAgICAgICAgICAgICBvdXRwdXQuY3VycmVudF9saW5lLnB1c2goY3VycmVudF90b2tlbi53aGl0ZXNwYWNlX2JlZm9yZSk7XG4gICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChvdXRwdXQuc2V0X2luZGVudChmbGFncy5pbmRlbnRhdGlvbl9sZXZlbCkpIHtcbiAgICAgICAgICAgICAgICBmbGFncy5saW5lX2luZGVudF9sZXZlbCA9IGZsYWdzLmluZGVudGF0aW9uX2xldmVsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcHJpbnRfdG9rZW4ocHJpbnRhYmxlX3Rva2VuKSB7XG4gICAgICAgIGlmIChvdXRwdXQucmF3KSB7XG4gICAgICAgICAgICBvdXRwdXQuYWRkX3Jhd190b2tlbihjdXJyZW50X3Rva2VuKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvcHQuY29tbWFfZmlyc3QgJiYgbGFzdF90eXBlID09PSAnVEtfQ09NTUEnICYmXG4gICAgICAgICAgICBvdXRwdXQuanVzdF9hZGRlZF9uZXdsaW5lKCkpIHtcbiAgICAgICAgICAgIGlmIChvdXRwdXQucHJldmlvdXNfbGluZS5sYXN0KCkgPT09ICcsJykge1xuICAgICAgICAgICAgICAgIHZhciBwb3BwZWQgPSBvdXRwdXQucHJldmlvdXNfbGluZS5wb3AoKTtcbiAgICAgICAgICAgICAgICAvLyBpZiB0aGUgY29tbWEgd2FzIGFscmVhZHkgYXQgdGhlIHN0YXJ0IG9mIHRoZSBsaW5lLFxuICAgICAgICAgICAgICAgIC8vIHB1bGwgYmFjayBvbnRvIHRoYXQgbGluZSBhbmQgcmVwcmludCB0aGUgaW5kZW50YXRpb25cbiAgICAgICAgICAgICAgICBpZiAob3V0cHV0LnByZXZpb3VzX2xpbmUuaXNfZW1wdHkoKSkge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQucHJldmlvdXNfbGluZS5wdXNoKHBvcHBlZCk7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC50cmltKHRydWUpO1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuY3VycmVudF9saW5lLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQudHJpbSgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGFkZCB0aGUgY29tbWEgaW4gZnJvbnQgb2YgdGhlIG5leHQgdG9rZW5cbiAgICAgICAgICAgICAgICBwcmludF90b2tlbl9saW5lX2luZGVudGF0aW9uKCk7XG4gICAgICAgICAgICAgICAgb3V0cHV0LmFkZF90b2tlbignLCcpO1xuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpbnRhYmxlX3Rva2VuID0gcHJpbnRhYmxlX3Rva2VuIHx8IGN1cnJlbnRfdG9rZW4udGV4dDtcbiAgICAgICAgcHJpbnRfdG9rZW5fbGluZV9pbmRlbnRhdGlvbigpO1xuICAgICAgICBvdXRwdXQuYWRkX3Rva2VuKHByaW50YWJsZV90b2tlbik7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaW5kZW50KCkge1xuICAgICAgICBmbGFncy5pbmRlbnRhdGlvbl9sZXZlbCArPSAxO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGRlaW5kZW50KCkge1xuICAgICAgICBpZiAoZmxhZ3MuaW5kZW50YXRpb25fbGV2ZWwgPiAwICYmXG4gICAgICAgICAgICAoKCFmbGFncy5wYXJlbnQpIHx8IGZsYWdzLmluZGVudGF0aW9uX2xldmVsID4gZmxhZ3MucGFyZW50LmluZGVudGF0aW9uX2xldmVsKSkge1xuICAgICAgICAgICAgZmxhZ3MuaW5kZW50YXRpb25fbGV2ZWwgLT0gMTtcblxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2V0X21vZGUobW9kZSkge1xuICAgICAgICBpZiAoZmxhZ3MpIHtcbiAgICAgICAgICAgIGZs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d0aCkpIHx8XG4gICAgICAgICAgICAobGFzdF90eXBlID09PSAnVEtfRU5EX0VYUFInICYmIChwcmV2aW91c19mbGFncy5tb2RlID09PSBNT0RFLkZvckluaXRpYWxpemVyIHx8IHByZXZpb3VzX2ZsYWdzLm1vZGUgPT09IE1PREUuQ29uZGl0aW9uYWwpKSB8fFxuICAgICAgICAgICAgKGxhc3RfdHlwZSA9PT0gJ1RLX1dPUkQnICYmIGZsYWdzLm1vZGUgPT09IE1PREUuQmxvY2tTdGF0ZW1lbnQgJiZcbiAgICAgICAgICAgICAgICAhZmxhZ3MuaW5fY2FzZSAmJlxuICAgICAgICAgICAgICAgICEoY3VycmVudF90b2tlbi50ZXh0ID09PSAnLS0nIHx8IGN1cnJlbnRfdG9rZW4udGV4dCA9PT0gJysrJykgJiZcbiAgICAgICAgICAgICAgICBsYXN0X2xhc3RfdGV4dCAhPT0gJ2Z1bmN0aW9uJyAmJlxuICAgICAgICAgICAgICAgIGN1cnJlbnRfdG9rZW4udHlwZSAhPT0gJ1RLX1dPUkQnICYmIGN1cnJlbnRfdG9rZW4udHlwZSAhPT0gJ1RLX1JFU0VSVkVEJykgfHxcbiAgICAgICAgICAgIChmbGFncy5tb2RlID09PSBNT0RFLk9iamVjdExpdGVyYWwgJiYgKFxuICAgICAgICAgICAgICAgIChmbGFncy5sYXN0X3RleHQgPT09ICc6JyAmJiBmbGFncy50ZXJuYXJ5X2RlcHRoID09PSAwKSB8fCAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGluX2FycmF5KGZsYWdzLmxhc3RfdGV4dCwgWydnZXQnLCAnc2V0J10pKSkpXG4gICAgICAgICkge1xuXG4gICAgICAgICAgICBzZXRfbW9kZShNT0RFLlN0YXRlbWVudCk7XG4gICAgICAgICAgICBpZiAoIW9wdC51bmluZGVudF9jaGFpbmVkX21ldGhvZHMpIHtcbiAgICAgICAgICAgICAgICBpbmRlbnQoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICA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va2VuKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBuZXh0X21vZGUgPSBNT0RFLkV4cHJlc3Npb247XG4gICAgICAgIGlmIChjdXJyZW50X3Rva2VuLnRleHQgPT09ICdbJykge1xuXG4gICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfV09SRCcgfHwgZmxhZ3MubGFzdF90ZXh0ID09PSAnKScpIHtcbiAgICAgICAgICAgICAgICAvLyB0aGlzIGlzIGFycmF5IGluZGV4IHNwZWNpZmllciwgYnJlYWsgaW1tZWRpYXRlbHlcbiAgICAgICAgICAgICAgICAvLyBhW3hdLCBmbigpW3hdXG4gICAgICAgICAgICAgICAgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpbl9hcnJheShmbGFncy5sYXN0X3RleHQsIHRva2VuaXplci5saW5lX3N0YXJ0ZXJzKSkge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2V0X21vZGUobmV4dF9tb2RlKTtcbiAgICAgICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgICAgIGluZGVudCgpO1xuICAgICAgICAgICAgICAgIGlmIChvcHQuc3BhY2VfaW5fcGFyZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbmV4dF9tb2RlID0gTU9ERS5BcnJheUxpdGVyYWw7XG4gICAgICAgICAgICBpZiAoaXNfYXJyYXkoZmxhZ3MubW9kZSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmxhZ3MubGFzdF90ZXh0ID09PSAnWycgfHxcbiAgICAgICAgICAgICAgICAgICAgKGZsYWdzLmxhc3RfdGV4dCA9PT0gJywnICYmIChsYXN0X2xhc3RfdGV4dCA9PT0gJ10nIHx8IGxhc3RfbGFzdF90ZXh0ID09PSAnfScpKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBdLCBbIGdvZXMgdG8gbmV3IGxpbmVcbiAgICAgICAgICAgICAgICAgICAgLy8gfSwgWyBnb2VzIHRvIG5ldyBsaW5lXG4gICAgICAgICAgICAgICAgICAgIGlmICghb3B0LmtlZXBfYXJyYXlfaW5kZW50YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBmbGFncy5sYXN0X3RleHQgPT09ICdmb3InKSB7XG4gICAgICAgICAgICAgICAgbmV4dF9tb2RlID0gTU9ERS5Gb3JJbml0aWFsaXplcjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGluX2FycmF5KGZsYWdzLmxhc3RfdGV4dCwgWydpZicsICd3aGlsZSddKSkge1xuICAgICAgICAgICAgICAgIG5leHRfbW9kZSA9IE1PREUuQ29uZGl0aW9uYWw7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIG5leHRfbW9kZSA9IE1PREUuRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmbGFncy5sYXN0X3RleHQgPT09ICc7JyB8fCBsYXN0X3R5cGUgPT09ICdUS19TVEFSVF9CTE9DSycpIHtcbiAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19FT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B0aGlzIGtpbmQgb2YgbmV3bGluZSBwcmVzZXJ2YXRpb24uXG4gICAgICAgIC8vIGEgPSAoYiAmJlxuICAgICAgICAvLyAgICAgKGMgfHwgZCkpO1xuICAgICAgICBpZiAoY3VycmVudF90b2tlbi50ZXh0ID09PSAnKCcpIHtcbiAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19FUVVBTFMnIHx8IGxhc3RfdHlwZSA9PT0gJ1RLX09QRVJBVE9SJykge1xuICAgICAgICAgICAgICAgIGlmICghc3RhcnRfb2Zfb2JqZWN0X3Byb3BlcnR5KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYWxsb3dfd3JhcF9vcl9wcmVzZXJ2ZWRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFN1cHBvcnQgcHJlc2VydmluZyB3cmFwcGVkIGFycm93IGZ1bmN0aW9uIGV4cHJlc3Npb25zXG4gICAgICAgIC8vIGEuYignYycsXG4gICAgICAgIC8vICAgICAoKSA9PiBkLmVcbiAgICAgICAgLy8gKVxuICAgICAgICBpZiAoY3VycmVudF90b2tlbi50ZXh0ID09PSAnKCcgJiYgbGFzdF90eXBlICE9PSAnVEtfV09SRCcgJiYgbGFzdF90eXBlICE9PSAnVEtfUkVTRVJWRUQnKSB7XG4gICAgICAgICAgICBhbGxvd193cmFwX29yX3ByZXNlcnZlZF9uZXdsaW5lKCk7XG4gICAgICAgIH1cblxuICAgICAgICBzZXRfbW9kZShuZXh0X21vZGUpO1xuICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICBpZiAob3B0LnNwYWNlX2luX3BhcmVuKSB7XG4gICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEluIGFsbCBjYXNlcywgaWYgd2UgbmV3bGluZSB3aGlsZSBpbnNpZGU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ICd9JztcbiAgICAgICAgdmFyIGVtcHR5X2Fub255bW91c19mdW5jdGlvbiA9IGVtcHR5X2JyYWNlcyAmJiBmbGFncy5sYXN0X3dvcmQgPT09ICdmdW5jdGlvbicgJiZcbiAgICAgICAgICAgIGxhc3RfdHlwZSA9PT0gJ1RLX0VORF9FWFBSJztcblxuICAgICAgICBpZiAob3B0LmJyYWNlX3ByZXNlcnZlX2lubGluZSkgLy8gY2hlY2sgZm9yIGlubGluZSwgc2V0IGlubGluZV9mcmFtZSBpZiBzb1xuICAgICAgICB7XG4gICAgICAgICAgICAvLyBzZWFyY2ggZm9yd2FyZCBmb3IgYSBuZXdsaW5lIHdhbnRlZCBpbnNpZGUgdGhpcyBibG9ja1xuICAgICAgICAgICAgdmFyIGluZGV4ID0gMDtcbiAgICAgICAgICAgIHZhciBjaGVja190b2tlbiA9IG51bGw7XG4gICAgICAgICAgICBmbGFncy5pbmxpbmVfZnJhbWUgPSB0cnVlO1xuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGluZGV4ICs9IDE7XG4gICAgICAgICAgICAgICAgY2hlY2tfdG9rZW4gPSBnZXRfdG9rZW4oaW5kZXgpO1xuICAgICAgICAgICAgICAgIGlmIChjaGVja190b2tlbi53YW50ZWRfbmV3bGluZSkge1xuICAgICAgICAgICAgICAgICAgICBmbGFncy5pbmxpbmVfZnJhbWUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAoY2hlY2tfdG9rZW4udHlwZSAhPT0gJ1RLX0VPRicgJiZcbiAgICAgICAgICAgICAgICAhKGNoZWNrX3Rva2VuLnR5cGUgPT09ICdUS19FTkRfQkxPQ0snICYmIGNoZWNrX3Rva2VuLm9wZW5lZCA9PT0gY3VycmVudF90b2tlbikpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKChvcHQuYnJhY2Vfc3R5bGUgPT09IFwiZXhwYW5kXCIgfHxcbiAgICAgICAgICAgICAgICAob3B0LmJyYWNlX3N0eWxlID09PSBcIm5vbmVcIiAmJiBjdXJyZW50X3Rva2VuLndhbnRlZF9uZXdsaW5lKSkgJiZcbiAgICAgICAgICAgICFmbGFncy5pbmxpbmVfZnJhbWUpIHtcbiAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgIT09ICdUS19PUEVSQVRPUicgJiZcbiAgICAgICAgICAgICAgICAoZW1wdHlfYW5vbnltb3VzX2Z1bmN0aW9uIHx8XG4gICAgICAgICAgICAgICAgICAgIGxhc3RfdHlwZSA9PT0gJ1RLX0VRVUFMUycgfHxcbiAgICAgICAgICAgICAgICAgICAgKGxhc3RfdHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpc19zcGVjaWFsX3dvcmQoZmxhZ3MubGFzdF90ZXh0KSAmJiBmbGFncy5sYXN0X3RleHQgIT09ICdlbHNlJykpKSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoZmFsc2UsIHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgeyAvLyBjb2xsYXBzZSB8fCBpbmxpbmVfZnJhbWVcbiAgICAgICAgICAgIGlmIChpc19hcnJheShwcmV2aW91c19mbGFncy5tb2RlKSAmJiAobGFzdF90eXBlID09PSAnVEtfU1RBUlRfRVhQUicgfHwgbGFzdF90eXBlID09PSAnVEtfQ09NTUEnKSkge1xuICAgICAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19DT01NQScgfHwgb3B0LnNwYWNlX2luX3BhcmVuKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChsYXN0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HQua2VlcF9hcnJheV9pbmRlbnRhdGlvbiA9IHRydWU7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJlc3RvcmVfbW9kZSgpO1xuICAgICAgICBwcmludF90b2tlbigpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGhhbmRsZV93b3JkKCkge1xuICAgICAgICBpZiAoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnKSB7XG4gICAgICAgICAgICBpZiAoaW5fYXJyYXkoY3VycmVudF90b2tlbi50ZXh0LCBbJ3NldCcsICdnZXQnXSkgJiYgZmxhZ3MubW9kZSAhPT0gTU9ERS5PYmplY3RMaXRlcmFsKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudF90b2tlbi50eXBlID0gJ1RLX1dPUkQnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpbl9hcnJheShjdXJyZW50X3Rva2VuLnRleHQsIFsnYXMnLCAnZnJvbSddKSAmJiAhZmxhZ3MuaW1wb3J0X2Jsb2NrKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudF90b2tlbi50eXBlID0gJ1RLX1dPUkQnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChmbGFncy5tb2RlID09PSBNT0RFLk9iamVjdExpdGVyYWwpIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dF90b2tlbiA9IGdldF90b2tlbigxKTtcbiAgICAgICAgICAgICAgICBpZiAobmV4dF90b2tlbi50ZXh0ID09PSAnOicpIHtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudF90b2tlbi50eXBlID0gJ1RLX1dPUkQnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzdGFydF9vZl9zdGF0ZW1lbnQoKS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KGZsYWdzLmRvX2Jsb2NrICYmICFmbGFncy5kb193aGlsZSkge1xuICAgICAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBjdXJyZW50X3Rva2VuLnRleHQgPT09ICd3aGlsZScpIHtcbiAgICAgICAgICAgICAgICAvLyBkbyB7fSAjIyB3aGlsZSAoKVxuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIHByaW50X3Rva2VuKCk7XG4gICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgZmxhZ3MuZG9fd2hpbGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gZG8ge30gc2hvdWxkIGFsd2F5cyBoYXZlIHdoaWxlIGFzIHRoZSBuZXh0IHdvcmQuXG4gICAgICAgICAgICAgICAgLy8gaWYgd2UgZG9uJ3Qgc2VlIHRoZSBleHBlY3RlZCB3aGlsZSwgcmVjb3ZlclxuICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICBmbGFncy5kb19ibG9jayA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gaWYgbWF5IGJlIGZvbGxvd2VkIGJ5IGVsc2UsIG9yIG5vdFxuICAgICAgICAvLyBCYXJlL2lubGluZSBpZnMgYXJlIHRyaWNreVxuICAgICAgICAvLyBOZWVkIHRvIHVud2luZCB0aGUgbW9kZXMgY29ycmVjdGx5OiBpZiAoYSkgaWYgKGIpIGMoKTsgZWxzZSBkKCk7IGVsc2UgZSgpO1xuICAgICAgICBpZiAoZmxhZ3MuaWZfYmxvY2spIHtcbiAgICAgICAgICAgIGlmICghZmxhZ3MuZWxzZV9ibG9jayAmJiAoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGN1cnJlbnRfdG9rZW4udGV4dCA9PT0gJ2Vsc2UnKSkge1xuICAgICAgICAgICAgICAgIGZsYWdzLmVsc2VfYmxvY2sgPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoZmxhZ3MubW9kZSA9PT0gTU9ERS5TdGF0ZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdG9yZV9tb2RlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZsYWdzLmlmX2Jsb2NrID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgZmxhZ3MuZWxzZV9ibG9jayA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiAoY3VycmVudF90b2tlbi50ZXh0ID09PSAnY2FzZScgfHwgKGN1cnJlbnRfdG9rZW4udGV4dCA9PT0gJ2RlZmF1bHQnICYmIGZsYWdzLmluX2Nhc2Vfc3RhdGVtZW50KSkpIHtcbiAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgIGlmIChmbGFncy5jYXNlX2JvZHkgfHwgb3B0LmpzbGludF9oYXBweSkge1xuICAgICAgICAgICAgICAgIC8vIHN3aXRjaCBjYXNlcyBmb2xsb3dpbmcgb25lIGFub3RoZXJcbiAgICAgICAgICAgICAgICBkZWluZGVudCgpO1xuICAgICAgICAgICAgICAgIGZsYWdzLmNhc2VfYm9keSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcHJpbnRfdG9rZW4oKTtcbiAgICAgICAgICAgIGZsYWdzLmluX2Nhc2UgPSB0cnVlO1xuICAgICAgICAgICAgZmxhZ3MuaW5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W5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKHRydWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19SRVNFUlZFRCcgfHwgbGFzdF90eXBlID09PSAnVEtfV09SRCcpIHtcbiAgICAgICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIGluX2FycmF5KGZsYWdzLmxhc3RfdGV4dCwgWydnZXQnLCAnc2V0JywgJ25ldycsICdleHBvcnQnLCAnYXN5bmMnXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluX2FycmF5KGZsYWdzLmxhc3RfdGV4dCwgbmV3bGluZV9yZXN0cmljdGVkX3Rva2VucykpKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGZsYWdzLmxhc3RfdGV4dCA9PT0gJ2RlZmF1bHQnICYmIGxhc3RfbGFzdF90ZXh0ID09PSAnZXhwb3J0Jykge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19PUEVSQVRPUicgfHwgZmxhZ3MubGFzdF90ZXh0ID09PSAnPScpIHtcbiAgICAgICAgICAgICAgICAvLyBmb28gPSBmdW5jdGlvblxuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmICghZmxhZ3MubXVsdGlsaW5lX2ZyYW1lICYmIChpc19leHByZXNzaW9uKGZsYWdzLm1vZGUpIHx8IGlzX2FycmF5KGZsYWdzLm1vZGUpKSkge1xuICAgICAgICAgICAgICAgIC8vIChmdW5jdGlvblxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHByaW50X3Rva2VuKCk7XG4gICAgICAgICAgICBmbGFncy5sYXN0X3dvcmQgPSBjdXJyZW50X3Rva2VuLnRleHQ7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBwcmVmaXggPSAnTk9ORSc7XG5cbiAgICAgICAgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX0VORF9CTE9DSycpIHtcblxuICAgICAgICAgICAgaWYgKHByZXZpb3VzX2ZsYWdzLmlubGluZV9mcmFtZSkge1xuICAgICAgICAgICAgICAgIHByZWZpeCA9ICdTUEFDRSc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCEoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGluX2FycmF5KGN1cnJlbnRfdG9rZW4udGV4dCwgWydlbHNlJywgJ2NhdGNoJywgJ2ZpbmFsbHknLCAnZnJvbSddKSkpIHtcbiAgICAgICAgICAgICAgICBwcmVmaXggPSAnTkVXTElORSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChvcHQuYnJhY2Vfc3R5bGUgPT09IFwiZXhwYW5kXCIgfHxcbiAgICAgICAgICAgICAgICAgICAgb3B0LmJyYWNlX3N0eWxlID09PSBcImVuZC1leHBhbmRcIiB8fFxuICAgICAgICAgICAgICAgICAgICAob3B0LmJyYWNlX3N0eWxlID09PSBcIm5vbmVcIiAmJiBjdXJyZW50X3Rva2VuLndhbnRlZF9uZXdsaW5lKSkge1xuICAgICAgICAgICAgICAgICAgICBwcmVmaXggPSAnTkVXTElORSc7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gJ1NQQUNFJztcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1NFTUlDT0xPTicgJiYgZmxhZ3MubW9kZSA9PT0gTU9ERS5CbG9ja1N0YXRlbWVudCkge1xuICAgICAgICAgICAgLy8gVE9ETzogU2hvdWxkIHRoaXMgYmUgZm9yIFNUQVRFTUVOVCBhcyB3ZWxsP1xuICAgICAgICAgICAgcHJlZml4ID0gJ05FV0xJTkUnO1xuICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX1NFTUlDT0xPTicgJiYgaXNfZXhwcmVzc2lvbihmbGFncy5tb2RlKSkge1xuICAgICAgICAgICAgcHJlZml4ID0gJ1NQQUNFJztcbiAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19TVFJJTkcnKSB7XG4gICAgICAgICAgICBwcmVmaXggPSAnTkVXTElORSc7XG4gICAgICAgIH0gZWxzZSBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnIHx8IGxhc3RfdHlwZSA9PT0gJ1RLX1dPUkQnIHx8XG4gICAgICAgICAgICAoZmxhZ3MubGFzdF90ZXh0ID09PSAnKicgJiZcbiAgICAgICAgICAgICAgICAoaW5fYXJyYXkobGFzdF9sYXN0X3RleHQsIFsnZnVuY3Rpb24nLCAneWllbGQnXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKGZsYWdzLm1vZGUgPT09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19SRVNFUlZFRCcgJiYgaW5fYXJyYXkoY3VycmVudF90b2tlbi50ZXh0LCBbJ2Vsc2UnLCAnY2F0Y2gnLCAnZmluYWxseSddKSkge1xuICAgICAgICAgICAgaWYgKCghKGxhc3RfdHlwZSA9PT0gJ1RLX0VORF9CTE9DSycgJiYgcHJldmlvdXNfZmxhZ3MubW9kZSA9PT0gTU9ERS5CbG9ja1N0YXRlbWVudCkgfHxcbiAgICAgICAgICAgICAgICAgICAgb3B0LmJyYWNlX3N0eWxlID09PSBcImV4cGFuZFwiIHx8XG4gICAgICAgICAgICAgICAgICAgIG9wdC5icmFjZV9zdHlsZSA9PT0gXCJlbmQtZXhwYW5kXCIgfHxcbiAgICAgICAgICAgICAgICAgICAgKG9wdC5icmFjZV9zdHlsZSA9PT0gXCJub25lXCIgJiYgY3VycmVudF90b2tlbi53YW50ZWRfbmV3bGluZSkpICYmXG4gICAgICAgICAgICAgICAgIWZsYWdzLmlubGluZV9mcmFtZSkge1xuICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0LnRyaW0odHJ1ZSk7XG4gICAgICAgICAgICAgICAgdmFyIGxpbmUgPSBvdXRwdXQuY3VycmVudF9saW5lO1xuICAgICAgICAgICAgICAgIC8vIElmIHdlIHRyaW1tZWQgYW5kIHRoZXJlJ3Mgc29tZXRoaW5nIG90aGVyIHRoYW4gYSBjbG9zZSBibG9jayBiZWZvcmUgdXNcbiAgICAgICAgICAgICAgICAvLyBwdXQgYSBuZXdsaW5lIGJhY2sgaW4uICBIYW5kbGVzICd9IC8vIGNvbW1lbnQnIHNjZW5hcmlvLlxuICAgICAgICAgICAgICAgIGlmIChsaW5lLmxhc3QoKSAhPT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAocHJlZml4ID09PSAnTkVXTElORScpIHtcbiAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgaXNfc3BlY2lhbF93b3JkKGZsYWdzLmxhc3RfdGV4dCkpIHtcbiAgICAgICAgICAgICAgICAvLyBubyBuZXdsaW5lIGJldHdlZW4gJ3JldHVybiBubm4nXG4gICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSAhPT0gJ1RLX0VORF9FWFBSJykge1xuICAgICAgICAgICAgICAgIGlmICgobGFzdF90eXBlICE9PSAnVEtfU1RBUlRfRVhQUicgfHwgIShjdXJyZW50X3Rva2VuLnR5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgaW5fYXJyYXkoY3VycmVudF90b2tlbi50ZXh0LCBbJ3ZhcicsICdsZXQnLCAnY29uc3QnXSkpKSAmJiBmbGFncy5sYXN0X3RleHQgIT09ICc6Jykge1xuICAgICAgICAgICAgICAgICAgICAvLyBubyBuZWVkIHRvIGZvcmNlIG5ld2xpbmUgb24gJ3Zhcic6IGZvciAodmFyIHggPSAwLi4uKVxuICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnICYmIGN1cnJlbnRfdG9rZW4udGV4dCA9PT0gJ2lmJyAmJiBmbGFncy5sYXN0X3RleHQgPT09ICdlbHNlJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm8gbmV3bGluZSBmb3IgfSBlbHNlIGlmIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50X3Rva2VuLnR5cGUgPT09ICdUS19SRVNFUlZFRCcgJiYgaW5fYXJyYXkoY3VycmVudF90b2tlbi50ZXh0LCB0b2tlbml6ZXIubGluZV9zdGFydGVycykgJiYgZmxhZ3MubGFzdF90ZXh0ICE9PSAnKScpIHtcbiAgICAgICAgICAgICAgICBwcmludF9uZXdsaW5lKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZmxhZ3MubXVsdGlsaW5lX2ZyYW1lICYmIGlzX2FycmF5KGZsYWdzLm1vZGUpICYmIGZsYWdzLmxhc3RfdGV4dCA9PT0gJywnICYmIGxhc3RfbGFzdF90ZXh0ID09PSAnfScpIHtcbiAgICAgICAgICAgIHByaW50X25ld2xpbmUoKTsgLy8gfSwgaW4gbGlzdHMgZ2V0IGEgbmV3bGluZSB0cmVhdG1lbnRcbiAgICAgICAgfSBlbHNlIGlmIChwcmVmaXggPT09ICdTUEFDRScpIHtcbiAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHByaW50X3Rva2VuKCk7XG4gICAgICAgIGZsYWdzLmxhc3Rfd29yZCA9IGN1cnJlbnRfdG9rZW4udGV4dDtcblxuICAgICAgICBpZiAoY3VycmVudF90b2tlbi50eXBlID09PSAnVEtfUkVTRVJWRUQnKSB7XG4gICAgICAgICAgICBpZiAoY3VycmVudF90b2tlbi50ZXh0ID09PSAnZG8nKSB7XG4gICAgICAgICAgICAgICAgZmxhZ3MuZG9fYmxvY2sgPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50X3Rva2VuLnRleHQgPT09ICdpZicpIHtcbiAgICAgICAgICAgICAgIC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FU0VSVkVEJyAmJiBuZXh0X3Rva2VuLnRleHQgPT09ICdlbHNlJykgJiZcbiAgICAgICAgICAgICFmbGFncy5kb19ibG9jaykge1xuICAgICAgICAgICAgcmVzdG9yZV9tb2RlKCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBoYWNreSBidXQgZWZmZWN0aXZlIGZvciB0aGUgbW9tZW50XG4gICAgICAgIGlmIChmbGFncy5pbXBvcnRfYmxvY2spIHtcbiAgICAgICAgICAgIGZsYWdzLmltcG9ydF9ibG9jayA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHByaW50X3Rva2VuKCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaGFuZGxlX3N0cmluZygpIHtcbiAgICAgICAgaWYgKHN0YXJ0X29mX3N0YXRlbWVudCgpKSB7XG4gICAgICAgICAgICAvLyBUaGUgY29uZGl0aW9uYWwgc3RhcnRzIHRoZSBzdGF0ZW1lbnQgaWYgYXBwcm9wcmlhdGUuXG4gICAgICAgICAgICAvLyBPbmUgZGlmZmVyZW5jZSAtIHN0cmluZ3Mgd2FudCBhdCBsZWFzdCBhIHNwYWNlIGJlZm9yZVxuICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBoYW5kbGVfd2hpdGVzcGFjZV9hbmRfY29tbWVudHMoY3VycmVudF90b2tlbik7XG4gICAgICAgICAgICBpZiAobGFzdF90eXBlID09PSAnVEtfUkVTRVJWRUQnIHx8IGxhc3RfdHlwZSA9PT0gJ1RLX1dPUkQnIHx8IGZsYWdzLmlubGluZV9mcmFtZSkge1xuICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19DT01NQScgfHwgbGFzdF90eXBlID09PSAnVEtfU1RBUlRfRVhQUic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V09SRC4gTm93IHdlIG5lZWQgdG8gcmV0dXJuIHRoZSBmYXZvclxuICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gaGFjayBmb3IgYWN0aW9uc2NyaXB0J3MgaW1wb3J0IC4qO1xuICAgICAgICBpZiAoY3VycmVudF90b2tlbi50ZXh0ID09PSAnKicgJiYgbGFzdF90eXBlID09PSAnVEtfRE9UJykge1xuICAgICAgICAgICAgcHJpbnRfdG9rZW4oKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjdXJyZW50X3Rva2VuLnRleHQgPT09ICc6OicpIHtcbiAgICAgICAgICAgIC8vIG5vIHNwYWNlcyBhcm91bmQgZXhvdGljIG5hbWVzcGFjaW5nIHN5bnRheCBvcGVyYXRvclxuICAgICAgICAgICAgcHJpbnRfdG9rZW4oKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFsbG93IGxpbmUgd3JhcHBpbmcgYmV0d2VlbiBvcGVyYXRvcnMgd2hlbiBvcGVyYXRvcl9wb3NpdGlvbiBpc1xuICAgICAgICAvLyAgIHNldCB0byBiZWZvcmUgb3IgcHJlc2VydmVcbiAgICAgICAgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX09QRVJBVE9SJyAmJiBpbl9hcnJheShvcHQub3BlcmF0b3JfcG9zaXRpb24sIE9QRVJBVE9SX1BPU0lUSU9OX0JFRk9SRV9PUl9QUkVTRVJWRSkpIHtcbiAgICAgICAgICAgIGFsbG93X3dyYXBfb3JfcHJlc2VydmVkX25ld2xpbmUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjdXJyZW50X3Rva2VuLnRleHQgPT09ICc6JyAmJiBmbGFncy5pbl9jYXNlKSB7XG4gICAgICAgICAgICBmbGFncy5jYXNlX2JvZHkgPSB0cnVlO1xuICAgICAgICAgICAgaW5kZW50KCk7XG4gICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgcHJpbnRfbmV3bGluZSgpO1xuICAgICAgICAgICAgZmxhZ3MuaW5fY2FzZSA9IGZhbHNlO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHNwYWNlX2JlZm9yZSA9IHRydWU7XG4gICAgICAgIHZhciBzcGFjZV9hZnRlciA9IHRydWU7XG4gICAgICAgIHZhciBpbl90ZXJuYXJ5ID0gZmFsc2U7XG4gICAgICAgIGlmIChjdXJyZW50X3Rva2VuLnRleHQgPT09ICc6Jykge1xuICAgICAgICAgICAgaWYgKGZsYWdzLnRlcm5hcnlfZGVwdGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAvLyBDb2xvbiBpcyBpbnZhbGlkIGphdmFzY3JpcHQgb3V0c2lkZSBvZiB0ZXJuYXJ5IGFuZCBvYmplY3QsIGJ1dCBkbyBvdXIgYmVzdCB0byBndWVzcyB3aGF0IHdhcyBtZWFudC5cbiAgICAgICAgICAgICAgICBzcGFjZV9iZWZvcmUgPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmxhZ3MudGVybmFyeV9kZXB0aCAtPSAxO1xuICAgICAgICAgICAgICAgIGluX3Rlcm5hcnkgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnRfdG9rZW4udGV4dCA9PT0gJz8nKSB7XG4gICAgICAgICAgICBmbGFncy50ZXJuYXJ5X2RlcHRoICs9IDE7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBsZXQncyBoYW5kbGUgdGhlIG9wZXJhdG9yX3Bvc2l0aW9uIG9wdGlvbiBwcmlvciB0byBhbnkgY29uZmxpY3RpbmcgbG9naWNcbiAgICAgICAgaWYgKCFpc1VuYXJ5ICYmICFpc0dlbmVyYXRvckFzdGVyaXNrICYmIG9wdC5wcmVzZXJ2ZV9uZXdsaW5lcyAmJiBpbl9hcnJheShjdXJyZW50X3Rva2VuLnRleHQsIHRva2VuaXplci5wb3NpdGlvbmFibGVfb3BlcmF0b3JzKSkge1xuICAgICAgICAgICAgdmFyIGlzQ29sb24gPSBjdXJyZW50X3Rva2VuLnRleHQgPT09ICc6JztcbiAgICAgICAgICAgIHZhciBpc1Rlcm5hcnlDb2xvbiA9IChpc0NvbG9uICYmIGluX3Rlcm5hcnkpO1xuICAgICAgICAgICAgdmFyIGlzT3RoZXJDb2xvbiA9IChpc0NvbG9uICYmICFpbl90ZXJuYXJ5KTtcblxuICAgICAgICAgICAgc3dpdGNoIChvcHQub3BlcmF0b3JfcG9zaXRpb24pIHtcbiAgICAgICAgICAgICAgICBjYXNlIE9QRVJBVE9SX1BPU0lUSU9OLmJlZm9yZV9uZXdsaW5lOlxuICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGUgY3VycmVudCB0b2tlbiBpcyA6IGFuZCBpdCdzIG5vdCBhIHRlcm5hcnkgc3RhdGVtZW50IHRoZW4gd2Ugc2V0IHNwYWNlX2JlZm9yZSB0byBmYWxzZVxuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gIWlzT3RoZXJDb2xvbjtcblxuICAgICAgICAgICAgICAgICAgICBwcmludF90b2tlbigpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNDb2xvbiB8fCBpc1Rlcm5hcnlDb2xvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWxsb3dfd3JhcF9vcl9wcmVzZXJ2ZWRfbmV3bGluZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnNwYWNlX2JlZm9yZV90b2tlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICAgICAgICAgIGNhc2UgT1BFUkFUT1JfUE9TSVRJT04uYWZ0ZXJfbmV3bGluZTpcbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlIGN1cnJlbnQgdG9rZW4gaXMgYW55dGhpbmcgYnV0IGNvbG9uLCBvciAodmlhIGRlZHVjdGlvbikgaXQncyBhIGNvbG9uIGFuZCBpbiBhIHRlcm5hcnkgc3RhdGVtZW50LFxuICAgICAgICAgICAgICAgICAgICAvLyAgIHRoZW4gcHJpbnQgYSBuZXdsaW5lLlxuXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNDb2xvbiB8fCBpc1Rlcm5hcnlDb2xvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldF90b2tlbigxKS53YW50ZWRfbmV3bGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW50X25ld2xpbmUoZmFsc2UsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxvd193cmFwX29yX3ByZXNlcnZlZF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBwcmludF90b2tlbigpO1xuXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5zcGFjZV9iZWZvcmVfdG9rZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgICAgICBjYXNlIE9QRVJBVE9SX1BPU0lUSU9OLnByZXNlcnZlX25ld2xpbmU6XG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNPdGhlckNvbG9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbGxvd193cmFwX29yX3ByZXNlcnZlZF9uZXdsaW5lKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBpZiB3ZSBqdXN0IGFkZGVkIGEgbmV3bGluZSwgb3IgdGhlIGN1cnJlbnQgdG9rZW4gaXMgOiBhbmQgaXQncyBub3QgYSB0ZXJuYXJ5IHN0YXRlbWVudCxcbiAgICAgICAgICAgICAgICAgICAgLy8gICB0aGVuIHdlIHNldCBzcGFjZV9iZWZvcmUgdG8gZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgc3BhY2VfYmVmb3JlID0gIShvdXRwdXQuanVzdF9hZGRlZF9uZXdsaW5lKCkgfHwgaXNPdGhlckNvbG9uKTtcblxuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gc3BhY2VfYmVmb3JlO1xuICAgICAgICAgICAgICAgICAgICBwcmludF90b2tlbigpO1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzR2VuZXJhdG9yQXN0ZXJpc2spIHtcbiAgICAgICAgICAgIGFsbG93X3dyYXBfb3JfcHJlc2VydmVkX25ld2xpbmUoKTtcbiAgICAgICAgICAgIHNwYWNlX2JlZm9yZSA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIG5leHRfdG9rZW4gPSBnZXRfdG9rZW4oMSk7XG4gICAgICAgICAgICBzcGFjZV9hZnRlciA9IG5leHRfdG9rZW4gJiYgaW5fYXJyYXkobmV4dF90b2tlbi50eXBlLCBbJ1RLX1dPUkQnLCAnVEtfUkVTR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ICc7JyAmJiBpc19leHByZXNzaW9uKGZsYWdzLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgLy8gZm9yICg7OyArK2kpXG4gICAgICAgICAgICAgICAgLy8gICAgICAgIF5eXlxuICAgICAgICAgICAgICAgIHNwYWNlX2JlZm9yZSA9IHRydWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChsYXN0X3R5cGUgPT09ICdUS19SRVNFUlZFRCcpIHtcbiAgICAgICAgICAgICAgICBzcGFjZV9iZWZvcmUgPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChsYXN0X3R5cGUgPT09ICdUS19FTkRfRVhQUicpIHtcbiAgICAgICAgICAgICAgICBzcGFjZV9iZWZvcmUgPSAhKGZsYWdzLmxhc3RfdGV4dCA9PT0gJ10nICYmIChjdXJyZW50X3Rva2VuLnRleHQgPT09ICctLScgfHwgY3VycmVudF90b2tlbi50ZXh0ID09PSAnKysnKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxhc3RfdHlwZSA9PT0gJ1RLX09QRVJBVE9SJykge1xuICAgICAgICAgICAgICAgIC8vIGErKyArICsrYjtcbiAgICAgICAgICAgICAgICAvLyBhIC0gLWJcbiAgICAgICAgICAgICAgICBzcGFjZV9iZWZvcmUgPSBpbl9hcnJheShjdXJyZW50X3Rva2VuLnRleHQsIFsnLS0nLCAnLScsICcrKycsICcrJ10pICYmIGluX2FycmF5KGZsYWdzLmxhc3RfdGV4dCwgWyctLScsICctJywgJysrJywgJysnXSk7XG4gICAgICAgICAgICAgICAgLy8gKyBhbmQgLSBhcmUgbm90IHVuYXJ5IHdoZW4gcHJlY2VlZGVkIGJ5IC0tIG9yICsrIG9wZXJhdG9yXG4gICAgICAgICAgICAgICAgLy8gYS0tICsgYlxuICAgICAgICAgICAgICAgIC8vIGEgKiArYlxuICAgICAgICAgICAgICAgIC8vIGEgLSAtYlxuICAgICAgICAgICAgICAgIGlmIChpbl9hcnJheShjdXJyZW50X3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MucHJlc2VydmUgPT09ICdlbmQnKSB7XG4gICAgICAgICAgICAgICAgLy8gSWYgd2UncmUgdGVzdGluZyB0aGUgcmF3IG91dHB1dCBiZWhhdmlvciwgZG8gbm90IGFsbG93IGEgZGlyZWN0aXZlIHRvIHR1cm4gaXQgb2ZmLlxuICAgICAgICAgICAgICAgIG91dHB1dC5yYXcgPSBvcHQudGVzdF9vdXRwdXRfcmF3O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGN1cnJlbnRfdG9rZW4uZGlyZWN0aXZlcykge1xuICAgICAgICAgICAgcHJpbnRfbmV3bGluZShmYWxzZSwgcHJlc2VydmVfc3RhdGVtZW50X2ZsYWdzKTtcbiAgICAgICAgICAgIHByaW50X3Rva2VuKCk7XG4gICAgICAgICAgICBpZiAoY3VycmVudF90b2tlbi5kaXJlY3RpdmVzLnByZXNlcnZlID09PSAnc3RhcnQnKSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0LnJhdyA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwcmludF9uZXdsaW5lKGZhbHNlLCB0cnVlKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGlubGluZSBibG9ja1xuICAgICAgICBpZiAoIWFjb3JuLm5ld2xpbmUudGVzdChjdXJyZW50X3Rva2VuLnRleHQpICYmICFjdXJyZW50X3Rva2VuLndhbnRlZF9uZXdsaW5lKSB7XG4gICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgIHByaW50X3Rva2VuKCk7XG4gICAgICAgICAgICBvdXRwdXQuc3BhY2VfYmVmb3JlX3Rva2VuID0gdHJ1ZTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBsaW5lcyA9IHNwbGl0X2xpbmVicmVha3MoY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dW5jdGlvbihpbnB1dCkge1xuICAgICAgICBfaXRlbXMucHVzaChpbnB1dCk7XG4gICAgICAgIF9jaGFyYWN0ZXJfY291bnQgKz0gaW5wdXQubGVuZ3RoO1xuICAgICAgICBfZW1wdHkgPSBmYWxzZTtcbiAgICB9O1xuXG4gICAgdGhpcy5wb3AgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIGl0ZW0gPSBudWxsO1xuICAgICAgICBpZiAoIV9lbXB0eSkge1xuICAgICAgICAgICAgaXRlbSA9IF9pdGVtcy5wb3AoKTtcbiAgICAgICAgICAgIF9jaGFyYWN0ZXJfY291bnQgLT0gaXRlbS5sZW5ndGg7XG4gICAgICAgICAgICBfZW1wdHkgPSBfaXRlbXMubGVuZ3RoID09PSAwO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpdGVtO1xuICAgIH07XG5cbiAgICB0aGlzLnJlbW92ZV9pbmRlbnQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKF9pbmRlbnRfY291bnQgPiAwKSB7XG4gICAgICAgICAgICBfaW5kZW50X2NvdW50IC09IDE7XG4gICAgICAgICAgICBfY2hhcmFjdGVyX2NvdW50IC09IHBhcmVudC5pbmRlbnRfbGVuZ3RoO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMudHJpbSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB3aGlsZSAodGhpcy5sYXN0KCkgPT09ICcgJykge1xuICAgICAgICAgICAgX2l0ZW1zLnBvcCgpO1xuICAgICAgICAgICAgX2NoYXJhY3Rlcl9jb3VudCAtPSAxO1xuICAgICAgICB9XG4gICAgICAgIF9lbXB0eSA9IF9pdGVtcy5sZW5ndGggPT09IDA7XG4gICAgfTtcblxuICAgIHRoaXMudG9TdHJpbmcgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgICAgICBpZiAoIXRoaXMuX2VtcHR5KSB7XG4gICAgICAgICAgICBpZi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bl9zdGFjayA9IFtdO1xuICAgICAgICB2YXIgY29tbWVudHMgPSBbXTtcblxuICAgICAgICB3aGlsZSAoIShsYXN0ICYmIGxhc3QudHlwZSA9PT0gJ1RLX0VPRicpKSB7XG4gICAgICAgICAgICB0b2tlbl92YWx1ZXMgPSB0b2tlbml6ZV9uZXh0KCk7XG4gICAgICAgICAgICBuZXh0ID0gbmV3IFRva2VuKHRva2VuX3ZhbHVlc1sxXSwgdG9rZW5fdmFsdWVzWzBdLCBuX25ld2xpbmVzLCB3aGl0ZXNwYWNlX2JlZm9yZV90b2tlbik7XG4gICAgICAgICAgICB3aGlsZSAobmV4dC50eXBlID09PSAnVEtfQ09NTUVOVCcgfHwgbmV4dC50eXBlID09PSAnVEtfQkxPQ0tfQ09NTUVOVCcgfHwgbmV4dC50eXBlID09PSAnVEtfVU5LTk9XTicpIHtcbiAgICAgICAgICAgICAgICBpZiAobmV4dC50eXBlID09PSAnVEtfQkxPQ0tfQ09NTUVOVCcpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dC5kaXJlY3RpdmVzID0gdG9rZW5fdmFsdWVzWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb21tZW50cy5wdXNoKG5leHQpO1xuICAgICAgICAgICAgICAgIHRva2VuX3ZhbHVlcyA9IHRva2VuaXplX25leHQoKTtcbiAgICAgICAgICAgICAgICBuZXh0ID0gbmV3IFRva2VuKHRva2VuX3ZhbHVlc1sxXSwgdG9rZW5fdmFsdWVzWzBdLCBuX25ld2xpbmVzLCB3aGl0ZXNwYWNlX2JlZm9yZV90b2tlbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjb21tZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBuZXh0LmNvbW1lbnRzX2JlZm9yZSA9IGNvbW1lbnRzO1xuICAgICAgICAgICAgICAgIGNvbW1lbnRzID0gW107XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChuZXh0LnR5cGUgPT09ICdUS19TVEFSVF9CTE9DSycgfHwgbmV4dC50eXBlID09PSAnVEtfU1RBUlRfRVhQUicpIHtcbiAgICAgICAgICAgICAgICBuZXh0LnBhcmVudCA9IGxhc3Q7XG4gICAgICAgICAgICAgICAgb3Blbl9zdGFjay5wdXNoKG9wZW4pO1xuICAgICAgICAgICAgICAgIG9wZW4gPSBuZXh0O1xuICAgICAgICAgICAgfSBlbHNlIGlmICgobmV4dC50eXBlID09PSAnVEtfRU5EX0JMT0NLJyB8fCBuZXh0LnR5cGUgPT09ICdUS19FTkRfRVhQUicpICYmXG4gICAgICAgICAgICAgICAgKG9wZW4gJiYgKFxuICAgICAgICAgICAgICAgICAgICAobmV4dC50ZXh0ID09PSAnXScgJiYgb3Blbi50ZXh0ID09PSAnWycpIHx8XG4gICAgICAgICAgICAgICAgICAgIChuZXh0LnRleHQgPT09ICcpJyAmJiBvcGVuLnRleHQgPT09ICcoJykgfHxcbiAgICAgICAgICAgICAgICAgICAgKG5leHQudGV4dCA9PT0gJ30nICYmIG9wZW4udGV4dCA9PT0gJ3snKSkpKSB7XG4gICAgICAgICAgICAgICAgbmV4dC5wYXJlbnQgPSBvcGVuLnBhcmVudDtcbiAgICAgICAgICAgICAgICBuZXh0Lm9wZW5lZCA9IG9wZW47XG5cbiAgICAgICAgICAgICAgICBvcGVuID0gb3Blbl9zdGFjay5wb3AoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdG9rZW5zLnB1c2gobmV4dCk7XG4gICAgICAgICAgICBsYXN0ID0gbmV4dDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0b2tlbnM7XG4gICAgfTtcblxuICAgIGZ1bmN0aW9uIGdldF9kaXJlY3RpdmVzKHRleHQpIHtcbiAgICAgICAgaWYgKCF0ZXh0Lm1hdGNoKGRpcmVjdGl2ZXNfYmxvY2tfcGF0dGVybikpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB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d2FzIG9uIG9wZW4gYnJhY2UgdG8gc3RhcnRcbiAgICAgICAgICAgIGxhc3RfdG9rZW4gPSBuZXcgVG9rZW4oJ1RLX1NUQVJUX0JMT0NLJywgJ3snKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlIChpbl9hcnJheShjLCB3aGl0ZXNwYWNlKSkge1xuXG4gICAgICAgICAgICBpZiAoYWNvcm4ubmV3bGluZS50ZXN0KGMpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCEoYyA9PT0gJ1xcbicgJiYgaW5wdXQucGVlaygtMikgPT09ICdcXHInKSkge1xuICAgICAgICAgICAgICAgICAgICBuX25ld2xpbmVzICs9IDE7XG4gICAgICAgICAgICAgICAgICAgIHdoaXRlc3BhY2Vfb25fdGhpc19saW5lID0gW107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB3aGl0ZXNwYWNlX29uX3RoaXNfbGluZS5wdXNoKGMpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjID0gaW5wdXQubmV4dCgpO1xuXG4gICAgICAgICAgICBpZiAoYyA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBbJycsICdUS19FT0YnXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh3aGl0ZXNwYWNlX29uX3RoaXNfbGluZS5sZW5ndGgpIHtcbiAgICAgICAgICAgIHdoaXRlc3BhY2VfYmVmb3JlX3Rva2VuID0gd2hpdGVzcGFjZV9vbl90aGlzX2xpbmUuam9pbignJyk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGlnaXQudGVzdChjKSB8fCAoYyA9PT0gJy4nICYmIGlucHV0LnRlc3RDaGFyKGRpZ2l0KSkpIHtcbiAgICAgICAgICAgIHZhciBhbGxvd19kZWNpbWFsID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBhbGxvd19lID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBsb2NhbF9kaWdpdCA9IGRpZ2l0O1xuXG4gICAgICAgICAgICBpZiAoYyA9PT0gJzAnICYmIGlucHV0LnRlc3RDaGFyKC9bWHhPb0JiXS8pKSB7XG4gICAgICAgICAgICAgICAgLy8gc3dpdGNoIHRvIGhleC9vY3QvYmluIG51bWJlciwgbm8gZGVjaW1hbCBvciBlLCBqdXN0IGhleC9vY3QvYmluIGRpZ2l0c1xuICAgICAgICAgICAgICAgIGFsbG93X2RlY2ltYWwgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBhbGxvd19lID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaWYgKGlucHV0LnRlc3RDaGFyKC9bQmJdLykpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9jYWxfZGlnaXQgPSBkaWdpdF9iaW47XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC50ZXN0Q2hhcigvW09vXS8pKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2FsX2RpZ2l0ID0gZGlnaXRfb2N0O1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2FsX2RpZ2l0ID0gZGlnaXRfaGV4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjICs9IGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYyA9PT0gJy4nKSB7XG4gICAgICAgICAgICAgICAgLy8gQWxyZWFkeSBoYXZlIGEgZGVjaW1hbCBmb3IgdGhpcyBsaXRlcmFsLCBkb24ndCBhbGxvdyBhbm90aGVyXG4gICAgICAgICAgICAgICAgYWxsb3dfZGVjaW1hbCA9IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyB3ZSBrbm93IHRoaXMgZmlyc3QgbG9vcCB3aWxsIHJ1bi4gIEl0IGtlZXBzIHRoZSBsb2dpYyBzaW1wbGVyLlxuICAgICAgICAgICAgICAgIGMgPSAnJztcbiAgICAgICAgICAgICAgICBpbnB1dC5iYWNrKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEFkZCB0aGUgZGlnaXRzXG4gICAgICAgICAgICB3aGlsZSAoaW5wdXQudGVzdENoYXIobG9jYWxfZGlnaXQpKSB7XG4gICAgICAgICAgICAgICAgYyArPSBpbnB1dC5uZXh0KCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoYWxsb3dfZGVjaW1hbCAmJiBpbnB1dC5wZWVrKCkgPT09ICcuJykge1xuICAgICAgICAgICAgICAgICAgICBjICs9IGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgYWxsb3dfZGVjaW1hbCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGEgPSAxLmUtNyBpcyB2YWxpZCwgc28gd2UgdGVzdCBmb3IgLiB0aGVuIGUgaW4gb25lIGxvb3BcbiAgICAgICAgICAgICAgICBpZiAoYWxsb3dfZSAmJiBpbnB1dC50ZXN0Q2hhcigvW0VlXS8pKSB7XG4gICAgICAgICAgICAgICAgICAgIGMgKz0gaW5wdXQubmV4dCgpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dC50ZXN0Q2hhcigvWystXS8pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjICs9IGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGFsbG93X2UgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYWxsb3dfZGVjaW1hbCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfV09SRCddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGFjb3JuLmlzSWRlbnRpZmllclN0YXJ0KGlucHV0LnBlZWtDaGFyQ29kZSgtMSkpKSB7XG4gICAgICAgICAgICBpZiAoaW5wdXQuaGFzTmV4dCgpKSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGFjb3JuLmlzSWRlbnRpZmllckNoYXIoaW5wdXQucGVla0NoYXJDb2RlKCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIGMgKz0gaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWlucHV0Lmhhc05leHQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghKGxhc3RfdG9rZW4udHlwZSA9PT0gJ1RLX0RPVCcgfHxcbiAgICAgICAgICAgICAgICAgICAgKGxhc3RfdG9rZW4udHlwZSA9PT0gJ1RLX1JFU0VSVkVEJyAmJiBpbl9hcnJheShsYXN0X3Rva2VuLnRleHQsIFsnc2V0JywgJ2dldCddKSkpICYmXG4gICAgICAgICAgICAgICAgaW5fYXJyYXkoYywgcmVzZXJ2ZWRfd29yZHMpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGMgPT09ICdpbicgfHwgYyA9PT0gJ29mJykgeyAvLyBoYWNrIGZvciAnaW4nIGFuZCAnb2YnIG9wZXJhdG9yc1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW2MsICdUS19PUEVSQVRPUiddO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gW2MsICdUS19SRVNFUlZFRCddO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gW2MsICdUS19XT1JEJ107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYyA9PT0gJygnIHx8IGMgPT09ICdbJykge1xuICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfU1RBUlRfRVhQUiddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICcpJyB8fCBjID09PSAnXScpIHtcbiAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX0VORF9FWFBSJ107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYyA9PT0gJ3snKSB7XG4gICAgICAgICAgICByZXR1cm4gW2MsICdUS19TVEFSVF9CTE9DSyddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICd9Jykge1xuICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfRU5EX0JMT0NLJ107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYyA9PT0gJzsnKSB7XG4gICAgICAgICAgICByZXR1cm4gW2MsICdUS19TRU1JQ09MT04nXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjID09PSAnLycpIHtcbiAgICAgICAgICAgIHZhciBjb21tZW50ID0gJyc7XG4gICAgICAgICAgICB2YXIgY29tbWVudF9tYXRjaDtcbiAgICAgICAgICAgIC8vIHBlZWsgZm9yIGNvbW1lbnQgLyogLi4uICovXG4gICAgICAgICAgICBpZiAoaW5wdXQucGVlaygpID09PSAnKicpIHtcbiAgICAgICAgICAgICAgICBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgY29tbWVudF9tYXRjaCA9IGlucHV0Lm1hdGNoKGJsb2NrX2NvbW1lbnRfcGF0dGVybik7XG4gICAgICAgICAgICAgICAgY29tbWVudCA9ICcvKicgKyBjb21tZW50X21hdGNoWzBdO1xuICAgICAgICAgICAgICAgIHZhciBkaXJlY3RpdmVzID0gZ2V0X2RpcmVjdGl2ZXMoY29tbWVudCk7XG4gICAgICAgICAgICAgICAgaWYgKGRpcmVjdGl2ZXMgJiYgZGlyZWN0aXZlcy5pZ25vcmUgPT09ICdzdGFydCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudF9tYXRjaCA9IGlucHV0Lm1hdGNoKGRpcmVjdGl2ZXNfZW5kX2lnbm9yZV9wYXR0ZXJuKTtcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudCArPSBjb21tZW50X21hdGNoWzBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb21tZW50ID0gY29tbWVudC5yZXBsYWNlKGFjb3JuLmFsbExpbmVCcmVha3MsICdcXG4nKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW2NvbW1lbnQsICdUS19CTE9DS19DT01NRU5UJywgZGlyZWN0aXZlc107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBwZWVrIGZvciBjb21tZW50IC8vIC4uLlxuICAgICAgICAgICAgaWYgKGlucHV0LnBlZWsoKSA9PT0gJy8nKSB7XG4gICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgIGNvbW1lbnRfbWF0Y2ggPSBpbnB1dC5tYXRjaChjb21tZW50X3BhdHRlcm4pO1xuICAgICAgICAgICAgICAgIGNvbW1lbnQgPSAnLy8nICsgY29tbWVudF9tYXRjaFswXTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW2NvbW1lbnQsICdUS19DT01NRU5UJ107XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBzdGFydFhtbFJlZ0V4cCA9IC88KCkoWy1hLXpBLVo6MC05Xy5dK3x7W1xcc1xcU10rP318IVxcW0NEQVRBXFxbW1xcc1xcU10qP1xcXVxcXSkoXFxzK3tbXFxzXFxTXSs/fXxcXHMrWy1hLXpBLVo6MC05Xy5dK3xcXHMrWy1hLXpBLVo6MC05Xy5dK1xccyo9XFxzKignW14nXSonfFwiW15cIl0qXCJ8e1tcXHNcXFNdKz99KSkqXFxzKihcXC8/KVxccyo+L2c7XG5cbiAgICAgICAgaWYgKGMgPT09ICdgJyB8fCBjID09PSBcIidcIiB8fCBjID09PSAnXCInIHx8IC8vIHN0cmluZ1xuICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgIChjID09PSAnLycpIHx8IC8vIHJlZ2V4cFxuICAgICAgICAgICA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AgICAgICAgICAgIGhhc19jaGFyX2VzY2FwZXMgPSBmYWxzZTtcblxuICAgICAgICAgICAgcmVzdWx0aW5nX3N0cmluZyA9IGM7XG5cbiAgICAgICAgICAgIGlmIChzZXAgPT09ICcvJykge1xuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gaGFuZGxlIHJlZ2V4cFxuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgdmFyIGluX2NoYXJfY2xhc3MgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB3aGlsZSAoaW5wdXQuaGFzTmV4dCgpICYmXG4gICAgICAgICAgICAgICAgICAgICgoZXNjIHx8IGluX2NoYXJfY2xhc3MgfHwgaW5wdXQucGVlaygpICE9PSBzZXApICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAhaW5wdXQudGVzdENoYXIoYWNvcm4ubmV3bGluZSkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgKz0gaW5wdXQucGVlaygpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWVzYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXNjID0gaW5wdXQucGVlaygpID09PSAnXFxcXCc7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQucGVlaygpID09PSAnWycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbl9jaGFyX2NsYXNzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQucGVlaygpID09PSAnXScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbl9jaGFyX2NsYXNzID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlc2MgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChvcHRzLmU0eCAmJiBzZXAgPT09ICc8Jykge1xuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gaGFuZGxlIGU0eCB4bWwgbGl0ZXJhbHNcbiAgICAgICAgICAgICAgICAvL1xuXG4gICAgICAgICAgICAgICAgdmFyIHhtbFJlZ0V4cCA9IC9bXFxzXFxTXSo/PChcXC8/KShbLWEtekEtWjowLTlfLl0rfHtbXFxzXFxTXSs/fXwhXFxbQ0RBVEFcXFtbXFxzXFxTXSo/XFxdXFxdKShcXHMre1tcXHNcXFNdKz99fFxccytbLWEtekEtWjowLTlfLl0rfFxccytbLWEtekEtWjowLTlfLl0rXFxzKj1cXHMqKCdbXiddKid8XCJbXlwiXSpcInx7W1xcc1xcU10rP30pKSpcXHMqKFxcLz8pXFxzKj4vZztcbiAgICAgICAgICAgICAgICBpbnB1dC5iYWNrKCk7XG4gICAgICAgICAgICAgICAgdmFyIHhtbFN0ciA9ICcnO1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IGlucHV0Lm1hdGNoKHN0YXJ0WG1sUmVnRXhwKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gVHJpbSByb290IHRhZyB0byBhdHRlbXB0IHRvXG4gICAgICAgICAgICAgICAgICAgIHZhciByb290VGFnID0gbWF0Y2hbMl0ucmVwbGFjZSgvXntcXHMrLywgJ3snKS5yZXBsYWNlKC9cXHMrfSQvLCAnfScpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaXNDdXJseVJvb3QgPSByb290VGFnLmluZGV4T2YoJ3snKSA9PT0gMDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRlcHRoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKG1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXNFbmRUYWcgPSAhIW1hdGNoWzFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRhZ05hbWUgPSBtYXRjaFsyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpc1NpbmdsZXRvblRhZyA9ICghIW1hdGNoW21hdGNoLmxlbmd0aCAtIDFdKSB8fCAodGFnTmFtZS5zbGljZSgwLCA4KSA9PT0gXCIhW0NEQVRBW1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaXNTaW5nbGV0b25UYWcgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGFnTmFtZSA9PT0gcm9vdFRhZyB8fCAoaXNDdXJseVJvb3QgJiYgdGFnTmFtZS5yZXBsYWNlKC9ee1xccysvLCAneycpLnJlcGxhY2UoL1xccyt9JC8sICd9JykpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc0VuZFRhZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLWRlcHRoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsrZGVwdGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgeG1sU3RyICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRoIDw9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoID0gaW5wdXQubWF0Y2goeG1sUmVnRXhwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBpZiB3ZSBkaWRuJ3QgY2xvc2UgY29ycmVjdGx5LCBrZWVwIHVuZm9ybWF0dGVkLlxuICAgICAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB4bWxTdHIgKz0gaW5wdXQubWF0Y2goL1tcXHNcXFNdKi9nKVswXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB4bWxTdHIgPSB4bWxTdHIucmVwbGFjZShhY29ybi5hbGxMaW5lQnJlYWtzLCAnXFxuJyk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbeG1sU3RyLCBcIlRLX1NUUklOR1wiXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgLy8gaGFuZGxlIHN0cmluZ1xuICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgdmFyIHBhcnNlX3N0cmluZyA9IGZ1bmN0aW9uKGRlbGltaXRlciwgYWxsb3dfdW5lc2NhcGVkX25ld2xpbmVzLCBzdGFydF9zdWIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gVGVtcGxhdGUgc3RyaW5ncyBjYW4gdHJhdmVycyBsaW5lcyB3aXRob3V0IGVzY2FwZSBjaGFyYWN0ZXJzLlxuICAgICAgICAgICAgICAgICAgICAvLyBPdGhlciBzdHJpbmdzIGNhbm5vdFxuICAgICAgICAgICAgICAgICAgICB2YXIgY3VycmVudF9jaGFyO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoaW5wdXQuaGFzTmV4dCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X2NoYXIgPSBpbnB1dC5wZWVrKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIShlc2MgfHwgKGN1cnJlbnRfY2hhciAhPT0gZGVsaW1pdGVyICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhbGxvd191bmVzY2FwZWRfbmV3bGluZXMgfHwgIWFjb3JuLm5ld2xpbmUudGVzdChjdXJyZW50X2NoYXIpKSkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhhbmRsZSBcXHJcXG4gbGluZWJyZWFrcyBhZnRlciBlc2NhcGVzIG9yIGluIHRlbXBsYXRlIHN0cmluZ3NcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZXNjIHx8IGFsbG93X3VuZXNjYXBlZF9uZXdsaW5lcykgJiYgYWNvcm4ubmV3bGluZS50ZXN0KGN1cnJlbnRfY2hhcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jaGFyID09PSAnXFxyJyAmJiBpbnB1dC5wZWVrKDEpID09PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfY2hhciA9IGlucHV0LnBlZWsoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0aW5nX3N0cmluZyArPSAnXFxuJztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0aW5nX3N0cmluZyArPSBjdXJyZW50X2NoYXI7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jaGFyID09PSAneCcgfHwgY3VycmVudF9jaGFyID09PSAndScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzX2NoYXJfZXNjYXBlcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzYyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc2MgPSBjdXJyZW50X2NoYXIgPT09ICdcXFxcJztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhcnRfc3ViICYmIHJlc3VsdGluZ19zdHJpbmcuaW5kZXhPZihzdGFydF9zdWIsIHJlc3VsdGluZ19zdHJpbmcubGVuZ3RoIC0gc3RhcnRfc3ViLmxlbmd0aCkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlbGltaXRlciA9PT0gJ2AnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlX3N0cmluZygnfScsIGFsbG93X3VuZXNjYXBlZF9uZXdsaW5lcywgJ2AnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZV9zdHJpbmcoJ2AnLCBhbGxvd191bmVzY2FwZWRfbmV3bGluZXMsICckeycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dC5oYXNOZXh0KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0aW5nX3N0cmluZyArPSBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIGlmIChzZXAgPT09ICdgJykge1xuICAgICAgICAgICAgICAgICAgICBwYXJzZV9zdHJpbmcoJ2AnLCB0cnVlLCAnJHsnKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwYXJzZV9zdHJpbmcoc2VwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChoYXNfY2hhcl9lc2NhcGVzICYmIG9wdHMudW5lc2NhcGVfc3RyaW5ncykge1xuICAgICAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgPSB1bmVzY2FwZV9zdHJpbmcocmVzdWx0aW5nX3N0cmluZyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChpbnB1dC5wZWVrKCkgPT09IHNlcCkge1xuICAgICAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgKz0gc2VwO1xuICAgICAgICAgICAgICAgIGlucHV0Lm5leHQoKTtcblxuICAgICAgICAgICAgICAgIGlmIChzZXAgPT09ICcvJykge1xuICAgICAgICAgICAgICAgICAgICAvLyByZWdleHBzIG1heSBoYXZlIG1vZGlmaWVycyAvcmVnZXhwL01PRCAsIHNvIGZldGNoIHRob3NlLCB0b29cbiAgICAgICAgICAgICAgICAgICAgLy8gT25seSBbZ2ltXSBhcmUgdmFsaWQsIGJ1dCBpZiB0aGUgdXNlciBwdXRzIGluIGdhcmJhZ2UsIGRvIHdoYXQgd2UgY2FuIHRvIHRha2UgaXQuXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChpbnB1dC5oYXNOZXh0KCkgJiYgYWNvcm4uaXNJZGVudGlmaWVyU3RhcnQoaW5wdXQucGVla0NoYXJDb2RlKCkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRpbmdfc3RyaW5nICs9IGlucHV0Lm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBbcmVzdWx0aW5nX3N0cmluZywgJ1RLX1NUUklORyddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICcjJykge1xuXG4gICAgICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCA9PT0gMCAmJiBpbnB1dC5wZWVrKCkgPT09ICchJykge1xuICAgICAgICAgICAgICAgIC8vIHNoZWJhbmdcbiAgICAgICAgICAgICAgICByZXN1bHRpbmdfc3RyaW5nID0gYztcbiAgICAgICAgICAgICAgICB3aGlsZSAoaW5wdXQuaGFzTmV4dCgpICYmIGMgIT09ICdcXG4nKSB7XG4gICAgICAgICAgICAgICAgICAgIGMgPSBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdGluZ19zdHJpbmcgKz0gYztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIFt0cmltKHJlc3VsdGluZ19zdHJpbmcpICsgJ1xcbicsICdUS19VTktOT1dOJ107XG4gICAgICAgICAgICB9XG5cblxuXG4gICAgICAgICAgICAvLyBTcGlkZXJtb25rZXktc3BlY2lmaWMgc2hhcnAgdmFyaWFibGVzIGZvciBjaXJjdWxhciByZWZlcmVuY2VzXG4gICAgICAgICAgICAvLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9Fbi9TaGFycF92YXJpYWJsZXNfaW5fSmF2YVNjcmlwdFxuICAgICAgICAgICAgLy8gaHR0cDovL214ci5tb3ppbGxhLm9yZy9tb3ppbGxhLWNlbnRyYWwvc291cmNlL2pzL3NyYy9qc3NjYW4uY3BwIGFyb3VuZCBsaW5lIDE5MzVcbiAgICAgICAgICAgIHZhciBzaGFycCA9ICcjJztcbiAgICAgICAgICAgIGlmIChpbnB1dC5oYXNOZXh0KCkgJiYgaW5wdXQudGVzdENoYXIoZGlnaXQpKSB7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBjID0gaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICBzaGFycCArPSBjO1xuICAgICAgICAgICAgICAgIH0gd2hpbGUgKGlucHV0Lmhhc05leHQoKSAmJiBjICE9PSAnIycgJiYgYyAhPT0gJz0nKTtcbiAgICAgICAgICAgICAgICBpZiAoYyA9PT0gJyMnKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5wZWVrKCkgPT09ICdbJyAmJiBpbnB1dC5wZWVrKDEpID09PSAnXScpIHtcbiAgICAgICAgICAgICAgICAgICAgc2hhcnAgKz0gJ1tdJztcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5wZWVrKCkgPT09ICd7JyAmJiBpbnB1dC5wZWVrKDEpID09PSAnfScpIHtcbiAgICAgICAgICAgICAgICAgICAgc2hhcnAgKz0gJ3t9JztcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBbc2hhcnAsICdUS19XT1JEJ107XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYyA9PT0gJzwnICYmIChpbnB1dC5wZWVrKCkgPT09ICc/JyB8fCBpbnB1dC5wZWVrKCkgPT09ICclJykpIHtcbiAgICAgICAgICAgIGlucHV0LmJhY2soKTtcbiAgICAgICAgICAgIHZhciB0ZW1wbGF0ZV9tYXRjaCA9IGlucHV0Lm1hdGNoKHRlbXBsYXRlX3BhdHRlcm4pO1xuICAgICAgICAgICAgaWYgKHRlbXBsYXRlX21hdGNoKSB7XG4gICAgICAgICAgICAgICAgYyA9IHRlbXBsYXRlX21hdGNoWzBdO1xuICAgICAgICAgICAgICAgIGMgPSBjLnJlcGxhY2UoYWNvcm4uYWxsTGluZUJyZWFrcywgJ1xcbicpO1xuICAgICAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX1NUUklORyddO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICc8JyAmJiBpbnB1dC5tYXRjaCgvXFwhLS0vZykpIHtcbiAgICAgICAgICAgIGMgPSAnPCEtLSc7XG4gICAgICAgICAgICB3aGlsZSAoaW5wdXQuaGFzTmV4dCgpICYmICFpbnB1dC50ZXN0Q2hhcihhY29ybi5uZXdsaW5lKSkge1xuICAgICAgICAgICAgICAgIGMgKz0gaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaW5faHRtbF9jb21tZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX0NPTU1FTlQnXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjID09PSAnLScgJiYgaW5faHRtbF9jb21tZW50ICYmIGlucHV0Lm1hdGNoKC8tPi9nKSkge1xuICAgICAgICAgICAgaW5faHRtbF9jb21tZW50ID0gZmFsc2U7XG4gICAgICAgICAgICByZXR1cm4gWyctLT4nLCAnVEtfQ09NTUVOVCddO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGMgPT09ICcuJykge1xuICAgICAgICAgICAgaWYgKGlucHV0LnBlZWsoKSA9PT0gJy4nICYmIGlucHV0LnBlZWsoMSkgPT09ICcuJykge1xuICAgICAgICAgICAgICAgIGMgKz0gaW5wdXQubmV4dCgpICsgaW5wdXQubmV4dCgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX09QRVJBVE9SJ107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW2MsICdUS19ET1QnXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpbl9hcnJheShjLCBwdW5jdCkpIHtcbiAgICAgICAgICAgIHdoaWxlIChpbnB1dC5oYXNOZXh0KCkgJiYgaW5fYXJyYXkoYyArIGlucHV0LnBlZWsoKSwgcHVuY3QpKSB7XG4gICAgICAgICAgICAgICAgYyArPSBpbnB1dC5uZXh0KCk7XG4gICAgICAgICAgICAgICAgaWYgKCFpbnB1dC5oYXNOZXh0KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoYyA9PT0gJywnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfQ09NTUEnXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYyA9PT0gJz0nKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtjLCAnVEtfRVFVQUxTJ107XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBbYywgJ1RLX09QRVJBVE9SJ107XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gW2MsICdUS19VTktOT1dOJ107XG4gICAgfVxuXG5cbiAgICBmdW5jdGlvbiB1bmVzY2FwZV9zdHJpbmcocykge1xuICAgICAgICAvLyBZb3UgdGhpbmsgdGhhdCBhIHJlZ2V4IHdvdWxkIHdvcmsgZm9yIHRoaXNcbiAgICAgICAgLy8gcmV0dXJuIHMucmVwbGFjZSgvXFxcXHgoWzAtOWEtZl17Mn0pL2dpLCBmdW5jdGlvbihtYXRjaCwgdmFsKSB7XG4gICAgICAgIC8vICAgICAgICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUocGFyc2VJbnQodmFsLCAxNikpO1xuICAgICAgICAvLyAgICAgfSlcbiAgICAgICAgLy8gSG93ZXZlciwgZGVhbGluZyB3aXRoICdcXHhmZicsICdcXFxceGZmJywgJ1xcXFxcXHhmZicgbWFrZXMgdGhpcyBtb3JlIGZ1bi5cbiAgICAgICAgdmFyIG91dCA9ICcnLFxuICAgICAgICAg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ICAgICAgICAgICAgICBvdXQgKz0gaW5wdXRfc2Nhbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUncyBzb21lIGVycm9yIGRlY29kaW5nLCByZXR1cm4gdGhlIG9yaWdpbmFsIHN0cmluZ1xuICAgICAgICAgICAgICAgIGlmICghbWF0Y2hlZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBlc2NhcGVkID0gcGFyc2VJbnQobWF0Y2hlZFsxXSwgMTYpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGVzY2FwZWQgPiAweDdlICYmIGVzY2FwZWQgPD0gMHhmZiAmJiBtYXRjaGVkWzBdLmluZGV4T2YoJ3gnKSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAvLyB3ZSBiYWlsIG91dCBvbiBcXHg3Zi4uXFx4ZmYsXG4gICAgICAgICAgICAgICAgICAgIC8vIGxlYXZpbmcgd2hvbGUgc3RyaW5nIGVzY2FwZWQsXG4gICAgICAgICAgICAgICAgICAgIC8vIGFzIGl0J3MgcHJvYmFibHkgY29tcGxldGVseSBiaW5hcnlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHM7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChlc2NhcGVkID49IDB4MDAgJiYgZXNjYXBlZCA8IDB4MjApIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gbGVhdmUgMHgwMC4uLjB4MWYgZXNjYXBlZFxuICAgICAgICAgICAgICAgICAgICBvdXQgKz0gJ1xcXFwnICsgbWF0Y2hlZFswXTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChlc2NhcGVkID09PSAweDIyIHx8IGVzY2FwZW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4gICAgICAgIHZhciBrO1xuICAgICAgICBmb3IgKGsgaW4gb2JqKSB7XG4gICAgICAgICAgICBpZiAob2JqLmhhc093blByb3BlcnR5KGspKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gaXNVbmRlZmluZWQoaW5wdXQpIHtcbiAgICByZXR1cm4gaW5wdXQgPT09IHZvaWQgMDtcbn1cblxuZnVuY3Rpb24gaXNOdW1iZXIoaW5wdXQpIHtcbiAgICByZXR1cm4gdHlwZW9mIGlucHV0ID09PSAnbnVtYmVyJyB8fCBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoaW5wdXQpID09PSAnW29iamVjdCBOdW1iZXJdJztcbn1cblxuZnVuY3Rpb24gaXNEYXRlKGlucHV0KSB7XG4gICAgcmV0dXJuIGlucHV0IGluc3RhbmNlb2YgRGF0ZSB8fCBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoaW5wdXQpID09PSAnW29iamVjdCBEYXRlXSc7XG59XG5cbmZ1bmN0aW9uIG1hcChhcnIsIGZuKSB7XG4gICAgdmFyIHJlcyA9IFtdLCBpO1xuICAgIGZvciAoaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgcmVzLnB1c2goZm4oYXJyW2ldLCBpKSk7XG4gICAgfVxuICAgIHJldHVybiByZXM7XG59XG5cbmZ1bmN0aW9uIGhhc093blByb3AoYSwgYikge1xuICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoYSwgYik7XG59XG5cbmZ1bmN0aW9uIGV4dGVuZChhLCBiKSB7XG4gICAgZm9yICh2YXIgaSBpbiBiKSB7XG4gICAgICAgIGlmIChoYXNPd25Qcm9wKGIsIGkpKSB7XG4gICAgICAgICAgICBhW2ldID0gYltpXTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChoYXNPd25Qcm9wKGIsICd0b1N0cmluZycpKSB7XG4gICAgICAgIGEudG9TdHJpbmcgPSBiLnRvU3RyaW5nO1xuICAgIH1cblxuICAgIGlmIChoYXNPd25Qcm9wKGIsICd2YWx1ZU9mJykpIHtcbiAgICAgICAgYS52YWx1ZU9mID0gYi52YWx1ZU9mO1xuICAgIH1cblxuICAgIHJldHVybiBhO1xufVxuXG5mdW5jdGlvbiBjcmVhdGVVVEMgKGlucHV0LCBmb3JtYXQsIGxvY2FsZSwgc3RyaWN0KSB7XG4gICAgcmV0dXJuIGNyZWF0ZUxvY2FsT3JVVEMoaW5wdXQsIGZvcm1hdCwgbG9jYWxlLCBzdHJpY3QsIHRydWUpLnV0YygpO1xufVxuXG5mdW5jdGlvbiBkZWZhdWx0UGFyc2luZ0ZsYWdzKCkge1xuICAgIC8vIFdlIG5lZWQgdG8gZGVlcCBjbG9uZSB0aGlzIG9iamVjdC5cbiAgICByZXR1cm4ge1xuICAgICAgICBlbXB0eSAgICAgICAgICAgOiBmYWxzZSxcbiAgICAgICAgdW51c2VkVG9rZW5zICAgIDogW10sXG4gICAgICAgIHVudXNlZElucHV0ICAgICA6IFtdLFxuICAgICAgICBvdmVyZmxvdyAgICAgICAgOiAtMixcbiAgICAgICAgY2hhcnNMZWZ0T3ZlciAgIDogMCxcbiAgICAgICAgbnVsbElucHV0ICAgICAgIDogZmFsc2UsXG4gICAgICAgIGludmFsaWRNb250aCAgICA6IG51bGwsXG4gICAgICAgIGludmFsaWRGb3JtYXQgICA6IGZhbHNlLFxuICAgICAgICB1c2VySW52YWxpZGF0ZWQgOiBmYWxzZSxcbiAgICAgICAgaXNvICAgICAgICAgICAgIDogZmFsc2UsXG4gICAgICAgIHBhcnNlZERhdGVQYXJ0cyA6IFtdLFxuICAgICAgICBtZXJpZGllbSAgICAgICAgOiBudWxsLFxuICAgICAgICByZmMyODIyICAgICAgICAgOiBmYWxzZ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gMCAmJlxuICAgICAgICAgICAgIWZsYWdzLmVtcHR5ICYmXG4gICAgICAgICAgICAhZmxhZ3MuaW52YWxpZE1vbnRoICYmXG4gICAgICAgICAgICAhZmxhZ3MuaW52YWxpZFdlZWtkYXkgJiZcbiAgICAgICAgICAgICFmbGFncy53ZWVrZGF5TWlzbWF0Y2ggJiZcbiAgICAgICAgICAgICFmbGFncy5udWxsSW5wdXQgJiZcbiAgICAgICAgICAgICFmbGFncy5pbnZhbGlkRm9ybWF0ICYmXG4gICAgICAgICAgICAhZmxhZ3MudXNlckludmFsaWRhdGVkICYmXG4gICAgICAgICAgICAoIWZsYWdzLm1lcmlkaWVtIHx8IChmbGFncy5tZXJpZGllbSAmJiBwYXJzZWRQYXJ0cykpO1xuXG4gICAgICAgIGlmIChtLl9zdHJpY3QpIHtcbiAgICAgICAgICAgIGlzTm93VmFsaWQgPSBpc05vd1ZhbGlkICYmXG4gICAgICAgICAgICAgICAgZmxhZ3MuY2hhcnNMZWZ0T3ZlciA9PT0gMCAmJlxuICAgICAgICAgICAgICAgIGZsYWdzLnVudXNlZFRva2Vucy5sZW5ndGggPT09IDAgJiZcbiAgICAgICAgICAgICAgICBmbGFncy5iaWdIb3VyID09PSB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoT2JqZWN0LmlzRnJvemVuID09IG51bGwgfHwgIU9iamVjdC5pc0Zyb3plbihtKSkge1xuICAgICAgICAgICAgbS5faXNWYWxpZCA9IGlzTm93VmFsaWQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gaXNOb3dWYWxpZDtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbS5faXNWYWxpZDtcbn1cblxuZnVuY3Rpb24gY3JlYXRlSW52YWxpZCAoZmxhZ3MpIHtcbiAgICB2YXIgbSA9IGNyZWF0ZVVUQyhOYU4pO1xuICAgIGlmIChmbGFncyAhPSBudWxsKSB7XG4gICAgIC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YXJlIHR3byBhcnJheXMsIHJldHVybiB0aGUgbnVtYmVyIG9mIGRpZmZlcmVuY2VzXG5mdW5jdGlvbiBjb21wYXJlQXJyYXlzKGFycmF5MSwgYXJyYXkyLCBkb250Q29udmVydCkge1xuICAgIHZhciBsZW4gPSBNYXRoLm1pbihhcnJheTEubGVuZ3RoLCBhcnJheTIubGVuZ3RoKSxcbiAgICAgICAgbGVuZ3RoRGlmZiA9IE1hdGguYWJzKGFycmF5MS5sZW5ndGggLSBhcnJheTIubGVuZ3RoKSxcbiAgICAgICAgZGlmZnMgPSAwLFxuICAgICAgICBpO1xuICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkrKykge1xuICAgICAgICBpZiAoKGRvbnRDb252ZXJ0ICYmIGFycmF5MVtpXSAhPT0gYXJyYXkyW2ldKSB8fFxuICAgICAgICAgICAgKCFkb250Q29udmVydCAmJiB0b0ludChhcnJheTFbaV0pICE9PSB0b0ludChhcnJheTJbaV0pKSkge1xuICAgICAgICAgICAgZGlmZnMrKztcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gZGlmZnMgKyBsZW5ndGhEaWZmO1xufVxuXG5mdW5jdGlvbiB3YXJuKG1zZykge1xuICAgIGlmIChob29rcy5zdXBwcmVzc0RlcHJlY2F0aW9uV2FybmluZ3MgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAodHlwZW9mIGNvbnNvbGUgIT09ICAndW5kZWZpbmVkJykgJiYgY29uc29sZS53YXJuKSB7XG4gICAgICAgIGNvbnNvbGUud2FybignRGVwcmVjYXRpb24gd2FybmluZzogJyArIG1zZyk7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBkZXByZWNhdGUobXNnLCBmbikge1xuICAgIHZhciBmaXJzdFRpbWUgPSB0cnVlO1xuXG4gICAgcmV0dXJuIGV4dGVuZChmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmIChob29rcy5kZXByZWNhdGlvbkhhbmRsZXIgIT0gbnVsbCkge1xuICAgICAgICAgICAgaG9va3MuZGVwcmVjYXRpb25IYW5kbGVyKG51bGwsIG1zZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGZpcnN0VGltZSkge1xuICAgICAgICAgICAgdmFyIGFyZ3MgPSBbXTtcbiAgICAgICAgICAgIHZhciBhcmc7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGFyZyA9ICcnO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgYXJndW1lbnRzW2ldID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICBhcmcgKz0gJ1xcblsnICsgaSArICddICc7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBhcmd1bWVudHNbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyZyArPSBrZXkgKyAnOiAnICsgYXJndW1lbnRzWzBdW2tleV0gKyAnLCAnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGFyZyA9IGFyZy5zbGljZSgwLCAtMik7IC8vIFJlbW92ZSB0cmFpbGluZyBjb21tYSBhbmQgc3BhY2VcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBhcmcgPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFyZ3MucHVzaChhcmcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2Fybihtc2cgKyAnXFxuQXJndW1lbnRzOiAnICsgQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncykuam9pbignJykgKyAnXFxuJyArIChuZXcgRXJyb3IoKSkuc3RhY2spO1xuICAgICAgICAgICAgZmlyc3RUaW1lID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZuLmFwcGx5KHRoaXMsIGFyZ3VtZW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lbHNlIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgcmVzW3Byb3BdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGZvciAocHJvcCBpbiBwYXJlbnRDb25maWcpIHtcbiAgICAgICAgaWYgKGhhc093blByb3AocGFyZW50Q29uZmlnLCBwcm9wKSAmJlxuICAgICAgICAgICAgICAgICFoYXNPd25Qcm9wKGNoaWxkQ29uZmlnLCBwcm9wKSAmJlxuICAgICAgICAgICAgICAgIGlzT2JqZWN0KHBhcmVudENvbmZpZ1twcm9wXSkpIHtcbiAgICAgICAgICAgIC8vIG1ha2Ugc3VyZSBjaGFuZ2VzIHRvIHByb3BlcnRpZXMgZG9uJ3QgbW9kaWZ5IHBhcmVudCBjb25maWdcbiAgICAgICAgICAgIHJlc1twcm9wXSA9IGV4dGVuZCh7fSwgcmVzW3Byb3BdKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gcmVzO1xufVxuXG5mdW5jdGlvbiBMb2NhbGUoY29uZmlnKSB7XG4gICAgaWYgKGNvbmZpZyAhPSBudWxsKSB7XG4gICAgICAgIHRoaXMuc2V0KGNvbmZpZyk7XG4gICAgfVxufVxuXG52YXIga2V5cztcblxuaWYgKE9iamVjdC5rZXlzKSB7XG4gICAga2V5cyA9IE9iamVjdC5rZXlzO1xufSBlbHNlIHtcbiAgICBrZXlzID0gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICB2YXIgaSwgcmVzID0gW107XG4gICAgICAgIGZvciAoaSBpbiBvYmopIHtcbiAgICAgICAgICAgIGlmIChoYXNPd25Qcm9wKG9iaiwgaSkpIHtcbiAgICAgICAgICAgICAgICByZXMucHVzaChpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzO1xuICAgIH07XG59XG5cbnZhciBkZWZhdWx0Q2FsZW5kYXIgPSB7XG4gICAgc2FtZURheSA6ICdbVG9kYXkgYXRdIExUJyxcbiAgICB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4gICAgZm9yIChwcm9wIGluIGlucHV0T2JqZWN0KSB7XG4gICAgICAgIGlmIChoYXNPd25Qcm9wKGlucHV0T2JqZWN0LCBwcm9wKSkge1xuICAgICAgICAgICAgbm9ybWFsaXplZFByb3AgPSBub3JtYWxpemVVbml0cyhwcm9wKTtcbiAgICAgICAgICAgIGlmIChub3JtYWxpemVkUHJvcCkge1xuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWRJbnB1dFtub3JtYWxpemVkUHJvcF0gPSBpbnB1dE9iamVjdFtwcm9wXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBub3JtYWxpemVkSW5wdXQ7XG59XG5cbnZhciBwcmlvcml0aWVzID0ge307XG5cbmZ1bmN0aW9uIGFkZFVuaXRQcmlvcml0eSh1bml0LCBwcmlvcml0eSkge1xuICAgIHByaW9yaXRpZXNbdW5pdF0gPSBwcmlvcml0eTtcbn1cblxuZnVuY3Rpb24gZ2V0UHJpb3JpdGl6ZWRVbml0cyh1bml0c09iaikge1xuICAgIHZhciB1bml0cyA9IFtdO1xuICAgIGZvciAodmFyIHUgaW4gdW5pdHNPYmopIHtcbiAgICAgICAgdW5pdHMucHVzaCh7dW5pdDogdSwgcHJpb3JpdHk6IHByaW9yaXRpZXNbdV19KTtcbiAgICB9XG4gICAgdW5pdHMuc29ydChmdW5jdGlvbiAoYSwgYikge1xuICAgICAgICByZXR1cm4gYS5wcmlvcml0eSAtIGIucHJpb3JpdHk7XG4gICAgfSk7XG4gICAgcmV0dXJuIHVuaXRzO1xufVxuXG5mdW5jdGlvbiB6ZXJvRmlsbChudW1iZXIsIHRhcmdldExlbmd0aCwgZm9yY2VTaWduKSB7XG4gICAgdmFyIGFic051bWJlciA9ICcnICsgTWF0aC5hYnMobnVtYmVyKSxcbiAgICAgICAgemVyb3NUb0ZpbGwgPSB0YXJnZXRMZW5ndGggLSBhYnNOdW1iZXIubGVuZ3RoLFxuICAgICAgICBzaWduID0g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JyYXkucHJvdG90eXBlLmluZGV4T2YpIHtcbiAgICBpbmRleE9mID0gQXJyYXkucHJvdG90eXBlLmluZGV4T2Y7XG59IGVsc2Uge1xuICAgIGluZGV4T2YgPSBmdW5jdGlvbiAobykge1xuICAgICAgICAvLyBJIGtub3dcbiAgICAgICAgdmFyIGk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCB0aGlzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBpZiAodGhpc1tpXSA9PT0gbykge1xuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9O1xufVxuXG5mdW5jdGlvbiBkYXlzSW5Nb250aCh5ZWFyLCBtb250aCkge1xuICAgIGlmIChpc05hTih5ZWFyKSB8fCBpc05hTihtb250aCkpIHtcbiAgICAgICAgcmV0dXJuIE5hTjtcbiAgICB9XG4gICAgdmFyIG1vZE1vbnRoID0gbW9kKG1vbnRoLCAxMik7XG4gICAgeWVhciArPSAobW9udGggLSBtb2RNb250aCkgLyAxMjtcbiAgICByZXR1cm4gbW9kTW9udGggPT09IDEgPyAoaXNMZWFwWWVhcih5ZWFyKSA/IDI5IDogMjgpIDogKDMxIC0gbW9kTW9udGggJSA3ICUgMik7XG59XG5cbi8vIEZPUk1BVFRJTkdcblxuYWRkRm9ybWF0VG9rZW4oJ00nLCBbJ01NJywgMl0sICdNbycsIGZ1bmN0aW9uICgpIHtcbiAgICByZXR1cm4gdGhpcy5tb250aCgpICsgMTtcbn0pO1xuXG5hZGRGb3JtYXRUb2tlbignTU1NJywgMCwgMCwgZnVuY3Rpb24gKGZvcm1hdCkge1xuICAgIHJldHVybiB0aGlzLmxvY2FsZURhdGEoKS5tb250aHNTaG9ydCh0aGlzLCBmb3JtYXQpO1xufSk7XG5cbmFkZEZvcm1hdFRva2VuKCdNTU1NJywgMCwgMCwgZnVuY3Rpb24gKGZvcm1hdCkge1xuICAgIHJld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gICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fc2hvcnRNb250aHNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YuY2FsbCh0aGlzLl9sb25nTW9udGhzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICByZXR1cm4gaWkgIT09IC0xID8gaWkgOiBudWxsO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGZvcm1hdCA9PT0gJ01NTScpIHtcbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX3Nob3J0TW9udGhzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fbG9uZ01vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX2xvbmdNb250aHNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaWk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YuY2FsbCh0aGlzLl9zaG9ydE1vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZnVuY3Rpb24gbG9jYWxlTW9udGhzUGFyc2UgKG1vbnRoTmFtZSwgZm9ybWF0LCBzdHJpY3QpIHt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gdG9JbnQodmFsdWUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFsdWUgPSBtb20ubG9jYWxlRGF0YSgpLm1vbnRoc1BhcnNlKHZhbHVlKTtcbiAgICAgICAgICAgIC8vIFRPRE86IEFub3RoZXIgc2lsZW50IGZhaWx1cmU/XG4gICAgICAgICAgICBpZiAoIWlzTnVtYmVyKHZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBtb207XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBkYXlPZk1vbnRoID0gTWF0aC5taW4obW9tLmRhdGUoKSwgZGF5c0luTW9udGgobW9tLnllYXIoKSwgdmFsdWUpKTtcbiAgICBtb20uX2RbJ3NldCcgKyAobW9tLl9pc1VUQyA/ICdVVEMnIDogJycpICsgJ01vbnRoJ10odmFsdWUsIGRheU9mTW9udGgpO1xuICAgIHJldHVybiBtb207XG59XG5cbmZ1bmN0aW9uIGdldFNldE1vbnRoICh2YWx1ZSkge1xuICAgIGlmICh2YWx1ZSAhPSBudWxsKSB7XG4gICAgICAgIHNldE1vbnRoKHRoaXMsIHZhbHVlKTtcbiAgICAgICAgaG9va3MudXBkYXRlT2Zmc2V0KHRoaXMsIHRydWUpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gZ2V0KHRoaXMsICdNb250aCcpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gZ2V0RGF5c0luTW9udGggKCkge1xuICAgIHJldHVybiBkYXlzSW5Nb250aCh0aGlzLnllYXIoKSwgdGhpcy5tb250aCgpKTtcbn1cblxudmFyIGRlZmF1bHRNb250aHNTaG9ydFJlZ2V4ID0gbWF0Y2hXb3JkO1xuZnVuY3Rpb24gbW9udGhzU2hvcnRSZWdleCAoaXNTdHJpY3QpIHtcbiAgICBpZiAodGhpcy5fbW9udGhzUGFyc2VFeGFjdCkge1xuICAgICAgICBpZiAoIWhhc093blByb3AodGhpcywgJ19tb250aHNSZWdleCcpKSB7XG4gICAgICAgICAgICBjb21wdXRlTW9udGhzUGFyc2UuY2FsbCh0aGlzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNTdHJpY3QpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9tb250aHNTaG9ydFN0cmljdFJlZ2V4O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21vbnRoc1Nob3J0UmVnZXg7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoIWhhc093blByb3AodGhpcywgJ19tb250aHNTaG9ydFJlZ2V4JykpIHtcbiAgICAgICAgICAgIHRoaXMuX21vbnRoc1Nob3J0UmVnZXggPSBkZWZhdWx0TW9udGhzU2hvcnRSZWdleDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5fbW9udGhzU2hvcnRTdHJpY3RSZWdleCAmJiBpc1N0cmljdCA/XG4gICAgICAgICAgICB0aGlzLl9tb250aHNTaG9ydFN0cmljdFJlZ2V4IDogdGhpcy5fbW9udGhzU2hvcnRSZWdleDtcbiAgICB9XG59XG5cbnZhciBkZWZhdWx0TW9udGhzUmVnZXggPSBtYXRjaFdvcmQ7XG5mdW5jdGlvbiBtb250aHNSZWdleCAoaXNTdHJpY3QpIHtcbiAgICBpZiAodGhpcy5fbW9udGhzUGFyc2VFeGFjdCkge1xuICAgICAgICBpZiAoIWhhc093blByb3AodGhpcywgJ19tb250aHNSZWdleCcpKSB7XG4gICAgICAgICAgICBjb21wdXRlTW9udGhzUGFyc2UuY2FsbCh0aGlzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNTdHJpY3QpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9tb250aHNTdHJpY3RSZWdleDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9tb250aHNSZWdleDtcbiAgICAgICAg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XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG4gICAgICAgIH0gZWxzZSBpZiAoZm9ybWF0ID09PSAnZGRkJykge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fc2hvcnRXZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX3dlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YuY2FsbCh0aGlzLl9taW5XZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZi5jYWxsKHRoaXMuX3dlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRle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HNwZWNpZmljIHRvIGxlYXN0LCBidXQgbW92ZSB0byB0aGUgbmV4dCBhcnJheSBpdGVtIGlmIGl0J3MgYSBtb3JlIHNwZWNpZmljIHZhcmlhbnQgdGhhbiB0aGUgY3VycmVudCByb290XG5mdW5jdGlvbiBjaG9vc2VMb2NhbGUobmFtZXMpIHtcbiAgICB2YXIgaSA9IDAsIGosIG5leHQsIGxvY2FsZSwgc3BsaXQ7XG5cbiAgICB3aGlsZSAoaSA8IG5hbWVzLmxlbmd0aCkge1xuICAgICAgICBzcGxpdCA9IG5vcm1hbGl6ZUxvY2FsZShuYW1lc1tpXSkuc3BsaXQoJy0nKTtcbiAgICAgICAgaiA9IHNwbGl0Lmxlbmd0aDtcbiAgICAgICAgbmV4dCA9IG5vcm1hbGl6ZUxvY2FsZShuYW1lc1tpICsgMV0pO1xuICAgICAgICBuZXh0ID0gbmV4dCA/IG5leHQuc3BsaXQoJy0nKSA6IG51bGw7XG4gICAgICAgIHdoaWxlIChqID4gMCkge1xuICAgICAgICAgICAgbG9jYWxlID0gbG9hZExvY2FsZShzcGxpdC5zbGljZSgwLCBqKS5qb2luKCctJykpO1xuICAgICAgICAgICAgaWYgKGxvY2FsZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBsb2NhbGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobmV4dCAmJiBuZXh0Lmxlbmd0aCA+PSBqICYmIGNvbXBhcmVBcnJheXMoc3BsaXQsIG5leHQsIHRydWUpID49IGogLSAxKSB7XG4gICAgICAgICAgICAgICAgLy90aGUgbmV4dCBhcnJheSBpdGVtIGlzIGJldHRlciB0aGFuIGEgc2hhbGxvd2VyIHN1YnN0cmluZyBvZiB0aGlzIG9uZVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgai0tO1xuICAgICAgICB9XG4gICAgICAgIGkrKztcbiAgICB9XG4gICAgcmV0dXJuIG51bGw7XG59XG5cbmZ1bmN0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ICAgICAgICAgICAgZGF0YSA9IGRlZmluZUxvY2FsZShrZXksIHZhbHVlcyk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgLy8gbW9tZW50LmR1cmF0aW9uLl9sb2NhbGUgPSBtb21lbnQuX2xvY2FsZSA9IGRhdGE7XG4gICAgICAgICAgICBnbG9iYWxMb2NhbGUgPSBkYXRhO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIGdsb2JhbExvY2FsZS5fYWJicjtcbn1cblxuZnVuY3Rpb24gZGVmaW5lTG9jYWxlIChuYW1lLCBjb25maWcpIHtcbiAgICBpZiAoY29uZmlnICE9PSBudWxsKSB7XG4gICAgICAgIHZhciBwYXJlbnRDb25maWcgPSBiYXNlQ29uZmlnO1xuICAgICAgICBjb25maWcuYWJiciA9IG5hbWU7XG4gICAgICAgIGlmIChsb2NhbGVzW25hbWVdICE9IG51bGwpIHtcbiAgICAgICAgICAgIGRlcHJlY2F0ZVNpbXBsZSgnZGVmaW5lTG9jYWxlT3ZlcnJpZGUnLFxuICAgICAgICAgICAgICAgICAgICAndXNlIG1vbWVudC51cGRhdGVMb2NhbGUobG9jYWxlTmFtZSwgY29uZmlnKSB0byBjaGFuZ2UgJyArXG4gICAgICAgICAgICAgICAgICAgICdhbiBleGlzdGluZyBsb2NhbGUuIG1vbWVudC5kZWZpbmVMb2NhbGUobG9jYWxlTmFtZSwgJyArXG4gICAgICAgICAgICAgICAgICAgICdjb25maWcpIHNob3VsZCBvbmx5IGJlIHVzZWQgZm9yIGNyZWF0aW5nIGEgbmV3IGxvY2FsZSAnICtcbiAgICAgICAgICAgICAgICAgICAgJ1NlZSBodHRwOi8vbW9tZW50anMuY29tL2d1aWRlcy8jL3dhcm5pbmdzL2RlZmluZS1sb2NhbGUvIGZvciBtb3JlIGluZm8uJyk7XG4gICAgICAgICAgICBwYXJlbnRDb25maWcgPSBsb2NhbGVzW25hbWVdLl9jb25maWc7XG4gICAgICAgIH0gZWxzZSBpZiAoY29uZmlnLnBhcmVudExvY2FsZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBpZiAobG9jYWxlc1tjb25maWcucGFyZW50TG9jYWxlXSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcGFyZW50Q29uZmlnID0gbG9jYWxlc1tjb25maWcucGFyZW50TG9jYWxlXS5fY29uZmlnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIWxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdID0gW107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuICAgICAgICAgICAgICAgICAgICBjb25maWc6IGNvbmZpZ1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxvY2FsZXNbbmFtZV0gPSBuZXcgTG9jYWxlKG1lcmdlQ29uZmlncyhwYXJlbnRDb25maWcsIGNvbmZpZykpO1xuXG4gICAgICAgIGlmIChsb2NhbGVGYW1pbGllc1tuYW1lXSkge1xuICAgICAgICAgICAgbG9jYWxlRmFtaWxpZXNbbmFtZV0uZm9yRWFjaChmdW5jdGlvbiAoeCkge1xuICAgICAgICAgICAgICAgIGRlZmluZUxvY2FsZSh4Lm5hbWUsIHguY29uZmlnKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gYmFja3dhcmRzIGNvbXBhdCBmb3Igbm93OiBhbHNvIHNldCB0aGUgbG9jYWxlXG4gICAgICAgIC8vIG1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AgICAgICAgICAgICBhbGxvd1RpbWUgPSBpc29EYXRlc1tpXVsyXSAhPT0gZmFsc2U7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGRhdGVGb3JtYXQgPT0gbnVsbCkge1xuICAgICAgICAgICAgY29uZmlnLl9pc1ZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1hdGNoWzNdKSB7XG4gICAgICAgICAgICBmb3IgKGkgPSAwLCBsID0gaXNvVGltZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzb1RpbWVzW2ldWzFdLmV4ZWMobWF0Y2hbM10pKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG1hdGNoWzJdIHNob3VsZCBiZSAnVCcgb3Igc3BhY2VcbiAgICAgICAgICAgICAgICAgICAgdGltZUZvcm1hdCA9IChtYXRjaFsyXSB8fCAnICcpICsgaXNvVGltZXNbaV1bMF07XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aW1lRm9ybWF0ID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBjb25maWcuX2lzVmFsaWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFhbGxvd1RpbWUgJiYgdGltZUZvcm1hdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBjb25maWcuX2lzVmFsaWQgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWF0Y2hbNF0pIHtcbiAgICAgICAgICAgIGlmICh0elJlZ2V4LmV4ZWMobWF0Y2hbNF0pKSB7XG4gICAgICAgICAgICAgIC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+IDApIHtcbiAgICAgICAgICAgICAgICBnZXRQYXJzaW5nRmxhZ3MoY29uZmlnKS51bnVzZWRJbnB1dC5wdXNoKHNraXBwZWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3RyaW5nID0gc3RyaW5nLnNsaWNlKHN0cmluZy5pbmRleE9mKHBhcnNlZElucHV0KSArIHBhcnNlZElucHV0Lmxlbmd0aCk7XG4gICAgICAgICAgICB0b3RhbFBhcnNlZElucHV0TGVuZ3RoICs9IHBhcnNlZElucHV0Lmxlbmd0aDtcbiAgICAgICAgfVxuICAgICAgICAvLyBkb24ndCBwYXJzZSBpZiBpdCdzIG5vdCBhIGtub3duIHRva2VuXG4gICAgICAgIGlmIChmb3JtYXRUb2tlbkZ1bmN0aW9uc1t0b2tlbl0pIHtcbiAgICAgICAgICAgIGlmIChwYXJzZWRJbnB1dCkge1xuICAgICAgICAgICAgICAgIGdldFBhcnNpbmdGbGFncyhjb25maWcpLmVtcHR5ID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBnZXRQYXJzaW5nRmxhZ3MoY29uZmlnKS51bnVzZWRUb2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhZGRUaW1lVG9BcnJheUZyb21Ub2tlbih0b2tlbiwgcGFyc2VkSW5wdXQsIGNvbmZpZyk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoY29uZmlnLl9zdHJpY3QgJiYgIXBhcnNlZElucHV0KSB7XG4gICAgICAgICAgICBnZXRQYXJzaW5nRmxhZ3MoY29uZmlnKS51bnVzZWRUb2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBhZGQgcmVtYWluaW5nIHVucGFyc2VkIGlucHV0IGxlbmd0aCB0byB0aGUgc3RyaW5nXG4gICAgZ2V0UGFyc2luZ0ZsYWdzKGNvbmZpZykuY2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hciBkdXJhdGlvbiA9IGlucHV0LFxuICAgICAgICAvLyBtYXRjaGluZyBhZ2FpbnN0IHJlZ2V4cCBpcyBleHBlbnNpdmUsIGRvIGl0IG9uIGRlbWFuZFxuICAgICAgICBtYXRjaCA9IG51bGwsXG4gICAgICAgIHNpZ24sXG4gICAgICAgIHJldCxcbiAgICAgICAgZGlmZlJlcztcblxuICAgIGlmIChpc0R1cmF0aW9uKGlucHV0KSkge1xuICAgICAgICBkdXJhdGlvbiA9IHtcbiAgICAgICAgICAgIG1zIDogaW5wdXQuX21pbGxpc2Vjb25kcyxcbiAgICAgICAgICAgIGQgIDogaW5wdXQuX2RheXMsXG4gICAgICAgICAgICBNICA6IGlucHV0Ll9tb250aHNcbiAgICAgICAgfTtcbiAgICB9IGVsc2UgaWYgKGlzTnVtYmVyKGlucHV0KSkge1xuICAgICAgICBkdXJhdGlvbiA9IHt9O1xuICAgICAgICBpZiAoa2V5KSB7XG4gICAgICAgICAgICBkdXJhdGlvbltrZXldID0gaW5wdXQ7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkdXJhdGlvbi5taWxsaXNlY29uZHMgPSBpbnB1dDtcbiAgICAgICAgfVxuICAgIH0gZWxzZSBpZiAoISEobWF0Y2ggPSBhc3BOZXRSZWdleC5leGVjKGlucHV0KSkpIHtcbiAgICAgICAgc2lnbiA9IChtYXRjaFsxXSA9PT0gJy0nKSA/IC0xIDogMTtcbiAgICAgICAgZHVyYXRpb24gPSB7XG4gICAgICAgICAgICB5ICA6IDAsXG4gICAgICAgICAgICBkICA6IHRvSW50KG1hdGNoW0RBVEVdKSAgICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG4gICAgICAgICAgICBoICA6IHRvSW50KG1hdGNoW0hPVVJdKSAgICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG4gICAgICAgICAgICBtICA6IHRvSW50KG1hdGNoW01JTlVURV0pICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG4g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IHZhciBtaWxsaXNlY29uZHMgPSBkdXJhdGlvbi5fbWlsbGlzZWNvbmRzLFxuICAgICAgICBkYXlzID0gYWJzUm91bmQoZHVyYXRpb24uX2RheXMpLFxuICAgICAgICBtb250aHMgPSBhYnNSb3VuZChkdXJhdGlvbi5fbW9udGhzKTtcblxuICAgIGlmICghbW9tLmlzVmFsaWQoKSkge1xuICAgICAgICAvLyBObyBvcFxuICAgICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgdXBkYXRlT2Zmc2V0ID0gdXBkYXRlT2Zmc2V0ID09IG51bGwgPyB0cnVlIDogdXBkYXRlT2Zmc2V0O1xuXG4gICAgaWYgKG1vbnRocykge1xuICAgICAgICBzZXRNb250aChtb20sIGdldChtb20sICdNb250aCcpICsgbW9udGhzICogaXNBZGRpbmcpO1xuICAgIH1cbiAgICBpZiAoZGF5cykge1xuICAgICAgICBzZXQkMShtb20sICdEYXRlJywgZ2V0KG1vbSwgJ0RhdGUnKSArIGRheXMgKiBpc0FkZGluZyk7XG4gICAgfVxuICAgIGlmIChtaWxsaXNlY29uZHMpIHtcbiAgICAgICAgbW9tLl9kLnNldFRpbWUobW9tLl9kLnZhbHVlT2YoKSArIG1pbGxpc2Vjb25kcyAqIGlzQWRkaW5nKTtcbiAgICB9XG4gICAgaWYgKHVwZGF0ZU9mZnNldCkge1xuICAgICAgICBob29rcy51cGRhdGVPZmZzZXQobW9tLCBkYXlzIHx8IG1vbnRocyk7XG4gICAgfVxufVxuXG52YXIgYWRkICAgICAgPSBjcmVhdGVBZGRlcigxLCAnYWRkJyk7XG52YXIgc3VidHJhY3QgPSBjcmVhdGVBZGRlcigtMSwgJ3N1YnRyYWN0Jyk7XG5cbmZ1bmN0aW9uIGdldENhbGVuZGFyRm9ybWF0KG15TW9tZW50LCBub3cpIHtcbiAgICB2YXIgZGlmZiA9IG15TW9tZW50LmRpZmYobm93LCAnZGF5cycsIHRydWUpO1xuICAgIHJldHVybiBkaWZmIDwgLTYgPyAnc2FtZU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seSBvbWl0cyBicmVhayBrZXl3b3Jkc1xuICAgIC8vIHRvIHV0aWxpemUgZmFsbGluZyB0aHJvdWdoIHRoZSBjYXNlcy5cbiAgICBzd2l0Y2ggKHVuaXRzKSB7XG4gICAgICAgIGNhc2UgJ3llYXInOlxuICAgICAgICAgICAgdGhpcy5tb250aCgwKTtcbiAgICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgICAgY2FzZSAncXVhcnRlcic6XG4gICAgICAgIGNhc2UgJ21vbnRoJzpcbiAgICAgICAgICAgIHRoaXMuZGF0ZSgxKTtcbiAgICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgICAgY2FzZSAnd2Vlayc6XG4gICAgICAgIGNhc2UgJ2lzb1dlZWsnOlxuICAgICAgICBjYXNlICdkYXknOlxuICAgICAgICBjYXNlICdkYXRlJzpcbiAgICAgICAgICAgIHRoaXMuaG91cnMoMCk7XG4gICAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJ2hvdXInOlxuICAgICAgICAgICAgdGhpcy5taW51dGVzKDApO1xuICAgICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgICBjYXNlICdtaW51dGUnOlxuICAgICAgICAgICAgdGhpcy5zZWNvbmRzKDApO1xuICAgICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgICBjYXNlICdzZWNvbmQnOlxuICAgICAgICAgICAgdGhpcy5taWxsaXNlY29uZHMoMCk7XG4gICAgfVxuXG4gICAgLy8gd2Vla3MgYXJlIGEgc3BlY2lhbCBjYXNlXG4gICAgaWYgKHVuaXRzID09PSAnd2VlaycpIHtcbiAgICAgICAgdGhpcy53ZWVrZGF5KDApO1xuICAgIH1cbiAgICBpZiAodW5pdHMgPT09ICdpc29XZWVrJykge1xuICAgICAgICB0aGlzLmlzb1dlZWtkYXkoMSk7XG4gICAgfVxuXG4gICAgLy8gcXVhcnRl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m9tTm93ICAgICAgICAgICA9IGZyb21Ob3c7XG5wcm90by50byAgICAgICAgICAgICAgICA9IHRvO1xucHJvdG8udG9Ob3cgICAgICAgICAgICAgPSB0b05vdztcbnByb3RvLmdldCAgICAgICAgICAgICAgID0gc3RyaW5nR2V0O1xucHJvdG8uaW52YWxpZEF0ICAgICAgICAgPSBpbnZhbGlkQXQ7XG5wcm90by5pc0FmdGVyICAgICAgICAgICA9IGlzQWZ0ZXI7XG5wcm90by5pc0JlZm9yZSAgICAgICAgICA9IGlzQmVmb3JlO1xucHJvdG8uaXNCZXR3ZWVuICAgICAgICAgPSBpc0JldHdlZW47XG5wcm90by5pc1NhbWUgICAgICAgICAgICA9IGlzU2FtZTtcbnByb3RvLmlzU2FtZU9yQWZ0ZXIgICAgID0gaXNTYW1lT3JBZnRlcjtcbnByb3RvLmlzU2FtZU9yQmVmb3JlICAgID0gaXNTYW1lT3JCZWZvcmU7XG5wcm90by5pc1ZhbGlkICAgICAgICAgICA9IGlzVmFsaWQkMjtcbnByb3RvLmxhbmcgICAgICAgICAgICAgID0gbGFuZztcbnByb3RvLmxvY2FsZSAgICAgICAgICAgID0gbG9jYWxlO1xucHJvdG8ubG9jYWxlRGF0YSAgICAgICAgPSBsb2NhbGVEYXRhO1xucHJvdG8ubWF4ICAgICAgICAgICAgICAgPSBwcm90b3R5cGVNYXg7XG5wcm90by5taW4gICAgICAgICAgICAgICA9IHByb3RvdHlwZU1pbjtcbnByb3RvLnBhcnNpbmdGbGFncyAgICAgID0gcGFyc2luZ0ZsYWdzO1xucHJvdG8uc2V0ICAgICAgICAgICAgICAgPSBzdHJpbmdTZXQ7XG5wcm90by5zdGFydE9mICAgICAgICAgICA9IHN0YXJ0T2Y7XG5wcm90by5zdWJ0cmFjdCAgICAgICAgICA9IHN1YnRyYWN0O1xucHJvdG8udG9BcnJheSAgICAgICAgICAgPSB0b0FycmF5O1xucHJvdG8udG9PYmplY3QgICAgICAgICAgPSB0b09iamVjdDtcbnByb3RvLnRvRGF0ZSAgICAgICAgICAgID0gdG9EYXRlO1xucHJvdG8udG9JU09TdHJpbmcgICAgICAgPSB0b0lTT1N0cmluZztcbnByb3RvLmluc3BlY3QgICAgICAgICAgID0gaW5zcGVjdDtcbnByb3RvLnRvSlNPTiAgICAgICAgICAgID0gdG9KU09OO1xucHJvdG8udG9TdHJpbmcgICAgICAgICAgPSB0b1N0cmluZztcbnByb3RvLnVuaXggICAgICAgICAgICAgID0gdW5peDtcbnByb3RvLnZhbHVlT2YgICAgICAgICAgID0gdmFsdWVPZjtcbnByb3RvLmNyZWF0aW9uRGF0YSAgICAgID0gY3JlYXRpb25EYXRhO1xuXG4vLyBZZWFyXG5wcm90by55ZWFyICAgICAgID0gZ2V0U2V0WWVhcjtcbnByb3RvLmlzTGVhcFllYXIgPSBnZXRJc0xlYXBZZWFyO1xuXG4vLyBXZWVrIFllYXJcbnByb3RvLndlZWtZZWFyICAgID0gZ2V0U2V0V2Vla1llYXI7XG5wcm90by5pc29XZWVrWWVhciA9IGdldFNldElTT1dlZWtZZWFyO1xuXG4vLyBRdWFydGVyXG5wcm90by5xdWFydGVyID0gcHJvdG8ucXVhcnRlcnMgPSBnZXRTZXRRdWFydGVyO1xuXG4vLyBNb250aFxucHJvdG8ubW9udGggICAgICAgPSBnZXRTZXRNb250aDtcbnByb3RvLmRheXNJbk1vbnRoID0gZ2V0RGF5c0luTW9udGg7XG5cbi8vIFdlZWtcbnByb3RvLndlZWsgICAgICAgICAgID0gcHJvdG8ud2Vla3MgICAgICAgID0gZ2V0U2V0V2VlaztcbnByb3RvLmlzb1dlZWsgICAgICAgID0gcHJvdG8uaXNvV2Vla3MgICAgID0gZ2V0U2V0SVNPV2VlaztcbnByb3RvLndlZWtzSW5ZZWFyICAgID0gZ2V0V2Vla3NJblllYXI7XG5wcm90by5pc29XZWVrc0luWWVhciA9IGdldElTT1dlZWtzSW5ZZWFyO1xuXG4vLyBEYXlcbnByb3RvLmRhdGUgICAgICAgPSBnZXRTZXREYXlPZk1vbnRoO1xucHJvdG8uZGF5ICAgICAgICA9IHByb3RvLmRheXMgICAgICAgICAgICAgPSBnZXRTZXREYXlPZldlZWs7XG5wcm90by53ZWVrZGF5ICAgID0gZ2V0U2V0TG9jYWxlRGF5T2ZXZWVrO1xucHJvdG8uaXNvV2Vla2RheSA9IGdldFNldElTT0RheU9mV2VlaztcbnByb3RvLmRheU9mWWVhciAgPSBnZXRTZXREYXlPZlllYXI7XG5cbi8vIEhvdXJcbnByb3RvLmhvdXIgPSBwcm90by5ob3VycyA9IGdldFNldEhvdXI7XG5cbi8vIE1pbnV0ZVxucHJvdG8ubWludXRlID0gcHJvdG8ubWludXRlcyA9IGdldFNldE1pbnV0ZTtcblxuLy8gU2Vjb25kXG5wcm90by5zZWNvbmQgPSBwcm90by5zZWNvbmRzID0gZ2V0U2V0U2Vjb25kO1xuXG4vLyBNaWxsaXNlY29uZFxucHJvdG8ubWlsbGlzZWNvbmQgPSBwcm90by5taWxsaXNlY29uZHMgPSBnZXRTZXRNaWxsaXNlY29uZDtcblxuLy8gT2Zmc2V0XG5wcm90by51dGNPZmZzZXQgICAgICAgICAgICA9IGdldFNldE9mZnNldDtcbnByb3RvLnV0YyAgICAgICAgICAgICAgICAgID0gc2V0T2Zmc2V0VG9VVEM7XG5wcm90by5sb2NhbCAgICAgICAgICAgICAgICA9IHNldE9mZnNldFRvTG9jYWw7XG5wcm90by5wYXJzZVpvbmUgICAgICAgICAgICA9IHNldE9mZnNldFRvUGFyc2VkT2Zmc2V0O1xucHJvdG8uaGFzQWxpZ25lZEhvdXJPZmZzZXQgPSBoYXNBbGlnbmVkSG91ck9mZnNldDtcbnByb3RvLmlzRFNUICAgICAgICAgICAgICAgID0gaXNEYXlsaWdodFNhdmluZ1RpbWU7XG5wcm90by5pc0xvY2FsICAgICAgICAgICAgICA9IGlzTG9jYWw7XG5wcm90by5pc1V0Y09mZnNldCAgICAgICAgICA9IGlzVXRjT2Zmc2V0O1xucHJvdG8uaXNVdGMgICA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A9PT0gJ21vbnRoJyB8fCB1bml0cyA9PT0gJ3llYXInKSB7XG4gICAgICAgIGRheXMgICA9IHRoaXMuX2RheXMgICArIG1pbGxpc2Vjb25kcyAvIDg2NGU1O1xuICAgICAgICBtb250aHMgPSB0aGlzLl9tb250aHMgKyBkYXlzVG9Nb250aHMoZGF5cyk7XG4gICAgICAgIHJldHVybiB1bml0cyA9PT0gJ21vbnRoJyA/IG1vbnRocyA6IG1vbnRocyAvIDEyO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIGhhbmRsZSBtaWxsaXNlY29uZHMgc2VwYXJhdGVseSBiZWNhdXNlIG9mIGZsb2F0aW5nIHBvaW50IG1hdGggZXJyb3JzIChpc3N1ZSAjMTg2NylcbiAgICAgICAgZGF5cyA9IHRoaXMuX2RheXMgKyBNYXRoLnJvdW5kKG1vbnRoc1RvRGF5cyh0aGlzLl9tb250aHMpKTtcbiAgICAgICAgc3dpdGNoICh1bml0cykge1xuICAgICAgICAgICAgY2FzZSAnd2VlaycgICA6IHJldHVybiBkYXlzIC8gNyAgICAgKyBtaWxsaXNlY29uZHMgLyA2MDQ4ZTU7XG4gICAgICAgICAgICBjYXNlICdkYXknICAgIDogcmV0dXJuIGRheXMgICAgICAgICArIG1pbGxpc2Vjb25kcyAvIDg2NGU1O1xuICAgICAgICAgICAgY2FzZSAnaG91cicgICA6IHJldHVybiBkYXlzICogMjQgICAgKyBtaWxsaXNlY29uZHMgLyAzNmU1O1xuICAgICAgICAgICAgY2FzZSAnbWludXRlJyA6IHJldHVybiBkYXlzICogMTQ0MCAgKyBtaWxsaXNlY29uZHMgLyA2ZTQ7XG4gICAgICAgICAgICBjYXNlICdzZWNvbmQnIDogcmV0dXJuIGRheXMgKiA4NjQwMCArIG1pbGxpc2Vjb25kcyAvIDEwMDA7XG4gICAgICAgICAgICAvLyBNYXRoLmZsb29yIHByZXZlbnRzIGZsb2F0aW5nIHBvaW50IG1hdGggZXJyb3JzIGhlcmVcbiAgICAgICAgIC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CBzZWNvbmRzXSAgfHxcbiAgICAgICAgICAgIHNlY29uZHMgPCB0aHJlc2hvbGRzLnMgICAmJiBbJ3NzJywgc2Vjb25kc10gfHxcbiAgICAgICAgICAgIG1pbnV0ZXMgPD0gMSAgICAgICAgICAgICAmJiBbJ20nXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIG1pbnV0ZXMgPCB0aHJlc2hvbGRzLm0gICAmJiBbJ21tJywgbWludXRlc10gfHxcbiAgICAgICAgICAgIGhvdXJzICAgPD0gMSAgICAgICAgICAgICAmJiBbJ2gnXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIGhvdXJzICAgPCB0aHJlc2hvbGRzLmggICAmJiBbJ2hoJywgaG91cnNdICAgfHxcbiAgICAgICAgICAgIGRheXMgICAgPD0gMSAgICAgICAgICAgICAmJiBbJ2QnXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIGRheXMgICAgPCB0aHJlc2hvbGRzLmQgICAmJiBbJ2RkJywgZGF5c10gICAgfHxcbiAgICAgICAgICAgIG1vbnRocyAgPD0gMSAgICAgICAgICAgICAmJiBbJ00nXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIG1vbnRocyAgPCB0aHJlc2hvbGRzLk0gICAmJiBbJ01NJywgbW9udGhzXSAgfHxcbiAgICAgICAgICAgIHllYXJzICAgPD0gMSAgICAgICAgICAgICAmJiBbJ3knXSAgICAgICAgICAgfHwgWyd5eScsIHllYXJzXTtcblxuICAgIGFbMl0gPSB3aXRob3V0U3VmZml4O1xuICAgIGFbM10gPSArcG9zTmVnRHVyYXRpb24gPiAwO1xuICAgIGFbNF0gPSBsb2NhbGU7XG4gICAgcmV0dXJuIHN1YnN0aXR1dGVUaW1lQWdvLmFwcGx5KG51bGwsIGEpO1xufVxuXG4vLyBUaGlzIGZ1bmN0aW9uIGFsbG93cyB5b3UgdG8gc2V0IHRoZSByb3VuZGluZyBmdW5jdGlvbiBmb3IgcmVsYXRpdmUgdGltZSBzdHJpbmdzXG5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ICAgIHZhciBzZWNvbmRzID0gYWJzJDEodGhpcy5fbWlsbGlzZWNvbmRzKSAvIDEwMDA7XG4gICAgdmFyIGRheXMgICAgICAgICA9IGFicyQxKHRoaXMuX2RheXMpO1xuICAgIHZhciBtb250aHMgICAgICAgPSBhYnMkMSh0aGlzLl9tb250aHMpO1xuICAgIHZhciBtaW51dGVzLCBob3VycywgeWVhcnM7XG5cbiAgICAvLyAzNjAwIHNlY29uZHMgLT4gNjAgbWludXRlcyAtPiAxIGhvdXJcbiAgICBtaW51dGVzICAgICAgICAgICA9IGFic0Zsb29yKHNlY29uZHMgLyA2MCk7XG4gICAgaG91cnMgICAgICAgICAgICAgPSBhYnNGbG9vcihtaW51dGVzIC8gNjApO1xuICAgIHNlY29uZHMgJT0gNjA7XG4gICAgbWludXRlcyAlPSA2MDtcblxuICAgIC8vIDEyIG1vbnRocyAtPiAxIHllYXJcbiAgICB5ZWFycyAgPSBhYnNGbG9vcihtb250aHMgLyAxMik7XG4gICAgbW9udGhzICU9IDEyO1xuXG5cbiAgICAvLyBpbnNwaXJlZCBieSBodHRwczovL2dpdGh1Yi5jb20vZG9yZGlsbGUvbW9tZW50LWlzb2R1cmF0aW9uL2Jsb2IvbWFzdGVyL21vbWVudC5pc29kdXJhdGlvbi5qc1xuICAgIHZhciBZID0geWVhcnM7XG4gICAgdmFyIE0gPSBtb250aHM7XG4gICAgdmFyIEQgPSBkYXlzO1xuICAgIHZhciBoID0gaG91cnM7XG4gICAgdmFyIG0gPSBtaW51dGVzO1xuICAgIHZhciBzID0gc2Vjb25kcyA/IHNlY29uZHMudG9GaXhlZCgzKS5yZXBsYWNlKC9cXC4/MCskLywgJycpIDogJyc7XG4gICAgdmFyIHRvdGFsID0gdGhpcy5hc1NlY29uZHMoKTtcblxuICAgIGlmICghdG90YWwpIHtcbiAgICAgICAgLy8gdGhpcyBpcyB0aGUgc2FtZSBhcyBDIydzIChOb2RhKSBhbmQgcHl0aG9uIChpc29kYXRlKS4uLlxuICAgICAgICAvLyBidXQgbm90IG90aGVyIEpTIChnb29nLmRhdGUpXG4gICAgICAgIHJldHVybiAnUDBEJztcbiAgICB9XG5cbiAgICB2YXIgdG90YWxTaWduID0gdG90YWwgPCAwID8gJy0nIDogJyc7XG4gICAgdmFyIHltU2lnbiA9IHNpZ24odGhpcy5fbW9udGhzKSAhPT0gc2lnbih0b3RhbCkgPyAnLScgOiAnJztcbiAgICB2YXIgZGF5c1NpZ24gPSBzaWduKHRoaXMuX2RheXMpICE9PSBzaWduKHRvdGFsKSA/ICctJyA6ICcnO1xuICAgIHZhciBobXNTaWduID0gc2lnbih0aGlzLl9taWxsaXNlY29uZHMpICE9PSBzaWduKHRvdGFsKSA/ICctJyA6ICcnO1xuXG4gICAgcmV0dXJuIHRvdGFsU2lnbiArICdQJyArXG4gICAgICAgIChZID8geW1TaWduICsgWSArICdZJyA6ICcnKSArXG4gICAgICAgIChNID8geW1TaWduICsgTSArICdNJyA6ICcnKSArXG4gICAgICAgIChEID8gZGF5c1NpZ24gKyBEICsgJ0QnIDogJycpICtcbiAgICAgICAgKChoIHx8IG0gfHwgcykgPyAnVCcgOiAnJykgK1xuICAgICAgICAoaCA/IGhtc1NpZ24gKyBoICsgJ0gnIDogJycpICtcbiAgICAgICAgKG0gPyBobXNTaWduICsgbSArICdNJyA6ICcnKSArXG4gICAgICAgIChzID8gaG1zU2lnbiArIHMgKyAnUycgOiAnJyk7XG59XG5cbnZhciBwcm90byQyID0gRHVyYXRpb24ucHJvdG90eXBlO1xuXG5wcm90byQyLmlzVmFsaWQgICAgICAgID0gaXNWYWxpZCQxO1xucHJvdG8kMi5hYnMgICAgICAgICAgICA9IGFicztcbnByb3RvJDIuYWRkICAgICAgICAgICAgPSBhZGQkMTtcbnByb3RvJDIuc3VidHJhY3QgICAgICAgPSBzdWJ0cmFjdCQxO1xucHJvdG8kMi5hcyAgICAgICAgICAgICA9IGFzO1xucHJvdG8kMi5hc01pbGxpc2Vjb25kcyA9IGFzTWlsbGlzZWNvbmRzO1xucHJvdG8kMi5hc1NlY29uZHMgICAgICA9IGFzU2Vjb25kcztcbnByb3RvJDIuYXNNaW51dGVzICAgICAgPSBhc01pbnV0ZXM7XG5wcm90byQyLmFzSG91cnMgICAgICAgID0gYXNIb3VycztcbnByb3RvJDIuYXNEYXlzICAgICAgICAgPSBhc0RheXM7XG5wcm90byQyLmFzV2Vla3MgICAgICAgID0gYXNXZWVrcztcbnByb3RvJDIuYXNNb250aHMgICAgICAgPSBhc01vbnRocztcbnByb3RvJDIuYXNZZWFycyAgICAgICAgPSBhc1llYXJzO1xucHJvdG8kMi52YWx1ZU9mICAgICAgICA9IHZhbHVlT2YkMTtcbnByb3RvJDIuX2J1YmJsZSAgICAgICAgPSBidWJibGU7XG5wcm90byQyLmNsb25lICAgICAgICAgID0gY2xvbmUkMTtcbnByb3RvJDIuZ2V0ICAgICAgICAgICAgPSBnZXQkMjtcbnByb3RvJDIubWlsbGlzZWNvbmRzICAgPSBtaWxsaXNlY29uZHM7XG5wcm90byQyLnNlY29uZHMgICAgICAgID0gc2Vjb25kcztcbnByb3RvJDIubWludXRlcyAgICAgICAgPSBtaW51dGVzO1xucHJvdG8kMi5ob3VycyAgICAgICAgICA9IGhvdXJzO1xucHJvdG8kMi5kYXlzICAgICAgICAgICA9IGRheXM7XG5wcm90byQyLndlZWtzICAgICAgICAgID0gd2Vla3M7XG5wcm90byQyLm1vbnRocyAgICAgICAgID0gbW9udGhzO1xucHJvdG8kMi55ZWFycyAgICAgICAgICA9IHllYXJzO1xucHJvdG8kMi5odW1hbml6ZSAgICAgICA9IGh1bWFuaXplO1xucHJvdG8kMi50b0lTT1N0cmluZyAgICA9IHRvSVNPU3RyaW5nJDE7XG5wcm90byQyLnRvU3RyaW5nICAgICAgID0gdG9JU09TdHJpbmckMTtcbnByb3RvJDIudG9KU09OICAgICAgICAgPSB0b0lTT1N0cmluZyQxO1xucHJvdG8kMi5sb2NhbGUgICAgICAgICA9IGxvY2FsZTtcbnByb3RvJDIub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AgICAgICAgICAgICA9IG1heDtcbmhvb2tzLm5vdyAgICAgICAgICAgICAgICAgICA9IG5vdztcbmhvb2tzLnV0YyAgICAgICAgICAgICAgICAgICA9IGNyZWF0ZVVUQztcbmhvb2tzLnVuaXggICAgICAgICAgICAgICAgICA9IGNyZWF0ZVVuaXg7XG5ob29rcy5tb250aHMgICAgICAgICAgICAgICAgPSBsaXN0TW9udGhzO1xuaG9va3MuaXNEYXRlICAgICAgICAgICAgICAgID0gaXNEYXRlO1xuaG9va3MubG9jYWxlICAgICAgICAgICAgICAgID0gZ2V0U2V0R2xvYmFsTG9jYWxlO1xuaG9va3MuaW52YWxpZCAgICAgICAgICAgICAgID0gY3JlYXRlSW52YWxpZDtcbmhvb2tzLmR1cmF0aW9uICAgICAgICAgICAgICA9IGNyZWF0ZUR1cmF0aW9uO1xuaG9va3MuaXNNb21lbnQgICAgICAgICAgICAgID0gaXNNb21lbnQ7XG5ob29rcy53ZWVrZGF5cyAgICAgICAgICAgICAgPSBsaXN0V2Vla2RheXM7XG5ob29rcy5wYXJzZVpvbmUgICAgICAgICAgICAgPSBjcmVhdGVJblpvbmU7XG5ob29rcy5sb2NhbGVEYXRhICAgICAgICAgICAgPSBnZXRMb2NhbGU7XG5ob29rcy5pc0R1cmF0aW9uICAgICAgICAgICAgPSBpc0R1cmF0aW9uO1xuaG9va3MubW9udGhzU2hvcnQgICAgICAgICAgID0gbGlzdE1vbnRoc1Nob3J0O1xuaG9va3Mud2Vla2RheXNNaW4gICAgICAgICAgID0gbGlzdFdlZWtkYXlzTWluO1xuaG9va3MuZGVmaW5lTG9jYWxlICAgICAgICAgID0gZGVmaW5lTG9jYWxlO1xuaG9va3MudXBkYXRlTG9jYWxlICAgICAgICAgID0gdXBkYXRlTG9jYWxlO1xuaG9va3MubG9jYWxlcyAgICAgICAgICAgICAgID0gbGlzdExvY2FsZXM7XG5ob29rcy53ZWVrZGF5c1Nob3J0ICAgICAgICAgPSBsaXN0V2Vla2RheXNTaG9ydDt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N0aW9uIGdldChwYXRoLCBvKSB7XG4gICAgdmFyIHBhcnRzID0gcGFydGlmeShwYXRoKTtcbiAgICB2YXIgZmlyc3Q7XG4gICAgaWYgKHR5cGVvZiBvID09PSAnb2JqZWN0Jykge1xuICAgICAgICBpZiAocGFydHMubGVuZ3RoID09PSAxKVxuICAgICAgICAgICAgcmV0dXJuIG9bdW5lc2NhcGVfZG90cyhwYXJ0c1swXSldO1xuICAgICAgICBpZiAocGFydHMubGVuZ3RoID09PSAwKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICBmaXJzdCA9IG9bcGFydHMuc2hpZnQoKV07XG4gICAgICAgIHJldHVybiAoKHR5cGVvZiBvID09PSAnb2JqZWN0JykgJiYgKG8gIT09IG51bGwpKSA/XG4gICAgICAgICAgICBwYXJ0cy5yZWR1Y2UoZnVuY3Rpb24gKHRhcmdldCwgcHJvcCkge1xuICAgICAgICAgICAgICAgIGlmICh0YXJnZXQgPT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGFyZ2V0W3VuZXNjYXBlX2RvdHMocHJvcCldO1xuICAgICAgICAgICAgfSwgZmlyc3QpIDogbnVsbDtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ2dldCgpOiBleHBlY3RzIGFuIG9iamVjdCBnb3QgJyArIHR5cGVvZiBvKTtcbiAgICB9XG59XG5leHBvcnRzLmdldCA9IGdldDtcbjtcbmZ1bmN0aW9uIHNldChwYXRoLCB2YWx1ZSwgb2JqKSB7XG4gICAgdmFyIHBhcnRzID0gcGFydGlmeShwYXRoKTtcbiAgICBpZiAoKHR5cGVvZiBvYmogIT09ICdvYmplY3QnKSB8fCAob2JqID09IG51bGwpKSB7XG4gICAgICAgIHJldHVybiBjbG9uZShvYmopO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgICAgcmV0dXJuIF9zZXQob2JqLCB2YWx1ZSwgcGFydHMpO1xuICAgIH1cbn1cbmV4cG9ydHMuc2V0ID0gc2V0O1xuO1xuZnVuY3Rpb24gX3NldChvYmosIHZhbHVlLCBwYXJ0cykge1xuICAgIHZhciBvO1xuICAgIHZhciBrO1xuICAgIGlmIChwYXJ0cy5sZW5ndGggPT09IDApXG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICBvID0gKCh0eXBlb2Ygb2JqICE9PSAnb2JqZWN0JykgfHwgKG9iaiA9PT0gbnVsbCkpID8ge30gOiBjbG9uZShvYmopO1xuICAgIGsgPSB1bmVzY2FwZV9kb3RzKHBhcnRzWzBdKTtcbiAgICBvW2tdID0gX3NldChvW2tdLCB2YWx1ZSwgcGFydHMuc2xpY2UoMSkpO1xuICAgIHJldHVybiBvO1xufVxuZnVuY3Rpb24gZGVmYXVsdF8xKGssIHYsIG8pIHtcbiAgICBpZiAobyA9PSBudWxsKVxuICAgICAgICByZXR1cm4gZ2V0KGssIHYpO1xuICAgIGVsc2VcbiAgICAgICAgcmV0dXJuIHNldChrLCB2LCBvKTtcbn1cbmV4cG9ydHMuZGVmYXVsdCA9IGRlZmF1bHRfMTtcbjtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmpzLm1hcCJdfQ== diff --git a/lib/common/util.js b/lib/common/util.js index 6919173a..fba3a2cf 100644 --- a/lib/common/util.js +++ b/lib/common/util.js @@ -39,11 +39,11 @@ exports.debounce = function (f, delay) { var timer = null; return delay === 0 ? f : function (a) { if (!timer) { - timer = setTimeout(function () { return f(a); }, delay); + timer = window.setTimeout(function () { return f(a); }, delay); } else { clearTimeout(timer); - timer = setTimeout(function () { return f(a); }, delay); + timer = window.setTimeout(function () { return f(a); }, delay); } }; }; diff --git a/lib/common/util.js.map b/lib/common/util.js.map index 5f6e1cbb..55b6d246 100644 --- a/lib/common/util.js.map +++ b/lib/common/util.js.map @@ -1 +1 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["util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,QAAQ,GAAG,UAAI,CAAiB,EAAE,KAAa;IAExD,IAAI,KAAK,GAAW,IAAI,CAAC;IAEzB,MAAM,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAC,CAAI;QAE1B,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACT,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,cAAM,OAAA,CAAC,CAAC,CAAC,CAAC,EAAJ,CAAI,EAAE,KAAK,CAAC,CAAC;QACjD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,cAAM,OAAA,CAAC,CAAC,CAAC,CAAC,EAAJ,CAAI,EAAE,KAAK,CAAC,CAAC;QACjD,CAAC;IACL,CAAC,CAAA;AAEL,CAAC,CAAA"} \ No newline at end of file diff --git a/lib/common/util.ts b/lib/common/util.ts index c064c1d9..a10d1bdb 100644 --- a/lib/common/util.ts +++ b/lib/common/util.ts @@ -42,10 +42,10 @@ export const debounce = (f: (a: A) => void, delay: number) => { return delay === 0 ? f : (a: A) => { if (!timer) { - timer = setTimeout(() => f(a), delay); + timer = window.setTimeout(() => f(a), delay); } else { clearTimeout(timer); - timer = setTimeout(() => f(a), delay); + timer = window.setTimeout(() => f(a), delay); } } diff --git a/src/common/util.ts b/src/common/util.ts index c064c1d9..a10d1bdb 100644 --- a/src/common/util.ts +++ b/src/common/util.ts @@ -42,10 +42,10 @@ export const debounce = (f: (a: A) => void, delay: number) => { return delay === 0 ? f : (a: A) => { if (!timer) { - timer = setTimeout(() => f(a), delay); + timer = window.setTimeout(() => f(a), delay); } else { clearTimeout(timer); - timer = setTimeout(() => f(a), delay); + timer = window.setTimeout(() => f(a), delay); } }