Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@360·Q@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiMzYwwrdRIiwiYXV0aG9yIjoi5Y+R57Kq5raC5aKZIiwidXJsIjoiaHR0cHM6Ly93d3cuMzYwa2FuLmNvbS9kaWFuc2hpL2xpc3Q/cGFnZW5vPWZ5cGFnZSIsInZlcnNpb24iOjAsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBkID0gW107XG5sZXQgdHJ1ZV91cmwgPSBnZXRWYXIoXCIzNjAudXJsXCIsIE1ZX1VSTClcbmNvbnN0IHBhZ2UgPSBNWV9VUkwuc3BsaXQoJz0nKVsxXVxuaWYgKC8mLy50ZXN0KHRydWVfdXJsKSkge1xuICAgIHRydWVfdXJsID0gdHJ1ZV91cmwgKyAnJnBhZ2Vubz0nICsgcGFnZVxufSBlbHNlIGlmICghL1xcPy8udGVzdCh0cnVlX3VybCkpIHtcbiAgICB0cnVlX3VybCA9IHRydWVfdXJsICsgJz9wYWdlbm89JyArIHBhZ2Vcbn1cbmNvbnN0IGh0bWwgPSBmZXRjaCh0cnVlX3VybCwge1xuICAgIGhlYWRlcnM6IHtcbiAgICAgICAgJ1VzZXItQWdlbnQnOiAnTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMCknXG4gICAgfVxufSlcbmNvbnN0IGVtcHR5ID0gXCJoaWtlcjovL2VtcHR5XCJcblxuY29uc3QgY2F0ZWdvcmllcyA9IHBhcnNlRG9tRm9yQXJyYXkoaHRtbCwgJ2JvZHkmJi5zLWZpbHRl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AgIHVybDogJChwYXJzZURvbShpdGVtLCAnYSYmaHJlZicpKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2NhdGUgPSBbXVxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcIjBcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXCIzNjAuY2F0ZWdvcnlcIiwgSlNPTi5zdHJpbmdpZnkobmV3X2NhdGUpKVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihcIjM2MC51cmxcIiwgaW5wdXQpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgXG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICA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YXJzZURvbShpdGVtLCAnYSYmaHJlZicpKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihcIjM2MC5jYXRlZ29yeVwiLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCAhPT0gJycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXCIzNjAudXJsXCIsIGlucHV0KVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImhpa2VyOi8vZW1wdHlcIlxuICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcImJsYW5rX2Jsb2NrXCJcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfSlcbn1cblxuY29uc3QgbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoaHRtbCwgJy5saXN0JiZsaScpXG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EaWFuc2hpJykgKyAnTGlua3NCeVNpdGU/aWQ9JztcbiAgICAgICAgICAgIHVybHMucHVzaCh7XG4gICAgICAgICAgICAgICAgdXJsOiB0b25namkgKyBhYWFbMl0gKyAnJmNhdD0nICsgYWFhWzFdICsgJyZzaXRlPScgKyBiLm1hdGNoKC9kYXRhLXNpdGU9XFxcIiguKj8pXFxcIi8pWzFdXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgYmF0Y2hSZXN1bHQgPSBiYXRjaEZldGNoKHVybHMpO1xuXG4gICAgICAgIHZhciB0YWJzID0gW107XG4gICAgICAgIHZhciBsaXN0cyA9IFtdO1xuICAgICAgICB2YXIgY29udHMgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICcjanMtc2l0ZWJhciYmLml0ZW0nKTtcbiAgICAgICAgZm9yICh2YXIgaSBpbiBiYXRjaFJlc3VsdCkge1xuICAgICAgICAgICAgdGFicy5wdXNoKHBhcnNlRG9tRm9ySHRtbChjb250c1tpXSwgJy5pdGVtJiZUZXh0JykpXG4gICAgICAgICAgICBsaXN0cy5wdXNoKHBhcnNlRG9tRm9yQXJyYXkoSlNPTi5wYXJzZShiYXRjaFJlc3VsdFtpXSkuZGF0YSwgJy5pdGVtcyYmbGknKSlcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIHNldFRhYnModGFicywgdmFyaSkge1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogKGdldFZhcignc2hzb3J0JykgPT0gJzEnKSA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cImNvbG9yOiAjRkYwMDAwXCI+6YCG5bqPPC9zcGFuPjwvYj4nIDogJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVwiY29sb3I6ICMxYWFkMTlcIj7mraPluo88L3NwYW4+PC9iPicsXG4gICAgICAgICAgICAgICAgdXJsOiBgQGxhenlSdWxlPS5qczpsZXQgY29uZiA9IGdldFZhcignc2hzb3J0Jyk7aWYoY29uZj09JzEnKXtwdXRWYXIoe2tleTonc2hzb3J0JywgdmFsdWU6JzAnfSk7fWVsc2V7cHV0VmFyKHtrZXk6J3Noc29ydCcsIHZhbHVlOicxJ30pfTtyZWZyZXNoUGFnZSgpOyd0b2FzdDovL+WIh+aNouaOkuW6j+aIkOWKnydgLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0YWJzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHVybCA9IFwiI25vTG9hZGluZyNAbGF6eVJ1bGU9LmpzOnB1dFZhcignXCIgKyB2YXJpICsgXCInLCAnXCIgKyBpICsgXCInKTtyZWZyZXNoUGFnZShmYWxzZSk7J3RvYXN0Oi8v5YiH5o2i5oiQ5Yqf77yBJzsnI25vSGlzdG9yeSNoaWtlcjovL2VtcHR5J1wiO1xuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IHRhYnNbaV0ubGVuZ3RoID4gMCA/IHRhYnNbaV0gOiAn6aOO6KGM572RJztcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0VmFyKHZhcmksICcwJykgPT0gaSA/ICfigJzigJwnICsgdGl0bGUgKyAn4oCd4oCdJyA6IHRpdGxlLFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHVybCxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXG4gICAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gc2V0TGlzdHMobGlzdHMsIGluZGV4KSB7XG4gICAgICAgICAgICB2YXIgbGlzdCA9IGxpc3RzW2luZGV4XTtcbiAgICAgICAgICAgIGlmIChnZXRWYXIoJ3Noc29ydCcpID09ICcxJykge1xuICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gbGlzdHNbaW5kZXhdLnJldmVyc2UoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xuICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ1RleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgbGF6eSxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGxpc3QubGVuZ3RoID4gMyA/ICd0ZXh0XzQnIDogJ3RleHRfMidcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGh0bWwuaW5jbHVkZXMoJ+ingueci+ato+eJhycpKSB7XG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfop4LnnIvmraPniYcnLFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBhcnNlRG9tRm9ySHRtbChjb250c1tpbmRleF0sICcuaXRlbSYmZGF0YS11cmwnKSArIGxhenksXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBsaXN0Lmxlbmd0aCA+IDMgPyAndGV4dF8zJyA6ICd0ZXh0XzInXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgc2V0VGFicyh0YWJzLCBNWV9VUkwpO1xuICAgICAgICBzZXRMaXN0cyhsaXN0cywgZ2V0VmFyKE1ZX1VSTCwgJzAnKSk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGxpc3QgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICcuaXRlbXN8fCNqcy16eXNlcmllc3x8LnAtZGlhbnlpbmctd3JhcCYmYTpub3QoLmpzLXR4dCk6bm90KC5leHBhbmQtYWxsKScpO1xuICAgICAgICBmb3IgKHZhciBqIGluIGxpc3QpIHtcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnVGV4dCcpO1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXG4gICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgbGF6eSxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogdGl0bGUubGVuZ3RoIDwgNCA/ICd0ZXh0XzQnIDogJ3RleHRfMidcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxufSBjYXRjaCAoZSkge31cbnNldFJlc3VsdChkKSIsInNkZXRhaWxfY29sX3R5cGUiOiJtb3ZpZV8xIiwic2RldGFpbF9maW5kX3J1bGUiOiIqIiwidWEiOiJtb2JpbGUiLCJwcmVSdWxlIjoiIiwicGFnZXMiOiJbXSJ9
Add Comment
Please, Sign In to add comment