Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@GithubApp@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6ImJvZHkmJmRpdltkYXRhLWhwY10mJnNlY3Rpb24mJmgyJiZUZXh0IiwidGl0bGUiOiJHaXRodWJBcHAiLCJhdXRob3IiOiJSOuS4jeimgeS/ruaUueWwj+eoi+W6j+WQje+8jOWPr+iDveS8muaKpemUmSIsInVybCI6Imhpa2VyOi8vZW1wdHkjIyIsInZlcnNpb24iOjIwMjQwNDA5LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdXG5cbnZhciDmm7TmlrAgPSAyNCAvLyjlsI/ml7Yp5o+Q6YaS5qOA5rWL5pu05paw6Ze06ZqU5pe26Ze0XG52YXIg6Ze06ZqUID0gY29uZmlnLumXtOmalFxuXG5ldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL+a3u+WKoCcsIHt9KSkucnVsZSlcblxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9kYXRhJywge30pKS5ydWxlKVxuXG4vLyDorr7nva7ljZXlh7vmk43kvZzmmK/ov5vlhaXkuoznuqfpobXpnaLov5jmmK/mjpLluo9cbnZhciBjbGlja19hY3Rpb24gPSBnZXRNeVZhcignY2xpY2tfYWN0aW9uJywgJ2NsaWNrJylcblxuaWYgKOmXtOmalD49OCl7XG52YXIgdXBkYXRlO1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgIC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kpIHtcbiAgICAgICAgICAgIGRpZmZlcmVudEluZGljZXMucHVzaChpKVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBkaWZmZXJlbnRJbmRpY2VzXG59XG5cbnZhciBkYXRhID0gSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnKSB8fCAnW10nKVxuLy9sb2coZGF0YSlcbnZhciB2ZXJzaW9uID0gZ2V0SXRlbSgndicpLnNwbGl0KCfwn5SlJylcbnZhciBhcHB2cyA9IFtdXG5cbmlmIChNWV9QQUdFID09IDEpIHtcbiAgICBkLnB1c2goXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRpdGxlOlxuICAgICAgICAgICAgICAgIOmXtOmalCA8IOabtOaWsCA/ICfigJzigJzigJ3igJ0nICsgJ1xcdOKamSDmo4DmtYvmm7TmlrAg4pqZJy5ib2xkKCkgOiAn4oCc4oCc4oCd4oCdJyArICdcXHTimpkg5qOA5rWL5pu05pawIOKamScuYm9sZCgpLmZvbnRjb2xvcignI0ZGMDBGRicpLFxuICAgICAgICAgICAgaW1nOiAnaGlrZXI6Ly9pbWFnZXMvaWNvbl9zZWFyY2g2JyxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnaWNvbl8yX3JvdW5kJyxcbiAgICAgICAgICAgIHVybDpcbiAgICAgICAgICAgICAgICAnaGlrZXI6Ly9lbXB0eScgK1xuICAgICAgICAgICAgICAgICQoJycpLmxhenlSdWxlKFxuICAgICAgICAgICAgICAgICAgICAoZGF0YSwgdmVyc2lvbiwgY29tcGFyZUFycmF5cykgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1cmxzID0gW11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgVXJscyA9IGRhdGEubWFwKChpKSA9PiBpLnNwbGl0KCfwn5SlJylbMV0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVXJscy5mb3JFYWNoKCh1KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHMucHVzaCh7IHVybDogdSB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZzID0gYmYodXJscykubWFwKChoKSA9PiB7XG4gIHRyeSB7XG4gICAgcmV0dXJuIHBkZmgoaCwgJ2JvZHkmJmRpdltkYXRhLWhwY10mJnNlY3Rpb24mJmgyJiZUZXh0JylcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiBwZGZoKGgsICdib2R5JiYjcmVwby1jb250ZW50LXBqYXgtY29udGFpbmVyJiZoMiYmVGV4dCcpO1xuICB9XG59KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgciA9IGNvbXBhcmVBcnJheXModmVyc2lvbiwgdnMpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHMgPSByLmpvaW4oJ/CflKUnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2ID0gdnMuam9pbign8J+UpScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYuaW5jbHVkZXMoJ/CflKXwn5SlJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ajgOa1i+Wksei0pe+8jOivt+mHjeivlSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmVyc2lvbi5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCd2JywgdilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WIneWni+eJiOacrOWPt+aIkOWKnydcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3MnLCBzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgndicsIHYpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mo4DmtYvmnIknICsgci5sZW5ndGggKyAn5Liq5pu05pawfidcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ayoeacieaVsOaNrn4nXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgICAgIHZlcnNpb24sXG4gICAgICAgICAgICAgICAgICAgIGNvbXBhcmVBcnJheXNcbiAgICAgICAgICAgICAgICApLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyAnXFx04pqZIOabtOWkmuWKn+iDvSDimpknLmJvbGQoKSxcbiAgICAgICAgICAgIGltZzogJ2hpa2VyOi8vaW1hZ2VzL2ljb25fbWVudTYnLFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpY29uXzJfcm91bmQnLFxuICAgICAgICAgICAgdXJsOiAkKFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgJ+WvvOWFpeWIhuS6q+aVsOaNricsXG4gICAgICAgICAgICAgICAgICAgICfliIbkuqvljp/lp4vmlbDmja4nLFxuICAgICAgICAgICAgICAgICAgICAn5YiG5Lqr5LqR5Ymq6LS05p2/JyxcbiAgICAgICAgICAgICAgICAgICAgJ+WIhuS6q+S6keWPo+S7pCcsXG4gICAgICAgICAgICAgICAgICAgICfmi4nlj5bimqDvuI/kupHmlbDmja4nLFxuICAgICAgICAgICAgICAgICAgICAn5ZCI5bm25pys5Zyw5ZKM5LqRJyxcbiAgICAgICAgICAgICAgICAgICAgJ+aBouWkjem7mOiupOaVsOaNricsXG4gICAgICAgICAgICAgICAgICAgICfmuIXnqbrmnKzlnLDmlbDmja4nLFxuICAgICAgICAgICAgICAgICAgICAn57yW6L6R6L+c56iL5pWw5o2uJyxcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICkuc2VsZWN0KChtZGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn5a+85YWl5YiG5Lqr5pWw5o2uJykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnJywgJ+aUr+aMgeWOn+Wni+aVsOaNruWSjOS6keWJqui0tOadv+WIhuS6qycpLmlucHV0KChydWxlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2JhdGNoSW0/cnVsZT0nICsgcnVsZSkpLnJ1bGUpXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQuc3RhcnRzV2l0aCgnR2l0aHViQXBw5YiG5LqrIyMnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0ID0gYmFzZTY0RGVjb2RlKHBhcnNlUGFzdGUoaW5wdXQuc3BsaXQoJyMjXFxuJylbMV0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5zdGFydHNXaXRoKCdHaXRodWJBcHDliIbkuqssJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGJhc2U2NERlY29kZShwYXJzZVBhc3RlKGlucHV0LnNwbGl0KCdcXG4nKVsxXS5zcGxpdCgnQCcpWzBdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmF0Y2hJbXBvcnQoaW5wdXQsIHJ1bGUpXG4gICAgICAgICAgICAgICAgICAgIH0sICdHaXRodWJBcHAnKVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+WQiOW5tuacrOWcsOWSjOS6kScpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvYmF0Y2hJbScsIHt9KSkucnVsZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB5ZGF0YSA9IGZldGNoKFwiaHR0cHM6Ly9pZ2R1eC50b3AvfkdpdGh1YkFwcDBcIix7dGltZW91dDoyMDIzfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiYXRjaEltcG9ydCh5ZGF0YSwgJ0dpdGh1YkFwcCcpXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+iOt+WPluWksei0pe+8jOivt+mHjeivlSdcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+aLieWPluKaoO+4j+S6keaVsOaNricpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2RhdGEnLCB7fSkpLnJ1bGUpXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgeWRhdGEgPSBKU09OLnBhcnNlKGZldGNoKFwiaHR0cHM6Ly9pZ2R1eC50b3AvfkdpdGh1YkFwcDBcIix7dGltZW91dDoyMDIzfSkpXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JywgSlNPTi5zdHJpbmdpZnkoeWRhdGEpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+iOt+WPluWksei0pe+8jOivt+mHjeivlSdcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+aBouWkjem7mOiupOaVsOaNricpIHtcbi8vZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9kYXRhJywge30pKS5ydWxlKVxud3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcsIEpTT04uc3RyaW5naWZ5KG1kYXRhKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgICAgIH1lbHNlIGlmIChpbnB1dCA9PSAn5riF56m65pys5Zyw5pWw5o2uJykge1xuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JywgJycpXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R6L+c56iL5pWw5o2uJykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnJywgJ+WvhueggVxcbuS4jeefpemBk+ivt+eVmeepuicpLmlucHV0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnd2ViOi8vaHR0cHM6Ly9pZ2R1eC50b3AvfkdpdGh1YkFwcDA6JyArIGlucHV0XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruWumuWvvOWHuu+8nycpLmNvbmZpcm0oKHR5cGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcpIHx8ICdbXScpXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZSA9PSAn5YiG5Lqr5LqR5Ymq6LS05p2/Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gJ0dpdGh1YkFwcOWIhuS6qyMjXFxuJyArIHNoYXJlUGFzdGUoYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KGNvbmZpZykpKVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlID09ICfliIbkuqvkupHlj6Pku6QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnR2l0aHViQXBw5YiG5LqrLOWkjeWItuWQjuaJk+W8gOi9r+S7tuWNs+WPr+WvvOWFpVxcbicgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaGFyZVBhc3RlKGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShjb25maWcpKSkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQGltcG9ydD1qczpldmFsKEpTT04ucGFyc2UoZmV0Y2goXCJoaWtlcjovL3BhZ2UvY2xvdWQ/cnVsZT1HaXRodWJBcHBcIikpLnJ1bGUpJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IEpTT04uc3RyaW5naWZ5KGNvbmZpZylcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnY29weTovLycgKyBkYXRhXG4gICAgICAgICAgICAgICAgICAgIH0sIGlucHV0KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sbWRhdGEpLFxuICAgICAgICB9XG4gICAgKVxufVxuXG5kLnB1c2goe1xuICAgIGNvbF90eXBlOiAnYmlnX2JsYW5rX2Jsb2NrJyxcbn0pXG5cbnZhciBzcyA9IGdldEl0ZW0oJ3MnKS5zcGxpdCgn8J+UpScpXG5mb3IgKHZhciBpID0gMDsgaSA8IGRhdGEubGVuZ3RoOyBpKyspIHtcbiAgICB2YXIgZmlsdGVyQXBwV29yZCA9IGdldE15VmFyKCdmaWx0ZXJBcHBXb3JkJywgJycpXG4gICAgdmFyIEFwcCA9IGRhdGFbaV0uc3BsaXQoJ/CflKUnKVswXVxuICAgIHZhciBVcmxzID0gZGF0YVtpXS5zcGxpdCgn8J+UpScpWzFdXG4gICAgdmFyIEltZyA9IGRhdGFbaV0uc3BsaXQoJ/CflKUnKVsyXVxuXG5hcHB2cy5wdXNoKEFwcCsn77ya44CQJyt2ZXJzaW9uW2ldKyfjgJEnKVxuXG4gICAgaWYgKEFwcC50b0xvd2VyQ2FzZSgpLmluZGV4T2YoZmlsdGVyQXBwV29yZC50b0xvd2VyQ2FzZSgpKSA9PSAtMSkge1xuICAgICAgICBjb250aW51ZVxuICAgIH1cbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogc3MuaW5kZXhPZihpLnRvU3RyaW5nKCkpID09ICctMScgPyBBcHAgOiAn4oCc4oCc4oCd4oCdJyArIEFwcC5mb250Y29sb3IoJyNGRjAwRkYnKSxcbiAgICAgICAgZGVzYzogaSArIDEsXG4gICAgICAgIGltZzogSW1nLFxuICAgICAgICAvLyB1cmw6IFVybHMsXG4gICAgICAgIC8vIHVybDogXCJ0b2FzdDovL+WHhuWkh+aOkuW6j+aLiVwiLFxuXHRcdC8vIOWNleWHu+aTjeS9nDog6L+U5ZuedXJsc++8jFxuXHRcdC8vIOaOkuW6j+aTjeS9nDog5qC55o2u6I635Y+W55qE56e75YqoQXBw5L2N572ubW92ZV9pbmRleOWSjOeCueWHu+imgeaUvue9ruS9jee9rnJlcGxhY2VfaW5kZXjvvIzov5vooYzlr7lHaXRodWJBcHAudHh055qE5YaF5a656L+b6KGM6YeN5paw5o6S5bqP5bm26YeN5paw5YaZ5ZueXG4gICAgICAgIHVybDpcbiAgICAgICAgICAgIGNsaWNrX2FjdGlvbiA9PSAnY2xpY2snXG4gICAgICAgICAgICAgICAgPyAoVXJscy5lbmRzV2l0aCgndGFncycpPyBcIndlYjovL1wiICsgVXJscyA6IFVybHMpXG4gICAgICAgICAgICAgICAgOiAkKCkubGF6eVJ1bGUoKHJlcGxhY2VfaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignY2xpY2tfYWN0aW9uJywgJ2NsaWNrJylcbiAgICAgICAgICAgICAgICAgICAgICBsZXQgbW92ZV9pbmRleCA9IGdldE15VmFyKCdtb3ZlX2luZGV4JywgMClcbiAgICAgICAgICAgICAgICAgICAgIC8vICQubG9nKCfnp7vliqjnmoTntKLlvJXkuLo6ICcgKyBtb3ZlX2luZGV4KVxuICAgICAgICAgICAgICAgICAgICAgLy8gJC5sb2coJ+abv+aNoueahOS9jee9ruS4ujogJyArIHJlcGxhY2VfaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbmZpZyA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JykpXG4gICAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IGNvbmZpZy5zcGxpY2UobW92ZV9pbmRleCwgMSlbMF1cbiAgICAgICAgICAgICAgICAgICAgICBjb25maWcuc3BsaWNlKHJlcGxhY2VfaW5kZXgsIDAsIGVsZW1lbnQpXG4gICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpXG4gICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aOkuW6j+WujOavlSdcbiAgICAgICAgICAgICAgICAgIH0sIGkpLFxuICAgICAgICBjb2xfdHlwZTogJ2ljb25fNF9jYXJkJyxcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIHNzOiBzcyxcbiAgICAgICAgICAgIGk6IGksXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnIOe8liDovpEgJyxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgICAgICAoZGF0YSwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5JykucnVsZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRhdGEsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn57yW6L6RR2l0aHViQXBwJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkID0gW11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5ZCN56ewJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+i+k+WFpUFwcOWQjeWtlycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ25hJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBkYXRhW2ldLnNwbGl0KCfwn5SlJylbMF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAndGV4dGFyZWEnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAtMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcInB1dE15VmFyKCduYScsaW5wdXQpXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Zyw5Z2AJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+i+k+WFpWdpdGh1YiByZWxlYXNlcycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ3JlbGVhc2UnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGRhdGFbaV0uc3BsaXQoJ/CflKUnKVsxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICd0ZXh0YXJlYScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IC0xLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFwicHV0TXlWYXIoJ3JlbGVhc2UnLGlucHV0KVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WbvuaghycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfovpPlhaXlm77moIflnLDlnYAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdpY28nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGRhdGFbaV0uc3BsaXQoJ/CflKUnKVsyXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICd0ZXh0YXJlYScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IC0xLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFwicHV0TXlWYXIoJ2ljbycsaW5wdXQpXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdJyArICfnoa7orqTkv67mlLknLmZvbnRjb2xvcignI0ZGMDBGRicpLmJpZygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZGF0YSwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcignbmEnKSA9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ZCN5a2X5LiN6IO95Li656m6fidcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRNeVZhcigncmVsZWFzZScpID09ICcnIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICEvXmh0dHBzXFw6XFwvXFwvZ2l0aHViXFwuY29tXFwvLio/XFwvKHJlbGVhc2VzfHRhZ3MpLy50ZXN0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TXlWYXIoJ3JlbGVhc2UnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/or7fovpPlhaXmraPnoa7nmoTlnLDlnYB+J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdGVtID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldE15VmFyKCduYScsICcnKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn8J+UpScgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TXlWYXIoJ3JlbGVhc2UnLCAnJykudG9Mb3dlckNhc2UoKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn8J+UpScgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TXlWYXIoJ2ljbycsICcnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhW2ldID0gaXRlbVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoZGF0YSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrKHRydWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip9+J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogeyBsaW5lVmlzaWJsZTogZmFsc2UgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgaVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJyDnp7sg5L2NICcsXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKFxuICAgICAgICAgICAgICAgICAgICAgICAgKGRhdGEsIG1vdmVfaW5kZXgpID0+IHtcblx0XHRcdFx0XHRcdFx0Ly8g6K6+572u5Y2V5Ye75Yqo5L2c5Li65o6S5bqP77yM6I635Y+W6KaB56e75YqoQXBw55qE5L2N572ubW92ZV9pbmRleFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdjbGlja19hY3Rpb24nLCAnbW92ZScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ21vdmVfaW5kZXgnLCBtb3ZlX2luZGV4KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJldHVybiAkKCcnLCAn6K+36L6T5YWl56e75Yqo5Yiw56ys5Yeg5L2NXFxuMeS4uue9rumhtiwnK2RhdGEubGVuZ3RoKyfkuLrnva7lupUnKS5pbnB1dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgKGRhdGEsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIHZhciB0ZW1wID0gZGF0YVtpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgaWYgKGlucHV0IC0gMSA8IGkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICBkYXRhLnNwbGljZShpbnB1dCAtIDEsIDAsIHRlbXApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgZGF0YS5zcGxpY2UoaSArIDEsIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgIGRhdGEuc3BsaWNlKGlucHV0LCAwLCB0ZW1wKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgIGRhdGEuc3BsaWNlKGksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICB3cml0ZUZpbGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICBKU09OLnN0cmluZ2lmeShkYXRhKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v56e75L2N5oiQ5YqffidcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIClcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgaVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJyDliKAg6ZmkICcsXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKFxuICAgICAgICAgICAgICAgICAgICAgICAgKGRhdGEsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnNwbGljZShpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnLCBKU09OLnN0cmluZ2lmeShkYXRhKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICcg5re7IOWKoCAnLFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgICAgICjmt7vliqAsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknICsg5re75YqgXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAg5re75YqgLFxuICAgICAgICAgICAgICAgICAgICAgICAgaVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJyAnICsgKGkgKyAxKSArICcgJyxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKGRhdGEsdmVyc2lvbixpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YWkgPSBKU09OLnN0cmluZ2lmeShbZGF0YVtpXV0pXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2FzdCgn54mI5pys5Y+377yaJyArIHZlcnNpb25baV0pXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJjb3B5Oi8vXCIgKyBkYXRhaVxuICAgICAgICAgICAgICAgICAgICB9LGRhdGEsdmVyc2lvbixpKSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSxcbiAgICAgICAgfSxcbiAgICB9KVxufVxuXG5kLnB1c2goe1xuICAgIHRpdGxlOiAn5re75YqgJyxcbiAgICBpbWc6ICdodHRwczovL2ltZy52aW51YS5jbi9pbWFnZXMvSUtXaFIucG5nJyxcbiAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyArIOa3u+WKoCxcbiAgICBjb2xfdHlwZTogJ2ljb25fNF9jYXJkJyxcbiAgICBleHRyYToge1xuICAgICAgICBpOiBkYXRhLmxlbmd0aCxcbiAgICAgICAgbG9uZ0NsaWNrOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGl0bGU6ICflubjov5Dml6UnLFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG51bWIgPSAxICsgTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogMzEpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDnmoTlubjov5Dml6XmmK/jgJAnICsgbnVtYiArICfjgJHml6UnXG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgIH0sXG59KVxuXG4gICAgICAvL2xvZyhhcHB2cy5qb2luKCdcXG4nKSlcblxuc2V0UmVzdWx0KGQpIiwic2VhcmNoX3VybCI6IiIsImdyb3VwIjoi4pGj4o+wIiwic2VhcmNoRmluZCI6IiIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoianM6XG5hZGRMaXN0ZW5lcihcIm9uQ2xvc2VcIiwgJC50b1N0cmluZygoKSA9PiB7XG4gICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG59KSk7XG52YXIgZCA9IFtdXG52YXIgaHRtbCA9IGZldGNoKE1ZX1VSTClcblxudmFyIHNzID0gTVlfUEFSQU1TLnNzXG52YXIgaSA9IE1ZX1BBUkFNUy5pXG4gICAgICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IHNzLmluZGV4T2YoaS50b1N0cmluZygpKVxuICAgICAgICAgICAgICAgICAgICBpZihpbmRleCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgc3Muc3BsaWNlKGluZGV4LCAxKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNzLmxlbmd0aDwxKVxuICAgICAgICAgICAgICAgICAgICAgICB7dmFyIHMgPSAnJ31lbHNle1xuICAgICAgICAgICAgICAgICAgICAgICB2YXIgcyA9IHNzLmpvaW4oJ/CflKUnKX0gICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdzJywgcylcbiAgICAgICAgICAgICAgICAgICAgIH1cblxudmFyIGF1dGhvciA9IHBkZmgoaHRtbCwnYm9keSYmZGl2W2RhdGEtaHBjXSYmc2VjdGlvbiYmLm1iLW1kLTImJlRleHQnKVxudmFyIGltZyA9IHBkZmgoaHRtbCwnYm9keSYmZGl2W2RhdGEtaHBjXSYmc2VjdGlvbiYmLm1iLW1kLTImJmltZyYmc3JjJylcbnZhciB2ZXJzaW9uID0gcGRmaChodG1sLCdib2R5JiZkaXZbZGF0YS1ocGNdJiZzZWN0aW9uJiZoMiYmVGV4dCcpXG5kLnB1c2goe1xuICAgIHRpdGxlOiBhdXRob3IsXG4gICAgZGVzYzogJ0xhc3TvvJonICsgdmVyc2lvbi5mb250Y29sb3IoJyNGRjY2OTknKS5iaWcoKSArICdcXHRcXHRcXHRcXHQnLFxuICAgIGltZzogaW1nLFxuICAgIHVybDogTVlfVVJMLFxuICAgIGNvbF90eXBlOiAnYXZhdGFyJ1xufSlcblxudmFyIGNvbnRlbnQgPSBwZGZoKGh0bWwsIFwiYm9keSYmZGl2W2RhdGEtaHBjXSYmc2VjdGlvbiYmLmNvbC1tZC05JiZkaXZbZGF0YS1wamF4PXRydWVdJiZUZXh0XCIpO1xuZC5wdXNoKHtcbiAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyBjb250ZW50LmZvbnRjb2xvcignIzQ1NTVCNicpLnNtYWxsKCksXG4gICAgZGVzYzogJycsXG4gICAgcGljX3VybDogJycsXG4gICAgdXJsOiBNWV9VUkwgKyAkKCcnKS5ydWxlKChodG1sKT0+e1xuICAgICAgICAgICAgICB2YXIgZCA9IFtdXG4gICAgICAgICAgICAgIHZhciBjb250ZW50ID0gcGRmaChodG1sLCBcImJvZHkmJmRpdltkYXRhLWhwY10mJnNlY3Rpb24mJi5jb2wtbWQtOSYmZGl2W2RhdGEtcGpheD10cnVlXSYmSHRtbFwiKS5yZXBsYWNlKC88XFxzKig/IShsaXxwKVxccypcXC8/KVtePl0rPi9nbSwgJycpO1xuICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgdGl0bGU6IGNvbnRlbnQuZm9udGNvbG9yKCcjNDU1NUI2Jykuc21hbGwoKSxcbiAgICAgICAgICAgICAgICAgZGVzYzogJycsXG4gICAgICAgICAgICAgICAgIHBpY191cmw6ICcnLFxuICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldFJlc3VsdChkKVxuICAgICAgICAgICAgIH0saHRtbCksXG4gICAgY29sX3R5cGU6ICd0ZXh0XzEnXG59KTtcblxudmFyIHVybCA9IHBkKGh0bWwsJ2JvZHkmJmRpdltkYXRhLWhwY10mJnNlY3Rpb24mJmRldGFpbHM6aGFzKGluY2x1ZGUtZnJhZ21lbnQpJiZpbmNsdWRlLWZyYWdtZW50JiZzcmN8fGRhdGEtZGVmZXJyZWQtc3JjJylcbi8vbG9nKHVybClcbnZhciBsaXN0ID0gcGRmYShmZXRjaCh1cmwpLCd1bCYmbGknKVxubGlzdC5mb3JFYWNoKGl0ZW09PntcbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyBwZGZoKGl0ZW0sJy5UcnVuY2F0ZS10ZXh0JiZUZXh0JykuZm9udGNvbG9yKCcjM2E3MzU2JyksXG4gICAgICAgIGRlc2M6IH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qgID0gJCgnJykucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGluZGV4ID0gTVlfUEFSQU1TLmlcXG4gICAgICAgICAgICBzZXRQYWdlVGl0bGUoJ+a3u+WKoEdpdGh1YkFwcCcpXFxuICAgICAgICAgICAgdmFyIGQgPSBbXVxcbiAgICAgICAgICAgIGQucHVzaChcXG4gICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflkI3np7AnLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+i+k+WFpUFwcOWQjeWtlycsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ25hbWUnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ25hbWUnLCAnJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3RleHRhcmVhJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IC0xLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ25hbWUnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WcsOWdgCcsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAn6L6T5YWlZ2l0aHViIHJlbGVhc2VzJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcigncmVsZWFzZXMnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ3JlbGVhc2VzJywgJycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICd0ZXh0YXJlYScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAtMSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dE15VmFyKCdyZWxlYXNlcycsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Zu+5qCHJyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICfovpPlhaXlm77moIflnLDlnYAnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdpY29uJylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKCdpY29uJywgJycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICd0ZXh0YXJlYScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAtMSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dE15VmFyKCdpY29uJyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgJ+ehruiupOa3u+WKoCcuZm9udGNvbG9yKCcjRkYwMEZGJykuYmlnKCksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKCduYW1lJykgPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WQjeWtl+S4jeiDveS4uuepun4nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TXlWYXIoJ3JlbGVhc2VzJykgPT0gJycgfHxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIS9eaHR0cHNcXFxcOlxcXFwvXFxcXC9naXRodWJcXFxcLmNvbVxcXFwvLio/XFxcXC8ocmVsZWFzZXN8dGFncykvLnRlc3QoZ2V0TXlWYXIoJ3JlbGVhc2VzJykpXFxuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/or7fovpPlhaXmraPnoa7nmoTlnLDlnYB+J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdGVtID1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldE15VmFyKCduYW1lJywgJycpICtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICfwn5SlJyArXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRNeVZhcigncmVsZWFzZXMnLCAnJykudG9Mb3dlckNhc2UoKSArXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn8J+UpScgK1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TXlWYXIoJ2ljb24nLCAnJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0ciA9IGZldGNoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc3RyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IFtpdGVtXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcsIEpTT04uc3RyaW5naWZ5KGxpc3QpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjayh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL0FwcOa3u+WKoOaIkOWKn34nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IEpTT04ucGFyc2Uoc3RyKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbGVhc2UgPSBsaXN0Lm1hcCgoaSkgPT4gaS5zcGxpdCgn8J+UpScpWzFdLnRvTG93ZXJDYXNlKCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVsZWFzZS5pbmRleE9mKGl0ZW0uc3BsaXQoJ/CflKUnKVsxXSkgPT0gJy0xJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgbGlzdC5wdXNoKGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGlzdC51bnNoaWZ0KGl0ZW0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdC5zcGxpY2UoaW5kZXgsIDAsIGl0ZW0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkobGlzdClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjayh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly9BcHDmt7vliqDmiJDlip9+J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5pyJ55u45ZCMQXBwfidcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0saW5kZXgpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7IGxpbmVWaXNpYmxlOiBmYWxzZSB9LFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyAn54K55oiR6aKE6KeIJy5mb250Y29sb3IoJyMwMERBQzQnKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYTogeyBsaW5lVmlzaWJsZTogZmFsc2UgfSxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCduYW1lJywgJycpLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBnZXRNeVZhcignaWNvbicsICcnKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignaWNvbicpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignbmFtZScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcigncmVsZWFzZXMnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpY29uXzRfY2FyZCcsXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICApXFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpXFxuICAgICAgICB9KVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5LiK5Lyg5LqR56uvXCIsXCJwYXRoXCI6XCJ1cGxvYWRcIixcInJ1bGVcIjpcImZ1bmN0aW9uIGJhdGNodXBsb2FkKGlucHV0LCBydWxlKSB7XFxuICAgIGlucHV0ID0gaW5wdXQudHJpbSgpO1xcbiAgICBsZXQgaW0gPSBKU09OLnBhcnNlKGlucHV0KTsgICBcXG4gICAgbGV0IGNvbmZpZyA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JykgfHwgJ1tdJyk7XFxuICAgIGxldCBjb3VudCA9IDA7XFxuICAgIGxldCBhbGwgPSBpbS5tYXAoaXQgPT4gaXQuc3BsaXQoJ/CflKUnKVsxXS50b0xvd2VyQ2FzZSgpKTtcXG4gICAgZm9yIChsZXQgaSBvZiBjb25maWcpIHtcXG4gICAgICAgIGlmIChhbGwuaW5kZXhPZihpLnNwbGl0KCfwn5SlJylbMV0udG9Mb3dlckNhc2UoKSkgPj0gMCkge1xcbiAgICAgICAgICAgIC8v6YeN5aSN55qE5LiN6KaBXFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgIC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