Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@鸡鸡鸡@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6bih6bih6bihIiwiYXV0aG9yIjoiUiIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2h0dHBzOi8vd3d3LmppamlqaS50b3AvIyNmeXBhZ2UiLCJ2ZXJzaW9uIjoyMDI0MTIyNCwiY29sX3R5cGUiOiJtb3ZpZV8yIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuJC5yZXF1aXJlKFwieWlcIikiLCJzZWFyY2hfdXJsIjoiaGlrZXI6Ly9lbXB0eSMjIiwiZ3JvdXAiOiLikaPmhI8iLCJzZWFyY2hGaW5kIjoianM6XG4kLnJlcXVpcmUoXCJ5aVwiKSIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6IiIsInBhZ2VzIjoiW3tcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLkuIDnuqdcIixcInBhdGhcIjpcInlpXCIsXCJydWxlXCI6XCJqczpcXG4gICAgdmFyIGQgPSBbXVxcbmV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL01ldGhvZFxcXCIsIHt9KSkucnVsZSk7XFxuLy9NWV9VUkwgPSBNWV9VUkwuc3BsaXQoXFxcI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4gICAgICAgIHRpdGxlOiBcXFwi6aaW6aG1XFxcIixcXG4gICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICBwdXRNeVZhcihcXFwicGFnZVxcXCIsIFxcXCIxXFxcIik7XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgfSksXFxuICAgIH0sIHtcXG4gICAgICAgIHRpdGxlOiBcXFwi5LiK6aG1XFxcIixcXG4gICAgICAgIGpzOiAkLnRvU3RyaW5nKChwYWdlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKHBhZ2UgPiAxKSB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJwYWdlXFxcIiwgKHBhcnNlSW50KHBhZ2UpIC0gMSkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHBhZ2UpLFxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogXFxcIuesrFxcXCIgKyBwYWdlICsgXFxcIumhtVxcXCIsXFxuICAgICAgICBqczogXFxcIlxcXCIsXFxuICAgIH0sIHtcXG4gICAgICAgIHRpdGxlOiBcXFwi6Lez6L2sXFxcIixcXG4gICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gJChcXFwiXFxcIikuaW5wdXQoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwicGFnZVxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pLFxcbiAgICB9XTtcXG4gICAgaWYgKHR5cGVvZihwYWdlcykgIT0gJ3VuZGVmaW5lZCcpIHtcXG4gICAgICAgIHZhciBleHRyYTEgPSB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLlsL7pobVcXFwiICsgcGFnZXMsXFxuICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHBhZ2VzKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJwYWdlXFxcIiwgcGFnZXMpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgIH0sIHBhZ2VzKSxcXG4gICAgICAgIH07XFxuICAgICAgICBsb25nQ2xpY2sucHVzaChleHRyYTEpXFxuICAgIH1cXG4gICAgcmV0dXJuIGxvbmdDbGlja1xcbn0gLy/plb/mjInot7PpobVcXG5cXG4vL2RhdGHovazmlbDnu4RcXG5mdW5jdGlvbiBkYXRhX3RodW1iKGluZGV4LCBkYXRhLCBob3N0KSB7XFxuICAgIHZhciBoID0gZmV0Y2goaG9zdCk7XFxuICAgIGlmICghZGF0YS7liIbnsbspIHtcXG4gICAgICAgIHZhciBjX+agh+mimCA9IGRhdGEu5qCH6aKYLnNwbGl0KCcmJyk7XFxuICAgICAgICBpZiAoZGF0YS7pk77mjqUgPT0gJycpIHtcXG4gICAgICAgICAgICB2YXIgY1/pk77mjqUgPSBjX+agh+mimDtcXG4gICAgICAgIH0gZWxzZSBpZiAoZGF0YS7pk77mjqUgPT0gJ0BAQCcpIHtcXG4gICAgICAgICAgICB2YXIgY1/pk77mjqUgPSBkYXRhLuagh+mimC5yZXBsYWNlKC9eLio/Ji8sICcmJykuc3BsaXQoJyYnKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGNf6ZO+5o6lID0gZGF0YS7pk77mjqUuc3BsaXQoJyYnKTtcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIHZhciDliIbnsbsgPSBwZGZhKGgsIGRhdGEu5YiG57G7KTtcXG4gICAgICAgIGlmICgoJ+WinuWKoCcgaW4gZGF0YSkpIHtcXG4gICAgICAgICAgICBpZiAoZGF0YS7lop7liqAuY29uc3RydWN0b3IgPT0gU3RyaW5nKSB7XFxuICAgICAgICAgICAgICAgIGRhdGEu5aKe5YqgID0gZXZhbChkYXRhLuWinuWKoCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIOWIhuexuyA9IGRhdGEu5aKe5YqgLmNvbmNhdCjliIbnsbspO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKCgn6KGl5YWFJyBpbiBkYXRhKSkge1xcbiAgICAgICAgICAgIGlmIChkYXRhLuihpeWFhS5jb25zdHJ1Y3RvciA9PSBTdHJpbmcpIHtcXG4gICAgICAgICAgICAgICAgZGF0YS7ooaXlhYUgPSBldmFsKGRhdGEu6KGl5YWFKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAg5YiG57G7ID0g5YiG57G7LmNvbmNhdChkYXRhLuihpeWFhSk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgY1/moIfpopggPSAhZGF0YS7moIfpopggPyDliIbnsbsubWFwKGkgPT4gcGRmaChpLCBcXFwiYSYmVGV4dFxcXCIpKSA6IOWIhuexuy5tYXAoaSA9PiBwZGZoKGksIGRhdGEu5qCH6aKYKSk7XFxuICAgICAgICB2YXIgY1/pk77mjqUgPSAhZGF0YS7pk77mjqUgPyDliIbnsbsubWFwKGkgPT4gcGRmaChpLCBcXFwiYSYmaHJlZlxcXCIpKSA6IOWIhuexuy5tYXAoaSA9PiBwZGZoKGksIGRhdGEu6ZO+5o6lKSk7XFxuICAgIH1cXG4gICAgdmFyIGRhdGFfY2xhc3MgPSB7XFxuICAgICAgICBjX+agh+mimDogY1/moIfpopgsXFxuICAgICAgICBjX+mTvuaOpTogY1/pk77mjqVcXG4gICAgfVxcbiAgICByZXR1cm4gZGF0YV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sZSwgdiwgYykgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAobW9kZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoYyArIGluZGV4LCBpZCk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihjLCBpZCk7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBuID0gdjsgbiA8PSAyMDsgbisrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoYyArICdpbmRleCcgKyBuLCAnLTEnKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdwYWdlJyk7XFxuICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ3VybCcpO1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihjICsgJ2luZGV4JyArIGluZGV4LCBpbmRleF9jKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICB9LCBpbmRleCwgY1/pk77mjqVbaW5kZXhfY10sIGluZGV4X2MsIGhvc3QsIG1vZGUsIHRpdGxlLCB2LCBjKSxcXG4gICAgICAgIH0pO1xcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snLFxcbiAgICB9KTtcXG4gICAgcmV0dXJuIGQ7XFxufVxcblxcbmZ1bmN0aW9uIOWIhuexuyhkYXRhLCBuYW1lLCBob3N0LCBkLCBtb2RlLCBzZWFyY2gsIHRpdGxlLCBkZXNjKSB7XFxuICAgIGlmICghZmlsZUV4aXN0KG5hbWUgKyAnLnR4dCcpIHx8ICFmaWxlRXhpc3QoJ2hvc3QudHh0JykgfHwgZmlsZUV4aXN0KCdob3N0LnR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IG1vZGUpO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICB2YXIgZGF0YV9sb2NhbCA9IEpTT04ucGFyc2UocmVhZEZpbGUobmFtZSArICcudHh0JywgMCkgfHwgJ1tdJyk7XFxuICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgZGF0YV9sb2NhbC5mb3JFYWNoKChpdGVtLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICBjbGFzc1RvcChpbmRleCwgaXRlbSwgaG9zdCwgZCwgbW9kZSk7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBpZiAoc2VhcmNoKSB7XFxuICAgICAgICBzZWFyY2hNYWluKGQsIHRpdGxlLCBkZXNjKVxcbiAgICB9XFxufVxcbi8v5pCc57SiXFxuZnVuY3Rpb24gc2VhcmNoTWFpbihkLCB0aXRsZSwgZGVzYykge1xcbiAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiB0aXRsZSA/IHRpdGxlIDogJ+aQnOe0oicsXFxuICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChyKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcigna2V5d29yZCcsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3NlYXJjaD9ydWxlPScgKyByICsgJyZzPScgKyBpbnB1dDtcXG4gICAgICAgICAgICB9LCBNWV9SVUxFLnRpdGxlKSxcXG4gICAgICAgICAgICBkZXNjOiBkZXNjID8gZGVzYyA6ICfmkJzkvaDmg7PopoHnmoQuLi4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCdrZXl3b3JkJywgJycpLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIHJldHVybiBkO1xcbn1cIn1dIiwiaWNvbiI6Imh0dHBzOi8vaW1nLnZpbnVhLmNuL2ltYWdlcy9JNzBuVi5qcGVnIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment