Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@爱看机器人🐹@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6ImpzOk1ZX1VSTCA9IE1ZX1VSTC5zcGxpdCgnIyMnKVsxXTtcbnZhciBodG1sID0gZmV0Y2hQQyhNWV9VUkwse2hlYWRlcnM6e2Nvb2tpZTpnZXRWYXIoJ2NrJywnSG1fbHZ0X2Y1MGUyNzY4MzU4MjYzNTY3MjBiYzQ0ZDZkZDY2OWIwPTE2ODg4OTg0NzY7IHJlY2VudGU9JTVCJTdCJTIydm9kX25hbWUlMjIlM0ElMjIlRTUlQjAlOTglRTclQkMlOTglMjIlMkMlMjJ2b2RfdXJsJTIyJTNBJTIyaHR0cCUzQSUyRiUyRnd3dy55aWxvbmdoZC5jb20lMkZwbGF5JTJGaWQtNDU5MTgtNC0xLmh0bWwlMjIlMkMlMjJ2b2RfcGFydCUyMiUzQSUyMiVFNyVBQyVBQzAxJUU5JTlCJTg2JTIyJTdEJTVEOyBQSFBTRVNTSUQ9bDUyajFlZmpzcnNlN2s5bTFhdHYzMWRlOW07IEhtX2xwdnRfZjUwZTI3NjgzNTgyNjM1NjcyMGJjNDRkNmRkNjY5YjA9MTY4ODkwMDA0MicpfX0pO1xudmFyIGxhc3QgPSBwZGZoKGh0bWwsICcuc3R1aS1jb250ZW50X19wbGF5bGlzdCYmYSwtMSYmVGV4dCcpO1xuc2V0UmVzdWx0KGxhc3QpOyIsInRpdGxlIjoi54ix55yL5py65Zmo5Lq68J+QuSIsImF1dGhvciI6ImR5MjAyMCIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2h0dHBzOi8vd3d3LmlrYW5qcXIuY29tL2lrYm90L2RpYW55aW5nL3BhZ2UvZnlwYWdlLmh0bWwiLCJ2ZXJzaW9uIjoyMDIzMDcyNCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGU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IHJjKCdodHRwczovL2dpdGVlLmNvbS9taXN0eXdhdGVyL2hpa2VyX2luZm8vcmF3L21hc3Rlci9mJywgMjQpO1xuICAgICAgICB2YXIgaW50cm8gPSBnZXRNeVZhcignaW50cm8nLCAnMCcpO1xuICAgICAgICBpZiAoaW50cm8gPT0gJzAnKSB7XG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdpbnRybycsIHtcbiAgICAgICAgICAgICAgICB0aXRsZTogc3NSKOeugOS7iywgJzk5NjZBQScpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdfaW50cm8nLCB7XG4gICAgICAgICAgICAgICAgdGl0bGU6IHN0cm9uZygn4oinJywgJ0NDMDAzMycpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBwdXRNeVZhcignaW50cm8nLCAnMScpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdXBkYXRlSXRlbSgnaW50cm8nLCB7XG4gICAgICAgICAgICAgICAgdGl0bGU6IHNzKOeugOS7iywgJzk5NjZBQScpLnNsaWNlKDAsIDEwMCkgKyAn4oCmJyxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdXBkYXRlSXRlbSgnX2ludHJvJywge1xuICAgICAgICAgICAgICAgIHRpdGxlOiBzdHJvbmcoJ+KIqCcsICcyMjk5NzcnKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBwdXRNeVZhcignaW50cm8nLCAnMCcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XG4gICAgfSwg566A5LuLKSxcbiAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIGlkOiAnX2ludHJvJyxcbiAgICAgICAgdmlk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C8pWzFdKTtcbiAgICAgICAgICAgICAgICB2YXIgdXJsX3QgPSBodG1sLnVybDtcbiAgICAgICAgICAgICAgICBpZiAoaHRtbC5lbmNyeXB0ID09ICcxJykge1xuICAgICAgICAgICAgICAgICAgICB1cmxfdCA9IHVuZXNjYXBlKHVybF90KTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGh0bWwuZW5jcnlwdCA9PSAnMicpIHtcbiAgICAgICAgICAgICAgICAgICAgdXJsX3QgPSB1bmVzY2FwZShiYXNlNjREZWNvZGUodXJsX3QpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKC9cXC5tM3U4fFxcLm1wNHxcXC5mbHYvLnRlc3QodXJsX3QpKSB7XG4gICAgICAgICAgICAgICAgICAgIHVybCA9IHVybF90O1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHVybCA9ICd2aWRlbzovLycgKyBpbnB1dDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHVybCA9ICd2aWRlbzovLycgKyBpbnB1dDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdXJsO1xuICAgIH0pLFxuICAgIGNvbF90eXBlOiBnZXRNeVZhcignY3R5cGUnLCAnMCcpID09ICcwJyA/ICd0ZXh0XzMnIDogJ3RleHRfMScsXG4gICAgZXh0cmE6IHtcbiAgICAgICAgY2xzOiAnbGlzdHMnLFxuICAgICAgICB2aWRlb0V4Y2x1ZGVSdWxlczogWydnb29kanNvbiddXG4gICAgfVxufSkpO1xucHV0TXlWYXIoJ2xpc3RzUHVzaCcsIGxpc3RzUHVzaCk7XG52YXIgdXBkYXRlTGlzdCA9ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgIGRlbGV0ZUl0ZW1CeUNscygnbGlzdHMnKTtcbiAgICB2YXIgcyA9IFtdO1xuICAgIHZhci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gY29uZiA9IGdldE15VmFyKCdzaHNvcnQnLCAnMCcpO1xuICAgICAgICAgICAgaWYgKGNvbmYgPT0gJzEnKSB7XG4gICAgICAgICAgICAgICAgdmFyIF9saXN0ID0gbGlzdHNbZ2V0TXlWYXIoTVlfVVJMLCAnMCcpXTtcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignc2hzb3J0JywgJzAnKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIF9saXN0ID0gbGlzdHNbZ2V0TXlWYXIoTVlfVVJMLCAnMCcpXS5yZXZlcnNlKCk7XG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3Noc29ydCcsICcxJyk7XG5cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdzaHNvcnQnLCB7XG4gICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCdzaHNvcnQnLCAnMCcpID09ICcxJyA/IHN0cm9uZygn6YCG5bqPJywgJ0NDMDAzMycpIDogc3Ryb25nKCfmraPluo8nLCAnMjI5OTc3JylcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZXZhbChnZXRNeVZhcigndXBkYXRlTGlzdCcpKTtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liIfmjaLmjpLluo/miJDlip8nO1xuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIGlkOiAnc2hzb3J0J1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0YWJzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoTVlfVVJMLCAnMCcpID09IGkgPyBzdHJvbmcodGFic1tpXSwgJ2Y2NzI4MCcpIDogdGFic1tpXSxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xuICAgICAgICAgICAgICAgIHJjKCdodHRwczovL2dpdGVlLmNvbS9taXN0eXdhdGVyL2hpa2VyX2luZm8vcmF3L21hc3Rlci9mJywgMjQpO1xuICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1VSTCwgaSk7XG4gICAgICAgICAgICAgICAgdmFyIHRhYnMgPSBzdG9yYWdlMC5nZXRNeVZhcigndGFicycpO1xuICAgICAgICAgICAgICAgIHZhciBsaXN0cyA9IHN0b3JhZ2UwLmdldE15VmFyKCdsaXN0cycpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGsgaW4gdGFicykge1xuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCd0YWJzJyArIGssIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrID09IGkgPyBzdHJvbmcodGFic1trXSwgJ2Y2NzI4MCcpIDogdGFic1trXVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIF9saXN0ID0gZ2V0TXlWYXIoJ3Noc29ydCcsICcwJykgPT0gJzAnID8gbGlzdHNbaV0gOiBsaXN0c1tpXS5yZXZlcnNlKCk7XG4gICAgICAgICAgICAgICAgZXZhbChnZXRNeVZhcigndXBkYXRlTGlzdCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xuICAgICAgICAgICAgfSwgaSksXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICBpZDogJ3RhYnMnICsgaVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIHNldExpc3RzKGxpc3RzKSB7XG4gICAgdmFyIGluZGV4ID0gZ2V0TXlWYXIoTVlfVVJMLCAnMCcpO1xuICAgIHZhciBfbGlzdCA9IGdldE15VmFyKCdzaHNvcnQnLCAnMCcpID09ICcwJyA/IGxpc3RzW2luZGV4XSA6IGxpc3RzW2luZGV4XS5yZXZlcnNlKCk7XG4gICAgdmFyIG4gPSAwO1xuICAgIGZvciAodmFyIGxpc3Qgb2YgX2xpc3QpIHtcbiAgICAgICAgaWYgKHBkZmgobGlzdCwgJ2EmJlRleHQnKS5yZXBsYWNlKC8uKz8o56ysXFxkK+Wto3znrKxcXGQr6ZuGKS8sICckMScpLmxlbmd0aCA+IDEyKSB7XG4gICAgICAgICAgICBuID0gbiArIDE7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKG4gPiAzKSB7XG4gICAgICAgIHB1dE15VmFyKCdjdHlwZScsICcxJylcbiAgICB9XG4gICAgZm9yICh2YXIgbGlzdCBvZiBfbGlzdCkge1xuICAgICAgICBldmFsKCdkLnB1c2goJyArIGdldE15VmFyKCdsaXN0c1B1c2gnKSArICcpOycpO1xuICAgIH1cbiAgICBjbGVhck15VmFyKCdjdHlwZScpO1xuICAgIGlmIChfbGlzdC5sZW5ndGggPD0gNCkge1xuICAgICAgICBldmFsKG1ibGFuayg0KSk7XG4gICAgfSBlbHNlIGlmIChfbGlzdC5sZW5ndGggPD0gOCkge1xuICAgICAgICBldmFsKG1ibGFuaygzKSk7XG5cbiAgICB9IGVsc2UgaWYgKF9saXN0Lmxlbmd0aCA8PSAxMikge1xuICAgICAgICBldmFsKG1ibGFuaygyKSk7XG4gICAgfVxufVxuXG50cnkge1xuICAgIHNldFRhYnModGFicyk7XG4gICAgc2V0TGlzdHMobGlzdHMpO1xufSBjYXRjaCAoZSkge31cbmQucHVzaCh7XG4gICAgY29sX3R5cGU6ICdiaWdfYmxhbmtfYmxvY2snLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIGlkOiAnbGlzdHMnXG4gICAgfVxufSk7XG5cblxuZC5wdXNoKHtcbiAgICB0aXRsZTogc21hbGwo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AgY2xlYXJNeVZhcigndXJsJyk7XFxuICAgICAgICAgICAgY2xlYXJNeVZhcigndCcpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgIH0sICksXFxuICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICB9KTtcXG4gICAgY2F0ZWdvcmllcy5mb3JFYWNoKChjYXRlZ29yeSwgaW5kZXgpID0+IHtcXG4gICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgIGlmICh0eXBlb2Yo5bCP57G75a6a5L2NX+S4uykgIT0gJ3VuZGVmaW5lZCcpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NX+S4uyk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciBzdWJfY2F0ZWdvcmllcyA9IHBkZmEoY2F0ZWdvcnksIOWwj+exu+WumuS9jSk7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoaW5kZXggPT09IDApIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gc3Ryb25nKHRpdGxlLCDliIbnsbvpopzoibIpIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2NhdGUgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiAnMCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3QnLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCd1cmwnLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBNWV9QQUdFLFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gc3Ryb25nKHRpdGxlLCDliIbnsbvpopzoibIpIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3QnLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3VybCcsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBNWV9QQUdFLFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9KTtcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLkurrmnLrpqozor4FcIixcInBhdGhcIjpcIuS6uuacuumqjOivgVwiLFwicnVsZVwiOlwianM6aWYgKC/pqozor4EvLnRlc3QoaHRtbCkpIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiAn5Lq65py66aqM6K+BLOi/lOWbnuWQjuWIt+aWsOS4gOS4iycsXFxuICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHknKS5ydWxlKChNWV9VUkwpID0+IHtcXG4gICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnLFxcbiAgICAgICAgICAgICAgICB1cmw6IE1ZX1VSTCxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ2xpc3QmJnNjcmVlbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICB1YTogTU9CSUxFX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgc2hvd1Byb2dyZXNzOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh1KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2soKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYmEuZ2V0VmFyKCdjaycpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vZGVzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnN0dWktcGFubmVsX2JkJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbyA9IGZiYS5nZXRDb29raWUodSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChub2RlcyAmJiBub2Rlcy5sZW5ndGggPiAwICYmIGNvKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKCdjbzo6Ojo6OicgKyBjbyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKCdjaycsIGNvKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5wYXJzZUxhenlSdWxlKCQkJCgpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrLCA1MDApO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICB9LCBNWV9VUkwpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXR1cm4gc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgfSwgTVlfVVJMKSxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcbiAgICB9KTtcXG59XCJ9XSIsImljb24iOiJodHRwczovL3d3dy5pa2FuanFyLmNvbS9zdGF0aWNzL2ltZy9sb2dvLnBuZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment