Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥搜索页@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS+nei1llwiLFwicGF0aFwiOlwiZGF0YVwiLFwicnVsZVwiOlwianM6XFxuJC5leHBvcnRzLmRlY3J5cHQgPSBmdW5jdGlvbigpIHtcXG4gICAgY29uc3QgQ3J5cHRvVXRpbCA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9hc3NldHMvY3J5cHRvLWphdmEuanNcXFwiKTtcXG4gICAgY29uc3Qga2V5ID0gQ3J5cHRvVXRpbC5EYXRhLnBhcnNlVVRGOCgnZjVkOTY1ZGY3NTMzNjI3MCcpO1xcbiAgICBjb25zdCBpdiA9IENyeXB0b1V0aWwuRGF0YS5wYXJzZVVURjgoJzk3YjYwMzk0YWJjMmZiZTEnKTtcXG4gICAgY29uc3QgdGV4dERhdGEgPSBDcnlwdG9VdGlsLkRhdGEucGFyc2VJbnB1dFN0cmVhbShpbnB1dCkudG9CYXNlNjQoX2Jhc2U2NC5OT19XUkFQKTtcXG4gICAgY29uc3QgZGVjcnlwdGVkID0gQ3J5cHRvVXRpbC5BRVMuZGVjcnlwdCh0ZXh0RGF0YSwga2V5LCB7XF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MDAnKSArICc+JyArIGQgKyAnPC9mb250Pjwvc3Ryb25nPic7XFxufVxcblxcbmZ1bmN0aW9uIENhdGVnb3J5KGxpc3QsIG1vZGUsIGQpIHtcXG4gICAgZm9yICh2YXIgaSBpbiBsaXN0KSB7XFxuICAgICAgICB2YXIgTGlzdCA9IGxpc3RbaV07XFxuICAgICAgICB2YXIgdGl0bGUgPSBMaXN0LnRpdGxlO1xcbiAgICAgICAgdmFyIFRpdGxlID0gKGdldE15VmFyKCdjb2xvcicsICctMScpID09IGkpID8gc3Ryb25nKHRpdGxlLCAnRkY2Njk5JykgOiB0aXRsZTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFRpdGxlLFxcbiAgICAgICAgICAgIHVybDogJChMaXN0LnR5cGUpLmxhenlSdWxlKChpLCBtb2RlLCBMaXN0KSA9PiB7XFxuICAgICAgICAgICAgICAgIGlmIChtb2RlID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCd0eXBlJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3R5cGVTJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPT0gMikge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3R5cGVTUycsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignY29sb3InLCBpKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICB9LCBpLCBtb2RlLCBMaXN0KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snLFxcbiAgICB9KTtcXG4gICAgcmV0dXJuIGQ7XFxufVxcblxcbmZ1bmN0aW9uIGNhdGVnb3J5KGxpc3QsIGQpIHtcXG4gICAgaWYgKGdldEl0ZW0oJ3N3aXRjaCcsICdvZmYnKSA9PSAnb24nKSB7XFxuICAgICAgICBmb3IgKHZhciBpIGluIGxpc3QpIHtcXG4gICAgICAgICAgICB2YXIgTGlzdCA9IGxpc3RbaV07XFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gTGlzdC5uYW1lO1xcbiAgICAgICAgICAgIHZhciBUaXRsZSA9IChnZXRNeVZhcignQ29sb3InLCAnLTEnKSA9PSBpKSA/IHN0cm9uZyh0aXRsZSwgJ0ZGNjY5OScpIDogdGl0bGU7XFxuICAgICAgICAgICAgaWYgKExpc3QuaWQgPT0gJzYnIHx8IExpc3QuaWQgPT0gJzInKSB7XFxuXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChMaXN0LmlkID09ICc0JyB8fCBMaXN0LmlkID09ICc3Jykge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKExpc3QuaWQpLmxhenlSdWxlKChpLCBMaXN0KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lkJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdDb2xvcicsIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvdHlwZTE/ZnlwYWdlJztcXG4gICAgICAgICAgICAgICAgICAgIH0sIGksIExpc3QpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKExpc3QuaWQpLmxhenlSdWxlKChpLCBMaXN0KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lkJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdDb2xvcicsIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvdHlwZTI/ZnlwYWdlJztcXG4gICAgICAgICAgICAgICAgICAgIH0sIGksIExpc3QpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgLypkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfwn5SSJyxcXG4gICAgICAgIHVybDogJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIHB1dE15VmFyKCdvbi1vZmYnLCAnb2ZmJylcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxuICAgIH0pOyovXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogKGdldEl0ZW0oJ3N3aXRjaCcsICdvZmYnKSA9PSAnb2ZmJykgPyAn8J+TgScgOiAn8J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gICAgICAgIH0pO1xcbiAgICAgICAgZm9yICh2YXIgaiBpbiBsaXN0KSB7XFxuICAgICAgICAgICAgdmFyIHBsYXl1cmwgPSBsaXN0W2pdLnBsYXlVcmw7XFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtqXS50aXRsZTtcXG4gICAgICAgICAgICB2YXIgZGVzYyA9ICdcXFxcdPCflKUnICsgbGlzdFtqXS5wbGF5X2NvdW50O1xcbiAgICAgICAgICAgIHZhciBpbWFnZXVybCA9IGxpc3Rbal0udGh1bWJJbWc7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxcbiAgICAgICAgICAgICAgICBpbWc6IGltYWdldXJsICsgaW1hZ2UsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBwbGF5dXJsLnJlcGxhY2UoJzEwcGxheScsICdsb25nJylcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdiaWdfYmxhbmtfYmxvY2snLFxcbiAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICB9KTtcXG4gICAgfVxcbn1cXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLikaHpobXpnaIt55So5oi3LeW4luWtkOWIl+ihqFwiLFwicGF0aFwiOlwibmV3c1wiLFwicnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG52YXIgcGFnZSA9IE1ZX1BBR0U7XFxudmFyIG1vZCA9IE1ZX1BBUkFNUy5tb2Q7XFxudmFyIGNvZGUgPSBNWV9QQVJBTVMuY29kZTtcXG52YXIgY29sX3R5cGUgPSBNWV9QQV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AgZm9yICh2YXIgaSBpbiBsaXN0KSB7XFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS50aXRsZTtcXG4gICAgICAgICAgICB2YXIgcGxheVVybCA9IGxpc3RbaV0ucGxheVVybDtcXG4gICAgICAgICAgICB2YXIgbmlja05hbWUgPSBsaXN0W2ldLm5pY2tOYW1lO1xcbiAgICAgICAgICAgIHZhciB1dWlkID0gbGlzdFtpXS51dWlkO1xcbiAgICAgICAgICAgIHZhciBkZXNjID0gJ/CflKUnICsgbGlzdFtpXS5wbGF5X2NvdW50ICsgJ1xcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdOKPse+4jycgKyBsaXN0W2ldLmR1cmF0aW9uU3RyO1xcbiAgICAgICAgICAgIHZhciBpbWFnZXVybCA9IGxpc3RbaV0udGh1bWJJbWc7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxcbiAgICAgICAgICAgICAgICBpbWc6IGltYWdldXJsICsgaW1hZ2UsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAoc3RvcmFnZTAuZ2V0SXRlbSgnQ29sMicsICcnKSA9PSAnJykgPyAnbW92aWVfMicgOiBzdG9yYWdlMC5nZXRJdGVtKCdDb2wyJywgJycpLFxcbiAgICAgICAgICAgICAgICB1cmw6IHBsYXlVcmwucmVwbGFjZSgnMTBwbGF5JywgJ2xvbmcnKSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazogZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9sb25nQ2xpY2syJykpLnJ1bGUpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAg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GVbaV07XFxuICAgICAgICB9XFxuICAgICAgICBzaG93U2VsZWN0T3B0aW9ucyh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLpgInmi6nnsbvlnotcXFwiLFxcbiAgICAgICAgICAgIGNvbDogMixcXG4gICAgICAgICAgICBvcHRpb25zOiBUeXBlMSxcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oJ3R5cGUnLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgIHZhciBjb2wgPSBzdG9yYWdlMC5nZXRJdGVtKCd0eXBlJywgJycpO1xcbiAgICAgICAgICAgICAgICB2YXIgQ29sID0gKGNvbC5pbmNsdWRlcygn8J+RifCfj70nKSkgPyBjb2wuc3BsaXQoJ/CfkYnwn4+9JylbMV0gOiBjb2w7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oJ0NvbDInLCBDb2wpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgfSksXFxufSwge1xcbiAgICB0aXRsZTogJ+aQnOe0oicsXFxuICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3NlYXJjaCc7XFxuICAgIH0pLFxcbn0se1xcbiAgICB0aXRsZTogJ+mmlumhtScsXFxuICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICB9KSxcXG59LCB7XFxuICAgIHRpdGxlOiAn56ysJyArIE1ZX1BBR0UgKyAn6aG1JyxcXG4gICAganM6ICQudG9TdHJpbmcoKCkgP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15VmFyKCd0eXBlUycsIGlucHV0KTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPT0gMikge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigndHlwZVNTJywgaW5wdXQpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignY29sb3InLCBpKTtcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxcXG4gICAgICAgICAgICB9LCBpLCBtb2RlLCBMaXN0KSxcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxcXG4gICAgICAgIH0pO1xcXFxuICAgIH1cXFxcbiAgICBkLnB1c2goe1xcXFxuICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJyxcXFxcbiAgICB9KTtcXFxcbiAgICByZXR1cm4gZDtcXFxcbn1cXFxcblxcXFxuZnVuY3Rpb24gY2F0ZWdvcnkobGlzdCwgZCkge1xcXFxuICAgIGlmIChnZXRJdGVtKCdzd2l0Y2gnLCAnb2ZmJykgPT0gJ29uJykge1xcXFxuICAgICAgICBmb3IgKHZhciBpIGluIGxpc3QpIHtcXFxcbiAgICAgICAgICAgIHZhciBMaXN0ID0gbGlzdFtpXTtcXFxcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IExpc3QubmFtZTtcXFxcbiAgICAgICAgICAgIHZhciBUaXRsZSA9IChnZXRNeVZhcignQ29sb3InLCAnLTEnKSA9PSBpKSA/IHN0cm9uZyh0aXRsZSwgJ0ZGNjY5OScpIDogdGl0bGU7XFxcXG4gICAgICAgICAgICBpZiAoTGlzdC5pZCA9PSAnNicgfHwgTGlzdC5pZCA9PSAnMicpIHtcXFxcblxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChMaXN0LmlkID09ICc0JyB8fCBMaXN0LmlkID09ICc3Jykge1xcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBUaXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKExpc3QuaWQpLmxhenlSdWxlKChpLCBMaXN0KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaWQnLCBpbnB1dCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignQ29sb3InLCBpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS90eXBlMT9meXBhZ2UnO1xcXFxuICAgICAgICAgICAgICAgICAgICB9LCBpLCBMaXN0KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogVGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChMaXN0LmlkKS5sYXp5UnVsZSgoaSwgTGlzdCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lkJywgaW5wdXQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ0NvbG9yJywgaSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvdHlwZTI/ZnlwYWdlJztcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgaSwgTGlzdCksXFxcXG4gICAgICAgICAgIC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iAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgaWQ6IGlkLFxcXFxuICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogdGl0bGVcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSk7XFxcXG4gICAgICAgIGZvciAodmFyIGkgaW4gbGlzdCkge1xcXFxuICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS50aXRsZTtcXFxcbiAgICAgICAgICAgIHZhciBwbGF5VXJsID0gbGlzdFtpXS5wbGF5VXJsO1xcXFxuICAgICAgICAgICAgdmFyIG5pY2tOYW1lID0gbGlzdFtpXS5uaWNrTmFtZTtcXFxcbiAgICAgICAgICAgIHZhciB1dWlkID0gbGlzdFtpXS51dWlkO1xcXFxuICAgICAgICAgICAgdmFyIGRlc2MgPSAn8J+UpScgKyBsaXN0W2ldLnBsYXlfY291bnQgKyAnXFxcXFxcXFx0XFxcXFxcXFx0XFxcXFxcXFx0XFxcXFxcXFx0XFxcXFxcXFx0XFxcXFxcXFx04o+x77iPJyArIGxpc3RbaV0uZHVyYXRpb25TdHI7XFxcXG4gICAgICAgICAgICB2YXIgaW1hZ2V1cmwgPSBsaXN0W2ldLnRodW1iSW1nO1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzYyxcXFxcbiAgICAgICAgICAgICAgICBpbWc6IGltYWdldXJsICsgaW1hZ2UsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IChzdG9yYWdlMC5nZXRJdGVtKCdDb2wyJywgJycpID09ICcnKSA/ICdtb3ZpZV8yJyA6IHN0b3JhZ2UwLmdldEl0ZW0oJ0NvbDInLCAnJyksXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBwbGF5VXJsLnJlcGxhY2UoJzEwcGxheScsICdsb25nJyksXFxcXG4gICAgICAgICAgICA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4+9JyArIFR5cGVbaV07XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIFR5cGVbaV0gPSBUeXBlW2ldO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgVHlwZTFbaV0gPSBUeXBlW2ldO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHNob3dTZWxlY3RPcHRpb25zKHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIumAieaLqeexu+Wei1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgY29sOiAyLFxcXFxuICAgICAgICAgICAgb3B0aW9uczogVHlwZTEsXFxcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgndHlwZScsIGlucHV0KTtcXFxcbiAgICAgICAgICAgICAgICB2YXIgY29sID0gc3RvcmFnZTAuZ2V0SXRlbSgndHlwZScsICcnKTtcXFxcbiAgICAgICAgICAgICAgICB2YXIgQ29sID0gKGNvbC5pbmNsdWRlcygn8J+RifCfj70nKSkgPyBjb2wuc3BsaXQoJ/CfkYnwn4+9JylbMV0gOiBjb2w7XFxcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgnQ29sX21lZGlhJywgQ29sKTtcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfSk7XFxcXG4gICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgIH0pfSx7XFxcXG4gICAgdGl0bGU6ICfmkJzntKInLFxcXFxuICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2Uvc2VhcmNoJztcXFxcbiAgICB9KSxcXFxcbn0se1xcXFxuICAgIHRpdGxlOiA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sID0gKGNvbC5pbmNsdWRlcygn8J+RifCfj70nKSkgPyBjb2wuc3BsaXQoJ/CfkYnwn4+9JylbMV0gOiBjb2w7XFxcXG4gICAgICAgICAgICBpZiAoVHlwZVtpXSA9PSBDb2wpIHtcXFxcbiAgICAgICAgICAgICAgICBUeXBlW2ldID0gJ/CfkYnwn4+9JyArIFR5cGVbaV07XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIFR5cGVbaV0gPSBUeXBlW2ldO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgVHlwZTFbaV0gPSBUeXBlW2ldO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHNob3dTZWxlY3RPcHRpb25zKHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIumAieaLqeexu+Wei1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgY29sOiAyLFxcXFxuICAgICAgICAgICAgb3B0aW9uczogVHlwZTEsXFxcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgndHlwZScsIGlucHV0KTtcXFxcbiAgICAgICAgICAgICAgICB2YXIgY29sID0gc3RvcmFnZTAuZ2V0SXRlbSgndHlwZScsICcnKTtcXFxcbiAgICAgICAgICAgICAgICB2YXIgQ29sID0gKGNvbC5pbmNsdWRlcygn8J+RifCfj70nKSkgPyBjb2wuc3BsaXQoJ/CfkYnwn4+9JylbMV0gOiBjb2w7XFxcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgnQ29sX3RleHQnLCBDb2wpO1xcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICB9KTtcXFxcbiAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gIC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vdFRvcGljc19kZXRhaWwnLFxcXFxuICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgaWQ6IGlkLFxcXFxuICAgICAgICAgICAgcGFnZVRpdGxlOiBcXFxcXFxcIuivpuaDhVxcXFxcXFwiXFxcXG4gICAgICAgIH1cXFxcbiAgICB9KTtcXFxcbn1cXFxcbn1cXFxcbnNldFJlc3VsdChkKTtcXFwifV1cIixcInByb3h5XCI6XCJcIn0iLCJ0aXRsZSI6IuaQnOe0oumhtSJ9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement