Advertisement
xiaomianao666

邀您一起看:天天评书网𝔥

Nov 17th, 2022
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥天天评书网𝔥@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwiQ2xhc3NUYWJcIixcInBhdGhcIjpcIkNsYXNzVGFiXCIsXCJydWxlXCI6XCJjb25zdCBDbGFzc1RhYiA9IGZ1bmN0aW9uKGNsYXNzQXJyYXksIHBhcmFtcykge1xcbiAgICBPYmplY3QuYXNzaWduKHRoaXMsIHBhcmFtcylcXG4gICAgdGhpcy5hcnIgPSBjbGFzc0FycmF5Lm1hcCh2ID0+IHRoaXMuaW5pdCh2KSlcXG4gICAgdGhpcy5zaWduID0gJyQnICsgUUlOR19USVRMRSArICdfJyArICh0aGlzLm5hbWUgfHwgJycpICsgJ18nXFxuICAgIHRoaXMuY29sb3IgPSB0aGlzLmNvbG9yIHx8ICcjMTJiNjY4J1xcbiAgICB0aGlzLmJvdW5kYXJ5ID0gdGhpcy5ib3VuZGFyeSB8fCAnYmxhbmtfYmxvY2snXFxufVxcbkNsYXNzVGFiLnByb3RvdHlwZSA9IHtcXG4gICAgY29uc3RydWN0b3I6IENsYXNzVGFiLFxcbiAgICBsb2FkKGVsKSB7XFxuICAgICAgICBsZXQgZm9sZGVkID0gdGhpcy5mb2xkICYmIGdldFZhcignZm9sZF8nICsgdGhpcy5zaWduLCAnJylcXG4gICAgICAgIGlmICh0aGlzLmFyci5sZW5ndGggPiAxICYmIHRoaXMuZm9sZCkgZWwucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgKGZvbGRlZCA/ICfilrYnIDogJ+KWvCcpLmZvbnRjb2xvcignIzA0OWVmZicpLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgZm9sZGVkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcignZm9sZF8nICsgc2lnbiwgeyAnJzogJ1QnLCAnVCc6ICcnIH0gW2ZvbGRlZF0pXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBmb2xkZWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pXFxuICAgICAgICBsZXQgYXJyID0gZm9sZGVkID8gW3RoaXMuYXJyWzBdXSA6IHRoaXMuYXJyXFxuICAgICAgICBhcnIuZm9yRWFjaCgodikgPT4ge1xcbiAgICAgICAgICAgIGxldCB7IGlkLCBjbGFzc19uYW1lLCBjbGFzc191cmwgfSA9IHYsXFxuICAgICAgICAgICAgc2VsZWN0ZWQgPSBKU09OLnN0cmluZ2lmeSh0aGlzLmdldENsYXNzKGlkKSlcXG4gICAgICAgICAgICBjbGFzc19uYW1lLmZvckVhY2goKG5hbWUsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGNsYXNzX3VybFtpXSxcXG4gICAgICAgICAgICAgICAgICAgIG5vdyA9IEpTT04uc3RyaW5naWZ5KHsgbmFtZTogbmFtZSwgdXJsOiB1cmwgfSlcXG4gICAgICAgICAgICAgICAgZWwucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2VsZWN0ZWQgPT0gbm93ID8gJ+KAnOKAnOKAneKAnScgKyBuYW1lLmZvbnRjb2xvcih0aGlzLmNvbG9yKS5ib2xkKCkgOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZWxlY3RlZCA9PSBub3cgPyAnaGlrZXI6Ly9lbXB0eScgOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWduLCBpZCwgbm93KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBlbC5wdXNoKHsgY29sX3R5cGU6IHRoaXMuYm91bmRhcnkgfSlcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIGluaXQoY2xhc3NPYmplY3QpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfbmFtZSA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX3VybCA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc191cmwgPSBjb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ICsgJy5qcydcXG4gICAgICAgIGVsc2UgaWYodXJsLnN0YXJ0c1dpdGgoJ2hpa2VyOi8vcGFnZS8nKSkgdXJsID0gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICBpZiAoaW5wdXQgPT0gJ+Wkh+S7vScpIHJldHVybiAkKCdoaWtlcjovL2ZpbGVzL3RtcC8nICsgUUlOR19USVRMRSArICdfYmFja3VwLmpzb24nLCAn6L6T5YWl5aSH5Lu96Lev5b6EJylcXG4gICAgICAgICAgICAuaW5wdXQoKHVybCwgdXBkYXRlSW50ZXJ2YWwsIG5ld1dpbmRvdywgdGFiRm9sZCwgZGlzYWJsZUN1c3RvbSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSByZXF1ZXN0KHVybCksXFxuICAgICAgICAgICAgICAgICAgICBjdXN0b21EYXRhID0gcmVhZEZpbGUoJ2N1c3RvbURhdGEnKVxcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoaW5wdXQsIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUludGVydmFsOiB1cGRhdGVJbnRlcnZhbCxcXG4gICAgICAgICAgICAgICAgICAgIG5ld1dpbmRvdzogbmV3V2luZG93LFxcbiAgICAgICAgICAgICAgICAgICAgdGFiRm9sZDogdGFiRm9sZCxcXG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVDdXN0b206IGRpc2FibGVDdXN0b20sXFxuICAgICAgICAgICAgICAgICAgICBjdXN0b21EYXRhOiBjdXN0b21EYXRhLFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXM6IHJ1bGVzXFxuICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5aSH5Lu977yM5rOo5oSP6Iul5LuT5bqT5Li65a2Q6aG16Z2i5YiZ5LiN5aSH5Lu9J1xcbiAgICAgICAgICAgIH0sIHVybCwgdXBkYXRlSW50Z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+eUqC/npoHnlKgnOlxcbiAgICAgICAgICAgIGQudGl0bGUgPSAodi52aXNpYmxlID8gJ/Cfn6IgICcgOiAn8J+UtCAgJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBydWxlc1tpXS52aXNpYmxlID0gIXJ1bGVzW2ldLnZpc2libGVcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXG4gICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfmm7TmlLnlm77moIcnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxuICAgICAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgICAgIGRlbG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kLnRvU3RyaW5nKChRSU5HX1RJVExFLCB0aXRsZSwgbm93RGF0YSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gW11cXG4gICAgICAgICAgICAgICAgICAgIGxldCByID0ge31cXG4gICAgICAgICAgICAgICAgICAgIGlmIChub3dEYXRhKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB0ID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvZHpIb3VzZS9ydWxlQ2FjaGUvJyArIG5vd0RhdGEgKyAnLmpzb24nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBKU09OLnBhcnNlKGZldGNoKHB0KSkuZmluZCgodikgPT4gdi50aXRsZSA9PSB0aXRsZSlcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgciA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2RhdGFMb2FkP3J1bGU9JyArIFFJTkdfVElUTEUpKCkuZmluZCgodikgPT4gdi50aXRsZSA9PSB0aXRsZSlcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzID0gW3JdXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkocnVsZXMpXFxuICAgICAgICAgICAgICAgIH0sIFFJTkdfVElUTEUsIFJVTEUudGl0bGUsIG5vd0RhdGEpLFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKCdzZWFyY2hLZXknLCAnJyksXFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ3NlYXJjaEtleScsaW5wdXQpXFxcIlxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIC8vIOWkhOeQhk1ZX1JV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gIHYudXJsID0gdXJsXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLmRldGFpbF9maW5kX3J1bGUgPSBydWxlXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLmRldGFpbF9jb2xfdHlwZSA9IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudXJsLnN0YXJ0c1dpdGgoJ2hpa2VyOi8vcGFnZS8nKSkge1xcbiAgICAgICAgICAgICAgICBpZiAodi51cmwuaW5jbHVkZXMoJ3J1bGU9JykgfHwgdi5leHRyYS5ydWxlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICAgICAgbGV0IFtfLCBwYXRoLCBmbGFnLCBwYXJhbXNdID0gdi51cmwubWF0Y2goL15oaWtlcjpcXFxcL1xcXFwvcGFnZVxcXFwvKC4rPykoIy4qPyk/KD86XFxcXD8oLiopKT8kLyksXFxuICAgICAgICAgICAgICAgICAgICBzdWJQYWdlID0gTVlfUlVMRS5wYWdlTGlzdC5maW5kKCh2KSA9PiB2LnBhdGggPT0gcGF0aCksXFxuICAgICAgICAgICAgICAgICAgICBzdWJVcmwgPSAocGFyYW1zIHx8ICcnKS5zcGxpdCgnJicpLmZpbmQoKHYpID0+IHYuc3RhcnRzV2l0aCgndXJsPScpKVxcbiAgICAgICAgICAgICAgICB2LnVybCA9IChzdWJVcmwgPyBzdWJVcmwuc2xpY2UoNCkucmVwbGFjZSgv77yf77yfL2csICc/JykucmVwbGFjZSgv77yG77yGL2csICcmJykgOiAodi5leHRyYSB8fCB7fSkudXJsKSB8fCAnaGlrZXI6Ly9lbXB0eScgKyBmbGFnICsgJz8nICsgKHBhcmFtcyB8fCAnJylcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSA9IHN1YlBhZ2UucnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBzdWJQYWdlLmNvbF90eXBlXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxuICAgICAgICAgICAgICAgIGxldCByZUluZGV4ID0gdi51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHYudXJsID0gdi51cmwuc2xpY2UoMCwgcmVJbmRleCkgKyAnLmpzOlxcXFxuaWYoTVlfUlVMRSlPYmplY3QuYXNzaWduKE1ZX1JVTEUsICcgKyBhc3NpZ25MYXp5UnVsZSArICcpOycgKyB2LnVybC5zbGljZShyZUluZGV4ICsgNClcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCFNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUgfHwgL2hpa2VyOlxcXFwvXFxcXC8oPyFlbXB0eS4rJCkvLnRlc3Qodi51cmwpKSByZXR1cm4gdlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHYuZXh0cmEgPSBPYmplY3QuYXNzaWduKHt9LCB2LmV4dHJhLCB7XFxuICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodi51cmwpLFxcbiAgICAgICAgICAgICAgICBSVUxFOiBNWV9fUlVMRSxcXG4gICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHYudGl0bGUsXFxuICAgICAgICAgICAgICAgIG5vd0RhdGE6IG5vd0RhdGFcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHYudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICB9KSlcXG4gIC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AgICAgICAgIHJldHVybiAnJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxcbiAgICAgICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChkZXRhaWxGaW5kUnVsZSkge1xcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBPYmplY3QuYXNzaWduKGdlbk15UnVsZSgpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWlsX2ZpbmRfcnVsZTogZGV0YWlsRmluZFJ1bGVcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgbm93RGF0YTogbm93RGF0YVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogZ2VuTXlSdWxlKCksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBub3dEYXRhOiBub3dEYXRhXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBteUNvbGxlY3Rpb25fZWwucHVzaChyZXMpXFxuICAgIH0pXFxuICAgIHNldFJlc3VsdChteUNvbGxlY3Rpb25fZWwpXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5pWw5o2u6L295YWlXCIsXCJwYXRoXCI6XCJkYXRhTG9hZFwiLFwicnVsZVwiOlwiJC5leHBvcnRzID0gZnVuY3Rpb24oc2hvd0FsbCkge1xcbiAgICBsZXQgdXJsID0gZ2V0TXlWYXIoJ3JlbW90ZVVybCcpLFxcbiAgICAgICAgZGF0YSA9IFtdXFxuICAgIGlmICh1cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly8nKSB8fCB1cmwuc3RhcnRzV2l0aCgnZmlsZTovLycpKSB7XFxuICAgICAgICAvLyDlpoLmnpzkuLrmnK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57qn5LuT5bqT5peB6L6555qE5oyJ6ZKu5Y2H57qnJOaJqeWxle+8jOWQpuWImeafkOS6m+WKn+iDveS4jeiDveato+W4uOS9v+eUqCcpO1xcbiAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICB0aXRsZTogJ+aPkOekui3ngrnlh7vnoa7lrprlj6/ku6Xlr7zlhaUnLFxcbiAgICAgICAgICBjb250ZW50OiAn6K+35bCd6K+V54K55Ye75LuT5bqT5Li76aG155qE5Y2H57qn5LuT5bqT5peB6L6555qE5oyJ6ZKu5Y2H57qnJOaJqeWxle+8jOWQpuWImeafkOS6m+WKn+iDveS4jeiDveato+W4uOS9v+eUqCcsXFxuICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgIGxldCBydWxlSGVhZCA9ICfmtbfpmJTop4bnlYzvvIznvZHpobXmj5Lku7bvv6Vqc191cmzvv6UkaGlrZXJAJztcXG4gICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgbGV0IHVybCA9ICdodHRwOi8vaGlrZXIubm9raWEucHJlc3MvaGlrZXJ1bGUvcnVsZWxpc3QuanNvbj9pZD01MTExJztcXG4gICAgICAgICAgICAgIGxldCBpbXBvcnRVcmwgPSAncnVsZTovLycrYmFzZTY0RW5jb2RlKHJ1bGVIZWFkK3VybCk7XFxuICAgICAgICAgICAgICByZXR1cm4gaW1wb3J0VXJsXFxuICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgIH0pLFxcbiAgICAgICAgICBjYW5jZWw6ICQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgIFxcbiAgICAgICAgICB9KSxcXG4gICAgICB9KVxcbiAgfVxcbn1cIn1dLFwicGFyYW1zXCI6XCJ7XFxcIlJVTEVcXFwiOntcXFwidGl0bGVcXFwiOlxcXCLlpKnlpKnor4TkuabnvZHwnZSlXFxcIn0sXFxcImlzSW5kZXhcXFwiOnRydWUsXFxcIm5vd0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UUlOR19USVRMRSkpLnJ1bGUpXFxuICAgICAgICB0YWJIZWFkZXIubG9hZChteUNvbGxlY3Rpb25fZWwpXFxuICAgICAgICBpZiAoUlVMRS5zZWFyY2hfdXJsKSBteUNvbGxlY3Rpb25fZWwucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLmkJzntKJcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCLmkJzkvaDmg7PopoHnmoQuLi5cXFwiLFxcbiAgICAgICAgICAgIHVybDogJ1xcXCJoaWtlcjovL3NlYXJjaD9zPVxcXCIraW5wdXQnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIHJ1bGVzOiAkLnRvU3RyaW5nKChRSU5HX1RJVExFLCB0aXRsZSwgbm93RGF0YSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gW11cXG4gICAgICAgICAgICAgICAgICAgIGxldCByID0ge31cXG4gICAgICAgICAgICAgICAgICAgIGlmIChub3dEYXRhKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB0ID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvZHpIb3VzZS9ydWxlQ2FjaGUvJyArIG5vd0RhdGEgKyAnLmpzb24nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBKU09OLnBhcnNlKGZldGNoKHB0KSkuZmluZCgodikgPT4gdi50aXRsZSA9PSB0aXRsZSlcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgciA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2RhdGFMb2FkP3J1bGU9JyArIFFJTkdfVElUTEUpKCkuZmluZCgodikgPT4gdi50aXRsZSA9PSB0aXRsZSlcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzID0gW3JdXFxuICAgICAgICAgICAgICAgICAgICBy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HYpID0+IHYuc3RhcnRzV2l0aCgndXJsPScpKVxcbiAgICAgICAgICAgICAgICB2LnVybCA9IChzdWJVcmwgPyBzdWJVcmwuc2xpY2UoNCkucmVwbGFjZSgv77yf77yfL2csICc/JykucmVwbGFjZSgv77yG77yGL2csICcmJykgOiAodi5leHRyYSB8fCB7fSkudXJsKSB8fCAnaGlrZXI6Ly9lbXB0eScgKyBmbGFnICsgJz8nICsgKHBhcmFtcyB8fCAnJylcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSA9IHN1YlBhZ2UucnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBzdWJQYWdlLmNvbF90eXBlXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxuICAgICAgICAgICAgICAgIGxldCByZUluZGV4ID0gdi51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHYudXJsID0gdi51cmwuc2xpY2UoMCwgcmVJbmRleCkgKyAnLmpzOlxcXFxuaWYoTVlfUlVMRSlPYmplY3QuYXNzaWduKE1ZX1JVTEUsICcgKyBhc3NpZ25MYXp5UnVsZSArICcpOycgKyB2LnVybC5zbGljZShyZUluZGV4ICsgNClcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCFNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUgfHwgL2hpa2VyOlxcXFwvXFxcXC8oPyFlbXB0eS4rJCkvLnRlc3Qodi51cmwpKSByZXR1cm4gdlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHYuZXh0cmEgPSB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1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHYgPT0gJyonKSByZXR1cm4gJydcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxcbiAgICAgICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChkZXRhaWxGaW5kUnVsZSkge1xcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBPYmplY3QuYXNzaWduKGdlbk15UnVsZSgpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWlsX2ZpbmRfcnVsZTogZGV0YWlsRmluZFJ1bGVcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgbm93RGF0YTogbm93RGF0YVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogZ2VuTXlSdWxlKCksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBub3dEYXRhOiBub3dEYXRhXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBteUNvbGxlY3Rpb25fZWwucHVzaChyZXMpXFxuICAgIH0pXFxuICAgIHNldFJlc3VsdChte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mwgfSlcXFxcbiAgICAgICAgICAgICAgICBlbC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHNlbGVjdGVkID09IG5vdyA/ICfigJzigJzigJ3igJ0nICsgbmFtZS5mb250Y29sb3IodGhpcy5jb2xvcikuYm9sZCgpIDogbmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZWxlY3RlZCA9PSBub3cgPyAnaGlrZXI6Ly9lbXB0eScgOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWduLCBpZCwgbm93KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoc2lnbiArIGlkLCBub3cpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBpZCwgbm93KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgZWwucHVzaCh7IGNvbF90eXBlOiB0aGlzLmJvdW5kYXJ5IH0pXFxcXG4gICAgICAgIH0pXFxcXG4gICAgfSxcXFxcbiAgICBpbml0KGNsYXNzT2JqZWN0KSB7XFxcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfbmFtZSA9PSAnc3RyaW5nJylcXFxcbiAgICAgICAgICAgIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPSBjbGFzc09iamVjdC5jbGFzc19uYW1lLnNwbGl0KCcmJylcXFxcbiAgICAgICAgaWYgKHR5cGVvZiBjbGFzc09iamVjdC5jbGFzc191cmwgPT0gJ3N0cmluZycpXFxcXG4gICAgICAg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N0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcXFxuICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXFxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXFxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXFxcbiAgICAgICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxcXG4gICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXFxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxcXG4gICAgICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZXNbaV0uaWNvblxcXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgICAgICBjYXNlICflr7zlhaXmtbfpmJQnOlxcXFxu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cbiAgICAgICAgICAgICAgICAgICAgbGV0IHIgPSB7fVxcXFxuICAgICAgICAgICAgICAgICAgICBpZiAobm93RGF0YSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB0ID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvZHpIb3VzZS9ydWxlQ2FjaGUvJyArIG5vd0RhdGEgKyAnLmpzb24nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgciA9IEpTT04ucGFyc2UoZmV0Y2gocHQpKS5maW5kKCh2KSA9PiB2LnRpdGxlID09IHRpdGxlKVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgciA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2RhdGFMb2FkP3J1bGU9JyArIFFJTkdfVElUTEUpKCkuZmluZCgodikgPT4gdi50aXRsZSA9PSB0aXRsZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICBydWxlcyA9IFtyXVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkocnVsZXMpXFxcXG4gICAgICAgICAgICAgICAgfSwgUUlOR19USVRMRSwgUlVMRS50aXRsZSwgbm93RGF0YSksXFxcXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRNeVZhcignc2VhcmNoS2V5JywgJycpLFxcXFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFxcXFxcInB1dE15VmFyKCdzZWFyY2hLZXknLGlucHV0KVxcXFxcXFwiXFxcXG4gICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiaW5wdXRcXFxcXFxcIixcXFxcbiAgICAgICAgfSlcXFxcbiAgICB9XFxcXG4gICAgLy8g5aSE55CGTVlfUlVMRVxcXFxuICAgIE1ZX1JVTEUudXJsID0gUlVMRS51cmxcXF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9PiB7XFxcXG4gICAgICAgIGxldCBbdGl0bGUsIGltZywgZGVzYywgdXJsXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2ID09ICcqJykgcmV0dXJuICcnXFxcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbShkYXRhLCB2KSA6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnJ1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgcmVzID0ge1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcXFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxcXFxuICAgICAgICAgICAgICAgIGltZzogaW1nLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBNWV9SVUxFLmNvbF90eXBlXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxcXG4gICAgICAgICAgICBpZiAocmVzLnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IE9iamVjdC5hc3NpZ24oZ2VuTXlSdWxlKCksIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRldGFpbF9maW5kX3J1bGU6IGRldGFpbEZpbmRSdWxlXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIG5vd0RhdGE6IG5vd0RhdGFcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXFxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlKSB7XFxcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGdlbk15UnVsZSgpLFxcXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIG5vd0RhdGE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bliJnmn5Dkupvlip/og73kuI3og73mraPluLjkvb/nlKgnLFxcXFxuICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKCk9PntcXFxcbiAgICAgICAgICAgICAgbGV0IHJ1bGVIZWFkID0gJ+a1t+mYlOinhueVjO+8jOe9kemhteaPkuS7tu+/pWpzX3VybO+/pSRoaWtlckAnO1xcXFxuICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgICAgbGV0IHVybCA9ICdodHRwOi8vaGlrZXIubm9raWEucHJlc3MvaGlrZXJ1bGUvcnVsZWxpc3QuanNvbj9pZD01MTExJztcXFxcbiAgICAgICAgICAgICAgbGV0IGltcG9ydFVybCA9ICdydWxlOi8vJytiYXNlNjRFbmNvZGUocnVsZUhlYWQrdXJsKTtcXFxcbiAgICAgICAgICAgICAgcmV0dXJuIGltcG9ydFVybFxcXFxuICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgfSksXFxcXG4gICAgICAgICAgY2FuY2VsOiAkLnRvU3RyaW5nKCgpPT57XFxcXG4gICAgICAgICAgICAgIFxcXFxuICAgICAgICAgIH0pLFxcXFxuICAgICAgfSlcXFxcbiAgfVxcXFxufVxcXCJ9XVwiLFwicHJveHlcIjpcImh0dHBzOi8vaGpkaG54LmNvZGluZy5uZXQvcC9oaWtlci9kL2RyL2dpdC9yYXcvbWFzdGVyL2pzLz0+aHR0cHM6Ly9naXRjb2RlLm5ldC9xcV8zMjM5NDM1MS9kci8tL3Jhdy9tYXN0ZXIvanMvXCJ9IiwicGljVXJsIjoiaGlrZXI6Ly9pbWFnZXMvaWNvbjEiLCJ0aXRsZSI6IuWkqeWkqeivhOS5pue9kfCdlKUifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement