Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@聚直播@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6IGa55u05pKtIiwiYXV0aG9yIjoi5bCP5qOJ6KKE8J+MniZKb2tlciIsInVybCI6Imhpa2VyOi8vZW1wdHkiLCJ2ZXJzaW9uIjo2LCJjb2xfdHlwZSI6Imljb25fMl9yb3VuZCIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoibGl2ZSIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL3BhZ2UvY29uZmlnXCIpKS5ydWxlKTsgLy9nZXRDb25maWdcblxubGV0IGRhdGEgPSBbXSxcbiAgICBjb25maWcgPSBnZXRDb25maWcoKTtcbmNvbmZpZy5kYXRhID0gY29uZmlnLmRhdGEuZmlsdGVyKHYgPT4gIXYuaW5WaXNpYmxlKTtcbmlmIChjb25maWcuZGF0YS5sZW5ndGggPD0gMCkge1xuICAgIGRhdGEgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9yZW5kZXJTZXR0aW5nJykucmVuZGVyU2V0dGluZygpO1xufSBlbHNlIHtcbiAgICBsZXQgc2VsZWN0ID0gZ2V0SXRlbShcImxpdmUtc2VsZWN0XCIsIGNvbmZpZy5kYXRhWzBdLm5hbWUpLFxuICAgICAgICBoYXMgPSBjb25maWcuZGF0YS5tYXAoaSA9PiBpLm5hbWUpLmluY2x1ZGVzKHNlbGVjdCk7XG4gICAgaWYgKCFoYXMpIHtcbiAgICAgICAgc2VsZWN0ID0gY29uZmlnLmRhdGFbMF0ubmFtZTtcbiAgICB9XG4gICAgXG4gICAgZGF0YS5wdXNoKHtcbiAgICAgICAgdGl0bGU6ICfogZrnm7Tmkq0nLmJvbGQoKSArICcgJm5ic3AgJm5ic3AgJyArICfimpkg6IGa55u05pKt6K6+572uIOKamScuc21hbGwoKSxcbiAgICAgICAgY29sX3R5cGU6IFwiYXZhdGFyXCIsXG4gICAgICAgIHBpY191cmw6IE1ZX1JVTEUuaWNvbixcbiAgICAgICAgdXJsOiAkKFwiaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjXCIpLnJ1bGUoKCkgPT4ge1xuICAgICAgICAgICAgYWRkTGlzdGVuZXIoJ29uQ2xvc2UnLCdyZWZyZXNoUGFnZSgpJylcbiAgICAgICAgICAgIHNldFJlc3VsdCgkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9yZW5kZXJTZXR0aW5nJykucmVuZGVyU2V0dGluZygpKVxuICAgICAgICB9KVxuICAgIH0pXG5cbiAgICBkYXRhLnB1c2goe1xuICAgICAgICB0aXRsZTogJ+aQnOe0oicsXG4gICAgICAgIGRlc2M6ICfor7fovpPlhaXmkJzntKLlhbPplK7or40nLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ3NlYXJjaF9rZXknLCAnJyksXG4gICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcInNlYXJjaF9rZXlcIixpbnB1dCknXG4gICAgICAgIH0sXG4gICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3NlYXJjaD9ydWxlPScgKyBnZXRNeVZhcigndGl0bGUnKSArICcmcz0nICsgZ2V0VmFyKCdzZWFyY2hfa2V5JywgJycpXG4gICAgICAgIH0pXG4gICAgfSlcbiAgICBcbiAgICBcbiAgICBcbiAgICBmb3IgKHNvdXJjZSBvZiBjb25maWcuZGF0YSkge1xuICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IHNvdXJjZS5uYW1lID09IHNlbGVjdCA/IFwi4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9J2NvbG9yOiAjMTlCODlEJz5cIiArIHNlbGVjdCArIFwiPC9zcGFuPlwiIDogc291cmNlLm5hbWUsXG4gICAgICAgICAgICBjb2xfdHlwZTogXCJzY3JvbGxfYnV0dG9uXCIsXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGEpID0+IHtcbiAgICAgICAgICAgICAgICBzZXRJdGVtKFwibGl2ZS1zZWxlY3RcIiwgYSk7XG4gICAgICAgICAgICAgICAgc2V0SXRlbSgnc2VsZWN0R3JvdXAnLCAnJyk7XG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL2VtcHR5XCJcbiAgICAgICAgICAgIH0sIHNvdXJjZS5uYW1lKVxuICAgICAgICB9KVxuICAgIH1cblxuICAgIGRhdGEucHVzaCh7XG4gICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXG4gICAgfSlcblxuICAgIGZvciAoc291cmNlIG9mIGNvbmZpZy5kYXRhKSB7XG4gICAgICAgIGlmIChzb3VyY2UubmFtZSA9PSBzZWxlY3QpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgbGV0IGl0ZW1zID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcmVuZGVyRGF0YScpLnJlbmRlckxpdmVEYXRhKHNvdXJjZS51cmwpO1xuICAgICAgICAgICAgICAgIGxldCBncm91cHMgPSBPYmplY3Qua2V5cyhpdGVtcyk7XG4gICAgICAgICAgICAgICAgLy9ncm91cHMucHVzaChncm91cHMuc3BsaWNlKGdyb3Vwcy5pbmRleE9mKDApLCAxKVswXSk7XG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdEdyb3VwID0gZ2V0SXRlbSgnc2VsZWN0R3JvdXAnLCBncm91cHNbMF0pO1xuICAgICAgICAgICAgICAgIGlmIChzZWxlY3RHcm91cCA9PSBcIlwiIHx8ICFncm91cHMuaW5jbHVkZXMoc2VsZWN0R3JvdXApKSBzZWxlY3RHcm91cCA9IGdyb3Vwc1swXTtcbiAgICAgICAgICAgICAgICBncm91cHMuZm9yRWFjaCgoZ3JvdXApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdyb3VwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBncm91cCA9PSBzZWxlY3RHcm91cCA/IFwi4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9J2NvbG9yOiAjMTlCODlEJz5cIiArIGdyb3VwICsgXCI8L3NwYW4+XCIgOiBncm91cCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGdyb3VwKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3NlbGVjdEdyb3VwJywgZ3JvdXApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgZ3JvdXApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgdGl0bGUgaW4gaXRlbXNbc2VsZWN0R3JvdXBdKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBpdGVtc1tzZWxlY3RHcm91cF1bdGl0bGVdLnVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBpdGVtc1tzZWxlY3RHcm91cF1bdGl0bGVdLmhlYWRlcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpY29uXzJfcm91bmQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBcImh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9tb3JlLzIyOC5wbmdcIlxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCLmlbDmja7liqDovb3lpLHotKVcXG5cIiArIEpTT04uc3RyaW5naWZ5KGUpLFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXCJsb25nX3RleHRcIlxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuXG59XG5zZXRSZXN1bHQoZGF0YSk7Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHk/a2V5PSoqIiwiZ3JvdXAiOiLikaXnm7Tmkq0iLCJzZWFyY2hGaW5kIjoianM6XG5ldmFsKEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vcGFnZS9jb25maWdcIikpLnJ1bGUpO1xubGV0IGNvbmZpZyA9IGdldENvbmZpZygpO1xubGV0IHJ1bGVzID0gY29uZmlnLmRhdGEubWFwKChzb3VyY2UpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0aXRsZTogc291cmNlLm5hbWUsXG4gICAgICAgIHNlYXJjaF91cmw6ICdoaWtlcjovL2VtcHR5P2tleT0qKicsXG4gICAgICAgIHNlYXJjaEZpbmQ6ICdqczonICsgJC50b1N0cmluZygodXJsLCBydWxlX3RpdGxlKSA9PiB7XG4gICAgICAgICAgICBsZXQgZCA9IFtdLFxuICAgICAgICAgICAgICAgIGtleSA9IGdldFBhcmFtKCdrZXknKTtcbiAgICAgICAgICAgIGxldCBpdGVtcyA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL3JlbmRlckRhdGE/cnVsZT0nICsgcnVsZV90aXRsZSkucmVuZGVyTGl2ZURhdGEodXJsKTtcbiAgICAgICAgICAgIGZvciAobGV0IGdyb3VwIGluIGl0ZW1zKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgdGl0bGUgaW4gaXRlbXNbZ3JvdXBdKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aXRsZS5pbmRleE9mKGtleSkgPj0gMCB8fCB0aXRsZS50b0xvd2VyQ2FzZSgpLmluZGV4T2Yoa2V5KSA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogaXRlbXNbZ3JvdXBdW3RpdGxlXS51cmwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IGl0ZW1zW2dyb3VwXVt0aXRsZV0uaGVhZGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xuICAgICAgICB9LCBzb3VyY2UudXJsLCBnZXRNeVZhcigndGl0bGUnKSlcbiAgICB9O1xufSlcbnNldFJlc3VsdChbe1xuICAgIHRpdGxlOiBcIueCueaIkeW8gOWni+iBmuaQnFwiLFxuICAgIHVybDogXCJoaWtlcjovL3NlYXJjaD9zPVwiICsgZ2V0UGFyYW0oXCJrZXlcIiksXG4gICAgZXh0cmE6IHtcbiAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKHJ1bGVzKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkocnVsZXMpXG4gICAgICAgIH0sIHJ1bGVzKVxuICAgIH1cbn1dKSIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6InB1dE15VmFyKCd0aXRsZScsTVlfUlVMRS50aXRsZSk7IiwicGFnZXMiOiJbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWKoOi9veaVsOaNrlwiLFwicGF0aFwiOlwiY29uZmlnXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBnZXRDb25maWcoKSB7XFxuICAgIHRyeSB7XFxuICAgICAgICBsZXQgY29uZmlnID0gZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIpO1xcbiAgICAgICAgaWYgKCFjb25maWcgfHwgY29uZmlnID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgICAgIHZlcnNpb246IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGNvbmZpZylcXG4gICAgICAgIH1cXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB0b2FzdChcXFwi6YWN572u5paH5Lu25qC85byP5pyJ6K+vXFxcIilcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgIGRhdGE6IFtdLFxcbiAgICAgICAgICAgIHZlcnNpb246IDBcXG4gICAgICAgIH1cXG4gICAgfVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuaJuemHj+WvvOWFpVwiLFwicGF0aFwiOlwiYmF0Y2hJbVwiLFwicnVsZVwiOlwiZnVuY3Rpb24gYmF0Y2hJbXBvcnQoaW5wdXQsIHJ1bGUpIHtcXG4gICAgaW5wdXQgPSBpbnB1dC50cmltKCk7XFxuICAgIGlmIChpbnB1dC5sZW5ndGggPCAzIHx8IGlucHV0WzBdICE9IFxcXCJ7XFxcIikge1xcbiAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+i+k+WFpeato+ehrueahOagvOW8j1xcXCJcXG4gICAgfVxcbiAgICBsZXQgaW0gPSBKU09OLnBhcnNlKGlucHV0KTtcXG4gICAgaWYgKGltLmRhdGEgPT0gbnVsbCB8fCBpbS5kYXRhLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fovpPlhaXmraPnoa7nmoTmoLzlvI9cXFwiXFxuICAg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3UgPSBmZXRjaCh1cmwpO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgbGV0IGludGVydmFsID0gTnVtYmVyKGdldEl0ZW0oJ2ludGVydmFsJywgJzI0JykpLFxcbiAgICAgICAgICAgIG9sZERhdGEgPSBmZXRjaCgnaGlrZXI6Ly9maWxlcy9saWJzLycgKyBtZDUodXJsKSArICcuanMnKSxcXG4gICAgICAgICAgICByZW1vdGVEYXRhID0gJyc7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHJlbW90ZURhdGEgPSBmZXRjaENhY2hlKHVybCwgaW50ZXJ2YWwsIHtcXG4gICAgICAgICAgICAgICAgdGltZW91dDogNTAwMDBcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICBpZiAoIXJlbW90ZURhdGEuaW5jbHVkZXMoJ2h0dHAnKSB8fCByZW1vdGVEYXRhLmluY2x1ZGVzKCc8Ym9keT4nKSkgeyBcXG4gICAgICAgICAgICBsb2coJ+abtOaWsOWksei0pScpO1xcbiAgICAgICAgICAgIGlmIChvbGREYXRhKSB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHVybCkgKyAnLmpzJywgb2xkRGF0YSk7XFxuICAgICAgICAgICAgbTN1ID0gb2xkRGF0YTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgbTN1ID0gcmVtb3RlRGF0YTtcXG4gICAgICAgIH1cXG4gICAgfVxcblxcbiAgICBsZXQgbW9kZSA9ICBtM3UuaW5kZXhPZignI0VYVE0zVScpID09IDAgLCByZTtcXG4gICAgaWYobW9kZSl7XFxuICAgICAgICByZSA9IC8oLiopLCguKilcXFxccyo/KCg/Omh0dHB8cnRtcClbXiNcXFxcc10qKS9nO1xcbiAgICB9ZWxzZXtcXG4gICAgICAgIHJlID0gLygpKD86XFxcXEJcXFxcJGNfc3RhcnR8XFxcXEIjezEsMn0pPyguKj8pLD8oIyN85aS0I3xcXFxcJGNfZW5kfCwjZ2VucmUjfCg/Omh0dHB8cnRtcClbXlxcXFxzXSopL2c7XFxuICAgIH1cXG4gICAgICAgIFxcbiAgICBsZXQgaXRlbXMgPSB7fSxcXG4gICAgICAgIGdyb3VwID0gJ+acquWIhue7hCc7XFxuICAgIGZvciAobGV0IGkgPSByZS5leGVjKG0zdSk7IGkgIT0gbnVsbDsgaSA9IHJlLmV4ZWMobTN1KSkge1xcbiAgICAgICAgaWYgKG1vZGUpIHtcXG4gICAgICAgICAgICBncm91cCA9IChpWzFdLm1hdGNoKC9ncm91cC10aXRsZT1cXFwiKC4qPylcXFwiLykgfHwgW251bGwsIGdyb3VwXSlbMV07XFxuICAgICAgICB9IGVsc2UgaWYgKFsnLCNnZW5yZSMnLCcjIycsJ+WktCMnLCckY19lbmQnXS5pbmNsdWRlcyhpWzNdKSkge1xcbiAgICAgICAgICAgIGdyb3VwID0gaVsyXTtcXG4gICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB0aXRsZSA9IGlbMl0sXFxuICAgICAgICAgICAgdXJsID0gaVszXS5pbmNsdWRlcygnIycpID8gaVszXS5zcGxpdCgnIycpIDogW2lbM11dLFxcbiAgICAgICAgICAgIGhlYWRlcnMgPSBbXTtcXG4gICAgICAgIGlmKCF1cmxbdXJsLmxlbmd0aC0xXSkgdXJsLnBvcCgpO1xcbiAgICAgICAgdXJsLmZvckVhY2goKHYsaW5kZXgsYXJyYXkpPT57XFxuICAgICAgICAgICAgaWYoLztcXFxceyguKilcXFxcfS8udGVzdCh2KSl7XFxuICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fSxcXG4gICAgICAgICAgICAgICAgICAgICBjb24gPSB2Lm1hdGNoKC87XFxcXHsoLiopXFxcXH0vKVsxXSxcXG4gICAgICAgICAgICAgICAgICAgICBhcnIgPSBjb24uc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgIGFyci5mb3JFYWNoKChpKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IFtrZXksdmFsdWVdID0gaS5zcGxpdCgnQCcpO1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZS5yZXBsYWNlKC87L2csJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBhcnJheVtpbmRleF0gPSB2Lm1hdGNoKC9eKFteO10qKTtcXFxcey8pWzFdXFxuICAgICAgICAgICAgICAgIGhlYWRlcnMucHVzaChvYmopO1xcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2goeydVc2VyLUFnZW50JyA6IE1PQklMRV9VQS5yZXBsYWNlKC87L2csJ++8m++8mycpfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IGFycmF5W2luZGV4XS5yZXBsYWNlKC87L2csJ++8m++8mycpKycjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICB9KTtcXG4gICAgICAgIGlmIChpdGVtc1tncm91cF0pIHtcXG4gICAgICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdW3RpdGxlXSkge1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdLnVybCA9IGl0ZW1zW2dyb3VwXVt0aXRsZV0udXJsLmNvbmNhdCh1cmwpO1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMgPSBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMuY29uY2F0KGhlYWRlcnMpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zW2dyb3VwXVt0aXRsZV0gPSB7dXJsOnVybCxoZWFkZXJzOmhlYWRlcnN9O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXB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nYBcXFwiLFxcbiAgICAgICAgdXJsOiAkKCcnLCAn6K+36L6T5YWl6K6i6ZiF5Zyw5Z2AJykuaW5wdXQoKHJ1bGUpID0+IHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImZpbGVcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImhpa2VyXFxcIikgIT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZO+5o6l5qC85byP5pyJ6K+vXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLFxcXCLor7fovpPlhaXorqLpmIXmoIfpophcXFwiKS5pbnB1dCgodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZz9ydWxlPVxcXCIgKyBydWxlKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHVybFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbi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wi5Y6f5aeL5pWw5o2uXFxcIiwgXFxcIuS6keWJqui0tOadv1xcXCJdLCAxKS5zZWxlY3QoKCkgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrprlr7zlh7rvvJ9cXFxcbijnpoHnlKjorqLpmIXkuI3kvJrlr7zlh7opJykuY29uZmlybSgodHlwZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhID0gY29uZmlnLmRhdGEuZmlsdGVyKHYgPT4gIXYuaW5WaXNpYmxlKTtcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gXFxcIuS6keWJqui0tOadv1xcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gJ+iBmuebtOaSreWIhuS6qyMjXFxcXG4nICsgc2hhcmVQYXN0ZShKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gSlNPTi5zdHJpbmdpZnkoY29uZmlnKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImNvcHk6Ly9cXFwiICsgZGF0YTtcXG4gICAgICAgICAgICB9LCBpbnB1dClcXG4gICAgICAgIH0pXFxuICAgIH0pO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGdldENvbG9yZWRUZXh0KFxcXCLnvJbovpHlhajpg6hcXFwiKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICB1cmw6IFxcXCJlZGl0RmlsZTovL2hpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCJcXG4gICAgfSk7XFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICB9KTtcXG5cXG4gICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICBsZXQgZWRpdE1vZGUgPSBnZXRNeVZhcignZWRpdE1vZGUnLCAn5ZCv55So56aB55SoJyk7XFxuICAgIFsn5ZCv55So56aB55SoJywgJ+WIoOmZpOiuoumYhScsICfph43mlrDmjpLluo8nLCAn57yW6L6R6K6i6ZiFJywn5riF6Zmk57yT5a2YJ10uZm9yRWFjaCgodikgPT4ge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogdiA9PSBlZGl0TW9kZSA/ICfigJzigJzigJ3igJ0nICsgdi5ib2xkKCkuZm9udGNvbG9yKCcjMTlCODlEJykgOiB2LFxcbiAgICAgICAgICAgIHVybDogdiA9PSBlZGl0TW9kZSA/ICdoaWtlcjovL2VtcHR5JyA6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHYpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2VkaXRNb2RlJywgdilcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCB2KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KVxcbiAgICB9KTtcXG4gICAgY29uZmlnLmRhdGEuZm9yRWFjaCgodiwgaSkgPT4ge1xcbiAgICAgICAgbGV0IGVsID0ge1xcbiAgICAgICAgICAgIHRpdGxlOiB2Lm5hbWUsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiXFxuICAgICAgICB9XFxuICAgICAgICBzd2l0Y2ggKGVkaXRNb2RlKSB7XFxuICAgICAgICAgICAgY2FzZSAn5ZCv55So56aB55SoJzpcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAodi5pblZpc2libGUgPyAn8J+UtCAnIDogJ/Cfn6IgJykgKyBlbC50aXRsZVxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uaW5WaXNpYmxlID0gIWNvbmZpZy5kYXRhW2ldLmluVmlzaWJsZTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn5Yig6Zmk6K6i6ZiFJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gXFxcImNvbmZpcm06Ly/noa7orqTliKDpmaTigJxcXFwiICsgdi5uYW1lICsgXFxcIuKAneiuoumYhe+8ny5qczpcXFwiICsgJC50b1N0cmluZygobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhID0gY29uZmlnLmRhdGEuZmlsdGVyKGkgPT4gaS5uYW1lICE9IG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICB9LCB2Lm5hbWUpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXG4gICAgICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxuICAgICAgICAgICAgICAgIGVsLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGVsLnRpdGxlXFxuICAgICAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXG4gICAgICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXG4gICAgICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZShuZXdJbmRleCwgMCwgY29uZmlnLmRhdGEuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn57yW6L6R6K6i6ZiFJzpcXG4gICAgICAgICAgICAgICAgbGV0IGFyciA9IFsn57yW6L6R5ZCN56ewJywgJ+e8lui+keWcsOWdgCcsICfnvJbovpHlhoXlrrknXTtcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJChhcnIsIDMpLnNlbGVjdCgodiwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09ICfnvJbovpHlkI3np7AnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi5uYW1lLCAn6L6T5YWl5paw5ZCN56ewJykuaW5wdXQoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLm5hbWUgPSBpbnB1dFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kuI3og73kuLrnqbonXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+e8lui+keWcsOWdgCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh2LnVybCwgJ+i+k+WFpeaWsOWcsOWdgCcpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5LiN6IO95Li656m6XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImZpbGVcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImhpa2VyXFxcIikgIT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mTvuaOpeagvOW8j+acieivr1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybCA9IGlucHV0XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+u5pS55oiQ5YqfJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHlhoXlrrknKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYudXJsLnN0YXJ0c1dpdGgoJ2ZpbGU6Ly8nKSB8fCB2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL2ZpbGVzJykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovLycgKyB2LnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovL2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHYudXJsKSArICcuanMnXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHYsIGkpO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICBjYXNlICfmuIXpmaTnvJPlrZgnOlxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCfnoa7lrprmuIXpmaTigJwnICsgdi5uYW1lICsgJ+KAneiuoumYhee8k+WtmO+8n1xcXFxuKOWPr+eri+WNs+abtOaWsCknKS5jb25maXJtKCh1cmwpPT57XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVDYWNoZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a4hemZpOaIkOWKnydcXG4gICAgICAgICAgICAgICAgfSx2LnVybClcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goZWwpXFxuICAgIH0pO1xcbiAgICByZXR1cm4gZDtcXG59XFxuXFxuJC5leHBvcnRzID0ge1xcbiAgICByZW5kZXJTZXR0aW5nOiByZW5kZXJTZXR0aW5nXFxufVwifV0iLCJpY29uIjoiaHR0cHM6Ly9naW1nMi5iYWlkdS5jb20vaW1hZ2Vfc2VhcmNoL3NyYz1odHRwJTNBJTJGJTJGaXM0Lm16c3RhdGljLmNvbSUyRmltYWdlJTJGdGh1bWIlMkZQdXJwbGUzJTJGdjQlMkZkZiUyRmY2JTJGZGElMkZkZmY2ZGE4My00N2Q3LTljYjYtMjM5OC0xOTE5YzEzODM3YjQlMkZtemwua2dtbndvZG8ucG5nJTJGMHgwc3MtODUuanBnJnJlZmVyPWh0dHAlM0ElMkYlMkZpczQubXpzdGF0aWMuY29tJmFwcD0yMDAyJnNpemU9Zjk5OTksMTAwMDAmcT1hODAmbj0wJmc9MG4mZm10PWpwZWc/c2VjPTE2Mzg2MjkzNDkmdD0yZjZkOTY3MTg1ZmUyYjljNTRlOGIyMzBlYjgzZTY2YyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment