Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@腾讯(网搜)@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiJqczpcbnZhciBqc29uID0gSlNPTi5wYXJzZShnZXRSZXNDb2RlKCkpO1xudmFyIG51bT1NYXRoLmZsb29yKGpzb24uYy52aWRlb19pZHMubGVuZ3RoLzMwKTtcbnZhciBnbz1qc29uLmMudmlkZW9faWRzLnNsaWNlKG51bSozMCk7XG5nbz0oZ28ubGVuZ3RoPT0wKT9qc29uLmMudmlkZW9faWRzLnNsaWNlKChudW0tMSkqMzApOmdvO1xudmFyIHVybD0naHR0cHM6Ly91bmlvbi52aWRlby5xcS5jb20vZmNnaS1iaW4vZGF0YT9vdHlwZT1qc29uJnRpZD02ODImYXBwaWQ9MjAwMDEyMzgmYXBwa2V5PTZjMDNiYmU5NjU4NDQ4YTQmdW5pb25fcGxhdGZvcm09MSZpZGxpc3Q9JyArZ28uam9pbignLCcpO1xudmFyIHVybDE9J2h0dHBzOi8vdW5pb24udmlkZW8ucXEuY29tL2ZjZ2ktYmluL2RhdGE/b3R5cGU9anNvbiZ0aWQ9NjgyJmFwcGlkPTIwMDAxMjM4JmFwcGtleT02YzAzYmJlOTY1ODQ0OGE0JnVuaW9uX3BsYXRmb3JtPTEmaWRsaXN0PScranNvbi5jLnZpZGVvX2lkcy5zbGljZSgobnVtLTEpKjMwLG51bSozMCkuam9pbignLCcpO1xuZXZhbChmZXRjaCh1cmwse30pKTtcbnZhciB0aXRsZT0nJztcbmZvcihpPTA7aTxRWk91dHB1dEpzb24ucmVzdWx0cy5sZW5ndGg7aSsrKXtcbnZhciBkYXRhID0gUVpPdXRwdXRKc29uLnJlc3VsdHNbaV0uZmllbGRzO1xudGl0bGU9dGl0bGUrZGF0YS50aXRsZSsnLCc7fVxubG9nKHRpdGxlKTtcbnZhciB0eT10aXRsZS5yZXBs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2YWwoZmV0Y2goJ2h0dHBzOi8vcy52aWRlby5xcS5jb20vZ2V0X3BsYXlzb3VyY2U/aWQ9JyArIE1ZX1VSTC5tYXRjaCgvaWQ9KFxcZCo/KSYvKVsxXSArICcmcGxhdD0yJnR5cGU9NCZkYXRhX3R5cGU9MyZyYW5nZT0nICsgaW5kZXhMaXN0W2ldICsgJyZ2aWRlb190eXBlPTEwJnBsbmFtZT1xcSZvdHlwZT1qc29uJywge30pKTtcbiAgICAgICAgdmlkZW9fbGlzdHMucHVzaC5hcHBseSh2aWRlb19saXN0cywgUVpPdXRwdXRKc29uLlBsYXlsaXN0SXRlbS52aWRlb1BsYXlMaXN0KTtcbiAgICB9XG4gICAgZm9yICh2YXIgaSBpbiB2aWRlb19saXN0cykge1xuICAgICAgICB2YXIgZGF0YSA9IHZpZGVvX2xpc3RzW2ldO1xuICAgICAgICBsaXN0LnB1c2goZGF0YS50aXRsZSArICfvv6UnICsgZGF0YS5wbGF5VXJsKTtcbiAgICAgICAgaXRlbXMucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogZGF0YS50aXRsZSxcbiAgICAgICAgICAgIHBpY191cmw6IGRhdGEucGljLFxuICAgICAgICAgICAgZGVzYzogZGF0YS5lcGlzb2RlX251bWJlciArICdcXHRcXHRcXHTmkq3mlL7ph4/vvJonICsgZGF0YS50aGlyZExpbmUsXG4gICAgICAgICAgICB1cmw6IGdldFZhcignY2onLCfmlq3mj5InKT09J+ebtOmTvic/dG9VcmwocXFfbW9kZSwgZGF0YS5wbGF5VXJsKTooJChkYXRhLnBsYXlVcmwpLmxhenlSdWxlKCgpID0+IHtcbnZhciBjb25maWc9SlNPTi5wYXJzZShmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTsgZXZhbChmZXRjaChjb25maWcuY2opKTtcbnJldHVybiBheXRtUGFyc2UoaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICB9KSksXG4gICAgICAgICAgICBj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pc3RJdGVtLnZpZGVvUGxheUxpc3QpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIGkgaW4gdmlkZW9fbGlzdHMpIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gdmlkZW9fbGlzdHNbaV07XG4gICAgICAgICAgICBsaXN0LnB1c2goZGF0YS50aXRsZSArICfvv6UnICsgZGF0YS5wbGF5VXJsKTtcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBkYXRhLnRpdGxlLFxuICAgICAgICAgICAgICAgIHBpY191cmw6IGRhdGEucGljLFxuICAgICAgICAgICAgICAgIGRlc2M6IGRhdGEuZXBpc29kZV9udW1iZXIgKyAnXFx0XFx0XFx05pKt5pS+6YeP77yaJyArIGRhdGEudGhpcmRMaW5lLFxuICAgICAgICAgICAgICAgIHVybDogZ2V0VmFyKCdjaicsJ+aWreaPkicpPT0n55u06ZO+Jz90b1VybChxcV9tb2RlLCBkYXRhLnBsYXlVcmwpOigkKGRhdGEucGxheVVybCkubGF6eVJ1bGUoKCkgPT4ge1xudmFyIGNvbmZpZz1KU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cIikpOyBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xucmV0dXJuIGF5dG1QYXJzZShpbnB1dCk7XG4gICAgICAgICAgICAgICAgICAgIH0pKSxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzEnXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSAqL1xuICAgIGlmICh2aWRlb19saXN0cyE9bnVsbCYmdmlkZW9fbGlzdHMubGVuZ3RoID09IDEpIHtcbiAgICAgICAgaXRlbXMucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogJ+ebtOmTvuino+aekCcsXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcbiAgICAgICAgfSk7XG4gICAgICAgIGZvciAodmFyIGkgaW4gc29ydF9qc29uWydxcSddKSB7XG4gICAgICAgICAgICB2YXIgcGFyc2VfbGlzdF9hcnIgPSBwYXJzZV9saXN0W3NvcnRfanNvblsncXEnXVtpXV0uc3BsaXQoJ++/pScpO1xuICAgICAgICAgICAgaXRlbXMucHVzaCh7XG4gICAgICAgICAgICAgICAgdGl0bGU6IHBhcnNlX2xpc3RfYXJyWzBdLFxuICAgICAgICAgICAgICAgIHVybDogZ2V0VmFyKCdjaicsJ+aWreaPkicpPT0n55u06ZO+Jz8ocGFyc2VfbGlzdF9hcnJbMV0gKyB1cmwgKyBwYXJzZV9saXN0X2FyclsyXSk6KCQodXJsKS5sYXp5UnVsZSgoKSA9PiB7XG52YXIgY29uZmlnPUpTT04ucGFyc2UoZmV0Y2goXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblwiKSk7IGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XG5yZXR1cm4gYXl0bVBhcnNlKGlucHV0KTtcbiAgICAgICAgICAgICAgICAgICAgfSkpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8yJ1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgaXRlbXMucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogJ+e9kemhteino+aekCcsXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcbiAgICAgICAgfSk7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcGFyc2luZ19saXN0Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogcGFyc2luZ19saXN0W2ldLnNwbGl0KCfvv6UnKVswXSxcbiAgICAgICAgICAgICAgICB1cmw6IHBhcnNpbmdfbGlzdFtpXS5zcGxpdCgn77+lJylbMV0gKyB1cmwsXG4gICAgICAgICAgICAgICAgY29s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gbGlzdC5wdXNoKGRhdGEudGl0bGUgKyAn77+lJyArIHVybCk7XG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkYXRhLnRpdGxlLFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBkYXRhLnBpYzE2MHg5MCxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogZGF0YS52aWRlb19jaGVja3VwX3RpbWUsXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2V0VmFyKCdjaicsICfmlq3mj5InKSA9PSAn55u06ZO+JyA/IHRvVXJsKHFxX21vZGUsIHVybCkgOiAoJCh1cmwpLmxhenlSdWxlKCgpID0+IHtcbnZhciBjb25maWc9SlNPTi5wYXJzZShmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTsgZXZhbChmZXRjaChjb25maWcuY2opKTtcbnJldHVybiBheXRtUGFyc2UoaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICB9KSksXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xfdHlwZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgaXRlbXMucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogJ+WOn+e9kemhtScsXG4gICAgICAgICAgICB1cmw6ICdodHRwczovL3YucXEuY29tL3gvY292ZXIvJyArIGNpZCArICcuaHRtbCcsXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXG4gICAgICAgIH0pO1xuICAgIH1cbn1cbmlmIChNWV9VUkwuaW5kZXhPZignZ2V0X3BsYXlzb3VyY2UnKSA+IDAgfHwganNvbi5jLnR5cGUgPT0gMTAgfHwgdmlkZW9fbGlzdHMhPW51bGwmJnZpZGVvX2xpc3RzLmxlbmd0aCA+IDEpIHtcbiAgICBpdGVt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