Advertisement
xiaomianao666

邀您一起看:《雨金石战记》电影高清完整版免费在线观看_雨金石战记百度资源在线观看-无极电影网

Apr 18th, 2023
937
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥《雨金石战记》电影高清完整版免费在线观看_雨金石战记百度资源在线观看-无极电影网@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcInlzZnhcIixcInBhdGhcIjpcInlzZnhcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxubGV0IHJ1bGUgPSBnZXRQYXJhbShcXFwiclxcXCIpLnNwbGl0KFxcXCIjI1xcXCIpWzBdO1xcbmxldCB1cmwgPSBNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV07XFxubGV0IGl0ZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3VcXFwiKShydWxlLCBnZXRIb21lKHVybCkpO1xcbmxldCBqcyA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICB0cnkge1xcbiAgICAgICAgaWYgKGRvY3VtZW50LnRpdGxlICYmIGRvY3VtZW50LnRpdGxlLmxlbmd0aCkge1xcbiAgICAgICAgICAgIGxldCByID0gJCQkKCkubGF6eVJ1bGUoKHQpID0+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NhbmNlbDogcnVcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbG9nKFxcXCJpbnB1dFxcXCIpO1xcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi6Zi/6YeM5LqR55uYXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPVxcXCIgKyB1cmwgKyAnPz9meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXG4gICAgICAgIH0gZWxzZSBpZiAoL1xcXFwuKG1wM3xmbGFjfG00YSkkLy50ZXN0KGlucHV0KSkge1xcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLnBsYXlWaWRlbyh1cmwpO1xcbiAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcbiAgICAgICAgfSBlbHNlIGlmICghaW5wdXQuaW5jbHVkZXMoaG9zdCkgJiYgaW5wdXQuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJkb3V5aW5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImRvdWJhblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiaXhpZ3VhLmNvbVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwia3VhaXNob3VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImJpbGliaWxpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ3ZWlib1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwid2VpeGluXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJiYWlkdVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiem1rLlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwic3ViaGRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInRodW5kZXJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInhpbmp1Y1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZ3JhYjRrXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCIvYnRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImpzcjEwXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJhc3NydFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwicXVhcmtcXFwiXFxuICAgICAgICAgICAgICAgIF07XFxuICAgICAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IHVybC5pbmNsdWRlcyhpdCkpLmxlbmd0aCA+IDA7XFxuICAgICAgICAgICAgICAgIGlmIChpbldoaXRlKSB7XFxuICAgICAgICAgICAgICAgICAgICAvL+i3s+e9kemhtVxcbiAgICAgICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuivpuaDhVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3lzZng/cnVsZT1cXFwiICsgcnVsZSArIFxcXCImcj1cXFwiICsgcnVsZSArIFxcXCIjI1xcXCIgKyB1cmwsXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIC8vQUnop6PmnpBcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGRvY3VtZW50LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9wP3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiJnU9XFxcIiArIGZ5X2JyaWRnZV9hcHAuYmFzZTY0RW5jb2RlKHVybCksXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKTtcXG4gICAgICAgIH0gZWxzZSBpZiAoIWlucHV0LnN0YXJ0c1dpdGgoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxuICAgICAgICAgICAgLy/og73llKTotbdBUFDnmoTnmb3lkI3ljZVcXG4gICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxuICAgICAgICAgICAgICAgIFxcXCJxa2xpbmtcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiYmRuZXRkaXNrXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcInh1bmxlaWFwcFxcXCJcXG4gICAgICAgICAgICBdO1xcbiAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IGlucHV0LnN0YXJ0c1dpdGgoaXQpKS5sZW5ndGggPiAwO1xcbiAgICAgICAgICAgIGlmICghaW5XaGl0ZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5vcGVuVGhpcmRBcHAgJiYgZnlfYnJpZGdlX2FwcC5vcGVuVGhpcmRBcHAodXJsKTtcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgbGV0IHdoaXRlID0gW1xcbiAgICAgICAgICAgICAgICBcXFwidXJsPVxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJmc291LmNvbVxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJiaW5nLlxcXCIsICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgIF07XFxuICAgICAgICAgICAgbGV0IGluV2hpdGUgPSB3aGl0ZS5maWx0ZXIoaXQgPT4gaW5wdXQuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcbiAgICAgICAgICAgIGlmIChpbldoaXRlKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHJlZyA9IG5ldyBSZWdFeHAoXFxcIltcXFxcdTRlMDAtXFxcXHU5ZmE1XStcXFwiLCBcXFwiZ1xcXCIpO1xcbiAgICAgICAgICAgIGxldCByID0gZGVjb2RlVVJJQ29tcG9uZW50KGlucHV0KTtcXG4gICAgICAgICAgICBpZiAocmVnLnRlc3QocikgfHwgKGlucHV0LnN0YXJ0c1dpdGgob3JpZ2luKSAmJiBpbnB1dC5sZW5ndGggLSBvcmlnaW4ubGVuZ3RoID4gMikpIHtcXG4gICAgICAgICAgICAgICAgLy/mnInkuK3mlofvvIzlupTor6XmmK/lnKjmkJzntKLvv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4ge1xcbiAgICAgICAgICAgIC8vaHRtbDogaXQsXFxuICAgICAgICAgICAgdGV4dDogcGRmaChpdCwgXFxcImEmJlRleHRcXFwiKSxcXG4gICAgICAgICAgICB0aXRsZTogcGRmaChpdCwgXFxcImEmJnRpdGxlXFxcIiksXFxuICAgICAgICAgICAgaHJlZjogcGQoaXQsIFxcXCJhJiZocmVmXFxcIiwgdXJsKVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgLy9sb2coYXJyKTtcXG4gICAgbGV0IGRlYnVnID0gZmFsc2U7XFxuXFxuICAgIGZ1bmN0aW9uIGNsZWFyVGV4dChpdCkge1xcbiAgICAgICAgcmV0dXJuIGl0LnJlcGxhY2UoL+esrHzpm4Z856ugL2csIFxcXCJcXFwiKTtcXG4gICAgfVxcblxcbiAgICBmdW5jdGlvbiBpc01vdmllKGl0KSB7XFxuICAgICAgICBpZiAoaXQgPT0gbnVsbCB8fCBpdC50ZXh0ID09IG51bGwpIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0ID0gaXQudGl0bGUgfHwgXFxcIlxcXCI7XFxuICAgICAgICBpdCA9IGl0LnRleHQgfHwgXFxcIlxcXCI7XFxuICAgICAgICBpZiAoaXQgPT0gXFxcIlxcXCIgfHwgaXQubGVuZ3RoID4gOCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8v5o6S6ZmkXFxuICAgICAgICBsZXQgcmVnID0gL1xcXFwufOmrmOa4heebtOaSrXzlhpnnnJ/mjqjojZB85b2x6ZmifOW9seinhnzok53lhYnnlLXlvbF86auY5riF55S15b2xfOesrOS4gOWto3znrKzkuozlraN856ys5LiJ5a2jfOesrOWbm+Wto3znrKzkupTlraMvO1xcbiAgICAgICAgaWYgKHRpdCAhPSBcXFwiXFxcIiAmJiAhdGl0LmluY2x1ZGVzKGl0KSB8fCByZWcudGVzdChpd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XCIpIHtcXG4gICAgICAgICAgICByZXR1cm4gLTE7XFxuICAgICAgICB9XFxuICAgICAgICBpdCA9IGNsZWFyVGV4dChpdCk7XFxuICAgICAgICBsZXQgcmVnID0gL15bMC05XSokLztcXG4gICAgICAgIGlmICghcmVnLnRlc3QoaXQpKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgaXQgPSBwYXJzZUludChpdCk7XFxuICAgICAgICBpZiAoaXNOYU4oaXQpKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGl0ID4gMTkwMCAmJiBpdCA8IDIxMDApIHtcXG4gICAgICAgICAgICByZXR1cm4gLTE7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaXQ7XFxuICAgIH1cXG5cXG4gICAgZnVuY3Rpb24gaXNDaGFwdGVyMChpdCwgYnJvdGhlcikge1xcbiAgICAgICAgLyppZiAoZGVidWcpIHtcXG4gICAgICAgICAgICBsb2coe1xcbiAgICAgICAgICAgICAgICBpdDogaXQsXFxuICAgICAgICAgICAgICAgIGJyb3RoZXI6IGJyb3RoZXJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0qL1xcbiAgICAgICAgaXQgPSBnZXRDaGFwdGVyTnVtKGl0KTtcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coaXQpO1xcbiAgICAgICAgaWYgKGl0IDwgMCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGJyb3RoZXIgPSBnZXRDaGFwdGVyTnVtKGJyb3RoZXIpO1xcbiAgICAgICAgLy9pZiAoZGVidWcpIGxvZyhicm90aGVyKTtcXG4gICAgICAgIGlmIChicm90aGVyIDwgMCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBpdCAtIGJyb3RoZXIg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AgICAgICAgIHZhciB1cmx4ID0gXFxcIndlYlJ1bGU6Ly9cXFwiICsgaXQuaHJlZiArIFxcXCJAXFxcIiArIF93ZWI7XFxuICAgICAgICAgICAgICAgIHZhciBleHRyYXggPSB7XFxuICAgICAgICAgICAgICAgICAgICBqc0xvYWRpbmdJbmplY3Q6IHRydWUsXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZixcXG4gICAgICAgICAgICAgICAgICAgIGJsb2NrUnVsZXM6IFsnLm00YScsICcubXAzJywgJy5mbHYnLCAnLmF2aScsICcuM2dwJywgJy5tcGVnJywgJy53bXYnLCAnLm1vdicsICcucm12YicsICcuZ2lmJywgJy5qcGVnJywgJy5wbmcnLCAnLmljbycsICcuc3ZnJ11cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJseCA9IFxcXCJ2aWRlbzovL1xcXCIgKyBpdC5ocmVmO1xcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGl0LmhyZWZcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHQsXFxuICAgICAgICAgICAgICAgIHVybDogdXJseCxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgaWYgKGQubGVuZ3RoID09IDApIHtcXG4gICAgICAgIHJldHVybiBkO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgZC5zcGxpY2UoMCwgMCwge1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi4oCc4oCc4oCd4oCdPHNtYWxsPjxmb250IGNvbG9yPScjYWFhYWFhJz7wn5SXXFxcIiArIHVybCArIFxcXCI8L2ZvbnQ+PC9zbWFsbD5cXFwiLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiIyNcXFwiICsgdXJsLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIC8v5Li657q/6Lev5Yqg5YiG5Ymy57q/XFxuICAgICAgICBsZXQgZDIgPSBbXTtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGQyLnB1c2goZFtpXSk7XFxuICAgICAgICAgICAgaWYgKGkgPCBkLmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXG4gICAgICAgICAgICAgICAgbGV0IHQxID0gcGFyc2VJbnQoY2xlYXJUZXh0KGl0LnRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIGxldCBuZXh0ID0gZFtpICsgMV07XFxuICAgICAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIGlmICh0MiAtIHQxID4gMSB8fCB0MSAtIHQyID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gICAgICAgXFxuICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIjxzbWFsbD48Zm9udCBjb2xvcj0nI2FhYWFhYSc+5Yy56YWN5pyJ6K+v77yf54K55oiR5LiN5YaN5Yy56YWN5q2k6aG16Z2iPC9mb250Pjwvc21hbGw+XFxcIixcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5rip6aao5o+Q56S6XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXCLlpoLmnpzlj6rmmK/ljZXmrKHljLnphY3lpLHotKXvvIzngrnlh7vkuIvmlrnlj5bmtojmjInpkq7liLfmlrDpobXpnaLph43mlrDljLnphY3vvIzlpoLmnpznoa7orqTml6Dms5XljLnphY3vvIzngrnlh7vkuIvmlrnnoa7lrprmjInpkq7liqDlhaXnmb3lkI3ljZVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiBcXFwicmVmcmVzaFBhZ2UoKVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IHN0b3JhZ2UwLmdldEl0ZW0oXFxcIndoaXRlXFxcIiwgW10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QucHVzaCh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oXFxcIndoaXRlXFxcIiwgbGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5Yqg5YWl55m95ZCN5Y2VXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwgdXJsKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgIH0sIHVybCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgIGltZzogXFxcImhpa2VyOi8vaW1hZ2VzL2FjY291bnRcXFwiXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiBkMjtcXG4gICAgfVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIng1QUlcIixcInBhdGhcIjpcIng1YWlcIixcInJ1bGVcIjpcIiQuZXhwb3J0cyA9IGZ1bmN0aW9uKHJ1bGUsIGFuY2hvcklkKSB7XFxuICAgIHJldHVybiAkLnRvU3RyaW5nKChydWxlLCBhbmNob3JJZCwgd2hpdGUpID0+IHtcXG4gICAgICAgIGlmICh3aW5kb3cuY2hlY2swID09IG51bGwpIHtcXG4gICAgICAgICAgICBmdW5jdGlvbiBjaGVjazAoKSB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdTEgPSBsb2NhdGlvbi5ocmVmLnJlcGxhY2UoXFxcImh0dHBzOi8vXFxcIiwgXFxcIlxcXCIpLnJlcGxhY2UoXFxcImh0dHA6Ly9cXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdTIgPSB1MS5zcGxpdChcXFwiL1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlzSG9tZSA9IHUyLmxlbmd0aCA8IDIgfHwgKHUyLmxlbmd0aCA9PSAyICYmIHUyWzFdID09IFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoID0gbG9jYXRpb24uaGFzaDtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChoICE9IG51bGwgJiYgaCAhPSBcXFwiXFxcIiAmJiBoICE9IFxcXCIjL1xcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpc0hvbWUgPSBmYWxzZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0hvbWUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KHdpbmRvdy5jaGVjazAsIDI1MCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcImh0bWxcXFwiKS5pbm5lckhUTUw7XFxuICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXCJodG1sMFxcXCIsIGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnBhcnNlTGF6eVJ1bGVBc3luYygkJCQoKS5sYXp5UnVsZSgocnVsZSwgdXJsLCBhbmNob3JJZCwgd2hpdGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGdldFZhcihcXFwiaHRtbDBcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKFxcXCJodG1sMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2ViID0gZmFsc2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB3aGl0ZTIgPSBbXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiZnNvdS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImJpbmcuXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcnNlID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvcGFyc2U/cnVsZT1cXFwiICsgcnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUyLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWluV2hpdGUgJiYgIXdoaXRlLmluY2x1ZGVzKHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBwYXJzZShydWxlLCB3ZWIsIHVybCwgaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpbldoaXRlICYmIGQubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiYm9keSYmaWZyYW1lXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyci5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzcmMgPSBwZGZoKGFyclswXSwgXFxcImlmcmFtZSYmc3JjXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi6I635Y+W5YiwaWZyYW1l77yaXFxcIiArIHNyYyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghd2hpdGUuaW5jbHVkZXMoc3JjKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNyYyAmJiBzcmMuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpICYmICFzcmMubWF0Y2goL1xcXFwubXA0fFxcXFwubTN1OHxcXFxcLm1wM3xcXFxcLmZsdnxcXFxcLm1rdi8pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCA9IHJlcXVlc3Qoc3JjKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gcGFyc2UocnVsZSwgd2ViLCBzcmMsIGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5bCd6K+V6I635Y+WaWZyYW1l5aSx6LSlXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGQubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFswXS51cmwgPSAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChhbmNob3JJZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkZXNjID0gZ2V0VmFyKGFuY2hvcklkLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXNjID09IFxcXCIwXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXCJmbG9hdCYmc2NyZWVuLTE3MFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQsIFxcXCIxXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFwiZmxvYXQmJjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKGFuY2hvcklkLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYW5jaG9ySWQgKyBcXFwieDVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbMF0udGl0bGUgPSBcXFwi5bGV5byAL+aUtui1t1xcXCIgKyBkWzBdLnRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKGFuY2hvcklkICsgXFxcIng1XFxcIiwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcImZsb2F0JiYwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiBkKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGV4dHJhID0gaXQuZXh0cmEgfHwge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEuY2xzID0gXFxcIng1YWlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0LmV4dHJhID0gZXh0cmE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoXFxcIng1YWlcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihhbmNob3JJZCwgZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwiQUnljLnphY3miJDlip9cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZC5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcInBhcnNlTGF6eVJ1bGVBc3luYzpcXFwiICsgZC5sZW5ndGgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkLmxlbmd0aCA+IDAgPyBcXFwiMVxcXCIgOiBcXFwiMFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LCBydWxlLCBsb2NhdGlvbi5ocmVmLCBhbmNob3JJZCwgd2hpdGUpLCAkJCQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcXFwiMFxcXCIgPT0gaW5wdXQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrYyA9IHdpbmRvdy5jaGVja2MgKyAxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmlmICh3aW5kb3cuY2hlY2tjID4gMTIwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLmiafooYzotoXov4czMOenku+8jOaXoOazleino+aekFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyovXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy99XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrdXJsID0gbG9jYXRpb24uaHJlZjtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2t1MCgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuY2hlY2t1cmwgIT0gbG9jYXRpb24uaHJlZikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGFzaOWPkeeUn+S6huWPmOWMllxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSAwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVjazAoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAyMDAwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChjaGVja3UwLCAyNTApO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrdTAoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gMDtcXG4gICAgICAgICAgICB3aW5kb3cuY2hlY2swID0gY2hlY2swO1xcbiAgICAgICAgICAgIGNoZWNrMCgpO1xcbiAgICAgICAgfVxcbiAgICB9LCBydWxlLCBhbmNob3JJZCwgc3RvcmFnZTAuZ2V0SXRlbShcXFwid2hpdGVcXFwiLCBbXSkpO1xcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIummlumhtVwiLFwicGF0aFwiOlwiaG9tZVwiLFwicnVsZVwiOlwidmFyIGQgPSBbXTtcXG5sZXQgdXJsID0g572R56uZO1xcbmxldCBhbmNob3JJZCA9IHVybDtcXG5sZXQganMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS94NWFpXFxcIikoTVlfUlVMRS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0oe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIua4qemmqOaPkOekulxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXFxcXFwi5qOA5rWL5Yiw5paw55qE56OB6ZO+5Zyw5Z2A77yM54K55Ye756Gu5a6a5oyJ6ZKu5Y2z5Y+v5pKt5pS+77yM54K55Ye75Y+W5raI5oyJ6ZKu5Y+v5Lul5aSN5Yi26ZO+5o6lXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygobWFnKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYWc7XFxcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQpLFxcXFxuICAgICAgICAgICAgICAgIGNhbmNlbDogJC50b1N0cmluZygobWFnKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImNvcHk6Ly9cXFxcXFxcIiArIG1hZ1xcXFxuICAgICAgICAgICAgICAgIH0sIGlucHV0KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xcXFxuICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluY2x1ZGVzKFxcXFxcXFwiYWxpeXVuZHJpdmUuY29tXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcXFxuICAgICAgICAgICAgbGV0IHIxID0gZmV0Y2goXFxcXFxcXCJoaWtlcjovL2hvbWVA5LqR55uY5rGH5b2xXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgaWYgKCFyMSB8fCByMS5sZW5ndGggPD0gNSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBydSA9ICQudG9TdHJpbmcoKCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCLmtbfpmJTop4bnlYzop4TliJnliIbkuqvvvIzlvZ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0hNNkx5OW5hWFJsWlM1amIyMHZabXg1TVRNNU55OW9hV3RsY2kxcFkza3ZjbUYzTDIxaGMzUmxjaTloYkdsNWRXNHVjRzVuSWl3aWNISnZlSGtpT2lJaWZRPT1cXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIGNvbmZpcm0oe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+a4qemmqOaPkOekuicsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICfmnKzop4TliJnkvp3otZbkupHnm5jmsYflvbHop4TliJnvvIzngrnlh7vkuIvpnaLnmoTnoa7lrprmjInpkq7lr7zlhaXvvIzms6jmhI/lr7zlhaXlkI7kuIDlrpropoHlnKjkupHnm5jmsYflvbHnmbvlvZXpmL/ph4zkupHnm5jotKblj7fvvIzlkKbliJnkuI3og73nlKgnLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb25maXJtOiBydSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiBydVxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxvZyhcXFxcXFxcImlucHV0XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIumYv+mHjOS6keebmFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9XFxcXFxcXCIgKyB1cmwgKyAnPz9meXBhZ2UnLFxcXFxuICAgICAgICAgICAgICAgIH0pKVxcXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxcXG4gICAgICAgIH0gZWxzZSBpZiAoL1xcXFxcXFxcLihtcDN8ZmxhY3xtNGEpJC8udGVzdChpbnB1dCkpIHtcXFxcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8odXJsKTtcXFxcbiAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcXFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5pbmNsdWRlcyhob3N0KSAmJiBpbnB1dC5zdGFydHNXaXRoKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXFxcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZG91eWluXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZG91YmFuXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaXhpZ3VhLmNvbVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImt1YWlzaG91XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYmlsaWJpbGlcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ3ZWlib1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIndlaXhpblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJhaWR1XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiem1rLlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInN1YmhkXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidGh1bmRlclxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInhpbmp1Y1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImdyYWI0a1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIi9idFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImpzcjEwXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYXNzcnRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJxdWFya1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgXTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgICAgIGlmIChpbldoaXRlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8v6Lez572R6aG1XFxcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLor6bmg4VcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnI9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCIjI1xcXFxcXFwiICsgdXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAvL0FJ6Kej5p6QXFxcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZG9jdW1lbnQudGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3A/cnVsZT1cXFxcXFxcIiArIHJ1bGUgKyBcXFxcXFxcIiZyPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnU9XFxcXFxcXCIgKyBmeV9icmlkZ2VfYXBwLmJhc2U2NEVuY29kZSh1cmwpLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSk7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoIWlucHV0LnN0YXJ0c1dpdGgoXFxcXFxcXCJodHRwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcXFxuICAgICAgICAgICAgLy/og73llKTotbdBUFDnmoTnmb3lkI3ljZVcXFxcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInFrbGlua1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiYmRuZXRkaXNrXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJ4dW5sZWlhcHBcXFxcXFxcIlxcXFxuICAgICAgICAgICAgXTtcXFxcbiAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IGlucHV0LnN0YXJ0c1dpdGgoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgaWYgKCFpbldoaXRlKSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXFxcbiAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInVybD1cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImZzb3UuY29tXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJiaW5nLlxcXFxcXFwiLCAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgIF07XFxcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5pbmNsdWRlcyhpdCkpLmxlbmd0aCA+IDA7XFxcXG4gICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxldCByZWcgPSBuZXcgUmVnRXhwKFxcXFxcXFwiW1xcXFxcXFxcdTRlMDAtXFxcXFxcXFx1OWZhNV0rXFxcXFxcXCIsIFxcXFxcXFwiZ1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIGxldCByID0gZGVjb2RlVVJJQ29tcG9uZW50KGlucHV0KTtcXFxcbiAgICAgICAgICAgIGlmIChyZWcudGVzdChyKSB8fCAoaW5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XG4gICAgICAgIH1cXFxcbiAgICAgICAgaXQgPSBjbGVhclRleHQoaXQpO1xcXFxuICAgICAgICBsZXQgcmVnID0gL15bMC05XSokLztcXFxcbiAgICAgICAgaWYgKCFyZWcudGVzdChpdCkpIHtcXFxcbiAgICAgICAgICAgIHJldHVybiAtMTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpdCA9IHBhcnNlSW50KGl0KTtcXFxcbiAgICAgICAgaWYgKGlzTmFOKGl0KSkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGlmIChpdCA+IDE5MDAgJiYgaXQgPCAyMTAwKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gLTE7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgcmV0dXJuIGl0O1xcXFxuICAgIH1cXFxcblxcXFxuICAgIGZ1bmN0aW9uIGlzQ2hhcHRlcjAoaXQsIGJyb3RoZXIpIHtcXFxcbiAgICAgICAgLyppZiAoZGVidWcpIHtcXFxcbiAgICAgICAgICAgIGxvZyh7XFxcXG4gICAgICAgICAgICAgICAgaXQ6IGl0LFxcXFxuICAgICAgICAgICAgICAgIGJyb3RoZXI6IGJyb3RoZXJcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9Ki9cXFxcbiAgICAgICAgaXQgPSBnZXRDaGFwdGVyTnVtKGl0KTtcXFxcbiAgICAgICAgLy9pZiAoZGVidWcpIGxvZyhpdCk7XFxcXG4gICAgICAgIGlmIChpdCA8IDApIHtcXFxcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBicm90aGVyID0gZ2V0Q2hhcHRlck51bShicm90aGVyKTtcXFxcbiAgICAgICAgLy9pZiAoZGVidWcpIGxvZyhicm90aGVyKTtcXFxcbiAgICAgICAgaWYgKGJyb3RoZXIgPCAwKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2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xcXG4gICAgICAgIGxldCBuZXh0ID0gaSA9PSAoYXJyLmxlbmd0aCAtIDEpID8gbnVsbCA6IGFycltpICsgMV07XFxcXG4gICAgICAgIGlmIChpc0NoYXB0ZXIoaXQsIHByZSwgbmV4dCkpIHtcXFxcbiAgICAgICAgICAgIGlmICh3ZWIpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdXJseCA9IFxcXFxcXFwid2ViUnVsZTovL1xcXFxcXFwiICsgaXQuaHJlZiArIFxcXFxcXFwiQFxcXFxcXFwiICsgX3dlYjtcXFxcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICBqc0xvYWRpbmdJbmplY3Q6IHRydWUsXFxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmLFxcXFxuICAgICAgICAgICAgICAgICAgICBibG9ja1J1bGVzOiBbJy5tNGEnLCAnLm1wMycsICcuZmx2JywgJy5hdmknLCAnLjNncCcsICcubXBlZycsICcud212JywgJy5tb3YnLCAnLnJtdmInLCAnLmdpZicsICcuanBlZycsICcucG5nJywgJy5pY28nLCAnLnN2ZyddXFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHVybHggPSBcXFxcXFxcInZpZGVvOi8vXFxcXFxcXCIgKyBpdC5ocmVmO1xcXFxuICAgICAgICAgICAgICAgIHZhciBleHRyYXggPSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmXFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHQsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiB1cmx4LFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfM1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiBleHRyYXhcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9XFxcXG4gICAgfVxcXFxuICAgIGlmIChkLmxlbmd0aCA9PSAwKSB7XFxcXG4gICAgICAgIHJldHVybiBkO1xcXFxuICAgIH0gZWxzZSB7XFxcXG4gICAgICAgIGQuc3BsaWNlKDAsIDAsIHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIuKAnOKAnOKAneKAnTxzbWFsbD48Zm9udCBjb2xvcj0nI2FhYWFhYSc+8J+Ul1xcXFxcXFwiICsgdXJsICsgXFxcXFxcXCI8L2ZvbnQ+PC9zbWFsbD5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnI9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCIjI1xcXFxcXFwiICsgdXJsLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KTtcXFxcbiAgICAgICAgLy/kuLrnur/ot6/liqDliIblibLnur9cXFxcbiAgICAgICAgbGV0IGQyID0gW107XFxcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgZDIucHVzaChkW2ldKTtcXFxcbiAgICAgICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdDEgPSBwYXJzZUludChjbGVhclRleHQoaXQudGl0bGUpKTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcXFxuICAgICAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHQyIC0gdDEgPiAxIHx8IHQxIC0gdDIgPiAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwibGluZV9ibGFua1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJpZ19ibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSAgICAgICBcXFxcbiAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCI8c21hbGw+PGZvbnQgY29sb3I9JyNhYWFhYWEnPuWMuemFjeacieivr++8n+eCueaIkeS4jeWGjeWMuemFjeatpOmhtemdojwvZm9udD48L3NtYWxsPlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgdXJsOiAkKFxcXFxcXFwiI25vTG9hZGluZyNcXFxcXFxcIikubGF6eVJ1bGUoKHVybCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGNvbmZpcm0oe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLmuKnppqjmj5DnpLpcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgY29udGVudDogXFxcXFxcXCLlpoLmnpzlj6rmmK/ljZXmrKHljLnphY3lpLHotKXvvIzngrnlh7vkuIvmlrnlj5bmtojmjInpkq7liLfmlrDpobXpnaLph43mlrDljLnphY3vvIzlpoLmnpznoa7orqTml6Dms5XljLnphY3vvIzngrnlh7vkuIvmlrnnoa7lrprmjInpkq7liqDlhaXnmb3lkI3ljZVcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiBcXFxcXFxcInJlZnJlc2hQYWdlKClcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygodXJsKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IHN0b3JhZ2UwLmdldEl0ZW0oXFxcXFxcXCJ3aGl0ZVxcXFxcXFwiLCBbXSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0LnB1c2godXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oXFxcXFxcXCJ3aGl0ZVxcXFxcXFwiLCBsaXN0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+W3suWKoOWFpeeZveWQjeWNlVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHVybClcXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgIH0sIHVybCksXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxc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oICE9IG51bGwgJiYgaCAhPSBcXFxcXFxcIlxcXFxcXFwiICYmIGggIT0gXFxcXFxcXCIjL1xcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpc0hvbWUgPSBmYWxzZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNIb21lKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KHdpbmRvdy5jaGVjazAsIDI1MCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcXFxcXCJodG1sXFxcXFxcXCIpLmlubmVySFRNTDtcXFxcbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcihcXFxcXFxcImh0bWwwXFxcXFxcXCIsIGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEucGFyc2VMYXp5UnVsZUFzeW5jKCQkJCgpLmxhenlSdWxlKChydWxlLCB1cmwsIGFuY2hvcklkLCB3aGl0ZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZCA9IFtdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZ2V0VmFyKFxcXFxcXFwiaHRtbDBcXFxcXFxcIiwgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJWYXIoXFxcXFxcXCJodG1sMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2ViID0gZmFsc2U7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdoaXRlMiA9IFtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJmc291LmNvbVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJpbmcuXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyc2UgPSAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvcGFyc2U/cnVsZT1cXFxcXFxcIiArIHJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUyLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaW5XaGl0ZSAmJiAhd2hpdGUuaW5jbHVkZXModXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gcGFyc2UocnVsZSwgd2ViLCB1cmwsIGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWluV2hpdGUgJiYgZC5sZW5ndGggPCAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFxcXFxcImJvZHkmJmlmcmFtZVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcnIubGVuZ3RoID4gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzcmMgPSBwZGZoKGFyclswXSwgXFxcXFxcXCJpZnJhbWUmJnNyY1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLojrflj5bliLBpZnJhbWXvvJpcXFxcXFxcIiArIHNyYyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF3aGl0ZS5pbmNsdWRlcyhzcmMpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzcmMgJiYgc3JjLnN0YXJ0c1dpdGgoXFxcXFxcXCJodHRwXFxcXFxcXCIpICYmICFzcmMubWF0Y2goL1xcXFxcXFxcLm1wNHxcXFxcXFxcXC5tM3U4fFxcXFxcXFxcLm1wM3xcXFxcXFxcXC5mbHZ8XFxcXFxcXFwubWt2LykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KHNyYyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gcGFyc2UocnVsZSwgd2ViLCBzcmMsIGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLlsJ3or5Xojrflj5ZpZnJhbWXlpLHotKVcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGQubGVuZ3RoID4gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWzBdLnVybCA9ICQoXFxcXFxcXCIjbm9Mb2FkaW5nI1xcXFxcXFwiKS5sYXp5UnVsZSgoYW5jaG9ySWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkZXNjID0gZ2V0VmFyKGFuY2hvcklkLCBcXFxcXFxcIjBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVzYyA9PSBcXFxcXFxcIjBcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcXFxcXCJmbG9hdCYmc2NyZWVuLTE3MFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQsIFxcXFxcXFwiMVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFxcXFxcImZsb2F0JiYwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihhbmNob3JJZCwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBhbmNob3JJZCArIFxcXFxcXFwieDVcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbMF0udGl0bGUgPSBcXFxcXFxcIuWxleW8gC/mlLbotbdcXFxcXFxcIiArIGRbMF0udGl0bGU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihhbmNob3JJZCArIFxcXFxcXFwieDVcXFxcXFxcIiwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXFxcXFwiZmxvYXQmJjBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIGQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleHRyYSA9IGl0LmV4dHJhIHx8IHt9O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEuY2xzID0gXFxcXFxcXCJ4NWFpXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5leHRyYSA9IGV4dHJhO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhcXFxcXFxcIng1YWlcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihhbmNob3JJZCwgZCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0KFxcXFxcXFwiQUnljLnphY3miJDlip9cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwicGFyc2VMYXp5UnVsZUFzeW5jOlxcXFxcXFwiICsgZC5sZW5ndGgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZC5sZW5ndGggPiAwID8gXFxcXFxcXCIxXFxcXFxcXCIgOiBcXFxcXFxcIjBcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coZS50b1N0cmluZygpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgcnVsZSwgbG9jYXRpb24uaHJlZiwgYW5jaG9ySWQsIHdoaXRlKSwgJCQkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcXFxcXFxcIjBcXFxcXFxcIiA9PSBpbnB1dCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSB3aW5kb3cuY2hlY2tjICsgMTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmlmICh3aW5kb3cuY2hlY2tjID4gMTIwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCLmiafooYzotoXov4czMOenku+8jOaXoOazleino+aekFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyovXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCh3aW5kb3cuY2hlY2swLCAyNTApO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2t1cmwgPSBsb2NhdGlvbi5ocmVmO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2t1MCgpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHdpbmRvdy5jaGVja3VybCAhPSBsb2NhdGlvbi5ocmVmKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hhc2jlj5HnlJ/kuoblj5jljJZcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrYyA9IDA7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2swKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAyMDAwKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoY2hlY2t1MCwgMjUwKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja3UwKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS50b1N0cmluZygpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCh3aW5kb3cuY2hlY2swLCAyNTApO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICA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gICAgICBqc0xvYWRpbmdJbmplY3Q6IHRydWUsXFxcXG4gICAgICAgIGJsb2NrUnVsZXM6IFtcXFxcXFxcIi5naWZcXFxcXFxcIiwgXFxcXFxcXCIvYWQvXFxcXFxcXCIsIFxcXFxcXFwiL2Fkcy9cXFxcXFxcIiwgXFxcXFxcXCJnb29nbGVcXFxcXFxcIiwgXFxcXFxcXCIvc2gvdG8vXFxcXFxcXCIsIFxcXFxcXFwiLkdJRlxcXFxcXFwiXVxcXFxuICAgIH1cXFxcbn0pO1xcXFxuZC5wdXNoKHtcXFxcbiAgICBjb2xfdHlwZTogXFxcXFxcXCJsaW5lXFxcXFxcXCIsXFxcXG4gICAgZXh0cmE6IHtcXFxcbiAgICAgICAgaWQ6IGFuY2hvcklkXFxcXG4gICAgfVxcXFxufSk7XFxcXG5cXFxcbnNldFJlc3VsdChkKTtcXFwifV1cIixcInByb3h5XCI6XCJcIn0iLCJ0aXRsZSI6IuOAiumbqOmHkeefs+aImOiusOOAi+eUteW9semrmOa4heWujOaVtOeJiOWFjei0ueWcqOe6v+ingueci1/pm6jph5Hnn7PmiJjorrDnmb7luqbotYTmupDlnKjnur/op4LnnIst5peg5p6B55S15b2x572RIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement