xiaomianao666

小程序:熠熠生辉bilili

Aug 25th, 2024
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@熠熠生辉bilili@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi54ag54ag55Sf6L6JYmlsaWxpIiwiYXV0aG9yIjoi5L6g5ZCNIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MTgsImNvbF90eXBlIjoibW92aWVfMV92ZXJ0aWNhbF9waWMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xudmFyIHBhZ2UgPSBNWV9QQUdFO1xuaXNMb2dpbiA9IEpTT04ucGFyc2UoJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2FwaVwiKS5pc0xvZ2dlZEluKCkpO1xuLy8g6aqM6K+B55m75b2VXG5pZiAoaXNMb2dpbi50eXBlID09PSB0cnVlKSB7XG4gICAgY3VycmVudFVzZXIgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdFswXTtcbiAgICBjb29raWUgPSBjdXJyZW50VXNlci5jb29raWU7XG4gICAgdXNlck5hbWUgPSBjdXJyZW50VXNlci51c2VyTmFtZTtcbiAgICBtaWQgPSBjdXJyZW50VXNlci51c2VyTWlkO1xuICAgIHVzZXJGYWNlID0gY3VycmVudFVzZXIuZmFjZSArIFwiQFJlZmVyZXI9XCI7XG4gICAgaWYgKHBhZ2UgPT0gMSkge1xuICAgICAgICB2YXIgVGFiID0gWyfotKblj7cnLCAn54Ot5pigJywgJ+eJh+W6kycsICfmjqjpgIEnLCAn54Ot6ZeoJywgJ+iuoumYhScsICflhbPms6gnLCAn5pS26JePJywgJ+i2s+i/uScsICfliqjmgIEnXTtcbiAgICAgICAgVGFiID0gVGFiLm1hcCgoaXQpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBpdCA9PT0gZ2V0SXRlbSgn6aaW6aG1JywgJ+aOqOmAgScpID8gJ/CfkYknICsgaXQgOiBpdDtcbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogJzxmb250IGNvbG9yPVwiYmx1ZVwiPicgKyB1c2VyTmFtZSxcbiAgICAgICAgICAgIGRlc2M6ICc8L2ZvbnQ+4q2QPGZvbnQgY29sb3I9XCIjMTlCODlEXCI+5b2T5YmN77yaJyArIGdldEl0ZW0oJ+mmlumhtScsICfmjqjpgIEnKSArICc8L2ZvbnQ+4q2QJyxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoVGFiKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICQoVGFiLCAyKS5zZWxlY3QoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL/CfkYkvZywgJycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT09ICfotKblj7cnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RPcHRpb24gPSBbJ+mAgOWHuueZu+W9lScsICfliIfmjaLotKblj7cnLCflpI3liLZjb29raWUnLCAn5YiG5LqrYmZLZXknLCAn6K6+572uYmZLZXknLCAn5riF6ZmkYmZLZXknLCfinpXvuI8nXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHNlbGVjdE9wdGlvbiwgMikuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGlucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCLpgIDlh7rnmbvlvZVcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNldHRpbmcudXNlckxpc3RbMF0uY29va2llID0gJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLnVzZXJMaXN0LnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZShcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+S9oOW3sumAgOWHulwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi5YiH5o2i6LSm5Y+3XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VyTGlzdCA9IEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIikpLnVzZXJMaXN0Lm1hcCgocCkgPT4geyByZXR1cm4gcC51c2VyTmFtZSB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHVzZXJMaXN0LCAxKS5zZWxlY3QoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGVtcCA9IHNldHRpbmcudXNlckxpc3RbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdC5mb3JFYWNoKChwLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocC51c2VyTmFtZSA9PT0gaW5wdXQgJiYgaW5kZXggIT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcudXNlckxpc3RbMF0gPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdFtpbmRleF0gPSB0ZW1wO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNouaIkOWKn1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi5aSN5Yi2Y29va2llXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29raWUgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdFswXS5jb29raWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5KGNvb2tpZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suWkjeWItmNvb2tpZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCLliIbkuqtiZktleVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2llID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSkudXNlckxpc3RbMF0uY29va2llO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmZLZXkgPSBiYXNlNjRFbmNvZGUoYmFzZTY0RW5jb2RlKGNvb2tpZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShiZktleSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suWkjeWItmJmS2V5LOW/q+WOu+WIhuS6q+WQp++8jOazqOaEj+i0puWPt+WuieWFqH5cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi6K6+572uYmZLZXlcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLCAn5pKt5pS+5p2D55uK5YWx5Lqr77yM5rOo5oSP5a6J5YWoJykuaW5wdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLmJmS2V5ID0gaW5wdXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL2JmS2V56K6+572u5oiQ5YqfXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCLmuIXpmaRiZktleVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZyA9IEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy5iZktleSA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8vYmZLZXnlt7LmuIXpmaRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi4p6V77iPXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL3BhZ2UvbG9naW4jbm9SZWNvcmRIaXN0b3J5I1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+S9oOmAieS6huWVpe+8n1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgn6aaW6aG1JywgaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNoummlumhteS4ujpcIiArIGlucHV0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0sIFRhYiksXG4gICAgICAgICAgICBpbWc6IHVzZXJGYWNlID09PSB1bmRlZmluZWQgPyAnaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzIwLnN2ZycgOiB1c2VyRmFjZSxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcImF2YXRhclwiLFxuICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICBpZDogJ+mmlumhteaYvuekuidcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xuICAgICAgICB9KVxuICAgIH1cbiAgICAvLyDljLnphY3pppbpobXpgInpoblcbiAgICBzd2l0Y2ggKGdldEl0ZW0oJ+mmlumhtScsICfmjqjpgIEnKSkge1xuICAgICAgICBjYXNlICfng63mmKAnOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9VcGRhdGVUYWJsZXMnKSkucnVsZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAn54mH5bqTJzpcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvdmF1bHQnKSkucnVsZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAn5o6o6YCBJzpcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZmVlZCcpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICfng63pl6gnOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9ob3RWaWRlbycpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICforqLpmIUnOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9zdWJzY3JpcHRpb24nKSkucnVsZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAn5YWz5rOoJzpcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvYXR0ZW50aW9uJykpLnJ1bGUpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ+aUtuiXjyc6XG4gICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2NvbGVjdGlvbicpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICfotrPov7knOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS90cmFjaycpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICfliqjmgIEnOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9sYXRldE5ld3MnKSkucnVsZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvVXBkYXRlVGFibGVzJykpLnJ1bGUpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgfVxufSBlbHNlIHtcbiAgICBsZXQgYSA9IFtdXG4gICAgbGV0IHRpbWUgPSAxMFxuICAgIGEucHVzaCh7XG4gICAgICAgIHRpdGxlOiBgICAgICAgICAgICAgICAgICAgICAg5L2/55So5YmN6aG755+lXG7mnKzop4TliJnosIPnlKhodHRwczovL2dpdGh1Yi5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3TnmoRhcGnvvIzmiYDmnInku6PnoIHlhajpg6jlvIDmupDvvIzlubbkuJTkuI3lrZjlnKjkuIrkvKDnlKjmiLfkv6Hmga/nmoTooYzkuLpcbuacrOinhOWImeS4uuWtpuS5oOebrueahO+8jOivt+S6juWvvOWFpTI05bCP5pe25YaF5Yig6Zmk77yB77yB77yBICAgICAgICAgICAgICAgICAgICAgICAgXG7lvIDlp4vkvb/nlKjmnKzop4TliJnljbPku6PooajpgbXlrojop4TliJkgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgYCxcbiAgICAgICAgXCJjb2xfdHlwZVwiOiBcImxvbmdfdGV4dFwiLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgaWQ6IFwidGV4dFwiXG4gICAgICAgIH1cbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiB0aW1lICsgXCLnp5LlkI7nu6fnu61cIixcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF8xXCIsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBpZDogXCJ0aW1lclwiXG4gICAgICAgIH1cbiAgICB9KVxuICAgIHNldFJlc3VsdChhKVxuICAgIHdoaWxlICh0aW1lICE9IDApIHtcbiAgICAgICAgamF2YS5sYW5nLlRocmVhZC5zbGVlcCgxMDAwKVxuICAgICAgICB0aW1lIC09IDFcbiAgICAgICAgdXBkYXRlSXRlbShcInRpbWVyXCIsIHtcbiAgICAgICAgICAgIHRpdGxlOiB0aW1lICsgXCLnp5LlkI7nu6fnu61cIlxuICAgICAgICB9KVxuICAgIH1cbiAgICBhZGRJdGVtQWZ0ZXIoXCJ0aW1lclwiLCB7XG4gICAgICAgIHRpdGxlOiBcIumAieaLqeWFtuS7luW3sueZu+W9lei0puWPt1wiLFxuICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xuICAgICAgICAgICAgdXNlckxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdC5tYXAoKHApID0+IHsgcmV0dXJuIHAudXNlck5hbWUgfSk7XG4gICAgICAgICAgICByZXR1cm4gJCh1c2VyTGlzdCwgMSkuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSk7XG4gICAgICAgICAgICAgICAgdGVtcCA9IHNldHRpbmcudXNlckxpc3RbMF07XG4gICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdC5tYXAoKHApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHAudXNlck5hbWUgPT09IGlucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLnVzZXJMaXN0WzBdID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSB0ZW1wO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBzYXZlRmlsZShcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xuICAgICAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8v5YiH5o2i5oiQ5YqfXCI7XG4gICAgICAgICAgICB9KVxuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgfSlcbiAgICBhZGRJdGVtQWZ0ZXIoXCJ0aW1lclwiLCB7XG4gICAgICAgIHRpdGxlOiBcIueZu+mZhlwiLFxuICAgICAgICBkZXNjOiBcIueZu+W9leWkseaViO+8n+eCueatpOmHjeaWsOeZu+W9lVwiLFxuICAgICAgICB1cmw6IFwiaGlrZXI6Ly9wYWdlL2xvZ2luI25vUmVjb3JkSGlzdG9yeSNcIixcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgfSlcbiAgICBkZWxldGVJdGVtKFwidGV4dFwiKVxuICAgIGRlbGV0ZUl0ZW0oXCJ0aW1lclwiKVxufVxuc2V0UmVzdWx0KGQpO1xuIiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyo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LCdodHRwcycpICsgXCJAUmVmZXJlcj1cIjtcbiAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICDlsIHpnaIgPSBpdGVtLmNvdmVyKyBcIkBSZWZlcmVyPVwiO1xuICAgICAgICB9XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZS5yZXBsYWNlKC88ZW0gY2xhc3M9XCJrZXl3b3JkXCI+L2csICcnKS5yZXBsYWNlKC88XFwvZW0+L2csICcnKSxcbiAgICAgICAgICAgIGltZzog5bCB6Z2iLFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ZpbG1lcmppI2ltbWVyc2l2ZVRoZW1lIycsXG4gICAgICAgICAgICBjb250ZW50OiBpdGVtLmRlc2MsXG4gICAgICAgICAgICBkZXNjOiBpdGVtLnN0eWxlcyxcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgc2Vhc29uX2lkOiBpdGVtLnNlYXNvbl9pZFxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcbn1cbmlmIChsaXN0Mikge1xuICAgIGxpc3QyLmZvckVhY2goaXRlbSA9PiB7XG4gICAgICAgIGlmICghaXRlbS5jb3Zlci5tYXRjaCgvaHR0cHMvKSkge1xuICAgICAgICAgICAg5bCB6Z2iID0gaXRlbS5jb3Zlci5yZXBsYWNlKCdodHRwJywnaHR0cHMnKSArIFwiQFJlZmVyZXI9XCI7XG4gICAgICAgIH1lbHNle1xuICAgICAgICAgICAg5bCB6Z2iID0gaXRlbS5jb3ZlcisgXCJAUmVmZXJlcj1cIjtcbiAgICAgICAgfVxuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUucmVwbGFjZSgvPGVtIGNsYXNzPVwia2V5d29yZFwiPi9nLCAnJykucmVwbGFjZSgvPFxcL2VtPi9nLCAnJyksXG4gICAgICAgICAgICBpbWc6IOWwgemdoixcb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iAgICAgICAgICAgIGxvZyhvcmlnaW5Vc2VyU2V0dGluZyk7XG4gICAgICAgICAgICBjb29raWUgPSBvcmlnaW5Vc2VyU2V0dGluZy5jb29raWU7XG4gICAgICAgICAgICB1c2VyTmFtZSA9IG9yaWdpblVzZXJTZXR0aW5nLnVzZXJOYW1lO1xuICAgICAgICAgICAgdXNlck1pZCA9IG9yaWdpblVzZXJTZXR0aW5nLnVzZXJNaWQ7XG4gICAgICAgICAgICBmYWNlID0gb3JpZ2luVXNlclNldHRpbmcuZmFjZTtcbiAgICAgICAgICAgIHZpcFN0YXR1cyA9IG9yaWdpblVzZXJTZXR0aW5nLnZpcFN0YXR1cztcbiAgICAgICAgICAgIGlmKGNvb2tpZT09PXVuZGVmaW5lZCl7c2V0dGluZz0ne1widXNlckxpc3RcIjpbXSxcImJmS2V5XCI6XCJcIn0nO31lbHNle1xuICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIHVzZXJMaXN0OiBbe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29va2llOiBjb29raWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1c2VyTmFtZTogdXNlck5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1c2VyTWlkOiB1c2VyTWlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogZmFjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZpcFN0YXR1czogdmlwU3RhdHVzXG4gICAgICAgICAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgICAgICAgICBiZktleTogXCJcIlxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBsb2coXCLmsqHmnInml6fnmoTlkIjms5XnmoTphY3nva7mlofku7ZcIik7XG4gICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAg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XRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL2d1b2NodWFuZy9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55S16KeGJzpcXG4gICAgICAgIHNlYXNvblR5cGUgPSA1O1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfmipjlj6AnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL3R2L2luZGV4Jyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqCA9IHBkZmEoaHRtbCwgJy5maWx0ZXItbGlzdCYmLmZpbHRlci1ibG9jaycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaguZm9yRWFjaCh1bCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICDnrZvpgInmnaHku7YgPSBwZGZoKHVsLCAnLmZpbHRlci1uYW1lJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaggPSBwZGZhKHVsLCAndWwmJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaguZm9yRWFjaChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBkZmgobGksICdsaSYmVGV4dCcpID09ICflhbbku5YnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKOetm+mAieadoeS7tiwgJ+WFqOmDqCcpID09IHBkZmgobGksICdsaSYmVGV4dCcpID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPSMxYWFkMTk+JyArIHBkZmgobGksICdsaSYmVGV4dCcpICsgJzwvZm9udD48L2I+JyA6IHBkZmgobGksICdsaSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpLCDnrZvpgInmnaHku7YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKOetm+mAieadoeS7tiwgcGRmaChsaSwgJ2xpJiZUZXh0JykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSwg562b6YCJ5p2h5Lu2KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnuqrlvZXniYcnOlxcbiAgICAgICAgc2Vhc29uVHlwZSA9IDM7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aKmOWPoCcsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKCdodHRwczovL3d3dy5iaWxpYmlsaS5jb20vZG9jdW1lbnRhcnkvaW5kZXgvJyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqCA9IHBkZmEoaHRtbCwgJy5maWx0ZXItbGlzdCYmLmZpbHRlci1ibG9jaycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaguZm9yRWFjaCh1bCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICDnrZvpgInmnaHku7YgPSBwZGZoKHVsLCAnLmZpbHRlci1uYW1lJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaggPSBwZGZhKHVsLCAndWwmJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaguZm9yRWFjaChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBkZmgobGksICdsaSYmVGV4dCcpID09ICflhbbku5YnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKOetm+mAieadoeS7tiwgJ+WFqOmDqCcpID09IHBkZmgobGksICdsaSYmVGV4dCcpID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPSMxYWFkMTk+JyArIHBkZmgobGksICdsaSYmVGV4dCcpICsgJzwvZm9udD48L2I+JyA6IHBkZmgobGksICdsaSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpLCDnrZvpgInmnaHku7YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKOetm+mAieadoeS7tiwgcGRmaChsaSwgJ2xpJiZUZXh0JykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSwg562b6YCJ5p2h5Lu2KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnu7zoibonOlxcbiAgICAgICAgc2Vhc29uVHlwZSA9IDc7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aKmOWPoCcsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKCdodHRwczovL3d3dy5iaWxpYmlsaS5jb20vdmFyaWV0eS9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55Wq5YmnJzpcXG4gICAgICAgIHNlYXNvblR5cGUgPSAxO1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfmipjlj6AnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL2FuaW1lL2luZGV4Jyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqCA9IHBkZmEoaHRtbCwgJy5maWx0ZXItbGlzdCYmLmZpbHRlci1ibG9jaycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaguZm9yRWFjaCh1bCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICDnrZvpgInmnaHku7YgPSBwZGZoKHVsLCAnLmZpbHRlci1uYW1lJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaggPSBwZGZhKHVsLCAndWwmJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaguZm9yRWFjaChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBkZmgobGksICdsaSYmVGV4dCcpID09ICflhbbku5YnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKOetm+mAieadoeS7tiwgJ+WFqOmDqCcpID09IHBkZmgobGksICdsaSYmVGV4dCcpID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPSMxYWFkMTk+JyArIHBkZmgobGksICdsaSYmVGV4dCcpICsgJzwvZm9udD48L2I+JyA6IHBkZmgobGksICdsaSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpLCDnrZvpgInmnaHku7YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKOetm+mAieadoeS7tiwgcGRmaChsaSwgJ2xpJiZUZXh0JykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSwg562b6YCJ5p2h5Lu2KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnlLXlvbEnOlxcbiAgICAgICAgc2Vhc29uVHlwZSA9IDI7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aKmOWPoCcsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKCdodHRwczovL3d3dy5iaWxpYmlsaS5jb20vbW92aWUvaW5kZXgnKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoID0gcGRmYShodG1sLCAnLmZpbHRlci1saXN0JiYuZmlsdGVyLWJsb2NrJyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqC5mb3JFYWNoKHVsID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIOetm+mAieadoeS7tiA9IHBkZmgodWwsICcuZmlsdGVyLW5hbWUmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqCA9IHBkZmEodWwsICd1bCYmbGknKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqC5mb3JFYWNoKGxpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGRmaChsaSwgJ2xpJiZUZXh0JykgPT0gJ+WFtuS7licpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIo562b6YCJ5p2h5Lu2LCAn5YWo6YOoJykgPT0gcGRmaChsaSwgJ2xpJiZUZXh0JykgPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9IzFhYWQxOT4nICsgcGRmaChsaSwgJ2xpJiZUZXh0JykgKyAnPC9mb250PjwvYj4nIDogcGRmaChsaSwgJ2xpJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobGksIOetm+mAieadoeS7tikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIo562b6YCJ5p2h5Lu2LCBwZGZoKGxpLCAnbGkmJlRleHQnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGxpLCDnrZvpgInmnaHku7YpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgYnJlYWs7XFxuICAgIGRlZmF1bHQ6XFxuICAgICAgICBzZWFzb25UeXBlID0gNDtcXG4gICAgICAgIGlmIChnZXRNeVZhcign5oqY5Y+gJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9hbmltZS9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG59XFxuLy8g5a2Q5YiG57G75Y+C5pWw5pig5bCEXFxuc3dpdGNoIChnZXRNeVZhcign57G75Z6LJywgJ+WFqOmDqCcpKSB7XFxuICAgIGNhc2UgJ+ato+eJhyc6XFxuICAgICAgICBzZWFzb25fdmVyc2lvbiA9IDE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55S15b2xJzpcXG4gICAgICAgIHNlYXNvbl92ZXJzaW9uID0gMjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflhbbku5YnOlxcbiAgICAgICAgc2Vhc29uX3ZlcnNpb24gPSAzO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGRlZmF1bHQ6XFxuICAgICAgICBzZWFzb25fdmVyc2lvbiA9IC0xO1xcbiAgIC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ICAgICBicmVhaztcXG4gICAgY2FzZSAnNOaciCc6XFxuICAgICAgICBzZWFzb25fbW9udGggPSA0O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJzfmnIgnOlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gNztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICcxMOaciCc6XFxuICAgICAgICBzZWFzb25fbW9udGggPSAxMDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBkZWZhdWx0OlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gLTE7XFxuICAgICAgICBicmVhaztcXG59XFxuLy8g5Yik5pat5ZKM5pig5bCE5bm05Lu9XFxuc3dpdGNoIChnZXRNeVZhcign5aSn57G7JywgJ+WbveWImycpKSB7XFxuICAgIGNhc2UgJ+WbveWImyc6XFxuICAgIGNhc2UgJ+eVquWJpyc6XFxuICAgICAgICAvLyDnlarliaflkozlm73liJvjgJDkuZ/mmK/lj6vlgZrlubTku73kvYblj4LmlbDlkI3jgIHmoLzlvI/lkozlhbbku5bliIbnsbvkuI3kuIDmoLfjgJFcXG4gICAgICAgIGFuaW1lX3llYXIgPSBnZXRNeVZhcign5bm05Lu9JywgJ+WFqOmDqCcpO1xcbiAgICAgICAgc3dpdGNoIChhbmltZV95ZWFyLmluY2x1ZGVzKCctJykpIHtcXG4gICAgICAgICAgICBjYXNlIHRydWU6XFxuICAgICAgICAgICAgICAgIGVhcmx5ID0gYW5pbWVfeWVhci5zcGxpdCgnLScpWzFdO1xcbiAgICAgICAgICAgICAgICBsYXRlciA9IGFuaW1lX3llYXIuc3BsaXQoJy0nKVswXTtcXG4gICAgICAgICAgICAgICAgeWVhciA9IGBbJHtlYXJseX0sJHtOdW1iZXIobGF0ZXIpICsgMX0pYDtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSBmYWxzZTpcXG4gICAgICAgICAgICAgICAgc3dpdGNoIChhbmltZV95ZWFyKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc5MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9ICdbMTk5MCwyMDAwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc4MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9ICdbMTk4MCwxOTkwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfmm7Tml6knOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAnWywxOTgwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICflhajpg6gnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAtMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9IGBbJHthbmltZV95ZWFyfSwke051bWJlcihhbmltZV95ZWFyKSArIDF9KWA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIC8vIOmZpOS6hueVquWJp+WSjOWbveWIm+eahOWFtuS7luWIhuexu1xcbiAgICAgICAgdHZfeWVhciA9IGdldE15VmFyKCflubTku70nLCAn5YWo6YOoJyk7XFxuICAgICAgICBzd2l0Y2ggKHR2X3llYXIuaW5jbHVkZXMoJy0nKSkge1xcbiAgICAgICAgICAgIGNhc2UgdHJ1ZTpcXG4gICAgICAgICAgICAgICAgZWFybHkgPSB0dl95ZWFyLnNwbGl0KCctJylbMV07XFxuICAgICAgICAgICAgICAgIGxhdGVyID0gdHZfeWVhci5zcGxpdCgnLScpWzBdO1xcbiAgICAgICAgICAgICAgICByZWxlYXNlX2RhdGUgPSBgWyR7ZWFybHl9LTAxLTAxIDAwOjAwOjAwLCR7TnVtYmVyKGxhdGVyKSArIDF9LTAxLTAxIDAwOjAwOjAwKWBcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSBmYWxzZTpcXG4gICAgICAgICAgICAgICAgc3dpdGNoICh0dl95ZWFyKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc5MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gJ1sxOTkwLTAxLTAxIDAwOjAwOjAwLDIwMDAtMDEtMDEgMDA6MDA6MDApJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnODDlubTku6MnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbGVhc2VfZGF0ZSA9ICdbMTk4MC0wMS0wMSAwMDowMDowMCwxOTkwLTAxLTAxIDAwOjAwOjAwKSdcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+abtOaXqSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gJ1ssMTk4MC0wMS0wMSAwMDowMDowMCknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5YWo6YOoJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWxlYXNlX2RhdGUgPSAtMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gYFske3R2X3llYXJ9LTAxLTAxIDAwOjAwOjAwLCR7TnVtYmVyKHR2X3llYXIpICsgMX0tMDEtMDEgMDA6MDA6MDApYDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbn1cXG5zd2l0Y2ggKGdldE15VmFyKCfpo47moLwnLCAn5YWo6YOoJykpIHtcXG4gICAgY2FzZSAn55S15b2xJzpcXG4gICAgICAgIHN0eWxlX2lkID0gLTEwO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIC8vIOeVquWJp+agj+ebrlxcbiAgICBjYXNlICfljp/liJsnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfmvKvnlLvmlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflsI/or7TmlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfmuLjmiI/mlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnibnmkYQnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfluIPooovmiI8nOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfng63ooYAnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnqb/otoonOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflpYflubsnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxODtcXG4gICAgICAgIGJyZWFrO1xcbiAgICAvLyDlkovot7Pkuobku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XIgZCA9IFtdO1xcbnNldFBhZ2VUaXRsZSgn6LSm5Y+355m75b2V6aG16Z2iJylcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogJ2Nvb2tpZeeZu+W9lScsXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICByZXR1cm4gJCgnJywgJ+ivt+i+k+WFpeS9oOeahGNvb2tpZScpLmlucHV0KCgpID0+IHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHJldHVybiBcXFwidG9hc3Q6Ly9jb29raWXkuI3og73kuLrnqbpcXFwiO1xcbiAgICAgICAgICAgIGxldCB1c2VyaW5mbyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2XFxcIiwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogaW5wdXRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgIGlmICh1c2VyaW5mby5pc0xvZ2luID09PSBmYWxzZSkgcmV0dXJuIFxcXCJ0b2FzdDovL+S9oOeahGNvb2tpZeiyjOS8vOWkseaViOS6huWWlH5cXFwiO1xcbiAgICAgICAgICAgIHVzZXJJbmZvID0ge1xcbiAgICAgICAgICAgICAgICBjb29raWU6IGlucHV0LFxcbiAgICAgICAgICAgICAgICB1c2VyTmFtZTogdXNlcmluZm8udW5hbWUsXFxuICAgICAgICAgICAgICAgIHVzZXJNaWQ6ICB1c2VyaW5mby5taWQsXFxuICAgICAgICAgICAgICAgIHZpcFN0YXR1czogdXNlcmluZm8udmlwU3RhdHVzLFxcbiAgICAgICAgICAgICAgICBmYWNlOiB1c2VyaW5mby5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCJcXG4gIC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2tpZe+8jOWFiOivu++8jOWGjei/veWKoFxcbiAgICAgICAgY29va2llID0gZ2V0VmFyKCdiaWxpQ29va2llJywnJyk7XFxuICAgICAgICBsb2coXFxcIuiOt+WPluWIsOeahGNvb2tpZTpcXFwiK2Nvb2tpZSk7XFxuICAgICAgICBpZiAoY29va2llID09IFxcXCJcXFwiKSByZXR1cm4gXFxcInRvYXN0Oi8v6I635Y+WY29va2ll5aSx6LSl77yM5YaN562J562J55yL77yfXFxcIjtcXG4gICAgICAgIGxldCB1c2VyaW5mbyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2XFxcIiwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgaWYgKHVzZXJpbmZvLmlzTG9naW4gPT09IGZhbHNlKSByZXR1cm4gXFxcInRvYXN0Oi8v5L2g5YWI55m75b2V77yM5YaN6I635Y+WY29va2ll77yMT0vvvJ9cXFwiO1xcbiAgICAgICAgdXNlckluZm8gPSB7XFxuICAgICAgICAgICAgY29va2llOiBjb29raWUsXFxuICAgICAgICAgICAgdXNlck5hbWU6IHVzZXJpbmZvLnVuYW1lLFxcbiAgICAgICAgICAgIHVzZXJNaWQ6ICB1c2VyaW5mby5taWQsXFxuICAgICAgICAgICAgdmlwU3RhdHVzOiB1c2VyaW5mby52aXBTdGF0dXMsXFxuICAgICAgICAgICAgZmFjZTogdXNlcmluZm8uZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiXFxuICAgICAgICB9XFxuICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpO1xcbiAgICAgICAgc2V0dGluZy51c2VyTGlzdC51bnNoaWZ0KHVzZXJJbmZvKTtcXG4gICAgICAgIC8vIOi/h+a7pOaOiWNvb2tpZeS4uuepuueahOWFg+e0oFxcbiAgICAgICAgc2V0dGluZy51c2VyTGlzdCA9IHNldHRpbmcudXNlckxpc3QuZmlsdGVyKHVzZXIgPT4gdXNlci5jb29raWUgIT09ICcnKTtcXG4gICAgICAgIHNhdmVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xcbiAgICAgICAgYmFjayh0cnVlKTtcXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lpoLmnpzmsqHmnInnmbvpmYbmiJDlip/vvIzlu7rorq7kvaDkuIvmrKHnmbvpmYbmiJDlip/lkI7kuI3opoHngrnpgqPkuYjlv6t+J1xcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxufSwge1xcbiAgICB1cmw6IFxcXCJodHRwczovL20uYmlsaWJpbGkuY29tL1xcXCIsXFxuICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICBkZXNjOiBcXFwibGlzdCYmc2NyZWVuLTMwMFxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHRva2VuX3RpbWVyID0gZnVuY3Rpb24gKCkge1xcbiAgICAgICAgICAgICAgICB2YXIgdGltZXIgPSBzZXRJbnRlcnZhbCgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBjb29raWUgPSBmYmEuZ2V0Q29va2llKFxcXCJodHRwczovL20uYmlsaWJpbGkuY29tL1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcignYmlsaUNvb2tpZScsIGNvb2tpZSk7XFxuICAgICAgICAgICAgICAgIH0sIDEwMCl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vYXBpXFxcIikuYmlsaUxhenkoYWlkLCBjaWQsIDExNikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAvLyDlhbHkuqvkvJrlkZjmkq3mlL7mnYPnm4pcXG4gICAgICAgICAgICBpZiAoYmFkZ2UubWF0Y2goL+S7mOi0uS8pKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKFsn6a2U5pat6Kej5p6QJywgJ+W3sui0reS5sCddLCAxKS5zZWxlY3QoKGlucHV0LCBhaWQsIGNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09ICfprZTmlq3op6PmnpAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaCgnaGlrZXI6Ly9maWxlcy9jYWNoZS9QYXJzZV9Ebi5qcycsIHt9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCAxMTYpLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBsaW5rLCBhaWQsIGNpZClcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYmlsaUxhenkoYWlkLCBjaWQsIDExNikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9XFxufSk7XFxudm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9XFxcIiMxQzFDMUNcXFwiPuivpuaDhTwvZm9udD4nLFxcbiAgICBpbWc6IOWwgemdoixcXG4gICAgdXJsOiAkKCkucnVsZSgo566A5LuLKSA9PiB7XFxuICAgICAgICByZXMgPSB7fTtcXG4gICAgICAgIHZhciBkID0gW107XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5b2x54mH566A5LuL77yaJyArICdcXFxcblxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0JyArIOeugOS7iyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmVzLmRhdGEgPSBkO1xcbiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpO1xcbiAgICB9LCDnroDku4spLFxcbiAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljX2JsdXInLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgIHRpdGxlOiAn6aKE5ZGK44CB6Iqx57Wu5byA5YWzJywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgncHJldmlld1N3aXRjaCcsICdmb2xkJykgPT0gJ2ZvbGQnKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdwcmV2aWV3U3dpdGNoJywgJ29wZW4nKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mihOWRiuW3sue7j+WIh+aNouS4uuWxleekun5cXFwiO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgncHJldmlld1N3aXRjaCcsICdmb2xkJyk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pooTlkYrkuI3lho3lsZXnpLp+XFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAnZG3nm5LlrZAnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3NldHRpbmcjbm9IaXN0b3J5Iz9ydWxlPWRt55uS5a2QJztcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn5by55bmV5o6n5Yi2JywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKSA9PSAndHJ1ZScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5LiN5Y+XZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuWPl+WIsGRt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XVxcbiAgICB9XFxufSk7XFxuLy8g5pu05paw5pel5Y6G5qih5Z2XXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICfml6XljoYnLFxcbiAgICBpbWc6IGltZ0xpbmsu5pel5Y6GLFxcbiAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKOi/veWJp+aXpeWOhiwg5pu05paw6L+b5bqmKSA9PiB7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aXpeWOhicsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGRlbGV0ZUl0ZW0oJ+i/veWJp+aXpeWOhicpO1xcbiAgICAgICAgICAgIHB1dE15VmFyKCfml6XljoYnLCAn5YWzJyk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGFkZEl0ZW1BZnRlcign5pi+56S65qih5byPJywge1xcbiAgICAgICAgICAgICAgICB0aXRsZTog6L+95Ymn5pel5Y6GLm1hdGNoKC/lroznu5N85pyf5b6FLykgPyDov73liafml6XljoYgOiDov73liafml6XljoYgKyAnPGJyPjxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuabtOaWsOiHsycgKyAo5pu05paw6L+b5bqmLm1hdGNoKC9bXFxcXHU0ZTAwLVxcXFx1OWZhNV0vKSA/IOabtOaWsOi/m+W6piA6ICgn56ysJyArICjmm7TmlrDov5vluqYgPT0gJycgPyAwIDog5pu05paw6L+b5bqmKSArICfor50nKSkgKyAnPC9mb250PicsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiAn6L+95Ymn5pel5Y6GJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcHV0TXlWYXIoJ+aXpeWOhicsICflvIAnKTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfmjaLml6XljobkuLo6JyArIGdldE15VmFyKCfml6XljoYnLCAn5byAJylcXG4gICAgfSwg6L+95Ymn5pel5Y6GL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V0dXJuICQoJ2hpa2VyOi8vZW1wdHknKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgIExpc3QgPSBKU09OLnBhcnNlKGdldE15VmFyKCdEYXRhJykpLmVwaXNvZGVzO1xcbiAgICAgICAgICAgIExpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnNoYXJlX2NvcHkgKyAnPGZvbnQgY29sb3I9XFxcIiMzM2NjY2NcXFwiPlxcdOKerjwvZm9udD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLmNvdmVyICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBpdGVtLmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IDFcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgfSk7XFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogJ2ljb25fNSdcXG59KTtcXG5cXG4vLyDnsr7lvannu6fnu63mqKHlnZdcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogJ+WRqOi+uScsXFxuICAgIGltZzogaW1nTGluay7lkajovrksXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICBEYXRhID0gSlNPTi5wYXJzZShnZXRNeVZhcignRGF0YScpKTtcXG4gICAgICAgIC8vIOacieS6m+ayoeacieebtOaOpeWOu+aOieaHkuW+l+WkhOeQhn5cXG4gICAgICAgIGlmIChEYXRhLnNlY3Rpb24pIHtcXG4gICAgICAgICAgICDlkajovrnmlbDnu4QgPSBbXFxcIvCfj7fvuI/nm7jlhbPns7vliJdcXFwiLCBcXFwi8J+ko1BWJuiKsee1rlxcXCIsIFxcXCLwn42J56uW5bGP5Lmf57K+5b2pXFxcIiwgXFxcIvCflKXnsr7lvankuozliJtcXFwiXTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAg5ZGo6L655pWw57uEID0gW1xcXCLwn4+377iP55u45YWz57O75YiXXFxcIl07XFxuICAgICAgICB9XFxuICAgICAgICAvLyDlkajovrnmlbDnu4QgPSBbXFxcIvCfj7fvuI/nm7jlhbPns7vliJdcXFwiLCBcXFwi8J+ko1BWJuiKsee1rlxcXCIsIFxcXCLnq5blsY/kuZ/nsr7lvalcXFwiLCBcXFwi57K+5b2p5LqM5YibXFxcIl07XFxuICAgICAgICByZXR1cm4gJCjlkajovrnmlbDnu4QsIDEsICfhg6bnsr7lvannu6fnu60nKS5zZWxlY3QoKCkgPT4ge1xcbiAgICAgICAgICAgIERhdGEgPSBKU09OLnBhcnNlKGdldE15VmFyKCdEYXRhJykpO1xcbiAgICAgICAgICAgIGxhenkgPSBnZXRNeVZhcignbGF6eScpO1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PT0gJ/Cfj7fvuI/nm7jlhbPns7vliJcnKSB7XFxuICAgICAgICAgICAgICAgIOezu+WIl+WQjeensCA9IERhdGEuc2Vhc29uX3RpdGxlXFxuICAgICAgICAgICAgICAgIOezu+WIl+aVsOaNriA9IERhdGEuc2Vhc29ucztcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoKS5ydWxlKCjns7vliJfmlbDmja4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn8J+Pt++4j+ebuOWFs+ezu+WIlycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKOezu+WIl+aVsOaNriA9PSBbXSB8fCDns7vliJfmlbDmja4gPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiaWc+PGZvbnQgY29sb3I9XFxcInJlZFxcXCI+4q2Q6K+l5b2x54mH5rKh5pyJ55u45YWz57O75YiX5ZOmfuKtkDwvZm9udD48L2JpZz4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICd0b2FzdDovL+mDveayoeacie+8jO+8jOS9oOeCueWVpeWRgH4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pWs6K+35pyf5b6FficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIOezu+WIl+aVsOaNri5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnNlYXNvbl90aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiAobGlzdC5ob3Jpem9udGFsX2NvdmVyXzE2MTAgPT0gJycgPyAobGlzdC5ob3Jpem9udGFsX2NvdmVyXzE2OSA9PSAnJyA/IGxpc3QuY292ZXIgOiBsaXN0Lmhvcml6b250YWxfY292ZXJfMTY5KSA6IGxpc3QuaG9yaXpvbnRhbF9jb3Zlcl8xNjEwKSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvZmlsbWVyamkjaW1tZXJzaXZlVGhlbWUjJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogbGlzdC5uZXdfZXAuaW5kZXhfc2hvdyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJlcF9pZFxcXCI6IGxpc3QubmV3X2VwLmlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SG9tZVJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgfSwg57O75YiX5pWw5o2uKVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09ICfwn6SjUFYm6Iqx57WuJykge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgUFblkozoirHnta7mlbDmja4gPSBEYXRhLnNlY3Rpb25bMF0uZXBpc29kZXM7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKFBW5ZKM6Iqx57Wu5pWw5o2uLCBsYXp5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn8J+ko1BWJuiKsee1ricpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChQVuWSjOiKsee1ruaVsOaNriA9PSBbXSB8fCBQVuWSjOiKsee1ruaVsOaNriA9PSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8YmlnPjxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuKtkOivpeW9seeJhy/op4bpopHmsqHmnInnm7jlhbNQVuWSjOiKsee1ruWTpn7irZA8L2ZvbnQ+PC9iaWc+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ3RvYXN0Oi8v6YO95rKh5pyJ77yM77yM5L2g54K55ZWl5ZGAficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pWs6K+35pyf5b6FficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBQVuWSjOiKsee1ruaVsOaNri5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3Quc3VidGl0bGUgKyAnXFxcXG4nICsgbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQ6IGxpc3QuYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQ6IGxpc3QuY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgICAgICB9LCBQVuWSjOiKsee1ruaVsOaNriwgbGF6eSlcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ayoeacieaVsOaNruWTpn4nXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09PSAn8J+NieerluWxj+S5n+eyvuW9qScpIHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIOerluWxj+S5n+eyvuW9qeaVsOaNriA9IERhdGEuc2VjdGlvblsxXS5lcGlzb2RlcztcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCkucnVsZSgo56uW5bGP5Lmf57K+5b2p5pWw5o2uLCBsYXp5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn8J+NieerluWxj+S5n+eyvuW9qScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICjnq5blsY/kuZ/nsr7lvanmlbDmja4gPT0gW10gfHwg56uW5bGP5Lmf57K+5b2p5pWw5o2uID09ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiaWc+PGZvbnQgY29sb3I9XFxcInJlZFxcXCI+4q2Q6K+l5b2x54mHL+inhumikeayoeacieebuOWFs+erluWxj+efreinhumikeWTpn7irZA8L2ZvbnQ+PC9iaWc+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ3RvYXN0Oi8v6YO95rKh5pyJ77yM77yM5L2g54K55ZWl5ZGAficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pWs6K+35pyf5b6FficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICDnq5blsY/kuZ/nsr7lvanmlbDmja4uZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnN1YnRpdGxlICsgJ1xcXFxuJyArIGxpc3QubG9uZ190aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmxpbmssXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkOiBsaXN0LmNpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWRnZTogbGlzdC5iYWRnZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwg56uW5bGP5Lmf57K+5b2p5pWw5o2uLCBsYXp5KVxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rKh5pyJ5pWw5o2u5ZOmfidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09ICfwn5Sl57K+5b2p5LqM5YibJykge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAg57K+5b2p5LqM5Yib5pWw5o2uID0gRGF0YS5zZWN0aW9uWzJdLmVwaXNvZGVzO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoKS5ydWxlKCjnsr7lvankuozliJvmlbDmja4sIGxhenkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0UGFnZVRpdGxlKCfwn5Sl57K+5b2p5LqM5YibJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKOeyvuW9qeS6jOWIm+aVsOaNriA9PSBbXSB8fCDnsr7lvankuozliJvmlbDmja4gPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPGJpZz48Zm9udCBjb2xvcj1cXFwicmVkXFxcIj7irZDor6XlvbHniYcv6KeG6aKR5rKh5pyJ5LqM5Yib5L2c5ZOB5ZOmfuKtkDwvZm9udD48L2JpZz4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAndG9hc3Q6Ly/pg73msqHmnInvvIzvvIzkvaDngrnllaXlkYB+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmlazor7fmnJ/lvoV+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIOeyvuW9qeS6jOWIm+aVsOaNri5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDpkojlr7npg6jliIblj4LmlbDnvLrlpLHnmoTmg4XlhrXlpoLlh6Hkurrkv67ku5nkvKDlhpnnmoTvvIzvvIxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3QuYWlkID09IDAgfHwgbGlzdC5jaWQgPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmllZGVvRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9haWQ9XFxcIiArIGxpc3QubGluay5zcGxpdCgnYXYnKVsxXSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiAnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXFxcIkdFVFxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkID0gdmllZGVvRGF0YS5haWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gdmllZGVvRGF0YS5idmlkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gdmllZGVvRGF0YS5jaWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQgPSBsaXN0LmFpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBsaXN0LmJ2aWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSBsaXN0LmNpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3Quc3VidGl0bGUgKyAnXFxcXG4nICsgbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkOiBidmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZDogY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgICAgICB9LCDnsr7lvankuozliJvmlbDmja4sIGxhenkpXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/msqHmnInmlbDmja7lk6Z+J1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mraPlnKjov5vlhaVcXFwiICsgaW5wdXQgKyBcXFwi55WM6Z2iLi4uXFxcIjtcXG4gICAgICAgIH0pXFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogXFxcImljb25fNVxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogJ+eyvuW9qee7p+e7rSdcXG4gICAgfVxcbn0pO1xcbi8vIOaYvuekuuaooeW8j+abtOaUueaooeWdl1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBnZXRJdGVtKCfmqKHlvI8nLCAn5Y+M6L65JyksXFxuICAgIGltZzogZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpID09ICfliJfooagnID8gaW1nTGluay7liJfooaggOiBpbWdMaW5rLuWPjOi+uSxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqCA9IEpTT04ucGFyc2UoZ2V0TXlWYXIoJ+aYvuekuueahOWJp+mbhuWIl+ihqCcpLChrZXksdmFsdWUpPT57XFxuICAgICAgICAgICAgaWYgKGtleSA9PT0gJ2FpZCcgfHwga2V5ID09PSAnY2lkJykge1xcbiAgICAgICAgICAgICAgICAvLyDlsIblpKfmlbDlrZfovazmjaLkuLpCaWdJbnRcXG4gICAgICAgICAgICAgICAgcmV0dXJuIEJpZ0ludCh2YWx1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJykge1xcbiAgICAgICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqC5mb3JFYWNoKGVsID0+IHtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbShlbC5saW5rLCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzInLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzZXRJdGVtKCfmqKHlvI8nLCAn5Y+M6L65JylcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAg5pi+56S655qE5Ymn6ZuG5YiX6KGoLmZvckVhY2goZWwgPT4ge1xcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKGVsLmxpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldEl0ZW0oJ+aooeW8jycsICfliJfooagnKVxcbiAgICAgICAgfVxcbiAgICAgICAgaW1nTGluayA9IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKTtcXG4gICAgICAgIHVwZGF0ZUl0ZW0oJ+aYvuekuuaooeW8jycsIHtcXG4gICAgICAgICAgICB0aXRsZTogZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpLFxcbiAgICAgICAgICAgIGltZzogZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpID09ICfliJfooagnID8gaW1nTGluay7liJfooaggOiBpbWdMaW5rLuWPjOi+uSxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIh+aNouaooeW8j+S4ujonICsgZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpXFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogJ2ljb25fNScsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogJ+aYvuekuuaooeW8jydcXG4gICAgfVxcbn0sIHtcXG4gICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJyxcXG59KTtcXG4vLyDpgInmj5LmqKHlnZfigJTig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IHRpdGxlOiAn6Kej5p6Q77ya8J+UmDxmb250IGNvbG9yPVxcXCInICsgQ29sb3IgKyAnXFxcIj4nICsgb3AgKyAnPC9mb250PlxcXFx0XFxcXHTpobXnoIHvvJo8Zm9udCBjb2xvcj1cXFwiJyArIENvbG9yICsgJ1xcXCI+JyArICgoZ2V0TXlWYXIoJ+WIhumbhui1tycsICfpppbpobUnKSA9PSAn6aaW6aG1JykgPyAn6aaW6aG1JyA6IChnZXRNeVZhcign5YiG6ZuG6LW3JykgKyAnLScgKyBnZXRNeVZhcign5YiG6ZuG57uIJykpKSArICc8L2ZvbnQ+JyxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqc29uLCDmnaXmupAsIENvbG9yLCBvcCwg5b2x54mH5ZCN56ewLCDmkJzntKLmqKHlvI8sIOiwg+eUqOWQjeensCkgPT4ge1xcbiAgICAgICAgZXZhbChnZXRNeVZhcign566A5o+SJykpO1xcbiAgICAgICAgcmV0dXJuICQoZXZhbChnZXRNeVZhcign6Kej5p6Q5pWw57uEJykpLCAzKS5zZWxlY3QoKGpzb24sIOadpea6kCwgQ29sb3IsIG9wLCDlvbHniYflkI3np7AsIOaQnOe0ouaooeW8jywg6LCD55So5ZCN56ewKSA9PiB7XFxuICAgICAgICAgICAgc2V0RmlsZSA9IGdldE15VmFyKCdzZXRGaWxlJyk7XFxuICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC/wn5GJL2csICcnKTtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT09ICfinI3vuI/ovoXliqknKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCkucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2hvbWU/cnVsZT3phY3nva7liqnmiYsnKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PT0gJ/Cfk6bvuI/prZTmlq0nKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPee8lui+kSNub0hpc3RvcnkjXFxcIjtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09PSAn8J+UjeaQnOe0oicpIHtcXG4gICAgICAgICAgICAgICAgaWYgKOaQnOe0ouaooeW8jyA9PSAn5YiG57uEJykge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3NlYXJjaD9zPVxcXCIgKyDlvbHniYflkI3np7AgKyBcXFwiJmdyb3VwPVxcXCIgKyDosIPnlKjlkI3np7A7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vc2VhcmNoP3M9XFxcIiArIOW9seeJh+WQjeensCArIFxcXCImcnVsZT1cXFwiICsg6LCD55So5ZCN56ewO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIOWOn+WFiOeahOmFjee9rlxcbiAgICAgICAgICAgIG9yaWdpblNldHRpbmdzID0gSlNPTi5zdHJpbmdpZnkoanNvbi5zZXR0aW5ncyk7XFxuICAgICAgICAgICAgLy8g5L+u5pS56YWN572uXFxuICAgICAgICAgICAgZXZhbCgnanNvbi5zZXR0aW5ncy4nICsg5p2l5rqQICsgJz1pbnB1dDsnKTtcXG4gICAgICAgICAgICBzZXRGaWxlID0gc2V0RmlsZS5yZXBsYWNlKG9yaWdpblNldHRpbmdzLCBKU09OLnN0cmluZ2lmeShqc29uLnNldHRpbmdzKSk7XFxuICAgICAgICAgICAgc2F2ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJywgc2V0Rm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oLmZvckVhY2goZWwgPT4ge1xcbiAgICAgICAgICAgIGRlbGV0ZUl0ZW0oZWwubGluayk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIC8vIOa3u+WKoFxcbiAgICAgICAgbGF6eSA9IGdldE15VmFyKCdsYXp5Jyk7XFxuICAgICAgICDliafpm4bliJfooaggPSBKU09OLnBhcnNlKGdldE15VmFyKCfliafpm4bliJfooagnKSwoa2V5LHZhbHVlKT0+e1xcbiAgICAgICAgICAgIGlmIChrZXkgPT09ICdhaWQnIHx8IGtleSA9PT0gJ2NpZCcpIHtcXG4gICAgICAgICAgICAgICAgLy8g5bCG5aSn5pWw5a2X6L2s5o2i5Li6QmlnSW50XFxuICAgICAgICAgICAgICAgIHJldHVybiBCaWdJbnQodmFsdWUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gdmFsdWU7XFxuICAgICAgICB9KTtcXG4gICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqCA9IOWJp+mbhuWIl+ihqC5zbGljZShzdGFydCAtIDEsIGVuZCk7XFxuICAgICAgICBuZXdBcnJheSA9IFtdO1xcbiAgICAgICAgaW5kZXggPSAxO1xcbiAgICAgICAg5pi+56S655qE5Ymn6ZuG5YiX6KGoLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJykge1xcbiAgICAgICAgICAgICAgICBuZXdBcnJheS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgYnZpZDogbGlzdC5idmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgYmFkZ2U6IGxpc3QuYmFkZ2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnRpdGxlLm1hdGNoKC9bMC05XS8pID8gKGxpc3QuYmFkZ2UgKyAn56ysJyArIGxpc3QudGl0bGUgKyAn6K+dJykgOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQ6IGxpc3QuYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjaWQ6IGxpc3QuY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpbmRleCArPSAxO1xcbiAgICAgICAgfSk7XFxuICAgICAgICBhZGRJdGVtQWZ0ZXIoZ2V0TXlWYXIoJ+acq+mhtScpLCBuZXdBcnJheSk7XFxuICAgICAgICBwdXRNeVZhcign5pi+56S655qE5Ymn6ZuG5YiX6KGoJywg5pi+56S655qE5Ymn6ZuG5YiX6KGoKTtcXG4gICAgfSkpO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgdGl0bGU6ICfiiLcnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogJ+WNoOS9jeespicsXFxuICAgICAgICB9XFxuICAgIH0pXFxuICAgIHB1dE15VmFyKCfliIbpm4botbcnLCAxKTtcXG4gICAgcHV0TXlWYXIoJ+WIhumbhue7iCcsIOavj+mhtembhuaVsCk7XFxuICAgIHB1dE15VmFyKCfliafpm4bliJfooagnLCDliafpm4bliJfooagpO1xcbiAgICDmgLvpobXmlbAgPSBNYXRoLmNlaWwo5Ymn6ZuG6ZW/5bqmIC8g5q+P6aG16ZuG5pWwKTtcXG4gICAgc3RhcnQgPSAxO1xcbiAgICBlbmQgPSDmr4/pobXpm4bmlbA7XFxuICAgIGZvciAobGV0IHBhZ2UgPSAxOyBwYWdlIDw9IOaAu+mhteaVsDsgcGFnZSsrKSB7XFxuICAgICAgICBpZiAoZW5kID4g5Ymn6ZuG6ZW/5bqmKSB7XFxuICAgICAgICAgICAgZW5kID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XFxucHV0TXlWYXIoJ+aYvuekuueahOWJp+mbhuWIl+ihqCcsIOaYvuekuueahOWJp+mbhuWIl+ihqCk7XFxuaW5kZXggPSAxO1xcbuaYvuekuueahOWJp+mbhuWIl+ihqC5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICBpZiAoZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpID09ICfliJfooagnKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgaW5kZXggKz0gMTtcXG59KTtcXG5zZXRSZXN1bHQoZCk7XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCJ1cOS4u+mhtVwiLFwicGF0aFwiOlwidXBIb21lXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbi8vIOmihOWkhOeQhlxcbnB1dE15VmFyKCd1cEluZm8nLCAn5YWzJyk7XFxuc2V0UGFnZVRpdGxlKE1ZX1BBUkFNUy50aXRsZSk7XFxuaW1nTGluayA9IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKTtcXG4vLyDpmLLmraLlj43niKzomavvvIzku47kuIrkuIDkuKrpobXpnaLkvKDpgJLmlbDmja7igJTigJTlj43niKzomavkuKXph41cXG51cE1pZCA9IE1ZX1BBUkFNUy5taWQgKyBcXFwiXFxcIjtcXG51cE5hbWUgPSBNWV9QQVJBTVMudGl0bGU7XFxudXBGYWNlID0gTVlfUEFSQU1TLmZhY2U7XFxucmVsYXRpb24gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS51c2VyTWFwcGluZyh1cE1pZCk7XFxuLy8g5aS05YOP5qCPXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHVwTmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh1cE1pZCkgPT4ge1xcbiAgICAgICAgaWYgKGdldE15VmFyKCd1cEluZm8nLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBkZWxldGVJdGVtKCd1cEluZm8nKTtcXG4gICAgICAgICAgICBwdXRNeVZhcigndXBJbmZvJywgJ+WFsycpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAvLyDnlKjmiLfln7rmnKzkv6Hmga9cXG4gICAgICAgICAgICAgICAgcXVlcnlKc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgbWlkOiB1cE1pZCxcXG4gICAgICAgICAgICAgICAgICAgIHRva2VuOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIHBsYXRmb3JtOiAnd2ViJyxcXG4gICAgICAgICAgICAgICAgICAgIHdlYl9sb2NhdGlvbjogMTU1MDEwMVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHBhcm1zID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0V2JpRW5jKHF1ZXJ5SnNvbik7XFxuICAgICAgICAgICAgICAgIGluZm9MaW5rID0gJ2h0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3NwYWNlL3diaS9hY2MvaW5mbz8nICsgcGFybXM7XFxuICAgICAgICAgICAgICAgIHVwRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goaW5mb0xpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgdXBOYW1lID0gdXBEYXRhLm5hbWU7XFxuICAgICAgICAgICAgICAgIHVwU2V4ID0gdXBEYXRhLnNleDtcXG4gICAgICAgICAgICAgICAgdXBTaWduID0gdXBEYXRhLnNpZ247XFxuICAgICAgICAgICAgICAgIHVwQmlydGhkYXkgPSB1cERhdGEuYmlydGhkYXk7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICB1cFNjaG9vbCA9IHVwRGF0YS5zY2hvb2wubmFtZTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBTY2hvb2wgPSAnJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBJZGVudGlmaWNhdGlvbiA9IHVwRGF0YS5vZmZpY2lhbC50aXRsZTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBJZGVudGlmaWNhdGlvbiA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcignY3VycmVudFVwJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICd1cDonICsgdXBOYW1lICsgJ1xcXFxubWlkOicgKyB1cE1pZCArICdcXFxcbuaAp+WIqzonICsgdXBTZXggKyAnXFxcXG7nlJ/ml6U6JyArICh1cEJpcnRoZGF5ID09ICcnID8gJ+acquWhq+WGmScgOiB1cEJpcnRoZGF5KSArICdcXFxcbicgKyAodXBTY2hvb2wgPT0gJycgPyAnJyA6ICflrabmoKE6JyArIHVwU2Nob29sICsgJ1xcXFxuJykgKyAodXBTaWduID09ICcnID8gJ1xcXFxuJyA6IHVwU2lnbiArICdcXFxcbicpICsgKHVwSWRlbnRpZmljYXRpb24gPT0gJycgPyAnJyA6ICforqTor4E6JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbG9uZ190ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICd1cEluZm8nXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKCdjdXJyZW50VXAnLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WlveWDj+WHuuS6hueCueaEj+Wklu+8n+S7gOS5iOmDveacqOacieWRon4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAndXBJbmZvJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcHV0TXlWYXIoJ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KSkuZGF0YS5pdGVtc19saXN0cztcXG4vLyDop4bpopHlkIjpm4bjgIHns7vliJdcXG50cnkge1xcbiAgICB1cFZpZGVvLnNlYXNvbnNfbGlzdC5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgc2Vhc29uX2lkID0gbGlzdC5tZXRhLnNlYXNvbl9pZDtcXG4gICAgICAgIC8vIOagh+mimC3ot7Povazmm7TlpJpcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiIzMzY2NjY1xcXCI+JyArIGxpc3QubWV0YS5uYW1lLnN1YnN0cmluZygwLCAzMCkgKyAnPC9mb250PlxcXFx0XFxcXHQ8Zm9udCBjb2xvcj1cXFwicmVkXFxcIj4nICsgbGlzdC5tZXRhLnRvdGFsICsgJzwvZm9udD5cXHTinq4nLFxcbiAgICAgICAgICAgIGltZzogaW1nTGluay7lkIjpm4bmlofku7blpLksXFxuICAgICAgICAgICAgLy8gaW1nOiBsaXN0Lm1ldGEuY292ZXIrJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKCh1cE1pZCwgc2Vhc29uX2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5P2Z5cGFnZScpLnJ1bGUoKHVwTWlkLCBzZWFzb25faWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdSA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9wb2x5bWVyL3NwYWNlL3NlYXNvbnNfYXJjaGl2ZXNfbGlzdD9taWQ9JyArIHVwTWlkICsgJyZzZWFzb25faWQ9JyArIHNlYXNvbl9pZCArICcmc29ydF9yZXZlcnNlPWZhbHNlJnBhZ2VfbnVtPScgKyBNWV9QQUdFICsgJyZwYWdlX3NpemU9MzAnO1xcbiAgICAgICAgICAgICAgICAgICAgVmlkZW8gPSBKU09OLnBhcnNlKGZldGNoKHUsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICAgICAgICAgICAgICBtYXhQYWdlID0gTWF0aC5jZWlsKFZpZGVvLnBhZ2UudG90YWwgLyBWaWRlby5wYWdlLnBhZ2Vfc2l6ZSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA8PSBtYXhQYWdlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvZPliY0656ysJyArIFZpZGVvLnBhZ2UucGFnZV9udW0gKyAn6aG1XFxcXHRcXFxcdFxcXFx05YWx5pyJJyArIG1heFBhZ2UgKyAn6aG1LCcgKyBWaWRlby5wYWdlLnRvdGFsICsgJ+adoeaVsOaNricsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFZpZGVvLmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHVwTWlkLCBzZWFzb25faWQpXFxuICAgICAgICAgICAgfSwgdXBNaWQsIHNlYXNvbl9pZClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMgPT09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGxvZyhsaXN0Lm1ldGEubmFtZSArICfkuLrnqbonKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoIDwgMikge1xcbiAgICAgICAgICAgICAgICBsaXN0LmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5hcmNoaXZlcy5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlpb3lrrbkvJnvvIzov5nlrrbkvJnmsqHmnInlkIjpm4bop4bpopHvvIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuimgeS4jeWOu+eCueWHu+WFqOmDqOinhumikeeci+eci35cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IDI7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5hcmNoaXZlc1tpXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuYXJjaGl2ZXNbaV0ucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LmFyY2hpdmVzW2ldLnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFyY2hpdmVzW2ldLmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59IGNhdGNoIChlKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+WQiOmbhuS4uuepuicsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIGRlc2M6ICdTb3JyeSzmsqHmnInmlbDmja7lkaJ+JyxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgIH0pO1xcbn1cXG50cnkge1xcbiAgICB1cFZpZGVvLnNlcmllc19saXN0LmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICBzZXJpZXNfaWQgPSBsaXN0Lm1ldGEuc2VyaWVzX2lkO1xcbiAgICAgICAgLy8g5qCH6aKYLei3s+i9rOabtOWkml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gICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgbWF4UGFnZSA9IE1hdGguY2VpbChWaWRlby5wYWdlLnRvdGFsIC8gVmlkZW8ucGFnZS5zaXplKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFIDw9IG1heFBhZ2UpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+W9k+WJjTrnrKwnICsgVmlkZW8ucGFnZS5udW0gKyAn6aG1XFxcXHRcXFxcdFxcXFx05YWx5pyJJyArIG1heFBhZ2UgKyAn6aG1LCcgKyBWaWRlby5wYWdlLnRvdGFsICsgJ+adoeaVsOaNricsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFZpZGVvLmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHVwTWlkLCBzZXJpZXNfaWQpXFxuICAgICAgICAgICAgfSwgdXBNaWQsIHNlcmllc19pZClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMgPT09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGxvZyhsaXN0Lm1ldGEubmFtZSArICfkuLrnqbonKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoIDwgMikge1xcbiAgICAgICAgICAgICAgICBsaXN0LmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5hcmNoaXZlcy5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlpb3lrrbkvJnvvIzov5nlrrbkvJnmsqHmnInlkIjpm4bop4bpopHvvIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuimgeS4jeWOu+eCueWHu+WFqOmDqOinhumikeeci+eci35cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IDI7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5hcmNoaXZlc1tpXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuYXJjaGl2ZXNbaV0ucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LmFyY2hpdmVzW2ldLnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFyY2hpdmVzW2ldLmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59IGNhdGNoIChlKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+ezu+WIl+S4uuepuicsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIGRlc2M6ICdTb3JyeSzmsqHmnInmlbDmja7lkaJ+JyxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgIH0pO1xcbn1cXG4vLyB1cOaKleeov1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAnVEHnmoTop4bpopEs54K55Ye75bGV5byA5YWo6YOoJyxcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKHVwTWlkKSA9PiB7XFxuICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKHVwTWlkKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBxdWVyeUpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICBtaWQ6IHVwTWlkLFxcbiAgICAgICAgICAgICAgICAgICAgcHM6IDMwLFxcbiAgICAgICAgICAgICAgICAgICAgdGlkOiBnZXRNeVZhcignX3RpZCcsICcwJyksXFxuICAgICAgICAgICAgICAgICAgICBzcGVjaWFsX3R5cGU6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgcG46IGdldE15VmFyKCdfcGFnZScsICcxJyksXFxuICAgICAgICAgICAgICAgICAgICBrZXl3b3JkOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIG9yZGVyOiAncHViZGF0ZScsXFxuICAgICAgICAgICAgICAgICAgICBwbGF0Zm9ybTogJ3dlYicsXFxuICAgICAgICAgICAgICAgICAgICAvLyB3ZWJfbG9jYXRpb246IDE1NTAxMDEsXFxuICAgICAgICAgICAgICAgICAgICBvcmRlcl9hdm9pZGVkOiB0cnVlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcGFybXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRXYmlFbmMocXVlcnlKc29uKTtcXG4gICAgICAgICAgICAgICAgZGF0YUxpbmsgPSAnaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvc3BhY2Uvd2JpL2FyYy9zZWFyY2g/JyArIHBhcm1zO1xcbiAgICAgICAgICAgICAgICB1cFZpZGVvRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goZGF0YUxpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgdGxpc3QgPSB1cFZpZGVvRGF0YS5saXN0LnRsaXN0O1xcbiAgICAgICAgICAgICAgICB2bGlzdCA9IHVwVmlkZW9EYXRhLmxpc3Qudmxpc3Q7XFxuICAgICAgICAgICAgICAgIC8vIOWIhuexu+WSjOmhteeggVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCdfdGlkJywgJzAnKSA9PSAwID8gJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuWFqOmDqDwvZm9udD4nIDogJ+WFqOmDqCcsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ190aWQnLCAoMCArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ19wYWdlJywgKDEgKyBcXFwiXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGZvciAoaXRlbSBpbiB0bGlzdCkge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKHRsaXN0W2l0ZW1dLnRpZCArIFxcXCJcXFwiKSA9PSBnZXRNeVZhcignX3RpZCcsICcwJykgPyAn4oCY4oCY4oCZ4oCZPGZvbnQgY29sb3I9XFxcInJlZFxcXCI+JyArICh0bGlzdFtpdGVtXS5uYW1lICsgYCgke3RsaXN0W2l0ZW1dLmNvdW50fSlgKSArICc8L2ZvbnQ+JyA6ICh0bGlzdFtpdGVtXS5uYW1lICsgYCgke3RsaXN0W2l0ZW1dLmNvdW50fSlgKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgodGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfdGlkJywgKHRpZCArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfcGFnZScsICgxICsgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGxpc3RbaXRlbV0udGlkKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaycsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBtYXhQYWdlID0gTWF0aC5jZWlsKHVwVmlkZW9EYXRhLnBhZ2UuY291bnQgLyB1cFZpZGVvRGF0YS5wYWdlLnBzKTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgcGFnZSA9IDE7IHBhZ2UgPD0gbWF4UGFnZTsgcGFnZSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAocGFnZSArIFxcXCJcXFwiKSA9PSBnZXRNeVZhcignX3BhZ2UnLCAnMScpID8gJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPicgKyAocGFnZSArIFxcXCJcXFwiKSArICc8L2ZvbnQ+JyA6IChwYWdlICsgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChwYWdlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfcGFnZScsIChwYWdlICsgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgcGFnZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIOW5s+mTuuinhumikVxcbiAgICAgICAgICAgICAgICB2bGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHVidGltZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLnRpbWVDb252ZXJ0KGl0ZW0uY3JlYXRlZCk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGl0ZW0ucGxheSArICdcXFxcbicgKyBwdWJ0aW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGl0ZW0uYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn6aG16Z2i6LWw5Lii5LqGLi4uJyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vaTAuaGRzbGIuY29tL2Jmcy9nZW5lcmFsL2Y3YjY2NzAxMWE0NjYxNTczMmM3MDFmNGJiMWQwN2Y3OTNmOGQxZGYucG5nQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+Wkqumikee5geS6hu+8geeojeWQjuWGjeivlX4nLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJwaWNfMVxcXCJcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZC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ICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICBpZiAodXNlcmluZm8uaXNMb2dpbiA9PT0gZmFsc2UpIHtcXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwidXNlck5hbWVcXFwiOiAn5pyq55m75b2VJyxcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJNaWRcXFwiOiAnJyxcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJGYWNlXFxcIjogJycsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogZmFsc2VcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBjdXJyZW50VXNlci51c2VyTmFtZSA9IHVzZXJpbmZvLnVuYW1lO1xcbiAgICAgICAgICAgIGN1cnJlbnRVc2VyLnVzZXJNaWQgPSB1c2VyaW5mby5taWQ7XFxuICAgICAgICAgICAgLy8gMe+8muS8muWRmOW8gOmAmu+8mzDvvJrmnKrlvIDpgJpcXG4gICAgICAgICAgICBjdXJyZW50VXNlci52aXBTdGF0dXMgPSB1c2VyaW5mby52aXBTdGF0dXM7XFxuICAgICAgICAgICAgY3VycmVudFVzZXIuZmFjZSA9IHVzZXJpbmZvLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIjtcXG4gICAgICAgICAgICBzYXZlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dCcsIEpTT04uc3RyaW5naWZ5KGJpbGlEYXRhKSk7XFxuICAgICAgICAgICAgLy8gcmV0dXJuIHRydWU7XFxuICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJOYW1lXFxcIjogY3VycmVudFV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4gICAgICAgIHZhciBzdGVwID0gZGFubXVTZXR0aW5nLnN0ZXA7XFxuICAgICAgICB2YXIgZGF0YSA9ICcnO1xcbiAgICAgICAgdGQgPSBwZGZhKGRhbm11RGF0YSwgJ2kmJmQnKTtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGQubGVuZ3RoOyBpICs9IHN0ZXApIHtcXG4gICAgICAgICAgICB0aW1lcG9pbnQgPSBwZGZoKHRkW2ldLCAnZCYmcCcpLnNwbGl0KFxcXCIsXFxcIilbMF07XFxuICAgICAgICAgICAgY3QgPSBwZGZoKHRkW2ldLCAnZCYmcCcpLnNwbGl0KFxcXCIsXFxcIilbMV07XFxuICAgICAgICAgICAgY29sb3IgPSBwZGZoKHRkW2ldLCAnZCYmcCcpLnNwbGl0KFxcXCIsXFxcIilbM107XFxuICAgICAgICAgICAgLy8g5by55bmV5YaF5a65XFxuICAgICAgICAgICAgY29udGVudCA9IHBkZmgodGRbaV0sICdkJiZUZXh0Jyk7XFxuICAgICAgICAgICAgaWYgKGNvbnRlbnQuaW5kZXhPZignPCcpICE9IC0xIHx8IGNvbnRlbnQuaW5kZXhPZignPicpICE9IC0xIHx8IGNvbnRlbnQuaW5kZXhPZignJicpICE9IC0xIHx8IGNvbnRlbnQuaW5kZXhPZignXFxcXHUwMDAwJykgIT0gLTEgfHwgY29udGVudC5pbmRleE9mKCdcXFxcYicpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB0ZW1wZGF0YSA9IGA8ZCBwPVxcXCIke01hdGgucm91bmQodGltZXBvaW50KX0sJHtjdH0sJHtzaXplfSwke2NvbG9yfSwwXFxcIj4ke2NvbnRlbnR9PC9kPlxcXFxuYDtcXG4gICAgICAgICAgICBkYXRhICs9IHRlbXBkYXRhO1xcbiAgICAgICAgfVxcbiAgICAgICAgZGFubXVzdHIgPSBgPD94bWwgdmVyc2lvbj1cXFwiM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dO1xcbiAgICBuYW1lTGlzdCA9IFtdO1xcbiAgICBoZWFkZXJzID0gW107XFxuICAgIHRyeSB7XFxuICAgICAgICBkYXRhLmF1ZGlvLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgYXVkaW9MaXN0LnB1c2goaXRlbS5iYXNlVXJsKTtcXG4gICAgICAgICAgICBoZWFkZXJzLnB1c2goe1xcbiAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIGRhdGEudmlkZW8uZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBpZiAoaXRlbS5jb2RlY2lkID09IDcpIHtcXG4gICAgICAgICAgICAgICAgdmlkZW9MaXN0LnB1c2goaXRlbS5iYXNlVXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIik7XFxuICAgICAgICAgICAgICAgIGlmIChpdGVtLmlkID09IDEyNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgn5p2c5q+U6KeG55WMJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAxMjUpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJ0hEUiDnnJ/lvanoibInKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDEyMCkge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnNEvotoXmuIUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDExNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMTA4MFA2MOmrmOW4p+eOhycpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gMTEyKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCcxMDgwUCvpq5jnoIHnjocnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDgwKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCcxMDgwUOmrmOa4hScpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNzQpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzcyMFA2MOmrmOW4p+eOhycpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNjQpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzcyMFDpq5jmuIUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDMyKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCc0ODBQ5riF5pmwJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAxNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMzYwUOa1geeVhScpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMjQwUOaegemAnycpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDkv53mjIHplb/luqbkuIDoh7RcXG4gICAgICAgIHdoaWxlIChhdWRpb0xpc3QubGVuZ3RoIDwgdmlkZW9MaXN0Lmxlbmd0aCkge1xcbiAgICAgICAgICAgIC8vIOWkjeWItiBhdWRpb0xpc3Qg5Lit5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ID0gWyflhbPms6gnLCAn5Y+W5YWzJywgJ+aChOaChOWFs+azqCcsICflj5bmtojmgoTmgoTlhbPms6gnLCAn5ouJ6buRJywgJ+WPlua2iOaLiem7kScsICfouKLlh7rnsonkuJ0nLCAn56e75Yqo5YiG57uEJ107XFxuICAgIHJldHVybiAkKHNlbGVjdGlvbiwgMikuc2VsZWN0KChtaWQsIHJlX3NyYykgPT4ge1xcbiAgICAgICAgaWYgKGlucHV0ID09ICfnp7vliqjliIbnu4QnKSB7XFxuICAgICAgICAgICAgYmVmb3JlVGFnaWRzID0gW107XFxuICAgICAgICAgICAgZ3JvdXBzID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0VXNlckdyb3VwKG1pZCk7XFxuICAgICAgICAgICAgaWYgKEpTT04uc3RyaW5naWZ5KGdyb3VwcykgPT0gJ3t9Jykge1xcbiAgICAgICAgICAgICAgICBiZWZvcmVUYWdpZHMucHVzaCgwKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwcm9wIGluIGdyb3Vwcykge1xcbiAgICAgICAgICAgICAgICAgICAgYmVmb3JlVGFnaWRzLnB1c2gocGFyc2VJbnQocHJvcCkpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIOiOt+WPluaIkeeahOWIhue7hFxcbiAgICAgICAgICAgIGZvY3VzR3JvdXBMaXN0ID0gW107XFxuICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0TXlBdHRlbnRpb25Hcm91cExpc3QoKS5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICBmb2N1c0dyb3VwTGlzdC5wdXNoKGxpc3QubmFtZSArICcgJyArIGxpc3QudGFnaWQpO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHJldHVybiAkKGZvY3VzR3JvdXBMaXN0LCAxKS5zZWxlY3QoKGJlZm9yZVRhZ2lkcywgbWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIGFmdGVyVGFnaWRzID0gW107XFxuICAgICAgICAgICAgICAgIGFmdGVyVGFnaWRzLnB1c2gocGFyc2VJbnQoaW5wdXQuc3BsaXQoJyAnKVsxXSkpO1xcbiAgICAgICAgICAgICAgICBmaWRzID0gW107XFxuICAgICAgICAgICAgICAgIGZpZHMucHVzaChOdW1iZXIobWlkKSk7XFxuICAgICAgICAgICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLm1vdmVVc2VycyhiZWZvcmVUYWdpZHMsIGFmdGVyVGFnaWRzLCBmaWRzKTtcXG4gICAgICAgICAgICAgICAgaWYgKHJlcyA9PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v56e75Yqo55So5oi35YiwXFxcIiArIGlucHV0LnNwbGl0KCcgJylbMF0gKyBcXFwi5YiG57uE5oiQ5YqfXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTAxKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6LSm5Y+35pyq55m75b2VXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTExKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vY3NyZuagoemqjOWksei0pVxcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTQwMCkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+axgumUmeivr1xcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gMjIxMDQpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ml6DmnYPpmZBcXFwiXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDIyMTA1KSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5pyq5YWz5rOoXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+acquefpemUmeivr1xcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sIGJlZm9yZVRhZ2lkcywgbWlkKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09ICflhbPms6gnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSAxO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+WPluWFsycpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDI7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5oKE5oKE5YWz5rOoJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gMztcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICflj5bmtojmgoTmgoTlhbPms6gnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSA0O1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+aLiem7kScpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDU7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5Y+W5raI5ouJ6buRJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gNjtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfouKLlh7rnsonkuJ0nKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSA3O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5hZGRBdHRlbnRpb24obWlkLCBhY3QsIHJlX3NyYyk7XFxuICAgICAgICAgICAgcmVsYXRpb24gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS51c2VyTWFwcGluZyhtaWQpO1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3JlbGF0aW9uJywge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcmVsYXRpb24sXFxuICAgICAgICAgICAgICAgIGltZzogcmVsYXRpb24gPT0gJ+acquWFs+azqCcgPyBzdG9yYWdlMC5nZXRNeVZhcign5Zu+5qCHJyku5re75Yqg5YWz5rOoIDogc3RvcmFnZTAuZ2V0TXlWYXIoJ+WbvuaghycpLuW3suWFs+azqFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIGlucHV0ICsgXFxcIuaIkOWKn1xcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTAxKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/otKblj7fmnKrnmbvlvZVcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTExMSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vY3NyZuagoemqjOWksei0pVxcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtNDAwKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fmsYLplJnor69cXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gMjIwMDEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDov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wiOiBTdHJpbmcoY2lkKSxcXG4gICAgICAgICAgICBcXFwicW5cXFwiOiBxbixcXG4gICAgICAgICAgICBcXFwiZm52ZXJcXFwiOiAwLFxcbiAgICAgICAgICAgIC8vIFxcXCJmbnZhbFxcXCI6IDQwNDgsXFxuICAgICAgICAgICAgXFxcImZudmFsXFxcIjogMTYsXFxuICAgICAgICAgICAgXFxcImZvdXJrXFxcIjogMVxcbiAgICAgICAgfSksIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIENvb2tpZTogQ29va2llXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIHJlcyA9IEpTT04ucGFyc2UodSk7XFxuICAgICAgICBpZiAocmVzLmRhdGEuZGFzaCkge1xcbiAgICAgICAgICAgIHJldHVybiByZXMuZGF0YS5kYXNoO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBsb2coXFxcIuayoeacieaJvuWIsGRhc2jlrZfmrrVcXFwiKTtcXG4gICAgICAgICAgICBpZiAocmVzLmRhdGEuc3VwcG9ydF9mb3JtYXRzKSB7XFxuICAgICAgICAgICAgICAgIGlmICh1LmluY2x1ZGVzKFxcXCLor5XnnItcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbXNnID0gXFxcIuaCqOWImuaJjeingueci+eahOinhumikeaYr+ivleeci+inhumike+8jOingueci+WujOaVtOeJh+auteivt+WJjeW+gOWumOe9kei0reS5sO+8gVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICBsb2cobXNnKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5rip6aao5o+Q56S6JywgY29udGVudDogbXNnLCBjb25maXJtOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSwgY2FuY2VsOiAkLnRvU3RyaW5nKCgpID0+IHt9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gcmVzLmRhdGE7XFxuICAgICAgICB9XFxuICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgLy8g5LiA5Lq65LmL5LiL56ys5LiA5a2j55qE56ysMe+8jDLpm4bigJTigJTlj6/ku6Xojrflj5blpKfkvJrlkZjliafpm4bnmoTliY0zbWluXFxuICAgICAgICAgICAgbG9nKCflsJ3or5Xmm7TmlLnor7fmsYLmjqXlj6MuLi46JyArIGUpO1xcbiAgICAgICAgICAgIGxldCB1ID0gcmVxdWVzdChidWlsZFVybChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3BnYy9wbGF5ZXIvd2ViL3BsYXl1cmxcXFwiLCB7XFxuICAgICAgICAgICAgICAgIFxcXCJhdmlkXFxcIjogU3RyaW5nKGF2aWQpLFxcbiAgICAgICAgICAgICAgICBcXFwiY2lkXFxcIjogU3RyaW5nKGNpZCksXFxuICAgICAgICAgICAgICAgIFxcXCJxblxcXCI6IHFuLFxcbiAgICAgICAgICAgICAgICBcXFwiZm52ZXJcXFwiOiAwLFxcbiAgICAgICAgICAgICAgICAvLyBcXFwiZm52YWxcXFwiOiA0MDQ4LFxcbiAgICAgICAgICAgICAgICBcXFwiZm52YWxcXFwiOiAxNixcXG4gICAgICAgICAgICAgICAgXFxcImZvdXJrXFxcIjogMVxcbiAgICAgICAgICAgIH0pLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIENvb2tpZTogQ29va2llXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIC8vIOS7meeOi+eahOaXpeW4uOesrOS4ieWto+esrDEw6ZuG77yM5rKh5pyJZGFzaO+8jOacjeS6hlxcbiAgICAgICAgICAgI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1dGhvci5wdWJfdGltZSArICctJyArIGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLnB1Yl9hY3Rpb24gKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvdXBIb21lJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbWlkOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5taWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIC8vIOS4jeS4gOWumuacieaWh+Wtl+WVilxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYyA9PT0gbnVsbCA/ICc8Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+dXDlpKrmh5LkuobvvIzov57mlofmoYjpg73kuI3mg7PphY0uLi48L2ZvbnQ+JyA6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgLy8g6L+Z5Liq5LiN6IO955SobG9uZ190ZXh0XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmJhc2ljLmNvbW1lbnRfaWRfc3RyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IDFcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS5jb3ZlciArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPueVmeiogDonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmNvbW1lbnQuY291bnQgKyAnXFxcXHRcXFxcdOWIhuS6qzonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmZvcndhcmQuY291bnQgKyAnXFxcXHRcXFxcdOWWnOasojonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0Lmxpa2UuY291bnQgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuWKqOaAgei2s+i/uSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChsaXN0LnR5cGUgPT0gJ0RZTkFNSUNfVFlQRV9GT1JXQVJEJykge1xcbiAgICAgICAgICAgICAgICAvLyDlvJXnlKjvvIzlpJrlh7rkuoZvcmln5oyH5ZCR5LiA5LiqKOi/h+WOuynlt7Llj5HluIPnmoTop4bpopEs5YeG56Gu55qE6K+05piv5byV55So5LmL5YmN55qE5biW5a2Q5LiN5LiA5a6a5piv6KeG6aKR4oiaXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5wdWJfdGltZSArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvdXBIb21lJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbWlkOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5taWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QuYmFzaWMuY29tbWVudF9pZF9zdHIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8g5Lmf5piv57qv5paH5a2X77yM5Zug5Li65Y+q5piv5paH5a2XK+W8leeUqOaXqeW3suaKleeov+eahOinhumikVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IDE3XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAvLyDlvJXnlKjnmoTlhoXlrrnigJTigJTmiKrmlq3vvIjmoLnmja7kuI3lkIznmoTlvJXnlKjnsbvlnovov5vooYzlpITnkIbvvIlcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnPHNtYWxsPjxzbWFsbD7kuIvpnaLlhoXlrrnmnaXoh6rlvJXnlKjnmoTluJblrZAsdXDmmK86PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL3VwSG9tZVxcXCI+JyArIGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSArICc8L2E+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2F1dGhvci5taWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWNlOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lXFxcIlxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgaWYgKGxpc3Qub3JpZy50eXBlID09ICdEWU5BTUlDX1RZUEVfQVYnKSB7XFxuICAgICAgICAgICAgICAgICAgICAvLyDlvJXnlKjop4bpopHor7Tor7RcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdmlkZW9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUuZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsaXN0Lm9yaWcudHlwZSA9PSAnRFlOQU1JQ19UWVBFX1dPUkQnKSB7XFxuICAgICAgICAgICAgICAgICAgICAvLyDlvJXnlKjmloflrZfor7Tor7RcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g6K+E6K66aWTmnaXmupDpg73kuI3kuIDmoLdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3Qub3JpZy5pZF9zdHIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIOe6r+aWh+Wtl1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxN1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3Qub3JpZy50eXBlID09ICdEWU5BTUlDX1RZUEVfRFJBVycpIHtcXG4gICAgICAgICAgICAgICAgICAgIC8vIOW8leeUqOWbvueJh+ivtOivtFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCA9PT0gbnVsbCA/ICc8Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+dXDlpKrmh5LkuobvvIzov57mlofmoYjpg73kuI3mg7PphY0uLi48L2ZvbnQ+JyA6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuZHJhdy5pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMTFcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmRyYXcuaXRlbXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0uc3JjICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncGljXzNfc3F1YXJlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdGVtLnNyYyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+WPr+iDvei/mOacieacqumAgumFjeeahOivtOivtOexu+WeiycpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIOWIhuWJslxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPueVmeiogDonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmNvbW1lbnQuY291bnQgKyAnXFxcXHRcXFxcdOWIhuS6qzonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmZvcndhcmQuY291bnQgKyAnXFxcXHRcXFxcdOWWnOasojonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0Lmxpa2UuY291bnQgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuWKqOaAgei2s+i/uSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChsaXN0LnR5cGUgPT0gJ0RZTkFNSUNfVFlQRV9XT1JEJykge1xcbiAgICAgICAgICAgICAgICAvLyDnuq/mloflrZdcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5wdWJfdGltZSArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS91cEhvbWUnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm1pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWNlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYyA9PT0gbnVsbCA/ICc8Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+dXDlpKrmh5LkuobvvIzov57mlofmoYjpg73kuI3mg7PphY0uLi48L2ZvbnQ+JyA6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5iYXNpYy5jb21tZW50X2lkX3N0cixcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDnuq/mloflrZdcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxN1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+55WZ6KiAOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuY29tbWVudC5jb3VudCArICdcXFxcdFxcXFx05YiG5LqrOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuZm9yd2FyZC5jb3VudCArICdcXFxcdFxcXFx05Zac5qyiOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQubGlrZS5jb3VudCArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGltZ0xpbmsu5Yqo5oCB6Laz6L+5LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3QudHlwZSA9PSAnRFlOQU1JQ19UWVBFX0RSQVcnKSB7XFxuICAgICAgICAgICAgICAgIC8vIOWbvueJh+ivtOivtFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLnB1Yl90aW1lICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3VwSG9tZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhY2U6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmJhc2ljLmNvbW1lbnRfaWRfc3RyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOebuOewv++8iOWbvueJh+WKqOaAge+8iVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IDExXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuZHJhdy5pdGVtcy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0uc3JjICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdwaWNfM19zcXVhcmUnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXRlbS5zcmMgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj7nlZnoqIA6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5jb21tZW50LmNvdW50ICsgJ1xcXFx0XFxcXHTliIbkuqs6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5mb3J3YXJkLmNvdW50ICsgJ1xcXFx0XFxcXHTllpzmrKI6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5saWtlLmNvdW50ICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaW1nTGluay7liqjmgIHotrPov7ksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjov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rpcgd19yaWRcXG4gICAgICAgIHJldHVybiBxdWVyeSArICcmd19yaWQ9JyArIHdiaV9zaWduO1xcbiAgICB9XFxuXFxuICAgIC8vIOiOt+WPluacgOaWsOeahCBpbWdfa2V5IOWSjCBzdWJfa2V5XFxuICAgIGZ1bmN0aW9uIGdldFdiaUtleXMoKSB7XFxuICAgICAgICBjb25zdCBqc29uX2NvbnRlbnQgPSBKU09OLnBhcnNlKGZldGNoKCdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL25hdicsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBtZXRob2Q6ICdHRVQnXFxuICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgIGltZ191cmwgPSBqc29uX2NvbnRlbnQud2JpX2ltZy5pbWdfdXJsO1xcbiAgICAgICAgc3ViX3VybCA9IGpzb25fY29udGVudC53YmlfaW1nLnN1Yl91cmw7XFxuICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgIGltZ19rZXk6IGltZ191cmwuc3Vic3RyaW5nKGltZ191cmwubGFzdEluZGV4T2YoJy8nKSArIDEsIGltZ191cmwubGVuZ3RoKS5zcGxpdCgnLicpWzBdLFxcbiAgICAgICAgICAgIHN1Yl9rZXk6IHN1Yl91cmwuc3Vic3RyaW5nKHN1Yl91cmwubGFzdEluZGV4T2YoJy8nKSArIDEsIHN1Yl91cmwubGVuZ3RoKS5zcGxpdCgnLicpWzBdXFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgY29uc3Qgd2JpX2tleXMgPSBnZXRXYmlLZXlzKCk7XFxuXFxuICAgIGNvbnN0IHF1ZXJ5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ICsgJ0BSZWZlcmVyPScpO1xcbiAgICAvLyDlj6rmnIkxUOeahOaDheWGtVxcbiAgICBpZiAocC5wYWdlcy5sZW5ndGggPT0gMSkge1xcbiAgICAgICAgY2lkID0gcC5wYWdlc1swXS5jaWQ7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnRpdGxlLFxcbiAgICAgICAgICAgIGltZzogcC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoYWlkLCBjaWQsIHFuKSA9PiB7XFxuICAgICAgICAgICAgICAgIC8vIOecn+emu+S6huS4quWkp+iwse+8jOaYjuaYjuabv+aNouaOieS6hu+8jHVh5a2X56ym5Liy5Y+I5Y+Y5Zue5p2l5LqG77yM5Y+I6KaB5aSE55CG5LiA5qyhXFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5iaWxpTGF6eShhaWQsIGNpZCwgcW4pLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpO1xcbiAgICAgICAgICAgIH0sIGFpZCArIFxcXCJcXFwiLCBjaWQgKyBcXFwiXFxcIiwgJzExMicpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicGljXzFcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6J+aSreaUvumHjzonK3Auc3RhdC52aWV3KydcXFxcdFxcXFx0XFxcXHTlvLnluZXmlbA6JytwLnN0YXQuZGFubWFrdSsnXFxcXG7lj5HluIPml6XmnJ86JyskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS50aW1lQ29udmVydChwLmN0aW1lKSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDonYWlkLScrYWlkKyd8Y2lkLScrY2lkLFxcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ2Rt55uS5a2QJywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3NldHRpbmcjbm9IaXN0b3J5Iz9ydWxlPWRt55uS5a2QJztcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5by55bmV5o6n5Yi2JywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpID09ICd0cnVlJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5LiN5Y+XZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuWPl+WIsGRt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJzxmb250IGNvbG9yPVxcXCJibHVlXFxcIj4nICsgcC5vd25lci5uYW1lICsgJzwvZm9udD4nLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cEhvbWVcXFwiLFxcbiAgICAgICAgICAgIGltZzogcC5vd25lci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIG1pZDogcC5vd25lci5taWQsXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwLm93bmVyLm5hbWUsXFxuICAgICAgICAgICAgICAgIGZhY2U6IHAub3duZXIuZmFjZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgLy8g6Jm954S25Y+q5pyJMVAs5L2G5Y+v6IO95aSE5LqO5ZCI6ZuG6KeG6aKR5Lit77yM5b6A5b6A5ZyodXDkuIrkvKDkuK3lsZ7kuo7kuIDlpZflvbHniYdcXG4gICAgICAgIGlmIChwLnVnY19zZWFzb24pIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ/Cfk4HmiYDlsZ7lkIjpm4bvvJo8YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvY29sbGVjdGlvblZpZWRvXFxcIj4nK3AudWdjX3NlYXNvbi50aXRsZSsnPC9hPicsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9jb2xsZWN0aW9uVmllZG8jbm9IaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHsgXFxcInRleHRTaXplXFxcIjogMTIsIGFpZDogYWlkIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IHAuc3RhdC5saWtlLFxcbiAgICAgICAgICAgIGltZzogaGFzTGlrZSA9PSAxID8gaW1nTGluay7lt7LngrnotZ4gOiBpbWdMaW5rLuacqueCuei1nixcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5saWtlTG9naWMoYWlkKVxcbiAgICAgICAgICAgIH0sIGFpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiAnc2V0TGlrZSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IHAuc3RhdC5mYXZvcml0ZSxcXG4gICAgICAgICAgICBpbWc6IGhhc0Zhdm91ciA/IGltZ0xpbmsu5bey5pS26JePIDogaW1nTGluay7mnKrmlLbol48sXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGFpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICB1cE1pZCA9IEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFxcXCIpKS51c2VyTWlkO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZmF2b3VyTG9naWMoYWlkLCB1cE1pZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogJ3NldEZhdm91cidcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICfnqI3lkI7lho3nnIsnLFxcbiAgICAgICAgICAgIGltZzogaW1nTGluay7nqI3lkI7lho3nnIssXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGFpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuanVkZ2VUb3ZpZXcoYWlkKVxcbiAgICAgICAgICAgIH0sIGFpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn5p+l55yL6K+E6K66JyxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgIGltZzogaW1nTGluay7mn6XnnIvor4TorrosXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGFpZCxcXG4gICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiAxXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogcC5kZXNjLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIixcXG4gICAgICAgIH0pO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgLy8g5a2Y5Zyo5aSa6ZuG5YiGUFxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogcC50aXRsZSxcXG4gICAgICAgICAgICBpbWc6IHAucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgZGVzYzon5pKt5pS+6YePOicrcC5zdGF0LnZpZXcrJ1xcXFx0XFxcXHRcXFxcdOW8ueW5leaVsDonK3Auc3RhdC5kYW5tYWt1KydcXFxcbuWPkeW4g+aXpeacnzonKyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLnRpbWVDb252ZXJ0KHAuY3RpbWUpLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChwKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5P2Z5cGFnZScpLnJ1bGUoKHApID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHAuZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxvbmdfdGV4dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICB9LCBwKVxcbiAgICAgICAgICAgIH0sIHApLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicGljXzFcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnZG3nm5LlrZAnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2Uvc2V0dGluZyNub0hpc3RvcnkjP3J1bGU9ZG3nm5LlrZAnO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvLnluZXmjqfliLYnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJykgPT0gJ3RydWUnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIbkuI3lj5dkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5Y+X5YiwZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAnPGZvbnQgY29sb3I9XFxcImJsdWVcXFwiPicgKyBwLm93bmVyLm5hbWUgKyAnPC9mb250PicsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3VwSG9tZVxcXCIsXFxuICAgICAgICAgICAgaW1nOiBwLm93bmVyLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbWlkOiBwLm93bmVyLm1pZCxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHAub3duZXIubmFtZSxcXG4gICAgICAgICAgICAgICAgZmFjZTogcC5vd25lci5mYWNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogcC5zdGF0Lmxpa2UsXFxuICAgICAgICAgICAgaW1nOiBoYXNMaWtlID09IDEgPyBpbWdMaW5rLuW3sueCuei1niA6IGltZ0xpbmsu5pyq54K56LWeLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmxpa2VMb2dpYyhhaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzZXRMaWtlJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogcC5zdGF0LmZhdm9yaXRlLFxcbiAgICAgICAgICAgIGltZzogaGFzRmF2b3VyID8gaW1nTGluay7lt7LmlLbol48gOiBpbWdMaW5rLuacquaUtuiXjyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHVwTWlkID0gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJNaWQ7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5mYXZvdXJMb2dpYyhhaWQsIHVwTWlkKVxcbiAgICAgICAgICAgIH0sIGFpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiAnc2V0RmF2b3VyJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+eojeWQjuWGjeeciycsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLueojeWQjuWGjeeciyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5qdWRnZVRvdmlldyhhaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICfmn6XnnIvor4TorronLFxcbiAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuafpeeci+ivhOiuuixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgXFxcImlkXFxcIjogYWlkLFxcbiAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IDFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICfpgInpm4bliJfooagnLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6JzxzbWFsbD48c21hbGw+5YWxJyArIHAudmlkZW9zICsgJ+adoeinhumikTwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgIGltZzogaW1nTGluay7liJfooagsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcC5wYWdlcy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIGNpZCA9IGl0ZW0uY2lkO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnBhcnQsXFxuICAgICAgICAgICAgICAgIGRlc2M6Zm9ybWF0U2Vjb25kcyhpdGVtLmR1cmF0aW9uKSxcXG4gICAgICAgICAgICAgICAgLy8gaW1nOmltZ0xpbmsu5YiGUOWIl+ihqOmhuSxcXG4gICAgICAgICAgICAgICAgaW1nOml0ZW0uZmlyc3RfZnJhbWUrJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChhaWQsIGNpZCwgcW4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5iaWxpTGF6eShhaWQsIGNpZCwgcW4pLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpO1xcbiAgICAgICAgICAgICAgICB9LCBhaWQgKyBcXFwiXFxcIiwgY2lkICsgXFxcIlxc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biAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogaXRlbS5tZW1iZXIudW5hbWUsXFxuICAgICAgICAgICAgaW1nOiBpdGVtLm1lbWJlci5hdmF0YXIrJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgdXJsOidoaWtlcjovL3BhZ2UvdXBIb21lJyxcXG4gICAgICAgICAgICBkZXNjOic8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj4nK2l0ZW0ucmVwbHlfY29udHJvbC5sb2NhdGlvbiArIFxcXCIgXFxcIiArIGl0ZW0ucmVwbHlfY29udHJvbC50aW1lX2Rlc2MrJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbWlkOiBpdGVtLm1lbWJlci5taWQsXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm1lbWJlci51bmFtZSxcXG4gICAgICAgICAgICAgICAgZmFjZTogaXRlbS5tZW1iZXIuYXZhdGFyXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGl0ZW0uY29udGVudC5tZXNzYWdlLFxcbiAgICAgICAgfSlcXG4gICAgfSlcXG59ZWxzZXtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiAn5aW95YOP5rKh5pyJ6K+E6K665LqG5ZWm77yM77yBJyxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgIH0pXFxufVxcbnNldFJlc3VsdChkKTtcXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuiuoumYheWIl+ihqFwiLFwicGF0aFwiOlwic3Vic2NyaXB0aW9uXCIsXCJydWx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meKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPueojeWQjuWcqOecizwvZm9udD4nIDogJ+eojeWQjuWcqOeciycsXFxyXFxuICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoKSA9PiB7XFxyXFxuICAgICAgICAgICAgc2V0SXRlbSgn5pS26JeP57G75Z6LJywgJ+eojeWQjuWcqOeciycpXFxyXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxyXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXHJcXG4gICAgICAgIH0pLFxcclxcbiAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcclxcbiAgICB9KTtcXHJcXG59XFxyXFxuaWYgKGdldEl0ZW0oJ+aUtuiXj+exu+WeiycsICfmiJHliJvlu7rnmoTmlLbol4/lpLknKSA9PSAn5oiR5Yib5bu655qE5pS26JeP5aS5Jykge1xcclxcbiAgICB0cnkge1xcclxcbiAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcclxcbiAgICAgICAgICAgIGQucHVzaCh7XFxyXFxuICAgICAgICAgICAgICAgIC8vIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxyXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXHJcXG4gICAgICAgICAgICB9LCApO1xcclxcbiAgICAgICAgfVxcclxcbiAgICAgICAgY29sbGVjdGlvbnMgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC92My9mYXYvZm9sZGVyL2xpc3Q0bmF2aWdhdGVcXFwiLCB7XFxyXFxuICAgICAgICAgICAgaGVhZGVyczoge1xcclxcbiAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llXFxyXFxuICAgICAgICAgICAgfVxcclxcbiAgICAgICAgfSkpLmRhdGE7XFxyXF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yb3VwQ29udGVudCA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3YzL2Zhdi9yZXNvdXJjZS9saXN0P21lZGlhX2lkPVxcXCIgKyBnZXRJdGVtKCfmlLbol4/lpLknLCBnZXRNeVZhcigndGVtcElkJykpICsgXFxcIiZwbj1cXFwiICsgcGFnZSArIFxcXCImcHM9MjAma2V5d29yZD0mb3JkZXI9bXRpbWUmdHlwZT0wJnRpZD0wJnBsYXRmb3JtPXdlYiZqc29ucD1qc29ucFxcXCIsIHtcXHJcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxyXFxuICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgICAgICB9KSkuZGF0YS5tZWRpYXM7XFxyXFxuICAgICAgICBncm91cENvbnRlbnQuZm9yRWFjaChsaXN0ID0+IHtcXHJcXG4gICAgICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXHJcXG4gICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxyXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxyXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxyXFxuICAgICAgICAgICAgICAgIGRlc2M6ICdVUDonICsgbGlzdC51cHBlci5uYW1lICsgJ1xcXFxuJyArIGxpc3QuaW50cm8sXFxyXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxyXFxuICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuaWQsXFxyXFxuICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3QudXBwZXIubWlkXFxyXFxuICAgICAgICAgICAgICAgIH1cXHJcXG4gICAgICA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AnQFJlZmVyZXI9JyxcXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChpbnRybykgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5P2Z5cGFnZScpLnJ1bGUoKGludHJvKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaW50cm8sXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxvbmdfdGV4dFxcXCIsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICB9LCBpbnRybylcXG4gICAgICAgIH0sIHZpZGVvRGF0YS5pbnRybyksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInBpY18xXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ2Rt55uS5a2QJywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2Uvc2V0dGluZyNub0hpc3RvcnkjP3J1bGU9ZG3nm5LlrZAnO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICflvLnluZXmjqfliLYnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKSA9PSAndHJ1ZScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIbkuI3lj5dkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5Y+X5YiwZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICB9XFxuICAgIH0sIHtcXG4gICAgICAgIHRpdGxlOiAnPGZvbnQgY29sb3I9XFxcImJsdWVcXFwiPicgKyBwLm93bmVyLm5hbWUgKyAnPC9mb250PicsXFxuICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdXBIb21lXFxcIixcXG4gICAgICAgIGltZzogcC5vd25lci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD7lhbHmnIknICsgdmlkZW9EYXRhLmVwX2NvdW50ICsgJ+adoeinhumikeaVsOaNrjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBtaWQ6IHAub3duZXIubWlkLFxcbiAgICAgICAgICAgIHRpdGxlOiBwLm93bmVyLm5hbWUsXFxuICAgICAgICAgICAgZmFjZTogcC5vd25lci5mYWNlXFxuICAgICAgICB9XFxuICAgIH0sIHtcXG4gICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgfSk7XFxuICAgIHZhciBpbmRleCA9IDE7XFxuICAgIHN0b3JhZ2UwLnB1dFZhcigndmlkZW9TZWN0aW9ucycsIHZpZGVvRGF0YS5zZWN0aW9ucyk7XFxuICAgIHZpZGVvRGF0YS5zZWN0aW9ucy5mb3JFYWNoKGVsID0+IHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfwn5OBJyArIGVsLnRpdGxlLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoZ2V0TXlWYXIoJ2lzRm9sZF8nK2luZGV4LCAneScpID09ICd5Jykge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lzRm9sZF8nK2luZGV4LCAnbicpO1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKCdzZWN0aW9uJyArIGluZGV4ICsgJy1wYXJ0Jyk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5oqY5Y+gJztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdpc0ZvbGRfJytpbmRleCwgJ3knKTtcXG4gICAgICAgICAgICAgICAgICAgIHZpZGVvU2VjdGlvbnMgPSBzdG9yYWdlMC5nZXRWYXIoJ3ZpZGVvU2VjdGlvbnMnKTtcXG4gICAgICAgICAgICAgICAgICAgIHNlY3Rpb25QYXJ0TGlzdCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9TZWN0aW9uc1tpbmRleCAtIDFdLmVwaXNvZGVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYWlkID0gaXRlbS5haWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gaXRlbS5jaWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdCA9IGl0ZW0uYXJjLnN0YXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VjdGlvblBhcnRMaXN0LnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnVxcXFx0XFxcXHRcXFxcdDxzbWFsbD48L2ZvbnQ+4pa277iOJyArIGl0ZW0udGl0bGUgKyAnXFxcXG5cXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0PC9mb250Pjwvc21hbGw+PHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1ncmF5PuaSreaUvumHj++8micgKyBzdGF0LnZpZXcgKyAnXFxcXHRcXFxcdFxcXFx05by55bmV77yaJyArIHN0YXQuZGFubWFrdSArICdcXFxcdFxcXFx0XFxcXHTllpzmrKLvvJonICsgc3RhdC5saWtlICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGFpZCwgY2lkLCBxbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCBxbikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGFpZCArIFxcXCJcXFwiLCBjaWQgKyBcXFwiXFxcIiwgJzExNicpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7IGxpbmVWaXNpYmxlOiBmYWxzZSwgY2xzOiAnc2VjdGlvbicgKyBpbmRleCArICctcGFydCcsaWQ6J2FpZC0nK2FpZCsnfGNpZC0nK2NpZCB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKCdTZWN0aW9uJyArIGluZGV4LCBzZWN0aW9uUGFydExpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWxleW8gCc7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LCBpbmRleCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7IGlkOiAnU2VjdGlvbicgKyBpbmRleCB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGVsLmVwaXNvZGVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgYWlkID0gaXRlbS5haWQ7XFxuICAgICAgICAgICAgY2lkID0gaXRlbS5jaWQ7XFxuICAgICAgICAgICAgc3RhdCA9IGl0ZW0uYXJjLnN0YXQ7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ1cXFxcdFxcXFx0XFxcXHQ8c21hbGw+PC9mb250PuKWtu+4jicgKyBpdGVtLnRpdGxlICsgJ1xcXFxuXFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdDwvZm9udD48L3NtYWxsPjxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9Z3JheT7mkq3mlL7ph4/vvJonICsgc3RhdC52aWV3ICsgJ1xcXFx0XFxcXHRcXFxcdOW8ueW5le+8micgKyBzdGF0LmRhbm1ha3UgKyAnXFxcXHRcXFxcdFxcXFx05Zac5qyi77yaJyArIHN0YXQubGlrZSArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChhaWQsIGNpZCwgcW4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5iaWxpTGF6eShha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bWFzdGVyL3R1Ymlhby5qc29uJyxcXG4gICAgICAgICAgICAnaHR0cHM6Ly9naXRlYS5jb20vY3kvaGlrZXIvcmF3L2NvbW1pdC9iZTIxNjBjNmEwMWRiODczZDlmOTY4MWJhN2U4NmVlYmZhMTE4ZDg2L3R1Ymlhby5qc29uJyxcXG4gICAgICAgICAgICAnaHR0cHM6Ly9yYXcuY29kZWh1Yi5jbi9wL2hpa2VyL2QvdHViaWFvL2dpdC9yYXcvbWFzdGVyL3R1Ymlhby5qc29uP3Rva2VuPUdHZGxJdVZHcVkzYjNMeWRJb3dya3NiVUJDZk15eDJmRjMxV1VaZW80bScsXFxuICAgICAgICAgICAgJ2h0dHBzOi8vZ2l0ZWUuY29tL214eGwtY3kvaGlrZXIvcmF3L21hc3Rlci90dWJpYW8uanNvbidcXG4gICAgICAgIF07XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHJvdXRlLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgZXZhbCgndHViaWFvID0nICsgcmVxdWVzdChyb3V0ZVtpXSkpO1xcbiAgICAgICAgICAgICAgICBpZiAodHViaWFvW1xcXCLkupTlpKdcXFwiXSAmJiB0dWJpYW9bXFxcIuWTlOWTqVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn57q/6Lev77yaJyArIHR1Ymlhb1tpXSArICfooqvlopnkuoYuLi4nKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgbG9nKCfnur/ot6/vvJonICsgdHViaWFvW2ldICsgJ+WHuumUmeS6hi4uLicpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICB0cnkge1xcbiAgICAgICAgdmFyIHd1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lsaWJpbGkuc3ZnIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment