xiaomianao666

小程序:轻合集D

Dec 27th, 2021
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@轻合集D@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6L275ZCI6ZuGRCIsImF1dGhvciI6IuWwj+ajieiihPCfjJ4m5rC46L+c44Gu5piO5pelIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjkwLCJjb2xfdHlwZSI6Imljb25fcm91bmRfc21hbGxfNCIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoiYWxsIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG5jb25zdCBRSU5HX1RJVExFID0gZ2V0TXlWYXIoJ215Q29sbGVjdGlvbicpLFxuICAgIG5ld1dpbmRvdyA9IHJlYWRGaWxlKCduZXdXaW5kb3cnKSxcbiAgICB0eXBlU2hvdyA9IGdldE15VmFyKCd0eXBlU2hvdycsICcnKSxcbiAgICB0eXBlcyA9IHsgJyc6ICflhajpg6gnLCAnYWxsJzogJ+iBmuWQiCcsICd2aWRlbyc6ICfop4bpopEnLCAnbXVzaWMnOiAn6Z+z6aKRJywgJ2xpdmUnOiAn55u05pKtJywgJ2NhcnRvb24nOiAn5ryr55S7JywgJ3JlYWQnOiAn6ZiF6K+7JywgJ3BpY3R1cmUnOiAn5Zu+6ZuGJywgJ25ld3MnOiAn6LWE6K6vJywgJ3Rvb2wnOiAn5bel5YW3JywgJ290aGVyJzogJ+WFtuWugycgfVxubGV0IGVsID0gW3tcbiAgICAgICAgdGl0bGU6ICcgJyArIFFJTkdfVElUTEUuYm9sZCgpICsgJyAmbmJzcCAmbmJzcCAnICsgJ+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uICAgICAgICAgICAgeWVhcl9uYW1lOiB2LnllYXJfbmFtZSwgeWVhcl91cmw6IHYueWVhcl91cmwsXG4gICAgICAgICAgICBzb3J0X25hbWU6IHYuc29ydF9uYW1lLCBzb3J0X3VybDogdi5zb3J0X3VybFxuICAgICAgICB9LFxuICAgICAgICBmeXBhZ2UgPSBydWxlVG1wLnVybC5pbmNsdWRlcygnZnlwYWdlJykgPyAnZnlwYWdlJyA6ICcxJyxcbiAgICAgICAgZG9tYWluID0gKC8oaHR0cHM/OlxcL1xcLy4rPykoPzpcXC98JCkvaS5leGVjKHJ1bGVUbXAudXJsKSB8fCBbLCAnaGlrZXI6Ly9lbXB0eSddKVsxXSxcbiAgICAgICAgZCA9IHtcbiAgICAgICAgICAgIHRpdGxlOiB2LnRpdGxlLFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZCcsXG4gICAgICAgICAgICBpbWc6IHYuaWNvbiB8fCAnaGlrZXI6Ly9pbWFnZXMvaWNvbjEnLFxuICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICB1cmw6IGRvbWFpbiArICcvIyMjJyArIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KHJ1bGVUbXApKSxcbiAgICAgICAgICAgICAgICAgICAgcGFnZU51bTogZnlwYWdlLFxuICAgICAgICAgICAgICAgICAgICBRSU5HX1RJVExFOiBnZXRNeVZhcignbXlDb2xsZWN0aW9uJylcbiAgICAgICAgICAgICAgICB9KSArICcuanM6ZXZhbChKU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9wYWdlL3VybFBhcnNl77yf77yfcnVsZT0nICsgUUlOR19USVRMRSArICdcIikpLnJ1bGUp77yb77ybaW5kZXhVcmwoaW5wdXQpOycgKyBwYXJhbUhhbmRsZSh1cmxQYXJhbSwgdi51YSkgKyAnI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5IycsXG4gICAgICAgICAgICAgICAgUlVMRTogdixcbiAgICAgICAgICAgICAgICBpc0luZGV4OiB0cnVlXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICBpZiAobmV3V2luZG93KSBPYmplY3QuYXNzaWduKGQuZXh0cmEsIHtcbiAgICAgICAgbmV3V2luZG93OiB0cnVlLFxuICAgICAgICB3aW5kb3dJZDogUUlOR19USVRMRSArICdfJyArIGQudGl0bGVcbiAgICB9KVxuICAgIGVsLnB1c2goZClcbn0pXG5zZXRSZXN1bHQoZWwpXG4iLCJzZWFyY2hfdXJsIjoiaGlrZXI6Ly9lbXB0eT9rZXl3b3JkPSoqIiwiZ3JvdXAiOiLikaDovbvlkIjpm4YiLCJzZWFyY2hGaW5kIjoianM6XG5zZXRSZXN1bHQoW3tcbiAgICB0aXRsZTogXCLngrnmiJHlvIDlp4vovbvlkIjpm4bigKLop4bnlYzogZrmkJxcIixcbiAgICB1cmw6IFwiaGlrZXI6Ly9zZWFyY2g/cz1cIiArIGdldFBhcmFtKFwia2V5d29yZFwiKSxcbiAgICBleHRyYToge1xuICAgICAgICBydWxlczogJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBRSU5HX1RJVExFID0gZ2V0TXlWYXIoJ215Q29sbGVjdGlvbicpLFxuICAgICAgICAgICAgICAgIHR5cGVTaG93ID0gZ2V0TXlWYXIoJ3R5cGVTaG93JywgJycpXG4gICAgICAgICAgICBsZXQgcnVsZXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9kYXRhTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFKSgpXG4gICAgICAgICAgICBpZiAodHlwZVNob3cpIHJ1bGVzID0gcnVsZXMuZmlsdGVyKCh2KSA9PiB2LnR5cGUgPT0gdHlwZVNob3cpXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkocnVsZXMpXG4gICAgICAgIH0pXG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AgICAgICAgICAgICAgICAgIHRpdGxlOiBzZWxlY3RlZCA9PSBub3cgPyAn4oCc4oCc4oCd4oCdJyArIG5hbWUuZm9udGNvbG9yKHRoaXMuY29sb3IpLmJvbGQoKSA6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHNlbGVjdGVkID09IG5vdyA/ICdoaWtlcjovL2VtcHR5JyA6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNpZ24sIGlkLCBub3cpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoc2lnbiArIGlkLCBub3cpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBpZCwgbm93KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGVsLnB1c2goeyBjb2xfdHlwZTogdGhpcy5ib3VuZGFyeSB9KVxcbiAgICAgICAgfSlcXG4gICAgfSxcXG4gICAgaW5pdChjbGFzc09iamVjdCkge1xcbiAgICAgICAgaWYgKHR5cGVvZiBjbGFzc09iamVjdC5jbGFzc19uYW1lID09ICdzdHJpbmcnKVxcbiAgICAgICAgICAgIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPSBjbGFzc09iamVjdC5jbGFzc19uYW1lLnNwbGl0KCcmJylcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfdXJsID09ICdzdHJpbmcnKVxcbiAgICAgICAgICAgIGNsYXNzT2JqZWN0LmNsYXNzX3VybCA9IGNsYXNzT2JqZWN0LmNsYXNzX3VybC5zcGxpdCgnJicpLm1hcCgodikgPT4gdi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Fyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKS5mb3JFYWNoKCh2LCBpKSA9PiB7XFxuICAgIGxldCBkID0geyB0aXRsZTogdi50aXRsZSwgaW1nOiBkYXRhW2ldLmljb24gfVxcbiAgICBzd2l0Y2ggKGVkaXRNb2RlKSB7XFxuICAgICAgICBjYXNlICflkK/nlKgv56aB55SoJzpcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHYudmlzaWJsZSA/ICfwn5+iICAnIDogJ/CflLQgICcpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJyksXFxuICAgICAgICAgICAgICAgICAgICBpbmRleCA9IHJ1bGVzLmZpbmRJbmRleCgodikgPT4gdi50aXRsZSA9PSBydWxlLnRpdGxlKVxcbiAgICAgICAgICAgICAgICBydWxlc1tpbmRleF0udmlzaWJsZSA9ICFydWxlc1tpbmRleF0udmlzaWJsZVxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCB2KVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgIGQudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+abtOaUueWbvuaghyc6XFxuICAgICAgICAgICAgZC51cmwgPSAkKHYuaWNvbiB8fCAnJywgJ+i+k+WFpeaWsOWbvuagh+WcsOWdgOaIluminOiJsuS7o+egge+8micpLmlucHV0KChydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKSxcXG4gICAgICAgICAgICAgICAgICAgIGluZGV4ID0gcnVsZXMuZmluZEluZGV4KCh2KSA9PiB2LnRpdGxlID09IHJ1bGUudGl0bGUpXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2luZGV4XS5pY29uID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2luZGV4XS5pY29uXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIHYpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+WvvOWFpea1t+mYlCc6XFxuICAgICAgICAgICAgZC51cmwgPSAncnVsZTovLycgKyBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoZGF0YVtpXSkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgfVxcbiAgICBlbC5wdXNoKGQpXFxufSlcXG5zZXRSZXN1bHQoZWwpXFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLpobXpnaLovb3lhaVcIixcInBhdGhcIjpcImZyYW1lTG9hZFwiLFwicnVsZVwiOlwianM6XFxuY29uc3QgUUlOR19USVRMRSA9IGdldE15VmFyKCdteUNvbGxlY3Rpb24nKVxcbmZ1bmN0aW9uIHJ1bkNvZ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uZXh0cmEgfHwge30pLnJ1bGUpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICBsZXQgW18sIHBhdGgsIGZsYWcsIHBhcmFtc10gPSB2LnVybC5tYXRjaCgvXmhpa2VyOlxcXFwvXFxcXC9wYWdlXFxcXC8oLis/KSgjLio/KT8oPzpcXFxcPyguKikpPyQvKSxcXG4gICAgICAgICAgICAgICAgICAgIHN1YlBhZ2UgPSBNWV9SVUxFLnBhZ2VMaXN0LmZpbmQoKHYpID0+IHYucGF0aCA9PSBwYXRoKSxcXG4gICAgICAgICAgICAgICAgICAgIHN1YlVybCA9IChwYXJhbXMgfHwgJycpLnNwbGl0KCcmJykuZmluZCgodikgPT4gdi5zdGFydHNXaXRoKCd1cmw9JykpXFxuICAgICAgICAgICAgICAgIHYudXJsID0gc3ViVXJsID8gc3ViVXJsLnNsaWNlKDQpLnJlcGxhY2UoL++8n++8ny9nLCAnPycpLnJlcGxhY2UoL++8hu+8hi9nLCAnJicpIDogKHYuZXh0cmEgfHwge30pLnVybCB8fCAnaGlrZXI6Ly9lbXB0eScgKyBmbGFnICsgJz8nICsgKHBhcmFtcyB8fCAnJylcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSA9IHN1YlBhZ2UucnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBzdWJQYWdlLmNvbF90eXBlXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLnBhcmFtcyA9IHYuZXh0cmEgfHwge31cXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSB2LnVybC5pbmRleE9mKCcuanM6JylcXG4gICAgICAgICAgICAgICAgaWYgKHJlSW5kZXggPj0gMCkgdi51cmwgPSB2LnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKXtNWV9SVUxFLnBhZ2VzPScgKyBKU09OLnN0cmluZ2lmeShNWV9SVUxFLnBhZ2VzKSArICc7TVlfUlVMRS5wYWdlTGlzdD1KU09OLnBhcnNlKE1ZX1JVTEUucGFnZXMpO30nICsgdi51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0luZGV4KSB7XFxuICAgICAgICAgICAgICAgIGlmICghTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlIHx8IC9oaWtlcjpcXFxcL1xcXFwvKD8hZW1wdHkuKyQpLy50ZXN0KHYudXJsKSkgcmV0dXJuIHZcXG4gICAgICAgICAgICB9IGVsc2UgeyByZXR1cm4gdiB9XFxuICAgICAgICAgICAgdi5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgdXJsOiAoZnVuY3Rpb24odXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwuc3BsaXQoJzsnKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybC5zaGlmdCgpICsgJzsnICsgcGFyYW1IYW5kbGUodXJsLCBNWV9SVUxFLnVhLCBNWV9SVUxFLnVybC5zcGxpdCgnOycpWzJdKVxcbiAgICAgICAgICAgICAgICB9KSh2LnVybCksXFxuICAgICAgICAgICAgICAgIFJVTEU6IE1ZX19SVUxFLFxcbiAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdi50aXRsZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2LnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgfSkpOyQubG9nKG15Q29sbGVjdGlvbl9lbFtteUNvbGxlY3Rpb25fZWwubGVuZ3RoLTF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F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICByZXMgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSwgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogTVlfUlVMRS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxuICAgICAgICAgICAgaWYgKHJlcy51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHJlcy51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcbmlmKE1ZX1JVTEUpe01ZX1JVTEUucGFnZXM9JyArIEpTT04uc3RyaW5naWZ5KE1ZX1JVTEUucGFnZXMpICsgJztNWV9SVUxFLnBhZ2VMaXN0PUpTT04ucGFyc2UoTVlfUlVMRS5wYWdlcyk7fScgKyByZXMudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZGV0YWlsRmluZFJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAoZnVuY3Rpb24odXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsLnNwbGl0KCc7JylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsLnNoaWZ0KCkgKyAnOycgKyBwYXJhbUhhbmRsZSh1cmwsIE1ZX1JVTEUudWEsIE1ZX1JVTEUudXJsLnNwbGl0KCc7JylbMl0pXFxuICAgICAgICAgICAgICAgICAgICB9KSh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogT2JqZWN0LmFzc2lnbih7fSwgTVlfUlVMRSwgeyBkZXRhaWxfZmluZF9ydWxlOiBkZXRhaWxGaW5kUnVsZSB9KSxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAoZnVuY3Rpb24odXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsLnNwbGl0KCc7JylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsLnNoaWZ0KCkgKyAnOycgKyBwYXJhbUhhbmRsZSh1cmwsIE1ZX1JVTEUudWEsIE1ZX1JVTEUudXJsLnNwbGl0KCc7JylbMl0pXFxuICAgICAgICAgICAgICAgICAgICB9KSh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogTVlfUlVMRSxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgbXlDb2xsZWN0aW9uX2VsLnB1c2gocmVzKVxcbiAgICB9KVxcbiAgICBzZXRSZXN1bHQobXlDb2xsZWN0aW9uX2VsKVx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TtcXG4gICAgICAgICAgICBpZiAobW9udGggPj0gMSAmJiBtb250aCA8PSA5KSB7XFxuICAgICAgICAgICAgICAgIG1vbnRoID0gXFxcIjBcXFwiICsgbW9udGhcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHN0ckRhdGUgPj0gMCAmJiBzdHJEYXRlIDw9IDkpIHtcXG4gICAgICAgICAgICAgICAgc3RyRGF0ZSA9IFxcXCIwXFxcIiArIHN0ckRhdGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHN0ckhvdXJzID49IDAgJiYgc3RySG91cnMgPD0gOSkge1xcbiAgICAgICAgICAgICAgICBzdHJIb3VycyA9IFxcXCIwXFxcIiArIHN0ckhvdXJzXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChzdHJNaW51dGVzID49IDAgJiYgc3RyTWludXRlcyA8PSA5KSB7XFxuICAgICAgICAgICAgICAgIHN0ck1pbnV0ZXMgPSBcXFwiMFxcXCIgKyBzdHJNaW51dGVzXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChzdHJTZWNvbmRzID49IDAgJiYgc3RyU2Vjb25kcyA8PSA5KSB7XFxuICAgICAgICAgICAgICAgIHN0clNlY29uZHMgPSBcXFwiMFxcXCIgKyBzdHJTZWNvbmRzXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vbGV0IGN1cnJlbnRkYXRlID0gZGF0ZS5nZXRGdWxsWWVhcigpICsgc2VwZXJhdG9yMSArIG1vbnRoICsgc2VwZXJhdG9yMSArIHN0ckRhdGUgKyBcXFwiIFxcXCIgKyBzdHJIb3VycyArIHNlcGVyYXRvcjIgKyBzdHJNaW51dGVzICsgc2VwZXJhdG9yMiArIHN0clNlY29uZHM7XFxuICAgICAgICAgICAgbGV0IGN1cnJlbnRkYXRlID0gKGRhdGUuZ2V0RnVsbFllYXIoKS0yMDIwKSsnJysgbW9udGggKycnKyBzdHJEYXRlICsnJysgc3RyS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