xiaomianao666

小程序:模板·Q

Oct 28th, 2023
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@模板·Q@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5qih5p2/wrdRIiwiYXV0aG9yIjoi5Y+R57Kq5raC5aKZIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MTAsImNvbF90eXBlIjoidGV4dF9jZW50ZXJfMSIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidG9vbCIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuaWYgKGdldEl0ZW0oXCJzdGFydFwiLCBcIlwiKSA9PSBcIlwiKSB7XG4gICAgc2V0SXRlbShcInN0YXJ0XCIsIFwiMVwiKVxuICAgIGNvbmZpcm0oe1xuICAgICAgICB0aXRsZTogJ+a4qemmqOaPkOekuicsXG4gICAgICAgIGNvbnRlbnQ6ICfor7fli7/liKDpmaTmiJbmlLnlkI3mraTmqKHmnb/vvIzku6XlhY3kvp3otZbmraTmqKHmnb/nmoTlsI/nqIvluo/ml6Dms5Xkvb/nlKjvvIHvvIFcXG7lubbnibnliKvmhJ/osKIgUmVib3JuIExveURnSWvlpKfkvaznmoTmioDmnK/mlK/mjIEhISEnLFxuICAgICAgICBjb25maXJtOiAnJyxcbiAgICAgICAgY2FuY2VsOiAncmVmcmVzaFBhZ2UoKSdcbiAgICB9KVxufVxuYWRkTGlzdGVuZXIoXCJvbkNsb3NlXCIsICQudG9TdHJpbmcoKCkgPT4ge1xuICAgIGNsZWFyVmFyKFwidGVtcGxhdGUtdXJsXCIpXG4gICAgY2xlYXJWYXIoXCJ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vor5XmkJzntKJcIixcbn0sIHtcbiAgICB0aXRsZTogXCLnlJ/miJDop4TliJlcIixcbiAgICBjb2xfdHlwZTogXCJ0ZXh0X2NlbnRlcl8xXCIsXG4gICAgdXJsOiBcImlucHV0Oi8vLy8vL+ivt+i+k+WFpeinhOWImeWQjS5qczpcIiArICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICB2YXIgdXJsID0gZ2V0VmFyKCd0ZW1wbGF0ZS11cmwnLCBcIlwiKTtcbiAgICAgICAgaWYgKHVybC5sZW5ndGggPD0gMCB8fCBpbnB1dC5sZW5ndGggPD0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly/or7flhYjovpPlhaXpk77mjqXlkozop4TliJnlkI1cIlxuICAgICAgICB9XG4gICAgICAgIHZhciBydWxlID0ge1xuICAgICAgICAgICAgXCJsYXN0X2NoYXB0ZXJfcnVsZVwiOiBcIlwiLFxuICAgICAgICAgICAgXCJ0aXRsZVwiOiBpbnB1dCxcbiAgICAgICAgICAgIFwiYXV0aG9yXCI6IFwiXCIsXG4gICAgICAgICAgICBcInVybFwiOiB1cmwsXG4gICAgICAgICAgICBcInZlcnNpb25cIjogMCxcbiAgICAgICAgICAgIFwiY29sX3R5cGVcIjogXCJtb3ZpZV8zXCIsXG4gICAgICAgICAgICBcImNsYXNzX25hbWVcIjogXCJcIixcbiAgICAgICAgICAgIFwiY2xhc3NfdXJsXCI6IFwiXCIsXG4gICAgICAgICAgICBcImFyZWFfbmFtZVwiOiBcIlwiLFxuICAgICAgICAgICAgXCJhcmVhX3VybFwiOiBcIlwiLFxuICAgICAgICAgICAgXCJzb3J0X25hbWVcIjogXCJcIixcbiAgICAgICAgICAgIFwieWVhcl9uYW1lXCI6IFwiXCIsXG4gICAgICAgICAgICBcInNvcnRfdXJsXCI6IFwiXCIsXG4gICAgICAgICAgICBcInllYXJfdXJsXCI6IFwiXCIsXG4gICAgICAgICAgICBcImZpbmRfcnVsZVwiOiBcImpzOlx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ICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoL20zdTh8bXA0Ly50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndmlkZW86Ly8nICsgaW5wdXRcXG4gICAgICAgICAgICB9XFxuICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIHJldHVybiAndmlkZW86Ly8nICsgaW5wdXRcXG4gICAgfVxcbn0pXFxuXFxuY29uc3Qge1xcbiAgICBhdXRvUGFnZVxcbn0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hdXRvP3J1bGU95qih5p2/wrdRXFxcIik7XFxuYXV0b1BhZ2UoZ2V0UmVzQ29kZSgpKVwiLFxuICAgICAgICAgICAgXCJzZGV0YWlsX2NvbF90eXBlXCI6IFwibW92aWVfMVwiLFxuICAgICAgICAgICAgXCJzZGV0YWlsX2ZpbmRfcnVsZVwiOiBcIipcIixcbiAgICAgICAgICAgIFwidWFcIjogXCJtb2JpbGVcIixcbiAgICAgICAgICAgIFwicHJlUnVsZVwiOiBcImlmIChyZXF1ZXN0KCdoaWtlcjovL2hvbWVA5qih5p2/wrdRJykgPT0gJ251bGwnKSB7XFxuICAgIGNvbmZpcm0oe1xcbiAgICAgICAgdGl0bGU6ICfkvp3otZbmo4DmtYsnLFxcbiAgICAgICAgY29udGVudDogJ+ajgOa1i+WIsOe8uuWwkeaooeadv+S+nei1lizor7flr7zlhaUhJyxcXG4gICAgICAgIGNvbmZpcm06ICgpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcIua1t+mYlOinhueVjOmmlumhtemikemBk+inhOWImeOAkOaooeadv8K3UeOAke+/pWhvbWVfcnVsZV91cmzvv6VodHRwOi8vaGlrZXIubm9raWEucHJlc3MvaGlrZXJ1bGUvcnVsZWxpc3QuanNvbj9pZD0zMDU1XFxcIlxcbiAgICAgICAgfVx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JztcXG4gICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBNWV9VUkwgKyBcXFwiX+aOkuW6j1xcXCIsXFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwiVFZib3jmjqjpgIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHRhYnMsIGxpc3RzLCBkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIOaOqOmAgSA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBnZXRQYWdlVGl0bGUoKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImNvbnRlbnRcXFwiOiBkLmRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJwaWNcXFwiOiBkLmltZyB8fCBkLnBpY191cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJmcm9tXFxcIjogdGFicy5qb2luKCckJCQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInVybFxcXCI6IHN0b3JhZ2UwLmdldE15VmFyKFxcXCJsaXN0c1xcXCIpLm1hcChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGkubWFwKGxpMSA9PiBwZGZoKGxpMSwgJ1RleHQnKSArICckJyArIHBkKGxpMSwgJ2EmJmhyZWYnKSkuam9pbignIycpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLmpvaW4oJyQkJCcpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9wYWdlL3B1c2g/cnVsZT1YWVHmjqjpgIEmcHVzaHVybD1cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KOaOqOmAgSkpXFxuICAgICAgICAgICAgICAgICAgICB9LCB0YWJzLCBsaXN0cywgZClcXG4gICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHRpdGxlOiDmjpLluo/lkI0ucmVwbGFjZSgn5o6S5bqPJywg5o+Q56S6KVxcbiAgICAgICAgfSlcXG4gICAgICAgIGlmICjmjpLluo8gPT0gJyMxYWFkMTlcXFwiPuato+W6jycpIHtcXG4gICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgY3AgPSDnq6DoioIubWFwKChkYXRhLCBzc2lkKSA9PiB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSwgJ2EmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgdXJsOiBwZChkYXRhLCAnYSYmaHJlZicpICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IOeroOiKgi5sZW5ndGggPiAzID8gJ3RleHRfNCcgOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsczogTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IHBkKGRhdGEsICdhJiZocmVmJylcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9KTtcXG4gICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhNWV9VUkwgKyBcXFwiX+mAiembhlxcXCIpO1xcbiAgICAgICAgYWRkSXRlbUJlZm9yZShNWV9VUkwgKyBcXFwiZm9vdGVyXFxcIiwgY3ApO1xcbiAgICAgICAgcHV0TXlWYXIoTVlfVVJMICsgXFxcIueroOiKguaOkuW6j1xcXCIsIOaPkOekuilcXG4gICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgfSwgdGFicywg5o6S5bqP5ZCNLCBsYXp5LCBkWzBdKSxcXG4gICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogTVlfVVJMICsgXFxcIl/mjpLluo9cXFwiLFxcbiAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwiVFZib3jmjqjpgIFcXFwiLFxcbiAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh0YWJzLCBsaXN0cywgZCkgPT4ge1xcbiAgICAgICAgICAgICAgICB2YXIg5o6o6YCBID0ge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBnZXRQYWdlVGl0bGUoKSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJjb250ZW50XFxcIjogZC5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInBpY1xcXCI6IGQuaW1nIHx8IGQucGljX3VybCxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJmcm9tXFxcIjogdGFicy5qb2luKCckJCQnKSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBzdG9yYWdlMC5nZXRNeVZhcihcXFwibGlzdHNcXFwiKS5tYXAobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsaS5tYXAobGkxID0+IHBkZmgobGkxLCAnVGV4dCcpICsgJyQnICsgcGQobGkxLCAnYSYmaHJlZicpKS5qb2luKCcjJylcXG4gICAgICAgICAgICAgICAgICAgIH0pLmpvaW4oJyQkJCcpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnko5o6o6YCBKSlcXG4gICAgICAgICAgICB9LCB0YWJzLCBsaXN0cywgZFswXSlcXG4gICAgICAgIH1dXFxuICAgIH1cXG59KVxcblxcbnRhYnMuZm9yRWFjaCgoZGF0YSwgaWQpID0+IHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBnZXRNeVZhcihNWV9VUkwsICcwJykgPT0gaWQgPyAn4oCc4oCcJyArIGRhdGEgKyAn4oCd4oCdJyA6IGRhdGEsXFxuICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKOe6v+i3rywgbGF6eSwgaWQpID0+IHtcXG4gICAgICAgICAgICB2YXIgbGlzdHMgPSBzdG9yYWdlMC5nZXRNeVZhcihcXFwibGlzdHNcXFwiKTtcXG4gICAgICAgICAgICB2YXIg5o6S5bqPID0gZ2V0TXlWYXIoTVlfVVJMICsgXFxcIueroOiKguaOkuW6j1xcXCIsICcjMWFhZDE5XFxcIj7mraPluo8nKTtcXG4gICAgICAgICAgICB2YXIg5o+Q56S6ID0g5o6S5bqPID09ICcjRkYwMDAwXFxcIj7lgJLluo8nID8gJyMxYWFkMTlcXFwiPuato+W6jycgOiAnI0ZGMDAwMFxcXCI+5YCS5bqPJztcXG4gICAgICAgICAgICDnur/ot68uZm9yRWFjaCgoZGF0YSwgeGxpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpZCA9PSB4bGlkID8gJ+KAnOKAnCcgKyBkYXRhICsgJ+KAneKAnScgOiBkYXRhLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcIl/nur/ot69cXFwiICsgeGxpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHB1dE15VmFyKE1ZX1VSTCwgaWQpXFxuICAgICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxuICAgICAgICAgICAgaWYgKOaOkuW6jyA9PSAnI0ZGMDAwMFxcXCI+5YCS5bqPJykge1xcbiAgICAgICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGRhdGEsICdhJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IOeroOiKgi5sZW5ndGggPiAzID8gJ3RleHRfNCcgOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBkKGRhdGEsICdhJiZocmVmJylcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiKTtcXG4gICAgICAgICAgICBhZGRJdGVtQmVmb3JlKE1ZX1VSTCArIFxcXCJmb290ZXJcXFwiLCBjcCk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgdGFicywgbGF6eSwgaWQpLFxcbiAgIC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VybDogXFxcIm5hdi10YWJzXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJteXVpLWNvbnRlbnRfX2xpc3RcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJteXVpLWNvbnRlbnRfX2xpc3RcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm5hdi10YWJzXFxcIiwgXFxcInN0dWktY29udGVudF9fcGxheWxpc3RcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJuYXYtdGFiczFcXFwiLFxcbiAgICAgICAgICAgIGFsbEtleTogdHJ1ZSxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJoM1xcXCIsIFxcXCJzdHVpLWNvbnRlbnRfX3BsYXlsaXN0XFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwiaDNcXFwiLFxcbiAgICAgICAgICAgIGFsbEtleTogdHJ1ZSxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJteXVpLXZvZGxpc3QgXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibXl1aS12b2RsaXN0XFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJtby1tb3ZzLWl0ZW1cXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJtby1tb3ZzLWl0ZW1cXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm1vZHVsZS10YWItaXRlbVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vZHVsZS10YWItaXRlbVxcXCIsXFxuICAgICAgICAgICAgLy8gICAgIGFsbEtleTogdHJ1ZSxcXG4gICAgICAgIH0se1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwieS1wbGF5TGlzdFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcInktcGxheUxpc3RcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcInN0dWktdm9kbGlzdCBcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJzdHVpLXZvZGxpc3RcXFwiLFxcbiAgICAgICAgICAgIC8vICAgICBhbGxLZXk6IHRydWUsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwicGxheV9zb3VyY2VfdGFiXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwicGxheV9zb3VyY2VfdGFiXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJmZWQtcGxheS1pdGVtXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwiZmVkLXBsYXktaXRlbVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibW9kdWxlLWl0ZW1cXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJtb2R1bGUtaXRlbXNcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcInZvZGxpc3QgXFxcIiwgXFxcImxhenlsb2FkXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwidm9kbGlzdFxcXCIsXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm1vLXBsYXktbG9hZFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vLXBsYXktbG9hZFxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwiZmVkLWxpc3QtdGl0bGVcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJmZWQtbGlzdC10aXRsZVxcXCIsXFxuICAgICAgICAgICAgLy9hbGxLZXk6IHRydWUsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwicGFjay15a3BhY2tcXFxcXFxcIlxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcInBhY2steWtwYWNrXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICAvKlxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICBrZXlzOiBbXFxcIml0ZW1cXFwiXSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcIml0ZW1cXFwiLFxcbiAgICAgICAgICAgICAgICB9LCovXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJkYXRhX2xpc3RcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJkYXRhX2xpc3RcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgXSxcXG4gICAgXFxcInNlYXJjaFxcXCI6IFt7XFxuICAgICAgICAgICAga2V5czogW1xcXCJzdHVpLXZvZGxpc3RfX21lZGlhXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwic3R1aS12b2RsaXN0X19tZWRpYVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibXl1aS12b2RsaXN0X19tZWRpYVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm15dWktdm9kbGlzdF9fbWVkaWFcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm1vZHVsZS1zZWFyY2gtaXRlbVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vZHVsZS1zZWFyY2gtaXRlbVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAg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sZS51cmwpO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBldmFsLmNhbGwobnVsbCwgXFxcIjsoZnVuY3Rpb24oKXtcXFwiICsgZ2V0UGFnZVNvdXJjZShwYWdlUnVsZS51cmwpICsgXFxcIn0pKClcXFwiKTtcXG4gICAgICAgICAgICBsb2coXFxcIuWMuemFjeaooeadv+aIkOWKn++8jOato+WcqOe7k+adn+WMuemFjei/m+eoi1xcXCIpO1xcbiAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGxvZyhcXFwi5Yy56YWN5qih5p2/6ZSZ6K+vXFxcIik7XFxuICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICBsb2coXFxcIuato+WcqOWMuemFjeS4i+S4gOS4quaooeadvy4uLi4uLlxcXCIpXFxuICAgICAgICAgICAgaWYgKHBhZ2VSdWxlLnVybCA9PSBwYWdlUnVsZXNbcGFnZVJ1bGVzLmxlbmd0aCAtIDFdLnVybCkge1xcbiAgICAgICAgICAgICAgICBsb2coXFxcIuW3suWMuemFjeWIsOacgOWQjuS4gOS4quaooeadv++8jOaaguaXoOWQiOmAgueahOaooeadv1xcXCIpO1xcbiAgICAgICAgICAgICAgICBzZXRSZXN1bHQoW10pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfVxcblxcbn1cXG4kLmV4cG9ydHMuYXV0b1BhZ2UgPSBhdXRvUGFnZTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS4gOe6p3BhY2steWtwYWNrXCIsXCJwYXRoXCI6XCJwYWNrLXlrcGFja1wiLFwicnVsZVwiOlwidmFyIGQgPVtdO1xcbk1ZX1JVTEUudXJsLm1hdGNoKC9meXBhZ2UvKVswXVxcbnZhciBsaXN0ID0gcGRmYShnZXRSZXNDb2RlKCksICdib2R5JiYucGFjay15a3BhY2snKTtc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m9sZCksXFxuICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICB9KVxcbiAgICBjYXRlZ29yaWVzLmZvckVhY2goKGNhdGVnb3J5LCBpbmRleCkgPT4ge1xcbiAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NKTtcXG4gICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZijmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0aXRsZS5mb250Y29sb3Io5YiG57G76aKc6ImyKSA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkobmV3X2NhdGUpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2UgaWYgKGZvbGQgPT09ICcxJykge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZijmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0aXRsZS5mb250Y29sb3Io5YiG57G76aKc6ImyKSA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9KVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS4gOe6p+WFrOWFseaooeadv1wiLFwicGF0aFwiOlwieWlqaVwiLFwicnVsZVwiOlwiZnVuY3Rpb24g5LiA57qnKCkge307XFxuT2JqZWN0LmFzc2lnbijkuIDnuqcucHJvdG90eXBlLCB7XFxuICAgIGNvbnN0cnVjdG9yOiDkuIDnuqcsXFxuICAgIHRlc3QoKSB7fSxcXG4gICAg6I635Y+W5rqQ56CBKHVybCwgaGVhZGVyKSB7XFxuICAgICAgICByZXR1cm4gZmV0Y2godHJ1ZV91cmwsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXIgfHwge1xcbiAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6ICdNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wKSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSAvLyDpu5jorqTnu5/kuIDkvb/nlKhQQyBVQVxcbiAgICB9LFxcbiAgICDojrflj5bmraPnoa7pk77mjqUocGFnZSwgcmVnZXgpIHtcXG4gICAgICAgIGxldCB0cnVlX3VybCA9IGdldE15VmFyKCdoZWFkZXIudXJsJywgTVlfVVJMKTtcXG4gICAgICAgIGxldCDpk77mjqXlpITnkIblt6XlhbcgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS91cmwtcHJvY2Vzc29yP3J1bGU95qih5p2/wrdRJ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IC7lvIDlkK/lhoXnva7mipjlj6Dlip/og70oKSAvLyDlv4XpobtcXG4gICAgICAgICAgICAu5oqY5Y+gKOW9k+WJjeaKmOWPoOeKtuaAgSkgLy8g5b+F6aG7XFxuICAgICAgICAgICAgLumAieS4reeahOWIhuexu+minOiJsihnZXRSYW5nZUNvbG9ycygpKVxcbiAgICAgICAgIC8vICAgLumAieS4reeahOWIhuexu+minOiJsignIzA5OEFDMScpXFxuICAgICAgICAgICAgLuW8gOWni+aJk+mAoOWIhuexuygpO1xcbiAgICB9LFxcbiAgICDnlJ/miJDniYfljZUoZCwgaHRtbCkge1xcbiAgICAgICAgbGV0IGxpc3QgPSBwZGZhKGh0bWwsIOWIl+ihqCk7XFxuICAgICAgICBmb3IgKGxldCBqIGluIGxpc3QpIHtcXG4gICAgICAgICAgICBsZXQgaW1nID0gcGQobGlzdFtqXSwg5Zu+54mHKTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChsaXN0W2pdLCDmoIfpopgpLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBwZGZoKGxpc3Rbal0sIOaPj+i/sCksXFxuICAgICAgICAgICAgICAgIGltZzogaW1nICsgJ0BSZWZlcmVyPScgKyBpbWcsXFxuICAgICAgICAgICAgICAgIHVybDogcGQobGlzdFtqXSwg6ZO+5o6lKS5yZXBsYWNlKCd2b2RwbGF5Jywndm9kZGV0YWlsJykgKyBcXFwiI2ltbWVyc2l2ZVRoZW1lI1xcXCJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbn0pXFxuXFxuJC5leHBvcnRzID0gbmV3IOS4gOe6pygpO1xcbiQuZXhwb3J0c1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5Yqo5oCB5YiG57G7MlwiLFwicGF0aFwiOlwiY2F0ZWdvcmllcy1oZWFkZXJcIixcInJ1bGVcIjpcImNvbnN0IHN5bWJ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F9idXR0b25cXFwiIH07XFxuICAgICAqICAgICAgICDlj4LmlbDph4fnlKjlj6/pgInopobnm5bmqKHlvI/vvIzkuI3lhpnnmoTlj4LmlbDliJnkvb/nlKjpu5jorqQ7XFxuICAgICAqICAgICAgICDmr5TlpoLkvKDlhaUgeyBjb2xfdHlwZTpcXFwidGV4dF8xXFxcIiB977yM6YKj5pyA57uI57uT5p6c5bCx5pivIHsgdGl0bGU6XFxcIuagh+mimDFcXFwiLCB1cmw6XFxcInh4eFxcXCIsIGNvbF90eXBlOlxcXCJ0ZXh0XzFcXFwiIH1cXG4gICAgICogQHJldHVybnMge0NhdGVnb3JpZXNIZWFkZXJ9XFxuICAgICAqL1xcbiAgICBmb2xkTGF5b3V0KGxheW91dCkge1xcbiAgICAgICAgaWYgKHR5cGVvZiBsYXlvdXQgPT09ICdvYmplY3QnKSB7XFxuICAgICAgICAgICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyhsYXlvdXQpXFxuICAgICAgICAgICAgbGV0IGluamVjdEluZGV4ID0gbGF5b3V0LmluamVjdEluZGV4IHx8IGxheW91dFsn5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGMJ11cXG4gICAgICAgICAgICBpZiAobGF5b3V0LnRpdGxlIHx8IGxheW91dC51cmwgfHwgbGF5b3V0LmNvbF90eXBlIHx8IGluamVjdEluZGV4KSB7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0ga2V5c1tpXVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdW2tleV0gPSBsYXlvdXRba2V5XTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi6K+35Lyg5YWl5q2j56Gu55qE5oqY5Y+g55WM6Z2i5YWD57Sg77yBXFxcIilcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgLy8gaW5qZWN0SW5kZXgg5oqY5Y+g5oyJ6ZKu5o+S5YWl56ysIGluamVjdEluZGV4IOihjFxcbiAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCkge1xcbiAgICAgICAgICAgICAgICBpZiAoISh0eXBlb2YgKGluamVjdEluZGV4KSA9PT0gJ251bWJlcicpKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeaVsOWtl++8gVxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGluamVjdEluZGV4IDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXlpKfkuo4gMCDnmoTmlbTmlbDvvIFcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCA+IHRoaXNbc3ltYm9sTWFwLm1Gb2xkSW5kZXhdKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOS4jeW+l+Wkp+S6juaYvuekuuaKmOWPoOihjOaVsO+8geivt+iwg+eUqCAuZm9sZEluZGV4KGluZGV4KSDmiJYgLuesrOWHoOihjOW8gOWni+aKmOWPoChpbmRleCkg5Lyg5YWl5q2j56Gu55qE5pi+56S65oqY5Y+g6KGM5pWwXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0uaW5qZWN0SW5kZXggPSBpbmplY3RJbmRleCB8fCAxO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZS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tcXG4gICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5ydWxlT2JqTGlzdF0ucHVzaChydWxlT2JqKVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIHRoaXM7XFxuICAgIH0sXFxuICAgIGV2YWxKU1J1bGUoaXRlbSwganNSdWxlKSB7XFxuICAgICAgICBsZXQgcnVsZSA9IGpzUnVsZS5yZXBsYWNlKFxcXCJAanM6XFxcIiwgXFxcIlxcXCIpXFxuICAgICAgICBydWxlID0gcnVsZS50cmltKClcXG4gICAgICAgIC8vIGxvZygkLnN0cmluZ2lmeShydWxlKSlcXG4gICAgICAgIGxldCBpbnB1dCA9IGl0ZW1cXG4gICAgICAgIGlmIChydWxlLnN0YXJ0c1dpdGgoXFxcIihcXFwiKSkge1xcbiAgICAgICAgICAgIGV2YWwoJ3Jlc3VsdCA9ICcgKyBydWxlKVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAvKipcXG4gICAgICAgICAgICAgKiDov5jljp/miJAgJC50b1N0cmluZyguLi4pIOeahOacgOe7iOe7k+aenO+8jOi+vuWIsOacgOe7iOWkhOeQhuaWueW8j+i3n+S4iumdoueahCBpZiDkuIDoh7TnmoTnm67nmoRcXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICBldmFsKCdyZXN1bHQgPSAnICsgJygoKSA9PiB7JyArIHJ1bGUgKyAnfSkoKScpXFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gKHJlc3VsdCB8fCAnJylcXG4gICAgfSxcXG4gICAgZ2V0VGl0bGUoc3JjLCBjYXRlZ29yeSkge1xcbiAgICAgICAgbGV0IHRpdGxlID0gJydcXG4gICAgICAgIGxldCB0aXRsZVJ1bGUgPSBjYXRlZ29yeS50aXRsZVJ1bGUgfHwgJ2EmJlRleHQnXFxuICAgICAgICBpZiAodGl0bGVSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgIHRpdGxlID0gdGhpcy5ldmFsSlNSdWxlKHNyYywgdGl0bGVSdWxlKVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB0aXRsZSA9IHBhcnNlRG9tRm9ySHRtbChzcmMsIHRpdGxlUnVsZSlcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB0aXRsZSB8fCBcXFwiXFxcIjtcXG4gICAgfSxcXG4gICAgZ2V0VXJsKHNyYywgY2F0ZWdvcnkpIHtcXG4gICAgICAgIGxldCB1cmwgPSAnJ1xcbiAgICAgICAgbGV0IHVybFJ1bGUgPSBjYXRlZ29yeS51cmxSdWxlIHx8ICdhJiZocmVmJ1xcbiAgICAgICAgaWYgKHR5cGVvZiB1cmxSdWxlID09PSAnb2JqZWN0Jykge1xcbiAgICAgICAgICAgIGxldCBtVXJsUnVsZSA9IHVybFJ1bGUucnVsZSB8fCB1cmxSdWxlWyfop6PmnpDop4TliJknXSB8fCAnYSYmaHJlZic7XFxuICAgICAgICAgICAgaWYgKG1VcmxSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLmV2YWxKU1J1bGUoc3JjLCBtVXJsUnVsZSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgIGlmICh1cmxSdWxlLnBhcnNlT3B0aW9uKSB7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHVybFJ1bGUucGFyc2VPcHRpb24pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbUZvckh0bWxcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkZmhcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tRm9ySHRtbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxSdWxlW1xcXCLop6PmnpDmlrnms5VcXFwiXSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlW1xcXCLop6PmnpDmlrnms5VcXFwiXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tRm9ySHRtbFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRmaFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHVybCA9IHBhcnNlKHNyYywgbVVybFJ1bGUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAodXJsUnVsZS5kZWFsVXJsKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHVybFJ1bGUuZGVhbFVybCh1cmwpXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxSdWxlWyfkuozmrKHlpITnkIYnXSkge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB1cmxSdWxlWyfkuozmrKHlpITnkIYnXSh1cmwpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBpZiAodXJsUnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdGhpcy5ldmFsSlNSdWxlKHNyYywgdXJsUnVsZSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gcGFyc2VEb20oc3JjLCB1cmxSdWxlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gdXJsIHx8IFxcXCJcXFwiO1xcbiAgICB9LFxcbiAgICBidWlsZCgpIHtcXG4gICAgICAgIC8vIOajgOa1i+aYr+WQpuS8oOWFpemcgOimgeeahOWPguaVsFxcbiAgICAgICAgdGhpcy5jaGVja1BhcmFtcygpXFxuICAgICAgICAvLyDmr4/kuIDkuKrliIbnsbvnmoTllK/kuIDmoIfor4ZcXG4gICAgICAgIGxldCBtVGFnID0gdGhpc1tzeW1ib2xNYXAubVRhZ10gfHwgXFxcIlxcXCJcXG4gICAgICAgIC8v57+76aG1IOmcgOimgeagueaNruWunumZheabv+aNolxcbiAgICAgICAgY29uc3QgaHRtbCA9IHRoaXNbc3ltYm9sTWFwLnNyY10gfHwgcmVxdWVzdCh0aGlzW3N5bWJvbE1hcC50cnVlX3VybF0pXFxuICAgICAgICBjb25zdCBlbXB0eSA9IFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgLy/ojrflj5bliJfooahcXG4gICAgICAgIGNvbnN0IGNhdGVnb3JpZXMgPSBbXVxcbiAgICAgICAgdGhpc1tzeW1ib2xNYXAucnVsZU9iakxpc3RdLm1hcChydWxlT2JqID0+IHtcXG4gICAgICAgICAgICBsZXQgbGlzdCA9IFtdXFxuICAgICAgICAgICAgbGV0IGxpc3RSdWxlID0gcnVsZU9iai5saXN0UnVsZSB8fCBydWxlT2JqW1xcXCLkuIDnuqfliIbnsbtcXFwiXVxcbiAgICAgICAgICAgIGlmIChsaXN0UnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgLy8gbG9nKCQuc3RyaW5naWZ5KGxpc3RSdWxlKSlcXG4gICAgICAgICAgICAgICAgbGlzdCA9IHRoaXMuZXZhbEpTUnVsZShodG1sLCBsaXN0UnVsZSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCBsaXN0UnVsZSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgLy8gbG9nKGxpc3QpXFxuICAgICAgICAgICAgbGlzdC5tYXAoY2F0ZWdvcnkgPT4ge1xcbiAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdDogY2F0ZWdvcnksXFxuICAgICAgICAgICAgICAgICAgICBzdWJMaXN0UnVsZTogcnVsZU9iai5zdWJMaXN0UnVsZSB8fCBydWxlT2JqW1xcXCLlrZDliIbnsbtcXFwiXSxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlUnVsZTogcnVsZU9iai50aXRsZVJ1bGUgfHwgcnVsZU9ialtcXFwi5YiG57G75qCH6aKYXFxcIl0sXFxuICAgICAgICAgICAgICAgICAgICB1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Cc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAjRkYwMDAwXFxcIj7iiKg8L3NwYW4+PC9iPicgOiAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAjMWFhZDE5XFxcIj7iiKc8L3NwYW4+PC9iPicpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLnVybCB8fCAkKFxcXCJoaWtlcjovL2VtcHR5I25vSGlzdG9yeSNcXFwiKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy5tVGFnICsgcGFyYW1zLlZBUk1BUC5GT0xELCBnZXRNeVZhcihwYXJhbXMubVRhZyArIHBhcmFtcy5WQVJNQVAuRk9MRCwgcGFyYW1zLmlzRm9sZCkgPT09ICcxJyA/ICcwJyA6ICcxJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtVGFnOiBtVGFnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0ZvbGQ6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0uY29sX3R5cGUgfHwgXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaChmb2xkTGF5b3V0KVxcbiAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgIC8v5YW35L2T5YiX6KGo5LiL55qE5YiG57G7XFxuICAgICAgICAgICAgICAgIGxldCBzdWJfY2F0ZWdvcmllcyA9IFtdO1xcbiAgICAgICAgICAgICAgICBpZiAoY2F0ZWdvcnkuc3ViTGlzdFJ1bGUuc3RhcnRzV2l0aChcXFwiQGpzOlxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHRoaXMuZXZhbEpTUnVsZShjYXRlZ29yeS5saXN0LCBjYXRlZ29yeS5zdWJMaXN0UnVsZSlcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzID0gcGFyc2VEb21Gb3JBcnJheShjYXRlZ29yeS5saXN0LCBjYXRlZ29yeS5zdWJMaXN0UnVsZSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGluZGV4IDwgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkSW5kZXhdIHx8IDEpKSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmdldFVybChpdGVtLCBjYXRlZ29yeSlcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPScgKyB0aGlzW3N5bWJvbE1hcC5tQ29sb3JdICsgJz4nICsgdGl0bGUgKyAnIDwvZm9udD48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQodXJsKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2NhdGUgPSBbXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5pbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6IFxcXCIwXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmluZGV4ID09PSAwID8gbmV3X2NhdGUgOiBwYXJhbXMuY2F0ZV90ZW1wKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLlVSTCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IG1UYWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpc1tzeW1ib2xNYXAubUZvbGRdID09PSAnMCcpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHRoaXMuZ2V0VGl0bGUoaXRlbSwgY2F0ZWdvcnkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuQ0FURUdPUlksIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuVVJMLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogdGhpc1tzeW1ib2xNYXAubVBhZ2VdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9LFxcblxcbiAgICDnlYzpnaIobGF5b3V0KSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5sYXlvdXQobGF5b3V0KVxcbiAgICB9LFxcbiAgICDliIbnsbvpk77mjqUodHJ1ZVVybCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMudHJ1ZVVybCh0cnVlVXJsKTtcXG4gICAgfSxcXG4gICAg6aG156CBKHBhZ2UpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLnBhZ2UocGFnZSk7XFxuICAgIH0sXFxuICAgIOa6kOeggShod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JYhXFxcIilcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICghdGhpcy5wYXJhbXMucGFnZSkge1xcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi6K+35YWI6LCD55SoIC5wYWdlKHBhZ2UpIOS8oOWFpemhteeggei/m+ihjOWIneWni+WMliFcXFwiKVxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBiYXNlVXJsKHVybCl7XFxuICAgICAgICB0aGlzLnBhcmFtcy51cmwgPSB1cmxcXG4gICAgICAgIHJldHVybiB0aGlzXFxuICAgIH0sXFxuICAgIHBhZ2UocGFnZSl7XFxuICAgICAgICB0aGlzLnBhcmFtcy5wYWdlID0gcGFnZVxcbiAgICAgICAgcmV0dXJuIHRoaXNcXG4gICAgfSxcXG4gICAgYWRkRXh0cmEocmVnRXhwKSB7XFxuICAgICAgICBpZiAocmVnRXhwLmNvbnN0cnVjdG9yID09PSBBcnJheSkge1xcbiAgICAgICAgICAgIHRoaXMucmVnZXhNYXAgPSB0aGlzLnJlZ2V4TWFwLmNvbmNhdChyZWdFeHApXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHRoaXMucmVnZXhNYXAucHVzaChyZWdFeHApXFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgfSxcXG4gICAgZGVidWcoKSB7XFxuICAgICAgICB0aGlzLnBhcmFtcy5kZWJ1ZyA9IHRydWVcXG4gICAgICAgIHJldHVybiB0aGlzO1xcbiAgICB9LFxcbiAgICBleGVjKCkge1xcbiAgICAgICAgdGhpcy5jaGVja1BhcmFtcygpXFxuICAgICAgICBsZXQgdHJ1ZV91cmwgPSAnJ1xcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLnJlZ2V4TWFwLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgbGV0IHJlZ09iaiA9IHRoaXMucmVnZXhNYXBbaV07XFxuICAgICAgICAgICAgbGV0IHVybEV4cCA9IHJlZ09iai5yZWc7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiB1cmxFeHAgPT09ICdzdHJpbmcnKSB7XFxuICAgICAgICAgICAgICAgIHVybEV4cCA9IG5ldyBSZWdFeHAodXJsRXhwKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAodXJsRXhwLnRlc3QodGhpcy5wYXJhbXMudXJsKSkge1xcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wYXJhbXMuZGVidWcpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyh1cmxFeHAudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0cnVlX3VybCA9IHJlZ09iai5leGVjKCk7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh0cnVlX3VybCkge1xcbiAgICAgICAgICAgIHJldHVybiB0cnVlX3VybDtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyYW1zLnVybFxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICDojrflj5blpITnkIbnu5PmnpwoKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5leGVjKClcXG4gICAgfSxcXG4gICAg6ZO+5o6lKHVybCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZVVybCh1cmwpXFxuICAgIH0sXFxuICAgIOmhteeggShwYWdlKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5wYWdlKHBhZ2UpXFxuICAgIH0sXFxuICAgIOaPkuWFpeaWsOWkhOeQhuinhOWImShyZWdFeHApIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmFkZEV4dHJhKHJlZ0V4cClcXG4gICAgfSxcXG4gICAg6LCD6K+V5qih5byPKCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuZGVidWcoKTtcXG4gICAgfVxcbn0pX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