Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6Mzg4LCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoi5bel5YW3IiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1PQklMRV9VQSk7XG5jb25zdCB7ZGVtb0RhdGEsZGVmYXVsdFNldHMsZmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG5jb25zdCB7Z2V0T25lLHVuaXF1ZTIsZHVwbGljYXRlc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvdXRpbHM/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xubGV0IHNqVGVzdCA9W107Zm9yKGxldCBpIGluIGRlbW9EYXRhKXtzalRlc3Q9c2pUZXN0LmNvbmNhdChkZW1vRGF0YVtpXSl9XG50aGlzLmQgPSBbXTtcbmNvbnN0IGp4SXRlbSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xudmFyIFJvdXRlID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmV2YWwoZ2V0S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8udGVzdChzZWwpKXtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/nnIvotbfmnaXmkq3mlL7lnLDlnYDkvLzkuY7kuI3lr7nlirI/XFxuJytwbGF5VXJsXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICQoKS5sYXp5UnVsZSgocGxheVVybCx1cmwpPT57XG4gICAgICAgICAgICBsZXQgdGl0bGUgPSBnZXRJdGVtKFwic2VsZWN0ZWQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpO1xuICAgICAgICAgICAgbG9nKCd0aXRsZTonK3RpdGxlKTtcbiAgICAgICAgICAgIGlmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJiEvXuS4jemAiSR8XumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGdldEl0ZW0oXCJzZWxlY3RlZDBcIiwgXCImJlwiKS5zcGxpdChcIiYmXCIpWzBdLnJlcGxhY2UoL/CfkYkvZywnJykucmVwbGFjZSgv5LiN6YCJL2csJycpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So5pat5o+S5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCx0aXRsZSxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9ZWxzZSBpZihnZXRJdGVtKCdkbi50ZXN0X21vZGUnKT09PSfmlq3mj5InJiYvXumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So6a2U5pat5ouf55yf5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCwnJyxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgIGNvbnN0IHtsYXp5UGFyc2V9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbGF6eVBhcnNlKHBsYXlVcmwscGFyc2VJbnQoZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSkpfHwndG9hc3Q6Ly/op6PmnpDlpLHotKUs5YW35L2T55yL5pel5b+XJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9LHBsYXlVcmwsdXJsKVxuICAgIH0pLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIGpzTG9hZGluZ0luamVjdDogdHJ1ZSxcbiAgICAgICAgYmxvY2tSdWxlczogWydiYWlkdS4qLnBuZycsICcuanBnJywnLm1wMycsJy5tcDQnLCcubTN1OCcsJy5mbHYnLCcuYXZpJywnLjNncCcsJy5tcGVnJywnLndtdicsJy5tb3YnLCcucm12YicsJy5naWYnLCcuanBnJywnLmpwZWcnLCcucG5nJywnLmljbycsJy5zdmcnX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4gICAgICAgICAgICAgICAgbGV0IG91dFRpdGxlID0gaXQucmVwbGFjZSgv8J+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+S7tuWvvOWFpScpLmNvbmZpcm0oKCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCB7ZGVmYXVsdFNldHN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgICAgICAgICAgbGV0IGpzQ29kZSA9IGZldGNoKHBhcnNlUm91dGUpfHxKU09OLnN0cmluZ2lmeSh7dGl0bGU6W10sY29kZXM6e30sc2V0dGluZ3M6ZGVmYXVsdFNldHN9KTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGpzQ29kZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lj5HnlJ/plJnor686XFxuJytlLm1lc3NhZ2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHRvSW1wb3J0ID0gZ2V0VmFyKFwiZG4uaW1wb3J0X3RleHRcIik7XG4gICAgICAgICAgICAgICAgaWYoL+mtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqUvLnRlc3QodG9JbXBvcnQpJiZ0b0ltcG9ydC5zcGxpdCgnwqXCpScpLmxlbmd0aD4xKXtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRvSW1wb3J0LnNwbGl0KCfCpcKlJylbMV07XG4gICAgICAgICAgICAgICAgICAgIGlmKCEvXmh0dHAvLnRlc3QodXJsKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Ymq5YiH5p2/5Zyw5Z2A5pyJ6K+vLOWvvOWFpeWksei0pSdcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IHBhcnNlUGFzdGUodXJsKTtcbiAgICAgICAgICAgICAgICAgICAgdG9JbXBvcnQgPSBiYXNlNjREZWNvZGUodG9JbXBvcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgamlleGkgPSB0b0ltcG9ydC5zcGxpdCgnXFxuJykuZmlsdGVyKGl0PT5pdC50cmltKCkpO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZVRpdGxlID0gW107XG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlQ29kZSA9IHt9O1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gamlleGkpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcsJylbMF07XG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcsJylbMV07XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIShjb2RlLnJlcGxhY2UoL1tcXHNdL2csJycpLnN0YXJ0c1dpdGgoJ2h0dHAnKSkpe1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHRpdGxlKyfkuLrlh73mlbDop6PmnpAnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykubGVuZ3RoPjIwKXsvL+inhuS4umZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IGV2YWwoYmFzZTY0RGVjb2RlKGNvZGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGNvZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZS5tZXNzYWdlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBzY09iamVjdCA9IFtcIkNpdHlJUFwiLCBcInBjVUFcIiwgXCJjYWNoZU0zdThcIiwgXCJkZWZhdWx0UGFyc2VXZWJcIixcIm1hb3NzXCIsIFwiTExRXCJdO1xuICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUgPSBwYXJzZVRpdGxlP3BhcnNlVGl0bGUuZmlsdGVyKGl0PT4hc2NPYmplY3QuaW5jbHVkZXMoaXQpKTpbXTtcbiAgICAgICAgICAgICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1xuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2R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gICAgICAgICAgICBpZiAodHlwZW9mIChmbGFnc1tvbmVdKSA9PT0gJ3VuZGVmaW5lZCcgfHwgIWZsYWdzW29uZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Y+W5Ye656ys5LiA5Liq5qCH5b+XXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnc1tvbmVdID0gbXlGbG9vcnNbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICBteUZsb29ycy5zcGxpY2UoMCwgMSk7Ly/liKDpmaTmoIflv5fliJfooajph4znmoTnrKzkuIDkuKrlhYPntKBcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBmbGFnc1tvbmVdICsgaiwgdmFsdWU6IG9uZX0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGZ0bGlzdC5wdXNoKHtrZXk6IGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIGxvZyhKU09OLnN0cmluZ2lmeShmbGFncykpO1xuICAgICAgICBsZXQgbmV3Q29kZXMgPSB7fTtcbiAgICAgICAgZm9yKGxldCBrIGluIGZ0bGlzdCl7XG4gICAgICAgICAgICBuZXdDb2Rlc1tmdGxpc3Rba10ua2V5XSA9IGZ0bGlzdFtrXS52YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICBsZXQgdGlwcyA9ICfmo4DmtYvliLDlkI3np7DlpI3nlKjpobnnm67mlbA6JytrZXlzX3JlX2N0Kycs5Luj56CB6YeN5aSN6aG555uu5pWw6YePOicrdmFsdWVfcmVfY3QrJ1xcbumcgOimgeS4gOmUruaJk+S4quagh+ivhuWQlz/kuI3mlK/mjIHoh6rliqjliKDpmaQs5omT5qCH5b+X6Ieq6KGM6Kej5YazJztcbiAgICAgICAgcmV0dXJuICQodGlwcykuY29uZmlybSgodmFsdWVfcmVfY3QsanNvbixuZXdDb2RlcyxwYXJzZVJvdXRlKT0+e1xuICAgICAgICAgICAgaWYodmFsdWVfcmVfY3Q8MSl7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoueEtumDveaYrzDkuKrph43lpI3pobnnm67kuobvvIzlsLHkuI3pnIDopoHmiJHlgZrku4DkuYjkuoYhJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29tcGFyZSgpe1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYSwgYil7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHtmbG9vcnN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBhLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IGIuc3Vic3RyaW5nKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmbG9vcnMuaW5kZXhPZih5KS1mbG9vcnMuaW5kZXhPZih4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBqc29uLmNvZGVzID0gbmV3Q29kZXM7XG4gICAgICAgICAgICBsZXQgdGl0bGVzID0gT2JqZWN0LmtleXMobmV3Q29kZXMpO1xuICAgICAgICAgICAgdGl0bGVzID0gdGl0bGVzLnNvcnQoY29tcGFyZSgpKTtcbiAgICAgICAgICAgIGpzb24udGl0bGUgPSB0aXRsZXM7XG4gICAgICAgICAgICB2YXIgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT04ucGFyc2XkvJrmiqXplJlcbiAgICAgICAgICAgIHdyaXRlRmls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MCA1cHggMCA1cHg7XFxuICAgICAgICAgICAgcGFkZGluZzogMCAwcHggMCAwcHg7XFxuICAgICAgICAgICAgLyogICAgICAgICAgICBiYWNrZ3JvdW5kOiAjRjlGMERBOyovXFxuICAgICAgICAgICAgZm9udC13ZWlnaHQ6IDA7XFxuICAgICAgICAgICAgZm9udC1mYW1pbHk6IFxcXCJNaWNyb3NvZnQgWWFIZWlcXFwiLFxcXCLlrovkvZNcXFwiLFxcXCJTZWdvZSBVSVxcXCIsIFxcXCJMdWNpZGEgR3JhbmRlXFxcIiwgSGVsdmV0aWNhLCBBcmlhbCxzYW5zLXNlcmlmLCBGcmVlU2FucywgQXJpbW87XFxuICAgICAgICB9XFxuICAgICAgICAjYXBwe1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTEwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAjdGlwc3tcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xMHB4O1xcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206NXB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLmZ1bmd7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXJcXG4gICAgICAgIH1cXG4gICAgICAgIGRpdi5ib3gge1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTFweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDIwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKui+k+WFpeahhuWwuuWvuCovXFxuICAgICAgICBmb3JtIHtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dCwgbGFiZWwsIHNlbGVjdCB7XFxuICAgICAgICAgICAgYm9yZGVyOiBub25lO1xcbiAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWtl+S9k+S9jee9riovXFxuICAgICAgICBpbnB1dCB7XFxuICAgICAgICAgICAgd2lkdGg6IDc3JTtcXG4gICAgICAgICAgICBoZWlnaHQ6IDMycHg7XFxuICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiA2NnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxhYmVsIHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNDNweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5bCP5qGGKi9cXG4gICAgICAgIC5iYXIgbGFiZWwge1xcbiAgICAgICAgICAgIC8qYmFja2dyb3VuZDogI0QwNkI2QzsqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAgICAgICAgICBsZWZ0OiAzcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKui+k+WFpeahhuagt+W8jyovXFxuICAgICAgICAuYmFyIGlucHV0IHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgc2VsZWN0IHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDo0MHB4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogMjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgLmxpZWIgc2VsZWN0e1xcbiAgICAgICAgICAgIC8qYm9yZGVyLXJhZGl1czogNHB4OyovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNTU1cHggNXB4IDVweCA1NTVweDtcXG4gICAgICAgICAgICB3aWR0aDogODBweDtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIHJpZ2h0OiAycHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWktOWDjyovXFxuICAgICAgICAucm91bmRfaWNvbntcXG4gICAgICAgICAgICB3aWR0aDogNDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcXG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgfVxcbiAgICA8L3N0eWxlPlxcbjwvaGVhZD5cXG48Ym9keT5cXG48ZGl2IGNsYXNzPVxcXCJmdW5nXFxcIj5cXG4gICAgPG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5LiN55So5Yqo5a6D44CC5aaC6K6+572u5LiN5b2T5Lya5a+86Ie06KeE5YiZ5peg5rOV5L2/55So77yMPGJyPuino+WGs+WKnuazle+8muinhueVjOaJk+W8gOabtOWkmuiuvue9ruKGkuaWh+S7tueuoeeQhuKGkueCuWNhY2hl4oaS6ZW/5oyJTXlQYXJzZVNldC5qc29u5Yig6Zmk5o6J77ybPGJyPuKRoeWFqOWxgOiuvue9ruWmguaenOmAieaLqeS6humdnum7mOiupOmCo+S5iOWFqOmDqOeahOino+aekOS8muS9v+eUqOi/meS4gOiuvue9ru+8jOS4jeaDs+i/meagt+eahOivneivt+Whq+WFpem7mOiupO+8mzxicj7ikaLnu7/oibLkv53lrZjmjInpkq7ku4Xku4Xkv53lrZjphY3nva7kuI3kvJrlhbPpl63orr7nva7pobXpnaLvvIzphY3nva7lkI7mg7Pkv53lrZjlubblhbPpl63orr7nva7pobXpnaLnmoTor53or7fngrnok53oibLmjInpkq7vvJs8YnI+4pGj5aaC5p6c6YGH5Yiw5L+d5a2Y5oyJ6ZKu54K55LiN5Yqo5oiW6ICF5oql6ZSZ55qE5oOF5Ya177yM5Lul5LiL6Lev5b6E5oyo552A5Yig6Zmk5LiA6YGN77yM54S25ZCO6YeN5paw5ouJ5Y+W5o+S5Lu277yM572R6aG15YaN5omT5byA5q2k572R6aG1W+S4jeimgeWFiOaLieS7o+eggV3jgILorrDlvpflpIfku708YnI+XFxu5Li75o+S5Lu25a2Y5pS+6Lev5b6EOiAvY2FjaGUvUGFyc2VfRG4uanM8YnI+XFxu572R6aG16ISa5pys5a2Y5pS+6Lev5b6EOiAvY2FjaGUvUGFyc2VfRG4uaHRtbDxicj5cXG7ml6fmlq3mj5LphY3nva7ot6/lvoQ6L2NhY2hlL015UGFyc2VTZXQuanNvbjxicj5cXG7mlrDmlq3mj5LphY3nva7ot6/lvoQvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uPGJyPlxcbiAgICDikaTpmIXor7vlrozmj5DnpLr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iO1xcXCIpO1xcbiAgICAgICAgc2V0dGluZ3MgPSBPYmplY3QuYXNzaWduKHNldHRpbmdzLG5ld0NvbmZpZy5zZXR0aW5ncyk7XFxuICAgICAgICB2YXIgeWNUaXRsZSA9IFsnZGVmYXVsdFBhcnNlJywgJ2RlZmF1bHRQYXJzZVdlYicsJ21hb3NzJywgJ0NpdHlJUCcsICdjYWNoZU0zdTgnLCAncGNVQScsICdwYXJzZUxjJywgJ2dwYXJzZScsICducGFyc2UnXTtcXG4gICAgICAgIG15U2VsZWN0ID0gbmV3Q29uZmlnLnRpdGxlLmZpbHRlcihjb21wYXJlKHljVGl0bGUpKTtcXG4gICAgICAgIC8vIG15U2VsZWN0ID0gbXlTZWxlY3QubWFwKChpdCk9PntcXG4gICAgICAgIC8vICAgICBsZXQgZmxhZyA9ICfik4onO1xcbiAgICAgICAgLy8gICAgIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJ+KSvyc7XFxuICAgICAgICAvLyAgICAgfWVsc2UgaWYodHlwZW9mKG5ld0NvbmZpZy5jb2Rlc1tpdF0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAvLyAgICAgfVxcbiAgICAgICAgLy8gICAgIHJldHVybiBmbGFnK2l0XFxuICAgICAgICAvLyB9KTtcXG4gICAgfVxcbiAgICAvL2ZiYS5sb2coSlNPTi5zdHJpbmdpZnkobXlTZWxlY3QpKTtcXG5cXG4gICAgbGV0IG9wdGlvbnMgPSBbXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon54ix5aWH6Im6JyxcXG4gICAgICAgICAgICBpZDoncXknLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnF5LFxcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyOiforr7nva7niLHlpYfoibonXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S8mOmFtycsXFxuICAgICAgICAgICAgaWQ6J3lrJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy55a1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifohb7orq8nLFxcbiAgICAgICAgICAgIGlkOid0eCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MudHhcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IqS5p6cJyxcXG4gICAgICAgICAgICBpZDonbWcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm1nXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WTlOWTqeWTlOWTqScsXFxuICAgICAgICAgICAgaWQ6J2JsJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5ibFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifmkJzni5AnLFxcbiAgICAgICAgICAgIGlkOidzaCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Muc2hcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6KW/55OcJyxcXG4gICAgICAgICAgICBpZDoneGcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnhnXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+mYv+mHjCcsXFxuICAgICAgICAgICAgaWQ6J2FsJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5hbFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOidQUFRWJyxcXG4gICAgICAgICAgICBpZDoncHAnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnBwXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WSquWSlScsXFxuICAgICAgICAgICAgaWQ6J21pJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5taVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkuZDop4YnLFxcbiAgICAgICAgICAgIGlkOidsZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubGVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonMTkwNScsXFxuICAgICAgICAgICAgaWQ6J29uZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mub25lXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+mjjuihjCcsXFxuICAgICAgICAgICAgaWQ6J2Z1bicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuZnVuXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WFtuS7licsXFxuICAgICAgICAgICAgaWQ6J290aCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mub3RoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WFqOWxgCcsXFxuICAgICAgICAgICAgaWQ6J3FqdScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucWp1XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+aPkuS7ticsXFxuICAgICAgICAgICAgaWQ6J2NqJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5jalxcbiAgICAgICAgfSxcXG4gICAgXTtcXG5cXG4gICAgZnVuY3Rpb24gRGlkKGlkKXtcXG4gICAgICAgIHJldHVybiBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChpZCk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24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ICBmdW5jdGlvbiBvcGVuVGhlbWUoKXtcXG4gICAgICAgIGZiYS5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICBydWxlOiBcXFwiPV5fXj1cXFwiLFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5Li76aKY566h55CGXFxcIixcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU95Li76aKYI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgZ3JvdXA6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwcmVSdWxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBleHRyYToge31cXG4gICAgICAgIH0pKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBvcGVuSnhNYW5hZ2UoKXtcXG4gICAgICAgIGZiYS5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICBydWxlOiBcXFwiPV5fXj1cXFwiLFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi6Kej5p6Q6YWN572u566h55CGXFxcIixcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU96Kej5p6QI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgZ3JvdXA6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwcmVSdWxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBleHRyYToge31cXG4gICAgICAgIH0pKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBjYW5jZWwoKXtcXG4gICAgICAgIGlmKCFteVNldCl7XFxuICAgICAgICAgICAgZmJhLndyaXRlRmlsZShvbGRSb3V0ZSwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZ3MsIG51bGwsIDQpKTtcXG4gICAgICAgICAgICBmYmEucmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBmYmEuYmFjayhmYWxzZSk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gY2xpY2ttZShtc2csZHVyYXRpb24sdGl0bGUpe1xcbiAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgIGZvcihsZXQga2V5IGluIHNldHRpbmdzKXtcXG4gICAgICAgICAgICAgICAgLy8gZmJhLmxvZyhEaWQoa2V5KSsnJytrZXkpO1xcbiAgICAgICAgICAgICAgICB0cnl7XFxuICAgICAgICAgICAgICAgICAgICAvL3NldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZS5yZXBsYWNlKC/ik4p84pK/L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3Nba2V5XSA9IERpZChrZXkpLnZhbHVlO1xcbiAgICAgICAgICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgICAgICBhbGVydChcXFwi5pyq6I635Y+W5Yiw6IqC54K5OlxcXCIra2V5K1xcXCJcXFxcblxcXCIrZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihteVNlbGVjdCl7XFxuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24obmV3Q29uZmlnLnNldHRpbmdzLCBzZXR0aW5ncyk7XFxuICAgICAgICAgICAgICAgIGZiYS53cml0ZUZpbGUobmV3Um91dGUsICQkJC5zdHJpbmdpZnkobmV3Q29uZmlnKSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGZiYS53cml0ZUZpbGUob2xkUm91dGUsICQkJC5zdHJpbmdpZnkoc2V0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gICAgICAgICAgICBpZiAoZGF5IDwgMTApIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLTBcXFwiICsgZGF5O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGRhdGVTdHIgKz0gXFxcIi1cXFwiICsgZGF5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBkYXRlU3RyO1xcbiAgICB9LFxcbiAgICBub3dEYXRlU3RyOmZ1bmN0aW9uICgpeyAvLyDliKnnlKgk5bel5YW36I635Y+W5qC85byP5YyW5ZCO55qE5b2T5YmN5pe26Ze0XFxuICAgICAgIHJldHVybiAgJC5kYXRlRm9ybWF0KG5ldyBEYXRlKCksXFxcInl5eXktTU0tZGQgSEg6bW06c3NcXFwiKTtcXG4gICAgfSxcXG4gICAgdG9KU09OOiBmdW5jdGlvbihqc29uKSB7XFxuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoanNvbiwgKGtleSwgdmFsdWUpID0+IHtcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09ICdmdW5jdGlvbicpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIDQpO1xcbiAgICB9LFxcbiAgICB0b1ZOdW06IGZ1bmN0aW9uKGEpIHtcXG4gICAgICAgIHZhciBhID0gYS50b1N0cmluZygpO1xcbiAgICAgICAgdmFyIGMgPSBhLnNwbGl0KCcuJyk7XFxuICAgICAgICB2YXIgbnVtX3BsYWNlID0gW1xcXCJcXFwiLCBcXFwiMFxcXCIsIFxcXCIwMFxcXCIsIFxcXCIwMDBcXFwiLCBcXFwiMDAwMFxcXCJdLFxcbiAgICAgICAgICAgIHIgPSBudW1fcG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J0b2Eoc3RyKTtcXG4gICAgfSxcXG4gICAg5rGf5rmWOmZ1bmN0aW9uIChjb25maWdfdXJsLCB0ZW0sIHRva2VuKSB7XFxuICAgICAgICByZXF1aXJlKCdodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2pzLWJhc2U2NEAzLjcuMi9iYXNlNjQubWluLmpzJyk7XFxuICAgICAgICB2YXIgYXRvYj1CYXNlNjQuYXRvYjtcXG4gICAgICAgIHZhciBidG9hPUJhc2U2NC5idG9hO1xcbiAgICAgICAgdmFyIGNvbmZpZ19hID0gdGVtIHx8IFxcXCJmZnNpcmxscVxcXCI7XFxuICAgICAgICB2YXIgdmlkZW8gPSAnJztcXG4gICAgICAgIHZhciB0ZW0gPSBbXTtcXG4gICAgICAgIHZhciBjb25maWdfYXJyeSA9IFtdO1xcbiAgICAgICAgdmFyIGNvbmZpZ19iID0gY29uZmlnX2EubGVuZ3RoO1xcbiAgICAgICAgaWYgKHRva2VuID09IDB4MSkge1xcbiAgICAgICAgICAgIHZhciBjb25maWdfdXJsID0gYXRvYihjb25maWdfdXJsKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGNvbmZpZ191cmwgPSBlbmNvZGVVUklDb21wb25lbnQoY29uZmlnX3VybCk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgY29uZmlnX2MgPSBjb25maWdfdXJsLmxlbmd0aDtcXG4gICAgICAgIGZvciAoaSA9IDB4MDsgaSA8IDB4MTAwOyBpKyspIHtcXG4gICAgICAgICAgICB0ZW1baV0gPSBjb25maWdfYVtpICUgY29uZmlnX2JdLmNoYXJDb2RlQXQoKTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGk7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGogPSBpID0gMHgwOyBpIDwgMHgxMDA7IGkrKykge1xcbiAgICAgICAgICAgIGogPSAoaiArIGNvbmZpZ19hcnJ5W2ldICsgdGVtW2ldKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIHRtcCA9IGNvbmZpZ19hcnJ5W2ldO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2ldID0gY29uZmlnX2Fycnlbal07XFxuICAgICAgICAgICAgY29uZmlnX2Fycnlbal0gPSB0bXA7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGEgPSBqID0gaSA9IDB4MDsgaSA8IGNvbmZpZ19jOyBpKyspIHtcXG4gICAgICAgICAgICBhID0gKGEgKyAweDEpICUgMHgxMDA7XFxuICAgICAgICAgICAgaiA9IChqICsgY29uZmlnX2FycnlbYV0pICUgMHgxMDA7XFxuICAgICAgICAgICAgdG1wID0gY29uZmlnX2FycnlbYV07XFxuICAgICAgICAgICAgY29uZmlnX2FycnlbYV0gPSBjb25maWdfYXJyeVtqXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtqXSA9IHRtcDtcXG4gICAgICAgICAgICBrID0gY29uZmlnX2FycnlbKGNvbmZpZ19hcnJ5W2FdICsgY29uZmlnX2Fycnlbal0pICUgMHgxMDBdO1xcbiAgICAgICAgICAgIHZpZGVvICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoY29uZmlnX3VybFtpXS5jaGFyQ29kZUF0KCkgXiBrKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxvZyhkZWNvZGVVUklDb21wb25lbnQodmlkZW8pKTtcXG4gICAgICAgIGlmICh0b2tlbiA9PSAweDEpIHtcXG4gICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHZpZGVvKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuIGJ0b2EodmlkZW8pO1xcbiAgICAgICAgfVxcbiAgICB9XFxufTtcXG5pZiAoZ2V0VmFyKFxcXCJqeE9sZFZcXFwiLCBcXFwiMFxcXCIpICE9IHZlcnNpb24pIHtcXG4gICAgcHV0VmFyKCdjakNhY2hlJywgX215U2V0LmNqY2FjaGUpO1xc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Bsb2coJ+W8gOWni+aJuemHj+ino+aekCjlt7Lljrvph40s5Y+q5Y+W5YmNM+S4quWkh+iDju+8jOWKoOmBk+mVv+e+pDo0ODY3MjIzMjjojrflj5bmnIDmlrDprZTmlq3liqjmgIEpOicrbmFtZXMpO1xcbiAgICAgICAgICAgIHBsYXlVcmxzPXBsYXlVcmxzLm1hcCgoaXQsaWQpPT5pdCtcXFwiO1xcXCIrbmFtZXNbaWRdKTtcXG4gICAgICAgICAgICAvL2xvZyhwbGF5VXJscyk7XFxuICAgICAgICAgICAgY29uc3Qge0xhenlQYXJzZUZhc3R9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcXG4gICAgICAgICAgICBsZXQgcmV0ID0gTGF6eVBhcnNlRmFzdChwbGF5VXJscyx0aW1lb3V0LHRpbWVvdXQpO1xcbiAgICAgICAgICAgIGlmKHR5cGVvZihyZXQpPT09J29iamVjdCcmJnJldC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgIC8vcmV0dXJuIHJldFswXVxcbiAgICAgICAgICAgICAgICAvL2xvZyhyZXQpO1xcbiAgICAgICAgICAgICAgICBsZXQgdiA9IGdldEFwcFZlcnNpb24oKTtcXG4gICAgICAgICAgICAgICAgaWYocGFyc2VJbnQodik+PTIxOTQmJnJldC5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IEFycmF5LmZyb20obmV3IFNldChyZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVzPXVybHMubWFwKChpdCxpZCk9Pml0LnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGg+MT9pdC5zcGxpdChcXFwi4piFXFxcIilbMV06XFxcIue6v+i3rzpcXFwiK3BhcnNlSW50KGlkKzEpKTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHM9dXJscy5tYXAoaXQ9Pml0LnNwbGl0KFxcXCLimIVcXFwiKVswXSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighLzsvLnRlc3QoaXQpfHxpdC5zcGxpdCgnOycpLmxlbmd0aDwyKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS9ALy50ZXN0KGhlYWQpfHwhL3t8fS8udGVzdChoZWFkKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkPWhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIGhlYWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87Lywn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR1cmw9aXQuc3BsaXQoJzsnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihpdC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSYmIXR1cmwuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dXJsKz1cXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHVybFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe3VybHM6dXJscyxoZWFkZXJzOmhlYWRlcnMsbmFtZXM6bmFtZXN9KTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0WzBdLnNwbGl0KFxcXCLimIVcXFwiKVswXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIHJldHVybiByZXRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBjb25zdCB7bGF6eVBhcnNlfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICA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cXFwiXFxcIjtcXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICAvL2xvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiXFxcIlxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBYNTpmdW5jdGlvbih2aXBVcmwscmVmKXsvLyBodHRwczovL2FwaS41Mnd5Yi5jb20vd2ViY2xvdWQvP3Y9aHR0cDovL3ZpcC4xOTA1LmNvbS9wbGF5LzY5MTk0MC5zaHRtbCBodHRwOi8vd3d3LmNkY2VyLm5ldC9cXG4gICAgICAgIGxldCBfeDUgPSAkLnRvU3RyaW5nKCh2aXBVcmwpID0+IHtcXG4gICAgICAgICAgICBpZighbG9jYXRpb24uaHJlZi5pbmNsdWRlcyh2aXBVcmwpKXtcXG4gICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IHZpcFVybDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYod2luZG93LmNvdW50ID09IG51bGwpe1xcbiAgICAgICAgICAgICAgICB3aW5kb3cuY291bnQ9MTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgd2luZG93LmNvdW50Kys7XFxuICAgICAgICAgICAgaWYoIHdpbmRvdy5jb3VudCA+PSAyMCl7XFxuICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuacquiOt+WPluWIsOi1hOa6kOWcsOWdgO+8jOi3s+WIsOino+aekOmhtVxcXCIpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmlwVXJsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKTtcXG4gICAgICAgICAgICBmb3IgKHZhciBpIGluIHVybHMpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCEvcGxheW0zdTh8bTN1OFxcXFwudHYvLnRlc3QodXJsc1tpXSkgJiYgdXJsc1tpXS5tYXRjaCgvXFxcXC5tcDN8XFxcXC5tcDR8XFxcXC5tM3U4fFxcXFwuZmx2LykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2codXJsc1tpXSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSx2aXBVcmwpO1xcbiAgICAgICAgbGV0IHBsYXlVcmwgPSByZWY/cmVmOnZpcFVybDtcXG4gICAgICAgIGxldCB4NVVybCA9ICd3ZWJSdWxlOi8vJytwbGF5VXJsKyAnQCcgK194NTtcXG4gICAgICAgIHNob3dMb2FkaW5nKCfprZTmlq0uanPll4XmjqLkuK0uLi4nKTtcXG4gICAgICAgIHJldHVybiB4NVVybFxcbiAgICB9LFxcbiAgICAn6YGT6ZW/JzpmdW5jdGlvbiAodmlwVXJsKXtcXG4gICAgICAgIGV2YWxQcml2YXRlSlMoJ3pTV3ZlK2VlQTZpTCtmMmZHVEkrMXBSOGpuTGQwU2l5VjZ5dmdjUE1Xd0JNUDVhWXBxaFRGYklTeG52aGIwYmQ1VmdpenlVTUhlNGRtc25HaFdMQmtxZmI1SGZOYklXNE1CTXh6THBQLzlUak5UOFNJUUFmamRUajRQOG9YMzVla0tOdkdWeERvbHlmY1lycG9Ld05vUT09Jyk7XFxuICAgICAgICByZXR1cm4gdGhpcy7lhY3ll4UodmlwVXJsKycmc2VjcmV0PScrc2VjcmV0KVxcbiAgICB9LFxcbiAgICAn54yrJzpmdW5jdGlvbiAoanh1cmwsIHJlZiwga2V5KSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBnZXRWaWRlb0luZm8gPSBmdW5jdGlvbiAodGV4dCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdG9vbHMuQUVTKHRleHQsIGtleSwgaXYpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB7aGVhZGVyczoge1xcXCJSZWZlcmVyXFxcIjogcmVmfHwnJ319O1xcbiAgICAgICAgICAgIGtleSA9IGtleSA9PSB1bmRlZmluZWQgPyBcXFwiZHZ5WVJRbG5QUkNNZFFTZVxcXCIgOiBrZXk7XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSByZWY/cmVxdWVzdChqeHVybCwgaGVhZGVycyk6cmVxdWVzdChqeHVybCk7XFxuICAgICAgICAgICAgaWYgKC8mYnR3YWY9Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KGp4dXJsICsgXFxcIiZidHdhZlxcXCIgKyBodG1sLm1hdGNoKC8mYnR3YWYoLio/KVxcXCIvKVsxXSwgaGVhZGVycyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBpdiA9IGh0bWwuc3BsaXQoXFxcIl90b2tlbiA9IFxcXFxcXFwiXFxcIilbMV0uc3BsaXQoXFxcIlxcXFxcXFwiXFxcIilbMF07XFxuICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC92YXIgY29uZmlnID0ge1tcXFxcc1xcXFxTXSo/fS8pWzBdICsgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIGlmICghL15odHRwLy50ZXN0KGNvbmZpZy51cmwpKSB7XFxuICAgICAgICAgICAgICAgIGNvbmZpZy51cmwgPSBkZWNvZGVVUklDb21wb25lbnQodG9vbHMuQUVTKGNvbmZpZy51cmwsIGtleSwgaXYpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy51cmw7XFxuICAgICAgICB9XFxuICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiXFxcIjtcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgTExROiBmdW5jdGlvbihqeHVybCkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgYXBpID0ganh1cmwuc3BsaXQoJz91cmw9JylbMF0gKyBcXFwiYXBpLnBocFxcXCI7XFxuICAgICAgICAgICAgdmFyIGI2NGlkID0gYmFzZTY0RW5jb2RlKGp4dXJsLnNwbGl0KCd1cmw9JylbMV0pO1xcbiAgICAgICAgICAgIHZhciBwYXJzZWlkID0gdG9vbHMuY2Flc2FyQ2lwaGVyKGI2NGlkLCAtMSk7XFxuICAgICAgICAgICAgdmFyIGpzb24gPSBKU09OLnBhcnNlKHJlcXVlc3QoYXBpLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzoganh1cmxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHBhcnNlaWRcXG4gICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgdXJsID0gKGpzb24uY29kZSA9PSAyMDAgPyBiYXNlNjREZWNvZGUodG9vbHMuY2Flc2FyQ2lwaGVyKGpzb24udXJsLCAtMSkpIDogJycpO1xcbiAgICAgICAgICAgIHJldHVybiB1cmw7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBQYW5HdTogZnVuY3Rpb24odmlwVXJsLCBkYXRhKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIC8qdmFyIHJlZiA9ICdodHRwczovL3d3dy5wYW5ndWppZXhpLmNvbS8nO1xcbiAgICAgICAgICAgIHZhciBwYXJzZSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgICAgIHZhciBhcGkgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpL2FwaS5waHAnO1xcbiAgICAgICAgICAgICovXFxuICAgICAgICAgICAgLy92YXIgcmVmID0gJ2h0dHBzOi8veG15c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AgICBpZihqeHMpe1xcbiAgICAgICAgICAgIGZvcihsZXQgaSBpbiBqeHMpe1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTW2p4c1tpXV0gPT0gJ3N0cmluZycmJlBhcnNlU1tqeHNbaV1dLm1hdGNoKC9odHRwLio/PS8pKXtcXG4gICAgICAgICAgICAgICAgICAgIHBsYXlVcmxMaXN0LnB1c2goUGFyc2VTW2p4c1tpXV0rdmlwVXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goanhzW2ldKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIC8vIHJldHVybiBwbGF5VXJsTGlzdFxcbiAgICAgICAgcmV0dXJuIHtwbGF5VXJsTGlzdDpwbGF5VXJsTGlzdCxuYW1lTGlzdDpuYW1lTGlzdH1cXG4gICAgfVxcbiAgICBmdW5jdGlvbiBnZXRMYXp5TGlzdChrZXkpey8v5Y+q6I635Y+W5aSH6IOO5YiX6KGo55qE5YWN5ZeF5o6i6Kej5p6Q5YiX6KGoXFxuICAgICAgICBsZXQgcGFyc2VzID0gW107XFxuICAgICAgICBsZXQganhzID0gamlleGlzW2tleV18fFtdOyAvLyDpgILnlKjkuo7ov5nkuKrnvZHnq5nnmoTop6PmnpDliJfooahcXG4gICAgICAgIC8vIGxvZyhqeHMpO1xcbiAgICAgICAgaWYoanhzKXtcXG4gICAgICAgICAgICBmb3IobGV0IGkgaW4ganhzKXtcXG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIFBhcnNlU1tqeHNbaV1dID09ICdmdW5jdGlvbicmJiEv6YCa5YWNLy50ZXN0KFBhcnNlU1tqeHNbaV1dLnRvU3RyaW5nKCkpKXtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOmp4c1tpXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBydWxlOlBhcnNlU1tqeHNbaV1dXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIHBhcnNlc1xcbiAgICB9XFxuICAgIHZhciBleHRyYSA9IHt9O1xcbiAgICB2YXIgcGFyc2VzID0gW107IC8v5YWN5ZeF5o6i5YiX6KGoXFxuICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxcbiAgICBpZighc3RyVGl0bGUpe1xcbiAgICAgICAgaWYoL0xUfHJ1aWZlbmdsYnxzdW95b3x4Znl8cmVucmVubWl8Um9uZ1hpbmdWUnx4dWVyZW58d3VkdXl1bnxsYW9kaXxOYWlmZWltaXxkYW9kbXxYTU1UfHYwMjBjLy50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHN0ciA9IG15U2V0Lm90aDtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnb3RoJyk7XFxuICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ290aCcsc3RyKTtcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIHZhciBob3N0O1xcbiAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgaG9zdCA9IHZpcFVybC5tYXRjaCgvXFxcXC4oLio/KVxcXFwvLylbMV07XFxuICAgICAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICBpZighL15odHRwLy50ZXN0KHBsYXlVcmwpKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwi5pat5o+S6LCD55So5aSx6LSl77yBXFxcXG7pnZ7mraPluLjnmoR2aXDmraPniYjlnLDlnYDkuJTmnKror4bliKvljp/nq5nop6PmnpDmkq3mlL7lnLDlnYBcXFwiO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVMu6YGT6ZW/5LuT5bqT6YCa5YWNKHBsYXlVcmwsdGltZW91dClcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvL2hvc3QgPSBkZWNvZGVVUklDb21wb25lbnQoaG9zdCk7XFxuICAgICAgICAgICAgc3dpdGNoIChteVNldC5xanUpIHtcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwi6buY6K6kXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoaG9zdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInFxLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnR4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgndHgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3R4Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImlxaXlpLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnF5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncXknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3F5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInlvdWt1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnlrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneWsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3lrJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImFsaXp5XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuYWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdhbCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnYWxpenknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibWd0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5tZztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ21nJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdtZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJiaWxpYmlsaS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5ibDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2JsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdibCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJzb2h1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnNoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInR2LnNvaHUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuc2g7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiaXhpZ3VhLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnhnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneGcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3hnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBwdHYuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucHA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdwcCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgncHAnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibWlndXZpZGVvLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm1pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbWknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ21pJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImxlLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2xlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIjE5MDUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQub25lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnb25lJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdvbmUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiZnVuLnR2XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuZnVuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnZnVuJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdmdW4nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQub3RoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnb3RoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdvdGgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnFqdTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfWVsc2V7XFxuICAgICAgICBsb2coJ+mtlOaWreaJp+ihjOWumuWQkeino+aekOe6v+i3r+WktDonK3N0clRpdGxlKTtcXG4gICAgICAgIHN0ciA9IHN0clRpdGxlO1xcbiAgICB9XFxuICAgIGxldCB3aXRoQmF0Y2ggPSAhIShNeUppZXhpLmlzQXV0byAmJiBNeUppZXhpLmF1dG9Nb2RlID09PSAn6YCf5bqm5LyY5YWIJyk7XFxuICAgIGxldCB3aXRoQmF0Y2hPcmRlciA9ICEhKE15SmlleGkuaXNBdXRvICYmIE15SmlleGkuYXV0b01vZGUgPT09ICfpobrluo/kvJjlhYgnKTtcXG4gICAgZnVuY3Rpb24gdW5pcXVlMihhcnJheSl7Ly/ljrvph43lh73mlbBcXG4gICAgICAgIHJldHVybiBBcnJheS5mcm9tKG5ldyBTZXQoYXJyYXkpKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBBcnJTZXQoQXJyLCBpZCkgey8v5a+56LGh5pWw57uE5Y676YeNXFxuICAgICAgICB2YXIgb2JqID0ge307XFxuICAgICAgICBjb25zdCBhcnJheXMgPSBBcnIucmVkdWNlKChzZXRBcnIsIGl0ZW0pID0+IHtcXG4gICAgICAgICAgICBvYmpbaXRlbVtpZF1dID8gJycgOiBvYmpbaXRlbVtpZF1dID0gdHJ1ZSAmJiBzZXRBcnIucHVzaChpdGVtKTtcXG4gICAgICAgICAgICByZXR1cm4gc2V0QXJyO1xcbiAgICAgICAgfSwgW10pO1xcbiAgICAgICAgcmV0dXJuIGFycmF5cztcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBzb3J0QnlLZXkoYXJyYXksIGtleSwgb3JkZXIpIHsvL+WvueixoeaVsOe7hOaMieafkOS4qumUruWAvOaOkuW6j1xcbiAgICAgICAgcmV0dXJuIGFycmF5LnNvcnQoZnVuY3Rpb24oYSwgYikge1xcbiAgICAgICAgICAgIHZhciB4ID0gYVtrZXldLm1hdGNoKC8oXFxcXGQrKS8pWzFdO1xcbiAgICAgICAgICAgIHZhciB5ID0gYltrZXldLm1hdGNoKC8oXFxcXGQrKS8pWzFdO1xcbiAgICAgICAgICAgIC8vIGxvZygneDonK3grXFxcIix5OlxcXCIreSk7XFxuICAgICAgICAgICAgaWYgKG9yZGVyKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAoKHggPCB5KSA/IC0xIDogKCh4ID4geSkgPyAxIDogMCkpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICgoeCA8IHkpID8gKCh4ID4geSkgPyAxIDogMCkgOiAtMSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIGlmICh0eXBlb2YgUGFyc2VTW3N0cl0gPT0gJ2Z1bmN0aW9uJykge1xcbiAgICAgICAgaWYoL+mAmuWFjS8udGVzdChzdHIpKXtcXG4gICAgICAgICAgICByZXR1cm4gUGFyc2VTW3N0cl0odmlwVXJsLHRpbWVvdXQpO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIHVybDtcXG4gICAgICAgIHZhciB0YXNrID0gZnVuY3Rpb24ob2JqKSB7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGNvbmZpZ19kcCA9JyArIGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZ19kcC5jaikpO1xcbiAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2Uob2JqLnZpcFVybCxvYmoubmFtZSxvYmoudGltZW91dCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgaWYoIXdpdGhCYXRjaE9yZGVyfHxzdHJUaXRsZSkgey8v5LiN5byA5aSa57q/6Lev6aG65bqP5LyY5YWI5oiW6ICF5oyH5a6a5LqG6Kej5p6QXFxuICAgICAgICAgICAgdXJsID0gUGFyc2VTW3N0cl0odmlwVXJsLHRpbWVvdXQpO1xcbiAgICAgICAgfWVsc2V7Ly/lvIDkuoblpJrnur/ot6/pobrluo/kvJjlhYjmiafooYzlhY3ll4XlpJrku7vliqFcXG4gICAgICAgICAgICBwYXJzZXMudW5zaGlmdCh7bmFtZTpzdHJ9KTsgLy/miorkuLvphY3nva7nmoTlhY3ll4XmjqLliqDlhaXliLDlpJrku7vliqHliJfooahcXG4gICAgICAgICAgICBwYXJzZXMgPSBBcnJTZXQocGFyc2VzLCduYW1lJyk7IC8v5Y676YeNXFxuICAgICAgICAgICAgdmFyIGNvdW50ID0gcGFyc2VzLmxlbmd0aDsgLy/orr7nva7ku7vliqHmlbDph49cXG4gICAgICAgICAgICBsb2coJ+mtlOaWreW8gOWQr+WkmuS7u+WKoeino+aekCzku7vliqHmlbDph486Jytjb3VudCk7XFxuICAgICAgICAgICAgbG9nKCfop6PmnpDliJfooag6JytKU09OLnN0cmluZ2lmeShwYXJzZXMpKTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VSZXQgPSBbXTsgLy/op6PmnpDnu5PmnpzliJfooahcXG4gICAgICAgICAgICBsZXQgdGFza3MgPSBwYXJzZXMubWFwKChpdCxpZGV4KT0+e1xcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgZnVuYzogdGFzayxcXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTppdC5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6aXQucnVsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXBVcmw6IHZpcFVybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiB0aW1lb3V0XFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJ0YXNrXFxcIitpZGV4XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z6Kej5p6QOlxcXCIrY291bnQpO1xcbiAgICAgICAgICAgIGJlKHRhc2tzLHtcXG4gICAgICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ob2JqLCBpZCwgZXJyb3IscmV0KSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuebkeWQrOWIsOS7u+WKoVxcXCIgKyBpZCsn5bey57uT5p2fLGVycm9yOicrZXJyb3IrJyxyZXQ6JytyZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VSZXQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGFzazppZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXQ6cmV0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6dGFza3MuZmlsdGVyKGl0PT5pdC5pZD09PWlkKVswXS5wYXJhbS5uYW1lXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGNvdW50IC09IDE7IC8v5a6M5oiQ5LqG5Lu75Yqh77yM5Lu75Yqh5pWw6YePLTFcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKG9iaik7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQgPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meino+aekDpcXFwiICsgY291bnQpXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHBhcmFtOiB7Ly/kvKDliLDnm5HlkKzlh73mlbDnmoRvYmrlj4LmlbDph4xcXG4gICAgICAgICAgICAgICAgICAgIGhpOiBcXFwiY2NjXFxcIixcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pOy8v5omn6KGM5aSa5Lu75YqhXFxuICAgICAgICAgICAgLy8gbGV0IHZhbHVhYmxlID0gcGFyc2VSZXQuZmlsdGVyKGl0PT4vbTN1OHxtcDQvLnRlc3QoaXQucmV0KSk7XFxuICAgICAgICAgICAgbG9nKFxcXCLlpJrku7vliqHmiafooYznu5PmnpzmlbA6XFxcIitwYXJzZVJldC5sZW5ndGgpO1xcbiAgICAgICAgICAgIGxldCB2YWx1YWJsZSA9IHBhcnNlUmV0LmZpbHRlcihpdD0+UGFyc2VTLmlzVmlkZW8oaXQucmV0LnNwbGl0KCcjJylbMF0uc3BsaXQoJzsnKVswXSkpO1xcbiAgICAgICAgICAgIGxvZygn5aSa5Lu75Yqh6aG65bqP5omn6KGM5pyJ5pWI57uT5p6cOicrSlNPTi5zdHJpbmdpZnkodmFsdWFibGUpKTtcXG4gICAgICAgICAgICBpZih2YWx1YWJsZS5sZW5ndGg+MSl7Ly/lpJrnur/ot69cXG4gICAgICAgICAgICAgICAgdmFsdWFibGUgPSBzb3J0QnlLZXkodmFsdWFibGUsJ3Rhc2snLHRydWUpOy8v5Y2H5bqP5o6S5YiXXFxuICAgICAgICAgICAgICAgIGxldCB1cmxzPXZhbHVhYmxlLm1hcChpdD0+aXQucmV0KTsvL+WPluWHuumTvuaOpSznvJPlrZjliY3nmoRcXG4gICAgICAgICAgICBpZihnZXRWYXIoJ2RwLmNhY2hlVmlkZW8nLCd0cnVlJyk9PT0ndHJ1ZScmJnBhcnNlSW50KGdldEFwcFZlcnNpb24oKSk+PTIyNTUpIHsvL+W8gOWni+e8k+WtmFxcbiAgICAgICAgICAgICAgICBsb2coXFxcIuWwiuaVrOeahOmtlOaWreeUqOaIt++8jOinhumikee8k+WtmOW3suWQr+eUqO+8jOivt+WwveaDheS6q+WPl+eci+WJp+aXtuWFiVxcXCIpO1xcbiAgICAgICAgICAgICAgICBsZXQgdmlkZW9zQ2FjaGU9dXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnM9e307XFxuICAgICAgICAgICAgICAgICAgICBpZihpdC5zcGxpdChcXFwiO1xcXCIpLmxlbmd0aD4xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoL0AvLnRlc3QoaGVhZCkmJi97fH0vLnRlc3QoaGVhZCkpe1xcbi8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID1oZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyc1trZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDppdC5zcGxpdChcXFwiO1xcXCIpWzBdLnNwbGl0KFxcXCIjXFxcIilbMF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczp7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6aGVhZGVyc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHZhciBkYXRhPWJhdGNoQ2FjaGVNM3U4KHZpZGVvc0NhY2hlKTtcXG4gICAgICAgICAgICAgICAgZGF0YT1kYXRhLm1hcCgoaXQsaWQpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZXh0cmE9XFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICBpZih1cmxzW2lkXS5zcGxpdChcXFwiO1xcXCIpLmxlbmd0aD4xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYT1cXFwiO1xcXCIrdXJsc1tpZF0uc3BsaXQoXFxcIjtcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHVybHNbaWRdLnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE9XFxcIuKYhVxcXCIrdXJsc1tpZF0uc3BsaXQoXFxcIuKYhVxcXCIpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYoaXQrXFxcIlxcXCIhPT1cXFwibnVsbFxcXCIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdCtleHRyYVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaWRdXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB1cmxzID0gZGF0YVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gbG9nKCfmjpLluo/lrozmr5XlkI7nu5Pmnpw6JytKU09OLnN0cmluZ2lmeSh2YWx1YWJsZSkpO1xcbiAgICAgICAgICAgICAgICBsZXQgbmFtZXM9dmFsdWFibGUubWFwKGl0PT5pdC5uYW1lKTtcXG4gICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBpZighLzsvLnRlc3QoaXQpfHxpdC5zcGxpdCgnOycpLmxlbmd0aDwyKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighL0AvLnRlc3QoaGVhZCl8fCEve3x9Ly50ZXN0KGhlYWQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQ9aGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9iaiA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSBpbiBoZWFkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gaGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9ialxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgdXJscyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0dXJsPWl0LnNwbGl0KCc7JylbMF07XFxuICAgICAgICAgICAgICAgICAgICBpZihpdC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSYmIXR1cmwuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHR1cmwrPVxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHVybFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHt1cmxzOnVybHMsaGVhZGVyczpoZWFkZXJzLG5hbWVzOm5hbWVzfSk7XFxuXFxuICAgICAgICAgICAgfWVsc2UgaWYodmFsdWFibGUubGVuZ3RoPT09MCl7XFxuICAgICAgICAgICAgICAgIC8vIHJldHVybiAndG9hc3Q6Ly/prZTmlq3lpJrku7vliqHlhY3ll4Xop6PmnpDlhajlhpvopobmsqEnXFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihleHRyYS5wbGF5VXJsTGlzdCk9PT0nb2JqZWN0JyYmZXh0cmEucGxheVVybExpc3QubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgZXh0cmEucGxheVVybExpc3QgPSBleHRyYS5wbGF5VXJsTGlzdC5maWx0ZXIoaXQ9Pml0IT09KFBhcnNlU1tzdHJdfHxzdHIpICsgdmlwVXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lTGlzdCA9IGV4dHJhLm5hbWVMaXN0O1xcbiAgICAgICAgICAgICAgICAgICAgZXh0cmEubmFtZUxpc3Q9dW5pcXVlMihuYW1lTGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICBleHRyYS5wbGF5VXJsTGlzdCA9IHVuaXF1ZTIoZXh0cmEucGxheVVybExpc3QpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmKGV4dHJhLm5hbWVMaXN0Lmxlbmd0aDwxKXtcXG4gICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6Iqt5q+UUeS6hizlpJrku7vliqHlhY3ll4Xop6PmnpDlhajlhpvopobmsqHlubbkuJTmsqHmnInlj6/nlKjnmoRqc29ufHg16Kej5p6Q5LqGJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lpJrku7vliqHlhY3ll4XlpLHotKUs5bCd6K+VanNvbnx4NVxcXCIpO1xcbiAgICAgICAgICAgICAgICAvL+aOkumZpOesrOS4gOS4qlxcbiAgICAgICAgICAgICAgICBsZXQgZXh0cmEyID0ge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3Q6ZXh0cmEubmFtZUxpc3QsXFxuICAgICAgICAgICAgICAgICAgICBwbGF5VXJsTGlzdDpleHRyYS5wbGF5VXJsTGlzdC5zbGljZSgxKSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyBsb2coZXh0cmEucGxheVVybExpc3RbMF0pO1xcbiAgICAgICAgICAgICAgICAvLyBsb2coZXh0cmEyKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFBhcnNlUy5kZWZhdWx0UGFyc2VXZWI/UGFyc2VTLmRlZmF1bHRQYXJzZVdlYihleHRyYS5wbGF5VXJsTGlzdFswXSx0aW1lb3V0LGV4dHJhMik6ZXh0cmEucGxheVVybExpc3RbMF07XFxuXFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1YWJsZVswXS5yZXRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpZigvXmhpa2VyOnxedG9hc3Q6fF5ydWxlOnxeeDVSdWxlOnxed2ViUnVsZTp8XnNlbGVjdC8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYoIXVybCYmIS9eaHR0cC8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6a2U5pat6Kej5p6Q5aSx6LSlPicrdmlwVXJsXFxuICAgICAgICB9XFxuICAgICAgICAvLyBsb2codmlwVXJsKyflhY3ll4XmjqLnu5Pmnpw6Jyt1cmwpO1xcbiAgICAgICAgaWYgKC9eXFxcXC8vLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgIHVybCA9ICdodHRwczonICsgdXJsXFxuICAgICAgICB9XFxuICAgICAgICBpZiAoLz1odHRwLy50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICB1cmwgPSAvJnVybD0vLnRlc3QodXJsKSA/IHVybCA6ICdodHRwJyArIGRlY29kZVVSSUNvbXBvbmVudCh1cmwuc3BsaXQoJz1odHRwJylbMV0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyppZih1cmwubWF0Y2goL21ndHYuY29tL2cpPT0nbWd0di5jb20nKXtcXG4gICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vd3d3Lm1ndHYuY29tfSc7XFxuICAgICAgICB9IGVsc2UgKi9cXG4gICAgICAgIGlmICgvXFxcXC5mbHYvLnRlc3QodXJsKSYmIS9Vc2VyLUFnZW50Ly50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tVc2VyLUFnZW50QGFwcCYmUmVmZXJlckAnICsgdmlwVXJsICsgJ30nO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKHVybCA9PT0gJycgfHwgdXJsID09PSB2aXBVcmwpIHtcXG4gICAgICAgICAgICByZXR1cm4gdmlwVXJsO1xcbiAgICAgICAgfSBlbHNlIGlmKCEvI2lzVmlkZW89dHJ1ZSMvLnRlc3QodXJsKSl7XFxuICAgICAgICAgICAgcmV0dXJuIHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICByZXR1cm4gdXJsXFxuICAgICAgICB9XFxuICAgIH0gZWxzZSBpZiAodHlwZW9mIFBhcnNlU1tzdHJdID09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Sl7Ly/liKDpmaTlkI3np7DliJfooajlkozku6PnoIFcXG4gICAgICAgICAgICBqc29uLnRpdGxlLnJlbW92ZShuYW1lKTtcXG4gICAgICAgICAgICBkZWxldGUganNvbi5jb2Rlc1tuYW1lXTtcXG4gICAgICAgIH1cXG4gICAgICAgIGFyckxpc3QgPSBhcnJMaXN0LmNvbmNhdChqc29uLnRpdGxlKTtcXG4gICAgICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQoYXJyTGlzdCkpO1xcbiAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBvYmpDb2RlKTtcXG4gICAgICAgIGlmICh0eXBlID09PSAn5rWL6K+VJykge1xcbiAgICAgICAgICAgIGV2YWwoJ3ZhciBjb25maWcgPScgKyBmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKSk7XFxuICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcXG4gICAgICAgICAgICBpZiAodHlwZW9mIFBhcnNlU1tkYXRhWzFdXSA9PSBcXFwiZnVuY3Rpb25cXFwiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVNbZGF0YVsxXV0oZGF0YVsyXSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFBhcnNlUy5kZWZhdWx0UGFyc2VXZWIoUGFyc2VTW2RhdGFbMV1dICsgZGF0YVsyXSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7Lkv53lrZjlhoXlrrlcXFwiO1xcbiAgICAgICAgfVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+aXoOazleivhuWIq+i/meS4quWGheWuueWRol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zb24uc2V0dGluZ3M7XFxuICAgICAgICAgICAgICAgIG9sZENvbmZpZy5jaiA9IGNqY2FjaGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShvbGRSb3V0ZSwgJC5zdHJpbmdpZnkob2xkQ29uZmlnKSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aBouWkjeaIkOWKnyc7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mcgOimgeWFiOaLieWPluWIl+ihqCdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBwYXJzZVJvdXRlKVxcbiAgICB9LFxcbiAgICBwdWxsQ29kZTogZnVuY3Rpb24oaykge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgcHVsbE1vZGUgPSBrWzBdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0ga1sxXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VGaWxlID0gZmV0Y2gocGFyc2VSb3V0ZSk7XFxuICAgICAgICAgICAgaWYgKCFwYXJzZUZpbGUpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHNldHRpbmdzID0gZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSk7XFxuICAgICAgICAgICAgICAgIHNldHRpbmdzID0gIXNldHRpbmdzID8ge30gOiBKU09OLnBhcnNlKHNldHRpbmdzKTtcXG4gICAgICAgICAgICAgICAgdmFyIGpzb24gPSB7fTtcXG4gICAgICAgICAgICAgICAganNvbi5zZXR0aW5ncyA9IHNldHRpbmdzO1xcbiAgICAgICAgICAgICAgICBqc29uLnRpdGxlID0gW107XFxuICAgICAgICAgICAgICAgIGpzb24uY29kZXMgPSB7fTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIHBhcnNlRmlsZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBwYXJzZVRpdGxlID0gW107XFxuICAgICAgICAgICAgdmFyIHBhcnNlQ29kZT17fTtcXG4gICAgICAgICAgICB2YXIgY2pMaW5rID0gZ2V0VmFyKCdwbHVnaW5MaW5rJyk7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgaWYoL0BiYXNlNjQ6XFxcXC9cXFxcLy8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoYmFzZTY0RGVjb2RlKGNqTGluay5zcGxpdCgnQGJhc2U2NDovLycpWzFdKSk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC/mj5Lku7blkI0vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVhbExpbmsgPSBjakxpbmsuc3BsaXQoJ+aPkuS7tuWQjScpWzBdLnJlcGxhY2UoL1tcXFxcc10vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+ino+aekOS6keWJquWIh+advzonK3JlYWxMaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB5UGFzdGUgPSBwYXJzZVBhc3RlKHJlYWxMaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKC9AYmFzZTY0OlxcXFwvXFxcXC8vLnRlc3QoeVBhc3RlKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChiYXNlNjREZWNvZGUoeVBhc3RlLnNwbGl0KCdAYmFzZTY0Oi8vJylbMV0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mIFBhcnNlUz09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5bkuKrpuKHmr5vmj5Lku7Ys6YeM6Z2i6L+eUGFyc2VT5a+56LGh6YO95rKh5pyJISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6bih5q+b5o+S5Lu25omn6KGM5oql6ZSZOlxcXFxuJytlLm1lc3NhZ2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquiDveivhuWIq+S6keWJquWIh+adv+S4reeahOWGheWuuTpcXFxcbicreVBhc3RlLnN1YnN0cmluZygwLDEwMCk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2pMaW5rID09PSAnUeelnicpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBqaWV4aSA9IGZldGNoKCdoaWtlcjovL2ZpbGVzL2ppZXhpL2ppZXhpLnR4dCcpLnNwbGl0KCdcXFxcbicpO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpIGluIGppZXhpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcmJicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcmJicpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIH1lbHNlIGlmKC9eI1thLXpBLVowLTldezIsMTB9JC8udGVzdChjakxpbmspKXsvL+emj+WIqeWPo+S7pDLliLAxMOS9jVxcbiAgICAgICAgICAgICAgICBlbHNlIGlmKC9eI1tcXFxcU117MiwxMH0kLy50ZXN0KGNqTGluaykpey8v56aP5Yip5Y+j5LukMuWIsDEw5L2N5Lu75oSP6Z2e56m65a2X56ym5LiyXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7dGFza0NhbGwsIHRhc2tSdW4sdGFza1JlcX0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS90YXNrQ2FsbD9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCflvIDlp4vmiafooYzku7vliqHku5PlupPojrflj5bmlq3lv7Xmj5Lku7bnpo/liKnlj6Pku6QnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSB0YXNrQ2FsbCgxNywnRG5GdWxpJyxbY2pMaW5rXSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXQgPSBKU09OLnBhcnNlKHJlc3VsdC5yZXN1bHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhyZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJldC5vcHQ9PT0nZXJyb3InKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmV0Lm1zZztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihyZXQub3B0PT09J3VybCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGZldGNoKHJldC5yZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gaHRtbC5pbmNsdWRlcygnaHR0cCcpPyBodG1sOmJhc2U2NERlY29kZShodG1sKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGppZXhpID0gYXJyLm1hdGNoKC9bXFxcXFNdKj8sLio/W1xcXFxzXS9nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBqaWV4aSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcsJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzFdLnNwbGl0KFxcXCJcXFxcblxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0nangnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoL1tcXFxcU10qPyxodHRwW1xcXFxTXS8udGVzdChyZXQucmV0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSByZXQucmV0LnNwbGl0KCcsJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJldC5yZXQuc3BsaXQoJywnKVsxXS5zcGxpdCgnXFxcXG4nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9eaHR0cC8udGVzdChyZXQucmV0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBjakxpbmsuc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldC5zcGxpdCgnXFxcXG4nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquefpeeahOemj+WIqTpcXFxcbicrcmV0LnJldDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0ndmlwSngnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gY2pMaW5rLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPS9mdW5jdGlvbi8udGVzdChjb2RlKT9ldmFsKGNvZGUpOmNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S7k+W6k+mdnuacgOaWsOeJiOaIluiAheemj+WIqeekvuWKn+iDveW8gOWPkeS4rSdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoY2pMaW5rPT09J+aWreaPkicpe1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9QYXJzZV9Ebi5qc1xcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGU9T2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL15oaWtlcjpcXFxcL1xcXFwvfF5maWxlOlxcXFwvXFxcXC98Xmh0dHB8XlxcXFwvc3RvcmFnZVxcXFwvfF5cXFxcL3NkY2FyZFxcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgaWYoL15cXFxcL3N0b3JhZ2VcXFxcL3xeXFxcXC9zZGNhcmRcXFxcLy8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjakxpbmsgPSAnZmlsZTovLycrY2pMaW5rO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjakxpbmspKTtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGU9T2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ouJ5Y+W5Y+j5Luk5pyJ6K+vJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGp4SnVkZ2UgPSB0eXBlb2YgUGFyc2VTID09ICdvYmplY3QnO1xcbiAgICAgICAgICAgIHZhciBsYkp1ZGdlID0gdHlwZW9mKHBhcnNlVGl0bGUpID09ICdvYmplY3QnO1xcbiAgICAgICAgICAgIGlmIChqeEp1ZGdlIHx8IGxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgLy8gaWYgKHB1bGxNb2RlID09PSAn5YiX6KGoJykge1xcbiAgICAgICAgICAgICAgICAvLyAgICAgaWYgKCFsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgcGFyc2VUaXRsZSA9IE9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgIC8vICAgICB9XFxuICAgICAgICAgICAgICAgIC8vICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICAvLyAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgLy8g5LiN566h5ouJ5Y+W5Luj56CB6L+Y5piv5YiX6KGo6YO96KaB5oqK5YiX6KGo5ouJ5LqGXFxuICAgICAgICAgICAgICAgIGlmICghbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IE9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgICAgICBsb2cocGFyc2VUaXRsZSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdmFyIHNjT2JqZWN0ID0gW1xcXCJDaXR5SVBcXFwiLCBcXFwicGNVQVxcXCIsIFxcXCJjYWNoZU0zdThcXFwiLFxcXCJpc1ZpZGVvXFxcIiwgXFxcImRlZmF1bHRQYXJzZVxcXCIsXFxcImRlZmF1bHRQYXJzZVdlYlxcXCIsXFxcIm1hb3NzXFxcIiwgXFxcIkxMUVxcXCIsXFxcInBhcnNlTGNcXFwiXTtcXG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xcbiAgICAgICAgICAgICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KG5ld1BhcnNlVGl0bGUpKTtcXG5cXG4gICAgICAgICAgICAgICAgaWYgKHB1bGxNb2RlID09PSAn5Luj56CBJykge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcmlnaW5hbFBhcnNlUyA9PSAnb2JqZWN0Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gc2NPYmplY3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9yaWdpbmFsUGFyc2VTW3NjT2JqZWN0W2ldXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb3JpZ2luYWxQYXJzZVMgPW9yaWdpbmFsUGFyc2VTLmZpbHRlcihpdD0+IXNjT2JqZWN0LmluY2x1ZGVzKE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKGl0KVswXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2Rlcywgb3JpZ2luYWxQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoUGFyc2VTKT09XFxcInVuZGVmaW5lZFxcXCIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIHBhcnNlQ29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIFxcXCJ0b2FzdDovL+ayoeacieS7o+egge+8jOS4jeWPr+aLieWPllxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL3ZhciBuZXdGaWxlID0gdG9vbHMudG9KU09OKGpzb24pOy8v6Ieq5a6a5LmJc3RyaW5naWZ55Ye95pWw77yM5bim5pyJ6L2s5LmJ5a2X56ymXFxuICAgICAgICAgICAgICAgIHZhciBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPlicgKyBwdWxsTW9kZSArICfmiJDlip8nO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrojrflj5bliLDlr7nosaEnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIFtrLCBfbXlTZXQucGFyc2VSb3V0ZV0pXFxuICAgIH0sXFxuICAgIHB1bGxTY3JpcHQ6IGZ1bmN0aW9uKGNqLCB4NSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgY2pGcm9tID0gJ2hpa2VyOi8vcGFnZS9QYXJzZV9Ebi5qcz9ydWxlPU15RmllbGThtLDigb8nO1xcbiAgICAgICAgICAgIHZhciB4NUZyb20gPSAnaGlrZXI6Ly9wYWdlL1BhcnNlX0RuLmh0bWw/cnVsZT1NeUZpZWxk4bSw4oG/JztcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pGaWxlID0gSlNPTi5wYXJzZShmZXRjaChjakZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB2YXIgeDVGaWxlID0gSlNPTi5wYXJzZShmZXRjaCh4NUZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoa1swXSwgY2pGaWxlKTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGtbMV0sIHg1RmlsZSk7XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdqeE9sZFYnKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJWYXIoJ2p4TmV3VicpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5bmiJDlip8nO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquaIkOWKn+iOt+WPluWGheWuuSc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgW2NqLCB4NV0pXFxuICAgIH0sXFxuICAgIHhsU2VsZWN0OiBmdW5jdGlvbihiaWFuamksIGxiTGVuZ3RoKSB7XFxuICAgICAgICByZXR1cm4gXFxcInNlbGVjdDovL1xcXCIgKyBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgb3B0aW9uczogWyfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6cmVkXFxcIiB0aXRsZT1cXFwi5Yig6ZmkfHwnICsgYmlhbmppICsgJ1xcXCI+5YigIOmZpCcsICfigJ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oJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICB2YXIgbmV3SW5wdXQgPSBwYXJzZURvbUZvckh0bWwoaW5wdXQsICdzcGFuJiZ0aXRsZScpLnNwbGl0KCd8fCcpO1xcbiAgICAgICAgICAgICAgICAvLyDkv67mlLks6L+q6L+qLDAgICDmk43kvZznsbvlnoss5ZCN56ewLOe0ouW8lVxcbiAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IG5ld0lucHV0WzBdO1xcbiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IG5ld0lucHV0WzFdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtID0gbmV3SW5wdXRbMl07XFxuICAgICAgICAgICAgICAgIHZhciBudW0yID0gbmV3SW5wdXRbM107XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAodHlwZSkge1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5Yig6ZmkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgayA9IFtuYW1lLCBudW1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOaAu+aEn+inieetm+mAieaIluiAheaQnOe0ouWQju+8jOeUseS6jm51beeahOS9jee9ruS4jeWvueWPr+iDveS8muWIoOmZpOmUmSzkuovlrp7lpoLmraQs5bey5L+uP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCLljbPlsIbliKDpmaQ6IFxcXCIgKyBuYW1lKS5jb25maXJtKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG51bSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGspO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi6ZqQ6JePXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbnVtID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfpmpDol49cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WPr+iDveaYr+S4que9keWdgCwg5oKo5Y+v6YCJ5oup5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtuYW1lLCBudW1dKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuS/ruaUuVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9pZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuQ29kZSA9IG5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlcyA9IGpzb24udGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5OYW1lID0gXFxcIui/meaYr+WQjeensFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbkNvZGUgPSBqc29uLmNvZGVzW25hbWVdLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5OYW1lID0gbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5I1xcXCIpLnJ1bGUoKGssdGl0bGVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZ2V0SXRlbSgnbXlGdW5jdGlvbicpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+S/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBzYXZlQnV0dG9uICsgXFxcInNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7YmFjaygpO1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLlu7rorq7mjInpu5jorqTnmoTku6PnoIHmoLzlvI/kv67mlLnlk6ZcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignaW5wdXRfZWRpdCcsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFxcXCItMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6ICfkv67mlLnimIUnICsgbmFtZSArICfimIUnICsgY29kZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzZFQjg5N1xcXCI+5qC85byP5Li677ya5pON5L2c57G75Z6L4piF5qCH6aKY4piFZnVuY3Rpb24oKXvoh6rlrprkuYnlhoXlrrl9PGJyPuivt+WLv+Whq+WFpeWFtuS7luagvOW8jycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNhdmVCdXR0b24sbmFtZSx0aXRsZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG1wQXIgPSBnZXRWYXIoJ2lucHV0X2VkaXQnKS5zcGxpdCgn4piFJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodG1wQXIubGVuZ3RoPDIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+u5pS55qC85byP5pyJ6K+v77yM6K6/6Zeu6KKr5ouS57udJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3TmFtZSA9IHRtcEFyWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5ld05hbWUhPT1uYW1lJiZ0aXRsZXMuaW5jbHVkZXMobmV3TmFtZSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn5qOA5rWL5Yiw5ZCM5ZCN5o6l5Y+jOicrbmV3TmFtZSsnLOaYr+WQpuimhueblj8nKS5jb25maXJtKChzYXZlQnV0dG9uLG5hbWUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5XFxcXG7or7foh6rooYzmo4DmtYvopobnm5blkI7nmoTlhoXlrrknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LHNhdmVCdXR0b24sbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2VkaXQnKSxuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYodHlwZW9mKGNvZGUpPT09J3N0cmluZycmJmNvZGUubGVuZ3RoPjIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gY29kZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBzYXZlQnV0dG9uLG5hbWUsdGl0bGVzKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfigJjigJjigJnigJk8YmlnPjxiaWc+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPuS/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtuTmFtZSwgbkNvZGVdLHRpdGxlcykgLy9bbmFtZSwganNvbi5jb2Rlc1tuYW1lXS50b1N0cmluZygpXSlcXG4gICAgICAgICAgICAgICAgICAgIC8qfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Y+q5pyJ572R5Z2A5oiW6ICF5qCH6aKYLCDkuI3mlK/mjIHkv67mlLlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIue9rumhtlxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLnva7lupVcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IGpzb24udGl0bGUuaW5kZXhPZihuYW1lKTsgLy/ov5nmoLfmiY3kvJrlvpfliLDmraPnoa7nmoTntKLlvJVcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihudW0+LTEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXRlbSA9IGpzb24udGl0bGUuc3BsaWNlKG51bSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKG51bTIsIDAsIGl0ZW1bMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/msqHmib7liLA6JytuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuenu+WKqFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHkjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignYmlhbmppJywgJ+enu+WKqCMnICsgayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bSk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLliIbkuqtcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5LqR5YiG5LqrXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VUZXh0ID0gdHlwZW9mIGpzb24uY29kZXNbbmFtZV0gPT0gJ2Z1bmN0aW9uJyA/ICQuc3RyaW5naWZ5KGpzb24uY29kZXNbbmFtZV0pIDoganNvbi5jb2Rlc1tuYW1lXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUZXh0ID0gJ015UGFyc2VT4piFJyArIG5hbWUgKyAn4piFJyArIGJhc2U2NEVuY29kZShwYXJzZVRleHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVRleHQgPSAn55u06ZO+4piFJyArIGpzb24udGl0bGVbbnVtXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gJ+S6keWIhuS6qycgJiYgcGFyc2VUZXh0LnN1YnN0cigwLCA4KSA9PSAnTXlQYXJzZVMnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGV4dCA9IHNoYXJlUGFzdGUocGFyc2VUZXh0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlVGV4dC5zdWJzdHIoMCwgNikgIT0gJ2Vycm9yOicgPyAnY29weTovLycgKyBwYXJzZVRleHQgKyAnXFxcXG7imIXimIXimIVcXFxcbicgKyAnTXlQYXJzZVPvvJonICsgbmFtZSA6ICd0b2FzdDovL+WIhuS6q+Wksei0pSEh5LqR5Ymq6LS05p2/5Y+v6IO95oyC5LqGJztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2NvcHk6Ly8nICsgcGFyc2VUZXh0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aaguS4jeaUr+aMgSc7XFxuICAgICAgICAgICAgICAgIH0gLy9zd2l0Y2jnmoRcXG4gICAgICAgICAgICB9KSAvL1N0cmluZ+eahFxcbiAgICAgICAgfSkgLy9zdHJpbmdpZnnnmoRcXG4gICAgfSxcXG4gICAgeGpQYXJzZTogZnVuY3Rpb24oKSB7XFxuICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjXFxcIikucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICBldmFsKGdldEl0ZW0oJ215RnVuY3Rpb24nKSk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfkv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgdXJsOiBzYXZlQnV0dG9uICsgXFxcInNhdmVCdXR0b24oaW5wdXQpO2JhY2soKTtjbGVhclZhcignaW5wdXRfYWRkJylcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIui+k+WFpeato+ehruagvOW8j+WGheWuuVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcXFwiaW5wdXRfYWRkXFxcIiwgaW5wdXQpJyxcXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFxcXCItMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ2lucHV0X2FkZCcpLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiM2RUI4OTdcXFwiPuaMieaPj+i/sOivieagvOW8j+i+k+WFpSwg6K+35Yu/5aGr5YWl5YW25LuW5qC85byPPGJyPuacrOWcsOWPo+S7pDog5pON5L2c57G75Z6L4piF5ZCN56ew4piF5Luj56CBPGJyPuS6keWPo+S7pDog6ZO+5o6l4piF4piF4piF5ZCN56ewOyDnuq/nvZHlnYA6IOebtOmTvuKYhXVybDHimIV1cmwyJyxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ+KAmOKAmOKAmeKAmTxiaWc+PGJpZz48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnbm9Mb2FkaW5nJykubGF6eVJ1bGUoKHNhdmVCdXR0b24pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfYWRkJykpO1xcbiAgICAgICAgICAgICAgICB9LCBzYXZlQnV0dG9uKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIHlkUGFyc2U6IGZ1bmN0aW9uKEJKbW9kZSwgaSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgQSA9IGtbMF0uc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICB2YXIgQiA9IGtbMV07XFxuICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICB2YXIgaXRlbSA9IGpzb24udGl0bGUuc3BsaWNlKEEsIDEpOyAvLyAxOiDmoIforrDlvIDlp4vkvY3nva7vvIwyOiDliKDpmaTliLDlk6rkuKrkvY3nva5cXG4gICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShCLCAwLCBpdGVtWzBdKTsgLy8gMTog5ZCM5LiK77yMMjogMOihqOekuuS4jeWIoOmZpO+8jDM6IOa3u+WKoOWvueixoVxcbiAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgY2xlYXJWYXIoJ2JpYW5qaScpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICA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AgICByZXR1cm4gXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdcXFwiICsgY29sb3IgKyBcXFwiJz5cXFwiICsgdGV4dCArIFxcXCI8L2ZvbnQ+XFxcIjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdreldESyc6IGZ1bmN0aW9uKF8weDQ4NTRhOSwgXzB4M2U5OGM1KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODU0YTkgKyBfMHgzZTk4YzU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnWFh5UXInOiAn56e75YqoIycsXFxuICAgICAgICAgICAgJ2d0VW5qJzogZnVuY3Rpb24oXzB4NTlhYWY3LCBfMHgyMmM2NmIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDU5YWFmNyArIF8weDIyYzY2YjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdVdGZXZic6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojRkU5QTJFXFxcXFxcXCI+JyxcXG4gICAgICAgICAgICAnUU92SlYnOiAn56e75YqoOiAnLFxcbiAgICAgICAgICAgICdBQkV3Qic6ICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiMyOThBMDhcXFxcXFxcIj4nLFxcbiAgICAgICAgICAgICdvenpXRyc6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICduV2ZWUic6IGZ1bmN0aW9uKF8weDQ4MGYzYSwgXzB4NGM4NGZjKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODBmM2EgKyBfMHg0Yzg0ZmM7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnSkNjTlknOiAncGFyc2VSb3V0ZScsXFxuICAgICAgICAgICAgJ3JnRElwJzogJ2JpYW5qaScsXFxuICAgICAgICAgICAgJ2hvSWRKJzogJ+KAmOKAmOKAmeKAmTxiaW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A0MjdbJ0pDY05ZJ10pO1xcbiAgICAgICAgdmFyIF8weDNiODlhYiA9IHBhcnNlRmlsZVsndGl0bGUnXTtcXG4gICAgICAgIHZhciBfMHg0OWRhOTYgPSBnZXRWYXIoXzB4NGMwNDI3WydyZ0RJcCddKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IF8weDRjMDQyN1snaG9JZEonXSxcXG4gICAgICAgICAgICBkZXNjOifms6jmhI865L2N572u5pON5L2c5Yqf6IO95Y+q5Zyo5YiG57G7562b6YCJ5Li65YWo6YOo5pe255Sf5pWIXFxcXG7kuIvmlrnmkJzntKLmjInlkI3np7DmiJblnLDlnYAs6YeN572u6K+355WZ56m65oiW54K56Kej5p6Q5pWw6YeP5oyJ6ZKuJyxcXG4gICAgICAgICAgICB1cmw6IGJqSXRlbVsneGpQYXJzZSddKCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTpmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5pCc57SiJyxcXG4gICAgICAgICAgICBkZXNjOidtZW5neCcsXFxuICAgICAgICAgICAgY29sX3R5cGU6J2lucHV0JyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignZHAuc2VhcmNoSngnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgdGV4dFNpemU6IDExLFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6Z2V0VmFyKCdkcC5zZWFyY2hKeCcsJycpLFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgZmlsdGVycyA9IFsn5YWo6YOoJywn6ZO+5o6lJywnanNvbicsJ+WFjeWXhSddO1xcbiAgICAgICAgZm9yKGxldCBvIGluIGZpbHRlcnMpe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmdldFZhcignZG4uanhfZmlsdGVyJywn5YWo6YOoJyk9PT1maWx0ZXJzW29dPyfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+JytmaWx0ZXJzW29dOmZpbHRlcnNbb10sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeF9maWx0ZXInLGl0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGZpbHRlcnNbb10pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIF8weDJlY2JlNSA9IF8weDNiODlhYlsnbGVuZ3RoJ107XFxuICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgbGV0IHNldEZpbGUgPSByZXF1ZXN0KCdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicpO1xcbiAgICAgICAgdH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VhcmNoSngnLCcnKSl7XFxuICAgICAgICAgICAgXzB4M2I4OWFiID0gXzB4M2I4OWFiLmZpbHRlcihpdD0+KGpzb24uY29kZXNbXzB4NGMwNDI3WyduV2ZWUiddKGl0LCAnJyldKycnKS5pbmNsdWRlcyhnZXRWYXIoJ2RwLnNlYXJjaEp4JykpfHxpdC5pbmNsdWRlcyhnZXRWYXIoJ2RwLnNlYXJjaEp4JywnJykpKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6XFxcIuino+aekOaVsDpcXFwiK18weDRjMDQyNy5jb2xvcihfMHgzYjg5YWIubGVuZ3RoLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6XFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdkcC5zZWFyY2hKeCcpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3sumHjee9ridcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDkuIvpnaLmmK/op6PmnpDliJfooajmjpLliJdcXG4gICAgICAgIC8vIGZvciAodmFyIF8weGUyYzNkOCA9IDB4MDsgXzB4NGMwNDI3WydGckdPSCddKF8weGUyYzNkOCwgXzB4MmVjYmU1KTsgXzB4ZTJjM2Q4KyspIHtcXG4gICAgICAgIGZvciAobGV0IF8weGUyYzNkOCBpbiBfMHgzYjg5YWIpIHtcXG4gICAgICAgICAgICB2YXIgXzB4MzM3ODhjID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgdmFyIF8weDM3ODcxZSA9IF8weDRjMDQyN1snbldmVlInXShfMHgzMzc4OGMsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICBpZiAoL+enu+WKqC8gWyd0ZXN0J10oXzB4NDlkYTk2KSkge1xcbiAgICAgICAgICAgICAgICBpZiAoXzB4NGMwNDI3WydvQ0NTaiddKCd1S0x4RicsICd1S0x4RicpKSB7XFxuICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snSFpobGMnXShfMHg0YzA0MjdbJ1hYeVFyJ10gKyBfMHhlMmMzZDgsIF8weDQ5ZGE5NikgPyBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydjZ0llQSddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4Mzc4NzFlKSA6IF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDM3ODcxZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAndGV4dF8yJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmJjNjE4ID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4NWNmNDE3ID0gXzB4NGMwNDI3WydVVldvRiddKF8weDJiYzYxOCwgJycpWydyZXBsYWNlJ10oL2h0dHAuKlxcXFwvXFxcXC8vZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ2t6V0RLJ10oXzB4NGMwNDI3WydYWHlRciddLCBfMHhlMmMzZDgpID09IF8weDQ5ZGE5NiA/IF8weDRjMDQyN1snZ3RVbmonXShfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydVdGZXZiddLCBfMHg0YzA0MjdbJ1FPdkpWJ10pLCBfMHg1Y2Y0MTcpIDogXzB4NGMwNDI3WydBQkV3QiddICsgXzB4NWNmNDE3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd5ZFBhcnNlJ10oXzB4NDlkYTk2LCBfMHhlMmMzZDgpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDExOTM2NSA9IFtfMHgyYmM2MTgsIF8weDRjMDQyN1snZ3RVbmonXShfMHhlMmMzZDgsICd8fCcpXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snbldmVlInXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDVjZjQxNyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHgxMTkzNjUsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weGI3MDE5MiA9IFtfMHgzMzc4OGMsIF8weGUyYzNkOCArICd8fCddWydqb2luJ10oJ3x8Jyk7XFxuICAgICAgICAgICAgICAgIC8vIOi/qui/quW9semZonx8MHx8ICDlkI3np7B8fOe0ouW8lSDnmoTmlbDnu4RcXG4gICAgICAgICAgICAgICAgLy8gQUJFd0Ig5piv57u/6ImyIF8weDM3ODcxZSDmmK/moIfpopjlkI3np7AgIHhkckZ25piv5a2X56ym5Liy6L+e5o6l5Ye95pWwXFxuICAgICAgICAgICAgICAgIC8vIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgIGxldCBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfik4onLCcjMDA1MWZmJyk7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAvLyBmbGFnID0gJ+KAnOKAnOKSv+KAneKAnSc7XFxuICAgICAgICAgICAgICAgICAgICBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfikr8nLCcjZmY3MDAwJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIGxldCBjbHMgPSAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPic7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IF8weDRjMDQyN1sneGRyRnYnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIGZsYWcrXzB4Mzc4NzFlKTtcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHRpdGxlID0gZmxhZytjbHMrXzB4Mzc4NzFlO1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBmbGFnK18weDRjMDQyNy5jb2xvcihfMHgzNzg3MWUsJyMyOThBMDgnKTtcXG4gICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gJ3RpdGxlJzogXzB4Mzc4NzFlLFxcbiAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddLFxcbiAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHhiNzAxOTIsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBfMHg0YzA0MjdbJ3l3anV4J10oY2xlYXJWYXIsIF8weDRjMDQyN1sncmdESXAnXSk7XFxuICAgIH0sXFxuICAgICdscUZpbGUnOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciBfMHg1NDFkNzYgPSB7XFxuICAgICAgICAgICAgJ2FXaVJzJzogZnVuY3Rpb24oXzB4NDhkNzdiLCBfMHgxOTE2MWYsIF8weDIxY2I4NSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDhkNzdiKF8weDE5MTYxZiwgXzB4MjFjYjg1KTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd3U2Zueic6IGZ1bmN0aW9uKF8weDQ4NTBlYSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDg1MGVhKCk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAncVJRZEEnOiAnamRSb3V0ZScsXFxuICAgICAgICAgICAgJ1dRaXFrJzogJ3Zhci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AgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsU2NyaXB0J10oX215U2V0WydjamNhY2hlJ10sIF9teVNldFsneDVjYWNoZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydyR0x1QSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzB4NTQxZDc2WydodmlEbCddKGV2YWwsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsIF8weDU0MWQ3NlsncVJRZEEnXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcyJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgyYWIzOTkgPSAnaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjQHJ1bGU9anM6dGhpcy5kPVtdOyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2p4SXRlbT9ydWxlPU15RmllbGThtLDigb9cXFwiKS5qeExpc3QoKTtzZXRSZXN1bHQoZCk7JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ1p4VWd0J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogdHlwZW9mIGN6R3VpZGUgPT0gJ2Z1bmN0aW9uJyA/IGN6R3VpZGUoKSA6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc1JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeGRSb3V0ZSA9IF8weDU0MWQ3Nlsnc1dGb2MnXSh4ZFJvdXRlLCBfbXlTZXRbJ3BhcnNlUm91dGUnXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzYnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4M2E5YWZlID0gW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6ICfmi4nlj5bliJfooagnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5YiX6KGoJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydPRWhhdCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5Luj56CBJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydadnRTdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDU0MWQ3NlsnaHZpRGwnXShmaWxlRXhpc3QsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsICdwYXJzZVJvdXRlJykpID09ICEhW10gPyBfMHgyYWIzOTkgOiBfMHg1NDFkNzZbJ2dYS01iJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzcnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBfMHgxYTJjZGIgPSAweDA7IF8weDU0MWQ3NlsnV0NPREMnXShfMHgxYTJjZGIsIF8weDNhOWFmZVsnbGVuZ3RoJ10pOyBfMHgxYTJjZGIrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHgzYTlhZmVbXzB4MWEyY2RiXVsndGl0bGUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3VybCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnckFrQWgnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3lXYU9JJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydoZlBsdWdpbiddKF9teVNldFsncGFyc2VSb3V0ZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydzV0ZvYyddKF8weDU0MWQ3NlsneWp5aksnXSArIG15U2V0WydjaiddLCAnXFxcXG7lrZjmlL7ot6/lvoQ6IC9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3RIWGVFJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogJ3RvYXN0Oi8v6K+35Zyo5LiL5pa56YCJ6aG55pON5L2cJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydHTVVZdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ21wWkJaJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzExJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2Wyd4dnFnRiddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleHRyYSc6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGVWaXNpYmxlJzogIVtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWZhdWx0VmFsdWUnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGx1Z2luTGluaycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF8weDU0MWQ3NlsnaGV1S3gnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gIC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XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0sIHRpdGxlLCBpbmRleCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgXFxcIjJcXFwiOlxcbiAgICAgICAgZnVuYyA9IGZ1bmN0aW9uKHVybCwgdGl0bGUsIGluZGV4KSB7XFxuICAgICAgICAgICAgcmV0dXJuICQoXFxcIuehruiupOWIoOmZpOOAjFxcXCIgKyB0aXRsZSArIFxcXCLjgI3vvJ9cXFwiKS5jb25maXJtKCh0aXRsZSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVXJsVGV4dCA9IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIik7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZVVybEFycmF5ID0gcGFyc2VVcmxUZXh0LnNwbGl0KC9cXFxcbi8pO1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQxID0gcGFyc2VVcmxBcnJheVtpbmRleF07XFxuICAgICAgICAgICAgICAgIHBhcnNlVXJsQXJyYXkuc3BsaWNlKGluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxUZXh0ID0gcGFyc2VVcmxBcnJheS5qb2luKFxcXCJcXFxcblxcXCIpO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIiwgcGFyc2VVcmxUZXh0KTtcXG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkMSA9PSBnZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcnNlVXJsQXJyYXlbMF0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZ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VcIjpcIuS4u+mimOeuoeeQhlwiLFwicGF0aFwiOlwidGhlbWVcIixcInJ1bGVcIjpcImpzOlxcbiAgICBmdW5jdGlvbiB0aGVtZUluaXQoKXtcXG4gICAgICAgIGNvbnN0IHtjb2xvcixzbWFsbH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlsaXk/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+S5Li76aKYOicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSksXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6bXlUaGVtZXMudGhlbWVzPyfkuLvpopjliJfooag65YWx6K6hOicrY29sb3IobXlUaGVtZXMudGhlbWVzLmxlbmd0aCwnI2ZmNzAwMCcpKyfkuKrkuLvpopgnOlxcXCLnrKzkuIDmrKHliqDovb3vvIzngrnmraTov5vljrvliJ3lp4vljJbkuLvpopjliJfooahcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICAgICAgICAgIHVybDonaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeiuvue9riNub0hpc3RvcnkjJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOlxcXCLmgaLlpI3lh7rljoLorr7nva5cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eX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lcy5ub3dfdGhlbWU9PT1ub3dUaGVtLm5hbWU/J/CfkYknK25vd1RoZW0ubmFtZTpub3dUaGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcigndGhlbWUuZG5fb3B0aW9uJywn5paw5aKeJyk7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wdGlvbil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5a+85Ye6JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG15dGhlbWVDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG15dGhlbWUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobXl0aGVtZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9ICfmlq3mj5LkuLvpophAJytteXRoZW1lLm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChKU09OLnN0cmluZ2lmeShteXRoZW1lKSkuaW5wdXQoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lc1tpXT1KU09OLnBhcnNlKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv67mlLknXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruiupOWIoOmZpOS4u+mimDonK215dGhlbWUubmFtZSsnPycpLmNvbmZpcm0oKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMubm93X3RoZW1lPW15dGhlbWUubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDpgInmi6nkuoYnK215dGhlbWUubmFtZSsn5L2c5Li66buY6K6k5Li76aKYJztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSxub3dUaGVtLG15VGhlbWVzLGksdGhlbWVSb3V0ZSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH1cXG4kLmV4cG9ydHMudGhlbWVJbml0PXRoZW1lSW5pdDtcIn0se1wibmFtZVwiOlwi5pON5L2c5oyH5byVXCIsXCJwYXRoXCI6XCJHdWlkZVwiLFwicnVsZVwiOlwiPGh0bWw+XFxuPGhlYW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GT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgbGV0IG9wdGlvbnMgPSBbJ+mAieaLqScsJ+S/ruaUuScsJ+WIoOmZpCcsJ+WvvOWHuiddO1xcblxcbiAgICAgICAgZm9yKGxldCBpIGluIG9wdGlvbnMpe1xcbiAgICAgICAgICAgIGxldCBvcHRpb24gPSBvcHRpb25zW2ldO1xcbiAgICAgICAgICAgIGxldCBmbGFnID0gZ2V0VmFyKCdkbi5qeG1fb3B0aW9uJywn6YCJ5oupJyk9PT1vcHRpb24/J/CfkYknOicnO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmZsYWcrb3B0aW9uLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvcHRpb24pPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLmp4bV9vcHRpb24nLCBvcHRpb24pO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICB9LG9wdGlvbiksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQganhzUm91dGUgPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeUppZXhpLmpzb25cXFwiO1xcbiAgICAgICAgbGV0IE15SmlleGkgPSB7amlleGlzOltdfTtcXG4gICAgICAgIGxldCBqaWV4aXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgTXlKaWV4aSA9IEpTT04ucGFyc2UoZmV0Y2goanhzUm91dGUpKTtcXG4gICAgICAgICAgICBqaWV4aXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1NeUppZXhpLm5vdylbMF07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+36L6T5YWl5a+85YWl5Y+j5LukJykuaW5wdXQoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKC9e6a2U5pat6Kej5p6Q6YWN572uQC4qP0BodHRwLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0LnNwbGl0KCdAJylbMV07XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoJ0AnKVsyXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrpropoHlr7zlhaXmlq3mj5Lop6PmnpDphY3nva4tJytuYW1lKycg5ZCXPycpLmNvbmZpcm0oKG5hbWUsdXJsLE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwYXJzZVBhc3RlKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhhc0l0ID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09bmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzSXQmJmhhc0l0Lmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzW2pdLm5hbWUgPT09IG5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleimhuebluWvvOWFpTpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+imhuebluWvvOWFpeS4u+mimGlkOicraWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpeino+aekOmFjee9rjpcXFxcbicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5peg5rOV6K+G5Yir55qE5a+85YWl5Y+j5LukOlxcXFxuJytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSksXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBpc0F1dG8gPSBNeUppZXhpLmlzQXV0bztcXG4gICAgICAgIGxldCBhdXRvTW9kZSA9IE15SmlleGkuYXV0b01vZGU7XFxuICAgICAgICBsZXQgdGlwcyA9ICfop6PmnpDphY3nva7liJfooag65YWx6K6hOicrY29sb3IoTXlKaWV4aS5qaWV4aXMubGVuZ3RoLCcjZmY3MDAwJykrJ+S4qumFjee9rizoh6rliqjmoaPlvIDlhbM6Jytjb2xvcihpc0F1dG8/J+W8gCc6J+WFsycsJyNmZjcwMDAnKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5qaWV4aXMmJk15SmlleGkuamlleGlzLmxlbmd0aD4wP3RpcHM6XFxcIuesrOS4gOasoeWKoOi9ve+8jOeCueatpOi/m+WOu+WIneWni+WMluino+aekOWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmlzQXV0byA9ICFNeUppZXhpLmlzQXV0bztcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXBzID0gTXlKaWV4aS5pc0F1dG8/J+W8gCc6J+WFsyc7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u6Ieq5Yqo5qGj5qih5byP5Li6OicrdGlwc1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpbml0U2V0ID0geydub3cnOlxcXCLpgZPplb/mjqjojZBcXFwiLCdqaWV4aXMnOlt7bmFtZTon6YGT6ZW/5o6o6I2QJyxxeTpbJ+S9oOeIueenkeaKgCddLHlrOlsn6aKG6YW3J10sdHg6WyfojaPogIAnXSxtZzpbJ+iaguiageWFhOW8nyddLGJsOlsnT0vop6PmnpAnXSxzaDpbJ+axn+a5lkQnXSx4ZzpbJ+axn+a5lkQnXSxhbDpbJ+axn+a5lkQnXSxwcDpbJ+S6uuS6uui/tyddLG1pOlsnMTA4MCddLGxlOlsn6L+q5aWl5ZeF5o6iJ10sZnVuOlsn6J6N5YW0J10sb25lOlsnMTA4MCddfV19O1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KGluaXRTZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuino+aekOmFjee9ruW3suWIneWni+WMlidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IGF1dG9Nb2RlVGlwcyA9IGF1dG9Nb2RlPT09J+mAn+W6puS8mOWFiCc/J+mAn+W6puS8mOWFiCc6J+mhuuW6j+S8mOWFiCc7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOnNtYWxsKFxcXCLlpIfog47lrqDlubjmlrnmoYg6XFxcIikrY29sb3IoYXV0b01vZGVUaXBzLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMicsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIE15SmlleGkuYXV0b01vZGUgPSBNeUppZXhpLmF1dG9Nb2RlPT09J+mAn+W6puS8mOWFiCc/J+mhuuW6j+S8mOWFiCc6J+mAn+W6puS8mOWFiCc7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u5aSH6IOO5a6g5bm45pa55qGI5Li6OicrTXlKaWV4aS5hdXRvTW9kZVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpjb2xvcihcXFwi5oGi5aSN5Ye65Y6C6K6+572uXFxcIiwnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzInLFxcbiAgICAgICAgICAgIHVybDokKFxcXCLlpoLmnpzkvaDnmoTop6PmnpDnrqHnkIbml6Dms5XmraPluLjnlKjkuobvvIzmraTmlrnms5Xlj6/ku6XmlZHnoJbvvIznoa7orqTmgaLlpI0/XFxcIikuY29uZmlybSgoanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGxldCBpbml0U2V0ID0geydub3cnOlxcX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KT0+e1xcbiAgICAgICAgICAgICAgICBpZihjYWNoZVZpZGVvU3dpdGNoPT09J+W8gCcpe1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5jYWNoZVZpZGVvJywnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmNhY2hlVmlkZW8nLCd0cnVlJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGNhY2hlVmlkZW9Td2l0Y2gpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+WFqOWxgOino+aekOi2heaXtjonKStjb2xvcihqeFRpbWVvdXQsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChqeFRpbWVvdXQsJ+ivt+iuvue9rumtlOaWreino+aekOi2heaXtizlv4XpobvkuLrmlbTmlbAnKS5pbnB1dCgoKT0+e1xcbiAgICAgICAgICAgICAgICBpZighcGFyc2VJbnQoaW5wdXQpKXtcXG4gICAgICAgICAgICAgICAgICAgIGlucHV0ID0gNzAwMDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmp4VGltZW91dCcsaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruS4ujonK3BhcnNlSW50KGlucHV0KVxcbiAgICAgICAgICAgIH0sanhUaW1lb3V0KVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5omT5byA57yW6L6R6Kej5p6Q5paH5Lu2JyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGp4c1JvdXRlKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nK2p4c1JvdXRlO1xcbiAgICAgICAgICAgIH0sanhzUm91dGUpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZm9yKGxldCBpIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICBsZXQgbm93SnggPSBNeUppZXhpLmppZXhpc1tpXTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpNeUppZXhpLm5vdz09PW5vd0p4Lm5hbWU/J/CfkYknK25vd0p4Lm5hbWU6bm93SngubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgbm93Sng6bm93SngsXFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpOk15SmlleGksXFxuICAgICAgICAgICAgICAgICAgICBqeHNSb3V0ZTpqeHNSb3V0ZVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcignZG4uanhtX29wdGlvbicsJ+mAieaLqScpO1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WvvOWHuic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dKeENvZGUgPSBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobm93SnhDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAn6a2U5pat6Kej5p6Q6YWN572uQCcrbm93SngubmFtZSsnQCcrdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5KGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5a+85Ye65Li65LqR5Y+j5Luk5bm25aSN5Yi25Yiw5Ymq5YiH5p2/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+S/ruaUuSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k6Kej5p6Q6YWN572u5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBlbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9qeEVkaXQ/cnVsZT1NeUZpZWxk4bSw4oG/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTop6PmnpDphY3nva46Jytub3dKeC5uYW1lKyc/JykuY29uZmlybSgobm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobm93SngubmFtZT09PU15SmlleGkubm93KXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k6Kej5p6Q6YWN572u5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzLnNwbGljZShpLDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIoOmZpCdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxub3dKeCxNeUppZXhpLGksanhzUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5ub3c9bm93SngubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDpgInmi6nk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BsZXQgc2V0RmlsZSA9IHJlcXVlc3QoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJyk7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgZXZhbCgnanNvbj0nK3NldEZpbGUpO1xcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coJ0pzb27op6PmnpDlj5HnlJ/kuobplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKT09PSfmlrDlop4nKXtcXG4gICAgICAgICAgICAgICAgbGV0IHNlbF90aXRsZSA9IHRpdGxlcy5maWx0ZXIoaXQ9PiFqeHMuaW5jbHVkZXMoaXQpKTtcXG4gICAgICAgICAgICAgICAgc2VsX3RpdGxlID0gc2VsX3RpdGxlLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZyA9ICfigJjigJjik4rigJnigJknO1xcbiAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAn4oCc4oCc4pK/4oCd4oCdJztcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW2l0XSk9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZsYWcraXRcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKHNlbF90aXRsZSwyKS5zZWxlY3QoKE15SmlleGksanhzLG5vd0p4LHRpdGxlLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC/igJjigJjik4rigJnigJl84oCc4oCc4pK/4oCd4oCdL2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5qaWV4aXNbal0ubmFtZSA9PT0gbm93SngubmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v57Si5byV6ZSZ6K+v5peg5rOV5L+d5a2YOlxcXFxuJytpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAganhzLnB1c2goaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKGp4cyk7XFxuICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpO1xcbiAgICAgICAgICAgIH1lbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sdGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4KVxcbiAgICB9KTtcXG4gICAgZm9yKGxldCBrIGluIGp4cyl7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOmp4c1trXSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxuangsaWQsayxtYXgpPT57XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAoZ2V0VmFyKCdkbi5qeG1fd3JpdGVNb2RlJywn5paw5aKeJykpe1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICBBcnJheS5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24odmFsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IHRoaXMuaW5kZXhPZih2YWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqeHMucmVtb3ZlKG5qeCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfnp7vliqgnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKGssJ+enu+WKqOWIsOe0ouW8leWkmuWwkT8nKS5pbnB1dCgoayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1vdmUoYXJyLCBmcm9tSW5kZXgsIHRvSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbGVtZW50ID0gYXJyW2Zyb21JbmRleF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKGZyb21JbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKHRvSW5kZXgsIDAsIGVsZW1lbnQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcnNlSW50KGlucHV0KT09PWspe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WVpeS5n+ayoeWBmidcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocGFyc2VJbnQoaW5wdXQpPm1heC0xfHxwYXJzZUludChpbnB1dCk8LTEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOacgOWkp+enu+WKqOiMg+WbtDAtJytwYXJzZUludChtYXgtMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGV0IG5ld0FyID0ganhzLnNwbGljZShrLCAxKTsgLy8g5Yig5o6JXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGp4cy51bnNoaWZ0KG5ld0FyWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTW92ZShqeHMsayxwYXJzZUludChpbnB1dCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTlhYPntKDkuI3mlK/mjIHov5vooYw6JytnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngsanhzW2tdLGlkLGssanhzLmxlbmd0aClcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIGQucHVzaCh7XFxuICAgICAgICBjb2xfdHlwZTonbGluZSdcXG4gICAgfSlcXG59XFxuXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6J+S/neWtmCcsXFxuICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksaWQsanhzUm91dGUpPT57XFxuICAgICAgICBpZihnZXRWYXIoJ2RuLmp4bV9uYW1lJywnJykhPT1NeUppZXhpLmppZXhpc1tpZF0ubmFtZSl7XFxuICAgICAgICAgICAgaWZIYXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1nZXRWYXIoJ2RuLmp4bV9uYW1lJywnJykpLmxlbmd0aD4wO1xcbiAgICAgICAgICAgIGlmKGlmSGFzKXtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W+heS/ruaUueeahOWQjeensOmHjeWkjSzkuI3lhYHorrjkv53lrZgnXFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXS5uYW1lID0gIGdldFZhcignZG4uanhtX25hbWUnLCcnKTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBiYWNrKHRydWUpO1xcbiAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmCdcXG4gICAgfSxNeUppZXh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XFxuICAgICAgICAgICAgLy8gbG9nKCduZXdDb2RlOicrbmV3Q29kZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+Wksei0pSHkuI7pgZPplb/mnI3liqHlmajpgJrorq/plJnor68s5Lyw6K6h5piv572R57uc5Y2h5LqGJ1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGp4Q29kZSA9IGZldGNoKGp4T25saW5lKTtcXG4gICAgICAgIGlmKCEvamlleGlzLy50ZXN0KGp4Q29kZSkpe1xcbiAgICAgICAgICAgIC8vIGxvZygnanhDb2RlOicranhDb2RlKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5aSx6LSlIeS4jumBk+mVv+acjeWKoeWZqOmAmuiur+mUmeivryzkvLDorqHmmK/nvZHnu5zljaHkuoYnXFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShjamNhY2hlLCBjakZpbGUpOyAvLyDmi4nmj5Lku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUoeDVjYWNoZSwgeDVGaWxlKTsgLy/mi4nnvZHpobXmlofku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSwgdGhlbWVDb2RlKTsgLy/mi4nkuLvpopjmlofku7ZcXG4gICAgICAgICAgICBjbGVhclZhcihcXFwianhPbGRWXFxcIik7XFxuICAgICAgICAgICAgY2xlYXJWYXIoXFxcImp4TmV3VlxcXCIpO1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShvbGRSb3V0ZSwgb2xkQ29kZSk7IC8v5ouJ5pat5o+S6buY6K6k6YCJ5oup55WM6Z2i55qE6YWN572uXFxuICAgICAgICAgICAgd3JpdGVGaWxlKG5ld1JvdXRlLCBuZXdDb2RlKTsgLy/mi4nmlq3mj5LlhoXnmoTop6PmnpBcXG4gICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsIGp4Q29kZSk7IC8vIOaLieiHquWKqOaho+aWh+S7tlxcbiAgICAgICAgICAgIGJhY2sodHJ1ZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuino+aekOmFjee9ruWPium7mOiupOWIl+ihqOW3sue7j+mFjee9ruaIkOWKnydcXG4gICAgICAgIH1cXG4gICAgICAgIGNhdGNoKGUpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kuIDplK7mqKHlvI/lupTnlKjlpLHotKVcXFxcbuacquacn+acm+eahOmUmeivrzonK2UubWVzc2FnZTtcXG4gICAgICAgIH1cXG4gICAgfSxjamNhY2hlLHg1Y2FjaGUsdGhlbWVSb3V0ZSxvbGRSb3V0ZSxuZXdSb3V0ZSxqeHNSb3V0ZSx0aGVtZU9ubGluZSxvbGRPbmxpbmUsbmV3T25saW5lLGp4T25saW5lKVxcbn0pO1xcbmxldCBkZXNjSW5mbyA9ICfkuLvpopjmlofku7Y6Jyt0aGVtZVJvdXRlKydcXFxcbuS4u+eVjOmdoumFjee9rjonK29sZFJvdXRlKydcXFxcbuWrluWIsOeahOino+aekDonK25ld1JvdXRlKydcXFxcbuiHquWKqOaho+ino+aekDonK2p4c1JvdXRlO1xcbmRlc2NJbmZvKz0nXFxcXG7kuLvmj5Lku7Y6JytjamNhY2hlKydcXFxcbuS4u+mFjee9rumAieaLqeeVjOmdouaWh+S7tjonK3g1Y2FjaGU7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6J+aWh+S7tuaPj+i/sDpcXFxcbicrZGVzY0luZm8sXFxuICAgIGNvbF90eXBlOidsb25nX3RleHQnLFxcbiAgICBleHRyYTp7dGV4dFNpemU6IDEzLGxpbmVWaXNpYmxlOmZhbHNlfVxcbn0pO1xcbnNldFJlc3VsdChkKTtcIn1dIiwiaWNvbiI6Imh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9tb3ZpZS80LnN2ZyJ9
Add Comment
Please, Sign In to add comment