Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@网飞.TV@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi572R6aOeLlRWIiwiYXV0aG9yIjoiemV0YWxwaGEiLCJ1cmwiOiJoaWtlcjovL2VtcHR5I2Z5cGFnZSMjIiwidmVyc2lvbiI6MSwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXVxuXG5hZGRMaXN0ZW5lcignb25DbG9zZScsICgpID0+IHtcbiAgICAvL2xvZygn6aG16Z2i5YWz6ZetJylcbiAgICBzdG9yYWdlMC5wdXRNeVZhcignd2VlaycsIG5ldyBEYXRlKCkuZ2V0RGF5KCkpXG4gICAgc3RvcmFnZTAucHV0TXlWYXIoJ2knLCAxKVxufSlcblxuYWRkTGlzdGVuZXIoJ29uUmVmcmVzaCcsICgpID0+IHtcbiAgICAvL2xvZygncmVmcmVzaCcpXG4gICAgLy8gc3RvcmFnZTAucHV0TXlWYXIoJ2knLCAxKVxufSlcblxuLy9NWV9VUkwgPSBNWV9VUkwuc3BsaXQoJyMjJylbMV1cbnZhciB0aXRsZXMgPSBbJ+mmlumhtScsICfnrZvpgIknLCAn5o6S6KGMJywgJ+WRqOihqCcsICfmkJzntKInXVxuXG5cbnZhciB0aW5kZXggPSBzdG9yYWdlMC5nZXRNeVZhcigndGluZGV4JywgMClcblxuLy9jbGVhck15VmFyKCfpppbpobUnKVxudmFyIGluZGV4ID0gZ2V0TXlWYXIoJ+mmlumhtScsIGNvbmZpZy7pppbpobUpXG5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gICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXG4gICAgICAgIH0pXG4gICAgfVxuXG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6IHRpdGxlc1swXSxcbiAgICAgICAgaW1nOiAnaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvNDcucG5nQFJlZmVyZXI9JyxcbiAgICAgICAgY29sX3R5cGU6ICdpY29uXzUnLFxuICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgIHB1dFZhcignaG9tZS51cmwnLCBnZXRNeVZhcign6aaW6aG1JywgY29uZmlnLummlumhtSkpXG4gICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcigndGluZGV4JywgMClcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgfSksXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XG4gICAgICAgICAgICAgICAgdGl0bGU6ICflvLrliLbmm7TmlrAnLFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxvY2RhdGU9J2hpa2VyOi8vZmlsZXMvcnVsZXMvemV0YWxwaGEvZGF0ZS5qcydcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGxvY2RhdGUsICcnKTtcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5a6M5oiQJ1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XVxuICAgICAgICB9XG5cbiAgICB9KVxuXG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6IHRpdGxlc1sxXSxcbiAgICAgICAgaW1nOiAnaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMTA0LnBuZ0BSZWZlcmVyPScsXG4gICAgICAgIGNvbF90eXBlOiAnaWNvbl81JyxcbiAgICAgICAgdXJsOiAkKCcnKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcigndGluZGV4JywgMSlcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgfSlcbiAgICB9KVxuXG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6IHRpdGxlc1syXSxcbiAgICAgICAgaW1nOiAnaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvNzQucG5nQFJlZmVyZXI9JyxcbiAgICAgICAgY29sX3R5cGU6ICdpY29uXzUnLFxuICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCd0aW5kZXgnLCAyKVxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICB9KVxuICAgIH0pXG5cbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogdGl0bGVzWzNdLFxuICAgICAgICBpbWc6ICdodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW9yZS8xMDcucG5nQFJlZmVyZXI9JyxcbiAgICAgICAgY29sX3R5cGU6ICdpY29uXzUnLFxuICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCd0aW5kZXgnLCAzKVxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICA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ucHVzaCh7XFxuICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgIHVybDogdXJsXFxuICAgIH0pXFxuXFxuICAgIGlmIChzaG93ID09ICflsZXlvIAnKSB7XFxuICAgICAgICB2YXIgZGF5ID0gbmV3IERhdGUoKS5nZXREYXkoKVxcbiAgICAgICAgdmFyIHdlZWsgPSBnZXRNeVZhcignd2VlaycsIGRheSArICcnKVxcbiAgICAgICAgd2UgPSDnpLzmi5xbd2Vla11cXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwg56S85oucLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHdlZWsgPT0gaSA/ICfigJzigJzigJ3igJ0nICsgZGF5bmlnaHQgKyBgPGZvbnQgY29sb3I9XFxcIiR7d2NvbG9yfVxcXCI+PGI+YCArIHdzdHIgKyB3ZSArICc8L2I+PC9mb250PicgOiDnpLzmi5xbaV0sXFxuICAgICAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoaXQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ3ZWVrXFxcIiwgTnVtYmVyKGl0KSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgaSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogJ3dlZWsnICsgaSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCIsXFxuICAgICAgICAgICAgcGljOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogXFxcImdvb2RcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG5cXG4gICAgICAgIGRhdGFbd2Vla10uZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgIHZhciB0ID0gZXZhbChzZWxlY3QudGl0bGUpXFxuICAgICAgICAgICAgdmFyIHMgPSBldmFsKHNlbGVjdC5kZXNjKVxcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IHRcXG4gICAgICAgICAgICBpZiAoc2VsZWN0LmNvbF90eXBlID09ICd0ZXh0XzEnKSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlID0gYOKAnOKAnOKAneKAnTxzbWFsbD5bPGZvbnQgY29sb3I9XFxcIiM5OTlcXFwiPiR7c308L2ZvbnQ+XSR7dH08L3NtYWxsPmBcXG4gICAgICAgICAgICAgICAgcyA9ICcnXFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBldmFsKHNlbGVjdC51cmwpICsgJyNpbW1lcnNpdmVUaGVtZSMnLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBzLFxcbiAgICAgICAgICAgICAgICBpbWc6IGV2YWwoc2VsZWN0LmltZykgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IHNlbGVjdC5jb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcb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AgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdncmF5Jz7msqHlhoXlrrk8Zm9udD5cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgIH0pXFxuICAgIH1cXG5cXG4gICAgbGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgdmFyIGltZyA9IGV2YWwoaW1neClcXG4gICAgICAgIC8vbG9nKGl0ZW0pXFxuICAgICAgICB2YXIgYXJyID0ge1xcbiAgICAgICAgICAgIHRpdGxlOiBldmFsKHRpdGxlKSxcXG4gICAgICAgICAgICBkZXNjOiBldmFsKGRlc2MpLFxcbiAgICAgICAgICAgIC8vaW1nOiAoaW1nLmVuZHNXaXRoKCcwJykgPyBpbWcgKyAnLycgOiBpbWcpICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgaW1nOiBpbWcgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICB1cmw6IGV2YWwodXJsKSArICcjaW1tZXJzaXZlVGhlbWUjJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogY29sX3R5cGUsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGV2YWwodGl0bGUpLFxcbiAgICAgICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgc3RhdGU6IGV2YWwoZGVzYyksXFxuXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGR5Yykge1xcbiAgICAgICAgICAgIGlmIChpaSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGFyci5leHRyYS5pZCA9ICd2aWRlbzEnXFxuICAgICAgICAgICAgICAgIGQucHVzaChhcnIpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGFyci5leHRyYS5pZCA9ICd2aWRlbzInXFxuICAgICAgICAgICAgYWRkSXRlbUFmdGVyKCd2aWRlbzEnLCBhcnIpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBkLnB1c2goYXJyKVxcbiAgICAgICAgfVxcbiAgICB9KVxcbiAgICBpZiAobGluZSkge1xcbiAgICAgICAgaSsrXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdhbGluZScgKyBpLnRvU3RyaW5nKClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgcHV0TXlWYXIoJ2knLCBpKVxcbiAgICB9XFxufVxcblxcbmZ1bmN0aW9uIGp1bXBNb3JlKGQsIGh0bWwsIG9iaiwgZm9sZCkge1xcbiAgICB2YXIgZiA9IDBcXG4gICAgaWYgKGZvbGQgIT0gdW5kZWZpbmVkKSB7XFxuICAgICAgICBmID0gZm9sZFxcbiAgICB9XFxuICAgIHZhciBuYW1lID0gb2JqLm5hbWVcXG4gICAgdmFyIHRpdGxlID0gb2JqLnRpdGxlXFxuICAgIHZhciBpbWcgPSBvYmouaW1nXFxuICAgIHZhciB1cmwgPSBvYmoudXJsXFxuICAgIHZhciBzZWxlcyA9IG9iai5zZWxlc1xcbiAgICBzZWxlcy5saXN0ID0gb2JqLm5saXN0XFxuXFxuICAgIGlmIChuYW1lICE9IHVuZGVmaW5lZCkge1xcblxcbiAgICAgICAgbGV0IGRtID0gMDtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIHZhciBiID0gKG5ldyBSZWdFeHAoYF4ke25hbWV9JGApLnRlc3QoZFtpXS50aXRsZSkpXFxuICAgICAgICAgICAgaWYgKGIpIHtcXG4gICAgICAgICAgICAgICAgZG0gPSBpO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICA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Qua2V5cyhzdG9yYWdlMC5nZXRJdGVtKCdzY29uZmlnJyx7fSkpLmxlbmd0aCE9MCl7XFxuICAgICAgICBjb25maWc9c3RvcmFnZTAuZ2V0SXRlbSgnc2NvbmZpZycpXFxuICAgIH1cXG5cXG4gICAgaWYgKG5hbWUgIT0gdW5kZWZpbmVkKSB7XFxuXFxuICAgICAgICBsZXQgZG0gPSAwO1xcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgdmFyIGIgPSAobmV3IFJlZ0V4cChgXiR7bmFtZX0kYCkudGVzdChkW2ldLnRpdGxlKSlcXG4gICAgICAgICAgICBpZiAoYikge1xcbiAgICAgICAgICAgICAgICBkbSA9IGk7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHVybCA9IGRbZG1dLnVybFxcblxcbiAgICB9XFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5riF56m65pWw5o2uJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKFxcXCJzaWxkZWRhdGFcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lrozmiJAnXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSlcXG5cXG4gICAgaWYg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ldmFsKHVybCk7XFxuICAgICAgICAgICAgICAgIG9iai50aXRsZSA9IGV2YWwodGl0bGUpO1xcbiAgICAgICAgICAgICAgICBvYmoudXJsID0gdXJseDtcXG4gICAgICAgICAgICAgICAgb2JqLmRlc2MgPSBldmFsKGRlc2MpO1xcbiAgICAgICAgICAgICAgICBpZiAoZGNvdmVyKSB7XFxuICAgICAgICAgICAgICAgICAgICBvYmouY292ZXIgPSBwZGZoKHJlcXVlc3QodXJseCksIGRpbWcpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBvYmouY292ZXIgPSBldmFsKGltZ3gpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBvYmo7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKFxcXCJzaWxkZWRhdGFcXFwiLCBpdGVtcyk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgZGF0YSA9IE9iamVjdC5hc3NpZ24oe30sIHtcXG4gICAgICAgICAgICBkYXRhOiBpdGVtc1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIGNvbmZpZzpjb25maWdcXG4gICAgICAgIH0pXFxuICAgICAgICByLnNob3coZGF0YSwgZClcXG4gICAgfVxcbn1cXG5cXG5mdW5jdGlvbiB0YWJsaXN0KGQsIGh0bWwsIG9iaikge1xcblxcbiAgICB2YXIgdGxpc3QgPSBvYmoudGxpc3RcXG4gICAgdmFyIHRvYmogPSBvYmoudG9ialxcbiAgICB2YXIga2V5ID0gb2JqLnRrZXlcXG4gICAgdmFyIHRpdGxlID0gb2JqLnRpdGxlXFxuICAgIHZhciBpbWcgPSBvYmouaW1nXFxuICAgIHZhciB1cmwgPSBvYmoudXJsXFxuICAgIHZhciBzZWxlcyA9IG9iai5zZWxlc1xcbiAgICB2YXIgY29sPW9iai5jb2xcXG5cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpd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gICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKChpLCB0LCBrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB0W2tdID0gaVxcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ3RvYmonLCB0KVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIGksIHRvYmosIGtleSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG5cXG4gICAgYXBwZWREYXRhKGQsIGh0bWwsIHNlbGVzKVxcbn1cXG5cXG5cXG5mdW5jdGlvbiByYW5rQWRkKGQsIGh0bWwsIG9iaikge1xcbiAgICB2YXIgbmFtZSA9IG9iai5uYW1lXFxuICAgIHZhciB0aXRsZSA9IG9iai50aXRsZVxcbiAgICB2YXIgaW1nID0gb2JqLmltZ1xcbiAgICB2YXIgdXJsID0gb2JqLnVybFxcbiAgICB2YXIgc2VsZXMgPSBvYmouc2VsZXNcXG4gICAgc2VsZXMubGlzdCA9IG9iai5ubGlzdFxcbiAgICBzZWxlcy50aXRsZSA9IG9iai5udGl0bGVcXG4gICAgc2VsZXMuZGVzYyA9IG9iai5uZGVzY1xcblxcbiAgICAvKmQucHVzaCh7XFxuICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgIHVybDogdXJsXFxuICAgIH0pKi9cXG5cXG4gICAgdmFyIGxpc3QgPSBldmFsKHNlbGVzLmxpc3QpXFxuXFxuICAgIGxpc3QubWFwKChpdGVtLCBpKSA9PiB7XFxuICAgICAgICBpID0gaSArIDFcXG4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0aXRsZSA9IGDigJzigJzigJ3igJ08c21hbGw+PGZvbnQgY29sb3I9XFxcIlxcXCI+JHt0aXRsZX08L2ZvbnQ+ICR7ZGVzY308L3NtYWxsPmBcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBgJHt0aXRsZX1gLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBzZWxlcy5jb2xfdHlwZSxcXG4gICAgICAgICAgICB1cmw6IGV2YWwoc2VsZXMudXJsKSArICcjaW1tZXJzaXZlVGhlbWUjJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IHN0aXRsZSxcXG4gICAgICAgICAgICAgICAgc3RhdGU6ZGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9KVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuaJqeWxleWHveaVsFwiLFwicGF0aFwiOlwiZXh0ZW5kXCIsXCJydWxlXCI6XCIvL3VybOino+aekFxcbmZ1bmN0aW9uIHVybFBhcnNlKHUpIHtcXG4gICAgdmFyIGRpY3QgPSB7fVxcbiAgICBkaWN0LlNvdXJjZSA9IHU7XFxuICAgIGxldCBwYXJhbXMgPSAodXJsKSA9PiB7XFxuICAgICAgICBsZXQgcXVlcnlQYXJhbXMgPSB7fTtcXG4gICAgICAgIGxldCByZWcgPSAvKFtePz0mXSspPShbXj89Jl0rKS9nO1xcbiAgICAgICAgdXJsLnJlcGxhY2UocmVnLCBmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICBxdWVyeVBhcmFtc1thcmd1bWVudHNbMV1dID0gYXJndW1lbnRzWzJdO1xcbiAgICAgICAgfSlcXG4gICAgICAgIHJldHVybiBxdWVyeVBhcmFtc1xcbiAgICB9XFxuICAgIHZhciBqYXZhVXJsID0gSmF2YUltcG9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2dvLmNuL2h5X3BlcnNvbmFsLzNlMjhmMTRhYTA1MTY4NDIzZTM3MDEwODYzNzQ4NDMxNjMyOTcwZDA3MDNmYzc1ZDllNzAxYmQxMTdiMmE5ZGIvMC5naWYnXFxuICAgICAgICAgICAgICAgIG5hbWVzW2ldPScnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9XFxuXFxuICAgIGlmIChwaWMgPT0gJ+a1t+aKpeW8gCcpIHtcXG4gICAgICAgIHZhciB0aW1ncyA9IFsnaW1nMCcsICdpbWcxJywgJ2ltZzInXVxcbiAgICAgICAgdGltZ3MubWFwKCh4LCBpKSA9PiB7XFxuICAgICAgICAgICAgYXJyLnB1c2goe1xcbiAgICAgICAgICAgICAgICBpbWc6IGltZ3NbaV0sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncGljXzMnLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IHhcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIjBcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3NlYXJjaD9zPScgKyBuYW1lc1tpXSArICcmcnVsZT0nICsgcnVsZV9uYW1lLFxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIGFyci5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi8J+UjVxcXCIsXFxuICAgICAgICB1cmw6ICdcXFwiaGlrZXI6Ly9zZWFyY2g/cz1cXFwiICsgaW5wdXQgKyBcXFwiJnJ1bGU9XFxcIitNWV9SVUxFLnRpdGxlICcsXFxuICAgICAgICBkZXNjOiBcXFwi5pCc54K55LuA5LmILi4uXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBvbkNoYW5nZTogJC50b1N0cmluZygocnVsZV9uYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBzdWcgPSBjb25maWcuc3VnIHx8IFtdO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIHN1Zykge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbShzdWdbaV0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAnJykgZGVsZXRlSXRlbUJ5Q2xzKFxcXCIjc1xcXCIpO1xcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn5riF6Zmk5pCc57Si6K6w5b2VJykgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL2NhY2hlL+aQnOe0ouiusOW9lS5qc29uJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaW5pdENvbmZpZyh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3VnOiBbaW5wdXRdXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGh0dHAuZmV0Y2goYGh0dHBzOi8vbS5kb3ViYW4uY29tL3NlYXJjaC8/cXVlcnk9JHtpbnB1dH0mdHlwZT0xMDAyYCwge30pLnN1Y2Nlc3MoZGF0YSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgZ2cgPSBKU09OLnBhcnNlKGRhdGEuc3BsaXQoJ2ZuXFxcXCgnKVsxXS5yZXBsYWNlKCdcXFxcfVxcXFwpJywgJ1xcXFx9JykpLml0ZW07XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBwZGZhKGRhdGEsICdib2R5JiYuc2VhcmNoLW1vZHVsZSYmbGkmJmE6bm90KFtocmVmKj1cXFwiamF2YXNjcmlwdFxcXCJdKScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGdnID0gbGlzdC5tYXAoeCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IHBkZmgoeCwgJy5zdWJqZWN0LXRpdGxlJiZUZXh0JylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGltZyA9IHBkZmgoeCwgJ2ltZyYmc3JjJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdvcmQ6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGM6IGltZ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyhnZylcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ+W7uuiuruaVsOaNricsIGdnKVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZCA9IGdnLnNsaWNlKDAsIDMpXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRkLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbShydWxlX25hbWUgKyAn5bu66K6u5rW35oqlJywgZGQubWFwKHggPT4geC5kYykpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0ocnVsZV9uYW1lICsgJ+W7uuiurueJh+WQjScsIGRkLm1hcCh4ID0+IHgud29yZCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZC5tYXAoKHgsIGkpID0+IHtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ2ltZycgKyBpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiB4LmRjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vc2VhcmNoP3M9JyArIHgud29yZCArICcmcnVsZT0nICsgcnVsZV9uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAnaW1nJyArIGlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pLmVycm9yKG1zZyA9PiBsb2cobXNnLnRvU3RyaW5nKCkpKS5zdGFydChsb2coMikpXFxuICAgICAgICAgICAgICAgICAgICB2YXIgZ2cgPSBKU09OLnBhcnNlKGdldFZhcign5bu66K6u5pWw5o2uJykpO1xcbiAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoXFxcIiNzXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGdnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5uID0gZ2dbaV0ud29yZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoXFxcIjEyaW5wdXRcXFwiLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBubixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChubiwgcnVsZV9uYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbG9jYWxEYXRhID0gcmVxdWVzdCgnaGlrZXI6Ly9maWxlcy9jYWNoZS/mkJzntKLorrDlvZUuanNvbicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWxvY2FsRGF0YSkgbG9jYWxEYXRhID0gXFxcIltdXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaXNoaSA9IEpTT04ucGFyc2UobG9jYWxEYXRhKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNjYyA9IGxpc2hpLmluZGV4T2Yobm4pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNjYyA+IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzaGkuc3BsaWNlKGNjYywgMSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXNoaS5wdXNoKG5uKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc2hpID0gbGlzaGkuc2xpY2UoLTMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL2NhY2hlL+aQnOe0ouiusOW9lS5qc29uJywgSlNPTi5zdHJpbmdpZnkobGlzaGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9zZWFyY2g/cz0nICsgbm4gKyAnJnJ1bGU9JyArIHJ1bGVfbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBubiwgcnVsZV9uYW1lKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGlucHV0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFwiI3NcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIC8v6buY6K6kXFxuICAgICAgICAgICAgICAgICAgICBsZXQgbG9jYWxEYXRhID0gcmVxdWVzdCgnaGlrZXI6Ly9maWxlcy9jYWNoZS/mkJzntKLorrDlvZUuanNvbicpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFsb2NhbERhdGEpIGxvY2FsRGF0YSA9IFxcXCJbXVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbGlzaGkgPSBKU09OLnBhcnNlKGxvY2FsRGF0YSkuc2xpY2UoLTMpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLnN1ZyA9IGxpc2hpO1xcbiAgICAgICAgICAgICAgICAgICAgaW5pdENvbmZpZyh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3VnOiBjb25maWcuc3VnXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIGNvbmZpZy5zdWcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoXFxcIjEyaW5wdXRcXFwiLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBg4oCc4oCc4oCd4oCdPHNtYWxsPiR7aXR9PC9zbWFsbD5gLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3NlYXJjaD9zPScgKyBpdCArICcmcnVsZT0nICsgcnVsZV9uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfM1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogaXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXCIjc1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSwgcnVsZV9uYW1lKSxcXG4gICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgIGlkOiBcXFwiMTJpbnB1dFxcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgMTA7IGkrKykge1xcbiAgICAgICAgYXJyLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIC8vc2V0UmVzdWx0KGQpXFxufVxcblxcbmlmIChNWV9QQUdFID09IDEpIHtcXG4gICAg5pCc57Si5bu66K6uKGQsICfmtbfmiqXlvIAnKVxcbn1cXG5cXG52YXIgdXBodG1sID0gJC5nZXRyZXMoZ2V0TXlWYXIoJ+mmlumhtScsIGNvbmZpZy7pppbpobUpKydsYWJlbC9uZXcuaHRtbCcpXFxuXFxuZC5wdXNoKHtcXG4gICAgY29sX3R5cGU6J2F2YXRhcicsXFxuICAgIHRpdGxlOmA8Zm9udCBjb2xvcj1cXFwiIzgwODA4MFxcXCI+5aSn5a626YO95Zyo5pCcPC9mb250PmAsXFxuICAgIGltZzonaHR0cHM6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IH0gZWxzZSB7XFxuXFxuICAgICAgICAgICAgICAgIGlmIChvYmouaGFzT3duUHJvcGVydHkoXFxcInJ1bGVcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9iai5ydWxlLmluZGV4T2YoJ2NvcHknKSE9LTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwi5bey57uP5aSN5Yi26K+35a+85YWl6KeE5YiZXFxcIilcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmoucnVsZVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+WuieijhVxcXCIgKyBvYmoubmFtZSArIFxcXCLlsI/nqIvluo9cXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgb2JqLCBcXFwiaGlrZXI6Ly9ob21lXFxcIiwgdGl0bGUpLFxcbiAgICAgICAgcGljX3VybDogb2JqLnBpYyxcXG4gICAgICAgIGNvbF90eXBlOiBqc29uLnF1aWNrU2VhcmNoQ29uZmlncy5tb2RlLFxcbiAgICAgICAgZXh0cmE6e2lkOidxc2VhcmNoJ31cXG4gICAgfSlcXG59XFxuXFxuXFxuLyogICAgJCgpLmxhenlSdWxlKChvYmosIGhvbWUsIHRpdGxlKSA9PiB7XFxuICAgICAgICBsZXQgcnVsZUxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoaG9tZSkpO1xcbiAgICAgICAgbGV0IGhhc1J1bGUgPSBydWxlTGlzdC5zb21lKGl0ZW0gPT4gaXRlbS50aXRsZSA9PT0gb2JqLm5hbWUpO1xcbiAgICAgICAgaWYgKGhhc1J1bGUpIHtcXG5cXG4gICAgICAgICAgICAvL3RvYXN0KFxcXCLor7fphY3nva7lv6vpgJ/mkJzntKJcXFwiKVxcbiAgICAgICAgICAgIHJldHV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ICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB2YXIgeDVoID0gJzE5MCYmbGlzdCdcXG4gICAgICAgICAgICBpZiAoISFkYXRhLmNvbmZpZykge1xcbiAgICAgICAgICAgICAgICB4NWggPSBkYXRhLmNvbmZpZy54NWggPyBkYXRhLmNvbmZpZy54NWggKyAnJiZsaXN0JyA6IHg1aDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgYXJyLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJyxcXG4gICAgICAgICAgICAgICAgdXJsOiBnZXRQYXRoKHNsaWRlZmlsZSksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHg1aFxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBwdXRWYXIoJ3NsaWRlcnVsZScsIE1ZX1JVTEUpXFxuICAgICAgICBwdXRWYXIoJ3NsaWRlZGF0YScsIGRhdGEpXFxuICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKCdzY29uZmlnJywgZGF0YS5jb25maWcpO1xcbiAgICB9XFxufVxcblxcbnZhciBtb2RlID0gZ2V0UGFyYW0oJ21vZGUnKTtcXG52YXIgZCA9IFtdO1xcblxcbmlmIChtb2RlID09ICdzZXQnKSB7XFxuICAgIGFkZExpc3RlbmVyKCdvbkNsb3NlJywgKCk9PntcXG4gICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICB9KVxcblxcbiAgICAvL+m7mOiupFxcbiAgICB2YXIgc2NvbmZpZyA9IHtcXG4gICAgICAgIG5ld1c6IGZhbHNlLCAvL+aWsOeql+WPo+aJk+W8gFxcbiAgICAgICAgbWFyazogXFxcIiNpb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AgICAgcmV0dXJuICQoYWxsX2NvbHMsIDEsICfpk77mjqXmoIfor4YnKVxcbiAgICAgICAgICAgICAgICAuc2VsZWN0KChjb2YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICQuR29TLnNhdmUoY29mLCAnbWFyaycsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBjb2YpXFxuICAgICAgICB9LCBzdG9yYWdlMC5nZXRJdGVtKCdzY29uZmlnJywgc2ZpZykpLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogJC5Hb1MuZ2V0KCdtYXJrJyksXFxuICAgICAgICB9XFxuXFxuICAgIH0pXFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+mTvuaOpScsXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKGNvZikgPT4ge1xcbiAgICAgICAgICAgIGxldCBhbGxfY29scyA9IFtcXFwiaGlrZXI6Ly9wYWdlL3A/cnVsZT1cXFwiICsgTVlfUlVMRS50aXRsZSArIFxcXCImdXJsPXt1cmx9XFxcIiwgXFxcImhpa2VyOi8vZW1wdHkvIyMmdXJsPXt1cmx9XFxcIl07XFxuICAgICAgICAgICAgYWxsX2NvbHMudW5zaGlmdChpbnB1dClcXG4gICAgICAgICAgICByZXR1cm4gJChhbGxfY29scywgMSwgJ3t1cmx95Lya5pu/5o2i55uu5qCH6ZO+5o6lJylcXG4gICAgICAgICAgICAgICAgLnNlbGVjdCgoY29mKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAkLkdvUy5zYXZlKGNvZiwgJ3VybCcsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBjb2YpXFxuICAgICAgICB9LCBzdG9yYWdlMC5nZXRJdGVtKCdzY29uZmlnJywgc2ZpZykpLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogJC5Hb1MuZ2V0KCd1cmwnKSxcXG4gICAgICAgICAgICB0eXBlOiAndGV4dGFyZWEnLFxcbiAgICAgICAgICAgIGhlaWdodDogLTFcXG4gICAgICAgIH1cXG4gICAgfSlcXG5cXG5cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiAneDXpq5jluqYnLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBkZXNjOiAn6buY6K6kMTkwJyxcXG4gICAgICAgIHVybDogJC50b1N0cmluZygoY29mKSA9PiB7XFxuICAgICAgICAgICAgJC5Hb1Muc2F2ZShjb2YsICd4NWgnLCBpbnB1dCk7XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgIH0sIHN0b3JhZ2UwLmdldEl0ZW0oJ3Njb25maWcnLCBzZmlnKSksXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogJC5Hb1MuZ2V0KCd4NWgnKSA9PSB1bmRlZmluZWQgPyAxOTAgOiAkLkdvUy5nZXQoJ3g1aCcpLFxcbiAgICAgICAgICAgIHR5cGU6ICdudW1iZXInXFxuICAgICAgICB9XFxuICAgIH0pXFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+iHquWumuS5iScsXFxuICAgICAgICB1cmw6IGxhenkucmVwbGFjZSgnYWN0aW9uJywgJ2N1c3RvbScpLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2ljb25cXFwiLFxcbiAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICBwaWNfdXJsOiBUb2YoJ2N1c3RvbScpLFxcbiAgICB9KTtcXG5cXG4gICAgaWYgKHN0b3JhZ2UwLmdldEl0ZW0oJ3Njb25maWcnLCBzZmlnKVsnY3VzdG9tJ10gPT0gdHJ1ZSlcXG5cXG4gICAge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+iHquWKqOaSreaUvicsXFxuICAgICAgICAgICAgdXJsOiBsYXp5LnJlcGxhY2UoJ2FjdGlvbicsICdhdXRvcGxheScpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9pY29uXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBUb2YoJ2F1dG9wbGF5JyksXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICdvYmplY3QtZml05qC35byPJyxcXG4gICAgICAgICAgICBkZXNjOiAn6buY6K6kY292ZXInLFxcbiAgICAgICAgICAgIHVybDogJC50b1N0cmluZygoY29mKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBhbGxfY29scyA9IFtcXFwiXFxcIiwgXFxcImZpbGxcXFwiLCBcXFwiY290YWluXFxcIiwgXFxcImNvdmVyXFxcIiwgXFxcIm5vbmVcXFwiLCBcXFwic2NhbGUtZG93blxcXCIsIFxcXCJpbml0aWFsXFxcIiwgXFxcImluaGVyaXRcXFwiXTtcXG4gICAgICAgICAgICAgICAgYWxsX2NvbHMudW5zaGlmdChpbnB1dClcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoYWxsX2NvbHMsIDEsICfpu5jorqRjb3ZlcicpXFxuICAgICAgICAgICAgICAgICAgICAuc2VsZWN0KChjb2YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAkLkdvUy5zYXZlKGNvZiwgJ2ZpdCcsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9LCBjb2YpXFxuICAgICAgICAgICAgfSwgc3RvcmFnZTAuZ2V0SXRlbSgnc2NvbmZpZycsIHNmaWcpKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6ICQuR29TLmdldCgnZml0JyksXFxuICAgICAgICAgICAgICAgIHR5cGU6ICd0ZXh0YXJlYScsXFxuICAgICAgICAgICAgICAgIGhlaWdodDogLTFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+WbvueJh+mrmOW6picsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgZGVzYzogJ+m7mOiupDE2NCcsXFxuICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChjb2YpID0+IHtcXG4gICAgICAgICAgICAgICAgJC5Hb1Muc2F2ZShjb2YsICdpbWdoJywgTnVtYmVyKGlucHV0KSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIHN0b3JhZ2UwLmdldEl0ZW0oJ3Njb25maWcnLCBzZmlnKSksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiAkLkdvUy5nZXQoJ2ltZ2gnKSA9PSB1bmRlZmluZWQgPyAxNjQgOiAkLkdvUy5nZXQoJ2ltZ2gnKSxcXG4gICAgICAgICAgICAgICAgdHlwZTogJ251bWJlcidcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+WbvueJh+WuveW6picsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgZGVzYzogJ+m7mOiupDEyMycsXFxuICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChjb2YpID0+IHtcXG4gICAgICAgICAgICAgICAgJC5Hb1Muc2F2ZShjb2YsICdpbWd3JywgTnVtYmVyKGlucHV0KSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIHN0b3JhZ2UwLmdldEl0ZW0oJ3Njb25maWcnLCBzZmlnKSksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiAkLkdvUy5nZXQoJ2ltZ3cnKSA9PSB1bmRlZmluZWQgPyAxMjMgOiAkLkdvUy5nZXQoJ2ltZ3cnKSxcXG4gICAgICAgICAgICAgICAgdHlwZTogJ251bWJlcidcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+aYvuekuuaVsOmHjycsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgZGVzYzogJ+m7mOiupDMnLFxcbiAgICAgICAgICAgIHVybDogJC50b1N0cmluZygoY29mKSA9PiB7XFxuICAgICAgICAgICAgICAgICQuR29TLnNhdmUoY29mLCAnc2hvdycsIE51bWJlcihpbnB1dCkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBzdG9yYWdlMC5nZXRJdGVtKCdzY29uZmlnJywgc2ZpZykpLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogJC5Hb1MuZ2V0KCdzaG93JykgPT0gdW5kZWZpbmVkID8gMyA6ICQuR29TLmdldCgnc2hvdycpLFxcbiAgICAgICAgICAgICAgICB0eXBlOiAnbnVtYmVyJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5ruR5Yqo5pWw6YePJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgICAgICBkZXNjOiAn6buY6K6kMycsXFxuICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChjb2YpID0+IHtcXG4gICAgICAgICAgICAgICAgJC5Hb1Muc2F2ZShjb2YsICdzY3JvbGwnLCBOdW1iZXIoaW5wdXQpKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgc3RvcmFnZTAuZ2V0SXRlbSgnc2NvbmZpZycsIHNmaWcpKSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6ICQuR29TLmdldCgnc2Nyb2xsJykgPT0gdW5kZWZpbmVkID8gMyA6ICQuR29TLmdldCgnc2Nyb2xsJyksXFxuICAgICAgICAgICAgICAgIHR5cGU6ICdudW1iZXInXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG5cXG5cXG5cXG4gICAgfVxcblxcblxcblxcblxcbiAgICBzZXRIb21lUmVzdWx0KGQpXFxufVwifV0iLCJpY29uIjoiaHR0cHM6Ly93d3cud2FuZ2ZlaS50di9mYXZpY29uLmljbyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment