Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_百度网盘SVIP高速解析下载直链的助手-文武PanDownloa@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICAgICAgIOeZvuW6pue9keebmFNWSVDpq5jpgJ/op6PmnpDkuIvovb3nm7Tpk77nmoTliqnmiYst5paH5q2mUGFuRG93bmxvYWQKLy8gQG5hbWVzcGFjZSAgICAgICAgIGh0dHBzOi8vZ2l0aHViLmNvbS9kb25neXViaW4vQmFpZHUtVklQCi8vIEB2ZXJzaW9uICAgICAgICAgICAyLjIKLy8gQGRlc2NyaXB0aW9uICAgICAgIOS4jemZkOWItumAn+W6pueahOeZvuW6pue9keebmFNWSVDop6PmnpDpq5jpgJ/nm7Tpk77nmoTohJrmnKzliqnmiYvvvIzvvIjnqLPlrprov5DooYzkuK3vvInml6Dop4bpu5Hlj7fvvIwxMDAl5Y+v55So77yM5LiL6L296YCf5bqm5pyA5b+r5Y+v6L6+MTBNKy9z77yM5pSv5oyBIEdvcGVlZO+8iOS4gOmUruino+aekO+8ieOAgUlETeOAgU5ETSDnrYnlpJrnur/nqIvmnoHpgJ/kuIvovb3lt6XlhbfvvIzmlK/mjIEgTWljcm9zb2Z0IEVkZ2XjgIFHb29nbGUgQ2hyb21l44CBRmlyZWZveCDnrYnmtY/op4jlmajjgIIKLy8gQGF1dGhvciAgICAgICAgICAgIGRvbmd5dWJpbgovLyBAaG9tZXBhZ2UgICAgICAgICAgaHR0cHM6Ly9may53d2tlamlzaGUudG9wL2J1eS8yMwovLyBAc3VwcG9ydFVSTCAgICAgICAgaHR0cHM6Ly9may53d2tlamlzaGUudG9wL2J1eS8yMwovLyBAbGljZW5zZSAgICAgICAgICAgTUlUCi8vIEBpY29uICAgICAgICAgICAgICBodHRwczovL2ZrLnd3a2VqaXNoZS50b3AvdXBsb2Fkcy9pbWFnZXMvNmU3OTgwMDViMDBjZTY3ODc4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ICAgICAgKjovL3l1bi5iYWlkdS5jb20vcy8qCi8vIEBtYXRjaCAgICAgICAgICAgICAqOi8vcGFuLmJhaWR1LmNvbS9haXBhbi8qCi8vIEBtYXRjaCAgICAgICAgICAgICAqOi8veXVuLmJhaWR1LmNvbS9haXBhbi8qCi8vIEBtYXRjaCAgICAgICAgICAgICAqOi8vcGFuLmJhaWR1LmNvbS9zaGFyZS8qCi8vIEBtYXRjaCAgICAgICAgICAgICAqOi8veXVuLmJhaWR1LmNvbS9zaGFyZS8qCi8vIEBtYXRjaCAgICAgICAgICAgICAqOi8vb3BlbmFwaS5iYWlkdS5jb20vKgovLyBAY29ubmVjdCAgICAgICAgICAgYWlmZW54aWFuZy5uZXQuY24KLy8gQGNvbm5lY3QgICAgICAgICAgIGJhaWR1LmNvbQovLyBAY29ubmVjdCAgICAgICAgICAgKgovLyBAY29ubmVjdCAgICAgICAgICAgMTI3LjAuMC4xCi8vIEBncmFudCAgICAgICAgICAgICBHTV9jb29raWUKLy8gQGdyYW50ICAgICAgICAgICAgIEdNX2FkZFN0eWxlCi8vIEBncmFudCAgICAgICAgICAgICBHTV9nZXRSZXNvdXJjZVRleHQKLy8gQGdyYW50ICAgICAgICAgICAgIEdNX3htbGh0dHBSZXF1ZXN0Ci8vIEBncmFudCAgICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQKLy8gQGdyYW50ICAgICAgICAgICAgIEdNX25vdGlmaWNhdGlvbgovLyBAYW50aWZlYXR1cmUgICAgICAgYWRzCi8vIEBhbnRpZmVhdHVyZSAgICAgICBtZW1iZXJzaGlwCi8vIEBhbnRpZmVhdHVyZSAgICAgICByZWZlcnJhbC1saW5rCi8vIEBkb3dubG9hZFVSTCBodHRwczovL3VwZGF0ZS5ncmVhc3lmb3JrLm9yZy9zY3JpcHRzLzUxODAyMy8lRTclOTklQkUlRTUlQkElQTYlRTclQkQlOTElRTclOUIlOThTVklQJUU5JUFCJTk4JUU5JTgwJTlGJUU4JUE3JUEzJUU2JTlF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iAgICAgICAgc3dhbCh7CiAgICAgICAgICB0ZXh0OiAn6K+35YWI6YCJ5oup5LiA5Liq5paH5Lu2JywKICAgICAgICAgIGljb246ICd3YXJuaW5nJywKICAgICAgICB9KTsKICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgIH0gZWxzZSBpZiAoc2VsZWN0ZWQubGVuZ3RoID4gMSkgewogICAgICAgIHN3YWwoewogICAgICAgICAgdGV4dDogJ+ebruWJjeS7heaUr+aMgeWNleS4quaWh+S7tuino+aekCcsCiAgICAgICAgICBpY29uOiAnd2FybmluZycsCiAgICAgICAgfSk7CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICB9IGVsc2UgaWYgKHNlbGVjdFtzZWxlY3RlZFswXV0uaXNkaXIgPT0gMSkgewogICAgICAgIHN3YWwoewogICAgICAgICAgdGV4dDogJ+ebruWJjeS4jeaUr+aMgeaWh+S7tuWkueino+aekCcsCiAgICAgICAgICBpY29uOiAnd2FybmluZycsCiAgICAgICAgfSk7CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICB9CgogICAgICBjb25zdCB3d0ppZVhpRGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAgICAgIGxldCBjcmVhdGVEaXYgPSBgCiAgICAgICAgPGRpdj4KICAgICAgICA8aW1nIHNyYz0iaHR0cHM6Ly9jZG4ud3drZWppc2hlLnRvcC93cC1jZG4tMDIvMjAyNC8yMDI0MTExNzEzNDYzNTEud2VicCIgc3R5bGU9IndpZHRoOjI0MHB4O2hlaWdodDoyNDBweDsiPgogICAgICAgIDwvZGl2PgogICAgICAgIDxkaXY+CiAgICAgICAgIDxpbnB1dCBzdHlsZT0iYm9yZGVyOjFweCBzb2xpZCAjY2NjOyB3aWR0aDo2MCU7aGVpZ2h0OjQwcHg7dGV4dC1pbmRlbnQ6MjBweDsiIHR5cGU9InRleHQiIGF1dG9jb21wbGV0ZT0ib2ZmIiBwbGFjZWhvbGRlcj0i6K+36L6T5YWl6aqM6K+B56CBIiBpZD0id3BDb2RlIi8+CiAgICAgICAgPC9kaXY+CiAgICAgICAgYDsKICAgICAgd3dKaWVYaURpdi5pbm5lckhUTUwgPSBjcmVhdGVEaXY7CgogICAgICBjb25zdCBvcGVuSW5mb0xheWVyID0gbGF5ZXIub3Blbih7CiAgICAgICAgdHlwZTogMSwKICAgICAgICBhcmVhOiBbJzU1MHB4JywgJ2F1dG8nXSwKICAgICAgICB0aXRsZTogJ+aPkOekuicsCiAgICAgICAgdHlwZTogMSwKICAgICAgICBzaGFkZTogMC42LAogICAgICAgIHNoYWRlQ2xvc2U6IHRydWUsCiAgICAgICAgYW5pbTogMCwKICAgICAgICBjb250ZW50OiBgCiAgICAgICAgICA8ZGl2IGNsYXNzPSJsYXl1aS10YWIgbGF5dWktdGFiLWJyaWVmIiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjogI2Y4ZjhmODsgYm9yZGVyLXJhZGl1czogOHB4OyI+CiAgICAgICAgICAgIDx1bCBjbGFzcz0ibGF5dWktdGFiLXRpdGxlIiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNlNmU2ZTY7Ij4KICAgICAgICAgICAgICA8bGkgY2xhc3M9ImxheXVpLXRoaXMiPuino+aekDwvbGk+CiAgICAgICAgICAgICAgPGxpPuabtOWkmui1hOa6kDwvbGk+CiAgICAgICAgICAgICAgPGxpPumYsuatouWkseiBlDwvbGk+CiAgICAgICAgICAgIDwvdWw+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImxheXVpLXRhYi1jb250ZW50IiBzdHlsZT0icGFkZGluZzogMjBweDsiPgogICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImxheXVpLXRhYi1pdGVtIGxheXVpLXNob3ciPgogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibGF5dWktZm9ybSIgbGF5LWZpbHRlcj0iZmlsdGVyLXRlc3QtbGF5ZXIiIHN0eWxlPSJ3aWR0aDozNjBweDttYXJnaW46IDE2cHggYXV0byAwOyBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOyBib3JkZXItcmFkaXVzOiA4cHg7IHBhZGRpbmc6IDIwcHg7Ij4KICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZGVtby1zZW5kLWNvbnRhaW5lciI+CiAgICAgICAgICAgICAgICAgICAgPGRpdj4KICAgICAgICAgICAgICAgICAgICAgIDxwPuaPkuS7tuino+aekOmZkOWItiAyIOasoTwvcD4KICAgICAgICAgICAgICAgICAgICAgIDxwPgogICAgICAgICAgICAgICAgICAgICAgICBHb3BlZWQg5LiL6L295Zmo5LiA5a6a6KaB6YWN572u5aW9IFVzZXItQWdlbnQg5ZKM56uv5Y+jOiA8YSBzdHlsZT0iY29sb3I6cmVkOyIgdGFyZ2V0PSJfYmxhbmsiIGhyZWY9Imh0dHBzOi8vZmxvd3VzLmNuL3NoYXJlL2M2OGUzYzU1LTY3ZTUtNDYwZi1iOTM3LTc3MjdlMDM3OGEzND9jb2RlPUJDUldKTCI+54K55Ye75p+l55yLR29wZWVk6YWN572u5pWZ56iL6K+05piOPC9hPgogICAgICAgICAgICAgICAgICAgICAgPC9wPgogICAgICAgICAgICAgICAgICAgICAgPHA+CiAgICAgICAgICAgICAgICAgICAgICAgIOS4jemZkOasoeaVsCBQQyDnvZHpobXnqLPlrprniYg6IDxhIHN0eWxlPSJjb2xvcjpyZWQ7IiB0YXJnZXQ9Il9ibGFuayIgaHJlZj0iaHR0cHM6Ly9wYW5kb3duLm1sb3Zlci5zaXRlLyI+54K55Ye75YmN5b6APC9hPgogICAgICAgICAgICAgICAgICAgICAgPC9wPgogICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgIDxidXR0b24gc3R5bGU9Im1hcmdpbi1sZWZ0OjA7bWFyZ2luLXRvcDozMHB4OyBib3JkZXItcmFkaXVzOiA4cHg7IiBpZD0icGFyc2V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YWRkaW5nOiAyMHB4O3RleHQtYWxpZ246IGNlbnRlcjsiPgogICAgICAgICAgICAgICAgPGRpdj4KICAgICAgICAgICAgICAgICAgPGltZyBzcmM9Imh0dHBzOi8vY2RuLnd3a2VqaXNoZS50b3Avd3AtY2RuLTAyLzIwMjQvMjAyNDExMTcxMzQ2MzUxLndlYnAiIHN0eWxlPSJ3aWR0aDoyNDBweDtoZWlnaHQ6MjQwcHg7Ij4KICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPGgyIGNsYXNzPSJoMiIgc3R5bGU9Im1hcmdpbi10b3A6IDEwcHg7Ij7miavkuIDmiavkuI3lpLHogZQ8L2gyPgogICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDwvZGl2PgogICAgICAgIGAsCiAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKCkgewogICAgICAgICAgLy8g5a+55by55bGC5Lit55qE6KGo5Y2V6L+b6KGM5Yid5aeL5YyW5riy5p+TCiAgICAgICAgICBmb3JtLnJlbmRlcigpOwogICAgICAgICAgLy8g6KGo5Y2V5o+Q5Lqk5LqL5Lu2CiAgICAgICAgICBmb3JtLm9uKCdzdWJtaXQoZGVtby1zZW5kKScsIGFzeW5jIGZ1bmN0aW9uIChkYXRhKSB7CiAgICAgICAgICAgICQoJyNwYXJzZUJ0bicpLmh0bWwoJzxwPuato+WcqOWPkemAgeS4rSzor7fnqI3lkI4uLi48L3A+Jyk7CiAgICAgICAgICAgIGxldCB0ZXN0RG93biA9IGF3YWl0IHRlc3RTZW5kVG9Hb3BlZWQoKTsKCiAgICAgICAgICAgIGlmICghdGVzdERvd24pIHsKICAgICAgICAgICAgICBsYXllci5jbG9zZShvcGVuSW5mb0xheWVyKTsKICAgICAgICAgICAgICBzd2FsKHsKICAgICAgICAgICAgICAgIHRpdGxlOiAi5LiL6L29IEdvcGVlZCDliqDpgJ/lmagiLAogICAgICAgICAgICAgICAgdGV4dDogJ+ivt+WFiOWuieijhSBHb3BlZWQg5bm25omT5byA6L+Q6KGMKOeCueWHu+aMiemSruS4i+i9vSBHb3BlZWQp44CCJywKICAgICAgICAgICAgICAgIGljb246ICd3YXJuaW5nJywKICAgICAgICAgICAgICAgIHR5cGU6ICJ3YXJuaW5nIiwKICAgICAgICAgICAgICAgIHNob3dDYW5jZWxCdXR0b246IHRydWUsCiAgICAgICAgICAgICAgICBzaG93Q29uZmlybUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIGNvbmZpcm1CdXR0b25UZXh0OiAn54K55Ye75LiL6L29R29wZWVkJywKICAgICAgICAgICAgICAgIGNvbmZpcm1CdXR0b25Db2xvcjogIiNkZDZiNTUiLAogICAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oJ2h0dHBzOi8vcGFuLnF1YXJrLmNuL3MvMGIyZTljNmU5NGIwJyk7CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgJCgnI3BhcnNlQnRuJykuaHRtbCgnPHA+5Y+R6YCB5YiwR29wZWVkPC9wPicpOwogICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBzaGFyZV9vbmVfYmFpZHUob3BlbkluZm9MYXllciwgMTIzNCk7CiAgICAgICAgICB9KTsKICAgICAgICB9LAogICAgICB9KTsKICAgIH0pOwogIH0pOwogIGZ1bmN0aW9uIHNlbGVjdExpc3QoKSB7CiAgICB2YXIgc2VsZWN0ID0ge307CiAgICB2YXIgb3B0aW9uID0gW107CgogICAgdHJ5IHsKICAgICAgb3B0aW9uID0KICAgICAgICByZXF1aXJlKCdzeXN0ZW0tY29yZTpjb250ZXh0L2NvbnRleHQuanMnKS5pbnN0YW5jZUZvclN5c3RlbS5saXN0LmdldFNlbGVjdGVkKCk7CiAgICB9IGNhdGNoIChlKSB7CiAgICAgIG9wdGlvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy53cC1zLWNvcmUtcGFuJykuX192dWVfXy5zZWxlY3RlZExpc3Q7CiAgICB9CiAgICBvcHRpb24uZm9yRWFjaCgoZWxlbWVudCkgPT4gewogICAgICBzZWxlY3RbZWxlbWVudC5mc19pZF0gPSBlbGVtZW50OwogICAgfSk7CiAgICByZXR1cm4gc2VsZWN0OwogIH0KICBmdW5jdGlvbiBzaGFyZV9vbmVfYmFpZHUob3BlbkluZm9MYXllciwgY29kZSkgewogICAgbGV0IHNlbGVjdCA9IE9iamVjdC5rZXlzKHNlbGVjdExpc3QoKSk7CiAgICBsZXQgYmRzdG9rZW4gPSAnJzsKICAgIGxldCBkYXRhX2pzb24gPSB7fTsKICAgIHRyeSB7CiAgICAgIGRhdGFfanNvbiA9ICQoJ2h0bWwnKQogICAgICAgIC5odG1sKCkKICAgICAgICAubWF0Y2goLyg/PD1sb2NhbHNcLm1zZXRcKCkoLio/KSg/PVwpOykvKVswXTsKICAgICAgZGF0YV9qc29uID0gSlNPTi5wYXJzZShkYXRhX2pzb24pOwogICAgICB3d0NvbmZpZy51c2VybmFtZSA9IGRhdGFfanNvbi51c2VybmFtZTsKICAgICAgYmRzdG9rZW4gPSBkYXRhX2pzb24uYmRzdG9rZW47CiAgICB9IGNhdGNoIChlKSB7CiAgICAgIGRhdGFfanNvbiA9ICQoJ2h0bWwnKQogICAgICAgIC5odG1sKCkKICAgICAgICAubWF0Y2goLyg/PD13aW5kb3dcLmxvY2Fsc1xzPVxzKSguKj8pKD89OykvKVswXTsKICAgICAgZGF0YV9qc29uID0gSlNPTi5wYXJzZShkYXRhX2pzb24pOwogICAgICB3d0NvbmZpZy51c2VybmFtZSA9IGRhdGFfanNvbi51c2VySW5mby51c2VybmFtZTsKICAgICAgYmRzdG9rZW4gPSBkYXRhX2pzb24udXNlckluZm8uYmRzdG9rZW47CiAgICB9CgogICAgd3dDb25maWcuZGF0YV9qc29uID0gZGF0YV9qc29uOwoKICAgIGNvbnN0IHBhcmFtID0gewogICAgICBiZHN0b2tlbjogYmRzdG9rZW4sCiAgICAgIHBlcmlvZDogMSwKICAgICAgcHdkOiB3d0NvbmZpZy5iZFBhc3N3b3JkLAogICAgICBlZmxhZ19kaXNhYmxlOiB0cnVlLAogICAgICBjaGFubmVsX2xpc3Q6ICclNUIlNUQnLAogICAgICBzY2hhbm5lbDogNCwKICAgICAgZmlkX2xpc3Q6IEpTT04uc3RyaW5naWZ5KHNlbGVjdCksCiAgICB9OwoKICAgICQuYWpheCh7CiAgICAgIHR5cGU6ICdHRVQnLAogICAgICB1cmw6ICdodHRwczovL3Bhbi5iYWlkdS5jb20vc2hhcmUvc2V0JywKICAgICAgYXN5bmM6IHRydWUsCiAgICAgIGRhdGE6IHsKICAgICAgICBiZHN0b2tlbjogYmRzdG9rZW4sCiAgICAgICAgcGVyaW9kOiAxLAogICAgICAgIHB3ZDogd3dDb25maWcuYmRQYXNzd29yZCwKICAgICAgICBlZmxhZ19kaXNhYmxlOiB0cnVlLAogICAgICAgIGNoYW5uZWxfbGlzdDogJyU1QiU1RCcsCiAgICAgICAgc2NoYW5uZWw6IDQsCiAgICAgICAgZmlkX2xpc3Q6IEpTT04uc3RyaW5naWZ5KHNlbGVjdCksCiAgICAgIH0sCiAgICAgIGRhdGFUeXBlOiAnanNvbicsCiAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChyZXMpIHsKICAgICAgICBpZiAocmVzLnNob3dfbXNnLmluZGV4T2YoJ+emgeatoicpID4gLTEpIHsKICAgICAgICAgIHN3YWwoewogICAgICAgICAgICB0ZXh0OiAn6K+l5paH5Lu256aB5q2i5YiG5LqrJywKICAgICAgICAgICAgaWNvbjogJ2Vycm9yJywKICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBsZXQgc2hvcnR1cmwgPSAnJzsKICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgIHNob3J0dXJsID0gcmVzLmxpbmsuc3BsaXQoJy8nKS5wb3AoKTsKICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICAgIHN3YWwoewogICAgICAgICAgICAgIHRleHQ6ICfliJ3lp4vljJblh4blpIflpLHotKUnLAogICAgICAgICAgICAgIGljb246ICdlcnJvcicsCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICBmZXRjaCh3d0NvbmZpZy5tYWluVXJsICsgJy93cC9nZXRDb2RlTnVtJywgewogICAgICAgICAgICBtZXRob2Q6ICdQT1NUJywKICAgICAgICAgICAgaGVhZGVyczogewogICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHsKICAgICAgICAgICAgICBjb2RlOiBjb2RlLAogICAgICAgICAgICAgIHVzZXJLZXk6ICdtYWluJywKICAgICAgICAgICAgICBmc0lkOiBzZWxlY3RbMF0sCiAgICAgICAgICAgICAgdmVyc2lvbjogJzEuMS4yJywKICAgICAgICAgICAgfSksCiAgICAgICAgICB9KQogICAgICAgICAgICAudGhlbigocmVzcCkgPT4gcmVzcC5qc29uKCkpCiAgICAgICAgICAgIC50aGVuKChyZXMpID0+IHsKICAgICAgICAgICAgICBsZXQgbGF5c2VybXNnID0gbGF5ZXIubXNnKCfmraPlnKjop6PmnpDkuK0nLCB7CiAgICAgICAgICAgICAgICBpY29uOiA2LAogICAgICAgICAgICAgICAgdGltZTogMTAwMDAsCiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgaWYgKHJlcy5jb2RlID09IDIwMCkgewogICAgICAgICAgICAgICAgd3dDb25maWcuY29kZSA9IGNvZGU7CiAgICAgICAgICAgICAgICBpZiAocmVzLmRhdGEgPiAxMDApIHsKICAgICAgICAgICAgICAgICAgZ2V0X2Rvd25fbGlzdCgKICAgICAgICAgICAgICAgICAgICBzaG9ydHVybCwKICAgICAgICAgICAgICAgICAgICB3d0NvbmZpZy5iZFBhc3N3b3JkLAogICAgICAgICAgICAgICAgICAgIG9wZW5JbmZvTGF5ZXIsCiAgICAgICAgICAgICAgICAgICAgcmVzLmRhdGEsCiAgICAgICAgICAgICAgICAgICAgbGF5c2VybXNnCiAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcy5kYXRhID09IDgwKSB7CiAgICAgICAgICAgICAgICAgIGxheWVyLm1zZygn6Kej5p6Q5LitJywgewogICAgICAgICAgICAgICAgICAgIGljb246IDYsCiAgICAgICAgICAgICAgICAgICAgdGltZTogMzAwMCwKICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgICQoJyNwYXJzZUJ0bicpLmh0bWwoJzxwPuino+aekDwvcD4nKTsKICAgICAgICAgICAgICAgICAgICBsYXllci5hbGVydCgn6Kej5p6Q6YCa6YGT5q+U6L6D5oul5aC177yM6K+36YeN6K+V77yBJywgewogICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmj5DnpLonLAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICB9LCAzMDAwKTsKICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzLmRhdGEgPT0gNjApIHsKICAgICAgICAgICAgICAgICAgbGF5ZXIubXNnKCfop6PmnpDkuK0nLCB7CiAgICAgICAgICAgICAgICAgICAgaWNvbjogNiwKICAgICAgICAgICAgICAgICAgICB0aW1lOiAzMDAwLAogICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgJCgnI3BhcnNlQnRuJykuaHRtbCgnPHA+6Kej5p6QPC9wPicpOwogICAgICAgICAgICAgICAgICAgIGxheWVyLmFsZXJ0KCfop6PmnpDmrKHmlbDlt7Lovr7kuIrpmZDvvIzkuI3pmZDmrKHmlbDnqLPlrprniYjvvIEnLCB7CiAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aPkOekuicsCiAgICAgICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oJ2h0dHBzOi8vcGFuZG93bi5tbG92ZXIuc2l0ZScpOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICB9LCAzMDAwKTsKICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzLmRhdGEgPT0gNTApIHsKICAgICAgICAgICAgICAgICAgbGF5ZXIuYWxlcnQoCiAgICAgICAgICAgICAgICAgICAgJ+mqjOivgeeggemUmeivryzkuIDkuKrpqozor4HnoIHlj6rog73kuIvovb3kuIDkuKrmlofku7Ys6K+36YeN5paw6I635Y+W77yBJywKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aPkOekuicsCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgbGF5ZXIuYWxlcnQoCiAgICAgICAgICAgICAgICAgICAgJ+mqjOivgeeggemUmeivryzkuIDkuKrpqozor4HnoIHlj6rog73kuIvovb3kuIDkuKrmlofku7Ys6K+36YeN5paw6I635Y+W77yBJywKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aPkOekuicsCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzLmNvZGUgPT0gNTAwKSB7CiAgICAgICAgICAgICAgICBsYXllci5jbG9zZShvcGVuSW5mb0xheWVyKTsKICAgICAgICAgICAgICAgIGxheWVyLmNsb3NlKGxheXNlcm1zZyk7CiAgICAgICAgICAgICAgICBzd2FsKHsKICAgICAgICAgICAgICAgICAgdGV4dDogcmVzLm1zZywKICAgICAgICAgICAgICAgICAgaWNvbjogJ3dhcm5pbmcnLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgIH0sCiAgICAgIGVycm9yOiBmdW5jdGlvbiAocmVzKSB7CiAgICAgICAgc3dhbCh7CiAgICAgICAgICB0ZXh0OiAn5Yid5aeL5YyW5YeG5aSH6K+35rGC6K6/6Zeu5aSx6LSlJywKICAgICAgICAgIGljb246ICdlcnJvcicsCiAgICAgICAgfSk7CiAgICAgIH0sCiAgICB9KTsKICB9CgogIGFzeW5jIGZ1bmN0aW9uIGdldF9kb3duX2xpc3Qoc2hvcnR1cmwsIHBhc3N3b3JkLCBvcGVuSW5mb0xheWVyLCBwd2QsIGxheXNlcm1zZykgewogICAgbGV0IGFqYXhfZGF0YSA9IHsKICAgICAgc2hvcnR1cmw6IHNob3J0dXJsLAogICAgICBwd2Q6IHBhc3N3b3JkLAogICAgICBkaXI6IDEsCiAgICAgIHJvb3Q6IDEsCiAgICAgIHVzZXJLZXk6ICdtYWluJywKICAgIH07CgogICAgZmV0Y2god3dDb25maWcubWFpblVybCArICcvd3AvcGFyc2VDb3B5TGluaycsIHsKICAgICAgbWV0aG9kOiAnUE9TVCcsCiAgICAgIGhlYWRlcnM6IHsKICAgICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nLAogICAgICB9LAogICAgICBib2R5OiBKU09OLnN0cmluZ2lmeShhamF4X2RhdGEpLAogICAgfSkKICAgICAgLnRoZW4oKHJlc3ApID0+IHJlc3AuanNvbigpKQogICAgICAudGhlbigocmVzKSA9PiB7CiAgICAgICAgaWYgKHJlcy5jb2RlID09IDIwMCkgewogICAgICAgICAgY29uc3Qgc2l6ZSA9IHBhcnNlSW50KHJlcy5kYXRhLmRhdGEubGlzdFswXS5zaXplKTsKICAgICAgICAgIGlmIChzaXplID4gMzIyMTIyNTQ3MikgewogICAgICAgICAgICBsYXllci5jbG9zZShvcGVuSW5mb0xheWVyKTsKICAgICAgICAgICAgbGF5ZXIuY2xvc2UobGF5c2VybXNnKTsKICAgICAgICAgICAgJCgnI3BhcnNlQnRuJykuaHRtbCgnPHA+5Y+R6YCB5YiwR29wZWVkPC9wPicpOwogICAgICAgICAgICBzd2FsKHsKICAgICAgICAgICAgICB0ZXh0OiAn5paH5Lu25aSn5LqOIDNH77yM5o+S5Lu25pqC5LiN5pSv5oyB5LiL6L2977yM6K+35YmN5b6AIFBDIOe9kemhteeJiOS4i+i9ve+8gScsCiAgICAgICAgICAgICAgaWNvbjogJ3dhcm5pbmcnLAogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgICAgY29uc3QgcmVxdWVzdERhdGEgPSB7CiAgICAgICAgICAgIGZzSWQ6IHJlcy5kYXRhLmRhdGEubGlzdFswXS5mc19pZCwKICAgICAgICAgICAgc2hhcmVpZDogcmVzLmRhdGEuZGF0YS5zaGFyZWlkLAogICAgICAgICAgICB1azogcmVzLmRhdGEuZGF0YS51aywKICAgICAgICAgICAgc2VrZXk6IHJlcy5kYXRhLmRhdGEuc2Vja2V5LAogICAgICAgICAgICByYW5kc2s6IHJlcy5kYXRhLmRhdGEuc2Vja2V5LAogICAgICAgICAgICBmc19pZHM6IFtyZXMuZGF0YS5kYXRhLmxpc3RbMF0uZnNfaWRdLAogICAgICAgICAgICBwYXRoOiByZXMuZGF0YS5kYXRhLmxpc3RbMF0uc2VydmVyX2ZpbGVuYW1lLAogICAgICAgICAgICBzaXplOiByZXMuZGF0YS5kYXRhLmxpc3RbMF0uc2l6ZSwKICAgICAgICAgICAgc3VybDogc2hvcnR1cmwsCiAgICAgICAgICAgIHVybDogYGh0dHBzOi8vcGFuLmJhaWR1LmNvbS9zLyR7c2hvcnR1cmx9YCwKICAgICAgICAgICAgdXNlcktleTogJ21haW4nLAogICAgICAgICAgICBwd2Q6IHBhc3N3b3JkLAogICAgICAgICAgICBkaXI6ICcvJywKICAgICAgICAgIH07CiAgICAgICAgICBjb25zb2xlLmxvZyhyZXF1ZXN0RGF0YSk7CiAgICAgICAgICBHTV94bWxodHRwUmVxdWVzdCh7CiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLAogICAgICAgICAgICB1cmw6IHd3Q29uZmlnLm1haW5VcmwgKyAnL3dwL2RsaW5rJywKICAgICAgICAgICAgaGVhZGVyczogewogICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHJlcXVlc3REYXRhKSwKICAgICAgICAgICAgb25sb2FkOiBmdW5jdGlvbiAocmVzcG9uc2UpIHsKICAgICAgICAgICAgICBjb25zdCByZXNwb25zZURhdGEgPSBKU09OLnBhcnNlKHJlc3BvbnNlLnJlc3BvbnNlVGV4dCk7CiAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2VEYXRhKTsKICAgICAgICAgICAgICBpZiAocmVzcG9uc2VEYXRhLmNvZGUgIT09IDIwMCkgewogICAgICAgICAgICAgICAgbGF5ZXIuY2xvc2Uob3BlbkluZm9MYXllcik7CiAgICAgICAgICAgICAgICBsYXllci5jbG9zZShsYXlzZXJtc2cpOwogICAgICAgICAgICAgICAgc3dhbCh7CiAgICAgICAgICAgICAgICAgIHRleHQ6IHJlc3BvbnNlRGF0YS5tc2csCiAgICAgICAgICAgICAgICAgIGljb246ICd3YXJuaW5nJywKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBsYXllci5jbG9zZShsYXlzZXJtc2cpOwogICAgICAgICAgICAgICAgJCgnI3BhcnNlQnRuJykuaHRtbCgnPHA+5Y+R6YCB5YiwR29wZWVkPC9wPicpOwogICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlRGF0YS5kYXRhLnZpcCkgewogICAgICAgICAgICAgICAgICB3d0NvbmZpZy51cmwgPSByZXNwb25zZURhdGEuZGF0YS5kYXRhWzBdLnVybDsKICAgICAgICAgICAgICAgICAgd3dDb25maWcudWEgPSByZXNwb25zZURhdGEuZGF0YS5kYXRhWzBdLnVhOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgd3dDb25maWcudXJsID0gcmVzcG9uc2VEYXRhLmRhdGEuZGF0YS51cmxzWzBdLnVybDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHNlbmRUb0dvcGVlZChyZXMuZGF0YS5kYXRhLmxpc3RbMF0pOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgb25lcnJvcjogZnVuY3Rpb24gKHJlc3BvbnNlKSB7CiAgICAgICAgICAgICAgbGF5ZXIuY2xvc2Uob3BlbkluZm9MYXllcik7CiAgICAgICAgICAgICAgbGF5ZXIuY2xvc2UobGF5c2VybXNnKTsKICAgICAgICAgICAgICBjb25zdCBlcnJvck1lc3NhZ2UgPQogICAgICAgICAgICAgICAgSlNPTi5wYXJzZShyZXNwb25zZS5yZXNwb25zZVRleHQpLm1lc3NhZ2UgfHwgJ+e9kee7nOmUmeivryc7CiAgICAgICAgICAgICAgc3dhbCh7CiAgICAgICAgICAgICAgICB0ZXh0OiAn5Y+R6YCB5YiwR29wZWVk6YGH5Yiw6Zeu6aKY5LqG77yM6K+35Yi35paw6YeN6K+V5Y2z5Y+v77yB77yBJywKICAgICAgICAgICAgICAgIGljb246ICd3YXJuaW5nJywKICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSwKICAgICAgICAgIH0pOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBsYXllci5jbG9zZShvcGVuSW5mb0xheWVyKTsKICAgICAgICAgIGxheWVyLmNsb3NlKGxheXNlcm1zZyk7CiAgICAgICAgICAkKCcjcGFyc2VCdG4nKS5odG1sKCc8cD7lj5HpgIHliLBHb3BlZWQ8L3A+Jyk7CiAgICAgICAgICBzd2FsKHsKICAgICAgICAgICAgdGV4dDogJ+WPkemAgeWIsEdvcGVlZOmBh+WIsOmXrumimOS6hu+8jOivt+WNh+e6p+aPkuS7tuWIt+aWsOmHjeivleWNs+WPr++8ge+8gScsCiAgICAgICAgICAgIGljb246ICd3YXJuaW5nJywKICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgfSk7CiAgfQogIGZ1bmN0aW9uIHRlc3RTZW5kVG9Hb3BlZWQoKSB7CiAgICByZXR1cm4gZmV0Y2god3dDb25maWcuZ29QZWVkVGFza1VybCwgewogICAgICBtZXRob2Q6ICdQT1NUJywKICAgICAgaGVhZGVyczogewogICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicKICAgICAgfSwKICAgIH0pCiAgICAgIC50aGVuKChyZXNwKSA9PiByZXNwLmpzb24oKSkKICAgICAgLnRoZW4oKHJlcykgPT4gewogICAgICAgIHJldHVybiB0cnVlOwogICAgICB9KS5jYXRjaChlID0+IHsKICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgIH0pCiAgfQogIGZ1bmN0aW9uIHNlbmRUb0dvcGVlZChpdGVtKSB7CiAgICBmZXRjaCh3d0NvbmZpZy5nb1BlZWRUYXNrVXJsLCB7CiAgICAgIG1ldGhvZDogJ1BPU1QnLAogICAgICBoZWFkZXJzOiB7CiAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJwogICAgICB9LAogICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7CiAgICAgICAgcmVxOgogICAgICAgIHsKICAgICAgICAgIHVybDogd3dDb25maWcudXJsLAogICAgICAgICAgZXh0cmE6IHsKICAgICAgICAgICAgaGVhZGVyOiB7CiAgICAgICAgICAgICAgIlVzZXItQWdlbnQiOiB3d0NvbmZpZy51YSwKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgb3B0OiB7CiAgICAgICAgICBleHRyYTogewogICAgICAgICAgICBjb25uZWN0aW9uczogMjU2LAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSksCiAgICB9KS50aGVuKChyZXNwKSA9PiByZXNwLmpzb24oKSkKICAgICAgLnRoZW4oKHJlcykgPT4gewogICAgICAgIGxheWVyLmNvbmZpcm0oYOivt+aJk+W8gCBHb3BlZWQg5p+l55yLICR7aXRlbS5zZXJ2ZXJfZmlsZW5hbWV9IOaYr+WQpuW8gOWni+S4i+i9ve+8n+acquS4i+i9veaIkOWKn++8jOWFiOiuvue9rklETS9ORE0gVXNlci1BZ2VudO+8mjxjb2RlPm5ldGRpc2s7MS4wLjE8L2NvZGU+77yM5YaN5aSN5Yi255u06ZO+5LiL6L2977yBYCwgewogICAgICAgICAgYnRuOiBbJ+W3suS4i+i9ve+8jOWFs+mXreW8ueeqlycsICfmnKrkuIvovb3vvIzlpI3liLbnm7Tpk74nXQogICAgICAgIH0sIGZ1bmN0aW9uIChpbmRleCkgewogICAgICAgICAgbGF5ZXIuY2xvc2UoaW5kZXgpOwogICAgICAgIH0sIGZ1bmN0aW9uICgpIHsKICAgICAgICAgIEdNX3NldENsaXBib2FyZCh3d0NvbmZpZy51cmwsICJ0ZXh0Iik7CiAgICAgICAgICBsYXllci5tc2coYCR7aXRlbS5zZXJ2ZXJfZmlsZW5hbWV9IOeahOebtOmTvuWkjeWItuaIkOWKn++8gWApOwogICAgICAgIH0pOwogICAgICB9KS5jYXRjaChlID0+IHsKICAgICAgfSkKICB9CiAgc2V0SW50ZXJ2YWwoKCkgPT4gewogICAgR01feG1saHR0cFJlcXVlc3QoewogICAgICBtZXRob2Q6ICdnZXQnLAogICAgICB1cmw6IHd3Q29uZmlnLmdvUGVlZFRhc2tVcmwgKyAnP3N0YXR1cz1ydW5uaW5nJywKICAgICAgaGVhZGVyczogewogICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsCiAgICAgIH0sCiAgICAgIG9ubG9hZDogZnVuY3Rpb24gKHJlc3BvbnNlKSB7CiAgICAgICAgY29uc3QgcmVzcG9uc2VEYXRhID0gSlNPTi5wYXJzZShyZXNwb25zZS5yZXNwb25zZVRleHQpOwogICAgICAgIGNvbnN0IHJlc3VsdCA9IHJlc3BvbnNlRGF0YS5kYXRhLmZpbHRlcihlID0+CiAgICAgICAgICBlLnN0YXR1cyA9PT0gInJ1bm5pbmciCiAgICAgICAgKS5maWx0ZXIoKGUpID0+IGUucHJvZ3Jlc3Muc3BlZWQgPCAxMDQ4NTc2KS5tYXAoZSA9PiBlLmlkKTsKICAgICAgICBjb25zdCBpZHMgPSByZXN1bHQubWFwKChlKSA9PiB7CiAgICAgICAgICByZXR1cm4gYGlkPSR7ZX1gCiAgICAgICAgfSkuam9pbignJicpCiAgICAgICAgaWYgKGlkcyAmJiBpZHMubGVuZ3RoKSB7CiAgICAgICAgICBHTV94bWxodHRwUmVxdWVzdCh7CiAgICAgICAgICAgIG1ldGhvZDogJ3B1dCcsCiAgICAgICAgICAgIHVybDogYCR7d3dDb25maWcuZ29QZWVkVGFza1VybH0vcGF1c2U/JHtpZHN9YCwKICAgICAgICAgICAgaGVhZGVyczogewogICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIG9ubG9hZDogZnVuY3Rpb24gKHJlc3BvbnNlKSB7CiAgICAgICAgICAgICAgR01feG1saHR0cFJlcXVlc3QoewogICAgICAgICAgICAgICAgbWV0aG9kOiAncHV0JywKICAgICAgICAgICAgICAgIHVybDogYCR7d3dDb25maWcuZ29QZWVkVGFza1VybH0vY29udGludWU/JHtpZHN9YCwKICAgICAgICAgICAgICAgIGhlYWRlcnM6IHsKICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJywKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBvbmxvYWQ6IGZ1bmN0aW9uIChyZXNwb25zZSkgewogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICAgIH0pCiAgICAgICAgfQogICAgICB9CiAgICB9KQogIH0sIDE1MDAwKQoKfSkoKTs=
Add Comment
Please, Sign In to add comment