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XQgYmF0YSA9IEpTT04ucGFyc2UocmVzcG9uc2UpOwogICAgICAgICAgICBpZiAoYmF0YS51cmwuaW5jbHVkZXMoIm1ndHYiKSkgewogICAgICAgICAgICAgICAgaW5wdXQgPSB7CiAgICAgICAgICAgICAgICAgICAgcGFyc2U6IDAsCiAgICAgICAgICAgICAgICAgICAgdXJsOiBiYXRhLnVybCwKICAgICAgICAgICAgICAgICAgICBqeDogMCwKICAgICAgICAgICAgICAgICAgICBkYW5tYWt1OiAiaHR0cDovLzEwMy4zNi4yMjAuMTY2OjkxL2Rta3UxL3R2Ym94L3poLnBocD91cmw9IiArIGlucHV0LnNwbGl0KCI/IilbMF0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBpbnB1dCA9IHsKICAgICAgICAgICAgICAgICAgICBwYXJzZTogMCwKICAgICAgICAgICAgICAgICAgICB1cmw6IGlucHV0LnNwbGl0KCI/IilbMF0sCiAgICAgICAgICAgICAgICAgICAgang6IDEsCiAgICAgICAgICAgICAgICAgICAgZGFubWFrdTogImh0dHA6Ly8xMDMuMzYuMjIwLjE2Njo5MS9kbWt1MS90dmJveC96aC5waHA/dXJsPSIgKyBpbnB1dC5zcGxpdCgiPyIpWzBdCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgfSBjYXRjaCB7CiAgICAgICAgICAgIGlucHV0ID0gewogICAgICAgICAgICAgICAgcGFyc2U6IDAsCiAgICAgICAgICAgICAgICB1cmw6IGlucHV0LnNwbGl0KCI/IilbMF0sCiAgICAgICAgICAgICAgICBqeDogMSwKICAgICAgICAgICAgICAgIGRhbm1ha3U6ICJodHRwOi8vMTAzLjM2LjIyMC4xNjY6OTEvZG1rdTEvdHZib3gvemgucGhwP3VybD0iICsgaW5wdXQuc3BsaXQoIj8iKVswXQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgIH0pLAogICAgLy8g5omL5Yqo6LCD55So6Kej5p6Q6K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zb24uZGF0YS5saXN0Lmxlbmd0aCA+IDAgPyBqc29uLmRhdGEubGlzdFswXS51cmwgOiBqc29uLmRhdGEuc2VyaWVzWzBdLnVybDsKICAgICAgICBpZiAoIS9eaHR0cC8udGVzdChvdXJsKSkgewogICAgICAgICAgICBvdXJsID0gaG9zdCArIG91cmwKICAgICAgICB9CiAgICAgICAgZmV0Y2hfcGFyYW1zLmhlYWRlcnNbIlVzZXItQWdlbnQiXSA9IE1PQklMRV9VQTsKICAgICAgICBodG1sID0gcmVxdWVzdChvdXJsKTsKICAgICAgICBpZiAoaHRtbC5pbmNsdWRlcygid2luZG93LmxvY2F0aW9uID0iKSkgewogICAgICAgICAgICBwcmludCgi5byA5aeL6I635Y+Wb3VybCIpOwogICAgICAgICAgICBvdXJsID0gcGRmaChodG1sLCAibWV0YVtodHRwLWVxdWl2PXJlZnJlc2hdJiZjb250ZW50Iikuc3BsaXQoInVybD0iKVsxXTsKICAgICAgICAgICAgcHJpbnQoIuiOt+WPluWIsG91cmw6IiArIG91cmwpOwogICAgICAgICAgICBodG1sID0gcmVxdWVzdChvdXJsKQogICAgICAgIH0KICAgICAgICB0cnkgewogICAgICAgICAgICBsZXQgZGV0YWlscyA9IHBkZmgoaHRtbCwgIi5tLWRldGFpbHMmJkh0bWwiKS5yZXBsYWNlKC9oMT4vLCAiaDY+IikucmVwbGFjZSgvZGl2L2csICJiciIpOwogICAgICAgICAgICBwcmludChkZXRhaWxzKTsKICAgICAgICAgICAgbGV0IGFjdG9yID0gIiIsCiAgICAgICAgICAgICAgICBkaXJlY3RvciA9ICIiLAogICAgICAgICAgICAgICAgdGltZSA9ICIiOwogICAgICAgICAgICBpZiAoL+aSreWHuuaXtumXtC8udGVzdChkZXRhaWxzKSkgewogICAgICAgICAgICAgICAgYWN0b3IgPSBwZGZoKGh0bWwsICJwOmVxKDUpJiZUZXh0Iikuc3Vic3RyKDAsIDI1KTsKICAgICAgICAgICAgICAgIGRpcmVjdG9yID0gcGRmaChodG1sLCAicDplcSg0KSYmVGV4dCIpOwogICAgICAgICAgICAgICAgdGltZSA9IHBkZmgoaHRtbCwgInA6ZXEoMykmJlRleHQiKQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgYWN0b3IgPSBwZGZoKGh0bWwsICJwOmVxKDQpJiZUZXh0Iikuc3Vic3RyKDAsIDI1KTsKICAgICAgICAgICAgICAgIGRpcmVjdG9yID0gcGRmaChodG1sLCAicDplcSgzKSYmVGV4dCIpOwogICAgICAgICAgICAgICAgdGltZSA9ICLlt7Llroznu5MiCiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IF9pbWcgPSBwZChodG1sLCAiLnZpZGVvLWltZyYmaW1nJiZzcmMiKTsKICAgICAgICAgICAgbGV0IEpKID0gcGRmaChodG1sLCAiLmRlc2MmJlRleHQiKS5zcGxpdCgi566A5LuL77yaIilbMV07CiAgICAgICAgICAgIGxldCBfZGVzYyA9IHRpbWU7CiAgICAgICAgICAgIFZPRC52b2RfbmFtZSA9IHBkZmgoaHRtbCwgIi52dC10eHQmJlRleHQiKTsKICAgICAgICAgICAgVk9ELnR5cGVfbmFtZSA9IHBkZmgoaHRtbCwgInA6ZXEoMCkmJlRleHQiKS5zdWJzdHIoMCwgNik7CiAgICAgICAgICAgIFZPRC52b2RfYXJlYSA9IHBkZmgoaHRtbCwgInA6ZXEoMSkmJlRleHQiKTsKICAgICAgICAgICAgVk9ELnZvZF9hY3RvciA9IGFjdG9yOwogICAgICAgICAgICBWT0Qudm9kX2RpcmVjdG9yID0gZGlyZWN0b3I7CiAgICAgICAgICAgIFZPRC52b2RfcmVtYXJrcyA9IF9kZXNjOwogICAgICAgICAgICBWT0Qudm9kX3BpYyA9IF9pbWc7CiAgICAgICAgICAgIFZPRC52b2RfY29udGVudCA9IEpKOwogICAgICAgICAgICBpZiAoIVZPRC52b2RfbmFtZSkgewogICAgICAgICAgICAgICAgVk9ELnZvZF9uYW1lID0gVk9ELnR5cGVfbmFtZTsKICAgICAgICAgICAgfQogICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgbG9nKCLojrflj5blvbHniYfkv6Hmga/lj5HnlJ/plJnor686IiArIGUubWVzc2FnZSkKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGdldFJqcGcoaW1nVXJsLCB4cykgewogICAgICAgICAgICB4cyA9IHhzIHx8IDM7CiAgICAgICAgICAgIGxldCBwaWNTaXplID0gL2pwZ18vLnRlc3QoaW1nVXJsKSA/IGltZ1VybC5zcGxpdCgianBnXyIpWzFdLnNwbGl0KCIuIilbMF0gOiBmYWxzZTsKICAgICAgICAgICAgbGV0IHJqcGcgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKHBpY1NpemUpIHsKICAgICAgICAgICAgICAgIGxldCBhID0gcGFyc2VJbnQocGljU2l6ZS5zcGxpdCgieCIpWzBdKSAqIHhzOwogICAgICAgICAgICAgICAgbGV0IGIgPSBwYXJzZUludChwaWNTaXplLnNwbGl0KCJ4IilbMV0pICogeHM7CiAgICAgICAgICAgICAgICByanBnID0gYSArICJ4IiArIGIgKyAiLmpwZyIKICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgaW1nID0gL2pwZ18vLnRlc3QoaW1nVXJsKSAmJiByanBnID8gaW1nVXJsLnJlcGxhY2UoaW1nVXJsLnNwbGl0KCJqcGdfIilbMV0sIHJqcGcpIDogaW1nVXJsOwogICAgICAgICAgICByZXR1cm4gaW1nCiAgICAgICAgfQoKICAgICAgICBpZiAoanNvbi5kYXRhLnRvdGFsID09PSAxICYmIGpzb24uZGF0YS5saXN0Lmxlbmd0aCA9PT0gMSkgewogICAgICAgICAgICBsZXQgZGF0YSA9IGpzb24uZGF0YS5saXN0WzBdOwogICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vd3d3Lm1ndHYuY29tIiArIGRhdGEudXJsOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6IGRhdGEudDQsCiAgICAgICAgICAgICAgICBkZXNjOiBkYXRhLnQyLAogICAgICAgICAgICAgICAgcGljX3VybDogZ2V0UmpwZyhkYXRhLmltZyksCiAgICAgICAgICAgICAgICB1cmw6IHVybAogICAgICAgICAgICB9KQogICAgICAgIH0gZWxzZSBpZiAoanNvbi5kYXRhLmxpc3QubGVuZ3RoID4gMSkgewogICAgICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8PSBqc29uLmRhdGEudG90YWxfcGFnZTsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAoaSA+IDEpIHsKICAgICAgICAgICAgICAgICAgICBqc29uID0gSlNPTi5wYXJzZShmZXRjaChpbnB1dC5yZXBsYWNlKCJwYWdlPTEiLCAicGFnZT0iICsgaSksIHt9KSkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGpzb24uZGF0YS5saXN0LmZvckVhY2goZnVuY3Rpb24oZGF0YSkgewogICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAiaHR0cHM6Ly93d3cubWd0di5jb20iICsgZGF0YS51cmw7CiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEuaXNJbnRhY3QgPT0gIjEiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZGF0YS50NCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGRhdGEudDIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBnZXRSanBnKGRhdGEuaW1nKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHByaW50KGlucHV0ICsgIuaaguaXoOeJh+a6kCIpCiAgICAgICAgfQogICAgICAgIFZPRC52b2RfcGxheV9mcm9tID0gIm1ndHYiOwogICAgICAgIFZPRC52b2RfcGxheV91cmwgPSBkLm1hcChmdW5jdGlvbihpdCkgewogICAgICAgICAgICByZXR1cm4gaXQudGl0bGUgKyAiJCIgKyBpdC51cmwKICAgICAgICB9KS5qb2luKCIjIik7CiAgICAgICAgc2V0UmVzdWx0KGQpOwogICAgfSksCgogICAgLy8g5pCc57SiOiAkanMudG9TdHJpbmcoKCkgPT4gewogICAgLy8gICAgIGZldGNoX3BhcmFtcy5oZWFkZXJzLlJlZmVyZXIgPSAiaHR0cHM6Ly93d3cubWd0di5jb20iOwogICAgLy8gICAgIGZldGNoX3BhcmFtcy5oZWFkZXJzWyJVc2VyLUFnZW50Il0gPSBVQTsKICAgIC8vICAgICBsZXQgZCA9IFtdOwogICAgLy8gICAgIGxldCBodG1sID0gcmVxdWVzdChpbnB1dCk7CiAgICAvLyAgICAgbGV0IGpzb24gPSBKU09OLnBhcnNlKGh0bWwpOwogICAgLy8gICAgIGpzb24uZGF0YS5jb250ZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChkYXRhKSB7CiAgICAvLyAgICAgICAgIGlmIChkYXRhLmRhdGEuc291cmNlTGlzdCB8fCBkYXRhLmRhdGEueWVhckxpc3QpIHsKICAgIC8vICAgICAgICAgICAgIGxldCBsaXN0ID0gZGF0YS5kYXRhLnNvdXJjZUxpc3QgPyBkYXRhLmRhdGEuc291cmNlTGlzdCA6IGRhdGEuZGF0YS55ZWFyTGlzdFswXS5zb3VyY2VMaXN0OwogICAgLy8gICAgICAgICAgICAgbGV0IGRlc2MgPSAiIjsKICAgIC8vICAgICAgICAgICAgIGxpc3QuZm9yRWFjaChmdW5jdGlvbiAoaXQpIHsKICAgIC8vICAgICAgICAgICAgICAgICBkZXNjICs9IGl0Lm5hbWUgKyAiXHQiCiAgICAvLyAgICAgICAgICAgICB9KTsKICAgIC8vICAgICAgICAgICAgIGxldCBmeWNsYXNzID0gJyc7CiAgICAvLyAgICAgICAgICAgICBpZiAobGlzdFswXS5zb3VyY2UgPT09ICJpbWdvIikgewogICAgLy8gICAgICAgICAgICAgICAgIGxldCBpbWcgPSBkYXRhLmRhdGEucGljID8gZGF0YS5kYXRhLnBpYyA6IGRhdGEuZGF0YS55ZWFyTGlzdFswXS5waWM7CiAgICAvLyAgICAgICAgICAgICAgICAgdHJ5IHsKICAgIC8vICAgICAgICAgICAgICAgICAgICAgZnljbGFzcyA9IGRhdGEuZGF0YS5kZXNjLmZpbmQoaXQgPT4gaXQubGFiZWwgPT09ICfnsbvlnosnKS51cmwubWF0Y2goL2xpYlwvKFxkKykvKVsxXSArICckJzsKICAgIC8vICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAvLyAgICAgICAgICAgICAgICAgICAgIGZ5Y2xhc3MgPSAnJzsKICAgIC8vICAgICAgICAgICAgICAgICB9CiAgICAvLyAgICAgICAgICAgICAgICAgbG9nKGZ5Y2xhc3MpOwogICAgLy8gICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAvLyAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkYXRhLmRhdGEudGl0bGUgPyBkYXRhLmRhdGEudGl0bGUgOiBkYXRhLmRhdGEueWVhckxpc3RbMF0udGl0bGUsCiAgICAvLyAgICAgICAgICAgICAgICAgICAgIGltZzogaW1nLAogICAgLy8gICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBkYXRhLmRhdGEuc3RvcnkgPyBkYXRhLmRhdGEuc3RvcnkgOiBkYXRhLmRhdGEueWVhckxpc3RbMF0uc3RvcnksCiAgICAvLyAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGRhdGEuZGF0YS5wbGF5VGltZSwKICAgIC8vICAgICAgICAgICAgICAgICAgICAgdXJsOiBmeWNsYXNzICsgbGlzdFswXS52aWQKICAgIC8vICAgICAgICAgICAgICAgICB9KQogICAgLy8gICAgICAgICAgICAgfQogICAgLy8gICAgICAgICB9CiAgICAvLyAgICAgfSk7CiAgICAvLyAgICAgc2V0UmVzdWx0KGQpOwogICAgLy8gfSksCiAgICDmkJzntKI6ICRqcy50b1N0cmluZygoKSA9PiB7CiAgICAgICAgZmV0Y2hfcGFyYW1zLmhlYWRlcnMuUmVmZXJlciA9ICJodHRwczovL3d3dy5tZ3R2LmNvbSI7CiAgICAgICAgZmV0Y2hfcGFyYW1zLmhlYWRlcnNbIlVzZXItQWdlbnQiXSA9IFVBOwogICAgICAgIGxldCBkID0gW107CiAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGlucHV0KTsKICAgICAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoaHRtbCk7CiAgICAgICAganNvbi5kYXRhLmNvbnRlbnRzLmZvckVhY2goZnVuY3Rpb24oZGF0YSkgewogICAgICAgICAgICBpZiAoZGF0YS50eXBlICYmIGRhdGEudHlwZSA9PSAnbWVkaWEnKSB7CiAgICAgICAgICAgICAgICBsZXQgaXRlbSA9IGRhdGEuZGF0YVswXTsKICAgICAgICAgICAgICAgIGxldCBkZXNjID0gaXRlbS5kZXNjLmpvaW4oJywnKTsKICAgICAgICAgICAgICAgIGxldCBmeWNsYXNzID0gJyc7CiAgICAgICAgICAgICAgICBpZiAoaXRlbS5zb3VyY2UgPT09ICJpbWdvIikgewogICAgICAgICAgICAgICAgICAgIGxldCBpbWcgPSBpdGVtLmltZyA/IGl0ZW0uaW1nIDogJyc7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgZnljbGFzcyA9IGl0ZW0ucnB0Lm1hdGNoKC9pZHg9KC4qPykmLylbMV0gKyAnJCc7CiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKTsKICAgICAgICAgICAgICAgICAgICAgICAgZnljbGFzcyA9ICcnOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBsb2coZnljbGFzcyk7CiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUucmVwbGFjZSgvPEI+fDxcL0I+L2csICcnKSwKICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWcsCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICcnLAogICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLAogICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGZ5Y2xhc3MgKyBpdGVtLnVybC5tYXRjaCgvLipcLyguKj8pXC5odG1sLylbMV0KICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgc2V0UmVzdWx0KGQpOwogICAgfSksCn0= |