Advertisement
xiaomianao666

邀您一起看:孩子...蚊子好吃吗?

Jan 27th, 2023
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥孩子...蚊子好吃吗?@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImFwaVwiLFwicGF0aFwiOlwiYXBpXCIsXCJydWxlXCI6XCIkLmV4cG9ydHMuZ2V0RmVlZCA9IGZ1bmN0aW9uKCkge1xcbiAgICBsZXQgdSA9IFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL2luZGV4L3RvcC9mZWVkL3JjbWRcXFwiXFxuICAgIGxldCByZXMgPSBKU09OLnBhcnNlKHJlcXVlc3QodSwge1xcbiAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpXFxuICAgICAgICB9XFxuICAgIH0pKVxcbiAgICByZXR1cm4gcmVzLmRhdGEuaXRlbVxcbn1cXG4kLmV4cG9ydHMuZ2V0VXNlckluZm8gPSBmdW5jdGlvbigpIHtcXG4gICAgbGV0IHUgPSBcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGku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gICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpXFxuICAgICAgICB9XFxuICAgIH0pKS5kYXRhLmZhdm91cmVkXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogKGhhc0xpa2UgPyBjb2xvcihsaWtlLCBcXFwiI0ZBNzI5OFxcXCIpIDogbGlrZSksXFxuICAgICAgICBpbWc6IFxcXCJodHRwczovL2docHJveHkuY29tL2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9Tb2NpYWxTaXN0ZXJZaS9iaWxpYmlsaS1BUEktY29sbGVjdC9tYXN0ZXIvaW1ncy9saWtlLnN2Z1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQsIGhhc0xpa2UpID0+IHtcXG4gICAgICAgICAgICBsZXQgY3NyZiA9IHJlYWRGaWxlKFxcXCJDb29raWUudHh0XFxcIikubWF0Y2goL2JpbGlfamN0PSguKj8pOy8pWzFdXFxuICAgICAgICAgICAgbGV0IHJlcyA9IHBvc3QoXFxcImh0dHA6Ly9hcGkuYmlsaWJpbGkuY29tL3gvd2ViLWludGVyZmFjZS9hcmNoaXZlL2xpa2VcXFwiLCB7XFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJhaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJsaWtlXFxcIjogKGhhc0xpa2UgPyAyIDogMSksXFxuICAgICAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmZcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IHJlYWRGaWxlKFx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ICAgICAgIFxcXCJjc3JmXFxcIjogY3NyZlxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+aKleS6hlxcXCIgKyBpbnB1dCArIFxcXCLkuKrluIFcXFwiXFxuICAgICAgICB9LCBpZClcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6IChoYXNGYXZvdXIgPyBjb2xvcihmYXZvdXJpdGUsIFxcXCIjRkE3Mjk4XFxcIikgOiBmYXZvdXJpdGUpLFxcbiAgICAgICAgaW1nOiBcXFwiaHR0cHM6Ly9naHByb3h5LmNvbS9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3QvbWFzdGVyL2ltZ3MvZmF2LnN2Z1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQsIGhhc0Zhdm91cikgPT4ge1xcbiAgICAgICAgICAgIGxldCBib2R5ID0gaGFzRmF2b3VyID8ge1xcbiAgICAgICAgICAgICAgICBcXFwicmlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogMixcXG4gICAgICAgICAgICAgICAgXFxcImRlbF9tZWRpYV9pZHNcXFwiOiAwLFxcbiAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmZcXG4gICAgICAgICAgICB9IDoge1xcbiAgICAgICAgICAgICAgICBcXFwicmlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogMixcXG4gICAgICAgICAgICAgICAgXFxcImFkZF9tZWRpYV9pZHNcXFwiOiAwLFxcbiAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmZcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGNzcmYgPSByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpLm1hdGNoKC9iaWxpX2pjdD0oLio/KTsvKVsxXVxcbiAgICAgICAgICAgIGxldCByZXMgPSBwb3N0KFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS9tZWRpYWxpc3QvZ2F0ZXdheS9jb2xsL3Jlc291cmNlL2RlYWxcXFwiLCB7XFxuICAgICAgICAgICAgICAgIGJvZHk6IGJvZHksXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyAoaGFzRmF2b3VyID8gXFxcIuWPlua2iOaUtuiXj1xcXCIgOiBcXFwi5pS26JeP5oiQ5YqfXFxcIilcXG4gICAgICAgIH0sIGlkLCBoYXNGYXZvdXIpXFxuICAgIH0sIHtcXG4gICAgICAgIHRpdGxlOiBcXFwi6K+E6K66XFxcIixcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCIsXFxuICAgICAgICBpbWc6IFxcXCJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJp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ICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKGlkLCBjaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlKFxcXCJodHRwczovL2hpa2VyZmFucy5jb20vSm9lL1RWYm94LmpzXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4g5o6o6YCBdHZib3goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcXFwi5o6o6YCBIGJ5IEpvZVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvZDogW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFxcXCJiaWxpYmlsaVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBKU09OLnBhcnNlKCQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmxhenkoaWQsIGNpZCwgMTIwKS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKSkudXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb21cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSwgaWQsIGNpZClcXG4gICAgICAgICAgICAgICAgfV0sXFxuICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IFxcXCJxblxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgYS5zdXBwb3J0X2Zvcm1hdHMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uZXdfZGVzY3JpcHRpb24sXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgY2lkLCBxbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmxhenkoaWQsIGNpZCwgcW4pLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpXFxuICAgICAgICAgICAgICAgIH0sIGlkICsgXFxcIlxcXCIsIGNpZCArIFxcXCJcXFwiLCBpdGVtLnF1YWxpdHkgKyBcXFwiXFxcIiksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8yXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgcC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnBhcnQsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgY2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGF6eShpZCwgY2lkLCAxMjApLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpXFxuICAgICAgICAgICAgICAgIH0sIGlkLCBpdGVtLmNpZCArIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzJcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImNpZFxcXCI6IGl0ZW0uY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYnZpZFxcXCI6IGJ2aWRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9XFxufSBjYXRjaCAoZSkge1xcbiAgICBsb2coZS5tZXNzYWdlKVxcbiAgICB0b2FzdChcXFwi56iL5bqP5Ye6546w6Zeu6aKY77yM6K+35omT5byA5pel5b+X5p+l55yLXFxcIilcXG59XFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5Li76aG1XCIsXCJwYXRoXCI6XCJob21lcGFnZVwiLFwicnVsZVwiOlwidmFyIGQgPSBbXTtcXG50cnkge1xcbiAgICBjb25zdCB7XFxuICAgICAgICBnZXRGZWVkLFxcbiAgICAgICAgZ2V0VXNlckluZm9cXG4gICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpXFxuICAgIGlmIChmaWxlRXhpc3QoXFxcIkNvb2tpZS50eHRcXFwiKSkge1xcbiAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgIGxldCBpID0gZ2V0VXNlckluZm8oKVxcbiAgICAgICAgICAgIGQudW5zaGlmdCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpLnVuYW1lLFxcbiAgICAgICAgICAgICAgICBpbWc6IGkuZmFjZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdXNlckluZm9cXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImRhdGFcXFwiOiBpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvbG9yKHRleHQsIGNvbG9yKSB7XFxuICAgICAgICAgICAgICAgIHRleHQgKz0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIGlmICh0ZXh0LmluZGV4T2YoXFxcIuKAnOKAnOKAneKAnVxcXCIpID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICB0ZXh0LnJlcGxhY2UoXFxcIuKAnOKAnOKAneKAnVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdcXFwiICsgY29sb3IgKyBcXFwiJz5cXFwiICsgdGV4dCArIFxcXCI8L2ZvbnQ+XFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHRhYnMgPSB7XFxuICAgICAgICAgICAgICAgIFxcXCLmjqjojZBcXFwiOiBcXFwiaGlrZXI6Ly9pbWFnZXMvY29sbGVjdGlvblxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCLliIbnsbtcXFwiOiBcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzY5LnN2Z1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCLmlrDnlapcXFwiOiBcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzg0LnN2Z1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCLmiJHnmoRcXFwiOiBcXFwiaGlrZXI6Ly9pbWFnZXMvaWNvbjNcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHRhYnMpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbVswXSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaXRlbVsxXSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCh0YWIpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwibW9kZVxcXCIsIHRhYilcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwgaXRlbVswXSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fcm91bmRfc21hbGxfNFxcXCJcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IG1vZGUgPSBnZXRNeVZhcihcXFwibW9kZVxcXCIsIFxcXCLmjqjojZBcXFwiKVxcbiAgICAgICAgaWYgKG1vZGUgPT0gXFxcIuaOqOiNkFxcXCIpIHtcXG4gICAgICAgICAgICBnZXRGZWVkKCkuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnN0cmluZ2lmeShpdGVtKVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0ucGljLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogaXRlbS5zdGF0LnZpZXcgKyBcXFwi5pKt5pS+4oC7XFxcIiArIGl0ZW0uc3RhdC5saWtlICsgXFxcIueCuei1nlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsI2dhbWVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBpdGVtLmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJidmlkXFxcIjogaXRlbS5idmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJjaWRcXFwiOiBpdGVtLmNpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPT0gXFxcIuaIkeeahFxcXCIpIHtcXG4gICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoXFxcIndkXFxcIiwgXFxcImhpc3RvcnlcXFwiKSA9PSBcXFwiaGlzdG9yeVxcXCIgPyBjb2xvcihcXFwi6KeC55yL5Y6G5Y+yXFxcIiwgXFxcInJlZFxcXCIpIDogXFxcIuingueci+WOhuWPslxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcIndkXFxcIiwgXFxcImhpc3RvcnlcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIlxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoXFxcIndkXFxcIiwgXFxcImhpc3RvcnlcXFwiKSA9PSBcXFwiZmF2XFxcIiA/IGNvbG9yKFxcXCLmlLbol49cXFwiLCBcXFwicmVkXFxcIikgOiBcXFwi5pS26JePXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwid2RcXFwiLCBcXFwiZmF2XFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfM1xcXCJcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKFxcXCJ3ZFxcXCIsIFxcXCJoaXN0b3J5XFxcIikgPT0gXFxcInN1YlxcXCIgPyBjb2xvcihcXFwi5YWz5rOoXFxcIiwgXFxcInJlZFxcXCIpIDogXFxcIuWFs+azqFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcIndkXFxcIiwgXFxcInN1YlxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChnZXRNeVZhcihcXFwid2RcXFwiLCBcXFwiaGlzdG9yeVxcXCIpID09IFxcXCJoaXN0b3J5XFxcIikge1xcbiAgICAgICAgICAgICAgICBjb25zdCB7XFxuICAgICAgICAgICAgICAgICAgICBnZXRIaXN0b3J5XFxuICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKVxcbiAgICAgICAgICAgICAgICBnZXRIaXN0b3J5KE1ZX1BBR0UpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5waWMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbCNpbW1lcnNpdmVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGl0ZW0uYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiYnZpZFxcXCI6IGl0ZW0uYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImNpZFxcXCI6IGl0ZW0uY2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGdldE15VmFyKFxcXCJ3ZFxcXCIsIFxcXCJoaXN0b3J5XFxcIikgPT0gXFxcImZhdlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHRlYW1zID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0ZmF2dGVhbSgpWzBdLm1lZGlhTGlzdFJlc3BvbnNlLmxpc3RcXG4gICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGVhbXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXCJmYXZvXFxcIiwgdGVhbXNbMF0uaWQgKyBcXFwiXFxcIikgPT0gaXRlbS5pZCA/IGNvbG9yKGl0ZW0udGl0bGUsIFxcXCJyZWRcXFwiKSA6IGl0ZW0udGl0bGUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJmYXZvXFxcIiwgaWQgKyBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgaXRlbS5pZClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRGYXZvdXIoZ2V0TXlWYXIoXFxcImZhdm9cXFwiLCB0ZWFtc1swXS5pZCArIFxcXCJcXFwiKSwgTVlfUEFHRSkubWVkaWFzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5jb3ZlcixcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsI2dhbWVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGl0ZW0uaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJjaWRcXFwiOiBpdGVtLnVnYy5maXJzdF9jaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJidmlkXFxcIjogaXRlbS5idmlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRzbGlzdCgpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChnZXRNeVZhcihcXFwic3ViXFxcIiwgXFxcIjBcXFwiKSA9PSBpdGVtLnRhZ2lkID8gY29sb3IoaXRlbS5uYW1lLCBcXFwicmVkXFxcIikgOiBpdGVtLm5hbWUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJzdWJcXFwiLCBpZClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgaXRlbS50YWdpZCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRTdWJzcmliZXMoZ2V0TXlWYXIoXFxcInN1YlxcXCIsIFxcXCIwXFxcIiksIE1ZX1BBR0UpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnVuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5mYWNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cHM/bWlkPVxcXCIgKyBpdGVtLm1pZCArIFxcXCImcD1meXBhZ2UjaW1tZXJzaXZlVGhlbWUjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIGlmIChtb2RlID09IFxcXCLmlrDnlapcXFwiKSB7XFxuICAgICAgICAgICAgdmFyIHRhYnMgPSB7XFxuICAgICAgICAgICAgICAgIFxcXCLnlarliadcXFwiOiAxLFxcbiAgICAgICAgICAgICAgICBcXFwi55S15b2xXFxcIjogMyxcXG4gICAgICAgICAgICAgICAgXFxcIuWbveWIm1xcXCI6IDRcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0YWJzKS5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXCJqdWppXFxcIiwgXFxcIueVquWJp1xcXCIpID09IGl0ZW0gPyBjb2xvcihpdGVtLCBcXFwicmVkXFxcIikgOiBpdGVtKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoYSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwianVqaVxcXCIsIGEpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WIh+aNouaIkOWKn1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpdGVtKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lXFxcIlxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBsZXQgZGF5cyA9IDdcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBkYXlzICsgMTsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoXFxcImZyb21cXFwiLCBcXFwiMVxcXCIpID09IGkgKyBcXFwiXFxcIiA/IGNvbG9yKGkgKyBcXFwi5aSp5YmNXFxcIiwgXFxcInJlZFxcXCIpIDogaSArIFxcXCLlpKnliY1cXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiZnJvbVxcXCIsIGkgKyBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lXFxcIlxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IGRheXM7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXCJ0b1xcXCIsIFxcXCIxXFxcIikgPT0gaSArIFxcXCJcXFwiID8gY29sb3IoaSArIFxcXCLlpKnlkI5cXFwiLCBcXFwicmVkXFxcIikgOiBpICsgXFxcIuWkqeWQjlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ0b1xcXCIsIGkgKyBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRNb3ZpZXModGFic1tnZXRNeVZhcihcXFwianVqaVxcXCIsIFxcXCLnlarliadcXFwiKV0sIGdldE15VmFyKFxcXCJmcm9tXFxcIiwgXFxcIjFcXFwiKSwgZ2V0TXlWYXIoXFxcInRvXFxcIiwgXFxcIjFcXFwiKSkuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uZGF0ZSArIFxcXCIg5ZGoXFxcIiArIGl0ZW0uZGF5X29mX3dlZWssXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgaXRlbS5lcGlzb2Rlcy5mb3JFYWNoKGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGkuY292ZXIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9kZXRhaWxhI2dhbWVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNzaWRcXFwiOiBpLnNlYXNvbl9pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJlcGlkXFxcIjogaS5lcGlzb2RlX2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPSBcXFwi5YiG57G7XFxcIikge1xcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL2NhdFxcXCIpKS5ydWxlKVxcbiAgICAgICAgfVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgaWYgKGdldEl0ZW0oXFxcImZzXFxcIiwgXFxcIjBcXFwiKSA9PSBcXFwiMFxcXCIpIHtcXG4gICAgICAgICAgICBsZXQgYSA9IFtdXFxuICAgICAgICAgICAgbGV0IHRpbWUgPSAxMFxcbiAgICAgICAgICAgIGEucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBgICAgICAgICAgICAgICAgICAgICAg5L2/55So5YmN6aG755+lXFxu5pys6KeE5YiZ6LCD55SoaHR0cHM6Ly9naXRodWIuY29tL1NvY2lhbFNpc3RlcllpL2JpbGliaWxpLUFQSS1jb2xsZWN055qEYXBp77yM5omA5pyJ5Luj56CB5YWo6YOo5byA5rqQ77yM5bm25LiU5LiN5a2Y5Zyo5LiK5Lyg55So5oi35L+h5oGv55qE6KGM5Li6XFxu5pys6KeE5YiZ5Li65a2m5Lmg55uu55qE77yM6K+35LqO5a+85YWlMjTlsI/ml7blhoXliKDpmaTvvIHvvIHvvIEgICAgICAgICAgICAgICAgICAgICAgICBcXG7lvIDlp4vkvb/nlKjmnKzop4TliJnljbPku6PooajpgbXlrojop4TliJkgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgIGAsXFxuICAgICAgICAgICAgICAgIFxcXCJjb2xfdHlwZVxcXCI6IFxcXCJsb25nX3RleHRcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJ0ZXh0XFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGltZSArIFxcXCLnp5LlkI7nu6fnu61cXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogXFxcInRpbWVyXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBzZXRSZXN1bHQoYSlcXG4gICAgICAgICAgICB3aGlsZSAodGltZSAhPSAwKSB7XFxuICAgICAgICAgICAgICAgIGphdmEubGFuZy5UaHJlYWQuc2xlZXAoMTAwMClcXG4gICAgICAgICAgICAgICAgdGltZSAtPSAxXFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oXFxcInRpbWVyXFxcIiwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpbWUgKyBcXFwi56eS5ZCO57un57utXFxcIlxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB1cGRhdGVJdGVtKFxcXCJ0aW1lclxcXCIsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmiJHlt7Lnn6XmmZNcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoK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xcImNzcmZcXFwiOiBjc3JmLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm1lc3NhZ2VcXFwiOiBpbnB1dFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICB9LCBpZClcXG4gICAgfSlcXG59XFxudmFyIHRhYnMgPSBbXFxcIueDreW6plxcXCIsIFxcXCLml7bpl7RcXFwiXVxcbnRhYnMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBpdGVtLFxcbiAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICBwdXRNeVZhcihcXFwic29ydGJ5XFxcIiwgaSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgaXRlbSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgIH0pXFxufSlcXG5sZXQgZGF0YSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldENvbW1lbnRzKGlkLCBnZXRNeVZhcihcXFwic29ydGJ5XFxcIiwgXFxcIueDreW6plxcXCIpLCBNWV9QQUdFKVxcbmRhdGEuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBpdGVtLm1lbWJlci51bmFtZSxcXG4gICAgICAgIGltZzogaXRlbS5tZW1iZXIuYXZhdGFyLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3Vwcz9taWQ9XFxcIiArIGl0ZW0ubWVtYmVyLm1pZCArIFxcXCIjaW1tZXJzaXZlVGhlbWUjXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICB9KVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGl0ZW0uY29udGVudC5tZXNzYWdlLFxcbiAgICAgICAgZGVzYzogaXRlbS5yZXBseV9jb250cm9sLmxvY2F0aW9uICsgXFxcIiBcXFwiICsgaXRlbS5yZXBseV9jb250cm9sLnRpbWVfZGVzYyxcXG4gICAgICAgIHVybDogJCgpLnJ1bGUoKHRleHQsIG9pZCwgcnBpZCkgPT4ge1xcbiAgICAgICAgICAgIGxldCBkID0gW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRleHQsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIlxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgbGV0IHJlcGx5ID0gcmVxdWVzdChidWlsZFVybChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC92Mi9yZXBseS9yZXBseVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiAxLFxcbiAgICAgICAgICAgICAgICBcXFwib2lkXFxcIjogb2lkLFxcbiAgICAgICAgICAgICAgICBcXFwicm9vdFxcXCI6IHJwaWRcXG4gICAgICAgICAgICB9KSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBKU09OLnBhcnNlKHJlcGx5KS5kYXRhLnJlcGxpZXMuZm9yRWFjaChpdGVtID0+IHtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubWVtYmVyLnVuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5tZW1iZXIuYXZhdGFyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cHM/bWlkPVxcXCIgKyBpdGVtLm1lbWJlci5taWQgKyBcXFwiI2ltbWVyc2l2ZVRoZW1lI1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uY29udGVudC5tZXNzYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGl0ZW0ucmVwbHlfY29udHJvbC5sb2NhdGlvbiArIFxcXCIgXFxcIiArIGl0ZW0ucmVwbHlfY29udHJvbC50aW1lX2Rlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpXFxuICAgICAgICB9LCBpdGVtLmNvbnRlbnQubWVzc2FnZSwgaWQsIGl0ZW0ucnBpZCArIFxcXCJcXFwiKVxcbiAgICB9KVxcbn0pXFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfMlwiLFwibmFtZVwiOl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2llXFxcIjogY29va2llXFxuICAgICAgICB9XFxuICAgIH0pKS5kYXRhLnJlc3VsdFxcbiAgICBpZiAodHlwZSA9PSBcXFwiYmlsaV91c2VyXFxcIikge1xcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udW5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogXFxcImh0dHBzOlxcXCIgKyBpdGVtLnVwaWMsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cHM/bWlkPVxcXCIgKyBpdGVtLm1pZCArIFxcXCIjZ2FtZVRoZW1lI1xcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgaWYgKGl0ZW0uaXNfYXZpZCAhPSBmYWxzZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgcCA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGFnZWxpc3RcXFwiLCB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiYWlkXFxcIjogaXRlbS5haWRcXG4gICAgICAgICAgICAgICAgfSkpKS5kYXRhXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZS5yZXBsYWNlKC88W14+XSo+fDxcXFxcL1tePl0qPi9nbSwgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBcXFwiaHR0cHM6XFxcIiArIGl0ZW0ucGljLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbCNnYW1lVGhlbWUjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogaXRlbS5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImJ2aWRcXFwiOiBpdGVtLmJ2aWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImNpZFxcXCI6IHBbMF0uY2lkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLnJlcGxhY2UoLzxbXj5dKj58PFxcXFwvW14+XSo+L2dtLCBcXFwiXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0uY292ZXIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsYSNnYW1lVGhlbWUjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNzaWRcXFwiOiBpdGVtLnNlYXNvbl9pZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG59IGNhdGNoIChlKSB7XFxuICAgIGxvZyhlLm1lc3NhZ2UpXFxuICAgIHNldFJlc3VsdChbe1xcbiAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Y2VudGVyPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICM5OTk5OTlcXFwiPu+9nu+9nu+9nuaIkeaYr+acieW6lee6v+eahO+9nu+9nu+9njwvc3Bhbj48L3NtYWxsPjwvY2VudGVyPicsXF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AgICAgICAgbGV0IHVybCA9IGVzY2FwZShpdGVtW0NhdGVnb3JpZXNIZWFkZXIuY2F0ZWdvcmllc0tleS51cmxdKVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybExpc3RlbmVyKSB1cmwgPSB1cmxMaXN0ZW5lci5vbkRlYWwoaXRlbSwgc3ViX2NhdGVnb3J5X25hbWUsIHVybClcXG4gICAgICAgICAgICAgICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAjRkE3Mjk4XFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS51cmwgKyBcXFwiI1xcXCIgKyBwYXJhbXMuc3ViX2NhdGVnb3J5X25hbWUsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3J5X25hbWU6IHN1Yl9jYXRlZ29yeV9uYW1lXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgIH1cXG59XFxuJC5leHBvcnRzLkNhdGVnb3JpZXNIZWFkZXI9Q2F0ZWdvcmllc0hlYWRlclwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5YiG57G7IEJ5IFJ4XCIsXCJwYXRoXCI6XCJjYXRcIixcInJ1bGVcIjpcImNvbnN0IHtcXG4gICAgQ2F0ZWdvcmllc0hlYWRlclxcbn0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9jYXRlZ29yaWVzLWhlYWRlclxcXCIpXFxubGV0IG1DYXRlZ29yaWVzID0ge31cXG5sZXQgY2F0VXJsID0gJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9hbmltZS9pbmRleC8nXFxubGV0IGNhdFNyYyA9IHJlcXVlc3QoY2F0VXJsKVxcbi8vIGxvZyhjYXRTcmMpXFxubGV0IGNhdFJlZ2V4ID0gL3dpbmRvd1x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Y29tL3gvd2ViLWludGVyZmFjZS92aWV3XFxcIiwge1xcbiAgICAgICAgXFxcImFpZFxcXCI6IGlkXFxuICAgIH0pKVxcbiAgICBsZXQgbCA9IEpTT04ucGFyc2UocikuZGF0YVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGwudGl0bGUsXFxuICAgICAgICBpbWc6IGwucGljLFxcbiAgICAgICAgZGVzYzogbC5kZXNjLFxcbiAgICAgICAgdXJsOiAkKCkucnVsZSgoaW5mbykgPT4ge1xcbiAgICAgICAgICAgIGxldCBzdGF0ID0gaW5mby5zdGF0XFxuICAgICAgICAgICAgbGV0IGluZm9zID0gYGF25Y+377yaJHtpbmZvLmFpZH1cXFxcbmJ25Y+377yaJHtpbmZvLmJ2aWR9XFxcXG7mkq3mlL7ph4/vvJoke3N0YXQudmlld31cXFxcbueCuei1nu+8miR7c3RhdC5saWtlfVxcXFxu5oqV5biB77yaJHtzdGF0LmNvaW59XFxcXG7mlLbol4/vvJoke3N0YXQuZmF2b3JpdGV9XFxcXG5cXFxcbiR7aW5mby5kZXNjfWBcXG4gICAgICAgICAgICBzZXRSZXN1bHQoW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGluZm9zLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxvbmdfdGV4dFxcXCJcXG4gICAgICAgICAgICB9XSlcXG4gICAgICAgIH0sIGwpLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBncmFkaWVudDogdHJ1ZVxcbiAgICAgICAgfVxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogbC5vd25lci5uYW1lLFxcbiAgICAgICAgaW1nOiBsLm93bmVyLmZhY2UsXFxuICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdXBzP21pZD1cXFwiICsgbC5vd25lci5taWQgKyBcXFwiJnA9ZnlwYWdlI2ltbWVyc2l2ZVRoZW1lI1xcXCIsXFxuICAgICAgICBjb2xfdHlw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cXCIpLm1hdGNoKC9iaWxpX2pjdD0oLio/KTsvKVsxXVxcbiAgICAgICAgICAgIGxldCByZXMgPSBwb3N0KFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvYXJjaGl2ZS9saWtlXFxcIiwge1xcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiYWlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwibGlrZVxcXCI6IChoYXNMaWtlID8gMiA6IDEpLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImNzcmZcXFwiOiBjc3JmXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIChoYXNMaWtlID8gXFxcIuWPlua2iOeCuei1nlxcXCIgOiBcXFwi54K56LWe5oiQ5YqfXFxcIilcXG4gICAgICAgIH0sIGlkLCBoYXNMaWtlKVxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogKGhhc0NvaW4gPyBjb2xvcihjb2luLCBcXFwiI0ZBNzI5OFxcXCIpIDogY29pbiksXFxuICAgICAgICBpbWc6IFxcXCJodHRwczovL2docHJveHkuY29tL2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9Tb2NpYWxTaXN0ZXJZaS9iaWxpYmlsaS1BUEktY29sbGVjdC9tYXN0ZXIvaW1ncy9jb2luLnN2Z1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB1cmw6ICQoW1xcXCIxXFxcIiwgXFxcIjJcXFwiXSwgMiwgXFxcIuaKleW4geaVsOmHj1xcXCIpLnNlbGVjdCgoaWQpID0+IHtcXG4gICAgICAgICAgICBsZXQgY3NyZiA9IHJlYWRGaWxlKFxcXCJDb29raWUudHh0XFxcIikubWF0Y2goL2JpbGlfamN0PSguKj8pOy8pWzFdXFxuICAgICAgICAgICAgbGV0IHJlcyA9IHBvc3QoXFxcImh0dHA6Ly9hcGkuYmlsaWJpbGkuY29tL3gvd2ViLWludGVyZmFjZS9jb2luL2FkZFxcXCIsIHtcXG4gICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImFpZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm11bHRpcGx5XFxcIjogaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmZcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IHJlYWRGaWxlKFxcXCJDb29raWUudHh0XFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mipXkuoZcXFwiICsgaW5wdXQgKyBcXFwi5Liq5biBXFxcIlxcbiAgICAgICAgfSwgaWQpXFxuICAgIH0sIHtcXG4gICAgICAgIHRpdGxlOiAoaGFzRmF2b3VyID8gY29sb3IoZmF2b3VyaXRlLCBcXFwiI0ZBNzI5OFxcXCIpIDogZmF2b3VyaXRlKSxcXG4gICAgICAgIGltZzogXFxcImh0dHBzOi8vZ2hwcm94eS5jb20vaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL1NvY2lhbFNpc3RlcllpL2JpbGliaWxpLUFQSS1jb2xsZWN0L21hc3Rlci9pbWdzL2Zhdi5zdmdcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGlkLCBoYXNGYXZvdXIpID0+IHtcXG4gICAgICAgICAgICBsZXQgYm9keSA9IGhhc0Zhdm91ciA/IHtcXG4gICAgICAgICAgICAgICAgXFxcInJpZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IDIsXFxuICAgICAgICAgICAgICAgIFxcXCJkZWxfbWVkaWFfaWRzXFxcIjogMCxcXG4gICAgICAgICAgICAgICAgXFxcImNzcmZcXFwiOiBjc3JmXFxuICAgICAgICAgICAgfSA6IHtcXG4gICAgICAgICAgICAgICAgXFxcInJpZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IDIsXFxuICAgICAgICAgICAgICAgIFxcXCJhZGRfbWVkaWFfaWRzXFxcIjogMCxcXG4gICAgICAgICAgICAgICAgXFxcImNzcmZcXFwiOiBjc3JmXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBjc3JmID0gcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKS5tYXRjaCgvYmlsaV9qY3Q9KC4qPyk7LylbMV1cXG4gICAgICAgICAgICBsZXQgcmVzID0gcG9zdChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20vbWVkaWFsaXN0L2dhdGV3YXkvY29sbC9yZXNvdXJjZS9kZWFsXFxcIiwge1xcbiAgICAgICAgICAgICAgICBib2R5OiBib2R5LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogX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iBcXFwi5pm66IO95pKt5pS+XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgY2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5sYXp5KGlkLCBjaWQsIDEyMCkucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIilcXG4gICAgICAgICAgICB9LCBpZCwgY2lkKSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBcXFwibG9uZ0NsaWNrXFxcIjogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5o6o6YCBXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChpZCwgY2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZShcXFwiaHR0cHM6Ly9oaWtlcmZhbnMuY29tL0pvZS9UVmJveC5qc1xcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIOaOqOmAgXR2Ym94KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXFxcIuaOqOmAgSBieSBKb2VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2b2Q6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcXFwiYmlsaWJpbGlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogSlNPTi5wYXJzZSgkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5sYXp5KGlkLCBjaWQsIDEyMCkucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIikpLnVybFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0sIGlkLCBjaWQpXFxuICAgICAgICAgICAgICAgIH1dLFxcbiAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBcXFwicW5cXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIGEuc3VwcG9ydF9mb3JtYXRzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubmV3X2Rlc2NyaXB0aW9uLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQsIGNpZCwgcW4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5sYXp5KGlkLCBjaWQsIHFuKS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKVxcbiAgICAgICAgICAgICAgICB9LCBpZCArIFxcXCJcXFwiLCBjaWQgKyBcXFwiXFxcIiwgaXRlbS5xdWFsaXR5ICsgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIHAuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5wYXJ0LFxcbiAgICAgICAgICAgIC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aWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL2NvaW4vYWRkXFxcXFxcXCIsIHtcXFxcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYWlkXFxcXFxcXCI6IGlkLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIm11bHRpcGx5XFxcXFxcXCI6IGlucHV0LFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImNzcmZcXFxcXFxcIjogY3NyZlxcXFxuICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIkNvb2tpZVxcXFxcXFwiOiByZWFkRmlsZShcXFxcXFxcIkNvb2tpZS50eHRcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/mipXkuoZcXFxcXFxcIiArIGlucHV0ICsgXFxcXFxcXCLkuKrluIFcXFxcXFxcIlxcXFxuICAgICAgICB9LCBpZClcXFxcbiAgICB9LCB7XFxcXG4gICAgICAgIHRpdGxlOiAoaGFzRmF2b3VyID8gY29sb3IoZmF2b3VyaXRlLCBcXFxcXFxcIiNGQTcyOThcXFxcXFxcIikgOiBmYXZvdXJpdGUpLFxcXFxuICAgICAgICBpbWc6IFxcXFxcXFwiaHR0cHM6Ly9naHByb3h5LmNvbS9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3QvbWFzdGVyL2ltZ3MvZmF2LnN2Z1xcXFxcXFwiLFxcXFxuICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJpY29uX3NtYWxsXzRcXFxcXFxcIix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cXFxcXFwiYWlkXFxcXFxcXCI6IGlkXFxcXG4gICAgfSkpKS5kYXRhXFxcXG4gICAgaWYgKHAubGVuZ3RoID09IDEpIHtcXFxcbiAgICAgICAgLy/op4bpopHpk77mjqVcXFxcbiAgICAgICAgbGV0IGEgPSAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpLmdldFVybChpZCwgY2lkLCAxMjApXFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLmmbrog73mkq3mlL5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfY2VudGVyXzFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgY2lkKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9hcGlcXFxcXFxcIikubGF6eShpZCwgY2lkLCAxMjApLnJlcGxhY2UoLzsvZywgXFxcXFxcXCLvvJvvvJtcXFxcXFxcIilcXFxcbiAgICAgICAgICAgIH0sIGlkLCBjaWQpLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImxvbmdDbGlja1xcXFxcXFwiOiBbe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLmjqjpgIFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKGlkLCBjaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmUoXFxcXFxcXCJodHRwczovL2hpa2VyZmFucy5jb20vSm9lL1RWYm94LmpzXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4g5o6o6YCBdHZib3goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFxcXFxcXFwi5o6o6YCBIGJ5IEpvZVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvZDogW3tcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXFxcXFxcXCJiaWxpYmlsaVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBKU09OLnBhcnNlKCQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9hcGlcXFxcXFxcIikubGF6eShpZCwgY2lkLCAxMjApLnJlcGxhY2UoLzsvZywgXFxcXFxcXCLvvJvvvJtcXFxcXFxcIikpLnVybFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJSZWZlcmVyXFxcXFxcXCI6IFxcXFxcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9LCBpZCwgY2lkKVxcXFxuICAgICAgICAgICAgICAgIH1dLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiaWRcXFxcXFxcIjogXFxcXFxcXCJxblxcXFxcXFwiXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pXFxcXG4gICAgICAgIGEuc3VwcG9ydF9mb3JtYXRzLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5ld19kZXNjcmlwdGlvbixcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp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ICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS91c2VySW5mb1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZGF0YVxcXFxcXFwiOiBpXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSlcXFxcblxcXFxuICAgICAgICAgICAgZnVuY3Rpb24gY29sb3IodGV4dCwgY29sb3IpIHtcXFxcbiAgICAgICAgICAgICAgICB0ZXh0ICs9IFxcXFxcXFwiXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHRleHQuaW5kZXhPZihcXFxcXFxcIuKAnOKAnOKAneKAnVxcXFxcXFwiKSA9PT0gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0ZXh0LnJlcGxhY2UoXFxcXFxcXCLigJzigJzigJ3igJ1cXFxcXFxcIiwgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdcXFxcXFxcIiArIGNvbG9yICsgXFxcXFxcXCInPlxcXFxcXFwiICsgdGV4dCArIFxcXFxcXFwiPC9mb250PlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgbGV0IHRhYnMgPSB7XFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCLmjqjojZBcXFxcXFxcIjogXFxcXFxcXCJoaWtlcjovL2ltYWdlcy9jb2xsZWN0aW9uXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCLliIbnsbtcXFxcXFxcIjogXFxcXFxcXCJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW92aWUvNjkuc3ZnXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCLmlrDnlapcXFxcXFxcIjogXFxcXFxcXCJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW92aWUvODQuc3ZnXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCLmiJHnmoRcXFxcXFxcIjogXFxcXFxcXCJoaWtlcjovL2ltYWdlcy9pY29uM1xcXFxcXFwiXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBPYmplY3QuZW50cmllcyh0YWJzKS5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtWzBdLFxcXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW1bMV0sXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCh0YWIpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwibW9kZVxcXFxcXFwiLCB0YWIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgaXRlbVswXSksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImljb25fcm91bmRfc21hbGxfNFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImxpbmVcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBsZXQgbW9kZSA9IGdldE15VmFyKFxcXFxcXFwibW9kZVxcXFxcXFwiLCBcXFxcXFxcIuaOqOiNkFxcXFxcXFwiKVxcXFxuICAgICAgICBpZiAobW9kZSA9PSBcXFxcXFxcIuaOqOiNkFxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICBnZXRGZWVkKCkuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IEpTT04uc3RyaW5naWZ5KGl0ZW0pXFxcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5waWMsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGl0ZW0uc3RhdC52aWV3ICsgXFxcXFxcXCLmkq3mlL7igLtcXFxcXFxcIiArIGl0ZW0uc3RhdC5saWtlICsgXFxcXFxcXCLngrnotZ5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS9kZXRhaWwjZ2FtZVRoZW1lI1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJpZFxcXFxcXFwiOiBpdGVtLmlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJidmlkXFxcXFxcXCI6IGl0ZW0uYnZpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiY2lkXFxcXFxcXCI6IGl0ZW0uY2lkXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfSBlbHNlIGlmIChtb2RlID09IFxcXFxcXFwi5oiR55qEXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoXFxcXFxcXCJ3ZFxcXFxcXFwiLCBcXFxcXFxcImhpc3RvcnlcXFxcXFxcIikgPT0gXFxcXFxcXCJoaXN0b3J5XFxcXFxcXCIgPyBjb2xvcihcXFxcXFxcIuingueci+WOhuWPslxcXFxcXFwiLCBcXFxcXFxcInJlZFxcXFxcXFwiKSA6IFxcXFxcXFwi6KeC55yL5Y6G5Y+yXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwid2RcXFxcXFxcIiwgXFxcXFxcXCJoaXN0b3J5XFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfM1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoXFxcXFxcXCJ3ZFxcXFxcXFwiLCBcXFxcXFxcImhpc3RvcnlcXFxcXFxcIikgPT0gXFxcXFxcXCJmYXZcXFxcXFxcIiA/IGNvbG9yKFxcXFxcXFwi5pS26JePXFxcXFxcXCIsIFxcXFxcXFwicmVkXFxcXFxcXCIpIDogXFxcXFxcXCLmlLbol49cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJ3ZFxcXFxcXFwiLCBcXFxcXFxcImZhdlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzNcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKFxcXFxcXFwid2RcXFxcXFxcIiwgXFxcXFxcXCJoaXN0b3J5XFxcXFxcXCIpID09IFxcXFxcXFwic3ViXFxcXFxcXCIgPyBjb2xvcihcXFxcXFxcIuWFs+azqFxcXFxcXFwiLCBcXFxcXFxcInJlZFxcXFxcXFwiKSA6IFxcXFxcXFwi5YWz5rOoXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwid2RcXFxcXFxcIiwgXFxcXFxcXCJzdWJcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8zXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaWYgKGdldE15VmFyKFxcXFxcXFwid2RcXFxcXFxcIiwgXFxcXFxcXCJoaXN0b3J5XFxcXFxcXCIpID09IFxcXFxcXFwiaGlzdG9yeVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgY29uc3Qge1xcXFxuICAgICAgICAgICAgICAgICAgICBnZXRIaXN0b3J5XFxcXG4gICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9hcGlcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICBnZXRIaXN0b3J5KE1ZX1BBR0UpLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5waWMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbCNpbW1lcnNpdmVUaGVtZSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJpZFxcXFxcXFwiOiBpdGVtLmFpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJ2aWRcXFxcXFxcIjogaXRlbS5idmlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiY2lkXFxcXFxcXCI6IGl0ZW0uY2lkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZ2V0TXlWYXIoXFxcXFxcXCJ3ZFxcXFxcXFwiLCBcXFxcXFxcImhpc3RvcnlcXFxcXFxcIikgPT0gXFxcXFxcXCJmYXZcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgIHZhciB0ZWFtcyA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9hcGlcXFxcXFxcIikuZ2V0ZmF2dGVhbSgpWzBdLm1lZGlhTGlzdFJlc3BvbnNlLmxpc3RcXFxcbiAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRlYW1zLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoXFxcXFxcXCJmYXZvXFxcXFxcXCIsIHRlYW1zWzBdLmlkICsgXFxcXFxcXCJcXFxcXFxcIikgPT0gaXRlbS5pZCA/IGNvbG9yKGl0ZW0udGl0bGUsIFxcXFxcXFwicmVkXFxcXFxcXCIpIDogaXRlbS50aXRsZSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwic2Nyb2xsX2J1dHRvblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcImZhdm9cXFxcXFxcIiwgaWQgKyBcXFxcXFxcIlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGl0ZW0uaWQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpLmdldEZhdm91cihnZXRNeVZhcihcXFxcXFxcImZhdm9cXFxcXFxcIiwgdGVhbXNbMF0uaWQgKyBcXFxcXFxcIlxcXFxcXFwiKSwgTVlfUEFHRSkubWVkaWFzLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5jb3ZlcixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsI2dhbWVUaGVtZSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJpZFxcXFxcXFwiOiBpdGVtLmlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiY2lkXFxcXFxcXCI6IGl0ZW0udWdjLmZpcnN0X2NpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJ2aWRcXFxcXFxcIjogaXRlbS5idmlkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpLmdldHNsaXN0KCkuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChnZXRNeVZhcihcXFxcXFxcInN1YlxcXFxcXFwiLCBcXFxcXFxcIjBcXFxcXFxcIikgPT0gaXRlbS50YWdpZCA/IGNvbG9yKGl0ZW0ubmFtZSwgXFxcXFxcXCJyZWRcXFxcXFxcIikgOiBpdGVtLm5hbWUpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcInN1YlxcXFxcXFwiLCBpZClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBpdGVtLnRhZ2lkKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9hcGlcXFxcXFxcIikuZ2V0U3Vic3JpYmVzKGdldE15VmFyKFxcXFxcXFwic3ViXFxcXFxcXCIsIFxcXFxcXFwiMFxcXFxcXFwiKSwgTVlfUEFHRSkuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnVuYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLmZhY2UsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3Vwcz9taWQ9XFxcXFxcXCIgKyBpdGVtLm1pZCArIFxcXFxcXFwiJnA9ZnlwYWdlI2ltbWVyc2l2ZVRoZW1lI1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYXZhdGFyXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPT0gXFxcXFxcXCLmlrDnlapcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgdmFyIHRhYnMgPSB7XFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCLnlarliadcXFxcXFxcIjogMSxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcIueUteW9sVxcXFxcXFwiOiAzLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwi5Zu95YibXFxcXFxcXCI6IDRcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXFxcbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0YWJzKS5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChnZXRNeVZhcihcXFxcXFxcImp1amlcXFxcXFxcIiwgXFxcXFxcXCLnlarliadcXFxcXFxcIikgPT0gaXRlbSA/IGNvbG9yKGl0ZW0sIFxcXFxcXFwicmVkXFxcXFxcXCIpIDogaXRlbSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoYSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwianVqaVxcXFxcXFwiLCBhKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+WIh+aNouaIkOWKn1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpdGVtKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInNjcm9sbF9idXR0b25cXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwibGluZVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICBsZXQgZGF5cyA9IDdcXFxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IGRheXMgKyAxOyBpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoXFxcXFxcXCJmcm9tXFxcXFxcXCIsIFxcXFxcXFwiMVxcXFxcXFwiKSA9PSBpICsgXFxcXFxcXCJcXFxcXFxcIiA/IGNvbG9yKGkgKyBcXFxcXFxcIuWkqeWJjVxcXFxcXFwiLCBcXFxcXFxcInJlZFxcXFxcXFwiKSA6IGkgKyBcXFxcXFxcIuWkqeWJjVxcXFxcXFwiKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJmcm9tXFxcXFxcXCIsIGkgKyBcXFxcXFxcIlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwic2Nyb2xsX2J1dHRvblxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImxpbmVcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBkYXlzOyBpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoXFxcXFxcXCJ0b1xcXFxcXFwiLCBcXFxcXFxcIjFcXFxcXFxcIikgPT0gaSArIFxcXFxcXFwiXFxcXFxcXCIgPyBjb2xvcihpICsgXFxcXFxcXCLlpKnlkI5cXFxcXFxcIiwgXFxcXFxcXCJyZWRcXFxcXFxcIikgOiBpICsgXFxcXFxcXCLlpKnlkI5cXFxcXFxcIiksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwidG9cXFxcXFxcIiwgaSArIFxcXFxcXFwiXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpLmdldE1vdmllcyh0YWJzW2dldE15VmFyKFxcXFxcXFwianVqaVxcXFxcXFwiLCBcXFxcXFxcIueVquWJp1xcXFxcXFwiKV0sIGdldE15VmFyKFxcXFxcXFwiZnJvbVxcXFxcXFwiLCBcXFxcXFxcIjFcXFxcXFxcIiksIGdldE15VmFyKFxcXFxcXFwidG9cXFxcXFxcIiwgXFxcXFxcXCIxXFxcXFxcXCIpKS5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uZGF0ZSArIFxcXFxcXFwiIOWRqFxcXFxcXFwiICsgaXRlbS5kYXlfb2Zfd2VlayxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfMVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICBpdGVtLmVwaXNvZGVzLmZvckVhY2goaSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpLnRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaS5jb3ZlcixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbGEjZ2FtZVRoZW1lI1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwic3NpZFxcXFxcXFwiOiBpLnNlYXNvbl9pZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJlcGlkXFxcXFxcXCI6IGkuZXBpc29kZV9pZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSBlbHNlIGlmIChtb2RlID0gXFxcXFxcXCLliIbnsbtcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NhdFxcXFxcXFwiKSkucnVsZSlcXFxcbiAgICAgICAgfVxcXFxuICAgIH0gZWxzZSB7XFxcXG4gICAgICAgIGlmIChnZXRJdGVtKFxcXFxcXFwiZnNcXFxcXFxcIiwgXFxcXFxcXCIwXFxcXFxcXCIpID09IFxcXFxcXFwiMFxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICBsZXQgYSA9IFtdXFxcXG4gICAgICAgICAgICBsZXQgdGltZSA9IDEwXFxcXG4gICAgICAgICAgICBhLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBgICAgICAgICAgICAgICAgICAgICAg5L2/55So5YmN6aG755+lXFxcXG7mnKzop4TliJnosIPnlKhodHRwczovL2dpdGh1Yi5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3TnmoRhcGnvvIzmiYDmnInku6PnoIHlhajpg6jlvIDmupDvvIzlubbkuJTkuI3lrZjlnKjkuIrkvKDnlKjmiLfkv6Hmga/nmoTooYzkuLpcXFxcbuacrOinhOWImeS4uuWtpuS5oOebrueahO+8jOivt+S6juWvvOWFpTI05bCP5pe25YaF5Yig6Zmk77yB77yB77yBICAgICAgICAgICAgICAgICAgICAgICAgXFxcXG7lvIDlp4vkvb/nlKjmnKzop4TliJnljbPku6PooajpgbXlrojop4TliJkgICAgICAgICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICAgICAgYCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImNvbF90eXBlXFxcXFxcXCI6IFxcXFxcXFwibG9uZ190ZXh0XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXFxcXFwidGV4dFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aW1lICsgXFxcXFxcXCLnp5LlkI7nu6fnu61cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZDogXFxcXFxcXCJ0aW1lclxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIHNldFJlc3VsdChhKVxcXFxuICAgICAgICAgICAgd2hpbGUgKHRpbWUgIT0gMCkge1xcXFxuICAgICAgICAgICAgICAgIGphdmEubGFuZy5UaHJlYWQuc2xlZXAoMTAwMClcXFxcbiAgICAgICAgICAgICAgICB0aW1lIC09IDFcXFxcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKFxcXFxcXFwidGltZXJcXFxcXFxcIiwge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGltZSArIFxcXFxcXFwi56eS5ZCO57un57utXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgdXBkYXRlSXRlbShcXFxcXFxcInRpbWVyXFxcXFxcXCIsIHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLmiJHlt7Lnn6XmmZNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcXFxcXCJmc1xcXFxcXFwiLCBcXFxcXFxcIjFcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+S9oOW3suehruiupFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvbG9naW5cXFxcXFxcIilcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbn0gY2F0Y2ggKGUpIHtcXFxcbiAgICBsb2coZS5tZXNzYWdlKVxcXFxuICAgIGQucHVzaCh7XFxcXG4gICAgICAgIHRpdG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svKVsxXVxcXFxuICAgICAgICAgICAgcG9zdChcXFxcXFxcImh0dHA6Ly9hcGkuYmlsaWJpbGkuY29tL3gvdjIvcmVwbHkvYWRkXFxcXFxcXCIsIHtcXFxcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidHlwZVxcXFxcXFwiOiAxLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIm9pZFxcXFxcXFwiOiBpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJjc3JmXFxcXFxcXCI6IGNzcmYsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwibWVzc2FnZVxcXFxcXFwiOiBpbnB1dFxcXFxuICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIkNvb2tpZVxcXFxcXFwiOiByZWFkRmlsZShcXFxcXFxcIkNvb2tpZS50eHRcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICB9LCBpZClcXFxcbiAgICB9KVxcXFxufVxcXFxudmFyIHRhYnMgPSBbXFxcXFxcXCLng63luqZcXFxcXFxcIiwgXFxcXFxcXCLml7bpl7RcXFxcXFxcIl1cXFxcbnRhYnMuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICBkLnB1c2goe1xcXFxuICAgICAgICB0aXRsZTogaXRlbSxcXFxcbiAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwic29ydGJ5XFxcXFxcXCIsIGkpXFxcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoa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b2xfdHlwZTogXFxcXFxcXCJsb25nX3RleHRcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfV1cXFxcbiAgICAgICAgICAgIGxldCByZXBseSA9IHJlcXVlc3QoYnVpbGRVcmwoXFxcXFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3YyL3JlcGx5L3JlcGx5XFxcXFxcXCIsIHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInR5cGVcXFxcXFxcIjogMSxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcIm9pZFxcXFxcXFwiOiBvaWQsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJyb290XFxcXFxcXCI6IHJwaWRcXFxcbiAgICAgICAgICAgIH0pLCB7XFxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIkNvb2tpZVxcXFxcXFwiOiByZWFkRmlsZShcXFxcXFxcIkNvb2tpZS50eHRcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJsaW5lXFxcXFxcXCJcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgIEpTT04ucGFyc2UocmVwbHkpLmRhdGEucmVwbGllcy5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5tZW1iZXIudW5hbWUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0ubWVtYmVyLmF2YXRhcixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2Uvd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SB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHAgPSBKU09OLnBhcnNlKHJlcXVlc3QoYnVpbGRVcmwoXFxcXFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3BsYXllci9wYWdlbGlzdFxcXFxcXFwiLCB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYWlkXFxcXFxcXCI6IGl0ZW0uYWlkXFxcXG4gICAgICAgICAgICAgICAgfSkpKS5kYXRhXFxcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUucmVwbGFjZSgvPFtePl0qPnw8XFxcXFxcXFwvW14+XSo+L2dtLCBcXFxcXFxcIlxcXFxcXFwiKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBcXFxcXFxcImh0dHBzOlxcXFxcXFwiICsgaXRlbS5waWMsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsI2dhbWVUaGVtZSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaWRcXFxcXFxcIjogaXRlbS5haWQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJ2aWRcXFxcXFxcIjogaXRlbS5idmlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJjaWRcXFxcXFxcIjogcFswXS5jaWRcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLnJlcGxhY2UoLzxbXj5dKj58PFxcXFxcXFxcL1tePl0qPi9nbSwgXFxcXFxcXCJcXFxcXFxcIiksXFxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5jb3ZlcixcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS9kZXRhaWxhI2dhbWVUaGVtZSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwic3NpZFxcXFxcXFwiOiBpdGVtLnNlYXNvbl9pZFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSlcXFxcbiAgICB9XFxcXG59IGNhdGNoIChlKSB7XFxcXG4gICAgbG9nKGUubWVzc2FnZSlcXFxcbiAgICBzZXRSZXN1bHQoW3tcXFxcbiAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Y2VudGVyPjxzbWFsbD48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiAjOTk5OTk5XFxcXFxcXCI+772e772e772e5oiR5piv5pyJ5bqV57q/55qE772e772e772ePC9zcGFuPjwvc21hbGw+PC9jZW50ZXI+JyxcXFxcbiAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF9jZW50ZXJfMVxcXFxcXFwiLFxcXFxuICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiLFxcXFxuICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxcXG4gICAgICAgIH1cXFxcbiAgICB9XSlcXFxcbn1cXFxcbnNldFJlc3VsdChkKTtcXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfMlxcXCIsXFxcIm5hbWVcXFwiOlxcXCLliafpm4bor6bmg4VcXFwiLFxcXCJwYXRoXFxcIjpcXF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9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCArIFxcXFxcXFwiI1xcXFxcXFwiICsgcGFyYW1zLnN1Yl9jYXRlZ29yeV9uYW1lLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yeV9uYW1lOiBzdWJfY2F0ZWdvcnlfbmFtZVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgbGF5b3V0LnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfS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dmllXzMnLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcIm1lZGlhX2lkXFxcXFxcXCI6IGRhdGEubWVkaWFfaWQsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJzc2lkXFxcXFxcXCI6IGRhdGEuc2Vhc29uX2lkXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pO1xcXFxuICAgIH1cXFxcbn0gY2F0Y2ggKGUpIHtcXFxcbiAgICBsb2coZS5tZXNzYWdlKVxcXFxufVxcXCJ9XVwiLFwicHJveHlcIjpcIlwifSIsInBpY1VybCI6Imh0dHA6Ly9pMi5oZHNsYi5jb20vYmZzL2FyY2hpdmUvZGY4NTUzOGE4YTJkZTZlMWQ3YWFiOGQ3ZTllMWEyOTBjZjA2YzE4OC5qcGciLCJ0aXRsZSI6IuWtqeWtkC4uLuiaiuWtkOWlveWQg+WQl++8nyJ9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement