Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@福利吧Ⓜ️@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi56aP5Yip5ZCn4pOC77iPIiwiYXV0aG9yIjoiIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSNmeUFsbCNmeXBhZ2UjaHR0cHM6Ly9mdWxpYmEyMDIxLm5ldCIsInZlcnNpb24iOjEsImNvbF90eXBlIjoibW92aWVfMV92ZXJ0aWNhbF9waWMiLCJjbGFzc19uYW1lIjoiIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG4vL+S7peS4i+aYryDliJfooajop6PmnpDop4TliJnvvIhKU++8iVxudmFyIHJlcyA9IHt9O1xudmFyIGl0ZW0gPSBbXTtcblxuLy8gdmFyIHR5cGU9TVlfVVJMLnNwbGl0KCcjJylbMV07XG52YXIgcGFnZT1NWV9VUkwuc3BsaXQoJyMnKVsyXTtcbnZhciBtVXJsPU1ZX1VSTC5zcGxpdCgnIycpWzNdO1xuXG5pZihnZXRNeVZhcignZnVsaWJhLnRpdGxlQ29sb3InKT09XCJcIikgcHV0TXlWYXIoJ2Z1bGliYS50aXRsZUNvbG9yJyxcIiNGQTcyOThcIik7XG5pZihnZXRNeVZhcignZnVsaWJhLmRlc2NDb2xvcicpPT1cIlwiKSBwdXRNeVZhcignZnVsaWJhLmRlc2NDb2xvcicsXCIjNzA4MDkwXCIpO1xuXG5pZihnZXRNeVZhcignZnVsaWJhLmNhdGVnb3J5TnVtJyk9PVwiXCIpIHB1dE15VmFyKCdmdWxpYmEuY2F0ZWdvcnlOdW0nLCcwJyk7XG5pZihnZXRNeVZhcignZnVsaWJhLnVyb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ZXROZXdUZXh0KGh0bWxMaXN0LCdkaXYnKSwgJ1RleHQnKTtcbiAgICAgICAgICAgICAgICBpZighdGVtcC5tYXRjaCgvXlxccyokLykgJiYgZ2V0TXlWYXIoJ2Z1bGliYS5zaG93TW9kZScpIT09JzEnKSBkLnB1c2goe3RpdGxlOiBodG1sTGlzdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH19KTtcbiAgICAgICAgICAgICAgICBodG1sTGlzdCA9ICcnO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGsgPSAwOyBrIDwgaW1nbGlzdC5sZW5ndGg7IGsrKyl7XG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOmltZ2xpc3Rba10sXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6Z2V0TXlWYXIoJ2Z1bGliYS5icm93c2VyTGluaycpK2ltZ2xpc3Rba10sXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpnZXRNeVZhcignZnVsaWJhLmJpZ0ltZycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9ICAgXG5cbiAgICAvL+WkjeadguaWh+acrC3nlLFIdG1s5qC85byPLeabv+aNouaOieWbvueJhy0tLeinhumikemTvuaOpeS5n+abv+aNoua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koY29udGVudCwvPGltZyhbXFxzXFxTXSo/KT4vZyk7XG4gICAgaWYoZ2V0TXlWYXIoJ2Z1bGliYS5zaG93TW9kZScpPT0nMScpe1xuICAgICAgICBsZXQgbWF0Y2hBcnJheSA9IGNvbnRlbnQubWF0Y2goLzxpbWcoW1xcc1xcU10qPyk+L2cpO1xuICAgICAgICBsZXQgaW1nbGlzdCA9ICcnO1xuICAgICAgICBpZiAobWF0Y2hBcnJheSAhPSBudWxsKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG1hdGNoQXJyYXkubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgcGljID0gbWF0Y2hBcnJheVtpXSAucmVwbGFjZVdpdGhDYWxsYmFjaygvPGltZyhbXFxzXFxTXSo/KT4vZywgJzxpbWcgZGF0YS12PicsIGltZ1RhZ1JlcGxhY2VtZW50T25lKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC88c2hvd2ltZy9nLCAnPGltZycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYoZ2V0TXlWYXIoJ2Z1bGliYS5oaWRlSW1nJykgPT0gJzAnKSBkLnB1c2goe3RpdGxlOiBwaWMsXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICB9fSk7XG4gICAgICAgICAgICAgICAgaW1nbGlzdCArPSBwaWM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYoZ2V0TXlWYXIoJ2Z1bGliYS5oaWRlSW1nJykgPT0gJzEnKSBkLnB1c2goe3RpdGxlOiBpbWdsaXN0LFxuICAgICAgICAgICAgICAgICAg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AgICAgICAgICAgIGlmKCF0ZW1wLm1hdGNoKC9eXFxzKiQvKSkgaHRtbExpc3QgKz0gJzxwPiZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOycgKyB0ZW1wICsgJzwvcD4nO1xuICAgICAgICAgICAgICAgIGlmKGo9PWNvbnRlbnRsaXN0Lmxlbmd0aC0xICYmIGh0bWxMaXN0ICE9PSAnJyl7XG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7dGl0bGU6IGh0bWxMaXN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgfX0pO1xuICAgICAgICAgICAgICAgICAgICBodG1sTGlzdCA9ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgIGlmKCF0ZW1wLm1hdGNoKC9eXFxzKiQvKSB8fCBxdW90ZUNvbnRlbnQuaW5jbHVkZXMoJ2Jsb2NrcXVvdGU+JykgfHwgKHF1b3RlQ29udGVudC5pbmNsdWRlcygnZGl2PicpICYmIHF1b3RlQ29udGVudC5tYXRjaCgvPChkaXYpKFtcXHNcXFNdKj8pPFxcLyhkaXYpPi9nKSA9PSBudWxsKSkgaHRtbExpc3QgKz0gcXVvdGVDb250ZW50O1xuXG4gICAgICAgICAgICAgICAgaWYocXVvdGVDb250ZW50Lm1hdGNoKC88aW1nKFtcXHNcXFNdKj8pPi9nKSAhPT0gbnVsbCB8fCBqPT1jb250ZW50bGlzdC5sZW5ndGgtMSl7XG4gICAgICAgICAgICAgICAgICAgIGlmKGdldE15VmFyKCdmdWxpYmEuc2hvd01vZGUnKSE9PScxJyAmJiBodG1sTGlzdCAhPT0gJycpIGQucHVzaCh7dGl0bGU6IGh0bWxMaXN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgfX0pO1xuICAgICAgICAgICAgICAgICAgICBodG1sTGlzdCA9ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZihxdW90ZUNvbnRlbnQubWF0Y2goLzxpbWcoW1xcc1xcU10qPyk+L2cpICE9PSBudWxsKSBkLnB1c2goe3RpdGxlOiBxdW90ZUNvbnRlbnQsXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgIH19KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cblxuXG5kLnB1c2goe2NvbF90eXBlOiAnbGluZV9ibGFuayd9KTtcbmxldCB0aXBzID0gJ+ivpeaWh+eroOadpea6kOS6juemj+WIqeWQp++8jOWmguaCqOWWnOasou+8jOivt+i/m+WFpeemj+WIqeWQp+e9kemhteeJiCc7XG5sZXQgd2FybmluZyA9ICfmraTop4TliJnku4XpmZDlrabkuaDkvb/nlKjvvIzlpoLmnInkuI3lpqXvvIzor7fmnKzlkKfkuLvogZTns7vmiJHliKDpmaQnO1xuXG4vLyBpZihnZXRNeVZhcignZnVsaWJhLnNob3dNb2RlJyk9PScwJyB8fCBnZXRNeVZhcignZnVsaWJhLnNob3dNb2RlJyk9PScyJyl7XG5pZihnZXRNeVZhcignZnVsaWJhLm9wZW5Db21tZW50Jyk9PScwJyl7XG4gICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL3BhZ2UvY29tbWVudFwiKSkucnVsZSk7XG5cbiAgICBkLnB1c2goe3RpdGxlOiBHZXRUaXBzKHRpcHMsd2FybmluZyksXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICB9fSk7XG4gICAgZC5wdXNoKHtjb2xfdHlwZTogJ2xpbmVfYmxhbmsnfSk7XG5cbiAgICBpZihjb21tZW50Lmxlbmd0aCA+IDApe1xuICAgICAgICBsZXQgY29tbWVudE51bSA9IHBhcnNlRG9tRm9ySHRtbChodG1sLCcuYXJ0aWNsZS1tZXRhJiZzcGFuLDImJlRleHQnKS5yZXBsYWNlKCfor4TorronLCfwn5Oi54Ot6K+E5pWwJyk7XG4gICAgICAgIGNvbW1lbnROdW0gPSBHZXRIb21lKDMpK2dldFN0cm9uZ1RleHQoZ2V0QmlnVGV4dChjb21tZW50TnVtKSk7XG4gICAgICAgIGZvciAobGV0IGwgPSAwOyBsIDwgY29tbWVudC5sZW5ndGg7IGwrKyl7XG4gICAgICAgICAgICBsZXQgbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoY29tbWVudFtsXSwnLmNvbW1lbnQnKTtcbiAgICAgICAgICAgIGQucHVzaCh7Y29sX3R5cGU6ICdsaW5lJ30pO1xuXG4gICAgICAgICAgICBmb3IgKGxldCBtID0gMDsgbSA8IGxpc3QubGVuZ3RoOyBtKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgZmxvb3IgPSAnJzsgbGV0IG1haW4gPSAnJzsgIGxldCBhdXRvciA9ICcnOyBsZXQgdGltZSA9ICcnO1xuICAgICAgICAgICAgICAgIHRyeXtcbiAgICAgICAgICAgICAgICAgICAgaWYobT09MCkgZmxvb3IgPSAn8J+PoicgKyBwYXJzZURvbUZvckh0bWwobGlzdFttXSwnLmNvbXQtZiYmVGV4dCcpLnJlcGxhY2UoJyMnLCcnKSsn5qW8JztcbiAgICAgICAgICAgICAgICB9Y2F0Y2goZSl7XG4gICAgICAgICAgICAgICAgICAgIGZsb29yID0gbCsn5qW85bGC6ZSZ6K+vISEhJyttXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRyeXtcbiAgICAgICAgICAgICAgICAgICAgbWFpbiA9ICBwYXJzZURvbUZvckh0bWwobGlzdFttXSwnLmNvbXQtbWFpbiYmcCYmVGV4dCcpO1xuICAgICAgICAgICAgICAgIH1jYXRjaChlKXtcbiAgICAgICAgICAgICAgICAgICAgbWFpbiA9IGwrJ+WbnuWkjeWGheWuuemUmeivryEhIScrbVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0cnl7XG4gICAgICAgICAgICAgICAgICAgIGF1dG9yID0gJ/CfkbEnICsgcGFyc2VEb21Gb3JIdG1sKGxpc3RbbV0sJy5jb210LWF1dGhvciYmVGV4dCcpO1xuICAgICAgICAgICAgICAgIH1jYXRjaChlKXtcbiAgICAgICAgICAgICAgICAgICAgYXV0b3IgPSBsKyfkvZzogIXlkI3np7DplJnor68hISEnK21cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdHJ5e1xuICAgICAgICAgICAgICAgICAgICB0aW1lID0gJ/CflaInICsgcGFyc2VEb21Gb3JIdG1sKGxpc3RbbV0sJy5jb210LW1ldGEtLXNwYW4mJlRleHQnKS5yZXBsYWNlKCflm57lpI0nLCcnKTtcbiAgICAgICAgICAgICAgICB9Y2F0Y2goZSl7XG4gICAgICAgICAgICAgICAgICAgIHRpbWUgPSBsKyfml7bpl7TplJnor68hISEnK21cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBsZXQgY29tbWVudFRleHQgPSBHZXRDb21tZW50KG1haW4sYXV0b3IsdGltZSxmbG9vcik7XG4gICAgICAgICAgICAgICAgaWYobD09MCAmJiBtPT0wKSBjb21tZW50VGV4dCA9IGNvbW1lbnROdW0gKyc8YnI+PGJyPicrIGNvbW1lbnRUZX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