Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6NDI5LCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoi5bel5YW3IiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1PQklMRV9VQSk7XG4gICAgY29uc3Qge2RlbW9EYXRhLGRlZmF1bHRTZXRzLGZsb29yc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuY29uc3Qge2dldE9uZSx1bmlxdWUyLGR1cGxpY2F0ZXN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmxldCBzalRlc3QgPVtdO2ZvcihsZXQgaSBpbiBkZW1vRGF0YSl7c2pUZXN0PXNqVGVzdC5jb25jYXQoZGVtb0RhdGFbaV0pfVxudGhpcy5kID0gW107XG5jb25zdCBqeEl0ZW0gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvanhJdGVtP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbnZhciBSb3V0ZSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb9cIik7XG5ldmFsK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WQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpO1xuICAgICAgICAgICAgbG9nKCd0aXRsZTonK3RpdGxlKTtcbiAgICAgICAgICAgIGlmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJiEvXuS4jemAiSR8XumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyByZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cIikpO1xuICAgICAgICAgICAgICAgIGV2YWwocmVxdWVzdChjb25maWcuY2opKTtcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBnZXRJdGVtKFwic2VsZWN0ZWQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpLnJlcGxhY2UoL+S4jemAiS9nLCcnKTtcbiAgICAgICAgICAgICAgICBsb2coJ+W8gOWni+iwg+eUqOaWreaPkua1i+ivlSxteUZpbGVk6LaF5pe25Li6OicrZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZSh1cmwsdGl0bGUscGFyc2VJbnQoZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSkpO1xuICAgICAgICAgICAgfWVsc2UgaWYoZ2V0SXRlbSgnZG4udGVzdF9tb2RlJyk9PT0n5pat5o+SJyYmL17prZTmlq0kLy50ZXN0KHRpdGxlKSl7XG4gICAgICAgICAgICAgICAgZXZhbChcInZhciBjb25maWcgPVwiICsgcmVxdWVzdChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKHJlcXVlc3QoY29uZmlnLmNqKSk7XG4gICAgICAgICAgICAgICAg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ICAgICAgICAgICAgICAgIGxldCBpID0gdGl0bGVBcnIuaW5kZXhPZihpdCk7XG4gICAgICAgICAgICAgICAgbGV0IGNvZGUgPSB1cmxBcnJbaV18fCcnO1xuICAgICAgICAgICAgICAgIGxldCBvdXRDb2RlID0gKHR5cGVvZihjb2RlKT09PSdzdHJpbmcnKT9jb2RlLnRyaW0oKTpiYXNlNjRFbmNvZGUoY29kZS50b1N0cmluZygpLnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgbGV0IG91dFRpdGxlID0gaXQucmVwbGFjZSgv8J+RiS9nLCcnKTtcbiAgICAgICAgICAgICAgICBpZihvdXRUaXRsZS5zdGFydHNXaXRoKCdodHRwJykmJih0eXBlb2Yob3V0Q29kZSk9PT0ndW5kZWZpbmVkJ3x8IW91dENvZGUpKXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dFRpdGxlKTtcbiAgICAgICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dENvZGV8fCcnKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgbGV0IG91dFRleHQgPSBqeENvZGUuam9pbignXFxuJyk7XG4gICAgICAgICAgICBsZXQgb3V0UGF0aCA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2VPdXRfJyttb2RlKycudHh0JztcbiAgICAgICAgICAgIHdyaXRlRmlsZShvdXRQYXRoLG91dFRleHQpO1xuICAgICAgICAgICAgbGV0IHBhc3RlcyA9IGdldFBhc3RlcygpO1xuICAgICAgICAgICAgbGV0IGltcG9ydFVybCA9IHNoYXJlUGFzdGUoYmFzZTY0RW5jb2RlKG91dFRleHQpLHBhc3Rlc1sxXSk7XG4gICAgICAgICAgICBsZXQgaW1wb3J0Q29kZSA9ICfprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKlJytpbXBvcnRVcmw7XG4gICAgICAgICAgICBjb3B5KGltcG9ydENvZGUpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWh+S7tuW3suWvvOWHuuWIsDonK291dFBhdGgrJ1xcbuivt+iHquihjOmAmui/h01U566h55CG5Zmo5p+l55yLJ1xuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/miJHkuI3muIXmpZrkvaDopoHlgZrku4DkuYg/XFxuJyttb2RlO1xuICAgICAgICB9XG4gICAgfSx0aXRsZUFycix1cmxBcnIpLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifwn5Ol5a+85YWlVFhUJyxcbiAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXG4gICAgdXJsOiQoKS5ydWxlKCgpPT57XG4gICAgICAgIGxldCBkID0gW107XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon5a+85YWl6K+05piOJyxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxuICAgICAgICAgICAgZGVzYzon5pSv5oyB5q2k5o+S5Lu25a+85Ye65qC85byP55qE5paH5pys6L+b6KGM5a+85YWl44CCXFxu5qC85byPMTog5ZCN56ewLOWcsOWdgCDkuIDooYzkuIDkuKrop6PmnpBcXG7moLzlvI8yOuS6keWJquWIh+advyDprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKl5Ymq5YiH5p2/5Zyw5Z2AJyxcbiAgICAgICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICBkZXNjOiBcInR4dOaWh+acrOino+aekOinhOWImSzkuIDooYzkuIDkuKpcIixcbiAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxuICAgICAgICAgICAgdGl0bGU6J+ino+aekOaWh+acrCcsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ2RuLmltcG9ydF90ZXh0JywgJycpLFxuICAgICAgICAgICAgICAgIHR5cGU6IFwidGV4dGFyZWFcIixcbiAgICAgICAgICAgICAgICBoZWlnaHQ6LTEsXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiLGlucHV0KSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon8J+TpeWvvOWFpScsXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXG4gICAgICAgICAgICB1cmw6JCgn56Gu5a6a57yW6L6R5aW95LqG5ZCXP+atpOaTjeS9nOWwhuimhuebluacrOWcsOW3suacieeahOiusOW9le+8jOW7uuiuruWkh+S7veWQjueUqOepuuaWh+S7tuWvvOWFpScpLmNvbmZpcm0oKCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCB7ZGVmYXVsdFNldHN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgICAgICAgICAgbGV0IGpzQ29kZSA9IHJlcXVlc3QocGFyc2VSb3V0ZSl8fEpTT04uc3RyaW5naWZ5KHt0aXRsZTpbXSxjb2Rlczp7fSxzZXR0aW5nczpkZWZhdWx0U2V0c30pO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsganNDb2RlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+mUmeivrzpcXG4nK2UubWVzc2FnZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgdG9JbXBvcnQgPSBnZXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiKTtcbiAgICAgICAgICAgICAgICBpZigv6a2U5pat6Kej5p6Q5a+85YWl5Y+j5LukwqXCpS8udGVzdCh0b0ltcG9ydCkmJnRvSW1wb3J0LnNwbGl0KCfCpcKlJykubGVuZ3RoPjEpe1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdG9JbXBvcnQuc3BsaXQoJ8KlwqUnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIS9eaHR0cC8udGVzdCh1cmwpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liarliIfmnb/lnLDlnYDmnInor68s5a+85YWl5aSx6LSlJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRvSW1wb3J0ID0gcGFyc2VQYXN0ZSh1cmwpO1xuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IGJhc2U2NERlY29kZSh0b0ltcG9ydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vbG9nKHRvSW1wb3J0KTtcbiAgICAgICAgICAgICAgICBsZXQgamlleGkgPSB0b0ltcG9ydC5zcGxpdCgnXFxuJykuZmlsdGVyKGl0PT5pdC50cmltKCkpO1xuICAgICAgICAgICAgICAgLy8gbG9nKGppZXhpKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VUaXRsZSA9IFtdO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZUNvZGUgPSB7fTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGppZXhpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzFdO1xuICAgICAgICAgICAgICAgICAgICBpZighdGl0bGV8fCFjb2RlKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6ZSZ6K+v6Kej5p6QOicramlleGlbaV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgLy9sb2codGl0bGUpO1xuICAgICAgICAgICAgICAgICAgICBpZighKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykuc3RhcnRzV2l0aCgnaHR0cCcpKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2codGl0bGUrJ+S4uuWHveaVsOino+aekCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29kZS5yZXBsYWNlKC9bXFxzXS9nLCcnKS5sZW5ndGg+MjApey8v6KeG5Li6ZnVuY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZXZhbChiYXNlNjREZWNvZGUoY29kZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBlLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHNjT2JqZWN0ID0gW1wiQ2l0eUlQXCIsIFwicGNVQVwiLCBcImNhY2hlTTN1OFwiLCBcImRlZmF1bHRQYXJzZVdlYlwiLFwibWFvc3NcIiwgXCJMTFFcIl07XG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xuICAgICAgICAgICAgICAgIGxldCBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpScramlleGkubGVuZ3RoKyfmnaHop6PmnpAnO1xuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBleHRyYTp7XG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6dHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xuICAgIH0pLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifimK/vuI/mn6Xph43lpITnkIYnLFxuICAgIGNvbF90eXBlOidzY3JvbGxfYnV0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mVfY3QgPSBub3JtYWxfbGlzdC5sZW5ndGggLSByZU5vckxpc3QubGVuZ3RoOyAvL+S7o+eggemHjeWkjVxuICAgICAgICBsZXQgdmFsdWVzX3JlID0gZHVwbGljYXRlcyhub3JtYWxfbGlzdCk7Ly/ph43lpI3nmoTlgLxcbiAgICAgICAgbGV0IGZ0bGlzdCA9IFtdO1xuICAgICAgICBsZXQgZmxhZ3MgPSB7fTtcbiAgICAgICAgbGV0IG15Rmxvb3JzID0gZmxvb3JzO1xuICAgICAgICBmb3IobGV0IGogaW4gY29kZXMpey8v6YGN5Y6G5omA5pyJXG4gICAgICAgICAgICBsZXQgb25lID0gY29kZXNbal07XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yob25lKSAhPT0gJ2Z1bmN0aW9uJyYmdmFsdWVzX3JlLmluY2x1ZGVzKG9uZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoZmxhZ3Nbb25lXSkgPT09ICd1bmRlZmluZWQnIHx8ICFmbGFnc1tvbmVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL+WPluWHuuesrOS4gOS4quagh+W/l1xuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3Nbb25lXSA9IG15Rmxvb3JzWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgbXlGbG9vcnMuc3BsaWNlKDAsIDEpOy8v5Yig6Zmk5qCH5b+X5YiX6KGo6YeM55qE56ys5LiA5Liq5YWD57SgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZnRsaXN0LnB1c2goe2tleTogZmxhZ3Nbb25lXSArIGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBqLCB2YWx1ZTogb25lfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBsb2coSlNPTi5zdHJpbmdpZnkoZmxhZ3MpKTtcbiAgICAgICAgbGV0IG5ld0NvZGVzID0ge307XG4gICAgICAgIGZvcihsZXQgayBpbiBmdGxpc3Qpe1xuICAgICAgICAgICAgbmV3Q29kZXNbZnRsaXN0W2tdLmtleV0gPSBmdGxpc3Rba10udmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IHRpcHMgPSAn5qOA5rWL5Yiw5ZCN56ew5aSN55So6aG555uu5pWwOicra2V5c19yZV9jdCsnLOS7o+eggemHjeWkjemhueebruaVsOmHjzonK3ZhbHVlX3JlX2N0KydcXG7pnIDopoHkuIDplK7miZPkuKrmoIfor4blkJc/5LiN5pSv5oyB6Ieq5Yqo5Yig6ZmkLOaJk+agh+W/l+iHquihjOino+WGsyc7XG4gICAgICAgIHJldHVybiAkKHRpcHMpLmNvbmZpcm0oKHZhbHVlX3JlX2N0LGpzb24sbmV3Q29kZXMscGFyc2VSb3V0ZSk9PntcbiAgICAgICAgICAgIGlmKHZhbHVlX3JlX2N0PDEpe1xuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6LnhLbpg73mmK8w5Liq6YeN5aSN6aG555uu5LqG77yM5bCx5LiN6ZyA6KaB5oiR5YGa5LuA5LmI5LqGISdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvbXBhcmUoKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGEsIGIpe1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7Zmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG4gICAgICAgICAgICAgICAgICAgIGxldCB4ID0gYS5zdWJzdHJpbmcoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBiLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxvb3JzLmluZGV4T2YoeSktZmxvb3JzLmluZGV4T2YoeCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAganNvbi5jb2RlcyA9IG5ld0NvZGVzO1xuICAgICAgICAgICAgbGV0IHRpdGxlcyA9IE9iamVjdC5rZXlzKG5ld0NvZGVzKTtcbiAgICAgICAgICAgIHRpdGxlcyA9IHRpdGxlcy5zb3J0KGNvbXBhcmUoKSk7XG4gICAgICAgICAgICBqc29uLnRpdGxlID0gdGl0bGVzO1xuICAgICAgICAgICAgdmFyIG5ld0ZpbGUgPSAkLnN0cmluZ2lmeShqc29uKTsgLy9KU09OLnBhcnNl5Lya5oql6ZSZXG4gICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5LiA6ZSu5omT5LiK5qCH5b+XJztcbiAgICAgICAgfSx2YWx1ZV9yZV9jdCxqc29uLG5ld0NvZGVzLHBhcnNlUm91dGUpXG4gICAgfSx1bmlxdWUyLGR1cGxpY2F0ZXMsZmxvb3JzKSxcbn0pO1xuZC5wdXNoKHtcbiAgICB0aXRsZTpcIvCflITph43nva5C56uZVUFcIixcbiAgICBjb2xfdHlwZTogXCJzY3JvbGxfYnV0dG9uXCIsXG4gICAgdXJsOiBcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cIixcbiAgICBleHRyYToge1xuICAgICAgICB1YTogUENfVUFcbiAgICB9XG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6XCLwn5eR77iP5om56YeP5pON5L2cXCIsXG4gICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiLFxu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6LTEwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAjdGlwc3tcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xMHB4O1xcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206NXB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLmZ1bmd7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXJcXG4gICAgICAgIH1cXG4gICAgICAgIGRpdi5ib3gge1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTFweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDIwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKui+k+WFpeahhuWwuuWvuCovXFxuICAgICAgICBmb3JtIHtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dCwgbGFiZWwsIHNlbGVjdCB7XFxuICAgICAgICAgICAgYm9yZGVyOiBub25lO1xcbiAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWtl+S9k+S9jee9riovXFxuICAgICAgICBpbnB1dCB7XFxuICAgICAgICAgICAgd2lkdGg6IDc3JTtcXG4gICAgICAgICAgICBoZWlnaHQ6IDMycHg7XFxuICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiA2NnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxhYmVsIHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNDNweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5bCP5qGGKi9cXG4gICAgICAgIC5iYXIgbGFiZWwge1xcbiAgICAgICAgICAgIC8qYmFja2dyb3VuZDogI0QwNkI2QzsqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAgICAgICAgICBsZWZ0OiAzcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKui+k+WFpeahhuagt+W8jyovXFxuICAgICAgICAuYmFyIGlucHV0IHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgc2VsZWN0IHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDo0MHB4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogMjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgLmxpZWIgc2VsZWN0e1xcbiAgICAgICAgICAgIC8qYm9yZGVyLXJhZGl1czogNHB4OyovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1cz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sSlNPTi5zdHJpbmdpZnkoe25vd190aGVtZTon6buY6K6k5Li76aKYJyx0aGVtZXM6W3RoZW1lcyx0aGVtZURlZl19KSlcXG4gICAgfVxcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IG15VGhlbWVzID0gSlNPTi5wYXJzZShmYmEuZmV0Y2godGhlbWVSb3V0ZSkpO1xcbiAgICAgICAgbGV0IG5vd1RoZW1lID0gbXlUaGVtZXMudGhlbWVzLmZpbHRlcihpdD0+aXQubmFtZSA9PT0gbXlUaGVtZXMubm93X3RoZW1lKTtcXG4gICAgICAgIHRoZW1lcyA9IG5vd1RoZW1lP25vd1RoZW1lWzBdOm15VGhlbWVzLnRoZW1lc1swXTtcXG4gICAgfWNhdGNoIChlKSB7fVxcblxcbiAgICAvLyDmlq3lv7XliJ3lp4vljJbpg6jliIZcXG4gICAgY29uc3QgYWxsQXBpPVsnaHR0cHM6Ly90ZXN0LnJvbmd4aW5ndnIuY29tL3Rlc3QvP3VybD0nLCdodHRwOi8vY2FjaGUubGFuZ3VhbmcuaWN1Ojg4L2RpZGkucGhwP3VybD0nXTtcXG4gICAgdmFyIHNldHRpbmdzID0ge1xcbiAgICAgICAgcXk6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgeWs6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgdHg6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgbWc6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgYmw6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgc2g6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgeGc6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgLy8gYWw6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgcHA6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgbWk6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgbGU6ICfkuIfog73op6PmnpDikr8nLFxcbiA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VUEnLCAncGFyc2VMYycsICdncGFyc2UnLCAnbnBhcnNlJ107XFxuICAgICAgICBteVNlbGVjdCA9IG5ld0NvbmZpZy50aXRsZS5maWx0ZXIoY29tcGFyZSh5Y1RpdGxlKSk7XFxuICAgICAgICAvLyBteVNlbGVjdCA9IG15U2VsZWN0Lm1hcCgoaXQpPT57XFxuICAgICAgICAvLyAgICAgbGV0IGZsYWcgPSAn4pOKJztcXG4gICAgICAgIC8vICAgICBpZih0eXBlb2YobmV3Q29uZmlnLmNvZGVzW2l0XSk9PT0nZnVuY3Rpb24nKXtcXG4gICAgICAgIC8vICAgICAgICAgZmxhZyA9ICfikr8nO1xcbiAgICAgICAgLy8gICAgIH1lbHNlIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgIC8vICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgLy8gICAgIH1cXG4gICAgICAgIC8vICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgLy8gfSk7XFxuICAgIH1cXG4gICAgLy9mYmEubG9nKEpTT04uc3RyaW5naWZ5KG15U2VsZWN0KSk7XFxuXFxuICAgIGxldCBvcHRpb25zID0gW1xcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+eIseWlh+iJuicsXFxuICAgICAgICAgICAgaWQ6J3F5JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5xeSxcXG4gICAgICAgICAgICBwbGFjZWhvbGRlcjon6K6+572u54ix5aWH6Im6J1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkvJjphbcnLFxcbiAgICAgICAgICAgIGlkOid5aycsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MueWtcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IW+6K6vJyxcXG4gICAgICAgICAgICBpZDondHgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnR4XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+iKkuaenCcsXFxuICAgICAgICAgICAgaWQ6J21nJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5tZ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflk5Tlk6nlk5Tlk6knLFxcbiAgICAgICAgICAgIGlkOidibCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYmxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5pCc54uQJyxcXG4gICAgICAgICAgICBpZDonc2gnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnNoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+ilv+eTnCcsXFxuICAgICAgICAgICAgaWQ6J3hnJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy54Z1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOidQUFRWJyxcXG4gICAgICAgICAgICBpZDoncHAnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnBwXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WSquWSlScsXFxuICAgICAgICAgICAgaWQ6J21pJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5taVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkuZDop4YnLFxcbiAgICAgICAgICAgIGlkOidsZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubGVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonMTkwNScsXFxuICAgICAgICAgICAgaWQ6J29uZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mub25lXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+mjjuihjCcsXFxuICAgICAgICAgICAgaWQ6J2Z1bicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuZnVuXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+m+meiFvicsXFxuICAgICAgICAgICAgaWQ6J2x0JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5sdFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkurrkurrov7cnLFxcbiAgICAgICAgICAgIGlkOidycicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucnJcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5LqU5q+SJyxcXG4gICAgICAgICAgICBpZDond2QnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLndkXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WFtuS7licsXFxuICAgICAgICAgICAgaWQ6J290aCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mub3RoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WFqOWxgCcsXFxuICAgICAgICAgICAgaWQ6J3FqdScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucWp1XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+aPkuS7ticsXFxuICAgICAgICAgICAgaWQ6J2NqJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5jalxcbiAgICAgICAgfSxcXG4gICAgXTtcXG5cXG4gICAgZnVuY3Rpb24gRGlkKGlkKXtcXG4gICAgICAgIHJldHVybiBkb2N1bWVudC5nZXRFbGVt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BleHRyYToge31cXG4gICAgICAgIH0pKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBvcGVuVGhlbWUoKXtcXG4gICAgICAgIGZiYS5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICBydWxlOiBcXFwiPV5fXj1cXFwiLFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5Li76aKY566h55CGXFxcIixcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU95Li76aKYI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgZ3JvdXA6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwcmVSdWxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBleHRyYToge31cXG4gICAgICAgIH0pKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBvcGVuSnhNYW5hZ2UoKXtcXG4gICAgICAgIGZiYS5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICBydWxlOiBcXFwiPV5fXj1cXFwiLFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi6Kej5p6Q6YWN572u566h55CGXFxcIixcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU96Kej5p6QI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgZ3JvdXA6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwcmVSdWxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBleHRyYToge31cXG4gICAgICAgIH0pKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBjYW5jZWwoKXtcXG4gICAgICAgIGlmKCFteVNldCl7XFxuICAgICAgICAgICAgZmJhLndyaXRlRmlsZShvbGRSb3V0ZSwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZ3MsIG51bGwsIDQpKTtcXG4gICAgICAgICAgICBmYmEucmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBmYmEuYmFjayhmYWxzZSk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gY2xpY2ttZShtc2csZHVyYXRpb24sdGl0bGUpe1xcbiAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgIGZvcihsZXQga2V5IGluIHNldHRpbmdzKXtcXG4gICAgICAgICAgICAgICAgLy8gZmJhLmxvZyhEaWQoa2V5KSsnJytrZXkpO1xcbiAgICAgICAgICAgICAgICB0cnl7XFxuICAgICAgICAgICAgICAgICAgICAvL3NldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZS5yZXBsYWNlKC/ik4p84pK/L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3Nba2V5XSA9IERpZChrZXkpLnZhbHVlO1xcbiAgICAgICAgICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgICAgICBhbGVydChcXFwi5pyq6I635Y+W5Yiw6IqC54K5OlxcXCIra2V5K1xcXCJcXFxcblxcXCIrZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihteVNlbGVjdCl7XFxuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24obmV3Q29uZmlnLnNldHRpbmdzLCBzZXR0aW5ncyk7XFxuICAgICAgICAgICAgICAgIGZiYS53cml0ZUZpbGUobmV3Um91dGUsICQkJC5zdHJpbmdpZnkobmV3Q29uZmlnKSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGZiYS53cml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iAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIG5ld1N0cmluZztcXG4gICAgfSxcXG4gICAgbm93RGF0ZTogZnVuY3Rpb24oKSB7XFxuICAgICAgICB2YXIgZGF0ZTEgPSBuZXcgRGF0ZSgpO1xcbiAgICAgICAgdmFyIGRhdGVTdHIgPSBcXFwiXFxcIjtcXG4gICAgICAgIGlmIChkYXRlMSkge1xcbiAgICAgICAgICAgIGRhdGVTdHIgPSBkYXRlMS5nZXRGdWxsWWVhcigpO1xcbiAgICAgICAgICAgIHZhciBtb250aCA9IGRhdGUxLmdldE1vbnRoKCkgKyAxO1xcbiAgICAgICAgICAgIHZhciBkYXkgPSBkYXRlMS5nZXREYXRlKCk7XFxuICAgICAgICAgICAgaWYgKG1vbnRoIDwgMTApIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLTBcXFwiICsgbW9udGg7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLVxcXCIgKyBtb250aDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGRheSA8IDEwKSB7XFxuICAgICAgICAgICAgICAgIGRhdGVTdHIgKz0gXFxcIi0wXFxcIiArIGRheTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBkYXRlU3RyICs9IFxcXCItXFxcIiArIGRheTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZGF0ZVN0cjtcXG4gICAgfSxcXG4gICAgbm93RGF0ZVN0cjpmdW5jdGlvbiAoKXsgLy8g5Yip55SoJOW3peWFt+iOt+WPluagvOW8j+WMluWQjueahOW9k+WJjeaXtumXtFxcbiAgICAgICAgcmV0dXJuICAkLmRhdGVGb3JtYXQobmV3IERhdGUoKSxcXFwieXl5eS1NTS1kZCBISDptbTpzc1xcXCIpO1xcbiAgICB9LFxcbiAgICB0b0pTT046IGZ1bmN0aW9uKGpzb24pIHtcXG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShqc29uLCAoa2V5LCB2YWx1ZSkgPT4ge1xcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT0gJ2Z1bmN0aW9uJykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWUudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgNCk7XFxuICAgIH0sXFxuICAgIHRvVk51bTogZnVuY3Rpb24oYSkge1xcbiAgICAgICAgdmFyIGEgPSBhLnRvU3RyaW5nKCk7XFxuICAgICAgICB2YXIgYyA9IGEuc3BsaXQoJy4nKTtcXG4gICAgICAgIHZhciBudW1fcGxhY2UgPSBbXFxcIlxcXCIsIFxcXCIwXFxcIiwgXFxcIjAwXFxcIiwgXFxcIjAwMFxcXCIsIFxcXCIwMDAwXFxcIl0sXFxuICAgICAgICAgICAgciA9IG51bV9wbGFjZS5yZXZlcnNlKCk7XFxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGMubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICB2YXIgbGVuID0gY1tpXS5sZW5ndGg7XFxuICAgICAgICAgICAgY1tpXSA9IHJbbGVuXSArIGNbaV07XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgcmVzID0gYy5qb2luKCcnKTtcXG4gICAgICAgIHJldHVybiByZXM7XFxuICAgIH0sXFxuICAgIGNwclZlcnNpb246IGZ1bmN0aW9uKGEsIGIpIHtcXG4gICAgICAgIHZhciBfYSA9IHBhcnNlSW50KHRoaXMudG9WTnVtKGEpKSxcXG4gICAgICAgICAgICBfYiA9IHBhcnNlSW50KHRoaXMudG9WTnVtKGIpKTtcXG4gICAgICAgIGIgPSBpc05hTihfYikgPyB2ZXJzaW9uIDogYjtcXG4gICAgICAgIG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mlnX2IgPSBjb25maWdfYS5sZW5ndGg7XFxuICAgICAgICBpZiAodG9rZW4gPT0gMHgxKSB7XFxuICAgICAgICAgICAgdmFyIGNvbmZpZ191cmwgPSBhdG9iKGNvbmZpZ191cmwpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB2YXIgY29uZmlnX3VybCA9IGVuY29kZVVSSUNvbXBvbmVudChjb25maWdfdXJsKTtcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciBjb25maWdfYyA9IGNvbmZpZ191cmwubGVuZ3RoO1xcbiAgICAgICAgZm9yIChpID0gMHgwOyBpIDwgMHgxMDA7IGkrKykge1xcbiAgICAgICAgICAgIHRlbVtpXSA9IGNvbmZpZ19hW2kgJSBjb25maWdfYl0uY2hhckNvZGVBdCgpO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2ldID0gaTtcXG4gICAgICAgIH1cXG4gICAgICAgIGZvciAoaiA9IGkgPSAweDA7IGkgPCAweDEwMDsgaSsrKSB7XFxuICAgICAgICAgICAgaiA9IChqICsgY29uZmlnX2FycnlbaV0gKyB0ZW1baV0pICUgMHgxMDA7XFxuICAgICAgICAgICAgdG1wID0gY29uZmlnX2FycnlbaV07XFxuICAgICAgICAgICAgY29uZmlnX2FycnlbaV0gPSBjb25maWdfYXJyeVtqXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtqXSA9IHRtcDtcXG4gICAgICAgIH1cXG4gICAgICAgIGZvciAoYSA9IGogPSBpID0gMHgwOyBpIDwgY29uZmlnX2M7IGkrKykge1xcbiAgICAgICAgICAgIGEgPSAoYSArIDB4MSkgJSAweDEwMDtcXG4gICAgICAgICAgICBqID0gKGogKyBjb25maWdfYXJyeVthXSkgJSAweDEwMDtcXG4gICAgICAgICAgICB0bXAgPSBjb25maWdfYXJyeVthXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVthXSA9IGNvbmZpZ19hcnJ5W2pdO1xcbiAgICAgICAgICAgIGNvbmZp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L2xvZyhwbGF5VXJscyk7XFxuICAgICAgICAgICAgY29uc3Qge0xhenlQYXJzZUZhc3R9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcXG4gICAgICAgICAgICBsZXQgcmV0ID0gTGF6eVBhcnNlRmFzdChwbGF5VXJscyx0aW1lb3V0LHRpbWVvdXQpO1xcbiAgICAgICAgICAgIGlmKHR5cGVvZihyZXQpPT09J29iamVjdCcmJnJldC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgIC8vcmV0dXJuIHJldFswXVxcbiAgICAgICAgICAgICAgICAvL2xvZyhyZXQpO1xcbiAgICAgICAgICAgICAgICBsZXQgdiA9IGdldEFwcFZlcnNpb24oKTtcXG4gICAgICAgICAgICAgICAgaWYocGFyc2VJbnQodik+PTIxOTQmJnJldC5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IEFycmF5LmZyb20obmV3IFNldChyZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVzPXVybHMubWFwKChpdCxpZCk9Pml0LnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGg+MT9pdC5zcGxpdChcXFwi4piFXFxcIilbMV06XFxcIue6v+i3rzpcXFwiK3BhcnNlSW50KGlkKzEpKTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHM9dXJscy5tYXAoaXQ9Pml0LnNwbGl0KFxcXCLimIVcXFwiKVswXSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighLzsvLnRlc3QoaXQpfHxpdC5zcGxpdCgnOycpLmxlbmd0aDwyKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS9ALy50ZXN0KGhlYWQpfHwhL3t8fS8udGVzdChoZWFkKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkPWhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIGhlYWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87Lywn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR1cmw9aXQuc3BsaXQoJzsnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihpdC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSYmIXR1cmwuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dXJsKz1cXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHVybFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe3VybHM6dXJscyxoZWFkZXJzOmhlYWRlcnMsbmFtZXM6bmFtZXN9KTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0WzBdLnNwbGl0KFxcXCLimIVcXFwiKVswXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIHJldHVybiByZXRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBjb25zdCB7bGF6eVBhcnNlfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgbGV0IHg1UGxheT1sYXp5UGFyc2UocGxheVVybCx0aW1lb3V0KTtcXG4gICAgICAgICAgICBpZih0eXBlb2YoeDVQbGF5KT09XFxcInVuZGVmaW5lZFxcXCJ8fCF4NVBsYXkpe1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6YGT6ZW/5LuT5bqT6Kej5p6Q5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgdGlwcz0veDVSdWxlfHdlYlJ1bGUvLnRlc3QoeDVQbGF5KT9cXFwieDUvd2Vi5YWN5ZeF5byA5aeLXFxcIjpcXFwi5p6B6YCf5YWN5ZeF5o6i5a6M5q+V77yM5Zyw5Z2AOlxcXCIrKC9eaHR0cC8udGVzdCh4NVBsYXkpP3g1UGxheTon6Z2e5q2j5bi46ZO+5o6lJyk7XFxuICAgICAgICAgICAgbG9nKHRpcHMpO1xcbiAgICAgICAgICAgIHJldHVybiB4NVBsYXk7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIFxcXCJtYW9zc1xcXCI6XFxuICAgICAgICBmdW5jdGlvbiAoanh1cmwsIHJlZiwga2V5KSB7XFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMu54yrKGp4dXJsLCByZWYsIGtleSlcXG4gICAgICAgIH0sXFxuICAgIOWFjeWXhTpmdW5jdGlvbih2aXBVcmwsayl7XFxuICAgICAgICBrPWt8fFtcXFwidXJsXFxcIixcXFwiZGF0YS51cmxcXFwiXTtcXG4gICAgICAgIHRyeXtcXG4gICAgICAgICAgICBsZXQgcmpzb249SlNPTi5wYXJzZShmZXRjaCh2aXBVcmwpKTtcXG4gICAgICAgICAgICAvL2xvZyhyanNvbik7XFxuICAgICAgICAgICAgbGV0IHJlYWxVcmw9Jyc7XFxuICAgICAgICAgICAgaWYodHlwZW9mKGspPT0nc3RyaW5nJyl7XFxuICAgICAgICAgICAgICAgIHJlYWxVcmw9ZXZhbChgcmpzb24uJHtrfWApO1xcbiAgICAgICAgICAgIH1lbHNlIGlmKEFycmF5LmlzQXJyYXkoaykpe1xcbiAgICAgICAgICAgICAgICBmb3IobGV0IGkgb2Ygayl7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlYWxVcmw9ZXZhbChgcmpzb24uJHtpfWApO1xcbiAgICAgICAgICAgICAgICAgICAgaWYocmVhbFVybCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYocmVhbFVybC5zdGFydHNXaXRoKCcvJykpe1xcbiAgICAgICAgICAgICAgICByZWFsVXJsID0gJ2h0dHBzOi8vJytyZWFsVXJsO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5pc1ZpZGVvKHJlYWxVcmwpfHxcXFwiXFxcIjtcXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICBsb2coZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcIlxcXCJcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgWDU6ZnVuY3Rpb24odmlwVXJsLHJlZil7Ly8gaHR0cHM6Ly9hcGkuNTJ3eWIuY29tL3dlYmNsb3VkLz92PWh0dHA6Ly92aXAuMTkwNS5jb20vcGxheS82OTE5NDAuc2h0bWwgaHR0cDovL3d3dy5jZGNlci5uZXQvXFxuICAgICAgICBsZXQgX3g1ID0gJC50b1N0cmluZygodmlwVXJsKSA9PiB7XFxuICAgICAgICAgICAgaWYoIWxvY2F0aW9uLmhyZWYuaW5jbHVkZXModmlwVXJsKSl7XFxuICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWYgPSB2aXBVcmw7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKHdpbmRvdy5jb3VudCA9PSBudWxsKXtcXG4gICAgICAgICAgICAgICAgd2luZG93LmNvdW50PTE7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHdpbmRvdy5jb3VudCsrO1xcbiAgICAgICAgICAgIGlmKCB3aW5kb3cuY291bnQgPj0gMjApe1xcbiAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLmnKrojrflj5bliLDotYTmupDlnLDlnYDvvIzot7PliLDop6PmnpDpobVcXFwiKTtcXG4gICAg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VxcbiAgICAgICAgICAgIHJldHVybiBjb25maWcudXJsO1xcbiAgICAgICAgfVxcbiAgICAgICAgY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAvLyByZXR1cm4gXFxcIlxcXCI7XFxuICAgICAgICAgICAgcmV0dXJuIGp4dXJsO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBMTFE6IGZ1bmN0aW9uKGp4dXJsKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBhcGkgPSBqeHVybC5zcGxpdCgnP3VybD0nKVswXSArIFxcXCJhcGkucGhwXFxcIjtcXG4gICAgICAgICAgICB2YXIgYjY0aWQgPSBiYXNlNjRFbmNvZGUoanh1cmwuc3BsaXQoJ3VybD0nKVsxXSk7XFxuICAgICAgICAgICAgdmFyIHBhcnNlaWQgPSB0b29scy5jYWVzYXJDaXBoZXIoYjY0aWQsIC0xKTtcXG4gICAgICAgICAgICB2YXIganNvbiA9IEpTT04ucGFyc2UocmVxdWVzdChhcGksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiBqeHVybFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcXG4gICAgICAgICAgICAgICAgYm9keTogJ3VybD0nICsgcGFyc2VpZFxcbiAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICB1cmwgPSAoanNvbi5jb2RlID09IDIwMCA/IGJhc2U2NERlY29kZSh0b29scy5jYWVzYXJDaXBoZXIoanNvbi51cmwsIC0xKSkgOiAnJyk7XFxuICAgICAgICAgICAgcmV0dXJuIHVybDtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gJyc7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIFBhbkd1OiBmdW5jdGlvbih2aXBVcmwsIGRhdGEpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgLyp2YXIgcmVmID0gJ2h0dHBzOi8vd3d3LnBhbmd1amlleGkuY29tLyc7XFxuICAgICAgICAgICAgdmFyIHBhcnNlID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9qaWV4aS8/dXJsPScgKyB2aXBVcmw7XFxuICAgICAgICAgICAgdmFyIGFwaSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvYXBpLnBocCc7XFxuICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICAvL3ZhciByZWYgPSAnaHR0cHM6Ly94bXlzdHYuY29tLyc7XFxuICAgICAgICAgICAgLy92YXIgcGFyc2UgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2luZGV4LnBocD91cmw9JyArIHRhaWxVcmw7XFxuICAgICAgICAgICAgLy92YXIgYXBpID0gJ2h0dHBzOi8vd3d3Ljk5a3B3LmNvbS9wYW5ndS9hcGkucGhwJztcXG4gICAgICAgICAgICB2YXIgcGFyc2UgPSAnaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jb20vcGFuZ3UvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgICAgIHZhciBhcGkgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L3Bhbmd1MjAyMS9hcGkucGhwJztcXG4gICAgICAgICAgICBpZiAoZGF0YSkge1xcbiAgICAgICAgICAgICAgICByZWYgPSBkYXRhWzBdO1xcbiAgICAgICAgICAgICAgICBwYXJzZSA9IGRhdGFbMV07XFxuICAgICAgICAgICAgICAgIGFwaSA9IGRhdGFbMl07XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBUaW1lID0gKE1hdGguZmxvb3IobmV3IERhdGUoKS5nZXRUaW1lKCkgLyAxMDAwKSAqIDEpLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgdmFyIHVybCA9IEpTT04ucGFyc2UocmVxdWVzdChhcGks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pgILnlKjkuo7ov5nkuKrnvZHnq5nnmoTop6PmnpDliJfooahcXG4gICAgICAgIC8vIGxvZyhqeHMpO1xcbiAgICAgICAgaWYoanhzKXtcXG4gICAgICAgICAgICBmb3IobGV0IGkgaW4ganhzKXtcXG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIFBhcnNlU1tqeHNbaV1dID09ICdmdW5jdGlvbicmJiEv6YCa5YWNLy50ZXN0KFBhcnNlU1tqeHNbaV1dLnRvU3RyaW5nKCkpKXtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOmp4c1tpXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBydWxlOlBhcnNlU1tqeHNbaV1dXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIHBhcnNlc1xcbiAgICB9XFxuICAgIHZhciBleHRyYSA9IHt9O1xcbiAgICB2YXIgcGFyc2VzID0gW107IC8v5YWN5ZeF5o6i5YiX6KGoXFxuICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxcbiAgICBpZighc3RyVGl0bGUpe1xcbiAgICAgICAgaWYoL0xULy50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHN0ciA9IG15U2V0Lmx0O1xcbiAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdsdCcpO1xcbiAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdsdCcsc3RyKTtcXG4gICAgICAgIH0gZWxzZSBpZigvcmVucmVubWkvLnRlc3QodmlwVXJsKSl7XFxuICAgICAgICAgICAgc3RyID0gbXlTZXQucnI7XFxuICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3JyJyk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FBhcnNlUy7pgZPplb/ku5PlupPpgJrlhY0ocGxheVVybCx0aW1lb3V0KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vaG9zdCA9IGRlY29kZVVSSUNvbXBvbmVudChob3N0KTtcXG4gICAgICAgICAgICBzd2l0Y2ggKG15U2V0LnFqdSkge1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCLpu5jorqRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChob3N0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicXEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQudHg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd0eCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgndHgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiaXFpeWkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucXk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdxeScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgncXknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwieW91a3UuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd5aycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgneWsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYWxpenlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5hbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2FsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdhbGl6eScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJtZ3R2LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm1nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbWcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ21nJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImJpbGliaWxpLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnYmwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2JsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInNvaHUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuc2g7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwidHYuc29odS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5zaDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJpeGlndWEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueGc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd4ZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgneGcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicHB0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5wcDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3BwJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdwcCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJtaWd1dmlkZW8uY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdtaScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnbWknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibGUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdsZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnbGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiMTkwNS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5vbmU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdvbmUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ29uZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJmdW4udHZcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5mdW47XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdmdW4nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2Z1bicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5vdGg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdvdGgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ290aCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucWp1O1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9ZWxzZXtcXG4gICAgICAgIGxvZygn6a2U5pat5omn6KGM5a6a5ZCR6Kej5p6Q57q/6Lev5aS0Oicrc3RyVGl0bGUpO1xcbiAgICAgICAgc3RyID0gc3RyVGl0bGU7XFxuICAgIH1cXG4gICAgbGV0IHdpdGhCYXRjaCA9ICEhKE15SmlleGkuaXNBdXRvICYmIE15SmlleGkuYXV0b01vZGUgPT09ICfpgJ/luqbkvJjlhYgnKTtcXG4gICAgbGV0IHdpdGhCYXRjaE9yZGVyID0gISEoTXlKaWV4aS5pc0F1dG8gJiYgL+mhuuW6j+S8mOWFiHzll4XmjqLkvJjlhYgvLnRlc3QoTXlKaWV4aS5hdXRvTW9kZSkpO1xcbiAgICBsZXQgc2luZ2xlQmFjayA9IE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2U7IC8v5ZCK5q+b5qih5byP44CC5Y2V5Liq57uT5p6c55u05o6l6L+U5Zue77yM5YGc5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AgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZmFsc2VcXG4gICAgfVxcblxcbiAgICBmdW5jdGlvbiB1bmlxdWUyKGFycmF5KXsvL+WOu+mHjeWHveaVsFxcbiAgICAgICAgcmV0dXJuIEFycmF5LmZyb20obmV3IFNldChhcnJheSkpO1xcbiAgICB9XFxuICAgIGZ1bmN0aW9uIEFyclNldChBcnIsIGlkKSB7Ly/lr7nosaHmlbDnu4Tljrvph41cXG4gICAgICAgIHZhciBvYmogPSB7fTtcXG4gICAgICAgIGNvbnN0IGFycmF5cyA9IEFyci5yZWR1Y2UoKHNldEFyciwgaXRlbSkgPT4ge1xcbiAgICAgICAgICAgIG9ialtpdGVtW2lkXV0gPyAnJyA6IG9ialtpdGVtW2lkXV0gPSB0cnVlICYmIHNldEFyci5wdXNoKGl0ZW0pO1xcbiAgICAgICAgICAgIHJldHVybiBzZXRBcnI7XFxuICAgICAgICB9LCBbXSk7XFxuICAgICAgICByZXR1cm4gYXJyYXlzO1xcbiAgICB9XFxuICAgIGZ1bmN0aW9uIHNvcnRCeUtleShhcnJheSwga2V5LCBvcmRlcikgey8v5a+56LGh5pWw57uE5oyJ5p+Q5Liq6ZSu5YC85o6S5bqPXFxuICAgICAgICByZXR1cm4gYXJyYXkuc29ydChmdW5jdGlvbihhLCBiKSB7XFxuICAgICAgICAgICAgdmFyIHggPSBwYXJzZUludChhW2tleV0ubWF0Y2goLyhcXFxcZCspLylbMV0pOy8v5L+u5aSN5aSn5LqOMTDlh7rpl67pophcXG4gICAgICAgICAgICB2YXIgeSA9IHBhcnNlSW50KGJba2V5XS5tYXRjaCgvKFxcXFxkKykvKVsxXSk7XFxuICAgICAgICAgICAgLy8gbG9nKCd4OicreCtcXFwiLHk6XFxcIit5KTtcXG4gICAgICAgICAgICBpZiAob3JkZXIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICgoeCA8IHkpID8gLTEgOiAoKHggPiB5KSA/IDEgOiAwKSlcXG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leHRyYS5uYW1lTGlzdCA9IFtdO1xcbiAgICAgICAgICAgIGV4dHJhLnBsYXlVcmxMaXN0ID0gW107XFxuICAgICAgICB9XFxuICAgICAgICBmdW5jdGlvbiBnZXRNeVVybHModXJscyl7XFxuICAgICAgICAgICAgcmV0dXJuIHVybHMubWFwKChpdCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdHVybCA9IGl0LnNwbGl0KCc7JylbMF07XFxuICAgICAgICAgICAgICAgIGlmIChpdC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSAmJiAhdHVybC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdHVybCArPSBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiB0dXJsXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBmdW5jdGlvbiBnZXRNeUhlYWRlcnModXJscyl7XFxuICAgICAgICAgICAgcmV0dXJuIHVybHMubWFwKChpdCkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoIS87Ly50ZXN0KGl0KSB8fCBpdC5zcGxpdCgnOycpLmxlbmd0aCA8IDIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEvQC8udGVzdChoZWFkKSB8fCAhL3t8fS8udGVzdChoZWFkKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gaGVhZCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBoZWFkW2ldLnNwbGl0KCdAJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gaGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCAn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZnVuY3Rpb24gZ2V0TXlQbGF5VXJsTGlzdCgpe1xcbiAgICAgICAgICAgIGlmKEFycmF5LmlzQXJyYXkoZXh0cmEucGxheVVybExpc3QpKXtcXG4gICAgICAgICAgICAgICAgLy8gcmV0dXJuIGV4dHJhLnBsYXlVcmxMaXN0Lm1hcChpdD0+J3ZpZGVvOi8vJytpdC5yZXBsYWNlKCc/dXJsPScsJz9pZD0nK3QrJyZ1cmw9JykucmVwbGFjZSgnP3Y9JywnP2lkPScrdCsnJnY9JykpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZXh0cmEucGxheVVybExpc3QubWFwKGl0PT4ndmlkZW86Ly8nK2l0KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIFtdXFxuICAgICAgICB9XFxuXFxuXFxuICAgICAgICBpZighd2l0aEJhdGNoT3JkZXJ8fHN0clRpdGxlKSB7Ly/kuI3lvIDlpJrnur/ot6/pobrluo/kvJjlhYjmiJbogIXmjIflrprkuobop6PmnpBcXG4gICAgICAgICAgICB1cmwgPSBQYXJzZVNbc3RyXSh2aXBVcmwsdGltZW91dCk7XFxuICAgICAgICB9XFxuICAgICAgICBlbHNley8v5byA5LqG5aSa57q/6Lev6aG65bqP5LyY5YWI5omn6KGM5YWN5ZeF5aSa5Lu75YqhXFxuICAgICAgICAgICAgaWYodHlwZW9mIFBhcnNlU1tzdHJdID09ICdmdW5jdGlvbicmJiEv6YCa5YWNLy50ZXN0KFBhcnNlU1tzdHJdLnRvU3RyaW5nKCkpKXtcXG4gICAgICAgICAgICAgICAgcGFyc2VzLnVuc2hpZnQoe25hbWU6c3RyfSk7IC8v5oqK5Li76YWN572u55qE5YWN5ZeF5o6i5Yqg5YWl5Yiw5aSa5Lu75Yqh5YiX6KGoXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHBhcnNlcyA9IEFyclNldChwYXJzZXMsJ25hbWUnKTsgLy/ljrvph41cXG4gICAgICAgICAgICBpZih1c2VfbXgpIHsgLy8g5aaC5p6c5L2/55So5YWN5ZeFLOWFiOWkmuS7u+WKoei3keWFjeWXhVxcbiAgICAgICAgICAgICAgICB2YXIgY291bnQgPSBwYXJzZXMubGVuZ3RoOyAvL+iuvue9ruS7u+WKoeaVsOmHj1xcbiAgICAgICAgICAgICAgICBsb2coJ+mtlOaWreW8gOWQr+WkmuS7u+WKoeino+aekCzku7vliqHmlbDph486JyArIGNvdW50KTtcXG4gICAgICAgICAgICAgICAgbG9nKCfop6PmnpDliJfooag6JyArIEpTT04uc3RyaW5naWZ5KHBhcnNlcykpO1xcbiAgICAgICAgICAgICAgICB2YXIgcGFyc2VSZXQgPSBbXTsgLy/op6PmnpDnu5PmnpzliJfooahcXG4gICAgICAgICAgICAgICAgbGV0IHRhc2tzID0gcGFyc2VzLm1hcCgoaXQsIGlkZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuYzogdGFzayxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpdC5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBydWxlOml0LnJ1bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpcFVybDogdmlwVXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiB0aW1lb3V0XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogXFxcInRhc2tcXFwiICsgaWRleFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meino+aekDpcXFwiICsgY291bnQpO1xcblxcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBpc0RtKHJldCkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhc0RtKHJldC5zcGxpdCgnIycpWzBdLnNwbGl0KCc7JylbMF0sIGRtVXJscylcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBiZSh0YXNrcywge1xcbiAgICAgICAgICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24gKG9iaiwgaWQsIGVycm9yLCByZXQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuebkeWQrOWIsOS7u+WKoVxcXCIgKyBpZCArICflt7Lnu5PmnZ8sZXJyb3I6JyArIGVycm9yICsgJyxyZXQ6JyArIHJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0gcmV0IHx8ICcnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlUmV0LnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0OiByZXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IHRhc2tzLmZpbHRlcihpdCA9PiBpdC5pZCA9PT0gaWQpWzBdLnBhcmFtLm5hbWVcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2luZ2xlQmFjaykgey8v5ZCK5q+b5qih5byP5byA5aeL55qE6K+dLOWIpOaWrXJldOacieaViOaAp1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+S7u+WKoScgKyBpZCArICfnu5PmnpzmmK/lkIrmr5s/JyArIGlzRG0ocmV0KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaXNEbShyZXQpICYmIFBhcnNlUy5pc1ZpZGVvKHJldC5zcGxpdCgnIycpWzBdLnNwbGl0KCc7JylbMF0pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCflkIrmr5vmqKHlvI/kuK3mlq3op6PmnpDlubbov5Tlm57op4bpopEnICsgcmV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnYnJlYWsnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgY291bnQgLT0gMTsgLy/lrozmiJDkuobku7vliqHvvIzku7vliqHmlbDph48tMVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKG9iaik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvdW50ID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z6Kej5p6QOlxcXCIgKyBjb3VudClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICBwYXJhbTogey8v5Lyg5Yiw55uR5ZCs5Ye95pWw55qEb2Jq5Y+C5pWw6YeMXFxuICAgICAgICAgICAgICAgICAgICAgICAgaGk6IFxcXCJjY2NcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTsvL+aJp+ihjOWkmuS7u+WKoVxcbiAgICAgICAgICAgICAgICAvLyBsZXQgdmFsdWFibGUgPSBwYXJzZVJldC5maWx0ZXIoaXQ9Pi9tM3U4fG1wNC8udGVzdChpdC5yZXQpKTtcXG4gICAgICAgICAgICAgICAgbG9nKFxcXCLlpJrku7vliqHmiafooYznu5PmnpzmlbA6XFxcIiArIHBhcnNlUmV0Lmxlbmd0aCk7XFxuICAgICAgICAgICAgICAgIGxldCB2YWx1YWJsZSA9IFtdO1xcbiAgICAgICAgICAgICAgICBwYXJzZVJldC5mb3JFYWNoKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGlmKGl0LnJldCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoL25hbWVzLy50ZXN0KGl0LnJldCkmJi91cmxzLy50ZXN0KGl0LnJldCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+WwneivleiBmuWQiOino+aekOino+WMhTonK2l0LnJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmV0cyA9IEpTT04ucGFyc2UoaXQucmV0LnJlcGxhY2UoLyNpc1ZpZGVvPXRydWUjL2csJycpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHMubmFtZXMuZm9yRWFjaCgobmFtZSxpZGV4KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVhYmxlLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldDpyZXRzLnVybHNbaWRleF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2s6aXQudGFzayxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6Kej5YyF5Y+R55Sf6ZSZ6K+vOicrZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKFBhcnNlUy5pc1ZpZGVvKGl0LnJldC5zcGxpdCgnIycpWzBdLnNwbGl0KCc7JylbMF0pKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWFibGUucHVzaChpdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoaXQucmV0LnN0YXJ0c1dpdGgoJ3ZpZGVvOi8vJykpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1YWJsZS5wdXNoKGl0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAvLyBsZXQgdmFsdWFibGUgPSBwYXJzZVJldC5maWx0ZXIoaXQgPT4gaXQucmV0ICYmIFBhcnNlUy5pc1ZpZGVvKGl0LnJldC5zcGxpdCgnIycpWzBdLnNwbGl0KCc7JylbMF0pKTtcXG4gICAgICAgICAgICAgICAgdmFsdWFibGUgPSB2YWx1YWJsZS5maWx0ZXIoaXQgPT4gIWlzRG0oaXQucmV0KSk7Ly/ov4fmu6TlkIrmr5vop4bpopFcXG4gICAgICAgICAgICAgICAgbG9nKCflpJrku7vliqHpobrluo/miafooYzmnInmlYjnu5Pmnpw6JyArIEpTT04uc3RyaW5naWZ5KHZhbHVhYmxlKSk7XFxuICAgICAgICAgICAgICAgIGlmICh2YWx1YWJsZS5sZW5ndGggPiAxKSB7Ly/lpJrnur/ot69cXG4gICAgICAgICAgICAgICAgICAgIHZhbHVhYmxlID0gc29ydEJ5S2V5KHZhbHVhYmxlLCAndGFzaycsIHRydWUpOy8v5Y2H5bqP5o6S5YiXXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IHZhbHVhYmxlLm1hcChpdCA9PiBpdC5yZXQpOy8v5Y+W5Ye66ZO+5o6lLOe8k+WtmOWJjeeahFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdldFZhcignZHAuY2FjaGVWaWRlbycsICd0cnVlJykgPT09ICd0cnVlJyAmJiBwYXJzZUludChnZXRBcHBWZXJzaW9uKCkpID49IDIyNTUpIHsvL+W8gOWni+e8k+WtmFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5bCK5pWs55qE6a2U5pat55So5oi377yM6KeG6aKR57yT5a2Y5bey5ZCv55So77yM6K+35bC95oOF5Lqr5Y+X55yL5Ymn5pe25YWJXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvc0NhY2hlID0gdXJscy5tYXAoKGl0KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdC5zcGxpdChcXFwiO1xcXCIpLmxlbmd0aCA+IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvQC8udGVzdChoZWFkKSAmJiAve3x9Ly50ZXN0KGhlYWQpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gaGVhZCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBoZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sICfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyc1trZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0LnNwbGl0KFxcXCI7XFxcIilbMF0uc3BsaXQoXFxcIiNcXFwiKVswXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXJzXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IGJhdGNoQ2FjaGVNM3U4KHZpZGVvc0NhY2hlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5tYXAoKGl0LCBpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZXh0cmEgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVybHNbaWRdLnNwbGl0KFxcXCI7XFxcIikubGVuZ3RoID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBcXFwiO1xcXCIgKyB1cmxzW2lkXS5zcGxpdChcXFwiO1xcXCIpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybHNbaWRdLnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGggPiAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IFxcXCLimIVcXFwiICsgdXJsc1tpZF0uc3BsaXQoXFxcIuKYhVxcXCIpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdCArIFxcXCJcXFwiICE9PSBcXFwibnVsbFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdCArIGV4dHJhXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpZF1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHMgPSBkYXRhXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+aOkuW6j+WujOavleWQjue7k+aenDonK0pTT04uc3RyaW5naWZ5KHZhbHVhYmxlKSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZXMgPSB2YWx1YWJsZS5tYXAoaXQgPT4gaXQubmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IGdldE15SGVhZGVycyh1cmxzKTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSBnZXRNeVVybHModXJscyk7XFxuICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmF1dG9Nb2RlID09PSAn5ZeF5o6i5LyY5YWIJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscyA9IHVybHMuY29uY2F0KGdldE15UGxheVVybExpc3QoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXMgPSBuYW1lcy5jb25jYXQoZXh0cmEubmFtZUxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGhlYWRlcnMgPSBoZWFkZXJzLmNvbmNhdChleHRyYS5uYW1lTGlzdC5tYXAoKGl0KT0+e3JldHVybiB7fX0pKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7dXJsczogdXJscywgaGVhZGVyczogaGVhZGVycywgbmFtZXM6IG5hbWVzfSk7XFxuXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWFibGUubGVuZ3RoID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoZXh0cmEubmFtZUxpc3QubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+iKreavlFHkuoYs5aSa5Lu75Yqh5YWN5ZeF6Kej5p6Q5YWo5Yab6KaG5rKh5bm25LiU5rKh5pyJ5Y+v55So55qEanNvbnx4Neino+aekOS6hidcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lpJrku7vliqHlhY3ll4XlpLHotKUs5bCd6K+VanNvbnx4NVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgLy/mjpLpmaTnrKzkuIDkuKpcXG4gICAgICAgICAgICAgICAgICAgIGxldCBleHRyYTIgPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3Q6IGV4dHJhLm5hbWVMaXN0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlVcmxMaXN0OiBleHRyYS5wbGF5VXJsTGlzdC5zbGljZSgxKSxcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuYXV0b01vZGUgPT09ICfll4XmjqLkvJjlhYgnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBnZXRNeVBsYXlVcmxMaXN0KCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzOiBleHRyYS5uYW1lTGlzdFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBhcnNlUy5kZWZhdWx0UGFyc2VXZWIgPyBQYXJzZVMuZGVmYXVsdFBhcnNlV2ViKGV4dHJhLnBsYXlVcmxMaXN0WzBdLCB0aW1lb3V0LCBleHRyYTIpIDogZXh0cmEucGxheVVybExpc3RbMF07XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coZXh0cmEucGxheVVybExpc3RbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGV4dHJhMik7XFxuXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAvLyDlhY3ll4XlkI7lj6rmnInkuIDkuKrnu5Pmnpws5ZeF5o6i5LyY5YWI6Ieq5Yqo5ou8eDXlkoxqc29uLCDpobrluo/kvJjlhYjoh6rliqjov5Tlm57kuIDkuKrmkq3mlL7pk77mjqVcXG4gICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuYXV0b01vZGUgPT09ICfll4XmjqLkvJjlhYgnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSB2YWx1YWJsZS5tYXAoaXQgPT4gaXQucmV0KTsvL+WPluWHuumTvuaOpSznvJPlrZjliY3nmoRcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZXMgPSB2YWx1YWJsZS5tYXAoaXQgPT4gaXQubmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSBnZXRNeUhlYWRlcnModXJscyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscyA9IGdldE15VXJscyh1cmxzKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lcyA9IG5hbWVzLmNvbmNhdChleHRyYS5uYW1lTGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscyA9IHVybHMuY29uY2F0KGdldE15UGxheVVybExpc3QoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaGVhZGVycyA9IGhlYWRlcnMuY29uY2F0KGV4dHJhLm5hbWVMaXN0Lm1hcCgoaXQpPT57cmV0dXJuIHt9fSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IHVybHMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzOiBuYW1lcyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczpoZWFkZXJzXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWFibGVbMF0ucmV0XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9ZWxzZXsgLy8g57qvdmlkZW86Ly/liIbmlK9cXG4gICAgICAgICAgICAgICAgaWYgKGV4dHJhLm5hbWVMaXN0Lmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6Iqt5q+UUeS6hizlpJrku7vliqHlhY3ll4Xop6PmnpDlhajlhpvopobmsqHlubbkuJTmsqHmnInlj6/nlKjnmoRqc29ufHg16Kej5p6Q5LqGJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwi6a2U5pat5aSa5Lu75Yqh5YWN5ZeF5aSx6LSlLOWwneivlWpzb258eDVcXFwiKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgIHVybHM6IGdldE15UGxheVVybExpc3QoKSxcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVzOiBleHRyYS5uYW1lTGlzdFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpZigvXmhpa2VyOnxedG9hc3Q6fF5ydWxlOnxeeDVSdWxlOnxed2ViUnVsZTp8XnNlbGVjdC8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYoIXVybCYmIS9eaHR0cC8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6a2U5pat6Kej5p6Q5aSx6LSlPicrdmlwVXJsXFxuICAgICAgICB9XFxuICAgICAgICAvLyBsb2codmlwVXJsKyflhY3ll4XmjqLnu5Pmnpw6Jyt1cmwpO1xcbiAgICAgICAgaWYgKC9eXFxcXC8vLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgIHVybCA9ICdodHRwczonICsgdXJsXFxuICAgICAgICB9XFxuICAgICAgICAvLyDprZTmlq3lhY3ll4XmiKrlj5ZcXG4gICAgICAgIC8vIGlmICgvPWh0dHAvLnRlc3QodXJsKSkge1xcbiAgICAgICAgLy8gICAgIHVybCA9IC8mdXJsPS8udGVzdCh1cmwpID8gdXJsIDogJ2h0dHAnICsgZGVjb2RlVVJJQ29tcG9uZW50KHVybC5zcGxpdCgnPWh0dHAnKVsxXSk7XFxuICAgICAgICAvLyB9XFxuICAgICAgICAvKmlmKHVybC5tYXRjaCgvbWd0di5jb20vZyk9PSdtZ3R2LmNvbScpe1xcbiAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cubWd0di5jb219JztcXG4gICAgICAgIH0gZWxz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VXJsID0gSlNPTi5wYXJzZShmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKSkuY2o7XFxuICAgICAgICAgICAgdmFyIExhYmVsID0gaztcXG4gICAgICAgICAgICB2YXIgZmEgPSBbJ2xldHYnLCAncHB0dicsICdxcScsICd5b3VrdScsICdxaXlpJywgJ2lxaXlpJywgJ21ndHYnLCAnYmlsaWJpbGknLCAnc29odScsICdtaWd1JywgJ20xOTA1JywgJ3ZpcCddO1xcbiAgICAgICAgICAgIHZhciBodG1sID0gcGFyc2VEb20ocmVxdWVzdChpbnB1dCksIExhYmVsKTtcXG4gICAgICAgICAgICBldmFsKGh0bWwucmVwbGFjZSgvcGxheWVyXy4qPz17LywgJ3BkYXRhPXsnKSk7XFxuICAgICAgICAgICAgZXZhbChmZXRjaChqc1VybCkpO1xcbiAgICAgICAgICAgIGlmIChwZGF0YS51cmwuc3Vic3RyKDAsIDgpLm1hdGNoKC9KVC4uSlQuLi8pKSB7XFxuICAgICAgICAgICAgICAgIHBkYXRhLnVybCA9IGJhc2U2NERlY29kZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAocGRhdGEudXJsLnN1YnN0cigwLCA4KS5tYXRjaCgvJS4uJS4uLykpIHtcXG4gICAgICAgICAgICAgICAgcGRhdGEudXJsID0gdW5lc2NhcGUocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGZhLmluY2x1ZGVzKHBkYXRhLmZyb20pKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gcGRhdGEudXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBMYWJlbClcXG4gICAgfVxcbn07XFxuZnVuY3Rpb24gbXpQb3B1cCgpIHtcXG4gICAgLypcXG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uICAgICAgICBhcnJMaXN0ID0gbnVsbDtcXG4gICAgfVxcbiAgICBpZiAoYXJyTGlzdCAhPSBudWxsKSB7XFxuICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICBBcnJheS5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24odmFsKSB7XFxuICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5pbmRleE9mKHZhbCk7XFxuICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH07XFxuICAgICAgICBpZihuYW1lKXsvL+WIoOmZpOWQjeensOWIl+ihqOWSjOS7o+eggVxcbiAgICAgICAgICAgIGpzb24udGl0bGUucmVtb3ZlKG5hbWUpO1xcbiAgICAgICAgICAgIGRlbGV0ZSBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgfVxcbiAgICAgICAgYXJyTGlzdCA9IGFyckxpc3QuY29uY2F0KGpzb24udGl0bGUpO1xcbiAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChhcnJMaXN0KSk7XFxuICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIG9iakNvZGUpO1xcbiAgICAgICAgaWYgKHR5cGUgPT09ICfmtYvor5UnKSB7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGNvbmZpZyA9JyArIGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgICAgIGlmICh0eXBlb2YgUGFyc2VTW2RhdGFbMV1dID09IFxcXCJmdW5jdGlvblxcXCIpIHtcXG4gICAgICAgICA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SB7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIGlmIChmaWxlRXhpc3QoaykpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGNqY2FjaGUgPSBnZXRWYXIoJ2NqQ2FjaGUnKTtcXG4gICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChrKSk7XFxuICAgICAgICAgICAgICAgIGpzb24uc2V0dGluZ3MuY2ogPSBjamNhY2hlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoaywgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICB2YXIgb2xkUm91dGUgPSBnZXRWYXIoJ29sZENvbmZpZycpO1xcbiAgICAgICAgICAgICAgICB2YXIgb2xkQ29uZmlnID0ganNvbi5zZXR0aW5ncztcXG4gICAgICAgICAgICAgICAgb2xkQ29uZmlnLmNqID0gY2pjYWNoZTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKG9sZFJvdXRlLCAkLnN0cmluZ2lmeShvbGRDb25maWcpKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5oGi5aSN5oiQ5YqfJztcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6ZyA6KaB5YWI5ouJ5Y+W5YiX6KGoJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHBhcnNlUm91dGUpXFxuICAgIH0sXFxuICAgIHB1bGxDb2RlOiBmdW5jdGlvbihrKSB7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIHZhciBwdWxsTW9kZSA9IGtbMF07XFxuICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBrWzFdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZUZpbGUgPSBmZXRjaChwYXJzZVJvdXRlKTtcXG4gICAgICAgICAgICBpZiAoIXBhcnNlRmlsZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgc2V0dGluZ3MgPSBmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKTtcXG4gICAgICAgICAgICAgICAgc2V0dGluZ3MgPSAhc2V0dGluZ3MgPyB7fSA6IEpTT04ucGFyc2Uoc2V0dGluZ3MpO1xcbiAgICAgICAgICAgICAgICB2YXIganNvbiA9IHt9O1xcbiAgICAgICAgICAgICAgICBqc29uLnNldHRpbmdzID0gc2V0dGluZ3M7XFxuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBbXTtcXG4gICAgICAgICAgICAgICAganNvbi5jb2RlcyA9IHt9O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgcGFyc2VGaWxlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIHBhcnNlVGl0bGUgPSBbXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VDb2RlPXt9O1xcbiAgICAgICAgICAgIHZhciBjakxpbmsgPSBnZXRWYXIoJ3BsdWdpbkxpbmsnKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBpZigvQGJhc2U2NDpcXFxcL1xcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChiYXNlNjREZWNvZGUoY2pMaW5rLnNwbGl0KCdAYmFzZTY0Oi8vJylbMV0pKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL+aPkuS7tuWQjS8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWFsTGluayA9IGNqTGluay5zcGxpdCgn5o+S5Lu25ZCNJylbMF0ucmVwbGFjZSgvW1xcXFxzXS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn6Kej5p6Q5LqR5Ymq5YiH5p2/OicrcmVhbExpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHlQYXN0ZSA9IHBhcnNlUGFzdGUocmVhbExpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoL0BiYXNlNjQ6XFxcXC9cXFxcLy8udGVzdCh5UGFzdGUpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGJhc2U2NERlY29kZSh5UGFzdGUuc3BsaXQoJ0BiYXNlNjQ6Ly8nKVsxXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPluS4qum4oeavm+aPkuS7tizph4zpnaLov55QYXJzZVPlr7nosaHpg73msqHmnIkhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/puKHmr5vmj5Lku7bmiafooYzmiqXplJk6XFxcXG4nK2UubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyq6IO96K+G5Yir5LqR5Ymq5YiH5p2/5Lit55qE5YaF5a65OlxcXFxuJyt5UGFzdGUuc3Vic3RyaW5nKDAsMTAwKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjakxpbmsgPT09ICdR56WeJykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGppZXhpID0gZmV0Y2goJ2hpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0Jykuc3BsaXQoJ1xcXFxuJyk7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgaW4gamlleGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJyYmJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJyYmJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gfWVsc2UgaWYoL14jW2EtekEtWjAtOV17MiwxMH0kLy50ZXN0KGNqTGluaykpey8v56aP5Yip5Y+j5LukMuWIsDEw5L2NXFxuICAgICAgICAgICAgICAgIGVsc2UgaWYoL14jW1xcXFxTXXsyLDEwfSQvLnRlc3QoY2pMaW5rKSl7Ly/npo/liKnlj6Pku6Qy5YiwMTDkvY3ku7vmhI/pnZ7nqbrlrZfnrKbkuLJcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHt0YXNrQ2FsbCwgdGFza1J1bix0YXNrUmVxfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3Rhc2tDYWxsP3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+W8gOWni+aJp+ihjOS7u+WKoeS7k+W6k+iOt+WPluaWreW/teaPkuS7tuemj+WIqeWPo+S7pCcpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHRhc2tDYWxsKDE3LCdEbkZ1bGknLFtjakxpbmtdKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhdHVzID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJldCA9IEpTT04ucGFyc2UocmVzdWx0LnJlc3VsdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYocmV0Lm9wdD09PSdlcnJvcicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytyZXQubXNnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0ndXJsJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2gocmV0LnJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnIgPSBodG1sLmluY2x1ZGVzKCdodHRwJyk/IGh0bWw6YmFzZTY0RGVjb2RlKGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgamlleGkgPSBhcnIubWF0Y2goL1tcXFxcU10qPywuKj9bXFxcXHNdL2cpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGppZXhpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJywnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcsJylbMV0uc3BsaXQoXFxcIlxcXFxuXFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighL15odHRwfGZ1bmN0aW9uLy50ZXN0KGNvZGUpJiZjb2RlLmxlbmd0aD4yMCl7Ly9iYXNlNjTnvJbnoIHnmoTlh73mlbBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gYmFzZTY0RGVjb2RlKGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09L2Z1bmN0aW9uLy50ZXN0KGNvZGUpP2V2YWwoY29kZSk6Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0nangnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoL1tcXFxcU10qPyxodHRwW1xcXFxTXS8udGVzdChyZXQucmV0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSByZXQucmV0LnNwbGl0KCcsJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJldC5yZXQuc3BsaXQoJywnKVsxXS5zcGxpdCgnXFxcXG4nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9eaHR0cC8udGVzdChyZXQucmV0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBjakxpbmsuc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldC5zcGxpdCgnXFxcXG4nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquefpeeahOemj+WIqTpcXFxcbicrcmV0LnJldDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0ndmlwSngnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gY2pMaW5rLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPS9mdW5jdGlvbi8udGVzdChjb2RlKT9ldmFsKGNvZGUpOmNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S7k+W6k+mdnuacgOaWsOeJiOaIluiAheemj+WIqeekvuWKn+iDveW8gOWPkeS4rSdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoY2pMaW5rPT09J+aWreaPkicpe1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9QYXJzZV9Ebi5qc1xcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGU9T2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL15oaWtlcjpcXFxcL1xcXFwvfF5maWxlOlxcXFwvXFxcXC98Xmh0dHB8XlxcXFwvc3RvcmFnZVxcXFwvfF5cXFxcL3NkY2FyZFxcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgaWYoL15cXFxcL3N0b3JhZ2VcXFxcL3xeXFxcXC9zZGNhcmRcXFxcLy8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjakxpbmsgPSAnZmlsZTovLycrY2pMaW5rO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjakxpbmspKTtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGU9T2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ouJ5Y+W5Y+j5Luk5pyJ6K+vJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGp4SnVkZ2UgPSB0eXBlb2YgUGFyc2VTID09ICdvYmplY3QnO1xcbiAgICAgICAgICAgIHZhciBsYkp1ZGdlID0gdHlwZW9mKHBhcnNlVGl0bGUpID09ICdvYmplY3QnO1xcbiAgICAgICAgICAgIGlmIChqeEp1ZGdlIHx8IGxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgLy8gaWYgKHB1bGxNb2RlID09PSAn5YiX6KGoJykge1xcbiAgICAgICAgICAgICAgICAvLyAgICAgaWYgKCFsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgIC8vIC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RpdGxlKTtcXG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XFxuXFxuICAgICAgICAgICAgICAgIGlmIChwdWxsTW9kZSA9PT0gJ+S7o+eggScpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3JpZ2luYWxQYXJzZVMgPT0gJ29iamVjdCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIHNjT2JqZWN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBvcmlnaW5hbFBhcnNlU1tzY09iamVjdFtpXV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9yaWdpbmFsUGFyc2VTID1vcmlnaW5hbFBhcnNlUy5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhpdClbMF0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIG9yaWdpbmFsUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKFBhcnNlUyk9PVxcXCJ1bmRlZmluZWRcXFwiKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiBcXFwidG9hc3Q6Ly/msqHmnInku6PnoIHvvIzkuI3lj6/mi4nlj5ZcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2RlcywgUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy92YXIgbmV3RmlsZSA9IHRvb2xzLnRvSlNPTihqc29uKTsvL+iHquWumuS5iXN0cmluZ2lmeeWHveaVsO+8jOW4puaciei9rOS5ieWtl+esplxcbiAgICAgICAgICAgICAgICB2YXIgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT04ucGFyc2XkvJrmiqXplJlcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsIG5ld0ZpbGUpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5YnICsgcHVsbE1vZGUgKyAn5oiQ5YqfJztcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyq6I635Y+W5Yiw5a+56LGhJztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBbaywgX215U2V0LnBhcnNlUm91dGVdKVxcbiAgICB9LFxcbiAgICBwdWxsU2NyaXB0OiBmdW5jdGlvbihjaiwgeDUpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGNqRnJvbSA9ICdoaWtlcjovL3BhZ2UvUGFyc2VfRG4uanM/cnVsZT1NeUZpZWxk4bSw4oG/JztcXG4gICAgICAgICAgICB2YXIgeDVGcm9tID0gJ2hpa2VyOi8vcGFnZS9QYXJzZV9Ebi5odG1sP3J1bGU9TXlGaWVsZOG0sOKBvyc7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgdmFyIGNqRmlsZSA9IEpTT04ucGFyc2UoZmV0Y2goY2pG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iwwICAg5pON5L2c57G75Z6LLOWQjeensCzntKLlvJVcXG4gICAgICAgICAgICAgICAgdmFyIHR5cGUgPSBuZXdJbnB1dFswXTtcXG4gICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBuZXdJbnB1dFsxXTtcXG4gICAgICAgICAgICAgICAgdmFyIG51bSA9IG5ld0lucHV0WzJdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtMiA9IG5ld0lucHV0WzNdO1xcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuWIoOmZpFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGsgPSBbbmFtZSwgbnVtXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDmgLvmhJ/op4nnrZvpgInmiJbogIXmkJzntKLlkI7vvIznlLHkuo5udW3nmoTkvY3nva7kuI3lr7nlj6/og73kvJrliKDpmaTplJks5LqL5a6e5aaC5q2kLOW3suS/rj9cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwi5Y2z5bCG5Yig6ZmkOiBcXFwiICsgbmFtZSkuY29uZmlybSgoaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGtbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBudW0gPSBrWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IGpzb24udGl0bGUuaW5kZXhPZihuYW1lKTsgLy/ov5nmoLfmiY3kvJrlvpfliLDmraPnoa7nmoTntKLlvJVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UobnVtLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5bCG44CWXFxcIiArIG5hbWUgKyBcXFwi44CX5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBrKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIumakOiXj1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG51bSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UobnVtLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5bCG44CWXFxcIiArIG5hbWUgKyBcXFwi44CX6ZqQ6JePXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lj6/og73mmK/kuKrnvZHlnYAsIOaCqOWPr+mAieaLqeWIoOmZpFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbbmFtZSwgbnVtXSk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLkv67mlLlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbkNvZGUgPSBuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZXMgPSBqc29uLnRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuTmFtZSA9IFxcXCLov5nmmK/lkI3np7BcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzW25hbWVdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5Db2RlID0ganNvbi5jb2Rlc1tuYW1lXS50b1N0cmluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuTmFtZSA9IG5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCJoaWtlcjovL2VtcHR5I25vUmVjb3JkSGlzdG9yeSNcXFwiKS5ydWxlKChrLHRpdGxlcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGdldEl0ZW0oJ215RnVuY3Rpb24nKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvZGUgPSBrWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfkv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogc2F2ZUJ1dHRvbiArIFxcXCJzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfZWRpdCcpLG5hbWUpO2JhY2soKTtcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5bu66K6u5oyJ6buY6K6k55qE5Luj56CB5qC85byP5L+u5pS55ZOmXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRWYXIoJ2lucHV0X2VkaXQnLCBpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcXFwiLTFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZ2hsaWdodDogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogJ+S/ruaUueKYhScgKyBuYW1lICsgJ+KYhScgKyBjb2RlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojNkVCODk3XFxcIj7moLzlvI/kuLrvvJrmk43kvZznsbvlnovimIXmoIfpopjimIVmdW5jdGlvbigpe+iHquWumuS5ieWGheWuuX08YnI+6K+35Yu/5aGr5YWl5YW25LuW5qC85byPJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2F2ZUJ1dHRvbixuYW1lLHRpdGxlcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0bXBBciA9IGdldFZhcignaW5wdXRfZWRpdCcpLnNwbGl0KCfimIUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0bXBBci5sZW5ndGg8Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmoLzlvI/mnInor6/vvIzorr/pl67ooqvmi5Lnu50nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdOYW1lID0gdG1wQXJbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobmV3TmFtZSE9PW5hbWUmJnRpdGxlcy5pbmNsdWRlcyhuZXdOYW1lKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfmo4DmtYvliLDlkIzlkI3mjqXlj6M6JytuZXdOYW1lKycs5piv5ZCm6KaG55uWPycpLmNvbmZpcm0oKHNhdmVCdXR0b24sbmFtZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2VkaXQnKSxuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv53lrZjkv67mlLlcXFxcbuivt+iHquihjOajgOa1i+imhuebluWQjueahOWGheWuuSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sc2F2ZUJ1dHRvbixuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfZWRpdCcpLG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv53lrZjkv67mlLknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZih0eXBlb2YoY29kZSk9PT0nc3RyaW5nJyYmY29kZS5sZW5ndGg+Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiBjb2RlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv53lrZjkv67mlLknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNhdmVCdXR0b24sbmFtZSx0aXRsZXMpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+KAmOKAmOKAmeKAmTxiaWc+PGJpZz48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW25OYW1lLCBuQ29kZV0sdGl0bGVzKSAvL1tuYW1lLCBqc29uLmNvZGVzW25hbWVdLnRvU3RyaW5nKCldKVxcbiAgICAgICAgICAgICAgICAgICAgLyp9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lj6rmnInnvZHlnYDmiJbogIXmoIfpopgsIOS4jeaUr+aMgeS/ruaUuVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0qL1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi572u6aG2XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIue9ruW6lVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG51bT4tMSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdGVtID0ganNvbi50aXRsZS5zcGxpY2UobnVtLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UobnVtMiwgMCwgaXRlbVswXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ayoeaJvuWIsDonK25hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi56e75YqoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdiaWFuamknLCAn56e75YqoIycgKyBrKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgbnVtKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuWIhuS6q1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLkupHliIbkuqtcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzW25hbWVdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVRleHQgPSB0eXBlb2YganNvbi5jb2Rlc1tuYW1lXSA9PSAnZnVuY3Rpb24nID8gJC5zdHJpbmdpZnkoanNvbi5jb2Rlc1tuYW1lXSkgOiBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRleHQgPSAnTXlQYXJzZVPimIUnICsgbmFtZSArICfimIUnICsgYmFzZTY0RW5jb2RlKHBhcnNlVGV4dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlVGV4dCA9ICfnm7Tpk77imIUnICsganNvbi50aXRsZVtudW1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZSA9PSAn5LqR5YiG5LqrJyAmJiBwYXJzZVRleHQuc3Vic3RyKDAsIDgpID09ICdNeVBhcnNlUycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUZXh0ID0gc2hhcmVQYXN0ZShwYXJzZVRleHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VUZXh0LnN1YnN0cigwLCA2KSAhPSAnZXJyb3I6JyA/ICdjb3B5Oi8vJyArIHBhcnNlVGV4dCArICdcXFxcbuKYheKYheKYhVxcXFxuJyArICdNeVBhcnNlU++8micgKyBuYW1lIDogJ3RvYXN0Oi8v5YiG5Lqr5aSx6LSlISHkupHliarotLTmnb/lj6/og73mjILkuoYnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnY29weTovLycgKyBwYXJzZVRleHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pqC5LiN5pSv5oyBJztcXG4gICAgICAgICAgICAgICAgfSAvL3N3aXRjaOeahFxcbiAgICAgICAgICAgIH0pIC8vU3RyaW5n55qEXFxuICAgICAgICB9KSAvL3N0cmluZ2lmeeeahFxcbiAgICB9LFxcbiAgICB4alBhcnNlOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHJldHVybiAkKFxcXCJoaWtlcjovL2VtcHR5I25vSGlzdG9yeSNcXFwiKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgIGV2YWwoZ2V0SXRlbSgnbXlGdW5jdGlvbicpKTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+S/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICB1cmw6IHNhdmVCdXR0b24gKyBcXFwic2F2ZUJ1dHRvbihpbnB1dCk7YmFjaygpO2NsZWFyVmFyKCdpbnB1dF9hZGQnKVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi6L6T5YWl5q2j56Gu5qC85byP5YaF5a65XFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0VmFyKFxcXCJpbnB1dF9hZGRcXFwiLCBpbnB1dCknLFxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGhlaWdodDogXFxcIi0xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGhpZ2hsaWdodDogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcignaW5wdXRfYWRkJyksXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzZFQjg5N1xcXCI+5oyJ5o+P6L+w6K+J5qC85byP6L6T5YWlLCDor7fli7/loavlhaXlhbbku5bmoLzlvI88YnI+5pys5Zyw5Y+j5LukOiDmk43kvZznsbvlnovimIXlkI3np7DimIXku6PnoIE8YnI+5LqR5Y+j5LukOiDpk77mjqXimIXimIXimIXlkI3np7A7IOe6r+e9keWdgDog55u06ZO+4piFdXJsMeKYhXVybDInLFxcbiAgICAgICAgICAgICAgICBkZXNjOiAn4oCY4oCY4oCZ4oCZPGJpZz48YmlnPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj7kv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCdub0xvYWRpbmcnKS5sYXp5UnVsZSgoc2F2ZUJ1dHRvbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9hZGQnKSk7XFxuICAgICAgICAgICAgICAgIH0sIHNhdmVCdXR0b24pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgfSlcXG4gICAgfSxcXG4gICAgeWRQYXJzZTogZnVuY3Rpb24oQkptb2RlLCBpKSB7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIHZhciBBID0ga1swXS5zcGxpdCgnIycpWzFdO1xcbiAgICAgICAgICAgIHZhciBCID0ga1sxXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgIHZhciBpdGVtID0ganNvbi50aXRsZS5zcGxpY2UoQSwgMSk7IC8vIDE6IOagh+iusOW8gOWni+S9jee9ru+8jDI6IOWIoOmZpOWIsOWTquS4quS9jee9rlxcbiAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKEIsIDAsIGl0ZW1bMF0pOyAvLyAxOiDlkIzkuIrvvIwyOiAw6KGo56S65LiN5Yig6Zmk77yMMzog5re75Yqg5a+56LGhXFxuICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICBjbGVhclZhcignYmlhbmppJyk7XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICB9LCBbQkptb2RlLCBpXSlcXG4gICAgfSxcXG4gICA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AnOKAneKAnTxmb250IGNvbG9yPSdcXFwiICsgY29sb3IgKyBcXFwiJz5cXFwiICsgdGV4dCArIFxcXCI8L2ZvbnQ+XFxcIjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdreldESyc6IGZ1bmN0aW9uKF8weDQ4NTRhOSwgXzB4M2U5OGM1KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODU0YTkgKyBfMHgzZTk4YzU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnWFh5UXInOiAn56e75YqoIycsXFxuICAgICAgICAgICAgJ2d0VW5qJzogZnVuY3Rpb24oXzB4NTlhYWY3LCBfMHgyMmM2NmIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDU5YWFmNyArIF8weDIyYzY2YjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdVdGZXZic6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojRkU5QTJFXFxcXFxcXCI+JyxcXG4gICAgICAgICAgICAnUU92SlYnOiAn56e75YqoOiAnLFxcbiAgICAgICAgICAgICdBQkV3Qic6ICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiMyOThBMDhcXFxcXFxcIj4nLFxcbiAgICAgICAgICAgICdvenpXRyc6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICduV2ZWUic6IGZ1bmN0aW9uKF8weDQ4MGYzYSwgXzB4NGM4NGZjKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODBmM2EgKyBfMHg0Yzg0ZmM7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnSkNjTlknOiAncGFyc2VSb3V0ZScsXFxuICAgICAgICAgICAgJ3JnRElwJzogJ2JpYW5qaScsXFxuICAgICAgICAgICAgJ2hvSWRKJzogJ+KAmOKAmOKAmeKAmTxiaWc+PHNwYW4gc3R5bGU9XFxcX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biAgICAgICAgdmFyIF8weDNiODlhYiA9IHBhcnNlRmlsZVsndGl0bGUnXTtcXG4gICAgICAgIHZhciBfMHg0OWRhOTYgPSBnZXRWYXIoXzB4NGMwNDI3WydyZ0RJcCddKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IF8weDRjMDQyN1snaG9JZEonXSxcXG4gICAgICAgICAgICBkZXNjOifms6jmhI865L2N572u5pON5L2c5Yqf6IO95Y+q5Zyo5YiG57G7562b6YCJ5Li65YWo6YOo5pe255Sf5pWIXFxcXG7kuIvmlrnmkJzntKLmjInlkI3np7DmiJblnLDlnYAs6YeN572u6K+355WZ56m65oiW54K56Kej5p6Q5pWw6YeP5oyJ6ZKuJyxcXG4gICAgICAgICAgICB1cmw6IGJqSXRlbVsneGpQYXJzZSddKCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTpmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5pCc57SiJyxcXG4gICAgICAgICAgICBkZXNjOidtZW5neCcsXFxuICAgICAgICAgICAgY29sX3R5cGU6J2lucHV0JyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignZHAuc2VhcmNoSngnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgdGV4dFNpemU6IDExLFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6Z2V0VmFyKCdkcC5zZWFyY2hKeCcsJycpLFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgZmlsdGVycyA9IFsn5YWo6YOoJywn6ZO+5o6lJywnanNvbicsJ+WFjeWXhSddO1xcbiAgICAgICAgZm9yKGxldCBvIGluIGZpbHRlcnMpe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmdldFZhcignZG4uanhfZmlsdGVyJywn5YWo6YOoJyk9PT1maWx0ZXJzW29dPyfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+JytmaWx0ZXJzW29dOmZpbHRlcnNbb10sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeF9maWx0ZXInLGl0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGZpbHRlcnNbb10pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIF8weDJlY2JlNSA9IF8weDNiODlhYlsnbGVuZ3RoJ107XFxuICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgbGV0IHNldEZpbGUgPSByZXF1ZXN0KCdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicpO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBld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gICAgICAgICAgXzB4M2I4OWFiID0gXzB4M2I4OWFiLmZpbHRlcihpdD0+KGpzb24uY29kZXNbXzB4NGMwNDI3WyduV2ZWUiddKGl0LCAnJyldKycnKS5pbmNsdWRlcyhnZXRWYXIoJ2RwLnNlYXJjaEp4JykpfHxpdC5pbmNsdWRlcyhnZXRWYXIoJ2RwLnNlYXJjaEp4JywnJykpKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6XFxcIuino+aekOaVsDpcXFwiK18weDRjMDQyNy5jb2xvcihfMHgzYjg5YWIubGVuZ3RoLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6XFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdkcC5zZWFyY2hKeCcpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3sumHjee9ridcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDkuIvpnaLmmK/op6PmnpDliJfooajmjpLliJdcXG4gICAgICAgIC8vIGZvciAodmFyIF8weGUyYzNkOCA9IDB4MDsgXzB4NGMwNDI3WydGckdPSCddKF8weGUyYzNkOCwgXzB4MmVjYmU1KTsgXzB4ZTJjM2Q4KyspIHtcXG4gICAgICAgIGZvciAobGV0IF8weGUyYzNkOCBpbiBfMHgzYjg5YWIpIHtcXG4gICAgICAgICAgICB2YXIgXzB4MzM3ODhjID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgdmFyIF8weDM3ODcxZSA9IF8weDRjMDQyN1snbldmVlInXShfMHgzMzc4OGMsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICBpZiAoL+enu+WKqC8gWyd0ZXN0J10oXzB4NDlkYTk2KSkge1xcbiAgICAgICAgICAgICAgICBpZiAoXzB4NGMwNDI3WydvQ0NTaiddKCd1S0x4RicsICd1S0x4RicpKSB7XFxuICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snSFpobGMnXShfMHg0YzA0MjdbJ1hYeVFyJ10gKyBfMHhlMmMzZDgsIF8weDQ5ZGE5NikgPyBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydjZ0llQSddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4Mzc4NzFlKSA6IF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDM3ODcxZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAndGV4dF8yJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmJjNjE4ID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4NWNmNDE3ID0gXzB4NGMwNDI3WydVVldvRiddKF8weDJiYzYxOCwgJycpWydyZXBsYWNlJ10oL2h0dHAuKlxcXFwvXFxcXC8vZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ2t6V0RLJ10oXzB4NGMwNDI3WydYWHlRciddLCBfMHhlMmMzZDgpID09IF8weDQ5ZGE5NiA/IF8weDRjMDQyN1snZ3RVbmonXShfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydVdGZXZiddLCBfMHg0YzA0MjdbJ1FPdkpWJ10pLCBfMHg1Y2Y0MTcpIDogXzB4NGMwNDI3WydBQkV3QiddICsgXzB4NWNmNDE3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd5ZFBhcnNlJ10oXzB4NDlkYTk2LCBfMHhlMmMzZDgpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDExOTM2NSA9IFtfMHgyYmM2MTgsIF8weDRjMDQyN1snZ3RVbmonXShfMHhlMmMzZDgsICd8fCcpXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snbldmVlInXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDVjZjQxNyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHgxMTkzNjUsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weGI3MDE5MiA9IFtfMHgzMzc4OGMsIF8weGUyYzNkOCArICd8fCddWydqb2luJ10oJ3x8Jyk7XFxuICAgICAgICAgICAgICAgIC8vIOi/qui/quW9semZonx8MHx8ICDlkI3np7B8fOe0ouW8lSDnmoTmlbDnu4RcXG4gICAgICAgICAgICAgICAgLy8gQUJFd0Ig5piv57u/6ImyIF8weDM3ODcxZSDmmK/moIfpopjlkI3np7AgIHhkckZ25piv5a2X56ym5Liy6L+e5o6l5Ye95pWwXFxuICAgICAgICAgICAgICAgIC8vIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgIGxldCBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfik4onLCcjMDA1MWZmJyk7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAvLyBmbGFnID0gJ+KAnOKAnOKSv+KAneKAnSc7XFxuICAgICAgICAgICAgICAgICAgICBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfikr8nLCcjZmY3MDAwJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIGxldCBjbHMgPSAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPic7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IF8weDRjMDQyN1sneGRyRnYnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIGZsYWcrXzB4Mzc4NzFlKTtcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHRpdGxlID0gZmxhZytjbHMrXzB4Mzc4NzFlO1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBmbGFnK18weDRjMDQyNy5jb2xvcihfMHgzNzg3MWUsJyMyOThBMDgnKTtcXG4gICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gJ3RpdGxlJzogXzB4Mzc4NzFlLFxcbiAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddLFxcbiAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHhiNzAxOTIsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBfMHg0YzA0MjdbJ3l3anV4J10oY2xlYXJWYXIsIF8weDRjMDQyN1sncmdESXAnXSk7XFxuICAgIH0sXFxuICAgICdscUZpbGUnOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciBfMHg1NDFkNzYgPSB7XFxuICAgICAgICAgICAgJ2FXaVJzJzogZnVuY3Rpb24oXzB4NDhkNzdiLCBfMHgxOTE2MWYsIF8weDIxY2I4NSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDhkNzdiKF8weDE5MTYxZiwgXzB4MjFjYjg1KTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd3U2Zueic6IGZ1bmN0aW9uKF8weDQ4NTBlYSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDg1MGVhKCk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAncVJRZEEnOiAnamRSb3V0ZScsXFxuICAgICAgICAgICAgJ1dRaXFrJzogJ3ZhciB4ZFJvdXRlPVxcXCJcXFwi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b5LqG6Kej6K+m5oOFJyxcXG4gICAgICAgICAgICAnVUx3a1QnOiAnaHR0cHM6Ly9oYWlrdW9zaGlqaWUuY24vdXNlci9zaWduaW4nXFxuICAgICAgICB9O1xcbiAgICAgICAgaWYgKF8weDU0MWQ3NlsncHNHZHQnXShfMHg1NDFkNzZbJ3dTZm56J10oYmJzWVopLCBfMHg1NDFkNzZbJ2lteHJpJ10pfHx0cnVlKSB7XFxuICAgICAgICAgICAgaWYgKF8weDU0MWQ3NlsnblNrangnXShfMHg1NDFkNzZbJ2lWTmVNJ10sIF8weDU0MWQ3NlsnaVZOZU0nXSkpIHtcXG4gICAgICAgICAgICAgICAgXzB4NTQxZDc2WydhV2lScyddKHB1dFZhciwgJ2Jic1laJywgXzB4NTQxZDc2Wyd3U2ZueiddKGlzTG9naW58fGZ1bmN0aW9uICgpe3JldHVybiB0cnVlfSkpO1xcbiAgICAgICAgICAgICAgICBfMHg1NDFkNzZbJ2FXaVJzJ10ocHV0VmFyLCBfMHg1NDFkNzZbJ3FSUWRBJ10sIF8weDU0MWQ3NlsnV1FpcWsnXSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weDRkMjVmZiA9IF8weDU0MWQ3NlsnSXdNVGwnXVsnc3BsaXQnXSgnfCcpLFxcbiAgICAgICAgICAgICAgICAgICAgXzB4NGE5N2M5ID0gMHgwO1xcbiAgICAgICAgICAgICAgICB3aGlsZSAoISFbXSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChfMHg0ZDI1ZmZbXzB4NGE5N2M5KytdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3hmZEhrJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsU2NyaXB0J10oX215U2V0WydjamNhY2hlJ10sIF9teVNldFsneDVjYWNoZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydyR0x1QSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzB4NTQxZDc2WydodmlEbCddKGV2YWwsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsIF8weDU0MWQ3NlsncVJRZEEnXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcyJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgyYWIzOTkgPSAnaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjQHJ1bGU9anM6dGhpcy5kPVtdOyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2p4SXRlbT9ydWxlPU15RmllbGThtLDigb9cXFwiKS5qeExpc3QoKTtzZXRSZXN1bHQoZCk7JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ1p4VWd0J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogdHlwZW9mIGN6R3VpZGUgPT0gJ2Z1bmN0aW9uJyA/IGN6R3VpZGUoKSA6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc1JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeGRSb3V0ZSA9IF8weDU0MWQ3Nlsnc1dGb2MnXSh4ZFJvdXRlLCBfbXlTZXRbJ3BhcnNlUm91dGUnXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzYnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4M2E5YWZlID0gW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6ICfmi4nlj5bliJfooagnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5YiX6KGoJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydPRWhhdCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5Luj56CBJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydadnRTdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDU0MWQ3NlsnaHZpRGwnXShmaWxlRXhpc3QsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsICdwYXJzZVJvdXRlJykpID09ICEhW10gPyBfMHgyYWIzOTkgOiBfMHg1NDFkNzZbJ2dYS01iJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzcnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBfMHgxYTJjZGIgPSAweDA7IF8weDU0MWQ3NlsnV0NPREMnXShfMHgxYTJjZGIsIF8weDNhOWFmZVsnbGVuZ3RoJ10pOyBfMHgxYTJjZGIrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHgzYTlhZmVbXzB4MWEyY2RiXVsndGl0bGUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3VybCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnckFrQWgnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3lXYU9JJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydoZlBsdWdpbiddKF9teVNldFsncGFyc2VSb3V0ZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydzV0ZvYyddKF8weDU0MWQ3NlsneWp5aksnXSArIG15U2V0WydjaiddLCAnXFxcXG7lrZjmlL7ot6/lvoQ6IC9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3RIWGVFJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogJ3RvYXN0Oi8v6K+35Zyo5LiL5pa56YCJ6aG55pON5L2cJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydHTVVZdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ21wWkJaJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzExJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2Wyd4dnFnRiddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleHRyYSc6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGVWaXNpYmxlJzogIVtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWZhdWx0VmFsdWUnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGx1Z2luTGluaycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF8weDU0MWQ3NlsnaGV1S3gnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFx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mMgPSBmdW5jdGlvbih1cmwsIHRpdGxlLCBpbmRleCkge1xcbiAgICAgICAgICAgIHJldHVybiAkKHVybCwgXFxcIuivt+i+k+WFpeOAjFxcXCIgKyB0aXRsZSArIFxcXCLjgI3nmoTmlrDmjqXlj6NcXFwiKS5pbnB1dCgodGl0bGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZVVybFRleHQgPSByZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL2ppZXhpL2ppZXhpLnR4dFxcXCIpO1xcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VVcmxBcnJheSA9IHBhcnNlVXJsVGV4dC5zcGxpdCgvXFxcXG4vKTtcXG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkMSA9IHBhcnNlVXJsQXJyYXlbaW5kZXhdO1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybEFycmF5W2luZGV4XSA9IHRpdGxlICsgXFxcIiYmXFxcIiArIGlucHV0O1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybFRleHQgPSBwYXJzZVVybEFycmF5LmpvaW4oXFxcIlxcXFxuXFxcIik7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiLCBwYXJzZVVybFRleHQpO1xcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWQxID09IGdldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZFxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIsIHRpdGxlICsgXFxcIiYmXFxcIiArIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgI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QhlwiLFwicGF0aFwiOlwidGhlbWVcIixcInJ1bGVcIjpcImpzOlxcbiAgICBmdW5jdGlvbiB0aGVtZUluaXQoKXtcXG4gICAgICAgIGNvbnN0IHtjb2xvcixzbWFsbH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlsaXk/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgIGxldCBkID0gW107XFxuICAgICAgICBsZXQgb3B0aW9ucyA9IFsn6YCJ5oupJywn5L+u5pS5Jywn5Yig6ZmkJywn5a+85Ye6J107XFxuXFxuICAgICAgICBmb3IodmFyIGkgaW4gb3B0aW9ucyl7XFxuICAgICAgICAgICAgbGV0IG9wdGlvbiA9IG9wdGlvbnNbaV07XFxuICAgICAgICAgICAgbGV0IGZsYWcgPSBnZXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsJ+aWsOWinicpPT09b3B0aW9uPyfwn5GJJzonJztcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpmbGFnK29wdGlvbixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JChvcHRpb24pLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruaTjeS9nOexu+Wei+S4ujonK2lucHV0O1xcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxldCB0aGVtZVJvdXRlID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlUaGVtZS5qc29uXFxcIjtcXG4gICAgICAgIGxldCBteVRoZW1lcyA9IHt9O1xcbiAgICAgICAgbGV0IHRoZW1lcyA9IHt9O1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBteVRoZW1lcyA9IEpTT04ucGFyc2UoZmV0Y2godGhlbWVSb3V0ZSkpO1xcbiAgICAgICAgICAgIHRoZW1lcyA9IG15VGhlbWVzLnRoZW1lc1tteVRoZW1lcy5ub3dfdGhlbWVdO1xcbiAgICAgICAgfWNhdGNoIChlKSB7fVxcblxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5a+85YWlJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJycsJ+ivt+i+k+WFpeWvvOWFpeWPo+S7pCcpLmlucHV0KChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZigvXuaWreaPkuS4u+mimEAuKj9AaHR0cC8udGVzdChpbnB1dCkpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBpbnB1dC5zcGxpdCgnQCcpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGlucHV0LnNwbGl0KCdAJylbMl07XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a6KaB5a+85YWl5pat5o+S5Li76aKYLScrbmFtZSsnIOWQlz8nKS5jb25maXJtKChuYW1lLHVybCxteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gcGFyc2VQYXN0ZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNUaGVtZSA9IG15VGhlbWVzLnRoZW1lcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1uYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihoYXNUaGVtZSYmaGFzVGhlbWUubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGogaW4gbXlUaGVtZXMudGhlbWVzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15VGhlbWVzLnRoZW1lc1tqXS5uYW1lID09PSBuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xopobnm5blr7zlhaU6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCfopobnm5blr7zlhaXkuLvpophpZDonK2lkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzW2lkXSA9IE9iamVjdC5hc3NpZ24oSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoY29udGVudCkpLHsnbmFtZSc6bmFtZX0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhteVRoZW1lcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5oiQ5Yqf5a+85YWl5Li76aKYOlxcXFxuJytuYW1lXFxuICAgICAgICAgICAgICAgICAgICB9LG5hbWUsdXJsLG15VGhlbWVzLHRoZW1lUm91dGUpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6Dms5Xor4bliKvnmoTlr7zlhaXlj6Pku6Q6XFxcXG4nK2lucHV0O1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKSxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5paw5aKeJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoKS5ydWxlKChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgZD1bXTtcXG4gICAgICAgICAgICAgICAgYWRkTGlzdGVuZXIoJ29uQ2xvc2UnLCAkLnRvU3RyaW5nKCgpPT57XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfkuLvpopjlkI3np7AnLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuaWreaPki3ok53ojpPkuLvpophcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcigndGhlbWUubmV3X2FkZF9uYW1lJyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcigndGhlbWUubmV3X2FkZF9uYW1lJywgJycpXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfYWRkX25hbWUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6L6T5YWl55qE5pivOicrbmV3X2FkZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIlxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLku6PnoIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfY29kZScsICcnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDotMSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcXFwidGhlbWUubmV3X2FkZF9jb2RlXFxcIixpbnB1dCknXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+S/neWtmCcsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6JCgpLmxhenlSdWxlKChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX2NvZGUnLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDov5jmsqHloavlhpnkuLvpopjlkI3np7DlkaInXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdUaGVtZSA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1RoZW1lID0gSlNPTi5wYXJzZShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mUmeivr+eahOS4u+mimGpzb27moLzlvI86XFxcXG4nK2UubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihuZXdUaGVtZSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMucHVzaChuZXdUaGVtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5paw5aKe5pat5o+S5Li76aKYOicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSksXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6bXlUaGVtZXMudGhlbWVzPyfkuLvpopjliJfooag65YWx6K6hOicrY29sb3IobXlUaGVtZXMudGhlbWVzLmxlbmd0aCwnI2ZmNzAwMCcpKyfkuKrkuLvpopgnOlxcXCLnrKzkuIDmrKHliqDovb3vvIzngrnmraTov5vljrvliJ3lp4vljJbkuLvpopjliJfooahcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICAgICAgICAgIHVybDonaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeiuvue9riNub0hpc3RvcnkjJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOlxcXCLmgaLlpI3lh7rljoLorr7nva5cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl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ub3dUaGVtLm5hbWU/J/CfkYknK25vd1RoZW0ubmFtZTpub3dUaGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcigndGhlbWUuZG5fb3B0aW9uJywn5paw5aKeJyk7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wdGlvbil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5a+85Ye6JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG15dGhlbWVDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG15dGhlbWUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobXl0aGVtZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9ICfmlq3mj5LkuLvpophAJytteXRoZW1lLm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChKU09OLnN0cmluZ2lmeShteXRoZW1lKSkuaW5wdXQoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lc1tpXT1KU09OLnBhcnNlKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv67mlLknXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruiupOWIoOmZpOS4u+mimDonK215dGhlbWUubmFtZSsnPycpLmNvbmZpcm0oKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMubm93X3RoZW1lPW15dGhlbWUubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDpgInmi6nkuoYnK215dGhlbWUubmFtZSsn5L2c5Li66buY6K6k5Li76aKYJztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSxub3dUaGVtLG15VGhlbWVzLGksdGhlbWVSb3V0ZSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH1cXG4kLmV4cG9ydHMudGhlbWVJbml0PXRoZW1lSW5pdDtcIn0se1wibmFtZVwiOlwi5pON5L2c5oyH5byVXCIsXCJwYXRoXCI6XCJHdWlkZVwiLFwicnVsZVwiOlwiPGh0bWw+XFxuPGhlYWQ+XFxuICAgIDxtZXRhIG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XX07XFxuICAgICAgICBsZXQgamlleGlzID0ge307XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIE15SmlleGkgPSBKU09OLnBhcnNlKGZldGNoKGp4c1JvdXRlKSk7XFxuICAgICAgICAgICAgamlleGlzID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09TXlKaWV4aS5ub3cpWzBdO1xcbiAgICAgICAgfWNhdGNoIChlKSB7fVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5a+85YWlJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJycsJ+ivt+i+k+WFpeWvvOWFpeWPo+S7pCcpLmlucHV0KChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZigvXumtlOaWreino+aekOmFjee9rkAuKj9AaHR0cC8udGVzdChpbnB1dCkpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBpbnB1dC5zcGxpdCgnQCcpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGlucHV0LnNwbGl0KCdAJylbMl07XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a6KaB5a+85YWl5pat5o+S6Kej5p6Q6YWN572uLScrbmFtZSsnIOWQlz8nKS5jb25maXJtKChuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gcGFyc2VQYXN0ZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNJdCA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PW5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhhc0l0JiZoYXNJdC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpc1tqXS5uYW1lID09PSBuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xopobnm5blr7zlhaU6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCfopobnm5blr7zlhaXkuLvpophpZDonK2lkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzLnB1c2goT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LmiJDlip/lr7zlhaXop6PmnpDphY3nva46XFxcXG4nK25hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0sbmFtZSx1cmwsTXlKaWV4aSxqeHNSb3V0ZSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoOazleivhuWIq+eahOWvvOWFpeWPo+S7pDpcXFxcbicraW5wdXQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpLFxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBsZXQgaXNBdXRvID0gTXlKaWV4aS5pc0F1dG87XFxuICAgICAgICBsZXQgYXV0b01vZGUgPSBNeUppZXhpLmF1dG9Nb2RlO1xcbiAgICAgICAgbGV0IHNpbmdsZUJhY2sgPSBNeUppZXhpLnNpbmdsZUJhY2t8fGZhbHNlOyAvL+WQiuavm+aooeW8j+OAguWNleS4que7k+aenOebtOaOpei/lOWbnu+8jOWBnOatouWQjumdoueahFxcbiAgICAgICAgbGV0IGlnbm9yZV9teCA9IE15SmlleGkuaWdub3JlX214fHxmYWxzZTsgLy/lv73nlaXlhY3ll4Us5ZeF5o6i5LyY5YWI5qih5byP5L2/55SoXFxuICAgICAgICBsZXQgdGlwcyA9ICfop6PmnpDphY3nva7liJfooag65YWx6K6hOicrY29sb3IoTXlKaWV4aS5qaWV4aXMubGVuZ3RoLCcjZmY3MDAwJykrJ+S4qumFjee9rizoh6rliqjmoaPlvIDlhbM6Jytjb2xvcihpc0F1dG8/J+W8gCc6J+WFsycsJyNmZjcwMDAnKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5qaWV4aXMmJk15SmlleGkuamlleGlzLmxlbmd0aD4wP3RpcHM6XFxcIuesrOS4gOasoeWKoOi9ve+8jOeCueatpOi/m+WOu+WIneWni+WMluino+aekOWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmlzQXV0byA9ICFNeUppZXhpLmlzQXV0bztcXG4gICAgICAgICAgICAgICAgICAgIGlmKCFNeUppZXhpLmF1dG9Nb2RlKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmF1dG9Nb2RlID0gJ+WXheaOouS8mOWFiCc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdGlwcyA9IE15SmlleGkuaXNBdXRvPyflvIAnOiflhbMnO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruiHquWKqOaho+aooeW8j+S4ujonK3RpcHNcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaW5pdFNldCA9IHsnbm93JzpcXFwi6YGT6ZW/5o6o6I2QXFxcIiwnamlleGlzJzpbe25hbWU6J+mBk+mVv+aOqOiNkCcscXk6WyfkuIfog73op6PmnpDikr8nXSx5azpbJ+S4h+iDveino+aekOKSvyddLHR4Olsn5LiH6IO96Kej5p6Q4pK/J10sbWc6WyfkuIfog73op6PmnpDikr8nXSxibDpbJ+S4h+iDveino+aekOKSvyddLHNoOlsn5LiH6IO96Kej5p6Q4pK/J10seGc6WyfkuIfog73op6PmnpDikr8nXSxwcDpbJ+S4h+iDveino+aekOKSvyddLG1pOlsn5LiH6IO96Kej5p6Q4pK/J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlOlsn5LiH6IO96Kej5p6Q4pK/J10sZnVuOlsn5LiH6IO96Kej5p6Q4pK/J10sb25lOlsn5LiH6IO96Kej5p6Q4pK/J10sbHQ6WyfkuIfog73op6PmnpDikr8nXSxycjpbJ+S4h+iDveino+aekOKSvyddLHdkOlsn5LiH6IO96Kej5p6Q4pK/J119XX07XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoaW5pdFNldCkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pat5o+S6Kej5p6Q6YWN572u5bey5Yid5aeL5YyWJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxNeUppZXhpLGp4c1JvdXRlKVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgYzEgPSAnIzE1YWIyMSc7XFxuICAgICAgICBsZXQgYzIgPSAnIzkwMGEwYSc7XFxuICAgICAgICBsZXQgYXV0b01vZGVTZWwgPSBbJ+mAn+W6puS8mOWFiCcsJ+mhuuW6j+S8mOWFiCcsJ+WXheaOouS8mOWFiCddO1xcbiAgICAgICAgbGV0IGF1dG9Nb2RlU2VscyA9IGF1dG9Nb2RlU2VsLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgaWYoaXQ9PT1NeUppZXhpLmF1dG9Nb2RlKXtcXG4gICAgICAgICAgICAgICAgaXQgPSBjb2xvcihpdCxjMSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBpdFxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgYXV0b01vZGVUaXBzID0gYXV0b01vZGVTZWwuaW5jbHVkZXMoYXV0b01vZGUpP2F1dG9Nb2RlOifmnKrnn6UnO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpzbWFsbChcXFwi5aSH6IOO5a6g5bm45pa55qGIOlxcXCIpK2NvbG9yKGF1dG9Nb2RlVGlwcywnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzInLFxcbiAgICAgICAgICAgIHVybDokKGF1dG9Nb2RlU2VscywzLCfor7fpgInmi6noh6rliqjmoaPmqKHlvI8nKS5zZWxlY3QoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlucHV0ID0gL2ZvbnQvLnRlc3QoaW5wdXQpP2lucHV0LnNwbGl0KCc+JylbMV0uc3BsaXQoJzwnKVswXTppbnB1dDtcXG4gICAgICAgICAgICAgICAgaWYoaW5wdXQhPT1NeUppZXhpLmF1dG9Nb2RlKXtcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGkuYXV0b01vZGUgPSBpbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWkh+iDjuWuoOW5uOaWueahiOS4ujonK2lucHV0XFxuICAgICAgICAgICAgfSxNeUppZXhpLGp4c1JvdXRlKSxcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpjb2xvcihcXFwi5oGi5aSN5Ye65Y6C6K6+572uXFxcIiwnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzInLFxcbiAgICAgICAgICAgIHVybDokKFxcXCLlpoLmnpzkvaDnmoTop6PmnpDnrqHnkIbml6Dms5XmraPluLjnlKjkuobvvIzmraTmlrnms5Xlj6/ku6XmlZHnoJbvvIznoa7orqTmgaLlpI0/XFxcIikuY29uZmlybSgoanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGxldCBpbml0U2V0ID0geydub3cnOlxcXCLpgZPplb/mjqjojZBcXFwiLCdqaWV4aXMnOlt7bmFtZTon6YGT6ZW/5o6o6I2QJyxxeTpbJ+S4h+iDveino+aekOKSvyddLHlrOlsn5LiH6IO96Kej5p6Q4pK/J10sdHg6WyfkuIfog73op6PmnpDikr8nXSxtZzpbJ+S4h+iDveino+aekOKSvyddLGJsOlsn5LiH6IO96Kej5p6Q4pK/J10sc2g6WyfkuIfog73op6PmnpDikr8nXSx4ZzpbJ+S4h+iDveino+aekOKSvyddLHBwOlsn5LiH6IO96Kej5p6Q4pK/J10sbWk6WyfkuIfog73op6PmnpDikr8nXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZTpbJ+S4h+iDveino+aekOKSvyddLGZ1bjpbJ+S4h+iDveino+aekOKSvyddLG9uZTpbJ+S4h+iDveino+aekOKSvyddLGx0Olsn5LiH6IO96Kej5p6Q4pK/J10scnI6WyfkuIfog73op6PmnpDikr8nXSx3ZDpbJ+S4h+iDveino+aekOKSvyddfV19O1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoaW5pdFNldCkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuino+aekOmFjee9ruW3sumHjee9ruS4uuWHuuWOguiuvue9ridcXG4gICAgICAgICAgICB9LGp4c1JvdXRlKVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBsZXQgY2FjaGV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G4gICAgICAgICAgICAgICAgfSxNeUppZXhpLGp4c1JvdXRlKVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfWVsc2UgaWYoYXV0b01vZGU9PT0n5ZeF5o6i5LyY5YWIJyl7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBjb2xvcign5a+85YWl6L6F5YqpJywnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6Y29sX3R5cGUyLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCdoaWtlcjovL2VtcHR5I25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KCdodHRwczovL25ldGN1dC5jbi9wL2E1ZDFjOGUxZWNlZTI4ZDMnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IGh0bWwubWF0Y2goL3suKm5vdGVfY29udGVudC4qdXBkYXRlZF9hdC4qfS8pWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gSlNPTi5wYXJzZShkYXRhKS5ub3RlX2NvbnRlbnQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVwRGF0YSA9IEpTT04ucGFyc2UoZGF0YSkudXBkYXRlZF9hdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmmK/lkKblr7zlhaUnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiAn6ISa5pys5pu05paw5pel5pyfXFxcXG4nICsgdXBEYXRhLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maXJtOiQudG9TdHJpbmcoKGNvbnRlbnQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29udGVudFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LGNvbnRlbnQpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYW5jZWw6ICgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Llj5bmtojlr7zlhaUnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgKTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpzbWFsbCgn5b+955Wl5YWN5ZeFOicpK2NvbG9yKGlnbm9yZV9teF90aXBzLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlMixcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmlnbm9yZV9teCA9ICEoTXlKaWV4aS5pZ25vcmVfbXh8fGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u5b+955Wl5YWN5ZeF5byA5YWz5Li6OicrKE15SmlleGkuaWdub3JlX214PyflvIAnOiflhbMnKVxcbiAgICAgICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOnNtYWxsKCflpJrnur/ot6/nvJPlrZg6JykrY29sb3IoY2FjaGVWaWRlb1N3aXRjaCwnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlMixcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoY2FjaGVWaWRlb1N3aXRjaCk9PntcXG4gICAgICAgICAgICAgICAgaWYoY2FjaGVWaWRlb1N3aXRjaD09PSflvIAnKXtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZHAuY2FjaGVWaWRlbycsJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSxjYWNoZVZpZGVvU3dpdGNoKVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOnNtYWxsKCfop6PmnpDotoXml7Y6JykrY29sb3IoanhUaW1lb3V0LCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6Y29sX3R5cGUyLFxcbiAgICAgICAgICAgIHVybDokKGp4VGltZW91dCwn6K+36K6+572u6a2U5pat6Kej5p6Q6LaF5pe2LOW/hemhu+S4uuaVtOaVsCcpLmlucHV0KCgpPT57XFxuICAgICAgICAgICAgICAgIGlmKCFwYXJzZUludChpbnB1dCkpe1xcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSA3MDAwO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHB1dFZhcignZHAuanhUaW1lb3V0JyxpbnB1dCk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u5Li6OicrcGFyc2VJbnQoaW5wdXQpXFxuICAgICAgICAgICAgfSxqeFRpbWVvdXQpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGlmKGF1dG9Nb2RlJiZzaW5nbGVCYWNrKXtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogY29sb3IoJ+aJk+W8gOe8lui+keWQiuavm+i/h+a7pOaWh+S7ticsJyMxMzc5Q0InKSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChkbVBhdGgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBkZWZfZG1zID0gWydodHRwczovL3ZkMy5iZHN0YXRpYy5jb20vbWRhLWtpOXVncTU0MzBiaHh5czgvdjEtY2FlLzEwODBwL21kYS1raTl1Z3E1NDMwYmh4eXM4Lm1wNCddO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoIWZpbGVFeGlzdChkbVBhdGgpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZG1QYXRoLCcvL+S4gOihjOS4gOS4qumTvuaOpSzlj6/ms6jph4rjgIJcXFxcbicrZGVmX2Rtcy5qb2luKCdcXFxcbicpKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nK2RtUGF0aDtcXG4gICAgICAgICAgICAgICAgfSxkbVBhdGgpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBjb2xvcign5omT5byA57yW6L6R6Kej5p6Q5paH5Lu2JywnIzEzNzlDQicpLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoanhzUm91dGUpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovLycranhzUm91dGU7XFxuICAgICAgICAgICAgfSxqeHNSb3V0ZSksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBmb3IobGV0IGkgaW4gTXlKaWV4aS5qaWV4aXMpe1xcbiAgICAgICAgICAgIGxldCBub3dKeCA9IE15SmlleGkuamlleGlzW2ldO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOk15SmlleGkubm93PT09bm93SngubmFtZT8n8J+RiScrbm93SngubmFtZTpub3dKeC5uYW1lLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICBleHRyYTp7XFxuICAgICAgICAgICAgICAgICAgICBub3dKeDpub3dKeCxcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGk6TXlKaWV4aSxcXG4gICAgICAgICAgICAgICAgICAgIGp4c1JvdXRlOmp4c1JvdXRlXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChub3dKeCxNeUppZXhpLGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgb3B0aW9uID0gZ2V0VmFyKCdkbi5qeG1fb3B0aW9uJywn6YCJ5oupJyk7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wdGlvbil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5a+85Ye6JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd0p4Q29kZSA9IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gc2hhcmVQYXN0ZShub3dKeENvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9ICfprZTmlq3op6PmnpDphY3nva5AJytub3dKeC5uYW1lKydAJyt1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHkoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Llr7zlh7rkuLrkupHlj6Pku6TlubblpI3liLbliLDliarliIfmnb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5L+u5pS5JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYobm93SngubmFtZT09PU15SmlleGkubm93KXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAndG9hc3Q6Ly/mraTop6PmnpDphY3nva7lvZPliY3mraPlnKjkvb/nlKjkuK3vvIzkuI3lhYHorrjkv67mlLkhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9qeEVkaXQ/cnVsZT1NeUZpZWxk4bSw4oG/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2p4RWRpdD9ydWxlPU15RmllbGThtLDigb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruiupOWIoOmZpOino+aekOmFjee9rjonK25vd0p4Lm5hbWUrJz8nKS5jb25maXJtKChub3dKeCxNeUppZXhpLGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihub3dKeC5uYW1lPT09TXlKaWV4aS5ub3cpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTop6PmnpDphY3nva7lvZPliY3mraPlnKjkvb/nlKjkuK3vvIzkuI3lhYHorrjliKDpmaQhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXMuc3BsaWNlKGksMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5Yig6ZmkJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLm5vdz1ub3dKeC5uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOmAieaLqeS6hicrbm93Sngubm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aW5nIycpLmxhenlSdWxlKCh0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngpPT57XFxuICAgICAgICAgICAgdmFyIGpzb249e3RpdGxlOltdLGNvZGVzOnt9fTtcXG4gICAgICAgICAgICBsZXQgc2V0RmlsZSA9IHJlcXVlc3QoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJyk7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgZXZhbCgnanNvbj0nK3NldEZpbGUpO1xcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coJ0pzb27op6PmnpDlj5HnlJ/kuobplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKT09PSfmlrDlop4nKXtcXG4gICAgICAgICAgICAgICAgbGV0IHNlbF90aXRsZSA9IHRpdGxlcy5maWx0ZXIoaXQ9PiFqeHMuaW5jbHVkZXMoaXQpKTtcXG4gICAgICAgICAgICAgICAgc2VsX3RpdGxlID0gc2VsX3RpdGxlLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZyA9ICfigJjigJjik4rigJnigJknO1xcbiAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAn4oCc4oCc4pK/4oCd4oCdJztcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW2l0XSk9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZsYWcraXRcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKHNlbF90aXRsZSwyKS5zZWxlY3QoKE15SmlleGksanhzLG5vd0p4LHRpdGxlLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC/igJjigJjik4rigJnigJl84oCc4oCc4pK/4oCd4oCdL2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5qaWV4aXNbal0ubmFtZSA9PT0gbm93SngubmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v57Si5byV6ZSZ6K+v5peg5rOV5L+d5a2YOlxcXFxuJytpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAganhzLnB1c2goaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKGp4cyk7XFxuICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpO1xcbiAgICAgICAgICAgIH1lbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sdGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4KVxcbiAgICB9KTtcXG4gICAgZm9yKGxldCBrIGluIGp4cyl7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOmp4c1trXSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxuangsaWQsayxtYXgpPT57XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAoZ2V0VmFyKCdkbi5qeG1fd3JpdGVNb2RlJywn5paw5aKeJykpe1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICBBcnJheS5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24odmFsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IHRoaXMuaW5kZXhPZih2YWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqeHMucmVtb3ZlKG5qeCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfnp7vliqgnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKGssJ+enu+WKqOWIsOe0ouW8leWkmuWwkT8nKS5pbnB1dCgoayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1vdmUoYXJyLCBmcm9tSW5kZXgsIHRvSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbGVtZW50ID0gYXJyW2Zyb21JbmRleF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKGZyb21JbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKHRvSW5kZXgsIDAsIGVsZW1lbnQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcnNlSW50KGlucHV0KT09PWspe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WVpeS5n+ayoeWBmidcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocGFyc2VJbnQoaW5wdXQpPm1heC0xfHxwYXJzZUludChpbnB1dCk8LTEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOacgOWkp+enu+WKqOiMg+WbtDAtJytwYXJzZUludChtYXgtMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGV0IG5ld0FyID0ganhzLnNwbGljZShrLCAxKTsgLy8g5Yig5o6JXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGp4cy51bnNoaWZ0KG5ld0FyWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTW92ZShqeHMsayxwYXJzZUludChpbnB1dCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTlhYPntKDkuI3mlK/mjIHov5vooYw6JytnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngsanhzW2tdLGlkLGssanhzLmxlbmd0aClcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIGQucHVzaCh7XFxuICAgICAgICAvLyBjb2xfdHlwZTonbGluZScsXFxuICAgICAgICBjb2xfdHlwZTonYmxhbmtfYmxvY2snXFxuICAgIH0pXFxufVxcbmQucHVzaCh7XFxuICAgIGNvbF90eXBlOidsaW5lJyxcXG59KTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTon5L+d5a2YJyxcXG4gICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxcbiAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoTXlKaWV4aSxpZCxqeHNSb3V0ZSk9PntcXG4gICAgICAgIGlmKGdldFZhcignZG4uanhtX25hbWUnLCcnKSE9PU15SmlleGkuamlleGlzW2lkXS5uYW1lKXtcXG4gICAgICAgICAgICBpZkhhcyA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PWdldFZhcignZG4uanhtX25hbWUnLCcnKSkubGVuZ3RoPjA7XFxuICAgICAgICAgICAgaWYoaWZIYXMpe1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5b6F5L+u5pS555qE5ZCN56ew6YeN5aSNLOS4jeWFgeiuuOS/neWtmCdcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdLm5hbWUg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lOihBcnJheS5pc0FycmF5KGRhdGEpJiZkYXRhLmluY2x1ZGVzKGl0KSk/Y29sb3IoaXQsJyMxMmI2NjgnKTppdCxcXG4gICAgICAgICAgICAgICAgLy8gdXJsOid0b2FzdDovL+WKn+iDveW8gOWPkeS4rScsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpdCxjb2xvcik9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2p4X3NlbGVjdGVkJyk7XFxuICAgICAgICAgICAgICAgICAgICBpZihBcnJheS5pc0FycmF5KGRhdGEpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhLmluY2x1ZGVzKGl0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5YyF5ZCrOicraXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnNwbGljZShkYXRhLmluZGV4T2YoaXQpLDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2goaXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIGRhdGEpXFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignanhfc2VsZWN0ZWQnLCBbaXRdKVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYoc3RvcmFnZTAuZ2V0TXlWYXIoJ2p4X3NlbGVjdGVkJykuaW5jbHVkZXMoaXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKGl0LHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6Y29sb3IoaXQsJyMxMmI2NjgnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKGl0LHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6aXRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGl0LGNvbG9yKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMycsXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIGlkOml0XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBvcD1bXTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflhajpgIknLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHMsY29sb3IpPT57XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIGp4cyk7XFxuICAgICAgICAgICAgICAgIGp4cy5mb3JFYWNoKGl0PT57XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHt0aXRsZTogY29sb3IoaXQsJyMxMmI2NjgnKSwgZXh0cmE6IHtpZDogaXR9fSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSxqeHMsY29sb3IpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5YWo5LiN6YCJJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoanhzKT0+e1xcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignanhfc2VsZWN0ZWQnLCBbXSk7XFxuICAgICAgICAgICAgICAgIGp4cy5mb3JFYWNoKGl0PT57XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHt0aXRsZTogaXQsIGV4dHJhOiB7aWQ6IGl0fX0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sanhzKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WPjemAiScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGp4cyxjb2xvcik9PntcXG4gICAgICAgICAgICAgICAgbGV0IG9sZFNlbCA9IHN0b3JhZ2UwLmdldE15VmFyKCdqeF9zZWxlY3RlZCcsIFtdKTtcXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gZ2V0RGlmZmVyZW50RGF0YShhcnJBLCBhcnJCKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXJyQS5jb25jYXQoYXJyQikuZmlsdGVyKGZ1bmN0aW9uICh2LCBpLCBhcnIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXJyLmluZGV4T2YodikgPT09IGFyci5sYXN0SW5kZXhPZih2KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxldCBuZXdTZWwgPSBnZXREaWZmZXJlbnREYXRhKGp4cyxvbGRTZWwpO1xcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignanhfc2VsZWN0ZWQnLCBuZXdTZWwpO1xcbiAgICAgICAgICAgICAgICBvbGRTZWwuZm9yRWFjaChpdD0+e1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7dGl0bGU6IGl0LCBleHRyYToge2lkOiBpdH19KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIG5ld1NlbC5mb3JFYWNoKGl0PT57XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHt0aXRsZTogY29sb3IoaXQsJyMxMmI2NjgnKSwgZXh0cmE6IHtpZDogaXR9fSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSxqeHMsY29sb3IpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5Yig6ZmkJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2p4X3NlbGVjdGVkJywgW10pO1xcbiAgICAgICAgICAgICAgICBpZihzZWwubGVuZ3RoIDwgMSl7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ZWl6YO95rKh6YCJ77yM5Yig6Zmk5Liq6bih5q+bfidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk5bey6YCJ5oup55qEOicrc2VsWzBdKyfnrYknK3NlbC5sZW5ndGgrJ+adoeino+aekD8nKS5jb25maXJtKChzZWwpPT57XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IG5hbWUgaW4gc2VsKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUganNvbi5jb2Rlc1tuYW1lXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlID0ganNvbi50aXRsZS5maWx0ZXIoaXQ9PiFzZWwuaW5jbHVkZXMoaXQpKTsgLy8g562b6YCJ5rKh5pyJ6KKr5Yig6Zmk55qE5qCH6aKYXFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywgW10pOy8v5Yig6Zmk5a6M5LqG5riF56m66YCJ5Lit6aG555uuXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5bCG44CWXFxcIiArIHNlbFswXSArIFxcXCLjgJfnrYlcXFwiK3NlbC5sZW5ndGgrXFxcIuadoeino+aekOWIoOmZpFxcXCI7XFxuICAgICAgICAgICAgICAgIH0sc2VsKVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3J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ICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpkeF9maWx0ZXI9PT0n5pyq6YCJJz9jb2xvcign5pyq6YCJJywnIzEyYjY2OCcpOifmnKrpgIknLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2R4X2ZpbHRlcicsJ+acqumAiScpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZD1vcC5jb25jYXQoZCk7XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH0sZHhfdGVzdCxjb2xvcilcXG59KTtcXG5mdW5jdGlvbiBzb3J0QnlLZXkoYXJyYXksIGtleSwgb3JkZXIpIHsvL+WvueixoeaVsOe7hOaMieafkOS4qumUruWAvOaOkuW6j1xcbiAgICByZXR1cm4gYXJyYXkuc29ydChmdW5jdGlvbihhLCBiKSB7XFxuICAgICAgICB2YXIgeCA9IHBhcnNlSW50KGFba2V5XS5tYXRjaCgvKFxcXFxkKykvKVsxXSk7Ly/kv67lpI3lpKfkuo4xMOWHuumXrumimFxcbiAgICAgICAgdmFyIHkgPSBwYXJzZUludChiW2tleV0ubWF0Y2goLyhcXFxcZCspLylbMV0pO1xcbiAgICAgICAgaWYgKG9yZGVyKSB7XFxuICAgICAgICAgICAgcmV0dXJuICgoeCA8IHkpID8gLTEgOiAoKHggPiB5KSA/IDEgOiAwKSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuICgoeCA8IHkpID8gKCh4ID4geSkgPyAxIDogMCkgOiAtMSlcXG4gICAgICAgIH1cXG4gICAgfSlcXG59XFxuaXRlbXMucHVzaCh7XFxuICAgIHRpdGxlOiAn8J+boOS4gOmUrua1i+ivleW3sumAieaOpeWPo++8micrbm93UGFyc2UsXFxuICAgIC8vdXJsOiAndG9hc3Q6Ly/ov5nmmK/mjqXlj6MnLFxcbiAgICB1cmw6JCgpLmxhenlSdWxlKChqc29uLG5vd1BhcnNlLHRpbWVvdXQsc29ydEJ5S2V5KT0+e1xcbiAgICAgICAgaWYoIWdldEl0ZW0oJ1BhcnNlJywnJykpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgb/lhY3otYTmupDmtarotLnvvIzor7flhYjlnKjkuIvmlrnpgInkuIDkuKrmjqXlj6Plho3ov5vooYzmtYvor5UnXFxuICAgICAgICB9XFxuICAgICAgICB2YXIgY291bnQgPSBqc29uLmxlbmd0aDsgLy/orr7nva7ku7vliqHmlbDph49cXG4gICAgICAgIGxvZygn6a2U5pat5byA5ZCv5aSa5Lu75Yqh6Kej5p6QLOS7u+WKoeaVsOmHjzonK2NvdW50KTtcXG4gICAgICAgIHZhciB0YXNrID0gZnVuY3Rpb24ob2JqKSB7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGNvbmZpZ19kcCA9JyArIGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZ19kcC5jaikpO1xcbiAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2Uob2JqLnZpcFVybCxvYmoubmFtZSxvYmoudGltZW91dCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgdmFyIHBhcnNlUmV0ID0gW107IC8v6Kej5p6Q57uT5p6c5YiX6KGoXFxuICAgICAgICBsZXQgdGFza3MgPSBqc29uLm1hcCgoaXQsaWRleCk9PntcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICBmdW5jOiB0YXNrLFxcbiAgICAgICAgICAgICAgICBwYXJhbToge1xcbiAgICAgICAgICAgICAgICAgICAgLy9uYW1lOml0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTpub3dQYXJzZSxcXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6aXQudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAvLyBydWxlOml0LnJ1bGUsXFxuICAgICAgICAgICAgICAgICAgICB2aXBVcmw6IGl0LnVybCxcXG4gICAgICAgICAgICAgICAgICAgIHRpbWVvdXQ6IHRpbWVvdXRcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgaWQ6IFxcXCJ0YXNrXFxcIitpZGV4XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z5b6F5rWLOlxcXCIrY291bnQpO1xcbiAgICAgICAgYmUodGFza3Mse1xcbiAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKG9iaiwgaWQsIGVycm9yLHJldCkge1xcbiAgICAgICAgICAgICAgICBsb2coXFxcIuebkeWQrOWIsOS7u+WKoVxcXCIgKyBpZCsn5bey57uT5p2fLGVycm9yOicrZXJyb3IrJyxyZXQ6JytyZXQpO1xcbiAgICAgICAgICAgICAgICByZXQgPSByZXR8fCcnO1xcbiAgICAgICAgICAgICAgICBlcnJvcj1lcnJvcnx8Jyc7XFxuICAgICAgICAgICAgICAgIHBhcnNlUmV0LnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGFzazppZCxcXG4gICAgICAgICAgICAgICAgICAgIHJldDpyZXQsXFxuICAgICAgICAgICAgICAgICAgICBlcnJvcjplcnJvcixcXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6dGFza3MuZmlsdGVyKGl0PT5pdC5pZD09PWlkKVswXS5wYXJhbS50eXBlXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBjb3VudCAtPSAxOyAvL+WujOaIkOS6huS7u+WKoe+8jOS7u+WKoeaVsOmHjy0xXFxuICAgICAgICAgICAgICAgIC8vbG9nKG9iaik7XFxuICAgICAgICAgICAgICAgIGlmIChjb3VudCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnlvoXmtYs6XFxcIiArIGNvdW50KVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgcGFyYW06IHsvL+S8oOWIsOebkeWQrOWHveaVsOeahG9iauWPguaVsOmHjFxcbiAgICAgICAgICAgICAgICBoaTogXFxcImNjY1xcXCIsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7Ly/miafooYzlpJrku7vliqFcXG4gICAgICAgIC8vbG9nKFxcXCLlpJrku7vliqHmiafooYznu5PmnpzmlbA6XFxcIitwYXJzZVJldC5sZW5ndGgpO1xcbiAgICAgICAgcGFyc2VSZXQ9c29ydEJ5S2V5KHBhcnNlUmV0LCd0YXNrJyx0cnVlKTsvL+WNh+W6j+aOkuWIl1xcbiAgICAgICAgLy8gbG9nKHBhcnNlUmV0Lm1hcChpdD0+aXQudGFzaykpO1xcbiAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IyNub0hpc3RvcnkjJykucnVsZSgocGFyc2VSZXQpPT57XFxuICAgICAgICAgICAgc2V0UGFnZVRpdGxlKGdldEl0ZW0oJ1BhcnNlJykrJ+ino+aekOaKpeWRiicpO1xcbiAgICAgICAgICAgIGNvbnN0IHtpc1ZpZGVvfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgY29uc3Qge2NvbG9yLCBzbWFsbH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlsaXk/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgICAgICBsZXQgZD1bXTtcXG4gICAgICAgICAgICBsZXQgc2hvd19tb2RlID0gZ2V0SXRlbSgnc2hvd19tb2RlJywn6K+m57uGJyk7XFxuICAgICAgICAgICAgbGV0IGNvbF90eXBlID0gc2hvd19tb2RlPT09J+ivpue7hic/J3RleHRfMSc6J3RleHRfMyc7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6J+aYvuekuuaooeW8jzonK2NvbG9yKHNob3dfbW9kZSwnI2ZhOGMzNScpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChjb2xvcixjbnQpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgc2hvd19tb2RlID0gZ2V0SXRlbSgnc2hvd19tb2RlJywn6K+m57uGJyk7XFxuICAgICAgICAgICAgICAgICAgICBzaG93X21vZGUgPSBzaG93X21vZGU9PT0n6K+m57uGJz8n57K+566AJzon6K+m57uGJztcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3Nob3dfbW9kZScsc2hvd19tb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3Nob3dfbW9kZScse1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOifmmL7npLrmqKHlvI86Jytjb2xvcihzaG93X21vZGUsJyNmYThjMzUnKVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29sX3R5cGUgPSBzaG93X21vZGU9PT0n6K+m57uGJz8ndGV4dF8xJzondGV4dF8zJztcXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8Y250O2krKyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnc2hvd19yZXRfJytpLHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6Y29sX3R5cGVcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxjb2xvcixwYXJzZVJldC5sZW5ndGgpLFxcbiAgICAgICAgICAgICAgICBleHRyYTp7XFxuICAgICAgICAgICAgICAgICAgICBpZDonc2hvd19tb2RlJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcGFyc2VSZXQuZm9yRWFjaCgoaXQsaWR4KT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGU9aXQubmFtZTtcXG4gICAgICAgICAgICAgICAgaWYoaXQucmV0JiYhaXQucmV0LmluY2x1ZGVzKCd1bmRlZmluZWQnKSYmKC8jaXNWaWRlbz10cnVlIy8udGVzdChpdC5yZXQpfHxpc1ZpZGVvKGl0LnJldCkpKXtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlPWNvbG9yKHRpdGxlLCcjMTJiNjY4JylcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBsZXQgZGVzYz0oaXQucmV0fHxpdC5lcnJvcikuc3Vic3RyKDAsNjApO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6dGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjO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WYXIoJ3pkeScpIT09enVybCl7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCd6ZHknLCB6dXJsKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgZHhfbW9kZSA9IGdldEl0ZW0oJ+eCuemAiScsJ+WNlea1iycpOy8v54K56YCJ5qih5byPXFxuICAgICAgICAgICAgaWYoZHhfbW9kZT09PSfljZXmtYsnKXtcXG4gICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoJ+mtlOaWreWKqOaAgeino+aekOS4rSzor7fnqI3nrYkuLi4nKTtcXG4gICAgICAgICAgICAgICAgZXZhbCgndmFyIGNvbmZpZ19kcCA9JyArIGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKTtcXG4gICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWdfZHAuY2opKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZSh6dXJsLG5vd1BhcnNlLHRpbWVvdXQpO1xcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IHN0b3JhZ2UwLmdldE15VmFyKCdqeF9zZWxlY3RlZCcpfHxbXTtcXG4gICAgICAgICAgICAgICAgaWYoZGF0YS5sZW5ndGg+MzIpe1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+S9oOaJgOmAieaLqeW+hea1i+ivleeahOino+aekOaVsOWFseiuoTonK2RhdGEubGVuZ3RoKyfkuKrvvIzotoXlh7rkuobmjqjojZDmnIDlpKfmlbAzMizmgKfog73lj6/og73mnoHlt64s5piv5ZCm57un57utPycpLmNvbmZpcm0oKGRhdGEsdmlwT2JqLHRpbWVvdXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qge3Rlc3RfcmVwb3J0fSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL3Rlc3RfcmVwb3J0Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRlc3RfcmVwb3J0KGRhdGEsdmlwT2JqLHRpbWVvdXQpXFxuICAgICAgICAgICAgICAgICAgICB9LGRhdGEsdmlwT2JqLHRpbWVvdXQpXFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge3Rlc3RfcmVwb3J0fSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL3Rlc3RfcmVwb3J0Jyk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGVzdF9yZXBvcnQoZGF0YSx2aXBPYmosdGltZW91dClcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0senVybCxub3dQYXJzZSx0aW1lb3V0LGpzb25baV0pLFxcbiAgICAgICAgcGljX3VybDp6cGljLFxcbiAgICAgICAgY29sX3R5cGU6ICdpY29uXzQnXFxuICAgIH0pO1xcbn1cXG5hZGRMaXN0ZW5lcignb25DbG9zZScsICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICBjbGVhclZhcihcXFwiemR5XFxcIik7XFxufSkpO1xcbml0ZW1zLnB1c2goe1xcbiAgICB0aXRsZTon5rWL6K+VJyt0YWcsXFxuICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICB1cmw6JC50b1N0cmluZygobm93UGFyc2UsdGltZW91dCk9PntcXG4gICAgICAgIGV2YWwoXFxcInZhciBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgLy8gZXZhbChmZXRjaCgnaGlrZXI6Ly9maWxlcy9jYWNoZS9QYXJzZV9Ebi5qcycsIHt9KSk7XFxuICAgICAgICByZXR1cm4gYXl0bVBhcnNlKGdldE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ICAgICAgICB9XFxuICAgIH0pXFxufVxcbmZ1bmN0aW9uIHRlc3RfcmVwb3J0KGp4cyx2aXBPYmosdGltZW91dCl7Ly/ljZXmraPniYjlpJrop6PmnpDmtYvor5XmiqXlkYpcXG4gICAganhzID0ganhzfHxbXTsvL+ino+aekOagh+mimOWIl+ihqFxcbiAgICBsZXQgdmlwVXJsID0gdmlwT2JqLnVybDtcXG4gICAgbGV0IHZpcE5hbWUgPSB2aXBPYmoudGl0bGU7XFxuICAgIGlmKGp4cy5sZW5ndGg8MSl7XFxuICAgIHJldHVybiAndG9hc3Q6Ly/op6PmnpDliJfooajph4zml6Dop6PmnpDvvIzmtYvkuKrpuKHmr5snXFxuICAgIH1cXG4gICAgdmFyIGNvdW50ID0ganhzLmxlbmd0aDsgLy/orr7nva7ku7vliqHmlbDph49cXG4gICAgbG9nKCfprZTmlq3lvIDlkK/lpJrku7vliqHop6PmnpAs5Lu75Yqh5pWw6YePOicrY291bnQpO1xcbiAgICB2YXIgdGFzayA9IGZ1bmN0aW9uKG9iaikge1xcbiAgICAgICAgZXZhbCgndmFyIGNvbmZpZ19kcCA9JyArIGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKTtcXG4gICAgICAgIGV2YWwoZmV0Y2goY29uZmlnX2RwLmNqKSk7XFxuICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHZpcFVybCxvYmoubmFtZSx0aW1lb3V0KTtcXG4gICAgfTtcXG4gICAgdmFyIHBhcnNlUmV0ID0gW107IC8v6Kej5p6Q57uT5p6c5YiX6KGoXFxuICAgIGxldCB0YXNrcyA9IGp4cy5tYXAoKGl0LGlkZXgpPT57XFxuICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgIGZ1bmM6IHRhc2ssXFxuICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgbmFtZTppdCxcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGlkOiBcXFwidGFza1xcXCIraWRleFxcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meW+hea1izpcXFwiK2NvdW50KTtcXG4gICAgYmUodGFza3Mse1xcbiAgICAgICAgZnVuYzogZnVuY3Rpb24ob2JqLCBpZCwgZXJyb3IscmV0KSB7XFxuICAgICAgICAgICAgbG9nKFxcXCLnm5HlkKzliLDku7vliqFcXFwiICsgaWQrJ+W3sue7k+adnyxlcnJvcjonK2Vycm9yKycscmV0OicrcmV0KTtcXG4gICAgICAgICAgICByZXQgPSByZXR8fCcnO1xcbiAgICAgICAgICAgIGVycm9yPWVycm9yfHwnJztcXG4gICAgICAgICAgICBwYXJzZVJldC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGFzazppZCxcXG4gICAgICAgICAgICAgICAgcmV0OnJldCxcXG4gICAgICAgICAgICAgICAgZXJyb3I6ZXJyb3IsXFxuICAgICAgICAgICAgICAgIG5hbWU6dGFza3MuZmlsdGVyKGl0PT5pdC5pZD09PWlkKVswXS5wYXJhbS5uYW1lXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgY291bnQgLT0gMTsgLy/lrozmiJDkuobku7vliqHvvIzku7vliqHmlbDph48tMVxcbiAgICAgICAgICAgIC8vbG9nKG9iaik7XFxuICAgICAgICAgICAgaWYgKGNvdW50ID4gMCkge1xcbiAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z5b6F5rWLOlxcXCIgKyBjb3VudClcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sXFxuICAgICAgICBwYXJhbTogey8v5Lyg5Yiw55uR5ZCs5Ye95pWw55qEb2Jq5Y+C5pWw6YeMXFxuICAgICAgICAgICAgaGk6IFxcXCJjY2NcXFwiL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QoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGNvbG9yLCBjbnQpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHNob3dfbW9kZSA9IGdldEl0ZW0oJ3Nob3dfbW9kZScsICfor6bnu4YnKTtcXG4gICAgICAgICAgICAgICAgc2hvd19tb2RlID0gc2hvd19tb2RlID09PSAn6K+m57uGJyA/ICfnsr7nroAnIDogJ+ivpue7hic7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3Nob3dfbW9kZScsIHNob3dfbW9kZSk7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3Nob3dfbW9kZScsIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5pi+56S65qih5byPOicgKyBjb2xvcihzaG93X21vZGUsICcjZmE4YzM1JylcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGxldCBjb2xfdHlwZSA9IHNob3dfbW9kZSA9PT0gJ+ivpue7hicgPyAndGV4dF8xJyA6ICd0ZXh0XzMnO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNudDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdzaG93X3JldF8nICsgaSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xfdHlwZVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGNvbG9yLCBwYXJzZVJldC5sZW5ndGgpLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiAnc2hvd19tb2RlJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgcGFyc2VSZXQuZm9yRWFjaCgoaXQsIGlkeCkgPT4ge1xcbiAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0Lm5hbWU7XFxuICAgICAgICAgICAgaWYgKGl0LnJldCAmJiAhaXQucmV0LmluY2x1ZGVzKCd1bmRlZmluZWQnKSAmJiAoLyNpc1ZpZGVvPXRydWUjLy50ZXN0KGl0LnJldCkgfHwgaXNWaWRlbyhpdC5yZXQpKSkge1xcbiAgICAgICAgICAgICAgICB0aXRsZSA9IGNvbG9yKHRpdGxlLCAnIzEyYjY2OCcpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBkZXNjID0gKGl0LnJldCB8fCBpdC5lcnJvcikuc3Vic3RyKDAsIDYwKTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIGRlc2M6IHNtYWxsKGRlc2MpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sX3R5cGUsXFxuICAgICAgICAgICAgICAgIHVybDogaXQucmV0LFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0OiBpdC5yZXQgfHwgaXQuZXJyb3IsXFxuICAgICAgICAgICAgICAgICAgICBpZDogJ3Nob3dfcmV0XycgKyBpZHhcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSk7XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH0sdmlwTmFtZSxwYXJzZVJldClcXG59XFxuXFxuJC5leHBvcnRzLnNvcnRCeUtleT1zb3J0QnlLZXk7XFxuJC5leHBvcnRzLnRlc3RfcmVwb3J0PXRlc3RfcmVwb3J0O1wifV0iLCJpY29uIjoiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzQuc3ZnIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment