Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@武享吧™123@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5q2m5Lqr5ZCn4oSiMTIzIiwiYXV0aG9yIjoi5b+D5p+U56yU6K6wIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjaHR0cHM6Ly93d3cuaHVsYTgubmV0LyNmeXBhZ2UiLCJ2ZXJzaW9uIjowLCJjb2xfdHlwZSI6Im1vdmllXzFfbGVmdF9waWMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG5sZXQgZCA9IFtdO1xucmMoJ2h0dHBzOi8vZ2l0ZWUuY29tL21pc3R5d2F0ZXIvaGlrZXJfaW5mby9yYXcvbWFzdGVyL2YnLCAyNCk7XG5ldmFsKGpwKCdkYXRhJykpO1xuTVlfVVJMID0gTVlfVVJMLnNwbGl0KCcjIycpWzFdO1xuTVlfVVJMID0gZ2V0TXlWYXIoJ3RfdXJsJywgTVlfVVJMKSArICcvcGFnZS8nICsgTVlfUEFHRSArICcvJztcbmxvZyhNWV9VUkwpO1xudmFyIGh0bWwgPSBmZXRjaFBDKE1ZX1VSTCk7XG5wdXRNeVZhcignaHRtbCcsIGh0bWwpO1xudmFyIGxhenkgPSAkKCcnKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgdHJ5IHtcbiAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKHJlcXVlc3QoaW5wdXQpLm1hdGNoKC92YXIgYmV2aWRlb192aWRzXy4qPz0oe1tcXHNcXFNdKj99KTsvKVsxXSlcbiAgICAgICAgdmFyIHVybHMgPSBodG1sLm0zdThkcGxheWVyLm1hcChpID0+IGkudmlkZW8uc3RhcnRzV2l0aCgnLy8nKSA/IFwiaHR0cHM6XCIgKyBpLnZpZGVvIDogaS52aWRlbylcbiAgICAgICAgdmFyIG5hbWVzID0gaHRtbC5tM3U4ZHBsYXllci5tYXAoaSA9PiBpLnByZSlcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgIHVybHM6IHVybHMsXG4gICAgICAgICAgICBuYW1lczogbmFtZXNcbiAgICAgICAgfSlcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHJldHVybiBpbnB1dDtcbiAgICB9XG59KTtcbi8qdmFyIGMgPSBwZGZhKGh0bWwsICdib2R5JiYjbWVudS14aW5qaWFuPmxpJyk7XG52YXIgcyA9IFtdO1xuYy5mb3JFYWNoKGZ1bmN0aW9uKGxpc3QxLCBpbmRleDEsIGRhdGEpIHtcbiAgICB2YXIgczE9W107ICAgICBcbiAgICBzMS5wdXNoKHBkZmEobGlzdDEsICdib2R5JiZhJylbMF0pO1xuICAgIGlmIChwZGZhKGxpc3QxLCAnYm9keSYmdWwnKS5sZW5ndGggIT0gMCkge1xuICAgICAgICB2YXIgczIgPSBbXTtcbiAgICAgICAgdmFyIGxpc3QyID0gcGRmYShwZGZoKGxpc3QxLCd1bCYmSHRtbCcpLCdib2R5PmxpJyk7XG4gICAgICAgIGxpc3QyLmZvckVhY2goZnVuY3Rpb24obGlzdDIsIGluZGV4MiwgZGF0YSkgeyAgICAgICAgICBcbiAgICAgICAgICAgIHMyLnB1c2gocGRmYShsaXN0MiwgJ2JvZHkmJmEnKVswXSk7XG4gICAgICAgICAgICBpZiAocGRmYShsaXN0MiwgJ2JvZHkmJnVsJykubGVuZ3RoICE9IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgczMgPSBbXTtcbiAgICAgICAgICAgICAgICB2YXIgbGlzdDMgPSBwZGZhKGxpc3QyLCAnYm9keT51bD5saScpOyAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBsaXN0My5mb3JFYWNoKGZ1bmN0aW9uKGxpc3QzLCBpbmRleDMsIGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgczMucHVzaChwZGZhKGxpc3QzLCAnYm9keSYmYScpWzBdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBzMi5wdXNoKHMzKTtcblxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH0pO1xuICAgICAgICBzMS5wdXNoKHMyKTtcbiAgICB9XG4gICAgcy5wdXNoKHMxKTtcbn0pO1xuXG5sb2cocyk7XG5zLmZvckVhY2goZnVuY3Rpb24obGlzdDEsIGluZGV4MSwgZGF0YSkge1xuICAgIGQucHVzaCh7XG4gICAgICAgIHRpdGxlOiBpbmRleDEgPT0gZ2V0TXlWYXIoJ2luZGV4MScsICcwJykgPyBzdHJvbmcocGRmaChsaXN0MVswXSwgJ2EmJlRleHQnKSwgJ0ZGNjY5OScpIDogcGRmaChsaXN0MVswXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgdXJsOiAkKHBkKGxpc3QxWzBdLCAnYSYmaHJlZicpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGluZGV4MSwgbGlzdDEsIGRhdGEpID0+IHtcbiAgICAgICAgICAgIHB1dE15VmFyKCdpbmRleDEnLCBpbmRleDEpO1xuICAgICAgICAgICAgcHV0TXlWYXIoJ3RfdXJsJywgaW5wdXQpO1xuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XG4gICAgICAgIH0sIGluZGV4MSwgbGlzdDFbMF0sIGRhdGEpLFxuICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgIH0pO1xufSk7XG5kLnB1c2goe1xuICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snLFxuICAgIGV4dHJhOiB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AgICB2YXIgYyA9IHBkZmEoaHRtbCwgJ2JvZHkmJiNtZW51LXhpbmppYW4+bGknKTtcbiAgICBjLmZvckVhY2goZnVuY3Rpb24obGlzdDEsIGluZGV4MSwgZGF0YSkge1xuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IGluZGV4MSA9PSBnZXRNeVZhcignaW5kZXgxJywgJzAnKSA/IHN0cm9uZyhwZGZoKGxpc3QxLCAnYSYmVGV4dCcpLCAnRkY2Njk5JykgOiBwZGZoKGxpc3QxLCAnYSYmVGV4dCcpLFxuICAgICAgICAgICAgdXJsOiAkKHBkKGxpc3QxLCAnYSYmaHJlZicpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGluZGV4MSwgbGlzdDEsIGRhdGEpID0+IHtcbiAgICAgICAgICAgICAgICByYygnaHR0cHM6Ly9naXRlZS5jb20vbWlzdHl3YXRlci9oaWtlcl9pbmZvL3Jhdy9tYXN0ZXIvZicsIDI0KTtcbiAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdpbmRleDInKTtcbiAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdpbmRleDMnKTtcbiAgICAgICAgICAgICAgICBpZiAoLzYwMDQ2Ly50ZXN0KGlucHV0KSkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9ICdodHRwczovL3d3dy5odWxhOC5uZXQvbGlvbmZpZ2h0LydcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnaW5kZXgxXycgKyBnZXRNeVZhcignaW5kZXgxJywgJzAnKSwge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhW2dldE15VmFyKCdpbmRleDEnLCAnMCcpXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdpbmRleDFfJyArIGluZGV4MSwge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc3Ryb25nKHBkZmgobGlzdDEsICdhJiZUZXh0JyksICdGRjY2OTknKSxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBwdXRNeVZhcigndF91cmwnLCBpbnB1dCk7XG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2luZGV4MScsIGluZGV4MSk7XG4gICAgICAgICAgICAgICAgaWYgKHBkZmEobGlzdDEsICdib2R5JiZ1bCcpLmxlbmd0aCAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaXN0MiA9IHBkZmEobGlzdDEsICdib2R5JiZ1bD5saScpO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoJ2luZGV4MicpO1xuICAgICAgICAgICAgICAgICAgICBsaXN0Mi5mb3JFYWNoKGZ1bmN0aW9uKGxpc3QyLCBpbmRleDIsIGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUoJ2luZGV4MicsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaW5kZXgyID09IGdldE15VmFyKCdpbmRleDInLCAnLTEnKSA/IHN0cm9uZyhwZGZoKGxpc3QyLCAnYSYmVGV4dCcpLCAnRkY2Njk5JykgOiBwZGZoKGxpc3QyLCAnYSYmVGV4dCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChwZChsaXN0MiwgJ2EmJmhyZWYnKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpbmRleDIsIGxpc3QyLCBkYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJjKCdodHRwczovL2dpdGVlLmNvbS9taXN0eXdhdGVyL2hpa2VyX2luZm8vcmF3L21hc3Rlci9mJywgMjQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdpbmRleDMnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnaW5kZXgyXycgKyBnZXRNeVZhcignaW5kZXgyJywgJzAnKSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgobGlzdDIsICdhJiZUZXh0JyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdpbmRleDJfJyArIGluZGV4Miwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHN0cm9uZyhwZGZoKGxpc3QyLCAnYSYmVGV4dCcpLCAnRkY2Njk5JyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigndF91cmwnLCBpbnB1dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdpbmRleDInLCBpbmRleDIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGRmYShsaXN0MiwgJ2JvZHkmJnVsJykubGVuZ3RoICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0MyA9IHBkZmEobGlzdDIsICdib2R5JiZ1bD5saScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKCdpbmRleDMnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QzLmZvckVhY2goZnVuY3Rpb24obGlzdDMsIGluZGV4Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUoJ2luZGV4MycsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGluZGV4MyA9PSBnZXRNeVZhcignaW5kZXgzJywgJy0xJykgPyBzdHJvbmcocGRmaChsaXN0MywgJ2EmJlRleHQnKSwgJ0ZGNjY5OScpIDogcGRmaChsaXN0MywgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGxpc3QzLCAnYSYmaHJlZicpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGluZGV4MywgbGlzdDMpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJjKCdodHRwczovL2dpdGVlLmNvbS9taXN0eXdhdGVyL2hpa2VyX2luZm8vcmF3L21hc3Rlci9mJywgMjQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3RfdXJsJywgaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2luZGV4MycsIGluZGV4Myk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogJ2luZGV4M18nICsgaW5kZXgzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiAnaW5kZXgzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGluZGV4MiwgbGlzdDIsIGRhdGEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAnaW5kZXgyXycgKyBpbmRleDIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogJ2luZGV4MicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKCdpbmRleDMnKTtcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcblxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xuICAgICAgICAgICAgfSwgaW5kZXgxLCBsaXN0MSwgZGF0YSksXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICBpZDogJ2luZGV4MV8nICsgaW5kZXgxXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICAgIGQucHVzaCh7XG4gICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgaWQ6ICdpbmRleDEnXG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBkLnB1c2goe1xuICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJyxcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIGlkOiAnaW5kZXgyJ1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZC5wdXNoKHtcbiAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaycsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBpZDogJ2luZGV4MydcbiAgICAgICAgfVxuICAgIH0pO1xufVxuXG5cbmVsc2V7XG4gICAgZ3JvdXBzLmZvckVhY2goZnVuY3Rpb24oaXRlbTEsIGluZGV4MSwgZGF0YSkge1xuICAgICAgICB2YXIgdXJsMSA9IGV2YWwoJ3BkKGh0bWwsXCJib2R5JiYjbWVudS1pdGVtLScgKyBpdGVtMS5pZCArICcmJmEmJmhyZWZcIiknKTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBpbmRleDEgPT0gZ2V0TXlWYXIoJ2luZGV4MScsICcwJykgPyBzdHJvbmcoaXRlbTEudGl0bGUsICdGRjY2OTknKSA6IGl0ZW0xLnRpdGxlLFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaW5kZXgxLCB1cmwxLCBkYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZihkYXRhW2luZGV4MV1bJ2NoaWxkcmVuJ10pICE9ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gZGF0YVtpbmRleDFdWydjaGlsZHJlbiddO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbmV3QXJyID0gbGlzdC5tYXAoKGl0ZW0sIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbS50aXRsZTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKG5ld0FyciwgMSwgJ+ivt+mAieaLqeimgeingueci+eahOi1m+S6iycpLnNlbGVjdCgobGlzdCwgZGF0YSwgaW5kZXgxKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mKGxpc3RbZGF0YS5pbmRleE9mKGlucHV0KV1bJ2NoaWxkcmVuJ10pICE9ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF9saXN0ID0gbGlzdFtkYXRhLmluZGV4T2YoaW5wdXQpXVsnY2hpbGRyZW4nXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmV3QXJyID0gX2xpc3QubWFwKChpdGVtLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbS50aXRsZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChuZXdBcnIsIDEsICfor7fpgInmi6nopoHop4LnnIvnmoTotZvkuosnKS5zZWxlY3QoKGxpc3QsIGRhdGEsIGluZGV4MSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGdldE15VmFyKCdodG1sJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ZX1VSTCA9ICdodHRwczovL3d3dy5odWxhOC5uZXQvJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGV2YWwoJ3BkKGh0bWwsXCJib2R5JiYjbWVudS1pdGVtLScgKyBsaXN0W2RhdGEuaW5kZXhPZihpbnB1dCldLmlkICsgJyYmYSYmaHJlZlwiKScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigndF91cmwnLCB1cmwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaW5kZXgxJywgaW5kZXgxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBfbGlzdCwgbmV3QXJyLCBpbmRleDEpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ZX1VSTCA9ICdodHRwczovL3d3dy5odWxhOC5uZXQvJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGdldE15VmFyKCdodG1sJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGV2YWwoJ3BkKGh0bWwsXCJib2R5JiYjbWVudS1pdGVtLScgKyBsaXN0W2RhdGEuaW5kZXhPZihpbnB1dCldLmlkICsgJyYmYSYmaHJlZlwiKScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCd0X3VybCcsIHVybCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2luZGV4MScsIGluZGV4MSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCBsaXN0LCBuZXdBcnIsIGluZGV4MSk7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoLzYwMDQ2Ly50ZXN0KHVybDEpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB1cmwxID0gJ2h0dHBzOi8vd3d3Lmh1bGE4Lm5ldC9saW9uZmlnaHQvJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCd0X3VybCcsIHVybDEpO1xuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaW5kZXgxJywgaW5kZXgxKTtcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIH0sIGluZGV4MSwgdXJsMSwgZGF0YSksXG4gICAgICAgIH0pO1xuICAgIH0pO1xufVxudmFyIGxpc3QgPSBwZGZhKGh0bWwsICcjbWFpbiYmYXJ0aWNsZScpO1xuZm9yICh2YXIgaiBpbiBsaXN0KSB7XG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6IHBkZmgobGlzdFtqXSwgJ2gyJiZUZXh0JyksXG4gICAgICAgIGRlc2M6IHBkZmgobGlzdFtqXSwgJy5ncmlkLWluZiYmVGV4dCcpLFxuICAgICAgICBpbWc6IHBkKGxpc3Rbal0sICcubG9hZCYmaW1nJiZkYXRhLW9yaWdpbmFsJyksXG4gICAgICAgIHVybDogcGQobGlzdFtqXSwgJy5sb2FkJiZhJiZocmVmJykgKyBsYXp5XG4gICAgfSlcbn1cbnNldFJlc3VsdChkKTsiLCJzZWFyY2hfdXJsIjoiaHR0cHM6Ly93d3cuaHVsYTgubmV0L3BhZ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xyXFxuICAgICAgICB9LCB7XFxyXFxuICAgICAgICAgICAgdGl0bGU6ICdVRkPmoLzmlpfkuYvlpJwnLFxcclxcbiAgICAgICAgICAgIGlkOiA0NDUyOFxcclxcbiAgICAgICAgfSwge1xcclxcbiAgICAgICAgICAgIHRpdGxlOiAnQmVsbGF0b3LmoLzmlpfotZsnLFxcclxcbiAgICAgICAgICAgIGlkOiA0NDUzMFxcclxcbiAgICAgICAgfSwge1xcclxcbiAgICAgICAgICAgIHRpdGxlOiAnUEZM5qC85paX6LWbJyxcXHJcXG4gICAgICAgICAgICBpZDogNDQ1MjJcXHJcXG4gICAgICAgIH0sIHtcXHJcXG4gICAgICAgICAgICB0aXRsZTogJ0xGQeagvOaWl+i1mycsXFxyXFxuICAgICAgICAgICAgaWQ6IDQ0NTYwXFxyXFxuICAgICAgICB9XVxcclxcbiAgICB9LCB7XFxyXFxuICAgICAgICB0aXRsZTogJ+S6mua0suagvOaWl+i1mycsXFxyXFxuICAgICAgICBpZDogNTMzODAsXFxyXFxuICAgICAgICBjaGlsZHJlbjogW3tcXHJcXG4gICAgICAgICAgICB0aXRsZTogJ09OReWGoOWGm+i1mycsXFxyXFxuICAgICAgICAgICAgaWQ6IDM4NDUzLFxcclxcbiAgICAgICAgICAgIGNoaWxkcmVuOiBbe1xcclxcbiAgICAgICAgICAgICAgICB0aXRsZTogJ09OReWRqOS6lOagvOaWl+WknCcsXFxyXFxuICAgICAgICAgICAgICAgIGlkOiA1NTQ4MyxcXHJcXG4gICAgICAgICAgICB9XVxcclxcbiAgICAgICAgfSwge1xcclxcbiAgICAgICAgICAgIHRpdGxlOiAnSkNL5oiY6KeJ5Z+OJyxcXHJcXG4gICAgICAgICAgICBpZDogNDQwNDAsXFxyXFxuICAgICAgICB9LCB7XFxyXFxuICAgICAgICAgICAgdGl0bGU6ICfmrabmnpfnrLzkuK3lr7knLFxcclxcbiAgICAgICAgICAgIGlkOiA0NDAzOSxcXHJcXG4gICAgICAgIH1dXFxyXFxuICAgIH0sIHtcXHJcXG4gICAgICAgIHRpdGxlOiAn5YW25LuW5qC85paX6LWbJyxcXHJcXG4gICAgICAgIGlkOiA1MzM4MSxcXHJcXG4gICAgICAgIGNoaWxkcmVuOiBbe1xcclxcbiAgICAgICAgICAgIHRpdGxlOiAnS1NX5rOi5YWw5qC85paX6LWbJyxcXHJcXG4gICAgICAgICAgICBpZDogNDgxODUsXFxyXFxuICAgICAgICB9LCB7XFxyXFxuICAgICAgICAgICAgdGl0bGU6ICdFYWdsZeWwj+m5sOi1m+S6iycsXFxyXFxuICAgICAgICAgICAgaWQ6IDQ5NzY1LFxcclxcbiAgICAgICAgfSwge1xcclxcbiAgICAgICAgICAgIHRpdGxlOiAn5L+E572X5pavQUNB6LWb5LqLJyxcXHJcXG4gICAgICAgICAgICBpZDogNDk3NjcsXFxyXFxuICAgICAgICB9XVxcclxcbiAgICB9XVxcclxcbn0sIHtcXHJcXG4gICAgdGl0bGU6ICfnq5nnq4vmkI/lh7snLFxcclxcbiAgICBpZDogMzg0NjYsXFxyXFxuICAgIGNoaWxkcmVuOiBbe1xcclxcbiAgICAgICAgdGl0bGU6ICfml6XmnKzmkI/lh7votZsnLFxcclxcbiAgICAgICAgaWQ6IDQ4MTg4LFxcclxcbiAgICAgICAgY2hpbGRyZW46IFt7XFxyXFxuICAgICAgICAgICAgdGl0bGU6ICdLLTEgSkFQQU4gR1JPVVAnLFxcclxcbiAgICAgICAgICAgIGlkOiA0NDA0NixcXHJcXG4gICAgICAgIH0sIHtcXHJcXG4gICAgICAgICAgICB0aXRsZTogJ0stMeaXl+S4i0tydXNo6LWb5LqLJyxcXHJcXG4gICAgICAgICAgICBpZDogNDQwNDgsXFxyXFxuICAgICAgICB9LCB7XFxyXFxuICAgICAgICAgICAgdGl0bGU6ICdSSVNF6Lii5ouz6LWbJyxcXHJcXG4gICAgICAgICAgICBpZDogNDQwNDQsXFxyXFxuICAgICAgICB9XVxcclxcbiAgICB9LCB7XFxyXFxuICAgICAgICB0aX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ICAgdGl0bGU6ICfoo7jmi7PmoLzmlpfotZtCS0ZDJyxcXHJcXG4gICAgICAgIGlkOiA0NDYyNSxcXHJcXG4gICAgfSwge1xcclxcbiAgICAgICAgdGl0bGU6ICfoo7jmi7NIYXJkY29yZSBGQycsXFxyXFxuICAgICAgICBpZDogNDUzNjIsXFxyXFxuICAgIH0sIHtcXHJcXG4gICAgICAgIHRpdGxlOiAn6KO45ouzVE9QIERPRyBGQycsXFxyXFxuICAgICAgICBpZDogNDU3MDUsXFxyXFxuICAgIH0sIHtcXHJcXG4gICAgICAgIHRpdGxlOiAnQllC6KO45ouz6LWbQllCIEVYVFJFTUUgRklHSFRJTkcnLFxcclxcbiAgICAgICAgaWQ6IDU5MDI2LFxcclxcbiAgICB9XVxcclxcbn0sIHtcXHJcXG4gICAgdGl0bGU6ICflhbbku5bmr5TotZsnLFxcclxcbiAgICBpZDogMzg0NzMsXFxyXFxufV07XCJ9XSIsImljb24iOiJodHRwczovL3d3dy5odWxhOC5uZXQvd3AtY29udGVudC91cGxvYWRzLzIwMjIvMDQvbG9nby0xLnBuZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment