xiaomianao666

小程序:tgx音乐

Sep 27th, 2024
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@tgx音乐@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoidGd46Z+z5LmQIiwiYXV0aG9yIjoiVGhvbWFz5ZayIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MjAyMzA4MDgsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoibXVzaWMiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczokLnJlcXVpcmUoJ2hvbWU/cnVsZT10Z3jpn7PkuZAnKTsiLCJzZWFyY2hfdXJsIjoiaGlrZXI6Ly9lbXB0eSMjI2Z5cGFnZSMjIyoqIiwiZ3JvdXAiOiLikaRNViIsInNlYXJjaEZpbmQiOiJqczokLnJlcXVpcmUoJ3NlYXJjaD9ydWxlPXRneOmfs+S5kCcpOyIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoicGMiLCJwcmVSdWxlIjoiIiwicGFnZXMiOiJbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuKRoemAmueUqOWHveaVsFwiLFwicGF0aFwiOlwiaW5mb1wiLFwicnVsZVwiOlwianM6XFxuY29uc3QgcGNhcGkgPSBcXFwiaHR0cHM6Ly93d3cua3V3by5jbi9hcGkvXFxcIjtcXG5jb25zdCBlbXB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oXywgc2kpID0+IHtcXG4gICAgdHJ5IHtcXG4gICAgICAgIGlmIChzaSA9PT0gMSkgeyAvLyDmrYzmm7JcXG4gICAgICAgICAgICBuZXdEYXRhID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogKF8uc29uZ05hbWUgfHwgXy5uYW1lKSArICcgLSAnICsgXy5hcnRpc3QsXFxuICAgICAgICAgICAgICAgIGltZzogXy5waWMsXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICdcXFxcbvCflJYgJyArIChfLmlzTGlzdGVuRmVlID09IHRydWUgPyAnUGFpZCcgOiAnRnJlZScpICsgJ011c2lj44CA8J+TgCAnICsgKF8uYWxidW0gfHwgJ+aaguaXoOS4k+i+kScpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiAn8J+TvCAnICsgXy5zb25nVGltZU1pbnV0ZXMsXFxuICAgICAgICAgICAgICAgIHVybDogKF8uaWQgfHwgXy5yaWQpICsgbGF6eTEsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBnZXRJdGVtKCd0eXBlJywgJ2NhcmRfcGljXzMnKVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9IGVsc2UgaWYgKHNpID09PSAyKSB7IC8vIOS4k+i+kVxcbiAgICAgICAgICAgIG5ld0RhdGEgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBfLmFsYnVtLFxcbiAgICAgICAgICAgICAgICBpbWc6IF8ucGljLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiAnXFxcXG7wn467ICcgKyBfLmFydGlzdCArICfjgIDwn5OAICcgKyAoXy5hbGJ1bSB8fCAn5pqC5peg5LiT6L6RJyksXFxuICAgICAgICAgICAgICAgIGRlc2M6ICfwn5OGICcgKyBfLnJlbGVhc2VEYXRlLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkpLnJ1bGUoKGFsYnVtaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2luZm8/cnVsZT10Z3jpn7PkuZAnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhamF4P3J1bGU9dGd46Z+z5LmQXFxcIikocGNhcGkgKyBcXFwid3d3L2FsYnVtL2FsYnVtSW5mbz9hbGJ1bUlkPVxcXCIgKyBhbGJ1bWlkICsgXFxcIiZwbj1cXFwiICsgTVlfUEFHRSArIFxcXCImcm49MzAmXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBfLm11c2ljTGlzdC5tYXAoXyA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIExpc3RfUHVzaChfLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICB9LCBfLmFsYnVtaWQpXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0gZWxzZSBpZiAoc2kgPT09IDMpIHsgLy8gTVZcXG4gICAgICAgICAgICBuZXdEYXRhID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXy5uYW1lICsgJyAtICcgKyBfLmFydGlzdCxcXG4gICAgICAgICAgICAgICAgaW1nOiBfLnBpYyxcXG4gICAgICAgICAgICAgICAgY29udGVudDogJ1xcXFxu8J+UpSAnICsgXy5tdlBsYXlDbnQsXFxuICAgICAgICAgICAgICAgIGRlc2M6ICfwn5O8ICcgKyBfLnNvbmdUaW1lTWludXRlcyxcXG4gICAgICAgICAgICAgICAgdXJsOiAoXy5pZCB8fCBfLnJpZCkgKyAkKFxcXCJcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9pbmZvP3J1bGU9dGd46Z+z5LmQJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImFqYXg/cnVsZT10Z3jpn7PkuZBcXFwiKShwY2FwaSArIFxcXCJ2MS93d3cvbXVzaWMvcGxheVVybD9taWQ9XFxcIiArIGlucHV0ICsgXFxcIiZ0eXBlPW12JlxcXCIpLnVybFxcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdjYXJkX3BpY18zJ1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9IGVsc2UgaWYgKHNpID09PSA0KSB7IC8vIOatjOWNlVxcbiAgICAgICAgICAgIG5ld0RhdGEgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBfLm5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogXy5pbWcsXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICdcXFxcbvCfjrsgJyArIChfLnVzZXJOYW1lIHx8IF8udW5hbWUpICsgJ+OAgPCfk58gJyArIF8udG90YWwgKyAn6aaW5q2M5puyJyxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ/CflKUgJyArIF8ubGlzdGVuY250LFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkpLnJ1bGUoKGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9pbmZvP3J1bGU9dGd46Z+z5LmQJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiYWpheD9ydWxlPXRneOmfs+S5kFxcXCIpKHBjYXBpICsgXFxcInd3dy9wbGF5bGlzdC9wbGF5TGlzdEluZm8/cGlkPVxcXCIgKyBpZCArIFxcXCImcG49XFxcIiArIE1ZX1BBR0UgKyBcXFwiJnJuPTMwJlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgXy5tdXNpY0xpc3QubWFwKF8gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIExpc3RfUHVzaChfLCAxKVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIF8uaWQpXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0gZWxzZSBpZiAoc2kgPT09IDUpIHsgLy8g5q2M5omLXFxuICAgICAgICAgICAgbmV3RGF0YSA9IHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IF8ubmFtZSxcXG4gICAgICAgICAgICAgICAgaW1nOiBfLnBpYyxcXG4gICAgICAgICAgICAgICAgY29udGVudDogJ1xcXFxu8J+TnyAnICsgXy5tdXNpY051bSArICfpppbmrYzmm7InLFxcbiAgICAgICAgICAgICAgICBkZXNjOiAn8J+MkCAnICsgXy5jb3VudHJ5LFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkpLnJ1bGUoKGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9pbmZvP3J1bGU9dGd46Z+z5LmQJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiYWpheD9ydWxlPXRneOmfs+S5kFxcXCIpKHBjYXBpICsgXFxcInd3dy9hcnRpc3QvYXJ0aXN0TXVzaWM/YXJ0aXN0aWQ9XFxcIiArIGlkICsgXFxcIiZwbj1cXFwiICsgTVlfUEFHRSArIFxcXCImcm49MzAmXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBfLmxpc3QubWFwKF8gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIExpc3RfUHVzaChfLCAxKVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIF8uaWQpXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIEV4dHJhKG5ld0RhdGEsIHNpLCAoXy5pZCB8fCBfLnJpZCB8fCBfLmFsYnVtaWQpKTtcXG4gICAgfSBjYXRjaCAoZXJyKSB7XFxuICAgICAgICBsb2coZXJyKVxcbiAgICB9XFxufVxcblxcblxcbm1hcEhpc3RvcnkgPSAoaGlzdG9yeSkgPT4ge1xcbiAgICBsZXQgaSA9IDAsXFxuICAgICAgICBpZCA9IFxcXCJ0Z3jpn7PkuZBcXFwiO1xcbiAgICBmb3IgKGxldCBrZXkgb2YgaGlzdG9yeSkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZToga2V5LFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoa2V5LHNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignc29rZXknLCBrZXkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9zZWFyY2g/cz1cXFwiICsga2V5ICsgXFxcIiMjI1xcXCIgKyBzaWQgKyBcXFwiJnJ1bGU9dGd46Z+z5LmQXFxcIjtcXG4gICAgICAgICAgICB9LCBrZXksIGdldE15VmFyKCdpbnB1dDInLCBnZXRJdGVtKCdzaWQnLCAnMScpKSksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJmbGV4X2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IGlkICsgXFxcIjprZXk6XFxcIiArIGtleSxcXG4gICAgICAgICAgICAgICAgY2xzOiBpZCArIFxcXCI6a2V5XFxcIixcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLliKDpmaTlhbPplK7or406XFxcIiArIGtleSxcXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChpZCwga2V5LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhpc3RvcnkgPSBzdG9yYWdlMC5nZXRJdGVtKFxcXCJzZWFyY2hIaXN0b3J5XFxcIiwgW10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpc3Rvcnkuc3BsaWNlKGksIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oXFxcInNlYXJjaEhpc3RvcnlcXFwiLCBoaXN0b3J5KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGlzdG9yeS5sZW5ndGggPT0gMCkgYWRkSXRlbUFmdGVyKGlkICsgXFxcIjpzZWFyY2hIaXN0b3J5XFxcIiwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLigJzigJzigJ3igJ1cXFwiICsgXFxcIn5+fuS7gOS5iOmDveayoeacieWTpn5+flxcXCIuZm9udGNvbG9yKFxcXCJHcmF5XFxcIiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGlkICsgXFxcIjprZXlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtKGlkICsgXFxcIjprZXk6XFxcIiArIGtleSk7XFxuICAgICAgICAgICAgICAgICAgICB9LCBpZCwga2V5LCBpKVxcbiAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgaSsrO1xcbiAgICB9XFxufVxcblxcblxcblxcbkV4dHJhID0gKG5ld0RhdGEsIHNpLCB6eWlkKSA9PiB7XFxuICAgIG5ld0RhdGEuZXh0cmEgPSB7XFxuICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLimIUg5YiG5Lqr6ZO+5o6lIOKYhVxcXCIsXFxuICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNpLCB6eWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImNvbGxlY3Rpb24yP3J1bGU9dGd46Z+z5LmQXFxcIikuY29weXVybChzaSwgenlpZCk7XFxuICAgICAgICAgICAgfSwgc2ksIHp5aWQpXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLimIUg5pS26JePXFxcIiArIHNhcnJbc2ldWzBdICsgXFxcIiDimIVcXFwiLFxcbiAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChuZXdEYXRhLCBzaSkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJjb2xsZWN0aW9uMj9ydWxlPXRneOmfs+S5kFxcXCIpLmxvZ0RhdGEobmV3RGF0YSwgc2kpO1xcbiAgICAgICAgICAgIH0sIG5ld0RhdGEsIHNpKVxcbiAgICAgICAgfV1cXG4gICAgfTtcXG4gICAgcmV0dXJuIGQucHVzaChuZXdEYXRhKTtcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLikaXogZrlkIjmkJzntKJcIixcInBhdGhcIjpcInNlYXJjaFwiLFwicnVsZVwiOlwianM6XFxu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FxcInd3dy9hbGJ1bS9hbGJ1bUluZm8/YWxidW1JZD1cXFwiICsgaWQgKyBcXFwiJnBuPTEmcm49MSZcXFwiKTtcXG4gICAgICAgIExpc3RfUHVzaChfLCAyKTtcXG4gICAgfSBlbHNlIGlmIChtYXQoL1xcXFwvbXZwbGF5KFxcXFwvXFxcXGQrKT9cXFxcLyhcXFxcZCspL2kpKSB7XFxuICAgICAgICAkLnJlcXVpcmUoXFxcImFqYXg/cnVsZT10Z3jpn7PkuZBcXFwiKShwY2FwaSArIFxcXCJ3d3cvbXVzaWMvbXVzaWNJbmZvP21pZD1cXFwiICsgaWQgKyBcXFwiJmlwPSZjaXA9JlxcXCIpO1xcbiAgICAgICAgaWYgKF8pXFxuICAgICAgICAgICAgTGlzdF9QdXNoKF8sIDMpO1xcbiAgICAgICAgZWxzZSB7XFxuICAgICAgICAgICAgZGl2ID0gZmV0Y2hDb2RlQnlXZWJWaWV3KHNva2V5LCB7XFxuICAgICAgICAgICAgICAgICdibG9ja1J1bGVzJzogWycucG5nJywgJy5qcGcnLCAnLmNzcyddLFxcbiAgICAgICAgICAgICAgICB0aW1lb3V0OiA5OTk5XFxuICAgICAgICAgICAgfSkubWF0Y2goLyhcXFxcKGZ1bmN0aW9uXFxcXChbXFxcXFNcXFxcc10rXFxcXClcXFxcKSk7LylbMV07XFxuICAgICAgICAgICAgXyA9IGV2YWwoZGl2KS5kYXRhWzBdLlZpZGVvSW5mbztcXG4gICAgICAgICAgICBzID0gXy5kdXJhdGlvbiAlIDYwXFxuICAgICAgICAgICAgbSA9IF8uZHVyYXRpb24gLSBzXFxuICAgICAgICAgICAgdGltZSA9IG0gLyA2MCArICc6JyArIHNcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXy5uYW1lLFxcbiAgICAgICAgICAgICAgICBpbWc6IF8ucGljLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiAgJ/CflKUgJyArIF8uY291bnRfcGxheSsnXFx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sgc29rZXkgKyBcXFwiJnJ1bGU9dWNra+S6kVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBydWxlczogJC50b1N0cmluZygoc2FyciwgaW5wdXQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBzYXJyWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNhcnIubWFwKFt0aXRsZSwgc2lkXSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwidGl0bGVcXFwiOiB0aXRsZS5yZXBsYWNlKC8mbmJzcDsvZywgJyAnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzZWFyY2hfdXJsXFxcIjogXFxcImhpa2VyOi8vZW1wdHkjIyNmeXBhZ2UjIyNcXFwiICsgaW5wdXQgKyBcXFwiIyMjXFxcIiArIHNpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzZWFyY2hGaW5kXFxcIjogXFxcImpzOiAkLnJlcXVpcmUoJ3NlYXJjaD9ydWxlPXRneOmfs+S5kCcpO1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoZGF0YSk7XFxuICAgICAgICAgICAgICAgICAgICB9LCBzYXJyLCBzb2tleSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgYnJlYWs7XFxuXFxuXFxuXFxuICAgICAgICBjYXNlICcxJzpcXG4gICAgICAgICAgICBzdXJsKCdNdXNpYycpO1xcbiAgICAgICAgICAgIF8ubGlzdC5tYXAoXyA9PiBMaXN0X1B1c2goXywgMSkpO1xcbiAgICAgICAgICAgIGJyZWFrO1xcblxcblxcblxcbiAgICAgICAgY2FzZSAnMic6XFxuICAgICAgICAgICAgc3VybCgnQWxidW0nKTtcXG4gICAgICAgICAgICBfLmFsYnVtTGlzdC5tYXAoXyA9PiBMaXN0X1B1c2goXywgMikpO1xcbiAgICAgICAgICAgIGJyZWFrO1xcblxcblxcblxcbiAgICAgICAgY2FzZSAnMyc6XFxuICAgICAgICAgICAgc3VybCgnTXYnKTtcXG4gICAgICAgICAgICBfLm12bGlzdC5tYXAoXyA9PiBMaXN0X1B1c2goXywgMykpO1xcbiAgICAgICAgICAgIGJyZWFrO1xcblxcblxcblxcbiAgICAgICAgY2FzZSAnNCc6XFxuICAgICAgICAgICAgc3VybCgnUGxheUxpc3QnKTtcXG4gICAgICAgICAgICBfLmxpc3QubWFwKF8gPT4gTGlzdF9QdXNoKF8sIDQpKTtcXG4gICAgICAgICAgICBicmVhaztcXG5cXG5cXG5cXG4gICAgICAgIGNhc2UgJzUnOlxcbiAgICAgICAgICAgIHN1cmwoJ0FydGlzdCcpO1xcbiAgICAgICAgICAgIF8ubGlzdC5tYXAoXyA9PiBMaXN0X1B1c2goXywgNSkpO1xcbiAgICAgICAgICAgIGJyZWFrO1xcblxcblxcblxcbiAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIumUmeivr+eahOaQnOe0ouaOpeWPo1xcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgfSlcXG4gICAgfVxcbn1cXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLikaLnqIvluo/pppbpobVcIixcInBhdGhcIjpcImhvbWVcIixcInJ1bGVcIjpcImpzOlx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gICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCd0aWQnLCBnZXRJdGVtKCd0aWQnLCAnMCcpKSA9PSB0aWQgPyBSaWNoKFN0cm9uZyhDb2xvcihuYW1lKSkpIDogbmFtZS5yZXBsYWNlKC8mbmJzcDsvZywgJyAnKSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh0aWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCd0aWQnLCB0aWQpO1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignaWknKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgIH0sIHRpZCksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiNmZjY2MDFcXFwiPjxiPui9rOWIsCBUR1jmlLbol488L2I+PC9zcGFuPicsXFxuICAgICAgICAgICAgZGVzYzogJ+atjOWNleaUtuiXjycsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2NvbGxlY3Rpb24jbm9IaXN0b3J5IyNub1JlY29yZEhpc3RvcnkjXFxcIixcXG4gICAgICAgICAgICBpbWc6ICdodHRwczovL2docHJveHkuY29tL2h0dHBzOi8vcmF3Lmd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ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn6auY57qn5pCc57SiJyxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2Uvc2VhcmNoMiNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSMnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICB9KTtcXG4gICAgfVxcblxcblxcblxcbiAgICDorr7nva4gPSAwO1xcbiAgICB0aWQgPSBnZXRNeVZhcigndGlkJywgZ2V0SXRlbSgndGlkJywgJzAnKSk7XFxuICAgIHRpaSA9IGdldE15VmFyKCdpaScsIGdldEl0ZW0oJ2lpXzBfJyArIHRpZCwgJzAnKSk7XFxuICAgIGlmICh0aWQgPCA3KSB7XFxuICAgICAgICBpVGFnID0gc3RvcmFnZTAuZ2V0TXlWYXIoXFxcImlUYWdcXFwiKTtcXG4gICAgICAgIGlmIChpVGFnID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgaVRhZyA9ICQucmVxdWlyZShcXFwiYWpheD9ydWxlPXRneOmfs+S5kFxcXCIpKHBjYXBpICsgXFxcInd3dy9wbGF5bGlzdC9nZXRUYWdMaXN0P1xcXCIpO1xcbiAgICAgICAgICAgIGlUYWcgPSBbe1xcbiAgICAgICAgICAgICAgICBuYW1lOiBcXFwi5o6o6I2QXFxcIixcXG4gICAgICAgICAgICAgICAgZGF0YTogW3tcXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFxcXCLmr4/ml6XmjqjojZBcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJyY20vaW5kZXgvcGxheWxpc3Q/aWQ9cmNtXFxcIlxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcXFwi5pyA5paw57K+6YCJXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBcXFwiY2xhc3NpZnkvcGxheWxpc3QvZ2V0UmNtUGxheUxpc3Q/b3JkZXI9bmV3XFxcIlxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcXFwi54Ot6Zeo57K+6YCJXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBcXFwiY2xhc3NpZnkvcGxheWxpc3QvZ2V0UmNtUGxheUxpc3Q/b3JkZXI9aG90XFxcIlxcbiAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgIH1dLmNvbmNhdChpVGFnKTtcXG4gICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwiaVRhZ1xcXCIsIGlUYWcpO1xcbiAgICAgICAgfVxcbiAgICAgICAgenUgPSBpVGFnW3RpZF0uZGF0YS5tYXAoXyA9PiBfLm5hbWUpO1xcbiAgICAgICAgbGVuID0genUubGVuZ3RoO1xcbiAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPGI+PGZvbnQgY29sb3I9I2ZmNjYwMT4nICsgdGFyclt0aWRdICsgJzwvZm9udD48L2I+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGlUYWdbdGlkXS5kYXRhLm1hcCgoXywgaWkpID0+IHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aWkgPT0gaWkgPyBSaWNoKFN0cm9uZyhDb2xvcihfLm5hbWUpKSkgOiBfLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGlpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lpJywgaWkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgICAgICB9LCBpaSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGluc3RhbGwoKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh0aWkgPT0gbGVuKSB7XFxuICAgICAgICAgICAg6K6+572uID0gMTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSB8fCAhKHRpZCA9PSAnMCcgJiYgdGlpID09ICcwJykpIHtcXG4gICAgICAgICAgICAgICAgaWQgPSBpVGFnW3RpZF0uZGF0YVt0aWldLmlkO1xcbiAgICAgICAgICAgICAgICBpZiAodGlkICE9ICcwJykge1xcbiAgICAgICAgICAgICAgICAgICAgaWQgPSBcXFwiY2xhc3NpZnkvcGxheWxpc3QvZ2V0VGFnUGxheUxpc3Q/aWQ9XFxcIiArIGlkO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiYWpheD9ydWxlPXRneOmfs+S5kFxcXCIpKHBjYXBpICsgXFxcInd3dy9cXFwiICsgaWQgKyBcXFwiJnBuPVxcXCIgKyBNWV9QQUdFICsgXFxcIiZybj0zMCZcXFwiKTtcXG4gICAgICAgICAgICAgICAgKF8uZGF0YSB8fCBfLmxpc3QpLm1hcChfID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIEV4dHJhKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXy5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogXy5pbWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKGVtcHR5KS5ydWxlKChpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9pbmZvP3J1bGU9dGd46Z+z5LmQJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhamF4P3J1bGU9dGd46Z+z5LmQXFxcIikocGNhcGkgKyBcXFwid3d3L3BsYXlsaXN0L3BsYXlMaXN0SW5mbz9waWQ9XFxcIiArIGlkICsgXFxcIiZwbj1cXFwiICsgTVlfUEFHRSArIFxcXCImcm49MzAmXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXy5tdXNpY0xpc3QubWFwKF8gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTGlzdF9QdXNoKF8sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIF8uaWQpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnY2FyZF9waWNfMydcXG4gICAgICAgICAgICAgICAgICAgIH0sIDQsIF8uaWQpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIGlmICh0aWQgPT0gNykge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiPjxmb250IGNvbG9yPSNmZjY2MDE+5o6S6KGMPC9mb250PjwvYj4nLFxcbiAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBfID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2JhbmcnKVxcbiAgICAgICAgaWYgKF8gPT0gJycpIHtcXG4gICAgICAgICAgICBfID0gJC5yZXF1aXJlKFxcXCJhamF4P3J1bGU9dGd46Z+z5LmQXFxcIikocGNhcGkgKyBcXFwid3d3L2JhbmcvYmFuZy9iYW5nTWVudT9cXFwiKTtcXG4gICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignYmFuZycsIF8pO1xcbiAgICAgICAgfVxcbiAgICAgICAgXy5mb3JFYWNoKChfLCBpaSkgPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aWkgPT0gaWkgPyBSaWNoKFN0cm9uZyhDb2xvcihfLm5hbWUpKSkgOiBfLm5hbWUsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaWkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdpaScsIGlpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgfSwgaWkpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIHp1ID0gW107XFxuICAgICAgICBfLmZvckVhY2goXyA9PiB6dS5wdXNoKF8ubmFtZSkpO1xcbiAgICAgICAgbGVuID0genUubGVuZ3RoO1xcbiAgICAgICAgaW5zdGFsbCgpO1xcbiAgICAgICAgaWYgKHRpaSA9PSBsZW4pIHtcXG4gICAgICAgICAgICDorr7nva4gPSAxO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBfW3RpaV0ubGlzdC5tYXAoXyA9PiB7XFxuICAgICAgICAgICAgICAgIEV4dHJhKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBfLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IF8ucGljLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKGVtcHR5KS5ydWxlKChzb3VyY2VpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2luZm8/cnVsZT10Z3jpn7PkuZAnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiYWpheD9ydWxlPXRneOmfs+S5kFxcXCIpKHBjYXBpICsgXFxcInd3dy9iYW5nL2JhbmcvbXVzaWNMaXN0P2JhbmdJZD1cXFwiICsgc291cmNlaWQgKyBcXFwiJnBuPVxcXCIgKyBNWV9QQUdFICsgXFxcIiZybj0zMCZcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgXy5tdXNpY0xpc3QubWFwKF8gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBMaXN0X1B1c2goXywgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgXy5zb3VyY2VpZCksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2NhcmRfcGljXzMnXFxuICAgICAgICAgICAgICAgIH0sIDQsIFxcXCJyYW5rTGlzdFxcXCIpXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0gZWxzZSBpZiAodGlkID09IDgpIHtcXG4gICAgICAgIHp1ID0gW1xcXCLlhajpg6hcXFwiLCBcXFwi5Y2O6K+t55S3XFxcIiwgXFxcIuWNjuivreWls1xcXCIsIFxcXCLljY7or63nu4TlkIhcXFwiLCBcXFwi5pel6Z+p55S3XFxcIiwgXFxcIuaXpemfqeWls1xcXCIsIFxcXCLml6Xpn6nnu4TlkIhcXFwiLCBcXFwi5qyn576O55S3XFxcIiwgXFxcIuasp+e+juWls1xcXCIsIFxcXCLmrKfnvo7nu4TlkIhcXFwiLCBcXFwi5YW25LuWXFxcIl07XFxuICAgICAgICBsZW4gPSB6dS5sZW5ndGg7XFxuICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8Yj48Zm9udCBjb2xvcj0jZmY2NjAxPuatjOaJizwvZm9udD48L2I+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHp1Lm1hcCgobmFtZSwgaWkpID0+IHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aWkgPT0gaWkgPyBSaWNoKFN0cm9uZyhDb2xvcihuYW1lKSkpIDogbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaWkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaWknLCBpaSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgICAgIH0sIGlpKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgaW5zdGFsbCgpO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaWYgKHRpaSA9PSBsZW4pIHtcXG4gICAgICAgICAgICDorr7nva4gPSAxO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAkLnJlcXVpcmUoXFxcImFqYXg/cnVsZT10Z3jpn7PkuZBcXFwiKShcXFwiaHR0cHM6Ly93YXBpLmt1d28uY24vYXBpL3d3dy9hcnRpc3QvYXJ0aXN0SW5mbz9jYXRlZ29yeT1cXFwiICsgZ2V0TXlWYXIoJ2lpJywgJzAnKSArIFxcXCImcHJlZml4PSZwbj1cXFwiICsgTVlfUEFHRSArIFxcXCImcm49MzAmXFxcIik7XFxuICAgICAgICAgICAgXy5hcnRpc3RMaXN0Lm1hcChfID0+IHtcXG4gICAgICAgICAgICAgICAgRXh0cmEoe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IF8ubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogXy5waWMsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkpLnJ1bGUoKGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvaW5mbz9ydWxlPXRneOmfs+S5kCcsIHt9KSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhamF4P3J1bGU9dGd46Z+z5LmQXFxcIikocGNhcGkgKyBcXFwid3d3L2FydGlzdC9hcnRpc3RNdXNpYz9hcnRpc3RpZD1cXFwiICsgaWQgKyBcXFwiJnBuPVxcXCIgKyBNWV9QQUdFICsgXFxcIiZybj0zMCZcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgXy5saXN0Lm1hcChfID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTGlzdF9QdXNoKF8sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIF8uaWQpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdjYXJkX3BpY18zJ1xcbiAgICAgICAgICAgICAgICB9LCA1LCBfLmlkKVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9IGVsc2UgaWYgKHRpZCA9PSA5KSB7XFxuICAgICAgICB6dSA9IFtcXFwi6aaW5pKtXFxcIiwgXFxcIuWNjuivrVxcXCIsIFxcXCLml6Xpn6lcXFwiLCBcXFwi572R57ucXFxcIiwgXFxcIuasp+e+jlxcXCIsIFxcXCLnjrDlnLpcXFwiLCBcXFwi54Ot6IieXFxcIiwgXFxcIuS8pOaEn1xcXCIsIFxcXCLliafmg4VcXFwiXTtcXG4gICAgICAgIGxlbiA9IHp1Lmxlbmd0aDtcXG4gICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiPjxmb250IGNvbG9yPSNmZjY2MDE+TVY8L2ZvbnQ+PC9iPicsXFxuICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB6dS5tYXAoKG5hbWUsIGlpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGlpID09IGlpID8gUmljaChTdHJvbmcoQ29sb3IobmFtZSkpKSA6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGlpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lpJywgaWkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgICAgICB9LCBpaSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGluc3RhbGwoKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh0aWkgPT0gbGVuKSB7XFxuICAgICAgICAgICAg6K6+572uID0gMTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhamF4P3J1bGU9dGd46Z+z5LmQXFxcIikocGNhcGkgKyBcXFwid3d3L211c2ljL212TGlzdD9waWQ9XFxcIiArIChbMjM2NjgyODcxLCAyMzY2ODI3MzEsIDIzNjc0MjQ0NCwgMjM2NjgyNzczLCAyMzY2ODI3MzUsIDIzNjc0MjU3NiwgMjM2NjgyNzc3LCAyMzY3NDI1MDgsIDIzNjc0MjU3OF1bZ2V0TXlWYXIoJ2lpJywgJzAnKV0pICsgXFxcIiZwbj1cXFwiICsgTVlfUEFHRSArIFxcXCImcm49MzAmXFxcIik7XFxuICAgICAgICAgICAgXy5tdmxpc3QubWFwKF8gPT4gTGlzdF9QdXNoKF8sIDMpKTtcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8Yj48Zm9udCBjb2xvcj0jZmY2NjAxPuiuvue9rjwvZm9udD48L2I+JyxcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIuehruWumuaBouWkjem7mOiupOiuvue9ruWQl++8n1xcXCIpLmNvbmZpcm0oKHNhcnIpID0+IHtcXG4gICAgICAgICAgICAgICAgY2xlYXJJdGVtKCd0eXBlXzEnKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJJdGVtKCd0eXBlXzAnKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJJdGVtKCd0eXBlJyk7XFxuICAgICAgICAgICAgICAgIGNsZWFySXRlbSgndGlkJyk7XFxuICAgICAgICAgICAgICAgIGNsZWFySXRlbSgnc2lkJyk7XFxuICAgICAgICAgICAgICAgIGNsZWFySXRlbSgnc2knKTtcXG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspXFxuICAgICAgICAgICAgICAgICAgICBjbGVhckl0ZW0oJ2lpXzBfJyArIGkpO1xcbiAgICAgICAgICAgICAgICBmb3IgKGl0IG9mIHNhcnIpXFxuICAgICAgICAgICAgICAgICAgICBjbGVhckl0ZW0oJ2lpXzFfJyArIGl0WzFdKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgc2FyciksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIFtcXFwi5Z+656GAXFxcIiwgXFxcIuS4u+mhtVxcXCIsIFxcXCLmkJzntKJcXFwiXS5tYXAoKG5hbWUsIGlpKSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCdpaScsICcwJykgPT0gaWkgPyBSaWNoKFN0cm9uZyhDb2xvcihuYW1lKSkpIDogbmFtZSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lpJywgaWkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICB9LCBpaSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgaWkgPSBnZXRNeVZhcignaWknLCAnMCcpO1xcbiAgICAgICAgaWYgKGlpID09ICcwJykge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5YiG57uE6K6+572uJyxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ+WIhuexu+aYvuekuuWIhue7hOiuvue9ricsXFxuICAgICAgICAgICAgICAgIHVybDogJChcXFwi56Gu5a6a6YeN572u5YiG57uE55u45YWz6K6+572u5ZCX77yfXFxcIikuY29uZmlybSgobGVuMSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKCd0eXBlXzAnKTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW4xOyBpKyspXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKCdpaV8wXycgKyBpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgdGlkKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJzxiPuWQr+eUqOiuvue9rjwvYj4nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgndHlwZV8wJywgc2lkKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgfSwgZ2V0SXRlbSgndHlwZV8wJywgJzAnKSA9PSAnMScgPyAnMCcgOiAnMScpLFxcbiAgICAgICAgICAgICAgICBpbWc6ICdodHRwczovL2hpa2VyZmFucy5jb20vdHViaWFvL21lc3N5LycgKyAoZ2V0SXRlbSgndHlwZV8wJywgJzAnKSA9PSAxID8gNTUgOiA2MykgKyAnLnN2ZycsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9pY29uJ1xcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfpu5jorqTmoLflvI8nLFxcbiAgICAgICAgICAgICAgICBkZXNjOiAn5q2M5puy5YiX6KGo55qE6buY6K6k5qC35byPJyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKFxcXCLnoa7lrprmgaLlpI3pu5jorqTorr7nva7lkJfvvJ9cXFwiKS5jb25maXJtKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFySXRlbSgndHlwZScpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgWydjYXJkX3BpY18zJywgJ2F2YXRhcicsICd0ZXh0XzEnXS5tYXAobmFtZSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxiPicgKyBuYW1lICsgJzwvYj4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgndHlwZScsIG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgICAgICB9LCBuYW1lKSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vaGlrZXJmYW5zLmNvbS90dWJpYW8vbWVzc3kvJyArIChnZXRJdGVtKCd0eXBlJywgJ2NhcmRfcGljXzMnKSA9PSBuYW1lID8gNTUgOiA2MykgKyAnLnN2ZycsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfaWNvbidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuXFxuXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmo4DmtYvmm7TmlrBcXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5b2T5YmN54mI5pys77yaXFxcIiArIFN0cmluZyhKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vaG9tZUB0Z3jpn7PkuZBcXFwiKSkudmVyc2lvbikucmVwbGFjZSgvKFxcXFxkXFxcXGQpKFxcXFxkXFxcXGQpJC8sICctJDEtJDInKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiAkKFxcXCJoaWtlcjovL2VtcHR5XFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcblxcbiAgICAgICAgICAgICAgICAgICAgdnRpbWUgPSBOdW1iZXIoZ2V0SXRlbSgndnRpbWUnLCAnMCcpKSArIDZlNjtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGlmICh2dGltZSA8IG5ldyBEYXRlKCkuZ2V0VGltZSgpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmVyc2lvbiA9IEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9ob21lQHRneOmfs+S5kFxcXCIpKS52ZXJzaW9uO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IFxcXCJodHRwczovL3d3ci5sYW56b3VpLmNvbS9iMDNxaHYxNGRcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB3ZCA9IFxcXCJyZWFkXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFxcXCJNb3ppbGxhLzUuMCAoTGludXg7IEFuZHJvaWQgOC4wLjA7IE1JIDVzIFBsdXMgQnVpbGQvT1BSMS4xNzA2MjMuMDMyOyB3dikgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgVmVyc2lvbi80LjAgQ2hyb21lLzcxLjAuMzU3OC45OSBNb2JpbGUgU2FmYXJpLzUzNy4zNlxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnR0VUJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3JjID0gZmV0Y2godXJsLCBoZWFkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKHNyYy5tYXRjaCgvdmFyIHBnczsoW1xcXFxzXFxcXFNdKj9wZ3MuKzspLylbMV0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ189JyArIHNyYy5tYXRjaCgvZGF0YSA6KFtcXFxcc1xcXFxTXSo/XFxcXH0pLylbMV0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQuYm9keSA9IE9iamVjdC5rZXlzKF8pLm1hcChrZXkgPT4ga2V5ICsgXFxcIj1cXFwiICsgX1trZXldKS5qb2luKCcmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZC5tZXRob2QgPSAnUE9TVCc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsLnJlcGxhY2UoL1xcXFwuY29tLiovLCBcXFwiLmNvbS9maWxlbW9yZWFqYXgucGhwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXyA9IEpTT04ucGFyc2UoZmV0Y2godXJsLCBoZWFkKSkudGV4dFswXTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXy5uYW1lX2FsbC5tYXRjaCgvXFxcXFsoLispXFxcXF0vKVsxXS5zcGxpdCgnXycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHYgPSB+fm5hbWVbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgdnYgPSBuYW1lWzFdIHx8IDE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZlcnNpb24gPCB2IHx8ICh2ZXJzaW9uID09IHYgJiYgdnYgPiAxKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlybSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+abtOaWsOaPkOekuicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiAn5qOA5rWL5Yiw5L2g55qE6KeE5YiZ54mI5pys5bCP5LqO5pyN5Yqh5Zmo54mI5pys77yM5piv5ZCm56uL5Y2z5pu05paw77yfJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKGRhKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgndnRpbWUnLCBTdHJpbmcobmV3IERhdGUoKS5nZXRUaW1lKCkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IFxcXCJodHRwczovL2RldmVsb3Blci5sYW56b3VnLmNvbS9maWxlL1xcXCIgKyByZXF1ZXN0KGRhKS5tYXRjaCgvJyhcXFxcPy4qPyknLylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGsgPSBKU09OLnBhcnNlKGZldGNoKHUsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25seUhlYWRlcnM6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSkudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvX2ZpbGVTZWxlY3RfcnVsZS5qc29uXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEZpbGUoaywgZik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJcXFxcdTZkNzdcXFxcdTk2MTRcXFxcdTg5YzZcXFxcdTc1NGNcXFxcdWZmZTVob21lX3J1bGVfdXJsXFxcXHVmZmU1XFxcIiArIGdldFBhdGgoZik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB1cmwucmVwbGFjZSgvZmlsZW1vLiovLCAndHAvJyArIF8uaWQpKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbmNlbDogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgndnRpbWUnLCBTdHJpbmcobmV3IERhdGUoKS5nZXRUaW1lKCkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5rKh5pyJ5pu05paw5ZOmXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ov4fkuIDkvJrlho3nnIvnnIvlkKdcXFwiO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgfSBlbHNlIGlmIChpaSA9PSAnMScpIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+m7mOiupOS4u+mhtScsXFxuICAgICAgICAgICAgICAgIGRlc2M6ICfmiZPlvIDnqIvluo/ml7bpu5jorqTmiZPlvIAnLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoXFxcIuehruWumuaBouWkjem7mOiupOiuvue9ruWQl++8n1xcXCIpLmNvbmZpcm0oKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKCd0aWQnKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHRhcnIubWFwKChuYW1lLCB0aWQpID0+IHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnPGI+JyArIG5hbWUgKyAnPC9iPicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3RpZCcsIHRpZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgICAgIH0sIFN0cmluZyh0aWQpKSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vaGlrZXJmYW5zLmNvbS90dWJpYW8vbWVzc3kvJyArIChnZXRJdGVtKCd0aWQnLCAnMCcpID09IHRpZCA/IDU1IDogNjMpICsgJy5zdmcnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2ljb24nXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChpaSA9PSAyKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfpu5jorqTmkJzntKInLFxcbiAgICAgICAgICAgICAgICBkZXNjOiAn5Y6f55Sf5pCc57Si55qE6buY6K6k5o6l5Y+jJyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKFxcXCLnoa7lrprmgaLlpI3pu5jorqTorr7nva7lkJfvvJ9cXFwiKS5jb25maXJtKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFySXRlbSgnc2lkJyk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzYXJyLm1hcChbbmFtZSwgc2lkXSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxiPicgKyBuYW1lICsgJzwvYj4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdzaWQnLCBzaWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgICAgICB9LCBTdHJpbmcoc2lkKSksXFxuICAgICAgICAgICAgICAgICAgICBpbWc6ICdodHRwczovL2hpa2VyZmFucy5jb20vdHViaWFvL21lc3N5LycgKyAoZ2V0SXRlbSgnc2lkJywgJzEnKSA9PSBzaWQgPyA1NSA6IDYzKSArICcuc3ZnJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9pY29uJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBpZiAo6K6+572uKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn6buY6K6k5YiG57uEJyxcXG4gICAgICAgICAgICBkZXNjOiAn5omT5byA5YiG57G75ZCO55qE6buY6K6k5YiG57uEJyxcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIuehruWumuaBouWkjem7mOiupOiuvue9ruWQl++8n1xcXCIpLmNvbmZpcm0oKHRpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICBjbGVhckl0ZW0oJ2lpXzBfJyArIHRpZCk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIHRpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuICAgICAgICB9KTtcXG4gICAgICAgIHp1Lm1hcCgobmFtZSwgc2lkKSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICc8Yj4nICsgbmFtZSArICc8L2I+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpaV8wX3RpZCwgc2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKGlpXzBfdGlkLCBzaWQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICB9LCAnaWlfMF8nICsgdGlkLCBTdHJpbmcoc2lkKSksXFxuICAgICAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vaGlrZXJmYW5zLmNvbS90dWJpYW8vbWVzc3kvJyArIChnZXRJdGVtKCdpaV8wXycgKyB0aWQsICcwJykgPT0gc2lkID8gNTUgOiA2MykgKyAnLnN2ZycsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9pY29uJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSk7XFxuICAgIH1cXG59IGNhdGNoIChlcnJvcikge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFJpY2goU3Ryb25nKENvbG9yKCd+fn7lvZPliY3nvZHnu5zlvILluLjvvIzor7fliLfmlrDph43or5V+fn4nKSkpLFxcbiAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsaW5lVm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gICAgICAgICAgICBzYXJyID0gW3NhcnJbaW5wdXQyXV1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnNwbGl0KCcjIyMnKVswXVxcbiAgICAgICAgICAgICAgICBpZiAoIWdldE15VmFyKCdpbnB1dDInLCAnMScpLm1hdGNoKC9eKDk5OSk/JC8pKSB7XFxuICAgICAgICAgICAgICAgICAgICBzYXJyID0gW3NhcnJbZ2V0TXlWYXIoJ2lucHV0MicsICcxJyldXVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHNhcnJbMF07XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC9e6IGa5ZCIP+aQnOe0oj9cXFxccyovLCAnJyk7XFxuICAgICAgICAgICAgc2Fyci5tYXAoW3RpdGxlLCBzaWRdID0+IHtcXG4gICAgICAgICAgICAgICAgZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ0aXRsZVxcXCI6IHRpdGxlLnJlcGxhY2UoLyZuYnNwOy9nLCAnICcpLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInNlYXJjaF91cmxcXFwiOiBcXFwiaGlrZXI6Ly9lbXB0eSMjI2Z5cGFnZSMjI1xcXCIgKyBpbnB1dCArIFxcXCIjIyNcXFwiICsgc2lkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInNlYXJjaEZpbmRcXFwiOiBcXFwianM6ICQucmVxdWlyZSgnc2VhcmNoP3J1bGU9dGd46Z+z5LmQJyk7XFxcIlxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShkYXRhKTtcXG4gICAgICAgIH0sIHNhcnIpLFxcbiAgICAgICAgZGVmYXVsdF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naWlfMV8nICsgc2ksICcwJykpO1xcbmlmIChzaSAhPSA5OTkpIHtcXG4gICAgbGV0IHp5ID0gc3RvcmFnZTAuZ2V0SXRlbShcXFwiZGF0YV9cXFwiICsgc2kpO1xcbiAgICBpZiAoenkgPT09IFxcXCJcXFwiIHx8IEpTT04uc3RyaW5naWZ5KHp5KSA9PSAne30nKSB6eSA9IHtcXG4gICAgICAgIFxcXCLlhajpg6hcXFwiOiBbXVxcbiAgICB9LCBzdG9yYWdlMC5zZXRJdGVtKFxcXCJkYXRhX1xcXCIgKyBzaSwgenkpO1xcbiAgICBsZXQgenUgPSBbXTtcXG4gICAgZm9yIChpIGluIHp5KSB6dS5wdXNoKGkpO1xcbiAgICB6dS5jb25jYXQoXFxcIuiuvue9rlxcXCIpLm1hcCgobmFtZSwgaWkpID0+IHtcXG4gICAgICAgIGlmIChpaSAhPSB6dS5sZW5ndGggfHwgZ2V0SXRlbSgndHlwZV8xJywgJzEnKSA9PSAnMScpXFxuICAgICAgICAgICAgaWYgKGlpICE9IHp1Lmxlbmd0aCkgZXh0cmEgPSB7XFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5Yig6ZmkIFxcXCIgKyBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNpLCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcIuehruWumuWIoOmZpFxcXCIgKyBuYW1lICsgXFxcIuWQl++8n1xcXCIpLmNvbmZpcm0oKHNpLCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6eSA9IHN0b3JhZ2UwLmdldEl0ZW0oXFxcImRhdGFfXFxcIiArIHNpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHp5W25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckl0ZW0oJ2lpXzFfJyArIHNpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignaWknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJjb2xsZWN0aW9uMj9ydWxlPXRneOmfs+S5kFxcXCIpLnNldERhdGEoc2ksIHp5KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBzaSwgbmFtZSlcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNpLCBuYW1lKVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuaJk+W8gOS4uuS6jOe6p1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoc2ksIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSMnKS5ydWxlKChzaSwgbmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9pbmZvP3J1bGU9dGd46Z+z5LmQJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHp5ID0gc3RvcmFnZTAuZ2V0SXRlbShcXFwiZGF0YV9cXFwiICsgc2kpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHp5W25hbWVdLm1hcChfID0+IEV4dHJhKF8sIHNpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBzaSwgbmFtZSlcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNpLCBuYW1lKVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuS/ruaUueWQjeensFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoc2ksIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiXFxcIiwgXFxcIuivt+i+k+WFpeaWsOeahOe7hOWQjVxcXCIpLmlucHV0KChzaSwgbmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgenkgPSBzdG9yYWdlMC5nZXRJdGVtKFxcXCJkYXRhX1xcXCIgKyBzaSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpIGluIHp5KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaSA9PSBuYW1lKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbltpbnB1dF0gPSB6eVtpXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uW2ldID0genlbaV1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6eSA9IGpzb247XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiY29sbGVjdGlvbjI/cnVsZT10Z3jpn7PkuZBcXFwiKS5zZXREYXRhKHNpLCB6eSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2ksIG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgc2ksIG5hbWUpXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5pu05pS55o6S5bqPXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChzaSwgenUsIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpID0genUuaW5kZXhPZihuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB6dS5zcGxpY2UoaSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoenUuY29uY2F0KFxcXCLmnIDlkI7pnaJcXFwiKSwgMiwgJ+ivt+mAieaLqei1hOa6kOS9jee9ricpLnNlbGVjdCgoc2ksIHp1LCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6eSA9IHN0b3JhZ2UwLmdldEl0ZW0oXFxcImRhdGFfXFxcIiArIHNpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgb2YgenUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpID09IGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbltuYW1lXSA9IHp5W25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdpaScsIHp1LmluZGV4T2YoaSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbltpXSA9IHp5W2ldXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxcXCLmnIDlkI7pnaJcXFwiID09IGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uW25hbWVdID0genlbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaWknLCB6dS5sZW5ndGgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHp5ID0ganNvbjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJjb2xsZWN0aW9uMj9ydWxlPXRneOmfs+S5kFxcXCIpLnNldERhdGEoc2ksIHp5KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBzaSwgenUsIG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgc2ksIHp1LCBuYW1lKVxcbiAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgZWxzZSBleHRyYSA9IHt9O1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogdGkgPT0gaWkgPyBSaWNoKFN0cm9uZyhDb2xvcihuYW1lKSkpIDogbmFtZSxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGlpKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCdpaScsIGlpKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgfSwgaWkpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgZXh0cmE6IGV4dHJhXFxuICAgICAgICB9KTtcXG4gICAgfSk7XFxuICAgIGlmICh0aSAhPSB6dS5sZW5ndGgpIHtcXG4gICAgICAgIGlmIChKU09OLnN0cmluZ2lmeSh6dSkgPT0gJ1tcXFwi5YWo6YOoXFxcIl0nICYmIHp5W1xcXCLlhajpg6hcXFwiXS5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBcXFwifn5+5LuA5LmI6YO95rKh5pyJfn5+XFxcIi5mb250Y29sb3IoXFxcIkdyYXlcXFwiKVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB6eVt6dVt0aV1dLm1hcChfID0+IHtcXG4gICAgICAgICAgICAgICAgXy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuS/ruaUueWQjeensFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNpLCBrZXksIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQobmFtZSwgXFxcIuivt+i+k+WFpeaWsOeahOWQjeensFxcXCIpLmlucHV0KChzaSwga2V5LCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgenkgPSBzdG9yYWdlMC5nZXRJdGVtKFxcXCJkYXRhX1xcXCIgKyBzaSlba2V5XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHp5ID0genkubWFwKF8gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfLnRpdGxlID09IG5hbWUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXy50aXRsZSA9IGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiY29sbGVjdGlvbjI/cnVsZT10Z3jpn7PkuZBcXFwiKS5zZXREYXRhKHNpLCB6eSwga2V5KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2ksIGtleSwgbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2ksIHp1W3RpXSwgXy50aXRsZSlcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuS/ruaUueWwgemdolxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNpLCBrZXksIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQobmFtZSwgXFxcIuivt+i+k+WFpeato+ehrueahOWwgemdouWcsOWdgFxcXCIpLmlucHV0KChzaSwga2V5LCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgenkgPSBzdG9yYWdlMC5nZXRJdGVtKFxcXCJkYXRhX1xcXCIgKyBzaSlba2V5XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHp5ID0genkubWFwKF8gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfLmltZyA9PSBuYW1lKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8uaW1nID0gaW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJjb2xsZWN0aW9uMj9ydWxlPXRneOmfs+S5kFxcXCIpLnNldERhdGEoc2ksIHp5LCBrZXkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBzaSwga2V5LCBuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBzaSwgenVbdGldLCBfLmltZylcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuabtOaUueaOkuW6j1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNpLCBrZXksIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHp5ID0gc3RvcmFnZTAuZ2V0SXRlbShcXFwiZGF0YV9cXFwiICsgc2kpW2tleV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6dSA9IHp5Lm1hcChfID0+IF8udGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0genUuaW5kZXhPZihuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSA9IHp5W2ldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6eS5zcGxpY2UoaSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHp1LnNwbGljZShpLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoenUuY29uY2F0KFxcXCLmnIDlkI7pnaJcXFwiKSwgMSwgJ+ivt+mAieaLqei1hOa6kOS9jee9ricpLnNlbGVjdCgoc2ksIGtleSwgenksIHp1LCBkYXRhKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgaW4genUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoenVbaV0gPT0gaW5wdXQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi5wdXNoKGRhdGEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnB1c2goenlbaV0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxcXCLmnIDlkI7pnaJcXFwiID09IGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi5wdXNoKGRhdGEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgenkgPSBqc29uO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiY29sbGVjdGlvbjI/cnVsZT10Z3jpn7PkuZBcXFwiKS5zZXREYXRhKHNpLCB6eSwga2V5KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2ksIGtleSwgenksIHp1LCBkYXRhKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBzaSwgenVbdGldLCBfLnRpdGxlKVxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLliKDpmaQgXFxcIiArIF8udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoc2ksIGtleSwgbmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCLnoa7lrprliKDpmaRcXFwiICsgbmFtZSArIFxcXCLlkJfvvJ9cXFwiKS5jb25maXJtKChzaSwga2V5LCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6eSA9IHN0b3JhZ2UwLmdldEl0ZW0oXFxcImRhdGFfXFxcIiArIHNpKVtrZXldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgenUgPSB6eS5tYXAoXyA9PiBfLnRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IHp1LmluZGV4T2YobmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHp5LnNwbGljZShpLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJjb2xsZWN0aW9uMj9ydWxlPXRneOmfs+S5kFxcXCIpLnNldERhdGEoc2ksIHp5LCBrZXkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNpLCBrZXksIG5hbWUpXFxuICAgICAgICAgICAgICAgICAgICB9LCBzaSwgenVbdGldLCBfLnRpdGxlKVxcbiAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGQucHVzaChfKTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfpu5jorqTliIbnu4QnLFxcbiAgICAgICAgICAgIGRlc2M6ICfmiZPlvIDliIbnsbvlkI7nmoTpu5jorqTliIbnu4QnLFxcbiAgICAgICAgICAgIHVybDogJChcXFwi56Gu5a6a5oGi5aSN6buY6K6k6K6+572u5ZCX77yfXFxcIikuY29uZmlybSgoc2kpID0+IHtcXG4gICAgICAgICAgICAgICAgY2xlYXJJdGVtKCdpaV8xXycgKyBzaSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIHNpKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgenUubWFwKChuYW1lLCBzaWQpID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJzxiPicgKyBuYW1lICsgJzwvYj4nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGlpXzFfc2ksIHNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShpaV8xX3NpLCBzaWQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICB9LCAnaWlfMV8nICsgc2ksIFN0cmluZyhzaWQpKSxcXG4gICAgICAgICAgICAgICAgaW1nOiAnaHR0cHM6Ly9oaWtlcmZhbnMuY29tL3R1Ymlhby9tZXNzeS8nICsgKGdldEl0ZW0oJ2lpXzFfJyArIHN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FycilcXG4gICAgICAgICAgICAgICAgaWYgKGl0KSBjbGVhckl0ZW0oJ2lpXzFfJyArIGl0WzFdKTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgfSwgc2FyciksXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6ICc8Yj7liIbnu4Torr7nva48L2I+JyxcXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lkKSA9PiB7XFxuICAgICAgICAgICAgc2V0SXRlbSgndHlwZV8xJywgc2lkKTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgfSwgZ2V0SXRlbSgndHlwZV8xJywgJzEnKSA9PSAnMScgPyAnMCcgOiAnMScpLFxcbiAgICAgICAgaW1nOiAnaHR0cHM6Ly9oaWtlcmZhbnMuY29tL3R1Ymlhby9tZXNzeS8nICsgKGdldEl0ZW0oJ3R5cGVfMScsICcxJykgPT0gMSA/IDU1IDogNjMpICsgJy5zdmcnLFxcbiAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2ljb24nXFxuICAgIH0sIHtcXG4gICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+m7mOiupOWIhuexuycsXFxuICAgICAgICBkZXNjOiAn5omT5byA5pS26JeP5ZCO55qE6buY6K6k5YiG57G7JyxcXG4gICAgICAgIHVybDogJChcXFwi56Gu5a6a5oGi5aSN6buY6K6k6K6+572u5ZCX77yfXFxcIikuY29uZmlybSgoKSA9PiB7XFxuICAgICAgICAgICAgY2xlYXJJdGVtKCdzaScpO1xcbiAgICAgICAgICAg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5ID0ge1xcbiAgICAgICAgICAgIFxcXCLlhajpg6hcXFwiOiBbXVxcbiAgICAgICAgfSwgc3RvcmFnZTAuc2V0SXRlbShcXFwiZGF0YV9cXFwiICsgc2ksIHp5KTtcXG4gICAgICAgIGxldCB6dSA9IFtdO1xcbiAgICAgICAgZm9yIChpIGluIHp5KSB6dS5wdXNoKGkpO1xcblxcblxcbiAgICAgICAgcmV0dXJuICQoenUuY29uY2F0KFxcXCLmlrDnu4RcXFwiKSwgMywgXFxcIumAieaLqee7hFxcXCIpLnNlbGVjdCgoenksIHp1LCBuZXdEYXRhLCBzaSkgPT4ge1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwi5paw57uEXFxcIikge1xcbiAgICAgICAgICAgICAgICBpZiAoIXp1LmluY2x1ZGVzKGlucHV0KSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcIlxcXCIsIFxcXCLor7fovpPlhaXmlrDnu4TlkI3np7BcXFwiKS5pbnB1dCgoenksIHp1LCBuZXdEYXRhLCBzaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHp1LmNvbmNhdChcXFwi5pyA5ZCO6Z2iXFxcIiksIDMsICfor7fpgInmi6nmlrDnu4TkvY3nva4nKS5zZWxlY3QoKHp5LCBpbnB1dDIsIG5ld0RhdGEsIHNpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwi5pyA5ZCO6Z2iXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgenlbaW5wdXQyXSA9IFtuZXdEYXRhXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaSBpbiB6eSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpID09IGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb25baW5wdXQyXSA9IFtuZXdEYXRhXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbltpXSA9IHp5W2ldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgenkgPSBqc29uO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImNvbGxlY3Rpb24yP3J1bGU9dGd46Z+z5LmQXFxcIikuc2V0RGF0YShzaSwgenkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHp5LCBpbnB1dCwgbmV3RGF0YSwgc2kpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgenksIHp1LCBuZXdEYXRhLCBzaSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5YiG57uE5ZCN56ew6YeN5aSN5LqGflxcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgenkgPSB6eVtpbnB1dF07XFxuICAgICAgICAgICAgenUgPSB6eS5tYXAoaXQgPT4gaXQudGl0bGUpO1xcbiAgICAgICAgICAgIGlmICghenUuaW5jbHVkZXMobmV3RGF0YS50aXRsZSkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoenUuY29uY2F0KFxcXCLmnIDlkI7pnaJcXFwiKSwgMiwgJ+ivt+mAieaLqei1hOa6kOS9jee9ricpLnNlbGVjdCgoenksIHp1LCBpbnB1dDIsIG5ld0RhdGEsIHNpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIuacgOWQjumdolxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB6eS5wdXNoKG5ld0RhdGEpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpID0genUuaW5kZXhPZihpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgenkuc3BsaWNlKGksIDAsIG5ld0RhdGEpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiY29sbGVjdGlvbjI/cnVsZT10Z3jpn7PkuZBcXFwiKS5zZXREYXRhKHNpLCB6eSwgaW5wdXQyKTtcXG4gICAgICAgICAgICAgICAgfSwgenksIHp1LCBpbnB1dCwgbmV3RGF0YSwgc2kpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+atjOabsuWQjeensOmHjeWkjeS6hn5cXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgenksIHp1LCBuZXdEYXRhLCBzaSk7XFxuICAgIH0sXFxuICAgIHNldERhdGE6IGZ1bmN0aW9uKHNpLCB6eTIsIGtleSkge1xcbiAgICAgICAgbGV0IHp5ID0gc3RvcmFnZTAuZ2V0SXRlbShcXFwiZGF0YV9cXFwiICsgc2kpO1xcbiAgICAgICAgaWYgKGtleSkge1xcbiAgICAgICAgICAgIHp5W2tleV0gPSB6eTI7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHp5ID0genkyO1xcbiAgICAgICAgfVxcbiAgICAgICAgc3RvcmFnZTAuc2V0SXRlbShcXFwiZGF0YV9cXFwiICsgc2ksIHp5KTtcXG4gICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/miJDlip9cXFwiO1xcbiAgICB9LFxcbiAgICBjb3B5dXJsOiBmdW5jdGlvbihzaSwgenlpZCkge1xcbiAgICAgICAgY3VybCA9IFxcXCJodHRwczovL3d3dy5rdXdvLmNuL1xcXCJcXG4gICAgICAgIGlmIChTdHJpbmcoenlpZCkudHJpbSgpLm1hdGNoKC9eXFxcXGQrJC8pKSB7XFxuICAgICAgICAgICAgaWYgKHNpID09ICcxJylcXG4gICAgICAgICAgICAgICAgY3VybCArPSBcXFwicGxheV9kZXRhaWwvXFxcIjtcXG4gICAgICAgICAgICBlbHNlIGlmIChzaSA9PSAyKVxcbiAgICAgICAgICAgICAgICBjdXJsICs9IFxcXCJhbGJ1bV9kZXRhaWwvXFxcIjtcXG4gICAgICAgICAgICBlbHNlIGlmIChzaSA9PSAzKVxcbiAgICAgICAgICAgICAgICBjdXJsICs9IFxcXCJtdnBsYXkvXFxcIjtcXG4gICAgICAgICAgICBlbHNlIGlmIChzaSA9PSA0KVxcbiAgICAgICAgICAgICAgICBjdXJsICs9IFxcXCJwbGF5bGlzdF9kZXRhaWwvXFxcIjtcXG4gICAgICAgICAgICBlbHNlIGlmIChzaSA9PSA1KVxcbiAgICAgICAgICAgICAgICBjdXJsICs9IFxcXCJzaW5nZXJfZGV0YWlsL1xcXCI7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gXFxcImNvcHk6Ly9cXFwiICsgY3VybCArIHp5aWQ7XFxuICAgIH1cXG59XCJ9XSIsImljb24iOiJodHRwczovL2FuZHJvaWQtYXJ0d29ya3MuMjVwcC5jb20vZnMwOC8yMDIzLzAzLzIzLzQvMTEwXzNhNzBjM2M1YTE5YjIzZDY2NDlmMDJjNTg4MzkyZjUzX2Nvbl8xMzB4MTMwLnBuZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment