Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥📂狂飙狂飙狂飙狂飙完结@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuaOqOmAgVwiLFwicGF0aFwiOlwicHVzaFwiLFwicnVsZVwiOlwianM6XFxuLy9sb2coTVlfVVJMKTtcXG52YXIgaXRlbXMgPSBbXTtcXG52YXIgcmVhbHVybCA9IE1ZX1VSTC5zcGxpdCgnIyMnKVsxXS5zcGxpdCgnPz8/JylbMF07XFxuaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi8J+TvSDmjqjpgIHliLBUVkJveCDwn5O6XFxcIixcXG4gICAgICAgIHVybDogJChyZWFsdXJsKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgaW5wdXQgPSBkZWNvZGVVUklDb21wb25lbnQoaW5wdXQpO1xcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3B1c2g/cnVsZT1YWVHmjqjpgIEmcHVzaHVybD0nICsgZW5jb2RlVVJJQ29tcG9uZW50KGlucHV0KTtcXG4gICAgICAgIH0pLFxcbiAgICAgICAgY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yMC9mb3JtYXQsanBlZ1xcXCIsXFxcInZpZGVvX3RodW1ibmFpbF9wcm9jZXNzXFxcIjpcXFwidmlkZW8vc25hcHNob3QsdF8xMDAwLGZfanBnLGFyX2F1dG8sd18zMDBcXFwiLFxcXCJvcmRlcl9ieVxcXCI6XFxcIm5hbWVcXFwiLFxcXCJvcmRlcl9kaXJlY3Rpb25cXFwiOlxcXCJBU0NcXFwiJyArIG5leHQgKyAnfScsXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICB9IC8v5Y+W5paH5Lu25aS5XFxuICAgICAgICAvL2xvZyhyZXNjb2QpO1xcblxcbiAgICAgICAgaWYgKEpTT04ucGFyc2UocmVzY29kKS5uZXh0X21hcmtlcikge1xcbiAgICAgICAgICAgIGxldCBtYXJrZXIgPSBKU09OLnBhcnNlKHJlc2NvZCkubmV4dF9tYXJrZXI7XFxuICAgICAgICAgICAgaWYgKG1hcmtlci5sZW5ndGggPiAxMCkge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignbmV4dHBhZ2UnLCBtYXJrZXIpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ25leHRwYWdlJyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGNvbnRzID0gSlNPTi5wYXJzZShyZXNjb2QpLml0ZW1zO1xcbiAgICAgICAgdmFyIGRvbmd0YWkgPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvbGF6eXVybCcsIHt9KSkucnVsZS50b1N0cmluZygpO1xcbiAgICAgICAgdmFyIHR1aXNvbmcgPSBbXTtcXG4gICAgICAgIGZvciAodmFyIGkgaW4gY29udHMpIHtcXG4gICAgICAgICAgICB2YXIgbGlzdHlwID0gY29udHNbaV0udHlwZTtcXG4gICAgICAgICAgICBpZiAobGlzdHlwICE9ICdmb2xkZXInKSB7XFxuICAgICAgICAgICAgICAgIHZhciBjYXRlID0gY29udHNbaV0uY2F0ZWdvcnk7XFxuICAgICAgICAgICAgICAgIHZhciBmbmFtZSA9IGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgICAgIGlmIChjYXRlID09ICd2aWRlbycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5O6JyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnZG9jJykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/Cfk5YnICsgY29udHNbaV0ubmFtZTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICdpbWFnZScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5a8JyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnemlwJykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/Cfk6YnICsgY29udHNbaV0ubmFtZTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGNvbnRzW2ldLm5hbWVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChjb250c1tpXS5maWxlX2lkKS5sYXp5UnVsZSgoc2hhcmVJZCwgc2hhcmV0b2tlbiwgZG9uZ3RhaSwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ3NpbmdsZXB1c2gnLCAnJykgPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3B1c2g/cnVsZT1YWVHmjqjpgIEmcHVzaHVybD0nICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogZm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwicmVmcmVzaF90b2tlblxcXCI6IHJlZnRva2VuLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInVybFxcXCI6IGZuYW1lLnJlcGxhY2UoL1xcXFwjL2csICdfJykucmVwbGFjZSgvXFxcXCQvZywgJ18nKSArICckJyArIGNhdGUgKyAnfCcgKyBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzaGFyZV9pZFxcXCI6IHNoYXJlSWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZG9uZ3RhaSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwbGF5XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSwgc2hhcmVJZCwgc2hhcmV0b2tlbiwgZG9uZ3RhaSwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGZvcm1hdERhdGUoY29udHNbaV0udXBkYXRlZF9hdCkgKyAnICAnICsgZm9ybWF0U2l6ZShjb250c1tpXS5zaXplKSxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aOqOmAgeWIsFRWQm94JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNoYXJlSWQsIGZpbGVpZCwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9wdXNoP3J1bGU9WFlR5o6o6YCBJnB1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBmbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwicmVmcmVzaF90b2tlblxcXCI6IHJlZnRva2VuLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBmbmFtZS5yZXBsYWNlKC9cXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgZmlsZWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzaGFyZV9pZFxcXCI6IHNoYXJlSWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2hhcmVJZCwgY29udHNbaV0uZmlsZV9pZCwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1dLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBjb250c1tpXS5maWxlX2lkXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBpZiAoY2F0ZSA9PSAndmlkZW8nIHx8IGNhdGUgPT0gJ2F1ZGlvJykge1xcbiAgICAgICAgICAgICAgICAgICAgdHVpc29uZy5wdXNoKFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLnJlcGxhY2UoL1xcXFwjL2csICdfJykucmVwbGFjZSgvXFxcXCQvZywgJ18nKSArICckJyArIGNhdGUgKyAnfCcgKyBjb250c1tpXS5maWxlX2lkXFxuICAgICAgICAgICAgICAgICAgICApO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ/Cfk4InICsgY29udHNbaV0ubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eScgKyBjb250c1tpXS5maWxlX2lkICsgJz8/P2Z5cGFnZScpLnJ1bGUoKHNoYXJlSWQsIHNoYXJldG9rZW4sIHB1c2huYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvcnVsZWxvb3AnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgc2hhcmVJZCwgc2hhcmV0b2tlbiwgY29udHNbaV0ubmFtZSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICB9IC8vZW5kIGlmXFxuICAgICAgICB9IC8vZW5kIGZvciBpXFxuICAgICAgICAvL2xvZyh0dWlzb25nKTtcXG4gICAgICAgIC8vbGV0IHB1c2huYW1lID0gSlNPTi5wYXJzZShyZXNjb2QpLml0ZW1zWzBdLm5hbWU7XFxuICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyO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1BPU1QnXFxuICAgIH0pO1xcbiAgICAvL2xvZyhyZXNjb2QpO1xcbiAgICBpZiAoSlNPTi5wYXJzZShyZXNjb2QpLm5leHRfbWFya2VyKSB7XFxuICAgICAgICBsZXQgbWFya2VyID0gSlNPTi5wYXJzZShyZXNjb2QpLm5leHRfbWFya2VyO1xcbiAgICAgICAgaWYgKG1hcmtlci5sZW5ndGggPiAxMCkge1xcbiAgICAgICAgICAgIHB1dE15VmFyKCduZXh0cGFnZScsIG1hcmtlcik7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGNsZWFyTXlWYXIoJ25leHRwYWdlJyk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgdmFyIGNvbnRzID0gSlNPTi5wYXJzZShyZXNjb2QpLml0ZW1zO1xcbiAgICB2YXIgZG9uZ3RhaSA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9sYXp5dXJsJywge30pKS5ydWxlLnRvU3RyaW5nKCk7XFxuICAgIHZhciB0dWlzb25nID0gW107XFxuICAgIGZvciAodmFyIGkgaW4gY29udHMpIHtcXG5cXG4gICAgICAgIHZhciBsaXN0eXAgPSBjb250c1tpXS50eXBlO1xcbiAgICAgICAgaWYgKGxpc3R5cCAhPSAnZm9sZGVyJykge1xcbiAgICAgICAgICAgIHZhciBjYXRlID0gY29udHNbaV0uY2F0ZWdvcnk7XFxuICAgICAgICAgICAgdmFyIGZuYW1lID0gY29udHNbaV0ubmFtZTtcXG4gICAgICAgICAgICBpZiAoY2F0ZSA9PSAndmlkZW8nKSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5O6JyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICdkb2MnKSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5OWJyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICdpbWFnZScpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/CflrwnICsgY29udHNbaV0ubmFtZTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNhdGUgPT0gJ3ppcCcpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/Cfk6YnICsgY29udHNbaV0ubmFtZTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBjb250c1tpXS5uYW1lXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIHVybDogJChjb250c1tpXS5maWxlX2lkKS5sYXp5UnVsZSgoc2hhcmVJZCwgc2hhcmV0b2tlbiwgZG9uZ3RhaSwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnc2luZ2xlcHVzaCcsICcnKSA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9wdXNoP3J1bGU9WFlR5o6o6YCBJnB1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogZm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJyZWZyZXNoX3Rva2VuXFxcIjogcmVmdG9rZW4sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBmbmFtZS5yZXBsYWNlKC9cXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzaGFyZV9pZFxcXCI6IHNoYXJlSWRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZG9uZ3RhaSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXlcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwgc2hhcmVJZCwgc2hhcmV0b2tlbiwgZG9uZ3RhaSwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogZm9ybWF0RGF0ZShjb250c1tpXS51cGRhdGVkX2F0KSArICcgICcgKyBmb3JtYXRTaXplKGNvbnRzW2ldLnNpemUpLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5o6o6YCB5YiwVFZCb3gnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChzaGFyZUlkLCBmaWxlaWQsIGNhdGUsIGZuYW1lLCByZWZ0b2tlbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9wdXNoP3J1bGU9WFlR5o6o6YCBJnB1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGZuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInJlZnJlc2hfdG9rZW5cXFwiOiByZWZ0b2tlbixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBmbmFtZS5yZXBsYWNlKC9cXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgZmlsZWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNoYXJlX2lkXFxcIjogc2hhcmVJZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2hhcmVJZCwgY29udHNbaV0uZmlsZV9pZCwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKVxcbiAgICAgICAgICAgICAgICAgICAgfV0sXFxuICAgICAgICAgICAgICAgICAgICBpZDogY29udHNbaV0uZmlsZV9pZFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG5cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAoY2F0ZSA9PSAndmlkZW8nIHx8IGNhdGUgPT0gJ2F1ZGlvJykge1xcbiAgICAgICAgICAgICAgICB0dWlzb25nLnB1c2goXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZS5yZXBsYWNlKC9cXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgY29udHNbaV0uZmlsZV9pZFxcbiAgICAgICAgICAgICAgICApO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn8J+TgicgKyBjb250c1tpXS5uYW1lLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHknICsgY29udHNbaV0uZmlsZV9pZCArICc/Pz9meXBhZ2UnKS5ydWxlKChzaGFyZUlkLCBzaGFyZXRva2VuLCBwdXNobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbCh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KU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvbGF6eXVybCcsIHt9KSkucnVsZS50b1N0cmluZygpO1xcXFxuICAgICAgICB2YXIgdHVpc29uZyA9IFtdO1xcXFxuICAgICAgICBmb3IgKHZhciBpIGluIGNvbnRzKSB7XFxcXG4gICAgICAgICAgICB2YXIgbGlzdHlwID0gY29udHNbaV0udHlwZTtcXFxcbiAgICAgICAgICAgIGlmIChsaXN0eXAgIT0gJ2ZvbGRlcicpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgY2F0ZSA9IGNvbnRzW2ldLmNhdGVnb3J5O1xcXFxuICAgICAgICAgICAgICAgIHZhciBmbmFtZSA9IGNvbnRzW2ldLm5hbWU7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGNhdGUgPT0gJ3ZpZGVvJykge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+TuicgKyBjb250c1tpXS5uYW1lO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnZG9jJykge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+TlicgKyBjb250c1tpXS5uYW1lO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnaW1hZ2UnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5a8JyArIGNvbnRzW2ldLm5hbWU7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICd6aXAnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5OmJyArIGNvbnRzW2ldLm5hbWU7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gY29udHNbaV0ubmFtZVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoY29udHNbaV0uZmlsZV9pZCkubGF6eVJ1bGUoKHNoYXJlSWQsIHNoYXJldG9rZW4sIGRvbmd0YWksIGNhdGUsIGZuYW1lLCByZWZ0b2tlbikgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ3NpbmdsZXB1c2gnLCAnJykgPT0gJzEnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIm5hbWVcXFxcXFxcIjogZm5hbWUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicmVmcmVzaF90b2tlblxcXFxcXFwiOiByZWZ0b2tlbixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ1cmxcXFxcXFxcIjogZm5hbWUucmVwbGFjZSgvXFxcXFxcXFwjL2csICdfJykucmVwbGFjZSgvXFxcXFxcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgaW5wdXQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwic2hhcmVfaWRcXFxcXFxcIjogc2hhcmVJZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChkb25ndGFpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxheVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9LCBzaGFyZUlkLCBzaGFyZXRva2VuLCBkb25ndGFpLCBjYXRlLCBmbmFtZSwgcmVmdG9rZW4pLFxcXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBmb3JtYXREYXRlKGNvbnRzW2ldLnVwZGF0ZWRfYXQpICsgJyAgJyArIGZvcm1hdFNpemUoY29udHNbaV0uc2l6ZSksXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmjqjpgIHliLBUVkJveCcsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNoYXJlSWQsIGZpbGVpZCwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3B1c2g/cnVsZT1YWVHmjqjpgIEmcHVzaHVybD0nICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwibmFtZVxcXFxcXFwiOiBmbmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicmVmcmVzaF90b2tlblxcXFxcXFwiOiByZWZ0b2tlbixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidXJsXFxcXFxcXCI6IGZuYW1lLnJlcGxhY2UoL1xcXFxcXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFxcXFxcJC9nLCAnXycpICsgJyQnICsgY2F0ZSArICd8JyArIGZpbGVpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwic2hhcmVfaWRcXFxcXFxcIjogc2hhcmVJZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2hhcmVJZCwgY29udHNbaV0uZmlsZV9pZCwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfV0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogY29udHNbaV0uZmlsZV9pZFxcXFxuICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXFxcblxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIGlmIChjYXRlID09ICd2aWRlbycgfHwgY2F0ZSA9PSAnYXVkaW8nKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHR1aXNvbmcucHVzaChcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLnJlcGxhY2UoL1xcXFxcXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFxcXFxcJC9nLCAnXycpICsgJyQnICsgY2F0ZSArICd8JyArIGNvbnRzW2ldLmZpbGVfaWRcXFxcbiAgICAgICAgICAgICAgICAgICAgKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ/Cfk4InICsgY29udHNbaV0ubmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCdoaWtlcjovL2VtcHR5JyArIGNvbnRzW2ldLmZpbGVfaWQgKyAnPz8/ZnlwYWdlJykucnVsZSgoc2hhcmVJZCwgc2h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A9ICfwn5O6JyArIGNvbnRzW2ldLm5hbWU7XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNhdGUgPT0gJ2RvYycpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+TlicgKyBjb250c1tpXS5uYW1lO1xcXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICdpbWFnZScpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+WvCcgKyBjb250c1tpXS5uYW1lO1xcXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICd6aXAnKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/Cfk6YnICsgY29udHNbaV0ubmFtZTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gY29udHNbaV0ubmFtZVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgIHVybDogJChjb250c1tpXS5maWxlX2lkKS5sYXp5UnVsZSgoc2hhcmVJZCwgc2hhcmV0b2tlbiwgZG9uZ3RhaSwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKCdzaW5nbGVwdXNoJywgJycpID09ICcxJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwibmFtZVxcXFxcXFwiOiBmbmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInJlZnJlc2hfdG9rZW5cXFxcXFxcIjogcmVmdG9rZW4sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ1cmxcXFxcXFxcIjogZm5hbWUucmVwbGFjZSgvXFxcXFxcXFwjL2csICdfJykucmVwbGFjZSgvXFxcXFxcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgaW5wdXQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJzaGFyZV9pZFxcXFxcXFwiOiBzaGFyZUlkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKGRvbmd0YWkpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXlcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0sIHNoYXJlSWQsIHNoYXJldG9rZW4sIGRvbmd0YWksIGNhdGUsIGZuYW1lLCByZWZ0b2tlbiksXFxcXG4gICAgICAgICAgICAgICAgZGVzYzogZm9ybWF0RGF0ZShjb250c1tpXS51cGRhdGVkX2F0KSArICcgICcgKyBmb3JtYXRTaXplKGNvbnRzW2ldLnNpemUpLFxcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5o6o6YCB5YiwVFZCb3gnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNoYXJlSWQsIGZpbGVpZCwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIm5hbWVcXFxcXFxcIjogZm5hbWUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicmVmcmVzaF90b2tlblxcXFxcXFwiOiByZWZ0b2tlbixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ1cmxcXFxcXFxcIjogZm5hbWUucmVwbGFjZSgvXFxcXFxcXFwjL2csICdfJykucmVwbGFjZSgvXFxcXFxcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgZmlsZWlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInNoYXJlX2lkXFxcXFxcXCI6IHNoYXJlSWRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBzaGFyZUlkLCBjb250c1tpXS5maWxlX2lkLCBjYXRlLCBmbmFtZSwgcmVmdG9rZW4pXFxcXG4gICAgICAgICAgICAgICAgICAgIH1dLFxcXFxuICAgICAgICAgICAgICAgICAgICBpZDogY29udHNbaV0uZmlsZV9pZFxcXFxuICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxcXG5cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgaWYgKGNhdGUgPT0gJ3ZpZGVvJyB8fCBjYXRlID09ICdhdWRpbycpIHtcXFxcbiAgICAgICAgICAgICAgICB0dWlzb25nLnB1c2goXFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlLnJlcGxhY2UoL1xcXFxcXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFxcX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