xiaomianao666

小程序:bilili

Jun 29th, 2024
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@bilili@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiYmlsaWxpIiwiYXV0aG9yIjoi5L6g5ZCNIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MTcsImNvbF90eXBlIjoibW92aWVfMV92ZXJ0aWNhbF9waWMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xudmFyIHBhZ2UgPSBNWV9QQUdFO1xuaXNMb2dpbiA9IEpTT04ucGFyc2UoJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2FwaVwiKS5pc0xvZ2dlZEluKCkpO1xuLy8g6aqM6K+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+mmlumhteaYvuekuidcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4g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aUtuiXjyc6XG4gICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2NvbGVjdGlvbicpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICfotrPov7knOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS90cmFjaycpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICfliqjmgIEnOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9sYXRldE5ld3MnKSkucnVsZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvVXBkYXRlVGFibGVzJykpLnJ1bGUpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgfVxufSBlbHNlIHtcbiAgICBsZXQgYSA9IFtdXG4gICAgbGV0IHRpbWUgPSAxMFxuICAgIGEucHVzaCh7XG4gICAgICAgIHRpdGxlOiBgICAgICAgICAgICAgICAgICAgICAg5L2/55So5YmN6aG755+lXG7mnKzop4TliJnosIPnlKhodHRwczovL2dpdGh1Yi5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3TnmoRhcGnvvIzmiYDmnInku6PnoIHlhajpg6jlvIDmupDvvIzlubbkuJTkuI3lrZjlnKjkuIrkvKDnlKjmiLfkv6Hmga/nmoTooYzkuLpcbuacrOinhOWImeS4uuWtpuS5oOebrueahO+8jOivt+S6juWvvOWFpTI05bCP5pe25YaF5Yig6Zmk77yB77yB77yBICAgICAgICAgICAgICAgICAgICAgICAgXG7lvIDlp4vkvb/nlKjmnKzop4TliJnljbPku6PooajpgbXlrojop4TliJkgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgYCxcbiAgICAgICAgXCJjb2xfdHlwZVwiOiBcImxvbmdfdGV4dFwiLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgaWQ6IFwidGV4dFwiXG4gICAgICAgIH1cbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiB0aW1lICsgXCLnp5LlkI7nu6fnu61cIixcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF8xXCIsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBpZDogXCJ0aW1lclwiXG4gICAgICAgIH1cbiAgICB9KVxuICAgIHNldFJlc3VsdChhKVxuICAgIHdoaWxlICh0aW1lICE9IDApIHtcbiAgICAgICAgamF2YS5sYW5nLlRocmVhZC5zbGVlcCgxMDAwKVxuICAgICAgICB0aW1lIC09IDFcbiAgICAgICAgdXBkYXRlSXRlbShcInRpbWVyXCIsIHtcbiAgICAgICAgICAgIHRpdGxlOiB0aW1lICsgXCLnp5LlkI7nu6fnu61cIlxuICAgICAgICB9KVxuICAgIH1cbiAgICBhZGRJdGVtQWZ0ZXIoXCJ0aW1lclwiLCB7XG4gICAgICAgIHRpdGxlOiBcIumAieaLqeWFtuS7luW3sueZu+W9lei0puWPt1wiLFxuICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xuICAgICAgICAgICAgdXNlckxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdC5tYXAoKHApID0+IHsgcmV0dXJuIHAudXNlck5hbWUgfSk7XG4gICAgICAgICAgICByZXR1cm4gJCh1c2VyTGlzdCwgMSkuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSk7XG4gICAgICAgICAgICAgICAgdGVtcCA9IHNldHRpbmcudXNlckxpc3RbMF07XG4gICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdC5tYXAoKHApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHAudXNlck5hbWUgPT09IGlucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLnVzZXJMaXN0WzBdID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSB0ZW1wO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBzYXZlRmlsZShcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xuICAgICAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8v5YiH5o2i5oiQ5YqfXCI7XG4gICAgICAgICAgICB9KVxuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgfSlcbiAgICBhZGRJdGVtQWZ0ZXIoXCJ0aW1lclwiLCB7XG4gICAgICAgIHRpdGxlOiBcIueZu+mZhlwiLFxuICAgICAgICBkZXNjOiBcIueZu+W9leWkseaViO+8n+eCueatpOmHjeaWsOeZu+W9lVwiLFxuICAgICAgICB1cmw6IFwiaGlrZXI6Ly9wYWdlL2xvZ2luI25vUmVjb3JkSGlzdG9yeSNcIixcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgfSlcbiAgICBkZWxldGVJdGVtKFwidGV4dFwiKVxuICAgIGRlbGV0ZUl0ZW0oXCJ0aW1lclwiKVxufVxuc2V0UmVzdWx0KGQpO1xuIiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyoqIyNmeXBhZ2UiLCJncm91cCI6IuKR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cIjtcbiAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICDlsIHpnaIgPSBpdGVtLmNvdmVyKyBcIkBSZWZlcmVyPVwiO1xuICAgICAgICB9XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZS5yZXBsYWNlKC88ZW0gY2xhc3M9XCJrZXl3b3JkXCI+L2csICcnKS5yZXBsYWNlKC88XFwvZW0+L2csICcnKSxcbiAgICAgICAgICAgIGltZzog5bCB6Z2iLFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ZpbG1lcmppI2ltbWVyc2l2ZVRoZW1lIycsXG4gICAgICAgICAgICBjb250ZW50OiBpdGVtLmRlc2MsXG4gICAgICAgICAgICBkZXNjOiBpdGVtLnN0eWxlcyxcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgc2Vhc29uX2lkOiBpdGVtLnNlYXNvbl9pZFxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcbn1cbmlmIChsaXN0Mikge1xuICAgIGxpc3QyLmZvckVhY2goaXRlbSA9PiB7XG4gICAgICAgIGlmICghaXRlbS5jb3Zlci5tYXRjaCgvaHR0cHMvKSkge1xuICAgICAgICAgICAg5bCB6Z2iID0gaXRlbS5jb3Zlci5yZXBsYWNlKCdodHRwJywnaHR0cHMnKSArIFwiQFJlZmVyZXI9XCI7XG4gICAgICAgIH1lbHNle1xuICAgICAgICAgICAg5bCB6Z2iID0gaXRlbS5jb3ZlcisgXCJAUmVmZXJlcj1cIjtcbiAgICAgICAgfVxuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUucmVwbGFjZSgvPGVtIGNsYXNzPVwia2V5d29yZFwiPi9nLCAnJykucmVwbGFjZSgvPFxcL2VtPi9nLCAnJyksXG4gICAgICAgICAgICBpbWc6IOWwgemdoixcbiAgICAgICAgICAgIHVybDogJ2hpa2VyO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vc2VyU2V0dGluZyk7XG4gICAgICAgICAgICBjb29raWUgPSBvcmlnaW5Vc2VyU2V0dGluZy5jb29raWU7XG4gICAgICAgICAgICB1c2VyTmFtZSA9IG9yaWdpblVzZXJTZXR0aW5nLnVzZXJOYW1lO1xuICAgICAgICAgICAgdXNlck1pZCA9IG9yaWdpblVzZXJTZXR0aW5nLnVzZXJNaWQ7XG4gICAgICAgICAgICBmYWNlID0gb3JpZ2luVXNlclNldHRpbmcuZmFjZTtcbiAgICAgICAgICAgIHZpcFN0YXR1cyA9IG9yaWdpblVzZXJTZXR0aW5nLnZpcFN0YXR1cztcbiAgICAgICAgICAgIGlmKGNvb2tpZT09PXVuZGVmaW5lZCl7c2V0dGluZz0ne1widXNlckxpc3RcIjpbXSxcImJmS2V5XCI6XCJcIn0nO31lbHNle1xuICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIHVzZXJMaXN0OiBbe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29va2llOiBjb29raWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1c2VyTmFtZTogdXNlck5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1c2VyTWlkOiB1c2VyTWlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogZmFjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZpcFN0YXR1czogdmlwU3RhdHVzXG4gICAgICAgICAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgICAgICAgICBiZktleTogXCJcIlxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBsb2coXCLmsqHmnInml6fnmoTlkIjms5XnmoTphY3nva7mlofku7ZcIik7XG4gICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgIHVzZXJMaXN0OiBbXSxcbi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WJpbGkuY29tL2d1b2NodWFuZy9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/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+eJhyc6XFxuICAgICAgICBzZWFzb25fdmVyc2lvbiA9IDE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55S15b2xJzpcXG4gICAgICAgIHNlYXNvbl92ZXJzaW9uID0gMjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflhbbku5YnOlxcbiAgICAgICAgc2Vhc29uX3ZlcnNpb24gPSAzO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGRlZmF1bHQ6XFxuICAgICAgICBzZWFzb25fdmVyc2lvbiA9IC0xO1xcbiAgICAgICAgYnJlYWs7XFxufVxcbnN3aXRjaCAoZ2V0TXlWYXIoJ+mFjemfsycsICflhajpg6gnKSkge1xcbiAgICBjYXNlICfljp/lo7AnOlxcbiAgICAgICAgc3Bva2VuX2xhbmd1YWdlX3R5cGUgPSAxO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+S4reaWh+mFjemfsyc6XFxuICAgICAgICBzcG9rZW5fbGFuZ3VhZ2VfdHlwZSA9IDI7XFxuICAgICAgICBicmVhaztcXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIHNwb2tlbl9sYW5ndWFnZV90eXBlID0gLTE7XFxuICAgICAgICBicmVhaztcXG59XFxuc3dpdGNoIChnZXRNeVZhcign5Zyw5Yy6JywgJ+WFqOmDqCcpKSB7XFxuICAgIGNhc2UgJ+S4reWbveWkp+mZhic6XFxuICAgICAgICBhcmVhID0gMTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfml6XmnKwnOlxcbiAgICAgICAgYXJlYSA9IDI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn576O5Zu9JzpcXG4gICAgICAgIGFyZWEgPSAzO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+iLseWbvSc6XFxuICAgICAgICBhcmVhID0gNDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfkuK3lm73muK/lj7AnOlxcbiAgICAgICAgYXJlYSA9IFs2LCA3XTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfpn6nlm70nOlxcbiAgICAgICAgYXJlYSA9IDg7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5rOV5Zu9JzpcXG4gICAgICAgIGFyZWEgPSA5O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+azsOWbvSc6XFxuICAgICAgICBhcmVhID0gMTA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6KW/54+t54mZJzpcXG4gICAgICAgIGFyZWEgPSAxMztcXG4gICAgICAgIGJyZWF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OaciCc6XFxuICAgICAgICBzZWFzb25fbW9udGggPSA0O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJzfmnIgnOlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gNztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICcxMOaciCc6XFxuICAgICAgICBzZWFzb25fbW9udGggPSAxMDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBkZWZhdWx0OlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gLTE7XFxuICAgICAgICBicmVhaztcXG59XFxuLy8g5Yik5pat5ZKM5pig5bCE5bm05Lu9XFxuc3dpdGNoIChnZXRNeVZhcign5aSn57G7JywgJ+WbveWImycpKSB7XFxuICAgIGNhc2UgJ+WbveWImyc6XFxuICAgIGNhc2UgJ+eVquWJpyc6XFxuICAgICAgICAvLyDnlarliaflkozlm73liJvjgJDkuZ/mmK/lj6vlgZrlubTku73kvYblj4LmlbDlkI3jgIHmoLzlvI/lkozlhbbku5bliIbnsbvkuI3kuIDmoLfjgJFcXG4gICAgICAgIGFuaW1lX3llYXIgPSBnZXRNeVZhcign5bm05Lu9JywgJ+WFqOmDqCcpO1xcbiAgICAgICAgc3dpdGNoIChhbmltZV95ZWFyLmluY2x1ZGVzKCctJykpIHtcXG4gICAgICAgICAgICBjYXNlIHRydWU6XFxuICAgICAgICAgICAgICAgIGVhcmx5ID0gYW5pbWVfeWVhci5zcGxpdCgnLScpWzFdO1xcbiAgICAgICAgICAgICAgICBsYXRlciA9IGFuaW1lX3llYXIuc3BsaXQoJy0nKVswXTtcXG4gICAgICAgICAgICAgICAgeWVhciA9IGBbJHtlYXJseX0sJHtOdW1iZXIobGF0ZXIpICsgMX0pYDtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSBmYWxzZTpcXG4gICAgICAgICAgICAgICAgc3dpdGNoIChhbmltZV95ZWFyKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc5MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9ICdbMTk5MCwyMDAwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc4MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9ICdbMTk4MCwxOTkwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfmm7Tml6knOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAnWywxOTgwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICflhajpg6gnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAtMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9IGBbJHthbmltZV95ZWFyfSwke051bWJlcihhbmltZV95ZWFyKSArIDF9KWA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIC8vIOmZpOS6hueVquWJp+WSjOWbveWIm+eahOWFtuS7luWIhuexu1xcbiAgICAgICAgdHZfeWVhciA9IGdldE15VmFyKCflubTku70nLCAn5YWo6YOoJyk7XFxuICAgICAgICBzd2l0Y2ggKHR2X3llYXIuaW5jbHVkZXMoJy0nKSkge1xcbiAgICAgICAgICAgIGNhc2UgdHJ1ZTpcXG4gICAgICAgICAgICAgICAgZWFybHkgPSB0dl95ZWFyLnNwbGl0KCctJylbMV07XFxuICAgICAgICAgICAgICAgIGxhdGVyID0gdHZfeWVhci5zcGxpdCgnLScpWzBdO1xcbiAgICAgICAgICAgICAgICByZWxlYXNlX2RhdGUgPSBgWyR7ZWFybHl9LTAxLTAxIDAwOjAwOjAwLCR7TnVtYmVyKGxhdGVyKSArIDF9LTAxLTAxIDAwOjAwOjAwKWBcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSBmYWxzZTpcXG4gICAgICAgICAgICAgICAgc3dpdGNoICh0dl95ZWFyKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc5MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gJ1sxOTkwLTAxLTAxIDAwOjAwOjAwLDIwMDAtMDEtMDEgMDA6MDA6MDApJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnODDlubTku6MnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbGVhc2VfZGF0ZSA9ICdbMTk4MC0wMS0wMSAwMDowMDowMCwxOTkwLTAxLTAxIDAwOjAwOjAwKSdcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+abtOaXqSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gJ1ssMTk4MC0wMS0wMSAwMDowMDowMCknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5YWo6YOoJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWxlYXNlX2RhdGUgPSAtMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gYFske3R2X3llYXJ9LTAxLTAxIDAwOjAwOjAwLCR7TnVtYmVyKHR2X3llYXIpICsgMX0tMDEtMDEgMDA6MDA6MDApYDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbn1cXG5zd2l0Y2ggKGdldE15VmFyKCfpo47moLwnLCAn5YWo6YOoJykpIHtcXG4gICAgY2FzZSAn55S15b2xJzpcXG4gICAgICAgIHN0eWxlX2lkID0gLTEwO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIC8vIOeVquWJp+agj+ebrlxcbiAgICBjYXNlICfljp/liJsnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfmvKvnlLvmlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflsI/or7TmlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfmuLjmiI/mlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnibnmkYQnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfluIPooovmiI8nOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfng63ooYAnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnqb/otoonOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflpYflubsnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxODtcXG4gICAgICAgIGJyZWFrO1xcbiAgICAvLyDlkovot7PkuobkuIDkuKrmjY9+XFxuICAgIGNhc2UgJ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XRsZSgn6LSm5Y+355m75b2V6aG16Z2iJylcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogJ2Nvb2tpZeeZu+W9lScsXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICByZXR1cm4gJCgnJywgJ+ivt+i+k+WFpeS9oOeahGNvb2tpZScpLmlucHV0KCgpID0+IHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHJldHVybiBcXFwidG9hc3Q6Ly9jb29raWXkuI3og73kuLrnqbpcXFwiO1xcbiAgICAgICAgICAgIGxldCB1c2VyaW5mbyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2XFxcIiwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogaW5wdXRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgIGlmICh1c2VyaW5mby5pc0xvZ2luID09PSBmYWxzZSkgcmV0dXJuIFxcXCJ0b2FzdDovL+S9oOeahGNvb2tpZeiyjOS8vOWkseaViOS6huWWlH5cXFwiO1xcbiAgICAgICAgICAgIHVzZXJJbmZvID0ge1xcbiAgICAgICAgICAgICAgICBjb29raWU6IGlucHV0LFxcbiAgICAgICAgICAgICAgICB1c2VyTmFtZTogdXNlcmluZm8udW5hbWUsXFxuICAgICAgICAgICAgICAgIHVzZXJNaWQ6ICB1c2VyaW5mby5taWQsXFxuICAgICAgICAgICAgICAgIHZpcFN0YXR1czogdXNlcmluZm8udmlwU3RhdHVzLFxcbiAgICAgICAgICAgICAgICBmYWNlOiB1c2VyaW5mby5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgc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FxcbiAgICAgICAgY29va2llID0gZ2V0VmFyKCdiaWxpQ29va2llJywnJyk7XFxuICAgICAgICBsb2coXFxcIuiOt+WPluWIsOeahGNvb2tpZTpcXFwiK2Nvb2tpZSk7XFxuICAgICAgICBpZiAoY29va2llID09IFxcXCJcXFwiKSByZXR1cm4gXFxcInRvYXN0Oi8v6I635Y+WY29va2ll5aSx6LSl77yM5YaN562J562J55yL77yfXFxcIjtcXG4gICAgICAgIGxldCB1c2VyaW5mbyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2XFxcIiwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgaWYgKHVzZXJpbmZvLmlzTG9naW4gPT09IGZhbHNlKSByZXR1cm4gXFxcInRvYXN0Oi8v5L2g5YWI55m75b2V77yM5YaN6I635Y+WY29va2ll77yMT0vvvJ9cXFwiO1xcbiAgICAgICAgdXNlckluZm8gPSB7XFxuICAgICAgICAgICAgY29va2llOiBjb29raWUsXFxuICAgICAgICAgICAgdXNlck5hbWU6IHVzZXJpbmZvLnVuYW1lLFxcbiAgICAgICAgICAgIHVzZXJNaWQ6ICB1c2VyaW5mby5taWQsXFxuICAgICAgICAgICAgdmlwU3RhdHVzOiB1c2VyaW5mby52aXBTdGF0dXMsXFxuICAgICAgICAgICAgZmFjZTogdXNlcmluZm8uZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiXFxuICAgICAgICB9XFxuICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpO1xcbiAgICAgICAgc2V0dGluZy51c2VyTGlzdC51bnNoaWZ0KHVzZXJJbmZvKTtcXG4gICAgICAgIC8vIOi/h+a7pOaOiWNvb2tpZeS4uuepuueahOWFg+e0oFxcbiAgICAgICAgc2V0dGluZy51c2VyTGlzdCA9IHNldHRpbmcudXNlckxpc3QuZmlsdGVyKHVzZXIgPT4gdXNlci5jb29raWUgIT09ICcnKTtcXG4gICAgICAgIHNhdmVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xcbiAgICAgICAgYmFjayh0cnVlKTtcXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lpoLmnpzmsqHmnInnmbvpmYbmiJDlip/vvIzlu7rorq7kvaDkuIvmrKHnmbvpmYbmiJDlip/lkI7kuI3opoHngrnpgqPkuYjlv6t+J1xcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxufSwge1xcbiAgICB1cmw6IFxcXCJodHRwczovL20uYmlsaWJpbGkuY29tL1xcXCIsXFxuICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICBkZXNjOiBcXFwibGlzdCYmc2NyZWVuLTMwMFxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHRva2VuX3RpbWVyID0gZnVuY3Rpb24gKCkge1xcbiAgICAgICAgICAgICAgICB2YXIgdGltZXIgPSBzZXRJbnRlcnZhbCgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBjb29raWUgPSBmYmEuZ2V0Q29va2llKFxcXCJodHRwczovL20uYmlsaWJpbGkuY29tL1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcignYmlsaUNvb2tpZScsIGNvb2tpZSk7XFxuICAgICAgICAgICAgICAgIH0sIDEwMClcXG4gICAgICAgICAgICB9O1xcbiAgICAg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CBjaWQsIDExNikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAvLyDlhbHkuqvkvJrlkZjmkq3mlL7mnYPnm4pcXG4gICAgICAgICAgICBpZiAoYmFkZ2UubWF0Y2goL+S7mOi0uS8pKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKFsn6a2U5pat6Kej5p6QJywgJ+W3sui0reS5sCddLCAxKS5zZWxlY3QoKGlucHV0LCBhaWQsIGNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09ICfprZTmlq3op6PmnpAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaCgnaGlrZXI6Ly9maWxlcy9jYWNoZS9QYXJzZV9Ebi5qcycsIHt9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCAxMTYpLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBsaW5rLCBhaWQsIGNpZClcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYmlsaUxhenkoYWlkLCBjaWQsIDExNikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9XFxufSk7XFxudmFyIENvbG9yID0gXFxcIiMxOUI4OURcX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hTwvZm9udD4nLFxcbiAgICBpbWc6IOWwgemdoixcXG4gICAgdXJsOiAkKCkucnVsZSgo566A5LuLKSA9PiB7XFxuICAgICAgICByZXMgPSB7fTtcXG4gICAgICAgIHZhciBkID0gW107XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5b2x54mH566A5LuL77yaJyArICdcXFxcblxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0JyArIOeugOS7iyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmVzLmRhdGEgPSBkO1xcbiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpO1xcbiAgICB9LCDnroDku4spLFxcbiAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljX2JsdXInLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgIHRpdGxlOiAn6aKE5ZGK44CB6Iqx57Wu5byA5YWzJywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgncHJldmlld1N3aXRjaCcsICdmb2xkJykgPT0gJ2ZvbGQnKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdwcmV2aWV3U3dpdGNoJywgJ29wZW4nKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+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+95Ymn5pel5Y6GLCDmm7TmlrDov5vluqYpLFxcbiAgICBj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knKS5ydWxlKCgpID0+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+ihqCcpKTtcXG4gICAgICAgIGlmIChnZXRJdGVtKCfmqKHlvI8nLCAn5Y+M6L65JykgPT0gJ+WIl+ihqCcpIHtcXG4gICAgICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaguZm9yRWFjaChlbCA9PiB7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oZWwubGluaywge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqC5mb3JFYWNoKGVsID0+IHtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbShlbC5saW5rLCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzZXRJdGVtKCfmqKHlvI8nLCAn5YiX6KGoJylcXG4gICAgICAgIH1cXG4gICAgICAgIGltZ0xpbmsgPSBzdG9yYWdlMC5nZXRNeVZhcign5Zu+5qCHJyk7XFxuICAgICAgICB1cGRhdGVJdGVtKCfmmL7npLrmqKHlvI8nLCB7XFxuICAgICAgICAgICAgdGl0bGU6IGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSxcXG4gICAgICAgICAgICBpbWc6IGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJyA/IGltZ0xpbmsu5YiX6KGoIDogaW1nTGluay7lj4zovrksXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfmjaLmqKHlvI/kuLo6JyArIGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKVxcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICdpY29uXzUnLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6ICfmmL7npLrmqKHlvI8nXFxuICAgIH1cXG59LCB7XFxuICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaycsXFxufSk7XFxuLy8g6YCJ5o+S5qih5Z2X4oCU4oCU5bGA6YOo5Yi35paw54mIXFxu5p2l5rqQID0gJ2JsJztcXG5wdXRNeVZhcign566A5o+SJywgJC50b1N0cmluZygoKSA9PiB7XFxuICAgIGxldCB0aXRsZUFyciA9IFtdXFxuICAgIHNldEZpbGUgPSByZWFkRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKTtcXG4gICAgdHJ5IHtcXG4gICAgICAgIGV2YWwoJ2pzb249JyArIHNldEZpbGUpO1xcbi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lWYXIoJ+WIhumbhue7iCcpKSkgKyAnPC9mb250PicsXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoanNvbiwg5p2l5rqQLCBDb2xvciwgb3AsIOW9seeJh+WQjeensCwg5pCc57Si5qih5byPLCDosIPnlKjlkI3np7ApID0+IHtcXG4gICAgICAgIGV2YWwoZ2V0TXlWYXIoJ+eugOaPkicpKTtcXG4gICAgICAgIHJldHVybiAkKGV2YWwoZ2V0TXlWYXIoJ+ino+aekOaVsOe7hCcpKSwgMykuc2VsZWN0KChqc29uLCDmnaXmupAsIENvbG9yLCBvcCwg5b2x54mH5ZCN56ewLCDmkJzntKLmqKHlvI8sIOiwg+eUqOWQjeensCkgPT4ge1xcbiAgICAgICAgICAgIHNldEZpbGUgPSBnZXRNeVZhcignc2V0RmlsZScpO1xcbiAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZSgv8J+RiS9nLCAnJyk7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09PSAn4pyN77iP6L6F5YqpJykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9ob21lP3J1bGU96YWN572u5Yqp5omLJykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09ICfwn5Om77iP6a2U5patJykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb8mdHlwZT3nvJbovpEjbm9IaXN0b3J5I1xcXCI7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PT0gJ/CflI3mkJzntKInKSB7XFxuICAgICAgICAgICAgICAgIGlmICjmkJzntKLmqKHlvI8gPT0gJ+WIhue7hCcpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9zZWFyY2g/cz1cXFwiICsg5b2x54mH5ZCN56ewICsgXFxcIiZncm91cD1cXFwiICsg6LCD55So5ZCN56ewO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3NlYXJjaD9zPVxcXCIgKyDlvbHniYflkI3np7AgKyBcXFwiJnJ1bGU9XFxcIiArIOiwg+eUqOWQjeensDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyDljp/lhYjnmoTphY3nva5cXG4gICAgICAgICAgICBvcmlnaW5TZXR0aW5ncyA9IEpTT04uc3RyaW5naWZ5KGpzb24uc2V0dGluZ3MpO1xcbiAgICAgICAgICAgIC8vIOS/ruaUuemFjee9rlxcbiAgICAgICAgICAgIGV2YWwoJ2pzb24uc2V0dGluZ3MuJyArIOadpea6kCArICc9aW5wdXQ7Jyk7XFxuICAgICAgICAgICAgc2V0RmlsZSA9IHNldEZpbGUucmVwbGFjZShvcmlnaW5TZXR0aW5ncywgSlNPTi5zdHJpbmdpZnkoanNvbi5zZXR0aW5ncykpO1xcbiAgICAgICAgICAgIHNhdmVGaWxlKCdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicsIHNldEZpbGUpO1xcbiAgICAgICAgICAgIC8vIOWIt+aWsOWFg+e0oFxcbiAgICAgICAgICAgIGV2YWwoZ2V0TXlWYXIoJ+eugOaPkicpKTtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdvcCcsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfop6PmnpDvvJrwn5SYPGZvbnQgY29sb3I9XFxcIicgKyBDb2xvciArICdcXFwiPicgKyBvcCArICc8L2ZvbnQ+XFxcXHRcXFxcdOmhteegge+8mjxmb250IGNvbG9yPVxcXCInICsgQ29sb3IgKyAnXFxcIj4nICsgKChnZXRNeVZhcign5YiG6ZuG6LW3JywgJ+mmlumhtScpID09ICfpppbpobUnKSA/ICfpppbpobUnIDogKGdldE15VmFyKCfliIbpm4botbcnKSArICctJyArIGdldE15VmFyKCfliIbpm4bnu4gnKSkpICsgJzwvZm9udD4nLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/liIfmjaLop6PmnpDlj6PkuLo6XFxcIiArIGlucHV0O1xcbiAgICAgICAgfSwganNvbiwg5p2l5rqQLCBDb2xvciwgb3AsIOW9seeJh+WQjeensCwg5pCc57Si5qih5byPLCDosIPnlKjlkI3np7ApXFxuICAgIH0sIGpzb24sIOadpea6kCwgQ29sb3IsIG9wLCDlvbHniYflkI3np7AsIOaQnOe0ouaooeW8jywg6LCD55So5ZCN56ewKSxcXG4gICAgaW1nOiAnaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS90dWJpYW8vYmlsaWJpbGkuc3ZnJyxcXG4gICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6ICdvcCdcXG4gICAgfVxcbn0pO1xcbi8vIOa7muWKqOWJp+mbhuadoeagj1xcbuWJp+mbhumVv+W6piA9IOWJp+mbhuWIl+ihqC5sZW5ndGg7XFxuaWYgKOWJp+mbhumVv+W6piA+IOavj+mhtembhuaVsCkge1xcbiAgICBwdXRNeVZhcign5Yi35paw6YCJ6ZuGJywgJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICBwdXRNeVZhcign5YiG6ZuG6LW3Jywgc3RhcnQpO1xcbiAgICAgICAgcHV0TXlWYXIoJ+WIhumbhue7iCcsIGVuZCk7XFxuICAgICAgICBldmFsKGdldE15VmFyKCfnroDmj5InKSk7XFxuICAgICAgICB1cGRhdGVJdGVtKCdvcCcsIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+ino+aekO+8mvCflJg8Zm9udCBjb2xvcj1cXFwiJyArIENvbG9yICsgJ1xcXCI+JyArIG9wICsgJzwvZm9udD5cXFxcdFxcXFx06aG156CB77yaPGZvbnQgY29sb3I9XFxcIicgKyBDb2xvciArICdcXFwiPicgKyAoKGdldE15VmFyKCfliIbpm4botbcnLCAn6aaW6aG1JykgPT0gJ+mmlumhtScpID8gJ+mmlumhtScgOiAoZ2V0TXlWYXIoJ+WIhumbhui1tycpICsgJy0nICsgZ2V0TXlWYXIoJ+WIhumbhue7iCcpKSkgKyAnPC9mb250PicsXFxuICAgICAgICB9KVxcbiAgICAgICAgLy8g5Yig6ZmkXFxuICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaggPSBKU09OLnBhcnNlKGdldE15VmFyKCfmmL7npLrnmoTliafpm4bliJfooagnKSk7XFxuICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaguZm9yRWFjaChlbCA9PiB7XFxuICAgICAgICAgICAgZGVsZXRlSXRlbShlbC5saW5rKTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgLy8g5re75YqgXFxuICAgICAgICBsYXp5ID0gZ2V0TXlWYXIoJ2xhenknKTtcXG4gICAgICAgIOWJp+mbhuWIl+ihqCA9IEpTT04ucGFyc2UoZ2V0TXlWYXIoJ+WJp+mbhuWIl+ihqCcpKTtcXG4gICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqCA9IOWJp+mbhuWIl+ihqC5zbGljZShzdGFydCAtIDEsIGVuZCk7XFxuICAgICAgICBuZXdBcnJheSA9IFtdO1xcbiAgICAgICAgaW5kZXggPSAxO1xcbiAgICAgICAg5pi+56S655qE5Ymn6ZuG5YiX6KGoLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJykge1xcbiAgICAgICAgICAgICAgICBuZXdBcnJheS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgYnZpZDogbGlzdC5idmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgYmFkZ2U6IGxpc3QuYmFkZ2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnRpdGxlLm1hdGNoKC9bMC05XS8pID8gKGxpc3QuYmFkZ2UgKyAn56ysJyArIGxpc3QudGl0bGUgKyAn6K+dJykgOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQ6IGxpc3QuYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjaWQ6IGxpc3QuY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpbmRleCArPSAxO1xcbiAgICAgICAgfSk7XFxuICAgICAgICBhZGRJdGVtQWZ0ZXIoZ2V0TXlWYXIoJ+acq+mhtScpLCBuZXdBcnJheSk7XFxuICAgICAgICBwdXRNeVZhcign5pi+56S655qE5Ymn6ZuG5YiX6KGoJywg5pi+56S655qE5Ymn6ZuG5YiX6KGoKTtcXG4gICAgfSkpO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgdGl0bGU6ICfiiLcnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogJ+WNoOS9jeespicsXFxuICAgICAgICB9XFxuICAgIH0pXFxuICAgIHB1dE15VmFyKCfliIbpm4botbcnLCAxKTtcXG4gICAgcHV0TXlWYXIoJ+WIhumbhue7iCcsIOavj+mhtembhuaVsCk7XFxuICAgIHB1dE15VmFyKCfliafpm4bliJfooagnLCDliafpm4bliJfooagpO1xcbiAgICDmgLvpobXmlbAgPSBNYXRoLmNlaWwo5Ymn6ZuG6ZW/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c2Uge1xcbiAgICBwdXRNeVZhcign5YiG6ZuG6LW3JywgMSk7XFxuICAgIHB1dE15VmFyKCfliIbpm4bnu4gnLCDliafpm4bplb/luqYpO1xcbn1cXG4vLyDlsZXnpLrliafpm4Y6XFxu5pi+56S655qE5Ymn6ZuG5YiX6KGoID0g5Ymn6ZuG5YiX6KGoLnNsaWNlKDAsIGdldE15VmFyKCfliIbpm4bnu4gnKSk7XFxucHV0TXlWYXIoJ+aYvuekuueahOWJp+mbhuWIl+ihqCcsIOaYvuekuueahOWJp+mbhuWIl+ihqCk7XFxuaW5kZXggPSAxO1xcbuaYvuekuueahOWJp+mbhuWIl+ihqC5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICBpZiAoZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpID09ICfliJfooagnKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgaW5kZXggKz0gMTtcXG59KTtcXG5zZXRSZXN1bHQoZCk7XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCJ1cOS4u+mhtVwiLFwicGF0aFwiOlwidXBIb21lXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbi8vIOmihOWkhOeQhlxcbnB1dE15VmFyKCd1cEluZm8nLCAn5YWzJyk7XFxuc2V0UGFnZVRpdGxlKE1ZX1BBUkFNUy50aXRsZSk7XFxuaW1nTGluayA9IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKTtcXG4vLyDpmLLmraLlj43niKzomavvvIzku47kuIrkuIDkuKrpobXpnaLkvKDpgJLmlbDmja7igJTigJTlj43niKzomavkuKXph41cXG51cE1pZCA9IE1ZX1BBUkFNUy5taWQgKyBcXFwiXFxcIjtcXG51cE5hbWUgPSBNWV9QQVJBTVMudGl0bGU7XFxudXBGYWNlID0gTVlfUEFSQU1TLmZhY2U7XFxucmVsYXRpb24gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS51c2VyTWFwcGluZyh1cE1pZCk7XFxuLy8g5aS05YOP5qCPXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHVwTmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh1cE1pZCkgPT4ge1xcbiAgICAgICAgaWYgKGdldE15VmFyKCd1cEluZm8nLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBkZWxldGVJdGVtKCd1cEluZm8nKTtcXG4gICAgICAgICAgICBwdXRNeVZhcigndXBJbmZvJywgJ+WFsycpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAvLyDnlKjmiLfln7rmnKzkv6Hmga9cXG4gICAgICAgICAgICAgICAgcXVlcnlKc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgbWlkOiB1cE1pZCxcXG4gICAgICAgICAgICAgICAgICAgIHRva2VuOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIHBsYXRmb3JtOiAnd2ViJyxcXG4gICAgICAgICAgICAgICAgICAgIHdlYl9sb2NhdGlvbjogMTU1MDEwMVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHBhcm1zID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0V2JpRW5jKHF1ZXJ5SnNvbik7XFxuICAgICAgICAgICAgICAgIGluZm9MaW5rID0gJ2h0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3NwYWNlL3diaS9hY2MvaW5mbz8nICsgcGFybXM7XFxuICAgICAgICAgICAgICAgIHVwRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goaW5mb0xpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgdXBOYW1lID0gdXBEYXRhLm5hbWU7XFxuICAgICAgICAgICAgICAgIHVwU2V4ID0gdXBEYXRhLnNleDtcXG4gICAgICAgICAgICAgICAgdXBTaWduID0gdXBEYXRhLnNpZ247XFxuICAgICAgICAgICAgICAgIHVwQmlydGhkYXkgPSB1cERhdGEuYmlydGhkYXk7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICB1cFNjaG9vbCA9IHVwRGF0YS5zY2hvb2wubmFtZTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBTY2hvb2wgPSAnJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBJZGVudGlmaWNhdGlvbiA9IHVwRGF0YS5vZmZpY2lhbC50aXRsZTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBJZGVudGlmaWNhdGlvbiA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcignY3VycmVudFVwJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICd1cDonICsgdXBOYW1lICsgJ1xcXFxubWlkOicgKyB1cE1pZCArICdcXFxcbuaAp+WIqzonICsgdXBTZXggKyAnXFxcXG7nlJ/ml6U6JyArICh1cEJpcnRoZGF5ID09ICcnID8gJ+acquWhq+WGmScgOiB1cEJpcnRoZGF5KSArICdcXFxcbicgKyAodXBTY2hvb2wgPT0gJycgPyAnJyA6ICflrabmoKE6JyArIHVwU2Nob29sICsgJ1xcXFxuJykgKyAodXBTaWduID09ICcnID8gJ1xcXFxuJyA6IHVwU2lnbiArICdcXFxcbicpICsgKHVwSWRlbnRpZmljYXRpb24gPT0gJycgPyAnJyA6ICforqTor4E6JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbG9uZ190ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICd1cEluZm8nXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKCdjdXJyZW50VXAnLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WlveWDj+WHuuS6hueCueaEj+Wklu+8n+S7gOS5iOmDveacqOacieWRon4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAndXBJbmZvJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcHV0TXlWYXIoJ3VwSW5mbycsICflvIAnKTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv6Hmga/mipjlj6A6JyArIGdldE15VmFyKCd1cEluZm8nLCAn5byAJylcXG4gICAgfSwgdXBNaWQpLFxcbiAgICBpbWc6IHVwRmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogJ2N1cnJlbnRVcCdcXG4gICAgfVxcbn0sIHtcXG4gICAgY29sX3R5cGU6ICdsaW5lJ1xcbn0pO1xcbi8vIOWFrOWRilxcbm5vdGljZVRleHQgPSBKU09OLnBhcnNlKGZldGNoKCdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9zcGFjZS9ub3RpY2U/bWlkPScgKyB1cE1pZCArICcmanNvbnA9anNvbnAnLCB7XFxuICAgIGhlYWRlcnM6IHtcXG4gICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIixcXG4gICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICB9XFxufSkpLmRhdGE7XFxuaWYgKG5vdGljZVRleHQg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ICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdSA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9wb2x5bWVyL3NwYWNlL3NlYXNvbnNfYXJjaGl2ZXNfbGlzdD9taWQ9JyArIHVwTWlkICsgJyZzZWFzb25faWQ9JyArIHNlYXNvbl9pZCArICcmc29ydF9yZXZlcnNlPWZhbHNlJnBhZ2VfbnVtPScgKyBNWV9QQUdFICsgJyZwYWdlX3NpemU9MzAnO1xcbiAgICAgICAgICAgICAgICAgICAgVmlkZW8gPSBKU09OLnBhcnNlKGZldGNoKHUsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICAgICAgICAgICAgICBtYXhQYWdlID0gTWF0aC5jZWlsKFZpZGVvLnBhZ2UudG90YWwgLyBWaWRlby5wYWdlLnBhZ2Vfc2l6ZSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA8PSBtYXhQYWdlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvZPliY0656ysJyArIFZpZGVvLnBhZ2UucGFnZV9udW0gKyAn6aG1XFxcXHRcXFxcdFxcXFx05YWx5pyJJyArIG1heFBhZ2UgKyAn6aG1LCcgKyBWaWRlby5wYWdlLnRvdGFsICsgJ+adoeaVsOaNricsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFZpZGVvLmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHVwTWlkLCBzZWFzb25faWQpXFxuICAgICAgICAgICAgfSwgdXBNaWQsIHNlYXNvbl9pZClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMgPT09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGxvZyhsaXN0Lm1ldGEubmFtZSArICfkuLrnqbonKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoIDwgMikge1xcbiAgICAgICAgICAgICAgICBsaXN0LmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5hcmNoaXZlcy5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlpb3lrrbkvJnvvIzov5nlrrbkvJnmsqHmnInlkIjpm4bop4bpopHvvIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuimgeS4jeWOu+eCueWHu+WFqOmDqOinhumikeeci+eci35cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IDI7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5hcmNoaXZlc1tpXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuYXJjaGl2ZXNbaV0ucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LmFyY2hpdmVzW2ldLnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFyY2hpdmVzW2ldLmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59IGNhdGNoIChlKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+WQiOmbhuS4uuepuicsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIGRlc2M6ICdTb3JyeSzmsqHmnInmlbDmja7lkaJ+Jyxc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c2MmcG49JyArIE1ZX1BBR0UgKyAnJnBzPTMwJztcXG4gICAgICAgICAgICAgICAgICAgIFZpZGVvID0gSlNPTi5wYXJzZShmZXRjaCh1LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgbWF4UGFnZSA9IE1hdGguY2VpbChWaWRlby5wYWdlLnRvdGFsIC8gVmlkZW8ucGFnZS5zaXplKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFIDw9IG1heFBhZ2UpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+W9k+WJjTrnrKwnICsgVmlkZW8ucGFnZS5udW0gKyAn6aG1XFxcXHRcXFxcdFxcXFx05YWx5pyJJyArIG1heFBhZ2UgKyAn6aG1LCcgKyBWaWRlby5wYWdlLnRvdGFsICsgJ+adoeaVsOaNricsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFZpZGVvLmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHVwTWlkLCBzZXJpZXNfaWQpXFxuICAgICAgICAgICAgfSwgdXBNaWQsIHNlcmllc19pZClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMgPT09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGxvZyhsaXN0Lm1ldGEubmFtZSArICfkuLrnqbonKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoIDwgMikge1xcbiAgICAgICAgICAgICAgICBsaXN0LmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5hcmNoaXZlcy5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlpb3lrrbkvJnvvIzov5nlrrbkvJnmsqHmnInlkIjpm4bop4bpopHvvIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuimgeS4jeWOu+eCueWHu+WFqOmDqOinhumikeeci+eci35cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IDI7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5hcmNoaXZlc1tpXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuYXJjaGl2ZXNbaV0ucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LmFyY2hpdmVzW2ldLnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFyY2hpdmVzW2ldLmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59IGNhdGNoIChlKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+ezu+WIl+S4uuepuicsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIGRlc2M6ICdTb3JyeSzmsqHmnInmlbDmja7lkaJ+JyxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgIH0pO1xcbn1cXG4vLyB1cOaKleeov1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAnVEHnmoTop4bpopEs54K55Ye75bGV5byA5YWo6YOoJyxcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKHVwTWlkKSA9PiB7XFxuICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKHVwTWlkKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBxdWVyeUpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICBtaWQ6IHVwTWlkLFxcbiAgICAgICAgICAgICAgICAgICAgcHM6IDMwLFxcbiAgICAgICAgICAgICAgICAgICAgdGlkOiBnZXRNeVZhcignX3RpZCcsICcwJyksXFxuICAgICAgICAgICAgICAgICAgICBzcGVjaWFsX3R5cGU6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgcG46IGdldE15VmFyKCdfcGFnZScsICcxJyksXFxuICAgICAgICAgICAgICAgICAgICBrZXl3b3JkOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIG9yZGVyOiAncHViZGF0ZScsXFxuICAgICAgICAgICAgICAgICAgICBwbGF0Zm9ybTogJ3dlYicsXFxuICAgICAgICAgICAgICAgICAgICAvLyB3ZWJfbG9jYXRpb246IDE1NTAxMDEsXFxuICAgICAgICAgICAgICAgICAgICBvcmRlcl9hdm9pZGVkOiB0cnVlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcGFybXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRXYmlFbmMocXVlcnlKc29uKTtcXG4gICAgICAgICAgICAgICAgZGF0YUxpbmsgPSAnaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvc3BhY2Uvd2JpL2FyYy9zZWFyY2g/JyArIHBhcm1zO1xcbiAgICAgICAgICAgICAgICB1cFZpZGVvRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goZGF0YUxpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgdGxpc3QgPSB1cFZpZGVvRGF0YS5saXN0LnRsaXN0O1xcbiAgICAgICAgICAgICAgICB2bGlzdCA9IHVwVmlkZW9EYXRhLmxpc3Qudmxpc3Q7XFxuICAgICAgICAgICAgICAgIC8vIOWIhuexu+WSjOmhteeggVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCdfdGlkJywgJzAnKSA9PSAwID8gJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuWFqOmDqDwvZm9udD4nIDogJ+WFqOmDqCcsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ190aWQnLCAoMCArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ19wYWdlJywgKDEgKyBcXFwiXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGZvciAoaXRlbSBpbiB0bGlzdCkge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKHRsaXN0W2l0ZW1dLnRpZCArIFxcXCJcXFwiKSA9PSBnZXRNeVZhcignX3RpZCcsICcwJykgPyAn4oCY4oCY4oCZ4oCZPGZvbnQgY29sb3I9XFxcInJlZFxcXCI+JyArICh0bGlzdFtpdGVtXS5uYW1lICsgYCgke3RsaXN0W2l0ZW1dLmNvdW50fSlgKSArICc8L2ZvbnQ+JyA6ICh0bGlzdFtpdGVtXS5uYW1lICsgYCgke3RsaXN0W2l0ZW1dLmNvdW50fSlgKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgodGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfdGlkJywgKHRpZCArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfcGFnZScsICgxICsgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGxpc3RbaXRlbV0udGlkKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaycsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBtYXhQYWdlID0gTWF0aC5jZWlsKHVwVmlkZW9EYXRhLnBhZ2UuY291bnQgLyB1cFZpZGVvRGF0YS5wYWdlLnBzKTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgcGFnZSA9IDE7IHBhZ2UgPD0gbWF4UGFnZTsgcGFnZSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAocGFnZSArIFxcXCJcXFwiKSA9PSBnZXRNeVZhcignX3BhZ2UnLCAnMScpID8gJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPicgKyAocGFnZSArIFxcXCJcXFwiKSArICc8L2ZvbnQ+JyA6IChwYWdlICsgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChwYWdlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfcGFnZScsIChwYWdlICsgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgcGFnZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIOW5s+mTuuinhumikVxcbiAgICAgICAgICAgICAgICB2bGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHVidGltZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLnRpbWVDb252ZXJ0KGl0ZW0uY3JlYXRlZCk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGl0ZW0ucGxheSArICdcXFxcbicgKyBwdWJ0aW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGl0ZW0uYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn6aG16Z2i6LWw5Lii5LqGLi4uJyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vaTAuaGRzbGIuY29tL2Jmcy9nZW5lcmFsL2Y3YjY2NzAxMWE0NjYxNTczMmM3MDFmNGJiMWQwN2Y3OTNmOGQxZGYucG5nQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2h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AgIGN1cnJlbnRVc2VyID0gYmlsaURhdGEudXNlckxpc3RbMF07XFxuICAgICAgICB2YXIgY29va2llID0gY3VycmVudFVzZXIuY29va2llO1xcbiAgICAgICAgbGV0IHVzZXJpbmZvID0gSlNPTi5wYXJzZShmZXRjaChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvd2ViLWludGVyZmFjZS9uYXZcXFwiLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICBpZiAodXNlcmluZm8uaXNMb2dpbiA9PT0gZmFsc2UpIHtcXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwidXNlck5hbWVcXFwiOiAn5pyq55m75b2VJyxcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJNaWRcXFwiOiAnJyxcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJGYWNlXFxcIjogJycsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogZmFsc2VcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBjdXJyZW50VXNlci51c2VyTmFtZSA9IHVzZXJpbmZvLnVuYW1lO1xcbiAgICAgICAgICAgIGN1cnJlbnRVc2VyLnVzZXJNaWQgPSB1c2VyaW5mby5taWQ7XFxuICAgICAgICAgICAgLy8gMe+8muS8muWRmOW8gOmAmu+8mzDvvJrmnKrlvIDpgJpcXG4gICAgICAgICAgICBjdXJyZW50VXNlci52aXBTdGF0dXMgPSB1c2VyaW5mby52aXBTdGF0dXM7XFxuICAgICAgICAgICAgY3VycmVudFVzZXIuZmFjZSA9IHVzZXJpbmZvLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIjtcXG4gICAgICAgICAgICBzYXZlR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FxuICAgICAgICAvLyDlrZfkvZPlpKflsI/jgIHlvLnluZXmraXplb9cXG4gICAgICAgIHZhciBkYW5tdVNldHRpbmcgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdoaWtlcjovL2ZpbGVzL2Rt55uS5a2QL3NldHRpbmdzLmpzb24nKSk7XFxuICAgICAgICB2YXIgc2l6ZSA9IGRhbm11U2V0dGluZy5mb250U2l6ZTtcXG4gICAgICAgIHZhciBzdGVwID0gZGFubXVTZXR0aW5nLnN0ZXA7XFxuICAgICAgICB2YXIgZGF0YSA9ICcnO1xcbiAgICAgICAgdGQgPSBwZGZhKGRhbm11RGF0YSwgJ2kmJmQnKTtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGQubGVuZ3RoOyBpICs9IHN0ZXApIHtcXG4gICAgICAgICAgICB0aW1lcG9pbnQgPSBwZGZoKHRkW2ldLCAnZCYmcCcpLnNwbGl0KFxcXCIsXFxcIilbMF07XFxuICAgICAgICAgICAgY3QgPSBwZGZoKHRkW2ldLCAnZCYmcCcpLnNwbGl0KFxcXCIsXFxcIilbMV07XFxuICAgICAgICAgICAgY29sb3IgPSBwZGZoKHRkW2ldLCAnZCYmcCcpLnNwbGl0KFxcXCIsXFxcIilbM107XFxuICAgICAgICAgICAgLy8g5by55bmV5YaF5a65XFxuICAgICAgICAgICAgY29udGVudCA9IHBkZmgodGRbaV0sICdkJiZUZXh0Jyk7XFxuICAgICAgICAgICAgaWYgKGNvbnRlbnQuaW5kZXhPZignPCcpICE9IC0xIHx8IGNvbnRlbnQuaW5kZXhPZignPicpICE9IC0xIHx8IGNvbnRlbnQuaW5kZXhPZignJicpICE9IC0xIHx8IGNvbnRlbnQuaW5kZXhPZignXFxcXHUwMDAwJykgIT0gLTEgfHwgY29udGVudC5pbmRleE9mKCdcXFxcYicpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB0ZW1w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Ly8gcXVhbGl0eU51bT1kYXNoLmF1ZGlvLmxlbmd0aDvkuI3pnIDopoHkuobvvIzmib7liLDkuobmm7Tlpb3nmoTliKTmlq3mlrnms5XvvIzomb3nhLbmiJHlubbkuI3nn6XpgZPov5nkupvlj4LmlbDnmoTlkKvkuYnmmK/ku4DkuYhcXG4gICAgdmlkZW9MaXN0ID0gW107XFxuICAgIGF1ZGlvTGlzdCA9IFtdO1xcbiAgICBuYW1lTGlzdCA9IFtdO1xcbiAgICBoZWFkZXJzID0gW107XFxuICAgIHRyeSB7XFxuICAgICAgICBkYXRhLmF1ZGlvLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgYXVkaW9MaXN0LnB1c2goaXRlbS5iYXNlVXJsKTtcXG4gICAgICAgICAgICBoZWFkZXJzLnB1c2goe1xcbiAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIGRhdGEudmlkZW8uZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBpZiAoaXRlbS5jb2RlY2lkID09IDcpIHtcXG4gICAgICAgICAgICAgICAgdmlkZW9MaXN0LnB1c2goaXRlbS5iYXNlVXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIik7XFxuICAgICAgICAgICAgICAgIGlmIChpdGVtLmlkID09IDEyNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgn5p2c5q+U6KeG55WMJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAxMjUpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJ0hEUiDnnJ/lvanoibInKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDEyMCkge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnNEvotoXmuIUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDExNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMTA4MFA2MOmrmOW4p+eOhycpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gMTEyKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCcxMDgwUCvpq5jnoIHnjocnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDgwKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCcxMDgwUOmrmOa4hScpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNzQpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzcyMFA2MOmrmOW4p+eOhycpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNjQpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzcyMFDpq5jmuIUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDMyKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCc0ODBQ5riF5pmwJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAxNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMzYwUOa1geeVhScpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMjQwUOaegem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AgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6K+35rGC6ZSZ6K+vXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDkwMDAxKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/liJfooajlt7Lmu6FcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gOTAwMDMpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+eov+S7tuW3sue7j+iiq+WIoOmZpFxcXCJcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5pyq55+l6ZSZ6K+vXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmVzID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZGVsVG92aWV3KGFpZCk7XFxuICAgICAgICAgICAgaWYgKHJlcyA9PSAwKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/np7vpmaTmiJDlip9cXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTEwMSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6LSm5Y+35pyq55m75b2VXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC0xMTEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL2NzcmbmoKHpqozlpLHotKVcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTQwMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6K+35rGC6ZSZ6K+vXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mnKrnn6XplJnor69cXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9LCBhaWQpXFxufVxcbi8vIOaTjeS9nOeUqOaIt+WFs+ezu1xcbiQuZXhwb3J0cy5jaGFuZ2VVc2VyUmVsYXRpb24gPSBmdW5jdGlvbiAobWlkLCByZV9zcmMpIHtcXG4gICAgc2VsZWN0aW9uID0gWyflhbPms6gnLCAn5Y+W5YWzJywgJ+aChOaChOWFs+azqCcsICflj5bmtojmgoTmgoTlhbPms6gnLCAn5ouJ6buRJywgJ+WPlua2iOaLiem7kScsICfouKLlh7rnsonkuJ0nLCAn56e75Yqo5YiG57uEJ107XFxuICAgIHJldHVybiAkKHNlbGVjdGlvbiwgMikuc2VsZWN0KChtaWQsIHJlX3NyYykgPT4ge1xcbiAgICAgICAgaWYgKGlucHV0ID09ICfnp7vliqjliIbnu4QnKSB7XFxuICAgICAgICAgICAgYmVmb3JlVGFnaWRzID0gW107XFxuICAgICAgICAgICAgZ3JvdXBzID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0VXNlckdyb3VwKG1pZCk7XFxuICAgICAgICAgICAgaWYgKEpTT04uc3RyaW5naWZ5KGdyb3VwcykgPT0gJ3t9Jykge1xcbiAgICAgICAgICAgICAgICBiZWZvcmVUYWdpZHMucHVzaCgwKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwcm9wIGluIGdyb3Vwcykge1xcbiAgICAgICAgICAgICAgICAgICAgYmVmb3JlVGFnaWRzLnB1c2gocGFyc2VJbnQocHJvcCkpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIOiOt+WPluaIkeeahOWIhue7hFxcbiAgICAgICAgICAgIGZvY3VzR3JvdXBMaXN0ID0gW107XFxuICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0TXlBdHRlbnRpb25Hcm91cExpc3QoKS5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICBmb2N1c0dyb3VwTGlzdC5wdXNoKGxpc3QubmFtZSArICcgJyArIGxpc3QudGFnaWQpO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHJldHVybiAkKGZvY3VzR3JvdXBMaXN0LCAxKS5zZWxlY3QoKGJlZm9yZVRhZ2lkcywgbWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIGFmdGVyVGFnaWRzID0gW107XFxuICAgICAgICAgICAgICAgIGFmdGVyVGFnaWRzLnB1c2gocGFyc2VJbnQoaW5wdXQuc3BsaXQoJyAnKVsxXSkpO1xcbiAgICAgICAgICAgICAgICBmaWRzID0gW107XFxuICAgICAgICAgICAgICAgIGZpZHMucHVzaChOdW1iZXIobWlkKSk7XFxuICAgICAgICAgICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLm1vdmVVc2VycyhiZWZvcmVUYWdpZHMsIGFmdGVyVGFnaWRzLCBmaWRzKTtcXG4gICAgICAgICAgICAgICAgaWYgKHJlcyA9PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v56e75Yqo55So5oi35YiwXFxcIiArIGlucHV0LnNwbGl0KCcgJylbMF0gKyBcXFwi5YiG57uE5oiQ5YqfXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTAxKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6LSm5Y+35pyq55m75b2VXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTExKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vY3NyZuagoemqjOWksei0pVxcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTQwMCkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+axgumUmeivr1xcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gMjIxMDQpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ml6DmnYPpmZBcXFwiXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDIyMTA1KSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5pyq5YWz5rOoXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+acquefpemUmeivr1xcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sIGJlZm9yZVRhZ2lkcywgbWlkKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09ICflhbPms6gnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSAxO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+WPluWFsycpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDI7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5oKE5oKE5YWz5rOoJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gMztcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICflj5bmtojmgoTmgoTlhbPms6gnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSA0O1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+aLiem7kScpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDU7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5Y+W5raI5ouJ6buRJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gNjtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfouKLlh7rnsonkuJ0nKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSA3O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5hZGRBdHRlbnRpb24obWlkLCBhY3QsIHJlX3NyYyk7XFxuICAgICAgICAgICAgcmVsYXRpb24gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS51c2VyTWFwcGluZyhtaWQpO1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3JlbGF0aW9uJywge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcmVsYXRpb24sXFxuICAgICAgICAgICAgICAgIGltZzogcmVsYXRpb24gPT0gJ+acquWFs+azqCcgPyBzdG9yYWdlMC5nZXRNeVZhcign5Zu+5qCHJyku5re75Yqg5YWz5rOoIDogc3RvcmFnZTAuZ2V0TXlWYXIoJ+WbvuaghycpLuW3suWFs+azqFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIGlucHV0ICsgXFxcIuaIkOWKn1xcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTAxKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/otKblj7fmnKrnmbvlvZVcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTExMSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vY3NyZuagoemq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nB1c2goaXRlbS50aXRsZSArICcgJyArIGl0ZW0uaWQpO1xcbiAgICAgICAgfSk7XFxuICAgICAgICByZXR1cm4gJChHcm91cExpc3QsIDEpLnNlbGVjdCgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgc2VsZWN0SWQgPSBwYXJzZUludChpbnB1dC5zcGxpdCgnICcpWzFdKVxcbiAgICAgICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLnNldEZhdm91cihhaWQsIHNlbGVjdElkLCAnJyk7XFxuICAgICAgICAgICAgaWYgKHJlcyA9PSAwKSB7XFxuICAgICAgICAgICAgICAgIGxpa2UgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL3ZpZXc/YWlkPVxcXCIgKyBhaWQpKS5kYXRhLnN0YXQuZmF2b3JpdGU7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3NldEZhdm91cicsIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlrZSArIDEpICsgJycsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKS7lt7LmlLbol49cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mlLbol4/miJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mlLbol4/lh7rplJnkuoZ+XFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBhaWQpO1xcbiAgICB9XFxufVxcblxcbi8vIHBhcnQyOuaVo+ijhUFQSS0tLS0tLS0tLS0tLS0tLS1cXG4vLyDojrflj5bmkJzntKLnu5PmnpxcXG4kLmV4cG9ydHMuZ2V0U2VhcmNoUmVzID0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3RbMF0uY29va2llO1xcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IHUgPSByZXF1ZXN0KGJ1aWxkVXJsKFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3BsYXllci9wbGF5dXJsXFxcIiwge1xcbiAgICAgICAgICAgIFxcXCJhdmlkXFxcIjogYXZpZCxcXG4gICAgICAgICAgICBcXFwiY2lkXFxcIjogY2lkLFxcbiAgICAgICAgICAgIFxcXCJxblxcXCI6IHFuLFxcbiAgICAgICAgICAgIFxcXCJmbnZlclxcXCI6IDAsXFxuICAgICAgICAgICAgLy8gXFxcImZudmFsXFxcIjogNDA0OCxcXG4gICAgICAgICAgICBcXFwiZm52YWxcXFwiOiAxNixcXG4gICAgICAgICAgICBcXFwiZm91cmtcXFwiOiAxXFxuICAgICAgICB9KSwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgQ29va2llOiBDb29raWVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgcmVzID0gSlNPTi5wYXJzZSh1KTtcXG4gICAgICAgIGlmIChyZXMuZGF0YS5kYXNoKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHJlcy5kYXRhLmRhc2g7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxvZyhcXFwi5rKh5pyJ5om+5YiwZGFzaOWtl+autVxcXCIpO1xcbiAgICAgICAgICAgIGlmIChyZXMuZGF0YS5zdXBwb3J0X2Zvcm1hdHMpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHUuaW5jbHVkZXMoXFxcIuivleeci1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBtc2cgPSBcXFwi5oKo5Yia5omN6KeC55yL55qE6KeG6aKR5piv6K+V55yL6KeG6aKR77yM6KeC55yL5a6M5pW054mH5q616K+35YmN5b6A5a6Y572R6LSt5Lmw77yBXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhtc2cpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmuKnppqjmj5DnpLonLCBjb250ZW50OiBtc2csIGNvbmZpcm06ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLCBjYW5jZWw6ICQudG9TdHJpbmcoKCkgPT4ge30pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiByZXMuZGF0YTtcXG4gICAgICAgIH1cXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAvLyDkuIDkurrkuYvkuIvnrKzkuIDlraPnmoTnrKwx77yMMumbhuKAlOKAlOWPr+S7peiOt+WPluWkp+S8muWRmOWJp+mbhueahOWJjTNtaW5cXG4gICAgICAgICAgICBsb2coJ+WwneivleabtOaUueivt+axguaOpeWPoy4uLjonICsgZSk7XFxuICAgICAgICAgICAgbGV0IHUgPSByZXF1ZXN0KGJ1aWxkVXJsKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20vcGdjL3BsYXllci93ZWIvcGxheXVybFxcXCIsIHtcXG4gICAgICAgICAgICAgICAgXFxcImF2aWRcXFwiOiBhdmlkLFxcbiAgICAgICAgICAgICAgICBcXFwiY2lkXFxcIjogY2lkLFxcbiAgICAgICAgICAgICAgICBcXFwicW5cXFwiOiBxbixcXG4gICAgICAgICAgICAgICAgXFxcImZudmVyXFxcIjogMCxcXG4gICAgICAgICAgICAgICAgLy8gXFxcImZudmFsXFxcIjogNDA0OCxcXG4gICAgICAgICAgICAgICAgXFxcImZudmFsXFxcIjogMTYsXFxuICAgICAgICAgICAgICAgIFxcXCJmb3Vya1xcXCI6IDFcXG4gICAgICAgICAgICB9KSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBDb29raWU6IENvb2tpZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAvLyDku5nnjovnmoTml6XluLjnrKzkuInlraPnrKwxMOmbhu+8jOayoeaciWRhc2jvvIzmnI3kuoZcXG4gICAgICAgICAgICBpZiAoSlNPTi5wYXJzZSh1KS5yZXN1bHQuZGFzaCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZSh1KS5yZXN1bHQuZGFzaDtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBsb2coJ+Wwneivlei1sOWNlee6v+i3r+eUu+i0qH4nKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UodSkucmVzdWx0O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XFxuICAgICAgICAgICAgbG9nKCdjb29raWXmnInmsqHmnInlj6/og73lpLHmlYjkuoblkaJ+Jyk7XFxuICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgfVxcbiAgICB9XFxufVxcbi8vIOaPkOS6pOaSreaUvuiusOW9lVxcbiQuZXhwb3J0cy5yZXBvcnRQcm9jZXNzID0gZnVuY3Rpb24gKGF2aWQsIGNpZCkge1xcbiAgICBsZXQgY3NyZiA9IEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFxcXCIpKS51c2VyTGlzdFswXS5jb29raWUubWF0Y2goL2JpbGlfamN0PSguKj8pOy8pID09PSBudWxsID8gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZS5zcGxpdCgnYmlsaV9qY3Q9JylbMV0gOiBKU09OLnBhcnNlKHJlcXVlc3QoXFxc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gICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj4nICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IucHViX3RpbWUgKyAnLScgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5wdWJfYWN0aW9uICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3VwSG9tZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhY2U6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAvLyDkuI3kuIDlrprmnInmloflrZfllYpcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIC8vIOi/meS4quS4jeiDveeUqGxvbmdfdGV4dFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5iYXNpYy5jb21tZW50X2lkX3N0cixcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdmlkZW9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUuZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj7nlZnoqIA6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5jb21tZW50LmNvdW50ICsgJ1xcXFx0XFxcXHTliIbkuqs6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5mb3J3YXJkLmNvdW50ICsgJ1xcXFx0XFxcXHTllpzmrKI6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5saWtlLmNvdW50ICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaW1nTGluay7liqjmgIHotrPov7ksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC50eXBlID09ICdEWU5BTUlDX1RZUEVfRk9SV0FSRCcpIHtcXG4gICAgICAgICAgICAgICAgLy8g5byV55So77yM5aSa5Ye65LqGb3JpZ+aMh+WQkeS4gOS4qijov4fljrsp5bey5Y+R5biD55qE6KeG6aKRLOWHhuehrueahOivtOaYr+W8leeUqOS5i+WJjeeahOW4luWtkOS4jeS4gOWumuaYr+inhumikeKImlxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj4nICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IucHViX3RpbWUgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3VwSG9tZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhY2U6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmJhc2ljLmNvbW1lbnRfaWRfc3RyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOS5n+aYr+e6r+aWh+Wtl++8jOWboOS4uuWPquaYr+aWh+WtlyvlvJXnlKjml6nlt7LmipXnqL/nmoTop4bpopFcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxN1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy8g5byV55So55qE5YaF5a654oCU4oCU5oiq5pat77yI5qC55o2u5LiN5ZCM55qE5byV55So57G75Z6L6L+b6KGM5aSE55CG77yJXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxzbWFsbD48c21hbGw+5LiL6Z2i5YaF5a655p2l6Ieq5byV55So55qE5biW5a2QLHVw5pivOjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS91cEhvbWVcXFwiPicgKyBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUgKyAnPC9hPjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJyaWNoX3RleHRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9hdXRob3IubWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGlmIChsaXN0Lm9yaWcudHlwZSA9PSAnRFlOQU1JQ19UWVBFX0FWJykge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5byV55So6KeG6aKR6K+06K+0XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS5jb3ZlciArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5vcmlnLnR5cGUgPT0gJ0RZTkFNSUNfVFlQRV9XT1JEJykge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5byV55So5paH5a2X6K+06K+0XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0ID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIOivhOiuumlk5p2l5rqQ6YO95LiN5LiA5qC3XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0Lm9yaWcuaWRfc3RyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDnuq/mloflrZdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMTdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsaXN0Lm9yaWcudHlwZSA9PSAnRFlOQU1JQ19UWVBFX0RSQVcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAvLyDlvJXnlKjlm77niYfor7Tor7RcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmRyYXcuaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IDExXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5kcmF3Lml0ZW1zLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLnNyYyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3BpY18zX3NxdWFyZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXRlbS5zcmMgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCflj6/og73ov5jmnInmnKrpgILphY3nmoTor7Tor7TnsbvlnosnKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyDliIblibJcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj7nlZnoqIA6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5jb21tZW50LmNvdW50ICsgJ1xcXFx0XFxcXHTliIbkuqs6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5mb3J3YXJkLmNvdW50ICsgJ1xcXFx0XFxcXHTllpzmrKI6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5saWtlLmNvdW50ICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaW1nTGluay7liqjmgIHotrPov7ksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC50eXBlID09ICdEWU5BTUlDX1RZUEVfV09SRCcpIHtcXG4gICAgICAgICAgICAgICAgLy8g57qv5paH5a2XXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj4nICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IucHViX3RpbWUgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvdXBIb21lJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbWlkOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5taWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QuYmFzaWMuY29tbWVudF9pZF9zdHIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8g57qv5paH5a2XXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMTdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPueVmeiogDonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmNvbW1lbnQuY291bnQgKyAnXFxcXHRcXFxcdOWIhuS6qzonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmZvcndhcmQuY291bnQgKyAnXFxcXHRcXFxcdOWWnOasojonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0Lmxpa2UuY291bnQgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuWKqOaAgei2s+i/uSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChsaXN0LnR5cGUgPT0gJ0RZTkFNSUNfVFlQRV9EUkFXJykge1xcbiAgICAgICAgICAgICAgICAvLyDlm77niYfor7Tor7RcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5wdWJfdGltZSArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS91cEhvbWUnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm1pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWNlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYyA9PT0gbnVsbCA/ICc8Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+dXDlpKrmh5LkuobvvIzov57mlofmoYjpg73kuI3mg7PphY0uLi48L2ZvbnQ+JyA6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5iYXNpYy5jb21tZW50X2lkX3N0cixcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDnm7jnsL/vvIjlm77niYfliqjmgIHvvIlcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxMVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmRyYXcuaXRlbXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLnNyYyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncGljXzNfc3F1YXJlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0ZW0uc3JjICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+55WZ6KiAOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuY29tbWVudC5jb3VudCArICdcXFxcdFxcXFx05YiG5LqrOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuZm9yd2FyZC5jb3VudCArICdcXFxcdFxcXFx05Zac5qyiOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQubGlrZS5jb3VudCArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGltZ0xpbmsu5Yqo5oCB6Laz6L+5LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgfSlcXG59XFxuLy8g5pe26Ze05pel5pyf6L2s5o2i5Ye95pWwXFxuJC5leHBvcnRzLnRpbWVDb252ZXJ0ID0gZnVuY3Rpb24gKHRpbWUpIHtcXG4gICAgZnVuY3Rpb24gZm9ybWF0RGF0ZShlLCB0KSB7XFxuICAgICAgICBlID0gbmV3IERhdGUoZSAqIDEwMDApOyAvL+aXtumXtOaIs+S4ujEw5L2N6ZyAKjEwMDDvvIzml7bpl7TmiLPkuLoxM+S9jeeahOivneS4jemcgOS5mDEwMDBcXG4gICAgICAgIHJldHVybiB0LnJlcGxhY2UoL3l5eXl8WVlZWS8sIGUuZ2V0RnVsbFllYXIoKSlcXG4gICAgICAgICAgICAucmVwbGFjZSgveXl8WVkvLCByKGUuZ2V0RnVsbFllYXIoKSAlIDEwMCwgMikpXFxuICAgICAgICAgICAgLnJlcGxhY2UoL21tfE1NLywgcihlLmdldE1vbnRoKCkgKyAxLCAyKSlcXG4gICAgICAgICAgICAucmVwbGFjZSgvbXxNL2csIGUuZ2V0TW9udGgoKSArIDEpXFxuICAgICAgICAgICAgLnJlcGxhY2UoL2RkfERELywgcihlLmdldERhdGUoKSwgMikpXFxuICAgICAgICAgICAgLnJlcGxhY2UoL2R8RC9nLCBlLmdldERhdGUoKSlcXG4gICAgICAgICAgICAucmVwbGFjZSgvaGh8SE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luS2V5RW5jVGFiLmZvckVhY2goKG4pID0+IHtcXG4gICAgICAgICAgICB0ZW1wICs9IG9yaWdbbl1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmV0dXJuIHRlbXAuc2xpY2UoMCwgMzIpO1xcbiAgICB9XFxuXFxuICAgIC8vIOS4uuivt+axguWPguaVsOi/m+ihjCB3Ymkg562+5ZCNXFxuICAgIGZ1bmN0aW9uIGVuY1diaShwYXJhbXMsIGltZ19rZXksIHN1Yl9rZXkpIHtcXG4gICAgICAgIGNvbnN0IG1peGluX2tleSA9IGdldE1peGluS2V5KGltZ19rZXkgKyBzdWJfa2V5KSxcXG4gICAgICAgICAgICBjdXJyX3RpbWUgPSBNYXRoLnJvdW5kKERhdGUubm93KCkgLyAxMDAwKSxcXG4gICAgICAgICAgICBjaHJfZmlsdGVyID0gL1shJ1xcXFwoXFxcXCkqXS9nXFxuICAgICAgICBsZXQgcXVlcnkgPSBbXTtcXG4gICAgICAgIHBhcmFtcyA9IE9iamVjdC5hc3NpZ24ocGFyYW1zLCB7IHd0czogY3Vycl90aW1lIH0pOyAgICAvLyDmt7vliqAgd3RzIOWtl+autVxcbiAgICAgICAgLy8g5oyJ54WnIGtleSDph43mjpLlj4LmlbBcXG4gICAgICAgIE9iamVjdC5rZXlzKHBhcmFtcykuc29ydCgpLmZvckVhY2goKGtleSkgPT4ge1xcbiAgICAgICAgICAgIHF1ZXJ5LnB1c2goXFxuICAgICAgICAgICAgICAgIGVuY29kZVVSSUNvbXBvbmVudChrZXkpICtcXG4gICAgICAgICAgICAgICAgJz0nICtcXG4gICAgICAgICAgICAgICAgLy8g6L+H5rukIHZhbHVlIOS4reeahCBcXFwiIScoKSpcXFwiIOWtl+esplxcbiAgICAgICAgICAgICAgICBlbmNvZGVVUklDb21wb25lbnQoKCcnICsgcGFyYW1zW2tleV0pLnJlcGxhY2UoY2hyX2ZpbHRlciwgJycpKVxcbiAgICAgICAgICAgIClcXG4gICAgICAgIH0pXFxuICAgICAgIC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ZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6J2FpZC0nK2FpZCsnfGNpZC0nK2NpZCxcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdkbeebkuWtkCcsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9zZXR0aW5nI25vSGlzdG9yeSM/cnVsZT1kbeebkuWtkCc7XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+W8ueW5leaOp+WIticsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKSA9PSAndHJ1ZScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuS4jeWPl2Rt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIblj5fliLBkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHAub3duZXIubmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdXBIb21lXFxcIixcXG4gICAgICAgICAgICBpbWc6IHAub3duZXIuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBtaWQ6IHAub3duZXIubWlkLFxcbiAgICAgICAgICAgICAgICB0aXRsZTogcC5vd25lci5uYW1lLFxcbiAgICAgICAgICAgICAgICBmYWNlOiBwLm93bmVyLmZhY2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIC8vIOiZveeEtuWPquaciTFQLOS9huWPr+iDveWkhOS6juWQiOmbhuinhumikeS4re+8jOW+gOW+gOWcqHVw5LiK5Lyg5Lit5bGe5LqO5LiA5aWX5b2x54mHXFxuICAgICAgICBpZiAocC51Z2Nfc2Vhc29uKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfwn5OB5omA5bGe5ZCI6ZuG77yaPGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL2NvbGxlY3Rpb25WaWVkb1xcXCI+JytwLnVnY19zZWFzb24udGl0bGUrJzwvYT4nLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvY29sbGVjdGlvblZpZWRvI25vSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7IFxcXCJ0ZXh0U2l6ZVxcXCI6IDEyLCBhaWQ6IGFpZCB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnN0YXQubGlrZSxcXG4gICAgICAgICAgICBpbWc6IGhhc0xpa2UgPT0gMSA/IGltZ0xpbmsu5bey54K56LWeIDogaW1nTGluay7mnKrngrnotZ4sXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGFpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGlrZUxvZ2ljKGFpZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogJ3NldExpa2UnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnN0YXQuZmF2b3JpdGUsXFxuICAgICAgICAgICAgaW1nOiBoYXNGYXZvdXIgPyBpbWdMaW5rLuW3suaUtuiXjyA6IGltZ0xpbmsu5pyq5pS26JePLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgdXBNaWQgPSBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcXFwiKSkudXNlck1pZDtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmZhdm91ckxvZ2ljKGFpZCwgdXBNaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzZXRGYXZvdXInXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn56iN5ZCO5YaN55yLJyxcXG4gICAgICAgICAgICBpbWc6IGltZ0xpbmsu56iN5ZCO5YaN55yLLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmp1ZGdlVG92aWV3KGFpZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+afpeeci+ivhOiuuicsXFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICBpbWc6IGltZ0xpbmsu5p+l55yL6K+E6K66LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBhaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogMVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IHAuZGVzYyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImxvbmdfdGV4dFxcXCIsXFxuICAgICAgICB9KTtcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIC8vIOWtmOWcqOWkmumbhuWIhlBcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHAudGl0bGUsXFxuICAgICAgICAgICAgaW1nOiBwLnBpYyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgIGRlc2M6J+aSreaUvumHjzonK3Auc3RhdC52aWV3KydcXFxcdFxcXFx0XFxcXHTlvLnluZXmlbA6JytwLnN0YXQuZGFubWFrdSsnXFxcXG7lj5HluIPml6XmnJ86JyskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS50aW1lQ29udmVydChwLmN0aW1lKSxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgocCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eT9meXBhZ2UnKS5ydWxlKChwKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwLmRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsb25nX3RleHRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgfSwgcClcXG4gICAgICAgICAgICB9LCBwKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInBpY18xXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ2Rt55uS5a2QJywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3NldHRpbmcjbm9IaXN0b3J5Iz9ydWxlPWRt55uS5a2QJztcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5by55bmV5o6n5Yi2JywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpID09ICd0cnVlJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5LiN5Y+XZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuWPl+WIsGRt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJzxmb250IGNvbG9yPVxcXCJibHVlXFxcIj4nICsgcC5vd25lci5uYW1lICsgJzwvZm9udD4nLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cEhvbWVcXFwiLFxcbiAgICAgICAgICAgIGltZzogcC5vd25lci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIG1pZDogcC5vd25lci5taWQsXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwLm93bmVyLm5hbWUsXFxuICAgICAgICAgICAgICAgIGZhY2U6IHAub3duZXIuZmFjZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IHAuc3RhdC5saWtlLFxcbiAgICAgICAgICAgIGltZzogaGFzTGlrZSA9PSAxID8gaW1nTGluay7lt7LngrnotZ4gOiBpbWdMaW5rLuacqueCuei1nixcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5saWtlTG9naWMoYWlkKVxcbiAgICAgICAgICAgIH0sIGFpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiAnc2V0TGlrZSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IHAuc3RhdC5mYXZvcml0ZSxcXG4gICAgICAgICAgICBpbWc6IGhhc0Zhdm91ciA/IGltZ0xpbmsu5bey5pS26JePIDogaW1nTGluay7mnKrmlLbol48sXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGFpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICB1cE1pZCA9IEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFxcXCIpKS51c2VyTWlkO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZmF2b3VyTG9naWMoYWlkLCB1cE1pZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogJ3NldEZhdm91cidcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICfnqI3lkI7lho3nnIsnLFxcbiAgICAgICAgICAgIGltZzogaW1nTGluay7nqI3lkI7lho3nnIssXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGFpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuanVkZ2VUb3ZpZXcoYWlkKVxcbiAgICAgICAgICAgIH0sIGFpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn5p+l55yL6K+E6K66JyxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgIGltZzogaW1nTGluay7mn6XnnIvor4TorrosXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGFpZCxcXG4gICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiAxXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn6YCJ6ZuG5YiX6KGoJyxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICBkZXNjOic8c21hbGw+PHNtYWxsPuWFsScgKyBwLnZpZGVvcyArICfmnaHop4bpopE8L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICBpbWc6IGltZ0xpbmsu5YiX6KGoLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICB9KTtcXG4gICAgICAgIHAucGFnZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBjaWQgPSBpdGVtLmNpZDtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5wYXJ0LFxcbiAgICAgICAgICAgICAgICBkZXNjOmZvcm1hdFNlY29uZHMoaXRlbS5kdXJhdGlvbiksXFxuICAgICAgICAgICAgICAgIC8vIGltZzppbWdMaW5rLuWIhlDliJfooajpobksXFxuICAgICAgICAgICAgICAgIGltZzppdGVtLmZpcnN0X2ZyYW1lKydAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoYWlkLCBjaWQsIHFuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYmlsaUxhenkoYWlkLCBj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Y+q6IO95paH5a2XK+aVsOWtl1xcbiAgICBkLnVuc2hpZnQoe1xcbiAgICAgICAgdGl0bGU6IFxcXCLlj5HmnaHor4TorrrlkKdcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKGlkLHR5cGUpID0+IHtcXG4gICAgICAgICAgICBsZXQgY3NyZiA9IEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFxcXCIpKS5jb29raWUubWF0Y2goL2JpbGlfamN0PSguKj8pOy8pWzFdO1xcbiAgICAgICAgICAgIHBvc3QoXFxcImh0dHA6Ly9hcGkuYmlsaWJpbGkuY29tL3gvdjIvcmVwbHkvYWRkXFxcIiwge1xcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IHR5cGUsXFxuICAgICAgICAgICAgICAgICAgICBcXFwib2lkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmYsXFxuICAgICAgICAgICAgICAgICAgICBcXFwibWVzc2FnZVxcXCI6IGlucHV0XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcXFwiKSkuY29va2llXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgIH0sIGlkLHR5cGUpXFxuICAgIH0pXFxufVxcbmxldCBkYXRhID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0Q29tbW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1dHRvbicsXFxyXFxuICAgICAgICAgICAgfSk7XFxyXFxuICAgICAgICB9KTtcXHJcXG4gICAgICAgIGQucHVzaCh7XFxyXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcclxcbiAgICAgICAgfSk7XFxyXFxuICAgICAgICBncm91cENvbnRlbnQgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC92My9mYXYvcmVzb3VyY2UvbGlzdD9tZWRpYV9pZD1cXFwiICsgZ2V0SXRlbSgn5pS26JeP5aS5JywgZ2V0TXlWYXIoJ3RlbXBJZCcpKSArIFxcXCImcG49XFxcIiArIHBhZ2UgKyBcXFwiJnBzPTIwJmtleXdvcmQ9Jm9yZGVyPW10aW1lJnR5cGU9MCZ0aWQ9MCZwbGF0Zm9ybT13ZWImanNvbnA9anNvbnBcXFwiLCB7XFxyXFxuICAgICAgICAgICAgaGVhZGVyczoge1xcclxcbiAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llXFxyXFxuICAgICAgICAgICAgfVxcclxcbiAgICAgICAgfSkpLmRhdGEubWVkaWFzO1xcclxcbiAgICAgICAgZ3JvdXBDb250ZW50LmZvckVhY2gobGlzdCA9PiB7XFxyXFxuICAgICAgICAgICAgZC5wdXNoKHtcXHJcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QudGl0bGUsXFxyXFxuICAgICAgICAgICAgICAgIGltZzogbGlzdC5jb3ZlciArIFxcXCJAUmVmZXJlcj1cXFwiLFxcclxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcclxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdmlkZW9cXFwiLFxcclxcbiAgICAgICAgICAgICAgICBkZXNjOiAnVVA6JyArIGxpc3QudXBwZXIubmFtZSArICdcXFxcbicgKyBsaXN0LmludHJvLFxcclxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcclxcbiAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmlkLFxcclxcbiAgICAgICAgICAgICAgICAgICAgbWlkOiBsaXN0LnVwcGVyLm1pZFxcclxcbiAgICAgICAgICAgICAgICB9XFxyXFxuICAgICAgICAgICAgfSk7XFxyXFxuICAgICAgICB9KTtcXHJcXG4gICAgfSBjYXRjaCAoZSkge1xcclxcbiAgICAgICAgc2hvd0xvYWRpbmcoJ+WFhOW8n++8jOS9oOehruiupOS9oOacieaUtuiXj+WQl++8jOW/q+WOu+aUtuiXj+S4gOS4quinhumikX4nKTtcXHJcXG4gICAgfVxcclxcbn0gZWxzZSB7XFxyXFxuICAgIGxhdGVyVmlld3MgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC92Mi9oaXN0b3J5L3Rvdmlldy93ZWI/anNvbnA9anNvbnBcXFwiLCB7XFxyXFxuICAgICAgICBoZWFkZXJzOiB7XFxyXFxuICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZVxcclxcbiAgICAgICAgfVxcclxcbiAgICB9KSkuZGF0YTtcXHJcXG4gICAgY291bnQgPSBsYXRlclZpZXdzLmNvdW50O1xcclxcbiAgICBkLnB1c2goe1xcclxcbiAgICAgICAgdGl0bGU6IFxcXCLlhbHmnIlcXFwiICsgY291bnQgKyBcXFwi5p2h5b6F55yL6KeG6aKR6K6w5b2VXFxcIixcXHJcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcclxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIlxcclxcbiAgICB9KTtcXHJcXG4gICAgbGF0ZXJWaWV3cy5saXN0LmZvckVhY2gobGlzdCA9PiB7XFxyXFxuICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcclxcbiAgICAgICAgIC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ZXJlcj0nKTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiB2aWRlb0RhdGEudGl0bGUsXFxuICAgICAgICBkZXNjOnZpZGVvRGF0YS5pbnRybyxcXG4gICAgICAgIGltZzogdmlkZW9EYXRhLmNvdmVyICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoaW50cm8pID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eT9meXBhZ2UnKS5ydWxlKChpbnRybykgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGludHJvLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsb25nX3RleHRcXFwiLFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgfSwgaW50cm8pXFxuICAgICAgICB9LCB2aWRlb0RhdGEuaW50cm8pLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJwaWNfMVxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICdkbeebkuWtkCcsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3NldHRpbmcjbm9IaXN0b3J5Iz9ydWxlPWRt55uS5a2QJztcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5by55bmV5o6n5Yi2JywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJykgPT0gJ3RydWUnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5LiN5Y+XZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuWPl+WIsGRt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XVxcbiAgICAgICAgfVxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogJzxmb250IGNvbG9yPVxcXCJibHVlXFxcIj4nICsgcC5vd25lci5uYW1lICsgJzwvZm9udD4nLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3VwSG9tZVxcXCIsXFxuICAgICAgICBpbWc6IHAub3duZXIuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+5YWx5pyJJyArIHZpZGVvRGF0YS5lcF9jb3VudCArICfmnaHop4bpopHmlbDmja48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgbWlkOiBwLm93bmVyLm1pZCxcXG4gICAgICAgICAgICB0aXRsZTogcC5vd25lci5uYW1lLFxcbiAgICAgICAgICAgIGZhY2U6IHAub3duZXIuZmFjZVxcbiAgICAgICAgfVxcbiAgICB9LCB7XFxuICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgIH0pO1xcbiAgICB2YXIgaW5kZXggPSAxO1xcbiAgICBzdG9yYWdlMC5wdXRWYXIoJ3ZpZGVvU2VjdGlvbnMnLCB2aWRlb0RhdGEuc2VjdGlvbnMpO1xcbiAgICB2aWRlb0RhdGEuc2VjdGlvbnMuZm9yRWFjaChlbCA9PiB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn8J+TgScgKyBlbC50aXRsZSxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKCdpc0ZvbGRfJytpbmRleCwgJ3knKSA9PSAneScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdpc0ZvbGRfJytpbmRleCwgJ24nKTtcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscygnc2VjdGlvbicgKyBpbmRleCArICctcGFydCcpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaKmOWPoCc7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaXNGb2xkXycraW5kZXgsICd5Jyk7XFxuICAgICAgICAgICAgICAgICAgICB2aWRlb1NlY3Rpb25zID0gc3RvcmFnZTAuZ2V0VmFyKCd2aWRlb1NlY3Rpb25zJyk7XFxuICAgICAgICAgICAgICAgICAgICBzZWN0aW9uUGFydExpc3QgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIHZpZGVvU2VjdGlvbnNbaW5kZXggLSAxXS5lcGlzb2Rlcy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFpZCA9IGl0ZW0uYWlkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IGl0ZW0uY2lkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXQgPSBpdGVtLmFyYy5zdGF0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlY3Rpb25QYXJ0TGlzdC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ1cXFxcdFxcXFx0XFxcXHQ8c21hbGw+PC9mb250PuKWtu+4jicgKyBpdGVtLnRpdGxlICsgJ1xcXFxuXFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdDwvZm9udD48L3NtYWxsPjxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9Z3JheT7mkq3mlL7ph4/vvJonICsgc3RhdC52aWV3ICsgJ1xcXFx0XFxcXHRcXFxcdOW8ueW5le+8micgKyBzdGF0LmRhbm1ha3UgKyAnXFxcXHRcXFxcdFxcXFx05Zac5qyi77yaJyArIHN0YXQubGlrZSArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChhaWQsIGNpZCwgcW4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5iaWxpTGF6eShhaWQsIGNpZCwgcW4pLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBhaWQgKyBcXFwiXFxcIiwgY2lkICsgXFxcIlxcXCIsICcxMTYnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogeyBsaW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4uJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZygn57q/6Lev77yaJyArIHR1Ymlhb1tpXSArICflh7rplJnkuoYuLi4nKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgdHJ5IHtcXG4gICAgICAgIHZhciB3dWRhID0gdHViaWFvW1xcXCLkupTlpKdcXFwiXTtcXG4gICAgICAgIHZhciBiaWxpID0gdHViaWFvW1xcXCLlk5Tlk6lcXFwiXTtcXG4gICAgICAgIHZhciBpbmRleCA9IDA7XFxuICAgICAgICBmb3IgKGxldCBpdGVtIGluIHd1ZGEpIHtcXG4gICAgICAgICAgICB3cml0ZUhleEZpbGUoYGhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvdHViaWFvLyR7aXRlbX0uc3ZnYCwgYmFzZTY0VG9IZXgod3VkYVtpdGVtXSkpO1xcbiAgICAgICAgICAgIGxvZyhg5Yid5aeL5YyW56ysJHtpbmRleCsrfeS4quWbvuaghzoke2l0ZW19Li4uYCk7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGxldCBpdGVtIGluIGJpbGkpIHtcXG4gICAgICAgICAgICB3cml0ZUhleEZpbGUoYGhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaV9waWMvJHtpdGVtfS5wbmdgLCBiYXNlNjRUb0hleChiaWxpW2l0ZW1dKSk7XFxuICAgICAgICAgICAgbG9nKGDliJ3lp4vljJbnrKwke2luZGV4Kyt95Liq5Zu+5qCHOiR7aXRlbX0uLi5gKTtcXG4gICAgICAgIH1cXG4gICAgICAgIHNob3dMb2FkaW5nKCflm77moIfliJ3lp4vljJblrozmiJDvvJrlhbHorqEnICsgaW5kZXggKyAn5Liq5Zu+5qCHJyk7XFxuICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICBzaG93TG9hZGluZygn5Zu+5qCH5Yid5aeL5YyW5aSx6LSlJyk7XFxuICAgICAgICBsb2coJ+Wbvuagh+WIneWni+WMluWksei0pTonICsgZSk7XFxuICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICB9XFxuXFxufTtcXG5cIn1dIiwiaWNvbiI6Imhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvdHViaWFvL2JpbGliaWxpLnN2ZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment