xiaomianao666

小程序:禁漫天堂

Nov 26th, 2024
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@禁漫天堂@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi56aB5ryr5aSp5aCCIiwiYXV0aG9yIjoiTElVJuWtkOS4keWvheWNryZLaWxsZXImTG95RGdJayblraPpo44iLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyMvYWxidW1zP289bXImcGFnZT1meXBhZ2UiLCJ2ZXJzaW9uIjowLCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImNhcnRvb24iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBkID0gW107XG5yYyhmZXRjaFBDKCdodHRwczovL2dpdGVlLmNvbS9taXN0eXdhdGVyL2hpa2VyX2luZm8vcmF3L21hc3Rlci9naXRodWJwcm94eS5qc29uJykgKyAnaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL21pc3R5d2F0ZXIvaGlrZXIvbWFpbi9mJywgMjQpO1xuLy9ldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL3lpP3J1bGU9zrEnKSkucnVsZSk7XG5ldmFsKEpTT04ucGFyc2UoZmV0Y2goXCJoaWtlcjovL3BhZ2UveWpcIiwge30pKS5ydWxlKTtcbnB1dFZhcignbGluaycsY29uZmlnLmhvc3QpXG52YXIgbGluayA9IGdldFZhcignbGluaycpXG5jb25zdCBwYWdlID0gTVlfUEFHRTtcbmNvbnN0IGRjID0gZHluYW1pY0NsYXNzKHtcbiAgICDliIbnsbvpopzoibI6I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NV93ZWJ2aWV3X3NpbmdsZScsXG4gICAgICAgICAgICAgICAgdXJsOiBNWV9VUkwsXG4gICAgICAgICAgICAgICAgZGVzYzogJ2xpc3QmJnNjcmVlbicsXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgXCJVc2VyLUFnZW50XCI6IFwiTW96aWxsYS81LjAgKExpbnV4OyBBbmRyb2lkIDEyOyBTTS1HOTc1MCBCdWlsZC9TUDFBLjIxMDgxMi4wMTY7IHd2KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzQuMCBDaHJvbWUvODkuMC40Mzg5LjcyIE1RUUJyb3dzZXIvNi4yIFRCUy8wNDYyNzkgTW9iaWxlIFNhZmFyaS81MzcuMzZcIiwvL1BDX1VBLCAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgc2hvd1Byb2dyZXNzOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNoZWNrKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbyA9IGZiYS5nZXRDb29raWUodSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvLmluY2x1ZGVzKCdyZW1lbWJlcj0nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEucGFyc2VMYXp5UnVsZSgkJCQoKS5sYXp5UnVsZSgoY28pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9jYWNoZS9KTV9jb29raWUudHh0JywgY28pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QoJ+i0puWPt+W3sueZu+W9lScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjayh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgY28pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrLCA1MDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrKCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIE1ZX1VSTClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBzZXRSZXN1bHQoZCk7XG4gICAgICAgIH0pLFxuICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcbiAgICB9KTtcblxufVxubGV0IG5hdiA9IFtcIummlumhtVwiLFwiQea8q1wiLFwi5YiG57G7XCJdO1xubGV0IGNvbG9ycz0gWyc5RjVGOUYnLCdmN2U4YWEnLCcyMGExNjInXTtcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IG5hdi5sZW5ndGg7IGkrKykge1xuICAgICAgICBsZXQgbXl0aXRsZSA9IG5hdltpXTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcignbmF2dGl0bGUnLCBcIummlumhtVwiKSA9PSBteXRpdGxlID8gY29sb3IobXl0aXRsZSxnZXRSYW5nZUNvbG9ycygpKTogbXl0aXRsZSxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChteXRpdGxlKSA9PiB7XG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoXCJuYXZ0aXRsZVwiLCBteXRpdGxlKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9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C9waG90b3M/c2VhcmNoX3F1ZXJ5PVwiK3RpdGxlK1wiJm1haW5fdGFnPTAmbz1tdiZ0PWEmcGFnZT1cIjtcclxuICAgICAgICAgICAgICAgIGQucHVzaCh7IFxyXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwrJ2Z5cGFnZSNmdWxsVGhlbWUjI25vSGlzdG9yeSNAcnVsZT1qczokLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2Uvc2VhcmNoXCIpJyxcclxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXCJmbGV4X2J1dHRvblwiLFxuICAgICAgICAgICAgICAgICAgICBleHRyYTp7XG4gICAgICAgICAgICB0aXRsZTogdGl0bGUsXG4gICAgICAgICAgICB1cmw6IHVybFxuICAgICAgICAgfVxufSk7XG59KVxufSlcbiovXG52YXIgTGFiID0gcGRmYShodG1sLCdib2R5JiYucm93OmhhcyguYnRuLXRvb2xiYXIpOm5vdCg6bWF0Y2hlcyjnsbvliKt85o6S6KGMKSknKTtcclxuICAgICAgICBMYWIuZm9yRWFjaCgoZGF0YSkgPT4ge1xuICAgICAgICAgICBkLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgdGl0bGU6IHNwKHBkZmgoZGF0YSwgJ2g0JiZUZXh0JykpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInJpY2hfdGV4dFwiLFxyXG4gICAgICAgICAgICB9KTsgICAgICAgICAgICBcclxuICAgICAgICAgICAgdmFyIGl0ZW0gPSBwZGZhKGRhdGEsICcucm93JiZsaScpO1xyXG4gICAgICAgICAgICBpdGVtLmZvckVhY2goKGRhdGFzKSA9PiB7XG52YXIgdGl0bGU9IHNwKHBkZmgoZGF0YXMsICdhJiZUZXh0JykpO1xuICAgICAgICAgICAgICAgIGQucHVzaCh7IFxyXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgIC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AgICAgICAgICAgICAgIC8vIOWcqOi/memHjOaJp+ihjOaCqOeahOaTjeS9nFxcbiAgICAgICAgICAgICAgICB0aGlzW3Byb3BlcnR5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5kZWJ1Zykge1xcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocHJvcGVydHkgKyBcXFwiOlxcXCIgKyB2YWx1ZSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0sXFxuICAgICAgICBldmFsSlNSdWxlKGl0ZW0sXFxuICAgICAgICAgICAganNSdWxlKSB7XFxuICAgICAgICAgICAgbGV0IHJ1bGUgPSBqc1J1bGUucmVwbGFjZShcXFwiQGpzOlxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICBydWxlID0gcnVsZS50cmltKCk7XFxuICAgICAgICAgICAgLy9sb2coJC5zdHJpbmdpZnkocnVsZSkpXFxuICAgICAgICAgICAgbGV0IGlucHV0ID0gaXRlbTtcXG4gICAgICAgICAgICBpZiAocnVsZS5zdGFydHNXaXRoKFxcXCIoXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgZXZhbChcXFwicmVzdWx0ID0gXFxcIiArIHJ1bGUpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAgICAgKiDov5jljp/miJAgJC50b1N0cmluZyguLi4pIOeahOacgOe7iOe7k+aenO+8jOi+vuWIsOacgOe7iOWkhOeQhuaWueW8j+i3n+S4iumdoueahCBpZiDkuIDoh7TnmoTnm67nmoRcXG4gICAgICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgICAgIGV2YWwoXFxcInJlc3VsdCA9IFxcXCIgKyBcXFwiKCgpID0+IHtcXFwiICsgcnVsZSArIFxcXCJ9KSgpXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgIC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cXFwiKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IGNhdGVnb3J5LumTvuaOpeWkhOeQhih1cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gdXJsIHx8IFxcXCJcXFwiO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGlzTnVsbChwYXJhbSkge1xcbiAgICAgICAgICAgIGlmIChwYXJhbSA9PSBudWxsKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9LFxcbiAgICAgICAgaXNCb29sZWFuKHZhcmlhYmxlKSB7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YXJpYWJsZSAhPT0gXFxcImJvb2xlYW5cXFwiKSB7XFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5byA5ZCv5oqY5Y+g6K+35Lyg5YWl5biD5bCU5YC8XFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIOa4hemZpChsaXN0KSB7XFxuICAgICAgICAgICAgaWYgKHRoaXMuaXNOdWxsKGxpc3QpKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAobGlzdC5jb25zdHJ1Y3RvciA9PSBTdHJpbmcpIHtcXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmuIXpmaTmiqXplJk66K+35Lyg5YiX6KGoXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRoaXMuY2xlYXJzID0gbGlzdDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDlhajmuIUobGlzdCkge1xcbiAgICAgICAgICAgIGlmICh0aGlzLmlzTnVsbChsaXN0KSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGMgPSB0aGlzLmNsZWFyYWxsO1xcbiAgICAgICAgICAgIGxpc3QgPSBjLmNvbmNhdChsaXN0KTtcXG4gICAgICAgICAgICB0aGlzLmNsZWFyYWxsID0gbGlzdDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDmupDnoIEoaW5wdXQpIHtcXG4gICAgICAgICAgICB0aGlzLmh0bWwgPSBpbnB1dDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDnlYzpnaIoaW5wdXQpIHtcXG4gICAgICAgICAgICB0aGlzLmxheW91dCA9IGlucHV0O1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgfSxcXG4gICAgICAgIOmhteeggShpbnB1dCkge1xcbiAgICAgICAgICAgIHRoaXMucGFnZSA9IGlucHV0O1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgfSxcXG4gICAgICAgIOeKtuaAgShpbnB1dCkge1xcbiAgICAgICAgICAgIHRoaXMuc3RhdGUgPSBpbnB1dDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDlvIDlkK/mkJzntKIoaW5wdXQpIHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gdW5kZWZpbmVkKSB7XFxuICAgICAgICAgICAgICAgIGlucHV0ID0gdHJ1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdGhpcy5zZWFyY2ggPSBpbnB1dDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDlvIDlkK/mipjlj6AoaW5wdXQpIHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gdW5kZWZpbmVkKSB7XFxuICAgICAgICAgICAgICAgIGlucHV0ID0gdHJ1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdGhpcy5pc0Jvb2xlYW4oaW5wdXQpO1xcbiAgICAgICAgICAgIHRoaXMub3BlbiA9IGlucHV0O1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgfSxcXG4gICAgICAgIHNldFRpdGxlKGssIGksIHQpIHtcXG4gICAgICAgICAgICByZXR1cm4gayA9PSBpID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0LmZvbnRjb2xvcih0aGlzLuWIhuexu+minOiJsikgOiB0O1xcbiAgICAgICAgfSxcXG4gICAgICAgIGFjdGlvbihvYmopIHtcXG4gICAgICAgICAgICByZXR1cm4gW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmuIXpmaTnirbmgIFcXFwiLFxcbiAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygob2JqKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsb2cob2JqKTtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIob2JqLnN0YXRlKTtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoXFxcImhlYWQuY2F0ZVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignY2F0ZV9idXR0b24nKTtcXG4gICAgICAgICAgICAgICAgICAgIG9iai5hbGwuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIG9iai5jbC5mb3JFYWNoKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcihpdGVtKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgfSwgb2JqKSxcXG4gICAgICAgICAgICB9LCBdO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGNoZWNrUGFyYW0oKSB7XFxuICAgICAgICAgICAgdmFyIG9iaiA9IHt9O1xcbiAgICAgICAgICAgIGlmICh0aGlzLnBhZ2UgPT0gMCAmJiB0eXBlb2YgcGFnZSA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpemhteeggVxcXCIpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcGFnZSA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLpobXnoIFcXFwiXSA9IHRoaXMucGFnZTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIG9ialtcXFwi6aG156CBXFxcIl0gPSBwYWdlO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh0aGlzLmh0bWwgPT0gXFxcImVtcHR5XFxcIiAmJiB0eXBlb2YgaHRtbCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpea6kOeggVxcXCIpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaHRtbCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLmupDnoIFcXFwiXSA9IHRoaXMuaHRtbDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIG9ialtcXFwi5rqQ56CBXFxcIl0gPSBodG1sO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh0aGlzLmxheW91dCA9PSBcXFwidW5kZWZpbmVkXFxcIiAmJiB0eXBlb2YgZCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpeeVjOmdolxcXCIpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLnlYzpnaJcXFwiXSA9IHRoaXMubGF5b3V0O1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLnlYzpnaJcXFwiXSA9IGQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIG9iajtcXG4gICAgICAgIH0sXFxuICAgICAgICDliJvlu7rliqjmgIHliIbnsbsocnVsZU9iaikge1xcbiAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgIGxldCBjYXRlcyA9IFtdO1xcbiAgICAgICAgICAgIGlmIChydWxlT2JqID09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgICAgICBydWxlT2JqID0gW107XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8v5Yid5aeL5YyW5Y+Y6YeP5byA5aeLXFxuICAgICAgICAgICAgY29uc3QgcGFyYW0gPSB0aGlzLmNoZWNrUGFyYW0oKTtcXG4gICAgICAgICAgICBjb25zdCBwYWdlID0gcGFyYW0u6aG156CBO1xcbiAgICAgICAgICAgIGNvbnN0IGh0bWwgPSBwYXJhbS7mupDnoIE7XFxuICAgICAgICAgICAgY29uc3QgZCA9IHBhcmFtLueVjOmdojtcXG4gICAgICAgICAgICBjb25zdCDnirbmgIEgPSB0aGlzL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wi5pCc57Si5YWz6ZSu6K+NXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKFxcXCJrZXl3b3JkXFxcIiwgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImtleXdvcmRcXFwiLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgY29uc3QgY2F0ZWdvcmllcyA9IFtdO1xcbiAgICAgICAgICAgIHJ1bGVPYmouZm9yRWFjaCgoeCkgPT4ge1xcbiAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IFtdO1xcbiAgICAgICAgICAgICAgICAvL2xvZyh4KVxcbiAgICAgICAgICAgICAgICBpZiAoeC5qc29uICE9IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgICAgICAgICAgeC5qc29uLm1hcChrID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2goSlNPTi5zdHJpbmdpZnkoaykucmVwbGFjZSgvXlxcXFxbfFxcXFxdJC9nLCAnJykpXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgLy9jYXRlZ29yaWVzLnB1c2goeC5qc29uKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmICh4LuS4gOe6p+WumuS9jSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHgu5LiA57qn5a6a5L2NLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSB0aGlzLmV2YWxKU1J1bGUoaHRtbCwgeC7kuIDnuqflrprkvY0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0ID0gcGRmYShodG1sLCB4LuS4gOe6p+WumuS9jSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKHgu5aSn57G75a6a5L2NKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoeC7lpKfnsbvlrprkvY0uc3RhcnRzV2l0aChcXFwiQGpzOlxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IHRoaXMuZXZhbEpTUnVsZShodG1sLCB4LuWkp+exu+WumuS9jSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBbcGRmYShodG1sLCB4LuWkp+exu+WumuS9jSkuam9pbignXFxcXG4nKV07XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8tLemineWkluWkhOeQhi0tXFxuICAgICAgICAgICAgICAgIGlmICgoJ+WinuWKoCcgaW4geCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh4LuWinuWKoC5jb25zdHJ1Y3RvciA9PSBTdHJpbmcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB4LuWinuWKoCA9IGV2YWwoeC7lop7liqApO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgc2xpc3QgPSB4LuWinuWKoC5jb25jYXQoc2xpc3QpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmICgoJ+ihpeWFhScgaW4geCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh4LuihpeWFhS5jb25zdHJ1Y3RvciA9PSBTdHJpbmcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB4LuihpeWFhSA9IGV2YWwoeC7ooaXlhYUpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgc2xpc3QgPSBzbGlzdC5jb25jYXQoeC7ooaXlhYUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vLS3pop3lpJblpITnkIYtLVxcbiAgICAgICAgICAgICAgICB2YXIg5LiA57qnID0gbGlzdC5tYXAoKHMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBzbGlzdCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEoXFxcIuWwj+exu1xcXCIgaW4geCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB4LuWwj+exuyA9IFxcXCJib2R5JiZhOm5vdCg6bWF0Y2hlcyjpppbpobUpKTpub3QoYTpub3QoW2hyZWZdKSlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHgu5bCP57G7LnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNsaXN0ID0gdGhpcy5ldmFsSlNSdWxlKHMsIHgu5bCP57G7KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2xpc3QgPSBwZGZhKHMsIHgu5bCP57G7KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHZhciDlrprkvY0gPSBzbGlzdC5tYXAoKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBzcCh0aGlzLmdldFRpdGxlKGl0ZW0sIHgu5qCH6aKYKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIHgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvYmogPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShvYmopO1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4g5a6a5L2NO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy9sb2co5LiA57qnKVxcbiAgICAgICAgICAgICAgICAvL2xvZyjkuIDnuqcubGVuZ3RoKVxcbiAgICAgICAgICAgICAgICBpZiAo5LiA57qnLmxlbmd0aCA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2go5LiA57qnLmpvaW4oXFxcIlxcXFxuXFxcIikpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAg5LiA57qnLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2goaXRlbS5qb2luKFxcXCIsXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy9sb2coY2F0ZWdvcmllcylcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAo5oqY5Y+g54q25oCBKSB7XFxuICAgICAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBmb2xkID09PSBcXFwiMVxcXCIgPyDmipjlj6AgOiDlsZXlvIAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGl0bGUsIGZvbGQsIHUsIGFsbCwgZXhwcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZvbGQgPSBnZXRNeVZhcihNWV9SVUxFLmdyb3VwLCBmb2xkKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBb5bGV5byALCDmipjlj6BdID0gZXhwcztcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmb2xkID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3ggPSBmaW5kSXRlbXNCeUNscyh0aXRsZSArICdjYXRlX2J1dHRvbicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdjYXRlX2J1dHRvbicsIGN4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHModGl0bGUgKyAnY2F0ZV9idXR0b24nKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN4ID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2NhdGVfYnV0dG9uJywgW10pLm1hcCh4ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeFsnY29sX3R5cGUnXSA9IHhbJ2NvbF90eXBlJ10gPyB4Wydjb2xfdHlwZSddIDogeFsndHlwZSddO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIodGl0bGUgKyAnY2F0ZV9saW5lJywgY3gpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmFsbC5mb3JFYWNoKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsqL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh0aXRsZSArICdjYXRlX2V4cCcsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZm9sZCA9PSAxID8g5bGV5byAIDog5oqY5Y+gLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUuZ3JvdXAsIGZvbGQgPT09IFxcXCIxXFxcIiA/IFxcXCIwXFxcIiA6IFxcXCIxXFxcIik7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3JlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ZX1JVTEUudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbGQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIOeKtuaAgSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAg5YWo5riFLCBb5bGV5byALFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg5oqY5Y+gXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBNWV9SVUxFLnRpdGxlICsgJ2NhdGVfZXhwJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiB0aGlzLmFjdGlvbih7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZTog54q25oCBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsOiDlhajmuIUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbDog5riF6ZmkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLmZvckVhY2goKGNhdGVnb3J5LCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coY2F0ZWdvcnkpXFxuICAgICAgICAgICAgICAgICAgICBsZXQgc3ViX2NhdGVnb3JpZXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIC8qaWYgKOWwj+exu+WumuS9jS5pbmNsdWRlcyhcXFwiO1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NLnNwbGl0KFxcXCI7XFxcIilbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoc3ViX2NhdGVnb3JpZXMubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBkZmEoY2F0ZWdvcnksIOWwj+exu+WumuS9jS5zcGxpdChcXFwiO1xcXCIpWzFdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsqL1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coaW5kZXgpXFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IEpTT04ucGFyc2UoYFske2NhdGVnb3J5fV1gKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHN1Yl9jYXRlZ29yaWVzKVxcbiAgICAgICAgICAgICAgICAgICAgLy8gc3ViX2NhdGVnb3JpZXMgPSBwZGZhKGNhdGVnb3J5LCDlsI/nsbvlrprkvY0pO1xcbiAgICAgICAgICAgICAgICAgICAgLy99XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+Wkp+exu1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xldCB0aXRsZSA9IHBkZmgoaXRlbSwgX+Wkp+exu+agh+mimCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHNwKGl0ZW0udGl0bGUpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIOaOkumZpCAhPSBcXFwidW5kZWZpbmVkXFxcIiAmJiDmjpLpmaQgIT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXdSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGpzb24gPSAnJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0gaXRlbS51cmw7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJhbXMgPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyczog5riF6ZmkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbjoganNvbixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlOiDnirbmgIEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxjbGVhcnM6IOWFqOa4hSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sZXQgdXJsID0gcGQoaXRlbSwgX+Wkp+exu+mTvuaOpSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBpdGVtLnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLyppZiAo5aSn57G75aSE55CGKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0g5LiA57qn5YiG57G75aSE55CGKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0qL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyh1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHNwKHRoaXMuc2V0VGl0bGUoa2V5LnRvU3RyaW5nKCksIGNhdGVfdGVtcFtpbmRleF0sIHRpdGxlKSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2xlYXJzLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuYWxsY2xlYXJzLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdjYXRlX2J1dHRvbicpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJoZWFkLmNhdGVcXFwiLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmpzb24uY29uc3RydWN0b3IgPT09IE9iamVjdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImR0X1xcXCIgKyBwYXJhbXMuanNvbi50eXBlLCBwYXJhbXMuanNvbi52YWx1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMuc3RhdGUsIHBhcmFtcy5qc29uKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBNWV9SVUxFLnRpdGxlICsgJ2NhdGVfbGluZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/lsI/nsbtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGV4dHJhcG9zID0gZmFsc2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qaWYgKGl0ZW0uaW5jbHVkZXMoJ3R5cGU9XFxcIkBleHRyYVxcXCInKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhcG9zID0gdHJ1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZygn6ZmE5Yqg5a6a5L2NJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSovXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleHRyYXBvcykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gc3AocGRmaChpdGVtLCBcXFwiYSYmVGV4dFxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yg5o6S6ZmkICE9IFxcXCJ1bmRlZmluZWRcXFwiICYmIOaOkumZpCAhPSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcImdcXFwiKSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogcGRmaChpdGVtLCBcXFwiYSYmc3RhdGVcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogcGRmaChpdGVtLCBcXFwiYSYmdmFsdWVcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3ZhciB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGl0ZW0udGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIOaOkumZpCAhPSBcXFwidW5kZWZpbmVkXFxcIiAmJiDmjpLpmaQgIT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IHRpdGxlLnJlcGxhY2UobmV3IFJlZ0V4cCjmjpLpmaQsIFxcXCJnXFxcIiksIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBqc29uID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKnN3aXRjaCAodHJ1ZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIOWIhuexu+mTvuaOpS5pbmNsdWRlcyhcXFwiQEBAXFxcIik6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHBkZmgoaXRlbSwg5YiG57G76ZO+5o6lLnNwbGl0KFxcXCJAQEBcXFwiKVswXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogcGRmaChpdGVtLCDliIbnsbvpk77mjqUuc3BsaXQoXFxcIkBAQFxcXCIpWzFdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIOWIhuexu+mTvuaOpS5pbmNsdWRlcyhcXFwiQEBcXFwiKTpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTog5YiG57G76ZO+5o6lLnNwbGl0KFxcXCJAQFxcXCIpWzBdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHBkZmgoaXRlbSwg5YiG57G76ZO+5o6lLnNwbGl0KFxcXCJAQFxcXCIpWzFdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSBpdGVtLnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBqc29uID0gcGQoaXRlbSwg5YiG57G76ZO+5o6lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0qL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IGl0ZW0udXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyp2YXIganNvbj3liIbnsbvpk77mjqUuaW5jbHVkZXMoJ0BAQCcpP3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6cGRmaChpdGVtLOWIhuexu+mTvuaOpS5zcGxpdCgnQEBAJylbMF0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6cGRmaChpdGVtLOWIhuexu+mTvuaOpS5zcGxpdCgnQEBAJylbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OnBkKGl0ZW0s5YiG57G76ZO+5o6lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbj3liIbnsbvpk77mjqUuaW5jbHVkZXMoJ0BAJyk/e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTrliIbnsbvpk77mjqUuc3BsaXQoJ0BAJylbMF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTpwZGZoKGl0ZW0s5YiG57G76ZO+5o6lLnNwbGl0KCdAQCcpWzFdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTpwZChpdGVtLOWIhuexu+mTvuaOpSk7Ki9cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyYW1zID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uOiBqc29uLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGU6IOeKtuaAgSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsbGNsZWFyczog5YWo5riFLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aGlzLnNldFRpdGxlKGtleS50b1N0cmluZygpLCBjYXRlX3RlbXBbaW5kZXhdLCB0aXRsZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcImhpa2VyOi8vZW1wdHlcXFwiICsgXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuYWxsY2xlYXJzLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdjYXRlX2J1dHRvbicpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJoZWFkLmNhdGVcXFwiLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuanNvbi5jb25zdHJ1Y3RvciA9PT0gT2JqZWN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiZHRfXFxcIiArIHBhcmFtcy5qc29uLnR5cGUsIHBhcmFtcy5qc29uLnZhbHVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy5zdGF0ZSwgcGFyYW1zLmpzb24pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9SVUxFLnRpdGxlICsgJ2NhdGVfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9SVUxFLnRpdGxlICsgJ2NhdGVfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGZvbGQgPT09IFxcXCIxXFxcIiB8fCDmipjlj6DnirbmgIEgPT0gZmFsc2UpIHtcXG4gICAgICAgICAgICAgICAgaXRlbXMgPSBpdGVtcy5jb25jYXQoY2F0ZXMpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZm9sZCA9PT0gXFxcIjBcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdjYXRlX2J1dHRvbicsIGNhdGVzKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAodHlwZW9mIHNldFByZVJlc3VsdCAhPSAndW5kZWZpbmVkJykge1xcbiAgICAgICAgICAgICAgICBpdGVtcyA9IGQuY29uY2F0KGl0ZW1zKTtcXG4gICAgICAgICAgICAgICAgLy/muIXnqbrnu6fmib/mlbDnu4RcXG4gICAgICAgICAgICAgICAgZC5sZW5ndGggPSAwO1xcbiAgICAgICAgICAgICAgICBzZXRQcmVSZXN1bHQoaXRlbXMpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goaXRlbSk7XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgfTtcXG4gICAgb2JqLumihOiuvihvcHRpb25zKTtcXG4gICAgcmV0dXJuIG9iajtcXG59XFxuXFxudmFyIOeKtuaAgSA9XFxuICAgIHR5cGVvZiDnirbmgIHmoIforrAgIT0gXFxcInVuZGVmaW5lZFxcXCIgJiYg54q25oCB5qCH6K6wICE9IFxcXCJcXFwiID8g54q25oCB5qCH6K6wIDogTVlfUlVMRS51cmw7XFxuXFxubGV0IGR0X2RlYnVnID0gZmFsc2U7XFxuXFxuYWRkTGlzdGVuZXIoXFxuICAgIFxcXCJvbkNsb3NlXFxcIixcXG4gICAgJC50b1N0cmluZygoKSA9PiB7fSlcXG4pO1xcblxcbnZhciBDcmVhdGUgPSB7XFxuICAgIG5leHRQYWdlOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciByZXN1bHQgPSBmYWxzZTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgdmFyIG5leHQgPSBldmFsKOS4i+S4gOmhtSk7XFxuICAgICAgICAgICAgLy9sb2coJ246JytuZXh0KVxcbiAgICAgICAgICAgIGlmIChuZXh0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcign5LiL5LiA6aG16ZO+5o6l5Li656m6JylcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmVzdWx0ID0gdHJ1ZTtcXG4gICAgICAgICAgICBpZiAodHJ1ZV91cmwgPT0gbmV4dCkge1xcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgLy9sb2coXFxcIuWPr+iDveS4jeWtmOWcqOS4i+S4gOmhteaIluiAheS4i+S4gOmhteWumuS9jeaciemXrumimFxcXCIpO1xcbiAgICAgICAgICAgIGxvZyhcXFwi6ZSZ6K+v5L+h5oGvOlxcXCIgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKChuZXh0ID09IFxcXCJcXFwiIHx8IG5leHQgPT0gdW5kZWZpbmVkKSAmJiBwYWdlID09IDEpIHtcXG4gICAgICAgICAgICBuZXh0ID0gdHJ1ZV91cmw7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIC8vcmVzdWx0PWZhbHNlO1xcbiAgICAgICAgICAgIG5leHQgPSBnZXRNeVZhcijnirbmgIEpO1xcbiAgICAgICAgfVxcbiAgICAgICAgLy9sb2coJ2wnK3RydWVfdXJsKVxcbiAgICAgICAgLy9sb2coJ24nK25leHQpXFxuICAgICAgICBpZiAocGFnZSAhPSAxKSB7XFxuICAgICAgICAgICAgaWYgKHRydWVfdXJsID09IG5leHQgJiYgIXJlc3VsdCkge1xcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0cnVlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiByZXN1bHQ7XFxuICAgICAgICAvL3B1dE15VmFyKOeKtuaAgSwgbmV4dCk7XFxuICAgIH0sXFxuICAgIGdldEJhY2tJbWFnZTogZnVuY3Rpb24oaW1ndXJsKSB7XFxuICAgICAgICB2YXIgcmVzdWx0ID0gaW1ndXJsO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICByZXN1bHQgPSAvdXJsKD86XFxcXHMrKT9cXFxcKCguKj8pXFxcXCkvZ1xcbiAgICAgICAgICAgICAgICAuZXhlYyhpbWd1cmwpWz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pdGxlfSAgLS0tPiDnu5Pmnpw6ICAke29iai50aXRsZX1gICtcXG4gICAgICAgICAgICBgXFxcXG5cXFxcdGRlc2PlrprkvY06ICAke3J1bGUuZGVzY30gIC0tLT4g57uT5p6cOiAgJHtvYmouZGVzY31gICtcXG4gICAgICAgICAgICBgXFxcXG5cXFxcdGltZ+WumuS9jTogICR7cnVsZS5pbWd9ICAtLS0+IOe7k+aenDogICR7b2JqLmltZ31gICtcXG4gICAgICAgICAgICAocnVsZS5jb250ZW50ICE9IHVuZGVmaW5lZCA/IGBcXFxcblxcXFx0Y29udGVudOWumuS9jTogICR7cnVsZS5jb250ZW50fSAgLS0tPiDnu5Pmnpw6ICAke29iai5jb250ZW50fWAgOiAnJykgK1xcbiAgICAgICAgICAgIGBcXFxcblxcXFx0dXJs5a6a5L2NOiAgJHtydWxlLnVybH0gIC0tLT4g57uT5p6cOiAgJHtvYmoudXJsfWBcXG4gICAgICAgICk7XFxuICAgICAgICBsb2coJy0tLS0tLS0tLS0nICsgKGkgKyAxKSArICc66LCD6K+V57uT5p2fLS0tLS0tLS0tLScpO1xcbiAgICB9LFxcbiAgICBqc29uTGlzdDogZnVuY3Rpb24oYXJyLCBqc29uLCBydWxlKSB7XFxuICAgICAgICBpZiAoanNvbi5jb25zdHJ1Y3RvciAhPSBPYmplY3QpIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBqc29uID0gSlNPTi5wYXJzZShqc29uKTtcXG4gICAgICAgICAgICB9IGNhdGNoIHt9XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoanNvbltydWxlLmxpc3RdID09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGFyci5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+PHNtYWxsPuaXoOWGheWuuTwvc21hbGw+PC9mb250PicsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge30sXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGRlYnVnID0gdGhpcy5nZXRCb29sZWFuVmFsdWUocnVsZS5kZWJ1ZywgZmFsc2UpO1xcbiAgICAgICAgdmFyIGVtcHR5ID0gdGhpcy5nZXRCb29sZWFuVmFsdWUocnVsZS5lbXB0eSk7XFxuICAgICAgICBpZiAoZGVidWcpIHtcXG4gICAgICAgICAgICBsb2coJ+WumuS9jeWIl+ihqDonICsgcnVsZS5saXN0KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGpzb25bcnVsZS5saXN0XS5mb3JFYWNoKChpdGVtLCBpKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gc3AoZXZhbChydWxlLnRpdGxlKSk7XFxuICAgICAgICAgICAgdmFyIGRlc2MgPSBzcChldmFsKHJ1bGUuZGVzYykpO1xcbiAgICAgICAgICAgIHZhciBjb250ZW50ID0gc3AoZXZhbChydWxlLmNvbnRlbnQpKTtcXG4gICAgICAgICAgICB2YXIgaW1nID0gZXZhbChydWxlLmltZykgKyBydWxlLnJlZjtcXG4gICAgICAgICAgICB2YXIgaHJlZiA9IGV2YWwocnVsZS51cmwpO1xcbiAgICAgICAgICAgIHZhciB1cmwgPSBydWxlLmltdCA/IGhyZWYgKyBcXFwiI2ltbWVyc2l2ZVRoZW1lIyNhdXRvQ2FjaGUjXFxcIiA6IGhyZWY7XFxuICAgICAgICAgICAgdmFyIGxhenkgPSBydWxlLmxhenkgPyBydWxlLmxhenkgOiBcXFwiXFxcIjtcXG5cXG4gICAgICAgICAgICB2YXIgZGQgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzYyxcXG4gICAgICAgICAgICAgICAgY29udGVudDogY29udGVudCxcXG4gICAgICAgICAgICAgICAgcGljX3VybDogaW1nLFxcbiAgICAgICAgICAgICAgICB1cmw6IChlbXB0eSA/IFxcXCJoaWtlcjovL2VtcHR5IyNcXFwiIDogJycpICsgdXJsLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogcnVsZS5jb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgaWYgKGRlYnVnKSB7XFxuICAgICAgICAgICAgICAgIHZhciByeCA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgIGltZyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQsXFxuICAgICAgICAgICAgICAgICAgICB1cmxcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgdGhpcy5kZWJ1Z2xvZyhpLCBpdGVtLCBydWxlLCByeCk7XFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGlmIChsYXp5ICE9IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGRkW1xcXCJ1cmxcXFwiXSA9IGhyZWYgKyBsYXp5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhcnIucHVzaChkZCk7XFxuICAgICAgICB9KTtcXG4gICAgfSxcXG4gICAgcnVsZUxpc3Q6IGZ1bmN0aW9uKGFyciwgaHRtbCwgcnVsZSkge1xcbiAgICAgICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsXFxuICAgICAgICAgICAgcnVsZS5saXN0KTtcXG4gICAgICAgIHZhciBkZWJ1ZyA9IHRoaXMuZ2V0Qm9vbGVhblZhbHVlKHJ1bGUuZGVidWcsXFxuICAgICAgICAgICAgZmFsc2UpO1xcbiAgICAgICAgdmFyIGVtcHR5ID0gdGhpcy5nZXRCb29sZWFuVmFsdWUocnVsZS5lbXB0eSk7XFxuICAgICAgICBpZiAoZGVidWcpIHtcXG4gICAgICAgICAgICBsb2coJ+WumuS9jeWIl+ihqDonICsgcnVsZS5saXN0KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxpc3QuZm9yRWFjaCgoaXRlbSwgaSkgPT4ge1xcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IHNwKHRoaXMuc2V0Q29udGVudChpdGVtLCBydWxlLnRpdGxlKSk7XFxuICAgICAgICAgICAgdmFyIGRlc2MgPSBzcCh0aGlzLnNldENvbnRlbnQoaXRlbSwgcnVsZS5kZXNjKSk7XFxuICAgICAgICAgICAgdmFyIGltZyA9IHRoaXMuaW1nSGFuZGxlKGl0ZW0sIHJ1bGUpO1xcbiAgICAgICAgICAgIHZhciB1cmwgPSB0aGlzLnVybEhhbmRsZShpdGVtLCBydWxlKTtcXG4gICAgICAgICAgICB2YXIgY29udGVudCA9IHNwKHRoaXMuc2V0Q29udGVudChpdGVtLCBydWxlLmNvbnRlbnQpKTtcXG5cXG4gICAgICAgICAgICBpZiAoZGVidWcpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHJ4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nLFxcbiAgICAgICAgICAgICAgICAgICAgY29udGVudCxcXG4gICAgICAgICAgICAgICAgICAgIHVybFxcbiAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICB0aGlzLmRlYnVnbG9nKGksIGl0ZW0sIHJ1bGUsIHJ4KTtcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgdmFyIGxhenkgPSBydWxlLmxhenkgPyBydWxlLmxhenkgOiBcXFwiXFxcIjtcXG4gICAgICAgICAgICB2YXIgZGQgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzYyxcXG4gICAgICAgICAgICAgICAgcGljX3VybDogaW1nLFxcbiAgICAgICAgICAgICAgICB1cmw6IChlbXB0eSA/IFxcXCJoaWtlcjovL2VtcHR5IyNcXFwiIDogJycpICsgdXJsLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiBjb250ZW50LFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogcnVsZS5jb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgaWYgKGxhenkgIT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgZGRbXFxcInVybFxcXCJdID0gdXJsICsgbGF6eTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgYXJyLnB1c2goZGQpO1xcbiAgICAgICAgfSk7XFxuICAgIH0sXFxuICAgIExpc3Q6IGZ1bmN0aW9uKGFyciwgaHRtbCwgcnVsZSwgcGFyYW0pIHtcXG4gICAgICAgIHBhcmFtID0gcGFyYW0gPyBwYXJhbSA6IHt9O1xcbiAgICAgICAgdmFyIGF1dG8gPSBwYXJhbS5hdXRvID8gcGFyYW0uYXV0byA6IGZhbHNlO1xcbiAgICAgICAgdmFyIHNob3cgPSBwYXJhbS5zaG93ID8gcGFyYW0uc2hvdyA6IGZhbHNlO1xcbiAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgIC8vdGhpcy5zcGFnZS5zZXQodHJ1ZV91cmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgdGhpcy5yZWZyZXNoKCk7XFxuICAgICAgICB2YXIgZGVidWcgPSB0aGlzLmdldEJvb2xlYW5WYWx1ZShydWxlLmRlYnVnLCBmYWxzZSk7XFxuICAgICAgICB2YXIgZW1wdHkgPSB0aGlzLmdldEJvb2xlYW5WYWx1ZShydWxlLmVtcHR5KTtcXG4gICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCBydWxlLmxpc3QpO1xcbiAgICAgICAgaWYgKGRlYnVnKSB7XFxuICAgICAgICAgICAgbG9nKCflrprkvY3liJfooag6JyArIHJ1bGUubGlzdCk7XFxuICAgICAgICB9XFxuICAgICAgICAvL2xvZyh0aGlzLm5leHRQYWdlKCkpXFxuICAgICAgICBpZiAoKHN0b3JhZ2UwLmdldE15VmFyKCd5aV9pc25leHQnLCAndCcpID09ICd0JyAmJiBsaXN0Lmxlbmd0aCA+IDApIHx8IHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgIGxpc3QuZm9yRWFjaCgoaXRlbSwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtKFxcXCJwYWdlbnVtXFxcIik7XFxuICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW0oXFxcInBhZ2VsaW5lXFxcIik7XFxuICAgICAgICAgICAgICAgIHZhciBpZCA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICB2YXIgY2xzID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IHNwKHRoaXMuc2V0Q29udGVudChpdGVtLCBydWxlLnRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIHZhciBkZXNjID0gc3AodGhpcy5zZXRDb250ZW50KGl0ZW0sIHJ1bGUuZGVzYykpO1xcbiAgICAgICAgICAgICAgICB2YXIgaW1nID0gdGhpcy5pbWdIYW5kbGUoaXRlbSwgcnVsZSk7XFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSB0aGlzLnVybEhhbmRsZShpdGVtLCBydWxlKTtcXG4gICAgICAgICAgICAgICAgdmFyIGNvbnRlbnQgPSBzcCh0aGlzLnNldENvbnRlbnQoaXRlbSwgcnVsZS5jb250ZW50KSk7XFxuXFxuICAgICAgICAgICAgICAgIGlmIChkZWJ1Zykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJ4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsXFxuICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWJ1Z2xvZyhpLCBpdGVtLCBydWxlLCByeCk7XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgaWYgKGkgPT0gbGlzdC5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZCA9IFxcXCJsYXN0aWRfXFxcIiArIHBhZ2U7XFxuICAgICAgICAgICAgICAgICAgICBjbHMgPSBcXFwibGFzdG1hcmtcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaW1nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAoZW1wdHkgPyBcXFwiaGlrZXI6Ly9lbXB0eSMjXFxcIiA6ICcnKSArIHVybCxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IGNvbnRlbnQsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogcnVsZS5jb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogY2xzLFxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGlmIChpID09IGxpc3QubGVuZ3RoIC0gMSAmJiBzaG93KSB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJwYWdlbGluZVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnOKAneKAnTxzbWFsbD7liqDovb3kuK0uLi48L3NtYWxsPlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogXFxcInBhZ2VudW1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKFxcXCJwYWdlbnVtXFxcIiwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxmb250IGNvbG9yPVxcXCJncmV5XFxcIj48c21hbGw+5Yiw5bqV5LqGPC9zbWFsbD48L2ZvbnQ+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogXFxcImxhc3RcXFwiLFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGxpc3QubGVuZ3RoID09IDAgJiYgcGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lXFxcIixcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxmb250IGNvbG9yPVxcXCJncmV5XFxcIj48c21hbGw+5peg5YaF5a65PC9zbWFsbD48L2ZvbnQ+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7fSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh0aGlzLm5leHRQYWdlKCkpIHtcXG4gICAgICAgICAgICAvL2xvZygndCcpO1xcbiAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCd5aV9pc25leHQnLCAndCcpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAvL2xvZygnZicpO1xcbiAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCd5aV9pc25leHQnLCAnZicpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGF1dG8pIHtcXG4gICAgICAgICAgICAvL2NyZWF0ZU5leHRQYWdlKCk7XFxuICAgICAgICAgICAgYXV0b1BhZ2UoKTtcXG4gICAgICAgIH1cXG4gICAgfSxcXG59O1xcblxcbnZhciBleHRNZXRob2QgPSB7XFxuICAgIFRvUGFyYW1zOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciBqc29uID0gYXJndW1lbnRzWzBdO1xcbiAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKGpzb24pXFxuICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBrZXkgKyBcXFwiPVxcXCIgKyBqc29uW2tleV0pXFxuICAgICAgICAgICAgLmpvaW4oXFxcIiZcXFwiKTtcXG4gICAgfSxcXG4gICAgdXJsUGFyc2U6IGZ1bmN0aW9uKHUpIHtcXG4gICAgICAgIHZhciBkaWN0ID0ge307XFxuICAgICAgICBkaWN0LlNvdXJjZSA9IHU7XFxuICAgICAgICBsZXQgcGFyYW1zID0gKHVybCkgPT4ge1xcbiAgICAgICAgICAgIGxldCBxdWVyeVBhcmFtcyA9IHt9O1xcbiAgICAgICAgICAgIGxldCByZWcgPSAvKFtePz0mXSspPShbXj89Jl0rKS9nO1xcbiAgICAgICAgICAgIHVybC5yZXBsYWNlKHJlZywgZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIHF1ZXJ5UGFyYW1zW2FyZ3VtZW50c1sxXV0gPSBhcmd1bWVudHNbMl07XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuIHF1ZXJ5UGFyYW1zO1xcbiAgICAgICAgfTtcXG4gICAgICAgIHZhciBqYXZhVXJsID0gSmF2YUltcG9ydGVyKGphdmEubmV0LlVSTCk7XFxuICAgICAgICB3aXRoKGphdmFVcmwpIHtcXG4gICAgICAgICAgICB2YXIgdXJsID0gbmV3IFVSTCh1KTtcXG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7IGkrKykge1xcbiAgICAgICAgICAgIGlmIChzdHIxW2ldICE9PSBzdHIyW2ldKSB7XFxuICAgICAgICAgICAgICAgIGRpZmZDaGFycy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGluZGV4OiBpLFxcbiAgICAgICAgICAgICAgICAgICAgczE6IHN0cjFbaV0sXFxuICAgICAgICAgICAgICAgICAgICBzMjogc3RyMltpXSxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIGRpZmZDaGFycztcXG4gICAgfSxcXG4gICAgcmVwbGFjZUNoYXJBdDogZnVuY3Rpb24oc3RyLCBpbmRleCwgcmVwbGFjZW1lbnQpIHtcXG4gICAgICAgIGlmIChpbmRleCA8IDAgfHwgaW5kZXggPj0gc3RyLmxlbmd0aCkge1xcbiAgICAgICAgICAgIHJldHVybiBzdHI7XFxuICAgICAgICB9XFxuICAgICAgICAvL2xvZyhpbmRleClcXG4gICAgICAgIGNvbnN0IGFyciA9IHN0ci5zcGxpdChcXFwiXFxcIik7XFxuICAgICAgICBhcnJbaW5kZXhdID0gcmVwbGFjZW1lbnQ7XFxuICAgICAgICByZXR1cm4gYXJyLmpvaW4oXFxcIlxcXCIpO1xcbiAgICB9LFxcbiAgICBnZXRPYmplY3RLZXlzRGlmZjogZnVuY3Rpb24ob2JqMSwgb2JqMikge1xcbiAgICAgICAgY29uc3QgZGlmZmVyZW50S2V5cyA9IFtdO1xcbiAgICAgICAgZm9yIChsZXQga2V5IGluIG9iajEpIHtcXG4gICAgICAgICAgICBpZiAoIW9iajIuaGFzT3duUHJvcGVydHkoa2V5KSB8fCBvYmoxW2tleV0gIT09IG9iajJba2V5XSkge1xcbiAgICAgICAgICAgICAgICBkaWZmZXJlbnRLZXlzLnB1c2goa2V5KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGxldCBrZXkgaW4gb2JqMikge1xcbiAg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gICAgICAgICAgICAgICAgaWYgKGR0X2RlYnVnKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2codTEuUGF0aCk7XFxuICAgICAgICAgICAgICAgICAgICBsb2codTIuUGF0aCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdmFyIGRmID0gdGhpcy5maW5kRGlmZmVyZW50SW5kZXgoU3RyaW5nKHUxLlBhdGgpLCBTdHJpbmcodTIuUGF0aCkpO1xcbiAgICAgICAgICAgICAgICBpZiAoZHRfZGVidWcpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhkZik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGRmLmxlbmd0aCA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmUgPSBkZlswXS5pbmRleDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBmID0gZGYuZmlsdGVyKCh4KSA9PiAvXFxcXGQrLy50ZXN0KHguczIpKTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciByZSA9IGZbMF0uaW5kZXg7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdmFyIGVxID0gdGhpcy5yZXBsYWNlQ2hhckF0KFN0cmluZyh1Mi5QYXRoKSwgcmUsIFxcXCJmeXBhZ2VcXFwiKTtcXG4gICAgICAgICAgICAgICAgbmV4dHVybCA9IHUyLkhvc3RzICsgZXEgKyBjYSArIHRoaXMuVG9QYXJhbXModTIuUGFyYW1zKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgZXAgPSB0aGlzLmdldE9iamVjdEtleXNEaWZmKHUxLlBhcmFtcywgdTIuUGFyYW1zKVxcbiAgICAgICAgICAgICAgICBpZiAoZXAubGVuZ3RoID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHUxLlBhcmFtc1tlcFswXV0gPS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l9pZCl7XFxuICAgICAgICB2YXIgZmF2X2luZm8gPSB0cnVlO1xcbiAgICAgICAgdmFyIGZhdl91cmwgPSBsaW5rKycvYWpheC9yZW1vdmVfYWxidW1fcGxheWxpc3QnO1xcbiAgICAgICAgdmFyIGZhdl9kYXRhID0ge1xcbiAgICAgICAgICAgIFxcXCJ2aWRlb19pZFxcXCI6IGZhdl9pZCxcXG4gICAgICAgICAgICBcXFwibGlzdFxcXCI6ICdmYXZvcml0ZXMnXFxuICAgICAgICB9XFxuICAgICAgICAgXFxuICAgIH1lbHNle1xcbiAgICAgICAgdmFyIGZhdl9pbmZvID0gZmFsc2U7XFxuICAgICAgICB2YXIgZmF2X2lkID0gcGRmaChodG1sLFxcXCJib2R5JiYuZmxvYXQtcmlnaHQ6bWF0Y2hlcyjmlLbol48pJiZpZFxcXCIpLnNwbGl0KCdfJylbMl1cXG4gICAgICAgIHZhciBmYXZfdXJsID0gbGluaysnL2FqYXgvZmF2b3JpdGVfYWxidW0nO1xcbiAgICAgICAgdmFyIGZhdl9kYXRhID0ge1xcbiAgICAgICAgICAgIFxcXCJhbGJ1bV9pZFxcXCI6IGZhdl9pZCxcXG4gICAgICAgICAgICBcXFwiZmlkXFxcIjogJzAnXFxuICAgICAgICB9XFxuICAgICAgICBcXG4gICAgICAgIH1cXG4gICAvL2xvZyhmYXZfaWQpIFxcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGRlc19hdXRob3IsXFxuICAgICAgICBkZXNjOiBkZXNfZGVzYyxcXG4gICAgICAgIHBpY191cmw6IGRlc19waWMsXFxuICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvaW50cm9kdWNlI25vUmVjb3JkSGlzdG9yeSMjbm9IaXN0b3J5I1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljX2JsdXInLFxcbmV4dHJhOiB7XFxuICAgICAgICAgICAgaW1nOiBkZXNfcGljLFxcbiAgICAgICAgICAgIGludHJvZHVjZTogaW50cm9kdWNlLFxcbiAgICAgICAgICAgIGdyYWRpZW50OiB0cnVlICAgICAgICAgICAgXFxuICAgICAgICB9XFxuICAgIH0se1xcbiAgICAgICAgdGl0bGU6IGZhdl9pbmZvPyfigJjigJjigJnigJk8c3Ryb25nPjxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuS4jeaUtuiXjzwvZm9udD48L3N0cm9uZz4nOifigJjigJjigJnigJk8c3Ryb25nPjxmb250IGNvbG9yPVxcXCIjMDBiZmZmXFxcIj7mlLbol488L2ZvbnQ+PC9zdHJvbmc+JyxcXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChmYXZfaWQsIGhlYWRlcnMsIGZhdl9pbmZvLCBmYXZfdXJsLCBmYXZfZGF0YSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcG9zdFJlcXVlc3QoZmF2X3VybCwge2hlYWRlcnM6IGhlYWRlcnMsIGJvZHk6IGZhdl9kYXRhfSlcXG4gICAgICAgICAgICAgICAgICAgIHRvYXN0KGZhdl9pbmZvPyflj5bmtojmlLbol48nOifmlLbol4/miJDlip8nKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBmYXZfaWQsIGhlYWRlcnMsIGZhdl9pbmZvLCBmYXZfdXJsLCBmYXZfZGF0YSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfNFxcXCJcXG4gICAgICAgIFxcbiAgICB9LHtcXG50aXRsZTogXFxcIuS9nOiAhfCfmYfigI3imYLvuI9cXFwiLFxcbnVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoYXV0aG9yKSA9PiB7XFxuICAgICAgY29uc3QgaGlrZXJQb3AgPSByZXF1aXJlKFxcXCJodHRwczovL2hpa2VyZmFucy5jb20vd2Vpc3lyL2pzL2hpa2VyUG9wLmpzXFxcIik7XFxuICAgICAgbGV0IOagh+etviA9IGF1dGhvci5tYXAoeCA9PiB7XFxuICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoeCwnYSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgcmV0dXJuIHsgICAgICAgIFxcbiAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLCAgICAgICAgXFxuICAgICAgICAgICAgICBpY29uOiBnZXRWYXIoJ2xpbmsnKStcXFwiL3RlbXBsYXRlcy9mcm9udGVuZC9haXJhdi9pbWcvYXBwX2xpbmszLnBuZz92PTNcXFwiLCAgICAgICAgXFxuICAgICAgICAgICAgICB1cmw6IHRpdGxlLCAgICB9fSk7ICAgICAgICAgICBoaWtlclBvcC5zZWxlY3RDZW50ZXJJY29uKHtcXG4gICAgICAgICAgICAgIGljb25MaXN0OiDmoIfnrb4sICAgICAgICAgICAgXFxuICAgICAgICAgICAgICB0aXRsZTogXFxcIuWwj/CfpozmgKHmg4VcXFwiLCAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgY29sdW1uczogMiwgICAgICAgICAgICBcXG4gICAgICAgICAgICAgIGNsaWNrKGEpIHsgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9zZWFyY2g/dGl0bGU9XFxcIithK1xcXCImcGFnZT1meXBhZ2UjZnVsbFRoZW1lIyNub0hpc3RvcnkjXFxcIjsgICAgICAgICAgICB9ICAgICAgICB9KTsgICAgICAgIFxcbiAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjsgICAgfSxhdXRob3IpLFxcbmNvbF90eXBlOiBcXFwidGV4dF80XFxcIixcXG59LHtcXG50aXRsZTogXFxcIuagh+etvvCfj7fvuI9cXFwiLFxcbnVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgodGFnKSA9PiB7XFxuICAgICAgY29uc3QgaGlrZXJQb3AgPSByZXF1aXJlKFxcXCJodHRwczovL2hpa2VyZmFucy5jb20vd2Vpc3lyL2pzL2hpa2VyUG9wLmpzXFxcIik7XFxuICAgICAgbGV0IOagh+etviA9IHRhZy5tYXAoeCA9PiB7XFxuICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoeCwnYSYmVGV4dCcpO1xcbiAgICAgICAgICBsZXQgdXJsID0gcGQoeCwnYSYmaHJlZicpK1xcXCImbWFpbl90YWc9MCZvPW12JnQ9YSZwYWdlPVxcXCI7XFxuICAgICAgICAgICAgICByZXR1cm4geyAgICAgICAgXFxuICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsICAgICAgICBcXG4gICAgICAgICAgICAgIGljb246IGdldFZhcignbGluaycpK1xcXCIvdGVtcGxhdGVzL2Zyb250ZW5kL2FpcmF2L2ltZy9waGljb24vbGlicmFyeS5wbmdcXFwiLCAgICAgICAgXFxuICAgICAgICAgICAgICB1cmw6IHRpdGxlLCAgICB9fSk7ICAgICAgICAgICBoaWtlclBvcC5zZWxlY3RDZW50ZXJJY29uKHtcXG4gICAgICAgICAgICAgIGljb25MaXN0OiDmoIfnrb4sICAgICAgICAgICAgXFxuICAgICAgICAgICAgICB0aXRsZTogXFxcIuWkp/CfpozkvKTouqtcXFwiLCAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgY29sdW1uczogMiwgICAgICAgICAgICBcXG4gICAgICAgICAgICAgIGNsaWNrKGEpIHsgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9zZWFyY2g/dGl0bGU9XFxcIithK1xcXCImcGFnZT1meXBhZ2UjZnVsbFRoZW1lIyNub0hpc3RvcnkjXFxcIjsgICAgICAgICAgICB9ICAgICAgICB9KTsgICAgICAgIFxcbiAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjsgICAgfS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mFyKFxcXCJzaHNvcnRcXFwiLCBcXFwiMVxcXCIpXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liIfmjaLmjpLluo/miJDlip8nXFxuICAgICAgICB9KSxcXG4gICAgICAgcGljX3VybDogJ2h0dHBzOi8vaGlrZXJmYW5zLmNvbS90dWJpYW8vbWVzc3kvOS5zdmcnLFxcbiAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2ljb24nXFxuICAgIH0pO1xcblxcblxcbiAgaWYgKGNvbnRzLmxlbmd0aCA9PT0gMCkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICBcXG4gICAgICAgICAgICB0aXRsZTogXFxcIueCueWHu+ebtOaOpemYheivu1xcXCIsXFxuICAgICAgICAgICAgdXJsOiB1cmwgKyBsYXp5QmptLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfkuI3op6Plr4YnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh1cmwsIGxhenlCam0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArIGxhenlCam1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB1cmwsIGxhenlCam0pXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn6Kej5a+GJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodXJsLCBsYXp5Sm0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArIGxhenlKbVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHVybCwgbGF6eUptKVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBdXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBjaGFwdGVyTGlzdC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogZGVzX3RpdGxlLFxcbiAgICAgICAgICAgIHVybDogXFxcImh0dHBzOi8vam1jb21pYy5tZS9waG90by9cXFwiICsgTVlfVVJMLnNwbGl0KFxcXCJcXFxcL1xcXCIpWzRdXFxuICAgICAgICB9KTtcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGxldCBsaXN0ID0gY29udHMubWFwKHYgPT4ge1xcbiAgICAgICAgICAgIGxldCB0aXRsZSA9IHNwKHBkZmgodiwgJ2EmJlRleHQnKSksXFxuICAgICAgICAgICAgICAgIHVybCA9IHBkKHYsICdhJiZocmVmJyk7XFxuICAgICAgICAgICAgY2hhcHRlckxpc3QucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIHVybDogdXJsICsgbGF6eUptLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5LiN6Kej5a+GJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHVybCwgbGF6eUJqbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArIGxhenlCam1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdXJsLCBsYXp5QmptKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+ino+WvhicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh1cmwsIGxhenlKbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArIGxhenlKbVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB1cmwsIGxhenlKbSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBdXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGlmIChnZXRNeVZhcignc2hzb3J0JykgPT09ICcxJykge1xcbiAgICAgICAgICAgIGxpc3QucmV2ZXJzZSgpO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZCA9IGQuY29uY2F0KGxpc3QpO1xcbiAgICB9XFxuICAgIHZhciByZWNvbW1lbmQgPSBwZGZhKGh0bWwsXFxcIiNyZWxhdGVkX2NvbWljcyYmLnJvdzpoYXMoaDQpXFxcIilcXG4gICAgcmVjb21tZW5kLmZvckVhY2goKGRhdGEpID0+IHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSxcXFwiaDQmJlRleHRcXFwiKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCJcXG4gICAgICAgICAgICBcXG4gICAgICAgIH0pXFxuICAgICAgICB2YXIgaXRlbSA9IHBkZmEoZGF0YSwgJ2JvZHkmJi5wLWItMTUnKTtcXHJcXG4gICAgICAgICAgICBpdGVtLmZvckVhY2goKGRhdGFzKSA9PiB7XFxuICAgICAgICAgICAgICAgIHZhciBpbWcgPSBwZGZoKGRhdGFzLFxcXCJpbWcmJmRhdGEtc3JjXFxcIilcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gcGRmaChkYXRhcyxcXFwiaW1nJiZhbHRcXFwiKVxcbiAgICAgICAgICAgICAgICB2YXIgdXJsID0gcGQoZGF0YXMsXFxcImEmJmhyZWZcXFwiKSArJyNpbW1lcnNpdmVUaGVtZSMjYXV0b0NhY2hlI0BydWxlPWpzOiQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2VqXFxcIiknXFxuICAgICAgICAgICAgICAgIHZhciBkZXNjID0gcGRmaChkYXRhcyxcXFwiLnRleHQtd2hpdGUmJlRleHRcXFwiKStcXFwiIFxcXCIrcGRmaChkYXRhcyxcXFwiLnZpZGVvLXZpZXdzJiZUZXh0XFxcIilcXG4gICAgICAgICAgICAgICAgdmFyIGFydGljbGUgPSBwZGZoKGRhdGFzLFxcXCIuZ2FtZWxpYl9ibG9ja19oZWFkZXImJlRleHRcXFwiKTtcXG4gICAgICAgICAgICAgICAgaWYoYXJ0aWNsZSl7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjID0gYXJ0aWNsZVxcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gXFxcImhpa2VyOi8vcGFnZS9hcnRpY2xlP3VybD1cXFwiK3BkKGRhdGFzLFxcXCJhLDEmJmhyZWZcXFwiKStcXFwiI25vUmVjb3JkSGlzdG9yeSMjbm9IaXN0b3J5IyNpbW1lcnNpdmVUaGVtZSNcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwsXFxuICAgICAgICA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IueZu+WHulxcXCIpKXtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08YmlnPjxmb250IGNvbG9yPSNGRjAwRkY+6LSm5Y+35bey55m75b2VPC9mb250PjwvYmlnPicsXFxuICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyAn5Yi35paw6aG16Z2i5YaF5a65Jy5mb250Y29sb3IoJyNGRjAwRkYnKS5iaWcoKSxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgfSk7XFxuICAgIH1lbHNle1xcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgJ+eCueWHu+eZu+W9lei0puWPtycuZm9udGNvbG9yKCcjRkYwMEZGJykuYmlnKCksXFxuICAgICAgICB1cmw6IHN1cmwgKyAkKCcnKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgIGxvZyhmZXRjaENvb2tpZShNWV9VUkwpKVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnLFxcbiAgICAgICAgICAgICAgICB1cmw6IE1ZX1VSTCxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ2xpc3QmJnNjcmVlbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFxcXCJNb3ppbGxhLzUuMCAoTGludXg7IEFuZHJvaWQgMTI7IFNNLUc5NzUwIEJ1aWxkL1NQMUEuMjEwODEyLjAxNjsgd3YpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIFZlcnNpb24vNC4wIENocm9tZS84OS4wLjQzODkuNzIgTVFRQnJvd3Nlci82LjIgVEJTLzA0NjI3OSBNb2JpbGUgU2FmYXJpLzUzNy4zNlxcXCIsLy9QQ19VQSwgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICBzaG93UHJvZ3Jlc3M6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjaGVjaygpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvID0gZmJhLmdldENvb2tpZSh1KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvLmluY2x1ZGVzKCdyZW1lbWJlcj0nKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLnBhcnNlTGF6eVJ1bGUoJCQkKCkubGF6eVJ1bGUoKGNvKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL2NhY2hlL0pNX2Nvb2tpZS50eHQnLCBjbyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QoJ+i0puWPt+W3sueZu+W9lScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2sodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBjbykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChjaGVjaywgNTAwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGVjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgTV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