xiaomianao666

小程序:聚漫🔮

Feb 7th, 2023
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@聚漫🔮@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6IGa5ryr8J+UriIsImF1dGhvciI6IiIsInVybCI6Imhpa2VyOi8vZW1wdHkiLCJ2ZXJzaW9uIjoyMjEyMzAxMDcsImNvbF90eXBlIjoiaWNvbl9zbWFsbF80IiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJhbGwiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmNvbnN0IFFJTkdfVElUTEUgPSBnZXRNeVZhcignbXlDb2xsZWN0aW9uJyksXG4gICAgbmV3V2luZG93ID0gcmVhZEZpbGUoJ25ld1dpbmRvdycpLFxuICAgIHR5cGVTaG93ID0gZ2V0TXlWYXIoJ3R5cGVTaG93JywgJ0AnKSxcbiAgICB0eXBlcyA9IHtcbiAgICAgICAgJ2FsbCc6ICfkvJjotKgnLFxuICAgICAgICAndmlkZW8nOiAn6KeG6aKRJyxcbiAgICAgICAgJ211c2ljJzogJ+mfs+mikScsXG4gICAgICAgICdsaXZlJzogJ+ebtOaSrScsXG4gICAgICAgICdjYXJ0b29uJzogJ+a8q+eUuycsXG4gICAgICAgICdyZWFkJzogJ+mYheivuycsXG4gICAgICAgICdwaWN0dXJlJzogJ+WPpuexuycsXG4gICAgICAgICduZXdzJzogJ+aXoOaQnOe0oicsXG4gICAgICAgICd0b29sJzogJ+WPr+S4i+i9vScsXG4gICAgICAgICdvdGhlcic6ICfmir3po44nXG4gICAgfVxubGV0IGVsID0gW3tcbiAgICAgICAgdGl0bGU6ICcgJyArIF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BdID09ICdAJykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZmlsdGVyS2V5ID0gdHlwZVNob3cuc2xpY2UoMSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZpbHRlcktleSkgcnVsZXMgPSBydWxlcy5maWx0ZXIoKHYpID0+IHYudGl0bGUuaW5jbHVkZXMoZmlsdGVyS2V5KSlcbiAgICAgICAgICAgICAgICB9IGVsc2UgcnVsZXMgPSBydWxlcy5maWx0ZXIoKHYpID0+IHYudHlwZSA9PSB0eXBlU2hvdylcbiAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkocnVsZXMpXG4gICAgICAgICAgICB9LCBRSU5HX1RJVExFLCB0eXBlU2hvdyksXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKCdzZWFyY2hLZXknLCAnJyksXG4gICAgICAgICAgICBvbkNoYW5nZTogXCJwdXRNeVZhcignc2VhcmNoS2V5JyxpbnB1dClcIlxuICAgICAgICB9XG4gICAgfV0sXG4gICAgcnVsZXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9kYXRhTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFKSxcbiAgICBydWxlc1R5cGUgPSBydWxlcy5yZWR1Y2UoKG9iaiwgdikgPT4ge1xuICAgICAgICBsZXQgdHlwZSA9IHYudHlwZVxuICAgICAgICBpZiAodHlwZSkge1xuICAgICAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KG9ialt0eXBlXSkpXG4gICAgICAgICAgICAgICAgb2JqW3R5cGVdID0gW11cbiAgICAgICAgICAgIG9ialt0eXBlXS5wdXNoKHYpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9ialxuICAgIH0sIHt9KVxuaWYgKHR5cGVTaG93WzBdID09ICdAJykge1xuICAgIGxldCBmaWx0ZXJLZXkgPSB0eXBlU2hvdy5zbGljZSgxKVxuICAgIGlmIChmaWx0ZXJLZXkpIHJ1bGVzID0gc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dmeXBhZ2UnKSA/ICdmeXBhZ2UnIDogJzEnLFxuICAgICAgICBkb21haW4gPSAoL15odHRwcz86XFwvXFwvW14vPyNdKy9pLmV4ZWMocnVsZVRtcC51cmwpIHx8IFsnaGlrZXI6Ly9lbXB0eSddKVswXSxcbiAgICAgICAgZCA9IHtcbiAgICAgICAgICAgIHRpdGxlOiB2LnRpdGxlLFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZCcsXG4gICAgICAgICAgICBpbWc6IHYuaWNvbiB8fCAnaGlrZXI6Ly9pbWFnZXMvaWNvbjEnLFxuICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICB1cmw6IGRvbWFpbiArICcvI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5IyMjIycgKyBmeXBhZ2UgK1xuICAgICAgICAgICAgICAgICAgICAnLmpzOmxldCB7IHJ1bkNvZGUsIGluZGV4VXJsIH0gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZnVuY1Rvb2xz77yf77yfcnVsZT0nICsgUUlOR19USVRMRSArICdcIiwgJ1xuICAgICAgICAgICAgICAgICAgICAgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBNWV9SVUxFOiBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkocnVsZVRtcCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgUUlOR19USVRMRTogUUlOR19USVRMRVxuICAgICAgICAgICAgICAgICAgICB9KSArICcp77yb77ybaW5kZXhVcmwoaW5wdXQpOycgKyBwYXJhbUhhbmRsZSh1cmxQYXJhbSwgdi51YSksXG4gICAgICAgICAgICAgICAgUlVMRTogYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KHsgdGl0bGU6IHYudGl0bGUgfSkpLFxuICAgICAgICAgICAgICAgIGlzSW5kZXg6IHRydWVcbiAgICAgICAgICAgIH1cbiAgICAgIC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AgICAgICAgICAgcHV0VmFyKCckZm9sZF8nICsgc2lnbiwgZm9sZGVkID8gJycgOiAnVCcpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBmb2xkZWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pXFxuICAgICAgICBsZXQgYXJyID0gZm9sZGVkID8gW3RoaXMuYXJyWzBdXSA6IHRoaXMuYXJyXFxuICAgICAgICBhcnIuZm9yRWFjaCgodikgPT4ge1xcbiAgICAgICAgICAgIGxldCB7IGlkLCBjbGFzc19uYW1lLCBjbGFzc191cmwgfSA9IHYsXFxuICAgICAgICAgICAgc2VsZWN0ZWQgPSBKU09OLnN0cmluZ2lmeSh0aGlzLmdldENsYXNzKGlkKSlcXG4gICAgICAgICAgICBjbGFzc19uYW1lLmZvckVhY2goKG5hbWUsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGNsYXNzX3VybFtpXSxcXG4gICAgICAgICAgICAgICAgICAgIG5vdyA9IEpTT04uc3RyaW5naWZ5KHsgbmFtZTogbmFtZSwgdXJsOiB1cmwgfSlcXG4gICAgICAgICAgICAgICAgZWwucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2VsZWN0ZWQgPT0gbm93ID8gJ+KAnOKAnOKAneKAnScgKyBuYW1lLmZvbnRjb2xvcih0aGlzLmNvbG9yKS5ib2xkKCkgOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZWxlY3RlZCA9PSBub3cgPyAnaGlrZXI6Ly9lbXB0eScgOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWduLCBpZCwgbm93KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBlbC5wdXNoKHsgY29sX3R5cGU6IHRoaXMuYm91bmRhcnkgfSlcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIGluaXQoY2xhc3NPYmplY3QpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfbmFtZSA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX3VybCA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc191cmwgPSBjbGFzc09iamVjdC5jbGFzc191cmwuc3BsaXQoJyYnKS5tYXAoKHYpID0+IHYudHJpbSgpKVxcbiAgICAgICAgcmV0dXJuIGNsYXNzT2JqZWN0XFxuICAgIH0sXFxuICAgIHB1c2goY2xhc3NPYmplY3QpIHtcXG4gICAgICAgIHRoaXMuYXJyLnB1c2godGhpcy5pbml0KGNsYXNzT2JqZWN0KSlcXG4gICAgfSxcXG4gICAgZ2V0Q2xhc3MoaWQpIHtcXG4gICAgICAgIGxldCBkZWZhdWx0Q2xhc3MgPSB0aGlzLmFyci5maW5kKGl0ZW0gPT4gaXRlbS5pZCA9PSBpZClcXG4gICAgICAgIGRlZmF1b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577yM5Y+v5q+P5pyI54K55LiA5qyh5pu05paw77yJJyxcXG4gICAgICAgIHVybDogJChcXFwi5riF6Zmk57yT5a2Y77yM56uL5Y2z5pu05pawXFxcIikuY29uZmlybSgodXJsKSA9PiB7XFxuICAgICAgICAgICAgLy/ov5znqIvkvp3otZbntKLlvJXmlofku7bku6PnkIblnLDlnYDliJfooahcXG4gICAgICAgICAgICBsZXQgcmVxdWlyZWxpc3QgPSBbJ2h0dHBzOi8vcmF3LmlxaXEuaW8vJywgJ2h0dHBzOi8vZ2hwcm94eS5uZXQvaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tLycsICdodHRwczovL2docHJveHkuY29tL2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS8nLCAnaHR0cHM6Ly9jZG4uc3RhdGljYWx5LmNvbS9naC8nLCAnaHR0cHM6Ly9naXRodWIuamV2b25zLnZpcC9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vJ11cXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHJlcXVpcmVsaXN0Lmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgIHRyeSB7IC8v6L+c56iL5L6d6LWW57Si5byVXFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gcmVxdWVzdChyZXF1aXJlbGlzdFtpXSArICdEcmVhbU96Ty9KTS9tYWluL0pNJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhTdGF0dXNDb2RlOiB0cnVlXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKEpTT04ucGFyc2UocmVzKS5zdGF0dXNDb2RlID09IDIwMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmaWxlRXhpc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVGaWxlKHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZURvd25sb2FkKHJlcXVpcmVsaXN0W2ldICsgJ0RyZWFtT3pPL0pNL21haW4vSk0nLHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlRG93bmxvYWQocmVxdWlyZWxpc3RbaV0gKyAnRHJlYW1Pek8vSk0vbWFpbi9KTScsdXJsKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICBiYWNrKGZhbHNlKVxcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lmm7TmlrAnXFxuICAgICAgICB9LCB1cmwpLFxcbiAgICAgICAgaW1nOiAnaGlrZXI6Ly9pbWFnZXMvaWNvbjQnLFxcbiAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXFxuICAgIH1dLFxcbiAgICB1cGRhdGVJbnRlcnZhbCA9IHJlYWRGaWxlKCd1cGRhdGVJbnRlcnZhbCcpIHx8ICcxJyxcXG4gICAgbmV3V2luZG93ID0gcmVhZEZpbGUoJ25ld1dpbmRvdycpLFxcbiAgICB0YWJGb2xkID0gcmVhZEZpbGUoJ3RhYkZvbGQnKSxcXG4gICAgZGlzYWJsZUN1c3RvbSA9IHJlYWRGaWxlKCdkaXNhYmxlQ3VzdG9tJyksXFxuICAgIGVkaXRNb2RlID0gZGlzYWJsZUN1c3RvbSA/ICflr7zlhaXmtbfpmJQnIDogZ2V0TXlWYXIoJ2VkaXRNb2RlJywgJ+WQr+eUqC/npoHnlKgnKVxcblxcbmV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lbGV0ZUZpbGUoJ2N1c3RvbURhdGEnKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+WQr+eUqCc6XFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdkaXNhYmxlQ3VzdG9tJywgJycpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn56aB55SoJzpcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2Rpc2FibGVDdXN0b20nLCAnVCcpXFxuICAgICAgICAgICAgICAgIGlucHV0ICs9ICdcXFxcbuWwj+eoi+W6j+WQr+eUqC/npoHnlKjjgIHph43mlrDmjpLluo/nrYnmk43kvZzlnYfkuI3kvJrkvZPnjrDlnKjpppbpobXlsI/nqIvluo/liJfooajkuK0nXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn57yW6L6RJzpcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGdldE15VmFyKCdyZW1vdGVVcmwnKVxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5zdGFydHNXaXRoKCdoaWtlcjovL2ZpbGVzLycpICYmICF1cmwuc3RhcnRzV2l0aCgnZmlsZTovLycpKVxcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gJ2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHVybCkgKyAnLmpzJ1xcbiAgICAgICAgICAgICAgICByZXR1cm4gICdoaWtlcjovL3BhZ2UvaW50ZXJmYWNlI25vUmVmcmVzaCMjbm9IaXN0b3J5IyNub1JlY29yZEhpc3RvcnkjP3J1bGU9SlNPTue8lui+keWZqCZKc29uPScrYmFzZTY0RW5jb2RlKHVybClcXG4gICAgICAgIH1cXG4gICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3sicgKyBpbnB1dFxcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICd0ZX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5lVmlzaWJsZTogZmFsc2UgfVxcbn0pO1xcbihkaXNhYmxlQ3VzdG9tID8gZGF0YSA6IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKSkuZm9yRWFjaCgodiwgaSkgPT4ge1xcbiAgICBsZXQgZCA9IHsgdGl0bGU6IHYudGl0bGUsIGltZzogZGF0YVtpXS5pY29uIH1cXG4gICAgc3dpdGNoIChlZGl0TW9kZSkge1xcbiAgICAgICAgY2FzZSAn5ZCv55SoL+emgeeUqCc6XFxuICAgICAgICAgICAgZC50aXRsZSA9ICh2LnZpc2libGUgPyAn8J+foiAgJyA6ICfwn5S0ICAnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIHJ1bGVzW2ldLnZpc2libGUgPSAhcnVsZXNbaV0udmlzaWJsZVxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgIGQudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+abtOaUueWbvuaghyc6XFxuICAgICAgICAgICAgZC51cmwgPSAkKHYuaWNvbiB8fCAnJywgJ+i+k+WFpeaWsOWbvuagh+WcsOWdgOaIluminOiJsuS7o+egge+8micpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICBydWxlc1tpXS5pY29uID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2ldLmljb25cXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5a+85YWl5rW36ZiUJzpcXG4gICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9kYXRhTG9hZD9ydWxlPScgKyBnZXRNeVZhcignbXlDb2xsZWN0aW9uJyksIHRydWUpXFxuICAgICAgICAgICAgICAgIHJldHVybiAncnVsZTovLycgKyBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoZGF0YVtpXSkpXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICB9XFxuICAgIGVsLnB1c2goZClcXG59KSovXFxuKGRpc2FibGVDdXN0b20gPyBbJ+WvvOWFpea1t+mYlCddIDogWyflkK/nlKgv56aB55SoJywgJ+mHjeaWsOaOkuW6jycsICfmm7TmlLnlm77moIcnLCAn5a+85YWl5rW36ZiUJ10pLmZvck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/Cfn6IgICcgOiAn8J+UtCAgJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBydWxlc1tpXS52aXNpYmxlID0gIXJ1bGVzW2ldLnZpc2libGVcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXG4gICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfmm7TmlLnlm77moIcnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxuICAgICAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBydWxlc1tpXS5pY29uXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b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cGFyc2VEb21Gb3JBcnJheShnZXRSZXNDb2RlKCksIGZpbmRSdWxlLnNoaWZ0KCkpLmZvckVhY2goKGRhdGEpID0+IHtcXG4gICAgICAgIGxldCBbdGl0bGUsIGltZywgZGVzYywgdXJsXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHYgPT0gJyonKSByZXR1cm4gJydcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICByZXMgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSwgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogTVlfUlVMRS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxuICAgICAgICAgICAgaWYgKHJlcy51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHJlcy51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczonICsgaGlqYWNrTGF6eVJ1bGUgKyAnOycgKyByZXMudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcbiAgICAgICAgICAgIH0gZWxzZSAgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKGdlbk15UnVsZSgpLCB7IGRldGFpbF9maW5kX3J1bGU6IGRldGFpbEZpbmRSdWxlIH0pKSksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShnZW5NeVJ1bGUoKSkpLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBteUNvbGxfZWwucHVzaChyZXMpXFxuICAgIH0pXFxuICAgIHNldFJlc3VsdChte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j9wdXRNeVZhcihcXFwiampzXFxcIixcXFwi5bGV5byAXFxcIik6cHV0TXlWYXIoXFxcImpqc1xcXCIsXFxcIuaUtui1t1xcXCIpO1xcXCJoaWtlcjovL2VtcHR5XFxcIic7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn566A5LuLIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMxOUI4OURcXFwiPuWxleW8gD48L3NwYW4+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgaW1nOiBcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMTk3LnBuZ1xcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChqamlkLCBkZWNpZCwgZGVzX2Rlc2MpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5pS26LW3XFxcIikgPT0gXFxcIuaUtui1t1xcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5bGV5byAXFxcIik7XFxuXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnroDku4sgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzE5Qjg5RFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkZWNpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjICsgJy4uLjwvc3Bhbj4nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImpqc1xcXCIsIFxcXCLmlLbotbdcXFwiKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+eugOS7iyA8c21hbGw+PHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMTlCODlEXFxcIj7lsZXlvIA+PC9zcGFuPjwvc21hbGw+PC9zbWFsbD4nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojODA4MDgwXFxcIj4nICsgZGVzX2Rlc2Muc3Vic3RyKDAsIDMwKSArICcuLi48L3NwYW4+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH0sIE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiLCBNWV9SVUxFICsgXFxcIl9kZWNpZFxcXCIsIGRlc19kZXNjKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiM4MDgwODBcXFwiPicgKyBkZXNfZGVzYy5zdWJzdHIoMCwgMzApICsgJy4uLjwvc3Bhbj4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxuICAgICAgICAgICAgICAgIGxpbmVTcGFjaW5nOiAzLFxcbiAgICAgICAgICAgICAgICBpZDogTVlfUlVMRSArIFxcXCJfZGVjaWRcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0pXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0pXFxuICAgIH0gY2F0Y2ggKGUpIHt9XFxufVxcblxcbmZ1bmN0aW9uIGRvd24oVGl0bGUsIGNoYXB0ZXJQaWMsIGxpc3QsIGNoYXB0ZXJUaXRsZSwgY2hhcHRlckxpbmUsIGRvd25sb2FkbGF6eSkge1xcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IGRvTGlzdCA9IGxpc3QubWFwKChpdGVtKSA9PiAoe1xcbiAgICAgICAgICAgIHRpdGxlOiBwZGZoKGl0ZW0sIGNoYXB0ZXJUaXRsZSksXFxuICAgICAgICAgICAgdXJsOiBwZChpdGVtLCBjaGFwdGVyTGluZSksXFxuICAgICAgICB9KSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAjMWFhZDE5XFxcIj7kuIvovb3mvKvnlLvwn5S5PC9zcGFuPjwvYj4nLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9kb3dubG9hZC52aWV3I25vUmVjb3JkSGlzdG9yeSMjbm9SZWZyZXNoIz9ydWxlPeacrOWcsOi1hOa6kOeuoeeQhlxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBjaGFwdGVyTGlzdDogZG9MaXN0LFxcbiAgICAgICAgICAgICAgICBpbmZvOiB7XFxuICAgICAgICAgICAgICAgICAgICBib29rTmFtZTogcGRmaChodG1sLCBUaXRsZSksXFxuICAgICAgICAgICAgICAgICAgICBydWxlTmFtZTogTVlfUlVMRS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgI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50aXRsZSArICcjbGluZS10aXRsZScpKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LliIfmjaLoh7NcXFwiICsgbGluZVRpdGxlXFxuICAgICAgICAgICAgICAgIH0sIHZhcktleSwgaSwgbGluZVRpdGxlKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgIH1cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgIH0pO1xcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuino+aekFvljIVdKlwiLFwicGF0aFwiOlwiYnpqc1wiLFwicnVsZVwiOlwidmFyIOa8q+eUu+ino+aekCA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICB2YXIgaWQgPSB0cnVlO1xcbiAgICB2YXIgY29kZSA9IHJlcXVlc3QoaW5wdXQpXFxuICAgIHZhciBwaWNzID0gW107XFxuICAgIHZhciB0b19SZXBlYXQgPSBmYWxzZTtcXG5cXG5cXG4gICAgd2hpbGUgKGlkKSB7XFxuICAgICAgICBwZGZhKGNvZGUsIFxcXCIuY2hhcHRlci1tYWluJiZhbXAtaW1nXFxcIilcXG4gICAgICAgICAgICAuZm9yRWFjaChkYXRhID0+IHBpY3MucHVzaChwZGZoKGRhdGEsIFxcXCJhbXAtaW1nJiZzcmNcXFwiKSArICdAUmVmZXJlcj1odHRwczovL3d3dy53ZWJtb3RhLmNvbS8nKSk7XFxuICAgICAgICB2YXIgbmV4dF9QYWdlID0gcGRmaChjb2RlLCBcXFwiLm5leHRfY2hhcHRlciwtMSYmSHRtbFxcXCIpXFxuICAgICAgICBpZiAobmV4dF9QYWd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pbmRleCkgPT4ge1xcbiAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NKTtcXG4gICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZijmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0aXRsZS5mb250Y29sb3Io5YiG57G76aKc6ImyKSA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoTVlfUlVMRS51cmwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yo5o6S6ZmkKSAhPSAndW5kZWZpbmVkJyAmJiDmjpLpmaQgIT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcImdcXFwiKSwgXFxcIlxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/IFxcXCLigJzigJzigJ3igJ1cXFwiICsgdGl0bGUuZm9udGNvbG9yKOWIhuexu+minOiJsikgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxc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i++8mnsgdGl0bGU6XFxcIuagh+mimDFcXFwiLCB1cmw6XFxcInh4eFxcXCIsIGNvbF90eXBlOlxcXCJzY3JvbGxfYnV0dG9uXFxcIiB9O1xcbiAgICAgKiAgICAgICAg5Y+C5pWw6YeH55So5Y+v6YCJ6KaG55uW5qih5byP77yM5LiN5YaZ55qE5Y+C5pWw5YiZ5L2/55So6buY6K6kO1xcbiAgICAgKiAgICAgICAg5q+U5aaC5Lyg5YWlIHsgY29sX3R5cGU6XFxcInRleHRfMVxcXCIgfe+8jOmCo+acgOe7iOe7k+aenOWwseaYryB7IHRpdGxlOlxcXCLmoIfpopgxXFxcIiwgdXJsOlxcXCJ4eHhcXFwiLCBjb2xfdHlwZTpcXFwidGV4dF8xXFxcIiB9XFxuICAgICAqIEByZXR1cm5zIHtDYXRlZ29yaWVzSGVhZGVyfVxcbiAgICAgKi9cXG4gICAgZm9sZExheW91dChsYXlvdXQpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgbGF5b3V0ID09PSAnb2JqZWN0Jykge1xcbiAgICAgICAgICAgIGxldCBrZXlzID0gT2JqZWN0LmtleXMobGF5b3V0KVxcbiAgICAgICAgICAgIGxldCBpbmplY3RJbmRleCA9IGxheW91dC5pbmplY3RJbmRleCB8fCBsYXlvdXRbJ+aKmOWPoOaMiemSruaPkuWFpeihjCddXFxuICAgICAgICAgICAgaWYgKGxheW91dC50aXRsZSB8fCBsYXlvdXQudXJsIHx8IGxheW91dC5jb2xfdHlwZSB8fCBpbmplY3RJbmRleCkge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGtleXMubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IGtleXNbaV1cXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XVtrZXldID0gbGF5b3V0W2tleV07XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpeato+ehrueahOaKmOWPoOeVjOmdouWFg+e0oO+8gVxcXCIpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIGluamVjdEluZGV4IOaKmOWPoOaMiemSruaPkuWFpeesrCBpbmplY3RJbmRleCDooYxcXG4gICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCEodHlwZW9mIChpbmplY3RJbmRleCkgPT09ICdudW1iZXInKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXmlbDlrZfvvIFcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5aSn5LqOIDAg55qE5pW05pWw77yBXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPiB0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzkuI3lvpflpKfkuo7mmL7npLrmipjlj6DooYzmlbDvvIHor7fosIPnlKggLmZvbGRJbmRleChpbmRleCkg5oiWIC7nrKzlh6DooYzlvIDlp4vmipjlj6AoaW5kZXgpIOS8oOWFpeato+ehrueahOaYvuekuuaKmOWPoOihjOaVsFxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLm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gKHRpdGxlUnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICB0aXRsZSA9IHRoaXMuZXZhbEpTUnVsZShzcmMsIHRpdGxlUnVsZSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdGl0bGUgPSBwYXJzZURvbUZvckh0bWwoc3JjLCB0aXRsZVJ1bGUpXFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gdGl0bGUgfHwgXFxcIlxcXCI7XFxuICAgIH0sXFxuICAgIGdldFVybChzcmMsIGNhdGVnb3J5KSB7XFxuICAgICAgICBsZXQgdXJsID0gJydcXG4gICAgICAgIGxldCB1cmxSdWxlID0gY2F0ZWdvcnkudXJsUnVsZSB8fCAnYSYmaHJlZidcXG4gICAgICAgIGlmICh0eXBlb2YgdXJsUnVsZSA9PT0gJ29iamVjdCcpIHtcXG4gICAgICAgICAgICBsZXQgbVVybFJ1bGUgPSB1cmxSdWxlLnJ1bGUgfHwgdXJsUnVsZVsn6Kej5p6Q6KeE5YiZJ10gfHwgJ2EmJmhyZWYnO1xcbiAgICAgICAgICAgIGlmIChtVXJsUnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdGhpcy5ldmFsSlNSdWxlKHNyYywgbVVybFJ1bGUpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICBpZiAodXJsUnVsZS5wYXJzZU9wdGlvbikge1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlLnBhcnNlT3B0aW9uKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21Gb3JIdG1sXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZGZoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsUnVsZVtcXFwi6Kej5p6Q5pa55rOVXFxcIl0pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZVtcXFwi6Kej5p6Q5pa55rOVXFxcIl0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbUZvckh0bWxcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkZmhcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tRm9ySHRtbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB1cmwgPSBwYXJzZShzcmMsIG1VcmxSdWxlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuZGVhbFVybCkge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB1cmxSdWxlLmRlYWxVcmwodXJsKVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsUnVsZVsn5LqM5qyh5aSE55CGJ10pIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsUnVsZVsn5LqM5qyh5aSE55CGJ10odXJsKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuc3RhcnRzV2l0aChcXFwiQGpzOlxcXCIpKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHRoaXMuZXZhbEpTUnVsZShzcmMsIHVybFJ1bGUpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHBhcnNlRG9tKHNyYywgdXJsUnVsZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIHVybCB8fCBcXFwiXFxcIjtcXG4gICAgfSxcXG4gICAgYnVpbGQoKSB7XFxuICAgICAgICAvLyDmo4DmtYvmmK/lkKbkvKDlhaXpnIDopoHnmoTlj4LmlbBcXG4gICAgICAgIHRoaXMuY2hlY2tQYXJhbXMoKVxcbiAgICAgICAgLy8g5q+P5LiA5Liq5YiG57G755qE5ZSv5LiA5qCH6K+GXFxuICAgICAgICBsZXQgbVRhZyA9IHRoaXNbc3ltYm9sTWFwLm1UYWddIHx8IFxcXCJcXFwiXFxuICAgICAgICAvL+e/u+mhtSDpnIDopoHmoLnmja7lrp7pmYXmm7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b3V0ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0udGl0bGUgfHwgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9PT0gJzEnID8gJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogI0ZGMDAwMFxcXCI+4oioPC9zcGFuPjwvYj4nIDogJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogIzFhYWQxOVxcXCI+4oinPC9zcGFuPjwvYj4nKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XS51cmwgfHwgJChcXFwiaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjXFxcIikubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMubVRhZyArIHBhcmFtcy5WQVJNQVAuRk9MRCwgZ2V0TXlWYXIocGFyYW1zLm1UYWcgKyBwYXJhbXMuVkFSTUFQLkZPTEQsIHBhcmFtcy5pc0ZvbGQpID09PSAnMScgPyAnMCcgOiAnMScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbVRhZzogbVRhZyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNGb2xkOiB0aGlzW3N5bWJvbE1hcC5tRm9sZF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLmNvbF90eXBlIHx8IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goZm9sZExheW91dClcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAvL+WFt+S9k+WIl+ihqOS4i+eahOWIhuexu1xcbiAgICAgICAgICAgICAgICBsZXQgc3ViX2NhdGVnb3JpZXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgaWYgKGNhdGVnb3J5LnN1Ykxpc3RSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSB0aGlzLmV2YWxKU1J1bGUoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBhcnNlRG9tRm9yQXJyYXkoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbmRleCA8ICh0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSB8fCAxKSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5nZXRVcmwoaXRlbSwgY2F0ZWdvcnkpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0nICsgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSArICc+JyArIHRpdGxlICsgJyA8L2ZvbnQ+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuaW5kZXggPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuQ0FURUdPUlksIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5pbmRleCA9PT0gMCA/IG5ld19jYXRlIDogcGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9PT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmdldFVybChpdGVtLCBjYXRlZ29yeSlcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPScgKyB0aGlzW3N5bWJvbE1hcC5tQ29sb3JdICsgJz4nICsgdGl0bGUgKyAnIDwvZm9udD48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQodXJsKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLlVSTCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IG1UYWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfSxcXG5cXG4gICAg55WM6Z2iKGxheW91dCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMubGF5b3V0KGxheW91dClcXG4gICAgfSxcXG4gICAg5YiG57G76ZO+5o6lKHRydWVVcmwpIHtcXG4gICA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cmxQcm9jZXNzb3IoKSB7XFxuICAgIHRoaXMucGFyYW1zID0ge31cXG4gICAgdGhpcy5yZWdleE1hcCA9IFtcXG4gICAgICAgIHtcXG4gICAgICAgICAgICByZWc6ICcodm9kdHlwZXx2aWRlb3QpXFxcXFxcXFwvXFxcXFxcXFx3KycsXFxuICAgICAgICAgICAgZXhlYzogKCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJhbXMudXJsXFxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvLVxcXFxkKy5odG1sLywgJy0nICsgdGhpcy5wYXJhbXMucGFnZSArICcuaHRtbCcpXFxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvKCh2b2R0eXBlfHZpZGVvdClcXFxcL1xcXFx3KykuaHRtbC8sICckMS0nICsgdGhpcy5wYXJhbXMucGFnZSArICcuaHRtbCcpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICByZWc6ICdcXFxcXFxcXC8/W1xcXFxcXFxcd1xcXFxcXFxcZF0rLS4qPy0uKj8tLio/LS4qPy0uKj8tLio/LS4qPy1cXFxcXFxcXGQqLS0tXFxcXFxcXFxkKi5odG1sJyxcXG4gICAgICAgICAgICBleGVjOiAoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcmFtcy51cmxcXG4gICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXFxcZCooLS0tLmh0bWwpLywgdGhpcy5wYXJhbXMucGFnZSArICckMScpXFxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvKC0tLVxcXFxkKy5odG1sKS8sIHRoaXMucGFyYW1zLnBhZ2UgKyAnJDEnKTsgLy8g5ou85o6l6aG156CBXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICByZWc6ICcoKFxcXFxcXFxcL3ZvZFxcXFxcXFx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XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5yZWdleE1hcC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGxldCByZWdPYmogPSB0aGlzLnJlZ2V4TWFwW2ldO1xcbiAgICAgICAgICAgIGxldCB1cmxFeHAgPSByZWdPYmoucmVnO1xcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdXJsRXhwID09PSAnc3RyaW5nJykge1xcbiAgICAgICAgICAgICAgICB1cmxFeHAgPSBuZXcgUmVnRXhwKHVybEV4cClcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHVybEV4cC50ZXN0KHRoaXMucGFyYW1zLnVybCkpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyYW1zLmRlYnVnKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2codXJsRXhwLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdHJ1ZV91cmwgPSByZWdPYmouZXhlYygpO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpZiAodHJ1ZV91cmwpIHtcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZV91cmw7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcmFtcy51cmxcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAg6I635Y+W5aSE55CG57uT5p6cKCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuZXhlYygpXFxuICAgIH0sXFxuICAgIOmTvuaOpSh1cmwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmJhc2VVcmwodXJsKVxcbiAgICB9LFxcbiAgICDpobXnoIEocGFnZSkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMucGFnZShwYWdlKVxcbiAgICB9LFxcbiAgICDmj5LlhaXmlrDlpITnkIbop4TliJkocmVnRXhwKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5hZGRFeHRyYShyZWdFeHApXFxuICAgIH0sXFxuICAgIOiwg+ivleaooeW8jygpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmRlYnVnKCk7XFxuICAgIH1cXG59KVxcbiQuZXhwb3J0cz1uZXcgVXJsUHJvY2Vzc29yKClcXG4kLmV4cG9ydHNcXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS4gOe6pypcIixcInBhdGhcIjpcInlqdG9vbFwiLFwicnVsZVwiOlwiZnVuY3Rpb24gY29udmVydDEoc3RyKSB7XFxuICAgIGxldCBjID0gc3RyLnNwbGl0KFxcXCI7XFxcIilcXG4gICAgcmV0dXJuIHtcXG4gICAgICAgIOWIl+ihqDogY1swXSxcXG4gICAgICAgIOagh+mimDogY1sxXSxcXG4gICAgICAgIOWbvueJhzogY1syXSxcXG4gICAgICAgIOaPj+i/sDogY1szXSxcXG4gICAgICAgIOmTvuaOpTogY1s0XVxcbiAgICB9XFxufVxcblxcbmZ1bmN0aW9uIG1lcmdlKHNvdXJjZSwgdGFyZ2V0KSB7XFxuICAgIGxldCBrZXlzID0gT2JqZWN0LmtleXMoc291cmNlKVxcbiAgICBmb3IgKGxldCBpIGluIGtleXMpIHtcXG4gICAgICAgIHRhcmdldFtrZXlzW2ldXSA9IHNvdXJjZVtrZXlzW2ldXVxcbiAgICB9XFxufVxcblxcbmZ1bmN0aW9uIOS4gOe6pyhvYmopIHtcXG4gICAgdmFyIGQgPSBbXTtcXG4gICAgaWYgKCQudHlwZShvYmopID09IFxcXCJzdHJpbmdcXFwiKSB7XFxuICAgICAgICBvYmogPSBjb252ZXJ0MShvYmopXFxuICAgIH1cXG4gICAgaWYgKG9iai7op4TliJkpIHtcXG4gICAgICAgIGxldCBjID0gY29udmVydDEob2JqLuinhOWImSlcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXG4gICAgfVxcbiAgICBsZXQgYXJyID0gcGRmYShnZXRSZXNDb2RlKCksIG9iai7liJfooagpO1xcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgYXJyID0gb2JqLumTvuaOpeWkhOeQhihhcnIpXFxuICAgICAgICB9XFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcbiAgICAgICAgbGV0IHVybCA9IHBkKGl0LCBvYmou6ZO+5o6lKVxcbiAgICAgICAgaWYgKG9iai7pk77mjqXlpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdCwgb2JqLuagh+mimClcXG4gICAgICAgIGlmIChvYmou5qCH6aKY5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICB0aXRsZSA9IG9iai7moIfpopjlpITnkIYodGl0bGUpXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxuICAgICAgICBpZiAob2JqLuWbvueJh+WkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgcGljID0gb2JqLuWbvueJh+WkhOeQhihwaWMpXFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBvYmou5qCH6aKYID8gcGRmaChpdCwgb2JqLuagh+mimCkgOiBcXFwiXFxcIixcXG4gICAgICAgICAgICB1cmw6IHVybCsnI2F1dG9DYWNoZSMnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBvYmou5o+P6L+wID8gcGRmaChpdCwgb2JqLuaPj+i/sCkgOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBwaWMsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgeXRpdGxlOiB0aX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c3R1cmwgPSBwZGZoKGl0LCDpm4Z1cmwpXFxuICAgICAgICAgICAgZG9MaXN0dXJsID0gZG9MaXN0dXJsLmluY2x1ZGVzKFxcXCJodHRwXFxcIikgPyBkb0xpc3R1cmwgOiDliY3nvIAgKyBkb0xpc3R1cmxcXG4gICAgICAgICAgICBkb0xpc3QucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGl0LCDpm4blkI0pLFxcbiAgICAgICAgICAgICAgICB1cmw6IGRvTGlzdHVybFxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuXFxuICAgICAgICB2YXIgYm9va05hbWUgPSAh5aSa6Lev57q/5ZCmID8g5qCH6aKYIDog5qCH6aKYICsgJy0nICsg5YiX6KGo5ZCNW2ldXFxuXFxuICAgICAgICDnq6DoioJqc29uLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiDliJfooajlkI1baV0sXFxuICAgICAgICAgICAgbGlzdDogZG9MaXN0LFxcbiAgICAgICAgICAgIHNqc3M6IHtcXG4gICAgICAgICAgICAgICAgY2hhcHRlckxpc3Q6IGRvTGlzdCxcXG4gICAgICAgICAgICAgICAgaW5mbzoge1xcbiAgICAgICAgICAgICAgICAgICAgYm9va05hbWU6IGJvb2tOYW1lLCAvL+a8q+eUu+WQjeensCxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVOYW1lOiBNWV9SVUxFLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgYm9va1RvcFBpYzog5Zu+54mHLFxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlOiDmvKvnlLvop6PmnpAsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWaWV3OiBcXFwiMVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIHJldHVybiDnq6DoioJqc29uXFxufVxcblxcblxcbmZ1bmN0aW9uIOa3u+WKoOWktOmDqO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gICAgIOmhtVVSTCA9IE1ZX1JVTEUudGl0bGVcXG4gICAgfVxcblxcbiAgICAvL+agh+mimOS4jueugOS7i+agt+W8j1xcbiAgICB2YXIgbXp0ZXh0ID0gXFxcIiZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOzxzbWFsbD7nroDku4s8L3NtYWxsPjxicj5cXFwiXFxuICAgIHZhciBidHRpdGxlID0gJzxmb250IGNvbG9yPVxcXCIjMDk4QUMxXFxcIj7mvKvnlLvnroDku4sgIDwvZm9udD48c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCIjZjQ3OTgzXFxcIj7nroDku4vmlLY+PC9mb250Pjwvc21hbGw+PC9zbWFsbD4nXFxuXFxuICAgIC8v5bGV5byA5LiO5pS257yp5pON5L2cXFxuICAgIHZhciBqaiA9IGdldE15VmFyKOmhtVVSTCArIFxcXCLnroDku4vmlLZcXFwiLCBcXFwi5bey5pS26LW3XFxcIik7XFxuICAgIHZhciBqanVybCA9ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKOeugOS7i+WGheWuuSwg566A5LuL5YaF5a655pS2LCDmlLYsIOaUtuWGheWuuSwg5b2T5YmNVVJMKSA9PiB7XFxuICAgICAgICB2YXIganNibCA9IOW9k+WJjVVSTCArIFxcXCLnroDku4vmlLZcXFwiO1xcbiAgICAgICAgdmFyIGpqID0gZ2V0TXlWYXIo5b2T5YmNVVJMICsgXFxcIueugOS7i+aUtlxcXCIsIFxcXCLlt7LmlLbotbdcXFwiKTtcXG4gICAgICAgIGpqID0gamogPT0gXFxcIuW3suaUtui1t1xcXCIgPyBcXFwi5bGV5byAXFxcIiA6IFxcXCLlt7LmlLbotbdcXFwiO1xcbiAgICAgICAgcHV0TXlWYXIoanNibCwgamopXFxuICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDog5b2T5YmNVVJMICsgXFxcIl9idFxcXCJcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHRpdGxlOiDmlLYucmVwbGFjZShcXFwi566A5LuL5pS2XFxcIiwgamopXFxuICAgICAgICB9KVxcblxcbiAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IOW9k+WJjVVSTCArIFxcXCJfbXpcXFwiXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB0aXRsZTogamogPT0gXFxcIuW3suaUtui1t1xcXCIgPyDmlLblhoXlrrkucmVwbGFjZShcXFwi566A5LuLXFxcIiwg566A5LuL5YaF5a655pS2KSA6IOaUtuWGheWuuS5yZXBsYWNlKFxcXCLnroDku4tcXFwiLCDnroDku4vlhoXlrrkpXFxuICAgICAgICB9KVxcbiAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICB9LCDnroDku4vlhoXlrrksIOeugOS7i+WGheWuueaUtiwgYnR0aXRsZSwgbXp0ZXh0LCDpobVVUkwpXFxuXFxuXFxuICAgIC8v5qCH6aKYXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogYnR0aXRsZS5yZXBsYWNlKFxcXCLnroDku4vmlLZcXFwiLCBqaiksXFxuICAgICAgICB1cmw6IGpqdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgcGljX3VybDog5Zu+54mHLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl9idFxcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuXFxuICAgIC8v566A5LuLXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogamogPT0gXFxcIuW3suaUtui1t1xcXCIgPyBtenRleHQucmVwbGFjZShcXFwi566A5LuLXFxcIiwg566A5LuL5YaF5a655pS2KSA6IG16dGV4dC5yZXBsYWNlKFxcXCLn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xcIiwgXFxcIuato+W6j1xcXCIpO1xcbiAgICB2YXIg5o+Q56S6ID0g5o6S5bqPID09ICflgJLluo8nID8gJ+ato+W6jycgOiAn5YCS5bqPJztcXG5cXG4gICAgdmFyIOaOkuW6j3VybCA9ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKOagh+mimOWQjSwg5qCH6aKY5pWw5o2uLCDliJfooajmlbDmja4sIOino+aekOS7o+eggSwg6aG1VVJMKSA9PiB7XFxuICAgICAgICB2YXIg5o6S5bqPID0gZ2V0TXlWYXIo6aG1VVJMICsgXFxcIueroOiKguaOkuW6j1xcXCIsIFxcXCLmraPluo9cXFwiKTtcXG4gICAgICAgIHZhciDmj5DnpLogPSDmjpLluo8gPT0gJ+WAkuW6jycgPyAn5q2j5bqPJyA6ICflgJLluo8nO1xcbiAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJf5o6S5bqPXFxcIlxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdGl0bGU6IOagh+mimOWQjS5yZXBsYWNlKCfot6/nur8nLCDmoIfpopjmlbDmja4pLnJlcGxhY2UoJ+aOkuW6jycsIOaPkOekuilcXG4gICAgICAgIH0pXFxuXFxuXFxuICAgICAgICBpZiAo5o+Q56S6ID09ICflgJLluo8nKSB7XFxuICAgICAgICAgICAg5YiX6KGo5pWw5o2uLnJldmVyc2UoKVxcbiAgICAgICAgfVxcbiAgICAgICAg5YiX6KGo5pWw5o2uLmZvckVhY2goZnVuY3Rpb24oZGF0YSwgc3NpZCkge1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogZGF0YS50aXRsZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBkYXRhLnVybCArIOino+aekOS7o+eggSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiDpobVVUkwgKyBcXFwiX+mAiembhlxcXCIgKyBzc2lkXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcblxcblxcbiAgICAgICAgcHV0TXlWYXIo6aG1VVJMICsgXFxcIueroOiKguaOkuW6j1xcXCIsIOaPkOekuilcXG4gICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgfSwg5qCH6aKY5ZCNLCDmoIfpopjmlbDmja4sIOWIl+ihqOaVsOaNriwg6Kej5p6Q5Luj56CBLCDpobVVUkwpXFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTog5qCH6aKY5ZCNLnJlcGxhY2UoJ+i3r+e6vycsIOagh+mimOaVsOaNrikucmVwbGFjZSgn5o6S5bqPJywg5o6S5bqPKSxcXG4gICAgICAgIHBpY191cmw6IOWbvueJhyxcXG4gICAgICAgIHVybDog5o6S5bqPdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl/mjpLluo9cXFwiXFxuICAgICAgICB9XFxuICAgIH0pO1xcblxcbiAgICBpZiAo5o6S5bqPID09ICflgJLluo8nKSB7XFxuICAgICAgICDliJfooajmlbDmja4ucmV2ZXJzZSgpXFxuICAgIH1cXG5cXG4gICAg5YiX6KGo5pWw5o2uLmZvckVhY2goZnVuY3Rpb24oZGF0YSwgaWQpIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGRhdGEudGl0bGUsXFxuICAgICAgICAgICAgdXJsOiBkYXRhLnVybCArIOino+aekOS7o+eggSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgIC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ly/ngrnmiJHlubLllaXlkaJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxuICAgICAgICB9KTtcXG5cXG5cXG4gICAgICAgIOi3r+e6v+aVsOaNri5mb3JFYWNoKGZ1bmN0aW9uKGRhdGEsIGlkKSB7XFxuXFxuICAgICAgICAgICAgdmFyIGpqdXJsID0gJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgo6aG1VVJMLGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0o6aG1VVJMICsgJ+mAieaLqeWIl+ihqCcsaWQrJycpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgfSzpobVVUkwsaWQpO1xcblxcbiAgICAgICAgICAgIHZhciDmoIfpopjlkI0gPSBpZCA9PSDpgInmi6nliJfooaggPyDot6/nur/pgInkuK0ucmVwbGFjZSgn6YCJ5LitJywgZGF0YS50aXRsZSkgOiBkYXRhLnRpdGxlO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiDmoIfpopjlkI0sXFxuICAgICAgICAgICAgICAgIHVybDogamp1cmwsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJf6Lev57q/XFxcIiArIGlkXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcblxcbiAgICB9XFxuICAgIHJldHVybiDpgInmi6nliJfooahcXG59XFxuXFxuXFxuZnVuY3Rpb24g5re75Yqg6YCJ5oup5LiL6L29KGQsIOi3r+e6v+aVsOaNriwg5aSa6Lev57q/5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hdXRvQ2FjaGUjJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIm1vdmllXzNcXFwiLFxcbmV4dHJhOiB7XFxuICAgICAgICAgICAgbmFtZTogcGRmaChkYXRhLCDmoIfpopgpLFxcbiAgICAgICAgICAgIHVybDogcGQoZGF0YSwg6ZO+5o6lKSxcXG4gICAgICAgICAgICBxejogTVlfSE9NRVxcbiAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH0pO1xcbiAgICBzZXRSZXN1bHQoZCk7XFxufVxcblxcblxcblxcbmZ1bmN0aW9uIOaQnOe0oijliJfooagsIOagh+mimCwg6ZO+5o6lLCDmj4/ov7AsIOivpuaDhSwg5Zu+54mHLCDorr/pl67lpLQpIHtcXG4gICAgdmFyIGQgPSBbXTtcXG4gICAg6K6/6Zeu5aS0ID0gIeiuv+mXruWktCA/ICcnIDog6K6/6Zeu5aS0XFxuICAgIHBkZmEoZ2V0UmVzQ29kZSgpLCDliJfooagpLmZvckVhY2goZnVuY3Rpb24oZGF0YSkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCDmoIfpopgpLFxcbiAgICAgICAgICAgIGRlc2M6IHBkZmgoZGF0YSwg5o+P6L+wKSxcXG4gICAgICAgICAgICBwaWNfdXJsOiBwZChkYXRhLCDlm77niYcpICsgXFxcIkBSZWZlcmVyPVxcXCIgKyDorr/pl67lpLQsXFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eSNpbW1lcnNpdmVUaGVtZSMjYXV0b0NhY2hlIycsXFxuICAgICAgICAgICAgY29udGVudDogcGRmaChkYXRhLCDor6bmg4UpLFxcblxcbmV4dHJhOiB7XFxuICAgICAgICAgICAgbmFtZTogcGRmaChkYXRhLCDmoIfpopgpLFxcbiAgICAgICAgICAgIHVybDogcGQoZGF0YSwg6ZO+5o6lKSxcXG4gICAgICAgICAgICBxejogTVlfSE9NRVxcbiAgICAgICAgfVx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Wuue+8jOWwseS4jeaYvuekulxcbiAgICBpZiAo56ug6IqCanNvbi5sZW5ndGggPiAwKSB7XFxuXFxuICAgICAgICAvL+i3r+e6v+mAieaLqVxcbiAgICAgICAgdmFyIOmAieaLqeWIl+ihqCA9IOa3u+WKoOmAieaLqei3r+e6vyhkLCDnq6DoioJqc29uLCDlvZPliY1VUkwsIOWkmui3r+e6v+WQpilcXG5cXG4gICAgICAgIC8v6YCJ5oup5LiL6L29XFxuICAgICAgICDmt7vliqDpgInmi6nkuIvovb0oZCwg56ug6IqCanNvbizlpJrot6/nur/lkKYpXFxuXFxuICAgICAgICAvL+aOkuW6j+S4jumAiembhlxcbiAgICAgICAgdmFyIGxhenkgPSBgQGxhenlSdWxlPS5qczpgICsg5ryr55S76Kej5p6QO1xcbiAgICAgICAg5re75Yqg5YiX6KGo56ug6IqCKGQsIOeroOiKgmpzb25b6YCJ5oup5YiX6KGoXS50aXRsZSwg56ug6IqCanNvblvpgInmi6nliJfooahdLmxpc3QsIGxhenksIOW9k+WJjVVSTCwgJycpXFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIlxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgc2V0UmVzdWx0KGQpXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5LqM57qn5YiX6KGoKlwiLFwicGF0aFwiOlwiZWpsYlwiLFwicnVsZVwiOlwidmFyIHRhYnMgPSBbXVxcbnZhciBsaXN0cyA9IFtdXFxudmFyIGFydHMgPSBwZGZhKGh0bWwsIOe6v+i3ryk7XFxuYXJ0cy5mb3JFYWNoKChkYXRhLCBpZCkgPT4ge1xcbiAgICB0YWJzLnB1c2gocGRmaChkYXRhLCDnur/ot6/lkI0pKVxcbn0pXFxudmFyIGNvbnRzID0gcGRmYShodG1sLCDpgInpm4YpO1xcbmNvbnRzLmZvckVhY2goKGRhdGEsI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WQxOVxcXCI+5q2j5bqPJyk7XFxuICAgICAgICB2YXIg5o+Q56S6ID0g5o6S5bqPID09ICcjRkYwMDAwXFxcIj7lgJLluo8nID8gJyMxYWFkMTlcXFwiPuato+W6jycgOiAnI0ZGMDAwMFxcXCI+5YCS5bqPJztcXG4gICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBNWV9VUkwgKyBcXFwiX+aOkuW6j1xcXCJcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHRpdGxlOiDmjpLluo/lkI0ucmVwbGFjZSgn5o6S5bqPJywg5o+Q56S6KVxcbiAgICAgICAgfSlcXG4gICAgICAgIGlmICjmjpLluo8gPT0gJyMxYWFkMTlcXFwiPuato+W6jycpIHtcXG4gICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgY3AgPSDnq6DoioIubWFwKChkYXRhLCBzc2lkKSA9PiB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSwgJ2EmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgdXJsOiBwZChkYXRhLCAnYSYmaHJlZicpICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9KTtcXG4gICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhNWV9VUkwgKyBcXFwiX+mAiembhlxcXCIpO1xcbiAgICAgICAgYWRkSXRlbUJlZm9yZShNWV9VUkwgKyBcXFwiZm9vdGVyXFxcIiwgY3ApO1xcbiAgICAgICAgcHV0TX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ICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBNWV9VUkwgKyBcXFwiX+e6v+i3r1xcXCIgKyB4bGlkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgcHV0TXlWYXIoTVlfVVJMLCBpZClcXG4gICAgICAgICAgICB2YXIg56ug6IqCID0gbGlzdHNbZ2V0TXlWYXIoTVlfVVJMLCAnMCcpXTtcXG4gICAgICAgICAgICBpZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcIj7lgJLluo8nKSB7XFxuICAgICAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGNwID0g56ug6IqCLm1hcCgoZGF0YSwgc3NpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSwgJ2EmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogcGQoZGF0YSwgJ2EmJmhyZWYnKSArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKE1ZX1VSTCArIFxcXCJf6YCJ6ZuGXFxcIik7XFxuICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShNWV9VUkwgKyBcXFwiZm9vdGVyXFxcIiwgY3ApO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB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1cmwgPSBpbnB1dC5yZXBsYWNlKCdtJywnd3d3Jyk7XFxuICAgICAgICAgICAgZXZhbChwZGZoKGZldGNoUEModXJsKSwgXFxcImJvZHkmJnNjcmlwdCYmSHRtbFxcXCIpKTtcXG4gICAgICAgICAgICB2YXIgcGljcyA9IFtdO1xcbiAgICAgICAgICAgIGlmIChjaGFwdGVySW1hZ2VzLmxlbmd0aCA+IDEpIHtcXG4gICAgICAgICAgICAgICAgY2hhcHRlckltYWdlcy5mb3JFYWNoKGltZyA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwaWNzLnB1c2goaW1nKydAUmVmZXJlcj0nK3VybClcXG4gICAgICAgICAgICAgICAgfSl9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSByZXF1ZXN0KGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnYm9keSYmLnNjcm9sbC1pdGVtJyk7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZmlyc3QgPSBwZGZhKGh0bWwsICdib2R5JiYjaW1hZ2UnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBmaXJzdC5jb25jYXQobGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0LmZvckVhY2goaW1nID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljcy5wdXNoKHBkZmgoaW1nLCAnaW1nJiZkYXRhLXNyY3x8c3JjJykrJ0BSZWZlcmVyPScrTVlfSE9NRSlcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJwaWNzOi8vXFxcIiArIHBpY3Muam9pbihcXFwiJiZcXFwiKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB2YXIgbGF6eSA9IGBAbGF6eVJ1bGU9LmpzOmAgKyDmvKvnlLvop6PmnpA7XCJ9LHtcImNv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g4UgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzE5Qjg5RFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcbiAgICAgICAgICAgIH0pXFxuXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxuICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBkZWNpZFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojODA4MDgwXFxcIj4nICsgZGVzX2Rlc2MgKyAnPC9zcGFuPidcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcHV0TXlWYXIoXFxcImpqc1xcXCIsIFxcXCLmlLbotbdcXFwiKTtcXG5cXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5pu05paw6K+m5oOFPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzE5Qjg5RFxcXCI+5bGV5byAPjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcbiAgICAgICAgICAgIH0pXFxuXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxuICAgICAgICAgICAgICAgICAg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Bmb3IgKGxldCBpIGluIGtleXMpIHtcXG4gICAgICAgIHRhcmdldFtrZXlzW2ldXSA9IHNvdXJjZVtrZXlzW2ldXVxcbiAgICB9XFxufVxcblxcbmZ1bmN0aW9uIOaQnOe0oihvYmopIHtcXG4gICAgdmFyIGQgPSBbXTtcXG4gICAgaWYgKCQudHlwZShvYmopID09IFxcXCJzdHJpbmdcXFwiKSB7XFxuICAgICAgICBvYmogPSBjb252ZXJ0MShvYmopXFxuICAgIH1cXG4gICAgaWYgKG9iai7op4TliJkpIHtcXG4gICAgICAgIGxldCBjID0gY29udmVydDEob2JqLuinhOWImSlcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXG4gICAgfVxcbiAgICBsZXQgYXJyID0gcGRmYShnZXRSZXNDb2RlKCksIG9iai7liJfooagpO1xcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgYXJyID0gb2JqLumTvuaOpeWkhOeQhihhcnIpXFxuICAgICAgICB9XFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcbiAgICAgICAgbGV0IHVybCA9IHBkKGl0LCBvYmou6ZO+5o6lKVxcbiAgICAgICAgaWYgKG9iai7pk77mjqXlpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdCwgb2JqLuagh+mimClcXG4gICAgICAgIGlmIChvYmou5qCH6aKY5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICB0aXRsZSA9IG9iai7moIfpopjlpITnkIYodGl0bGUpXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxuICAgICAgICBpZiAob2JqLuWbvueJh+WkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgcGljID0gb2JqLuWbvueJh+WkhOeQhihwaWMpXFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBvYmou5qCH6aKYID8gcGRmaChpdCwgb2JqLuagh+mimCkgOiBcXFwiXFxcIixcXG4gICAgICAgICAgICB1cmw6IHVybCsnI2F1dG9DYWNoZSMnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBvYmou5o+P6L+wID8gcGRmaChpdCwgb2JqLuaPj+i/sCkgOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb250ZW50OiBvYmou6K+m5oOFID8gcGRmaChpdCwgb2JqLuivpuaDhSkgOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBwaWMsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgeXRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgeXBpYzogcGljLFxcbiAgICAgICAgICAgICAgICB5dXJsOiB1cmwucmVwbGFjZSgnaGlrZXI6Ly9lbXB0eSMjJywnJylcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG5cXG4gICAgfVxcbiAgICBzZXRSZXN1bHQoZCk7XFxufVxcbnZhciB0b29sID0ge1xcbiAgICDmkJzntKI6IOaQnOe0olxcbn1cXG4kLmV4cG9ydHMgPSB0b29sXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlm77niYfop6Plr4YqXCIsXCJwYXRoXCI6XCJpbWdERVNcIixcInJ1bGVcIjpcIiQuZXhwb3J0cy5pbWdEZWNyeXB0ID0gZnVuY3Rpb24oKSB7XFxuICAgIHZhciBqYXZhSW1wb3J0ID0gbmV3IEphdmFJbXBvcnRlcigpO1xcbiAgICBqYXZhSW1wb3J0LmltcG9ydFBhY2thZ2UoXFxuICAgICAgICBQYWNrYWdlcy5jb20uZXhhbXBsZS5oaWtlcnZpZXcudXRpbHMsX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