Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@爱听音乐@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi54ix5ZCs6Z+z5LmQIiwiYXV0aG9yIjoi5a2j6aOOIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjaHR0cDovL3d3dy4ydDU4LmNvbSNmeXBhZ2UiLCJ2ZXJzaW9uIjo0LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6Im11c2ljIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG4kLnJlcXVpcmUoXCJob21lXCIpLkhvbWUoKTsiLCJzZWFyY2hfdXJsIjoiaHR0cDovL3d3dy4ydDU4LmNvbS9zby8qKi9meXBhZ2UuaHRtbCIsImdyb3VwIjoi4pGk6Z+z6aKRIiwic2VhcmNoRmluZCI6ImpzOlxudmFyIGQgPSBbXVxudmFyIGh0bWwgPSBmZXRjaChNWV9VUkwpXG5sZXQgcGxheV9saXN0ID0gcGRmYShodG1sLFwiYm9keSYmLnBsYXlfbGlzdCYmbGlcIilcbnBsYXlfbGlzdC5mb3JFYWNoKChzKSA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChzLFwiLm5hbWUmJlRleHRcIilcbiAgICAgICAgICAgICAgICBsZXQgbXYgPSBwZGZoKHMsXCIubXYmJlRleHRcIilcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gbXY/XCJodHRwOi8vd3d3LjJ0NTguY29tXCIrcGRmaChzLFwiLm12JiZhJiZocmVmXCIpKyQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9wdWJsaWNcIikuTVY6XCJodHRwOi8vd3d3LjJ0NTguY29tXCIrcGRmaChzLFwiYSYmaHJlZlwiKSsnQHJ1bGU9anM6JC5yZXF1aXJlKFwibXVzaWNcIiknXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6dGl0bGUsXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6bXY/bXY6XCLmrYzmm7JcIixcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcImh0dHA6Ly93d3cuMnQ1OC5jb21cIitwZGZoKHMsXCJhJiZocmVmXCIpKydAcnVsZT1qczokLnJlcXVpcmUoXCJtdXNpY1wiKScsXG4gICAgICAgICAgICAgICAgICAgIC8vcGljX3VybDogaW1nLFxuICAgICAgICAgICAgICAgICAgICAvL2NvbF90eXBlOlwidGV4dF8xXCJcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbnNldFJlc3VsdChkKSIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6ImlmIChyZXF1ZXN0KCdoaWtlcjovL2hvbWVAzrEnKSA9PSAnbnVsbCcpIHtcbiAgICBjb25maXJtKHtcbiAgICAgICAgdGl0bGU6ICfkvp3otZbmo4DmtYsnLFxuICAgICAgICBjb250ZW50OiAn5qOA5rWL5Yiw57y65bCR5bCP56iL5bqPLOivt+WvvOWFpSEnLFxuICAgICAgICBjb25maXJtOiAoKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gXCLmtbfpmJTop4bnlYzpppbpobXpopHpgZPop4TliJnjgJDOseOAke+/pWhvbWVfcnVsZV91cmzvv6VodHRwOi8vaGlrZXIubm9raWEucHJlc3MvaGlrZXJ1bGUvcnVsZWxpc3QuanNvbj9pZD02NDE3X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xsXzNcXFwiLFxcbiAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgobGksdXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBrZXlzID0gbGlzdE15VmFyS2V5cygpO1xcbiAgICBmb3IgKGxldCBpdCBvZiBrZXlzKSB7XFxuICAgICAgICBjbGVhck15VmFyKGl0KTtcXG4gICAgfTtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJmZW5sXFxcIiwgbGkpO1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwidXJsXFxcIix1cmwpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgIH0sbGksdXJsKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgIGZ1bmN0aW9uIHN5KHVybCwgZCkge1xcbiAgICAgICAgbGV0IGh0bWwgPSBmZXRjaCh1cmwpXFxuICAgICAgICBsZXQgTGFiID0gcGRmYShodG1sLCdib2R5JiYubGF5dWktcm93Omx0KDQpJyk7XFxyXFxuICAgICAgICBMYWIuZm9yRWFjaCgoeCkgPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi4paQIFxcXCIuZm9udGNvbG9yKCcjMjBhMTYyJykrcGRmaCh4LFxcXCJoMSYmVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGxldCBpdGVtID0gcGRmYSh4LCAnYm9keSYmbGknKTtcXHJcXG4gICAgICAgICAgICBpdGVtLmZvckVhY2goKHMpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IGltZyA9IHBkZmgocyxcXFwiaW1nJiZzcmNcXFwiKS5zcGxpdCgndXJsPScpWzFdXFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgocyxcXFwiLm5hbWUmJlRleHRcXFwiKVxcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gXFxcImh0dHA6Ly93d3cuMnQ1OC5jb21cXFwiK3BkZmgocyxcXFwiYSYmaHJlZlxcXCIpXFxuICAgICAgICAgICAgICAgIGxldCBzdXJsXFxuICAgICAgICAgICAgICAgIGlmKC9zb25nLy50ZXN0KHVybCkpe1xcbiAgICAgICAgICAgICAgICAgICAgc3VybCA9IHVybCskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9wdWJsaWNcXFwiKS5sYXp5XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC92aWRlby8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICAgICAgICAgIHN1cmw9IHVybCskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9wdWJsaWNcXFwiKS5NVlxcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvbGlzdC8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICAgICAgICAgIHN1cmw9IHVybC5yZXBsYWNlKC8uaHRtbC8sYC9meXBhZ2UuaHRtbGApKydAcnVsZT1qczokLnJlcXVpcmUoXFxcInBsYXlsaXN0XFxcIiknXFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9zaW5nZXIvLnRlc3QodXJsKSl7XFxuICAgICAgICAgICAgICAgICAgICBzdXJsPSB1cmwrJ2Z5cGFnZUBydWxlPWpzOiQucmVxdWlyZShcXFwic2luZ2VyXFxcIiknXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTp0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogc3VybCxcXG4gICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGltZyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBpbWc/XFxcImNhcmRfcGljXzNcXFwiOlxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9uZ0NsaWNrOlt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOlxcXCLmrYzmm7Lor6bmg4VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigvc29uZy8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKydAcnVsZT1qczokLnJlcXVpcmUoXFxcIm11c2ljXFxcIiknfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSByZXR1cm4gXFxcInRvYXN0Oi8v6L+Z5LiN5piv5q2M5puyXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sdXJsKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH1cXG4gICAgZnVuY3Rpb24gbGVpYih1cmwsZCxwYWdlLHRhZykge1xcbiAgICBjb25zdCDkuIvkuIDpobUgPSBcXFwicGQoaHRtbCwgJ2E6bWF0Y2hlcyjkuIvkuIDpobUpJiZocmVmJylcXFwiO1xcbiAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UveWk/cnVsZT3OsScpKS5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5sYXp5XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC92aWRlby8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICAgICAgICAgIHN1cmw9IHVybCskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9wdWJsaWNcXFwiKS5NVlxcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvbGlzdC8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICAgICAgICAgIHN1cmw9IHVybC5yZXBsYWNlKC8uaHRtbC8sYC9meXBhZ2UuaHRtbGApKydAcnVsZT1qczokLnJlcXVpcmUoXFxcInBsYXlsaXN0XFxcIiknXFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9zaW5nZXIvLnRlc3QodXJsKSl7XFxuICAgICAgICAgICAgICAgICAgICBzdXJsPSB1cmwrJ2Z5cGFnZUBydWxlPWpzOiQucmVxdWlyZShcXFwic2luZ2VyXFxcIiknXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaW1nLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGltZz9cXFwiY2FyZF9waWNfM1xcXCI6XFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYTp7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5oZXJpdFRpdGxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6W3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6XFxcIuatjOabsuivpuaDhVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKC9zb25nLy50ZXN0KHVybCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArJ0BydWxlPWpzOiQucmVxdWlyZShcXFwibXVzaWNcXFwiKSd9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHJldHVybiBcXFwidG9hc3Q6Ly/ov5nkuI3mmK/mrYzmm7JcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSx1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSkgICBcXG4gICAgfSlcXG5hdXRvUGFnZSgpO1xcbiAgICB9XFxuZnVuY3Rpb24gbG92ZShkKSB7XFxuICAgIC8v5oSf6LCi8J+UpfCflKXwn5Sl5aSn5L2s55qE5Luj56CBXFxuICAgIHZhciBsYWJlbCA9IGdldFZhcihcXFwibGFiZWxcXFwiKSA/IGdldFZhcihcXFwibGFiZWxcXFwiKSA6IFxcXCLmrYzmm7JcXFwiO1xcbmlmIChNWV9QQUdFID09IDEpIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBsYWJlbCA9PSBcXFwi5q2M5puyXFxcIiA/ICfigJzigJzigJ3igJ0nK1xcXCLmrYzmm7JcXFwiLmZvbnRjb2xvcigncmVkJyk6XFxcIuatjOabslxcXCIsXFxuICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyNAbGF6eVJ1bGU9LmpzOnB1dFZhcignbGFiZWwnLCfmrYzmm7InKTtyZWZyZXNoUGFnZShmYWxzZSk7J3RvYXN0Oi8v5YiH5o2i5oiQ5YqfJ1xcXCIsXFxuICAgICAgICBwaWNfdXJsOiBcXFwiaHR0cHM6Ly9oaWtlcmZhbnMuY29tL3R1Ymlhby91bmZyYW1lZC80LnBu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biAgICAgICAgICAgIGltZzogbGlzdC5zcGxpdCgnQEAnKVsxXSxcXG4gICAgICAgICAgICB1cmw6IGxhYmVsID09IFxcXCLmrYzmm7JcXFwiP3VybCskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9wdWJsaWNcXFwiKS5sYXp5OnVybC5yZXBsYWNlKC8xLyxgZnlwYWdlYCkrJ0BydWxlPWpzOiQucmVxdWlyZShcXFwicGxheWxpc3RcXFwiKScsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdjYXJkX3BpY18zJyxcXG4gICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgdGl0bGU6ICflj5bmtojmlLbol48nLFxcbiAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChsaXN0LCB1KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gSlNPTi5wYXJzZShmZXRjaFBDKHUpIHx8ICdbXScpO1xcbiAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5maWx0ZXIoeCA9PiB4ICE9IGxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodSwgSlNPTi5zdHJpbmdpZnkoZGF0YSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgIH0sIGxpc3QsIHUpXFxuICAgICAgICAgICAgICB9LHtcXG4gICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuafpeeci+ivpuaDhVxcXCIsXFxuICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHVybCwgbGFiZWwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgbGV0IERldGFpbCA9IGxhYmVsID09IFxcXCLmrYzmm7J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L2VtcHR5XFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzNcXFwiXFxuICAgICAgICAgICAgfSx7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0LFxcbiAgICAgICAgICAgICAgICBwaWNfdXJsOiBwLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfM1xcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICB2YXIgc3RyID0gZmV0Y2hQQygnaGlrZXI6Ly9maWxlcy9ydWxlcy9tb24v54ix5ZCs6Z+z5LmQL2FsYnVtLnR4dCcpO1xcbiAgICAgICAgICAgICAgICBpZiAoIXN0cikge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvbW9uL+eIseWQrOmfs+S5kC9hbGJ1bS50eHQnLCBKU09OLnN0cmluZ2lmeShsaXN0KSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IEpTT04ucGFyc2Uoc3RyKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaXN0LmluZGV4T2YobmFtZSkgPT0gJy0xJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgLy8gbGlzdC5wdXNoKG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QudW5zaGlmdChuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvbW9uL+eIseWQrOmfs+S5kC9hbGJ1bS50eHQnLCBKU09OLnN0cmluZ2lmeShsaXN0KSk7XFxuICAgICAgICAgICAgICAgIC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XG4gICAgICAgIH0sXFxuICAgICAgICBjZW50ZXJUaXRsZTogXFxcIuWPlua2iFxcXCJcXG4gICAgfSk7XFxuICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxufSwgcGxheV9saXN0LCBpbWcpLFxcbiAgICAgcGljX3VybDogXFxcImhpa2VyOi8vaW1hZ2VzL2ljb25fYWRkMlxcXCIsXFxuICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfM1xcXCJcXG4gICAgfSx7XFxuICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVfYmxhbmtcXFwiXFxuICAgIH0pICAgIFxcbiAgICB9XFxuICAgIHBsYXlfbGlzdC5mb3JFYWNoKChzKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgocyxcXFwiLm5hbWUmJlRleHRcXFwiKVxcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gXFxcImh0dHA6Ly93d3cuMnQ1OC5jb21cXFwiK3BkZmgocyxcXFwiYSYmaHJlZlxcXCIpXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTp0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogdXJsKyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3B1YmxpY1xcXCIpLmxhenksXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpbWcsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazpbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTpcXFwi5q2M5puy6K+m5oOFXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArJ0BydWxlPWpzOiQucmVxdWlyZShcXFwibXVzaWNcXFwiKSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuc2V0UmVzdWx0KGQpXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLmrYzmiYtcIixcInBhdGhcIjpcInNpbmdlclwiLFwicnVsZVwiOlwianM6XFxuYWRkTGlzdGVuZXIoXFxcIm9uQ2xvc2VcXFwiLCAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIGNsZWFyTXlWYXIoXFxcImN0aXRsZVxcXCIpO1xcbiAgICAgICAgY2xlYXJNeVZhcihcXFwiY3VybFxcXCIpO1xcbn0pKTtcXG52YXIgZCA9IFtdXFxudmFyIGh0bWwgPSBmZXRjaChNWV9VUkwpXFxuY29uc3QgcGFnZSA9IE1ZX1BBR0VcXG52YXIgcGljID0gcGRmaChodG1sLFxcXCIucGljJiZpbWcmJnNyY1xcXCIpXFxudmFyIGF1dGhvciA9IHBkZmgoaHRtbCxcXFwiaDEmJlRleHRcXFwiKVxcbnNldFBhZ2VUaXRsZShhdXRob3IpXFxuaWYocGFnZT09MSl7XFxuZC5wdXNoKHtcXG4gICAgcGljX3VybDogcGljLFxcbiAgICB1cmw6IHBpYyxcXG4gICAgZGVzYzogJzAnLFxcbiAgICBjb2xfdHlwZTpcXFwiY2FyZF9waWNfMlxcXCIgICBcXG59LHtcXG4gICAgdGl0bGU6ICfigJzigJzigJ3igJ0nK2F1dGhvci5mb250Y29sb3IoJyM1OTU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XG4gICAgICAgICAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaW1nP2ltZzpwaWMsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogaW1nP1xcXCJjYXJkX3BpY18zXFxcIjpcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazpbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTpcXFwi5q2M5puy6K+m5oOFXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHN1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKC9zb25nLy50ZXN0KHN1cmwpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdXJsICsnQHJ1bGU9anM6JC5yZXF1aXJlKFxcXCJtdXNpY1xcXCIpJ31cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgcmV0dXJuIFxcXCJ0b2FzdDovL+i/meS4jeaYr+atjOabslxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LHN1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSkgICBcXG4gICAgfSlcXG5zZXRSZXN1bHQoZClcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuatjOabslwiLFwicGF0aFwiOlwibXVzaWNcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW11cXG5sZXQgaHRtbCA9IGZldGNoKE1ZX1VSTClcXG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M19jZW50ZXJcXFwiXFxuICAgIH0se1xcbiAgICAgICAgdGl0bGU6IGF1dGhvcixcXG4gICAgICAgIGRlc2M6IGluZm8sXFxuICAgICAgICBwaWNfdXJsOiBzcGljLFxcbiAgICAgICAgdXJsOiBzdXJsKydmeXBhZ2VAcnVsZT1qczokLnJlcXVpcmUoXFxcInNpbmdlclxcXCIpJyxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICB9KVxcbiAgICBwbGF5X2xpc3QuZm9yRWFjaCgoeCkgPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKHgsXFxcImgxJiZUZXh0XFxcIikrdCxcXG4gICAgICAgICAgICAgICAgLy9kZXNjOiB0LFxcbiAgICAgICAgICAgICAgICBwaWNfdXJsOiBkanBpYyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgIHZhciBzdHIgPSBmZXRjaFBDKCdoaWtlcjovL2ZpbGVzL3J1bGVzL21vbi/niLHlkKzpn7PkuZAvbXVzaWMudHh0Jyk7XFxuICAgICAgICAgICAgICAgIGlmICghc3RyKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IFtuYW1lXTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9tb24v54ix5ZCs6Z+z5LmQL211c2ljLnR4dCcsIEpTT04uc3RyaW5naWZ5KGxpc3QpKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gSlNPTi5wYXJzZShzdHIpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3QuaW5kZXhPZihuYW1lKSA9PSAnLTEnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAvLyBsaXN0LnB1c2gobmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdC51bnNoaWZ0KG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9tb24v54ix5ZCs6Z+z5LmQL211c2ljLnR4dCcsIEpTT04uc3RyaW5naWZ5KGxpc3QpKTtcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSBsaXN0LmluZGV4T2YobmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgIGxpc3Quc3BsaWNlKGluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL3J1bGVzL21vbi/niLHlkKzpn7PkuZAvbXVzaWMudHh0JywgSlNPTi5zdHJpbmdpZnkobGlzdCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgIH0sIHN0ciksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9pY29uXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgbGV0IGl0ZW0gPSBwZGZhKHgsICdib2R5JiZsaScpO1xcclxcbiAgICAgICAgICAgIGl0ZW0uZm9yRWFjaCgocykgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKHMsXFxcIi5uYW1lJiZUZXh0XFxcIilcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IHBkKHMsXFxcImEmJmhyZWZcXFwiKSsnQHJ1bGU9anM6JC5yZXF1aXJlKFxcXCJtdXNpY1xcXCIpJ1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6dGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgICAgICAgICAgICAgIC8vcGljX3VybDogZGpwaWMsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpcXFwidGV4dF8yXFxcIlxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3B1YmxpY1xcXCIpLuWjsOaYjihkKVxcbnNldFJlc3VsdChkKVxcbnNldFBhZ2VUaXRsZShUaXRsZSlcIn1dIiwiaWNvbiI6Imh0dHA6Ly93d3cuMnQ1OC5jb20vZmF2aWNvbi5pY28iLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment