Advertisement
xiaomianao666

邀您一起看:第一小说

Jan 4th, 2024
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥第一小说@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwiQ2xhc3NUYWJcIixcInBhdGhcIjpcIkNsYXNzVGFiXCIsXCJydWxlXCI6XCJjb25zdCBDbGFzc1RhYiA9IGZ1bmN0aW9uKGNsYXNzQXJyYXksIHBhcmFtcykge1xcbiAgICBPYmplY3QuYXNzaWduKHRoaXMsIHBhcmFtcylcXG4gICAgdGhpcy5hcnIgPSBjbGFzc0FycmF5Lm1hcCh2ID0+IHRoaXMuaW5pdCh2KSlcXG4gICAgdGhpcy5zaWduID0gJyQnICsgUUlOR19USVRMRSArICdfJyArICh0aGlzLm5hbWUgfHwgJycpICsgJ18nXFxuICAgIHRoaXMuY29sb3IgPSB0aGlzLmNvbG9yIHx8ICcjMTJiNjY4J1xcbiAgICB0aGlzLmJvdW5kYXJ5ID0gdGhpcy5ib3VuZGFyeSB8fCAnYmxhbmtfYmxvY2snXFxufVxcbkNsYXNzVGFiLnByb3RvdHlwZSA9IHtcXG4gICAgY29uc3RydWN0b3I6IENsYXNzVGFiLFxcbiAgICBsb2FkKGVsKSB7XFxuICAgICAgICBsZXQgZm9sZGVkID0gdGhpcy5mb2xkICYmIGdldFZhcignZm9sZF8nICsgdGhpcy5zaWduLCAnJylcXG4gICAgICAgIGlmICh0aGlzLmFyci5sZW5ndGggPiAxICYmIHRoaXMuZm9sZCkgZWwucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgKGZvbGRlZCA/ICfilrYnIDogJ+KWvCcpLmZvbnRjb2xvcignIzA0OWVmZicpLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgZm9sZGVkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcignZm9sZF8nICsgc2lnbiwgeyAnJzogJ1QnLCAnVCc6ICcnIH0gW2ZvbGRlZF0pXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBmb2xkZWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pXFxuICAgICAgICBsZXQgYXJyID0gZm9sZGVkID8gW3RoaXMuYXJyWzBdXSA6IHRoaXMuYXJyXFxuICAgICAgICBhcnIuZm9yRWFjaCgodikgPT4ge1xcbiAgICAgICAgICAgIGxldCB7IGlkLCBjbGFzc19uYW1lLCBjbGFzc191cmwgfSA9IHYsXFxuICAgICAgICAgICAgc2VsZWN0ZWQgPSBKU09OLnN0cmluZ2lmeSh0aGlzLmdldENsYXNzKGlkKSlcXG4gICAgICAgICAgICBjbGFzc19uYW1lLmZvckVhY2goKG5hbWUsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGNsYXNzX3VybFtpXSxcXG4gICAgICAgICAgICAgICAgICAgIG5vdyA9IEpTT04uc3RyaW5naWZ5KHsgbmFtZTogbmFtZSwgdXJsOiB1cmwgfSlcXG4gICAgICAgICAgICAgICAgZWwucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2VsZWN0ZWQgPT0gbm93ID8gJ+KAnOKAnOKAneKAnScgKyBuYW1lLmZvbnRjb2xvcih0aGlzLmNvbG9yKS5ib2xkKCkgOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZWxlY3RlZCA9PSBub3cgPyAnaGlrZXI6Ly9lbXB0eScgOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWduLCBpZCwgbm93KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBlbC5wdXNoKHsgY29sX3R5cGU6IHRoaXMuYm91bmRhcnkgfSlcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIGluaXQoY2xhc3NPYmplY3QpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfbmFtZSA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX3VybCA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbG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xkLCBkaXNhYmxlQ3VzdG9tKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IHJlcXVlc3QodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGEgPSByZWFkRmlsZSgnY3VzdG9tRGF0YScpXFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShpbnB1dCwgSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSW50ZXJ2YWw6IHVwZGF0ZUludGVydmFsLFxcbiAgICAgICAgICAgICAgICAgICAgbmV3V2luZG93OiBuZXdXaW5kb3csXFxuICAgICAgICAgICAgICAgICAgICB0YWJGb2xkOiB0YWJGb2xkLFxcbiAgICAgICAgICAgICAgICAgICAgZGlzYWJsZUN1c3RvbTogZGlzYWJsZUN1c3RvbSxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGE6IGN1c3RvbURhdGEsXFxuICAgICAgICAgICAgICAgICAgICBydWxlczogcnVsZXNcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LlpIfku73vvIzms6jmhI/oi6Xku5PlupPkuLrlrZDpobXpnaLliJnkuI3lpIfku70nXFxuICAgICAgICAgICAgfSwgdXJsLCB1cGRhdGVJbnRlcnZhbCwgbmV3V2luZG93LCB0YWJGb2xkLCBkaXNhYmxlQ3VzdG9tKVxcbiAgICAgICAgZWxzZSByZXR1cm4gJCgnaGlrZXI6Ly9maWxlcy90bXAvJyArIFFJTkdfVElUTEUgKyAnX2JhY2t1cC5qc29uJywgJ+i+k+WFpeWkh+S7vei3r+W+hCcpLmlucHV0KCh1cmwpID0+IHtcXG4gICAgICAgICAgICBsZXQgeyB1cGRhdGVJbnRlcnZhbCwgbmV3V2luZG93LCB0YWJGb2xkLCBkaXNhYmxlQ3VzdG9tLCBjdXN0b21EYXRhLCBydWxlcyB9ID0gSlNPTi5wYXJzZShyZX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AgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIHJ1bGVzW2ldLnZpc2libGUgPSAhcnVsZXNbaV0udmlzaWJsZVxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgIGQudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+abtOaUueWbvuaghyc6XFxuICAgICAgICAgICAgZC51cmwgPSAkKHYuaWNvbiB8fCAnJywgJ+i+k+WFpeaWsOWbvuagh+WcsOWdgOaIluminOiJsuS7o+egge+8micpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICBydWxlc1tpXS5pY29uID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2ldLmljb25cXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8v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sZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgW18sIHVybCwgcnVsZV0gPSB2LnVybC5tYXRjaCgvXihbXFxcXHNcXFxcU10qPylAcnVsZT0oW1xcXFxzXFxcXFNdKikkLylcXG4gICAgICAgICAgICAgICAgdi51cmwgPSB1cmxcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSA9IHJ1bGVcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2NvbF90eXBlID0gTVlfUlVMRS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodi51cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9wYWdlLycpKSB7XFxuICAgICAgICAgICAgICAgIGlmICh2LnVybC5pbmNsdWRlcygncnVsZT0nKSB8fCAodi5leHRyYSB8fCB7fSkucnVsZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIGxldCBbXywgcGF0aCwgZmxhZywgcGFyYW1zXSA9IHYudXJsLm1hdGNoKC9eaGlrZXI6XFxcXC9cXFxcL3BhZ2VcXFxcLyguKz8pKCMuKj8pPyg/OlxcXFw/KC4qKSk/JC8pLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViUGFnZSA9IE1ZX1JVTEUucGFnZUxpc3QuZmluZCgodikgPT4gdi5wYXRoID09IHBhdGgpLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViVXJsID0gKHBhcmFtcyB8fCAnJykuc3BsaXQoJyYnKS5maW5kKCh2KSA9PiB2LnN0YXJ0c1dpdGgoJ3VybD0nKSlcXG4gICAgICAgICAgICAgICAgdi51cmwgPSBzdWJVcmwgPyBzdWJVcmwuc2xpY2UoNCkucmVwbGFjZSgv77yf77yfL2csICc/JykucmVwbGFjZSgv77yG77yGL2csICcmJykgOiAodi5leHRyYSB8fCB7fSkudXJsIHx8ICdoaWtlcjovL2VtcHR5JyArIGZsYWcgKyAnPycgKyAocGFyYW1zIHx8ICcnKVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0gc3ViUGFnZS5ydWxlXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLmRldGFpbF9jb2xfdHlwZSA9IHN1YlBhZ2UuY29sX3R5cGVcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUucGFyYW1zID0gdi5leHRyYSB8fCB7fVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodi51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHYudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSB2LnVybCA9IHYudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcbmlmKE1ZX1JVTEUpT2JqZWN0LmFzc2lnbihNWV9SVUxFLCAnICsgZ2V0UnVsZSArICcpOycgKyB2LnVybC5zbGljZShyZUluZGV4ICsgNClcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCFNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUgfHwgL2hpa2VyOlxcXFwvXFxcXC8oPyFlbXB0eS4rJCkvLnRlc3Qodi51cmwpKSByZXR1cm4gdlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHYuZXh0cmEgPSB7XFxuICAgICAgICAgICAgICAgIHVybDogKGZ1bmN0aW9uKHVybCkge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsLnNwbGl0KCc7JylcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwuc2hpZnQoKSArICc7JyArIHBhcmFt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cm4gJydcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICByZXMgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSwgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogTVlfUlVMRS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxuICAgICAgICAgICAgaWYgKHJlcy51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHJlcy51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcbmlmKE1ZX1JVTEUpT2JqZWN0LmFzc2lnbihNWV9SVUxFLCAnICsgZ2V0UnVsZSArICAnKTsnICsgcmVzLnVybC5zbGljZShyZUluZGV4ICsgNClcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxuICAgICAgICAgICAgICAgIGxldCBfYSA9IGdlblJ1bGUoKVxcbiAgICAgICAgICAgICAgICBfYS5kZXRhaWxfZmluZF9ydWxlID0gZGV0YWlsRmluZFJ1bGVcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAoZnVuY3Rpb24odXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsLnNwbGl0KCc7JylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsLnNoaWZ0KCkgKyAnOycgKyBwYXJhbUhhbmRsZSh1cmwsIE1ZX1JVTEUudWEsIE1ZX1JVTEUudXJsLnNwbGl0KCc7JylbMl0pXFxuICAgICAgICAgICAgICAgICAgICB9KSh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogX2EsXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogKGZ1bmN0aW9uKHVybCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5zcGxpdCgnOycpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybC5zaGlmdCgpICsgJzsnICsgcGFyYW1IYW5kbGUodXJsLCBNWV9SVUxFLnVhLCBNWV9SVUxFLnVybClcXG4gICAgICAgICAgICAgICAgICAgIH0pKHVybCksXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBnZW5SdWxlKCksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVx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YSA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKSxcXG4gICAgICAgICAgICByZXdyaXRlRGF0YSA9IFtdXFxuICAgICAgICBjdXN0b21EYXRhID0gY3VzdG9tRGF0YS5yZWR1Y2UoKHNlbGYsIHYpID0+IHtcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSBkYXRhLmZpbmRJbmRleCgodnYpID0+IHYudGl0bGUgPT0gdnYudGl0bGUpXFxuICAgICAgICAgICAgaWYgKGluZGV4ID49IDApIHtcXG4gICAgICAgICAgICAgICAgc2VsZi5wdXNoKHYpXFxuICAgICAgICAgICAgICAgIGxldCBydWxlID0gZGF0YS5zcGxpY2UoaW5kZXgsIDEpWzBdXFxuICAgICAgICAgICAgICAgIGlmIChzaG93QWxsIHx8IHYudmlzaWJsZSlcXG4gICAgICAgICAgICAgICAgICAgIHJld3JpdGVEYXRhLnB1c2goT2JqZWN0LmFzc2lnbihydWxlLCB2KSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIHNlbGZcXG4gICAgICAgIH0sIFtdKVxcbiAgICAgICAgZGF0YS5mb3JFYWNoKCh2KSA9PiBjdXN0b21EYXRhLnB1c2goeyB0aXRsZTogdi50aXRsZSwgdmlzaWJsZTogdHJ1ZSB9KSlcXG4gICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkoY3VzdG9tRGF0YSkpXFxuICAgICAgICByZXR1cm4gcmV3cml0ZURhdGEuY29uY2F0KGRhdGEpXFxuICAgIH1cXG59XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlh73mlbDph43lhplcIixcInBhdGhcIjpcInByZUZ1bmNcIixcInJ1bGVcIjpcIi8vIOmYsuatonJlcXVpcmXlpJrmrKHov5DooYxcXG5sZXQgckNhY2hlID0ge31cXG5yZXF1aXJlID0gZnVuY3Rpb24ocGFy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dXFxcXFxcXCI7XFxcXG4gICAgY2FjaGVzID0gSlNPTi5wYXJzZShjKVxcXFxuICAgIGxldCB1cmwgPSBnZXRVcmwoKVxcXFxuICAgIGFkZExpc3RlbmVyKFxcXFxcXFwib25SZWZyZXNoXFxcXFxcXCIsICQudG9TdHJpbmcoKHVybCkgPT4ge1xcXFxuICAgICAgICBsZXQgYyA9IHJlYWRGaWxlKFxcXFxcXFwiY2hhcHRlci5qc29uXFxcXFxcXCIpIHx8IFxcXFxcXFwiW11cXFxcXFxcIjtcXFxcbiAgICAgICAgYyA9IEpTT04ucGFyc2UoYylcXFxcbiAgICAgICAgbGV0IGNoZSA9IHtcXFxcbiAgICAgICAgICAgIHVybDogdXJsLFxcXFxuICAgICAgICAgICAgcGFnZTogMCxcXFxcbiAgICAgICAgICAgIGNoYXB0ZXJzOiBbXVxcXFxuICAgICAgICB9O1xcXFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGMubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgIGlmIChjW2ldLnVybCA9PSBjaGUudXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgY1tpXSA9IGNoZTtcXFxcbiAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCJjbGVhcjpcXFxcXFxcIiArIHVybClcXFxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZShcXFxcXFxcImNoYXB0ZXIuanNvblxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShjKSlcXFxcbiAgICAgICAgICAgICAgICBicmVha1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9XFxcXG4gICAgfSwgdXJsKSlcXFxcbiAgICBmb3IgKGxldCBpdCBvZiBjYWNoZXMpIHtcXFxcbiAgICAgICAgaWYgKGl0LnVybCA9PSB1cmwpIHtcXFxcbiAgICAgICAgICAgIHJldHVybiBpdDtcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbiAgICByZXR1cm4ge1xcXFxuICAgICAgICB1cmw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KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnPGJpZz4nICsgZGVzX3RpdGxlICsgJzwvYmlnPicsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29udCA9IHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCAnI2NvbnRlbnQmJnAnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBjb250Lm1hcChpdCA9PiAn44CA44CAJyArIHBhcnNlRG9tRm9ySHRtbChpdCwgJ3AmJkh0bWwnKSkuam9pbihcXFxcXFxcIjxicj48YnI+XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGh0bWwsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJyaWNoX3RleHRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxcXG4gICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IGptLmxlbmd0aCA+IDUgPyAndGV4dF8xJyA6ICd0ZXh0XzEnLFxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9IGVsc2Uge1xcXFxuICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGxpc3QubGVuZ3RoOyBqKyspIHtcXFxcbiAgICAgICAgICAgIHZhciBqbSA9IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnVGV4dCcpO1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogam0sXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgXFxcXFxcXCIjYXV0b1BhZ2UjI3JlYWRUaGVtZSNcXFxcXFxcIiArIGBAcnVsZT1qczpgICsgJC50b1N0cmluZygoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBkID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXNfdGl0bGUgPSBwYXJzZURvbUZvckh0bWwoZ2V0UmVzQ29kZSgpLCAnI2MxJiZoMSYmVGV4dCcpO1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8YmlnPicgKyBkZXNfdGl0bGUgKyAnPC9iaWc+JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb250ID0gcGFyc2VEb21Gb3JBcnJheShnZXRSZXNDb2RlKCksICcjY29udGVudCYmcCcpO1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGNvbnQubWFwKGl0ID0+ICfjgIDjgIAnICsgcGFyc2VEb21Gb3JIdG1sKGl0LCAncCYmSHRtbCcpKS5qb2luKFxcXFxcXFwiPGJyPjxicj5cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaHRtbCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInJpY2hfdGV4dFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXFxcbiAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogam0ubGVuZ3RoID4gNSA/ICd0ZXh0XzEnIDogJ3RleHRfMScsXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbn1cXFxcbnNldExpc3RzKGxpc3RzLCBnZXRWYXIoTVlfVVJMLCAnMCcpKTtcXFxcbmQucHVzaCh7XFxcXG4gICAgdGl0bGU6ICc8YnI+JyxcXFxcbiAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCdcXFxcbn0pO1xcXFxuc2V0UmVzdWx0KGQpO1xcXCIsXFxuICAgICAgICBcXFwic2RldGFpbF9jb2xfdHlwZVxcXCI6IFxcXCJtb3ZpZV8xXFxcIixcX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xcXFwvXFxcXC9wYWdlXFxcXC8oLis/KSgjLio/KT8oPzpcXFxcPyguKikpPyQvKSxcXG4gICAgICAgICAgICAgICAgICAgIHN1YlBhZ2UgPSBNWV9SVUxFLnBhZ2VMaXN0LmZpbmQoKHYpID0+IHYucGF0aCA9PSBwYXRoKSxcXG4gICAgICAgICAgICAgICAgICAgIHN1YlVybCA9IChwYXJhbXMgfHwgJycpLnNwbGl0KCcmJykuZmluZCgodikgPT4gdi5zdGFydHNXaXRoKCd1cmw9JykpXFxuICAgICAgICAgICAgICAgIHYudXJsID0gc3ViVXJsID8gc3ViVXJsLnNsaWNlKDQpLnJlcGxhY2UoL++8n++8ny9nLCAnPycpLnJlcGxhY2UoL++8hu+8hi9nLCAnJicpIDogKHYuZXh0cmEgfHwge30pLnVybCB8fCAnaGlrZXI6Ly9lbXB0eScgKyBmbGFnICsgJz8nICsgKHBhcmFtcyB8fCAnJylcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSA9IHN1YlBhZ2UucnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBzdWJQYWdlLmNvbF90eXBlXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLnBhcmFtcyA9IHYuZXh0cmEgfHwge31cXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSB2LnVybC5pbmRleE9mKCcuanM6JylcXG4gICAgICAgICAgICAgICAgaWYgKHJlSW5kZXggPj0gMCkgdi51cmwgPSB2LnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGdldFJ1bGUgKyAnKTsnICsgdi51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0luZGV4KSB7XFxuICAgICAgICAgICAgICAgIGlmICghTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlIHx8IC9oaWtlcjpcXFxcL1xcXFwvKD8hZW1wdHkuKyQpLy50ZXN0KHYudXJsKSkgcmV0dXJuIHZcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2LmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICB1cmw6IChmdW5jdGlvbih1cmwpIHtcXG4gICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5zcGxpdCgnOycpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsLnNoaWZ0KCkgKyAnOycgKyBwYXJhbUhhbmRsZSh1cmwsIE1ZX1JVTEUudWEsIE1ZX1JVTEUudXJsKVxcbiAgICAgICAgICAgICAgICB9KSh2LnVybCksXFxuICAgICAgICAgICAgICAgIFJVTEU6IE1ZX19SVUxFLFxcbiAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdi50aXRsZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2LnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgfSkpXFxuICAgICAgICBtZXRob2Rfc2V0UmVzdWx0Lmludm9rZShqYXZhQ29udGV4dCwgbXlDb2xsZWN0aW9uX2VsLCBwYXJhbTEsIHBhcmFtMiwgcGFyYW0zKVxcbiAgICB9XFxuICAgIHNldEhvbWVSZXN1bHQgPSBzZXRSZXN1bHRcXG4gICAgc2V0U2VhcmNoUmVzdWx0ID0gc2V0UmVzdWx0XFxuXFxuICAgIGV2YWwoTVlfUlVMRS5maW5kX3J1bGUuc2xpY2UoMykpXFxufSBlbHNlIHtcXG4gICAgbGV0IFtfLCBmaW5kUnVsZSwgZGV0YWlsRmluZFJ1bGVdID0gTVlfUlVMRS5maW5kX3J1bGUubWF0Y2goL14oW1xcXFxzXFxcXFNdKj8pKD86PT0+KFtcXFxcc1xcXFxTXSopKT8kLylcXG4gICAgZmluZFJ1bGUgPSBmaW5kUnVsZS5zcGxpdCgnOycpXFxuICAgIHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCBmaW5kUnVsZS5zaGlmdCgpKS5mb3JFYWNoKChkYXRhKSA9PiB7XFxuICAgICAgICBsZXQgW3RpdGxlLCBpbWcsIGRlc2MsIHVybF0gPSBmaW5kUnVsZS5tYXAoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2ID09ICcqJykgcmV0dXJuICcnXFxuICAgICAgICAgICAgICAgICAgICBlbHNlIHYgPSAoaSA9PSAxIHx8IGkgPT0gMykgP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tKGRhdGEsIHYpIDpcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLCBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGdldFJ1bGUgKyAgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChkZXRhaWxGaW5kUnVsZSkge1xcbiAgICAgICAgICAgICAgICBsZXQgX2EgPSBnZW5SdWxlKClcXG4gICAgICAgICAgICAgICAgX2EuZGV0YWlsX2ZpbmRfcnVsZSA9IGRldGFpbEZpbmRSdWxlXFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogKGZ1bmN0aW9uKHVybCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5zcGxpdCgnOycpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybC5zaGlmdCgpICsgJzsnICsgcGFyYW1IYW5kbGUodXJsLCBNWV9SVUxFLnVhLCBNWV9SVUxFLnVybC5zcGxpdCgnOycpWzJdKVxcbiAgICAgICAgICAgICAgICAgICAgfSkodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IF9hLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKE1ZX1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bXB0eSdcXFxcbiAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgZm9sZGVkKSxcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXFxcbiAgICAgICAgfSlcXFxcbiAgICAgICAgbGV0IGFyciA9IGZvbGRlZCA/IFt0aGlzLmFyclswXV0gOiB0aGlzLmFyclxcXFxuICAgICAgICBhcnIuZm9yRWFjaCgodikgPT4ge1xcXFxuICAgICAgICAgICAgbGV0IHsgaWQsIGNsYXNzX25hbWUsIGNsYXNzX3VybCB9ID0gdixcXFxcbiAgICAgICAgICAgIHNlbGVjdGVkID0gSlNPTi5zdHJpbmdpZnkodGhpcy5nZXRDbGFzcyhpZCkpXFxcXG4gICAgICAgICAgICBjbGFzc19uYW1lLmZvckVhY2goKG5hbWUsIGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gY2xhc3NfdXJsW2ldLFxcXFxuICAgICAgICAgICAgICAgICAgICBub3cgPSBKU09OLnN0cmluZ2lmeSh7IG5hbWU6IG5hbWUsIHVybDogdXJsIH0pXFxcXG4gICAgICAgICAgICAgICAgZWwucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZWxlY3RlZCA9PSBub3cgPyAn4oCc4oCc4oCd4oCdJyArIG5hbWUuZm9udGNvbG9yKHRoaXMuY29sb3IpLmJvbGQoKSA6IG5hbWUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogc2VsZWN0ZWQgPT0gbm93ID8gJ2hpa2VyOi8vZW1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZX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PSByZWFkRmlsZSgnY3VzdG9tRGF0YScpXFxcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGlucHV0LCBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUludGVydmFsOiB1cGRhdGVJbnRlcnZhbCxcXFxcbiAgICAgICAgICAgICAgICAgICAgbmV3V2luZG93OiBuZXdXaW5kb3csXFxcXG4gICAgICAgICAgICAgICAgICAgIHRhYkZvbGQ6IHRhYkZvbGQsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVDdXN0b206IGRpc2FibGVDdXN0b20sXFxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGE6IGN1c3RvbURhdGEsXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzOiBydWxlc1xcXFxuICAgICAgICAgICAgICAgIH0pKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LlpIfku73vvIzms6jmhI/oi6Xku5PlupPkuLrlrZDpobXpnaLliJnkuI3lpIfku70nXFxcXG4gICAgICAgICAgICB9LCB1cmwsIHVwZGF0ZUludGVydmFsLCBuZXdXaW5kb3csIHRhYkZvbGQsIGRpc2FibGVDdXN0b20pXFxcXG4gICAgICAgIGVsc2UgcmV0dXJuICQoJ2hpa2VyOi8vZmlsZXMvdG1wLycgKyBRSU5HX1RJVExFICsgJ19iYWNrdXAuanNvbicsICfovpPlhaXlpIfku73ot6/lvoQnKS5pbnB1dCgodXJsKSA9PiB7XFxcXG4gICAgICAgICAgICBsZXQgeyB1cGRhdGVJbnRlcnZhbCwgbmV3V2luZG93LCB0YWJGb2xkLCBkaXNhYmxlQ3VzdG9tLCBjdXN0b21EYXRhLCBydWxlcyB9ID0gSlNPTi5wYXJzZShyZXF1ZXN0KGlucHV0KSlcXFxcbiAgICAgICAgICAgIHNhdmVGaWxlKCd1cGRhdGVJbnRlcnZhbCcsIHVwZGF0ZUludGVydmFsKVxcX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AnKSArIGQudGl0bGVcXFxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcXFxuICAgICAgICAgICAgICAgIHJ1bGVzW2ldLnZpc2libGUgPSAhcnVsZXNbaV0udmlzaWJsZVxcXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcXFxuICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXFxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXFxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXFxcbiAgICAgICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxcXG4gICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXFxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxcXG4gICAgICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZ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ICAgfSBlbHNlIGlmICh2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAodi51cmwuaW5jbHVkZXMoJ3J1bGU9JykgfHwgKHYuZXh0cmEgfHwge30pLnJ1bGUpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICAgICAgbGV0IFtfLCBwYXRoLCBmbGFnLCBwYXJhbXNdID0gdi51cmwubWF0Y2goL15oaWtlcjpcXFxcXFxcXC9cXFxcXFxcXC9wYWdlXFxcXFxcXFwvKC4rPykoIy4qPyk/KD86XFxcXFxcXFw/KC4qKSk/JC8pLFxcXFxuICAgICAgICAgICAgICAgICAgICBzdWJQYWdlID0gTVlfUlVMRS5wYWdlTGlzdC5maW5kKCh2KSA9PiB2LnBhdGggPT0gcGF0aCksXFxcXG4gICAgICAgICAgICAgICAgICAgIHN1YlVybCA9IChwYXJhbXMgfHwgJycpLnNwbGl0KCcmJykuZmluZCgodikgPT4gdi5zdGFydHNXaXRoKCd1cmw9JykpXFxcXG4gICAgICAgICAgICAgICAgdi51cmwgPSBzdWJVcmwgPyBzdWJVcmwuc2xpY2UoNCkucmVwbGFjZSgv77yf77yfL2csICc/JykucmVwbGFjZSgv77yG77yGL2csICcmJykgOiAodi5leHRyYSB8fCB7fSkudXJsIHx8ICdoaWtlcjovL2VtcHR5JyArIGZsYWcgKyAnPycgKyAocGFyYW1zIHx8ICcnKVxcXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLmRldGFpbF9maW5kX3J1bGUgPSBzdWJQYWdlLnJ1bGVcXFxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBzdWJQYWdlLmNvbF90eXBlXFxcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUucGFyYW1zID0gdi5leHRyYSB8fCB7fVxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSB2LnVybC5pbmRleE9mKCcuanM6JylcXFxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSB2LnVybCA9IHYudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGdldFJ1bGUgKyAnKTsnICsgdi51cmwuc2xpY2UocmVJbmRleCArIDQpXFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZcXFxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNJbmRleCkge1xcXFxuICAgICAgICAgICAgICAgIGlmICghTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlIHx8IC9oaWtlcjpcXFxcXFxcXC9cXFxcXFxcXC8oPyFlbXB0eS4rJCkvLnRlc3Qodi51cmwpKSByZXR1cm4gdlxcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gdlxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgdi5leHRyYSA9IHtcXFxcbiAgICAgICAgICAgICAgICB1cmw6IChmdW5jdGlvbih1cmwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsLnNwbGl0KCc7JylcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybC5zaGlmdCgpICsgJzsnICsgcGFyYW1IYW5kbGUodXJsLCBNWV9SVUxFLnVhLCBNWV9SVUxFLnVybClcXFxcbiAgICAgICAgICAgICAgICB9KSh2LnVybCksXFxcXG4gICAgICAgICAgICAgICAgUlVMRTogTVlfX1JVTEUsXFxcXG4gICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHYudGl0bGVcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHYudXJ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AgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxcXG4gICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgIHJlcyA9IHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBNWV9SVUxFLmNvbF90eXBlXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxcXG4gICAgICAgICAgICBpZiAocmVzLnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGdldFJ1bGUgKyAgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IF9hID0gZ2VuUnVsZSgpXFxcXG4gICAgICAgICAgICAgICAgX2EuZGV0YWlsX2ZpbmRfcnVsZSA9IGRldGFpbEZpbmRSdWxlXFxcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IChmdW5jdGlvbih1cmwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5zcGxpdCgnOycpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsLnNoaWZ0KCkgKyAnOycgKyBwYXJhbUhhbmRsZSh1cmwsIE1ZX1JVTEUudWEsIE1ZX1JVTEUudXJsLnNwbGl0KCc7JylbMl0pXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pKHVybCksXFxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IF9hLFxcXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXFxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlKSB7XFxcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IChmdW5jdGlvbih1cmwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5zcGxpdCgnOycpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsLnNoaWZ0KCkgKyAnOycgKyBwYXJhbUhhbmRsZSh1cmwsIE1ZX1JVTEUudWEsIE1ZX1JVTEUudXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICB9KSh1cmwpLFxcXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBnZW5SdWxlKCksXFxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vc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XTtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXNfdGl0bGUgPSBwYXJzZURvbUZvckh0bWwoZ2V0UmVzQ29kZSgpLCAnI2MxJiZoMSYmVGV4dCcpO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxiaWc+JyArIGRlc190aXRsZSArICc8L2JpZz4nLFxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnQgPSBwYXJzZURvbUZvckFycmF5KGdldFJlc0NvZGUoKSwgJyNjb250ZW50JiZwJyk7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGNvbnQubWFwKGl0ID0+ICfjgIDjgIAnICsgcGFyc2VEb21Gb3JIdG1sKGl0LCAncCYmSHRtbCcpKS5qb2luKFxcXFxcXFxcXFxcXFxcXCI8YnI+PGJyPlxcXFxcXFxcXFxcXFxcXCIpO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaHRtbCxcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXFxcXFxcXFxcInJpY2hfdGV4dFxcXFxcXFxcXFxcXFxcXCIsXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE4LFxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcXFxcXFxcbiAgICAgICAgICAgICAgICB9KSxcXFxcXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IGptLmxlbmd0aCA+IDUgPyAndGV4dF8xJyA6ICd0ZXh0XzEnLFxcXFxcXFxcbiAgICAgICAgICAgIH0pO1xcXFxcXFxcbiAgICAgICAgfVxcXFxcXFxcbiAgICB9IGVsc2Uge1xcXFxcXFxcbiAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBsaXN0Lmxlbmd0aDsgaisrKSB7XFxcXFxcXFxuICAgICAgICAgICAgdmFyIGptID0gcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdUZXh0Jyk7XFxcXFxcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGptLFxcXFxcXFxcbiAgICAgICAgICAgICAgICB1cmw6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJykgKyBcXFxcXFxcXFxcXFxcXFwiI2F1dG9QYWdlIyNyZWFkVGhlbWUjXFxcXFxcXFxcXFxcXFxcIiArIGBAcnVsZT1qczpgICsgJC50b1N0cmluZygoKSA9PiB7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgZCA9IFtdO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRlc190aXRsZSA9IHBhcnNlRG9tRm9ySHRtbChnZXRSZXNDb2RlKCksICcjYzEmJmgxJiZUZXh0Jyk7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnPGJpZz4nICsgZGVzX3RpdGxlICsgJzwvYmlnPicsXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29udCA9IHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCAnI2NvbnRlbnQmJnAnKTtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gY29udC5tYXAoaXQgPT4gJ+OAgOOAgCcgKyBwYXJzZURvbUZvckh0bWwoaXQsICdwJiZIdG1sJykpLmpvaW4oXFxcXFxcXFxcXFxcXFxcIjxicj48YnI+XFxcXFxcXFxcXFxcXFxcIik7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBodG1sLFxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcXFxcXFxcXFwicmljaF90ZXh0XFxcXFxcXFxcXFxcXFxcIixcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTgsXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxcXFxcbiAgICAgICAgICAgIC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=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement