xiaomianao666

小程序:聚直播

Jan 14th, 2023
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@聚直播@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6IGa55u05pKtIiwiYXV0aG9yIjoi5bCP5qOJ6KKE8J+MniZKb2tlciIsInVybCI6Imhpa2VyOi8vZW1wdHkiLCJ2ZXJzaW9uIjoxMCwiY29sX3R5cGUiOiJpY29uXzJfcm91bmQiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImxpdmUiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1wiKSkucnVsZSk7IC8vZ2V0Q29uZmlnXG5cbmxldCBkYXRhID0gW10sXG4gICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XG5jb25maWcuZGF0YSA9IGNvbmZpZy5kYXRhLmZpbHRlcih2ID0+ICF2LmluVmlzaWJsZSk7XG5pZiAoY29uZmlnLmRhdGEubGVuZ3RoIDw9IDApIHtcbiAgICBkYXRhID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcmVuZGVyU2V0dGluZycpLnJlbmRlclNldHRpbmcoKTtcbn0gZWxzZSB7XG4gICAgbGV0IHNlbGVjdCA9IGdldEl0ZW0oXCJsaXZlLXNlbGVjdFwiLCBjb25maWcuZGF0YVswXS5uYW1lKSxcbiAgICAgICAgaGFzID0gY29uZmlnLmRhdGEubWFwKGkgPT4gaS5uYW1lKS5pbmNsdWRlcyhzZWxlY3QpO1xuICAgIGlmICghaGFzKSB7XG4gICAgICAgIHNlbGV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HMuaW5kZXhPZigwKSwgMSlbMF0pO1xuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RHcm91cCA9IGdldEl0ZW0oJ3NlbGVjdEdyb3VwJywgZ3JvdXBzWzBdKTtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0R3JvdXAgPT0gXCJcIiB8fCAhZ3JvdXBzLmluY2x1ZGVzKHNlbGVjdEdyb3VwKSkgc2VsZWN0R3JvdXAgPSBncm91cHNbMF07XG4gICAgICAgICAgICAgICAgZ3JvdXBzLmZvckVhY2goKGdyb3VwKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChncm91cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ3JvdXAgPT0gc2VsZWN0R3JvdXAgPyBcIuKAnOKAnOKAneKAnTxzcGFuIHN0eWxlPSdjb2xvcjogIzE5Qjg5RCc+XCIgKyBncm91cCArIFwiPC9zcGFuPlwiIDogZ3JvdXAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChncm91cCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdzZWxlY3RHcm91cCcsIGdyb3VwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGdyb3VwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGZvciAobGV0IHRpdGxlIGluIGl0ZW1zW3NlbGVjdEdyb3VwXSkge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHNvdXJjZXVybCxzZWxlY3RHcm91cCx0aXRsZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL3JlbmRlckRhdGEnKS5yZW5kZXJMaXZlRGF0YShzb3VyY2V1cmwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdXJscyA9IGl0ZW1zW3NlbGVjdEdyb3VwXVt0aXRsZV0udXJsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzaGVhZGVycyA9IGl0ZW1zW3NlbGVjdEdyb3VwXVt0aXRsZV0uaGVhZGVycztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBncm91cGkgaW4gaXRlbXMpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZ3JvdXAgPSBpdGVtc1tncm91cGldO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighZ3JvdXApIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdGl0bGUgaW4gZ3JvdXApe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRpdGxlID09IHRpdGxlICYmICEhZ3JvdXBbaXRpdGxlXSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSBncm91cFtpdGl0bGVdLnVybDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IGdyb3VwW2l0aXRsZV0uaGVhZGVycztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1cmxzID0gc3VybHMuY29uY2F0KHVybHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hlYWRlcnMgPSBzaGVhZGVycy5jb25jYXQoaGVhZGVycyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VybHMgPSBBcnJheS5mcm9tKG5ldyBTZXQoc3VybHMpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaGVhZGVycyA9IEFycmF5LmZyb20obmV3IFNldChzaGVhZGVycykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IHN1cmxzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBzaGVhZGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICB9LHNvdXJjZS51cmwsc2VsZWN0R3JvdXAsdGl0bGUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9jb2xfdHlwZTogJ3RleHRfMycsXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMjI4LnBuZ1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0V4Y2x1ZGVSdWxlczogW1wiLnBocD9pZD1cIl1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgZGF0YS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwi5pWw5o2u5Yqg6L295aSx6LSlXFxuXCIgKyBKU09OLnN0cmluZ2lmeShlKSxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFwibG9uZ190ZXh0XCJcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cblxufVxuc2V0UmVzdWx0KGRhdGEpOyIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcHR5P2tleT0qKiIsImdyb3VwIjoi5b2x6KeGMSIsInNlYXJjaEZpbmQiOiJqczpcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1wiKSkucnVsZSk7XG5sZXQgY29uZmlnID0gZ2V0Q29uZmlnKCk7XG5sZXQgcnVsZXMgPSBjb25maWcuZGF0YS5tYXAoKHNvdXJjZSkgPT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHRpdGxlOiBzb3VyY2UubmFtZSxcbiAgICAgICAgc2VhcmNoX3VybDogJ2hpa2VyOi8vZW1wdHk/a2V5PSoqJyxcbiAgICAgICAgc2VhcmNoRmluZDogJ2pzOicgKyAkLnRvU3RyaW5nKCh1cmwsIHJ1bGVfdGl0bGUpID0+IHtcbiAgICAgICAgICAgIGxldCBkID0gW10sXG4gICAgICAgICAgICAgICAga2V5ID0gZ2V0UGFyYW0oJ2tleScpO1xuICAgICAgICAgICAgbGV0IGl0ZW1zID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcmVuZGVyRGF0YT9ydWxlPScgKyBydWxlX3RpdGxlKS5yZW5kZXJMaXZlRGF0YSh1cmwpO1xuICAgICAgICAgICAgZm9yIChsZXQgZ3JvdXAgaW4gaXRlbXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCB0aXRsZSBpbiBpdGVtc1tncm91cF0pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRpdGxlLmluZGV4T2Yoa2V5KSA+PSAwIHx8IHRpdGxlLnRvTG93ZXJDYXNlKCkuaW5kZXhPZihrZXkpID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBpdGVtc1tncm91cF1bdGl0bGVdLnVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogaXRlbXNbZ3JvdXBdW3RpdGxlXS5oZWFkZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzZXRSZXN1bHQoZCk7XG4gICAgICAgIH0sIHNvdXJjZS51cmwsIGdldE15VmFyKCd0aXRsZScpKVxuICAgIH07XG59KVxuc2V0UmVzdWx0KFt7XG4gICAgdGl0bGU6IFwi54K55oiR5byA5aeL6IGa5pCcXCIsXG4gICAgdXJsOiBcImhpa2VyOi8vc2VhcmNoP3M9XCIgKyBnZXRQYXJhbShcImtleVwiKSxcbiAgICBleHRyYToge1xuICAgICAgICBydWxlczogJC50b1N0cmluZygocnVsZXMpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShydWxlcylcbiAgICAgICAgfSwgcnVsZXMpXG4gICAgfVxufV0pIiwiZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsImRldGFpbF9maW5kX3J1bGUiOiIiLCJzZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsInNkZXRhaWxfZmluZF9ydWxlIjoiIiwidWEiOiJtb2JpbGUiLCJwcmVSdWxlIjoicHV0TXlWYXIoJ3RpdGxlJyxNWV9SVUxFLnRpdGxlKTsiLCJwYWdlcyI6Ilt7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5Yqg6L295pWw5o2uXCIsXCJwYXRoXCI6XCJjb25maWdcIixcInJ1bGVcIjpcImZ1bmN0aW9uIGdldENvbmZpZygpIHtcXG4gICAgdHJ5IHtcXG4gICAgICAgIGxldCBjb25maWcgPSBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIik7XFxuICAgICAgICBpZiAoIWNvbmZpZyB8fCBjb25maWcgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICBkYXRhOiBbXSxcXG4gICAgICAgICAgICAgICAgdmVyc2lvbjogMFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoY29uZmlnKVxcbiAgICAgICAgfVxcbiAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHRvYXN0KFxcXCLphY3nva7mlofku7bmoLzlvI/mnInor69cXFwiKVxcbiAgICAgICAgfSBjYXRjaCAoZSkge31cXG4gICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgdmVyc2lvbjogMFxc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uaW5jbHVkZXMoJzxib2R5PicpKSB7XFxuICAgICAgICAgICAgbG9nKCfmm7TmlrDlpLHotKUnKTtcXG4gICAgICAgICAgICBpZiAob2xkRGF0YSkgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh1cmwpICsgJy5qcycsIG9sZERhdGEpO1xcbiAgICAgICAgICAgIG0zdSA9IG9sZERhdGE7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIG0zdSA9IHJlbW90ZURhdGE7XFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgbGV0IG1vZGUgPSBtM3UuaW5kZXhPZignI0VYVE0zVScpID09IDAsXFxuICAgICAgICByZTtcXG4gICAgaWYgKG1vZGUpIHtcXG4gICAgICAgIHJlID0gLyguKiksKC4qKVxcXFxzKj8oKD86aHR0cHxydG1wKVteI1xcXFxzXSopL2c7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICByZSA9IC8oKSg/OlxcXFxCXFxcXCRjX3N0YXJ0fFxcXFxCI3sxLDJ9KT8oLio/KSw/KCMjfOWktCN8XFxcXCRjX2VuZHwsPyNnZW5yZSN8KD86aHR0cHxydG1wKVteXFxcXHNdKikvZztcXG4gICAgfVxcblxcbiAgICBsZXQgaXRlbXMgPSB7fSxcXG4gICAgICAgIGdyb3VwID0gJ+acquWIhue7hCc7XFxuICAgIGZvciAobGV0IGkgPSByZS5leGVjKG0zdSk7IGkgIT0gbnVsbDsgaSA9IHJlLmV4ZWMobTN1KSkge1xcbiAgICAgICAgaWYgKG1vZGUpIHtcXG4gICAgICAgICAgICBncm91cCA9IChpWzFdLm1hdGNoKC9ncm91cC10aXRsZT1cXFwiKC4qPylcXFwiLykgfHwgW251bGwsIGdyb3VwXSlbMV07XFxuICAgICAgICB9IGVsc2UgaWYgKFsnI2dlbnJlIycsICcjIycsICflpLQjJywgJyRjX2VuZCddLmluY2x1ZGVzKGlbM10pKSB7XFxuICAgICAgICAgICAgZ3JvdXAgPSBpWzJdO1xcbiAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHRpdGxlID0gaVsyXSxcXG4gICAgICAgICAgICB1cmwgPSBpWzNdLmluY2x1ZGVzKCcjJykgPyBpWzNdLnNwbGl0KCcjJykgOiBbaVszXV0sXFxuICAgICAgICAgICAgaGVhZGVycyA9IFtdO1xcbiAgICAgICAgaWYgKCF1cmxbdXJsLmxlbmd0aCAtIDFdKSB1cmwucG9wKCk7XFxuICAgICAgICB1cmwuZm9yRWFjaCgodiwgaW5kZXgsIGFycmF5KSA9PiB7XFxuICAgICAgICAgICAgaWYgKC87XFxcXHsoLiopXFxcXH0vLnRlc3QodikpIHtcXG4gICAgICAgICAgICAgICAgbGV0IG9iaiA9IHt9LFxcbiAgICAgICAgICAgICAgICAgICAgY29uID0gdi5tYXRjaCgvO1xcXFx7KC4qKVxcXFx9LylbMV0sXFxuICAgICAgICAgICAgICAgICAgICBhcnIgPSBjb24uc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgIGFyci5mb3JFYWNoKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgW2tleSwgdmFsdWVdID0gaS5zcGxpdCgnQCcpO1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZS5yZXBsYWNlKC87L2csICfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgYXJyYXlbaW5kZXhdID0gdi5tYXRjaCgvXihbXjtdKik7XFxcXHsvKVsxXVxcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2gob2JqKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgJ1VzZXItQWdlbnQnOiBNT0JJTEVfVUEucmVwbGFjZSgvOy9nLCAn77yb77ybJylcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChhcnJheVtpbmRleF0uaW5jbHVkZXMoXFxcIi5waHA/aWQ9XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgYXJyYXlbaW5kZXhdID0gXFxcInZpZGVvOi8vXFxcIiArIGFycmF5W2luZGV4XVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IGFycmF5W2luZGV4XS5yZXBsYWNlKC87L2csICfvvJvvvJsnKSArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdKSB7XFxuICAgICAgICAgICAgaWYgKGl0ZW1zW2dyb3VwXVt0aXRsZV0pIHtcXG4gICAgICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXS51cmwgPSBpdGVtc1tncm91cF1bdGl0bGVdLnVybC5jb25jYXQodXJsKTtcXG4gICAgICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXS5oZWFkZXJzID0gaXRlbXNbZ3JvdXBdW3RpdGxlXS5oZWFkZXJzLmNvbmNhdChoZWFkZXJzKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXJzXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBpdGVtc1tncm91cF0gPSB7fTtcXG4gICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdID0ge1xcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVyc1x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W5wdXQoKHJ1bGUpID0+IHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImZpbGVcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImhpa2VyXFxcIikgIT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZO+5o6l5qC85byP5pyJ6K+vXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLCBcXFwi6K+36L6T5YWl6K6i6ZiF5qCH6aKYXFxcIikuaW5wdXQoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWc/cnVsZT1cXFwiICsgcnVsZSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZ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ywgJ+ivt+i+k+WFpeebtOaSrea6kOWQjeensCcpLmlucHV0KChydWxlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kuI3og73kuLrnqbpcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJmaWxlU2VsZWN0Oi8vXFxcIiArICQudG9TdHJpbmcoKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBzID0gaW5wdXQuc3BsaXQoXFxcIi9cXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL2xpdmUvXFxcIiArIG5hbWUgKyBcXFwiLm0zdVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIHZhciBjID0gZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvXFxcIiArIHNbcy5sZW5ndGggLSAxXSlcXG4gICAgICAgICAgICAgICAgICAgIGlmICghYy5pbmNsdWRlcygnaHR0cCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mdnuazleaWh+S7tidcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh1cmwsIGMpXFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZz9ydWxlPeiBmuebtOaSrVxcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2YJ1xcbiAgICAgICAgICAgICAgICB9LCBpbnB1dClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBnZXRDb2xvcmVkVGV4dChcXFwi5YiG5Lqr6K6i6ZiFXFxcIiksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgdXJsOiAkKFtcXFwi5Y6f5aeL5pWw5o2uXFxcIiwgXFxcIuS6keWJqui0tOadv1xcXCIsIFxcXCLkupHlj6Pku6RcXFwiXSwgMykuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a5a+85Ye677yfXFxcXG4o56aB55So6K6i6ZiF5LiN5Lya5a+85Ye6KScpLmNvbmZpcm0oKHR5cGUpID0+IHtcXG4gICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICBjb25maWcuZGF0YSA9IGNvbmZpZy5kYXRhLmZpbHRlcih2ID0+ICF2LmluVmlzaWJsZSk7XFxuICAgICAgICAgICAgICAgIGlmICh0eXBlID09IFxcXCLkupHliarotLTmnb9cXFwiKSB7XFx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kK/nlKjnpoHnlKgnOlxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9ICh2LmluVmlzaWJsZSA/ICfwn5S0ICcgOiAn8J+foiAnKSArIGVsLnRpdGxlXFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5pblZpc2libGUgPSAhY29uZmlnLmRhdGFbaV0uaW5WaXNpYmxlO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICBjYXNlICfliKDpmaTorqLpmIUnOlxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSBcXFwiY29uZmlybTovL+ehruiupOWIoOmZpOKAnFxcXCIgKyB2Lm5hbWUgKyBcXFwi4oCd6K6i6ZiF77yfLmpzOlxcXCIgKyAkLnRvU3RyaW5nKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKGksIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBlbC50aXRsZVxcbiAgICAgICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5zcGxpY2UobmV3SW5kZXgsIDAsIGNvbmZpZy5kYXRhLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+keiuoumYhSc6XFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBbJ+e8lui+keWQjeensCcsICfnvJbovpHlnLDlnYAnLCAn57yW6L6R5YaF5a65J107XFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoYXJyLCAzKS5zZWxlY3QoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn57yW6L6R5ZCN56ewJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYubmFtZSwgJ+i+k+WFpeaWsOWQjeensCcpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5uYW1lID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LiN6IO95Li656m6J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHlnLDlnYAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi51cmwsICfovpPlhaXmlrDlnLDlnYAnKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJmaWxlXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJoaWtlclxcXCIpICE9IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwgPSBpbnB1dFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5YaF5a65Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2LnVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykgfHwgdi51cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9maWxlcycpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nICsgdi51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly9oaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh2LnVybCkgKyAnLmpzJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB2LCBpKTtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSAn5riF6Zmk57yT5a2YJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgn56Gu5a6a5riF6Zmk4oCcJyArIHYubmFtZSArICfigJ3orqLpmIXnvJPlrZjvvJ9cXFxcbijlj6/nq4vljbPmm7TmlrApJykuY29uZmlybSgodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVDYWNoZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a4hemZpOaIkOWKnydcXG4gICAgICAgICAgICAgICAgfSwgdi51cmwpXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKGVsKVxcbiAgICB9KTtcXG4gICAgcmV0dXJuIGQ7XFxufVxcblxcbiQuZXhwb3J0cyA9IHtcXG4gICAgcmVuZGVyU2V0dGluZzogcmVuZGVyU2V0dGluZ1xcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS6keWPo+S7pFwiLFwicGF0aFwiOlwiY2xvdWRcIixcInJ1bGVcIjpcImV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvYmF0Y2h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