Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@JavDB@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiSmF2REIiLCJhdXRob3IiOiJSIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjaHR0cHM6Ly9qYXZkYjM2OC5jb20jI2Z5cGFnZSIsInZlcnNpb24iOjIwMjQwMTI1LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xuYWRkTGlzdGVuZXIoXCJvbkNsb3NlXCIsICQudG9TdHJpbmcoKCkgPT4ge1xuICAgIGxldCBrZXlzID0gbGlzdE15VmFyS2V5cygpO1xuICAgIGZvciAobGV0IGl0IG9mIGtleXMpIHtcbiAgICAgICAgY2xlYXJNeVZhcihpdCk7XG4gICAgfVxufSkpO1xuXG52YXIgZ2V0UmFuZ2VDb2xvcnMgPSBmdW5jdGlvbigpIHvCoMKgwqDCoMKgwqDCoFxuICAgIHJldHVybiAnIycgKyAoJzAwMDAwJyArIChNYXRoLnJhbmRvbSgpICogMHgxMDAwMDAwIDw8IDApLnRvU3RyaW5nKDE2KSkuc3Vic3RyKC02KTvCoMKgwqDCoMKgXG59XG5jb25zdCDkuIvkuIDpobUgPSBcInBkKGh0bWwsICdhOm1hdGNoZXMo5LiL5LiAKSYmaHJlZicpXCI7XG5jb25zdCBwYWdlID0gTVlfUEFHRTtcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UveWknKSkucnVsZSlcblxudmFyIOWumuS9jeS/o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VzQ29kZSA9PSAwIHx8ICFodG1sKSB7XG4gICAgICAgICAvL3JldHVybiBcInRvYXN0Oi8v5pu05paw5aSx6LSlLOivt+e/u+WimSzosKLosKJcIlxuICAgICAgICAgICAgICAgY29uZmlybSh7dGl0bGU6J+abtOaWsOWksei0pScsIGNvbnRlbnQ6J+ivt+e/u+WimeWQjuWGjeabtOaWsO+8jOiwouiwoicsIFxuICAgICAgICAgICAgICAgICAgIGNvbmZpcm06JC50b1N0cmluZygoKT0+e3JlZnJlc2hQYWdlKCl9KSwgXG4gICAgICAgICAgICAgICAgICAgY2FuY2VsOiQudG9TdHJpbmcoKCk9Pnt9KX0pXG4gICAgICAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgc2hvd0xvYWRpbmcoXCLmraPlnKjojrflj5blj6/nlKjln5/lkI1cIik7XG4gICAgICAgICAgICB2YXIgaG9tZSA9IE1ZX1JVTEUudXJsLm1hdGNoKC9odHRwcz86XFwvXFwvW14jLz8mXSsvKVswXTtcbiAgICAgICAgICAgIHZhciBodG0gPSBmZXRjaCh5b25naml1KVxuICAgICAgICAgICAgdmFyIGhvc3QgPSBwZGZoKGh0bSwgXCJib2R5JiZkYXRhLWRvbWFpblwiKTtcbiAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XG4gICAgICAgICAgICBpZiAoIWhvc3QpIHJldHVybiBcInRvYXN0Oi8v6I635Y+W5aSx6LSlXCI7XG4gICAgICAgICAgICBpZiAoaG9tZSA9PSBob3N0KSByZXR1cm4gXCJ0b2FzdDovL+aYr+acgOaWsOe9keWdgO+8jOivt+eojeWQjuWIt+aWsOivleivlVwiO1xuICAgICAgICAgICAgdG9hc3QoaG9zdCk7XG4gICAgICAgICAgICAvKGh0dHBzPzpcXC9cXC9bXiMvPyZdKykvLnRlc3QoTVlfUlVMRS51cmwpO1xuICAgICAgICAgICAgTVlfUlVMRS51cmwgPSBNWV9SVUxFLnVybC5yZXBsYWNlKFJlZ0V4cC4kMSwgaG9zdCk7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uICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcGFyYW1bcHJvcGVydHldOyAvLyDojrflj5blsZ7mgKflgLxcXG4gICAgICAgICAgICAgICAgLy8g5Zyo6L+Z6YeM5omn6KGM5oKo55qE5pON5L2cXFxuICAgICAgICAgICAgICAgIHRoaXNbcHJvcGVydHldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmRlYnVnKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhwcm9wZXJ0eSArIFxcXCI6XFxcIiArIHZhbHVlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGV2YWxKU1J1bGUoaXRlbSxcXG4gICAgICAgICAgICBqc1J1bGUpIHtcXG4gICAgICAgICAgICBsZXQgcnVsZSA9IGpzUnVsZS5yZXBsYWNlKFxcXCJAanM6XFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIHJ1bGUgPSBydWxlLnRyaW0oKTtcXG4gICAgICAgICAgICAvL2xvZygkLnN0cmluZ2lmeShydWxlKSlcXG4gICAgICAgICAgICBsZXQgaW5wdXQgPSBpdGVtO1xcbiAgICAgICAgICAgIGlmIChydWxlLnN0YXJ0c1dpdGgoXFxcIihcXFwiKSkge1xcbiAgICAgICAgICAgICAgICBldmFsKFxcXCJyZXN1bHQgPSBcXFwiICsgcnVsZSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICAgICAqIOi/mOWOn+aIkCAkLnRvU3RyaW5nKC4uLikg55qE5pyA57uI57uT5p6c77yM6L6+5Yiw5pyA57uI5aSE55CG5pa55byP6Lef5LiK6Z2i55qEIGlmIOS4gOiHtOeahOebrueahFxcbiAgICAgICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICAgICAgZXZhbChcXFwicmVzdWx0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cXG4gICAgICAgICAgICBpZiAodHlwZW9mIGNhdGVnb3J5LumTvuaOpeWkhOeQhiA9PSBcXFwiZnVuY3Rpb25cXFwiKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IGNhdGVnb3J5LumTvuaOpeWkhOeQhih1cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gdXJsIHx8IFxcXCJcXFwiO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGlzTnVsbChwYXJhbSkge1xcbiAgICAgICAgICAgIGlmIChwYXJhbSA9PSBudWxsKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9LFxcbiAgICAgICAgaXNCb29sZWFuKHZhcmlhYmxlKSB7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YXJpYWJsZSAhPT0gXFxcImJvb2xlYW5cXFwiKSB7XFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5byA5ZCv5oqY5Y+g6K+35Lyg5YWl5biD5bCU5YC8XFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIOa4hemZpChsaXN0KSB7XFxuICAgICAgICAgICAgaWYgKHRoaXMuaXNOdWxsKGxpc3QpKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAobGlzdC5jb25zdHJ1Y3RvciA9PSBTdHJpbmcpIHtcXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmuIXpmaTmiqXplJk66K+35Lyg5YiX6KGoXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRoaXMuY2xlYXJzID0gbGlzdDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDlhajmuIUobGlzdCkge1xcbiAgICAgICAgICAgIGlmICh0aGlzLmlzTnVsbChsaXN0KSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGMgPSB0aGlzLmNsZWFyYWxsO1xcbiAgICAgICAgICAgIGxpc3QgPSBjLmNvbmNhdChsaXN0KTtcXG4gICAgICAgICAgICB0aGlzLmNsZWFyYWxsID0gbGlzdDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDmupDnoIEoaW5wdXQpIHtcXG4gICAgICAgICAgICB0aGlzLmh0bWwgPSBpbnB1dDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDnlYzpnaIoaW5wdXQpIHtcXG4gICAgICAgICAgICB0aGlzLmxheW91dCA9IGlucHV0O1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgfSxcXG4gICAgICAgIOmhteeggShpbnB1dCkge1xcbiAgICAgICAgICAgIHRoaXMucGFnZSA9IGlucHV0O1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgfSxcXG4gICAgICAgIOeKtuaAgShpbnB1dCkge1xcbiAgICAgICAgICAgIHRoaXMuc3RhdGUgPSBpbnB1dDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDlvIDlkK/mkJzntKIoaW5wdXQpIHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gdW5kZWZpbmVkKSB7XFxuICAgICAgICAgICAgICAgIGlucHV0ID0gdHJ1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdGhpcy5zZWFyY2ggPSBpbnB1dDtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgICAgIH0sXFxuICAgICAgICDlvIDlkK/mipjlj6AoaW5wdXQpIHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gdW5kZWZpbmVkKSB7XFxuICAgICAgICAgICAgICAgIGlucHV0ID0gdHJ1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdGhpcy5pc0Jvb2xlYW4oaW5wdXQpO1xcbiAgICAgICAgICAgIHRoaXMub3BlbiA9IGlucHV0O1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xcbiAgICAgICAgfSxcXG4gICAgICAgIHNldFRpdGxlKGssIGksIHQpIHtcXG4gICAgICAgICAgICByZXR1cm4gayA9PSBpID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0LmZvbnRjb2xvcih0aGlzLuWIhuexu+minOiJsikgOiB0O1xcbiAgICAgICAgfSxcXG4gICAgICAgIGFjdGlvbihvYmopIHtcXG4gICAgICAgICAgICByZXR1cm4gW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmuIXpmaTnirbmgIFcXFwiLFxcbiAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygob2JqKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsb2cob2JqKTtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIob2JqLnN0YXRlKTtcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoXFxcImhlYWQuY2F0ZVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignY2F0ZV9idXR0b24nKTtcXG4gICAgICAgICAgICAgICAgICAgIG9iai5hbGwuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIG9iai5jbC5mb3JFYWNoKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcihpdGVtKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgfSwgb2JqKSxcXG4gICAgICAgICAgICB9LCBdO1xcbiAgICAgICAgfSxcXG4gICAgICAgIGNoZWNrUGFyYW0oKSB7XFxuICAgICAgICAgICAgdmFyIG9iaiA9IHt9O1xcbiAgICAgICAgICAgIGlmICh0aGlzLnBhZ2UgPT0gMCAmJiB0eXBlb2YgcGFnZSA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpemhteeggVxcXCIpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcGFnZSA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLpobXnoIFcXFwiXSA9IHRoaXMucGFnZTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIG9ialtcXFwi6aG156CBXFxcIl0gPSBwYWdlO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh0aGlzLmh0bWwgPT0gXFxcImVtcHR5XFxcIiAmJiB0eXBlb2YgaHRtbCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpea6kOeggVxcXCIpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaHRtbCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLmupDnoIFcXFwiXSA9IHRoaXMuaHRtbDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIG9ialtcXFwi5rqQ56CBXFxcIl0gPSBodG1sO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh0aGlzLmxheW91dCA9PSBcXFwidW5kZWZpbmVkXFxcIiAmJiB0eXBlb2YgZCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpeeVjOmdolxcXCIpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZCA9PSBcXFwidW5kZWZpbmVkXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLnlYzpnaJcXFwiXSA9IHRoaXMubGF5b3V0O1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW1xcXCLnlYzpnaJcXFwiXSA9IGQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIG9iajtcXG4gICAgICAgIH0sXFxuICAgICAgICDliJvlu7rliqjmgIHliIbnsbsocnVsZU9iaikge1xcbiAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgIGxldCBjYXRlcyA9IFtdO1xcbiAgICAgICAgICAgIGlmIChydWxlT2JqID09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgICAgICBydWxlT2JqID0gW107XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8v5Yid5aeL5YyW5Y+Y6YeP5byA5aeLXFxuICAgICAgICAgICAgY29uc3QgcGFyYW0gPSB0aGlzLmNoZWNrUGFyYW0oKTtcXG4gICAgICAgICAgICBjb25zdCBwYWdlID0gcGFyYW0u6aG156CBO1xcbiAgICAgICAgICAgIGNvbnN0IGh0bWwgPSBwYXJhbS7mupDnoIE7XFxuICA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ZX1JVTEUudGl0bGUgKyBcXFwiJnM9JytpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5pCc57Si5YWz6ZSu6K+NXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKFxcXCJrZXl3b3JkXFxcIiwgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImtleXdvcmRcXFwiLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgY29uc3QgY2F0ZWdvcmllcyA9IFtdO1xcbiAgICAgICAgICAgIHJ1bGVPYmouZm9yRWFjaCgoeCkgPT4ge1xcbiAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IFtdO1xcbiAgICAgICAgICAgICAgICAvL2xvZyh4KVxcbiAgICAgICAgICAgICAgICBpZiAoeC5qc29uICE9IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgICAgICAgICAgeC5qc29uLm1hcChrID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2goSlNPTi5zdHJpbmdpZnkoaykucmVwbGFjZSgvXlxcXFxbfFxcXFxdJC9nLCAnJykpXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgLy9jYXRlZ29yaWVzLnB1c2goeC5qc29uKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmICh4LuS4gOe6p+WumuS9jSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHgu5LiA57qn5a6a5L2NLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSB0aGlzLmV2YWxKU1J1bGUoaHRtbCwgeC7kuIDnuqflrprkvY0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0ID0gcGRmYShodG1sLCB4LuS4gOe6p+WumuS9jSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKHgu5aSn57G75a6a5L2NKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoeC7lpKfnsbvlrprkvY0uc3RhcnRzV2l0aChcXFwiQGpzOlxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IHRoaXMuZXZhbEpTUnVsZShodG1sLCB4LuWkp+exu+WumuS9jSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBbcGRmYShodG1sLCB4LuWkp+exu+WumuS9jSkuam9pbignXFxcXG4nKV07XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG5cXG5cXG4gICAgICAgIHZhciDkuIDnuqcgPSBsaXN0Lm1hcCgocykgPT4ge1xcbiAgICAgICAgICB2YXIgc2xpc3QgPSBbXTtcXG4gICAgICAgICAgaWYgKCEoXFxcIuWwj+exu1xcXCIgaW4geCkpIHtcXG4gICAgICAgICAgICB4LuWwj+exuyA9IFxcXCJib2R5JiZhOm5vdCg6bWF0Y2hlcyjpppbpobUpKTpub3QoYTpub3QoW2hyZWZdKSlcXFwiO1xcbiAgICAgICAgICB9XFxuICAgICAgICAgIGlmICh4LuWwj+exuy5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICBzbGlzdCA9IHRoaXMuZXZhbEpTUnVsZShzLCB4LuWwj+exuyk7XFxuICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgc2xpc3QgPSBwZGZhKHMsIHgu5bCP57G7KTtcXG4gICAgICAgICAgfVxcbiAgICAgICAgICAvLy0t6aKd5aSW5aSE55CGLS1cXG4gICAgICAgICAgaWYgKCgn5aKe5YqgJyBpbiB4KSkge1xcbiAgICAgICAgICAgIGlmICh4LuWinuWKoC5jb25zdHJ1Y3RvciA9PSBTdHJpbmcpIHtcXG4gICAgICAgICAgICAgIHgu5aKe5YqgID0gZXZhbCh4LuWinuWKoCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHNsaXN0ID0geC7lop7liqAuY29uY2F0KHNsaXN0KTtcXG4gICAgICAgICAgfVxcbiAgICAgICAgICBpZiAoKCfooaXlhYUnIGluIHgpKSB7XFxuICAgICAgICAgICAgaWYgKHgu6KGl5YWFLmNvbnN0cnVjdG9yID09IFN0cmluZykge1xcbiAgICAgICAgICAgICAgeC7ooaXlhYUgPSBldmFsKHgu6KGl5YWFKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgc2xpc3QgPSBzbGlzdC5jb25jYXQoeC7ooaXlhYUpO1xcbiAgICAgICAgICB9XFxuICAgICAgICAgIC8vLS3pop3lpJblpITnkIYtLVxcbiAgICAgICAgICB2YXIg5a6a5L2NID0gc2xpc3QubWFwKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCB4Luagh+mimCk7XFxuICAgICAgICAgICAgdmFyIHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIHgpO1xcbiAgICAgICAgICAgIHZhciBvYmogPSB7XFxuICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICBpZiAoKCdleHQnIGluIHgpKSB7XFxuICAgICAgICAgICAgICBvYmpbJ2V4dCddID0geC5leHQ7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShvYmopO1xcbiAgICAgICAgICB9KTtcXG4gICAgICAgICAgcmV0dXJuIOWumuS9jTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAvL2xvZyjkuIDnuqcpXFxuICAgICAgICAgICAgICAgIC8vbG9nKOS4gOe6py5sZW5ndGgpXFxuICAgICAgICAgICAgICAgIGlmICjkuIDnuqcubGVuZ3RoID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNhdGVnb3JpZXMucHVzaCjkuIDnuqcuam9pbihcXFwiXFxcXG5cXFwiKSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICDkuIDnuqcuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVnb3JpZXMucHVzaChpdGVtLmpvaW4oXFxcIixcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL2xvZyhjYXRlZ29yaWVzKVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGlmICjmipjlj6DnirbmgIEpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGZvbGQgPT09IFxcXCIxXFxcIiA/IOaKmOWPoCA6IOWxleW8gCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aXRsZSwgZm9sZCwgdSwgYWxsLCBleHBzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZCA9IGdldE15VmFyKE1ZX1JVTEUuZ3JvdXAsIGZvbGQpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIFvlsZXlvIAsIOaKmOWPoF0gPSBleHBzO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZvbGQgPT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjeCA9IGZpbmRJdGVtc0J5Q2xzKHRpdGxlICsgJ2NhdGVfYnV0dG9uJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2NhdGVfYnV0dG9uJywgY3gpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyh0aXRsZSArICdjYXRlX2J1dHRvbicpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3ggPSBzdG9yYWdlMC5nZXRNeVZhcignY2F0ZV9idXR0b24nLCBbXSkubWFwKHggPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4Wydjb2xfdHlwZSddID0geFsnY29sX3R5cGUnXSA/IHhbJ2NvbF90eXBlJ10gOiB4Wyd0eXBlJ107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcih0aXRsZSArICdjYXRlX2xpbmUnLCBjeClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qYWxsLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcihpdGVtKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOyovXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHRpdGxlICsgJ2NhdGVfZXhwJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBmb2xkID09IDEgPyDlsZXlvIAgOiDmipjlj6AsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoTVlfUlVMRS5ncm91cCwgZm9sZCA9PT0gXFxcIjFcXFwiID8gXFxcIjBcXFwiIDogXFxcIjFcXFwiKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTVlfUlVMRS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9sZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAg54q25oCBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICDlhajmuIUsIFvlsZXlvIAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDmipjlj6BcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICApLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX1JVTEUudGl0bGUgKyAnY2F0ZV9leHAnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IHRoaXMuYWN0aW9uKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlOiDnirbmgIEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGw6IOWFqOa4hSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsOiDmuIXpmaQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGNhdGVnb3JpZXMuZm9yRWFjaCgoY2F0ZWdvcnksIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhjYXRlZ29yeSlcXG4gICAgICAgICAgICAgICAgICAgIGxldCBzdWJfY2F0ZWdvcmllcyA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgLyppZiAo5bCP57G75a6a5L2NLmluY2x1ZGVzKFxcXCI7XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSBwZGZhKGNhdGVnb3J5LCDlsI/nsbvlrprkvY0uc3BsaXQoXFxcIjtcXFwiKVswXSk7XFxuICAgICAgICAgICAgICAgICAgICAgIGlmIChzdWJfY2F0ZWdvcmllcy5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NLnNwbGl0KFxcXCI7XFxcIilbMV0pO1xcbiAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyovXFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhpbmRleClcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzID0gSlNPTi5wYXJzZShgWyR7Y2F0ZWdvcnl9XWApO1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coc3ViX2NhdGVnb3JpZXMpXFxuICAgICAgICAgICAgICAgICAgICAvLyBzdWJfY2F0ZWdvcmllcyA9IHBkZmEoY2F0ZWdvcnksIOWwj+exu+WumuS9jSk7XFxuICAgICAgICAgICAgICAgICAgICAvL31cXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5aSn57G7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbGV0IHRpdGxlID0gcGRmaChpdGVtLCBf5aSn57G75qCH6aKYKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gaXRlbS50aXRsZTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiDmjpLpmaQgIT0gXFxcInVuZGVmaW5lZFxcXCIgJiYg5o6S6ZmkICE9IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IHRpdGxlLnJlcGxhY2UobmV3UmVnRXhwKOaOkumZpCwgXFxcImdcXFwiKSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBqc29uID0gJydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IGl0ZW0udXJsO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyYW1zID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhcnM6IOa4hemZpCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb246IGpzb24sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZTog54q25oCBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsY2xlYXJzOiDlhajmuIUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbGV0IHVybCA9IHBkKGl0ZW0sIF/lpKfnsbvpk77mjqUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaXRlbS51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qaWYgKOWkp+exu+WkhOeQhikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IOS4gOe6p+WIhuexu+WkhOeQhih1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2codXJsKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aGlzLnNldFRpdGxlKGtleS50b1N0cmluZygpLCBjYXRlX3RlbXBbaW5kZXhdLCB0aXRsZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2xlYXJzLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuYWxsY2xlYXJzLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdjYXRlX2J1dHRvbicpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJoZWFkLmNhdGVcXFwiLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmpzb24uY29uc3RydWN0b3IgPT09IE9iamVjdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImR0X1xcXCIgKyBwYXJhbXMuanNvbi50eXBlLCBwYXJhbXMuanNvbi52YWx1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMuc3RhdGUsIHBhcmFtcy5qc29uKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBNWV9SVUxFLnRpdGxlICsgJ2NhdGVfbGluZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/lsI/nsbtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGV4dHJhcG9zID0gZmFsc2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qaWYgKGl0ZW0uaW5jbHVkZXMoJ3R5cGU9XFxcIkBleHRyYVxcXCInKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhcG9zID0gdHJ1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZygn6ZmE5Yqg5a6a5L2NJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSovXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleHRyYXBvcykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gcGRmaChpdGVtLCBcXFwiYSYmVGV4dFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiDmjpLpmaQgIT0gXFxcInVuZGVmaW5lZFxcXCIgJiYg5o6S6ZmkICE9IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIganNvbiA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBwZGZoKGl0ZW0sIFxcXCJhJiZzdGF0ZVxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwZGZoKGl0ZW0sIFxcXCJhJiZ2YWx1ZVxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gaXRlbS50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yg5o6S6ZmkICE9IFxcXCJ1bmRlZmluZWRcXFwiICYmIOaOkumZpCAhPSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcImdcXFwiKSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGpzb24gPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qc3dpdGNoICh0cnVlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2Ug5YiG57G76ZO+5o6lLmluY2x1ZGVzKFxcXCJAQEBcXFwiKTpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogcGRmaChpdGVtLCDliIbnsbvpk77mjqUuc3BsaXQoXFxcIkBAQFxcXCIpWzBdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwZGZoKGl0ZW0sIOWIhuexu+mTvuaOpS5zcGxpdChcXFwiQEBAXFxcIilbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2Ug5YiG57G76ZO+5o6lLmluY2x1ZGVzKFxcXCJAQFxcXCIpOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiDliIbnsbvpk77mjqUuc3BsaXQoXFxcIkBAXFxcIilbMF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogcGRmaChpdGVtLCDliIbnsbvpk77mjqUuc3BsaXQoXFxcIkBAXFxcIilbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IGl0ZW0udXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGpzb24gPSBwZChpdGVtLCDliIbnsbvpk77mjqUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSovXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0gaXRlbS51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKnZhciBqc29uPeWIhuexu+mTvuaOpS5pbmNsdWRlcygnQEBAJyk/e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTpwZGZoKGl0ZW0s5YiG57G76ZO+5o6lLnNwbGl0KCdAQEAnKVswXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTpwZGZoKGl0ZW0s5YiG57G76ZO+5o6lLnNwbGl0KCdAQEAnKVsxXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH06cGQoaXRlbSzliIbnsbvpk77mjqUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uPeWIhuexu+mTvuaOpS5pbmNsdWRlcygnQEAnKT97XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOuWIhuexu+mTvuaOpS5zcGxpdCgnQEAnKVswXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOnBkZmgoaXRlbSzliIbnsbvpk77mjqUuc3BsaXQoJ0BAJylbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OnBkKGl0ZW0s5YiG57G76ZO+5o6lKTsqL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJhbXMgPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb246IGpzb24sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZTog54q25oCBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsY2xlYXJzOiDlhajmuIUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRoaXMuc2V0VGl0bGUoa2V5LnRvU3RyaW5nKCksIGNhdGVfdGVtcFtpbmRleF0sIHRpdGxlKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChcXFwiaGlrZXI6Ly9lbXB0eVxcXCIgKyBcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5hbGxjbGVhcnMuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcihpdGVtKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ2NhdGVfYnV0dG9uJyk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImhlYWQuY2F0ZVxcXCIsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5qc29uLmNvbnN0cnVjdG9yID09PSBPYmplY3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJkdF9cXFwiICsgcGFyYW1zLmpzb24udHlwZSwgcGFyYW1zLmpzb24udmFsdWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnN0YXRlLCBwYXJhbXMuanNvbik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IE1ZX1JVTEUudGl0bGUgKyAnY2F0ZV9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IE1ZX1JVTEUudGl0bGUgKyAnY2F0ZV9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZm9sZCA9PT0gXFxcIjFcXFwiIHx8IOaKmOWPoOeKtuaAgSA9PSBmYWxzZSkge1xcbiAgICAgICAgICAgICAgICBpdGVtcyA9IGl0ZW1zLmNvbmNhdChjYXRlcyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChmb2xkID09PSBcXFwiMFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2NhdGVfYnV0dG9uJywgY2F0ZXMpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygc2V0UHJlUmVzdWx0ICE9ICd1bmRlZmluZWQnKSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zID0gZC5jb25jYXQoaXRlbXMpO1xcbiAgICAgICAgICAgICAgICAvL+a4heepuue7p+aJv+aVsOe7hFxcbiAgICAgICAgICAgICAgICBkLmxlbmd0aCA9IDA7XFxuICAgICAgICAgICAgICAgIHNldFByZVJlc3VsdChpdGVtcyk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaXRlbXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaChpdGVtKTtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LFxcbiAgICB9O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XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoKG5leHQgPT0gXFxcIlxcXCIgfHwgbmV4dCA9PSB1bmRlZmluZWQpICYmIHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgIG5leHQgPSB0cnVlX3VybDtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgLy9yZXN1bHQ9ZmFsc2U7XFxuICAgICAgICAgICAgbmV4dCA9IGdldE15VmFyKOeKtuaAgSk7XFxuICAgICAgICB9XFxuICAgICAgICAvL2xvZygnbCcrdHJ1ZV91cmwpXFxuICAgICAgICAvL2xvZygnbicrbmV4dClcXG4gICAgICAgIGlmIChwYWdlICE9IDEpIHtcXG4gICAgICAgICAgICBpZiAodHJ1ZV91cmwgPT0gbmV4dCAmJiAhcmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGZhbHNlO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRydWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcXG4gICAgICAgIC8vcHV0TXlWYXIo54q25oCBLCBuZXh0KTtcXG4gICAgfSxcXG4gICAgZ2V0QmFja0ltYWdlOiBmdW5jdGlvbihpbWd1cmwpIHtcXG4gICAgICAgIHZhciByZXN1bHQgPSBpbWd1cmw7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHJlc3VsdCA9IC91cmwoPzpcXFxccyspP1xcXFwoKC4qPylcXFxcKS9nXFxuICAgICAgICAgICAgICAgIC5leGVjKGltZ3VybClbMV1cXG4gICAgICAgICAgICAgICAgLnJlcGxhY2UoLygnfFxcXCJ8JnF1b3Q7KS9nbSwgXFxcIlxcXCIpO1xcbiAgICAgICAgfSBjYXRjaCB7fVxcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcXG4gICAgfSxcXG4gICAgaHR0cEhhbmRsZTogZnVuY3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uICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaW1nICsgcnVsZS5yZWY7XFxuICAgIH0sXFxuICAgIHVybEhhbmRsZTogZnVuY3Rpb24oaXRlbSwgcnVsZSkge1xcbiAgICAgICAgdmFyIGhyZWYgPSBcXFwiXFxcIjtcXG4gICAgICAgIGlmIChydWxlLnVybC5zdGFydHNXaXRoKFxcXCJwZFxcXCIpKSB7XFxuICAgICAgICAgICAgaHJlZiA9IGV2YWwocnVsZS51cmwpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBocmVmID0gcGQoaXRlbSwgcnVsZS51cmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaHJlZiA9IHJ1bGUuaW10ID8gaHJlZiArIFxcXCIjaW1tZXJzaXZlVGhlbWUjXFxcIiA6IGhyZWY7XFxuICAgICAgICByZXR1cm4gaHJlZjtcXG4gICAgfSxcXG4gICAgc2V0Q29udGVudDogZnVuY3Rpb24oaXRlbSwgaW5wdXQpIHtcXG4gICAgICAgIGxldCBvdXRwdXQgPSBcXFwiXFxcIjtcXG4gICAgICAgIGlmIChpbnB1dCA9PSB1bmRlZmluZWQpIHtcXG4gICAgICAgICAgICByZXR1cm4gb3V0cHV0O1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGlucHV0LnN0YXJ0c1dpdGgoXFxcInBkXFxcIikpIHtcXG4gICAgICAgICAgICBvdXRwdXQgPSBldmFsKGlucHV0KTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgb3V0cHV0ID0gcGRmaChpdGVtLCBpbnB1dCk7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gb3V0cHV0O1xcbiAgICB9LFxcbiAgICByZWZyZXNoOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIGFkZExpc3RlbmVyKFxcbiAgICAgICAgICAgIFxcXCJvblJlZnJlc2hcXFwiLFxcbiAgICAgICAgICAgICQudG9TdHJpbmcoKHUpID0+IHtcXG4gICAgIC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S5pbWd9ICAtLS0+IOe7k+aenDogICR7b2JqLmltZ31gICtcXG4gICAgICAgICAgICAocnVsZS5jb250ZW50ICE9IHVuZGVmaW5lZCA/IGBcXFxcblxcXFx0Y29udGVudOWumuS9jTogICR7cnVsZS5jb250ZW50fSAgLS0tPiDnu5Pmnpw6ICAke29iai5jb250ZW50fWAgOiAnJykgK1xcbiAgICAgICAgICAgIGBcXFxcblxcXFx0dXJs5a6a5L2NOiAgJHtydWxlLnVybH0gIC0tLT4g57uT5p6cOiAgJHtvYmoudXJsfWBcXG4gICAgICAgICk7XFxuICAgICAgICBsb2coJy0tLS0tLS0tLS0nICsgKGkgKyAxKSArICc66LCD6K+V57uT5p2fLS0tLS0tLS0tLScpO1xcbiAgICB9LFxcbiAgICBqc29uTGlzdDogZnVuY3Rpb24oYXJyLCBqc29uLCBydWxlKSB7XFxuICAgICAgICBpZiAoanNvbi5jb25zdHJ1Y3RvciAhPSBPYmplY3QpIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBqc29uID0gSlNPTi5wYXJzZShqc29uKTtcXG4gICAgICAgICAgICB9IGNhdGNoIHt9XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoanNvbltydWxlLmxpc3RdID09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGFyci5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+PHNtYWxsPuaXoOWGheWuuTwvc21hbGw+PC9mb250PicsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge30sXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGRlYnVnID0gdGhpcy5nZXRCb29sZWFuVmFsdWUocnVsZS5kZWJ1ZywgZmFsc2UpO1xcbiAgICAgICAgdmFyIGVtcHR5ID0gdGhpcy5nZXRCb29sZWFuVmFsdWUocnVsZS5lbXB0eSk7XFxuICAgICAgICBpZiAoZGVidWcpIHtcXG4gICAgICAgICAgICBsb2coJ+WumuS9jeWIl+ihqDonICsgcnVsZS5saXN0KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGpzb25bcnVsZS5saXN0XS5mb3JFYWNoKChpdGVtLCBpKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gZXZhbChydWxlLnRpdGxlKTtcXG4gICAgICAgICAgICB2YXIgZGVzYyA9IGV2YWwocnVsZS5kZXNjKTtcXG4gICAgICAgICAgICB2YXIgY29udGVudCA9IGV2YWwocnVsZS5jb250ZW50KTtcXG4gICAgICAgICAgICB2YXIgaW1nID0gZXZhbChydWxlLmltZykgKyBydWxlLnJlZjtcXG4gICAgICAgICAgICB2YXIgaHJlZiA9IGV2YWwocnVsZS51cmwpO1xcbiAgICAgICAgICAgIHZhciB1cmwgPSBydWxlLmltdCA/IGhyZWYgKyBcXFwiI2ltbWVyc2l2ZVRoZW1lI1xcXCIgOiBocmVmO1xcbiAgICAgICAgICAgIHZhciBsYXp5ID0gcnVsZS5sYXp5ID8gcnVsZS5sYXp5IDogXFxcIlxcXCI7XFxuXFxuICAgICAgICAgICAgdmFyIGRkID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IGNvbnRlbnQsXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IGltZyxcXG4gICAgICAgICAgICAgICAgdXJsOiAoZW1wdHkgPyBcXFwiaGlrZXI6Ly9lbXB0eSMjXFxcIiA6ICcnKSArIHVybCxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IHJ1bGUuY29sX3R5cGUsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB9O1xcblxcbiAgICAgICAgICAgIGlmIChkZWJ1Zykge1xcbiAgICAgICAgICAgICAgICB2YXIgcnggPSB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICBpbWcsXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIHRoaXMuZGVidWdsb2coaSwgaXRlbSwgcnVsZSwgcngpO1xcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICBpZiAobGF6eSAhPSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICBkZFtcXFwidXJsXFxcIl0gPSBocmVmICsgbGF6eTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgYXJyLnB1c2goZGQpO1xcbiAgICAgICAgfSk7XFxuICAgIH0sXFxuICAgIHJ1bGVMaXN0OiBmdW5jdGlvbihhcnIsIGh0bWwsIHJ1bGUpIHtcXG4gICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLFxcbiAgICAgICAgICAgIHJ1bGUubGlzdCk7XFxuICAgICAgICB2YXIgZGVidWcgPSB0aGlzLmdldEJvb2xlYW5WYWx1ZShydWxlLmRlYnVnLFxcbiAgICAgICAgICAgIGZhbHNlKTtcXG4gICAgICAgIHZhciBlbXB0eSA9IHRoaXMuZ2V0Qm9vbGVhblZhbHVlKHJ1bGUuZW1wdHkpO1xcbiAgICAgICAgaWYgKGRlYnVnKSB7XFxuICAgICAgICAgICAgbG9nKCflrprkvY3liJfooag6JyArIHJ1bGUubGlzdCk7XFxuICAgICAgICB9XFxuICAgICAgICBsaXN0LmZvckVhY2goKGl0ZW0sIGkpID0+IHtcXG4gICAgICAgICAgICB2YXIgdGl0bGUgPSB0aGlzLnNldENvbnRlbnQoaXRlbSwgcnVsZS50aXRsZSk7XFxuICAgICAgICAgICAgdmFyIGRlc2MgPSB0aGlzLnNldENvbnRlbnQoaXRlbSwgcnVsZS5kZXNjKTtcXG4gICAgICAgICAgICB2YXIgZGVzYzEgPSB0aGlzLnNldENvbnRlbnQoaXRlbSwgcnVsZS5kZXNjMSk7XFxuICAgICAgICAgICAgdmFyIGRlc2MyID0gdGhpcy5zZXRDb250ZW50KGl0ZW0sIHJ1bGUuZGVzYzIpO1xcbiAgICAgICAgICAgIHZhciBpbWcgPSB0aGlzLmltZ0hhbmRsZShpdGVtLCBydWxlKTtcXG4gICAgICAgICAgICB2YXIgdXJsID0gdGhpcy51cmxIYW5kbGUoaXRlbSwgcnVsZSk7XFxuICAgICAgICAgICAgdmFyIGNvbnRlbnQgPSB0aGlzLnNldENvbnRlbnQoaXRlbSwgcnVsZS5jb250ZW50KTtcXG5cXG4gICAgICAgICAgICBpZiAoZGVidWcpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHJ4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nLFxcbiAgICAgICAgICAgICAgICAgICAgY29udGVudCxcXG4gICAgICAgICAgICAgICAgICAgIHVybFxcbiAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICB0aGlzLmRlYnVnbG9nKGksIGl0ZW0sIHJ1bGUsIHJ4KTtcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgdmFyIGxhenkgPSBydWxlLmxhenkgPyBydWxlLmxhenkgOiBcXFwiXFxcIjtcXG4gICAgICAgICAgICB2YXIgZGQgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzYzEgKyBcXFwiXFxcXHRcXFxcdFxcXFx0XFxcXHRcXFwiICsgZGVzYyxcXG4gICAgICAgICAgICAgICAgcGljX3VybDogaW1nLFxcbiAgICAgICAgICAgICAgICB1cmw6IChlbXB0eSA/IFxcXCJoaWtlcjovL2VtcHR5IyNcXFwiIDogJycpICsgdXJsICsgJ0BydWxlPWpzOiQucmVxdWlyZShcXFwiZWpcXFwiKScsXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IGNvbnRlbnQsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBydWxlLmNvbF90eXBlLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICBpZiAobGF6eSAhPSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICBkZFtcXFwidXJsXFxcIl0gPSB1cmwgKyBsYXp5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhcnIucHVzaChkZCk7XFxuICAgICAgICB9KTtcXG4gICAgfSxcXG4gICAgTGlzdDogZnVuY3Rpb24oYXJyLCBodG1sLCBydWxlLCBwYXJhbSkge1xcbiAgICAgICAgcGFyYW0gPSBwYXJhbSA/IHBhcmFtIDoge307XFxuICAgICAgICB2YXIgYXV0byA9IHBhcmFtLmF1dG8gPyBwYXJhbS5hdXRvIDogZmFsc2U7XFxuICAgICAgICB2YXIgc2hvdyA9IHBhcmFtLnNob3cgPyBwYXJhbS5zaG93IDogZmFsc2U7XFxuICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgLy90aGlzLnNwYWdlLnNldCh0cnVlX3VybCk7XFxuICAgICAgICB9XFxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcXG4gICAgICAgIHZhciBkZWJ1ZyA9IHRoaXMuZ2V0Qm9vbGVhbl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oaXRlbSwgcnVsZS5jb250ZW50KTtcXG5cXG4gICAgICAgICAgICAgICAgaWYgKGRlYnVnKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcnggPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRlYnVnbG9nKGksIGl0ZW0sIHJ1bGUsIHJ4KTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBpZiAoaSA9PSBsaXN0Lmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlkID0gXFxcImxhc3RpZF9cXFwiICsgcGFnZTtcXG4gICAgICAgICAgICAgICAgICAgIGNscyA9IFxcXCJsYXN0bWFya1xcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpbWcsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IChlbXB0eSA/IFxcXCJoaWtlcjovL2VtcHR5IyNcXFwiIDogJycpICsgdXJsICsgJz9wYWdlPWZ5cGFnZUBydWxlPWpzOiQucmVxdWlyZShcXFwieWpcXFwiKScsXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBjb250ZW50LFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IHJ1bGUuY29sX3R5cGUsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGNscyxcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBpZiAoaSA9PSBsaXN0Lmxlbmd0aCAtIDEgJiYgc2hvdykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcXFwicGFnZWxpbmVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLigJzigJzigJ3igJ08c21hbGw+5Yqg6L295LitLi4uPC9zbWFsbD5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJwYWdlbnVtXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdXBkYXRlSXRlbShcXFwicGFnZW51bVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+PHNtYWxsPuWIsOW6leS6hjwvc21hbGw+PC9mb250PicsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJsYXN0XFxcIixcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4vKlxcbiAgICAgICAgaWYgKGxpc3QubGVuZ3RoID09IDAgJiYgcGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lXFxcIixcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxmb250IGNvbG9yPVxcXCJncmV5XFxcIj48c21hbGw+5peg5YaF5a65PC9zbWFsbD48L2ZvbnQ+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7fSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0qL1xcbiAgICAgICAgaWYgKHRoaXMubmV4dFBhZ2UoKSkge1xcbiAgICAgICAgICAgIC8vbG9nKCd0Jyk7XFxuICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ3lpX2lzbmV4dCcsICd0Jyk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIC8vbG9nKCdmJyk7XFxuICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ3lpX2lzbmV4dCcsICdmJyk7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoYXV0bykge1xcbiAgICAgICAgICAgIC8vY3JlYXRlTmV4dFBhZ2UoKTtcXG4gICAgICAgICAgICBhdXRvUGFnZSgpO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbn07XFxuXFxudmFyIGV4dE1ldGhvZCA9IHtcXG4gICAgVG9QYXJhbXM6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgdmFyIGpzb24gPSBhcmd1bWVudHNbMF07XFxuICAgICAgICByZXR1cm4gT2JqZWN0LmtleXMoanNvbilcXG4gICAgICAgICAgICAubWFwKChrZXkpID0+IGtleSArIFxcXCI9XFxcIiArIGpzb25ba2V5XSlcXG4gICAgICAgICAgICAuam9pbihcXFwiJlxcXCIpO1xcbiAgICB9LFxcbiAgICB1cmxQYXJzZTogZnVuY3Rpb24odSkge1xcbiAgICAgICAgdmFyIGRpY3QgPSB7fTtcXG4gICAgICAgIGRpY3QuU291cmNlID0gdTtcXG4gICAgICAgIGxldCBwYXJhbXMgPSAodXJsKSA9PiB7XFxuICAgICAgICAgICAgbGV0IHF1ZXJ5UGFyYW1zID0ge307XFxuICAgICAgICAgICAgbGV0IHJlZyA9IC8oW14/PSZdKyk9KFtePz0mXSspL2c7XFxuICAgICAgICAgICAgdXJsLnJlcGxhY2UocmVnLCBmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgcXVlcnlQYXJhbXNbYXJndW1lbnRzWzFdXSA9IGFyZ3VtZW50c1syXTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXR1cm4gcXVlcnlQYXJhbXM7XFxuICAgICAgICB9O1xcbiAgICAgICAgdmFyIGphdmFVcmwgPSBKYXZhSW1wb3J0ZXIoamF2YS5uZXQuVVJMKTtcXG4gICAgICAgIHdpdGgoamF2YVVybCkge1xcbiAgICAgICAgIC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9yIChsZXQgaSA9IDA7IGkgPCBzdHIyLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgaWYgKHN0cjFbaV0gIT09IHN0cjJbaV0pIHtcXG4gICAgICAgICAgICAgICAgZGlmZkNoYXJzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGksXFxuICAgICAgICAgICAgICAgICAgICBzMTogc3RyMVtpXSxcXG4gICAgICAgICAgICAgICAgICAgIHMyOiBzdHIyW2ldLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZGlmZkNoYXJzO1xcbiAgICB9LFxcbiAgICByZXBsYWNlQ2hhckF0OiBmdW5jdGlvbihzdHIsIGluZGV4LCByZXBsYWNlbWVudCkge1xcbiAgICAgICAgaWYgKGluZGV4IDwgMCB8fCBpbmRleCA+PSBzdHIubGVuZ3RoKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHN0cjtcXG4gICAgICAgIH1cXG4gICAgICAgIC8vbG9nKGluZGV4KVxcbiAgICAgICAgY29uc3QgYXJyID0gc3RyLnNwbGl0KFxcXCJcXFwiKTtcXG4gICAgICAgIGFycltpbmRleF0gPSByZXBsYWNlbWVudDtcXG4gICAgICAgIHJldHVybiBhcnIuam9pbihcXFwiXFxcIik7XFxuICAgIH0sXFxuICAgIGdldE9iamVjdEtleXNEaWZmOiBmdW5jdGlvbihvYmoxLCBvYmoyKSB7XFxuICAgICAgICBjb25zdCBkaWZmZXJlbnRLZXlzID0gW107XFxuICAgICAgICBmb3IgKGxldCBrZXkgaW4gb2JqMSkge1xcbiAgICAgICAgICAgIGlmICghb2JqMi5oYXNPd25Qcm9wZXJ0eShrZXkpIHx8IG9iajFba2V5XSAhPT0gb2JqMltrZXldKSB7XFxuICAgICAgICAgICAgICAgIGRpZmZlcmVudEtleXMucHVzaChrZXkpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAg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xdWFsKHUxLlBhcmFtcywgdTIuUGFyYW1zKSkge1xcbiAgICAgICAgICAgICAgICBpZiAoZHRfZGVidWcpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyh1MS5QYXRoKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyh1Mi5QYXRoKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB2YXIgZGYgPSB0aGlzLmZpbmREaWZmZXJlbnRJbmRleChTdHJpbmcodTEuUGF0aCksIFN0cmluZyh1Mi5QYXRoKSk7XFxuICAgICAgICAgICAgICAgIGlmIChkdF9kZWJ1Zykge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKGRmKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoZGYubGVuZ3RoID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciByZSA9IGRmWzBdLmluZGV4O1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGYgPSBkZi5maWx0ZXIoKHgpID0+IC9cXFxcZCsvLnRlc3QoeC5zMikpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlID0gZlswXS5pbmRleDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB2YXIgZXEgPSB0aGlzLnJlcGxhY2VDaGFyQXQoU3RyaW5nKHUyLlBhdGgpLCByZSwgXFxcImZ5cGFnZVxcXCIpO1xcbiAgICAgICAgICAgICAgICBuZXh0dXJsID0gdTIuSG9zdHMgKyBlcSArIGNhICsgdGhpcy5Ub1BhcmFtcyh1Mi5QYXJhbXMpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciBlcCA9IHRoaXMuZ2V0T2JqZWN0S2V5c0RpZmYodTEuUGFyYW1zLCB1Mi5QYXJhbXMpXFxuICAgICAgICAgICAgICAgIGlmIChlcC5sZW5ndGggPT0g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hdilcXG4gICAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgIHZhciBodG1sID0gZmV0Y2goYXYsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6ICdNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wKSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB9LHRpbWVvdXQ6MzAwMFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC9ldmFsLio/XFxcXG4vKVswXSlcXG4gICAgICAgICAgICAgICAgIHZhciBzb3VyY2UxOTIwID0gc291cmNlMTI4MC5yZXBsYWNlKFxcXCIxMjgweDcyMFxcXCIsXFxcIjE5MjB4MTA4MFxcXCIpXFxuICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IEpTT04ucGFyc2UoZmV0Y2goc291cmNlMTkyMCx7b25seUhlYWRlcnM6dHJ1ZSx0aW1lb3V0OjMwMDB9KSkuc3RhdHVzQ29kZTtcXG4gICAgICAgICAgICAgICAgIGlmKGNvZGUgIT09IDIwMCl7XFxuICAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlMTI4MCArICc7e1JlZmVyZXJAaHR0cHM6Ly90aGlzYXYuY29tfSdcXG59ZWxzZXtcXG4gICAgICAgICAgICAgICAgIHJldHVybiBzb3VyY2UxOTIwICsgJzt7UmVmZXJlckBodHRwczovL3RoaXNhdi5jb219J1xcbiAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICB9Y2F0Y2h7cmV0dXJuIFxcXCJ0b2FzdDovL+aMguair+aIluayoeacieatpOW9seeJh1xcXCJ9XFxuICAgICAgICAgICAgICAgICAgfSznlarlj7cpLFxcbiAgICBjb2xfdHlwZTogJ2ljb25fNScsXFxuICAgIGV4dHJhOiB7IGxvbmdDbGljazogW3t0aXRsZTogJ+afpeeci+e9keWdgCcsIGpzOiAkLnRvU3RyaW5nKCjnlarlj7cpPT57IHJldHVybiBcXFwiaHR0cHM6Ly90aGlzYXYuY29tL2NuL1xcXCIgKyDnlarlj7c7fSznlarlj7cpfV0gfVxcbn0pO1xcblxcbi8vTUlTU0FWXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICfigJjigJjigJnigJk8Yj48bWlkZGxlPjxmb250IGNvbG9yPVxcXCIjMDBGRjAwXFxcIj4gTUlTU0FWPC9mb250PjwvbWlkZGxlPicsXFxuICAgIHBpY191cmw6ICdodHRwczovL2NkbjEuaWNvbmZpbmRlci5jb20vZGF0YS9pY29ucy9mcnVpdHMtbi12ZWdldGFibGVzLWNvbG9yZWQtZ3JhZGllbnQvMTI4L2NhdWxpZmxvd2VyLTEyOC5wbmcnLFxcbiAgICB1cmw6ICQoJycpLmxhenlSdWxlKCjnlarlj7cpID0+IHtcXG4gICAgICAgdHJ5e1xcbiAgICAgICAgICAgICB2YXIgYXYgPSBcXFwiaHR0cHM6Ly9taXNzYXYudG8vc2VhcmNoL21vdmllL1xcXCIgKyDnlarlj7c7ICBcXG4gICAgICAgICAgICAgdmFyIHVybHMgPSBbXTsgICAgXFxuICAgICAgICAgICAgIHZhciBsaXN0ID0gcGRmYShmZXRjaChhdix7dGltZW91dDozMDAwfSksXFxcIi52aWRlb3MtbGlzdCYmYXJ0aWNsZVxcXCIpO1xcbiAgICAgICAgICAgIGZvcih2YXIgaiBpbiBsaXN0KXtcXG4gICAgICAgICAgICAgIHVybHMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHBkZmgobGlzdFtqXSxcXFwiYSYmaHJlZlxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIHBsYXlzID0gYmYodXJscykubWFwKGg9PmgubWF0Y2goL3NyYz1cXFwiKC4qPylcXFwiLylbMV0uc3BsaXQoXFxcIiZcXFwi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Sx0aW1lb3V0OjMwMDB9KSlcXG4vL2xvZyhidilcXG4gICAgICAgICAgICAgICAgIGlmKGJ2LnVybC5pbmNsdWRlcygnZXJyb3InKXx8YnYuc3RhdHVzQ29kZSAhPT0gMjAwKXsgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5oyC5qKv5oiW5rKh5pyJ5q2k5b2x54mHXFxcIlxcbiAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgIHJldHVybiBcXFwidmlkZW86Ly9cXFwiICsgYnYudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgIH0s55Wq5Y+3KSxcXG4gICAgY29sX3R5cGU6ICdpY29uXzUnLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICB2aWRlb0V4Y2x1ZGVSdWxlczogWydkb3BwaW9jZG4nXSxcXG4gICAgICAgICAgICAgICAgdmlkZW9FeGNsdWRlUnVsZXM6IFsnMjQwJ10sXFxuICAgICAgICAgICAgICAgIHZpZGVvRXhjbHVkZVJ1bGVzOiBbJzQ4MCddLFxcbiAgICAgICAgICAgICAgICBibG9ja1J1bGVzOiBbJy5kb3BwaW9jZG4uJ10sXFxuICAgICAgICAgICAgICAgIGJsb2NrUnVsZXM6IFsnZG1tLmNvLmpwJ10sXFxuICAgICAgICAgICAgICAgIC8vdmlkZW9SdWxlczogWycqbTN1OConXSxcXG4gICAgICAgICAgICAgICAgY2FjaGVNM3U4OiB0cnVlLFxcbiAgICAgICAgICAgICAgIGxvbmdDbGljazogW3t0aXRsZTogJ+afpeeci+e9keWdgCcsIGpzOiAkLnRvU3RyaW5nKCjnlarlj7cpPT57IHJldHVybiBcXFwiaHR0cHM6Ly93d3cuYXYwMS50di9cXFwiICsg55Wq5Y+3O30s55Wq5Y+3KX1dXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbn0pO1xcblxcbi8vSmFibGVcXG5kLn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AgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxtaWRkbGU+PGZvbnQgY29sb3I9I0ZGQTUwMD4nK3RpdGxlKyc8L2ZvbnQ+PC9taWRkbGU+JyxcXG4gICAgICAgIHVybDogTVlfVVJMLFxcbiAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcbiAgICAgICAgZXh0cmE6IHtsaW5lVmlzaWJsZTogZmFsc2V9XFxuICAgIH0pXFxufVxcblxcbnZhciDnlarlj7cgPSBwZGZoKGh0bWwsICdib2R5JiYuZmlyc3QtYmxvY2smJi52YWx1ZSYmVGV4dCcpO1xcblxcbnZhciBpbWcgPSBwZChodG1sLCcuY29sdW1uLXZpZGVvLWNvdmVyJiZpbWcmJnNyYycpO1xcbi8vdmFyIGltZyA9IE1ZX1BBUkFNUy5pbWc7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICAgdXJsOiBcXFwieDU6Ly9odHRwczovL3N1cGphdi5jb20vemgvP3M9XFxcIiArIOeVquWPtyxcXG4gICAgICAgICAgICAgY29sX3R5cGU6ICdwaWNfMV9mdWxsJyxcXG4gICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTpmYWxzZSxcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe3RpdGxlOiAnU3VwamF2JywganM6ICQudG9TdHJpbmcoKOeVquWPtyk9PnsgXFxub3BlbkFwcEludGVudCgnY29tLnl1amlhbi5SZXNpZGVNZW51RGVtbycsICdjbi55dWppYW4uTWFpbkFjdGl2aXR5Jywge2ludGVudERhdGE6ICdodHRwczovL3N1cGphdi5jb20vemgvP3M9JyArIOeVquWPt30pXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+iwg+eUqOmbqOingea1j+iniOWZqFxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgIH0s55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nsgcmV0dXJuIFxcXCJodHRwczovL3d3dy5nb29nbGUuY29tL3NlYXJjaD9xPVxcXCIgKyDnlarlj7c7fSznlarlj7cpfV1cXG4gICAgICAgICAgICAgfVxcbiAgICB9KTtcXG5cXG4vL+a8lOWRmFxcbnZhciBhcnRzID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCAnYm9keSYmLnBhbmVsLWJsb2NrOmNvbnRhaW5zKOa8lOWToTopJiZhJyk7XFxuaWYoYXJ0cy5sZW5ndGg+MCl7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICAgICB0aXRsZTogXFxcIua8lOWToTpcXFwiLFxcbiAgICAgICAgICAgdXJsOiAkKCcnKS5sYXp5UnVsZSgo55Wq5Y+3KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgIHZhciBhdiA9IFxcXCJodHRwczovL3RoaXNhdi5jb20vY24vXFxcIiArIOeVquWPtyArIFxcXCItdW5jZW5zb3JlZC1sZWFrXFxcIjsgXFxubG9nKGF2KVxcbiAgICAgICAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGZldGNoKGF2LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgJ1VzZXItQWdlbnQnOiAnTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMCknXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LHRpbWVvdXQ6MzAwMFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC9ldmFsLio/XFxcXG4vKVswXSlcXG4gICAgICAgICAgICAgICAgIHZhciBzb3VyY2UxOTIwID0gc291cmNlMTI4MC5yZXBsYWNlKFxcXCIxMjgweDcyMFxcXCIsXFxcIjE5MjB4MTA4MFxcXCIpXFxuICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IEpTT04ucGFyc2UoZmV0Y2goc291cmNlMTkyMCx7b25seUhlYWRlcnM6dHJ1ZSx0aW1lb3V0OjMwMDB9KSkuc3RhdHVzQ29kZTtcXG4gICAgICAgICAgICAgICAgIGlmKGNvZGUgIT09IDIwMCl7XFxuICAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlMTI4MCArICc7e1JlZmVyZXJAaHR0cHM6Ly90aGlzYXYuY29tfSdcXG59ZWxzZXtcXG4gICAgICAgICAgICAgICAgIHJldHVybiBzb3VyY2UxOTIwICsgJzt7UmVmZXJlckBodHRwczovL3RoaXNhdi5jb219J1xcbiAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICB9Y2F0Y2h7cmV0dXJuIFxcXCJ0b2FzdDovL+aMguair+aIluayoeacieaXoOeggeegtOino1xcXCJ9XFxuICAgICAgICAgICAgICAgICAgfSznlarlj7cpLFxcbiAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7dGl0bGU6ICfmn6XnnIvnvZHlnYAnLCBqczogJC50b1N0cmluZygo55Wq5Y+3KT0+eyByZXR1cm4gXFxcImh0dHBzOi8vdGhpc2F2LmNvbS9jbi9cXFwiICsg55Wq5Y+3ICsgXFxcIi11bmNlbnNvcmVkLWxlYWtcXFwiO30s55Wq5Y+3KX1dXFxuICAgICAgICAgICAgIH1cXG59KVxcbmZvciAodmFyIGkgaW4gYXJ0cykge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8Yj48bWlkZGxlPjxmb250IGNvbG9yPVxcXCIjYzEzMTQxXFxcIj4nK3BhcnNlRG9tRm9ySHRtbChhcnRzW2ldLCAnVGV4dCcpKyc8L2ZvbnQ+PC9taWRkbGU+PC9iPicsXFxuICAgICAgICB1cmw6IHBhcnNlRG9tKGFydHNbaV0sICdhJiZocmVmJykgKyAnP3BhZ2U9ZnlwYWdlQHJ1bGU9anM6JC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UveWpcXFwiKScsLy/pk77mjqVcXG4gICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsLy/nu4Tku7bmoLflvI9cXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgcGFnZVRpdGxlOiBwYXJzZURvbUZvckh0bWwoYXJ0c1tpXSwgJ1RleHQnKVxcbiAgICAgICAgfVxcbn0pXFxufVxcbmQucHVzaCh7XFxuY29sX3R5cGU6XFxcImJsYW5rX2Jsb2NrXFxcIlxcbn0pXFxufVxcblxcbi8v57G75YirXFxudmFyIGFydHMgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICdib2R5JiYucGFuZWwtYmxvY2s6Y29udGFpbnMo6aGe5YilKSYmYScpO1xcbmlmKGFydHMubGVuZ3RoPjApe1xcbiAgICBkLnB1c2goe1xcbiAgICAgICB0aXRsZTogXFxcIumhnuWIpTpcXFwiLFxcbiAgICB1cmw6ICQoJycpLmxhenlSdWxlKCjnlarlj7cpID0+IHtcXG4gICAgICAgICAgICAgICAgIHZhciBhdiA9IFxcXCJodHRwczovL25qYXYudHYvemgvdi9cXFwiICsg55Wq5Y+3ICsgXFxcIi11bmNlbnNvcmVkLWxlYWtlZFxcXCI7IFxcbi8vbG9nKGF2KVxcbiAgICAgICAgICAgICAgICAgdmFyIGNvZGUgPSBKU09OLnBhcnNlKGZldGNoKGF2LHtvbmx5SGVhZGVyczp0cnVlLHRpbWVvdXQ6MzAwMH0pKS5zdGF0dXNDb2RlXFxuICAgICAgICAgICAgICAgICBpZihjb2RlICE9PSAyMDApeyAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+aMguair+aIluayoeacieaXoOeggeegtOino1xcXCJcXG4gICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICByZXR1cm4gXFxc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gIGZ1bmN0aW9uIGdldEhlYXIodGl0bGUpIHtcXG4gICAgICAgIHJldHVybiAn4oCY4oCY4oCZ4oCZPHN0cm9uZz48Zm9udCBjb2xvcj1cXFwiJyArIENvbG9yMiArICdcXFwiPicgKyB0aXRsZSArICc8L2Zyb250Pjwvc3Ryb25nPic7XFxuICAgICAgICB9XFxuXFxuICAgIGZvciAodmFyIGkgaW4gdGFicykge1xcbiAgICAgICAgdmFyIHRhYm5hbWUgPSB0YWJzW2ldO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIodGFidXJsLCAnMCcpID09IGkgPyBnZXRIZWFkKHRhYm5hbWUpIDogZ2V0SGVhcih0YWJuYW1lKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHRhYm5hbWUsIHRhYnVybCwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcih0YWJ1cmwsIGkpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICB9LCB0YWJuYW1lLCB0YWJ1cmwsIGkpXFxuICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08bWlkZGxlPjxmb250IGNvbG9yPXJlZD7no4HlipvlkJsu566APC9mb250PjwvbWlkZGxlPicsXFxuICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9zb3U/cnVsZT3no4HlipvlkJsu566AJnA9ZnlwYWdlJnNlYXJjaFRlcm1zPVxcXCIgKyDnlarlj7csXFxuICAgICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiXFxuICAgICAgICB9KVxcbiAgICB9XFxuXFxudmFyIGxpc3RzID0gW107XFxuZnVuY3Rpb24gc2V0TGlzdHMobGlzdHMsIGluZGV4KSB7XFxuICAgIGZ1bmN0aW9uIHBsYXlMaXN0cygpIHtcXG4gICAgICAgaWYgKGluZGV4ID09IDApIHtcXG4vL+mihOiniOinhumikVxcbiAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxtaWRkbGU+PGZvbnQgY29sb3I9YmxhY2s+8J+TuumgkOimveimlumgu+KRoDwvZm9udD48L21pZGRsZT4nLFxcbiAgICAgICAgdXJsOiBNWV9VUkwgKyAkKCcnKS5sYXp5UnVsZSgo55Wq5Y+3KSA9PiB7XFxuICAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gcmVxdWVzdChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBwZGZoKGh0bWwsXFxcIi5tZXNzYWdlLWJvZHkmJnNvdXJjZSYmc3JjXFxcIilcXG4gICAgICAgICAgICAgICAgICAgaWYoICF1cmwuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpJiZ1cmwhPT1cXFwiXFxcIil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gXFxcImh0dHBzOlxcXCIgKyB1cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYodXJsPT1cXFwiXFxcIil7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5rKS5pyJ6aCQ6Ka95ZKvXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxcXG4gICAgICAgICAgICAgfWNhdGNoe3JldHVybiBcXFwidG9hc3Q6Ly/mspLmnInpoJDopr3lkq9cXFwifVxcbiAgICAgICAgICAgICAgICAgIH0s55Wq5Y+3KSxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF8yJyxcXG4gICAgICAgIGV4dHJhOiB7bGluZVZpc2libGU6IGZhbHNlfVxcbiAgICAgICAgICAgICAgICAgfSlcXG4gICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08bWlkZGxlPjxmb250IGNvbG9yPWJsYWNrPvCfk7rpoJDopr3oppbpoLvikaE8L2ZvbnQ+PC9taWRkbGU+JyxcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiICsgJCgnJykubGF6eVJ1bGUoKOeVquWPtykgPT4ge1xcbiAgICAgICAgICAgICB0cnl7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gXFxcImh0dHBzOi8vamF2c3VidGl0bGVkLmNvbS96aC9zZWFyY2g/a2V5d29yZHM9XFxcIiArIOeVquWPt1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvZGV1cmwgPSBcXFwiaHR0cHM6Ly9qYXZzdWJ0aXRsZWQuY29tL1xcXCIgKyBwZGZoKHJlcXVlc3Qoc2VhcmNoKSxcXFwiYm9keSYmLnZpZGVvYm94JiZhJiZocmVmXFxcIilcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwbGF5bGlzdCA9IGZldGNoKGNvZGV1cmwpLm1hdGNoKC9odHRwcz86XFxcXC9cXFxcL1xcXFxTK1xcXFwubTN1OC8pWzBdXFxuICAgICAgICAgICAgICAgICAgICB2YXIgcGxheWhkID0gZmV0Y2gocGxheWxpc3QpLm1hdGNoKC9bXlxcXCJcXFxcbl0rXFxcXC5tM3U4L2cpLnBvcCgpXFxuICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gcGxheWxpc3QucmVwbGFjZShcXFwicGxheWxpc3QubTN1OFxcXCIscGxheWhkKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybFxcbiAgICAgICAgICAgICB9Y2F0Y2h7cmV0dXJuIFxcXCJ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XG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtsaW5lVmlzaWJsZTpmYWxzZX1cXG4gICAgICAgICAgICAgICB9KVxcbiAgICAgICAgIH0pXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08c21hbGw+PGZvbnQgY29sb3I9IzEzQjY2QT7mm7TlpJrnn63oqZXlj6/miJDkuLpWSVDmiJboh7PlrpjmlrlBcHDkuK3mn6XnnIs8L2ZvbnQ+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKCjnlarlj7cpID0+IHsgICAgICAgICAgICAgICBcXG4gICAgICAgICBvcGVuQXBwSW50ZW50KCd4eHgucG9ybmh1Yi5mdWNrJywgJ3h4eC5wb3JuaHViLmZ1Y2suTWFpbkFjdGl2aXR5Jywge2ludGVudERhdGE6IOeVquWPt30pXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJjb3B5Oi8vXFxcIiArIOeVquWPt1xcbiAgICAgICAgICAgICAgICAgIH0s55Wq5Y+3KSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtsaW5lVmlzaWJsZTpmYWxzZX1cXG4gICAgICAgICAgICAgICB9KVxcbn1jYXRjaHt9XFxuICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgcGxheUxpc3RzKCkgICAgICAgIFxcbiAgICAgICAgICAgIH1cXG5cXG5zZXRUYWJzKHRhYnMsIE1ZX1VSTCk7XFxuc2V0TGlzdHMobGlzdHMsIGdldE15VmFyKE1ZX1VSTCwgJzAnKSk7XFxuXFxu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