Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥聚直播 ⚙ 聚直播设置 ⚙@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWKoOi9veaVsOaNrlwiLFwicGF0aFwiOlwiY29uZmlnXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBnZXRDb25maWcoKSB7XFxuICAgIHRyeSB7XFxuICAgICAgICBsZXQgY29uZmlnID0gZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIpO1xcbiAgICAgICAgaWYgKCFjb25maWcgfHwgY29uZmlnID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgICAgIHZlcnNpb246IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGNvbmZpZylcXG4gICAgICAgIH1cXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB0b2FzdChcXFwi6YWN572u5paH5Lu25qC85byP5pyJ6K+v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yczp7XFxuICAgICAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCcgOiB1YSB8fCBNT0JJTEVfVUFcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdGltZW91dDogNTAwMDBcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICBpZiAoIXJlbW90ZURhdGEuaW5jbHVkZXMoJ2h0dHAnKSB8fCByZW1vdGVEYXRhLmluY2x1ZGVzKCc8Ym9keT4nKSkgeyBcXG4gICAgICAgICAgICBsb2coJ+abtOaWsOWksei0pScpO1xcbiAgICAgICAgICAgIGlmIChvbGREYXRhKSB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHVybCkgKyAnLmpzJywgb2xkRGF0YSk7XFxuICAgICAgICAgICAgbTN1ID0gb2xkRGF0YTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgbTN1ID0gcmVtb3RlRGF0YTtcXG4gICAgICAgIH1cXG4gICAgfVxcblxcbiAgICBsZXQgbW9kZSA9ICBtM3UuaW5kZXhPZignI0VYVE0zVScpID09IDAgLCByZTtcXG4gICAgaWYobW9kZSl7XFxuICAgICAgICByZSA9IC8oLiopLCguKilcXFxccyo/KCg/Omh0dHB8cnRtcClbXiNcXFxcc10qKS9nO1xcbiAgICB9ZWxzZXtcXG4gICAgICAgIHJlID0gLygpKD86XFxcXEJcXFxcJGNfc3RhcnR8XFxcXEIjezEsMn0pPyguKj8pLD8oIyN85aS0I3xcXFxcJGNfZW5kfCw/I2dlbnJlI3woPzpodHRwfHJ0bXApW15cXFxcc10qKS9nO1xcbiAgICB9XFxuICAgICAgICBcXG4gICAgbGV0IGl0ZW1zID0ge30sXFxuICAgICAgICBncm91cCA9ICfmnKrliIbnu4QnO1xcbiAgICBmb3IgKGxldCBpID0gcmUuZXhlYyhtM3UpOyBpICE9IG51bGw7IGkgPSByZS5leGVjKG0zdSkpIHtcXG4gICAgICAgIGlmIChtb2RlKSB7XFxuICAgICAgICAgICAgZ3JvdXAgPSAoaVsxXS5tYXRjaCgvZ3JvdXAtdGl0bGU9XFxcIiguKj8pXFxcIi8pIHx8IFtudWxsLCBncm91cF0pWzFdO1xcbiAgICAgICAgfSBlbHNlIGlmIChbJyNnZW5yZSMnLCcjIycsJ+WktCMnLCckY19lbmQnXS5pbmNsdWRlcyhpWzNdKSkge1xcbiAgICAgICAgICAgIGdyb3VwID0gaVsyXTtcXG4gICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB0aXRsZSA9IGlbMl0sXFxuICAgICAgICAgICAgdXJsID0gaVszXS5pbmNsdWRlcygnIycpID8gaVszXS5zcGxpdCgnIycpIDogW2lbM11dLFxcbiAgICAgICAgICAgIGhlYWRlcnMgPSBbXTtcXG4gICAgICAgIGlmKCF1cmxbdXJsLmxlbmd0aC0xXSkgdXJsLnBvcCgpO1xcbiAgICAgICAgdXJsLmZvckVhY2goKHYsaW5kZXgsYXJyYXkpPT57XFxuICAgICAgICAgICAgaWYoLztcXFxceyguKilcXFxcfS8udGVzdCh2KSl7XFxuICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fSxcXG4gICAgICAgICAgICAgICAgICAgICBjb24gPSB2Lm1hdGNoKC87XFxcXHsoLiopXFxcXH0vKVsxXSxcXG4gICAgICAgICAgICAgICAgICAgICBhcnIgPSBjb24uc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgIGFyci5mb3JFYWNoKChpKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IFtrZXksdmFsdWVdID0gaS5zcGxpdCgnQCcpO1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZS5yZXBsYWNlKC87L2csJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBhcnJheVtpbmRleF0gPSB2Lm1hdGNoKC9eKFteO10qKTtcXFxcey8pWzFdXFxuICAgICAgICAgICAgICAgIGhlYWRlcnMucHVzaChvYmopO1xcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2goeydVc2VyLUFnZW50JyA6IE1PQklMRV9VQS5yZXBsYWNlKC87L2csJ++8m++8mycpfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IGFycmF5W2luZGV4XS5yZXBsYWNlKC87L2csJ++8m++8mycpKycjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICB9KTtcXG4gICAgICAgIGlmIChpdGVtc1tncm91cF0pIHtcXG4gICAgICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdW3RpdGxlXSkge1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdLnVybCA9IGl0ZW1zW2dyb3VwXVt0aXRsZV0udXJsLmNvbmNhdCh1cmwpO1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMgPSBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMuY29uY2F0KGhlYWRlcnMpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zW2dyb3VwXVt0aXRsZV0gPSB7dXJsOnVybCxoZWFkZXJzOmhlYWRlcnN9O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXBdID0ge307XFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXSA9IHt1cmw6dXJsLGhlYWRlcnM6aGVhZGVyc307XFxuICAgICAgICB9O1xcbiAgICB9XFxuICAgIHJldHVybiBpdGVtcztcXG59XFxuXFxuJC5leHBvcnRzID0ge1xcbiAgICByZW5kZXJMaXZlRGF0YTogcmVuZGVyTGl2ZURhdGFcXG59XFxuXCJ9LHtcImNvbF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1cm4gXFxcInRvYXN0Oi8v5LiN6IO95Li656m6XFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuaW5kZXhPZihcXFwiaHR0cFxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFwiZmlsZVxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFwiaGlrZXJcXFwiKSAhPSAwKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFwiXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbGV0IFt1cmwsdWFdID0gaW5wdXQuc3BsaXQoJyQkJCcpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJCgnJywgXFxcIuivt+i+k+WFpeiuoumYheagh+mimFxcXCIpLmlucHV0KCh1cmwsIHJ1bGUsdWEpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnP3J1bGU9XFxcIiArIHJ1bGUpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGlucHV0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVhOiB1YSB8fCAnJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTt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XFxcIixcXG4gICAgICAgIHVybDogJCgnJywgJ+ivt+i+k+WFpeebtOaSrea6kOWQjeensCcpLmlucHV0KChydWxlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kuI3og73kuLrnqbpcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJmaWxlU2VsZWN0Oi8vXFxcIiArICQudG9TdHJpbmcoKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBzID0gaW5wdXQuc3BsaXQoXFxcIi9cXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL2xpdmUvXFxcIiArIG5hbWUgKyBcXFwiLm0zdVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIHZhciBjID0gZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvXFxcIiArIHNbcy5sZW5ndGggLSAxXSlcXG4gICAgICAgICAgICAgICAgICAgIGlmICghYy5pbmNsdWRlcygnaHR0cCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mdnuazleaWh+S7tidcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh1cmwsIGMpXFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZz9ydWxlPeiBmuebtOaSrVxcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2YJ1xcbiAgICAgICAgICAgICAgICB9LCBpbnB1dClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBnZXRDb2xvcmVkVGV4dChcXFwi5YiG5Lqr6K6i6ZiFXFxcIiksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgdXJsOiAkKFtcXFwi5Y6f5aeL5pWw5o2uXFxcIiwgXFxcIuS6keWJqui0tOadv1xcXCIsIFxcXCLkupHlj6Pku6RcXFwiXSwgMykuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a5a+85Ye677yfXFxcXG4o56aB55So6K6i6ZiF5LiN5Lya5a+85Ye6KScpLmNvbmZpcm0oKHR5cGUpID0+IHtcXG4gICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICBjb25maWcuZGF0YSA9IGNvbmZpZy5kYXRhLmZpbHRlcih2ID0+ICF2LmluVmlzaWJsZSk7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlID09IFx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UpIHtcXG4gICAgICAgICAgICBjYXNlICflkK/nlKjnpoHnlKgnOlxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9ICh2LmluVmlzaWJsZSA/ICfwn5S0ICcgOiAn8J+foiAnKSArIGVsLnRpdGxlXFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5pblZpc2libGUgPSAhY29uZmlnLmRhdGFbaV0uaW5WaXNpYmxlO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICBjYXNlICfliKDpmaTorqLpmIUnOlxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSBcXFwiY29uZmlybTovL+ehruiupOWIoOmZpOKAnFxcXCIgKyB2Lm5hbWUgKyBcXFwi4oCd6K6i6ZiF77yfLmpzOlxcXCIgKyAkLnRvU3RyaW5nKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKGksIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBlbC50aXRsZVxcbiAgICAgICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5zcGxpY2UobmV3SW5kZXgsIDAsIGNvbmZpZy5kYXRhLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+keiuoumYhSc6XFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBbJ+e8lui+keWQjeensCcsICfnvJbovpHlnLDlnYAnLCAn57yW6L6R5YaF5a65J107XFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoYXJyLCAzKS5zZWxlY3QoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn57yW6L6R5ZCN56ewJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYubmFtZSwgJ+i+k+WFpeaWsOWQjeensCcpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5uYW1lID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LiN6IO95Li656m6J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHlnLDlnYAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi51YSA/IHYudXJsICsgJyQkJCcgKyB2LnVhIDogdi51cmwsICfovpPlhaXmlrDlnLDlnYAnKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJmaWxlXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJoaWtlclxcXCIpICE9IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgW3VybCx1YV0gPSBpbnB1dC5zcGxpdCgnJCQkJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwgPSB1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51YSA9IHVhO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5YaF5a65Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2LnVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykgfHwgdi51cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9maWxlcycpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nICsgdi51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly9oaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh2LnVybCkgKyAnLmpzJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB2LCBpKTtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSAn5riF6Zmk57yT5a2YJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgn56Gu5a6a5riF6Zmk4oCcJyArIHYubmFtZSArICfigJ3orqLpmIXnvJPlrZjvvJ9cXFxcbijlj6/nq4vljbPmm7TmlrApJykuY29uZmlybSgodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVDYWNoZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a4hemZpOaIkOWKnydcXG4gICAgICAgICAgICAgICAgfSwgdi51cmwpXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKGVsKVxcbiAgICB9KTtcXG4gICAgcmV0dXJuIGQ7XFxufVxcblxcbiQuZXhwb3J0cyA9IHtcXG4gICAg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XFxcXG4gICAgfVxcXFxuICAgICAgICBcXFxcbiAgICBsZXQgaXRlbXMgPSB7fSxcXFxcbiAgICAgICAgZ3JvdXAgPSAn5pyq5YiG57uEJztcXFxcbiAgICBmb3IgKGxldCBpID0gcmUuZXhlYyhtM3UpOyBpICE9IG51bGw7IGkgPSByZS5leGVjKG0zdSkpIHtcXFxcbiAgICAgICAgaWYgKG1vZGUpIHtcXFxcbiAgICAgICAgICAgIGdyb3VwID0gKGlbMV0ubWF0Y2goL2dyb3VwLXRpdGxlPVxcXFxcXFwiKC4qPylcXFxcXFxcIi8pIHx8IFtudWxsLCBncm91cF0pWzFdO1xcXFxuICAgICAgICB9IGVsc2UgaWYgKFsnI2dlbnJlIycsJyMjJywn5aS0IycsJyRjX2VuZCddLmluY2x1ZGVzKGlbM10pKSB7XFxcXG4gICAgICAgICAgICBncm91cCA9IGlbMl07XFxcXG4gICAgICAgICAgICBjb250aW51ZTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBsZXQgdGl0bGUgPSBpWzJdLFxcXFxuICAgICAgICAgICAgdXJsID0gaVszXS5pbmNsdWRlcygnIycpID8gaVszXS5zcGxpdCgnIycpIDogW2lbM11dLFxcXFxuICAgICAgICAgICAgaGVhZGVycyA9IFtdO1xcXFxuICAgICAgICBpZighdXJsW3VybC5sZW5ndGgtMV0pIHVybC5wb3AoKTtcXFxcbiAgICAgICAgdXJsLmZvckVhY2goKHYsaW5kZXgsYXJyYXkpPT57XFxcXG4gICAgICAgICAgICBpZigvO1xcXFxcXFxceyguKilcXFxcXFxcXH0vLnRlc3Qodikpe1xcXFxuICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fSxcXFxcbiAgICAgICAgICAgICAgICAgICAgIGNvbiA9IHYubWF0Y2goLztcXFxcXFxcXHsoLiopXFxcXFxcXFx9LylbMV0sXFxcXG4gICAgICAgICAgICAgICAgICAgICBhcnIgPSBjb24uc3BsaXQoJyYmJyk7XFxcXG4gICAgICAgICAgICAgICAgYXJy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gICAgICAgICAgICAgcmV0dXJuICQoJycsIFxcXFxcXFwi6K+36L6T5YWl6K6i6ZiF5qCH6aKYXFxcXFxcXCIpLmlucHV0KCh1cmwsIHJ1bGUsdWEpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnP3J1bGU9XFxcXFxcXCIgKyBydWxlKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpbnB1dCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdWE6IHVhIHx8ICcnXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcXFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFxcXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5bey5L+d5a2YXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSwgdXJsLCBydWxlLHVhKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9LCBnZXRNeVZhcigndGl0bGUnKSlcXFxcbiAgICB9KTtcXFxcblxcXFxuICAgIGQucHVzaCh7XFxcXG4gICAgICAgIHRpdGxlOiBnZXRDb2xvcmVkVGV4dChcXFxcXFxcIuWvvOWFpeiuoumYhVxcXFxcXFwiKSxcXFxcbiAgICAgICAgY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i8v5LiN6IO95Li656m6XFxcXFxcXCJcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiZmlsZVNlbGVjdDovL1xcXFxcXFwiICsgJC50b1N0cmluZygobmFtZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgcyA9IGlucHV0LnNwbGl0KFxcXFxcXFwiL1xcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gXFxcXFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL2xpdmUvXFxcXFxcXCIgKyBuYW1lICsgXFxcXFxcXCIubTN1XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGMgPSBmZXRjaChcXFxcXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvXFxcXFxcXCIgKyBzW3MubGVuZ3RoIC0gMV0pXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICghYy5pbmNsdWRlcygnaHR0cCcpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6Z2e5rOV5paH5Lu2J1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh1cmwsIGMpXFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZz9ydWxlPeiBmuebtOaSrVxcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFxcXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmCdcXFxcbiAgICAgICAgICAgICAgICB9LCBpbnB1dClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSlcXFxcbiAgICB9KTtcXFxcbiAgICBkLnB1c2goe1xcXFxuICAgICAgICB0aXRsZTogZ2V0Q29sb3JlZFRleHQoXFxcXFxcXCLliIbkuqvorqLpmIVcXFxcXFxcIiksXFxcXG4gICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInNjcm9sbF9idXR0b25cXFxcXFxcIixcXFxcbiAgICAgICAgdXJsOiAkKFtcXFxcXFxcIuWOn+Wni+aVsOaNrlxcXFxcXFwiLCBcXFxcXFxcIuS6keWJqui0tOadv1xcXFxcXFwiLCBcXFxcXFxcIuS6keWPo+S7pFxcXFxcXFwiXSwgMykuc2VsZWN0KCgpID0+IHtcXFxcbiAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrprlr7zlh7rvvJ9cXFxcXFxcXG4o56aB55So6K6i6ZiF5LiN5Lya5a+85Ye6KScpLmNvbmZpcm0oKHR5cGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhID0gY29uZmlnLmRhdGEuZmlsdGVyKHYgPT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sbF9idXR0b24nXFxcXG4gICAgICAgIH0pXFxcXG4gICAgfSk7XFxcXG4gICAgY29uZmlnLmRhdGEuZm9yRWFjaCgodiwgaSkgPT4ge1xcXFxuICAgICAgICBsZXQgZWwgPSB7XFxcXG4gICAgICAgICAgICB0aXRsZTogdi5uYW1lLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8zXFxcXFxcXCJcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBzd2l0Y2ggKGVkaXRNb2RlKSB7XFxcXG4gICAgICAgICAgICBjYXNlICflkK/nlKjnpoHnlKgnOlxcXFxuICAgICAgICAgICAgICAgIGVsLnRpdGxlID0gKHYuaW5WaXNpYmxlID8gJ/CflLQgJyA6ICfwn5+iICcpICsgZWwudGl0bGVcXFxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5pblZpc2libGUgPSAhY29uZmlnLmRhdGFbaV0uaW5WaXNpYmxlO1xcXFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcXFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFxcXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgICAgIGNhc2UgJ+WIoOmZpOiuoumYhSc6XFxcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gXFxcXFxcXCJjb25maXJtOi8v56Gu6K6k5Yig6Zmk4oCcXFxcXFxcXCIgKyB2Lm5hbWUgKyBcXFxcXFxcIuKAneiuoumYhe+8ny5qczpcXFxcXFxcIiArICQudG9TdHJpbmcoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZShpLCAxKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5bey5Yig6ZmkXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgICAgICBicmVha1xcXFxuICAgICAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXFxcbiAgICAgICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXFxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBlbC50aXRsZVxcXFxuICAgICAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXFxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcXFxuICAgICAgICAgICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgICAgIGVsc2VcXFxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5zcGxpY2UobmV3SW5kZXgsIDAsIGNvbmZpZy5kYXRhLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcXFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFxcXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgICAgICBjYXNlICfnvJbovpHorqLpmIUnOlxcXFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBbJ+e8lui+keWQjeensCcsICfnvJbovpHlnLDlnYAnLCAn57yW6L6R5YaF5a65J107XFxcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJChhcnIsIDMpLnNlbGVjdCgodiwgaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gJ+e8lui+keWQjeensCcpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYubmFtZSwgJ+i+k+WFpeaWsOWQjeensCcpLmlucHV0KChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0ubmFtZSA9IGlucHV0XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFxcXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S4jeiDveS4uuepuidcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5Zyw5Z2AJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi51YSA/IHYudXJsICsgJyQkJCcgKyB2LnVhIDogdi51cmwsICfovpPlhaXmlrDlnLDlnYAnKS5pbnB1dCgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXFxcXFwiXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/kuI3og73kuLrnqbpcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuaW5kZXhPZihcXFxcXFxcImh0dHBcXFxcXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXFxcXFwiZmlsZVxcXFxcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcXFxcXCJoaWtlclxcXFxcXFwiKSAhPSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v6ZO+5o6l5qC85byP5pyJ6K+vXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgW3VybCx1YV0gPSBpbnB1dC5zcGxpdCgnJCQkJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybCA9IHVybDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udWEgPSB1YTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5YaF5a65Jykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYudXJsLnN0YXJ0c1dpdGgoJ2ZpbGU6Ly8nKSB8fCB2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL2ZpbGVzJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJyArIHYudXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovL2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHYudXJsKSArICcuanMnXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9LCB2LCBpKTtcXFxcbiAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgIGNhc2UgJ+a4hemZpOe8k+WtmCc6XFxcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgn56Gu5a6a5riF6Zmk4oCcJyArIHYubmFtZSArICfigJ3orqLpmIXnvJPlrZjvvJ9cXFxcXFxcXG4o5Y+v56uL5Y2z5pu05pawKScpLmNvbmZpcm0oKHVybCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVDYWNoZSh1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5riF6Zmk5oiQ5YqfJ1xcXFxuICAgICAgICAgICAgICAgIH0sIHYudXJsKVxcXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGQucHVzaChlbClcXFxcbiAgICB9KTtcXFxcbiAgICByZXR1cm4gZDtcXFxcbn1cXFxcblxcXFxuJC5leHBvcnRzID0ge1xcXFxuICAgIHJlbmRlclNldHRpbmc6IHJlbmRlclNldHRpbmdcXFxcbn1cXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOlxcXCLkupHlj6Pku6RcXFwiLFxcXCJwYXRoXFxcIjpcXFwiY2xvdWRcXFwiLFxcXCJydWxlXFxcIjpcXFwiZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYmF0Y2hJbT9ydWxlPeiBmuebtOaSrVxcXFxcXFwiKSkucnVsZSk7XFxcXG5sZXQgY29udGVudCA9IHBhcnNlUGFzdGUoaW5wdXQpO1xcXFxuYmF0Y2hJbXBvcnQoY29udGVudCwgXFxcXFxcXCLogZrnm7Tmkq1cXFxcXFxcIik7XFxcIn1dXCJ9IiwicGljVXJsIjoiaHR0cHM6Ly9mZWwuZm9yeGhyLnRvcDoyMDIyL2Rvd24ucGhwL2Q5Yjg1MTIwMjlhZmZlODY1ZTY4ZGE0MDdhM2UzZTRiLiIsInRpdGxlIjoi6IGa55u05pKtIOKamSDogZrnm7Tmkq3orr7nva4g4pqZIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement