xiaomianao666

小程序:云盘君(推送)

Jun 4th, 2023
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@云盘君(推送)@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5LqR55uY5ZCbKOaOqOmAgSkiLCJhdXRob3IiOiLlsI/mo4noooTwn4yeKOaOqOmAgeS4juWOn+eUu+WKn+iDvWJ56aaZ6ZuF5oOFKSIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2Z5cGFnZSIsInZlcnNpb24iOjE0LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xuYWRkTGlzdGVuZXIoXG4gICAgJ29uUmVmcmVzaCcsICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICBjbGVhck15VmFyKCdzJylcbiAgICB9KVxuKVxuaWYgKCFmaWxlRXhpc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2ljeS9pY3ktYWxpLXRva2VuLmpzb25cIikpIHtcbiAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goXCJoaWtlcjovL3BhZ2UvTG9naW5cIikpLnJ1bGUpO1xufSBlbHNlIHtcbiAgICBsZXQgbnRva2VuID0gSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9pY3kvaWN5LWFsaS10b2tlbi5qc29uJywge30pKTtcbiAgICBpZiAobnRva2VuWzBdLnJlZnJlc2hfdG9rZW4pIHtcbiAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9wYWdlL3NvdVwiKSkucnVsZSk7XG4gICAgICAgIGxldCBzID0gZ2V0TXlWYXIoJ3MnLCAnJyk7XG4gICAgICAgIGlmIChzID09IFwiXCIpIHtcbiAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcblxuICAgICAgICAgICAgICAgIGhlYWRlciA9IHtcbiAgICAgICAgICAgICAgICAgICAgJ1VzZXItQWdlbnQnOiAnTW96aWxsYS81LjAgKExpbnV4OyBBbmRyb2lkIDYuMDsgTmV4dXMgNSBCdWlsZC9NUkE1OE4pIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS85OS4wLjQ4NDQuNTEgTW9iaWxlIFNhZmFyaS81MzcuMzYnLFxuICAgICAgICAgICAgICAgICAgICAnSG9zdCc6ICd0b3AuYmFpZHUuY29tJyxcbiAgICAgICAgICAgICAgICAgICAgJ0FjY2VwdCc6ICdhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L3BsYWluLCAqLyonLFxuICAgICAgICAgICAgICAgICAgICAnQWNjZXB0LUxhbmd1YWdlJzogJ3poLUNOLHpoO3E9MC45LGVuLVVTO3E9MC44LGVuO3E9MC43JyxcbiAgICAgICAgICAgICAgICAgICAgJ0FjY2VwdC1FbmNvZGluZyc6ICdnemlwLCBkZWZsYXRlLCBicicsXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogJ2h0dHBzOi8vdG9wLmJhaWR1LmNvbS9ib2FyZD90YWI9bm92ZWwnLFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQganNvbjtcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKCd0b3BiYWlkdScsICcxJykgPT0gJzEnID8gJ+eUteinhuWJp+eDreaQnOamnOKImicgOiAn55S16KeG5Ymn54Ot5pCc5qacJyksXG4gICAgICAgICAgICAgICAgICAgIHVybDogYGhpa2VyOi8vZW1wdHkjbm9Mb2FkaW5nI0BsYXp5UnVsZT0uanM6Z2V0TXlWYXIoJ3RvcGJhaWR1JywnMScpPT0nMSc/cHV0TXlWYXIoJ3RvcGJhaWR1JywnMCcpOnB1dE15VmFyKCd0b3BiYWlkdScsJzEnKTtyZWZyZXNoUGFnZSgpOydoaWtlcjovL2VtcHR5J2AsXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXG4gICAgICAgICAgICAgICAgfSx7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoJ3RvcGJhaWR1JywgJzEnKSA9PSAnMCcgPyAn55S15b2x54Ot5pCc5qac4oiaJyA6ICfnlLXlvbHng63mkJzmppwnKSxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBgaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjQGxhenlSdWxlPS5qczpnZXRNeVZhcigndG9wYmFpZHUnLCcxJyk9PScxJz9wdXRNeVZhcigndG9wYmFpZHUnLCcwJyk6cHV0TXlWYXIoJ3RvcGJhaWR1JywnMScpO3JlZnJlc2hQYWdlKCk7J2hpa2VyOi8vZW1wdHknYCxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcigndG9wYmFpZHUnLCAnMScpID09IFwiMVwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcignZHNqanNvbicsIFwiXCIpID09IFwiXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSByZXF1ZXN0KCdodHRwczovL3RvcC5iYWlkdS5jb20vYXBpL2JvYXJkP3BsYXRmb3JtPXdpc2UmdGFiPXRlbGVwbGF5JnRhZz0lN0IlN0QnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdkc2pqc29uJywganNvbik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBqc29uID0gZ2V0TXlWYXIoJ2Rzampzb24nKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcignZHlqc29uJywgJycpID09IFwiXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSByZXF1ZXN0KCdodHRwczovL3RvcC5iYWlkdS5jb20vYXBpL2JvYXJkP3BsYXRmb3JtPXdpc2UmdGFiPW1vdmllJnRhZz0lN0IlN0QnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdkeWpzb24nLCBqc29uKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSBnZXRNeVZhcignZHlqc29uJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBKU09OLnBhcnNlKGpzb24pLmRhdGEuY2FyZHNbMF0uY29udGVudDtcblxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGxpc3RbaV0ud29yZCArICcgICAgKCcgKyBsaXN0W2ldLnNob3dbMl0gKyAnKSc7XG4gICAgICAgICAgICAgICAgICAgIGxldCBkZXMgPSBsaXN0W2ldLmRlc2M7XG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaSA9PSBcIjBcIiA/ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cImNvbG9yOiNmZjMzMDBcIj4nICsgKHBhcnNlSW50KGkpICsgMSkudG9TdHJpbmcoKSArICc8L3NwYW4+JyArIFwiXFx0XFx0XFx0XCIgKyBuYW1lIDogaSA9PSBcIjFcIiA/ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cImNvbG9yOiNmZjY2MDBcIj4nICsgKHBhcnNlSW50KGkpICsgMSkudG9TdHJpbmcoKSArICc8L3NwYW4+JyArIFwiXFx0XFx0XFx0XCIgKyBuYW1lIDogaSA9PSBcIjJcIiA/ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cImNvbG9yOiNmZjk5MDBcIj4nICsgKHBhcnNlSW50KGkpICsgMSkudG9TdHJpbmcoKSArICc8L3NwYW4+JyArIFwiXFx0XFx0XFx0XCIgKyBuYW1lIDogJ+KAnOKAnOKAneKAnTxzcGFuPicgKyAocGFyc2VJbnQoaSkgKyAxKS50b1N0cmluZygpICsgJzwvc3Bhbj4nICsgXCJcXHRcXHRcXHRcIiArIG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG5hbWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gbmFtZS5zcGxpdCgnICAgICgnKVswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigncycsIG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgbmFtZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBkZXMsXG4g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IikpIHtcbiAgICAgICAgc2V0RXJyb3IoJ+eUqOaIt+S/oeaBr+iOt+WPluWksei0pe+8jOivt+eZu+WFpei0puWPt+OAgicpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG50b2tlbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMvaWN5L2ljeS1hbGktdG9rZW4uanNvbicsIHt9KSk7XG4gICAgICAgIGlmIChudG9rZW5bMF0ucmVmcmVzaF90b2tlbikge1xuICAgICAgICAgICAgcmVmdG9rZW4gPSBudG9rZW5bMF0ucmVmcmVzaF90b2tlbjsgICAgICAgICAgICBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNldEVycm9yKCfnlKjmiLfkv6Hmga/ojrflj5blpLHotKXvvIzor7fnmbvlhaXotKblj7fjgIInKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAocmVmdG9rZW4ubGVuZ3RoID09IDMyKSB7XG4gICAgICAgIHZhciByZWZyZXNoID0gZmV0Y2goJ2h0dHBzOi8vYXV0aC5hbGl5dW5kcml2ZS5jb20vdjIvYWNjb3VudC90b2tlbicsIHtcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nLFxuICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXG4gICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tLydcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBib2R5OiAne1wicmVmcmVzaF90b2tlblwiOlwiJyArIHJlZnRva2VuICsgJ1wiLFwiZ3JhbnRfdHlwZVwiOlwicmVmcmVzaF90b2tlblwifScsXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xuICAgICAgICB9KTtcbiAgICAgICAgbnRva2VuWzBdID0gSlNPTi5wYXJz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dCwtMSYmVGV4dFxcXCIpKSArIFxcXCJcXFxcblxcXCIgKyAodSksXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgbmFtZTogXFxcIlVQ5LqR5pCcXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IHVybCA9IFxcXCJodHRwczovL2FwaS51cHl1bnNvMi5jb20vc2VhcmNoP2tleXdvcmQ9XFxcIiArIHMgKyBcXFwiJnBhZ2U9XFxcIiArIHBhZ2UgKyBcXFwiJnNfdHlwZT0xXFxcIjtcXG4gICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QodXJsLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LnVweXVuc28uY29tXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBcXFwiY29kZT0xOTE5XFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgLy9sb2coYmFzZTY0RGVjb2RlKGh0bWwpKTtcXG4gICAgICAgICAgICBsZXQgYXJyID0gSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoaHRtbCkpLnJlc3VsdC5pdGVtcztcXG4gICAgICAgICAgICAvL2xvZyhhcnIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gYXJyW2ldO1xcbiAgICAgICAgICAgICAgICBsZXQgdSA9IGl0LnBhZ2VfdXJsO1xcbiAgICAgICAgICAgICAgICAvL3UgPSB1Lmxlbmd0aCA+IDAgPyB1WzBdIDogdXJsO1xcbiAgICAgICAgICAgICAgICBpZiAoIXUuaW5jbHVkZXMoXFxcImFsaXl1bmRyaXZlXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXQudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAvL3VybDogJ2hpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPScgKyB1ICsgJz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL3B1c2g/dXJsPWhpa2VyOi8vZW1wdHkjIycgKyBlbmNvZGVVUklDb21wb25lbnQodSkgKyAnPz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogd3JhcHUodSksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+VVDkupHmkJw8L2ZvbnQ+Jm5ic3A7XFxcIiArIFxcXCJcXFxcblxcXCIgKyAodSksXFxuICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgbmFtZTogXFxcIueMq+eLuOebmOaQnFxcXCIsXFxuICAgICAgICBwYWdlOiBmYWxzZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoXFxcImh0dHBzOi8vd3d3LmFsaXBhbnNvdS5jb20vc2VhcmNoP2s9XFxcIiArIHMsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYWxpcGFuc291LmNvbS9zZWFyY2g/az1cXFwiICsgc1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcIiNhcHAmJmFcXFwiKTtcXG4gICAgICAgICAgICAvL2xvZyhhcnIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gXFxcIjxkaXY+XFxcIiArIGFycltpXSArIFxcXCI8L2Rpdj5cXFwiO1xcbiAgICAgICAgICAgICAgICBsZXQgdSA9IHBkZmgoaXQsIFxcXCJhJiZocmVmXFxcIik7XFxuICAgICAgICAgICAgICAgIC8vbG9nKHUpO1xcbiAgICAgICAgICAgICAgICBpZiAoIXUuaW5jbHVkZXMoXFxcIi9zL1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB1ID0gXFxcImh0dHBzOi8vd3d3LmFsaXBhbnNvdS5jb21cXFwiICsgdS5yZXBsYWNlKFxcXCIvcy9cXFwiLCBcXFwiL2N2L1xcXCIpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoaXQsIFxcXCJ0ZW1wbGF0ZSYmVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHUpLmxhenlSdWxlKCh3cmFwdSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChpbnB1dCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogXFxcIm5vX3Nob3dfZG9uYXRlPTFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBpbnB1dC5yZXBsYWNlKFxcXCIvY3YvXFxcIiwgXFxcIi9zL1xcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgPSBwYXJzZURvbUZvckh0bWwoaHRtbCwgJ2EmJmhyZWYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3ZhciBfbGlua3MgPSBodG1sLm1hdGNoKC9odHRwczpcXFxcL1xcXFwvKHd3d1xcXFwuYWxpeXVuZHJpdmVcXFxcLmNvbVxcXFwvc3xhbHl3cFxcXFwubmV0KVxcXFwvXFxcXHcqL2cpIHx8IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKF9saW5rcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGh0bWwubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiAnaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9JyArIF9saW5rc1swXSArICc/P2Z5cGFnZSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD91cmw9aGlrZXI6Ly9lbXB0eSMjJyArIGVuY29kZVVSSUNvbXBvbmVudChodG1sKSArICc/Pz9meXBhZ2UnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHUoaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIHdyYXB1KSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT7njKvni7jnm5jmkJw8L2ZvbnQ+Jm5ic3A7XFxcIiArIHBkZmgoaXQsIFxcXCJ0ZW1wbGF0ZSwxJiZUZXh0XFxcIiksXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgbmFtZTogXFxcIuaYk+aQnFxcXCIsXFxuICAgICAgICBwYWdlOiB0cnVlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGV2YWwoZ2V0Q3J5cHRvSlMoKSk7XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24ga2V5ZW4oc3RyKSB7XFxuICAgICAgICAgICAgICAgIHZhciBrZXkgPSBDcnlwdG9KUy5lbmMuVXRmOC5wYXJzZShcXFwiNE9Ub1NjVUZPYWVWVHJIRVxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgaXYgPSBDcnlwdG9KUy5lbmMuVXRmOC5wYXJzZShcXFwiOUNMR2FvMXZIS3FtMTdPelxcXCIpO1xcbiAgICAgICAgICAgICAgICB2YXIgZW5jcnlwdGVkID0gQ3J5cHRvSlMuQUVTLmRlY3J5cHQoe1xcbiAgICAgICAgICAgICAgICAgICAgY2lwaGVydGV4dDogQ3J5cHRvSlMuZW5jLkJhc2U2NC5wYXJzZShzdHIpXFxuICAgICAgICAgICAgICAgIH0sIGtleSwge1xcbiAgICAgICAgICAgICAgICAgICAgaXY6IGl2LFxcbiAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5DQkMsXFxuICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiBDcnlwdG9KUy5wYWQuUGtjczdcXG4gICAgICAgICAgICAgICAgfSkudG9TdHJpbmcoQ3J5cHRvSlMuZW5jLlV0ZjgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZW5jcnlwdGVkO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoXFxcImh0dHBzOi8veWlzby5mdW4vYXBpL3NlYXJjaD9uYW1lPVxcXCIgKyBzICsgXFxcIiZwYWdlTm89XFxcIiArIHBhZ2UsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly95aXNvLmZ1bi9pbmZvP3NlYXJjaEtleT1cXFwiICsgcyxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBnZXRJdGVtKCd5aXNvdWNvb2tlJywgJycpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAvL2xvZyhodG1sKTtcXG4gICAgICAgICAgICBpZiAoaHRtbC5pbmNsdWRlcygn55m75b2V55So5oi35peg6ZmQ5Yi2JykpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGkgPSAwO1xcbiAgICAgICAgICAgICAgICBkbyB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgdHlpbWdsaW4gPSAnaHR0cHM6Ly95aXNvLmZ1bi9hcGkvdXNlci9sb2dpbi9jYXB0Y2hhP3Q9JyArIHBhcnNlSW50KG5ldyBEYXRlKCkuZ2V0VGltZSgpKSArICcnO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGltZyA9IGNvbnZlcnRCYXNlNjRJbWFnZSh0eWltZ2xpbikuc3BsaXQoJywnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2QgPSByZXF1ZXN0KCdodHRwczovL2FwaS5ubi5jaS9vY3IvYjY0L3RleHQnLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ3RleHQvcGxhaW4nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBpbWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZlciA9IEpTT04ucGFyc2UocmVxdWVzdCgnaHR0cHM6Ly95aXNvLmZ1bi9hcGkvdXNlci9sb2dpbicsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdyZWZlcmVyJzogJ2h0dHBzOi8veWlzby5mdW4vbG9naW4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQ29va2llJzogZ2V0Q29va2llKHR5aW1nbGluKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwidXNlck5hbWVcXFwiOiBcXFwidHZib3gyMDIzXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInBhc3N3b3JkXFxcIjogXFxcIlR2Ym94MjAyM1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJjb2RlXFxcIjogY29kXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZlci5jb2RlID09IDIwMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5piT5pCc55m75YWl6aqM6K+B5oiQ5YqfJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgneWlzb3Vjb29rZScsIGdldENvb2tpZSgnaHR0cHM6Ly95aXNvLmZ1bicpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gcmVxdWVzdChcXFwiaHR0cHM6Ly95aXNvLmZ1bi9hcGkvc2VhcmNoP25hbWU9XFxcIiArIHMgKyBcXFwiJnBhZ2VObz1cXFwiICsgcGFnZSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3lpc28uZnVuL2luZm8/c2VhcmNoS2V5PVxcXCIgKyBzLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGdldEl0ZW0oJ3lpc291Y29va2UnLCAnJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaSsrO1xcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChpIDwgNCk7XFxuXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBhcnIgPSBKU09OLnBhcnNlKGh0bWwpLmRhdGEubGlzdDtcXG4gICAgICAgICAgICAvL2xvZyhhcnIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gYXJyW2ldO1xcbiAgICAgICAgICAgICAgICBsZXQgdSA9IGtleWVuKGl0LnVybCk7XFxuICAgICAgICAgICAgICAgIC8vbG9nKHUpO1xcbiAgICAgICAgICAgICAgICBpZiAodSA9PSBudWxsIHx8ICF1LmluY2x1ZGVzKFxcXCJhbGl5dW5cXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi4oCc4oCc4oCd4oCdXFxcIiArIGl0Lm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAvL3VybDogJ2hpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPScgKyB1ICsgJz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL3B1c2g/dXJsPWhpa2VyOi8vZW1wdHkjIycgKyBlbmNvZGVVUklDb21wb25lbnQodSkgKyAnPz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogd3JhcHUodSksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+5piT5pCcPC9mb250PiZuYnNwO1xcXCIgKyAoaXQuZ210U2hhcmUgfHwgaXQuZ210Q3JlYXRlKSArIFxcXCJcXFxcblxcXCIgKyAodSksXFxuICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgbmFtZTogXFxcIuaJvui1hOa6kFxcXCIsXFxuICAgICAgICBwYWdlOiB0cnVlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldGh0bWwoKSB7XFxuICAgICAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChcXFwiaHR0cHM6Ly96aGFveml5dWFuLmxhL3NvP2ZpbGVuYW1lPVxcXCIgKyBzICsgXFxcIiZwYWdlPVxcXCIgKyBwYWdlLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly96aGFveml5dWFuLmxhL3N0b3AuaHRtbFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIm9yaWdpblxcXCI6IFxcXCJodHRwczovL3poYW96aXl1YW4ubGFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBnZXRJdGVtKFxcXCJ6enljb29rZVxcXCIsIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwidXBncmFkZS1pbnNlY3VyZS1yZXF1ZXN0c1xcXCI6IFxcXCIxXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiY29udGVudC10eXBlXFxcIjogXFxcImFwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBodG1sO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSBnZXRodG1sKCk7XFxuICAgICAgICAgICAgaWYgKCFodG1sLmluY2x1ZGVzKFxcXCJzZWFyY2hfYm94XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHVzZXIgPSAnZFhObGNtNWhiV1U5ZVhCcU1qQXlNeVp3WVhOemQyOXlaRDE1Y0dveU1ESXonO1xcbiAgICAgICAgICAgICAgICBsZXQgY29vayA9IEpTT04ucGFyc2UoZmV0Y2hDb29raWUoJ2h0dHBzOi8vemhhb3ppeXVhbi5sYS9sb2dpdS5odG1sJywge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogTU9CSUxFX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAnT3JpZ2luJzogJ2h0dHBzOi8vemhhb3ppeXVhbi5sYScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly96aGFveml5dWFuLmxhL2xvZ2luLmh0bWwnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cGdyYWRlLWluc2VjdXJlLXJlcXVlc3RzXFxcIjogXFxcIjFcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgYm9keTogYmFzZTY0RGVjb2RlKHVzZXIpLFxcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXFxuICAgICAgICAgICAgICAgICAgICBvbmx5SGVhZGVyczogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgIHdpdGhIZWFkZXJzOiB0cnVlXFxuICAgICAgICAgICAgICAgIH0pKS5qb2luKCc7Jyk7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInp6eWNvb2tlXFxcIiwgY29vayk7XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwi5om+6LWE5rqQ55m75YWlXFxcIik7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBnZXRodG1sKCk7XFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGxldCBhcnIgPSBwZGZhKGh0bWwsIFxcXCJib2R5JiYubmV3c0xpc3QmJmxpOm5vdCg6Zmlyc3QtY2hpbGQpXFxcIik7XFxuICAgICAgICAgICAgLy9sb2coYXJyKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgICAgICAgICAgbGV0IHUgPSBwZGZoKGl0LCBcXFwiYSYmaHJlZlxcXCIpO1xcbiAgICAgICAgICAgICAgICBpZiAodSA9PSBudWxsKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB1ID0gXFxcImh0dHBzOi8vemhhb3ppeXVhbi5sYS9cXFwiICsgdTtcXG4gICAgICAgICAgICAgICAgLy9sb2codSk7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXQsIFxcXCIubmV3c190ZXh0JiZoMyYmVGV4dFxcXCIpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmMTNiNjZhPuaJvui1hOa6kDwvZm9udD4mbmJzcDtcXFwiICsgKHBkZmgoaXQsIFxcXCIubmV3c190ZXh0JiZwJiZUZXh0XFxcIikpLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHUpLmxhenlSdWxlKCh3cmFwdSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF9saW5rcyA9IGh0bWwubWF0Y2goL2h0dHBzOlxcXFwvXFxcXC8od3d3XFxcXC5hbGl5dW5kcml2ZVxcXFwuY29tXFxcXC9zfGFseXdwXFxcXC5uZXQpXFxcXC9cXFxcdyovZykgfHwgW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coX2xpbmtzKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoX2xpbmtzLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gJ2hpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPScgKyBfbGlua3NbMF0gKyAnPz9meXBhZ2UnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiAnaGlrZXI6Ly9wYWdlL3B1c2g/dXJsPWhpa2VyOi8vZW1wdHkjIycgKyBlbmNvZGVVUklDb21wb25lbnQoX2xpbmtzWzBdKSArICc/Pz9meXBhZ2UnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHUoX2xpbmtzWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSwgd3JhcHUpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgbmFtZTogXFxcIuWwj+e6uOadoVxcXCIsXFxuICAgICAgICBwYWdlOiBmYWxzZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBmdW5jdGlvbiBjYXRfY29kZShhKSB7X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ZnJvbTogXFxcIndlYlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBrZXl3b3JkOiBzXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGxldCBsaXN0ID0gSlNPTi5wYXJzZShodG1sKTtcXG4gICAgICAgICAgICBpZiAobGlzdC5kYXRhKSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSBsaXN0LmRhdGE7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICBsZXQgaXQgPSBsaXN0W2ldXFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0LnRpdGxlO1xcbiAgICAgICAgICAgICAgICBsZXQgbXVybCA9ICdodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vcy8nICsgaXQua2V5XFxuICAgICAgICAgICAgICAgIGlmICh0aXRsZS5pbmNsdWRlcyhzKSkge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmMTNiNjZhPuWwj+e6uOadoTwvZm9udD4mbmJzcDtcXFwiICsgY2F0X2NvZGUoaXQuY2F0KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXM6IGl0LmRlc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD1odHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vcy8nICsgbXVybCArICc/P2Z5cGFnZScsXFxu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gbGV0IHUgPSBwYXJzZURvbUZvckh0bWwoaXQuY29udGVudCwgJ2EmJmhyZWYnKTtcXG4gICAgICAgICAgICAgICAgLy9sb2codSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXQuY29udGVudC5zcGxpdChcXFwiXFxcXG5cXFwiKVswXS5yZXBsYWNlKFxcXCLlkI3np7DvvJpcXFwiLCBcXFwiXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5pbWFnZSxcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9JyArIHUgKyAnPz9meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvcHVzaD91cmw9aGlrZXI6Ly9lbXB0eSMjJyArIGVuY29kZVVSSUNvbXBvbmVudCh1KSArICc/Pz9meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB3cmFwdSh1KSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT7nm5jmkJw8L2ZvbnQ+Jm5ic3A7XFxcIiArIChpdC50aW1lKSArIFxcXCJcXFxcblxcXCIgKyAodSksXFxuICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgbmFtZTogXFxcIueOqeWBtuWTpeWTpVxcXCIsXFxuICAgICAgICBwYWdlOiB0cnVlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCB1cmwgPSBcXFwiaHR0cHM6Ly90dmZhbi54eG9vby5jZi9pbmRleC5waHAvdm9kc2VhcmNoL1xcXCIgKyBzICsgXFxcIi0tLS0tLS0tLS1cXFwiICsgcGFnZSArIFxcXCItLS0uaHRtbFxcXCI7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KHVybCwge30pO1xcbiAgICAgICAgICAgIGxldCBhcnIgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICcubW9kdWxlLWl0ZW1zJiYubW9kdWxlLXNlYXJjaC1pdGVtJyk7XFxuICAgICAgICAgICAgLy9sb2coYXJyKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGxldCBiZXQgPSBbXTtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICBsZXQgaXQgPSBhcnJbaV07XFxuICAgICAgICAgICAgICAgIGxldCB1dGl0bGUgPSBwYXJzZURvbUZvckh0bWwoaXQsICdoMyYmYSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICBsZXQgdXNlcmlhbCA9IHBhcnNlRG9tRm9ySHRtbChpdCwgJy52aWRlby1zZXJpYWwmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgbGV0IHVpbWFnZSA9IHBhcnNlRG9tKGl0LCAnLmxhenlsb2FkJiZkYXRhLXNyYycsICdodHRwczovL3R2ZmFuLnh4b29vLmNmLycpO1xcbiAgICAgICAgICAgICAgICBsZXQgdSA9IHBhcnNlRG9tKGl0LCAnaDMmJmEmJmhyZWYnLCAnaHR0cHM6Ly90dmZhbi54eG9vby5jZi8nKTtcXG4gICAgICAgICAgICAgICAgLy9sZXQgZGV0ID0gcmVxdWVzdCh1LCB7fSk7XFxuICAgICAgICAgICAgICAgIGJldC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB1dGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHUsXFxuICAgICAgICAgICAgICAgICAgICBpbWFnZTogdWltYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogdXNlcmlhbFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGJldC5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgIGxldCBiZXRoID0gYmF0Y2hGZXRjaChiZXQpO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGJldGgubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShiZXRoW2ldLCAnLm1vZHVsZS1wbGF5ZXItbGlzdCYmcCcpXFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGxpc3QubGVuZ3RoOyBqKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAncCYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdS5pbmNsdWRlcyhcXFwiL3MvXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBiZXRbaV0udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGJldFtpXS5pbWFnZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD0nICsgdSArICc/P2Z5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL3B1c2g/dXJsPWhpa2VyOi8vZW1wdHkjIycgKyBlbmNvZGVVUklDb21wb25lbnQodSkgKyAnPz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB3cmFwdSh1KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmMTNiNjZhPueOqeWBtuWTpeWTpTwvZm9udD4mbmJzcDtcXFwiICsgKGJldFtpXS5kZXNjKSArICdcXFxcbicgKyB1LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfVxcbiAgICB9LCB7XFxuICAgICAgICBuYW1lOiBcXFwi6Zi/6YeM5LqR55uY572RXFxcIixcXG4gICAgICAgIHBhZ2U6IHRydWUsXFxuICAgICAgICBmaW5kOiBmdW5jdGlvbihzLCBwYWdlKSB7XFxuICAgICAgICAgICAgbGV0IHVybCA9IFxcXCJodHRwczovL3d3dy5hbHlwdy5jbi9zZWFyY2gucGhwP3E9XFxcIiArIHMgKyBcXFwiJnBhZ2U9XFxcIiArIHBhZ2U7XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KHVybCwge30pO1xcbiAgICAgICAgICAgIGxldCBhcnIgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICcubGlzdCYmbGknKTtcXG4gICAgICAgICAgICAvL2xvZyhhcnIpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgbGV0IGJldCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgICAgICAgICAgbGV0IHV0aXRsZSA9IHBhcnNlRG9tRm9ySHRtbChpdCwgJ2EmJnRpdGxlJyk7XFxuICAgICAgICAgICAgICAgIGxldCB1c2VyaWFsID0gcGFyc2VEb21Gb3JIdG1sKGl0LCAnLmZhLWNsb2NrLW8mJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgbGV0IHVpbWFnZSA9IHBhcnNlRG9tKGl0LCAnaW1nJiZzcmMnLCAnaHR0cHM6Ly93d3cuYWx5cHcuY24vJyk7XFxuICAgICAgICAgICAgICAgIGxldCB1ID0gcGFyc2VEb20oaXQsICdhJiZocmVmJywgJ2h0dHBzOi8vd3d3LmFseXB3LmNuLycpO1xcbiAgICAgICAgICAgICAgICAvL2xldCBkZXQgPSByZXF1ZXN0KHUsIHt9KTtcXG4gICAgICAgICAgICAgICAgaWYgKCF1dGl0bGUuaW5jbHVkZXMocykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGJldC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB1dGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHUsXFxuICAgICAgICAgICAgICAgICAgICBpbWFnZTogdWltYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogdXNlcmlhbFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgLy9sb2coYmV0KTtcXG4gICAgICAgICAgICBpZiAoYmV0Lmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgbGV0IGJldGggPSBiYXRjaEZldGNoKGJldCk7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYmV0aC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBwYXJzZURvbUZvckFycmF5KGJldGhbaV0sICdib2R5JiZhW2hyZWZePWh0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS9zL10nKVxcbiAgICAgICAgICAgICAgICAgICAgLy9sb2cobGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGxpc3QubGVuZ3RoOyBqKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnYSYmaHJlZicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBiZXRbaV0udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGJldFtpXS5pbWFnZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD0nICsgdSArICc/P2Z5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL3B1c2g/dXJsPWhpa2VyOi8vZW1wdHkjIycgKyBlbmNvZGVVUklDb21wb25lbnQodSkgKyAnPz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB3cmFwdSh1KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmMTNiNjZhPumYv+mHjOS6keebmOe9kTwvZm9udD4mbmJzcDtcXFwiICsgKGJldFtpXS5kZXNjKSArICdcXFxcbicgKyB1LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfVxcbiAgICB9LCB7XFxuICAgICAgICBuYW1lOiBcXFwi5Zyf5ouo6bygXFxcIixcXG4gICAgICAgIHBhZ2U6IGZhbHNlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2goJ2h0dHBzOi8vd3d3LnRic2R5LmNvbS9zZWFyY2guaHRtbD9rZXl3b3JkPScgKyBzICsgJyZjYXRlZ29yeT05ODM5MjAmZGF0YV90eXBlPTk4NzkxMCcsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgJ1VzZXItQWdlbnQnOiBQQ19VQVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgbGV0IGFyciA9IHBhcnNlRG9tRm9yQXJyYXkoaHRtbCwgJy5zZWFyY2hfcmVzdWx0X25ldGRpc2tfbGlzdCYmYScpO1xcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gYXJyW2ldO1xcbiAgICAgICAgICAgICAgICAvL2xvZyhpdCk7XFxuICAgICAgICAgICAgICAgIGxldCB1ID0gcGFyc2VEb21Gb3JIdG1sKGl0LCAnYSYmaHJlZicpO1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0ID0gcGFyc2VEb21Gb3JIdG1sKGl0LCAnLm5ldGRpc2tfaXRlbV9kZXRhaWxfbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICBpZiAoIXRpdC5pbmNsdWRlcyhzKSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy9sb2codSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0LFxcbiAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD0nICsgdSArICc/P2Z5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAvL3VybDogJ2hpa2VyOi8vcGFnZS9wdXNoP3VybD1oaWtlcjovL2VtcHR5IyMnICsgZW5jb2RlVVJJQ29tcG9uZW50KHUpICsgJz8/P2Z5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHdyYXB1KHUpLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmMTNiNjZhPuWcn+aLqOm8oOaQnDwvZm9udD4mbmJzcDtcXFwiICsgXFxcIlxcXFxuXFxcIiArIHUsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZDtcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgbmFtZTogXFxcIuWcn+eLl+aQnFxcXCIsXFxuICAgICAgICBwYWdlOiBmYWxzZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoJ2h0dHBzOi8vd3d3LnR1Z291c291LmNvbS9zZWFyY2gnLCB7XFxuICAgICAgICAgICAgICAgIGJvZHk6ICdrZXl3b3JkPScgKyBzLFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgIGxldCBhcnIgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICcubGF5dWktY29udGFpbmVyLDEmJi5sYXl1aS1yb3c6aGFzKGEpJyk7XFxuICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICBsZXQgaXQgPSBhcnJbaV07XFxuICAgICAgICAgICAgICAgIGxldCB1ID0gcGFyc2VEb21Gb3JIdG1sKGl0LCAnYSYmaHJlZicpO1xcbiAgICAgICAgICAgICAgICBpZiAoIXUuaW5jbHVkZXMoXFxcIi9zL1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL2xvZyh1KTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwoaXQsICdhJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICAvL3VybDogJ2hpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPScgKyB1ICsgJz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL3B1c2g/dXJsPWhpa2VyOi8vZW1wdHkjIycgKyBlbmNvZGVVUklDb21wb25lbnQodSkgKyAnPz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogd3JhcHUodSksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+5Zyf54uX5pCcPC9mb250PiZuYnNwO1xcXCIgKyBwYXJzZURvbUZvckh0bWwoaXQsICdwLC0xJiZUZXh0JykgKyBcXFwiXFxcXG5cXFwiICsgdSxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBkO1xcbiAgICAgICAgfVxcbiAgICB9LCB7XFxuICAgICAgICBuYW1lOiBcXFwi5LqR55uY5YiG5Lqr56S+XFxcIixcXG4gICAgICAgIHBhZ2U6IGZhbHNlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGV2YWwoZ2V0Q3J5cHRvSlMoKSk7XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gZGVjcnkoc3RyKSB7XFxuICAgICAgICAgICAgICAgIHZhciBrZXkgPSBDcnlwdG9KUy5lbmMuVXRmOC5wYXJzZShcXFwiNUY2QjJBSzMzREFTRDEyM1xcXCIpO1xcbiAgICAgICAgICAgICAgICB2YXIgZW5jcnlwdGVkID0gQ3J5cHRvSlMuQUVTLmRlY3J5cHQoc3RyLCBrZXksIHtcXG4gICAgICAgICAgICAgICAgICAgIG1vZGU6IENyeXB0b0pTLm1vZGUuRUNCLFxcbiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogQ3J5cHRvSlMucGFkLlBrY3M3XFxuICAgICAgICAgICAgICAgIH0pLnRvU3RyaW5nKENyeXB0b0pTLmVuYy5VdGY4KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGVuY3J5cHRlZDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KCdodHRwczovL3d3dy55dW5wYW5mZW54aWFuZy5jbi9hcGkvYmJzL2FwaS9nZXRkYXRhP2tleT0nICsgcyArICcmdHlwZT12aWRlbycsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cueXVucGFuZmVueGlhbmcuY24vXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgbGV0IGFyciA9IEpTT04ucGFyc2UoZGVjcnkoSlNPTi5wYXJzZShodG1sKS5kYXRhKSk7IC8vWzBdLnJlc3VsdC5pdGVtcztcXG4gICAgICAgICAgICAvL2xvZyhhcnIpO1xcblxcbiAgICAgICAgICAgIGxldCBkID0gW107XFxuICAgICAgICAgICAgbGV0IGJldCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGl0LnBpZDtcXG4gICAgICAgICAgICAgICAgYmV0LnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaHR0cHM6Ly93d3cueXVucGFuZmVueGlhbmcuY24vYXBpL2Jicy9hcGkvZ2V0YXJ0aWNsZT9pZD0nICsgdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cueXVucGFuZmVueGlhbmcuY24vXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vbG9nKHUpO1xcbiAgICAgICAgICAgIGxldCBiZXRoID0gYmF0Y2hGZXRjaChiZXQpO1xcblxcbiAgICAgICAgICAgIC8vbG9nKGFydGljbGUpO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYmV0aC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoYmV0aFtpXSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgLy9sb2coanNvbik7XFxuICAgICAgICAgICAgICAgIGxldCBsaXN0ID0ganNvbi5kb3dubG9hZC5zcGxpdCgnQCcpO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGxpc3QubGVuZ3RoOyBqKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1ID0gbGlzdFtqXTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGpzb24udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD0nICsgdSArICc/P2Z5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvcHVzaD91cmw9aGlrZXI6Ly9lbXB0eSMjJyArIGVuY29kZVVSSUNvbXBvbmVudCh1KSArICc/Pz9meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogd3JhcHUoJ2h0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS9zLycgKyB1KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+5LqR55uY5YiG5Lqr56S+PC9mb250PiZuYnNwO1xcXCIgKyAoaXQuaW5zZXJ0X3RpbWUpICsgXFxcIlxcXFxuXFxcIiArICgnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tL3MvJyArIHUpLFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgcmV0dXJuIGQ7XFxuICAgICAgICB9XFxuICAgIH0sIHtcXG4gICAgICAgIG5hbWU6IFxcXCLpmL/ph4zmkJxcXFwiLFxcbiAgICAgICAgcGFnZTogdHJ1ZSxcXG4gICAgICAgIGZpbmQ6IGZ1bmN0aW9uKHMsIHBhZ2UpIHtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdCgnaHR0cHM6Ly9hbGlzby5jYy9zLycgKyBzICsgJy0nICsgcGFnZSArICctMC5odG1sJywge30pO1xcblxcbiAgICAgICAgICAgIGxldCBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCAnLnNlYXJjaC1yZXN1bHQmJi5yZXNvdXJjZS1pdGVtJyk7XFxuICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBsaXN0Lmxlbmd0aDsgaisrKSB7XFxuICAgICAgICAgICAgICAgIGxldCB1ID0gbGlzdFtqXTtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdCA9IHBhcnNlRG9tRm9ySHRtbCh1LCAnaDMmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgaWYgKCF0aXQuaW5jbHVkZXMocykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBhcnNlRG9tKHUsICdoMyYmYSYmaHJlZicsICdodHRwczovL2FsaXNvLmNjLycpKS5sYXp5UnVsZSgod3JhcHUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKGdldENyeXB0b0pTKCkpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGRlY3J5KHN0cikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIga2V5ID0gQ3J5cHRvSlMuZW5jLlV0ZjgucGFyc2UoXFxcIjlFQjIwRERGRDZBRkJENjhcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVuY3J5cHRlZCA9IENyeXB0b0pTLkFFUy5kZWNyeXB0KHN0ciwga2V5LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdjoga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5DQkMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiBDcnlwdG9KUy5wYWQuUGtjczdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkudG9TdHJpbmcoQ3J5cHRvSlMuZW5jLlV0ZjgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW5jcnlwdGVkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBidXQgPSBwYXJzZURvbShodG1sLCAnLmJ1dHRvbiYmaHJlZicsICdodHRwczovL2FsaXNvLmNjLycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGJ1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGdvdCA9IHJlcXVlc3QoYnV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyhnb3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwocGFyc2VEb21Gb3JIdG1sKGdvdCwgJ2hlYWQmJnNjcmlwdCwxJiZIdG1sJykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB3cmFwdShkZWNyeShiYXNlNjQuc3BsaXQoJyEnKVswXSkpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgfSwgd3JhcHUpLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmMTNiNjZhPumYv+mHjOaQnDwvZm9udD4mbmJzcDtcXFwiICsgcGFyc2VEb21Gb3JIdG1sKHUsICcudGltZSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGQ7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIHtcXG4gICAgICAgIG5hbWU6IFxcXCJET1ZY5pCcXFxcIixcXG4gICAgICAgIHBhZ2U6IGZhbHNlLFxcbiAgICAgICAgZmluZDogZnVuY3Rpb24ocywgcGFnZSkge1xcbiAgICAgICAgICAgIGxldCB1cmwgPSBcXFwiaHR0cHM6Ly9hcGkuZG92eC50ay9hbGkvc2VhcmNoP3dkPVxcXCIgKyBzO1xcbiAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdCh1cmwsIHt9KTtcXG4gICAgICAgICAgICAvL2xvZyhiYXNlNjREZWNvZGUoaHRtbCkpO1xcbiAgICAgICAgICAgIGxldCBhcnIgPSBKU09OLnBhcnNlKGh0bWwpLmxpc3Q7XFxuICAgICAgICAgICAgLy9sb2coYXJyKTtcXG4gICAgICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgICAgICAgICAgbGV0IHUgPSBpdC52b2RfY29udGVudDtcXG4gICAgICAgICAgICAgICAgLy91ID0gdS5sZW5ndGggPiAwID8gdVswXSA6IHVybDtcXG4gICAgICAgICAgICAgICAgaWYgKCF1LmluY2x1ZGVzKFxcXCJhbGl5dW5kcml2ZVxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0LnZvZF9uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaXQudm9kX3BpYyxcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9JyArIHUgKyAnPz9meXBhZ2UnLFxcbiAg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uICAgICAgICAgICAgICAgIGlmICh1ID09IG51bGwgfHwgdCA9PSBudWxsIHx8ICFpdC5pbmNsdWRlcyhzKSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKCFpdC5pbmNsdWRlcyhcXFwi572R55uYXFxcIikgJiYgIWl0LmluY2x1ZGVzKFxcXCLkupHnm5hcXFwiKSAmJlxcbiAgICAgICAgICAgICAgICAgICAgIWl0LmluY2x1ZGVzKFxcXCJhbGl5dW5kcml2ZVxcXCIpICYmICFpdC5pbmNsdWRlcyhcXFwieXVucGFuXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmICh1LnN0YXJ0c1dpdGgoXFxcImh0dHBzOi8vY24uYmluZy5jb20vXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxldCBkb20gPSBnZXRIb21lKHUpLnJlcGxhY2UoXFxcImh0dHA6Ly9cXFwiLCBcXFwiXFxcIikucmVwbGFjZShcXFwiaHR0cHM6Ly9cXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgIGxldCBfbGlua3MgPSB0Lm1hdGNoKC9odHRwczpcXFxcL1xcXFwvKHd3d1xcXFwuYWxpeXVuZHJpdmVcXFxcLmNvbVxcXFwvc3xhbHl3cFxcXFwubmV0KVxcXFwvXFxcXHcqL2cpIHx8IFtdO1xcbiAgICAgICAgICAgICAgICAvL2xvZyhfbGlua3MpO1xcbiAgICAgICAgICAgICAgICBsZXQgYyA9IG51bGw7XFxuICAgICAgICAgICAgICAgIC8vbG9nKF9saW5rcyk7XFxuICAgICAgICAgICAgICAgIC8vaWYgKF9saW5rcy5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgIC8vYyA9ICdoaWtlcjovL3BhZ2UvcHVzaD91cmw9aGlrZXI6Ly9lbXB0eSMjJyArIGVuY29kZVVSSUNvbXBvbmVudChfbGlua3NbMF0pICsgJz8/P2Z5cGFnZSc7XFxuICAgICAgICAgICAgICAgIC8vYz13cmFwdShfbGlua3NbMF0pXFxuICAgICAgICAgICAgICAgIC8vfVxcbiAgICAgICAgICAgICAgICBpZiAoX2xpbmtzLmxlbmd0aCA+IDEgJiYgX2xpbmtzWzFdLnJlcGxhY2UoX2xpbmtzWzBdLCBcXFwiXFxcIikucmVwbGFjZSgvW2EtekEtWjAtOV0rL2csIFxcXCJcXFwiKSA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgYyA9IHdyYXB1KF9saW5rc1sxXSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoX2xpbmtzLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIGMgPSB3cmFwdShfbGlua3NbMF0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdCxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT7lv4XlupQ8L2ZvbnQ+Jm5ic3A7XFxcIiArIGRvbSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogYyAhPSBudWxsID8gYyA6ICQodSkubGF6eVJ1bGUoKHdyYXB1LCBtb2RlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSByZXF1ZXN0KGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgX2xpbmtzID0gaHRtbC5tYXRjaCgvaHR0cHM6XFxcXC9cXFxcLyh3d3dcXFxcLmFsaXl1bmRyaXZlXFxcXC5jb21cXFxcL3N8YWx5d3BcXFxcLm5ldClcXFxcL1xcXFx3Ki9nKSB8fCBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyhfbGlua3MpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vaWYgKF9saW5rcy5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gJ2hpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPScgKyBfbGlua3NbMF0gKyAnPz9meXBhZ2UnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD91cmw9aGlrZXI6Ly9lbXB0eSMjJyArIGVuY29kZVVSSUNvbXBvbmVudChfbGlua3NbMF0pICsgJz8/P2Z5cGFnZSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF9saW5rcy5sZW5ndGggPiAxICYmIF9saW5rc1sxXS5yZXBsYWNlKF9saW5rc1swXSwgXFxcIlxcXCIpLnJlcGxhY2UoL1thLXpBLVowLTldKy9nLCBcXFwiXFxcIikgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdyYXB1KF9saW5rc1sxXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChfbGlua3MubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHUoX2xpbmtzWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZSA9IE1ZX1JVTEUudGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9wYWdlL3lzZng/cnVsZT1cXFwiICsgcnVsZSArIFxcXCImcj1cXFwiICsgcnVsZSArIFxcXCImbW9kZT1cXFwiICsgbW9kZSArI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oXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHRpcCkgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9ob21lQFhZUeaOqOmAgSdcXG4gICAgICAgIH0sIHRpcCksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fMl9yb3VuZFxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJoaWtlcjovL2ltYWdlcy9hY2NvdW50XFxcIlxcbiAgICB9KTtcXG4gICAgbGV0IGRtb2RlID0gZ2V0SXRlbShcXFwiZG1vZGVcXFwiLCBcXFwi5pys5Zyw6L2s56CBXFxcIik7XFxuICAgIGluaXRDb25maWcoe1xcbiAgICAgICAgbW9kZTogZG1vZGVcXG4gICAgfSk7XFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuaooeW8j++8mlxcXCIgKyBkbW9kZSxcXG4gICAgICAgIHVybDogXFxcInNlbGVjdDovL1xcXCIgKyBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLpgInmi6nmqKHlvI9cXFwiLFxcbiAgICAgICAgICAgIG9wdGlvbnM6IFtcXFwi5pys5Zyw6L2s56CBXFxcIiwgXFxcIuWumOaWuUFQUFxcXCJdLFxcbiAgICAgICAgICAgIGNvbDogMSxcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcImRtb2RlXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIuWumOaWuUFQUFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip/vvIzor7fnoa7kv53miYvmnLrmnInlronoo4XpmL/ph4zkupHnm5jlrpjmlrlBUFBcXFwiO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S/ruaUueaIkOWKn+OAglxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl8yX3JvdW5kXFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcImhpa2VyOi8vaW1hZ2VzL2ljb24xXFxcIlxcbiAgICB9KTtcXG5cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiAn5pCc57SiJyxcXG4gICAgICAgIGRlc2M6ICfor7fovpPlhaXlhbPplK7or40nLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIGlmIChpbnB1dC5zdGFydHNXaXRoKCdodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vcy8nKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9wdXNoP3VybD1oaWtlcjovL2VtcHR5IyMnICsgZW5jb2RlVVJJQ29tcG9uZW50KGlucHV0KSArICc/Pz9meXBhZ2UnO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSksXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ3MnLCAnJylcXG4gICAgICAgIH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6v+eoi+WKoOi9vSAgICAgICAgXFxuICAgICAgICBsZXQgcmVhbFBhZ2UgPSBcXFwiXFxcIiA9PSByID8gMSA6IHA7XFxuICAgICAgICBsZXQgdGFza3MgPSBkYXRhLm1hcChpdCA9PiB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocnVsZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJ1bGUuZmluZChzLCByZWFsUGFnZSk7XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHBhcmFtOiBpdCxcXG4gICAgICAgICAgICAgICAgaWQ6IFxcXCJydWxlQFxcXCIgKyBpdC5uYW1lXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBiYXRjaEV4ZWN1dGUodGFza3MsIHtcXG4gICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihwYXJhbSwgaWQsIGVycm9yLCByZXN1bHQpIHtcXG4gICAgICAgICAgICAgICAgLy9sb2coXFxcImxpc3RlbmVyOiBcXFwiICsgKHJlc3VsdCB8fCBbXSkubGVuZ3RoKVxcbiAgICAgICAgICAgICAgICBwYXJhbS5pID0gcGFyYW0uaSArIDE7XFxuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXQgb2YgcmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtLmogPSBwYXJhbS5qICsgMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShwYWdlaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdC50aXRsZS5pbmNsdWRlcyhcXFwi4oCc4oCc4oCd4oCdXFxcIikgPyBpdC50aXRsZSA6IFxcXCLigJzigJzigJ3igJ1cXFwiICsgaXQudGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKFxcXCI8ZW0+fDwvZW0+XFxcIiwgXFxcImdcXFwiKSwgXFxcIlxcXCIpLnJlcGxhY2UobmV3IFJlZ0V4cChzLCBcXFwiZ1xcXCIpLCBcXFwiPHN0cm9uZz48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiAjMUU5MEZGXFxcXFxcXCI+XFxcIiArIHMgKyBcXFwiPC9zcGFuPjwvc3Ryb25nPlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogaXQuZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQudXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaXQucGljX3VybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBpdC5waWNfdXJsID8gJ21vdmllXzFfdmVydGljYWxfcGljJyA6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogXFxcIl9fYXBwXFxcIiArIE1ZX1BBR0UgKyBcXFwiQFxcXCIgKyBwYXJhbS5qLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcblxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5pID49IHBhcmFtLmFsbCkge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbShwYWdlaWQpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWKoOi9veesrFxcXCIgKyBNWV9QQUdFICsgXFxcIumhteS4re+8jOi/m+W6pu+8mlxcXCIgKyAocGFyYW0uaSArIDEpICsgXFxcIi9cXFwiICsgcGFyYW0uYWxsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogcGFnZWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgYWxsOiBkYXRhLmxlbmd0aCxcXG4gICAgICAgICAgICAgICAgaTogMCxcXG4gICAgICAgICAgICAgICAgajogLTFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5pCc57Si6aG16Z2iXCIsXCJwYXRoXCI6XCJzb3VwXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbmlmIChNWV9QQVJBTVMua2V5KSB7XFxuICAgIHB1dE15VmFyKFxcXCJzXFxcIiwgTVlfUEFSQU1TLmtleSk7XFxufVxcbmV2YWw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bGV0IGQgPSBbXVxcbiAgICAgICAgY29uc3Qge1xcbiAgICAgICAgICAgIGJ5dGVzVG9TaXplLFxcbiAgICAgICAgICAgIGNvbG9yXFxuICAgICAgICB9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvdG9vbHMnKTtcXG4gICAgICAgIGxldCBodG1sID0gZmV0Y2goJ2h0dHBzOi8vcGFuLmNjb2YuY2MvYXBpL3NlYXJjaCcsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJjb250ZW50LXR5cGVcXFwiOiAnYXBwbGljYXRpb24vanNvbicsXFxuICAgICAgICAgICAgICAgICdSZWZlcmVyJzogJ2h0dHBzOi8vcGFuLmNjb2YuY2Mvc2VhcmNoP2tleXdvcmQ9JyArIHNcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgXFxcInBhZ2VTaXplXFxcIjogMjAsXFxuICAgICAgICAgICAgICAgIFxcXCJwYWdlTnVtXFxcIjogcGFnZSxcXG4gICAgICAgICAgICAgICAgXFxcImtleXdvcmRcXFwiOiBzLFxcbiAgICAgICAgICAgICAgICBcXFwiZnJvbU1vYmlsZVxcXCI6IHRydWVcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICB9KVxcbiAgICAgICAgbGV0IGxpc3QgPSBKU09OLnBhcnNlKGh0bWwpXFxuICAgICAgICAgICAgLmRhdGEucm93c1xcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsaXN0Lmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgbGV0IGl0ID0gbGlzdFtpXVxcbiAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0LmZpbGVOYW1lXFxuICAgICAgICAgICAgbGV0IG11cmwgPSBpdC51cmxcXG4gICAgICAgICAgICBsZXQgdHlwZSA9IGl0LnR5cGUucmVwbGFjZSgvZm9sZGVyLywgJ+aWh+S7tuWkuScpLnJlcGxhY2UoL2ZpbGUvLCAn5paH5Lu2JylcXG4gICAgICAgICAgICBpZiAodGl0bGUuaW5jbHVkZXMocykpIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT5DQ09GPC9mb250PiZuYnNwOycgKyAn5paH5Lu257G75Z6L77yaJyArIHR5cGUgKyAn77yM5paH5Lu25aSn5bCP77yaJyArIGJ5dGVzVG9TaXplKGl0LnNpemUpLFxcbiAgICAgICAgICAgICAgICAgICAgLy91cmw6ICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD0nICsgbXVybCArICc/P2Z5cGFnZSdcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOiAnaGlrZXI6Ly9wYWdlL3B1c2g/dXJsPWhpa2VyOi8vZW1wdHkjIycgKyBlbmNvZGVVUklDb21wb25lbnQobXVybCkgKyAnPz8/ZnlwYWdlJ1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB3cmFwdShtdXJsKVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBkXFxuICAgIH1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlt6XlhbdcIixcInBhdGhcIjpcInRvb2xzXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBieXRlc1RvU2l6ZShzaXplKSB7XFxuICAgIGlmIChzaXplIDwgMC4xICogMTAyNCkge1xcbiAgICAgICAgLy/lsI/kuo4wLjFLQu+8jOWImei9rOWMluaIkEJcXG4gICAgICAgIHNpemUgPSBzaXplLnRvRml4ZWQoMikgK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pBLVowLTldL1xcbiAgICAgICAgICAgIGxldCBzMSA9IFN0cmluZyhzcGxpdDFbaV0pXFxuICAgICAgICAgICAgbGV0IHMyID0gU3RyaW5nKHNwbGl0MltpXSlcXG4gICAgICAgICAgICBpZiAocmVnZXgudGVzdChzMSkgfHwgcmVnZXgudGVzdChzMikpIHtcXG4gICAgICAgICAgICAgICAgY21wID0gbmV3IGphdmEubGFuZy5TdHJpbmcoc3BsaXQxW2ldKS5jb21wYXJlVG8obmV3IGphdmEubGFuZy5TdHJpbmcoc3BsaXQyW2ldKSk7XFxuICAgICAgICAgICAgICAgIC8vIGNtcCA9IHMxLmxvY2FsZUNvbXBhcmUoczIsICdlbicpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgY21wID0gczEubG9jYWxlQ29tcGFyZShzMiwgJ3poJylcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpZiAoY21wICE9PSAwKSB7XFxuICAgICAgICAgICAgcmV0dXJuIGNtcDtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBsZXQgbGVuZ3RoQ21wID0gc3BsaXQxLmxlbmd0aCAtIHNwbGl0Mi5sZW5ndGg7XFxuICAgIC8vIGlmIChsZW5ndGhDbXAgIT09IDApIGxlbmd0aENtcCA9IGxlbmd0aENtcCA+IDAgPyAtMSA6IDE7XFxuICAgIHJldHVybiBsZW5ndGhDbXA7XFxufVxcblxcbiQuZXhwb3J0cy5zb3J0cyA9IGZ1bmN0aW9uKGxpc3QsIHNvcnQpIHtcXG4gICAgaWYgKHNvcnQgPT09IFxcXCLnsbvlnotcXFwiKSB7XFxuICAgICAgICAvLyBsb2coXFxcIuexu+Wei+aOkuW6j1xcXCIpO1xcbiAgICAgICAgbGlzdC5zb3J0KGZ1bmN0aW9uKGEsIGIpIHtcXG4gICAgICAgICAgICByZXR1cm4gYS50eXBlIC0gYi50eXBlXFxuICAgICAgICB9KTtcXG4gICAgfSBlbHNlIG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AgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5rip6aao5o+Q56S6XFxcIixcXG4gICAgICAgICAgICAgICAgY29udGVudDogXFxcIuajgOa1i+WIsOaWsOeahOejgemTvuWcsOWdgO+8jOeCueWHu+ehruWumuaMiemSruWNs+WPr+aSreaUvu+8jOeCueWHu+WPlua2iOaMiemSruWPr+S7peWkjeWItumTvuaOpVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKG1hZykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hZztcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQpLFxcbiAgICAgICAgICAgICAgICBjYW5jZWw6ICQudG9TdHJpbmcoKG1hZykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJjb3B5Oi8vXFxcIiArIG1hZ1xcbiAgICAgICAgICAgICAgICB9LCBpbnB1dClcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xcbiAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmNsdWRlcyhcXFwiYWxpeXVuZHJpdmUuY29tXFxcIikgJiYgbW9kZSAhPSBcXFwi5a6Y5pa5QVBQXFxcIikge1xcbiAgICAgICAgICAgIC8vbG9nKGlucHV0KTtcXG4gICAgICAgICAgICBpZiAoaW5wdXQuaW5jbHVkZXMoJ2NoZWNrdXJsP3VybD0nKSAmJiBpbnB1dC5pbmNsdWRlcygnJnVybHJlZmVyJykpIHtcXG4gICAgICAgICAgICAgICAgaW5wdXQgPSBkZWNvZGVVUklDb21wb25lbnQoaW5wdXQuc3BsaXQoJyZ1cmxyZWZlcicpWzBdLnNwbGl0KCdjaGVja3VybD91cmw9JylbMV0pO1xcbiAgICAgICAgICAgICAgICAvL2xvZygn6LS05ZCnJytpbnB1dCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiAkLn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N0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuivpuaDhVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXCIgKyBydWxlICsgXFxcIiZyPVxcXCIgKyBydWxlICsgXFxcIiZtb2RlPVxcXCIgKyBtb2RlICsgXFxcIiMjXFxcIiArIHVybCxcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUsIG1vZGUpO1xcbiAgICAgICAgfSBlbHNlIGlmICghaW5wdXQuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgLy9sb2coaW5wdXQpO1xcbiAgICAgICAgICAgIC8v6IO95ZSk6LW3QVBQ55qE55m95ZCN5Y2VXFxuICAgICAgICAgICAgbGV0IHdoaXRlID0gW1xcbiAgICAgICAgICAgICAgICBcXFwicWtsaW5rXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcImJkbmV0ZGlza1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJ4dW5sZWlhcHBcXFwiXFxuICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5zdGFydHNXaXRoKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoIWluV2hpdGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9I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xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJ1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgYm9keTogJ3tcXFwic2hhcmVfaWRcXFwiOlxcXCInICsgc2hhcmVJZCArICdcXFwifScsXFxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgLy9sb2coZ2V0c2hhcik7XFxuICAgICAgICBpZiAoZ2V0c2hhci5pbmNsdWRlcyhcXFwic2hhcmVfbGluayBpcyBmb3JiaWRkZW5cXFwiKSkge1xcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+aWh+S7tui/neinhO+8jOagueaNruebuOWFs+azleW+i+azleinhOimgeaxgu+8jOivpeaWh+S7tuW3suemgeatouiuv+mXruOAgicsXFxuICAgICAgICAgICAgICAgIHVybDogZGVjb2RlVVJJQ29tcG9uZW50KGdldFJlc0NvZGUoKS5zcGxpdCgnIyMnKVsxXSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChnZXRzaGFyLmluY2x1ZGVzKFxcXCJzaGFyZV9saW5rIGlzIGNhbmNlbGxlZFxcXCIpIHx8IGdldHNoYXIuaW5jbHVkZXMoXFxcInNoYXJlX2xpbmsgaXMgZXhwaXJlZFxcXCIpKSB7XFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5p2l5pma5ZWm77yM6K+l5YiG5Lqr5bey5aSx5pWI44CCJyxcXG4gICAgICAgICAgICAgICAgdXJsOiBkZWNvZGVVUklDb21wb25lbnQoZ2V0UmVzQ29kZSgpLnNwbGl0KCcjIycpWzFdKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGdldHNoYXIuaW5jbHVkZXMoXFxcInNoYXJlX2xpbmsgY2Fubm90IGJlIGZvdW5kXFxcIikpIHtcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfkvaDmiZPlvIDnmoTpk77mjqXmnInor6/vvIzor7fph43or5XjgIInLFxcbiAgICAgICAgICAgICAgICB1cmw6IGRlY29kZVVSSUNvbXBvbmVudChnZXRSZXNDb2RlKCkuc3BsaXQoJyMjJylbMV0pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsZXQgcHVzaG5hbWUgPSBKU09OLnBhcnNlKGdldHNoYXIpLmZpbGVfaW5mb3NbMF0uZmlsZV9uYW1lO1xcblxcbiAgICAgICAgdmFyIHNoYXJldG9rZW4gPSBKU09OLnBhcnNlKGZldGNoKCdodHRwczovL2FwaS5hbGl5dW5kcml2ZS5jb20vdjIvc2hhcmVfbGluay9nZXRfc2hhcmVfdG9rZW4nLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBib2R5OiAne1xcXCJzaGFyZV9wd2RcXFwiOlxcXCJcXFwiLFxcXCJzaGFyZV9pZFxcXCI6XFxcIicgKyBzaGFyZUlkICsgJ1xcXCJ9JyxcXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgfSkpLnNoYXJlX3Rva2VuO1xcbiAgICAgICAgLy9sb2coc2hhcmV0b2tlbik7XFxuXFxuICA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iLFxcXCJvcmRlcl9kaXJlY3Rpb25cXFwiOlxcXCJBU0NcXFwiJyArIG5leHQgKyAnfScsXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgLy9sb2cocmVzY29kKTtcXG4gICAgICAgICAgICBpZiAocmVzY29kLmluY2x1ZGVzKFxcXCJQYXJhbUZsb3dFeGNlcHRpb25cXFwiKSkge1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgbGlzdHlwID0gSlNPTi5wYXJzZShyZXNjb2QpLml0ZW1zWzBdLnR5cGU7XFxuICAgICAgICAgICAgdmFyIHBmaWxlaWQgPSBKU09OLnBhcnNlKHJlc2NvZCkuaXRlbXNbMF0uZmlsZV9pZDtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGxpc3R5cCA9ICdmb2xkZXInO1xcbiAgICAgICAgICAgIHZhciBwZmlsZWlkID0gZGVjb2RlVVJJQ29tcG9uZW50KHJlYWx1cmwpLnNwbGl0KCdmb2xkZXIvJylbMV1cXG5cXG4gICAgICAgIH1cXG4gICAgICAgIC8vbG9nKGh0bWwpO1xcbiAgICAgICAgaWYgKGxpc3R5cCA9PSAnZm9sZGVyJykge1xcbiAgICAgICAgICAgIHZhciByZXNjb2QgPSBmZXRjaCgnaHR0cHM6Ly9hcGkuYWxpeXVuZHJpdmUuY29tL2Fkcml2ZS92My9maWxlL2xpc3QnLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXFxuICAgICAgICAgICAgICAgICAgICAnWC1TaGFyZS1Ub2tlbic6IHNoYXJldG9rZW5cXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgYm9keTogJ3tcXFw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biAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ25leHRwYWdlJyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGNvbnRzID0gSlNPTi5wYXJzZShyZXNjb2QpLml0ZW1zO1xcbiAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfor6Xmlofku7blpLnkuIvmsqHmnInliIbkuqvnmoTmlofku7YnLFxcbiAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGRvbmd0YWkgPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvbGF6eXVybCcsIHt9KSkucnVsZS50b1N0cmluZygpO1xcbiAgICAgICAgdmFyIHR1aXNvbmcgPSBbXTtcXG4gICAgICAgIGZvciAodmFyIGkgaW4gY29udHMpIHtcXG4gICAgICAgICAgICB2YXIgbGlzdHlwID0gY29udHNbaV0udHlwZTtcXG4gICAgICAgICAgICBpZiAobGlzdHlwICE9ICdmb2xkZXInKSB7XFxuICAgICAgICAgICAgICAgIHZhciBjYXRlID0gY29udHNbaV0uY2F0ZWdvcnk7XFxuICAgICAgICAgICAgICAgIHZhciBmbmFtZSA9IGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgICAgIGlmIChjYXRlID09ICd2aWRlbycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5O6JyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnZG9jJykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/Cfk5YnICsgY29udHNbaV0ubmFtZTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICdpbWFnZScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5a8JyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnemlwJykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/Cfk6YnICsgY29udHNbaV0ubmFtZTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGNvbnRzW2ldLm5hbWVcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBpZiAoY2F0ZSA9PSAndmlkZW8nIHx8IGNhdGUgPT0gJ2F1ZGlvJyB8fCBjYXRlID09ICdpbWFnZScpIHtcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoY29udHNbaV0uZmlsZV9pZCkubGF6eVJ1bGUoKHNoYXJlSWQsIGRvbmd0YWksIGNhdGUsIGZuYW1lLCByZWZ0b2tlbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnc2luZ2xlcHVzaCcsICcnKSA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3B1c2g/cnVsZT1YWVHmjqjpgIEmcHVzaHVybD0nICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGZuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJyZWZyZXNoX3Rva2VuXFxcIjogcmVmdG9rZW4sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInVybFxcXCI6IGZuYW1lLnJlcGxhY2UoL1xcXFwjL2csICdfJykucmVwbGFjZSgvXFxcXCQvZywgJ18nKSArICckJyArIGNhdGUgKyAnfCcgKyBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic2hhcmVfaWRcXFwiOiBzaGFyZUlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGRvbmd0YWkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNoYXJlSWQsIGRvbmd0YWksIGNhdGUsIGZuYW1lLCByZWZ0b2tlbiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogZm9ybWF0RGF0ZShjb250c1tpXS51cGRhdGVkX2F0KSArICcgICcgKyBmb3JtYXRTaXplKGNvbnRzW2ldLnNpemUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5o6o6YCB5YiwVFZCb3gnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHNoYXJlSWQsIGZpbGVpZCwgY2F0ZSwgZm5hbWUsIHJlZnRva2VuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGZuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwicmVmcmVzaF90b2tlblxcXCI6IHJlZnRva2VuLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwidXJsXFxcIjogZm5hbWUucmVwbGFjZSgvXFxcXCMvZywgJ18nKS5yZXBsYWNlKC9cXFxcJC9nLCAnXycpICsgJyQnICsgY2F0ZSArICd8JyArIGZpbGVpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNoYXJlX2lkXFxcIjogc2hhcmVJZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNoYXJlSWQsIGNvbnRzW2ldLmZpbGVfaWQsIGNhdGUsIGZuYW1lLCByZWZ0b2tlbilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBjb250c1tpXS5maWxlX2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG5cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNhdGUgPT0gJ3ZpZGVvJyB8fCBjYXRlID09ICdhdWRpbycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0dWlzb25nLnB1c2goXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLnJlcGxhY2UoL1xcXFwjL2csICdfJykucmVwbGFjZSgvXFxcXCQvZywgJ18nKSArICckJyArIGNhdGUgKyAnfCcgKyBjb250c1tpXS5maWxlX2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5b2T5YmN5paH5Lu25aS55LiL5rKh5pyJ6Z+z6KeG6aKR5paH5Lu2JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfwn5OCJyArIGNvbnRzW2ldLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHknICsgY29udHNbaV0uZmlsZV9pZCArICc/Pz9meXBhZ2UnKS5ydWxlKChzaGFyZUlkLCBzaGFyZXRva2VuLCBwdXNobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3J1bGVsb29wJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNoYXJlSWQsIHNoYXJldG9rZW4sIGNvbnRzW2ldLm5hbWUpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidc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2YXIgdHVpc29uZyA9IFtdO1xcbiAgICBmb3IgKHZhciBpIGluIGNvbnRzKSB7XFxuXFxuICAgICAgICB2YXIgbGlzdHlwID0gY29udHNbaV0udHlwZTtcXG4gICAgICAgIGlmIChsaXN0eXAgIT0gJ2ZvbGRlcicpIHtcXG4gICAgICAgICAgICB2YXIgY2F0ZSA9IGNvbnRzW2ldLmNhdGVnb3J5O1xcbiAgICAgICAgICAgIHZhciBmbmFtZSA9IGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgaWYgKGNhdGUgPT0gJ3ZpZGVvJykge1xcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+TuicgKyBjb250c1tpXS5uYW1lO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnZG9jJykge1xcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+TlicgKyBjb250c1tpXS5uYW1lO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnaW1hZ2UnKSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5a8JyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICd6aXAnKSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5OmJyArIGNvbnRzW2ldLm5hbWU7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gY29udHNbaV0ubmFtZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoY2F0ZSA9PSAndmlkZW8nIHx8IGNhdGUgPT0gJ2F1ZGlvJyB8fCBjYXRlID09ICdpbWFnZScpIHtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoY29udHNbaV0uZmlsZV9pZCkubGF6eVJ1bGUoKHNoYXJlSWQsIGRvbmd0YWksIGNhdGUsIGZuYW1lLCByZWZ0b2tlbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKCdzaW5nbGVwdXNoJywgJycpID09ICcxJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9wdXNoP3J1bGU9WFlR5o6o6YCBJnB1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGZuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInJlZnJlc2hfdG9rZW5cXFwiOiByZWZ0b2tlbixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBmbmFtZS5yZXBsYWNlKC9cXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic2hhcmVfaWRcXFwiOiBzaGFyZUlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGRvbmd0YWkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxheVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIHNoYXJlSWQsIGRvbmd0YWksIGNhdGUsIGZuYW1lLCByZWZ0b2tlbiksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBmb3JtYXREYXRlKGNvbnRzW2ldLnVwZGF0ZWRfYXQpICsgJyAgJyArIGZvcm1hdFNpemUoY29udHNbaV0uc2l6ZSksXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmjqjpgIHliLBUVkJveCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChzaGFyZUlkLCBmaWxlaWQsIGNhdGUsIGZuYW1lLCByZWZ0b2tlbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogZm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInJlZnJlc2hfdG9rZW5cXFwiOiByZWZ0b2tlbixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwidXJsXFxcIjogZm5hbWUucmVwbGFjZSgvXFxcXCMvZywgJ18nKS5yZXBsYWNlKC9cXFxcJC9nLCAnXycpICsgJyQnICsgY2F0ZSArICd8JyArIGZpbGVpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic2hhcmVfaWRcXFwiOiBzaGFyZUlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNoYXJlSWQsIGNvbnRzW2ldLmZpbGVfaWQsIGNhdGUsIGZuYW1lLCByZWZ0b2tlbilcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogY29udHNbaV0uZmlsZV9pZFxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcblxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgaWYgKGNhdGUgPT0gJ3ZpZGVvJyB8fCBjYXRlID09ICdhdWRpbycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHR1aXNvbmcucHVzaChcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5yZXBsYWNlKC9cXFxcIy9nLCAnXycpLnJlcGxhY2UoL1xcXFwkL2csICdfJykgKyAnJCcgKyBjYXRlICsgJ3wnICsgY29udHNbaV0uZmlsZV9pZFxcbiAgICAgICAgICAgICAgICAgICAgKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn8J+TgicgKyBjb250c1tpXS5uYW1lLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHknICsgY29udHNbaV0uZmlsZV9pZCArICc/Pz9meXBhZ2UnKS5ydWxlKChzaGFyZUlkLCBzaGFyZXRva2VuLCBwdXNobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvcnVsZWxvb3AnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9LCBzaGFyZUlkLCBzaGFyZXRva2VuLCBjb250c1tpXS5uYW1lKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidcXG4gICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgIH0gLy9lbmQgaWZcXG5cXG5cXG4gICAgfVxcbiAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2Vy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nMCcpLnJlcGxhY2UoJ3RpbWUnLCAnJykpO1xcbiAgICAgICAgbGV0IHVzZXJpbmZvO1xcbiAgICAgICAgbGV0IGFsaXVzZXJpbmZvID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2FsaXVzZXJpbmZvJyk7XFxuICAgICAgICBpZiAoYWxpdXNlcmluZm8gJiYgYWxpdXNlcmluZm8udXNlcl9pZCAmJiBub3d0aW1lIDwgKG9sZHRpbWUgKyAxICogNjAgKiA2MCAqIDEwMDApKSB7XFxuICAgICAgICAgICAgdXNlcmluZm8gPSBhbGl1c2VyaW5mbztcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdXNlcmluZm8gPSBKU09OLnBhcnNlKHJlcXVlc3QoJ2h0dHBzOi8vYXV0aC5hbGl5dW5kcml2ZS5jb20vdjIvYWNjb3VudC90b2tlbicsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXG4gICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcInJlZnJlc2hfdG9rZW5cXFwiOiBhbGl0b2tlbixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJncmFudF90eXBlXFxcIjogXFxcInJlZnJlc2hfdG9rZW5cXFwiXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxcbiAgICAgICAgICAgICAgICB0aW1lb3V0OiAzMDAwXFxuICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdhbGl1c2VyaW5mbycsIHVzZXJpbmZvKTtcXG4gICAgICAgICAgICBwdXRNeVZhcigndXNlcmluZm9DaGVja3RpbWUnLCBub3d0aW1lICsgJ3RpbWUnKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBhdXRob3JpemF0aW9uID0gJ0JlYXJlciAnICsgdXNlcmluZm8uYWNjZXNzX3Rva2VuO1xcbiAgICAgICAgbGV0IGRldmljZUlkID0gdXNlcmluZm8uZGV2aWNlX2lkO1xcbiAgICAgICAgbGV0IHVzZXJJZCA9IHVzZXJpbmZvLnVzZXJfaWQ7XFxuICAgICAgICBsZXQgc2lnbmF0dXJlO1xcblxcbiAgICAgICAgbGV0IGFzID0ganVzdFRlc3RTaWduKFxcXCI1ZGRlNGUxYmRmOWU0OTY2YjM4N2JhNThmNGIzZmRjM1xcXCIsIGRldmljZUlkLCB1c2VySWQpO1xcbiAgICAgICAgLy9sb2coYSk7XFxuICAgICAgICBsZXQgYnAgPSBhcy5zcGxpdChcXFwiIyNcXFwiKTtcXG4gICAgICAgIHZhciBzaWduID0gYnBbMF07XFxuICAgICAgICB2YXIgcHViS2V5ID0gYnBbYnAubGVuZ3RoIC0gMV07XFxuXFxuICAgICAgICBsZXQgaSA9IDA7XFxuICAgICAgICBkbyB7XFxuXFxuICAgICAgICAgICAgbGV0IHNlc3MgPSBmZXRjaCgnaHR0cHM6Ly9hcGkuYWxpeXVuZHJpdmUuY29tL3VzZXJzL3YxL3VzZXJzL2RldmljZS9jcmVhdGVfc2Vzc2lvbicsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJyxcXG4gICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6ICdodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vJyxcXG4gICAgICAgICAgICAgICAgICAgICdBdXRob3JpemF0aW9uJzogYXV0aG9yaXphdGlvbixcXG4gICAgICAgICAgICAgICAgICAgICdYLVNoYXJlLVRva2VuJzogc2hhcmV0b2tlbixcXG4gICAgICAgICAgICAgICAgICAgICd4LWRldmljZS1pZCc6IGRldmljZUlkLFxcbiAgICAgICAgICAgICAgICAgICAgJ3gtc2lnbmF0dXJlJzogc2lnblxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBib2R5OiAne1xcXCJkZXZpY2VOYW1lXFxcIjpcXFwiQ2hyb21l5rWP6KeI5ZmoXFxcIixcXFwibW9kZWxOYW1lXFxcIjpcXFwiV2luZG93c+e9kemhteeJiFxcXCIsXFxcIm5vbmNlXFxcIjowLFxcXCJwdWJLZXlcXFwiOlxcXCInICsgcHViS2V5ICsgJ1xcXCIsXFxcInJlZnJlc2hUb2tlblxcXCI6XFxcIicgKyBhbGl0b2tlbiArICdcXFwifScsXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgaWYgKHNlc3MuaW5jbHVkZXMoJ3N1Y2Nlc3MnKSkge1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbG9nKCdjcmVhdGVfc2Vzc2lvbiAnICsgc2Vzcyk7XFxuICAgICAgICAgICAgYXMgPSBqdXN0VGVzdFNpZ24oXFxcIjVkZGU0ZTFiZGY5ZTQ5NjZiMzg3YmE1OGY0YjNmZGMzXFxcIiwgZGV2aWNlSWQsIHVzZXJJZCk7XFxuICAgICAgICAgICAgLy9sb2coYSk7XFxuICAgICAgICAgICAgYnAgPSBhcy5zcGxpdChcXFwiIyNcXFwiKTtcXG4gICAgICAgICAgICBzaWduID0gYnBbMF07XFxuICAgICAgICAgICAgcHViS2V5ID0gYnBbYnAubGVuZ3RoIC0gMV07XFxuICAgICAgICAgICAgaSsrO1xcbiAgICAgICAgfSB3aGlsZSAoaSA8IDUpO1xcblxcbiAgICAgICAgc2lnbmF0dXJlID0gc2lnbjtcXG4gICAgICAgIGhlYWRlcnNbJ2F1dGhvcml6YXRpb24nXSA9IGF1dGhvcml6YXRpb247XFxuICAgICAgICBoZWFkZXJzWyd4LWRldmljZS1pZCddID0gZGV2aWNlSWQ7XFxuICAgICAgICBoZWFkZXJ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NPTi5wYXJzZShyZXF1ZXN0KGl0ZW0udXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6ICdodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmx5SGVhZGVyczogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiAzMDAwXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpLmhlYWRlcnMubG9jYXRpb25bMF07Ki9cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgLy/kuIrpnaLmmK/ojrflj5bpmL/ph4znmoTmkq3mlL7lnLDlnYBcXG4gICAgICAgICAgICAgICAgLy9sb2coXFxcIuaIkeWcqOS7o+eQhlxcXCIgKyBhbGl1cmwpO1xcbiAgICAgICAgICAgICAgICBsZXQgaG9tZSA9IGFsaXVybC5zcGxpdCgnbWVkaWEubTN1OCcpWzBdO1xcbiAgICAgICAgICAgICAgICBsZXQgZiA9IGZldGNoKGFsaXVybCwge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tLydcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiAzMDAwXFxuICAgICAgICAgICAgICAgIH0pLnNwbGl0KFxcXCJcXFxcblxcXCIpO1xcbiAgICAgICAgICAgICAgICBsZXQgZmYgPSBmLm1hcChpdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXQuc3RhcnRzV2l0aChcXFwibWVkaWEtXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIi9wcm94eT91cmw9XFxcIiArIGJhc2U2NEVuY29kZShob21lICsgaXQpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0O1xcbiAgICAgICAgICAgICAgICB9KS5qb2luKFxcXCJcXFxcblxcXCIpO1xcbiAgICAgICAgICAgICAgICAvL2xvZygndWZpZC0nK2ZpbGVpZCk7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9jYWNoZS9fZmlsZVNlbGVjdF8nICsgZmlsZWlkICsgJy5tM3U4JywgZmYpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZmY7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCB1cmwgPSBiYXNlNjREZWNvZGUoTVlfUEFSQU1TLnVybCk7XFxuICAgICAgICAgICAgaWYgKHVybC5pbmNsdWRlcyhcXFwiLnRzXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGZpZCA9IHVybC5zcGxpdCgnJmY9JylbMV0uc3BsaXQoJyYnKVswXTtcXG4gICAgICAgICAgICAgICAgLy9sb2coJ3NmaWQtJytmaWQpO1xcbiAgICAgICAgICAgICAgICBsZXQgZiA9IGZldGNoKCdoaWtlcjovL2ZpbGVzL2NhY2hlL19maWxlU2VsZWN0XycgKyBmaWQgKyAnLm0zdTgnKS5zcGxpdChcXFwiXFxcXG5cXFwiKTtcXG4gICAgICAgICAgICAgICAgZi5mb3JFYWNoKGl0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpdCAmJiBpdC5zdGFydHNXaXRoKCcvcHJveHk/dXJsPScpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZ1cmwgPSBiYXNlNjREZWNvZGUoaXQucmVwbGFjZSgnL3Byb3h5P3VybD0nLCAnJykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuc3Vic3RyKHVybC5pbmRleE9mKCcvbWVkaWEtJyksIHVybC5pbmRleE9mKCcudHMnKSkgPT0gZnVybC5zdWJzdHIoZnVybC5pbmRleE9mKCcvbWVkaWEtJyksIGZ1cmwuaW5kZXhPZignLnRzJykpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IGZ1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBsZXQgZXhwaXJlcyA9IHVybC5zcGxpdCgneC1vc3MtZXhwaXJlcz0nKVsxXS5zcGxpdCgnJicpWzBdO1xcbiAgICAgICAgICAgICAgICBjb25zdCBsYXN0dGltZSA9IHBhcnNlSW50KGV4cGlyZXMpIC0gRGF0ZS5ub3coKSAvIDEwMDA7XFxuICAgICAgICAgICAgICAgIGlmIChsYXN0dGltZSA8IDYwKSB7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZygn6L+H5pyf5pu05pawJylcXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaW5lID0gdXJsLnNwbGl0KCcvbWVkaWEnKVswXTsgLy/lj5bkuYvliY3mkq3mlL7nmoR0c+autee6v+i3r1xcbiAgICAgICAgICAgICAgICAgICAgbGluZSA9IGxpbmUuc3Vic3RyaW5nKGxpbmUubGFzdEluZGV4T2YoJy8nKSArIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGYgPSBnZXR1cmwoZmlkLCBsaW5lKS5zcGxpdChcXFwiXFxcXG5cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIGYuZm9yRWFjaChpdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0ICYmIGl0LnN0YXJ0c1dpdGgoJy9wcm94eT91cmw9JykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZ1cmwgPSBiYXNlNjREZWNvZGUoaXQucmVwbGFjZSgnL3Byb3h5P3VybD0nLCAnJykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsLnN1YnN0cih1cmwuaW5kZXhPZignL21lZGlhLScpLCB1cmwuaW5kZXhPZignLnRzJykpID09IGZ1cmwuc3Vic3RyKGZ1cmwuaW5kZXhPZignL21lZGlhLScpLCBmdXJsLmluZGV4T2YoJy50cycpKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gZnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZygn5pyq6L+H5pyfJylcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKFxcXCLku6PnkIZ0c++8mlxcXCIgKyB1cmwpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICBzdGF0dXNDb2RlOiAzMDIsXFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkxvY2F0aW9uXFxcIjogdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tLydcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgLy9sb2coJ+mmluasoeabtOaWsCcpXFxuICAgICAgICAgICAgICAgIGxldCBsaW5lID0gdXJsLnNwbGl0KCd8JylbMV07XFxuICAgICAgICAgICAgICAgIGxldCBmZiA9IGdldHVybChmaWxlX2lkLCBsaW5lKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZmO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIGFsaVNoYXJlUGxheVVybCwgZmlsZV9pZCwgc2hhcmVfaWQsIGFsaXRva2VuKSk7XFxuXFxuICAgICAgICBsZXQgcGxheVVybExpc3QgPSBhbGlTaGFyZVBsYXlVcmwoc2hhcmVfaWQsIGZpbGVfaWQsIGFsaXRva2VuKSB8fCBbXTtcXG5cXG4gICAgICAgIGlmIChwbGF5VXJsTGlzdC5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgcGxheVVybExpc3QuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICB1cmxzLnB1c2godSArIFxcXCI/dXJsPVxcXCIgKyBiYXNlNjRFbmNvZGUoaXRlbS51cmwgKyBcXFwifFxcXCIgKyBpdGVtLnRlbXBsYXRlX2lkKSArIFxcXCIjLm0zdThcXFwiKTtcXG4gICAgICAgICAgICAgICAgbmFtZXMucHVzaCh0cmFuc2NvZGluZ1tpdGVtLnRlbXBsYXRlX2lkXSA/IHRyYW5zY29kaW5nW2l0ZW0udGVtcGxhdGVfaWRdIDogaXRlbS50ZW1wbGF0ZV9oZWlnaHQpO1xcbiAgICAgICAgICAgICAgICBoZWFkcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6ICdodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIHVybHM6IHVybHMsXFxuICAgICAgICAgICAgICAgIG5hbWVzOiBuYW1lcyxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZHNcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBsb2coJ+acquiOt+WPlumYv+mHjOaSreaUvuWcsOWdgO+8jOW7uuiurumHjei/m+i9r+S7tuWGjeivleS4gOasoScpXFxuICAgICAgICAgICAgcmV0dXJuIHt9O1xcbiAgICAgICAgfVxcbiAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICBsb2coJ+iOt+WPluWFseS6q+mTvuaOpeaSreaUvuWcsOWdgOWksei0pT4nICsgZS5tZXNzYWdlKTtcXG4gICAgICAgIHJldHVybiB7fTtcXG4gICAgfVxcbn1cXG5cXG5pZiAoY2F0ZSA9PSAndmlkZW8nKSB7XFxuICAgLy9sb2cocmVhY2Nlc3NUayk7IFxcbiAgICBpZiAoZ2V0SXRlbSgncXVhbGl0eScsICcnKSA9PSAnMScpIHtcXG4gICAgICAgIC8v5Y6f55S7XFxuICAgICAgICAvL2FjY2Vzc1RrKCk7XFxuICAgICAgICBmdW5jdGlvbiBvYXV0aFJlcXVlc3QoKSB7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgbGV0IGpzb24gPSBmZXRjaCgnaHR0cHM6Ly9vcGVuLmFsaXl1bmRyaXZlLmNvbS9vYXV0aC91c2Vycy9hdXRob3JpemU/Y2xpZW50X2lkPScgKyAnNzY5MTdjY2NjZDQ0NDFjMzk0NTdhMDRmNjA4NGZiMmYnICsgJyZyZWRpcmVjdF91cmk9aHR0cHM6Ly9hbGlzdC5ubi5jaS90b29sL2FsaXl1bmRyaXZlL2NhbGxiYWNrJnNjb3BlPXVzZXI6YmFzZSxmaWxlOmFsbDpyZWFkLGZpbGU6YWxsOndyaXRlJnN0YXRlPScsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogJ2h0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS8nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICdhdXRob3JpemF0aW9uJzogcmVhY2Nlc3NUaywgLy9nZXRBY2Nlc3NUb2tlblxcbiAgICAgICAgICAgICAgICAgICAgICAgICd4LWNhbmFyeSc6ICdjbGllbnQ9d2ViLGFwcD1zaGFyZSx2ZXJzaW9uPXYyLjMuMScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3gtc2hhcmUtdG9rZW4nOiBzaGFyZXRva2VuXFxuXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJhdXRob3JpemVcXFwiOiAxLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzY29wZVxcXCI6IFxcXCJ1c2VyOmJhc2UsZmlsZTphbGw6cmVhZCxmaWxlOmFsbDp3cml0ZVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy9sb2coJ29hdXRocmVxXFxcXG4nICsganNvbik7XFxuICAgICAgICAgICAgICAgIGxldCBjb2RlID0gSlNPTi5wYXJzZShqc29uKS5yZWRpcmVjdFVyaS5zcGxpdChcXFwiY29kZT1cXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgb2F1dGhSZWRpcmVjdChjb2RlKTtcXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIHJlYWNjZXNzVGsgPSAnJztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9O1xcblxcbiAgICAgICAgZnVuY3Rpb24gb2F1dGhSZWRpcmVjdChjb2RlKSB7XFxuICAgICAgICAgICAgaWYgKGdldE15VmFyKCdvcmVkJywgJzEnKSAhPSAnMCcpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGpzb24gPSBmZXRjaCgnaHR0cHM6Ly9hcGkubm4uY2kvYWxpc3QvYWxpX29wZW4vY29kZScsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogJ2h0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS8nXFxuXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJjb2RlXFxcIjogY29kZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiZ3JhbnRfdHlwZVxcXCI6IFxcXCJhdXRob3JpemF0aW9uX2NvZGVcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgIGxvZygn6I635Y+WUmVmcmVzaFRva2VuT3BlbicpO1xcbiAgICAgICAgICAgICAgICBpZiAoanNvbi5pbmNsdWRlcygnVG9vIE1hbnkgUmVxdWVzdHMnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ29yZWQnLCAnMCcpO1xcbiAgICAgICAgICAgICAgICAgICAgdG9hc3QoJ+ivt+axguWkqumikee5ge+8jOiiq+WwgUlQ5LqGJyk7XFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+ivt+axguWkqumikee5ge+8jOiiq+WwgUlQ5LqGJyk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignb3JlZCcsICcxJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IGdldFJlZnJlc2hUb2tlbk9wZW4gPSBKU09OLnBhcnNlKGpzb24pLnJlZnJlc2hfdG9rZW47XFxuICAgICAgICAgICAgICAgIE9wZW5Ub2tlbi5SZWZyZXNoVG9rZW5PcGVuID0gZ2V0UmVmcmVzaFRva2VuT3BlbjtcXG4gICAgICAgICAgICAgICAgbGV0IGdldEFjY2Vzc1Rva2VuT3BlbiA9IEpTT04ucGFyc2UoanNvbikudG9rZW5fdHlwZSArICcgJyArIEpTT04ucGFyc2UoanNvbikuYWNjZXNzX3Rva2VuO1xcbiAgICAgICAgICAgICAgICBPcGVuVG9rZW4uQWNjZXNzVG9rZW5PcGVuID0gZ2V0QWNjZXNzVG9rZW5PcGVuO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvaWN5L2ljeS1hbGktT3BlblRva2VuLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShPcGVuVG9rZW4pKTtcXG5cXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3JlZGlyZWN0JywgJzEnKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9O1xcblxcbiAgICAgICAgZnVuY3Rpb24gcmVmcmVzaE9wZW5Ub2tlbigpIHtcXG5cXG4gICAgICAgICAgICBpZiAoZ2V0TXlWYXIoJ3JvdCcsICcxJykgIT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgIGxldCBqc29uID0gZmV0Y2goJ2h0dHBzOi8vYXBpLm5uLmNpL2FsaXN0L2FsaV9vcGVuL3Rva2VuJywge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tLydcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2dyYW50X3R5cGUnOiAncmVmcmVzaF90b2tlbicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3JlZnJlc2hfdG9rZW4nOiBPcGVuVG9rZW4uQWNjZXNzVG9rZW5PcGVuXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgIGxvZygn6I635Y+WQWNjZXNzVG9rZW5PcGVuJyk7XFxuICAgICAgICAgICAgICAgIGlmIChqc29uLmluY2x1ZGVzKCdUb28gTWFueSBSZXF1ZXN0cycpKSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigncm90JywgJzAnKTtcXG4gICAgICAgICAgICAgICAgICAgIHRvYXN0KCfor7fmsYLlpKrpopHnuYHvvIzooqvlsIFJUOS6hicpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCfor7fmsYLlpKrpopHnuYHvvIzooqvlsIFJUOS6hicpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3JvdCcsICcxJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IGdldFJlZnJlc2hUb2tlbk9wZW4gPSBKU09OLnBhcnNlKGpzb24pLnJlZnJlc2hfdG9rZW47XFxuICAgICAgICAgICAgICAgIE9wZW5Ub2tlbi5SZWZyZXNoVG9rZW5PcGVuID0gZ2V0UmVmcmVzaFRva2VuT3BlbjtcXG4gICAgICAgICAgICAgICAgbGV0IGdldEFjY2Vzc1Rva2VuT3BlbiA9IEpTT04ucGFyc2UoanNvbikudG9rZW5fdHlwZSArICcgJyArIEpTT04ucGFyc2UoanNvbikuYWNjZXNzX3Rva2VuO1xcbiAgICAgICAgICAgICAgICBPcGVuVG9rZW4uQWNjZXNzVG9rZW5PcGVuID0gZ2V0QWNjZXNzVG9rZW5PcGVuO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvaWN5L2ljeS1hbGktT3BlblRva2VuLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShPcGVuVG9rZW4pKTtcXG5cXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICB9O1xcblxcbiAgICAgICAgZnVuY3Rpb24gY29weShmaWxlSWQpIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBsZXQganNvbiA9IGZldGNoKCdodHRwczovL2FwaS5hbGl5dW5kcml2ZS5jb20vYWRyaXZlL3YyL2JhdGNoJywge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tLycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2F1dGhvcml6YXRpb24nOiByZWFjY2Vzc1RrLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vZ2V0QWNjZXNzVG9rZW5cXG4gICAgICAgICAgICAgICAgICAgICAgICAneC1jYW5hcnknOiAnY2xpZW50PXdlYixhcHA9c2hhcmUsdmVyc2lvbj12Mi4zLjEnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICd4LXNoYXJlLXRva2VuJzogc2hhcmV0b2tlblxcblxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwicmVxdWVzdHNcXFwiOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiYm9keVxcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJmaWxlX2lkXFxcIjogZmlsZUlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNoYXJlX2lkXFxcIjogc2hhcmVJZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJhdXRvX3JlbmFtZVxcXCI6IHRydWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwidG9fcGFyZW50X2ZpbGVfaWRcXFwiOiBcXFwicm9vdFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwidG9fZHJpdmVfaWRcXFwiOiBkZWZkcml2ZWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJoZWFkZXJzXFxcIjoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvbnRlbnQtVHlwZVxcXCI6IFxcXCJhcHBsaWNhdGlvbi9qc29uXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBcXFwiMFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJtZXRob2RcXFwiOiBcXFwiUE9TVFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBcXFwiL2ZpbGUvY29weVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwicmVzb3VyY2VcXFwiOiBcXFwiZmlsZVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy9sb2coJ2NvcHlcXFxcbicgKyBqc29uKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoanNvbikucmVzcG9uc2VzWzBdLmJvZHkuZmlsZV9pZDtcXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGRlbGV0ZWUoZmlsZUlkKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9O1xcblxcbiAgICAgICAgZnVuY3Rpb24gb3BlbihmaWxlSWQpIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBsZXQganNvbiA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICBsZXQgbnVtYmVyID0gMDtcXG4gICAgICAgICAgICAgICAgZG8ge1xcbiAgICAgICAgICAgICAgICAgICAganNvbiA9IGZldGNoKCdodHRwczovL29wZW4uYWxpeXVuZHJpdmUuY29tL2Fkcml2ZS92MS4wL29wZW5GaWxlL2dldERvd25sb2FkVXJsJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ1VzZXItQWdlbnQnOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tLycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhdXRob3JpemF0aW9uJzogT3BlblRva2VuLkFjY2Vzc1Rva2VuT3BlblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2dldEFjY2Vzc1Rva2VuT3BlblxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZmlsZV9pZCc6IGZpbGVJZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2RyaXZlX2lkJzogZGVmZHJpdmVpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coJ29wZW5cXFxcbicgKyBqc29uKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmluY2x1ZGVzKCdcXFwidXJsXFxcIjpcXFwiaHR0cCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5pbmNsdWRlcyhcXFwiVG9vTWFueVJlcXVlc3RzXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2RlbGV0ZWUoZmlsZUlkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2FzdCgnVG9vIE1hbnkgUmVxdWVzdHMnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coJ1Rvb01hbnlSZXF1ZXN0cycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICd0b2FzdDovL+ivt+axguWkqumikee5gSc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0TXlWYXIoJ3JlZGlyZWN0JywgJzAnKSA9PSAnMCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBvYXV0aFJlcXVlc3QoKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaE9wZW5Ub2tlbigpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgbnVtYmVyKytcXG4gICAgICAgICAgICAgICAgfSB3aGlsZSAobnVtYmVyIDwgMik7XFxuICAgICAgICAgICAgICAgIGRlbGV0ZWUoZmlsZUlkKTtcXG4gICAgICAgICAgICAgICAgaWYgKGpzb24uaW5jbHVkZXMoJ2h0dHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoanNvbikudXJsICsgJyNpc1ZpZGVvPXRydWUjO3tSZWZlcmVyQGh0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS99JztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhqc29uKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgZGVsZXRlZShmaWxlSWQpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH07XFxuXFxuICAgICAgICBmdW5jdGlvbiBkZWxldGVlKGZpbGVJZCkge1xcblxcbiAgICAgICAgICAgIGZldGNoKCdodHRwczovL2FwaS5hbGl5dW5kcml2ZS5jb20vYWRyaXZlL3YyL2JhdGNoJywge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tLycsXFxuICAgICAgICAgICAgICAgICAgICAnYXV0aG9yaXphdGlvbic6IHJlYWNjZXNzVGssXFxuICAgICAgICAgICAgICAgICAgICAneC1jYW5hcnknOiAnY2xpZW50PXdlYixhcHA9c2hhcmUsdmVyc2lvbj12Mi4zLjEnLFxcbiAgICAgICAgICAgICAgICAgICAgJ3gtc2hhcmUtdG9rZW4nOiBzaGFyZXRva2VuXFxuXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJyZXF1ZXN0c1xcXCI6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImJvZHlcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJkcml2ZV9pZFxcXCI6IGRlZmRyaXZlaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJmaWxlX2lkXFxcIjogZmlsZUlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiaGVhZGVyc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvbnRlbnQtVHlwZVxcXCI6IFxcXCJhcHBsaWNhdGlvbi9qc29uXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogZmlsZUlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJtZXRob2RcXFwiOiBcXFwiUE9TVFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcInVybFxcXCI6IFxcXCIvZmlsZS9kZWxldGVcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJyZXNvdXJjZVxcXCI6IFxcXCJmaWxlXFxcIlxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIC8vbG9nKCfliKDpmaQgJyArIGRlbCk7XFxuICAgICAgICAgICAgLypcXG4gICAgICAgICAgICBmZXRjaCgnaHR0cHM6Ly9vcGVuLmFsaXl1bmRyaXZlLmNvbS9hZHJpdmUvdjEuMC9vcGVuRmlsZS9kZWxldGUnLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6ICdodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vJyxcXG4gICAgICAgICAgICAgICAgICAgICdhdXRob3JpemF0aW9uJzogZ2V0SXRlbSgnZ2V0QWNjZXNzVG9rZW5PcGVuJywgJycpLFxcbiAgICAgICAgICAgICAgICAgICAgJ3gtc2hhcmUtdG9rZW4nOiBzaGFyZXRva2VuXFxuXFxuXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJkcml2ZV9pZFxcXCI6IGRlZmRyaXZlaWQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZmlsZV9pZFxcXCI6IGZpbGVJZFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICovXFxuICAgICAgICAgICAgLy9sb2coJ2RlbGVcXFxcbicgKyBqc29uKTtcXG4gICAgICAgIH07XFxuXFxuXFxuICAgICAgICAvL+WkhOeQhuinhumikSAgXFxuICAgICAgICB2YXIgZHNpZCA9IHNoYXJlSWQ7XFxuICAgICAgICB2YXIgZGZpZCA9IGlucHV0O1xcblxcbiAgICAgICAgbGV0IGZpbGVJZCA9IGNvcHkoZGZpZCk7XFxuICAgICAgICB2YXIgcGxheSA9IG9wZW4oZmlsZUlkKTtcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIC8v5pmu55S7ICBcXG4gICAgICAgIHZhciBkc2lkID0gc2hhcmVJZDtcXG4gICAgICAgIHZhciBkZmlkID0gaW5wdXQ7XFxuXFxuICAgICAgICBpZiAoY2F0ZSA9PSAndmlkZW8nKSB7XFxuICAgICAgICAgICAgdmFyIHBsYXkgPSBKU09OLnN0cmluZ2lmeShnZXRBbGlVcmwoXFxuICAgICAgICAgICAgICAgIHNoYXJlSWQsXFxuICAgICAgICAgICAgICAgIGlucHV0LFxcbiAgICAgICAgICAgICAgICByZWZ0b2tlblxcbiAgICAgICAgICAgICkpO1xcbiAgICAgICAgfVxcbiAgICB9XFxufSBlbHNlIGlmIChjYXRlID09ICdpbWFnZScpIHtcXG4gICAgLy/lpITnkIbmlofmoaNcXG4gICAgLy9hY2Nlc3NUaygpO1xcblxcbiAgICB2YXIganNvbiA9IGZldGNoKCdodHRwczovL2FwaS5hbGl5dW5kcml2ZS5jb20vdjIvZmlsZS9nZXRfc2hhcmVfbGlua19kb3dubG9hZF91cmwnLCB7XFxuICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJyxcXG4gICAgICAgICAgICAnQXV0aG9yaXphdGlvbic6IHJlYWNjZXNzVGssXFxuICAgICAgICAgICAgJ1gtU2hhcmUtVG9rZW4nOiBzaGFyZXRva2VuXFxuICAgICAgICB9LFxcbiAgICAgICAgYm9keTogJ3tcXFwic2hhcmVfaWRcXFwiOlxcXCInICsgc2hhcmVJZCArICdcXFwiLFxcXCJleHBpcmVfc2VjXFxcIjogNjAwLFxcXCJmaWxlX2lkXFxcIjpcXFwiJyArIGlucHV0ICsgJ1xcXCJ9JyxcXG4gICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgIH0pO1xcblxcbiAgICAvL2xvZyhqc29uKTtcXG5cXG4gICAgdmFyIGxvY2xpbmsgPSBKU09OLnBhcnNlKGZldGNoKEpT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ZW4uanNvbicsIHt9KSk7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdXJsID0gJ2h0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS9zaWduJ1xcbiAgICAgICAgbGV0IGpzID0gJC50b1N0cmluZygobnRva2VuKSA9PiB7XFxuICAgICAgICAgICAgY29uc3QgdG9rZW5GdW5jdGlvbiA9IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICB2YXIgdG9rZW4gPSBKU09OLnBhcnNlKGxvY2FsU3RvcmFnZS5nZXRJdGVtKCd0b2tlbicpKVxcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4gJiYgdG9rZW4udXNlcl9pZCkge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGFsaXN0ZmlsZSA9IFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2ljeS9pY3ktYWxpLXRva2VuLmpzb25cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgbnRva2VuWzBdID0gdG9rZW47XFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLndyaXRlRmlsZShhbGlzdGZpbGUsIEpTT04uc3RyaW5naWZ5KG50b2tlbikpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9jYWxTdG9yYWdlLmNsZWFyKCk7XFxuICAgICAgICAgICAgICAgICAgICBhbGVydCgnVE9LRU7ojrflj5bmiJDlip/vvIzov5Tlm57lkI7liLfmlrDpobXpnaLvvIEnKTtcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAucGFyc2VMYXp5UnVsZShgaGlrZXI6Ly9lbXB0eUBsYXp5UnVsZT0uanM6cmVmcmVzaFg1V2ViVmlldygnJyk7YCk7XFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLmJhY2soKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHRva2VuX3RpbWVyKCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIHRva2VuX3RpbWVyID0gZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQodG9rZW5GdW5jdGlvbiwgNTAwKVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgdG9rZW5GdW5jdGlvbigpO1xcbiAgICAgICAgfSwgbnRva2VuKVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJyxcXG4gICAgICAgICAgICBkZXNjOiAnMTAwJSYmZmxvYXQnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGNhbkJhY2s6IHRydWUsXFxuICAgICAgICAgICAgICAgIHVhOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAganM6IGpzXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG59KTtcIn1dIiwiaWNvbiI6Imh0dHBzOi8vaW1nMi5odWFzaGk2LmNvbS9pbWFnZXMvcmVzb3VyY2UvZjE2NzcxOTcyOTc3MC8yMDIzLzA0LzA4LzE4MTM4Xzc4ODI0NDE2MzUuanBnQFJlZmVyZXI9aHR0cHM6Ly93d3cuaHVhc2hpNi5jb20iLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment