xiaomianao666

小程序:电视直播

Jul 8th, 2023
5,273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@电视直播@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6IueUteinhuebtOaSrSIsImF1dGhvciI6IvCfj4Xkuqzmoqbkv67mlLlb5bCP5qOJ6KKE8J+MniZKb2tlcl0iLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6OCwiY29sX3R5cGUiOiJpY29uXzJfcm91bmQiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImxpdmUiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9wYWdlL0ppbmdNZW5nXCIpKS5ydWxlKTsgLy9nZXRKaW5nTWVuZ1xuXG5sZXQgZGF0YSA9IFtdLFxuICAgIEppbmdNZW5nID0gZ2V0SmluZ01lbmcoKTtcbkppbmdNZW5nLmRhdGEgPSBKaW5nTWVuZy5kYXRhLmZpbHRlcih2ID0+ICF2LmluVmlzaWJsZSk7XG5pZiAoSmluZ01lbmcuZGF0YS5sZW5ndGggPD0gMCkge1xuICAgIGRhdGEgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9yZW5kZXJTZXR0aW5nJykucmVuZGVyU2V0dGluZygpO1xufSBlbHNlIHtcbiAgICBsZXQgc2VsZWN0ID0gZ2V0SXRlbShcImxpdmUtc2VsZWN0XCIsIEppbmdNZW5nLmRhdGFbMF0ubmFtZSksXG4gICAgICAgIGhhcyA9IEppbmdNZW5nLmRhdGEub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GEoc291cmNlLnVybCk7XG4gICAgICAgICAgICAgICAgbGV0IGdyb3VwcyA9IE9iamVjdC5rZXlzKGl0ZW1zKTtcbiAgICAgICAgICAgICAgICAvL2dyb3Vwcy5wdXNoKGdyb3Vwcy5zcGxpY2UoZ3JvdXBzLmluZGV4T2YoMCksIDEpWzBdKTtcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0R3JvdXAgPSBnZXRJdGVtKCdzZWxlY3RHcm91cCcsIGdyb3Vwc1swXSk7XG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdEdyb3VwID09IFwiXCIgfHwgIWdyb3Vwcy5pbmNsdWRlcyhzZWxlY3RHcm91cCkpIHNlbGVjdEdyb3VwID0gZ3JvdXBzWzBdO1xuICAgICAgICAgICAgICAgIGdyb3Vwcy5mb3JFYWNoKChncm91cCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZ3JvdXApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdyb3VwID09IHNlbGVjdEdyb3VwID8gXCLigJzigJzigJ3igJ08c3BhbiBzdHlsZT0nY29sb3I6ICMxOUI4OUQnPlwiICsgZ3JvdXAgKyBcIjwvc3Bhbj5cIiA6IGdyb3VwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoZ3JvdXApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnc2VsZWN0R3JvdXAnLCBncm91cCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBncm91cCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBmb3IgKGxldCB0aXRsZSBpbiBpdGVtc1tzZWxlY3RHcm91cF0pIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IGl0ZW1zW3NlbGVjdEdyb3VwXVt0aXRsZV0udXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IGl0ZW1zW3NlbGVjdEdyb3VwXVt0aXRsZV0uaGVhZGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2NvbF90eXBlOiAndGV4dF80JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogXCJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW9yZS8yMjEucG5nXCJcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgZGF0YS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwi5pWw5o2u5Yqg6L295aSx6LSlXFxuXCIgKyBKU09OLnN0cmluZ2lmeShlKSxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFwibG9uZ190ZXh0XCJcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cblxufVxuc2V0UmVzdWx0KGRhdGEpOyIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcHR5P2tleT0qKiIsImdyb3VwIjoi4pGg5o6o6I2QIiwic2VhcmNoRmluZCI6ImpzOlxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL3BhZ2UvSmluZ01lbmdcIikpLnJ1bGUpO1xubGV0IEppbmdNZW5nID0gZ2V0SmluZ01lbmcoKTtcbmxldCBydWxlcyA9IEppbmdNZW5nLmRhdGEubWFwKChzb3VyY2UpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0aXRsZTogc291cmNlLm5hbWUsXG4gICAgICAgIHNlYXJjaF91cmw6ICdoaWtlcjovL2VtcHR5P2tleT0qKicsXG4gICAgICAgIHNlYXJjaEZpbmQ6ICdqczonICsgJC50b1N0cmluZygodXJsLCBydWxlX3RpdGxlKSA9PiB7XG4gICAgICAgICAgICBsZXQgZCA9IFtdLFxuICAgICAgICAgICAgICAgIGtleSA9IGdldFBhcmFtKCdrZXknKTtcbiAgICAgICAgICAgIGxldCBpdGVtcyA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL3JlbmRlckRhdGE/cnVsZT0nICsgcnVsZV90aXRsZSkucmVuZGVyTGl2ZURhdGEodXJsKTtcbiAgICAgICAgICAgIGZvciAobGV0IGdyb3VwIGluIGl0ZW1zKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgdGl0bGUgaW4gaXRlbXNbZ3JvdXBdKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aXRsZS5pbmRleE9mKGtleSkgPj0gMCB8fCB0aXRsZS50b0xvd2VyQ2FzZSgpLmluZGV4T2Yoa2V5KSA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogaXRlbXNbZ3JvdXBdW3RpdGxlXS51cmwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IGl0ZW1zW2dyb3VwXVt0aXRsZV0uaGVhZGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xuICAgICAgICB9LCBzb3VyY2UudXJsLCBnZXRNeVZhcigndGl0bGUnKSlcbiAgICB9O1xufSlcbnNldFJlc3VsdChbe1xuICAgIHRpdGxlOiBcIueCueaIkeW8gOWni+iBmuaQnFwiLFxuICAgIHVybDogXCJoaWtlcjovL3NlYXJjaD9zPVwiICsgZ2V0UGFyYW0oXCJrZXlcIiksXG4gICAgZXh0cmE6IHtcbiAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKHJ1bGVzKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkocnVsZXMpXG4gICAgICAgIH0sIHJ1bGVzKVxuICAgIH1cbn1dKSIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6InB1dE15VmFyKCd0aXRsZScsTVlfUlVMRS50aXRsZSk7IiwicGFnZXMiOiJbe1wiY29sX3R5cGVcIjpcIm1vdmllX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ICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0bGUgPSBpWzJdLFxcbiAgICAgICAgICAgIHVybCA9IGlbM10uaW5jbHVkZXMoJyMnKSA/IGlbM10uc3BsaXQoJyMnKSA6IFtpWzNdXSxcXG4gICAgICAgICAgICBoZWFkZXJzID0gW107XFxuICAgICAgICBpZighdXJsW3VybC5sZW5ndGgtMV0pIHVybC5wb3AoKTtcXG4gICAgICAgIHVybC5mb3JFYWNoKCh2LGluZGV4LGFycmF5KT0+e1xcbiAgICAgICAgICAgIGlmKC87XFxcXHsoLiopXFxcXH0vLnRlc3Qodikpe1xcbiAgICAgICAgICAgICAgICBsZXQgb2JqID0ge30sXFxuICAgICAgICAgICAgICAgICAgICAgY29uID0gdi5tYXRjaCgvO1xcXFx7KC4qKVxcXFx9LylbMV0sXFxuICAgICAgICAgICAgICAgICAgICAgYXJyID0gY29uLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICBhcnIuZm9yRWFjaCgoaSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBba2V5LHZhbHVlXSA9IGkuc3BsaXQoJ0AnKTtcXG4gICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWUucmVwbGFjZSgvOy9nLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgYXJyYXlbaW5kZXhdID0gdi5tYXRjaCgvXihbXjtdKik7XFxcXHsvKVsxXVxcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2gob2JqKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgaGVhZGVycy5wdXNoKHsnVXNlci1BZ2VudCcgOiBNT0JJTEVfVUEucmVwbGFjZSgvOy9nLCfvvJvvvJsnKX0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhcnJheVtpbmRleF0gPSBhcnJheVtpbmRleF0ucmVwbGFjZSgvOy9nLC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cXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwi6K+36L6T5YWl55u05pKt5rqQ6K6i6ZiF5Zyw5Z2AXFxcIixcXG4gICAgICAgIHVybDogJCgnJywgJ+ivt+i+k+WFpeiuoumYheWcsOWdgCcpLmlucHV0KChydWxlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kuI3og73kuLrnqbpcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJmaWxlXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJoaWtlclxcXCIpICE9IDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mTvuaOpeagvOW8j+acieivr1xcXCJcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJCgnJywgXFxcIuivt+i+k+WFpeiuoumYheagh+mimFxcXCIpLmlucHV0KCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvSmluZ01lbmc/cnVsZT1cXFwiICsgcnVsZSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IEppbmdNZW5nID0gZ2V0SmluZ01lbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgIEppbmdNZW5nLmRhdGEucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdG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ChcXFwi5a+85Ye65YWo6YOoXFxcIiksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgdXJsOiAkKFtcXFwi5Y6f5aeL5pWw5o2uXFxcIiwgXFxcIuS6keWJqui0tOadv1xcXCJdLCAxKS5zZWxlY3QoKCkgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrprlr7zlh7rvvJ9cXFxcbijnpoHnlKjorqLpmIXkuI3kvJrlr7zlh7opJykuY29uZmlybSgodHlwZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL0ppbmdNZW5nXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICBKaW5nTWVuZyA9IGdldEppbmdNZW5nKCk7XFxuICAgICAgICAgICAgICAgIEppbmdNZW5nLmRhdGEgPSBKaW5nTWVuZy5kYXRhLmZpbHRlcih2ID0+ICF2LmluVmlzaWJsZSk7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlID09IFxcXCLkupHliarotLTmnb9cXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9ICfnlLXop4bnm7Tmkq3liIbkuqsjI1xcXFxuJyArIHNoYXJlUGFzdGUoSlNPTi5zdHJpbmdpZnkoSmluZ01lbmcpKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gSlNPTi5zdHJpbmdpZnkoSmluZ01lbmcpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBkYXRhO1xcbiAgICAgICAgICAgIH0sIGlucHV0KVxcbiAgICAgICAgfSlcXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogZ2V0Q29sb3JlZFRleHQoXFxcIue8lui+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nc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pXFxuICAgIH0pO1xcbiAgICBKaW5nTWVuZy5kYXRhLmZvckVhY2goKHYsIGkpID0+IHtcXG4gICAgICAgIGxldCBlbCA9IHtcXG4gICAgICAgICAgICB0aXRsZTogdi5uYW1lLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIlxcbiAgICAgICAgfVxcbiAgICAgICAgc3dpdGNoIChlZGl0TW9kZSkge1xcbiAgICAgICAgICAgIGNhc2UgJ+WQr+eUqOemgeeUqCc6XFxuICAgICAgICAgICAgICAgIGVsLnRpdGxlID0gKHYuaW5WaXNpYmxlID8gJ/CflLQgJyA6ICfwn5+iICcpICsgZWwudGl0bGVcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9KaW5nTWVuZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIEppbmdNZW5nID0gZ2V0SmluZ01lbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgIEppbmdNZW5nLmRhdGFbaV0uaW5WaXNpYmxlID0gIUppbmdNZW5nLmRhdGFbaV0uaW5WaXNpYmxlO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvSmluZ01lbmcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KEppbmdNZW5nKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn5Yig6Zmk6K6i6ZiFJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gXFxcImNvbmZpcm06Ly/noa7orqTliKDpmaTigJxcXFwiICsgdi5uYW1lICsgXFxcIuKAneiuoumYhe+8ny5qczpcXFwiICsgJC50b1N0cmluZygobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9KaW5nTWVuZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIEppbmdNZW5nID0gZ2V0SmluZ01lbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgIEppbmdNZW5nLmRhdGEgPSBKaW5nTWVuZy5kYXRhLmZpbHRlcihpID0+IGkubmFtZSAhPSBuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL0ppbmdNZW5nLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShKaW5nTWVuZykpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWIoOmZpFxcXCI7XFxuICAgICAgICAgICAgICAgIH0sIHYubmFtZSlcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZWwudGl0bGVcXG4gICAgICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcbiAgICAgICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9KaW5nTWVuZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBKaW5nTWVuZyA9IGdldEppbmdNZW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgSmluZ01lbmcuZGF0YS5zcGxpY2UobmV3SW5kZXgsIDAsIEppbmdNZW5nLmRhdGEuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9KaW5nTWVuZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoSmluZ01lbmcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+keiuoumYhSc6XFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBbJ+e8lui+keWQjeensCcsICfnvJbovpHlnLDlnYAnLCAn57yW6L6R5YaF5a65J107XFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoYXJyLCAzKS5zZWxlY3QoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn57yW6L6R5ZCN56ewJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYubmFtZSwgJ+i+k+WFpeaWsOWQjeensCcpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvSmluZ01lbmdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEppbmdNZW5nID0gZ2V0SmluZ01lbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKaW5nTWVuZy5kYXRhW2ldLm5hbWUgPSBpbnB1dFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvSmluZ01lbmcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KEppbmdNZW5nKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LiN6IO95Li656m6J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHlnLDlnYAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi51cmwsICfovpPlhaXmlrDlnLDlnYAnKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL0ppbmdNZW5nXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKaW5nTWVuZyA9IGdldEppbmdNZW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJmaWxlXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJoaWtlclxcXCIpICE9IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKaW5nTWVuZy5kYXRhW2ldLnVybCA9IGlucHV0XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9KaW5nTWVuZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoSmluZ01lbmcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5YaF5a65Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2LnVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykgfHwgdi51cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9maWxlcycpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nICsgdi51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly9oaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh2LnVybCkgKyAnLmpzJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB2LCBpKTtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSAn5riF6Zmk57yT5a2YJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgn56Gu5a6a5riF6Zmk4oCcJyArIHYubmFtZSArICfigJ3orqLpmIXnvJPlrZjvvJ9cXFxcbijlj6/nq4vljbPmm7TmlrApJykuY29uZmlybSgodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVDYWNoZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a4hemZpOaIkOWKnydcXG4gICAgICAgICAgICAgICAgfSwgdi51cmwpXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKGVsKVxcbiAgICB9KTtcXG4gICAgcmV0dXJuIGQ7XFxufVxcblxcbiQuZXhwb3J0cyA9IHtcXG4gICAgcmVuZGVyU2V0dGluZzogcmVuZGVyU2V0dGluZ1xcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWKoOi9veaVsOaNrlwiLFwicGF0aFwiOlwiSmluZ01lbmdcIixcInJ1bGVcIjpcImZ1bmN0aW9uIGdldEppbmdNZW5nKCkge1xcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IEppbmdNZW5nID0gZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9KaW5nTWVuZy5qc29uXFxcIik7XFxuICAgICAgICBpZiAoIUppbmdNZW5nIHx8IEppbmdNZW5nID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgICAgIHZlcnNpb246IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKEppbmdNZW5nKVxcbiAgICAgICAgfVxcbiAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHRvYXN0KFxcXCLphY3nva7mlofku7bmoLzlvI/mnInor69cXFwiKVxcbiAgICAgICAgfSBjYXRjaCAoZSkge31cXG4gICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgdmVyc2lvbjogMFxcbiAgICAgICAgfVxcbiAgICB9XFxufVwifV0iLCJpY29uIjoiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvODcucG5nIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment