Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥YaPan@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcInlzZnhcIixcInBhdGhcIjpcInlzZnhcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxubGV0IHJ1bGUgPSBnZXRQYXJhbShcXFwiclxcXCIpLnNwbGl0KFxcXCIjI1xcXCIpWzBdO1xcbmxldCB1cmwgPSBNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV07XFxubGV0IGl0ZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3VcXFwiKShydWxlLCBnZXRIb21lKHVybCkpO1xcbmxldCBqcyA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICB0cnkge1xcbiAgICAgICAgaWYgKGRvY3VtZW50LnRpdGxlICYmIGRvY3VtZW50LnRpdGxlLmxlbmd0aCkge1xcbiAgICAgICAgICAgIGxldCByID0gJCQkKCkubGF6eVJ1bGUoKHQpID0+IHtcXG4gICAgICAgICAgICAgICAgc2V0UGFnZVRpdGxlKHQpO1xcbiAgICAgICAgICAgIH0sIGRvY3VtZW50LnRpdGxlKTtcXG4gICAgICAgICAgICBmeV9icmlkZ2V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cXCJodHRwOi8vfGh0dHBzOi8vXFxcIiksIFxcXCJcXFwiKS5zcGxpdChcXFwiL1xcXCIpWzBdO1xcbiAgICAgICAgbGV0IGhvc3RzID0gaG9zdC5zcGxpdChcXFwiLlxcXCIpO1xcbiAgICAgICAgaWYgKGhvc3RzLmxlbmd0aCA+IDIpIHtcXG4gICAgICAgICAgICBob3N0ID0gaG9zdHNbaG9zdHMubGVuZ3RoIC0gMl0gKyBcXFwiLlxcXCIgKyBob3N0c1tob3N0cy5sZW5ndGggLSAxXTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpbnB1dC5zdGFydHNXaXRoKFxcXCJtYWduZXRcXFwiKSkge1xcbiAgICAgICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIua4qemmqOaPkOekulxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXCLmo4DmtYvliLDmlrDnmoTno4Hpk77lnLDlnYDvvIzngrnlh7vnoa7lrprmjInpkq7ljbPlj6/mkq3mlL7vvIzngrnlh7vlj5bmtojmjInpkq7lj6/ku6XlpI3liLbpk77mjqVcXFwiLFxcbiAgICAgICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYWc7XFxuICAgICAgICAgICAgICAgIH0sIGlucHV0KSxcXG4gICAgICAgICAgICAgICAgY2FuY2VsOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBtYWdcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcXG4gICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuaW5jbHVkZXMoXFxcImFsaXl1bmRyaXZlLmNvbVxcXCIpKSB7XFxuICAgICAgICAgICAgbG9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KeWRXeGxYQ0k2WENKcWN6cGNYRzVsZG1Gc0tHWmxkR05vS0Nkb2FXdGxjam92TDJacGJHVnpMM0oxYkdWekwybGplUzloYkdrdWFuTW5LU2s3WEZ4dVlXeHBMbWx1YVhSRGIyNW1hV2NvS1R0Y1hHNWhiR2t1YlhsQmJHbFNkV3hsS0NrN1hDSjlYU0lzSW1samIyNGlPaUpvZEhSd2N6b3ZMMmRwZEdWbExtTnZiUzltYkhreE16azNMMmhwYTJWeUxXbGplUzl5WVhjdmJXRnpkR1Z5TDJGc2FYbDFiaTV3Ym1jaWZRPT1cXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5rip6aao5o+Q56S6JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICfmnKzop4TliJnkvp3otZbkupHnm5jmsYflvbHop4TliJnvvIzngrnlh7vkuIvpnaLnmoTnoa7lrprmjInpkq7lr7zlhaXvvIzms6jmhI/lr7zlhaXlkI7kuIDlrpropoHlnKjkupHnm5jmsYflvbHnmbvlvZXpmL/ph4zkupHnm5jotKblj7fvvIzlkKbliJnkuI3og73nlKgnLFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlybTogcnUsXFxuICAgICAgICAgICAgICAgICAgICBjYW5jZWw6IHJ1XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxvZyhcXFwiaW5wdXRcXFwiKTtcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIumYv+mHjOS6keebmFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD1cXFwiICsgdXJsICsgJz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9IGVsc2UgaWYgKC9cXFxcLihtcDN8ZmxhY3xtNGEpJC8udGVzdChpbnB1dCkpIHtcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8odXJsKTtcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXG4gICAgICAgIH0gZWxzZSBpZiAoIWlucHV0LmluY2x1ZGVzKGhvc3QpICYmIGlucHV0LnN0YXJ0c1dpdGgoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZG91eWluXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJkb3ViYW5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIml4aWd1YS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImt1YWlzaG91XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJiaWxpYmlsaVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwid2VpYm9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIndlaXhpblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYmFpZHVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInptay5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInN1YmhkXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ0aHVuZGVyXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ4aW5qdWNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImdyYWI0a1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiL2J0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJqc3IxMFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYXNzcnRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInF1YXJrXFxcIlxcbiAgICAgICAgICAgICAgICBdO1xcbiAgICAgICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcbiAgICAgICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcbiAgICAgICAgICAgICAgICAgICAgLy/ot7PnvZHpobVcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLor6bmg4VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiIyNcXFwiICsgdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAvL0FJ6Kej5p6QXFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkb2N1bWVudC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvcD9ydWxlPVxcXCIgKyBydWxlICsgXFxcIiZyPVxcXCIgKyBydWxlICsgXFxcIiZ1PVxcXCIgKyBmeV9icmlkZ2VfYXBwLmJhc2U2NEVuY29kZSh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSk7XFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5zdGFydHNXaXRoKFxcXCJodHRwXFxcIikpIHtcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgICAgIC8v6IO95ZSk6LW3QVBQ55qE55m95ZCN5Y2VXFxuICAgICAgICAgICAgbGV0IHdoaXRlID0gW1xcbiAgICAgICAgICAgICAgICBcXFwicWtsaW5rXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcImJkbmV0ZGlza1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJ4dW5sZWlhcHBcXFwiXFxuICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5zdGFydHNXaXRoKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoIWluV2hpdGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXG4gICAgICAgICAgICAgICAgXFxcInVybD1cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiZnNvdS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiYmluZy5cXFwiLCAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICBdO1xcbiAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IGlucHV0LmluY2x1ZGVzKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCByZWcgPSBuZXcgUmVnRXhwKFxcXCJbXFxcXHU0ZTAwLVxcXFx1OWZhNV0rXFxcIiwgXFxcImdcXFwiKTtcXG4gICAgICAgICAgICBsZXQgciA9IGRlY29kZVVSSUNvbXBvbmVudChpbnB1dCk7XFxuICAgICAgICAgICAgaWYgKHJlZy50ZXN0KHIpIHx8IChpbnB1dC5zdGFydHNXaXRoKG9yaWdpbikgJiYgaW5wdXQubGVuZ3RoIC0gb3JpZ2luLmxlbmd0aCA+IDIpKSB7XFxuICAgICAgICAgICAgICAgIC8v5pyJ5Lit5paH77yM5bqU6K+l5piv5Zyo5pCc57Si77yM6Lez5paw6aG16Z2iXFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLor6bmg4VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArI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iAoZG9jdW1lbnQudGl0bGUgJiYgZG9jdW1lbnQudGl0bGUubGVuZ3RoKSB7XFxuICAgICAgICAgICAgICAgIGxldCByID0gJCQkKCkubGF6eVJ1bGUoKHQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSh0KTtcXG4gICAgICAgICAgICAgICAgfSwgZG9jdW1lbnQudGl0bGUpO1xcbiAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLnBhcnNlTGF6eVJ1bGUocik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAubG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBsZXQganMyID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UveDVhaVxcXCIpKGdldFBhcmFtKFxcXCJyXFxcIiksIHVybCk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBqczoganMgKyBcXFwiO1xcXFxuXFxcIiArIGpzMixcXG4gICAgICAgICAgICB1cmxJbnRlcmNlcHRvcjogaXRlLFxcbiAgICAgICAgICAgIGNhbkJhY2s6IHRydWUsXFxuICAgICAgICAgICAgZmxvYXRWaWRlbzogdHJ1ZSxcXG4gICAgICAgICAgICBqc0xvYWRpbmdJbmplY3Q6IHRydWVcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiLFxc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aXQgPT0gbnVsbCB8fCBpdC50ZXh0ID09IG51bGwpIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0ID0gaXQudGl0bGUgfHwgXFxcIlxcXCI7XFxuICAgICAgICBpdCA9IGl0LnRleHQgfHwgXFxcIlxcXCI7XFxuICAgICAgICBpZiAoaXQgPT0gXFxcIlxcXCIgfHwgaXQubGVuZ3RoID4gOCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8v5o6S6ZmkXFxuICAgICAgICBsZXQgcmVnID0gL1xcXFwufOmrmOa4heebtOaSrXzlhpnnnJ/mjqjojZB85b2x6ZmifOW9seinhnzok53lhYnnlLXlvbF86auY5riF55S15b2xfOesrOS4gOWto3znrKzkuozlraN856ys5LiJ5a2jfOesrOWbm+Wto3znrKzkupTlraMvO1xcbiAgICAgICAgaWYgKHRpdCAhPSBcXFwiXFxcIiAmJiAhdGl0LmluY2x1ZGVzKGl0KSB8fCByZWcudGVzdChpdCkpIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaXQubWF0Y2goL+WOn+eUu3zlpIfnlKh86JOd5YWJfOi2hea4hXzpq5jmuIV85q2j54mHfOmfqeeJiHw0S3w0a3wxMDgwUHw3MjBQfFRDfEhEfEJELylcXG4gICAgfVxcblxcbiAgICBmdW5jdGlvbiBub3RDaGFwdGVyKGl0KSB7XFxuICAgICAgICBpZiAoaXQgPT0gbnVsbCB8fCBpdC50ZXh0ID09IG51bGwpIHtcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBpdC50ZXh0Lm1hdGNoKC9bMC05XVxcXFwuWzAtOV3liIYvKTtcXG4gICAgfVxcblxcbiAgICBmdW5jdGlvbiBpc0NoYXB0ZXIoaXQsIHByZSwgbmV4dCkge1xcbiAgICAgICAgaWYgKG5vdENoYXB0ZXIoaXQpKSB7XFxuICAgICAgICAgICAgLy/kvJjlhYjmjpLpmaRcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICAvL+WIpOaWreaYr+S4jeaYr+eUteW9sVxcbiAgICAgICAgaWYgKGlzTW92aWUoaXQpKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaXNDaGFwdGVyMChpdCwgcHJlKSB8fCBpc0NoYXB0ZXIwKGl0LCBuZXh0KTtcXG4gICAgfVxcblxcbiAgICBmdW5jdGlvbiBnZXRDaGFwdGVyTnVtKGl0KSB7XFxuICAgICAgICBpZiAoaXQgPT0gbnVsbCB8fCBpdC50ZXh0ID09IG51bGwpIHtcXG4gICAgICAgICAgICByZXR1cm4gLTE7XFxuICAgICAgICB9XFxuICAgICAgICBpdCA9IGl0LnRleHQgfHwgXFxcIlxcXCI7XFxuICAgICAgICBpZiAoaXQgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICByZXR1cm4gLTE7XFxuICAgICAgICB9XFxuICAgICAgICBpdCA9IGNsZWFyVGV4dChpdCk7XFxuICAgICAgICBsZXQgcmVnID0gL15bMC05XSokLztcXG4gICAgICAgIGlmICghcmVnLnRlc3QoaXQpKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgaXQgPSBwYXJzZUludChpdCk7XFxuICAgICAgICBpZiAoaXNOYU4oaXQpKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGl0ID4gMTkwMCAmJiBpdCA8IDIxMDApIHtcXG4gICAgICAgICAgICByZXR1cm4gLTE7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaXQ7XFxuICAgIH1cXG5cXG4gICAgZnVuY3Rpb24gaXNDaGFwdGVyMChpdCwgYnJvdGhlcikge1xcbiAgICAgICAgLyppZiAoZGVidWcpIHtcXG4gICAgICAgICAgICBsb2coe1xcbiAgICAgICAgICAgICAgICBpdDogaXQsXFxuICAgICAgICAgICAgICAgIGJyb3RoZXI6IGJyb3RoZXJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0qL1xcbiAgICAgICAgaXQgPSBnZXRDaGFwdGVyTnVtKGl0KTtcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coaXQpO1xcbiAgICAgICAgaWYgKGl0IDwgMCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGJyb3RoZXIgPSBnZXRDaGFwdGVyTnVtKGJyb3RoZXIpO1xcbiAgICAgICAgLy9pZiAoZGVidWcpIGxvZyhicm90aGVyKTtcXG4gICAgICAgIGlmIChicm90aGVyIDwgMCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBpdCAtIGJyb3RoZXIgPCAyICYmIGl0IC0gYnJvdGhlciA+IC0yO1xcbiAgICB9XFxuXFxuICAgIGxldCBfd2ViID0gJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICBsZXQgdXJscyA9IF9nZXRVcmxzKCk7XFxuICAgICAgICBsZXQgcmVnID0gL1xcXFwuaHRtbHxcXFxcLmNzc3xcXFxcLmpzLztcXG4gICAgICAgIGZvciAobGV0IGsgaW4gdXJscykge1xcbiAgICAgICAgICAgIGlmICghcmVnLnRlc3QodXJsc1trXSkgJiYgdXJsc1trXS5tYXRjaCgvXFxcXC5tcDR8XFxcXC5tM3U4LykpIHtcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5sb2codXJsc1trXSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBmeV9icmlkZ2VfYXBwLmdldEhlYWRlclVybCh1cmxzW2tdLnJlcGxhY2UoLy4qP3VybD0vLCBcXFwiXFxcIikpICsgXFxcIiNpZ25vcmVJbWc9dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxuXFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICBsZXQgaXQgPSBhcnJbaV07XFxuICAgICAgICBsZXQgdCA9IGl0LnRleHQ7XFxuICAgICAgICBpZiAoIWl0LmhyZWYgfHwgaXQuaHJlZiA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHByZSA9IGkgPT0gMCA/IG51bGwgOiBhcnJbaSAtIDFdO1xcbiAgICAgICAgbGV0IG5leHQgPSBpID09IChhcnIubGVuZ3RoIC0gMSkgPyBudWxsIDogYXJyW2kgKyAxXTtcXG4gICAgICAgIGlmIChpc0NoYXB0ZXIoaXQsIHByZSwgbmV4dCkpIHtcXG4gICAgICAgICAgICBpZiAod2ViKSB7XFxuICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gXFxcIndlYlJ1bGU6Ly9cXFwiICsgaXQuaHJlZiArIFxcXCJAXFxcIiArIF93ZWI7XFxuICAgICAgICAgICAgICAgIHZhciBleHRyYXggPSB7XFxuICAgICAgICAgICAgICAgICAgICBqc0xvYWRpbmdJbmplY3Q6IHRydWUsXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZixcXG4gICAgICAgICAgICAgICAgICAgIGJsb2NrUnVsZXM6IFsnLm00YScsICcubXAzJywgJy5mbHYnLCAnLmF2aScsICcuM2dwJywgJy5tcGVnJywgJy53bXYnLCAnLm1vdicsICcucm12YicsICcuZ2lmJywgJy5qcGVnJywgJy5wbmcnLCAnLmljbycsICcuc3ZnJ11cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJseCA9IFxcXCJ2aWRlbzovL1xcXCIgKyBpdC5ocmVmO1xcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGl0LmhyZWZcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHQsXFxuICAgICAgICAgICAgICAgIHVybDogdXJseCxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgaWYgKGQubGVuZ3RoID09IDApIHtcXG4gICAgICAgIHJldHVybiBkO1xcbiAgICB9IGVsc2Uge1xcblxcbiAgICAgICAgZC5zcGxpY2UoMCwgMCwge1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi8J+Ul1xcXCIgKyB1cmwsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3lzZng/cnVsZT1cXFwiICsgcnVsZSArIFxcXCImcj1cXFwiICsgcnVsZSArIFxcXCIjI1xcXCIgKyB1cmwsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiXFxuICAgICAgICB9KTtcXG5cXG5cXG4gICAgICAgIC8v5Li657q/6Lev5Yqg5YiG5Ymy57q/XFxuICAgICAgICBsZXQgZDIgPSBbXTtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGQyLnB1c2goZFtpXSk7XFxuICAgICAgICAgICAgaWYgKGkgPCBkLmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXG4gICAgICAgICAgICAgICAgbGV0IHQxID0gcGFyc2VJbnQoY2xlYXJUZXh0KGl0LnRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIGxldCBuZXh0ID0gZFtpICsgMV07XFxuICAgICAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIGlmICh0MiAtIHQxID4gMSB8fCB0MSAtIHQyID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5Yy56YWN5pyJ6K+v77yf54K55oiR5LiN5YaN5Yy56YWN5q2k6aG16Z2iXFxcIixcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5rip6aao5o+Q56S6XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXCLlpoLmnpzlj6rmmK/ljZXmrKHljLnphY3lpLHotKXvvIzngrnlh7vkuIvmlrnlj5bmtojmjInpkq7liLfmlrDpobXpnaLph43mlrDljLnphY3vvIzlpoLmnpznoa7orqTml6Dms5XljLnphY3vvIzngrnlh7vkuIvmlrnnoa7lrprmjInpkq7liqDlhaXnmb3lkI3ljZVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiBcXFwicmVmcmVzaFBhZ2UoKVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IHN0b3JhZ2UwLmdldEl0ZW0oXFxcIndoaXRlXFxcIiwgW10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QucHVzaCh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oXFxcIndoaXRlXFxcIiwgbGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5Yqg5YWl55m95ZCN5Y2VXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwgdXJsKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgIH0sIHVybCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgIGltZzogXFxcImhpa2VyOi8vaW1hZ2VzL2FjY291bnRcXFwiXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiBkMjtcXG4gICAgfVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIng1QUlcIixcInBhdGhcIjpcIng1YWlcIixcInJ1bGVcIjpcIiQuZXhwb3J0cyA9IGZ1bmN0aW9uKHJ1bGUsIGFuY2hvcklkKSB7XFxuICAgIHJldHVybiAkLnRvU3RyaW5nKChydWxlLCBhbmNob3JJZCwgd2hpdGUpID0+IHtcXG4gICAgICAgIGlmICh3aW5kb3cuY2hlY2swID09IG51bGwpIHtcXG4gICAgICAgICAgICBmdW5jdGlvbiBjaGVjazAoKSB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcImh0bWxcXFwiKS5pbm5lckhUTUw7XFxuICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXCJodG1sMFxcXCIsIGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnBhcnNlTGF6eVJ1bGVBc3luYygkJCQoKS5sYXp5UnVsZSgocnVsZSwgdXJsLCBhbmNob3JJZCwgd2hpdGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGdldFZhcihcXFwiaHRtbDBcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKFxcXCJodG1sMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2ViID0gZmFsc2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB3aGl0ZTIgPSBbXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiZnNvdS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImJpbmcuXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGluV2hpdGUgPSB3aGl0ZTIuZmlsdGVyKGl0ID0+IHVybC5pbmNsdWRlcyhpdCkpLmxlbmd0aCA+IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWluV2hpdGUgJiYgIXdoaXRlLmluY2x1ZGVzKHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJzZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3BhcnNlP3J1bGU9XFxcIiArIHJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBhcnNlKHJ1bGUsIHdlYiwgdXJsLCBodG1sKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWluV2hpdGUgJiYgZC5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnIgPSBwZGZhKGh0bWwsIFxcXCJib2R5JiZpZnJhbWVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXJyLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNyYyA9IHBkZmgoYXJyWzBdLCBcXFwiaWZyYW1lJiZzcmNcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLojrflj5bliLBpZnJhbWXvvJpcXFwiICsgc3JjKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF3aGl0ZS5pbmNsdWRlcyhzcmMpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3JjICYmIHNyYy5zdGFydHNXaXRoKFxcXCJodHRwXFxcIikgJiYgIXNyYy5tYXRjaCgvXFxcXC5tcDR8XFxcXC5tM3U4fFxcXFwubXAzfFxcXFwuZmx2fFxcXFwubWt2LykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gcmVxdWVzdChzcmMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBwYXJzZShydWxlLCB3ZWIsIHNyYywgaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLlsJ3or5Xojrflj5ZpZnJhbWXlpLHotKVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZC5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWzBdLnVybCA9ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGFuY2hvcklkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlc2MgPSBnZXRWYXIoYW5jaG9ySWQsIFxcXCIwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlc2MgPT0gXFxcIjBcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcImZsb2F0JiZzY3JlZW4tMTcwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihhbmNob3JJZCwgXFxcIjFcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXCJmbG9hdCYmMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQsIFxcXCIwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBhbmNob3JJZCArIFxcXCJ4NVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFswXS50aXRsZSA9IFxcXCLlsZXlvIAv5pS26LW3XFxcIiArIGRbMF0udGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQgKyBcXFwieDVcXFwiLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFwiZmxvYXQmJjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIGQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZXh0cmEgPSBpdC5leHRyYSB8fCB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYS5jbHMgPSBcXFwieDVhaVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXQuZXh0cmEgPSBleHRyYTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhcXFwieDVhaVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKGFuY2hvcklkLCBkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0KFxcXCJBSeWMuemFjeaIkOWKn1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwicGFyc2VMYXp5UnVsZUFzeW5jOlxcXCIgKyBkLmxlbmd0aCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGQubGVuZ3RoID4gMCA/IFxcXCIxXFxcIiA6IFxcXCIwXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhlLnRvU3RyaW5nKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIHJ1bGUsIGxvY2F0aW9uLmhyZWYsIGFuY2hvcklkLCB3aGl0ZSksICQkJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxcXCIwXFxcIiA9PSBpbnB1dCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gd2luZG93LmNoZWNrYyArIDE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qaWYgKHdpbmRvdy5jaGVja2MgPiAxMjApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuaJp+ihjOi2hei/hzMw56eS77yM5peg5rOV6Kej5p6QXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7Ki9cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCh3aW5kb3cuY2hlY2swLCAyNTApO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL31cXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2t1cmwgPSBsb2NhdGlvbi5ocmVmO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjaGVja3UwKCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHdpbmRvdy5jaGVja3VybCAhPSBsb2NhdGlvbi5ocmVmKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9oYXNo5Y+R55Sf5LqG5Y+Y5YyWXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrYyA9IDA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrMCgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDIwMDApO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrdTAsIDI1MCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2t1MCgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhlLnRvU3RyaW5nKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCh3aW5kb3cuY2hlY2swLCAyNTApO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSAwO1xcbiAgICAgICAgICAgIHdpbmRvdy5jaGVjazAgPSBjaGVjazA7XFxuICAgICAgICAgICAgY2hlY2swKCk7XFxuICAgICAgICB9XFxuICAgIH0sIHJ1bGUsIGFuY2hvcklkLCBzdG9yYWdlMC5nZXRJdGVtKFxcXCJ3aGl0ZVxcXCIsIFtdKSk7XFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi6aaW6aG1XCIsXCJwYXRoXCI6XCJob21lXCIsXCJydWxlXCI6XCJ2YXIgZCA9IFtdO1xcbmxldCB1cmwgPSDnvZHnq5k7XFxubGV0IGFuY2hvcklkID0gdXJsO1xcbmxldCBqcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3g1YWlcXFwiKShNWV9SVUxFLnRpdGxlLCBhbmNob3JJZCk7XFxubGV0IGl0ZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3VcXFwiKShNWV9SVUxFLnRpdGxlLCBnZXRIb21lKHVybCkpO1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgdXJsOiB1cmwsXFxuICAgI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XFxcXFxcXCJtYWduZXRcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgIGNvbmZpcm0oe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIua4qemmqOaPkOekulxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXFxcXFwi5qOA5rWL5Yiw5paw55qE56OB6ZO+5Zyw5Z2A77yM54K55Ye756Gu5a6a5oyJ6ZKu5Y2z5Y+v5pKt5pS+77yM54K55Ye75Y+W5raI5oyJ6ZKu5Y+v5Lul5aSN5Yi26ZO+5o6lXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygobWFnKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYWc7XFxcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQpLFxcXFxuICAgICAgICAgICAgICAgIGNhbmNlbDogJC50b1N0cmluZygobWFnKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImNvcHk6Ly9cXFxcXFxcIiArIG1hZ1xcXFxuICAgICAgICAgICAgICAgIH0sIGlucHV0KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xcXFxuICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluY2x1ZGVzKFxcXFxcXFwiYWxpeXVuZHJpdmUuY29tXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcXFxuICAgICAgICAgICAgbGV0IHIxID0gZmV0Y2goXFxcXFxcXCJoaWtlcjovL2hvbWVA5LqR55uY5rGH5b2xXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgaWYgKCFyMSB8fCByMS5sZW5ndGggPD0gNSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBydSA9ICQudG9TdHJpbmcoKCkgPT4ge1xcXFxuICAgICAgICAgICAgIC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bWJIa3hNemszTDJocGEyVnlMV2xqZVM5eVlYY3ZiV0Z6ZEdWeUwyRnNhWGwxYmk1d2JtY2lmUT09XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICBjb25maXJtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmuKnppqjmj5DnpLonLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiAn5pys6KeE5YiZ5L6d6LWW5LqR55uY5rGH5b2x6KeE5YiZ77yM54K55Ye75LiL6Z2i55qE56Gu5a6a5oyJ6ZKu5a+85YWl77yM5rOo5oSP5a+85YWl5ZCO5LiA5a6a6KaB5Zyo5LqR55uY5rGH5b2x55m75b2V6Zi/6YeM5LqR55uY6LSm5Y+377yM5ZCm5YiZ5LiN6IO955SoJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlybTogcnUsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNhbmNlbDogcnVcXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBsb2coXFxcXFxcXCJpbnB1dFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLpmL/ph4zkupHnm5hcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPVxcXFxcXFwiICsgdXJsICsgJz8/ZnlwYWdlJyxcXFxcbiAgICAgICAgICAgICAgICB9KSlcXFxcbiAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcXFxuICAgICAgICB9IGVsc2UgaWYgKC9cXFxcXFxcXC4obXAzfGZsYWN8bTRhKSQvLnRlc3QoaW5wdXQpKSB7XFxcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcXFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAucGxheVZpZGVvKHVybCk7XFxcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXFxcbiAgICAgICAgfSBlbHNlIGlmICghaW5wdXQuaW5jbHVkZXMoaG9zdCkgJiYgaW5wdXQuc3RhcnRzV2l0aChcXFxcXFxcImh0dHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHdoaXRlID0gW1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImRvdXlpblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImRvdWJhblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIml4aWd1YS5jb21cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJrdWFpc2hvdVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJpbGliaWxpXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwid2VpYm9cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ3ZWl4aW5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJiYWlkdVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInptay5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJzdWJoZFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInRodW5kZXJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ4aW5qdWNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJncmFiNGtcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCIvYnRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJqc3IxMFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImFzc3J0XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicXVhcmtcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIF07XFxcXG4gICAgICAgICAgICAgICAgbGV0IGluV2hpdGUgPSB3aGl0ZS5maWx0ZXIoaXQgPT4gdXJsLmluY2x1ZGVzKGl0KSkubGVuZ3RoID4gMDtcXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAvL+i3s+e9kemhtVxcXFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi6K+m5oOFXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3lzZng/cnVsZT1cXFxcXFxcIiArIHJ1bGUgKyBcXFxcXFxcIiZyPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiIyNcXFxcXFxcIiArIHVybCxcXFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgLy9BSeino+aekFxcXFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGRvY3VtZW50LnRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS9wP3J1bGU9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCImcj1cXFxcXFxcIiArIHJ1bGUgKyBcXFxcXFxcIiZ1PVxcXFxcXFwiICsgZnlfYnJpZGdlX2FwcC5iYXNlNjRFbmNvZGUodXJsKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpO1xcXFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5zdGFydHNXaXRoKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXFxcbiAgICAgICAgICAgIC8v6IO95ZSk6LW3QVBQ55qE55m95ZCN5Y2VXFxcXG4gICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJxa2xpbmtcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImJkbmV0ZGlza1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwieHVubGVpYXBwXFxcXFxcXCJcXFxcbiAgICAgICAgICAgIF07XFxcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5zdGFydHNXaXRoKGl0KSkubGVuZ3RoID4gMDtcXFxcbiAgICAgICAgICAgIGlmICghaW5XaGl0ZSkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW5UaGlyZEFwcCAmJiBmeV9icmlkZ2VfYXBwLm9wZW5UaGlyZEFwcCh1cmwpO1xcXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJ1cmw9XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJmc291LmNvbVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiYmluZy5cXFxcXFxcIiwgICAgICAgICAgICAgICAgXFxcXG4gICAgICAgICAgICBdO1xcXFxuICAgICAgICAgICAgbGV0IGluV2hpdGUgPSB3aGl0ZS5maWx0ZXIoaXQgPT4gaW5wdXQuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgaWYgKGluV2hpdGUpIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBsZXQgcmVnID0gbmV3IFJlZ0V4cChcXFxcXFxcIltcXFxcXFxcXHU0ZTAwLVxcXFxcXFxcdTlmYTVdK1xcXFxcXFwiLCBcXFxcXFxcImdcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICBsZXQgciA9IGRlY29kZVVSSUNvbXBvbmVudChpbnB1dCk7XFxcXG4gICAgICAgICAgICBpZiAocmVnLnRlc3QocikgfHwgKGlucHV0LnN0YXJ0c1dpdGgob3JpZ2luKSAm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pIHtcXFxcbiAgICAgICAgICAgIHJldHVybiAtMTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZiAoaXQgPiAxOTAwICYmIGl0IDwgMjEwMCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHJldHVybiBpdDtcXFxcbiAgICB9XFxcXG5cXFxcbiAgICBmdW5jdGlvbiBpc0NoYXB0ZXIwKGl0LCBicm90aGVyKSB7XFxcXG4gICAgICAgIC8qaWYgKGRlYnVnKSB7XFxcXG4gICAgICAgICAgICBsb2coe1xcXFxuICAgICAgICAgICAgICAgIGl0OiBpdCxcXFxcbiAgICAgICAgICAgICAgICBicm90aGVyOiBicm90aGVyXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSovXFxcXG4gICAgICAgIGl0ID0gZ2V0Q2hhcHRlck51bShpdCk7XFxcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coaXQpO1xcXFxuICAgICAgICBpZiAoaXQgPCAwKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgYnJvdGhlciA9IGdldENoYXB0ZXJOdW0oYnJvdGhlcik7XFxcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coYnJvdGhlcik7XFxcXG4gICAgICAgIGlmIChicm90aGVyIDwgMCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHJldHVybiBpdCAtIGJyb3RoZXIgPCAyICYmIGl0IC0gYnJvdGhlciA+IC0yO1xcXFxuICAgIH1cXFxcblxcXFxuICAgIGxldCBfd2ViID0gJC50b1N0cmluZygoKSA9PiB7XFxcXG4gICAgICAgIGxldCB1cmxzID0gX2dldFVybHMoKTtcXFxcbiAgICAgICAgbGV0IHJlZyA9IC9cXFxcXFxcXC5odG1sfFxcXFxcXFxcLmNzc3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kBcXFxcXFxcIiArIF93ZWI7XFxcXG4gICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXFxcbiAgICAgICAgICAgICAgICAgICAganNMb2FkaW5nSW5qZWN0OiB0cnVlLFxcXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZixcXFxcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tSdWxlczogWycubTRhJywgJy5tcDMnLCAnLmZsdicsICcuYXZpJywgJy4zZ3AnLCAnLm1wZWcnLCAnLndtdicsICcubW92JywgJy5ybXZiJywgJy5naWYnLCAnLmpwZWcnLCAnLnBuZycsICcuaWNvJywgJy5zdmcnXVxcXFxuICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gXFxcXFxcXCJ2aWRlbzovL1xcXFxcXFwiICsgaXQuaHJlZjtcXFxcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZlxcXFxuICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0LFxcXFxuICAgICAgICAgICAgICAgIHVybDogdXJseCxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbiAgICBpZiAoZC5sZW5ndGggPT0gMCkge1xcXFxuICAgICAgICByZXR1cm4gZDtcXFxcbiAgICB9IGVsc2Uge1xcXFxuXFxcXG4gICAgICAgIGQuc3BsaWNlKDAsIDAsIHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIvCflJdcXFxcXFxcIiArIHVybCxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnI9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCIjI1xcXFxcXFwiICsgdXJsLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgcGljX3VybDogXFxcXFxcXCJcXFxcXFxcIlxcXFxuICAgICAgICB9KTtcXFxcblxcXFxuXFxcXG4gICAgICAgIC8v5Li657q/6Lev5Yqg5YiG5Ymy57q/XFxcXG4gICAgICAgIGxldCBkMiA9IFtdO1xcXFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGQubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgIGQyLnB1c2goZFtpXSk7XFxcXG4gICAgICAgICAgICBpZiAoaSA8IGQubGVuZ3RoIC0gMSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGRbaV07XFxcXG4gICAgICAgICAgICAgICAgbGV0IHQxID0gcGFyc2VJbnQoY2xlYXJUZXh0KGl0LnRpdGxlKSk7XFxcXG4gICAgICAgICAgICAgICAgbGV0IG5leHQgPSBkW2kgKyAxXTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdDIgPSBwYXJzZUludChjbGVhclRleHQobmV4dC50aXRsZSkpO1xcXFxuICAgICAgICAgICAgICAgIGlmICh0MiAtIHQxID4gMSB8fCB0MSAtIHQyID4gMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJpZ19ibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImxpbmVfYmxhbmtcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJiaWdfYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLljLnphY3mnInor6/vvJ/ngrnmiJHkuI3lho3ljLnphY3mraTpobXpnaJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogJChcXFxcXFxcIiNub0xvYWRpbmcjXFxcXFxcXCIpLmxhenlSdWxlKCh1cmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBjb25maXJtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi5rip6aao5o+Q56S6XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXFxcXFwi5aaC5p6c5Y+q5piv5Y2V5qyh5Yy56YWN5aSx6LSl77yM54K55Ye75LiL5pa55Y+W5raI5oyJ6ZKu5Yi35paw6aG16Z2i6YeN5paw5Yy56YWN77yM5aaC5p6c56Gu6K6k5peg5rOV5Yy56YWN77yM54K55Ye75LiL5pa556Gu5a6a5oyJ6ZKu5Yqg5YWl55m95ZCN5Y2VXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNhbmNlbDogXFxcXFxcXCJyZWZyZXNoUGFnZSgpXFxcXFxcXCIsXFxcXG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vU3RyaW5nKChydWxlLCBhbmNob3JJZCwgd2hpdGUpID0+IHtcXFxcbiAgICAgICAgaWYgKHdpbmRvdy5jaGVjazAgPT0gbnVsbCkge1xcXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2swKCkge1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcXFxcXFxcImh0bWxcXFxcXFxcIikuaW5uZXJIVE1MO1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXFxcXFwiaHRtbDBcXFxcXFxcIiwgaHRtbCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5wYXJzZUxhenlSdWxlQXN5bmMoJCQkKCkubGF6eVJ1bGUoKHJ1bGUsIHVybCwgYW5jaG9ySWQsIHdoaXRlKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBnZXRWYXIoXFxcXFxcXCJodG1sMFxcXFxcXFwiLCBcXFxcXFxcIlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhclZhcihcXFxcXFxcImh0bWwwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB3ZWIgPSBmYWxzZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2hpdGUyID0gW1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImZzb3UuY29tXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYmluZy5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUyLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWluV2hpdGUgJiYgIXdoaXRlLmluY2x1ZGVzKHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcnNlID0gJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3BhcnNlP3J1bGU9XFxcXFxcXCIgKyBydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBhcnNlKHJ1bGUsIHdlYiwgdXJsLCBodG1sKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpbldoaXRlICYmIGQubGVuZ3RoIDwgMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcXFxcXCJib2R5JiZpZnJhbWVcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXJyLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3JjID0gcGRmaChhcnJbMF0sIFxcXFxcXFwiaWZyYW1lJiZzcmNcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi6I635Y+W5YiwaWZyYW1l77yaXFxcXFxcXCIgKyBzcmMpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghd2hpdGUuaW5jbHVkZXMoc3JjKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3JjICYmIHNyYy5zdGFydHNXaXRoKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSAmJiAhc3JjLm1hdGNoKC9cXFxcXFxcXC5tcDR8XFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDN8XFxcXFxcXFwuZmx2fFxcXFxcXFxcLm1rdi8pKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gcmVxdWVzdChzcmMpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBhcnNlKHJ1bGUsIHdlYiwgc3JjLCBodG1sKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi5bCd6K+V6I635Y+WaWZyYW1l5aSx6LSlXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFswXS51cmwgPSAkKFxcXFxcXFwiI25vTG9hZGluZyNcXFxcXFxcIikubGF6eVJ1bGUoKGFuY2hvcklkKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVzYyA9IGdldFZhcihhbmNob3JJZCwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlc2MgPT0gXFxcXFxcXCIwXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXFxcXFwiZmxvYXQmJnNjcmVlbi0xNzBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKGFuY2hvcklkLCBcXFxcXFxcIjFcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcXFxcXCJmbG9hdCYmMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQsIFxcXFxcXFwiMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYW5jaG9ySWQgKyBcXFxcXFxcIng1XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWzBdLnRpdGxlID0gXFxcXFxcXCLlsZXlvIAv5pS26LW3XFxcXFxcXCIgKyBkWzBdLnRpdGxlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQgKyBcXFxcXFxcIng1XFxcXFxcXCIsIFxcXFxcXFwiMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFxcXFxcImZsb2F0JiYwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiBkKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZXh0cmEgPSBpdC5leHRyYSB8fCB7fTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLmNscyA9IFxcXFxcXFwieDVhaVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXQuZXh0cmEgPSBleHRyYTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoXFxcXFxcXCJ4NWFpXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoYW5jaG9ySWQsIGQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFxcXFxcIkFJ5Yy56YWN5oiQ5YqfXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZC5sZW5ndGggPiAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcInBhcnNlTGF6eVJ1bGVBc3luYzpcXFxcXFxcIiArIGQubGVuZ3RoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGQubGVuZ3RoID4gMCA/IFxcXFxcXFwiMVxcXFxcXFwiIDogXFxcXFxcXCIwXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHJ1bGUsIGxvY2F0aW9uLmhyZWYsIGFuY2hvcklkLCB3aGl0ZSksICQkJC50b1N0cmluZygoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXFxcXFxcXCIwXFxcXFxcXCIgPT0gaW5wdXQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gd2luZG93LmNoZWNrYyArIDE7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLyppZiAod2luZG93LmNoZWNrYyA+IDEyMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXFxcXFwi5omn6KGM6LaF6L+HMzDnp5LvvIzml6Dms5Xop6PmnpBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsqL1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL31cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrdXJsID0gbG9jYXRpb24uaHJlZjtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNoZWNrdTAoKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuY2hlY2t1cmwgIT0gbG9jYXRpb24uaHJlZikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9oYXNo5Y+R55Sf5LqG5Y+Y5YyWXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSAwO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrMCgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMjAwMCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrdTAsIDI1MCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2t1MCgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKGUudG9TdHJpbmcoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gMDtcXFxcbiAgICAgICAgICAgIHdpbmRvdy5jaGVjazAgPSBjaGVjazA7XFxcXG4gICAgICAgICAgICBjaGVjazAoKTtcXFxcbiAgICAgICAgfVxcXFxuICAgI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