xiaomianao666

小程序:聚直播

Oct 21st, 2024
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@聚直播@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6IuiBmuebtOaSrSIsImF1dGhvciI6IuWwj+ajieiihPCfjJ4mSm9rZXIiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6MTAsImNvbF90eXBlIjoiaWNvbl8yX3JvdW5kIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJsaXZlIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG5ldmFsKEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vcGFnZS9jb25maWdcIikpLnJ1bGUpOyAvL2dldENvbmZpZ1xuXG5sZXQgZGF0YSA9IFtdLFxuICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xuY29uZmlnLmRhdGEgPSBjb25maWcuZGF0YS5maWx0ZXIodiA9PiAhdi5pblZpc2libGUpO1xuXG5pZiAoY29uZmlnLmRhdGEubGVuZ3RoIDw9IDApIHtcbiAgICBkYXRhID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcmVuZGVyU2V0dGluZycpLnJlbmRlclNldHRpbmcoKTtcbn0gZWxzZSB7XG4gICAgbGV0IHNlbGVjdCA9IGdldEl0ZW0oXCJsaXZlLXNlbGVjdFwiLCBjb25maWcuZGF0YVswXS5uYW1lKSxcbiAgICAgICAgaGFzID0gY29uZmlnLmRhdGEubWFwKGkgPT4gaS5uYW1lKS5pbmNsdWRlcyhzZWxlY3QpO1xuICAgIGlmICgha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H1cbiAgICAgICB9KVxuICAgICAgIHNldFByZVJlc3VsdChkYXRhKTtcbiAgICAgICBkYXRhID0gW107XG4gICAgfVxuXG4gICAgZm9yIChzb3VyY2Ugb2YgY29uZmlnLmRhdGEpIHtcbiAgICAgICAgaWYgKHNvdXJjZS5uYW1lID09IHNlbGVjdCkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9yZW5kZXJEYXRhJykucmVuZGVyTGl2ZURhdGEoc291cmNlLnVybCxzb3VyY2UudWEpO1xuICAgICAgICAgICAgICAgIGxldCBncm91cHMgPSBPYmplY3Qua2V5cyhpdGVtcyk7XG4gICAgICAgICAgICAgICAgLy9ncm91cHMucHVzaChncm91cHMuc3BsaWNlKGdyb3Vwcy5pbmRleE9mKDApLCAxKVswXSk7XG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdEdyb3VwID0gZ2V0SXRlbSgnc2VsZWN0R3JvdXAnLCBncm91cHNbMF0pO1xuICAgICAgICAgICAgICAgIGlmIChzZWxlY3RHcm91cCA9PSBcIlwiIHx8ICFncm91cHMuaW5jbHVkZXMoc2VsZWN0R3JvdXApKSBzZWxlY3RHcm91cCA9IGdyb3Vwc1swXTtcbiAgICAgICAgICAgICAgICBncm91cHMuZm9yRWFjaCgoZ3JvdXApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdyb3VwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBncm91cCA9PSBzZWxlY3RHcm91cCA/IFwi4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9J2NvbG9yOiAjMTlCODlEJz5cIiArIGdyb3VwICsgXCI8L3NwYW4+XCIgOiBncm91cCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGdyb3VwKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3NlbGVjdEdyb3VwJywgZ3JvdXApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgZ3JvdXApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgdGl0bGUgaW4gaXRlbXNbc2VsZWN0R3JvdXBdKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoc291cmNldXJsLHNlbGVjdEdyb3VwLHRpdGxlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1zID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcmVuZGVyRGF0YScpLnJlbmRlckxpdmVEYXRhKHNvdXJjZXVybCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN1cmxzID0gaXRlbXNbc2VsZWN0R3JvdXBdW3RpdGxlXS51cmw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNoZWFkZXJzID0gaXRlbXNbc2VsZWN0R3JvdXBdW3RpdGxlXS5oZWFkZXJzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGdyb3VwaSBpbiBpdGVtcyl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBncm91cCA9IGl0ZW1zW2dyb3VwaV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFncm91cCkgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0aXRsZSBpbiBncm91cCl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGl0bGUgPT0gdGl0bGUgJiYgISFncm91cFtpdGl0bGVdKXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IGdyb3VwW2l0aXRsZV0udXJsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0gZ3JvdXBbaXRpdGxlXS5oZWFkZXJzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VybHMgPSBzdXJscy5jb25jYXQodXJscyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaGVhZGVycyA9IHNoZWFkZXJzLmNvbmNhdChoZWFkZXJzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdXJscyA9IEFycmF5LmZyb20obmV3IFNldChzdXJscykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoZWFkZXJzID0gQXJyYXkuZnJvbShuZXcgU2V0KHNoZWFkZXJzKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogc3VybHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHNoZWFkZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sc291cmNlLnVybCxzZWxlY3RHcm91cCx0aXRsZSksXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2NvbF90eXBlOiAndGV4dF8zJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogXCJodHRwczovL2hpa2VyZmFucy5jb20vdHViaWFvL21vcmUvMjI4LnBuZ1wiXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIuaVsOaNruWKoOi9veWksei0pVxcblwiICsgSlNPTi5zdHJpbmdpZnkoZSksXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcImxvbmdfdGV4dFwiXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuICAgIGRlbGV0ZUl0ZW1CeUNscyhcImxvYWRpbmdfZ2lmXCIpO1xufVxuc2V0UmVzdWx0KGRhdGEpOyIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcHR5P2tleT0qKiIsImdyb3VwIjoi4pGl55u05pKtIiwic2VhcmNoRmluZCI6ImpzOlxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL3BhZ2UvY29uZmlnXCIpKS5ydWxlKTtcbmxldCBjb25maWcgPSBnZXRDb25maWcoKTtcbmxldCBydWxlcyA9IGNvbmZpZy5kYXRhLm1hcCgoc291cmNlKSA9PiB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgdGl0bGU6IHNvdXJjZS5uYW1lLFxuICAgICAgICBzZWFyY2hfdXJsOiAnaGlrZXI6Ly9lbXB0eT9rZXk9KionLFxuICAgICAgICBzZWFyY2hGaW5kOiAnanM6JyArICQudG9TdHJpbmcoKHVybCwgcnVsZV90aXRsZSkgPT4ge1xuICAgICAgICAgICAgbGV0IGQgPSBbXSxcbiAgICAgICAgICAgICAgICBrZXkgPSBnZXRQYXJhbSgna2V5Jyk7XG4gICAgICAgICAgICBsZXQgaXRlbXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9yZW5kZXJEYXRhP3J1bGU9JyArIHJ1bGVfdGl0bGUpLnJlbmRlckxpdmVEYXRhKHVybCk7XG4gICAgICAgICAgICBmb3IgKGxldCBncm91cCBpbiBpdGVtcykge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IHRpdGxlIGluIGl0ZW1zW2dyb3VwXSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGl0bGUuaW5kZXhPZihrZXkpID49IDAgfHwgdGl0bGUudG9Mb3dlckNhc2UoKS5pbmRleE9mKGtleSkgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IGl0ZW1zW2dyb3VwXVt0aXRsZV0udXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfVxu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ktCN8XFxcXCRjX2VuZHwsPyNnZW5yZSN8KD86aHR0cHxydG1wKVteXFxcXHNdKikvZztcXG4gICAgfVxcbiAgICAgICAgXFxuICAgIGxldCBpdGVtcyA9IHt9LFxcbiAgICAgICAgZ3JvdXAgPSAn5pyq5YiG57uEJztcXG4gICAgZm9yIChsZXQgaSA9IHJlLmV4ZWMobTN1KTsgaSAhPSBudWxsOyBpID0gcmUuZXhlYyhtM3UpKSB7XFxuICAgICAgICBpZiAobW9kZSkge1xcbiAgICAgICAgICAgIGdyb3VwID0gKGlbMV0ubWF0Y2goL2dyb3VwLXRpdGxlPVxcXCIoLio/KVxcXCIvKSB8fCBbbnVsbCwgZ3JvdXBdKVsxXTtcXG4gICAgICAgIH0gZWxzZSBpZiAoWycjZ2VucmUjJywnIyMnLCflpLQjJywnJGNfZW5kJ10uaW5jbHVkZXMoaVszXSkpIHtcXG4gICAgICAgICAgICBncm91cCA9IGlbMl07XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0bGUgPSBpWzJdLFxcbiAgICAgICAgICAgIHVybCA9IGlbM10uaW5jbHVkZXMoJyMnKSA/IGlbM10uc3BsaXQoJyMnKSA6IFtpWzNdXSxcXG4gICAgICAgICAgICBoZWFkZXJzID0gW107XFxuICAgICAgICBpZighdXJsW3VybC5sZW5ndGgtMV0pIHVybC5wb3AoKTtcXG4gICAgICAgIHVybC5mb3JFYWNoKCh2LGluZGV4LGFycmF5KT0+e1xcbiAgICAgICAgICAgIGlmKC87XFxcXHsoLiopXFxcXH0vLnRlc3Qodikpe1xcbiAgICAgICAgICAgICAgICBsZXQgb2JqID0ge30sXFxuICAgICAgICAgICAgICAgICAgICAgY29uID0gdi5tYXRjaCgvO1xcXFx7KC4qKVxcXFx9LylbMV0sXFxuICAgICAgICAgICAgICAgICAgICAgYXJyID0gY29uLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICBhcnIuZm9yRWFjaCgoaSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBba2V5LHZhbHVlXSA9IGkuc3BsaXQoJ0AnKTtcXG4gICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWUucmVwbGFjZSgvOy9nLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgYXJyYXlbaW5kZXhdID0gdi5tYXRjaCgvXihbXjtdKik7XFxcXHsvKVsxXVxcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2gob2JqKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgaGVhZGVycy5wdXNoKHsnVXNlci1BZ2VudCcgOiBNT0JJTEVfVUEucmVwbGFjZSgvOy9nLCfvvJvvvJsnKX0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhcnJheVtpbmRleF0gPSBhcnJheVtpbmRleF0ucmVwbGFjZSgvOy9nLCfvvJvvvJsnKSsnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgfSk7XFxuICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdKSB7XFxuICAgICAgICAgICAgaWYgKGl0ZW1zW2dyb3VwXVt0aXRsZV0pIHtcXG4gICAgICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXS51cmwgPSBpdGVtc1tncm91cF1bdGl0bGVdLnVybC5jb25jYXQodXJsKTtcXG4gICAgICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXS5oZWFkZXJzID0gaXRlbXNbZ3JvdXBdW3RpdGxlXS5oZWFkZXJzLmNvbmNhdChoZWFkZXJzKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdID0ge3VybDp1cmwsaGVhZGVyczpoZWFkZXJzfTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGl0ZW1z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6T5YWl55u05pKt5rqQ6K6i6ZiF5Zyw5Z2AXFxcIixcXG4gICAgICAgIHVybDogJCgnJywgJ+ivt+i+k+WFpeiuoumYheWcsOWdgFxcXFxu5Y+v5Lul5Zyo5Zyw5Z2A5ZCO5YqgdWFcXFxcbijkvb/nlKgkJCTliIblibIpJykuaW5wdXQoKHJ1bGUpID0+IHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImZpbGVcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImhpa2VyXFxcIikgIT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZO+5o6l5qC85byP5pyJ6K+vXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGxldCBbdXJsLHVhXSA9IGlucHV0LnNwbGl0KCckJCQnKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoJycsIFxcXCLor7fovpPlhaXorqLpmIXmoIfpophcXFwiKS5pbnB1dCgodXJsLCBydWxlLHVhKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZz9ydWxlPVxcXCIgKyBydWxlKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6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AgICAgIH0sIGdldE15VmFyKCd0aXRsZScpKVxcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBnZXRDb2xvcmVkVGV4dChcXFwi5a+85YWl5pys5Zyw5rqQXFxcIiksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgZGVzYzogXFxcIuivt+i+k+WFpeebtOaSrea6kOWQjeensFxcXCIsXFxuICAgICAgICB1cmw6ICQoJycsICfor7fovpPlhaXnm7Tmkq3mupDlkI3np7AnKS5pbnB1dCgocnVsZSkgPT4ge1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5LiN6IO95Li656m6XFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiZmlsZVNlbGVjdDovL1xcXCIgKyAkLnRvU3RyaW5nKChuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcyA9IGlucHV0LnNwbGl0KFxcXCIvXFxcIilcXG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9saXZlL1xcXCIgKyBuYW1lICsgXFxcIi5tM3VcXFwiXFxuICAgICAgICAgICAgICAgICAgICB2YXIgYyA9IGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL1xcXCIgKyBzW3MubGVuZ3RoIC0gMV0pXFxuICAgICAgICAgICAgICAgICAgICBpZiAoIWMuaW5jbHVkZXMoJ2h0dHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pnZ7ms5Xmlofku7YnXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodXJsLCBjKVxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWc/cnVsZT3ogZrnm7Tmkq1cXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmCdcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogZ2V0Q29sb3JlZFRleHQoXFxcIuWIhuS6q+iuoumYhVxcXCIpLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgIHVybDogJChbXFxcIuWOn+Wni+aVsOaNrlxcXCIsIFxcXCLkupHliarotLTmnb9cXFwiLCBcXFwi5LqR5Y+j5LukXFxcIl0sIDMpLnNlbGVjdCgoKSA9PiB7XFxuICAgICAgICAgICAgcmV0dXJuICQoJ+ehruWumuWvvOWHuu+8n1xcXFxuKOemgeeUqOiuoumYheS4jeS8muWvvOWHuiknKS5jb25maXJtKCh0eXBlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgY29uZmlnLmRhdGEgPSBjb25maWcuZGF0YS5maWx0ZXIodiA9PiAhdi5pblZpc2libGUpO1xcbiAgICAgICAgICAgICAgICBpZiAodHlwZSA9PSBcXFwi5LqR5Ymq6LS05p2/XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSAn6IGa55u05pKt5YiG5LqrIyNcXFxcbicgKyBzaGFyZVBhc3RlKEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT0gXFxcIuS6keWPo+S7pFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gJ+iBmuebtOaSreWIhuS6qyzlpI3liLblkI7miZPlvIDova/ku7bljbPlj6/lr7zlhaVcXFxcbicgKyBzaGFyZVBhc3RlKEpTT04uc3RyaW5naWZ5KGNvbmZpZykpICsgJ0BpbXBvcnQ9anM6ZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL3BhZ2UvY2xvdWQ/cnVsZT3ogZrnm7Tmkq1cXFwiKSkucnVsZSknO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBKU09OLnN0cmluZ2lmeShjb25maWcpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBkYXRhO1xcbiAgICAgICAgICAgIH0sIGlucHV0KVxcbiAgICAgICAgfSlcXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogZ2V0Q29sb3JlZFRleHQoXFxcIue8lui+keWFqOm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9idXR0b24nXFxuICAgICAgICB9KVxcbiAgICB9KTtcXG4gICAgY29uZmlnLmRhdGEuZm9yRWFjaCgodiwgaSkgPT4ge1xcbiAgICAgICAgbGV0IGVsID0ge1xcbiAgICAgICAgICAgIHRpdGxlOiB2Lm5hbWUsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiXFxuICAgICAgICB9XFxuICAgICAgICBzd2l0Y2ggKGVkaXRNb2RlKSB7XFxuICAgICAgICAgICAgY2FzZSAn5ZCv55So56aB55SoJzpcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAodi5pblZpc2libGUgPyAn8J+UtCAnIDogJ/Cfn6IgJykgKyBlbC50aXRsZVxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uaW5WaXNpYmxlID0gIWNvbmZpZy5kYXRhW2ldLmluVmlzaWJsZTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn5Yig6Zmk6K6i6ZiFJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gXFxcImNvbmZpcm06Ly/noa7orqTliKDpmaTigJxcXFwiICsgdi5uYW1lICsgXFxcIuKAneiuoumYhe+8ny5qczpcXFwiICsgJC50b1N0cmluZygoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZShpLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZWwudGl0bGVcXG4gICAgICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcbiAgICAgICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKG5ld0luZGV4LCAwLCBjb25maWcuZGF0YS5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICBjYXNlICfnvJbovpHorqLpmIUnOlxcbiAgICAgICAgICAgICAgICBsZXQgYXJyID0gWyfnvJbovpHlkI3np7AnLCAn57yW6L6R5Zyw5Z2AJywgJ+e8lui+keWGheWuuSddO1xcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKGFyciwgMykuc2VsZWN0KCh2LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gJ+e8lui+keWQjeensCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh2Lm5hbWUsICfovpPlhaXmlrDlkI3np7AnKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0ubmFtZSA9IGlucHV0XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+u5pS55oiQ5YqfJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S4jeiDveS4uuepuidcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5Zyw5Z2AJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYudWEgPyB2LnVybCArICckJCQnICsgdi51YSA6IHYudXJsLCAn6L6T5YWl5paw5Zyw5Z2AJykuaW5wdXQoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kuI3og73kuLrnqbpcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuaW5kZXhPZihcXFwiaHR0cFxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFwiZmlsZVxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFwiaGlrZXJcXFwiKSAhPSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZO+5o6l5qC85byP5pyJ6K+vXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IFt1cmwsdWFdID0gaW5wdXQuc3BsaXQoJyQkJCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udXJsID0gdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udWEgPSB1YTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+e8lui+keWGheWuuScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodi51cmwuc3RhcnRzV2l0aCgnZmlsZTovLycpIHx8IHYudXJsLnN0YXJ0c1dpdGgoJ2hpa2VyOi8vZmlsZXMnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJyArIHYudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vaGlrZXI6Ly9maWxlcy9saWJzLycgKyBtZDUodi51cmwpICsgJy5qcydcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwgdiwgaSk7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIGNhc2UgJ+a4hemZpOe8k+WtmCc6XFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJ+ehruWumua4hemZpOKAnCcgKyB2Lm5hbWUgKyAn4oCd6K6i6ZiF57yT5a2Y77yfXFxcXG4o5Y+v56uL5Y2z5pu05pawKScpLmNvbmZpcm0oKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICA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