Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@剪贴板@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6IuWJqui0tOadvyIsImF1dGhvciI6IkAiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNmeWNsYXNzIyNmeXBhZ2UiLCJ2ZXJzaW9uIjowLCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoi5bCP56iL5bqPJue9kemhtSIsInR5cGUiOiJvdGhlciIsImNsYXNzX3VybCI6ImFwcCZ3ZWIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1ZX1VSTClcbnZhciB4NXBhZ2UgPSBnZXRWYXIoTVlfUlVMRS50aXRsZSArIFwiY2xpcGJvYXJkXCIsIFwiXCIpO1xuaWYgKHg1cGFnZSAhPSBcIlwiICYmIHg1cGFnZSAhPSBcIjFcIikge1xuICAgIHB1dE15VmFyKFwicGFnZVwiLCBTdHJpbmcoeDVwYWdlKSk7XG4gICAgY2xlYXJWYXIoTVlfUlVMRS50aXRsZSArIFwiY2xpcGJvYXJkXCIpO1xufTtcbk1ZX1VSTCA9IE1ZX1VSTC5zcGxpdChcIiMjXCIpWzFdO1xudmFyIGQgPSBbXTtcbnZhciB1cmwgPSAnaHR0cHM6Ly9wYXN0ZWJpbi5jb20vdS94aWFvbWlhbmFvNjY2LycgKyBnZXRNeVZhcihcInBhZ2VcIiwgXCIxXCIpO1xuXG5pZiAoTVlfVVJMID09IFwid2ViXCIpIHtcbiAgICBkLnB1c2goe1xuICAgICAgICBkZXNjOiAnZmxvYXQmJnRvcCcsXG4gICAgICAgIHVybDogdXJsLFxuICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJyxcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIHVybEludGVyY2VwdG9yOiAkLnRvU3RyaW5nKChNWV9SVUxFKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGlucHV0LmluY2x1ZGVzKCcjaW1wb3J0JykpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKFwiaHR0cHM6Ly9wYXN0ZWJpbi5jb20vXCIsIFwiaHR0cHM6Ly9wYXN0ZWJpbi5jb20vcmF3L1wiKS5yZXBsYWNlKFwiI2ltcG9ydFwiLCBcIlwiKTtcbiAgICAgICAgICAgICAgICAgICAgbG9nKGlucHV0KTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGlucHV0LnNwbGl0KFwiJlwiKVswXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2UgPSBpbnB1dC5zcGxpdChcIiZcIilbMV07XG4gICAgICAgICAgICAgICAgICAgIGxvZyhwYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KHVybCk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBhcnIgPSBwZGZhKGh0bWwsIFwiYm9keVwiKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRleHQgPSBhcnIubWFwKGl0ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwZGZoKGl0LCBcImJvZHkmJlRleHRcIik7XG4gICAgICAgICAgICAgICAgICAgIH0pLmpvaW4oXCImJlwiKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHRleHQsIE1ZX1JVTEUsIHBhZ2UpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5wdXRWYXIoTVlfUlVMRS50aXRsZSArIFwiY2xpcGJvYXJkXCIsIHBhZ2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ5X2JyaWRnZV9hcHAuaW1wb3J0UnVsZSh0ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgfSwgdGV4dCwgTVlfUlVMRSwgcGFnZSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCBNWV9SVUxFKSxcbiAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh0aXRsZSkgPT4ge1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGltZ3MoKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBkb2N1bWVudC5sb2NhdGlvbi5ocmVmO1xuICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZSA9IDE7XG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFwvXFxkKyQvLnRlc3QodXJsKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZSA9IHVybC5zcGxpdChcIi9cIikuc2xpY2UoLTEpWzBdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYWdlID4gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhwYWdlKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGZiYS5wdXRWYXIodGl0bGUgKyBcImNsaXBib2FyZFwiLCBwYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGFyciA9IEFycmF5LmZyb20oZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcInRhYmxlIGFcIikpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdHMgPSBhcnIuZmlsdGVyKHggPT4gIXguaHJlZi5pbmNsdWRlcygnL2FyY2hpdmUvamF2YXNjcmlwdCcpKTtcbiAgICAgICAgICAgICAgICAgICAgbGlzdHMuZm9yRWFjaCh4ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh4LmhyZWYuaW5jbHVkZXMoXCIjaW1wb3J0XCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgeC5ocmVmID0geC5ocmVmICsgXCIjaW1wb3J0JlwiICsgcGFnZTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpbWdzKCk7XG4gICAgICAgICAgICAgICAgLy8g6K6w5b2V5YmN5LiA5Liq5rua5Yqo5L2N572uXG4gICAgICAgICAgICAgICAgbGV0IGJlZm9yZVNjcm9sbFRvcCA9IDA7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBoYW5kbGVTY3JvbGwoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIOi3nemhtumDqFxuICAgICAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsVG9wID1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5zY3JvbGxUb3AgfHwgZG9jdW1lbnQuYm9keS5zY3JvbGxUb3A7XG4gICAgICAgICAgICAgICAgICAgIC8vIOWPr+inhuWMuumrmOW6plxuICAgICAgICAgICAgICAgICAgICB2YXIgY2xpZW50SGVpZ2h0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5jbGllbnRIZWlnaHQgfHwgZG9jdW1lbnQuYm9keS5jbGllbnRIZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgIC8vIOa7muWKqOadoeaAu+mrmOW6plxuICAgICAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsSGVpZ2h0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5zY3JvbGxIZWlnaHQgfHwgZG9jdW1lbnQuYm9keS5zY3JvbGxIZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgIC8vIOehruWumua7muWKqOaWueWQkVxuICAgICAgICAgICAgICAgICAgICBpZiAoc2Nyb2xsVG9wID49IGJlZm9yZVNjcm9sbFRvcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8g5rua5Yqo6Kem5bqVXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2Nyb2xsVG9wICsgY2xpZW50SGVpZ2h0ID49IHNjcm9sbEhlaWdodCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZyhcIua7muWKqOinpuW6lVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY291bnRlciA9IDA7IC8vIOiuoeaVsOWZqO+8jOeUqOS6juiusOW9leW3sue7j+aJp+ihjOeahOasoeaVsFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpbnRlcnZhbElkID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZygn5omn6KGM5pON5L2cJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRlcisrO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb3VudGVyID49IDE1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2ZiYS5sb2coJ+WBnOatouaJp+ihjCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnRlcnZhbElkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDUwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYmVmb3JlU2Nyb2xsVG9wID0gc2Nyb2xsVG9wO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIOiKgua1gVxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRocm90dGxlKGYsIHcpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+aJp+ihjOaTjeS9nCjkvb/nlKhhcHBseemHjeaWsOe7keWumnRoaXPnmoTmjIflkJEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgdyk7XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIOebkeWQrOa7muWKqFxuICAgICAgICAgICAgICAgIGRvY3VtZW50Lm9uc2Nyb2xsID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm90dGxlKGhhbmRsZVNjcm9sbCgpLCAxMDAwMCk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0sIE1ZX1JVTEUudGl0bGUpXG4gICAgICAgIH1cbiAgICB9KTtcbn1cblxuXG5mdW5jdGlvbiBmb3JtYXREYXRlKGRhdGVTdHJpbmcpIHtcbiAgICB2YXIgZGF0ZVJlZ2V4ID0gLyhcXHd7M30pXFxzKFxcZHsxLDJ9KShzdHxuZHxyZHx0aCksXFxzKFxcZHs0fSkvO1xuICAgIHZhciBtYXRjaCA9IGRhdGVTdHJpbmcubWF0Y2goZGF0ZVJlZ2V4KTtcblxuICAgIGlmIChtYXRjaCkge1xuICAgICAgICB2YXIgbW9udGggPSBtYXRjaFsxXTtcbiAgICAgICAgdmFyIGRheSA9IG1hdGNoWzJdO1xuICAgICAgICB2YXIgeWVhciA9IG1hdGNoWzRdO1xuXG4gICAgICAgIC8vIOWwhuaciOS7vei9rOaNouS4uuaVsOWtl+ihqOekulxuICAgICAgICB2YXIgbW9udGhNYXAgPSB7XG4gICAgICAgICAgICBKYW46ICcwMScsXG4gICAgICAgICAgICBGZWI6ICcwMicsXG4gICAgICAgICAgICBNYXI6ICcwMycsXG4gICAgICAgICAgICBBcHI6ICcwNCcsXG4gICAgICAgICAgICBNYXk6ICcwNScsXG4gICAgICAgICAgICBKdW46ICcwNicsXG4gICAgICAgICAgICBKdWw6ICcwNycsXG4gICAgICAgICAgICBBdWc6ICcwOCcsXG4gICAgICAgICAgICBTZXA6ICcwOScsXG4gICAgICAgICAgICBPY3Q6ICcxMCcsXG4gICAgICAgICAgICBOb3Y6ICcxMScsXG4gICAgICAgICAgICBEZWM6ICcxMidcbiAgICAgICAgfTtcbiAgICAgICAgbW9udGggPSBtb250aE1hcFttb250aF07XG5cbiAgICAgICAgdmFyIGZvcm1hdHRlZERhdGUgPSB5ZWFyICsgJy0nICsgbW9udGggKyAnLScgKyBkYXkudG9TdHJpbmcoKS5wYWRTdGFydCgyLCAnMCcpO1xuICAgICAgICByZXR1cm4gZm9ybWF0dGVkRGF0ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gJ+aXoOazleino+aekOaXpeacnyc7XG4gICAgfVxufVxuXG5cbmxldCBzaW5kZXggPSBnZXRJdGVtKFwic2lcIiwgXCIwXCIpO1xubGV0IHRpdGxlcyA9IFt7XG4gICAgdGl0bGU6IFwi5bCP56iL5bqPXCIsXG4gICAgbHRpdGxlOiBcIuWwj+eoi+W6j++8mlwiXG59LCB7XG4gICAgdGl0bGU6IFwi5LiA6LW355yLXCIsXG4gICAgbHRpdGxlOiBcIumCgOaCqOS4gOi1t+eci++8mlwiXG59LCB7XG4gICAgdGl0bGU6IFwi5o+S5Lu2XCIsXG4gICAgbHRpdGxlOiBcIuaPkuS7tuWQje+8mlwiXG59XVxuXG5pZiAoTVlfVVJMLmluY2x1ZGVzKFwiYXBwXCIpKSB7XG4gICAgbGV0IHBhZ2UgPSBnZXRNeVZhcihcInBhZ2VcIiwgU3RyaW5nKE1ZX1BBR0UpKTtcbiAgICBsb2cocGFnZSlcbiAgICBcbiAgICBNWV9VUkwgPSB1cmwucmVwbGFjZSgvXFwvKFxcZCkrJC9nLCBcIi9cIitwYWdlKTtcbiAgICBsb2coTVlfVVJMKVxuICAgIHZhciBodG1sID0gZmV0Y2goTVlfVVJMKTtcbiAgICByZWZyZXNoWDVEZXNjKCcwJyk7XG4gICAgcmVmcmVzaFg1V2ViVmlldyhcImhpa2VyOi8vZW1wdHlcIik7XG4gICAgdmFyIGQgPSBbXTtcbiAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XG4gICAgICAgIGxldCBTWSA9IHBkZmEoaHRtbCwgXCIuZGV0YWlscyYmLmluZm8tYmFyXCIpO1xuICAgICAgICBmb3IgKGxldCBpdCBvZiBTWSkge1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiPjxiaWc+PGZvbnQgY29sb3I9XCIjMzQyYTJiXCI+JyArIHBkZmgoaXQsIFwiaDEmJlRleHRcIikgKyAnPC9mb250PjwvYmlnPjwvYj4nLFxuICAgICAgICAgICAgICAgIGRlc2M6ICfigJjigJjigJnigJk8c21hbGw+PGZvbnQgY29sb3I9XCIjYmJiZGI1XCI+dmlld3PvvJonICsgcGRmaChpdCwgXCJzcGFuJiZUZXh0XCIpICsgJzwvZm9udD48L3NtYWxsPicsXG4gICAgICAgICAgICAgICAgdXJsOiAnaHR0cHM6Ly9wYXN0ZWJpbi5jb20vdS94aWFvbWlhbmFvNjY2JyxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXCJ0ZXh0XzFcIixcbiAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFwibGluZV9ibGFua1wiXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ3BhZ2UnLCAnJykgIT0gJycpIHtcbiAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08c21hbGw+JyArICfmuIXpmaTnv7vpobXmlbDmja4nLmZvbnRjb2xvcihcImdyYXlcIikgKyAnPC9zbWFsbD4nLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXG4gICAgICAgICAgICAgICAgdXJsOiAkKFwiI25vTG9hZGluZyNcIikubGF6eVJ1bGUoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdwYWdlJyk7XG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/muIXpmaTlrozmiJAnO1xuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgZC5wdXNoKHtjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIn0pO1xuICAgICAgICBkLnB1c2goe2NvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wifSk7XG5cbiAgICAgICAgdGl0bGVzLmZvckVhY2goKHgsIGkpID0+IHtcbiAgICAgICAgICAgIGxldCB0aXRsZSA9IHgudGl0bGU7XG4gICAgICAgICAgICBpZiAoc2luZGV4ID09IGkpIHtcbiAgICAgICAgICAgICAgICB0aXRsZSA9IHRpdGxlLmZvbnRjb2xvcihcIiMxN0I1NkFcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdJyArIHRpdGxlLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICAgICAgdXJsOiAkKFwiI25vTG9hZGluZyNcIikubGF6eVJ1bGUoKGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcInNpXCIsU3RyaW5nKGkpKTtcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiO1xuICAgICAgICAgICAgICAgIH0saSlcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH0pXG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICBjb2xfdHlwZTonYmxhbmtfYmxvY2snLFxuICAgICAgICB9KVxuICAgIH1cbiAgICBsZXQgaWk9MTtcbiAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcInRib2R5JiZ0clwiKTtcbiAgICBmb3IgKGxldCBpdCBvZiBhcnIpIHsgICAgICAgIFxuICAgICAgICBpZighaXQuaW5jbHVkZXModGl0bGVzW3NpbmRleF0ubHRpdGxlKSl7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBsZXQgZGUgPSBmb3JtYXREYXRlKHBkZmgoJzx0YWJsZT4nICsgaXQgKyAnPC90YWJsZT4nLCBcIi5oXzY0MCYmVGV4dFwiKSlcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiAnPGI+PHNtYWxsPjxmb250IGNvbG9yPVwiIzUzNWMzMFwiPicgKyBwZGZoKGl0LCBcImEmJlRleHRcIikucmVwbGFjZSh0aXRsZXNbc2luZGV4XS5sdGl0bGUsXCJcIikgKyAnPC9mb250Pjwvc21hbGs+PC9iPicsXG4gICAgICAgICAgICBkZXNjOiAnPHNtYWxsPicgKyBkZSArICc8L3NtYWxsPicsXG4gICAgICAgICAgICB1cmw6ICQocGQoaXQsIFwiYSYmaHJlZlwiKS5yZXBsYWNlKFwiaHR0cHM6Ly9wYXN0ZWJpbi5jb20vXCIsIFwiaHR0cHM6Ly9wYXN0ZWJpbi5jb20vcmF3L1wiKSkubGF6eVJ1bGUoKHBhZ2UpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoaW5wdXQpO1xuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBwZGZhKGh0bWwsIFwiYm9keVwiKTtcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcInBhZ2VcIiwgcGFnZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFyci5tYXAoaXQgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGRmaChpdCwgXCJib2R5JiZUZXh0XCIpO1xuICAgICAgICAgICAgICAgIH0pLmpvaW4oXCImJlwiKVxuICAgICAgICAgICAgfSwgcGFnZSksXG4gICAgICAgICAgICBjb2xfdHlwZTogXCJhdmF0YXJcIixcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlLFxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaWkrKztcbiAgICB9XG4gICAgcHV0TXlWYXIoXCJkY250XCIsU3RyaW5nKGlpKSk7XG4gICAgdmFyIHRvdGFsY291bnQgPSBnZXRNeVZhcihcInRjXCIsIFwiXCIpO1xuICAgIGlmICh0b3RhbGNvdW50ID09IFwiXCIpIHtcbiAgICAgICAgdG90YWxjb3VudCA9IHBkZmgoaHRtbCwgXCJhOm1hdGNoZXMoT2xkZXN0KSYmaHJlZlwiKS5zcGxpdChcIi9cIikuc2xpY2UoLTEpWzBdO1xuICAgICAgICBwdXRNeVZhcihcInRjXCIsIHRvdGFsY291bnQpO1xuICAgIH1cblxuICAgIGZvciAobGV0IGkgPSBOdW1iZXIocGFnZSk7IGkgPCBOdW1iZXIodG90YWxjb3VudCkgKyAxOyBpKyspIHtcbiAgICAgICAgbGV0IHAgPSBOdW1iZXIocGFnZSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyAocCA9PSBpID8gaS50b1N0cmluZygpLmZvbnRjb2xvcihcInJlZFwiKSA6IGkudG9TdHJpbmcoKSksXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgICAgICAgICAgdXJsOiAkKFwiI25vTG9hZGluZyNcIikubGF6eVJ1bGUoKGkpID0+IHtcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcInBhZ2VcIiwgaSArIFwiXCIpO1xuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiXG4gICAgICAgICAgICB9LCBpKVxuICAgICAgICB9KVxuICAgIH1cbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTon4oCc4oCc4oCd4oCdPHNtYWxsPuW9k+WJjeesrCcrcGFnZSsn6aG1Jysn5YWx77yaJytnZXRNeVZhcihcInRjXCIsIHRvdGFsY291bnQpKycg5b2T5YmN6aG16Z2i5pyJ77yaJytnZXRNeVZhcihcImRjbnRcIixcIjFcIikrJ+mhuTwvc21hbGw+JyxcbiAgICAgICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxuICAgICAgICB1cmw6J3RvYXN0Oi8v5oiR5piv5o+Q56S6JyxcbiAgICAgICAgZXh0cmE6e1xuICAgICAgICAgICAgbGluZVZpc2libGU6ZmFsc2UsXG4gICAgICAgIH0gICAgICAgIFxuICAgIH0pXG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6ICfkuIrkuIDpobUnLFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfMycsXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFnZSwgdGMpID0+IHtcbiAgICAgICAgICAgIC8vcGFnZSA9IGdldE15VmFyKFwicGFnZVwiLCBTdHJpbmcocGFnZSkpO1xuICAgICAgICAgICAgLy9wYWdlPXBhcnNlSW50KHBhZ2UpO1xuICAgICAgICAgICAgcHV0TXlWYXIoXCJwYWdlXCIsIHBhZ2UgLSAxID4gMSA/IChwYWdlIC0gMSkudG9TdHJpbmcoKSA6IFwiMVwiKTtcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL2VtcHR5XCI7XG4gICAgICAgIH0sIHBhZ2UsIE51bWJlcih0b3RhbGNvdW50KSksXG4gICAgfSwge1xuICAgICAgICB0aXRsZTogJ+i3s+mhtScsXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF8zJyxcbiAgICAgICAgdXJsOiAkKFwiMVwiLCBcIuivt+i+k+WFpemhteaVsCzmgLvpobXmlbA6IFwiICsgZ2V0TXlWYXIoXCJ0Y1wiLCBcIjFcIikpLmlucHV0KCgpID0+IHtcbiAgICAgICAgICAgIHZhciBwID0gcGFyc2VJbnQoaW5wdXQpO1xuICAgICAgICAgICAgdmFyIGMgPSBnZXRNeVZhcihcInRjXCIsIFwiMVwiKTtcbiAgICAgICAgICAgIGlmIChwID09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+S4jeiDveS4ujBcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChwID4gcGFyc2VJbnQoYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+i2heWHuuiMg+WbtFwiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcHV0TXlWYXIoXCJwYWdlXCIsIHApO1xuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgfSlcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn5LiL5LiA6aG1JyxcbiAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzMnLFxuICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhZ2UsIHRjKSA9PiB7XG4gICAgICAgICAgICBwYWdlID0gZ2V0TXlWYXIoXCJwYWdlXCIsIFN0cmluZyhwYWdlKSk7XG4gICAgICAgICAgICBwYWdlPXBhcnNlSW50KHBhZ2UpO1xuICAgICAgICAgICAgcHV0TXlWYXIoXCJwYWdlXCIsIHBhZ2UgKyAxIDwgdGMgPyBTdHJpbmcocGFnZSArIDEpIDogdGMudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiO1xuICAgICAgICB9LCBwYWdlLCBOdW1iZXIodG90YWxjb3VudCkpLFxuICAgIH0pXG59XG5cbnNldFJlc3VsdChkKSIsInNlYXJjaF91cmwiOiIiLCJncm91cCI6Iu+8g++8gzfig6PotYTmupAiLCJzZWFyY2hGaW5kIjoiIiwiZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsImRldGFpbF9maW5kX3J1bGUiOiIiLCJzZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsInNkZXRhaWxfZmluZF9ydWxlIjoiIiwidWEiOiJtb2JpbGUiLCJwcmVSdWxlIjoiIiwicGFnZXMiOiJbXSIsImljb24iOiIiLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment