xiaomianao666

小程序:聚合网盘

Jul 17th, 2024
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@聚合网盘@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6IGa5ZCI572R55uYIiwiYXV0aG9yIjoiIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjYsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoib3RoZXIiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBkID0gW107XG5pZiAoZ2V0SXRlbShcImZcIiwgXCIwXCIpID09IFwiMFwiKSB7XG4gICAgZC5wdXNoKCQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9hYm91dDJcIikpO1xuICAgIGQucHVzaCh7XG4gICAgICAgIHRpdGxlOiBcIuehruWumlwiLFxuICAgICAgICB1cmw6ICQoXCIjbm9Mb2FkaW5nI1wiKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICBzZXRJdGVtKFwiZlwiLCBcIjFcIik7XG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiO1xuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiLFxuICAgICAgICBkZXNjOiBcIlwiLFxuICAgICAgICBwaWNfdXJsOiBcIlwiXG4gICAgfSk7XG59IGVsc2Uge1xuICAgIGQucHVzaCh7XG4gICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHN0cm9uZz48Zm9udCBjb2xvcj1cIi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0gW107XFxudHJ5IHtcXG4gICAgY29uc3Qge1xcbiAgICAgICAgZmlsZUxpc3QsXFxuICAgICAgICBnZXRJY29uXFxuICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9jb2RlXFxcIilcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi4pqZ77iP6K6+572uXFxcIixcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9zZXR0aW5nc1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgIH0pXFxuICAgIGlmIChnZXRJdGVtKFxcXCJ0b2tlblxcXCIsIFxcXCJcXFwiKSAhPSBcXFwiXFxcIikge1xcbiAgICAgICAgdmFyIHBhdGhzID0gc3RvcmFnZTAuZ2V0TXlWYXIoXFxcInBhdGhzMTIzXFxcIiwgW3tcXG4gICAgICAgICAgICBuYW1lOiBcXFwi5qC555uu5b2VXFxcIixcXG4gICAgICAgICAgICBpZDogXFxcIjBcXFwiXFxuICAgICAgICB9XSlcXG4gICAgICAgIGlmIChwYXRocy5sZW5ndGggPiAxKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCI8XFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHBhdGhzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwYXRocy5wb3AoKVxcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcInBhdGhzMTIzXFxcIiwgcGF0aHMpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIHBhdGhzKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBwYXRocy5mb3JFYWNoKChpdGVtLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpdGVtLCBwYXRocywgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJpZFxcXCIsIGl0ZW0uaWQpXFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwicGF0aHMxMjNcXFwiLCBwYXRocy5zbGljZSgwLCBpbmRleCArIDEpKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCBpdGVtLCBwYXRocywgaW5kZXgpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgICAgICBmaWxlTGlzdChwYXRoc1twYXRocy5sZW5ndGggLSAxXS5pZCkuZGF0YS5JbmZvTGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIHZhciBpbWcgPSBnZXRJY29uKGl0ZW0pXFxuICAgICAgICAgICAgaWYgKGl0ZW0uVHlwZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSAkKCkubGF6eVJ1bGUoKGlkLCBuYW1lLCBwYXRocykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogaWRcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwicGF0aHMxMjNcXFwiLCBwYXRocylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgaXRlbS5GaWxlSWQsIGl0ZW0uRmlsZU5hbWUsIHBhdGhzKVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSBpdGVtLkRvd25sb2FkVXJsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLkZpbGVOYW1lLFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuacqueZu+W9lVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3NldHRpbmdzXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCJcXG4gICAgICAgIH0pXFxuICAgIH1cXG59IGNhdGNoIChlKSB7XFxuICAgIGxvZyhlLm1lc3NhZ2UpXFxufVxcbnNldFJlc3VsdChkKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImNvZGVcIixcInBhdGhcIjpcImNvZGVcIixcInJ1bGVcIjpcIiQuZXhwb3J0cy5maWxlTGlzdCA9IGZ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IHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgcGF0aHMsIGkpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgICAgICBsZXQgcmVzID0gSlNPTi5wYXJzZShyZXF1ZXN0KGJ1aWxkVXJsKFxcXCJodHRwczovL3Bhbi5iYWlkdS5jb20vcmVzdC8yLjAveHBhbi9maWxlXFxcIiwge1xcbiAgICAgICAgICAgIFxcXCJhY2Nlc3NfdG9rZW5cXFwiOiBnZXRJdGVtKFxcXCJhY2Nlc3NfdG9rZW5iYWlkdVxcXCIpLFxcbiAgICAgICAgICAgIFxcXCJtZXRob2RcXFwiOiBcXFwibGlzdFxcXCIsXFxuICAgICAgICAgICAgXFxcImRpclxcXCI6IHBhdGhzW3BhdGhzLmxlbmd0aCAtIDFdLnBhdGgsXFxuICAgICAgICAgICAgXFxcIndlYlxcXCI6IFxcXCJ3ZWJcXFwiLFxcbiAgICAgICAgICAgIFxcXCJsaW1pdFxcXCI6IDAsXFxuICAgICAgICAgICAgXFxcImxpbWl0XFxcIjogMjAwXFxuICAgICAgICB9KSkpXFxuICAgICAgICByZXMubGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIGlmIChpdGVtLmlzZGlyID09IDEpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybCA9ICQoKS5sYXp5UnVsZSgoaXRlbSwgcGF0aHMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHBhdGhzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGg6IGl0ZW0ucGF0aCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpdGVtLnNlcnZlcl9maWxlbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHN0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XCIke3BhdGh9XFxcXFxcXCJdYFxcbiAgICAgICAgICAgIH0pKSkuaW5mb1swXS5kbGlua1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShyZXF1ZXN0KGJ1aWxkVXJsKFxcXCJodHRwczovL3Bhbi5iYWlkdS5jb20vcmVzdC8yLjAveHBhbi9tdWx0aW1lZGlhXFxcIiwge1xcbiAgICAgICAgICAgICAgICBcXFwiYWNjZXNzX3Rva2VuXFxcIjogZ2V0SXRlbShcXFwiYWNjZXNzX3Rva2VuXFxcIiksXFxuICAgICAgICAgICAgICAgIFxcXCJtZXRob2RcXFwiOiBcXFwiZmlsZW1ldGFzXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcImZzaWRzXFxcIjogYFske2lkfV1gLFxcbiAgICAgICAgICAgICAgICBcXFwiZGxpbmtcXFwiOiBcXFwiMVxcXCJcXG4gICAgICAgICAgICB9KSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFxcXCJwYW4uYmFpZHUuY29tXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSkpLmxpc3RbMF0uZGxpbmsgKyBcXFwiJmFjY2Vzc190b2tlbj1cXFwiICsgZ2V0SXRlbShcXFwiYWNjZXNzX3Rva2VuXFxcIilcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChleHQgPT0gXFxcIm1vdmllXFxcIikge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIHVybHM6IFtyZXMgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiXSxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBcXFwicGFuLmJhaWR1LmNvbVxcXCJ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I6Ly9wYWdlL2NvZGUyXFxcIilcXG4gICAgICAgIGxldCBwYXRocyA9IHN0b3JhZ2UwLmdldE15VmFyKFxcXCJwYXRoc3Bpa3Bha1xcXCIsIFt7XFxuICAgICAgICAgICAgXFxcImlkXFxcIjogXFxcIlxcXCIsXFxuICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBcXFwi5a62XFxcIlxcbiAgICAgICAgfV0pXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5re75Yqg56OB6ZO+XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKFxcXCJcXFwiLCBcXFwi6L6T5YWl56OB5Yqb6ZO+5o6lXFxcIikuaW5wdXQoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInBpa3Bha2FwcDovL215cGlrcGFrLmNvbS94cGFuL21haW5fdGFiP3RhYj0xJmFkZF91cmw9XFxcIiArIGVuY29kZVVSSUNvbXBvbmVudChpbnB1dClcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgICAgIHBhdGhzLmZvckVhY2goKGl0ZW0sIGkpID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgocGF0aHMsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKFxcXCJwYXRoc3Bpa3Bha1xcXCIsIHBhdGhzLnNsaWNlKDAsIGkgKyAxKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI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A9ICQoKS5sYXp5UnVsZSgocGF0aHMsIGl0ZW0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHBhdGhzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpdGVtLmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGl0ZW0ubmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKFxcXCJwYXRoc3Bpa3Bha1xcXCIsIHBhdGhzKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCBwYXRocywgaXRlbSlcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKCQubW92aWUuaW5jbHVkZXMoZ2V0SHptKGl0ZW0ubmFtZSkpKSB7XFxuXFxuICAgICAgICAgICAgICAgIHZhciBleHQgPSBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmICgkLmF1ZGlvLmluY2x1ZGVzKGdldEh6bShpdGVtLm5hbWUpKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgZXh0ID0gXFxcIiNpc011c2ljPXRydWUjXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoJC5pbWcuaW5jbHVkZXMoZ2V0SHptKGl0ZW0ubmFtZSkpKSB7XFxuICAgICAgICAgICAgICAgIHZhciBleHQgPSBcXFwiIy5qcGdcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIGV4dCA9IFxcXCJcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciB1cmwgPSAkKCkubGF6eVJ1bGUoKGl0ZW0sIGV4dCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdSA9IGBodHRwczovL2FwaS1kcml2ZS5teXBpa3Bhay5jb20vZHJpdmUvdjEvZmlsZXMvJHtpdGVtLmlkfT9fbWFnaWM9MjAyMSZ0aHVtYm5haWxfc2l6ZT1TSVpFX0xBUkdFYFxcbiAgICAgICAgICAgICAgICBsZXQgcmVzID0gSlNPTi5wYXJzZShyZXF1ZXN0KHUsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiQXV0aG9yaXphdGlvblxcXCI6IFxcXCJCZWFyZXIgXFxcIiArIGdldEl0ZW0oXFxcImFjY2Vzc190b2tlblxcXCIpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgLy9sb2cocmVzKTtcXG4gICAgICAgICAgICAgICAgaWYgKHJlcy5saW5rcyAmJiByZXMubGlua3NbXFxcImFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gcmVzLmxpbmtzW1xcXCJhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1cXFwiXS51cmw7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArIGV4dFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGZvciAoaXRlbSBvZiByZXMubWVkaWFzKSB7XFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0bXAgPSBpdGVtLmxpbmtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodG1wLnVybCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG1wLnVybCArIGV4dFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LCBpdGVtLCBleHQpXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubmFtZSxcXG4gICAgICAgICAgICAgICAgaW1nOiBpdGVtLmljb25fbGluayxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6IGl0ZW0ua2luZCA9PSBcXFwiZHJpdmUjZm9sZGVyXFxcIiA/IHVybGwgOiB1cmxcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgdG9hc3QoXFxcIuajgOa1i+WIsOmUmeivr1xcXCIpXFxuICAgICAgICBsb2coZS5tZXNzYWdlKVxcbiAgICB9XFxufVxcblxcbnNldFJlc3VsdChkKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImNvZGUyXCIsXCJwYXRoXCI6XCJjb2RlMlwiLFwicnVsZVwiOlwiJC5leHBvcnRzLmxvZ2luID0gZnVuY3Rpb24odXNlcm5hbWUsIHBhc3N3b3JkKSB7XFxuICAgIGxldCByZXMgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vdXNlci5teXBpa3Bhay5jb20vdjEvYXV0aC9zaWduaW5cXFwiLCB7XFxuICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgXFxcImNhcHRjaGFfdG9rZW5cXFwiOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBcXFwiY2xpZW50X2lkXFxcIjogXFxcIllOeFQ5dzdHTWRXdkVPS2FcXFwiLFxcbiAgICAgICAgICAgIFxcXCJjbGllbnRfc2VjcmV0XFxcIjogXFxcImRidzJPdG1WRWV1VXZJcHRiMUNveWdc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gICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2NvZGUzXFxcIilcXG4gICAgICAgIHZhciBwYXRocyA9IHN0b3JhZ2UwLmdldE15VmFyKFxcXCJwYXRoc3R5XFxcIiwgW3tcXG4gICAgICAgICAgICBcXFwiaWRcXFwiOiAtMTEsXFxuICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBcXFwi5a62XFxcIlxcbiAgICAgICAgfV0pXFxuICAgICAgICBwYXRocy5mb3JFYWNoKChpdGVtLCBpKSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHBhdGhzLCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwicGF0aHN0eVxcXCIsIHBhdGhzLnNsaWNlKDAsIGkgKyAxKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgcGF0aHMsIGkpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgICAgICBsZXQgbGlzdCA9IGdldEZpbGVzKHBhdGhzW3BhdGhzLmxlbmd0aCAtIDFdLmlkKVxcbiAgICAgICAgbGlzdC5maWxlTGlzdEFPLmZvbGRlckxpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgICAgIGltZzogXFxcImh0dHBzOi8vZ2l0Y29kZS5uZXQvcXFfMzIzOTQzNTEvZHIvLS9yYXcvbWFzdGVyL2ltZy/mlofku7bnsbvlnosyL+aWh+S7tuWkuS5zdmdcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgocGF0aHMsIGlkLCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwYXRocy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKFxcXCJwYXRoc3R5XFxcIiwgcGF0aHMpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIHBhdGhzLCBpdGVtLmlkLCBpdGVtLm5hbWUpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgICAgICBsaXN0LmZpbGVMaXN0QU8uZmlsZUxpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICB2YXIgaW1nID0gZ2V0SWNvbihpdGVtLm5hbWUpXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGlkLCBuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0SHptXFxuICAgICAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvY29kZVxcXCIpXFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29va2llID0gcmVhZEZpbGUoXFxcIjE4OS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHUgPSBcXFwiaHR0cHM6Ly9jbG91ZC4xODkuY24vYXBpL3BvcnRhbC9nZXRGaWxlSW5mby5hY3Rpb25cXFwiXFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gSlNPTi5wYXJzZShyZXF1ZXN0KGJ1aWxkVXJsKHUsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiZmlsZUlkXFxcIjogaWRcXG4gICAgICAgICAgICAgICAgICAgIH0pLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiQWNjZXB0XFxcIjogXFxcImFwcGxpY2F0aW9uL2pzb247Y2hhcnNldD1VVEYtOFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUFcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgICAgIGlmICgkLm1vdmllLmluY2x1ZGVzKGdldEh6bShuYW1lKSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBbXFxcImh0dHBzOlxcXCIgKyByZXMuZG93bmxvYWRVcmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCQuYXVkaW8uaW5jbHVkZXMoZ2V0SHptKG5hbWUpKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IFtcXFwiaHR0cHM6XFxcIiArIHJlcy5kb3dubG9hZFVybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCJdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJC5pbWcuaW5jbHVkZXMoZ2V0SHptKG5hbWUpKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaHR0cHM6XFxcIiArIHJlcy5kb3dubG9hZFVybCArIGAjLmpwZ0BVc2VyLUFnZW50PSR7UENfV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k7XFxuICAgIGNsZWFyVmFyKFxcXCJodHRwczovL2Nsb3VkLjE4OS5jbi93ZWIvbWFpblxcXCIpO1xcbn0pXFxuZC5wdXNoKHtcXG4gICAgdXJsOiBcXFwiaHR0cHM6Ly9jbG91ZC4xODkuY24vd2ViL2xvZ2luLmh0bWxcXFwiLFxcbiAgICBjb2xfdHlwZTogXFxcIng1X3dlYnZpZXdfc2luZ2xlXFxcIixcXG4gICAgZGVzYzogXFxcIjEwMCUmJmZsb2F0XFxcIixcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgdXJsID0gbG9jYXRpb24uaHJlZlxcbiAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcImh0dHBzOi8vY2xvdWQuMTg5LmNuL3dlYi9tYWluXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGNvb2tpZSA9IGZiYS5nZXRDb29raWUodXJsKTtcXG4gICAgICAgICAgICAgICAgaWYgKGNvb2tpZSAhPSBudWxsICYmIGNvb2tpZS5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXCJodHRwczovL2Nsb3VkLjE4OS5jbi93ZWIvbWFpblxcXCIsIGNvb2tpZSk7XFxuICAgICAgICAgICAgICAgICAgICBhbGVydChcXFwi5bey6I635Y+W5YiwY29va2llXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBmYmEuYmFjaygpOyAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSksXFxuICAgICAgICB1YTogUENfVUEsXFxuICAgICAgICBjYW5CYWNrOiB0cnVlXFxuICAgIH1cXG59KVxcbnNldFJlc3VsdChkKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWkuOWFi+e9keebmFwiLFwicGF0aFwiOlwi5aS45YWL572R55uYXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbnRyeSB7XFxuICAgIGlmIChmaWxlRXhpc3QoXFxcInF1YXJrLnR4dFxcXCIpKSB7XFxuICAgICAgICBjb25zdCB7XFxuICAgICAgICAgICAgZ2V0SWNvbixcXG4gICAgICAgICAgICBnZXRIem0sXFxuICAgICAgICAgICAgZ2V0TGlua1xcbiAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2NvZGU0XFxcIilcXG4gICAgICAgIHZhciBjb29raWUgPSByZWFkRmlsZShcXFwicXVhcmsudHh0XFxcIilcXG4gICAgICAgIGxldCB1c2VyaW5mbyA9IEpTT04ucGFyc2UocmVxdWVzdChcXFwiaHR0cHM6Ly9wYW4ucXVhcmsuY24vYWNjb3VudC9pbmZvXFxcIiwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pKVxcbiAgICAgICAgbGV0IHBhdGhzID0gc3RvcmFnZTAuZ2V0TXlWYXIoXFxcInBhdGhzXFxcIiwgW3tcXG4gICAgICAgICAgICBcXFwiaWRcXFwiOiBcXFwiMFxcXCIsXFxuICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBcXFwi5qC555uu5b2VXFxcIlxcbiAgICAgICAgfV0pXFxuICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHVzZXJpbmZvLmRhdGEubmlja25hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogdXNlcmluZm8uZGF0YS5hdmF0YXJVcmksXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9zZXR0aW5nczRcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHBhdGhzLmZvckVhY2goKGl0ZW0sIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHBhdGhzLCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcInBhdGhzXFxcIiwgcGF0aHMuc2xpY2UoMCwgaSArIDEpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCBwYXRocywgaSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHJlcyA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybChcXFwiaHR0cHM6Ly9kcml2ZS5xdWFyay5jbi8xL2Nsb3VkZHJpdmUvZmlsZS9zb3J0XFxcIiwge1xcbiAgICAgICAgICAgIFxcXCJwZGlyX2ZpZFxcXCI6IHBhdGhzW3BhdGhzLmxlbmd0aCAtIDFdLmlkLFxcbiAgICAgICAgICAgIFxcXCJmclxcXCI6IFxcXCJwY1xcXCIsXFxuICAgICAgICAgICAgXFxcInByXFxcIjogXFxcInVjcHJvXFxcIixcXG4gICAgICAgICAgICBcXFwiX3NpemVcXFwiOiAxMCxcXG4gICAgICAgICAgICBcXFwiX2ZldGNoX3RvdGFsXFxcIjogXFxcIjFcXFwiLFxcbiAgICAgICAgICAgIFxcXCJfc29ydFxcXCI6IFxcXCJmaWxlX3R5cGU6YXNjLGZpbGVfbmFtZTphc2NcXFwiLFxcbiAgICAgICAgICAgIFxcXCJfcGFnZVxcXCI6IGdldFBhcmFtKFxcXCJwYWdlXFxcIilcXG4gICAgICAgIH0pLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llLFxcbiAgICAgICAgICAgICAgICBcXFwiQWNjZXB0XFxcIjogXFxcImFwcGxpY2F0aW9uL2pzb24sIHRleHQvcGxhaW4sICovKlxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vcGFuLnF1YXJrLmNuL1xcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSlcXG4gICAgICAgIHJlcy5kYXRhLmxpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBpZiAoIWl0ZW0uZmlsZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJsID0gJCgpLmxhenlSdWxlKChpdGVtLCBwYXRocykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGl0ZW0uZmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGl0ZW0uZmlsZV9uYW1lXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcInBhdGhzXFxcIiwgcGF0aHMpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0sIHBhdGhzKVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoJC5tb3ZpZS5pbmNsdWRlcyhnZXRIem0oaXRlbS5maWxlX25hbWUpKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJsID0gZ2V0TGluayhpdGVtLCBjb29raWUsIFxcXCJtb3ZpZVxcXCIpXFxuICAgICAgICAgICAgfSBlbHNlIGlmICgkLmF1ZGlvLmluY2x1ZGVzKGdldEh6bShpdGVtLmZpbGVfbmFtZSkpKSB7XFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSBnZXRMaW5rKGl0ZW0sIGNvb2tpZSwgXFxcImF1ZGlvXFxcIilcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKCQuaW1nLmluY2x1ZGVzKGdldEh6bShpdGVtLmZpbGVfbmFtZSkpKSB7XFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSBnZXRMaW5rKGl0ZW0sIGNvb2tpZSwgXFxcImltZ1xcXCIpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybCA9IGdldExpbmsoaXRlbSwgY29va2llKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5maWxlX25hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogZ2V0SWNvbihpdGVtKSxcXG4gICAgICAgICAgICAgICAgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi55m76ZmGXFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2Uvc2V0dGluZ3M0XFxcIlxcb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zOiBbcmVzLmRhdGFbMF0uZG93bmxvYWRfdXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIl0sXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWUucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3Bhbi5xdWFyay5jbi9cXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIGlmIChleHQgPT0gXFxcImF1ZGlvXFxcIikge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIHVybHM6IFtyZXMuZGF0YVswXS5kb3dubG9hZF91cmwgKyBcXFwiI2lzTXVzaWM9dHJ1ZSNcXFwiXSxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vcGFuLnF1YXJrLmNuL1xcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9IGVsc2UgaWYgKGV4dCA9PSBcXFwiaW1nXFxcIikge1xcbiAgICAgICAgICAgIHJldHVybiByZXMuZGF0YVswXS5kb3dubG9hZF91cmwgKyBgQFJlZmVyZXI9aHR0cHM6Ly9wYW4ucXVhcmsuY24vQENvb2tpZT0ke2Nvb2tpZX1gXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiZG93bmxvYWQ6Ly9cXFwiICsgcmVzLmRhdGFbMF0u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