Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@追剧兔@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6Iui/veWJp+WFlCIsImF1dGhvciI6IuW/g+mtlCIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2h0dHBzOi8vd3d3LnpqdHUuY2Mvdm9kc2hvdy0xL3BhZ2UvZnlwYWdlLyIsInZlcnNpb24iOjAsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBkID0gW107XG5NWV9VUkw9IE1ZX1VSTC5yZXBsYWNlKCdoaWtlcjovL2VtcHR5IyMnLCcnKVxubGV0IHRydWVfdXJsID0gZ2V0TXlWYXIoTVlfUlVMRS51cmwsIE1ZX1VSTClcbmNvbnN0IHBhZ2UgPSBNWV9QQUdFO1xudmFyIGdldFJhbmdlQ29sb3JzID0gZnVuY3Rpb24oKVxuIHtcbiAgICByZXR1cm4gJyMnICsgKCcwMDAwMCcgKyAoTWF0aC5yYW5kb20oKSAqIDB4MTAwMDAwMCA8PCAwKS50b1N0cmluZygxNikpLnN1YnN0cigtNik7wqDCoMKgwqDCoFxufVxuXG5jb25zdCDliIbnsbvpopzoibIgPSBnZXRSYW5nZUNvbG9ycygpO1xuY29uc3Qg5aSn57G75a6a5L2NID0gJy5zd2lwZXItd3JhcHBlcjpub3QoOm1hdGNoZXMo6aaW6aG1fOabtOWkmikpJztcbmNvbnN0IOWkp+exu+agh+mimCA9ICdhJiZUZXh0JztcbmNvbnN0IOWkp+exu+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6cHV0VmFyKCdcIiArIHZhcmkgKyBcIicsICdcIiArIGkgKyBcIicpO3JlZnJlc2hQYWdlKGZhbHNlKTsndG9hc3Q6Ly/liIfmjaLmiJDlip/vvIEnOycjbm9IaXN0b3J5I2hpa2VyOi8vZW1wdHknXCI7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogZ2V0VmFyKHZhcmksICcwJykgPT0gaSA/ICfigJzigJwnICsgdGFic1tpXSArICfigJ3igJ0nIDogdGFic1tpXSxcbiAgICAgICAgICAgIHVybDogdXJsLFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xuICAgICAgICB9KVxuICAgIH1cbn1cbmZ1bmN0aW9uIHNldExpc3RzKGxpc3RzLCBpbmRleCkge1xuICAgIHZhciBsaXN0ID0gbGlzdHNbaW5kZXhdO1xuICAgIGlmIChnZXRWYXIoJ3Noc29ydCcpID09ICcxJykge1xuICAgICAgICB2YXIgbGlzdCA9IGxpc3RzW2luZGV4XS5yZXZlcnNlKCk7XG4gICAgfVxuICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IHBkZmgobGlzdFtqXSwgJ2EmJlRleHQnKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC/nrKwoXFxkKynpm4YvLCAnJDEnKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKCfnrKwnLCAnJylcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgn5pyfJywgJycpLFxuICAgICAgICAgICAgdXJsOiBwZChsaXN0W2pdLCAnYSYmaHJlZicpICsgbGF6eSxcbiAgICAgICAgICAgIGNvbF90eXBlOiBsaXN0Lmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInXG4gICAgICAgIH0pO1xuICAgIH1cbn1cbnNldFRhYnModGFicywgTVlfVVJMKTtcbnNldExpc3RzKGxpc3RzLCBnZXRWYXIoTV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gICAgICAgICAgICAgICAgIGlmICghZXhjbHVkZS50ZXN0KHVybHNba10pICYmIGNvbnRhaW4udGVzdCh1cmxzW2tdKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvbWd0dnxzb2h1Ly50ZXN0KHVybHNba10pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2tdICsgJzt7VXNlci1BZ2VudEBNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wKX0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gXFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiBcXG4gICAgICAgICAgICAgICAgICAgICAoL2x6fGZmenkvLnRlc3QodXJsc1trXSkpXFxuICAgICAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ5X2JyaWRnZV9hcHAuY2xlYXJNM3U4QWQodXJsc1trXSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoL1xcXFwuZmx2fGJpbGkvLnRlc3QodXJsc1trXSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNba10gKyAnO3tVc2VyLUFnZW50QE1vemlsbGEvNS4wJiZSZWZlcmVyQGh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbX0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL3VybD0vLnRlc3QodXJsc1trXSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNba10uc3BsaXQoJ3VybD0nKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1trXSArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICByZXR1cm4gdmlkZW87XFxuICAgIH1cXG5cXG4gICAgZnVuY3Rpb24gUGFyc2UoaW5wdXQpIHsvL+WFjeWXhVxcbiAgICAgICAgdmFyIHBsYXllciA9IEpTT04ucGFyc2UocmVxdWVzdChpbnB1dCkubWF0Y2goL3IgcGxheWVyXy4qPz0oLio/KTwvKVsxXSk7XFxuICAgICAgICB2YXIgZnJvbSA9IHBsYXllci5mcm9tO1xcbiAgICAgICAgdmFyIGpzdXJsID0gcGxheWVyLnVybDtcXG5pZiAoanN1cmwubWF0Y2goLzE5MDV8c291aHV8eGlndWF8cXF8cWl5aXx5b3VrdXxtZ3R2fGxlfHBwdHZ8YmlsaWJpbGkvKSkgIHtcXG4gICAgICAgIHZhciBwYXJzZSA9ICcnO1xcbiAgfVxcbiAgICAgICAgdmFyIHJlZiA9IFxcXCJcXFwiO1xcbiAgICAgICAgaWYgKHJlZikge1xcbiAgICAgICAgICAgIHZhciBodG1sID0gcmVxdWVzdChwYXJzZSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IHJlZlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciBodG1sID0gcmVxdWVzdChwYXJzZSk7XFxuICAgICAgICB9XFxuICAgICAgICBcXG4gICAgICAgIGxvZyhodG1sKVxcbnVybD0gaHRtbC5tYXRjaCgvXFxcInVybFxcXCI6IFxcXCIoLio/KVxcXCIvKVsxXTtcXG4gICAgICAgIGxvZyh1cmwpXFxuICAgICAgICByZXR1cm4gdXJsO1xcbiAgICB9XFxuXFxuICAgIHRyeSB7XFxuICAgICAgICByZXR1cm4gUGFyc2UoaW5wdXQpO1xcbiAgICB9IGNhdGNoICh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mICh4Lui9rOaNoiA9PSB0cnVlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBgPGxpIGRhdGEtdHlwZT1cXFwiJHtzdGF0ZX1cXFwiIGRhdGEtdmFsPVxcXCIke3ZhbHVlfVxcXCI+PGEgaHJlZj1cXFwiXFxcIj4ke3RpdGxlfTwvYT48L2xpPmBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYDxhIHR5cGU9XFxcIkBleHRyYVxcXCIgc3RhdGU9XFxcIiR7c3RhdGV9XFxcIiB2YWx1ZT1cXFwiJHt2YWx1ZX1cXFwiPiR7dGl0bGV9PC9hPmA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBocmVmID0gcGQocSwgeC7pk77mjqUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBgPGEgaHJlZj1cXFwiJHtocmVmfVxcXCI+JHt0aXRsZX08L2E+YDtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiDlrprkvY07XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgY2F0ZWdvcmllcy5wdXNoKOS4gOe6py5qb2luKCdcXFxcbicpKTtcXG4gICAgICAgIH0pO1xcbiAgICB9XFxufSBlbHNlIHtcXG4gICAgY2F0ZWdvcmllcyA9IFtwZGZhKGh0bWwsIOWkp+exu+WumuS9jSkuam9pbignXFxcXG4nKV07XFxufVxcblxcbmxldCBpdGVtcyA9IFtdO1xcbmxldCBjYXRlcyA9IFtdO1xcbmxldCBpbml0X2NhdGUgPSBuZXcgQXJyYXkoMjApLmZpbGwoXFxcIjBcXFwiKTtcXG5jb25zdCBmb2xkID0gZ2V0TXlWYXIoTVl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JyA/IOW8gOWQr+aQnOe0oiA6IGZhbHNlO1xcbnZhciDlhajmuIUgPSAodHlwZW9mICjlhajmuIXplK4pICE9ICd1bmRlZmluZWQnICYmIOWFqOa4hemUriAhPSAnJykgPyDlhajmuIXplK4gOiBbXTtcXG7lhajmuIUudW5zaGlmdCgneWlfZmlyc3RwYWdlJyk7XFxuXFxuXFxuaWYgKHBhcnNlSW50KHBhZ2UpID09PSAxKSB7XFxuICAgIGlmICjmkJzntKIpIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIHVybDogXFxcIidoaWtlcjovL3NlYXJjaD9ydWxlPVxcXCIgKyBNWV9SVUxFLnRpdGxlICsgXFxcIiZzPScraW5wdXRcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCLmkJzntKLlhbPplK7or41cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ2tleXdvcmQnLCAnJyksXFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdrZXl3b3JkJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG4gICAgaWYgKOaKmOWPoOeKtuaAgSkge1xcbiAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogZm9sZCA9PT0gJzEnID8g5oqY5Y+gIDog5bGV5byALFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHRpdGxlLCBmb2xkLCB1LCBhbGwsIGV4cHMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkID0gZ2V0TXlWYXIoTVlfUlVMRS5ncm91cCwgZm9sZCk7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgW+WxleW8gCwg5oqY5Y+gXSA9IGV4cHM7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZCA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN4ID0gZmluZEl0ZW1zQnlDbHModGl0bGUgKyAnY2F0ZV9idXR0b24nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignY2F0ZV9idXR0b24nLCBjeCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKHRpdGxlICsgJ2NhdGVfYnV0dG9uJyk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjeCA9IHN0b3JhZ2UwLmdldE15VmFyKCdjYXRlX2J1dHRvbicsIFtdKS5tYXAoeCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhbJ2NvbF90eXBlJ10gPSB4Wydjb2xfdHlwZSddID8geFsnY29sX3R5cGUnXSA6IHhbJ3R5cGUnXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKHRpdGxlICsgJ2NhdGVfbGluZScsIGN4KVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgLyphbGwuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKGl0ZW0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSk7Ki9cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0odGl0bGUgKyAnY2F0ZV9leHAnLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGZvbGQgPT0gMSA/IOWxleW8gCA6IOaKmOWPoCxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihNWV9SVUxFLmdyb3VwLCBmb2xkID09PSBcXFwiMVxcXCIgPyBcXFwiMFxcXCIgOiBcXFwiMVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgfSwgTVlfUlVMRS50aXRsZSwgZm9sZCwg54q25oCBLCDlhajmuIUsIFvlsZXlvIAsIOaKmOWPoF0pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX1JVTEUudGl0bGUgKyAnY2F0ZV9leHAnLFxcbiAgICAgICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5riF6Zmk54q25oCBJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoeCwgYWxsLCBjbCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKHgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdoZWFkLmNhdGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2wuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcihpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIOeKtuaAgSwg5YWo5riFLCDmuIXpmaQpXFxuICAgICAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBsZXQgc2V0VGl0bGUgPSAoaywgaSwgdCkgPT4ge1xcbiAgICAgICAgcmV0dXJuIGsgPT0gaSA/IFxcXCLigJzigJzigJ3igJ1cXFwiICsgdC5mb250Y29sb3Io5YiG57G76aKc6ImyKSA6IHRcXG4gICAgfVxcbiAgICBjYXRlZ29yaWVzLmZvckVhY2goKGNhdGVnb3J5LCBpbmRleCkgPT4ge1xcbiAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gW107XFxuICAgICAgICBpZiAo5bCP57G75a6a5L2NLmluY2x1ZGVzKCc7JykpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBkZmEoY2F0ZWdvcnksIOWwj+exu+WumuS9jS5zcGxpdCgnOycpWzBdKTtcXG4gICAgICAgICAgICBpZiAoc3ViX2NhdGVnb3JpZXMubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSBwZGZhKGNhdGVnb3J5LCDlsI/nsbvlrprkvY0uc3BsaXQoJzsnKVsxXSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBkZmEoY2F0ZWdvcnksIOWwj+exu+WumuS9jSk7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoaW5kZXggPT09IDApIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IF/lpKfnsbvpk77mjqUgPSAodHlwZW9mICjlpKfnsbvpk77mjqUpICE9ICd1bmRlZmluZWQnICYmIOWkp+exu+mTvuaOpSAhPSAnJykgPyDlpKfnsbvpk77mjqUgOiDliIbnsbvpk77mjqU7XFxuXFxuICAgICAgICAgICAgICAgIGxldCBf5aSn57G75qCH6aKYID0gKHR5cGVvZiAo5aSn57G75qCH6aKYKSAhPSAndW5kZWZpbmVkJyAmJiDlpKfnsbvmoIfpopggIT0gJycpID8g5aSn57G75qCH6aKYIDog5YiG57G75qCH6aKYO1xcblxcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIF/lpKfnsbvmoIfpopgpO1xcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mICjmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IHBhcmFtcyA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLCBrZXk6IGtleSwgcGFnZTogcGFnZSwgY2xlYXJzOiDmuIXpmaQsIHN0YXRlOiDnirbmgIEsIGFsbGNsZWFyczog5YWo5riFXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IHBkKGl0ZW0sIF/lpKfnsbvpk77mjqUpO1xcbiAgICAgICAgICAgICAgICBpZiAo5aSn57G75aSE55CGKSB7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyjkuIDnuqfliIbnsbvlpITnkIYpXFxuICAgICAgICAgICAgICAgICAgICAvL2xvZygkLnN0cmluZ2lmeSjkuIDnuqfliIbnsbvlpITnkIYpKVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlucHV0ID0gdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChcXFwicmVzdWx0ID0gXFxcIiArIOS4gOe6p+WIhuexu+WkhOeQhik7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhyZXN1bHQpXFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSByZXN1bHQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2V0VGl0bGUoa2V5LnRvU3RyaW5nKCksIGNhdGVfdGVtcFtpbmRleF0sIHRpdGxlKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQodXJsICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jbGVhcnMuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuYWxsY2xlYXJzLmZvckVhY2goKGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcihpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImhlYWQuY2F0ZVxcXCIsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnN0YXRlLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0sIHBhcmFtcylcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX1JVTEUudGl0bGUgKyAnY2F0ZV9saW5lJyxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmFwb3MgPSBmYWxzZTtcXG4gICAgICAgICAgICAgICAgaWYgKGl0ZW0uaW5jbHVkZXMoJ3R5cGU9XFxcIkBleHRyYVxcXCInKSkge1xcbiAgICAgICAgICAgICAgICAgICAgZXh0cmFwb3MgPSB0cnVlO1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coJ+mZhOWKoOWumuS9jScpXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgaWYgKGV4dHJhcG9zKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBwZGZoKGl0ZW0sICdhJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mICjmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcImdcXFwiKSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogcGRmaChpdGVtLCAnYSYmc3RhdGUnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogcGRmaChpdGVtLCAnYSYmdmFsdWUnKSxcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG5cXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgKOaOkumZpCkgIT0gJ3VuZGVmaW5lZCcgJiYg5o6S6ZmkICE9ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgICAgICB2YXIganNvbiA9ICcnO1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh0cnVlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSDliIbnsbvpk77mjqUuaW5jbHVkZXMoJ0BAQCcpOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogcGRmaChpdGVtLCDliIbnsbvpk77mjqUuc3BsaXQoJ0BAQCcpWzBdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwZGZoKGl0ZW0sIOWIhuexu+mTvuaOpS5zcGxpdCgnQEBAJylbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2Ug5YiG57G76ZO+5o6lLmluY2x1ZGVzKCdAQCcpOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTog5YiG57G76ZO+5o6lLnNwbGl0KCdAQCcpWzBdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHBkZmgoaXRlbSwg5YiG57G76ZO+5o6lLnNwbGl0KCdAQCcpWzFdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uID0gcGQoaXRlbSwg5YiG57G76ZO+5o6lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAvKnZhciBqc29uPeWIhuexu+mTvuaOpS5pbmNsdWRlcygnQEBAJyk/e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOnBkZmgoaXRlbSzliIbnsbvpk77mjqUuc3BsaXQoJ0BAQCcpWzBdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6cGRmaChpdGVtLOWIhuexu+mTvuaOpS5zcGxpdCgnQEBAJylbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgIH06cGQoaXRlbSzliIbnsbvpk77mjqUpO1xcbiAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgIGpzb2495YiG57G76ZO+5o6lLmluY2x1ZGVzKCdAQCcpP3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTrliIbnsbvpk77mjqUuc3BsaXQoJ0BAJylbMF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOnBkZmgoaXRlbSzliIbnsbvpk77mjqUuc3BsaXQoJ0BAJylbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgIH06cGQoaXRlbSzliIbnsbvpk77mjqUpOyovXFxuXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgbGV0IHBhcmFtcyA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLCBpbmRleDogaW5kZXgsIGtleToga2V5LCBwYWdlOiBwYWdlLCBqc29uOiBqc29uLCBzdGF0ZTog54q25oCBLCBhbGxjbGVhcnM6IOWFqOa4hVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGNhdGVzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHNldFRpdGxlKGtleS50b1N0cmluZygpLCBjYXRlX3RlbXBbaW5kZXhdLCB0aXRsZSksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHknICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5hbGxjbGVhcnMuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImhlYWQuY2F0ZVxcXCIsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmpzb24uY29uc3RydWN0b3IgPT09IE9iamVjdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignZHRfJyArIHBhcmFtcy5qc29uLnR5cGUsIHBhcmFtcy5qc29uLnZhbHVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMuc3RhdGUsIHBhcmFtcy5qc29uKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0sIHBhcmFtcyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IE1ZX1JVTEUudGl0bGUgKyAnY2F0ZV9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBjYXRlcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBjbHM6IE1ZX1JVTEUudGl0bGUgKyAnY2F0ZV9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0pXFxufVxcblxcblxcbmlmIChmb2xkID09PSBcXFwiMVxcXCIgfHwg5oqY5Y+g54q25oCBID09IGZhbHNlKSB7XFxuICAgIGl0ZW1zID0gaXRlbXMuY29uY2F0KGNhdGVzKTtcXG59XFxuaWYgKGZvbGQgPT09IFxcXCIwXFxcIikge1xcbiAgICBzdG9yYWdlMC5wdXRNeVZhcignY2F0ZV9idXR0b24nLCBjYXRlcylcXG59XFxuaWYgKHR5cGVvZiBzZXRQcmVSZXN1bHQgIT0gJ3VuZGVmaW5lZCcpIHtcXG4gICAgaXRlbXMgPSBkLmNvbmNhdChpdGVtcyk7XFxuICAgIC8v5riF56m657un5om/5pWw57uEXFxuICAgIGQubGVuZ3RoID0gMDtcXG4gICAgc2V0UHJlUmVzdWx0KGl0ZW1zKTtcXG59IGVsc2Uge1xcbiAgICBpdGVtcy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgZC5wdXNoKGl0ZW0pO1xcbiAgICB9KVxcbn1cXG5cIn1dIiwiaWNvbiI6Imh0dHBzOi8vaW1nMS5pbWd0cC5jb20vMjAyMy8wNy8xOC9GTHN4bVhjSC5wbmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment