Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@云盘君@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5LqR55uY5ZCbIiwiYXV0aG9yIjoi5bCP5qOJ6KKE8J+MniIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2Z5cGFnZSIsInZlcnNpb24iOjQsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBkID0gW107XG5sZXQgcjEgPSBmZXRjaChcImhpa2VyOi8vaG9tZUDkupHnm5jmsYflvbFcIik7XG5pZiAoIXIxIHx8IHIxLmxlbmd0aCA8PSA1KSB7XG4gICAgbGV0IHJ1ID0gJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgIHJldHVybiBcIua1t+mYlOinhueVjOinhOWImeWIhuS6q++8jOW9k+WJjeWIhuS6q+eahOaYr++8muWwj+eoi+W6j++/pWhvbWVfcnVsZV92Mu+/pWJhc2U2NDovL0DkupHnm5jmsYflvbFAZXlKc1lYTjBYMk5vWVhCMFpYSmZjblZzWlNJNklpSXNJblJwZEd4bElqb2k1THFSNTV1WTVyR0g1YjJ4SWl3aVlYVjBhRzl5SWpvaVRYSkdiSGtpTENKMWNtd2lPaUpvYVd0bGNqb3ZMMlZ0Y0hSNUpDUWtabmx3WVdkbElpd2lkbVZ5YzJsdmJpSTZOaXdpWTI5c1gzUjVjR1VpT2lKMFpYaDBYekVpTENKamJHRnpjMTl1WVcxbElqb2lJaXdpZEhsd1pTSTZJbUZzYkNJc0ltTnNZWE56WDNWeWJDSTZJaUlzSW1GeVp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QoXCIjbm9Mb2FkaW5nI1wiKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICBjbGVhckl0ZW0oXCJyXCIpO1xuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgIHJldHVybiBcImhpa2VyOi8vZW1wdHlcIlxuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiLFxuICAgICAgICBkZXNjOiBcIlwiLFxuICAgICAgICBwaWNfdXJsOiBcIlwiXG4gICAgfSk7XG4gICAgZm9yIChsZXQgaXQgb2YgcnVsZXMpIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBpdCA9PSByID8gXCLigJzigJxcIiArIGl0ICsgXCLigJ3igJ1cIiA6IGl0LFxuICAgICAgICAgICAgdXJsOiAkKFwiI25vTG9hZGluZyNcIikubGF6eVJ1bGUoKHIpID0+IHtcbiAgICAgICAgICAgICAgICBzZXRJdGVtKFwiclwiLCByKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBcImhpa2VyOi8vZW1wdHlcIlxuICAgICAgICAgICAgfSwgaXQpLFxuICAgICAgICAgICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiLFxuICAgICAgICAgICAgZGVzYzogXCJcIixcbiAgICAgICAgICAgIHBpY191cmw6IFwiXCJcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGQucHVzaCh7XG4gICAgICAgIGNvbF90eXBlOiAnbGluZScsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBpZDogJ3lwai1sJ1xuICAgICAgICB9XG4gICAgfSk7XG59XG5sZXQgcyA9IGdldE15VmFyKCdzJywgJycpO1xuaWYgKHMgIT0gXCJcIikge1xuICAgIGxldCBwID0gTVlfUEFHRTtcbiAgICBsZXQgZGF0YSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kYXRhXCIpKHAsIHIgIT0gXCJcIiA/IHIgOiBudWxsKTtcblxuICAgIGxldCBwYWdlaWQgPSBcInlwai1wYWdlXCIgKyBwO1xuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBcIuWKoOi9veesrFwiICsgcCArIFwi6aG15Lit77yM6L+b5bqm77yaMS9cIiArIGRhdGEubGVuZ3RoLFxuICAgICAgICAgICAgdXJsOiBcIlwiLFxuICAgICAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiLFxuICAgICAgICAgICAgZGVzYzogXCJcIixcbiAgICAgICAgICAgIHBpY191cmw6IFwiXCIsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIGlkOiBwYWdlaWRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuICAgIHNldFJlc3VsdChkKTtcbiAgICBsb2coZGF0YS5sZW5ndGgpO1xuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcbiAgICAgICAgLy/lpJrnur/nqIvliqDovb1cbiAgICAgICAgbGV0IHRhc2tzID0gZGF0YS5tYXAoaXQgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihydWxlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBydWxlLmZpbmQocyk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBwYXJhbTogaXQsXG4gICAgICAgICAgICAgICAgaWQ6IFwicnVsZUBcIiArIGl0Lm5hbWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGJhdGNoRXhlY3V0ZSh0YXNrcywge1xuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocGFyYW0sIGlkLCBlcnJvciwgcmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgLy9sb2coXCJsaXN0ZW5lcjogXCIgKyAocmVzdWx0IHx8IFtdKS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgcGFyYW0uaSA9IHBhcmFtLmkgKyAxO1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtLmogPSBwYXJhbS5qICsgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQmVmb3JlKHBhZ2VpZCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXQudGl0bGUuaW5jbHVkZXMoXCLigJzigJzigJ3igJ1cIikgPyBpdC50aXRsZSA6IFwi4oCc4oCc4oCd4oCdXCIgKyBpdC50aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAoXCI8ZW0+fDwvZW0+XCIsIFwiZ1wiKSwgXCJcIikucmVwbGFjZShuZXcgUmVnRXhwKHMsIFwiZ1wiKSwgXCI8c3Ryb25nPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogIzFFOTBGRlxcXCI+XCIgKyBzICsgXCI8L3NwYW4+PC9zdHJvbmc+XCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBpdC5kZXNjLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0LnVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaXQucGljX3VybCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGl0LnBpY191cmwgPyAnbW92aWVfMV92ZXJ0aWNhbF9waWMnIDogXCJ0ZXh0XzFcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcIl9fYXBwXCIgKyBNWV9QQUdFICsgXCJAXCIgKyBwYXJhbS5qXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxuXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5pID49IHBhcmFtLmFsbCkge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtKHBhZ2VpZClcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIuWKoOi9veesrFwiICsgTVlfUEFHRSArIFwi6aG15Lit77yM6L+b5bqm77yaXCIgKyAocGFyYW0uaSArIDEpICsgXCIvXCIgKyBwYXJhbS5hbGwsXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXCJ0ZXh0X2NlbnRlcl8xXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBhZ2VpZFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBwYXJhbToge1xuICAgICAgICAgICAgICAgIGFsbDogZGF0YS5sZW5ndGgsXG4gICAgICAgICAgICAgICAgaTogMCxcbiAgICAgICAgICAgICAgICBqOiAtMVxuIC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AgICAgICAgICAgIGxldCBpdCA9IGpzb24ucmVzdWx0Lml0ZW1zW2ldO1xcbiAgICAgICAgICAgIGxldCB1ID0gaXQucGFnZV91cmw7XFxuICAgICAgICAgICAgaWYgKHUuc3RhcnRzV2l0aChcXFwiZG93bmxvYWRcXFwiKSkge1xcbiAgICAgICAgICAgICAgICB1ID0gXFxcIng1UnVsZTovL2h0dHBzOi8vd3d3LnVweXVuc28uY29tL1xcXCIgKyB1ICsgXFxcIkBcXFwiICsgJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gbG9jYXRpb24uaHJlZlxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybC5zdGFydHNXaXRoKFxcXCJodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPScgKyB1cmwgKyAnPz9meXBhZ2UnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICB1cmw6IHUsXFxuICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT5VUOS6keaQnDwvZm9udD4mbmJzcDvmlLblvZXml7bpl7TvvJpcXFwiICsgaXQuaW5zZXJ0X3RpbWUgKyBcXFwiPGJyPlxcXCIgKyAoaXQuY29udGVudCB8fCBbXSkubWFwKGkxID0+IGkxLnRpdGxlKS5qb2luKFxcXCI8YnI+XFxcIiksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZDtcXG4gICAgfVxcbn0sIHtcXG4gICAgbmFtZTogXFxcIueMq+eLuOebmOaQnFxcXCIsXFxuICAgIGZpbmQ6IGZ1bmN0aW9uKHMpIHtcXG4gICAgICAgIGxldCBodG1sID0gcmVxdWVzdChcXFwiaHR0cHM6Ly93d3cuYWxpcGFuc291LmNvbS9zZWFyY2g/az1cXFwiICsgcywge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYWxpcGFuc291LmNvbVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBhcnIgPSBwZGZhKGh0bWwsIFxcXCIjYXBwJiZhXFxcIik7XFxuICAgICAgICAvL2xvZyhhcnIpO1xcbiAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgbGV0IGl0ID0gXFxcIjxkaXY+XFxcIiArIGFycltpXSArIFxcXCI8L2Rpdj5cXFwiO1xcbiAgICAgICAgICAgIGxldCB1ID0gcGRmaChpdCwgXFxcImEmJmhyZWZcXFwiKTtcXG4gICAgICAgICAgICAvL2xvZyh1KTtcXG4gICAgICAgICAgICBpZiAoIXUuaW5jbHVkZXMoXFxcIi9zL1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB1ID0gXFxcImh0dHBzOi8vd3d3LmFsaXBhbnNvdS5jb21cXFwiICsgdTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChpdCwgXFxcInRlbXBsYXRlJiZUZXh0XFxcIiksXFxuICAgICAgICAgICAgICAgIHVybDogJCh1KS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9saW5rcyA9IGh0bWwubWF0Y2goL2h0dHBzOlxcXFwvXFxcXC8od3d3XFxcXC5hbGl5dW5kcml2ZVxcXFwuY29tXFxcXC9zfGFseXdwXFxcXC5uZXQpXFxcXC9cXFxcdyovZykgfHwgW107XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhfbGlua3MpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKF9saW5rcy5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD0nICsgX2xpbmtzWzBdICsgJz8/ZnlwYWdlJztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmMTNiNjZhPueMq+eLuOebmOaQnDwvZm9udD4mbmJzcDtcXFwiICsgcGRmaChpdCwgXFxcInRlbXBsYXRlLDEmJlRleHRcXFwiKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBkO1xcbiAgICB9XFxufSwge1xcbiAgICBuYW1lOiBcXFwi5piT5pCcXFxcIixcXG4gICAgZmluZDogZnVuY3Rpb24ocykge1xcbiAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KFxcXCJodHRwczovL3lpc28uZnVuL2FwaS9zZWFyY2g/bmFtZT1cXFwiICsgcyArIFxcXCImcGFnZU5vPTFcXFwiLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3lpc28uZnVuL2luZm8/c2VhcmNoS2V5PVxcXCIgKyBzXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgYXJyID0gSlNPTi5wYXJzZShodG1sKS5kYXRhLmxpc3Q7XFxuICAgICAgICBsb2coYXJyKTtcXG4gICAgICAgIGxldCBkID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgICAgICBsZXQgdSA9IGl0LnVybDtcXG4gICAgICAgICAgICBpZiAodSA9PSBudWxsIHx8ICF1LmluY2x1ZGVzKFxcXCJhbGl5dW5cXFwiKSkge1xcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLigJzigJzigJ3igJ1cXFwiICsgaXQubmFtZSxcXG4gICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9JyArIHUgKyAnPz9meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+5piT5pCcPC9mb250PiZuYnNwO1xcXCIgKyAoaXQuZ210U2hhcmUgfHwgaXQuZ210Q3JlYXRlKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBkO1xcbiAgICB9XFxufV07XFxuXFxuLy/lubblj5Hop4TliJnmlbBcXG5sZXQgc2l6ZSA9IDEwO1xcblxcbiQuZXhwb3J0cyA9IGZ1bmN0aW9uKHBhZ2UsIHJ1bGUpIHtcXG4gICAgaWYgKCFwYWdlICYmICFydWxlKSB7XFxuICAgICAgICByZXR1cm4gcnVsZXMubWFwKGl0ID0+IGl0Lm5hbWUpO1xcbiAgICB9XFxuICAgIGlmIChydWxlICE9IG51bGwpIHtcXG4gICAgICAgIHJldHVybiBydWxlcy5maWx0ZXIoaSA9PiBpLm5hbWUgPT0gcnVsZSk7XFxuICAgIH1cXG4gICAgbGV0IHN0YXJ0ID0gKHBhZ2UgLSAxKSAqIHNpemU7XFxuICAgIGlmIChydWxlcy5sZW5ndGggPCBzdGFydCArIDEpIHtcXG4gICAgICAgIHJldHVybiBbXTtcXG4gICAgfVxcbiAgICBsZXQgbGVuID0gc2l6ZTtcXG4gICAgaWYgKHJ1bGVzLmxlbmd0aCA8IHBhZ2UgKiBzaXplKSB7XFxuICAgICAgICBsZW4gPSBydWxlcy5sZW5ndGggLSBzdGFydFxcbiAgICB9XFxuICAgIHJldHVybiBydWxlcy5zbGljZShzdGFydCwgc3RhcnQgKyBsZW4pO1xcbn1cIn1dIiwiaWNvbiI6IiIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment