Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_含羞草-源码@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDlkKvnvp7ojYkKLy8gQG5hbWVzcGFjZSAgICBodHRwOi8vdGFtcGVybW9ua2V5Lm5ldC8KLy8gQHZlcnNpb24gICAgICAxLjEKLy8gQGRlc2NyaXB0aW9uICDlkKvnvp7ojYkt6Kej5p6Q6ISa5pys77yM5rC45LmF5a+86IiqaHR0cDovL3d3dy5GaTExLnR2IOS4rei9rOWcsOWdgO+8mmh0dHA6Ly93d3cucG1lYXF2ZS5jbgovLyBAYXV0aG9yICAgICAgIOmZoumVvwovLyBAaW5jbHVkZSAgICAgIC9eLio/Oi8vLio/XC5maS4qP1wuY29tLiskLwovLyBAaW5jbHVkZSAgICAgIC9eLio/Oi8vLio/XC5oeC4qP1wuY29tLiskLwovLyBAaW5jbHVkZSAgICAgIC9eLio/Oi8vLio/XC4uKj9cLmNvbS4rJC8KLy8gQGluY2x1ZGUgICAgICAvXi4qPzovLy4qP1wuLio/XC5jbi4rJC8KLy8gQGljb24gICAgICAgICBodHRwczovL3d3dy5nb29nbGUuY29tL3MyL2Zhdmljb25zP3N6PTY0JmRvbWFpbj0za2pzLmNvbQovLyBAZ3JhbnQgICAgICAgIG5vbmUKLy8gQHJlcXVpcmUgICAgICBodHRwczovL2Nkbi5ib290Y2RuLm5ldC9hamF4L2xpYnMvY3J5cHRvLWpzLzQuMS4xL2NyeXB0by1qcy5taW4uanMKLy8gQHJlcXVpcmUgICAgICBodHRwczovL2Nkbi5ib290Y2RuLm5ldC9hamF4L2xpYnMvanF1ZXJ5LzMuNi40L2pxdWVyeS5taW4uanMKLy8gQHJlcXVpcmUgICAgICBodHRwczovL2Nkbi5ib290Y2RuLm5ldC9hamF4L2xpYnMvZHBsYXllci8xLjI2LjAvRFBsYXllci5taW4uanMKLy8gQHJlcXVpcmUgICAgICBodHRwczovL2Nkbi5ib290Y2RuLm5ldC9hamF4L2xpYnMvaGxzLmpzLzEuMS41L2hscy5taW4uanMKLy8gPT0vVXNlclNjcmlwdD09CgovL+S4rei9rOWcsOWdgO+8mmh0dHA6Ly93d3cuemhvbmd5b3VjaHVhbm1laS54eXoKLy/lkKvnvp7ojYnmsLjkuYXlr7zoiKrvvJpodHRwOi8vd3d3LkZpMTEudHYgaHR0cDovL2ZpMTEuY29tIGh0dHA6Ly9maTExLmNuIGh0dHA6Ly93d3cuRmkxMS5saXZlIGh0dHA6Ly93d3cuZmkxMWF2LmNvbQovL+aJk+W8gOawuOS5heWvvOiIquS4reeahOacgOaWsOe9keWdgOWNs+WPr++8jOiLpeaYr+iEmuacrOahhuaetumcgOimgeWMuemFjeWfn+WQje+8jOiHquihjOWwhuWvvOiIquS4reeahOacgOaWsOe9keWdgOWhq+S4iuWNs+WPrwovL+mBh+WIsOaSreaUvuWcsOWdgOS4uuaXp+aSreaUvuWcsOWdgOaIluiAheaXoOWPjeW6lO+8jOivt+iHquihjOWIt+aWsOW9k+WJjemhtemdou+8jOmHjeaWsOaSreaUvuWNs+WPrwoKCi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwovKgrlkKvnvp7ojYkt6Kej5p6Q6ISa5pysCuWPguiAg+adpea6kGh0dHBzOi8veWFvaHVvLm1lL2Jicy0xMjEwNTEyLmh0bWwKCuWunueOsOa4uOWuouaXoOmZkOivleeUqO+8jOaXoOmZkOiOt+WPluecn+WunuaSreaUvuWcsOWdgAoK5bey5YW85a655omL5py65ZKM55S16ISRCgoqLwovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KCgoKCi8vIOadg+mZkOiupOivgeagh+ivhgpjb25zdCBUT0tFTiA9ICdoeGNfMS4wLjBfdG9rZW4nOwovLyDmnI3liqHlnLDlnYAKbGV0IGJhc2VVcmwgPSBsb2NhdGlvbi5vcmlnaW47Ci8vIOinhumikeivleeci+WcsOWdgApjb25z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luKborqTor4HlpLQKICAgICAgICAgICAgYXV0aDogbG9jYWxTdG9yYWdlLmdldEl0ZW0oVE9LRU4pPy5yZXBsYWNlKC8iL2csICcnKSwKICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJwogICAgICAgIH0KICAgIH0pOwp9OwoKCgoKCgovLyDljrvpmaTpmZDliLYKY29uc3Qgc2V0VmFsdWUgPSBhc3luYyAoKSA9PiB7CiAgICBsZXQgaXNEZXRhaWwgPSBsb2NhdGlvbi5ocmVmLmluY2x1ZGVzKCdwbGF5L3ZpZGVvJyk7CiAgICBpZiAoaXNEZXRhaWwpIHsKICAgICAgICAvL+WIpOaWreaYr2g16L+Y5piv55S16ISRCiAgICAgICAgbGV0IHZpZGVvSWQgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC8uK1wvaDVcLi4rXC9wbGF5XC92aWRlb1wvKFxkKylcLy4rLyk7CiAgICAgICAgaWYoIXZpZGVvSWQpewogICAgICAgICAgICB2aWRlb0lkID0gbG9jYXRpb24uaHJlZi5tYXRjaCgvLitcL3BsYXlcL3ZpZGVvXC8oXGQrKS8pWzFdOwogICAgICAgICAgICAvL+eUteiEkQogICAgICAgICAgICAvL2NvbnNvbGUubG9nKCLnlLXohJEiKQogICAgICAgICAgICB2YXIgcHJlSW5mbyA9IGxvY2FsU3RvcmFnZS5nZXRJdGVtKCJwcmVJbmZvIik7CiAgICAgICAgICAgIGlmKHByZUluZm8pewogICAgICAgICAgICAgICAgcHJlSW5mbyA9IEpTT04ucGFyc2UocHJlSW5mbykKICAgICAgICAgICAgICAgIHByZUluZm8uY291bnQgPSAwOwogICAgICAgICAgICAgICAgcHJlSW5mbyA9IEpTT04uc3RyaW5naWZ5KHByZUluZm8pCiAgICAgICAgICAgICAgICBsb2NhbFN0b3JhZ2Uuc2V0SXRlbSgicHJlSW5mbyIsIHByZUluZm8pOwogICAgICAgICAgICB9CgogICAgICAgICAgICAvL2F3YWl0IHNldEVsZW1lbnQoInBjIix2aWRlb0lkKTsKICAgICAgICAgICAgLy9jb25zb2xlLmxvZygi5pyA5ZCO55qE6KeG6aKRdXJs77yaIiArIHZpZGVvVXJsKQoKICAgICAgICAgICAgdmlkZW9JZCA9IGdldFZpZGVvSWQoKQogICAgICAgICAgICAvL+eUqOS6juWIpOWumuW9k+WJjemhtemdoueahHZpZGVvSWTmmK/lkKblj5jljJYKICAgICAgICAgICAgaWYgKHdpbmRvdy52aWRlb0lkID09IHZpZGVvSWQpIHsKICAgICAgICAgICAgICAgIHJldHVybgogICAgICAgICAgICB9CiAgICAgICAgICAgIHBjKCkKCgogICAgICAgIH1lbHNlewogICAgICAgICAgICAvL+aJi+acugogICAgICAgICAgICAvL2NvbnNvbGUubG9nKCLmiYvmnLoiKQogICAgICAgICAgICB2aWRlb0lkID0gdmlkZW9JZFsxXTsKICAgICAgICAgICAgdmFyIHRyeVBsYXlOdW0gPSBsb2NhbFN0b3JhZ2UuZ2V0SXRlbSgidHJ5UGxheU51bSIpOwogICAgICAgICAgICBpZih0cnlQbGF5TnVtKXsKICAgICAgICAgICAgICAgIHRyeVBsYXlOdW0gPSBKU09OLnBhcnNlKHRyeVBsYXlOdW0pCiAgICAgICAgICAgICAgICB0cnlQbGF5TnVtLm51bSA9IDA7CiAgICAgICAgICAgICAgICB0cnlQbGF5TnVtID0gSlNPTi5zdHJpbmdpZnkodHJ5UGxheU51bSkKICAgICAgICAgICAgICAgIGxvY2FsU3RvcmFnZS5zZXRJdGVtKCJ0cnlQbGF5TnVtIiwgdHJ5UGxheU51bSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy9hd2FpdCBzZXRFbGVtZW50KCJtb2JpbGUiLHZpZGVvSWQpOwoKICAgICAgICAgICAgaWYgKCF3aW5kb3cubG9jYXRpb24uaHJlZi5lbmRzV2l0aCgiMCIpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4KICAgICAgICAgICAgfQogICAgICAgICAgICB2aWRlb0lkID0gZ2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55So6K+l5bGe5oCn5b+F6ZyA6YWN572u5bGe5oCnY29va2llCiAgICAgICAgY29va2llOiAnYWJjZGVmZycsLy9jb29raWXlkI3np7As6K+35Zyo5ZCM5LiA5Z+f5Lit5L+d5oyB5ZSv5LiACiAgICAgICAgcGx1ZzogJ2hscy5qcycsLy/kvb/nlKhobHMuanPmj5Lku7bmkq3mlL5tM3U4CiAgICAgICAgdmlkZW86IHBsYXllclVybC8v6KeG6aKR5Zyw5Z2ACiAgICB9CiAgICB3aW5kb3cuY2sgPSBuZXcgY2twbGF5ZXIodmlkZW9PYmplY3QpOwogICAgd2luZG93LmNrLnBsYXkoKQp9CgovL+aJi+acuuaSreaUvgpmdW5jdGlvbiBtb2JpbGVQbGF5KHBsYXllclVybCwgcGljLCBjb250YWluZXIsIHBsYXlUeXBlKSB7CiAgICBjb250YWluZXIuc3R5bGUuekluZGV4ID0gOTk5OTkKICAgIHdpbmRvdy5kcCA9IG5ldyBEUGxheWVyKHsKICAgICAgICBjb250YWluZXI6IGNvbnRhaW5lciwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g5Y+v6YCJ77yMcGxheWVy5YWD57SgCiAgICAgICAgYXV0b3BsYXk6IGZhbHNlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIOWPr+mAie+8jOiHquWKqOaSreaUvuinhumike+8jOS4jeaUr+aMgeenu+WKqOa1j+iniOWZqAogICAgICAgIHRoZW1lOiAnI0ZBREZBMycsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDlj6/pgInvvIzkuLvpopjpopzoibLvvIzpu5jorqQ6ICNiN2RhZmYKICAgICAgICBsb29wOiB0cnVlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g5Y+v6YCJ77yM5b6q546v5pKt5pS+6Z+z5LmQ77yM6buY6K6k77yadHJ1ZQogICAgICAgIGxhbmc6ICd6aCcsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDlj6/pgInvvIzor63oqIDvvIxgemgn55So5LqO5Lit5paH77yMYGVuJ+eUqOS6juiLseivre+8jOm7mOiupO+8mk5hdmlnYXRvciBsYW5ndWFnZQogICAgICAgIHNjcmVlbnNob3Q6IHRydWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDlj6/pgInvvIzlkK/nlKjmiKrlm77lip/og73vvIzpu5jorqTlgLzvvJpmYWxzZe+8jOazqOaEj++8muWmguaenOiuvue9ruS4unRydWXvvIzop4bpopHlkozop4bpopHmiKrlm77lv4XpobvlkK/nlKjot6jln58KICAgICAgICBob3RrZXk6IHRydWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g5Y+v6YCJ77yM57uR5a6a54Ot6ZSu77yM5YyF5ous5bem5Y+z6ZSu5ZKM56m65qC877yM6buY6K6k5YC877yadHJ1ZQogICAgICAgIHByZWxvYWQ6ICdhdXRvJywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDlj6/pgInvvIzpooTliqDovb3nmoTmlrnlvI/lj6/ku6XmmK8nbm9uZScnbWV0YWRhdGEnJ2F1dG8n77yM6buY6K6k5YC877yaJ2F1dG8nCiAgICAgICAgdmlkZW86IHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIOW/hemcgO+8jOinhumikeS/oeaBrwogICAgICAgICAgICB1cmw6IHBsYXllclVybCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIOW/heWhq++8jOinhumikee9keWdgAogICAgICAgICAgICBwaWM6IHBpYywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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LnJlbW92ZSgpCiAgICBtb2JpbGVQbGF5KHZpZGVvVXJsLCBwaWMsIGNvbnRhaW5lciwgcGxheVR5cGUpCiAgICAvL2F3YWl0IHNldEVsZW1lbnQoIm1vYmlsZSIsdmlkZW9JZCk7Cn0KCgphc3luYyBmdW5jdGlvbiBtYWluKCkgewogICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAgICAvLyBob29rOiDmi6bmiKrot6/nlLHlnLDlnYDlj5jljJYKICAgIGNvbnN0IF9oaXN0b3J5V3JhcCA9IGZ1bmN0aW9uICh0eXBlKSB7CiAgICAgICAgY29uc3Qgb3JpZyA9IGhpc3RvcnlbdHlwZV07CiAgICAgICAgY29uc3QgZSA9IG5ldyBFdmVudCh0eXBlKTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBjb25zdCBydiA9IG9yaWcuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgZS5hcmd1bWVudHMgPSBhcmd1bWVudHM7CiAgICAgICAgICAgIHdpbmRvdy5kaXNwYXRjaEV2ZW50KGUpOwogICAgICAgICAgICByZXR1cm4gcnY7CiAgICAgICAgfTsKICAgIH07CiAgICAvLyDnm5HlkKzot6/nlLHmk43kvZwKICAgIFsncHVzaFN0YXRlJywgJ3JlcGxhY2VTdGF0ZSddLmZvckVhY2gobWV0aG9kID0+IHsKICAgICAgICBoaXN0b3J5W21ldGhvZF0gPSBfaGlzdG9yeVdyYXAobWV0aG9kKTsKICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcihtZXRob2QsICgpID0+IHsKICAgICAgICAgICAgc2V0VmFsdWUoKTsKICAgICAgICB9KTsKICAgIH0pOwoKICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdwb3BzdGF0ZScsIGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgICAgLy9jb25zb2xlLmxvZygn5b2T5YmNVVJM5Li677yaJywgZG9jdW1lbnQubG9jYXRpb24uaHJlZik7CiAgICAgICAgc2V0VmFsdWUoKTsKICAgIH0pOwoKICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogICAgaW1wb3J0TGliKCkKfQoKbWFpbigp
Add Comment
Please, Sign In to add comment