Advertisement
xiaomianao666

邀您一起看:南府追剧

Apr 10th, 2022
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥南府追剧@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwiQ2xhc3NUYWJcIixcInBhdGhcIjpcIkNsYXNzVGFiXCIsXCJydWxlXCI6XCJjb25zdCBDbGFzc1RhYiA9IGZ1bmN0aW9uKGNsYXNzQXJyYXksIHBhcmFtcykge1xcbiAgICBPYmplY3QuYXNzaWduKHRoaXMsIHBhcmFtcylcXG4gICAgdGhpcy5hcnIgPSBjbGFzc0FycmF5Lm1hcCh2ID0+IHRoaXMuaW5pdCh2KSlcXG4gICAgdGhpcy5zaWduID0gJyQnICsgUUlOR19USVRMRSArICdfJyArICh0aGlzLm5hbWUgfHwgJycpICsgJ18nXFxuICAgIHRoaXMuY29sb3IgPSB0aGlzLmNvbG9yIHx8ICcjMTJiNjY4J1xcbiAgICB0aGlzLmJvdW5kYXJ5ID0gdGhpcy5ib3VuZGFyeSB8fCAnYmxhbmtfYmxvY2snXFxufVxcbkNsYXNzVGFiLnByb3RvdHlwZSA9IHtcXG4gICAgY29uc3RydWN0b3I6IENsYXNzVGFiLFxcbiAgICBsb2FkKGVsKSB7XFxuICAgICAgICBsZXQgZm9sZGVkID0gdGhpcy5mb2xkICYmIGdldFZhcignZm9sZF8nICsgdGhpcy5zaWduLCAnJylcXG4gICAgICAgIGlmICh0aGlzLmFyci5sZW5ndGggPiAxICYmIHRoaXMuZm9sZCkgZWwucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgKGZvbGRlZCA/ICfilrYnIDogJ+KWvCcpLmZvbnRjb2xvcignIzA0OWVmZicpLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgZm9sZGVkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcignZm9sZF8nICsgc2lnbiwgeyAnJzogJ1QnLCAnVCc6ICcnIH0gW2ZvbGRlZF0pXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBmb2xkZWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pXFxuICAgICAgICBsZXQgYXJyID0gZm9sZGVkID8gW3RoaXMuYXJyWzBdXSA6IHRoaXMuYXJyXFxuICAgICAgICBhcnIuZm9yRWFjaCgodikgPT4ge1xcbiAgICAgICAgICAgIGxldCB7IGlkLCBjbGFzc19uYW1lLCBjbGFzc191cmwgfSA9IHYsXFxuICAgICAgICAgICAgc2VsZWN0ZWQgPSBKU09OLnN0cmluZ2lmeSh0aGlzLmdldENsYXNzKGlkKSlcXG4gICAgICAgICAgICBjbGFzc19uYW1lLmZvckVhY2goKG5hbWUsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGNsYXNzX3VybFtpXSxcXG4gICAgICAgICAgICAgICAgICAgIG5vdyA9IEpTT04uc3RyaW5naWZ5KHsgbmFtZTogbmFtZSwgdXJsOiB1cmwgfSlcXG4gICAgICAgICAgICAgICAgZWwucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2VsZWN0ZWQgPT0gbm93ID8gJ+KAnOKAnOKAneKAnScgKyBuYW1lLmZvbnRjb2xvcih0aGlzLmNvbG9yKS5ib2xkKCkgOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZWxlY3RlZCA9PSBub3cgPyAnaGlrZXI6Ly9lbXB0eScgOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWduLCBpZCwgbm93KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBlbC5wdXNoKHsgY29sX3R5cGU6IHRoaXMuYm91bmRhcnkgfSlcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIGluaXQoY2xhc3NPYmplY3QpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfbmFtZSA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX3VybCA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc191cmwgPSBjbGFzc09iamV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pzb24nLCAn6L6T5YWl5aSH5Lu96Lev5b6EJylcXG4gICAgICAgICAgICAuaW5wdXQoKHVybCwgdXBkYXRlSW50ZXJ2YWwsIG5ld1dpbmRvdywgdGFiRm9sZCwgZGlzYWJsZUN1c3RvbSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSByZXF1ZXN0KHVybCksXFxuICAgICAgICAgICAgICAgICAgICBjdXN0b21EYXRhID0gcmVhZEZpbGUoJ2N1c3RvbURhdGEnKVxcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoaW5wdXQsIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUludGVydmFsOiB1cGRhdGVJbnRlcnZhbCxcXG4gICAgICAgICAgICAgICAgICAgIG5ld1dpbmRvdzogbmV3V2luZG93LFxcbiAgICAgICAgICAgICAgICAgICAgdGFiRm9sZDogdGFiRm9sZCxcXG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVDdXN0b206IGRpc2FibGVDdXN0b20sXFxuICAgICAgICAgICAgICAgICAgICBjdXN0b21EYXRhOiBjdXN0b21EYXRhLFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXM6IHJ1bGVzXFxuICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5aSH5Lu977yM5rOo5oSP6Iul5LuT5bqT5Li65a2Q6aG16Z2i5YiZ5LiN5aSH5Lu9J1xcbiAgICAgICAgICAgIH0sIHVybCwgdXBkYXRlSW50ZXJ2YWwsIG5ld1dpbmRvdywgdGFiRm9sZCwgZGlzYWJsZUN1c3RvbSlcXG4gICAgICAgIGVsc2UgcmV0dXJuICQoJ2hpa2VyOi8vZmlsZXMvdG1wLycgKyBRSU5HX1RJVExFICsgJ19iYWNrdXAuanNvbicsICfovpPlhaXlpIfku73ot6/lvoQnKS5pbnB1dCgodXJsKSA9PiB7XFxuICAgICAgICAgICAgb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3aXRjaCAoZWRpdE1vZGUpIHtcXG4gICAgICAgIGNhc2UgJ+WQr+eUqC/npoHnlKgnOlxcbiAgICAgICAgICAgIGQudGl0bGUgPSAodi52aXNpYmxlID8gJ/Cfn6IgICcgOiAn8J+UtCAgJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBydWxlc1tpXS52aXNpYmxlID0gIXJ1bGVzW2ldLnZpc2libGVcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXG4gICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfmm7TmlLnlm77moIcnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxuICA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Lis/KSgjLio/KT8oPzpcXFxcPyguKikpPyQvKSxcXG4gICAgICAgICAgICAgICAgICAgIHN1YlBhZ2UgPSBNWV9SVUxFLnBhZ2VMaXN0LmZpbmQoKHYpID0+IHYucGF0aCA9PSBwYXRoKSxcXG4gICAgICAgICAgICAgICAgICAgIHN1YlVybCA9IChwYXJhbXMgfHwgJycpLnNwbGl0KCcmJykuZmluZCgodikgPT4gdi5zdGFydHNXaXRoKCd1cmw9JykpXFxuICAgICAgICAgICAgICAgIHYudXJsID0gc3ViVXJsID8gc3ViVXJsLnNsaWNlKDQpLnJlcGxhY2UoL++8n++8ny9nLCAnPycpLnJlcGxhY2UoL++8hu+8hi9nLCAnJicpIDogKHYuZXh0cmEgfHwge30pLnVybCB8fCAnaGlrZXI6Ly9lbXB0eScgKyBmbGFnICsgJz8nICsgKHBhcmFtcyB8fCAnJylcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSA9IHN1YlBhZ2UucnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBzdWJQYWdlLmNvbF90eXBlXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxuICAgICAgICAgICAgICAgIGxldCByZUluZGV4ID0gdi51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHYudXJsID0gdi51cmwuc2xpY2UoMCwgcmVJbmRleCkgKyAnLmpzOlxcXFxuaWYoTVlfUlVMRSlPYmplY3QuYXNzaWduKE1ZX1JVTEUsICcgKyBhc3NpZ25MYXp5UnVsZSArICcpOycgKyB2LnVybC5zbGljZShyZUluZGV4ICsgNClcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgaWYgKC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Zm9yRWFjaCgoZGF0YSkgPT4ge1xcbiAgICAgICAgbGV0IFt0aXRsZSwgaW1nLCBkZXNjLCB1cmxdID0gZmluZFJ1bGUubWFwKCh2LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodiA9PSAnKicpIHJldHVybiAnJ1xcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB2ID0gKGkgPT0gMSB8fCBpID09IDMpID9cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbShkYXRhLCB2KSA6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGRhdGEsIHYpXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaSAhPSAzKSB2ID0gcnVuQ29kZSh2KVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyByZXR1cm4gJycgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIHJlcyA9IHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLCB1cmw6IHVybCxcXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzYywgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBNWV9SVUxFLmNvbF90eXBlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgaWYgKHJlcy51cmwpIHtcXG4gICAgICAgICAgICBpZiAocmVzLnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxuICAgICAgICAgICAgICAgIGxldCByZUluZGV4ID0gcmVzLnVybC5pbmRleE9mKCcuanM6JylcXG4gICAgICAgICAgICAgICAgaWYgKHJlSW5kZXggPj0gMCkgcmVzLnVybCA9IHJlcy51cmwuc2xpY2UoMCwgcmVJbmRleCkgKyAnLmpzOlxcXFxuaWYoTVlfUlVMRSlPYmplY3QuYXNzaWduKE1ZX1JVTEUsICcgKyBhc3NpZ25MYXp5UnVsZSArICcpOycgKyByZXMudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZGV0YWlsRmluZFJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogT2JqZWN0LmFzc2lnbihnZW5NeVJ1bGUoKSwgeyBkZXRhaWxfZmluZF9ydWxlOiBkZXRhaWxGaW5kUnVsZSB9KSxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogZ2VuTXlSdWxlKCksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIG15Q29sbGVjdGlvbl9lbC5wdXNoKHJlcylcXG4gICAgfSlcXG4gICAgc2V0UmVzdWx0KG15Q29sbGVjdGlvbl9lbClcXG59XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV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cHBVcmwuaW5jbHVkZXMoXFxcImZyZWVrYW5cXFwiKSkge1xcbiAgICAgICAgICAgIGFwcFVhID0gXFxcIkRhcnQvMi4xNCAoZGFydDppbylcXFwiO1xcbiAgICAgICAgfSBlbHNlIGlmICgvenNifGZreHN8eGF5c3x4Y3lzfHN6eXN8ZHh5c3x5dHlzfHFueXMvLnRlc3QoYXBwVXJsKSkge1xcbiAgICAgICAgICAgIGFwcFVhID0gXFxcIkRhcnQvMi4xNSAoZGFydDppbylcXFwiO1xcbiAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcIi52b2RcXFwiKSkge1xcbiAgICAgICAgICAgIGFwcFVhID0gXFxcIm9raHR0cC80LjEuMFxcXCI7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGFwcFVhID0gXFxcIkRhbHZpay8yLjEuMFxcXCI7IC8vVFZcXG4gICAgICAgIH1cXG4gICAgICAgIC8v6aaW6aG16KeE5YiZ44CB5YiG57G76KeE5YiZ44CB5LqM57qn6KeE5YiZ5ZKM6KeG6aKR6Kej5p6QXFxuICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcbiAgICAgICAgICAgIGZpbmRfcnVsZSA9IFxcXCJqczpcXFwiICsgJC50b1N0cmluZyhmdW5jdGlvbihhcHBVcmwsIGFwcFVhKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlSnNvbiA9IEpTT04ucGFyc2UoZmV0Y2goYXBwVXJsICsgXFxcIj9hYz1mbGl0dGVyXFxcIiksIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQga2V5IGluIHR5cGVKc29uKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCJoaWtlcjovL2VtcHR5IyNcXFwiICsgYXBwVXJsICsgXFxcIj9hYz1saXN0JnBhZ2U9ZnlwYWdlJmNsYXNzPVxcXCIgKyBrZXkpLnJ1bGUoKHR5cGVKc29uLCBhcHBVYSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZExpc3RlbmVyKFxcXCJvbkNsb3NlXFxcIiwgXFxcImNsZWFyVmFyKCdmaWx0ZXInKVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzID0ge30sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5a2V5cyA9IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXIgPSB7fSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBcXFwiI0ZBNzI5OFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kZXggaW4gdHlwZUpzb24pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVKc29uW2luZGV4XS52YWx1ZXMubGVuZ3RoID09IDEpIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gdHlwZUpzb25baW5kZXhdLmZpZWxkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyTmFtZSA9IFxcXCLlhajpg6hcXFwiICsgdHlwZUpzb25baW5kZXhdLm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5a2V5cy5wdXNoKGtleSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXNbXFxcImZcXFwiICsga2V5XSA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJbXFxcImZcXFwiICsga2V5XSA9IFtmaWx0ZXJOYW1lXS5jb25jYXQodHlwZUpzb25baW5kZXhdLnZhbHVlcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZ2V0VmFyKFxcXCJmaWx0ZXJcXFwiLCBcXFwiXFxcIikpIHsgcHV0VmFyKFxcXCJmaWx0ZXJcXFwiLCBKU09OLnN0cmluZ2lmeShrZXlzKSkgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZW1wID0gSlNPTi5wYXJzZShnZXRWYXIoXFxcImZpbHRlclxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0ZW0gaW4gZmlsdGVyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgZmlsdGVyW2l0ZW1dLmxlbmd0aDsgaW5kZXgrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGVtcFtpdGVtXSA9PSBcXFwiXFxcIiA/IChpbmRleCA9PT0gMCA/IFxcXCLigJzigJzigJ3igJ1cXFwiICsgZmlsdGVyW2l0ZW1dWzBdLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogZmlsdGVyW2l0ZW1dW2luZGV4XSkgOiAodGVtcFtpdGVtXSA9PSBmaWx0ZXJbaXRlbV1baW5kZXhdID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBmaWx0ZXJbaXRlbV1baW5kZXhdLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogZmlsdGVyW2l0ZW1dW2luZGV4XSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChkZXMsIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZW1wID0gSlNPTi5wYXJzZShnZXRWYXIoXFxcImZpbHRlclxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBbbmFtZV0gPSBkZXMuaW5kZXhPZihcXFwi5YWo6YOoXFxcIikgIT0gLTEgPyBcXFwiXFxcIiA6IGRlcztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihcXFwiZmlsdGVyXFxcIiwgSlNPTi5zdHJpbmdpZnkodGVtcCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBmaWx0ZXJbaXRlbV1baW5kZXhdLCBpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHsgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCIgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KFxcXCIjI1xcXCIpWzFdICsgXFxcIiZcXFwiICsgdHlrZXlzLm1hcChjdXIgPT4gY3VyICsgXFxcIj1mXFxcIiArIGN1cikuam9pbihcXFwiJlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0ZW0gaW4gdGVtcCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwucmVwbGFjZShpdGVtLCB0ZW1wW2l0ZW1dKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc2NvZGUgPSBmZXRjaCh1cmwsIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc2NvZGUuaW5kZXhPZign5qOA5rWL5LitJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzY29kZSA9IGZldGNoKHVybCArICcmYnR3YWYnICsgcmVzY29kZS5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFwiLylbMV0sIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gSlNPTi5wYXJzZShyZXNjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dmxpc3RkYXRhJykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLop4bpopHliJfooajlh7rplJk6XFxcIiArIGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB0eXBlSnNvbltrZXldLCBhcHBVYSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLpppbpobXliIbnsbvlh7rplJk6XFxcIiArIGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBNWV9VUkwuc3BsaXQoJyMjJylbMV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCA9IEpTT04ucGFyc2UoZmV0Y2godXJsKSk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dmxpc3RkYXRhJykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coXFxcIummlumhteaOqOiNkOWHuumUmTpcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBzZXRSZXN1bHQoaXRlbXMpO1xcbiAgICAgICAgICAgIH0sIGFwcFVybCwgYXBwVWEpXFxuICAgICAgICAgICAgbGV0IHJ1bGVfdHZsaXN0ZGF0YSA9ICQudG9TdHJpbmcoZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIGxldCBsaXN0ID0gaHRtbC5kYXRhO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB7IHRpdGxlLCBwaWMsIG5leHRsaW5rLCBzdGF0ZSB9ID0gbGlzdFtpXTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBuZXh0bGluay5zdGFydHNXaXRoKCdodHRwJykgPyBuZXh0bGluayA6IGFwcFVybCArICc/YWM9ZGV0YWlsJmlkcz0nICsgbmV4dGxpbms7XFxuICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogcGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogc3RhdGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8zX21hcnF1ZWUnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChcXFwiI2ltbWVyc2l2ZVRoZW1lI2hpa2VyOi8vZW1wdHkjI1xcXCIgKyB1cmwpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvdHZtb3ZsaXN0JykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuW9seeJh+ivpuaDheWHuumUmTpcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBsZXQgcnVsZV90dm1vdmxpc3QgPSAkLnRvU3RyaW5nKGZ1bmN0aW9uKGFwcFVybCwgYXBwVWEpIHtcXG4gICAgICAgICAgICAgICAgYWRkTGlzdGVuZXIoXFxcIm9uQ2xvc2VcXFwiLCAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdub3cnKTtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKHVybCk7XFxuICAgICAgICAgICAgICAgIH0sIE1ZX1VSTCkpO1xcbiAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSBbXSxcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBnZXRWYXIoTVlfVVJMLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgIC8vZG9taW4gPSBNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV0ubWF0Y2goLyhbXFxcXFNdKj86XFxcXC9cXFxcL1tcXFxcU10qPylcXFxcLy8pWzFdO1xcbiAgICAgICAgICAgICAgICBpZiAoaHRtbCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKE1ZX1VSTC5zcGxpdChcXFwiIyNcXFwiKVsxXSwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9VUkwsIGh0bWwpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBKU09OLnBhcnNlKGh0bWwpO1xcblxcbiAgICAgICAgICAgICAgICAvL+eugOS7i1xcbiAgICAgICAgICAgICAgICBsZXQgeyB0aXRsZSwgcHVidGltZSwgdHJ1bmssIGFyZWEsIHR5cGUsIGRpcmVjdG9yLCBhY3RvciwgaW1nX3VybCwgaW50cm8gfSA9IGh0bWw7XFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlICsgXFxcIihcXFwiICsgcHVidGltZSArIFxcXCIpXFxcIiArIFxcXCJcXFxcblxcXCIgKyBhcmVhLmpvaW4oXFxcIi9cXFwiKSArIFxcXCIvXFxcIiArIHR5cGUuam9pbihcXFwiL1xcXCIpICsgXFxcIi9cXFwiICsgdHJ1bmssXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5a+85ryUOlxcXCIgKyBkaXJlY3Rvci5qb2luKFxcXCIsXFxcIikgKyBcXFwiXFxcXG5cXFwiICsgXFxcIuS4u+a8lDpcXFwiICsgYWN0b3Iuam9pbihcXFwiLFxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaW1nX3VybCxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpY19ibHVyJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WJp+aDheeugOS7izonLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogaW50cm8sXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IycpLnJ1bGUoKGRlc2MpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbG9uZ190ZXh0J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1dKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIGludHJvKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy/mlq3mj5JcXG4gICAgICAgICAgICAgICAgbGV0IGRuZW4gPSBnZXRNeVZhcihcXFwiZG5lblxcXCIsIFxcXCIwXFxcIik7XFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmlq3mj5I6JyArIChkbmVuID09ICcxJyA/ICfigJzigJzinIXigJ3igJ0nIDogJ+KdjicpLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcnKS5sYXp5UnVsZSgoZG5lbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkbmVuID09ICcxJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiZG5lblxcXCIsIFxcXCIwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suemgeeUqOaWreaPkuiwg+eUqCEnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjFcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5byA5ZCv5pat5o+S6LCD55SoISdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LCBkbmVuKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8yJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+e6v+i3r+mFjee9ricsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5I25vUmVjb3JkSGlzdG9yeSNAcnVsZT1qczp0aGlzLmQ9W107cmVxdWlyZSgnaHR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AgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0VmFyKFxcXCJub3dcXFwiKSA9PSB0YWJzW2ldID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0YWJzW2ldLmJvbGQoKS5mb250Y29sb3IoXFxcIiNGQTcyOThcXFwiKSA6IHRhYnNbaV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eUBsYXp5UnVsZT0uanM6cHV0VmFyKCdub3cnLCdcXFwiICsgdGFic1tpXSArIFxcXCInKTtyZWZyZXNoUGFnZShmYWxzZSk7J3RvYXN0Oi8v5YiH5o2i5oiQ5YqfISdcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy/op4bpopHliJfooahcXG4gICAgICAgICAgICAgICAgbGV0IHB0YWIgPSBnZXRWYXIoXFxcIm5vd1xcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwudmlkZW9saXN0W3B0YWJdO1xcbiAgICAgICAgICAgICAgICBsb2coJ+W9k+WJjee6v+i3rzonICsgcHRhYik7XFxuICAgICAgICAgICAgICAgIGlmIChnZXRWYXIoJ2FwcG10dnNvcnQnLCAnMScpID09ICcwJykge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdC5yZXZlcnNlKCk7XFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgbGlzdC5sZW5ndGg7IGorKykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNyY3VybCA9IGxpc3Rbal0udXJsO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC8yOTNqeDEvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyY3VybCA9IHNyY3VybC5yZXBsYWNlKCcyOTNqeDEnLCAnangnKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoLzhkOHF8ZGlsaWt0dnxoYW9rYW5qdTF8Y3p0dnxmaXRcXFxcOjh8cHB6aHUvLnRlc3QoYXBwVXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyY3VybCA9IHNyY3VybCArICcmYXBwPTEwMDAwJmFjY291bnQ9MjcyNzc1MDI4JnBhc3N3b3JkPXFxMjcyNzc1MDI4JztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGxpc3Rbal0udGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAvL3RpdGxlID0gdGl0bGUubWF0Y2goLyjnrKx8XFxcXGR8LSkqKOmbhnzor5185pyfKS9nKSA/IHRpdGxlLnJlcGxhY2UoL+esrHzpm4Z86K+dfOacny9nLCAnJykgOiB0aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfNFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBldmFsKEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9sYXp5UGFyc2VcXFwiKSkucnVsZSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxuICAgICAgICAgICAgfSwgYXBwVXJsLCBhcHBVYSk7XFxuICAgICAgICAgICAgbGV0IGxhenlQYXJzZSA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBzcmN1cmw7XFxuICAgICAgICAgICAgICAgIGlmICgvKHVybHx2aWR8dilcXFxcPS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICB2bGluayA9IHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLnNlYXJjaCgvKHVybHx2aWR8dilcXFxcPS8pKS5zcGxpdCgnPScpWzFdLnNwbGl0KCcmJylbMF07XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IGVuRG4gPSBnZXRNeVZhcihcXFwiZG5lblxcXCIsIFxcXCIwXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICB0ZXN0MSA9IHZsaW5rLnNlYXJjaCgveW91a3V8bWd0dnxpeGlndWF8cXEuY29tfHFpeWl8bWlndXxiaWxpYmlsaXxzb2h1fHBwdHZ8bGV8MTkwNS5jb20vKSAhPSAtMSxcXG4gICAgICAgICAgICAgICAgICAgIHRlc3QyID0gdmxpbmsuc2VhcmNoKC9MVFxcXFwtfFJvbmdYaW5nVlJcXFxcLXxyZW5yZW5taVxcXFwtfHhmeVxcXFwtfHN1b3lvXFxcXC5jY3xmZW5cXFxcLmxhb2RpfHJ1aWZlbmdsYnx4dWVyZW5cXFxcLS8pICE9IC0xO1xcbiAgICAgICAgICAgICAgICBpZiAoKHRlc3QxIHx8IHRlc3QyKSAmJiBlbkRuID09ICcxJykge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHknKS5sYXp5UnVsZSgodmxpbmspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuiwg+eUqOaWreaPkuino+aekCzop4bpopHpk77mjqU6XFxcIiArIHZsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKFxcXCJsZXQgY29uZmlnID1cXFwiICsgZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZSh2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICB9LCB2bGluaylcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCJoaWtlcjovL2VtcHR5XFxcIikubGF6eVJ1bGUoKHB0YWIsIHNyY3VybCwgYXBwVXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLkvb/nlKjpu5jorqTop6PmnpAs6KeG6aKR6ZO+5o6lOlxcXCIgKyBzcmN1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB5byA5aeLXFxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hhbmdlVmlkZW9VcmwodXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5pS55Y+Y54m55a6a5Zyw5Z2A55qEUmVmZXJlclxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsLmluY2x1ZGVzKFxcXCJ3a2ZpbGVcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdiaWxpYmlsaScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ21ndHYnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQHd3dy5tZ3R2LmNvbSYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybC5pbmNsdWRlcyhcXFwib2pia1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ov5Tlm57op4bpopHpk77mjqVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF1cmwuaW5jbHVkZXMoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLpk77mjqXkuI3mmK/ku6VodHRw5byA5aS0KOWPr+iDveWKoOWvhuS6hilcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4Ly50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA0fG9ialxcXFwvdG9zfG5ldGVhc2VcXFxcLmNvbS8udGVzdChzcmN1cmwpICYmIC9odHRwLy50ZXN0KHNyY3VybCkgJiYgIS9cXFxcLmh0bWwvLnRlc3Qoc3JjdXJsKSAmJiAhLyh1cmx8dnx2aWQpXFxcXD0vLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEvZmVuXFxcXC5sYW9kaXxydWlmZW5nbGJ8c3VveW9cXFxcLmNjLy50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuajgOa1i+WIsOi1hOa6kOWcsOWdgOWPr+iDveaYr+inhumikemTvuaOpVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChzcmN1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vLS0tLeWIhuWJsue6vy0tLS0vL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2NvZGUgPSBKU09OLnBhcnNlKGZldGNoKHNyY3VybCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+i/lOWbnumHjeWumuWQkeeahOmTvuaOpSBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMicgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAxJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlZHVybCA9IHNjb2RlLmhlYWRlcnMubG9jYXRpb25bMF0ucmVwbGFjZSgvXFxcXFxcXFwvZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfph43lrprlkJE6JyArIHJlZHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIS8odXJsfHZpZHx2KVxcXFw9Ly50ZXN0KHJlZHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocmVkdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qZWxzZSBpZiAoL1xcXFw9aHR0cC8udGVzdChyZWR1cmwpICYmIC9cXFxcLm0zdTh8XFxcXC5tcDR8XFxcXC5mbHYvLnRlc3QocmVkdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1cmwgPSByZWR1cmwuc3Vic3RyaW5nKHJlZHVybC5pbmRleE9mKCc9aHR0cCcpICsgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb2RlLmJvZHkgPSBmZXRjaChyZWR1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5byA5aeL5ZeF5o6iXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gc2NvZGUuYm9keTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXri8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCI0MDTkuoZcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXDxib2R5Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChbXFxcIuW8gOWni+inhumikeWXheaOolxcXCIsIFxcXCLmiZPlvIDop6PmnpDnvZHpobVcXFwiLCBcXFwi5L2/55So5YaF572u6Kej5p6QXFxcIl0sIDEsIFxcXCLmo4DmtYvliLDop6PmnpDkuLrnvZHpobXmlbDmja5cXFwiKS5zZWxlY3QoKHB0YWIsIHNyY3VybCwgYXBwVXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLlvIDlp4vop4bpopHll4XmjqJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVDYWNoZSgnaHR0cHM6Ly9jb2RlLmFsaXl1bi5jb20vbHprMjM1NTkvUHVibGljUnVsZS9yYXcvbWFzdGVyL3g1cnVsZS5qcycsIDI0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHg1cnVsZShzcmN1cmwsIHNyY3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSBcXFwi5omT5byA6Kej5p6Q572R6aG1XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIndlYjovL1xcXCIgKyBzcmN1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSBcXFwi5L2/55So5YaF572u6Kej5p6QXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBzcmN1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvKHVybHx2aWR8dilcXFxcPS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2bGluayA9IHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLnNlYXJjaCgvKHVybHx2aWR8dilcXFxcPS8pKS5zcGxpdCgnPScpWzFdLnNwbGl0KCcmJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLkvb/nlKjlhoXnva7op6PmnpAs6KeG6aKR6ZO+5o6lOlxcXCIgKyB2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLmraPlnKjov5vooYzop6PmnpAuLi5cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL215UGFyc2VcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgcHRhYiwgc3JjdXJsLCBhcHBVcmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZygn5bCd6K+V5LuOanNvbuaVsOaNruiOt+WPlicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHVybCA9IEpTT04ucGFyc2UoaHRtbCkudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChwdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmxldCBwdXJsID0gaHRtbC5tYXRjaCgvW1xcXFwnXFxcXFxcXCJddXJsW1xcXFwnXFxcXFxcXCJdOi4qP1tcXFxcJ1xcXFxcXFwiXSguKj8pW1xcXFwnXFxcXFxcXCJdLylbMV0ucmVwbGFjZSgvXFxcXFxcXFwvZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChwdXJsKTsqL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcign6Kej5p6Q5Y+v6IO95Yqg5a+G5LqGJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5pyq6IO95oiQ5Yqf6I635Y+W6KeG6aKR5Zyw5Z2AOicgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBzcmN1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvKHVybHx2aWR8dilcXFxcPS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2bGluayA9IHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLnNlYXJjaCgvKHVybHx2aWR8dilcXFxcPS8pKS5zcGxpdCgnPScpWzFdLnNwbGl0KCcmJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLlsJ3or5Xkvb/nlKjlhoXnva7op6PmnpAs6KeG6aKR6ZO+5o6lOlxcXCIgKyB2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBldmFsKEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+WKqOaAgeino+aekOS7o+eggee7k+adn1xcbiAgICAgICAgICAgICAgICAgICAgfSwgcHRhYiwgc3JjdXJsLCBhcHBVcmwpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcGFnZXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXCJUVuWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgICAgIHBhdGg6IFxcXCJ0dmxpc3RkYXRhXFxcIixcXG4gICAgICAgICAgICAgICAgcnVsZTogcnVsZV90dmxpc3RkYXRhXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICBuYW1lOiBcXFwiVFbpgInpm4ZcXFwiLFxcbiAgICAgICAgICAgICAgICBwYXRoOiBcXFwidHZtb3ZsaXN0XFxcIixcXG4gICAgICAgICAgICAgICAgcnVsZTogcnVsZV90dm1vdmxpc3RcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXCLop4bpopHop6PmnpBcXFwiLFxcbiAgICAgICAgICAgICAgICBwYXRoOiBcXFwibGF6eVBhcnNlXFxcIixcXG4gICAgICAgICAgICAgICAgcnVsZTogbGF6eVBhcnNlXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGZpbmRfcnVsZSA9IFxcXCJqczpcXFwiICsgJC50b1N0cmluZyhmdW5jdGlvbihjaGFuZ2VVcmwsIGFwcFVybCwgYXBwVWEpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ZW1zID0gW107XFxuICAgICAgICAgICAgICAgIC8v6I635Y+W5YiG57G75YaF5a65XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZUpzb24gPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZVVybCA9IGNoYW5nZVVybChhcHBVcmwgKyBcXFwibmF2P3Rva2VuPVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBjb2RlID0gcmVxdWVzdCh0eXBlVXJsLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBjb2RlLmluZGV4T2YoJ+ajgOa1i+S4rScpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGNvZGUgPSBmZXRjaCh0eXBlVXJsICsgJyZidHdhZicgKyB0eXBjb2RlLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXCIvKVsxXSwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZUpzb24gPSBKU09OLnBhcnNlKHR5cGNvZGUpLmxpc3Q7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlVXJsID0gY2hhbmdlVXJsKGFwcFVybCArIFxcXCJuYXY/dG9rZW49XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGNvZGUgPSByZXF1ZXN0KHR5cGVVcmwsIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGNvZGUuaW5kZXhPZign5qOA5rWL5LitJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwY29kZSA9IGZldGNoKHR5cGVVcmwgKyAnJmJ0d2FmJyArIHR5cGNvZGUubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcIi8pWzFdLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlSnNvbiA9IEpTT04ucGFyc2UodHlwY29kZSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCIudm9kXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZVVybCA9IGNoYW5nZVVybChhcHBVcmwgKyBcXFwiL3R5cGVzXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGNvZGUgPSByZXF1ZXN0KHR5cGVVcmwsIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGNvZGUuaW5kZXhPZign5qOA5rWL5LitJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwY29kZSA9IGZldGNoKHR5cGVVcmwgKyAnP2J0d2FmJyArIHR5cGNvZGUubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcIi8pWzFdLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlSnNvbiA9IEpTT04ucGFyc2UodHlwY29kZSkuZGF0YS5saXN0O1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgLy/ojrflj5bliIbnsbvliJfooahcXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdHlwZUpzb24ubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+WIhuexu+inhumikeWcsOWdgFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXVybCA9IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlQXJyYXkgPSBPYmplY3Qua2V5cyh0eXBlSnNvbltpXS50eXBlX2V4dGVuZCkuZmlsdGVyKGN1ciA9PiBbXFxcImNsYXNzXFxcIiwgXFxcImFyZWFcXFwiLCBcXFwibGFuZ1xcXCIsIFxcXCJ5ZWFyXFxcIl0uaW5jbHVkZXMoY3VyKSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVVcmwgPSB0eXBlQXJyYXkubWFwKGN1ciA9PiBjdXIgKyBcXFwiPWZcXFwiICsgY3VyKS5qb2luKFxcXCImXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXVybCA9IGFwcFVybCArICd2aWRlbz90aWQ9JyArIHR5cGVKc29uW2ldLnR5cGVfaWQgKyAnJnBhZ2U9ZnlwYWdlJnRva2VuPSYnICsgdHlwZVVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcygneGdhcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXVybCA9IGFwcFVybCArICd2aWRlbz90aWQ9JyArIHR5cGVKc29uW2ldLnR5cGVfaWQgKyAnJnBhZ2U9ZnlwYWdlJicgKyB0eXBlVXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCIudm9kXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdChhcHBVcmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXVybCA9IGFwcFVybCArICcvbGlzdD90eXBlPScgKyB0eXBlSnNvbltpXS50eXBlX2lkICsgJyZwYWdlPWZ5cGFnZSZieT1mYnkmbGltaXQ9OSYnICsgdHlwZVVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5dXJsID0gYXBwVXJsICsgJz90eXBlPScgKyB0eXBlSnNvbltpXS50eXBlX2lkICsgJyZwYWdlPWZ5cGFnZSZieT1mYnkmbGltaXQ9OSYnICsgdHlwZVVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+aehOW7uuWKqOaAgeWIhuexu1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdHlwZUpzb25baV0udHlwZV9uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcImhpa2VyOi8vZW1wdHkjI1xcXCIgKyB0eXVybCkucnVsZSgoYXBwVXJsLCB0eXBlX2V4dGVuZCwgY2hhbmdlVXJsLCBhcHBVYSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGlzdGVuZXIoXFxcIm9uQ2xvc2VcXFwiLCBcXFwiY2xlYXJWYXIoJ2ZpbHRlcicpXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHsgLy/liqjmgIHliIbnsbtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5cyA9IHt9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXIgPSB7fSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyTmFtZXMgPSB7IGNsYXNzOiBcXFwi57G75Z6LXFxcIiwgYXJlYTogXFxcIuWcsOWMulxcXCIsIGxhbmc6IFxcXCLor63oqIBcXFwiLCB5ZWFyOiBcXFwi5bm05Lu9XFxcIiwgc3RhcjogXFxcIuaYjuaYn1xcXCIsIGRpcmVjdG9yOiBcXFwi5a+85ryUXFxcIiwgc3RhdGU6IFxcXCLnirbmgIFcXFwiLCB2ZXJzaW9uOiBcXFwi54mI5pysXFxcIiB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0RmlsdGVyID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmNsYXNzOiBbX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ICAgICAgIGtleXNbXFxcImZcXFwiICsga2V5XSA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzW1xcXCJmYnlcXFwiXSA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZmlsdGVyTmFtZSA9IFxcXCLlhajpg6hcXFwiICsgZmlsdGVyTmFtZXNba2V5XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyW1xcXCJmXFxcIiArIGtleV0gPSBbZmlsdGVyTmFtZV0uY29uY2F0KHR5cGVfZXh0ZW5kW2tleV0uc3BsaXQoXFxcIixcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmaWx0ZXJbXFxcImZcXFwiICsga2V5XS5sZW5ndGggPT0gMikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyW1xcXCJmXFxcIiArIGtleV0gPSBkZWZhdWx0RmlsdGVyW1xcXCJmXFxcIiArIGtleV1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWdldFZhcihcXFwiZmlsdGVyXFxcIiwgXFxcIlxcXCIpKSB7IHB1dFZhcihcXFwiZmlsdGVyXFxcIiwgSlNPTi5zdHJpbmdpZnkoa2V5cykpIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGVtcCA9IEpTT04ucGFyc2UoZ2V0VmFyKFxcXCJmaWx0ZXJcXFwiKSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yID0gXFxcIiNGQTcyOThcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0ZW0gaW4gZmlsdGVyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGluZGV4ID0gMDsgaW5kZXggPCBmaWx0ZXJbaXRlbV0ubGVuZ3RoOyBpbmRleCsrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGVtcFtpdGVtXSA9PSBcXFwiXFxcIiA/IChpbmRleCA9PT0gMCA/IFxcXCLigJzigJzigJ3igJ1cXFwiICsgZmlsdGVyW2l0ZW1dWzBdLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogZmlsdGVyW2l0ZW1dW2luZGV4XSkgOiAodGVtcFtpdGVtXSA9PSBmaWx0ZXJbaXRlbV1baW5kZXhdID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBmaWx0ZXJbaXRlbV1baW5kZXhdLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogZmlsdGVyW2l0ZW1dW2luZGV4XSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoZGVzLCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZW1wID0gSlNPTi5wYXJzZShnZXRWYXIoXFxcImZpbHRlclxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcFtuYW1lXSA9IGRlcy5pbmRleE9mKFxcXCLlhajpg6hcXFwiKSAhPSAtMSA/IFxcXCJcXFwiIDogZGVzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXFxcImZpbHRlclxcXCIsIEpTT04uc3RyaW5naWZ5KHRlbXApKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmlsdGVyW2l0ZW1dW2luZGV4XSwgaXRlbSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7IGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBieSA9IHsg6buY6K6k6aG65bqPOiBcXFwiXFxcIiwg5pyA5pawOiBcXFwidGltZVxcXCIsIOacgOeDrTogXFxcImhpdHNcXFwiLCDor4TliIY6IFxcXCJzY29yZVxcXCIgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluZGV4T2YoJ2FwaS5waHAvYXBwJykgPT0gLTEgJiYgYXBwVXJsLmluZGV4T2YoJ3hnYXBwJykgPT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXRlbSBpbiBieSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRlbXBbXFxcImZieVxcXCJdID09IGJ5W2l0ZW1dID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBpdGVtLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogaXRlbSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChkZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFwiZmlsdGVyXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wW1xcXCJmYnlcXFwiXSA9IGRlcztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJmaWx0ZXJcXFwiLCBKU09OLnN0cmluZ2lmeSh0ZW1wKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGJ5W2l0ZW1dKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFwiZmlsdGVyXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IE1ZX1VSTC5zcGxpdChcXFwiIyNcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0ZW0gaW4gdGVtcCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5yZXBsYWNlKGl0ZW0sIHRlbXBbaXRlbV0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gY2hhbmdlVXJsKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzY29kZSA9IGZldGNoKHVybCwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNjb2RlLmluZGV4T2YoJ+ajgOa1i+S4rScpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzY29kZSA9IGZldGNoKHVybCArICcmYnR3YWYnICsgcmVzY29kZS5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFwiLylbMV0sIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IEpTT04ucGFyc2UocmVzY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcGxpc3RkYXRhJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuinhumikeWIl+ihqOWHuumUmTpcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGFwcFVybCwgdHlwZUpzb25baV0udHlwZV9leHRlbmQsIGNoYW5nZVVybCwgYXBwVWEpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn6aaW6aG15YiG57G75Ye66ZSZOicgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8v6I635Y+W5o6o6I2Q6KeG6aKR5YiX6KGoXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KCcjIycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gY2hhbmdlVXJsKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QodXJsLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGh0bWwuaW5kZXhPZign5qOA5rWL5LitJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2godXJsICsgJyZidHdhZicgKyBodG1sLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXCIvKVsxXSwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBKU09OLnBhcnNlKGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwaW5kZXhkYXRhJykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+mmlumhteaOqOiNkOWHuumUmTonICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBzZXRSZXN1bHQoaXRlbXMpO1xcbiAgICAgICAgICAgIH0sIGNoYW5nZVVybCwgYXBwVXJsLCBhcHBVYSlcXG5cXG4gICAgICAgICAgICBsZXQgcnVsZV9hcHBsaXN0ZGF0YSA9ICQudG9TdHJpbmcoZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIGxldCBsaXN0ID0gW107XFxuICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoJ2FwaS5waHAvYXBwJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3Q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wgMTAgPyAnMCcgKyBkYXRlLmdldERhdGUoKSA6IGRhdGUuZ2V0RGF0ZSgpKTtcXG4gICAgICAgICAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGFwcFVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5rID0gYXBwVXJsICsgJy9kZXRhaWxJRD92b2RfaWQ9JyArIHZvZF9pZCArICcmcmVsX2xpbWl0PTEwJztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB2b2RfbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiB2b2RfcGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogdm9kX3JlbWFya3MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8zX21hcnF1ZWUnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChcXFwiI2ltbWVyc2l2ZVRoZW1lI2hpa2VyOi8vZW1wdHkjI1xcXCIgKyBsaW5rKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcG1vdmxpc3QnKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5b2x54mH6K+m5oOF5Ye66ZSZOlxcXCIgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KFtdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgbGV0IHJ1bGVfYXBwaW5kZXhkYXRhID0gJC50b1N0cmluZyhmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBbXTtcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwubGlzdDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGE7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCIudm9kXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGEubGlzdDtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaXN0cyA9IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVuYW1lID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpIHx8IGFwcFVybC5pbmNsdWRlcygneGdhcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RzID0gbGlzdFtpXS52bGlzdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlbmFtZSA9IGxpc3RbaV0udHlwZV9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcIi52b2RcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RzID0gbGlzdFtpXS52b2RfbGlzdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlbmFtZSA9IGxpc3RbaV0udm9kX3R5cGVfbmFtZTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0eXBlbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBsaXN0cy5sZW5ndGg7IGorKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7IHZvZF9uYW1lLCB2b2RfcGljLCB2b2RfaWQsIHZvZF9yZW1hcmtzIH0gPSBsaXN0c1tqXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoJ2FwaS5waHAvYXBwJykgfHwgYXBwVXJsLmluY2x1ZGVzKCd4Z2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsgPSBhcHBVcmwgKyAndmlkZW9fZGV0YWlsP2lkPScgKyB2b2RfaWQgKyAnJnRva2VuPSZrZXk9JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwiLnZvZFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRlID0gbmV3IERhdGUoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluayA9IGFwcFVybCArICcvZGV0YWlsP3ZvZF9pZD0nICsgdm9kX2lkICsgJyZyZWxfbGltaXQ9MTAma2V5PScgKyAoZGF0ZS5nZXRNb250aCgpICsgMSkgKyAoZGF0ZS5nZXREYXRlKCkgPCAxMCA/ICcwJyArIGRhdGUuZ2V0RGF0ZSgpIDogZGF0ZS5nZXREYXRlKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdChhcHBVcmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsgPSBhcHBVcmwgKyAnL2RldGFpbElEP3ZvZF9pZD0nICsgdm9kX2lkICsgJyZyZWxfbGltaXQ9MTAnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHZvZF9uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiB2b2RfcGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IHZvZF9yZW1hcmtzLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzNfbWFycXVlZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChcXFwiI2ltbWVyc2l2ZVRoZW1lI2hpa2VyOi8vZW1wdHkjI1xcXCIgKyBsaW5rKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwbW92bGlzdCcpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuW9seeJh+ivpuaDheWHuumUmTpcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoW10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBsZXQgcnVsZV9hcHBtb3ZsaXN0ID0gJC50b1N0cmluZyhmdW5jdGlvbihjaGFuZ2VVcmwsIGFwcFVybCwgYXBwVWEpIHtcXG4gICAgICAgICAgICAgICAgYWRkTGlzdGVuZXIoXFxcIm9uQ2xvc2VcXFwiLCAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdhcHBub3cnKTtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKHVybCk7XFxuICAgICAgICAgICAgICAgIH0sIE1ZX1VSTCkpO1xcbiAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSBbXSxcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBnZXRWYXIoTVlfVVJMLCBcXFwiXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBkYXRhID0ge307XFxuICAgICAgICAgICAgICAgIGlmIChodG1sID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KFxcXCIjI1xcXCIpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gY2hhbmdlVXJsKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2godXJsLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1VSTCwgaHRtbCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UoaHRtbCkuZGF0YS52b2RfaW5mbztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBKU09OLnBhcnNlKGh0bWwpLmRhdGE7XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgLy/nroDku4tcXG4gICAgICAgICAgICAgICAgbGV0IHsgdm9kX25hbWUsIHZvZF9waWMsIHZvZF9jb250ZW50LCB2b2RfY2xhc3MsIHZvZF9yZW1hcmtzLCB2b2RfZGlyZWN0b3IsIHZvZF9hY3Rvciwgdm9kX2FyZWEsIHZvZF9sYW5nLCB2b2RfeWVhciB9ID0gZGF0YTtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdm9kX25hbWUgKyAnXFxcXG4nICsgdm9kX2NsYXNzICsgXFxcIixcXFwiICsgdm9kX3JlbWFya3MgKyBcXFwiXFxcXG5cXFwiICsgdm9kX2FyZWEgKyBcXFwiL1xcXCIgKyB2b2RfbGFuZyArIFxcXCIvXFxcIiArIHZvZF95ZWFyLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuWvvOa8lDpcXFwiICsgdm9kX2RpcmVjdG9yICsgXFxcIlxcXFxu5Li75ryUOlxcXCIgKyB2b2RfYWN0b3IsXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiB2b2RfcGljLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljX2JsdXInXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Ymn5oOF566A5LuLOicsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiB2b2RfY29udGVudCxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eSNub1JlY29yZEhpc3RvcnkjJykucnVsZSgoZGVzYykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsb25nX3RleHQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfV0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgdm9kX2NvbnRlbnQpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAvL+aWreaPklxcbiAgICAgICAgICAgICAgICBsZXQgZG5lbiA9IGdldE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aWreaPkjonICsgKGRuZW4gPT0gJzEnID8gJ+KAnOKAnOKcheKAneKAnScgOiAn4p2OJyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGRuZW4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG5lbiA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImRuZW5cXFwiLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LnpoHnlKjmlq3mj5LosIPnlKghJztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiZG5lblxcXCIsIFxcXCIxXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suW8gOWQr+aWreaPkuiwg+eUqCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSwgZG5lbiksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnur/ot6/phY3nva4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eSNub1JlY29yZEhpc3RvcnkjQHJ1bGU9anM6dGhpcy5kPVtdO3JlcXVpcmUoJ2h0dHBzOi8vZ2l0ZWEuY29tL0FJOTU3L0hpa2VyL3Jhdy9tL3YvUm91dGUuanMnKTtSb3V0ZS5zZXRQYXJzZSgpO3NldFJlc3VsdChkKTtcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgLy91cmw6IFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU96K6+572uI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAvL+e6v+i3r+WIl+ihqFxcblxcbiAgICAgICAgICAgICAgICBsZXQgY29udHMgPSBbXSxcXG4gICAgICAgICAgICAgICAgICAgIHRhYnMgPSBbXTtcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwiYXBpLnBocC9hcHBcXFwiKSB8fCBhcHBVcmwuaW5jbHVkZXMoXFxcInhnYXBwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gZGF0YS52b2RfdXJsX3dpdGhfcGxheWVyO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBkYXRhLnZvZF9wbGF5X2xpc3Q7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gZGF0YS52b2RfcGxheV91cmwuc3BsaXQoJyQkJCcpO1xcbiAgICAgICAgICAgICAgICAgICAgdGFicyA9IGRhdGEudm9kX3BsYXlfZnJvbS5zcGxpdCgnJCQkJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy/nur/ot6/lkI3np7BcXG4gICAgICAgICAgICAgICAgbGV0IHB0YWIgPSBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHB0YWJuYW1lID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIGlmIChnZXRWYXIoXFxcImFwcG5vd1xcXCIsIFxcXCJcXFwiKSA9PSBcXFwiXFxcIikgeyBwdXRWYXIoXFxcImFwcG5vd1xcXCIsIFxcXCIwXFxcIikgfVxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgc3B0YWIgPSBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB0YWJuYW1lID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJhcGkucGhwL2FwcFxcXCIpIHx8IGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNwdGFiID0gY29udHNbaV0uY29kZSA/IGNvbnRzW2ldLmNvZGUgOiB0YWJzW2ldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhYm5hbWUgPSBjb250c1tpXS5uYW1lIHx8IHNwdGFiO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzcHRhYiA9IGNvbnRzW2ldLmZyb20gPyBjb250c1tpXS5mcm9tIDogdGFic1tpXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0YWJuYW1lID0gY29udHNbaV0ucGxheWVyX2luZm8gPyBjb250c1tpXS5wbGF5ZXJfaW5mby5zaG93IDogc3B0YWI7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0VmFyKFxcXCJhcHBub3dcXFwiKSA9PSBpID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0YWJuYW1lLmJvbGQoKS5mb250Y29sb3IoXFxcIiNGQTcyOThcXFwiKSA6IHRhYm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjQGxhenlSdWxlPS5qczpwdXRWYXIoJ2FwcG5vdycsJ1xcXCIgKyBpICsgXFxcIicpO3JlZnJlc2hQYWdlKGZhbHNlKTsndG9hc3Q6Ly/liIfmjaLmiJDlip8hJ1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRWYXIoXFxcImFwcG5vd1xcXCIpID09IGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdGFiID0gc3B0YWI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHRhYm5hbWUgPSB0YWJuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLigJzigJzihpPihpHigJ3igJ1cXFwiICsgcHRhYm5hbWUgKyBcXFwiLVxcXCIgKyBwdGFiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eUBsYXp5UnVsZT0uanM6cHV0VmFyKCdhcHBtYXBwc29ydCcsIGdldFZhcignYXBwbWFwcHNvcnQnLCcxJyk9PScxJz8nMCc6JzEnKTtyZWZyZXNoUGFnZShmYWxzZSk7J3RvYXN0Oi8v5YiH5o2i5oiQ5YqfISdcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHsgbGluZVZpc2libGU6IGZhbHNlIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIC8v6ZO+5o6l5YiX6KGoXFxuICAgICAgICAgICAgICAgIGxldCBsaXN0ID0gW10sXFxuICAgICAgICAgICAgICAgICAgICBpbmRleCA9IGdldFZhcihcXFwiYXBwbm93XFxcIik7XFxuICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwXFxcIikgfHwgYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gY29udHNbaW5kZXhdLnVybC5zcGxpdChcXFwiI1xcXCIpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2luZGV4XS51cmxzID8gY29udHNbaW5kZXhdLnVybHMgOiBjb250c1tpbmRleF0udXJsLnNwbGl0KFxcXCIjXFxcIik7XFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIGlmIChnZXRWYXIoJ2FwcG1hcHBzb3J0JywgJzEnKSA9PSAnMCcpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QucmV2ZXJzZSgpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8v6Kej5p6Q5o6l5Y+jXFxuICAgICAgICAgICAgICAgIGxldCBqaWVrID0gW107XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJhcGkucGhwL2FwcFxcXCIpIHx8IGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGppZWsucHVzaChjb250c1tpbmRleF0ucGFyc2VfYXBpIHx8IFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgamllayA9IChjb250c1tpbmRleF0ucGxheWVyX2luZm8ucGFyc2UyIHx8IFxcXCJcXFwiKS5zcGxpdChcXFwiLFxcXCIpLmNvbmNhdCgoY29udHNbaW5kZXhdLnBsYXllcl9pbmZvLnBhcnNlIHx8IFxcXCJcXFwiKS5zcGxpdChcXFwiLFxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqaWVrID0gamllay5tYXAoY3VyID0+IGN1ci5yZXBsYWNlKFxcXCIuLlxcXCIsIFxcXCIuXFxcIikucmVwbGFjZSgnanNvbmJzJywgJycpKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXG4gICAgICAgICAgICAgICAgamllayA9IGppZWsuZmlsdGVyKGN1ciA9PiAhIWN1cik7XFxuICAgICAgICAgICAgICAgIGxldCBqeFVybCA9IGppZWtbMF0gfHwgXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIC8qaWYgKGp4VXJsLnN1YnN0cmluZygwLCAyKSA9PSAnXFxcXC9cXFxcLycpIHtcXG4gICAgICAgICAgICAgICAgICAgIGp4VXJsID0gJ2h0dHBzOicgKyBqeFVybDtcXG4gICAgICAgICAgICAgICAgfSovXFxuICAgICAgICAgICAgICAgIC8v5omT5Y2w5o6l5Y+jXFxuICAgICAgICAgICAgICAgIGxvZygnXFxcXG7lvZPliY3nur/ot686JyArIHB0YWIgKyAnXFxcXG7op6PmnpDliJfooag6JyArICQuc3RyaW5naWZ5KGppZWspKTtcXG4gICAgICAgICAgICAgICAgLy/op4bpopHliJfooahcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBsaXN0Lmxlbmd0aDsgaisrKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3Rbal0udXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmxpbmsgPSBsaXN0W2pdLnVybC5yZXBsYWNlKC8jNDU2Iy9nLCAnaHR0cCcpLnJlcGxhY2UoLyMxMjMjL2csICcuJykucmVwbGFjZSgvIzc4OSMvZywgJzonKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IGxpc3Rbal0ubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmxpbmsgPSBsaXN0W2pdLnNwbGl0KFxcXCIkXFxcIilbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSBsaXN0W2pdLnNwbGl0KFxcXCIkXFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAvL3RpdGxlID0gdGl0bGUubWF0Y2goLyjnrKx8XFxcXGR8LSkqKOmbhnzor5185pyfKS9nKSA/IHRpdGxlLnJlcGxhY2UoL+esrHzpm4Z86K+dfOacny9nLCAnJykgOiB0aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfNFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBldmFsKEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9sYXp5UGFyc2VcXFwiKSkucnVsZSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxuICAgICAgICAgICAgfSwgY2hhbmdlVXJsLCBhcHBVcmwsIGFwcFVhKTtcXG5cXG4gICAgICAgICAgICBsZXQgbGF6eVBhcnNlID0gJC50b1N0cmluZyhmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGVuRG4gPSBnZXRNeVZhcihcXFwiZG5lblxcXCIsIFxcXCIwXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICB0ZXN0MSA9IHZsaW5rLnNlYXJjaCgveW91a3V8bWd0dnxpeGlndWF8cXEuY29tfHFpeWl8bWlndXxiaWxpYmlsaXxzb2h1fHBwdHZ8bGV8MTkwNS5jb20vKSAhPSAtMSxcXG4gICAgICAgICAgICAgICAgICAgIHRlc3QyID0gdmxpbmsuc2VhcmNoKC9MVFxcXFwtfFJvbmdYaW5nVlJcXFxcLXxyZW5yZW5taVxcXFwtfHhmeVxcXFwtfHN1b3lvXFxcXC5jY3xmZW5cXFxcLmxhb2RpfHJ1aWZlbmdsYnx4dWVyZW5cXFxcLS8pICE9IC0xO1xcbiAgICAgICAgICAgICAgICBpZiAoKHRlc3QxIHx8IHRlc3QyKSAmJiBlbkRuID09ICcxJykge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHknKS5sYXp5UnVsZSgodmxpbmspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFxu6LCD55So5pat5o+S6Kej5p6QLOinhumikemTvuaOpTpcXFwiICsgdmxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcImxldCBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHZsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIHZsaW5rKVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHknKS5sYXp5UnVsZSgocHRhYiwgdmxpbmssIGp4VXJsLCBhcHBVcmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFxu5L2/55So6buY6K6k6Kej5p6QLOinhumikemTvuaOpTpcXFwiICsgdmxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v6KeG6aKR6ZO+5o6l5aSE55CGXFxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hhbmdlVmlkZW9VcmwodXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5pS55Y+Y54m55a6a5Zyw5Z2A55qEUmVmZXJlclxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsLmluY2x1ZGVzKFxcXCJ3a2ZpbGVcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdiaWxpYmlsaScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ21ndHYnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQHd3dy5tZ3R2LmNvbSYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybC5pbmNsdWRlcyhcXFwib2pia1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ov5Tlm57op4bpopHpk77mjqVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF1cmwuaW5jbHVkZXMoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLpk77mjqXkuI3mmK/ku6VodHRw5byA5aS0KOWPr+iDveWKoOWvhuS6hilcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4Ly50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB5byA5aeLXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lpITnkIbop4bpopHmoLflvI/nmoTotYTmupDpk77mjqVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTh8XFxcXC5tcDR8b2JqXFxcXC90b3N8bmV0ZWFzZVxcXFwuY29tLy50ZXN0KHZsaW5rKSAmJiAvaHR0cC8udGVzdCh2bGluaykgJiYgIS9cXFxcLmh0bWwvLnRlc3QodmxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIS9mZW5cXFxcLmxhb2RpfHJ1aWZlbmdsYnxzdW95b1xcXFwuY2MvLnRlc3QodmxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLmo4DmtYvliLDotYTmupDlnLDlnYDlj6/og73mmK/op4bpopHpk77mjqVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwodmxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5peg5Y+v55So6Kej5p6Q55u05o6l5oql6ZSZXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghanhVcmwgfHwgL3hcXFxcLW5cXFxcLmNjLy50ZXN0KGp4VXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLml6Dlj6/nlKjop6PmnpBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+S9v+eUqOino+aekFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuS9v+eUqOino+aekDpcXFwiICsganhVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGp4VXJsICsgdmxpbmssXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29kZSA9IEpTT04ucGFyc2UoZmV0Y2gobGluaywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBcXFwiRGFydC8yLjEzIChkYXJ0OmlvKVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+i/lOWbnumHjeWumuWQkeeahOmTvuaOpSBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMicgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAxJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlZHVybCA9IHNjb2RlLmhlYWRlcnMubG9jYXRpb25bMF0ucmVwbGFjZSgvXFxcXFxcXFwvZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfph43lrprlkJE6JyArIHJlZHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIS8odXJsfHZpZHx2KVxcXFw9Ly50ZXN0KHJlZHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocmVkdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qZWxzZSBpZiAoL1xcXFw9aHR0cC8udGVzdChyZWR1cmwpICYmIC9cXFxcLm0zdTh8XFxcXC5tcDR8XFxcXC5mbHYvLnRlc3QocmVkdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1cmwgPSByZWR1cmwuc3Vic3RyaW5nKHJlZHVybC5pbmRleE9mKCc9aHR0cCcpICsgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb2RlLmJvZHkgPSBmZXRjaChyZWR1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5byA5aeL5ZeF5o6iXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gc2NvZGUuYm9keTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXri8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCI0MDTkuoZcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXDxib2R5Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChbXFxcIuW8gOWni+inhumikeWXheaOolxcXCIsIFxcXCLmiZPlvIDop6PmnpDnvZHpobVcXFwiLCBcXFwi5L2/55So5YaF572u6Kej5p6QXFxcIl0sIDEsIFxcXCLmo4DmtYvliLDop6PmnpDkuLrnvZHpobXmlbDmja5cXFwiKS5zZWxlY3QoKGxpbmssIHB0YWIsIHZsaW5rLCBhcHBVcmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIuW8gOWni+inhumikeWXheaOolxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZUNhY2hlKCdodHRwczovL2NvZGUuYWxpeXVuLmNvbS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9tYXN0ZXIveDVydWxlLmpzJywgMjQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKGxpbmssIGxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gXFxcIuaJk+W8gOino+aekOe9kemhtVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ3ZWI6Ly9cXFwiICsgbGluaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09IFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5L2/55So5YaF572u6Kej5p6QXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLmraPlnKjov5vooYzop6PmnpAuLi5cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL215UGFyc2VcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGluaywgcHRhYiwgdmxpbmssIGFwcFVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZygn5bCd6K+V5LuOanNvbuaVsOaNruiOt+WPlicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHVybCA9IEpTT04ucGFyc2UoaHRtbCkudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChwdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmxldCBwdXJsID0gaHRtbC5tYXRjaCgvW1xcXFwnXFxcXFxcXCJddXJsW1xcXFwnXFxcXFxcXCJdOi4qP1tcXFxcJ1xcXFxcXFwiXSguKj8pW1xcXFwnXFxcXFxcXCJdLylbMV0ucmVwbGFjZSgvXFxcXFxcXFwvZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChwdXJsKTsqL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcign6Kej5p6Q5Y+v6IO95Yqg5a+G5LqGJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygnXFxcXG7mnKrog73miJDlip/ojrflj5bop4bpopHlnLDlnYA6JyArIGUubWVzc2FnZSArIFxcXCJcXFxcbuWwneivleS9v+eUqOinhOWImeWGhee9ruino+aekFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL3BhZ2UvbXlQYXJzZVxcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHnu5PmnZ9cXG4gICAgICAgICAgICAgICAgICAgIH0sIHB0YWIsIHZsaW5rLCBqeFVybCwgYXBwVXJsKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHBhZ2VzLnB1c2goe1xcbiAgICAgICAgICAgICAgICBuYW1lOiBcXFwiQVBQ5YiG57G75YiX6KGoXFxcIixcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcImFwcGxpc3RkYXRhXFxcIixcXG4gICAgICAgICAgICAgICAgcnVsZTogcnVsZV9hcHBsaXN0ZGF0YVxcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgbmFtZTogXFxcIkFQUOmmlumhteWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgICAgIHBhdGg6IFxcXCJhcHBpbmRleGRhdGFcXFwiLFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX2FwcGluZGV4ZGF0YVxcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgbmFtZTogXFxcIkFQUOmAiembhlxcXCIsXFxuICAgICAgICAgICAgICAgIHBhdGg6IFxcXCJhcHBtb3ZsaXN0XFxcIixcXG4gICAgICAgICAgICAgICAgcnVsZTogcnVsZV9hcHBtb3ZsaXN0XFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICBuYW1lOiBcXFwi6KeG6aKR6Kej5p6QXFxcIixcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcImxhenlQYXJzZVxcXCIsXFxuICAgICAgICAgICAgICAgIHJ1bGU6IGxhenlQYXJzZVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgbGV0IG15UGFyc2UgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL3BhZ2UvbXlQYXJzZVxcXCIpKS5ydWxlO1xcbiAgICAgICAgcGFnZXMucHVzaCh7XFxuICAgICAgICAgICAgbmFtZTogXFxcIuWGhee9ruino+aekFxcXCIsXFxuICAgICAgICAgICAgcGF0aDogXFxcIm15UGFyc2VcXFwiLFxcbiAgICAgICAgICAgIHJ1bGU6IG15UGFyc2VcXG4gICAgICAgIH0pXFxuXFxuICAgICAgICBzZWFyY2hGaW5kID0gXFxcImpzOlxcXCIgKyAkLnRvU3RyaW5nKGZ1bmN0aW9uKGNoYW5nZVVybCwgYXBwdHlwZSwgYXBwVXJsLCBhcHBVYSkge1xcbiAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdLFxcbiAgICAgICAgICAgICAgICBzZWFyY2hfdXJsID0gY2hhbmdlVXJsKE1ZX1VSTC5zcGxpdCgnIyMnKVsxXSksXFxuICAgICAgICAgICAgICAgIGJodG1sID0gXFxcIlxcXCI7XFxuXFxuICAgICAgICAgICAgYmh0bWwgPSBmZXRjaChzZWFyY2hfdXJsLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcblxcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGJodG1sID0gYmh0bWwuc3RhcnRzV2l0aCgnXFxcXHJcXFxcbicpID8gYmh0bWwucmVwbGFjZSgnXFxcXHJcXFxcbicsICcnKSA6IGJodG1sO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICAgICAgaWYgKC9idHdhZi8udGVzdChiaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgYmh0bWwgPSBmZXRjaChzZWFyY2hfdXJsICsgJyZidHdhZicgKyBiaHRtbC5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFwiLylbMV0sIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGxldCBodG1sID0gSlNPTi5wYXJzZShiaHRtbCksXFxuICAgICAgICAgICAgICAgIGxpc3QgPSBbXTtcXG4gICAgICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcbiAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC5kYXRhO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoJ2FwaS5waHAvYXBwJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmxpc3Q7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKCd4Z2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC5kYXRhO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwuZGF0YS5saXN0O1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHsgdGl0bGUsIHBpYywgbmV4dGxpbms6IHVybCwgc3RhdGU6IGRlc2MgfSA9IGxpc3RbaV07XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpIHx8IGFwcFVybC5pbmNsdWRlcygneGdhcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB7IHZvZF9uYW1lOiB0aXRsZSwgdm9kX3BpYzogcGljLCB2b2RfcmVtYXJrczogZGVzYyB9ID0gbGlzdFtpXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gYXBwVXJsICsgJ3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB7IHZvZF9uYW1lOiB0aXRsZSwgdm9kX3BpYzogcGljLCB2b2RfcmVtYXJrczogZGVzYyB9ID0gbGlzdFtpXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGFwcFVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGFwcFVybCArICcvZGV0YWlsSUQ/dm9kX2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gYXBwVXJsICsgJy9kZXRhaWw/dm9kX2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBwaWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChcXFwiI2ltbWVyc2l2ZVRoZW1lI2hpa2VyOi8vZW1wdHkjI1xcXCIgKyB1cmwpLnJ1bGUoKGFwcHR5cGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dm1vdmxpc3QnKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwbW92bGlzdCcpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LCBhcHB0eXBlKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgc2V0UmVzdWx0KGl0ZW1zKTtcXG4gICAgICAgIH0sIGNoYW5nZVVybCwgYXBwdHlwZSwgYXBwVXJsLCBhcHBVYSlcXG5cXG4gICAgICAgIGxhc3RfY2hhcHRlcl9ydWxlID0gXFxcImpzOlxcXCIgKyAkLnRvU3RyaW5nKGZ1bmN0aW9uKGFwcHR5cGUsIGFwcFVybCwgYXBwVWEpIHtcXG4gICAgICAgICAgICBsZXQgY2hwID0gW107XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgbGV0IGNvbnRzID0gW10sXFxuICAgICAgICAgICAgICAgICAgICBodG1sID0gSlNPTi5wYXJzZShmZXRjaChNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV0sIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSkpO1xcbiAgICAgICAgICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBPYmplY3Qua2V5cyhodG1sLnZpZGVvbGlzdCk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJhcGkucGhwL2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfdXJsX3dpdGhfcGxheWVyO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfcGxheV91cmwuc3BsaXQoJyQkJCcpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX2luZm8udm9kX3VybF93aXRoX3BsYXllcjtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX2luZm8udm9kX3BsYXlfdXJsLnNwbGl0KCckJCQnKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X2xpc3Q7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdCgnJCQkJyk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBbXTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb250cy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC/npZ7pqax8VFYvLnRlc3QoYXBwdHlwZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC52aWRlb2xpc3RbY29udHNbaV1dO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb250c1tpXS51cmxzKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2ldLnVybHM7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvbnRzW2ldLnVybCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBjb250c1tpXS51cmwuc3BsaXQoXFxcIiNcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2ldLnNwbGl0KFxcXCIjXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBjaHAucHVzaChsaXN0Lmxlbmd0aCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgIHNldFJlc3VsdCgn5pu05paw6IezOicgKyAoTWF0aC5tYXguYXBwbHkoTWF0aCwgY2hwKSkpO1xcbiAgICAgICAgfSwgYXBwdHlwZSwgYXBwVXJsLCBhcHBVYSk7XFxuXFxuICAgICAgICBydWxlcy5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogYXBwdGl0bGUsXFxuICAgICAgICAgICAgYXV0aG9yOiBnZXRNeVZhcigncmVtb3RlVXJsJyksXFxuICAgICAgICAgICAgdHlwZTogYXBwdHlwZSxcXG4gICAgICAgICAgICB1cmw6IGhvbWVfdXJsLFxcbiAgICAgICAgICAgIGZpbmRfcnVsZTogZmluZF9ydWxlLFxcbiAgICAgICAgICAgIHNlYXJjaF91cmw6IHNlYXJjaF91cmwsXFxuICAgICAgICAgICAgc2VhcmNoRmluZDogc2VhcmNoRmluZCxcXG4gICAgICAgICAgICBwYWdlczogSlNPTi5zdHJpbmd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Lm0zdTgvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIC8vYWVz6Kej5a+GXFxuICAgIGZ1bmN0aW9uIERlKGRhdGEsIHRva2VuX2tleSwgdG9rZW5faXYpIHtcXG4gICAgICAgIGV2YWwoZ2V0Q3J5cHRvSlMoKSk7XFxuICAgICAgICB2YXIga2V5ID0gQ3J5cHRvSlMuZW5jLlV0ZjgucGFyc2UodG9rZW5fa2V5KTtcXG4gICAgICAgIHZhciBpdiA9IENyeXB0b0pTLmVuYy5VdGY4LnBhcnNlKHRva2VuX2l2KTtcXG4gICAgICAgIHJldHVybiBDcnlwdG9KUy5BRVMuZGVjcnlwdChkYXRhLCBrZXksIHtcXG4gICAgICAgICAgICBpdjogaXYsXFxuICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5DQkMsXFxuICAgICAgICAgICAgcGFkZGluZzogQ3J5cHRvSlMucGFkLlBrY3M3XFxuICAgICAgICB9KS50b1N0cmluZyhDcnlwdG9KUy5lbmMuVXRmOCk7XFxuICAgIH07XFxuICAgIGlmICh2bGluay5pbmNsdWRlcygnbTN1OC5jYWNoZS5zdW95by5jYycpKSB7XFxuICAgICAgICBsZXQgdXJsID0gSlNPTi5wYXJzZShmZXRjaCgnaHR0cHM6Ly9qaHBjLm1hbmR1aHUuY29tL2R1b2R1by9hcGkucGhwJywgeyBib2R5OiAndXJsPScgKyB2bGluaywgbWV0aG9kOiAnUE9TVCcgfSkpLnVybDtcXG4gICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChEZSh1cmwsIG1kNSgnclhqV3ZYbDYnKSwgJ05YYkhvV0picHNFT2luOGInKSk7XFxuICAgIH0g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ZSA9IHYuY29sX3R5cGUgfHwgTVlfUlVMRS5jb2xfdHlwZVxcblxcbiAgICAgICAgICAgIGlmICghdi51cmwgfHwgWydydWxlJywgJ3BpY3MnLCAndG9hc3QnLCAnaW5wdXQnLCAnY29weScsICdlZGl0RmlsZScsICd4NScsICd4NVdlYlZpZXcnLCAneDVQbGF5JywgJ3dlYicsICdzZWxlY3QnLCAneDVSdWxlJywgJ3dlYlJ1bGUnLCAnZG93bmxvYWQnLCAnc2hhcmUnXS5maW5kKCh2dikgPT4gdi51cmwuc3RhcnRzV2l0aCh2diArICc6Ly8nKSkgfHwgWyd4NV93ZWJ2aWV3X3NpbmdsZScsICdpbnB1dCddLmZpbmQoKHZ2KSA9PiB2LmNvbF90eXBlID09IHZ2KSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodi51cmwuaW5jbHVkZXMoJ0BydWxlPScpKSB7XFxuICAgICAgICAgICAgICAgIGxldCBbXywgdXJsLCBydWxlXSA9IHYudXJsLm1hdGNoKC9eKFtcXFxcc1xcXFxTXSo/KUBydWxlPShbXFxcXHNcXFxcU10qKSQvKVxcbiAgICAgICAgICAgICAgICB2LnVybCA9IHVybFxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0gcnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBNWV9SVUxFLmNvbF90eXBlXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHYudXJsLmluY2x1ZGVzKCdydWxlPScpIHx8ICh2LmV4dHJhIHx8IHt9KS5ydWxlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICAgICAgbGV0IFtfLCBwYXRoLCBmbGFnLCBwYXJhbXNd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gcGFyc2VEb21Gb3JBcnJheShnZXRSZXNDb2RlKCksIGZpbmRSdWxlLnNoaWZ0KCkpLmZvckVhY2goKGRhdGEpID0+IHtcXG4gICAgICAgIGxldCBbdGl0bGUsIGltZywgZGVzYywgdXJsXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHYgPT0gJyonKSByZXR1cm4gJydcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICByZXMgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSwgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogTVlfUlVMRS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxuICAgICAgICAgICAgaWYgKHJlcy51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHJlcy51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcbmlmKE1ZX1JVTEUpT2JqZWN0LmFzc2lnbihNWV9SVUxFLCAnICsgYXNzaWduTGF6eVJ1bGUgKyAnKTsnICsgcmVzLnVybC5zbGljZShyZUluZGV4ICsgNClcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IE9iamVjdC5hc3NpZ24oZ2VuTXlSdWxlKCksIHsgZGV0YWlsX2ZpbmRfcnVsZTogZGV0YWlsRmluZFJ1bGUgfSksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGdlbk15UnVsZSgpLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBteUNvbGxlY3Rpb25fZWwucHVzaChyZXMpXFxuICAgIH0pXFxuICAgIHNldFJlc3VsdChteUNvbGxlY3R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Cc4oCd4oCdJyArIG5hbWUuZm9udGNvbG9yKHRoaXMuY29sb3IpLmJvbGQoKSA6IG5hbWUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogc2VsZWN0ZWQgPT0gbm93ID8gJ2hpa2VyOi8vZW1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGVsLnB1c2goeyBjb2xfdHlwZTogdGhpcy5ib3VuZGFyeSB9KVxcXFxuICAgICAgICB9KVxcXFxuICAgIH0sXFxcXG4gICAgaW5pdChjbGFzc09iamVjdCkge1xcXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPT0gJ3N0cmluZycpXFxcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfdXJsID09ICdzdHJpbmcnKVxcXFxuICAgICAgICAgICAgY2xhc3NPYmplY3QuY2xhc3NfdXJsID0gY2xhc3NPYmplY3QuY2xhc3NfdXJsLnNwbGl0KCcmJykubWFwKCh2KSA9PiB2LnRyaW0oKSlcXF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Wxlcy9saWJzLycgKyBtZDUodXJsKSArICcuanMnXFxcXG4gICAgICAgIGVsc2UgaWYodXJsLnN0YXJ0c1dpdGgoJ2hpa2VyOi8vcGFnZS8nKSkgdXJsID0gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgIGlmIChpbnB1dCA9PSAn5aSH5Lu9JykgcmV0dXJuICQoJ2hpa2VyOi8vZmlsZXMvdG1wLycgKyBRSU5HX1RJVExFICsgJ19iYWNrdXAuanNvbicsICfovpPlhaXlpIfku73ot6/lvoQnKVxcXFxuICAgICAgICAgICAgLmlucHV0KCh1cmwsIHVwZGF0ZUludGVydmFsLCBuZXdXaW5kb3csIHRhYkZvbGQsIGRpc2FibGVDdXN0b20pID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSByZXF1ZXN0KHVybCksXFxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGEgPSByZWFkRmlsZSgnY3VzdG9tRGF0YScpXFxcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGlucHV0LCBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUludGVydmFsOiB1cGRhdGVJbnRlcnZhbCxcXFxcbiAgICAgICAgICAgICAgICAgICAgbmV3V2luZG93OiBuZXdXaW5kb3csXFxcXG4gICAgICAgICAgICAgICAgICAgIHRhYkZvbGQ6IHRhYkZvbGQsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVDdXN0b206IGRpc2FibGVDdXN0b20sXFxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGE6IGN1c3RvbURhdGEsXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzOiBydWxlc1xcXFxuICAgICAgICAgICAgICAgIH0pKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LlpIfku73vvIzms6jmhI/oi6Xku5PlupPkuLrlrZDpobXpnaLliJnkuI3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gICBicmVha1xcXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcXFxuICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXFxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXFxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXFxcbiAgICAgICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxcXG4gICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXFxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxcXG4gICAgICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZXNbaV0uaWNvblxcXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgICAgICBjYXNlICflr7zlhaXmtbfpmJQnOlxcXFxuICAgICAgICAgICAgZC51cmwgPSAncnVsZTovLycgKyBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoZGF0YVtpXSkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgIH1cXFxcbiAgICBlbC5wdXNoKGQpXFxcXG59KVxcXFxuc2V0UmVzdWx0KGVsKVxcXC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mxvYWQobXlDb2xsZWN0aW9uX2VsKVxcXFxuICAgICAgICBpZiAoUlVMRS5zZWFyY2hfdXJsKSBteUNvbGxlY3Rpb25fZWwucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLmkJzntKJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGRlc2M6IFxcXFxcXFwi5pCc5L2g5oOz6KaB55qELi4uXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICB1cmw6ICdcXFxcXFxcImhpa2VyOi8vc2VhcmNoP3M9XFxcXFxcXCIraW5wdXQnLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICBydWxlczogJC50b1N0cmluZygoUUlOR19USVRMRSwgdGl0bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZGF0YUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRSkoKVxcXFxuICAgICAgICAgICAgICAgICAgICBydWxlcyA9IFtydWxlcy5maW5kKCh2KSA9PiB2LnRpdGxlID09IHRpdGxlKV1cXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHJ1bGVzKVxcXFxuICAgICAgICAgICAgICAgIH0sIFFJTkdfVElUTEUsIFJVTEUudGl0bGUpLFxcXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ3NlYXJjaEtleScsICcnKSxcXFxcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcXFxcXCJwdXRNeVZhcignc2VhcmNoS2V5JyxpbnB1dClcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImlucHV0XFxcXFxcXCIsXFxcXG4gICAgICAgIH0pXFxcXG4gICAgfVxcXFxuICAgIC8vIOWkhOeQhk1Z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ICAgICAgICAgICAgc3ViUGFnZSA9IE1ZX1JVTEUucGFnZUxpc3QuZmluZCgodikgPT4gdi5wYXRoID09IHBhdGgpLFxcXFxuICAgICAgICAgICAgICAgICAgICBzdWJVcmwgPSAocGFyYW1zIHx8ICcnKS5zcGxpdCgnJicpLmZpbmQoKHYpID0+IHYuc3RhcnRzV2l0aCgndXJsPScpKVxcXFxuICAgICAgICAgICAgICAgIHYudXJsID0gc3ViVXJsID8gc3ViVXJsLnNsaWNlKDQpLnJlcGxhY2UoL++8n++8ny9nLCAnPycpLnJlcGxhY2UoL++8hu+8hi9nLCAnJicpIDogKHYuZXh0cmEgfHwge30pLnVybCB8fCAnaGlrZXI6Ly9lbXB0eScgKyBmbGFnICsgJz8nICsgKHBhcmFtcyB8fCAnJylcXFxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0gc3ViUGFnZS5ydWxlXFxcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2NvbF90eXBlID0gc3ViUGFnZS5jb2xfdHlwZVxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSB2LnVybC5pbmRleE9mKCcuanM6JylcXFxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSB2LnVybCA9IHYudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHYudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzSW5kZXgpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoIU1ZX1JVTEUuZGV0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XQoJzsnKVxcXFxuICAgIHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCBmaW5kUnVsZS5zaGlmdCgpKS5mb3JFYWNoKChkYXRhKSA9PiB7XFxcXG4gICAgICAgIGxldCBbdGl0bGUsIGltZywgZGVzYywgdXJsXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2ID09ICcqJykgcmV0dXJuICcnXFxcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbShkYXRhLCB2KSA6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxcXG4gICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgIHJlcyA9IHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBNWV9SVUxFLmNvbF90eXBlXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxcXG4gICAgICAgICAgICBpZiAocmVzLnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IE9iamVjdC5hc3NpZ24oZ2VuTXlSdWxlKCksIHsgZGV0YWlsX2ZpbmRfcnVsZTogZGV0YWlsRmluZFJ1bGUgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXFxcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogZ2VuTXlSdWxlKCksXFxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcXFxuICAgICAgICAgICA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+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcXFxuICAgICAgICAgICAgZmluZF9ydWxlID0gXFxcXFxcXCJqczpcXFxcXFxcIiArICQudG9TdHJpbmcoZnVuY3Rpb24oYXBwVXJsLCBhcHBVYSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdO1xcXFxuICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlSnNvbiA9IEpTT04ucGFyc2UoZmV0Y2goYXBwVXJsICsgXFxcXFxcXCI/YWM9ZmxpdHRlclxcXFxcXFwiKSwgeyBoZWFkZXJzOiB7IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBhcHBVYSB9IH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQga2V5IGluIHR5cGVKc29uKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImZsZXhfYnV0dG9uXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChcXFxcXFxcImhpa2VyOi8vZW1wdHkjI1xcXFxcXFwiICsgYXBwVXJsICsgXFxcXFxcXCI/YWM9bGlzdCZwYWdlPWZ5cGFnZSZjbGFzcz1cXFxcXFxcIiArIGtleSkucnVsZSgodHlwZUpzb24sIGFwcFVhKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaXN0ZW5lcihcXFxcXFxcIm9uQ2xvc2VcXFxcXFxcIiwgXFxcXFxcXCJjbGVhclZhcignZmlsdGVyJylcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSBbXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzID0ge30sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlrZXlzID0gW10sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyID0ge30sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBcXFxcXFxcIiNGQTcyOThcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGluZGV4IGluIHR5cGVKc29uKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVKc29uW2luZGV4XS52YWx1ZXMubGVuZ3RoID09IDEpIGNvbnRpbnVlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSB0eXBlSnNvbltpbmRleF0uZmllbGQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlck5hbWUgPSBcXFxcXFxcIuWFqOmDqFxcXFxcXFwiICsgdHlwZUpzb25baW5kZXhdLm5hbWU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlrZXlzLnB1c2goa2V5KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzW1xcXFxcXFwiZlxcXFxcXFwiICsga2V5XSA9IFxcXFxcXFwiXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyW1xcXFxcXFwiZlxcXFxcXFwiICsga2V5XSA9IFtmaWx0ZXJOYW1lXS5jb25jYXQodHlwZUpzb25baW5kZXhdLnZhbHVlcyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWdldFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiLCBcXFxcXFxcIlxcXFxcXFwiKSkgeyBwdXRWYXIoXFxcXFxcXCJmaWx0ZXJcXFxcXFxcIiwgSlNPTi5zdHJpbmdpZnkoa2V5cykpIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZW1wID0gSlNPTi5wYXJzZShnZXRWYXIoXFxcXFxcXCJmaWx0ZXJcXFxcXFxcIikpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0ZW0gaW4gZmlsdGVyKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGluZGV4ID0gMDsgaW5kZXggPCBmaWx0ZXJbaXRlbV0ubGVuZ3RoOyBpbmRleCsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGVtcFtpdGVtXSA9PSBcXFxcXFxcIlxcXFxcXFwiID8gKGluZGV4ID09PSAwID8gXFxcXFxcXCLigJzigJzigJ3igJ1cXFxcXFxcIiArIGZpbHRlcltpdGVtXVswXS5ib2xkKCkuZm9udGNvbG9yKGNvbG9yKSA6IGZpbHRlcltpdGVtXVtpbmRleF0pIDogKHRlbXBbaXRlbV0gPT0gZmlsdGVyW2l0ZW1dW2luZGV4XSA/IFxcXFxcXFwi4oCc4oCc4oCd4oCdXFxcXFxcXCIgKyBmaWx0ZXJbaXRlbV1baW5kZXhdLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogZmlsdGVyW2l0ZW1dW2luZGV4XSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwic2Nyb2xsX2J1dHRvblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChkZXMsIG5hbWUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBbbmFtZV0gPSBkZXMuaW5kZXhPZihcXFxcXFxcIuWFqOmDqFxcXFxcXFwiKSAhPSAtMSA/IFxcXFxcXFwiXFxcXFxcXCIgOiBkZXM7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeSh0ZW1wKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmlsdGVyW2l0ZW1dW2luZGV4XSwgaXRlbSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7IGNvbF90eXBlOiBcXFxcXFxcImJsYW5rX2Jsb2NrXFxcXFxcXCIgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KFxcXFxcXFwiIyNcXFxcXFxcIilbMV0gKyBcXFxcXFxcIiZcXFxcXFxcIiArIHR5a2V5cy5tYXAoY3VyID0+IGN1ciArIFxcXFxcXFwiPWZcXFxcXFxcIiArIGN1cikuam9pbihcXFxcXFxcIiZcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdGVtIGluIHRlbXApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwucmVwbGFjZShpdGVtLCB0ZW1wW2l0ZW1dKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXNjb2RlID0gZmV0Y2godXJsLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2NvZGUgPSBmZXRjaCh1cmwgKyAnJmJ0d2FmJyArIHJlc2NvZGUubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcXFxcXFxcXFwiLylbMV0sIHsgaGVhZGVyczogeyBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogYXBwVWEgfSB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gSlNPTi5wYXJzZShyZXNjb2RlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvdHZsaXN0ZGF0YScpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLop4bpopHliJfooajlh7rplJk6XFxcXFxcXCIgKyBlLm1lc3NhZ2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGl0ZW1zKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdHlwZUpzb25ba2V5XSwgYXBwVWEpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi6aaW6aG15YiG57G75Ye66ZSZOlxcXFxcXFwiICsgZS5tZXNzYWdlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KCcjIycpWzFdLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCA9IEpTT04ucGFyc2UoZmV0Y2godXJsKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3R2bGlzdGRhdGEnKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLpppbpobXmjqjojZDlh7rplJk6XFxcXFxcXCIgKyBlLm1lc3NhZ2UpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBzZXRSZXN1bHQoaXRlbXMpO1xcXFxuICAgICAgICAgICAgfSwgYXBwVXJsLCBhcHBVYSlcXFxcbiAgICAgICAgICAgIGxldCBydWxlX3R2bGlzdGRhdGEgPSAkLnRvU3RyaW5nKGZ1bmN0aW9uKCkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBsaXN0ID0gaHRtbC5kYXRhO1xcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgeyB0aXRsZSwgcGljLCBuZXh0bGluaywgc3RhdGUgfSA9IGxpc3RbaV07XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBuZXh0bGluay5zdGFydHNXaXRoKCdodHRwJykgPyBuZXh0bGluayA6IGFwcFVybCArICc/YWM9ZGV0YWlsJmlkcz0nICsgbmV4dGxpbms7XFxcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogcGljICsgJ0BSZWZlcmVyPScsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBzdGF0ZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfM19tYXJxdWVlJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChcXFxcXFxcIiNpbW1lcnNpdmVUaGVtZSNoaWtlcjovL2VtcHR5IyNcXFxcXFxcIiArIHVybCkucnVsZSgoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvdHZtb3ZsaXN0JykpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi5b2x54mH6K+m5oOF5Ye66ZSZOlxcXFxcXFwiICsgZS5tZXNzYWdlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KFtdKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIGxldCBydWxlX3R2bW92bGlzdCA9ICQudG9TdHJpbmcoZnVuY3Rpb24oYXBwVXJsLCBhcHBVYSkge1xcXFxuICAgICAgICAgICAgICAgIGFkZExpc3RlbmVyKFxcXFxcXFwib25DbG9zZVxcXFxcXFwiLCAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJWYXIoJ25vdycpO1xcXFxuICAgICAgICAgICAgICAgICAgICBjbGVhclZhcih1cmwpO1xcXFxuICAgICAgICAgICAgICAgIH0sIE1ZX1VSTCkpO1xcXFxuICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdLFxcXFxuICAgICAgICAgICAgICAgICAgICBodG1sID0gZ2V0VmFyKE1ZX1VSTCwgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgLy9kb21pbiA9IE1ZX1VSTC5zcGxpdChcXFxcXFxcIiMjXFxcXFxcXCIpWzFdLm1hdGNoKC8oW1xcXFxcXFxcU10qPzpcXFxcXFxcXC9cXFxcXFxcXC9bXFxcXFxcXFxTXSo/KVxcXFxcXFxcLy8pWzFdO1xcXFxuICAgICAgICAgICAgICAgIGlmIChodG1sID09IFxcXFxcXFwiXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKE1ZX1VSTC5zcGxpdChcXFxcXFxcIiMjXFxcXFxcXCIpWzFdLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9VUkwsIGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBodG1sID0gSlNPTi5wYXJzZShodG1sKTtcXFxcblxcXFxuICAgICAgICAgICAgICAgIC8v566A5LuLXFxcXG4gICAgICAgICAgICAgICAgbGV0IHsgdGl0bGUsIHB1YnRpbWUsIHRydW5rLCBhcmVhLCB0eXBlLCBkaXJlY3RvciwgYWN0b3IsIGltZ191cmwsIGludHJ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3tcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZGVzYyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCdcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1dKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgaW50cm8pLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAvL+aWreaPklxcXFxuICAgICAgICAgICAgICAgIGxldCBkbmVuID0gZ2V0TXlWYXIoXFxcXFxcXCJkbmVuXFxcXFxcXCIsIFxcXFxcXFwiMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmlq3mj5I6JyArIChkbmVuID09ICcxJyA/ICfigJzigJzinIXigJ3igJ0nIDogJ+KdjicpLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKChkbmVuKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG5lbiA9PSAnMScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcImRuZW5cXFxcXFxcIiwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey56aB55So5pat5o+S6LCD55SoISc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwiZG5lblxcXFxcXFwiLCBcXFxcXFxcIjFcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LlvIDlkK/mlq3mj5LosIPnlKghJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9LCBkbmVuKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInXFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn57q/6Lev6YWN572uJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5I0BydWxlPWpzOnRoaXMuZD1bXTtyZXF1aXJlKCdodHRwczovL2dpdGVhLmNvbS9BSTk1Ny9IaWtlci9yYXcvbS92L1JvdXRlLmpzJyk7Um91dGUuc2V0UGFyc2UoKTtzZXRSZXN1bHQoZCk7XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOlxcXFxcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeiuvue9riNub1JlY29yZEhpc3RvcnkjXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8yJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIC8v57q/6Lev5YiX6KGoXFxcXG4gICAgICAgICAgICAgICAgbGV0IHRhYnMgPSBPYmplY3Qua2V5cyhodG1sLnZpZGVvbGlzdCk7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGdldFZhcihcXFxcXFxcIm5vd1x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Ly/liIfmjaLmiJDlip8hJ1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAvL+inhumikeWIl+ihqFxcXFxuICAgICAgICAgICAgICAgIGxldCBwdGFiID0gZ2V0VmFyKFxcXFxcXFwibm93XFxcXFxcXCIpLFxcXFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC52aWRlb2xpc3RbcHRhYl07XFxcXG4gICAgICAgICAgICAgICAgbG9nKCflvZPliY3nur/ot686JyArIHB0YWIpO1xcXFxuICAgICAgICAgICAgICAgIGlmIChnZXRWYXIoJ2FwcG10dnNvcnQnLCAnMScpID09ICcwJykge1xcXFxuICAgICAgICAgICAgICAgICAgICBsaXN0LnJldmVyc2UoKTtcXFxcbiAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgbGlzdC5sZW5ndGg7IGorKykge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgc3JjdXJsID0gbGlzdFtqXS51cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvMjkzangxLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyY3VybCA9IHNyY3VybC5yZXBsYWNlKCcyOTNqeDEnLCAnangnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvOGQ4cXxkaWxpa3R2fGhhb2thbmp1MXxjenR2fGZpdFxcXFxcXFxcOjh8cHB6aHUvLnRlc3QoYXBwVXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgc3JjdXJsID0gc3JjdXJsICsgJyZhcHA9MTAwMDAmYWNjb3VudD0yNzI3NzUwMjgmcGFzc3dvcmQ9cXEyNzI3NzUwMjgnO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGxpc3Rbal0udGl0bGU7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vdGl0bGUgPSB0aXRsZS5tYXRjaCgvKOesrHxcXFxcXFxcXGR8LSkqKOmbhnzor5185pyfKS9nKSA/IHRpdGxlLnJlcGxhY2UoL+esrHzpm4Z86K+dfOacny9nLCAnJykgOiB0aXRsZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2xhenlQYXJzZVxcXFxcXFwiKSkucnVsZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxcXG4gICAgICAgICAgICB9LCBhcHBVcmwsIGFwcFVhKTtcXFxcbiAgICAgICAgICAgIGxldCBsYXp5UGFyc2UgPSAkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBzcmN1cmw7XFxcXG4gICAgICAgICAgICAgICAgaWYgKC8odXJsfHZpZHx2KVxcXFxcXFxcPS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZsaW5rID0gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuc2VhcmNoKC8odXJsfHZpZHx2KVxcXFxcXFxcPS8pKS5zcGxpdCgnPScpWzFdLnNwbGl0KCcmJylbMF07XFxcXG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UodmxpbmspO1xcXFxuICAgICAgICAgICAgICAgICAgICB9LCB2bGluaylcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIikubGF6eVJ1bGUoKHB0YWIsIHNyY3VybCwgYXBwVXJsKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLkvb/nlKjpu5jorqTop6PmnpAs6KeG6aKR6ZO+5o6lOlxcXFxcXFwiICsgc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB5byA5aeLXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjaGFuZ2VWaWRlb1VybCh1cmwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+aUueWPmOeJueWumuWcsOWdgOeahFJlZmVyZXJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsLmluY2x1ZGVzKFxcXFxcXFwid2tmaWxlXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vfSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdiaWxpYmlsaScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdtZ3R2Jykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQHd3dy5tZ3R2LmNvbSYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsLmluY2x1ZGVzKFxcXFxcXFwib2pia1xcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v6L+U5Zue6KeG6aKR6ZO+5o6lXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF1cmwuaW5jbHVkZXMoXFxcXFxcXCJodHRwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIumTvuaOpeS4jeaYr+S7pWh0dHDlvIDlpLQo5Y+v6IO95Yqg5a+G5LqGKVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcLm0zdTgvLnRlc3QodXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhY2hlTTN1OCh1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDR8b2JqXFxcXFxcXFwvdG9zfG5ldGVhc2VcXFxcXFxcXC5jb20vLnRlc3Qoc3JjdXJsKSAmJiAvaHR0cC8udGVzdChzcmN1cmwpICYmICEvXFxcXFxcXFwuaHRtbC8udGVzdChzcmN1cmwpICYmICEvKHVybHx2fHZpZClcXFxcXFxcXD0vLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIS9mZW5cXFxcXFxcXC5sYW9kaXxydWlmZW5nbGJ8c3VveW9cXFxcXFxcXC5jYy8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLmo4DmtYvliLDotYTmupDlnLDlnYDlj6/og73mmK/op4bpopHpk77mjqVcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9Vcmwoc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLy0tLS3liIblibLnur8tLS0tLy9cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2NvZGUgPSBKU09OLnBhcnNlKGZldGNoKHNyY3VybCwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogTU9CSUxFX1VBXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ov5Tlm57ph43lrprlkJHnmoTpk77mjqUgXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMicgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAxJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVkdXJsID0gc2NvZGUuaGVhZGVycy5sb2NhdGlvblswXS5yZXBsYWNlKC9cXFxcXFxcXFxcXFxcXFxcL2csICcnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfph43lrprlkJE6JyArIHJlZHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghLyh1cmx8dmlkfHYpXFxcXFxcXFw9Ly50ZXN0KHJlZHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChyZWR1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qZWxzZSBpZiAoL1xcXFxcXFxcPWh0dHAvLnRlc3QocmVkdXJsKSAmJiAvXFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDR8XFxcXFxcXFwuZmx2Ly50ZXN0KHJlZHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1cmwgPSByZWR1cmwuc3Vic3RyaW5nKHJlZHVybC5pbmRleE9mKCc9aHR0cCcpICsgMSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0qL1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29kZS5ib2R5ID0gZmV0Y2gocmVkdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lvIDlp4vll4XmjqJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHNjb2RlLmJvZHk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXri8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCI0MDTkuoZcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXFxcXFw8Ym9keS8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChbXFxcXFxcXCLlvIDlp4vop4bpopHll4XmjqJcXFxcXFxcIiwgXFxcXFxcXCLmiZPlvIDop6PmnpDnvZHpobVcXFxcXFxcIiwgXFxcXFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFxcXFxcIl0sIDEsIFxcXFxcXFwi5qOA5rWL5Yiw6Kej5p6Q5Li6572R6aG15pWw5o2uXFxcXFxcXCIpLnNlbGVjdCgocHRhYiwgc3JjdXJsLCBhcHBVcmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFxcXFxcIuW8gOWni+inhumikeWXheaOolxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZUNhY2hlKCdodHRwczovL2NvZGUuYWxpeXVuLmNvbS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9tYXN0ZXIveDVydWxlLmpzJywgMjQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4NXJ1bGUoc3JjdXJsLCBzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSBcXFxcXFxcIuaJk+W8gOino+aekOe9kemhtVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwid2ViOi8vXFxcXFxcXCIgKyBzcmN1cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09IFxcXFxcXFwi5L2/55So5YaF572u6Kej5p6QXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBzcmN1cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC8odXJsfHZpZHx2KVxcXFxcXFxcPS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZsaW5rID0gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuc2VhcmNoKC8odXJsfHZpZHx2KVxcXFxcXFxcPS8pKS5zcGxpdCgnPScpWzFdLnNwbGl0KCcmJylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIuS9v+eUqOWGhee9ruino+aekCzop4bpopHpk77mjqU6XFxcXFxcXCIgKyB2bGluayk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcXFxcXCLmraPlnKjov5vooYzop6PmnpAuLi5cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFxcXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgcHRhYiwgc3JjdXJsLCBhcHBVcmwpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coJ+WwneivleS7jmpzb27mlbDmja7ojrflj5YnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdXJsID0gSlNPTi5wYXJzZShodG1sKS51cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qbGV0IHB1cmwgPSBodG1sLm1hdGNoKC9bXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl11cmxbXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl06Lio/W1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJdKC4qPylbXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0vKVsxXS5yZXBsYWNlKC9cXFxcXFxcXFxcXFxcXFxcL2csICcnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChwdXJsKTsqL1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCfop6PmnpDlj6/og73liqDlr4bkuoYnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+acquiDveaIkOWKn+iOt+WPluinhumikeWcsOWdgDonICsgZS5tZXNzYWdlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBzcmN1cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC8odXJsfHZpZHx2KVxcXFxcXFxcPS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZsaW5rID0gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuc2VhcmNoKC8odXJsfHZpZHx2KVxcXFxcXFxcPS8pKS5zcGxpdCgnPScpWzFdLnNwbGl0KCcmJylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIuWwneivleS9v+eUqOWGhee9ruino+aekCzop4bpopHpk77mjqU6XFxcXFxcXCIgKyB2bGluayk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFxcXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB57uT5p2fXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHB0YWIsIHNyY3VybCwgYXBwVXJsKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIHBhZ2VzLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXFxcXFwiVFbliJfooahcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBwYXRoOiBcXFxcXFxcInR2bGlzdGRhdGFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX3R2bGlzdGRhdGFcXFxcbiAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICBuYW1lOiBcXFxcXFxcIlRW6YCJ6ZuGXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcXFxcXCJ0dm1vdmxpc3RcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX3R2bW92bGlzdFxcXFxuICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXFxcXFwi6KeG6aKR6Kej5p6QXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcXFxcXCJsYXp5UGFyc2VcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBydWxlOiBsYXp5UGFyc2VcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgZmluZF9ydWxlID0gXFxcXFxcXCJqczpcXFxcXFxcIiArICQudG9TdHJpbmcoZnVuY3Rpb24oY2hhbmdlVXJsLCBhcHBVcmwsIGFwcFVhKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGl0ZW1zID0gW107XFxcXG4gICAgICAgICAgICAgICAgLy/ojrflj5bliIbnsbvlhoXlrrlcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZUpzb24gPSBbXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFxcXFxcImFwaS5waHAvYXBwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZVVybCA9IGNoYW5nZVVybChhcHBVcmwgKyBcXFxcXFxcIm5hdj90b2tlbj1cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwY29kZSA9IHJlcXVlc3QodHlwZVVybCwgeyBoZWFkZXJzOiB7IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBhcHBVYSB9IH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGNvZGUuaW5kZXhPZign5qOA5rWL5LitJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBjb2RlID0gZmV0Y2godHlwZVVybCArICcmYnR3YWYnICsgdHlwY29kZS5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFxcXFxcXFxcXCIvKVsxXSwgeyBoZWFkZXJzOiB7IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBhcHBVYSB9IH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZUpzb24gPSBKU09OLnBhcnNlKHR5cGNvZGUpLmxpc3Q7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwieGdhcHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlVXJsID0gY2hhbmdlVXJsKGFwcFVybCArIFxcXFxcXFwibmF2P3Rva2VuPVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBjb2RlID0gcmVxdWVzdCh0eXBlVXJsLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGNvZGUgPSBmZXRjaCh0eXBlVXJsICsgJyZidHdhZicgKyB0eXBjb2RlLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXFxcXFxcXFxcIi8pWzFdLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlSnNvbiA9IEpTT04ucGFyc2UodHlwY29kZSkuZGF0YTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcXFxcXCIudm9kXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZVVybCA9IGNoYW5nZVVybChhcHBVcmwgKyBcXFxcXFxcIi90eXBlc1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBjb2RlID0gcmVxdWVzdCh0eXBlVXJsLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR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5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5dXJsID0gYXBwVXJsICsgJ3ZpZGVvP3RpZD0nICsgdHlwZUpzb25baV0udHlwZV9pZCArICcmcGFnZT1meXBhZ2UmdG9rZW49JicgKyB0eXBlVXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXVybCA9IGFwcFVybCArICd2aWRlbz90aWQ9JyArIHR5cGVKc29uW2ldLnR5cGVfaWQgKyAnJnBhZ2U9ZnlwYWdlJicgKyB0eXBlVXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcXFxcXCIudm9kXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdChhcHBVcmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5dXJsID0gYXBwVXJsICsgJy9saXN0P3R5cGU9JyArIHR5cGVKc29uW2ldLnR5cGVfaWQgKyAnJnBhZ2U9ZnlwYWdlJmJ5PWZieSZsaW1pdD05JicgKyB0eXBlVXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5dXJsID0gYXBwVXJsICsgJz90eXBlPScgKyB0eXBlSnNvbltpXS50eXBlX2lkICsgJyZwYWdlPWZ5cGFnZSZieT1mYnkmbGltaXQ9OSYnICsgdHlwZVVybDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+aehOW7uuWKqOaAgeWIhuexu1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHR5cGVKc29uW2ldLnR5cGVfbmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcXFxcXCJoaWtlcjovL2VtcHR5IyNcXFxcXFxcIiArIHR5dXJsKS5ydWxlKChhcHBVcmwsIHR5cGVfZXh0ZW5kLCBjaGFuZ2VVcmwsIGFwcFVhKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZExpc3RlbmVyKFxcXFxcXFwib25DbG9zZVxcXFxcXFwiLCBcXFxcXFxcImNsZWFyVmFyKCdmaWx0ZXInKVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1zID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHsgLy/liqjmgIHliIbnsbtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXlzID0ge30sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyID0ge30sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyTmFtZXMgPSB7IGNsYXNzOiBcXFxcXFxcIuexu+Wei1xcXFxcXFwiLCBhcmVhOiBcXFxcXFxcIuWcsOWMulxcXFxcXFwiLCBsYW5nOiBcXFxcXFxcIuivreiogFxcXFxcXFwiLCB5ZWFyOiBcXFxcXFxcIuW5tOS7vVxcXFxcXFwiLCBzdGFyOiBcXFxcXFxcIuaYjuaYn1xcXFxcXFwiLCBkaXJlY3RvcjogXFxcXFxcXCLlr7zmvJRcXFxcXFxcIiwgc3RhdGU6IFxcXFxcXFwi54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kgY29udGludWU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5c1tcXFxcXFxcImZcXFxcXFxcIiArIGtleV0gPSBcXFxcXFxcIlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXNbXFxcXFxcXCJmYnlcXFxcXFxcIl0gPSBcXFxcXFxcIlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaWx0ZXJOYW1lID0gXFxcXFxcXCLlhajpg6hcXFxcXFxcIiArIGZpbHRlck5hbWVzW2tleV07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyW1xcXFxcXFwiZlxcXFxcXFwiICsga2V5XSA9IFtmaWx0ZXJOYW1lXS5jb25jYXQodHlwZV9leHRlbmRba2V5XS5zcGxpdChcXFxcXFxcIixcXFxcXFxcIikpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmaWx0ZXJbXFxcXFxcXCJmXFxcXFxcXCIgKyBrZXldLmxlbmd0aCA9PSAyKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcltcXFxcXFxcImZcXFxcXFxcIiArIGtleV0gPSBkZWZhdWx0RmlsdGVyW1xcXFxcXFwiZlxcXFxcXFwiICsga2V5XVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZ2V0VmFyKFxcXFxcXFwiZmlsdGVyXFxcXFxcXCIsIFxcXFxcXFwiXFxcXFxcXCIpKSB7IHB1dFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShrZXlzKSkgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiKSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBcXFxcXFxcIiNGQTcyOThcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0ZW0gaW4gZmlsdGVyKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kZXggPSAwOyBpbmRleCA8IGZpbHRlcltpdGVtXS5sZW5ndGg7IGluZGV4KyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGVtcFtpdGVtXSA9PSBcXFxcXFxcIlxcXFxcXFwiID8gKGluZGV4ID09PSAwID8gXFxcXFxcXCLigJzigJzigJ3igJ1cXFxcXFxcIiArIGZpbHRlcltpdGVtXVswXS5ib2xkKCkuZm9udGNvbG9yKGNvbG9yKSA6IGZpbHRlcltpdGVtXVtpbmRleF0pIDogKHRlbXBbaXRlbV0gPT0gZmlsdGVyW2l0ZW1dW2luZGV4XSA/IFxcXFxcXFwi4oCc4oCc4oCd4oCdXFxcXFxcXCIgKyBmaWx0ZXJbaXRlbV1baW5kZXhdLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogZmlsdGVyW2l0ZW1dW2luZGV4XSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoZGVzLCBuYW1lKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcFtuYW1lXSA9IGRlcy5pbmRleE9mKFxcXFxcXFwi5YWo6YOoXFxcXFxcXCIpICE9IC0xID8gXFxcXFxcXCJcXFxcXFxcIiA6IGRlcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXFxcXFxcXCJmaWx0ZXJcXFxcXFxcIiwgSlNPTi5zdHJpbmdpZnkodGVtcCkpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGZpbHRlcltpdGVtXVtpbmRleF0sIGl0ZW0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goeyBjb2xfdHlwZTogXFxcXFxcXCJibGFua19ibG9ja1xcXFxcXFwiIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnkgPSB7IOm7mOiupOmhuuW6jzogXFxcXFxcXCJcXFxcXFxcIiwg5pyA5pawOiBcXFxcXFxcInRpbWVcXFxcXFxcIiwg5pyA54OtOiBcXFxcXFxcImhpdHNcXFxcXFxcIiwg6K+E5YiGOiBcXFxcXFxcInNjb3JlXFxcXFxcXCIgfTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5kZXhPZignYXBpLnBocC9hcHAnKSA9PSAtMSAmJiBhcHBVcmwuaW5kZXhPZigneGdhcHAnKSA9PSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0ZW0gaW4gYnkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGVtcFtcXFxcXFxcImZieVxcXFxcXFwiXSA9PSBieVtpdGVtXSA/IFxcXFxcXFwi4oCc4oCc4oCd4oCdXFxcXFxcXCIgKyBpdGVtLmJvbGQoKS5mb250Y29sb3IoY29sb3IpIDogaXRlbSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInNjcm9sbF9idXR0b25cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChkZXMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGVtcCA9IEpTT04ucGFyc2UoZ2V0VmFyKFxcXFxcXFwiZmlsdGVyXFxcXFxcXCIpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wW1xcXFxcXFwiZmJ5XFxcXFxcXCJdID0gZGVzO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeSh0ZW1wKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYnlbaXRlbV0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFxcXFxcImZpbHRlclxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IE1ZX1VSTC5zcGxpdChcXFxcXFxcIiMjXFxcXFxcXCIpWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdGVtIGluIHRlbXApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5yZXBsYWNlKGl0ZW0sIHRlbXBbaXRlbV0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IGNoYW5nZVVybCh1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzY29kZSA9IGZldGNoKHVybCwgeyBoZWFkZXJzOiB7IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBhcHBVYSB9IH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzY29kZSA9IGZldGNoKHVybCArICcmYnR3YWYnICsgcmVzY29kZS5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFxcXFxcXFxcXCIvKVsxXSwgeyBoZWFkZXJzOiB7IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBhcHBVYSB9IH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gSlNPTi5wYXJzZShyZXNjb2RlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcGxpc3RkYXRhJywge30pKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi6KeG6aKR5YiX6KGo5Ye66ZSZOlxcXFxcXFwiICsgZS5tZXNzYWdlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoaXRlbXMpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGFwcFVybCwgdHlwZUpzb25baV0udHlwZV9leHRlbmQsIGNoYW5nZVVybCwgYXBwVWEpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+mmlumhteWIhuexu+WHuumUmTonICsgZS5tZXNzYWdlKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgLy/ojrflj5bmjqjojZDop4bpopHliJfooahcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KCcjIycpWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSBjaGFuZ2VVcmwodXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KHVybCwgeyBoZWFkZXJzOiB7IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBhcHBVYSB9IH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaHRtbC5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKHVybCArICcmYnR3YWYnICsgaHRtbC5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFxcXFxcXFxcXCIvKVsxXSwgeyBoZWFkZXJzOiB7IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBhcHBVYSB9IH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBKU09OLnBhcnNlKGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBpbmRleGRhdGEnKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+mmlumhteaOqOiNkOWHuumUmTonICsgZS5tZXNzYWdlKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGl0ZW1zKTtcXFxcbiAgICAgICAgICAgIH0sIGNoYW5nZVVybCwgYXBwVXJsLCBhcHBVYSlcXFxcblxcXFxuICAgICAgICAgICAgbGV0IHJ1bGVfYXBwbGlzdGRhdGEgPSAkLnRvU3RyaW5nKGZ1bmN0aW9uKCkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBsaXN0ID0gW107XFxcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC5saXN0O1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKCd4Z2FwcCcpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGE7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcXFxcXCIudm9kXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGEubGlzdDtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHsgdm9kX25hbWUsIHZvZF9waWMsIHZvZF9pZCwgdm9kX3JlbWFya3MgfSA9IGxpc3RbaV07XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gXFxcXFxcXCJcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSB8fCBhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsgPSBhcHBVcmwgKyAndmlkZW9fZGV0YWlsP2lkPScgKyB2b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwiLnZvZFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGUgPSBuZXcgRGF0ZSgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluayA9IGFwcFVybCArICcvZGV0YWlsP3ZvZF9pZD0nICsgdm9kX2lkICsgJyZyZWxfbGltaXQ9MTAma2V5PScgKyAoZGF0ZS5nZXRNb250aCgpICsgMSkgKyAoZGF0ZS5nZXREYXRlKCkgPCAxMCA/ICcwJyArIGRhdGUuZ2V0RGF0ZSgpIDogZGF0ZS5nZXREYXRlKCkpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9O1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvaW9wZW55dW4vLnRlc3QoYXBwVXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluayA9IGFwcFVybCArICcvZGV0YWlsSUQ/dm9kX2lkPScgKyB2b2RfaWQgKyAnJnJlbF9saW1pdD0xMCc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB2b2RfbmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHZvZF9waWMgKyAnQFJlZmVyZXI9JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IHZvZF9yZW1hcmtzLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8zX21hcnF1ZWUnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXFxcXFwiI2ltbWVyc2l2ZVRoZW1lI2hpa2VyOi8vZW1wdHkjI1xcXFxcXFwiICsgbGluaykucnVsZSgoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwbW92bGlzdCcpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIuW9seeJh+ivpuaDheWHuumUmTpcXFxcXFxcIiArIGUubWVzc2FnZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbXSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGxldCBydWxlX2FwcGluZGV4ZGF0YSA9ICQudG9TdHJpbmcoZnVuY3Rpb24oKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBbXTtcXFxcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmxpc3Q7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwuZGF0YTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFxcXFxcIi52b2RcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwuZGF0YS5saXN0O1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdHMgPSBbXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVuYW1lID0gXFxcXFxcXCJcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSB8fCBhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RzID0gbGlzdFtpXS52bGlzdDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVuYW1lID0gbGlzdFtpXS50eXBlX25hbWU7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwiLnZvZFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdHMgPSBsaXN0W2ldLnZvZF9saXN0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZW5hbWUgPSBsaXN0W2ldLnZvZF90eXBlX25hbWU7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHR5cGVuYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGxpc3RzLmxlbmd0aDsgaisrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgeyB2b2RfbmFtZSwgdm9kX3BpYywgdm9kX2lkLCB2b2RfcmVtYXJrcyB9ID0gbGlzdHNbal07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IFxcXFxcXFwiXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpIHx8IGFwcFVybC5pbmNsdWRlcygneGdhcHAnKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsgPSBhcHBVcmwgKyAndmlkZW9fZGV0YWlsP2lkPScgKyB2b2RfaWQgKyAnJnRva2VuPSZrZXk9JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwiLnZvZFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRlID0gbmV3IERhdGUoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rID0gYXBwVXJsICsgJy9kZXRhaWw/dm9kX2lkPScgKyB2b2RfaWQgKyAnJnJlbF9saW1pdD0xMCZrZXk9JyArIChkYXRlLmdldE1vbnRoKCkgKyAxKSArIChkYXRlLmdldERhdGUoKSA8IDEwID8gJzAnICsgZGF0ZS5nZXREYXRlKCkgOiBkYXRlLmdldERhdGUoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGFwcFVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rID0gYXBwVXJsICsgJy9kZXRhaWxJRD92b2RfaWQ9JyArIHZvZF9pZCArICcmcmVsX2xpbWl0PTEwJztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHZvZF9uYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHZvZF9waWMgKyAnQFJlZmVyZXI9JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiB2b2RfcmVtYXJrcyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzNfbWFycXVlZScsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXFxcXFwiI2ltbWVyc2l2ZVRoZW1lI2hpa2VyOi8vZW1wdHkjI1xcXFxcXFwiICsgbGluaykucnVsZSgoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0JykpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLlvbHniYfor6bmg4Xlh7rplJk6XFxcXFxcXCIgKyBlLm1lc3NhZ2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KFtdKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICBsZXQgcnVsZV9hcHBtb3ZsaXN0ID0gJC50b1N0cmluZyhmdW5jdGlvbihjaGFuZ2VVcmwsIGFwcFVybCwgYXBwVWEpIHtcXFxcbiAgICAgICAgICAgICAgICBhZGRMaXN0ZW5lcihcXFxcXFxcIm9uQ2xvc2VcXFxcXFxcIiwgJC50b1N0cmluZygodXJsKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdhcHBub3cnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJWYXIodXJsKTtcXFxcbiAgICAgICAgICAgICAgICB9LCBNWV9VUkwpKTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSBbXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IGdldFZhcihNWV9VUkwsIFxcXFxcXFwiXFxcXFxcXCIpLFxcXFxuICAgICAgICAgICAgICAgICAgICBkYXRhID0ge307XFxcXG4gICAgICAgICAgICAgICAgaWYgKGh0bWwgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KFxcXFxcXFwiIyNcXFxcXFxcIilbMV07XFxcXG4gICAgICAgICAgICAgICAgICAgIHVybCA9IGNoYW5nZVVybCh1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2godXJsLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9VUkwsIGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwieGdhcHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UoaHRtbCkuZGF0YS52b2RfaW5mbztcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBkYXRhID0gSlNPTi5wYXJzZShodG1sKS5kYXRhO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgIC8v566A5LuLXFxcXG4gICAgICAgICAgICAgICAgbGV0IHsgdm9kX25hbWUsIHZvZF9waWMsIHZvZF9jb250ZW50LCB2b2RfY2xhc3MsIHZvZF9yZW1hcmtzLCB2b2RfZGlyZWN0b3IsIHZvZF9hY3Rvciwgdm9kX2FyZWEsIHZvZF9sYW5nLCB2b2RfeWVhciB9ID0gZGF0YTtcXFxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHZvZF9uYW1lICsgJ1xcXFxcXFxcbicgKyB2b2RfY2xhc3MgKyBcXFxcXFxcIixcXFxcXFxcIiArIHZvZF9yZW1hcmtzICsgXFxcXFxcXCJcXFxcXFxcXG5cXFxcXFxcIiArIHZvZF9hcmVhICsgXFxcXFxcXCIvXFxcXFxcXCIgKyB2b2RfbGFuZyArIFxcXFxcXFwiL1xcXFxcXFwiICsgdm9kX3llYXIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXFxcXFwi5a+85ryUOlxcXFxcXFwiICsgdm9kX2RpcmVjdG9yICsgXFxcXFxcXCJcXFxcXFxcXG7kuLvmvJQ6XFxcXFxcXCIgKyB2b2RfYWN0b3IsXFxcXG4gICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHZvZF9waWMsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV92ZXJ0aWNhbF9waWNfYmx1cidcXFxcbiAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Ymn5oOF566A5LuLOicsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IHZvZF9jb250ZW50LFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IycpLnJ1bGUoKGRlc2MpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkZXNjLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbG9uZ190ZXh0J1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfV0pO1xcXFxuICAgICAgICAgICAgICAgICAgICB9LCB2b2RfY29udGVudCksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIC8v5pat5o+SXFxcXG4gICAgICAgICAgICAgICAgbGV0IGRuZW4gPSBnZXRNeVZhcihcXFxcXFxcImRuZW5cXFxcXFxcIiwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aWreaPkjonICsgKGRuZW4gPT0gJzEnID8gJ+KAnOKAnOKcheKAneKAnScgOiAn4p2OJyksXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoZG5lbikgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRuZW4gPT0gJzEnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJkbmVuXFxcXFxcXCIsIFxcXFxcXFwiMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suemgeeUqOaWreaPkuiwg+eUqCEnO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcImRuZW5cXFxcXFxcIiwgXFxcXFxcXCIxXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5byA5ZCv5pat5o+S6LCD55SoISdcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgZG5lbiksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8yJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+e6v+i3r+mFjee9ricsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL2VtcHR5I25vUmVjb3JkSGlzdG9yeSNAcnVsZT1qczp0aGlzLmQ9W107cmVxdWlyZSgnaHR0cHM6Ly9naXRlYS5jb20vQUk5NTcvSGlrZXIvcmF3L20vdi9Sb3V0ZS5qcycpO1JvdXRlLnNldFBhcnNlKCk7c2V0UmVzdWx0KGQpO1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAvL3VybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU96K6+572uI25vUmVjb3JkSGlzdG9yeSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInXFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgLy/nur/ot6/liJfooahcXFxcblxcXFxuICAgICAgICAgICAgICAgIGxldCBjb250cyA9IFtdLFxcXFxuICAgICAgICAgICAgICAgICAgICB0YWJzID0gW107XFxcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFxcXFxcImFwaS5waHAvYXBwXFxcXFxcXCIpIHx8IGFwcFVybC5pbmNsdWRlcyhcXFxcXFxcInhnYXBwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gZGF0YS52b2RfdXJsX3dpdGhfcGxheWVyO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gZGF0YS52b2RfcGxheV9saXN0O1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGRhdGEudm9kX3BsYXlfdXJsLnNwbGl0KCckJCQnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGFicyA9IGRhdGEudm9kX3BsYXlfZnJvbS5zcGxpdCgnJCQkJyk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIC8v57q/6Lev5ZCN56ewXFxcXG4gICAgICAgICAgICAgICAgbGV0IHB0YWIgPSBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBwdGFibmFtZSA9IFxcXFxcXFwiXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGdldFZhcihcXFxcXFxcImFwcG5vd1xcXFxcXFwiLCBcXFxcXFxcIlxcXFxcXFwiKSA9PSBcXFxcXFxcIlxcXFxcXFwiKSB7IHB1dFZhcihcXFxcXFxcImFwcG5vd1xcXFxcXFwiLCBcXFxcXFxcIjBcXFxcXFxcIikgfVxcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29udHMubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNwdGFiID0gXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhYm5hbWUgPSBcXFxcXFxcIlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwiYXBpLnBocC9hcHBcXFxcXFxcIikgfHwgYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwieGdhcHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNwdGFiID0gY29udHNbaV0uY29kZSA/IGNvbnRzW2ldLmNvZGUgOiB0YWJzW2ldO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGFibmFtZSA9IGNvbnRzW2ldLm5hbWUgfHwgc3B0YWI7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBzcHRhYiA9IGNvbnRzW2ldLmZyb20gPyBjb250c1tpXS5mcm9tIDogdGFic1tpXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhYm5hbWUgPSBjb250c1tpXS5wbGF5ZXJfaW5mbyA/IGNvbnRzW2ldLnBsYXllcl9pbmZvLnNob3cgOiBzcHRhYjtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRWYXIoXFxcXFxcXCJhcHBub3dcXFxcXFxcIikgPT0gaSA/IFxcXFxcXFwi4oCc4oCc4oCd4oCdXFxcXFxcXCIgKyB0YWJuYW1lLmJvbGQoKS5mb250Y29sb3IoXFxcXFxcXCIjRkE3Mjk4XFxcXFxcXCIpIDogdGFibmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyNAbGF6eVJ1bGU9LmpzOnB1dFZhcignYXBwbm93JywnXFxcXFxcXCIgKyBpICsgXFxcXFxcXCInKTtyZWZyZXNoUGFnZShmYWxzZSk7J3RvYXN0Oi8v5YiH5o2i5oiQ5YqfISdcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdldFZhcihcXFxcXFxcImFwcG5vd1xcXFxcXFwiKSA9PSBpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdGFiID0gc3B0YWI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdGFibmFtZSA9IHRhYm5hbWU7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIuKAnOKAnOKGk+KGkeKAneKAnVxcXFxcXFwiICsgcHRhYm5hbWUgKyBcXFxcXFxcIi1cXFxcXFxcIiArIHB0YWIsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL2VtcHR5QGxhenlSdWxlPS5qczpwdXRWYXIoJ2FwcG1hcHBzb3J0JywgZ2V0VmFyKCdhcHBtYXBwc29ydCcsJzEnKT09JzEnPycwJzonMScpO3JlZnJlc2hQYWdlKGZhbHNlKTsndG9hc3Q6Ly/liIfmjaLmiJDlip8hJ1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7IGxpbmVWaXNpYmxlOiBmYWxzZSB9XFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgLy/pk77mjqXliJfooahcXFxcbiAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IFtdLFxcXFxuICAgICAgICAgICAgICAgICAgICBpbmRleCA9IGdldFZhcihcXFxcXFxcImFwcG5vd1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwiYXBpLnBocC9hcHBcXFxcXFxcIikgfHwgYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwieGdhcHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2luZGV4XS51cmwuc3BsaXQoXFxcXFxcXCIjXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBjb250c1tpbmRleF0udXJscyA/IGNvbnRzW2luZGV4XS51cmxzIDogY29udHNbaW5kZXhdLnVybC5zcGxpdChcXFxcXFxcIiNcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICBpZiAoZ2V0VmFyKCdhcHBtYXBwc29ydCcsICcxJykgPT0gJzAnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QucmV2ZXJzZSgpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAvL+ino+aekOaOpeWPo1xcXFxuICAgICAgICAgICAgICAgIGxldCBqaWVrID0gW107XFxcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFxcXFxcImFwaS5waHAvYXBwXFxcXFxcXCIpIHx8IGFwcFVybC5pbmNsdWRlcyhcXFxcXFxcInhnYXBwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBqaWVrLnB1c2goY29udHNbaW5kZXhdLnBhcnNlX2FwaSB8fCBcXFxcXFxcIlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGppZWsgPSAoY29udHNbaW5kZXhdLnBsYXllcl9pbmZvLnBhcnNlMiB8fCBcXFxcXFxcIlxcXFxcXFwiKS5zcGxpdChcXFxcXFxcIixcXFxcXFxcIikuY29uY2F0KChjb250c1tpbmRleF0ucGxheWVyX2luZm8ucGFyc2UgfHwgXFxcXFxcXCJcXFxcXFxcIikuc3BsaXQoXFxcXFxcXCIsXFxcXFxcXCIpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGppZWsgPSBqaWVrLm1hcChjdXIgPT4gY3VyLnJlcGxhY2UoXFxcXFxcXCIuLlxcXFxcXFwiLCBcXFxcXFxcIi5cXFxcXFxcIikucmVwbGFjZSgnanNvbmJzJywgJycpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxcXG4gICAgICAgICAgICAgICAgamllayA9IGppZWsuZmlsdGVyKGN1ciA9PiAhIWN1cik7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGp4VXJsID0gamlla1swXSB8fCBcXFxcXFxcIlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgIC8qaWYgKGp4VXJsLnN1YnN0cmluZygwLCAyKSA9PSAnXFxcXFxcXFwvXFxcXFxcXFwvJykge1xcXFxuICAgICAgICAgICAgICAgICAgICBqeFVybCA9ICdodHRwczonICsganhVcmw7XFxcXG4gICAgICAgICAgICAgICAgfSovXFxcXG4gICAgICAgICAgICAgICAgLy/miZPljbDmjqXlj6NcXFxcbiAgICAgICAgICAgICAgICBsb2coJ1xcXFxcXFxcbuW9k+WJjee6v+i3rzonICsgcHRhYiArICdcXFxcXFxcXG7op6PmnpDliJfooag6JyArICQuc3RyaW5naWZ5KGppZWspKTtcXFxcbiAgICAgICAgICAgICAgICAvL+inhumikeWIl+ihqFxcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgbGlzdC5sZW5ndGg7IGorKykge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdmxpbmsgPSBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSBcXFxcXFxcIlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAobGlzdFtqXS51cmwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZsaW5rID0gbGlzdFtqXS51cmwucmVwbGFjZSgvIzQ1NiMvZywgJ2h0dHAnKS5yZXBsYWNlKC8jMTIzIy9nLCAnLicpLnJlcGxhY2UoLyM3ODkjL2csICc6Jyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IGxpc3Rbal0ubmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZsaW5rID0gbGlzdFtqXS5zcGxpdChcXFxcXFxcIiRcXFxcXFxcIilbMV07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IGxpc3Rbal0uc3BsaXQoXFxcXFxcXCIkXFxcXFxcXCIpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vdGl0bGUgPSB0aXRsZS5tYXRjaCgvKOesrHxcXFxcXFxcXGR8LSkqKOmbhnzor5185pyfKS9nKSA/IHRpdGxlLnJlcGxhY2UoL+esrHzpm4Z86K+dfOacny9nLCAnJykgOiB0aXRsZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2xhenlQYXJzZVxcXFxcXFwiKSkucnVsZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxcXG4gICAgICAgICAgICB9LCBjaGFuZ2VVcmwsIGFwcFVybCwgYXB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YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHZsaW5rKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgdmxpbmspXFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHknKS5sYXp5UnVsZSgocHRhYiwgdmxpbmssIGp4VXJsLCBhcHBVcmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIlxcXFxcXFxcbuS9v+eUqOm7mOiupOino+aekCzop4bpopHpk77mjqU6XFxcXFxcXCIgKyB2bGluayk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+inhumikemTvuaOpeWkhOeQhlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hhbmdlVmlkZW9VcmwodXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mlLnlj5jnibnlrprlnLDlnYDnmoRSZWZlcmVyXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVybC5pbmNsdWRlcyhcXFxcXFxcIndrZmlsZVxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL30nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHRhYiA9PSAnYmlsaWJpbGknKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHRhYiA9PSAnbWd0dicpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybC5pbmNsdWRlcyhcXFxcXFxcIm9qYmtcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckBodHRwczovL2Jhay5vamJranguY29tL30nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+i/lOWbnuinhumikemTvuaOpVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdXJsLmluY2x1ZGVzKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLpk77mjqXkuI3mmK/ku6VodHRw5byA5aS0KOWPr+iDveWKoOWvhuS6hilcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcXFxcXC5tM3U4Ly50ZXN0KHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWNoZU0zdTgodXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHlvIDlp4tcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lpITnkIbop4bpopHmoLflvI/nmoTotYTmupDpk77mjqVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fG9ialxcXFxcXFxcL3Rvc3xuZXRlYXNlXFxcXFxcXFwuY29tLy50ZXN0KHZsaW5rKSAmJiAvaHR0cC8udGVzdCh2bGluaykgJiYgIS9cXFxcXFxcXC5odG1sLy50ZXN0KHZsaW5rKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIS9mZW5cXFxcXFxcXC5sYW9kaXxydWlmZW5nbGJ8c3VveW9cXFxcXFxcXC5jYy8udGVzdCh2bGluaykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIuajgOa1i+WIsOi1hOa6kOWcsOWdgOWPr+iDveaYr+inhumikemTvuaOpVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybCh2bGluayk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ml6Dlj6/nlKjop6PmnpDnm7TmjqXmiqXplJlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWp4VXJsIHx8IC94XFxcXFxcXFwtblxcXFxcXFxcLmNjLy50ZXN0KGp4VXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLml6Dlj6/nlKjop6PmnpBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5L2/55So6Kej5p6QXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi5L2/55So6Kej5p6QOlxcXFxcXFwiICsganhVcmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0ganhVcmwgKyB2bGluayxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvZGUgPSBKU09OLnBhcnNlKGZldGNoKGxpbmssIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogXFxcXFxcXCJEYXJ0LzIuMTMgKGRhcnQ6aW8pXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogZmFsc2UsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ov5Tlm57ph43lrprlkJHnmoTpk77mjqUgXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMicgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAxJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVkdXJsID0gc2NvZGUuaGVhZGVycy5sb2NhdGlvblswXS5yZXBsYWNlKC9cXFxcXFxcXFxcXFxcXFxcL2csICcnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfph43lrprlkJE6JyArIHJlZHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghLyh1cmx8dmlkfHYpXFxcXFxcXFw9Ly50ZXN0KHJlZHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChyZWR1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qZWxzZSBpZiAoL1xcXFxcXFxcPWh0dHAvLnRlc3QocmVkdXJsKSAmJiAvXFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDR8XFxcXFxcXFwuZmx2Ly50ZXN0KHJlZHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1cmwgPSByZWR1cmwuc3Vic3RyaW5nKHJlZHVybC5pbmRleE9mKCc9aHR0cCcpICsgMSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0qL1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29kZS5ib2R5ID0gZmV0Y2gocmVkdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lvIDlp4vll4XmjqJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHNjb2RlLmJvZHk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXri8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCI0MDTkuoZcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXFxcXFw8Ym9keS8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChbXFxcXFxcXCLlvIDlp4vop4bpopHll4XmjqJcXFxcXFxcIiwgXFxcXFxcXCLmiZPlvIDop6PmnpDnvZHpobVcXFxcXFxcIiwgXFxcXFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFxcXFxcIl0sIDEsIFxcXFxcXFwi5qOA5rWL5Yiw6Kej5p6Q5Li6572R6aG15pWw5o2uXFxcXFxcXCIpLnNlbGVjdCgobGluaywgcHRhYiwgdmxpbmssIGFwcFVybCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXFxcXFwi5byA5aeL6KeG6aKR5ZeF5o6iXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoJ2h0dHBzOi8vY29kZS5hbGl5dW4uY29tL2x6azIzNTU5L1B1YmxpY1J1bGUvcmF3L21hc3Rlci94NXJ1bGUuanMnLCAyNCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHg1cnVsZShsaW5rLCBsaW5rKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gXFxcXFxcXCLmiZPlvIDop6PmnpDnvZHpobVcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcIndlYjovL1xcXFxcXFwiICsgbGluaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gXFxcXFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIuS9v+eUqOWGhee9ruino+aekFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFxcXFxcIuato+WcqOi/m+ihjOino+aekC4uLlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL215UGFyc2VcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaW5rLCBwdGFiLCB2bGluaywgYXBwVXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZygn5bCd6K+V5LuOanNvbuaVsOaNruiOt+WPlicpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB1cmwgPSBKU09OLnBhcnNlKGh0bWwpLnVybDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChwdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLypsZXQgcHVybCA9IGh0bWwubWF0Y2goL1tcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXXVybFtcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXTouKj9bXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0oLio/KVtcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXS8pWzFdLnJlcGxhY2UoL1xcXFxcXFxcXFxcXFxcXFwvZywgJycpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpOyovXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ+ino+aekOWPr+iDveWKoOWvhuS6hicpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygnXFxcXFxcXFxu5pyq6IO95oiQ5Yqf6I635Y+W6KeG6aKR5Zyw5Z2AOicgKyBlLm1lc3NhZ2UgKyBcXFxcXFxcIlxcXFxcXFxcbuWwneivleS9v+eUqOinhOWImeWGhee9ruino+aekFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL215UGFyc2VcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHnu5PmnZ9cXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgcHRhYiwgdmxpbmssIGp4VXJsLCBhcHBVcmwpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgcGFnZXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgbmFtZTogXFxcXFxcXCJBUFDliIbnsbvliJfooahcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBwYXRoOiBcXFxcXFxcImFwcGxpc3RkYXRhXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgcnVsZTogcnVsZV9hcHBsaXN0ZGF0YVxcXFxuICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXFxcXFwiQVBQ6aaW6aG15YiX6KGoXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcXFxcXCJhcHBpbmRleGRhdGFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX2FwcGluZGV4ZGF0YVxcXFxuICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXFxcXFwiQVBQ6YCJ6ZuGXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcXFxcXCJhcHBtb3ZsaXN0XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgcnVsZTogcnVsZV9hcHBtb3ZsaXN0XFxcXG4gICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgbmFtZTogXFxcXFxcXCLop4bpopHop6PmnpBcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBwYXRoOiBcXFxcXFxcImxhenlQYXJzZVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIHJ1bGU6IGxhenlQYXJzZVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH1cXFxcblxcXFxuICAgICAgICBsZXQgbXlQYXJzZSA9IEpTT04ucGFyc2UoZmV0Y2goXFxcXFxcXCJoaWtlcjov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1sLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXFxcXFxcXFxcIi8pWzFdLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSk7XFxcXG4gICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgIGxldCBodG1sID0gSlNPTi5wYXJzZShiaHRtbCksXFxcXG4gICAgICAgICAgICAgICAgbGlzdCA9IFtdO1xcXFxuICAgICAgICAgICAgaWYgKC/npZ7pqax8VFYvLnRlc3QoYXBwdHlwZSkpIHtcXFxcbiAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC5kYXRhO1xcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmxpc3Q7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwuZGF0YTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC5kYXRhLmxpc3Q7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgeyB0aXRsZSwgcGljLCBuZXh0bGluazogdXJsLCBzdGF0ZTogZGVzYyB9ID0gbGlzdFtpXTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpIHx8IGFwcFVybC5pbmNsdWRlcygneGdhcHAnKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHsgdm9kX25hbWU6IHRpdGxlLCB2b2RfcGljOiBwaWMsIHZvZF9yZW1hcmtzOiBkZXNjIH0gPSBsaXN0W2ldLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IGFwcFVybCArICd2aWRlb19kZXRhaWw/aWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHsgdm9kX25hbWU6IHRpdGxlLCB2b2RfcGljOiBwaWMsIHZvZF9yZW1hcmtzOiBkZXNjIH0gPSBsaXN0W2ldO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdChhcHBVcmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGFwcFVybCArICcvZGV0YWlsSUQ/dm9kX2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGFwcFVybCArICcvZGV0YWlsP3ZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBwaWMgKyAnQFJlZmVyZXI9JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogZGVzYyxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpYycsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChcXFxcXFxcIiNpbW1lcnNpdmVUaGVtZSNoaWtlcjovL2VtcHR5IyNcXFxcXFxcIiArIHVybCkucnVsZSgoYXBwdHlwZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC/npZ7pqax8VFYvLnRlc3QoYXBwdHlwZSkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dm1vdmxpc3QnKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcG1vdmxpc3QnKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIGFwcHR5cGUpXFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxcXG4gICAgICAgIH0sIGNoYW5nZVVybCwgYXBwdHlwZSwgYXBwVXJsLCBhcHBVYSlcXFxcblxcXFxuICAgICAgICBsYXN0X2NoYXB0ZXJfcnVsZSA9IFxcXFxcXFwianM6XFxcXFxcXCIgKyAkLnRvU3RyaW5nKGZ1bmN0aW9uKGFwcHR5cGUsIGFwcFVybCwgYXBwVWEpIHtcXFxcbiAgICAgICAgICAgIGxldCBjaHAgPSBbXTtcXFxcbiAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGNvbnRzID0gW10sXFxcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBKU09OLnBhcnNlKGZldGNoKE1ZX1VSTC5zcGxpdChcXFxcXFxcIiMjXFxcXFxcXCIpWzFdLCB7IGhlYWRlcnM6IHsgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IGFwcFVhIH0gfSkpO1xcXFxuICAgICAgICAgICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gT2JqZWN0LmtleXMoaHRtbC52aWRlb2xpc3QpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXFxcXFwiYXBpLnBocC9hcHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3VybF93aXRoX3BsYXllcjtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdCgnJCQkJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFxcXFxcInhnYXBwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9pbmZvLnZvZF91cmxfd2l0aF9wbGF5ZXI7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfcGxheV91cmwuc3BsaXQoJyQkJCcpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfbGlzdDtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdCgnJCQkJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IFtdO1xcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29udHMubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKC/npZ7pqax8VFYvLnRlc3QoYXBwdHlwZSkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLnZpZGVvbGlzdFtjb250c1tpXV07XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29udHNbaV0udXJscykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2ldLnVybHM7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29udHNbaV0udXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0ID0gY29udHNbaV0udXJsLnNwbGl0KFxcXFxcXFwiI1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBjb250c1tpXS5zcGxpdChcXFxcXFxcIiNcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcb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