Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@长风音乐🎶@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6IumVv+mjjumfs+S5kPCfjrYiLCJhdXRob3IiOiLnvJjliIYiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNodHRwczovL2NmeXkuY2NmeUFsbD9zcz0jI2Z5cGFnZSIsInZlcnNpb24iOjIwMjQwMTE2LCJjb2xfdHlwZSI6ImNhcmRfcGljXzMiLCJjbGFzc19uYW1lIjoi55S16KeGJumFt+aIkSbnvZHmmJMm6YW354uXJuatjOWNlSbmrYzmiYsmTVYm55S15Y+wIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiL2RzLyYvbXAzL2t3LnBocCYvbXAzLzE2My5waHAmL21wMy9rZy5waHAmL21wMy9rZ2dkLnBocCYvbXAzL2dzLnBocCYvbXAzLyMmL2ZtLyIsImFyZWFfbmFtZSI6IuaKlumfsyblv6vmiYsmWVkm5YWt6Ze05oi/JuengOiJsibkuZDll6gm5Y2D5biGJuS5iOS5iCbmlpfpsbwm576a6JCMJuWTjuexsybmmKDlrqImOTXnp4Am5aWH56eAJiIsImFyZWFfdXJsIjoiL0NmL2R5emJqc29uLnBocCYvQ2Yva3MucGhwJi9DZi9ZWS5waHAmL0NmLzZmLnBocCYvQ2YveHMucGhwJi9DZi9saC5waHAmL0NmL3FmLnBocCYvQ2YvbW0ucGhwJi9DZi9keXUucGhwJi9DZi9sbS5waHAmL0NmL2FtLnBocCYvQ2YvaWsucGhwJi9DZi85NXgucGhwJi9DZi9xeC5waHAmIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoi5Zeo56eAJuaIkeengCblk5Tlk6km5Lq65Lq6Jui/hembtybnjKvmkq0m5rWq5pKtJuiKseakkibooZfllLEm5pif5YWJJkNDJktLJk5PVybm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AgdmFyIGxyYyA9IHJlcXVlc3QobHJjLCB7fSkucmVwbGFjZSgvXFxbL2csICdcXG5bJykucmVwbGFjZSgvW1xcc1xcU10qP1xcWy8sICdbJykucmVwbGFjZSgvW1xcc1xcU10qXFw+LywgJycpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IFtpbnB1dF0sXG4gICAgICAgICAgICAgICAgICAgICAgICBseXJpYzogbHJjXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSwgZGF0YS5scmMpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnJyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH0pXG4gICAgfSBjYXRjaCAoZSkge31cbn1cblxuJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL+abtOaWsFwiKVxuc2V0UmVzdWx0KGQpIiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHk/a2V5PSoqJnA9ZnlwYWdlIiwiZ3JvdXAiOiLnvJjliIYiLCJzZWFyY2hGaW5kIjoianM6XG5ldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9sYXp5Jywge30pKS5ydWxlKTtcbmxldCBjb25maWcgPSBbe1xuICAgIFwibmFtZVwiOiBcIumFt+aIkemfs+S5kFwiLFxuICAgIFwidXJsXCI6IFwiaHR0cHM6Ly9jZnl5LmNjL21wMy9rdy5waHA/c3M9KipcIlxufSwge1xuICAgIFwibmFtZVwiOiBcIumFt+eLl+mfs+S5kFwiLFxuICAgIFwidXJsXCI6IFwiaHR0cHM6Ly9jZnl5LmNjL21wMy9rZy5waHA/c3M9KipcIlxufSwge1xuICAgIFwibmFtZVwiOiBcIue9keaYk+mfs+S5kFwiLFxuICAgIFwidXJsXCI6IFwiaHR0cHM6Ly9jZnl5LmNjL21wMy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hciBsaXN0ID0gSlNPTi5wYXJzZShyZXF1ZXN0KHVybCx7fSkpLkRhdGFcbnRyeSB7XG4gICAgbGlzdC5mb3JFYWNoKGRhdGEgPT4ge1xudmFyIHBpYyA9IGRhdGEucGljXG5pZiAoIS9odHRwLy50ZXN0KHBpYykpIHtcbnZhciBwaWMgPSAnaHR0cHM6JytwaWNcbn1cbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBkYXRhLnRpdGxlLFxuICAgICAgICAgICAgZGVzYzogZGF0YS5hdXRob3IsXG4gICAgICAgICAgICBpbWc6IHBpYyArICdAUmVmZXJlcj0nLFxuICAgICAgICAgICAgdXJsOiAgZGF0YS51cmwgKyAkKFwiXCIpLmxhenlSdWxlKChscmMpPT57XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgIHVybHM6IFtpbnB1dF0sXG4gICAgICAgICAgICBseXJpYzogbHJjXG59KVxufSwgZGF0YS5scmMpLFxuICAgICAgICAgICAgY29sX3R5cGU6ICcnLFxuICAgICAgICB9KVxuICAgIH0pXG59IGNhdGNoIChlKSB7fVxufVxuICAgc2V0UmVzdWx0KGQpO1xuICAgICAgICB9LCBzb3VyY2UubmFtZSwgc291cmNlLnVybCwgbGF6eSlcbiAgICB9O1xufSkgICAgICBcbnNldFJlc3VsdChbe1xuICAgIHRpdGxlOiBcIueCueaIkeW8gOWni+iBmuaQnFwiLFxuICAgIHVybDogXCJoaWtlcjovL3NlYXJjaD9zPVwiICsgZ2V0UGFyYW0oXCJrZXlcIiksXG4gICAgZXh0cmE6IHtcbiAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKHJ1bGVzKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gcnVsZXNcbiAgICAgICAgfSwgcnVsZXMpXG4gICAgfVxufV0pIiwiZGV0YWlsX2NvbF90eXBlIjoiY2FyZF9waWNfMyIsImRldGFpbF9maW5kX3J1bGUiOiJqczpcbnZhciBk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5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciB1cmwgPSBmZXRjaChpbnB1dCkubWF0Y2goL3VybDogJyguKj8pJy8pWzFdO1xcbiAgICAgICAgICAgIHVybCA9IHVybC5zdGFydHNXaXRoKCdodHRwJykgPyB1cmwgOiAnaHR0cHM6JyArIHVybDtcXG4gICAgICAgICAgICByZXR1cm4gdXJsLnJlcGxhY2UoL1xcXFxcXFxcdTAwMjYvZywgJyYnKVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiBpbnB1dFxcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgaWYgKE1ZX1VSTC5pbmNsdWRlcygnZHl6Ympzb24ucGhwJykpIHtcXG4gICAgICAgIE1ZX1VSTCA9IE1ZX1VSTC5yZXBsYWNlKCdzcz0nLCAncD0nKSArIE1ZX1BBR0UgKyAnJmlkPSc7XFxuICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBbe1xcbiAgICAgICAgICAgICAgICDpn7PkuZA6ICcyNzA3J1xcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAg5oOF5oSfOiAnMjgzNidcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIOiInui5iDogJzI3MjYnXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICDmiLflpJY6ICcyNzQyJ1xcbiAgICAgICAgICAgIH1dLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgIHRpdGxlID0gT2JqZWN0LmtleXMoaXRlbSlbMF07XFxuICAgICAgICAgICAgICAgIGlkID0gT2JqZWN0LnZhbHVlcyhpdGVtKVswXTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBjb2xvcihpZCwgZ2V0TXlWYXIoJ+aKlumfsycsICcyNzA3JyksIHRpdGxlKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcign5oqW6Z+zJywgaWQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSwgaWQpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgbGlzdCA9IEpTT04ucGFyc2UoZmV0Y2goTVlfVVJMICsgZ2V0TXlWYXIoJ+aKlumfsycsICcyNzA3JykpKS5EYXRhO1xcbiAgICAgICAgbGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLmpzLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBpdGVtLnR4LFxcbiAgICAgICAgICAgICAgICBpbWc6IGl0ZW0udHAsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpbnB1dCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lczogWydmbHYnLCAnaGxzJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogW2lucHV0LmZsdiwgaW5wdXQuaGxzXVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSwgaXRlbSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMidcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfSBlbHNlXFxuICAgIGlmIChNWV9VUkwuaW5jbHVkZXMoJ1lZJykpIHtcXG4gICAgICAgIHl5ID0gJ2h0dHBzOi8vd3d3Lnl5LmNvbS9tb3JlL3BhZ2UuYWN0aW9uP21vZHVsZUlkPTMwOCZwYWdlPScgKyBNWV9QQUdFICsgJyZiaXo9c2luZyZzdWJCaXo9aWR4JnBhZ2VTaXplPTEwJztcXG4gICAgICAgIGxldCBsaXN0ID0gSlNPTi5wYXJzZShmZXRjaCh5eSkpLmRhdGEuZGF0YTtcXG4gICAgICAgIGxpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5kZXNjLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogaXRlbS50aHVtYixcXG4gICAgICAgICAgICAgICAgdXJsOiAnaHR0cHM6Ly9jZnl5LmNjL2FwaS95eS8nICsgaXRlbS5zaWQgKyAnLm0zdTgnICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2VcXG4gaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiB0cnkge1xcbiAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IEpTT04ucGFyc2UoZmV0Y2goTVlfVVJMKSk7XFxuICAgICAgICAgICAgICAgIGxpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udXNlcm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLnBpYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IE1ZX0hPTUUrJy9jZi82LycgKyBpdGVtLnJpZCArICcuZmx2JyArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiBmdW5jdGlvbiDpgJrnlKgoTVlfVVJMKSB7XFxuICAgICAgICAgICAgaWYgKE1ZX1VSTC5pbmNsdWRlcygna3MucGhwJykpIHtcXG4gICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIOminOWAvDogJzEwMDAwMDYnXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAg5omN6Im6OiAnMTAwMDAwNCdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICDpn7PkuZA6ICcxMDAwMDAzJ1xcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIOaDheaEnzogJzEwMDAwMDcnXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAg6Iie6LmIOiAnMTAwMDAwMidcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICDohLHlj6Pnp4A6ICcxMDAwMDA1J1xcbiAgICAgICAgICAgICAgICAgICAgfV0uZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IE9iamVjdC5rZXlzKGl0ZW0pWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gT2JqZWN0LnZhbHVlcyhpdGVtKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogY29sb3IoaWQsIGdldE15VmFyKCflv6vmiYsnLCAnMTAwMDAwNicpLCB0aXRsZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCflv6vmiYsnLCBpZClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBpZCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGZldGNoKE1ZX1VSTCArIGdldE15VmFyKCflv6vmiYsnLCAnMTAwMDAwNicpKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goTVlfVVJMKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGxpc3QgPSBwZGZhKGh0bWwsICdib2R5JiZwJyk7XFxuICAgICAgICAgICAgbGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICBpbWcgPSBwZGZoKGl0ZW0sICdpbWcmJnNyYycpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoaXRlbSwgJ1RleHQnKS5zcGxpdCgnLScpWzBdLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogcGRmaChpdGVtLCAnVGV4dCcpLnNwbGl0KCctJylbMV0sXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGltZy5zdGFydHNXaXRoKCdodHRwJykgPyBpbWcgOiAnaHR0cHM6JyArIGltZyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogTVlfSE9NRSArIHBkZmgoaXRlbSwgJ2EmJmhyZWYnKSArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzInXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChNWV9VUkwuaW5jbHVkZXMoJ2tzLnBocCcpKSB7XFxuICAgICAgICAgICAg6YCa55SoKE1ZX1VSTC5yZXBsYWNlKCdzcz0nLCAnaWQ9JykpXFxuICAgICAgICB9IGVsc2VcXG4gICAgICAgIGlmIChNWV9VUkwuaW5jbHVkZXMoJ25vdy5waHAnKSkge1xcbiAgICAgICAgICAgIOmAmueUqChNWV9VUkwucmVwbGFjZSgnc3M9JywgJ2lkPTAnKSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAg6YCa55SoKE1ZX1VSTClcXG4gICAgICAgIH1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLnlLXlj7BcIixcInBhdGhcIjpcImR0XCIsXCJydWxlXCI6XCJpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgIHZhciB1cmwgPSBNWV9VUkwucmV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gICAgICAgICAgIHRpdGxlOiBjb2xvcihkdXJsLCBnZXRNeVZhcign55S15Y+wJyksIHRpdGxlKSxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcign55S15Y+wJywgdXJsKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGR1cmwpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pXFxuICAgIH0pXFxuXFxuICAgIHVybCA9TVlfSE9NRSArICcvZm0vcXQucGhwJyArIGdldE15VmFyKCfnlLXlj7AnLCAnP2ZtPTQwNycpO1xcbiAgICBsaXN0ID0gSlNPTi5wYXJzZShmZXRjaCh1cmwpKS5EYXRhO1xcbiAgICBsaXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgIC8vZGVzYzogaXRlbS5hdXRob3IsXFxuICAgICAgICAgICAgaW1nOiBpdGVtLnBpYy5zdGFydHNXaXRoKCdodHRwJykgPyBpdGVtLnBpYyA6ICdodHRwczonICsgaXRlbS5waWMsXFxuICAgICAgICAgICAgdXJsOiBpdGVtLnVybCskKFxcXCJcXFwiKS5sYXp5UnVsZSgoKT0+eyAgIFxcbiAgIHJldHVybiBpbnB1dDtcXG59KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXG4gICAgICAgIH0pXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0pXFxuICAgIH0pXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92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WVcIjpcIueUteinhlwiLFwicGF0aFwiOlwiZHNcIixcInJ1bGVcIjpcInZhciBodG1sID0gcmVxdWVzdCgnaHR0cHM6Ly9jZnNzLmNjL2RzJywge30pXFxuaWYgKGh0bWwgPT0gJycpIHtcXG4gICAgdmFyIGh0bWwgPSByZXF1ZXN0KE1ZX1VSTCwge30pXFxufVxcbmlmIChNWV9QQUdFID09IDEpIHtcXG4gICAgdmFyIGxpc3RzID0gcGRmYShodG1sLCAnYm9keSYmaDEnKVxcbiAgICBsaXN0cy5mb3JFYWNoKChkYXRhLCBpKSA9PiB7XFxuICAgICAgICB2YXIgdGl0bGUgPSBwZGZoKGRhdGEsICdoMSYmVGV4dCcpLnJlcGxhY2UoJ+mVv+mjjicsICcnKS5yZXBsYWNlKCfljJfmlrknLCAnJykucmVwbGFjZSgn55S16KeGJywgJycpXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBjb2xvcihpLCBnZXRNeVZhcignaScsICcwJyksIHRpdGxlKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignaScsIGkpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICB9KVxcbiAgICB9KVxcbiAgICB2YXIgbGlzdHMgPSBwZGZhKGh0bWwsICdib2R5JiYudXUnKTtcXG4gICAgdmFyIGxpc3QgPSBwZGZhKGxpc3RzW2dldE15VmFyKCdpJywgJzAnKV0sICdib2R5JiZhJyk7XFxuICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICAgICAgdmFyIGltZyA9IE1ZX0hPTUUgKyAnL2RzLycgKyB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CZPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAjMWFhZDE5XFxcIj4nICsgaXRlbSArICc8L3NwYW4+PC9iPic7XFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gaXRlbSA9PT0gZ2V0TXlWYXIoJ2ZsJywgJ+mFt+eLl01WJykgPyB4eSA6IGl0ZW07XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRhKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignZmwnLCB0YSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgaXRlbSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8yJyxcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxufVxcbiAgICAgICAgbGV0IG1vZGUgPSBnZXRNeVZhcignZmwnLCAn6YW35oiRTVYnKVxcbiAgICAgICAgc3dpdGNoIChtb2RlKSB7XFxuICAgICAgICAgICAgY2FzZSAn6YW354uXTVYnOlxcbiAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEocmVxdWVzdCh1cmwsIHt9KSwgJ2JvZHkmJi5qYycpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn6YW35oiRTVYnOlxcbiAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEocmVxdWVzdCh1cmwucmVwbGFjZSgna2cvY2YnLCAna3cnKSwge30pLCAnYm9keSYmLmpjJylcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIH1cXG4gICAgICAgIGxpc3QuZm9yRWFjaChkYXR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AgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGRhdGEsICdhJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICAvL2ltZzogcGQoZGF0YSwgJ2EmJmRhdGEtb3JpZ2luYWwnKSArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBNWV9IT01FKycvbXAzL2t3LnBocD9zcz0nICsgcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzMnLFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9IGNhdGNoIChlKSB7fVwifV0iLCJpY29uIjoiaHR0cHM6Ly9jZnl5LmNjL0J0L2NmLmljbyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment