Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@磁力君.简@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi56OB5Yqb5ZCbLueugCIsImF1dGhvciI6IuWwj+ajieiihPCfjJ4mQExveURnSWsiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNmeXBhZ2UiLCJ2ZXJzaW9uIjoyMjMsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoiYWxsIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6JC5yZXF1aXJlKFwiTWFpblwiKTsiLCJzZWFyY2hfdXJsIjoiaGlrZXI6Ly9lbXB0eT9zZWFyY2hUZXJtcz0qKiIsImdyb3VwIjoiIyMj56eB5Lq65aSp5Zyw4pml4pml4pmlIiwic2VhcmNoRmluZCI6ImpzOlxuY2xlYXJQdWJsaWNJdGVtKFwi56OB5Yqb5ZCbLueugOi3s+i9rFwiKTtcbmxldCBrZXkgPSBnZXRQYXJhbShcInNlYXJjaFRlcm1zXCIpO1xuc2V0UmVzdWx0KFt7XG4gICAgdGl0bGU6IFwi54K55oiR5byA5aeL6IGa5ZCI5pCc57SiXCIgKyBrZXksXG4gICAgdXJsOiBcImhpa2VyOi8vcGFnZS9zb3Ujbm9IaXN0b3J5Iz9wPWZ5cGFnZVwiLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIHBhZ2VUaXRsZTogXCLmkJzntKJcIiArIGtleSxcbiAgICAgICAgc2VhcmNoVGVybXM6IGtleSxcbiAgICAgICAgaGlkZVNldHRpbmc6IHRydWVcbiAgICB9XG59XSk7IiwiZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsImRldGFpbF9maW5kX3J1bGUiOiIiLCJzZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsInNkZXRhaWxfZmluZF9ydWxlIjoiIiwidWEiOiJtb2JpbGUiLCJwcmVSdWxlIjoiIiwicGFnZXMiOiJbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuinhOWImeWkhOeQhlwiLFwicGF0aFwiOlwiZGF0YVwiLFwicnVsZVwiOlwianM6XFxuZnVuY3Rpb24gZG91YmxlVHJlYXRpbmcoY29uZmlnLCBnZXRNb2RlVXJsKSB7XFxuICAgIGxldCB7XFxuICAgICAgICBvcGVuTW9kZSxcXG4gICAgICAgIGZpbmRBbGlVcmwsXFxuICAgICAgICBiYXNpY1VybCxcXG4gICAgICAgIG5hbWVcXG4gICAgfSA9IGNvbmZpZztcXG4gICAgbGV0IGNpbGlVcmwgPSBpbnB1dDtcXG4gICAgbGV0IHNoYXJlUHdkO1xcbiAgICBpZiAoZmluZEFsaVVybCkge1xcbiAgICAgICAgbGV0IHJlc3VsdDtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgcmVzdWx0ID0gZmluZEFsaVVybChjaWxpVXJsLCBiYXNpY1VybCk7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICQoXFxcIuaQnOe0ouW8leaTjuOAjFxcXCIgKyBuYW1lICsgXFxcIuOAjeWkseaViOivt+iBlOezu+aQnOe0ouW8leaTjuS9nOiAheS/ruWkjeaIluWIoOmZpFxcXFxuXFxcXG7lvJXmk47kvZzogIXlj6/ku6XljrvlrpjmlrnpopHpgZPor6Lpl65cXFxcbueCueWHu+ehruWumuW/q+mAn+WIoOmZpFxcXCIpLmNvbmZpcm0oKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIua4qemmqOaPkOekulxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBcXFwi56Gu5a6a6KaB5Yig6ZmkXFxcIiArIG5hbWUgKyBcXFwi5ZCX77yf5rOo5oSP5Yig6Zmk5ZCO5peg5rOV5oGi5aSNXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gJC5yZXF1aXJlKFxcXCJjb25maWdzXFxcIikuZ2V0SnNvbigpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IGFyci5maW5kSW5kZXgodiA9PiB2Lm5hbWUgPT09IG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiY29uZmlnc1xcXCIpLnNhdmVKc29uKGFycik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKFxcXCJydWxlXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WIoOmZpOaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9LCBuYW1lKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9LCBuYW1lKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHJlc3VsdCkgJiYgcmVzdWx0Lmxlbmd0aCA9PT0gMSkge1xcbiAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdFswXTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh0eXBlb2YgcmVzdWx0ID09PSBcXFwic3RyaW5nXFxcIikge1xcbiAgICAgICAgICAgIGNpbGlVcmwgPSByZXN1bHQ7XFxuICAgICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkocmVzdWx0KSAmJiByZXN1bHQubGVuZ3RoKSB7XFxuICAgICAgICAgICAgbGV0IGlzU3RyID0gdHlwZW9mKHJlc3VsdFswXSkgPT09IFxcXCJzdHJpbmdcXFwiO1xcbiAgICAgICAgICAgIGxldCBzZWxlY3QgPSByZXN1bHQ7XFxuICAgICAgICAgICAgaWYgKCFpc1N0cikge1xcbiAgICAgICAgICAgICAgICBzZWxlY3QgPSByZXN1bHQubWFwKHYgPT4gdi5jaWxpVXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgc2VsZWN0ID0gc2VsZWN0Lm1hcCh2ID0+IHYucmVwbGFjZSgvaHR0cC4qP1xcXFwvc1xcXFwvLywgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICByZXR1cm4gJChzZWxlY3QpLnNlbGVjdCgoY29uZmlnLCBnZXRNb2RlVXJsLCBpc1N0ciwgcmVzdWx0KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBjaWxpVXJsO1xcbiAgICAgICAgICAgICAgICBsZXQgc2hhcmVQd2Q7XFxuICAgICAgICAgICAgICAgIGlmICghaXNTdHIpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByID0gcmVzdWx0LmZpbmQodiA9PiB2LmNpbGlVcmwuaW5jbHVkZXMoaW5wdXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIGNpbGlVcmwgPSByLmNpbGlVcmw7XFxuICAgICAgICAgICAgICAgICAgICBzaGFyZVB3ZCA9IHIuc2hhcmVQd2Q7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBjaWxpVXJsID0gcmVzdWx0LmZpbmQodiA9PiB2LmluY2x1ZGVzKGlucHV0KSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldE1vZGVVcmwoY2lsaVVybCwgc2hhcmVQd2QsIGNv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ICAgICAgICByZXR1cm4gbnVsbDtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBsZXQgdGV4dCA9IGdldENvcHkoKSB8fCBcXFwiXFxcIjtcXG4gICAgbGV0IHVybCA9IGNvZGV0ZXN0Lm1hdGNoQ29kZSh0ZXh0KTtcXG4gICAgaWYgKHVybCkge1xcbiAgICAgICAgbGV0IGNhY2hlID0gZ2V0SXRlbShcXFwiY2xpcGJvYXJkQ2FjaGVcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICBpZiAodXJsICE9PSBjYWNoZSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9XFxcIiMxM0I2MUJcXFwiPuKWkCA8L2ZvbnQ+PGI+5rip6aao5o+Q56S6PGI+JyxcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIuajgOa1i+WIsOWJqui0tOadv+WQq+acieeVquWPt+aYr+WQpuaJk+W8gD9cXFxcblxcXCIgKyB1cmwsXFxuICAgICAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoaW5wdXQsIGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtKGlkICsgXFxcImNsaXBib2FyZFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2Uvc291P3A9ZnlwYWdlJnNlYXJjaFRlcm1zPVxcXCIgKyBpbnB1dDtcXG4gICAgICAgICAgICAgICAgfSwgdXJsLCBpZCksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpZCArIFx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tcXFwi5qih5byP77ya5rW36ZiU6KeG55WMXFxcIiwgXFxcIuaooeW8j++8mui/hembt+S4i+i9vVxcXCIsXFxcIuaooeW8j++8mlBJS1BBS1xcXCIsIFxcXCLmqKHlvI/vvJrkuozpqbTkuIvovb1cXFwiLCBcXFwi5qih5byP77ya5bCP55m95LiL6L29XFxcIixcXFwi5qih5byP77ya5bm75b2x5LiL6L29XFxcIiwgXFxcIuaooeW8j++8muaCn+epuuS4i+i9vVxcXCIsXFxcIuaooeW8j++8muWFtuS7luS4i+i9vVxcXCIsIFxcXCLop4TliJnnrqHnkIZcXFwiLCBcXFwi5pSv5oyB5L2c6ICFXFxcIl0sXFxuICAgICAgICAgICAgY29sOiAyLFxcbiAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKFxcXCLop4TliJnnrqHnkIZcXFwiID09IGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9ydWxlTWFuYWdlI25vUmVjb3JkSGlzdG9yeSMjbm9IaXN0b3J5I1xcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKFxcXCLmlK/mjIHkvZzogIVcXFwiID09IGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9Eb25hdGUudiNub1JlY29yZEhpc3RvcnkjI25vSGlzdG9yeSNcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZShcXFwi5qih5byP77yaXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJvcGVuTW9kZVxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLov4Xpm7fkuIvovb1cXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx05L+u5pS55oiQ5YqfXFxcXG7or7fnoa7kv53mnInlronoo4XjgJDov4Xpm7fkuIvovb3jgJFcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiUElLUEFLXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdOS/ruaUueaIkOWKn1xcXFxu6K+356Gu5L+d5pyJ5a6J6KOF44CQUElLUEFL44CRXFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIuS6jOmptOS4i+i9vVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHTkv67mlLnmiJDlip9cXFxcbuivt+ehruS/neacieWuieijheOAkOS6jOmptOS4i+i9veOAkVxcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLlubvlvbHkuIvovb1cXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx05L+u5pS55oiQ5YqfXFxcXG7or7fnoa7kv53mnInlronoo4XjgJDlubvlvbHkuIvovb3jgJFcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwi5bCP55m95LiL6L29XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdOS/ruaUueaIkOWKn1xcXFxu6K+356Gu5L+d5pyJ5a6J6KOF44CQ5bCP55m95LiL6L2944CRXFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIuaCn+epuuS4i+i9vVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHTkv67mlLnmiJDlip9cXFxcbuivt+ehruS/neacieWuieijheOAkOaCn+epuuS4i+i9veOAkVxcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLlhbbku5bkuIvovb1cXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZW/5oyJ6YCJ5oup44CQ5LiL6L296LWE5rqQ44CRXFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl8yX3JvdW5kXFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcImhpa2VyOi8vaW1hZ2VzL2ljb25fbWVudTZcXFwiXFxuICAgIH0pO1xcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfwn5SOJyxcXG4gICAgICAgIGRlc2M6ICfor7fovpPlhaXlhbPplK7or40v6ZO+5o6lJyxcXG4gICAgICAgIGNvbF90eXBlOiAnaW5w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gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcIikuZ2V0RGF0YSgtMSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIvCfjJ9cXFwiLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9jb2xsZWN0aW9uP3J1bGU9XFxcIiArIE1ZX1JVTEUudGl0bGUsXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogXFxcIlxcXCIgPT0gciA/IFxcXCLigJzigJzlhajpg6jigJ3igJ1cXFwiIDogXFxcIuWFqOmDqFxcXCIsXFxuICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHMsIGlkKSA9PiB7XFxuICAgICAgICAgICAgbGV0IHFyID0gZ2V0SXRlbShcXFwicnVsZVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICBjbGVhckl0ZW0oXFxcInJ1bGVcXFwiKTtcXG4gICAgICAgICAgICBpZiAocykge1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oXFxcIuWFqOmDqFxcXCIgKyBpZCwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLigJzigJzlhajpg6jigJ3igJ1cXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBpZiAocXIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oaWQgKyBxciwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBxclxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgcywgaWQpLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IFxcXCLlhajpg6hcXFwiICsgaWRcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGZvciAobGV0IFtpdCwgYmFzaWNVcmxdIG9mIHJ1bGVzKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBpdCA9PSByID8gXFxcIuKAnOKAnFxcXCIgKyBpdCArIFxcXCLigJ3igJ1cXFwiIDogaXQsXFxuICAgICAgICAgICAgdXJsOiAkKChiYXNpY1VybCB8fCBcXFwiXFxcIikgKyBcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgociwgcywgaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHFyID0gZ2V0SXRlbShcXFwicnVsZVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgc2V0SXRlbShcXFwicnVsZVxcXCIsIHIpO1xcbiAgICAgICAgICAgICAgICBpZiAocykge1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0ocXIgPyAoaWQgKyBxcikgOiAoXFxcIuWFqOmDqFxcXCIgKyBpZCksIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcXIgfHwgXFxcIuWFqOmDqFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbShpZCArIHIsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnFxcXCIgKyByICsgXFxcIuKAneKAnVxcXCJcXG4gIC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sZXQgcGFnZWlkID0gaWQgKyBcXFwieXBqLXBhZ2VcXFwiICsgcDtcXG4gICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuWKoOi9veesrFxcXCIgKyBwICsgXFxcIumhteS4re+8jOi/m+W6pu+8mjEvXFxcIiArIGRhdGEubGVuZ3RoLFxcbiAgICAgICAgICAgIHVybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogcGFnZWlkXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgc2V0UmVzdWx0KGQpO1xcbiAgICBpZiAoZGF0YS5sZW5ndGggPiAwKSB7XFxuICAgICAgICAvL+Wkmue6v+eoi+WKoOi9vSAgICAgICAgXFxuICAgICAgICBsZXQgcmVhbFBhZ2UgPSBcXFwiXFxcIiA9PSByID8gMSA6IHA7XFxuICAgICAgICBsZXQgdGFza3MgPSBkYXRhLm1hcChpdCA9PiB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocnVsZSkge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJkYXRhXFxcIikuY2FycnlSdWxlKHJ1bGUsIHMsIHJlYWxQYWdlLCBzZWFyY2hNb2RlLCBvcGVuTW9kZSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKHJ1bGUubmFtZSArIFxcXCI6XFxcIiArIGUudG9TdHJpbmcoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLyppZihkYXRhLmxlbmd0aD09PTEmJnA9PT0xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTpcXFwi4oCc4oCcXFxcIitydWxlLm5hbWUrXFxcIiBFUlJPUuKAneKAnVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBlLnRvU3RyaW5nKCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6XFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIHJ1bGUuZmluZChzLCByZWFsUGFnZSk7XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHBhcmFtOiBpdCxcXG4gICAgICAgICAgICAgICAgaWQ6IFxcXCJydWxlQFxcXCIgKyBpdC5uYW1lXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBiYXRjaEV4ZWN1dGUodGFza3MsIHtcXG4gICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihwYXJhbSwgaWQsIGVycm9yLCByZXN1bHQpIHtcXG4gICAgICAgICAgICAgICAgcGFyYW0uaSArPSAxO1xcbiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShyZXN1bHQpKSB7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtKFxcXCJfbm90aGF2ZVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShwYWdlaWQsIHJlc3VsdCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKHBhcmFtLmkgPT09IHBhcmFtLmFsbCkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXN1bHQgfHwgIXJlc3VsdC5sZW5ndGgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtKFxcXCJfbm90aGF2ZVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUocGFnZWlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBcXFwifn5+5LuA5LmI6LWE5rqQ6YO95rKh5pyJ5ZOmfn5+XFxcIi5mb250Y29sb3IoXFxcIkdyYXlcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcXFwiX25vdGhhdmVcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW0ocGFnZWlkKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0ocGFnZWlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLliqDovb3nrKxcXFwiICsgTVlfUEFHRSArIFxcXCLpobXkuK3vvIzov5vluqbvvJpcXFwiICsgKHBhcmFtLmkgKyAxKSArIFxcXCIvXFxcIiArIHBhcmFtLmFsbCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgYWxsOiBkYXRhLmxlbmd0aCxcXG4gICAgICAgICAgICAgICAgaTogMCxcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxufVxcblxcbmZ1bmN0aW9uIHNldEhpc3RvcnkoKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojZmY2NjAxXFxcIj48Yj7ljoblj7LorrDlvZU8L2I+PC9zcGFuPicsXFxuICAgICAgICBwaWNfdXJsOiBcXFwiaGlrZXI6Ly9pbWFnZXMvaWNvbl9jbG9ja1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICB1cmw6ICQoW1xcXCLmuIXpmaTmkJzntKLorrDlvZVcXFwiLCBcXFwi5omT5byA6KeC55yL6K6w5b2VXFxcIl0pLnNlbGVjdCgoaWQpID0+IHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT09IFxcXCLmuIXpmaTmkJzntKLorrDlvZVcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCLnoa7lrprmuIXpmaTlhajpg6jmkJzntKLorrDlvZXvvJ9cXFwiKS5jb25maXJtKChpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKFxcXCJzZWFyY2hIaXN0b3J5XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoaWQgKyBcXFwiOmtleVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKGlkICsgXFxcIjpzZWFyY2hIaXN0b3J5XFxcIiwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLigJzigJzigJ3igJ1cXFwiICsgXFxcIn5+fuS7gOS5iOmDveayoeacieWTpn5+flxcXCIuZm9udGNvbG9yKFxcXCJHcmF5XFxcIiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBpZCArIFxcXCI6a2V5XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0sIGlkKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vaGlzdG9yeT9ydWxlPVxcXCIgKyBNWV9SVUxFLnRpdGxlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIGlkKSxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IGlkICsgXFxcIjpzZWFyY2hIaXN0b3J5XFxcIixcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuXFxuICAgIGxldCBoaXN0b3J5ID0gc3RvcmFnZTAuZ2V0SXRlbShcXFwic2VhcmNoSGlzdG9yeVxcXCIsIFtdKTtcXG4gICAgbGV0IGkgPSAwO1xcbiAgICBmb3IgKGxldCBrZXkgb2YgaGlzdG9yeSkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZToga2V5LFxcbiAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoaWQsIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgZXh0cmEgPSBmaW5kSXRlbShpZCArIFxcXCJzc1xcXCIpLmV4dHJhO1xcbiAgICAgICAgICAgICAgICBleHRyYS5kZWZhdWx0VmFsdWUgPSBrZXk7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IGV4dHJhXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgIH0sIGlkLCBrZXkpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBpZCArIFxcXCI6a2V5OlxcXCIgKyBrZXksXFxuICAgICAgICAgICAgICAgIGNsczogaWQgKyBcXFwiOmtleVxcXCIsXFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5Yig6Zmk5YWz6ZSu6K+NOlxcXCIgKyBrZXksXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoaWQsIGtleSwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoaXN0b3J5ID0gc3RvcmFnZTAuZ2V0SXRlbShcXFwic2VhcmNoSGlzdG9yeVxcXCIsIFtdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoaXN0b3J5LnNwbGljZShpLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKFxcXCJzZWFyY2hIaXN0b3J5XFxcIiwgaGlzdG9yeSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbShpZCArIFxcXCI6a2V5OlxcXCIgKyBrZXkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vdG9hc3QoKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIGlkLCBrZXksIGkpXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBpKys7XFxuICAgIH1cXG4gICAgaWYgKGhpc3RvcnkubGVuZ3RoID09PSAwKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLigJzigJzigJ3igJ1cXFwiICsgXFxcIn5+fuS7gOS5iOmDveayoeacieWTpn5+flxcXCIuZm9udGNvbG9yKFxcXCJHcmF5XFxcIiksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgY2xzOiBpZCArIFxcXCI6a2V5XFxcIixcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cX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2I+PC9zcGFuPicsXFxuICAgICAgICB1cmw6ICQoaG90a2V5cywgMSwgXFxcIuWIh+aNoueDreaQnFxcXCIpLnNlbGVjdCgoKSA9PiB7XFxuICAgICAgICAgICAgc2V0SXRlbShcXFwiaG90a2V5XFxcIiwgaW5wdXQpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5YiH5o2i5Li6XFxcIiArIGlucHV0O1xcbiAgICAgICAgfSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICBwaWNfdXJsOiBcXFwiaGlrZXI6Ly9pbWFnZXMvaWNvbl9maXJlXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWIh+aNouaVsOaNrua6kFxcXCIsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChkYXRhU291cmNlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChkYXRhU291cmNlLCAxLCBcXFwi5YiH5o2i5pWw5o2u5rqQXFxcIikuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJkYXRhU291cmNlXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySXRlbShcXFwiaG90a2V5XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LliIfmjaLkuLpcXFwiICsgaW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSwgZGF0YVNvdXJjZSlcXG4gICAgICAgICAgICB9XVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi5q2j5Zyo5Yqg6L29Li4uXFxcIixcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IGlkICsgXFxcIjpob3RrZXlcXFwiLFxcbiAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgc2V0UmVzdWx0KGQpO1xcbiAgICBsZXQgc2QgPSBbXTtcXG4gICAgbGV0IHNldFNlYXJjaEtleSA9IG5hbWUgPT4ge1xcbiAgICAgICAgcHV0TXlWYXIoJ3MnLCBuYW1lKTtcXG4gICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgIH07XFxuXFxuICAgIGxldCBnZXRUaXRsZSA9IChpLCBuYW1lKSA9PiB7XFxuICAgICAgICBsZXQgY29sb3I7XFxuICAgICAgICBzd2l0Y2ggKGkpIHtcXG4gICAgICAgICAgICBjYXNlIDA6XFxuICAgICAgICAgICAgICAgIGNvbG9yID0gXFxcIiNmZjMzMDBcXFwiO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICBjYXNlIDE6XFxuICAgICAgICAgICAgICAgIGNvbG9yID0gXFxcIiNmZjY2MDBcXFwiO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICBjYXNlIDI6XFxuICAgICAgICAgICAgICAgIGNvbG9yID0gXFxcIiNmZjk5MDBcXFwiXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgIGNvbG9yID0g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ICAgICAgICdBY2NlcHQtRW5jb2RpbmcnOiAnZ3ppcCwgZGVmbGF0ZSwgYnInLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogJ2h0dHBzOi8vdG9wLmJhaWR1LmNvbS9ib2FyZD90YWI9bm92ZWwnLFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy92YXIgcyA9IERhdGUubm93KCk7XFxuICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gSlNPTi5wYXJzZShqc29uKS5kYXRhLmNhcmRzWzBdLmNvbnRlbnQ7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW0gPSBsaXN0W2ldO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBpdGVtLndvcmQgKyAnICgnICsgaXRlbS5zaG93WzJdICsgJyknO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRlcyA9IGl0ZW0uZGVzYztcXG4gICAgICAgICAgICAgICAgICAgIHNkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRUaXRsZShpLCBuYW1lKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoc2V0U2VhcmNoS2V5LCBpdGVtLndvcmQpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGRlcyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0uaW1nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibW92aWVfMV92ZXJ0aWNhbF9waWNcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBicm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IiBcXFwiICsgdHJlbmQuYXQocGRmaChpdGVtLCBcXFwiaG90X3RyZW5kJiZUZXh0XFxcIikpICtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiXFxcXG7or4TliIbvvJpcXFwiICsgcGRmaChpdGVtLCBcXFwic2NvcmVfYXZnJiZUZXh0XFxcIikucmVwbGFjZSgvXjAkLywgXFxcIuaaguaXoOivhOWIhlxcXCIpICtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiXFxcXG5cXFwiICsgcGRmaChpdGVtLCBcXFwieWVhciYmVGV4dFxcXCIpICsgXFxcIsK3XFxcIiArIHBkZmgoaXRlbSwgXFxcImhfYXJlYSYmVGV4dFxcXCIpICsgXFxcIsK3XFxcIiArIHBkZmgoaXRlbSwgXFxcImNhdGVnb3J5JiZUZXh0XFxcIikucmVwbGFjZShcXFwiLFxcXCIsIFxcXCLCt1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgc2QucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldFRpdGxlKGksIG5hbWUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZShzZXRTZWFyY2hLZXksIG5hbWUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGRlcyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IHBkZmgoaXRlbSwgXFxcImhfc3JjJiZUZXh0XFxcIiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJtb3ZpZV8xX3ZlcnRpY2FsX3BpY1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgYWRkSXRlbUFmdGVyKGlkICsgXFxcIjpob3RrZXlcXFwiLCBzZCk7XFxuICAgIH0gY2F0Y2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7vlj5bmtojmjInpkq7lj6/ku6XlpI3liLbpk77mjqVcXFwiLFxcbiAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKG1hZykgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gbWFnO1xcbiAgICAgICAgICAgIH0sIGlucHV0KSxcXG4gICAgICAgICAgICBjYW5jZWw6ICQudG9TdHJpbmcoKG1hZykgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImNvcHk6Ly9cXFwiICsgbWFnXFxuICAgICAgICAgICAgfSwgaW5wdXQpXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiB0cnVlO1xcbiAgICB9ICBlbHNlIGlmICgvXFxcXC4obXAzfGZsYWN8bTRhKSQvLnRlc3QoaW5wdXQpKSB7XFxuICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAucGxheVZpZGVvKHVybCk7XFxuICAgICAgICB9LCBpbnB1dCwgcnVsZSk7XFxuICAgIH0gZWxzZSBpZiAoIWlucHV0LmluY2x1ZGVzKGhvc3QpICYmIGlucHV0LnN0YXJ0c1dpdGgoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgbG9nKGlucHV0KTtcXG4gICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuivpuaDhVxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3dlYlVybD1cXFwiK2VuY29kZVVSSUNvbXBvbmVudCh1cmwpK1xcXCImcnVsZT1cXFwiK3J1bGUsXFxuICAgICAgICAgICAgfSkpXFxuICAgICAgICB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pICsgXFxcIikoaW5wdXQpXFxcIjtcXG4gICAgICAgICAgICAgICAgaWYgKGdldFBhc3RlcygpLmluY2x1ZGVzKGlucHV0KSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHUgPSBzaGFyZVBhc3RlKHJ1bGViNjQsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBnZXRQYXNzKHJ1bGVzLmxlbmd0aCwgdSwgXFxcImJcXFwiKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBwYXRoID0gXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvTG95RGdJay9zaGFyZS/kupHnroDmkJzntKLlvJXmk47op4TliJnjgIxcXFwiICsgcnVsZXMubGVuZ3RoICsgXFxcIuOAjeadoS5cXFwiICsgKGlucHV0ID09PSBcXFwiSElLRVJcXFwiID8gXFxcImhpa2VyXFxcIiA6IFxcXCJ0eHRcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXRoLCBnZXRQYXNzKHJ1bGVzLmxlbmd0aCwgcnVsZWI2NCwgXFxcImFcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInNoYXJlOi8vXFxcIiArIHBhdGg7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHJ1bGVzO1xcbiAgICAgICAgICAgIGlmIChtbyA9PT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgcnVsZXMgPSAkLnJlcXVpcmUoXFxcImNvbmZpZ3NcXFwiKS5nZXRKc29uKCk7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChtbyA9PT0gLTIpIHtcXG4gICAgICAgICAgICAgICAgcnVsZXMgPSAkLnJlcXVpcmUoXFxcImNvbmZpZ3NcXFwiKS5nZXRVc2VmdWxKc29uKCk7XFxuICAgICAgICAgICAg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ICAgICAgICAgICAgICAgb3BzLnVuc2hpZnQoXFxcIuWujOaVtOWPo+S7pFxcXCIpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJChvcHMsIDIsIFxcXCLliIbkuqvmlrnlvI9cXFwiKS5zZWxlY3QoKGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZSA9ICQucmVxdWlyZShcXFwiY29uZmlnc1xcXCIpLmdldEpzb24oKVtpbmRleF07XFxuICAgICAgICAgICAgICAgICAgICBydWxlLnVzZXIgPSB1bmRlZmluZWQ7XFxuICAgICAgICAgICAgICAgICAgICBydWxlLmZvcmJpZGRlbiA9IHVuZGVmaW5lZDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlYjY0ID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KHJ1bGUpKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBnZXRQYXNzID0gKG5hbWUsIHJ1bGUsIHR5cGUpID0+IFxcXCLmtbfpmJTop4bnlYzvvIzjgIxcXFwiICsgbmFtZSArIFxcXCLjgI3no4HlipvlkJsu566A5pCc57Si5byV5pOO77yM5aSN5Yi25pW05p2h5Y+j5Luk5omT5byA6L2v5Lu25bCx5Lya6Ieq5Yqo5a+85YWlJFxcXCIgKyBydWxlICsgXFxcIiRcXFwiICsgdHlwZSArIFxcXCJAaW1wb3J0PWpzOiQucmVxdWlyZSgnaW1wb3J0P3J1bGU9JytcXFwiICsgSlNPTi5zdHJpbmdpZnkoTVlfUlVMRS50aXRsZSkgKyBcXFwiKShpbnB1dClcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLlrozmlbTlj6Pku6RcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJjb3B5Oi8vXFxcIiArIGdldFBhc3MocnVsZS5uYW1lLCBydWxlYjY0LCBcXFwiYVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IHNoYXJlUGFzdGUocnVsZWI2NCwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBnZXRQYXNzKHJ1bGUubmFtZSwgdSwgXFxcImJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwgaW5kZXgpO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09IFxcXCLnp7vliqhcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKGluZGV4ICsgXFxcIlxcXCIsIFxcXCLovpPlhaXkvY3nva5cXFwiKS5pbnB1dCgoaW5kZXgsIGxlbmd0aCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5ld0luZGV4ID0gTnVtYmVyKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIuaXNOYU4obmV3SW5kZXgpIHx8IG5ld0luZGV4ID49IGxlbmd0aCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kuI3lkozop4TnmoTkvY3nva5cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gJC5yZXF1aXJlKFxcXCJjb25maWdzXFxcIikuZ2V0SnNvbigpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGUgPSBydWxlcy5zcGxpY2UoaW5kZXgsIDEpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiY29uZmlnc1xcXCIpLnNhdmVKc29uKHJ1bGVzKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgfSwgaW5kZXgsIGxlbmd0aCk7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PT0gXFxcIue9rumhtlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgbGV0IG5ld0luZGV4ID0gMDtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gJC5yZXF1aXJlKFxcXCJjb25maWdzXFxcIikuZ2V0SnNvbigpO1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZSA9IHJ1bGVzLnNwbGljZShpbmRleCwgMSlbMF07XFxuICAgICAgICAgICAgICAgIHJ1bGVzLnNwbGljZShuZXdJbmRleCwgMCwgcnVsZSk7XFxuICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiY29uZmlnc1xcXCIpLnNhdmVKc29uKHJ1bGVzKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSAkLnJlcXVpcmUoXFxcImNvbmZpZ3NcXFwiKS5nZXRKc29uKCk7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlID0gYXJyW2luZGV4XTtcXG4gICAgICAgICAgICAgICAgcnVsZS5mb3JiaWRkZW4gPSAhcnVsZS5mb3JiaWRkZW47XFxuICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiY29uZmlnc1xcXCIpLnNhdmVKc29uKGFycik7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgLy9yZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIChydWxlLmZvcmJpZGRlbiA/IFxcXCLnpoHnlKhcXFwiIDogXFxcIuWQr+eUqFxcXCIpICsgcnVsZS5uYW1lO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIGksIGxlbmd0aCksXFxuICAgICAgICB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XvvJpcXFwiICsgIWlzUGFnZVxcbiAgICAgICAgfSk7XFxuICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICB9LCBvYmoucGFnZSksXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogXFxcInJ1bGVlZHBzX3BhZ2VcXFwiXFxuICAgIH1cXG59KTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogXFxcIuWIoOmZpFxcXCIsXFxuICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoaW5kZXgsIHVybEluZGV4KSA9PiB7XFxuICAgICAgICBpZiAoaW5kZXggPT09IHZvaWQoMCkpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5q2k6aG55peg5rOV5Yig6ZmkXFxcIjtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh1cmxJbmRleCAhPT0gdm9pZCgwKSkge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mraPlnKjmm7TmlrDop4TliJnvvIzliKDpmaTor7fku47op4TliJnnrqHnkIbov5vlhaVcXFwiO1xcbiAgICAgICAgfVxcbiAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLmuKnppqjmj5DnpLpcXFwiLFxcbiAgICAgICAgICAgIGNvbnRlbnQ6IFxcXCLnoa7lrpropoHliKDpmaTmraTop4TliJnlkJfvvJ/ms6jmhI/liKDpmaTlkI7ml6Dms5XmgaLlpI1cXFwiLFxcbiAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSAkLnJlcXVpcmUoXFxcImNvbmZpZ3NcXFwiKS5nZXRKc29uKCk7XFxuICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcIm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ICAgICAgYmFzaWNVcmw6IGdldE15VmFyKFxcXCJwc19iYXNpY1VybFxcXCIsIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICBmaW5kQWxpVXJsOiBnZXRNeVZhcihcXFwicHNfZmluZEFsaVVybFxcXCIsIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICBwYWdlOiAhIWdldE15VmFyKFxcXCJwc19wYWdlXFxcIiwgcGFnZSA/IFxcXCIxXFxcIiA6IFxcXCJcXFwiKSxcXG4gICAgICAgICAgICByZWdpc3RlclVybDogZ2V0TXlWYXIoXFxcInBzX3JlZ2lzdGVyVXJsXFxcIiwgXFxcIlxcXCIpIHx8IHVuZGVmaW5lZCxcXG4gICAgICAgICAgICBsYXN0TW9kaWZ5OiBEYXRlLm5vdygpXFxuICAgICAgICB9O1xcbiAgICAgICAgaWYgKGluZGV4ID09PSB2b2lkKDApKSB7XFxuICAgICAgICAgICAgaWYgKGFyci5zb21lKHYgPT4gdi5uYW1lID09PSBuYW1lKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey57uP5a2Y5Zyo6K+l6KeE5YiZXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgYXJyLnVuc2hpZnQob2JqMSk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxldCBuYW1leSA9IGFycltpbmRleF0ubmFtZTtcXG4gICAgICAgICAgICBpZiAobmFtZSAhPT0gbmFtZXkpIHtcXG4gICAgICAgICAgICAgICAgaWYgKGFyci5zb21lKHYgPT4gdi5uYW1lID09PSBuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3sue7j+WtmOWcqOivpeinhOWImVxcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgb2JqMSA9IE9iamVjdC5hc3NpZ24oYXJyW2luZGV4XSwgb2JqMSk7XFxuICAg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XNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5YmN5b6A5rOo5YaMXFxcIixcXG4gICAgICAgICAgICB1cmw6ICQoXFxcImhpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IyNub0hpc3RvcnkjXFxcIikucnVsZSgocmVnaXN0ZXJVcmwpPT57XFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChbe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6XFxcIng1X3dlYnZpZXdfc2luZ2xlXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDpyZWdpc3RlclVybCxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6XFxcImZsb2F0JiYxMDAlXFxcIlxcbiAgICAgICAgICAgICAgICB9XSk7XFxuICAgICAgICAgICAgfSwgcmVnaXN0ZXJVcmwpLFxcbiAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBcXFwi5rOo5YaM6LSm5Y+3OlxcXCIgKyBvYmoubmFtZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIG9iaiA9IG9iai51c2VyIHx8IHt9O1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwi55So5oi35ZCNXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgb25DaGFuZ2U6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwicHNfYWNjb3VudFxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IG9iai5hY2NvdW50LFxcbiAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2VcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCLlr4bnoIFcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICB0eXBlOiBcXFwicGFzc3dvcmRcXFwiLFxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInBzX3Bhc3N3b3JkXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogb2JqLnBhc3N3b3JkLFxcbiAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwi6aKd5aSWXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICBvbkNoYW5nZTogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJwc19leHRyYVxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IG9iai5leHRyYSxcXG4gICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgIGhlaWdodDogLTFcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuS/neWtmFxcXCIsXFxuICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgbGV0IGFjY291bnQgPSBnZXRNeVZhcihcXFwicHNfYWNjb3VudFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICBsZXQgcGFzc3dvcmQgPSBnZXRNeVZhcihcXFwicHNfcGFzc3dvcmRcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgbGV0IGV4dHJhID0gZ2V0TXlWYXIoXFxcInBzX2V4dHJhXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIC8qaWYgKCEoYWNjb3VudHx8cGFzc3dvcmR8fGV4dHJhKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5LiN6IO95YWo6YOo5Li656m6XFxcIjtcXG4gICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICBsZXQgYXJyID0gJC5yZXF1aXJlKFxcXCJjb25maWdzXFxcIikuZ2V0SnNvbigpO1xcbiAgICAgICAgICAgIGxldCBpdGVtID0gYXJyW2luZGV4XTtcXG4gICAgICAgICAgICBpdGVtLnVzZXIgPSB7fTtcXG4gICAgICAgICAgICBpdGVtLnVzZXIuYWNjb3VudCA9IGFjY291bnRcXG4gICAgICAgICAgICBpdGVtLnVzZXIucGFzc3dvcmQgPSBwYXNzd29yZDtcXG4gICAgICAgICAgICBpdGVtLnVzZXIuZXh0cmEgPSBleHRyYTtcXG4gICAgICAgICAgICBpZiAoaW5kZXggPT09IHZvaWQoMCkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL2lk6ZSZ6K+vXFxcIjtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKGluZGV4LCAxLCBpdGVtKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJjb25maWdzXFxcIikuc2F2ZUpzb24oYXJyKTtcXG4gICAgICAgICAgICBiYWNrKHRydW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FxcXCJjb25maWdzP3J1bGU9XFxcIiArIHJ1bGVUaXRsZSkuZ2V0SnNvbigpO1xcbiAgICAgICAgbGV0IG5ld0kgPSAwO1xcbiAgICAgICAgZm9yIChsZXQgcnVsZSBvZiBydWxlcykge1xcbiAgICAgICAgICAgIGxldCBpbmRleCA9IGFyci5maW5kSW5kZXgodiA9PiB2Lm5hbWUgPT09IHJ1bGUubmFtZSk7XFxuICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXG4gICAgICAgICAgICAgICAgcnVsZSA9IE9iamVjdC5hc3NpZ24oYXJyW2luZGV4XSwgcnVsZSk7XFxuICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoaW5kZXgsIDEsIHJ1bGUpO1xcbiAgICAgICAgICAgICAgICBpZiAocnVsZXMubGVuZ3RoID09PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICBzYXZlQ2FjaGUocnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9ydWxlRWRpdCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSM/aXNJbXBvcnQ9dHJ1ZSZpbmRleD1cXFwiICsgaW5kZXggKyBcXFwiJnJ1bGU9XFxcIiArIHJ1bGVUaXRsZTtcXG4gICAgICAgICAgICAgICAgICAgIC8vdG9hc3QoXFxcIuW3suabtOaWsOinhOWIme+8mlxcXCIgKyBydWxlLm5hbWUpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLlt7Lmm7TmlrDop4TliJnvvJpcXFwiICsgcnVsZS5uYW1lKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbmV3SSsrO1xcbiAgICAgICAgICAgICAgICBhcnIudW5zaGlmdChydWxlKTtcXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGVzLmxlbmd0aCA9PT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUNhY2hlKHJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2UvcnVsZUVkaXQjbm9IaXN0b3J5IyNub1JlY29yZEhpc3RvcnkjP2lzSW1wb3J0PXRydWUmcnVsZT1cXFwiICsgcnVsZVRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgLy90b2FzdChcXFwi5bey5a+85YWl6KeE5YiZ77yaXFxcIiArIHJ1bGUubmFtZSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuW3suWvvOWFpeinhOWIme+8mlxcXCIgKyBydWxlLm5hbWUpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpZiAocnVsZXMubGVuZ3RoID4gMSkge1xcbiAgICAgICAgICAgICQucmVxdWlyZShcXFwiY29uZmlncz9ydWxlPVxcXCIgKyBydWxlVGl0bGUpLnNhdmVKc29uKGFycik7XFxuICAgICAgICAgICAgdG9hc3QoXFxcIuaWsOWinu+8mlxcXCIgKyBuZXdJICsgXFxcIiDopobnm5bmm7TmlrDvvJpcXFwiICsgKHJ1bGVzLmxlbmd0aCAtIG5ld0kpKTtcXG4gICAgICAgIH1cXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICB0b2FzdChcXFwi5a+85YWl5aSx6LSlXFxcIik7XFxuICAgIH1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLop4TliJnliJfooahcIixcInBhdGhcIjpcInJ1bGVzXCIsXCJydWxlXCI6XCJqczpcXG4kLmV4cG9ydHMgPSBbe1xcbiAgICAgICAgbmFtZTogXFxcIkJUU09XXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IGJhc2ljVXJsID0gXFxcImh0dHBzOi8vYnRzb3cubW90b3JjeWNsZXNcXFwiO1xcbiAgICAgICAgICAgIGxldCBhcGkgPSBcXFwiL3NlYXJjaC9cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KHMpICsgXFxcIi9wYWdlL1xcXCIgKyBwYWdlO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChiYXNpY1VybCArIGFwaSk7XFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcIi5kYXRhLWxpc3QmJi5yb3c6bm90KC5oaWRkZW4teHMpXFxcIik7XFxuICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgeyAgICAgICBcXG4gICAgICAgICAgICAgdmFyIHVybGwgPSBwZGZoKGFycltpXSwgXFxcImEmJmhyZWZcXFwiKTsgICAgICAgIFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChhcnJbaV0sIFxcXCJhJiZ0aXRsZVxcXCIpLnNtYWxsKCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgoYXJyW2ldLCBcXFwiLnNpemUtZGF0ZSYmVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybGwuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpP3VybGw6IFxcXCJodHRwczpcXFwiICsgdXJsbCxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGZpbmRBbGlVcmwoaW5wdXQpIHtcXG4gICAgICAgICAgIHZhciBodG1sID0gcGRmaChyZXF1ZXN0KGlucHV0LCB7fSksICcjbWFnbmV0T3BlbiYmYSYmaHJlZicpO1xcbiAgICAgICAgICAgICAgICAgIHJldHVybiBodG1sO1xcbiAgICAgICAgICAgfVxcbiAgICB9LHtcXG4gICAgICAgIG5hbWU6IFxcXCJCVOWQg+WKm1xcXCIsXFxuICAgICAgICBwYWdlOiB0cnVlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCBiYXNpY1VybCA9IFxcXCJodHRwczovLzIyMy5zb2trMjMuYnV6elxcXCI7XFxuICAgICAgICAgICAgbGV0IGFwaSA9IFxcXCIvc2VhcmNoL1xcXCIgKyBlbmNvZGVVUklDb21wb25lbnQocykgKyBcXFwiL3BhZ2UtXFxcIiArIHBhZ2UgKyBcXFwiLmh0bWxcXFwiO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChiYXNpY1VybCArIGFwaSk7XFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcIi5saXN0LXZpZXcmJi5pdGVtOm5vdCg6bWF0Y2hlcyjlnKjnur/mkq3mlL4pKVxcXCIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoYXJyW2ldLCBcXFwiaDQtLS5sYWJlbCYmVGV4dFxcXCIpLnNtYWxsKCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgoYXJyW2ldLCBcXFwicCYmVGV4dFxcXCIpLm1hdGNoKC8o5paH5Lu25aSn5bCPLio/KeaWh+S7tuaVsOmHjy8pWzFdLnNsaWNlKDAsLTkpLFxcbiAgICAgICAgICAgICAgICB1cmw6IGJhc2ljVXJsICsgcGRmaChhcnJbaV0sIFxcXCJhJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pOyAgICAgICAgIFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgICAgICBmaW5kQWxpVXJsKGlucHV0KSB7XFxuICAgICAgICAgICB2YXIgaHRtbCA9IHBkZmgocmVxdWVzdChpbnB1dCksICcubGlzdC11bnN0eWxlZCYmYSYmaHJlZicpO1xcbiAgICAgICAgICAgICAgICAgIHJldHVybiBodG1sO1xcbiAgICAgICAgICAgfVxcbiAgICB9LHtcXG4gICAgICAgIG5hbWU6IFxcXCLno4HmkJwuY29tXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IGJhc2ljVXJsID0gXFxcImh0dHBzOi8v56OB5pCcLmNvbVxcXCI7XFxuICAgICAgICAgICAgbGV0IGFwaSA9IFxcXCIvc2VhcmNoLnBocD9rZXk9XFxcIiArIGVuY29kZVVSSUNvbXBvbmVudChzKSArIFxcXCImcD1cXFwiICsgcGFnZTtcXG4gICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoYmFzaWNVcmwgKyBhcGkpO1xcbiAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcImJvZHkmJi5zc2JveFxcXCIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoYXJyW2ldLCBcXFwiYSYmVGV4dFxcXCIpLnNtYWxsKCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgoYXJyW2ldLCBcXFwiLnNiYXImJlRleHRcXFwiKSxcXG4gICAgICAgICAgICAgICAgdXJsOiBiYXNpY1VybCArIHBkZmgoYXJyW2ldLCBcXFwiYSYmaHJlZlxcXCIpLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGQ7XFxuICAgICAgICB9LFxcbiAgICAgICAgZmluZEFsaVVybChpbnB1dCkge1xcbiAgICAgICAgICAgdmFyIGh0bWwgPSBwZGZoKHJlcXVlc3QoaW5wdXQsIHt9KSwgJ3NwYW4mJmhyZWYnKTtcXG4gICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbDtcXG4gICAgICAgICAgIH1cXG4gICAgfSx7XFxuICAgICAgICBuYW1lOiBcXFwi56OB5Yqb5pCc57SiXFxcIixcXG4gICAgICAgIHBhZ2U6IGZhbHNlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCBiYXNpY1VybCA9IFxcXCJodHRwczovL2NpbGlzb3VzdW8uY29tXFxcIjtcXG4gICAgICAgICAgICBsZXQgYXBpID0gXFxcIi9zZWFyY2g/cT1cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KHMpO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChiYXNpY1VybCArIGFwaSk7XFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcIi5saXN0JiYuaXRlbVxcXCIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoYXJyW2ldLCBcXFwiLmZpbGVuYW1lJiZUZXh0XFxcIikuc21hbGwoKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogcGRmaChhcnJbaV0sIFxcXCIuc2l6ZSYmVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICB1cmw6IGJhc2ljVXJsICsgcGRmaChhcnJbaV0sIFxcXCJhJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgICAgICBmaW5kQWxpVXJsKGlucHV0KSB7XFxuICAgICAgICAgICB2YXIgaHRtbCA9IHBkZmgocmVxdWVzdChpbnB1dCwge30pLCAnYm9keSYmLm1hZ25ldC1ib3gmJmlucHV0JiZ2YWx1ZScpO1xcbiAgICAgICAgICAgICAgICAgIHJldHVybiBodG1sO1xcbiAgICAgICAgICAgfVxcbiAgICB9LHtcXG4gICAgICAgIG5hbWU6IFxcXCLlj6Pooovno4HliptcXFwiLFxcbiAgICAgICAgcGFnZTogdHJ1ZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgYmFzaWNVcmwgPSBcXFwiaHR0cHM6Ly9rZC5jbGtkLnh5elxcXCI7XFxuICAgICAgICAgICAgbGV0IGFwaSA9IFxcXCIvc2VhcmNoL1xcXCIgKyBlbmNvZGVVUklDb21wb25lbnQocykgKyBcXFwiL1xcXCIgKyBwYWdlO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChiYXNpY1VybCArIGFwaSk7XFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcInRib2R5JiZ0clxcXCIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcImEmJlRleHRcXFwiKS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGFycltpXSwgXFxcIlRleHRcXFwiKS5tYXRjaCgvXFxcXGQrXFxcXC1cXFxcZCtcXFxcLVxcXFxkKy4qLylbMF0sXFxuICAgICAgICAgICAgICAgIHVybDogcGRmaChhcnJbaV0sIFxcXCJhLDEmJmhyZWZcXFwiKSwgICAgICAgIFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGQ7XFxuICAgICAgICB9LFxcbiAgICB9LHtcXG4gICAgICAgIC8v5rC45LmF5Zyw5Z2A77yaaHR0cDovL2RkY2wubWUvXFxuICAgICAgICBuYW1lOiBcXFwi5ru05ru056OB5YqbXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IGJhc2ljVXJsID0gXFxcImh0dHBzOi8vYTJyYjQ1OGNleDc5aW1zdy54eXpcXFwiO1xcbiAgICAgICAgICAgIGxldCBhcGkgPSBcXFwiL3NlYXJjaC9cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KHMpICsgXFxcIl9jdGltZV9cXFwiICsgcGFnZSArIFxcXCIuaHRtbFxcXCI7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGJhc2ljVXJsICsgYXBpKTtcXG4gICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiYm9keSYmLnBhbmVsXFxcIik7XFxuICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgeyAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChhcnJbaV0sIFxcXCJhJiZUZXh0XFxcIikuc21hbGwoKSxcXG4gICAgICAg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bmd0aDsgaSsrKSB7ICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcImEmJlRleHRcXFwiKS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGFycltpXSwgXFxcIi5hbGlnbi1zZWxmLWNlbnRlciYmVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICB1cmw6IGJhc2ljVXJsICsgcGRmaChhcnJbaV0sIFxcXCJhJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pOyAgICAgICAgIFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgICAgICBmaW5kQWxpVXJsKGlucHV0KSB7XFxuICAgICAgICAgICB2YXIgaHRtbCA9IHBkZmgocmVxdWVzdChpbnB1dCksICcuYnQtYm94JiZhJiZocmVmJyk7XFxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGh0bWw7XFxuICAgICAgICAgICB9XFxuICAgIH0se1xcbiAgICAgICAgLy/msLjkuYXlnLDlnYDvvJpodHRwczovL3NvZmFuLmNsdWIvXFxuICAgICAgICBuYW1lOiBcXFwi5pCc55WqXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IGJhc2ljVXJsID0gXFxcImh0dHBzOi8vY2RuLnNvZmFuLm9uZTo2NTUzM1xcXCI7XFxuICAgICAgICAgICAgbGV0IGFwaSA9IFxcXCIvcz93b3JkPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQocykgKyBcXFwiJnBhZ2U9XFxcIiArIHBhZ2U7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGJhc2ljVXJsICsgYXBpLHtcXG4gICAgICAgICAgICBoZWFkZXJzOntcXG4gICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICBSZWZlcmVyOiBcXFwiaHR0cHM6Ly9jZG4uc29mYW4ub25lL1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiYm9keSYmLmxpc3QtdW5zdHlsZWRcXFwiKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7ICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcImEmJlRleHRcXFwiKS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGFycltpXSwgXFxcIi5yZXN1bHQtcmVzb3VyY2UtbWV0YS1pbmZvLS0uY29tbW9uLWxpbmsmJlRleHRcXFwiKSxcXG4gICAgICAgICAgICAgICAgdXJsOiBiYXNpY1VybCArIHBkZmgoYXJyW2ldLCBcXFwiYSYmaHJlZlxcXCIpLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGQ7XFxuICAgICAgICB9LFxcbiAgICAgICAgZmluZEFsaVVybChpbnB1dCkge1xcbiAgICAgICAgICAgdmFyIGh0bWwgPSBwZGZoKHJlcXVlc3QoaW5wdXQse1xcbiAgICAgICAgICAgIGhlYWRlcnM6eyAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICBSZWZlcmVyOiBcXFwiaHR0cHM6Ly9jZG4uc29mYW4ub25lL1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9KSwgJyNtYWduZXQtbGluayYmYSYmaHJlZicpO1x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yciA9IHBkZmEoaHRtbCwgXFxcIiNjb250ZW50JiYuc2VhcmNoLWl0ZW1cXFwiKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7ICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcImEmJlRleHRcXFwiKS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGFycltpXSwgXFxcIi5pdGVtLWJhciYmVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICB1cmw6IGJhc2ljVXJsICsgcGRmaChhcnJbaV0sIFxcXCJhJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pOyAgICAgICAgIFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgICAgICBmaW5kQWxpVXJsKGlucHV0KSB7XFxuICAgICAgICAgICB2YXIgaHRtbCA9IHBkZmgocmVxdWVzdChpbnB1dCksICcjY29udGVudCYmaW5wdXQmJnZhbHVlJyk7XFxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGh0bWw7XFxuICAgICAgICAgICB9XFxuICAgIH0se1xcbiAgICAgICAgLy/msLjkuYXlnLDlnYDvvJpodHRwczovL3d3dy56aGFvY2lsaS54eXovXFxuICAgICAgICBuYW1lOiBcXFwi5om+56OB5YqbXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IGJhc2ljVXJsID0gXFxcImh0dHBzOi8vMTAxYnRzb3cudmlwL1xcXCI7XFxuICAgICAgICAgICAgbGV0IGFwaSA9IFxcXCJzLnBocD9xPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQocyk7XFxuICAgICAgICAgICAgbGV0IHVybCA9IEpTT04ucGFyc2UocmVxdWVzdChiYXNpY1VybCArIGFwaSx7b25seUhlYWRlcnM6dHJ1ZX0pKS51cmw7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KHVybC5yZXBsYWNlKCcuaHRtbCcsJ18nK3BhZ2UrJy5odG1sJykpXFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcInRib2R5JiZ0cjpoYXMoYVt0aXRsZV0pXFxcIik7XFxuICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgeyAgICAgICBcXG4gICAgICAgICAgICAgdmFyIHVybGwgPSBwZGZoKGFycltpXSwgXFxcImEmJmhyZWZcXFwiKTsgICAgICAgIFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChhcnJbaV0sIFxcXCJhJiZ0aXRsZVxcXCIpLnNtYWxsKCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgoYXJyW2ldLCBcXFwiVGV4dFxcXCIpLm1hdGNoKC9cXFxcZCsoPzpcXFxcLlxcXFxkKyk/KD86XFxcXHMrKT9bZ21rYl0rLio/KD86XFxcXC1cXFxcZCspL2kpWzBdLFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybGwuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpP3VybGw6IFxcXCJodHRwczpcXFwiICsgdXJsbCxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGZpbmRBbGlVcmwoaW5wdXQpIHtcXG4gICAgICAgICAgIGxldCBodG1sID0gcGRmaChmZXRjaChpbnB1dCksXFxcIiNpbnB1dC1tYWduZXQmJnZhbHVlXFxcIilcXG4gICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbDtcXG4gICAgICAgICAgIH1cXG4gICAgfSx7XFxuICAgICAgICAvL+awuOS5heWcsOWdgO+8mmh0dHBzOi8v56OB5Yqb5pCcLnh5ei8gaHR0cHM6Ly/no4HlipvmkJwuY29tLyAgIGh0dHBzOi8vY2xzY2xzLnRvcC9cXG4gICAgICAgIG5hbWU6IFxcXCLno4HlipvmkJxcXFwiLFxcbiAgICAgICAgcGFnZTogdHJ1ZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgYmFzaWNVcmwgPSBcXFwiaHR0cHM6Ly9jbHMwNzEuYnV6elxcXCI7XFxuICAgICAgICAgICAgbGV0IGFwaSA9IFxcXCIvc2VhcmNoLVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQocykgKyBcXFwiLTAtMC1cXFwiICsgcGFnZSArIFxcXCIuaHRtbFxcXCI7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGJhc2ljVXJsICsgYXBpKTtcXG4gICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiYm9keSYmLnNzYm94XFxcIik7XFxuICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgeyAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChhcnJbaV0sIFxcXCIudGl0bGUmJlRleHRcXFwiKS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGFycltpXSwgXFxcIi5zYmFyJiZUZXh0XFxcIikubWF0Y2goLyjmt7vliqDml7bpl7QuKj8p5pyA6L+RLylbMV0sXFxuICAgICAgICAgICAgICAgIHVybDogcGRmaChh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cnJbaV0sIFxcXCJhJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgICAgICBmaW5kQWxpVXJsKGlucHV0KSB7XFxuICAgICAgICAgICB2YXIgaHRtbCA9IHBkZmgocmVxdWVzdChpbnB1dCwge30pLCAnI21hZ25ldCYmdGl0bGUnKTtcXG4gICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbDtcXG4gICAgICAgICAgIH1cXG4gICAgfSx7XFxuICAgICAgIC8v5rC45LmF5Zyw5Z2A77yaaHR0cHM6Ly9jaWxpZHVvLm9yZy9cXG4gICAgICAgIG5hbWU6IFxcXCLno4HlipvlpJpcXFwiLFxcbiAgICAgICAgcGFnZTogdHJ1ZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgYmFzaWNVcmwgPSBcXFwiaHR0cHM6Ly9kb2MuaHRtY2RuLmNvbTozOTk4OFxcXCI7XFxuICAgICAgICAgICAgbGV0IGFwaSA9IFxcXCIvc2VhcmNoP3dvcmQ9XFxcIiArIGVuY29kZVVSSUNvbXBvbmVudChzKSArIFxcXCImc29ydD0mcGFnZT1cXFwiICtwYWdlO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChiYXNpY1VybCArIGFwaSx7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgIFJlZmVyZXI6IFxcXCJodHRwczovL2RvYy5odG1jZG4uY29tOjM5OTg4XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcImJvZHkmJi5zc2JveDpoYXMoYSlcXFwiKTtcXG4gICAgICAgICAgICBsZXQgZ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GlzdCYmZGxcXFwiKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7ICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcImEmJlRleHRcXFwiKS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGFycltpXSwgXFxcIi5pbmZvJiZUZXh0XFxcIikubWF0Y2goLyjmlLblvZXml7bpl7QuKj8p56OB5YqbLylbMV0sXFxuICAgICAgICAgICAgICAgIHVybDogcGRmaChhcnJbaV0sIFxcXCIuaW5mbyYmYSYmaHJlZlxcXCIpLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGQ7XFxuICAgICAgICB9LFxcbiAgICB9LHtcXG4gICAgICAgIG5hbWU6IFxcXCLno4HlipvphbdcXFwiLFxcbiAgICAgICAgcGFnZTogdHJ1ZSxcXG4gICAgICAgIGZpbmQocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCB1cmwgPSBcXFwiaHR0cHM6Ly9jaWxpa3UubmV0L3RvU2VhcmNoXFxcIjtcXG4gICAgICAgICAgICBsZXQganNvbiA9IHBvc3QodXJsLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIG9yaWdpbjogXFxcImh0dHBzOi8vY2lsaWt1Lm5ldFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBSZWZlcmVyOiBcXFwiaHR0cHM6Ly9jaWxpa3UubmV0L1xcXCIsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJrZXl3b3JkXFxcIjogcyxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYWdlXFxcIjogcGFnZS0xLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInNpemVcXFwiOiAxNVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAganNvbiA9IEpTT04ucGFyc2UoanNvbik7XFxuICAgICAgICAgICAgbGV0IGxpc3QgPSBqc29uLmRhdGEuY29udGVudDtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIGZvcm1hdEZpbGVTaXplKHNpemUpIHtcXG4gICAgICAgICAgICAgICAgICBpZiAoc2l6ZSA9PT0gMCkgcmV0dXJuICcwIEJ5dGVzJztcXG4gICAgICAgICAgICAgICAgICB2YXIgdW5pdHMgPSBbJ0J5dGVzJywgJ0tCJywgJ01CJywgJ0dCJywgJ1RCJ107XFxuICAgICAgICAgICAgICAgICAgdmFyIGkgPSBNYXRoLmZsb29yKE1hdGgubG9nKHNpemUpIC8gTWF0aC5sb2coMTAyNCkpO1xcbiAgICAgICAgICAgICAgICAgIHJldHVybiBgJHsoc2l6ZSAvIE1hdGgucG93KDEwMjQsIGkpKS50b0ZpeGVkKDIpfSAke3VuaXRzW2ldfWA7XFxufVxcbiAgICAgICAgICAgZm9yIChsZXQgaXQgb2YgbGlzdCkge1xcbiAgICAgdmFyIGRhdGUgPSBuZXcgRGF0ZShpdC50aW1lc3RhbXApO1xcbiAgICAgdmFyIHllYXIgPSBkYXRlLmdldEZ1bGxZZWFyKCk7XFxuICAgICB2YXIgbW9udGggPSBkYXRlLmdldE1vbnRoKCkgKyAxO1xcbiAgICAgdmFyIGRheSA9IGRhdGUuZ2V0RGF0ZSgpO1xcbiAgICAgdmFyIGZvcm1hdHRlZERhdGUgPSBgJHt5ZWFyfS0ke21vbnRoIDwgMTAgPyAnMCcgKyBtb250aCA6IG1vbnRofS0ke2RheSA8IDEwID8gJzAnICsgZGF5IDogZGF5fWA7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXQubmFtZS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwibWFnbmV0Oj94dD11cm46YnRpaDpcXFwiICsgaXQuYnRpaCxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLmlofku7blpKflsI/vvJpcXFwiICsgZm9ybWF0RmlsZVNpemUoaXQuc2l6ZSkgKyBcXFwiXFxcXHRcXFxcdOaUtuW9leaXtumXtO+8mlxcXCIgKyBmb3JtYXR0ZWREYXRlLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9ICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfVxcbiAgICB9LHtcXG4gICAgICAgIC8v5rC45LmF5Zyw5Z2A77yaaHR0cHM6Ly9idGZveC5vbmUvXFxuICAgICAgICBuYW1lOiBcXFwi56OB5Yqb54uQXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IGJhc2ljVXJsID0gXFxcImh0dHBzOi8vY2FjaGUuZm94cy50b3BcXFwiO1xcbiAgICAgICAgICAgIGxldCBhcGkgPSBcXFwiL3NlYXJjaD93b3JkPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQocykgKyBcXFwiJnBhZ2U9XFxcIiArIHBhZ2U7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGJhc2ljVXJsICsgYXBpLHtcXG4gICAgICAgICAgICBoZWFkZXJzOntcXG4gICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICBSZWZlcmVyOiBcXFwiaHR0cHM6Ly9jYWNoZS5mb3hzLnRvcFxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiYm9keSYmLnNlYXJjaC1ib3hcXFwiKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7ICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcImEmJlRleHRcXFwiKS5zbWFsbCgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGFycltpXSwgXFxcIi5sYXl1aS1zaG93JiZUZXh0XFxcIiksXFxuICAgICAgICAgICAgICAgIHVybDogYmFzaWNVcmwgKyBwZGZoKGFycltpXSwgXFxcImEmJmhyZWZcXFwiKSxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGZpbmRBbGlVcmwoaW5wdXQpIHtcXG4gICAgICAgICAgIHZhciBodG1sID0gcGRmaChyZXF1ZXN0KGlucHV0LHtcXG4gICAgICAgICAgICBoZWFkZXJzOnsgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgUmVmZXJlcjogXFxcImh0dHBzOi8vY2FjaGUuZm94cy50b3BcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgfSksICcjbGluay11cmwmJmEmJmhyZWYnKTtcXG4gICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbDtcXG4gICAgICAgICAgIH1cXG4gICAgfSx7XFxuICAgICAgICAvL+awuOS5heWcsOWdgO+8mmh0dHBzOi8vY2xnb3UuY3lvdS8gaHR0cHM6Ly/prZTms5XnjKvlkqoubG9sL1xcbiAgICAgICAgbmFtZTogXFxcIuejgeWKm+eLl+eMq1xcXCIsXFxuICAgICAgICBwYWdlOiB0cnVlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCBiYXNpY1VybCA9IFxcXCJodHRwczovL2NsZzE2Mi5idXp6XFxcIjtcXG4gICAgICAgICAgICBsZXQgYXBpID0gXFxcIi9zZWFyY2gtXFxcIiArIGVuY29kZVVSSUNvbXBvbmVudChzKSArIFxcXCItMC0wLVxcXCIgKyBwYWdlICsgXFxcIi5odG1sXFxcIjtcXG4gICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoYmFzaWNVcmwgKyBhcGkpO1xcbiAgICAgICAgICAgIGxldCBhcnIgPSBwZGZhKGh0bWwsIFxcXCJib2R5JiYuc3Nib3hcXFwiKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7ICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcIi50aXRsZSYmVGV4dFxcXCIpLnNtYWxsKCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgoYXJyW2ldLCBcXFwiLnNiYXImJlRleHRcXFwiKS5tYXRjaCgvKOa3u+WKoOaXtumXtC4qPynmnIDov5EvKVsxXSxcXG4gICAgICAgICAgICAgICAgdXJsOiBwZGZoKGFycltpXSwgXFxcIi5zYmFyJiZhJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgIH0se1xcbiAgICAgICAgLy/lj5HluIPlnLDlnYDvvJpodHRwOi8vZmIuY2lsaWdvdWZhYnV5ZTEueHl6OjEyMzQvXFxuICAgICAgICBuYW1lOiBcXFwi56OB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ikuc21hbGwoKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogcGRmaChhcnJbaV0sIFxcXCIuU2VhcmNoX2xpc3RfaW5mbyYmVGV4dFxcXCIpLm1hdGNoKC8o5aSn5bCPLio/KeeDreW6pi8pWzFdLFxcbiAgICAgICAgICAgICAgICB1cmw6IGJhc2ljVXJsICsgcGRmaChhcnJbaV0sIFxcXCJhJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gICAgICAgICAgICBcXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgICAgICBmaW5kQWxpVXJsKGlucHV0KSB7XFxuICAgICAgICAgICB2YXIgaHRtbCA9IHBkZmgocmVxdWVzdChpbnB1dCksICcjSW5mb3JtYXRpb25fY29weV90ZXh0JiZ2YWx1ZScpO1xcbiAgICAgICAgICAgICAgICAgIHJldHVybiBodG1sO1xcbiAgICAgICAgICAgfVxcbiAgICB9LHtcXG4gICAgICAgIG5hbWU6IFxcXCLno4HlipvonJjom5tcXFwiLFxcbiAgICAgICAgcGFnZTogdHJ1ZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgYmFzaWNVcmwgPSBcXFwiaHR0cDovL3d3dy5idG1vdmkudmluXFxcIjtcXG4gICAgICAgICAgICBsZXQgYXBpID0gXFxcIi9zby9cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KHMpICsgXFxcIl9yZWxfXFxcIiArIHBhZ2UgKyBcXFwiLmh0bWxcXFwiO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChiYXNpY1VybCArIGFwaSk7XFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcImJvZHkmJi5zZWFyY2gtaXRlbVxcXCIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoYXJyW2ldLCBcXFwiYSYmVGV4dFxcXCIpLnNtYWxsKCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgoYXJyW2ldLCBcXFwiLml0ZW0tYmFyJiZUZXh0XFxcIiksXFxuICAgICAgICAgICAgICAgIHVybDogYmFzaWNVcmwgKyBwZGZoKGFycltpXSwgXFxcImEmJmhyZWZcXFwiKSxcXG4gICAgICAgICAgICAgICAgfSk7ICAgICAgICAgXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGZpbmRBbGlVcmwoaW5wdXQpIHtcXG4gICAgICAgICAgIHZhciBodG1sID0gcGRmaChyZXF1ZXN0KGlucHV0KSwgJyNtX2xpbmsmJnZhbHVlJyk7XFxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGh0bWw7XFxuICAgICAgICAgICB9XFxuICAgIH0se1xcbiAgICAgICAgbmFtZTogXFxcIuaXoOaegeejgemTvlxcXCIsXFxuICAgICAgICBwYWdlOiBmYWxzZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgYmFzaWNVcmwgPSBcXFwiaHR0cHM6Ly8wY2lsaS50b3BcXFwiO1xcbiAgICAgICAgICAgIGxldCBhcGkgPSBcXFwiL3NlYXJjaD9xPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQocyk7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGJhc2ljVXJsICsgYXBpKTtcXG4gICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwidGFibGUmJnRyXFxcIik7XFxuICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgeyAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChhcnJbaV0sIFxcXCJwJiZUZXh0XFxcIikuc21hbGwoKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogcGRmaChhcnJbaV0sIFxcXCJUZXh0XFxcIikubWF0Y2goL1xcXFxkKyhcXFxcLj9cXFxcZCspP1tnbWtiXSsvaSlbMF0sXFxuICAgICAgICAgICAgICAgIHVybDogYmFzaWNVcmwgKyBwZGZoKGFycltpXSwgXFxcImEmJmhyZWZcXFwiKSxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGZpbmRBbGlVcmwoaW5wdXQpIHtcXG4gICAgICAgICAgIHZhciBodG1sID0gcGRmaChyZXF1ZXN0KGlucHV0KSwgJy5tYWduZXQtYm94JiZpbnB1dCYmdmFsdWUnKTtcXG4gICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbDtcXG4gICAgICAgICAgIH1cXG4gICAgfSx7XFxuICAgICAgICBuYW1lOiBcXFwiVTNDM1xcXCIsXFxuICAgICAgICBwYWdlOiB0cnVlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCBiYXNpY1VybCA9IFxcXCJodHRwczovL2EudTNjMy5saWZlXFxcIjtcXG4gICAgICAgICAgICBsZXQgYXBpID0gXFxcIi8/cD1cXFwiICsgcGFnZSArIFxcXCImc2VhcmNoMj1lZWxqYTNsZmVhJnNlYXJjaD1cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KHMpO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChiYXNpY1VybCArIGFwaSk7XFxuICAgICA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TtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7ICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGFycltpXSwgXFxcImEmJnRpdGxlXFxcIikuc21hbGwoKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogcGRmaChhcnJbaV0sIFxcXCJUZXh0XFxcIikubWF0Y2goL1xcXFxkKyhcXFxcLj9cXFxcZCspP1xcXFxzW2dta2JdKy4qL2kpWzBdLFxcbiAgICAgICAgICAgICAgICB1cmw6IHBkZmgoYXJyW2ldLCBcXFwiYSwyJiZocmVmXFxcIiksXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH0sXFxuICAgIH0se1xcbiAgICAgICAgbmFtZTogXFxcIlRvcnJlbnQgS2l0dHlcXFwiLFxcbiAgICAgICAgcGFnZTogdHJ1ZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgYmFzaWNVcmwgPSBcXFwiaHR0cHM6Ly9jbi50b3JyZW50a2l0dHkuaW5rXFxcIjtcXG4gICAgICAgICAgICBsZXQgYXBpID0gXFxcIi9zZWFyY2gvXFxcIiArIGVuY29kZVVSSUNvbXBvbmVudChzKSArIFxcXCIvXFxcIiArIHBhZ2U7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGJhc2ljVXJsICsgYXBpKTtcXG4gICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiI2FyY2hpdmVSZXN1bHQmJnRyOmhhcyhhKVxcXCIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQ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