Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥射雕英雄传@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJqczooXFxuZnVuY3Rpb24gKGFwcHR5cGUpIHtcXG4gICAgbGV0IGNocCA9IFtdO1xcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IGh0bWwgPSB7fSwgY29udHMgPSBbXTtcXG4gICAgICAgIGlmICgvVFYvLnRlc3QoYXBwdHlwZSkpIHtcXG4gICAgICAgICAgICBodG1sID0gSlNPTi5wYXJzZShmZXRjaChNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV0pKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaHRtbCA9IEpTT04ucGFyc2UoZmV0Y2goTVlfVVJMLnNwbGl0KFxcXCIjI1xcXCIpWzFdLCB7aGVhZGVyczoge1xcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwifX0pKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChodG1sLnZpZGVvbGlzdCkge1xcbiAgICAgICAgICAgIGNvbnRzID0gT2JqZWN0LmtleXMoaHRtbC52aWRlb2xpc3QpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBpZiAoaHRtbC5kYXRhLnZvZF91cmxfd2l0aF9wbGF5ZXIpIHtcXG4gICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3VybF93aXRoX3BsYXllcjtcXG4gICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdChcXFwiJCQkXFxcIik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoaHRtbC5kYXRhLnZvZF9pbmZvICYmIGh0bWwuZGF0YS52b2RfaW5mby52b2RfdXJsX3dpdGhfcGxheWVyKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfdXJsX3dpdGhfcGxheWVyO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfcGxheV91cmwuc3BsaXQoXFxcIiQkJFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfbGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfdXJsLnNwbGl0KFxcXCIkJCRcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBsaXN0ID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgaWYgKGh0bWwudmlkZW9saXN0KSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLnZpZGVvbGlzdFtjb250c1tpXV07XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaWYgKGNvbnRzW2ldLnVybHMpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBjb250c1tpXS51cmxzO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzW2ldLnVybCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBjb250c1tpXS51cmwuc3BsaXQoXFxcIiNcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2ldLnNwbGl0KFxcXCIjXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgY2hwLnB1c2gobGlzdC5sZW5ndGgpO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGNhdGNoIChlKSB7XFxuICAgIH1cXG4gICAgc2V0UmVzdWx0KFxcXCJcXFxcdTY2ZjRcXFxcdTY1YjBcXFxcdTgxZjM6XFxcIiArIChNYXRoLm1heC5hcHBseShNYXRoLCBjaHApKSk7XFxufVxcbikoXFxcIuS8mOi0qDU5XFxcIilcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wibmFtZVwiOlwiQVBQ5YiG57G75YiX6KGoXCIsXCJwYXRoXCI6XCJhcHBsaXN0ZGF0YVwiLFwicnVsZVwiOlwiKFxcbmZ1bmN0aW9uICgpIHtcXG4gICAgbGV0IGxpc3QgPSBbXTtcXG4gICAgaWYgKGh0bWwubGlzdCkge1xcbiAgICAgICAgbGlzdCA9IGh0bWwubGlzdDtcXG4gICAgfSBlbHNlIHtcXG4gICAgICA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gICAgICAgICAgICAgaWYgKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlMiAmJiAoY29udHNbaV0ucGxheWVyX2luZm8ucGFyc2UyKS5pbmRleE9mKFxcXCI9XFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqaWVrID0gKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlMikubWF0Y2goLy4qP3VybD18Lio/dj18Lio/dmlkPS8pWzBdLnJlcGxhY2UoXFxcIi4uXFxcIiwgXFxcIi5cXFwiKS5yZXBsYWNlKFxcXCJqc29uYnNcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb250c1tpXS5wbGF5ZXJfaW5mby5wYXJzZSAmJiAoY29udHNbaV0ucGxheWVyX2luZm8ucGFyc2UpLmluZGV4T2YoXFxcIj1cXFwiKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqaWVrID0gKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlKS5tYXRjaCgvLio/dXJsPXwuKj92PXwuKj92aWQ9LylbMF0ucmVwbGFjZShcXFwiLi5cXFwiLCBcXFwiLlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGppZWsgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGppZWsgIT0gXFxcIlxcXCIgJiYgamllayAhPSBudWxsKSB7XFxuICAgICAgICAgICAgaWYgKGppZWsuc3Vic3RyaW5nKDAsIDQpID09IFxcXCJodHRwXFxcIikge1xcbiAgICAgICAgICAgICAgICBqaWVrID0gamllaztcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoamllay5zdWJzdHJpbmcoMCwgMikgPT0gXFxcIi8vXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgamllayA9IFxcXCJodHRwczpcXFwiICsgamllaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgaWYgKGogPT0gXFxcIjBcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwiXFxcXG5cXFxcdTdlYmZcXFxcdThkZWY6XFxcIiArIHB0YWIgKyBcXFwiXFxcXG5cXFxcdTg5ZTNcXFxcdTY3OTBcXFxcdTYzYTVcXFxcdTUzZTM6XFxcIiArIGppZWspO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGNhdGNoIChlKSB7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgbGluayA9IGppZWsgKyB2bGluaztcXG4gICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA0fG9ialxcXFwvdG9zLy50ZXN0KHZsaW5rKSAmJiAvaHR0cC8udGVzdCh2bGluaykpIHtcXG4gICAgICAgICAgICBsaW5rID0gdmxpbms7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmICgvc2lnbj0vLnRlc3QodmxpbmspKSB7XFxuICAgICAgICAgICAgICAgIGxpbmsgPSB2bGluaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpdGVtcy5wdXNoKHt0aXRsZTogdGl0bGUsIGNvbF90eXBlOiBcXFwidGV4dF80XFxcIiwgdXJsOiAkKFxcXCJcXFwiKS5sYXp5UnVsZSgocHRhYiwgc3JjdXJsLCBkb21pbikgPT4ge1xcbiAgICAgICAgICAgIGxvZyhcXFwiXFxcXHU1MzlmXFxcXHU5NGZlXFxcXHU2M2E1OlxcXCIgKyBzcmN1cmwpO1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIG9wZW51cmwocmVzdXJsKSB7XFxuICAgICAgICAgICAgICAgIGlmIChyZXN1cmwubWF0Y2goL3lvdWt1fG1ndHZ8aXhpZ3VhfHFxLmNvbXxxaXlpfG1pZ3V8YmlsaWJpbGl8c29odXxwcHR2fGxlfDE5MDUuY29tLykgJiYgcmVzdXJsLnNlYXJjaCgvaHRtbHxiaWxpYmlsaS8pICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZW5EbiA9IGdldE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChlbkRuID09IFxcXCIxXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwiXFxcXHU4YzAzXFxcXHU3NTI4XFxcXHU2NWFkXFxcXHU2M2QyXFxcXHU4OWUzXFxcXHU2NzkwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChcXFwibGV0IGNvbmZpZyA9XFxcIiArIGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocmVzdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybDtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1cmw7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTh8XFxcXC5tcDR8b2JqXFxcXC90b3N8bmV0ZWFzZVxcXFwuY29tLy50ZXN0KHNyY3VybCkgJiYgL2h0dHAvLnRlc3Qoc3JjdXJsKSAmJiAhL1xcXFwuaHRtbC8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoL3drZmlsZS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNyY3VybCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vfVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvZHVvZHVvenkvLnRlc3QocHRhYikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGpzb24gPSBmZXRjaChcXFwiaHR0cHM6Ly9wbGF5ZXIuZHVvZHVvenkuY29tL2RkcGxheS9hcGkucGhwP3VybD1cXFwiICsgc3JjdXJsLCB7fSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGpzb24pLnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL3NpZ249Ly50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcmN1cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC9cXFxcPS8udGVzdChzcmN1cmwpID8gc3JjdXJsLnNwbGl0KFxcXCI9XFxcIilbMV0gOiBzcmN1cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNyY3VybC5pbmRleE9mKFxcXCIvc2hhcmUvXFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IHNyY3VybC5zcGxpdChcXFwiL3NoYXJlXFxcIilbMF0sIGZjID0gZmV0Y2goc3JjdXJsLCB7fSkucmVwbGFjZShcXFwidmFyIHB1cmxcXFwiLCBcXFwidmFyIG1haW5cXFwiKSwgcGxheSA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmMuaW5kZXhPZihcXFwibWFpblxcXCIpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWF0ID0gZmMubWF0Y2goL3ZhciBtYWluLio/Oy8pWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChtYXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheSA9IChtYWluLmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAtMSA/IG1haW4gOiBsaW5rICsgbWFpbik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWFpbiA9IGZjLm1hdGNoKC91cmw6Lio/W1xcXFwnXFxcXFxcXCJdKC4qPylbXFxcXCdcXFxcXFxcIl0vKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXkgPSAobWFpbi5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gLTEgPyBtYWluIDogbGluayArIG1haW4pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwbGF5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIng1V2ViVmlldzovL1xcXCIgKyBzcmN1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocHRhYiA9PSBcXFwiYWxpenlcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdXJsID0gZmV0Y2goXFxcImh0dHBzOi8vZm91YmluLmNvbS9qaWV4aS5waHA/dXJsPVxcXCIgKyBzcmN1cmwuc3BsaXQoXFxcInVybD1cXFwiKVsxXSwge30pLm1hdGNoKC9cXFxcXFxcInVybFxcXFxcXFwiOlxcXFxcXFwiKC4qPylcXFxcXFxcIi8pWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoLzk4M3ZpcC8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtoZWFkZXJzOiB7XFxcIlVzZXItQWdlbnRcXFwiOiBNT0JJTEVfVUF9LCByZWRpcmVjdDogZmFsc2UsIHdpdGhIZWFkZXJzOiB0cnVlfSkpLmhlYWRlcnMubG9jYXRpb25bMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL3hcXFxcLW5cXFxcLmNjfG5oZHo2NjYvLnRlc3Qoc3JjdXJsKSAmJiAvXFxcXC5odG1sfGJpbGliaWxpLy50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKFxcXCI9aHR0cFxcXCIpICsgMSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxldCBzY29kZSA9IEpTT04ucGFyc2UoZmV0Y2goc3JjdXJsLCB7aGVhZGVyczoge1xcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwifSwgcmVkaXJlY3Q6IGZhbHNlLCB3aXRoU3RhdHVzQ29kZTogdHJ1ZX0pKTtcXG4gICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gXFxcIjMwMlxcXCIgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSBcXFwiMzAxXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlZHVybCA9IHNjb2RlLmhlYWRlcnMubG9jYXRpb25bMF0ucmVwbGFjZSgvXFxcXFxcXFwvZywgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcPWh0dHAvLnRlc3QocmVkdXJsKSAmJiAvaHRtbHxiaWxpYmlsaS8udGVzdChyZWR1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoZmV0Y2gocmVkdXJsLCB7fSkpLnVybDtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcPWh0dHAvLnRlc3QocmVkdXJsKSAmJiAvXFxcXC5tM3U4fFxcXFwubXA0fFxcXFwuZmx2Ly50ZXN0KHJlZHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVybC5zdWJzdHJpbmcocmVkdXJsLmluZGV4T2YoXFxcIj1odHRwXFxcIikgKyAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVkdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gc2NvZGUuYm9keTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvNDA0IE5vdCBGb3VuZHzlpIfmoYjlkI7lj6/nu6fnu63orr/pl64vLnRlc3QoaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKFxcXCI9aHR0cFxcXCIpICsgMSkpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFw8Ym9keS8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFx1NWMxZFxcXFx1OGJkNVxcXFx1OTc1ZUpTT05cXFxcdTYzYTVcXFxcdTUzZTNcXFxcdTdmNTFcXFxcdTk4NzVcXFxcdTg5ZTNcXFxcdTY3OTBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZUNhY2hlKFxcXCJodHRwczovL2NvZGUuYWxpeXVuLmNvbS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9tYXN0ZXIveDVydWxlLmpzXFxcIiwgMjQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKHNyY3VybCwgc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHVybCA9IGh0bWwubWF0Y2goL1tcXFxcJ1xcXFxcXFwiXXVybFtcXFxcJ1xcXFxcXFwiXTouKj9bXFxcXCdcXFxcXFxcIl0oLio/KVtcXFxcJ1xcXFxcXFwiXS8pWzFdLnJlcGxhY2UoL1xcXFxcXFxcL2csIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9odHRwLy50ZXN0KHB1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHRhYiA9PSBcXFwiYmlsaWJpbGlcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyBcXFwiO3tSZWZlcmVyQGh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS8mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcIm1ndHZcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIiArIFxcXCI7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9vamJrLy50ZXN0KHB1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly9iYWsub2pia2p4LmNvbS99XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXD1odHRwLy50ZXN0KHNyY3VybCkgJiYgL1xcXFwuaHRtbHxiaWxpYmlsaS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZihcXFwiPWh0dHBcXFwiKSArIDEpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZihcXFwiPWh0dHBcXFwiKSArIDEpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFx1NjI2N1xcXFx1ODg0Y1xcXFx1NjJhNVxcXFx1OTUxOVxcXFx1NTkwNFxcXFx1NzQwNlxcXCIpO1xcbiAgICAgICAgICAgICAgICBpZiAoc3JjdXJsLnN1YnN0cmluZygwLCAyKSA9PSBcXFwiLy9cXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChcXFwiaHR0cHM6XFxcIiArIHNyY3VybCk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFw9aHR0cC8udGVzdChzcmN1cmwpICYmIC9cXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoXFxcIj1odHRwXFxcIikgKyAxKSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybCk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICAsIHB0YWIsIGxpbmssIGRvbWluKX0pO1xcbiAgICB9XFxuICAgIHNldFJlc3VsdChpdGVtcyk7XFxufVxcbikoKVwifV0sXCJzYXZlZFwiOmZhbHNlLFwidGl0bGVcIjpcIui9u+WQiOmbhi5hcHBcIixcInZlcnNpb25cIjowLFwidXJsXCI6XCJoaWtlcjovL2VtcHR5IyNodHRwOi8vbnUuZTR0di5jbi9sdmRvdV9hcGkucGhwL3YxLnZvZC9kZXRhaWw/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xcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICB2bGluayA9IGxpc3Rbal0uc3BsaXQoXFxcXFxcXCIkXFxcXFxcXCIpWzFdO1xcXFxuICAgICAgICAgICAgdGl0bGUgPSBsaXN0W2pdLnNwbGl0KFxcXFxcXFwiJFxcXFxcXFwiKVswXTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgaWYgKGh0bWwuZGF0YS52b2RfdXJsX3dpdGhfcGxheWVyKSB7XFxcXG4gICAgICAgICAgICAgICAgamllayA9IGNvbnRzW2ldLnBhcnNlX2FwaTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGh0bWwuZGF0YS52b2RfaW5mbyAmJiBodG1sLmRhdGEudm9kX2luZm8udm9kX3VybF93aXRoX3BsYXllcikge1xcXFxuICAgICAgICAgICAgICAgICAgICBqaWVrID0gY29udHNbaV0ucGFyc2VfYXBpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250c1tpXS5wbGF5ZXJfaW5mby5wYXJzZTIgJiYgKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlMikuaW5kZXhPZihcXFxcXFxcIj1cXFxcXFxcIikgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGppZWsgPSAoY29udHNbaV0ucGxheWVyX2luZm8ucGFyc2UyKS5tYXRjaCgvLio/dXJsPXwuKj92PXwuKj92aWQ9LylbMF0ucmVwbGFjZShcXFxcXFxcIi4uXFxcXFxcXCIsIFxcXFxcXFwiLlxcXFxcXFwiKS5yZXBsYWNlKFxcXFxcXFwianNvbmJzXFxcXFxcXCIsIFxcXFxcXFwiXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlICYmIChjb250c1tpXS5wbGF5ZXJfaW5mby5wYXJzZSkuaW5kZXhPZihcXFxcXFxcIj1cXFxcXFxcIikgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqaWVrID0gKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlKS5tYXRjaCgvLio/dXJsPXwuKj92PXwuKj92aWQ9LylbMF0ucmVwbGFjZShcXFxcXFxcIi4uXFxcXFxcXCIsIFxcXFxcXFwiLlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgamllayA9IFxcXFxcXFwiXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZiAoamllayAhPSBcXFxcXFxcIlxcXFxcXFwiICYmIGppZWsgIT0gbnVsbCkge1xcXFxuICAgICAgICAgICAgaWYgKGppZWsuc3Vic3RyaW5nKDAsIDQpID09IFxcXFxcXFwiaHR0cFxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgamllayA9IGppZWs7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGlmIChqaWVrLnN1YnN0cmluZygwLCAyKSA9PSBcXFxcXFxcIi8vXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgamllayA9IFxcXFxcXFwiaHR0cHM6XFxcXFxcXCIgKyBqaWVrO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfVx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AgICAgICBmdW5jdGlvbiBvcGVudXJsKHJlc3VybCkge1xcXFxuICAgICAgICAgICAgICAgIGlmIChyZXN1cmwubWF0Y2goL3lvdWt1fG1ndHZ8aXhpZ3VhfHFxLmNvbXxxaXlpfG1pZ3V8YmlsaWJpbGl8c29odXxwcHR2fGxlfDE5MDUuY29tLykgJiYgcmVzdXJsLnNlYXJjaCgvaHRtbHxiaWxpYmlsaS8pICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBlbkRuID0gZ2V0TXlWYXIoXFxcXFxcXCJkbmVuXFxcXFxcXCIsIFxcXFxcXFwiMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVuRG4gPT0gXFxcXFxcXCIxXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIlxcXFxcXFxcdThjMDNcXFxcXFxcXHU3NTI4XFxcXFxcXFx1NjVhZFxcXFxcXFxcdTYzZDJcXFxcXFxcXHU4OWUzXFxcXFxcXFx1Njc5MFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcXFxcXCJsZXQgY29uZmlnID1cXFxcXFxcIiArIGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFxcXFxcIikpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocmVzdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKC9cXFxcXFxcXC5tM3U4fFxcXFxcXFxcLm1wNHxvYmpcXFxcXFxcXC90b3N8bmV0ZWFzZVxcXFxcXFxcLmNvbS8udGVzdChzcmN1cmwpICYmIC9odHRwLy50ZXN0KHNyY3VybCkgJiYgIS9cXFxcXFxcXC5odG1sLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKC93a2ZpbGUvLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNyY3VybCArIFxcXFxcXFwiO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL31cXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvZHVvZHVvenkvLnRlc3QocHRhYikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQganNvbiA9IGZldGNoKFxcXFxcXFwiaHR0cHM6Ly9wbGF5ZXIuZHVvZHVvenkuY29tL2RkcGxheS9hcGkucGhwP3VybD1cXFxcXFxcIiArIHNyY3VybCwge30pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGpzb24pLnVybDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9zaWduPS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcmN1cmwgKyBcXFxcXFxcIiNpc1ZpZGVvPXRydWUjXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC9cXFxcXFxcXD0vLnRlc3Qoc3JjdXJsKSA/IHNyY3VybC5zcGxpdChcXFxcXFxcIj1cXFxcXFxcIilbMV0gOiBzcmN1cmwgKyBcXFxcXFxcIiNpc1ZpZGVvPXRydWUjXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNyY3VybC5pbmRleE9mKFxcXFxcXFwiL3NoYXJlL1xcXFxcXFwiKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IHNyY3VybC5zcGxpdChcXFxcXFxcIi9zaGFyZVxcXFxcXFwiKVswXSwgZmMgPSBmZXRjaChzcmN1cmwsIHt9KS5yZXBsYWNlKFxcXFxcXFwidmFyIHB1cmxcXFxcXFxcIiwgXFxcXFxcXCJ2YXIgbWFpblxcXFxcXFwiKSwgcGxheSA9IFxcXFxcXFwiXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZjLmluZGV4T2YoXFxcXFxcXCJtYWluXFxcXFxcXCIpICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBtYXQgPSBmYy5tYXRjaCgvdmFyIG1haW4uKj87LylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwobWF0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheSA9IChtYWluLmluZGV4T2YoXFxcXFxcXCJodHRwXFxcXFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWFpbiA9IGZjLm1hdGNoKC91cmw6Lio/W1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJdKC4qPylbXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0vKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheSA9IChtYWluLmluZGV4T2YoXFxcXFxcXCJodHRwXFxcXFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcIng1V2ViVmlldzovL1xcXFxcXFwiICsgc3JjdXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJhbGl6eVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB1cmwgPSBmZXRjaChcXFxcXFxcImh0dHBzOi8vZm91YmluLmNvbS9qaWV4aS5waHA/dXJsPVxcXFxcXFwiICsgc3JjdXJsLnNwbGl0KFxcXFxcXFwidXJsPVxcXFxcXFwiKVsxXSwge30pLm1hdGNoKC9cXFxcXFxcXFxcXFxcXFwidXJsXFxcXFxcXFxcXFxcXFxcIjpcXFxcXFxcXFxcXFxcXFwiKC4qPylcXFxcXFxcXFxcXFxcXFwiLylbMV07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvOTgzdmlwLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoZmV0Y2goc3JjdXJsLCB7aGVhZGVyczoge1xcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBNT0JJTEVfVUF9LCByZWRpcmVjdDogZmFsc2UsIHdpdGhIZWFkZXJzOiB0cnVlfSkpLmhlYWRlcnMubG9jYXRpb25bMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC94XFxcXFxcXFwtblxcXFxcXFxcLmNjfG5oZHo2NjYvLnRlc3Qoc3JjdXJsKSAmJiAvXFxcXFxcXFwuaHRtbHxiaWxpYmlsaS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKFxcXFxcXFwiPWh0dHBcXFxcXFxcIikgKyAxKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgbGV0IHNjb2RlID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtoZWFkZXJzOiB7XFxcXFxcXCJVc2VyL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AgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBzY29kZS5ib2R5O1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoLzQwNCBOb3QgRm91bmR85aSH5qGI5ZCO5Y+v57un57ut6K6/6ZeuLy50ZXN0KGh0bWwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKFxcXFxcXFwiPWh0dHBcXFxcXFxcIikgKyAxKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcPGJvZHkvLnRlc3QoaHRtbCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCJcXFxcXFxcXHU1YzFkXFxcXFxcXFx1OGJkNVxcXFxcXFxcdTk3NWVKU09OXFxcXFxcXFx1NjNhNVxcXFxcXFxcdTUzZTNcXFxcXFxcXHU3ZjUxXFxcXFxcXFx1OTg3NVxcXFxcXFxcdTg5ZTNcXFxcXFxcXHU2NzkwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVDYWNoZShcXFxcXFxcImh0dHBzOi8vY29kZS5hbGl5dW4uY29tL2x6azIzNTU5L1B1YmxpY1J1bGUvcmF3L21hc3Rlci94NXJ1bGUuanNcXFxcXFxcIiwgMjQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4NXJ1bGUoc3JjdXJsLCBzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHVybCA9IGh0bWwubWF0Y2goL1tcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXXVybFtcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXTouKj9bXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0oLio/KVtcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXS8pWzFdLnJlcGxhY2UoL1xcXFxcXFxcXFxcXFxcXFwvZywgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9odHRwLy50ZXN0KHB1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwdGFiID09IFxcXFxcXFwiYmlsaWJpbGlcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJtZ3R2XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArIFxcXFxcXFwiI2lzVmlkZW89dHJ1ZSNcXFxcXFxcIiArIFxcXFxcXFwiO3tSZWZlcmVyQHd3dy5tZ3R2LmNvbSYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9vamJrLy50ZXN0KHB1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgXFxcXFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly9iYWsub2pia2p4LmNvbS99XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyBcXFxcXFxcIiNpc1ZpZGVvPXRydWUjXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcXFxcXD1odHRwLy50ZXN0KHNyY3VybCkgJiYgL1xcXFxcXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZihcXFxcXFxcIj1odHRwXFxcXFxcXCIpICsgMSkpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZihcXFxcXFxcIj1odHRwXFxcXFxcXCIpICsgMSkpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCJcXFxcXFxcXHU2MjY3XFxcXFxcXFx1ODg0Y1xcXFxcXFxcdTYyYTVcXFxcXFxcXHU5NTE5XFxcXFxcXFx1NTkwNFxcXFxcXFxcdTc0MDZcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHNyY3VybC5zdWJzdHJpbmcoMCwgMikgPT0gXFxcXFxcXCIvL1xcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKFxcXFxcXFwiaHR0cHM6XFxcXFxcXCIgKyBzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFw9aHR0cC8udGVzdChzcmN1cmwpICYmIC9cXFxcXFxcXC5odG1sfGJpbGliaWxpLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoXFxcXFxcXCI9aHR0cFxcXFxcXFwiKSArIDEpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgLCBwdGFiLCBsaW5rLCBkb21pbil9KTtcXFxcbiAgICB9XFxcXG4gICAgc2V0UmVzdWx0KGl0ZW1zKTtcXFxcbn1cXFxcbikoKVxcXCJ9XVwifSIsInBpY1VybCI6Imh0dHBzOi8vaW1ncy5tb3ZpZTA5LmNvbS91cGxvYWQvdm9kLzIwMjIwOTEzLTEvYzI1OTgzZWNhNzc0MmYwZDBhYTZiZWJkYzBhMDMyMjkuanBnQFJlZmVyZXI9IiwidGl0bGUiOiLlsITpm5Xoi7Hpm4TkvKAifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement