Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_海阔视频解析@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgIOa1t+mYlOinhumikeino+aekAovLyBAbmFtZXNwYWNlIAkgeGoKLy8gQHZlcnNpb24gICAgICA3LjIKLy8gQGRlc2NyaXB0aW9uICDoh6rnlKjlpJrlip/og73ohJrmnKzlt6XlhbfnrrEKLy8gQGF1dGhvciAgICAgICAKLy8gQGljb24gICAgICAgICBkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUdRQUFBQmtDQVlBQUFCdzRwVlVBQUFROEVsRVFWUjRYdTFkQ1hRVVJScithcElRVDF3UXc2RVlCY1NFckNnS0NvUW93b29jTGlyS2VvQW9MRDV4MllEdStoVENQbmRkSmVDNUN0NmdJQnRkbFVNUXhBUEU5NWdNS2tiaG9XR0NLTWdwc1BqVW9Fc0lrTnIzVGFkaE11bWVxZTZ1bmdSSThTQkFWOWZ4Zi9XZjlWZVhnSWNpcGN6eThQcFIvYW9Rb3N6TkJJV1RsNlNVdlFBTUFIQUpnRmJZc1NzZEg1ZTB3aWNsd01wVndLN2RUcG83ZXVwbU5BTzZkUWE2ZERKK3RzallDR0FMZ0dJQTd3b2grRk9wS0FNaTkrMjdHWTBhRGNTVzdkM3h5dXN0RUNwSncyYjIyVkJxVVNDek5aQjN5VDZNdUdrcm1tY3NSMlhsSXBHZVBrK0ZVa3FBeUc4Mi9CbW50N3dXejg2OEFDKzkybFNsNFlZNkFOSWJBYmZjc0F0M0RpdkJ0dS9uaTNadHBpV2lTMXhBNUE4L2RNZTg5d2FnN1ZsOThlRGo1MkxucmhNVE5kanczSUlDelU4cngvMzNyTVdHRFlzeHNPOWljZHBwbjl2UnlSWVF1WHYzSUtTa0RNQ2txVDJ4OElQVElaRGVRR3dQRkpDeUFnT3YvQTczNVMvRmZyRl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VybCI6Imh0dHBzOi8vd3d3Lm10b3N6LmNvbS9tM3U4LnBocD91cmw9IiwgInNob3dUeXBlIjoxfSwKCSAgICAJeyJuYW1lIjoi55uW5LiWIiwidXJsIjoiaHR0cHM6Ly93d3cuZ2FpNC5jb20vP3VybD0iLCAic2hvd1R5cGUiOjF9LAoJICAgICAgICB7Im5hbWUiOiI0SyIsInVybCI6Imh0dHBzOi8vanguNGtkdi5jb20vP3VybD0iLCAic2hvd1R5cGUiOjF9LAoJICAgICAgICAgXTsKIAogICAgICAgIGxldCB1c2VXZWIgPSBbJ20uYmlsaWJpbGkuY29tJywneW91a3UuY29tJywnd3d3LnlvdWt1LmNvbScsJ20ueW91a3UuY29tJywnbS52LnFxLmNvbScsJ20uaXFpeWkuY29tJywnbS5tZ3R2LmNvbScsJ20udHYuc29odS5jb20nLCdtLjE5MDUuY29tJywnbS5wcHR2LmNvbScsJ20ubGUuY29tJ107CiAKICAgICAgICBpZih1c2VXZWIuaW5kZXhPZihsb2NhdGlvbi5ob3N0KSA9PSAtMSl7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCfkuI3mmK/lupTnlKjnvZHnq5knKTtyZXR1cm47CiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gc2V0Q29va2llKGNuYW1lLGN2YWx1ZSxleGRheXMpewogCiAgICAgICAgICAgIHZhciBkID0gbmV3IERhdGUoKTsKIAogICAgICAgICAgICBkLnNldFRpbWUoZC5nZXRUaW1lKCkrKGV4ZGF5cyoyNCo2MCo2MCoxMDAwKSk7CiAKICAgICAgICAgICAgdmFyIGV4cGlyZXMgPSAiZXhwaXJlcz0iK2QudG9HTVRTdHJpbmcoKTsKIAogICAgICAgICAgICBkb2N1bWVudC5jb29raWUgPSBjbmFtZSsiPSIrY3ZhbHVlKyI7ICIrZXhwaXJlczsKICAgICAgICB9CiAKICAgICAgICBmdW5jdGlvbiBnZXRDb29raWUoY25hbWUpewogICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICB2YXIgY2EgPSBkb2N1bWVudC5jb29raWUuc3BsaXQoJzsnKTsKICAgICAgICAgICAgZm9yKHZhciBpPTA7IGk8Y2EubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgaWYgKGMuaW5kZXhPZihuYW1lKT09MCkgeyByZXR1cm4gYy5zdWJzdHJpbmcobmFtZS5sZW5ndGgsYy5sZW5ndGgpOyB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KIAogICAgICAgIGZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnQoZG9tLGRvbUlkKXsKIAogICAgICAgICAgICB2YXIgcm9vdEVsZW1lbnQgPSBkb2N1bWVudC5ib2R5OwogCiAgICAgICAgICAgIHZhciBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChkb20pOwogCiAgICAgICAgICAgIG5ld0VsZW1lbnQuaWQgPSBkb21JZDsKIAogICAgICAgICAgICB2YXIgbmV3RWxlbWVudEh0bWxDb250ZW50ID0gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoJycpOwogCiAgICAgICAgICAgIHJvb3RFbGVtZW50LmFwcGVuZENoaWxkKG5ld0VsZW1lbnQpOwogCiAgICAgICAgICAgIG5ld0VsZW1lbnQuYXBwZW5kQ2hpbGQobmV3RWxlbWVudEh0bWxDb250ZW50KTsKIAogICAgICAgIH0KIAogICAgICAgIGZ1bmN0aW9uIHRvYXN0KG1zZyxkdXJhdGlvbil7CiAKICAgICAgICAgICAgZHVyYXRpb249aXNOYU4oZHVyYXRpb24pPzMwMDA6ZHVyYXRpb247CiAKICAgICAgICAgICAgbGV0IHRvYXN0RG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAKICAgICAgICAgICAgdG9hc3REb20uaW5uZXJIVE1MID0gbXNnOwogCiAgICAgICAgICAgIHRvYXN0RG9tLnN0eWxlLmNzc1RleHQ9J3BhZGRpbmc6MnB4IDE1cHg7bWluLWhlaWdodDogMzZweDtsaW5lLWhlaWdodDogMzZweDt0ZXh0LWFsaWduOiBjZW50ZXI7dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSk7Ym9yZGVyLXJhZGl1czogNHB4O2NvbG9yOiByZ2IoMjU1LCAyNTUsIDI1NSk7cG9zaXRpb246IGZpeGVkO3RvcDogNTAlO2xlZnQ6IDUwJTt6LWluZGV4OiA5OTk5OTk5O2JhY2tncm91bmQ6IHJnYigwLCAwLCAwKTtmb250LXNpemU6IDE2cHg7JwogCiAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodG9hc3REb20pOwogCiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7CiAKICAgICAgICAgICAgICAgIHZhciBkID0gMC41OwogCiAgICAgICAgICAgICAgICB0b2FzdERvbS5zdHlsZS53ZWJraXRUcmFuc2l0aW9uID0gJy13ZWJraXQtdHJhbnNmb3JtICcgKyBkICsgJ3MgZWFzZS1pbiwgb3BhY2l0eSAnICsgZCArICdzIGVhc2UtaW4nOwogCiAgICAgICAgICAgICAgICB0b2FzdERvbS5zdHlsZS5vcGFjaXR5ID0gJzAnOwogCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgeyBkb2N1bWVudC5ib2R5LnJlbW92ZUNoaWxkKHRvYXN0RG9tKSB9LCBkICogMTAwMCk7CiAKICAgICAgICAgICAgfSwgZHVyYXRpb24pOwogCiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gcGxheVZpZGVvRnVuYygpewogICAgICAgICAgICAvL2NzcwogICAgICAgICAgICBsZXQgcGxheVZpZGVvU3R5bGUgPSBgCiAgICAgICAgICAgIC56aG1fcGxheV92aWRvZV9pY29uewogICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4O2N1cnNvcjpwb2ludGVyOwogICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OwogICAgICAgICAgICAgICAgZGlzcGxheTpibG9jazsKICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkO2xldDowcHg7dG9wOjM2MHB4O3RleHQtYWxpZ246Y2VudGVyO292ZXJmbG93OnZpc2libGUKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fd3JhcHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkO2xlZnQ6NDBweDt0b3A6MzYwcHg7CiAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTk7CiAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmV7CiAgICAgICAgICAgICAgICB3aWR0aDozMjBweDsKICAgICAgICAgICAgICAgIGhlaWdodDozMTZweDsKICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6c2Nyb2xsOwogICAgICAgICAgICAgICAgb3ZlcmZsb3cteDpoaWRkZW47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVfbGluZV91bHsKICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogZmxleC1zdGFydDsKICAgICAgICAgICAgICAgIGZsZXgtZmxvdzogcm93IHdyYXA7CiAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgcGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICBtYXJnaW46MHB4OwogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGl7CiAgICAgICAgICAgICAgICBwYWRkaW5nOjRweCAwcHg7CiAgICAgICAgICAgICAgICBtYXJnaW46MnB4OwogICAgICAgICAgICAgICAgd2lkdGg6MzAlOwogICAgICAgICAgICAgICAgY29sb3I6I0ZGRjsKICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZjI0NDQzOwogICAgICAgICAgICAgICAgYm94LXNoYWRvdzowcHggMHB4IDEwcHggI2ZmZjsKICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lX3VsX2xpOmhvdmVyewogICAgICAgICAgICAgICAgY29sb3I6IzI2MDAzMzsKICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZjYzBjMAogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fbGluZV9zZWxlY3RlZHsKICAgICAgICAgICAgICAgIGNvbG9yOiMyNjAwMzM7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19qeHsKICAgICAgICAgICAgICAgIHdpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OwogICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO3RvcDowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYDsKIAogICAgICAgICAgICBkb21TdHlsZS5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShwbGF5VmlkZW9TdHlsZSkpOwogCiAgICAgICAgICAgIGRvbUhlYWQuYXBwZW5kQ2hpbGQoZG9tU3R5bGUpOwogCiAgICAgICAgICAgIC8vdGVtcGxhdGU6aWNvbixwbGF5TGluZTsKICAgICAgIC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tXC8vfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjbGVfcGxheWJveCIsbm9kZVR5cGU6J2lkJyxtYXRjaDovbGVcLmNvbVwvcHR2XC92cGxheVwvLyxhcmVhQ2xhc3NOYW1lOidqdWppX2dyaWQnfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjcGxheWVyIixub2RlVHlwZTonaWQnLG1hdGNoOi9wbGF5XC50dWRvdVwuY29tXC92X3Nob3dcL2lkXy99LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG5vZGU6IiNwcHR2X3BsYXlwYWdlX2JveCIsbm9kZVR5cGU6J2lkJyxtYXRjaDovdlwucHB0dlwuY29tXC9zaG93XC8vfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjcGxheWVyIixub2RlVHlwZTonaWQnLG1hdGNoOi92aXBcLjE5MDUuY29tXC9wbGF5XC8vfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjdm9kUGxheWVyIixub2RlVHlwZTonaWQnLG1hdGNoOi93d3dcLjE5MDUuY29tXC92b2RcL3BsYXlcLy99LAogICAgICAgICAgICBdOwogCiAgICAgICAgICAgIC8v5Yib5bu6bG9nb19pY29uCiAgICAgICAgICAgIGNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobUljb24nKTsKIAogICAgICAgICAgICBsZXQgemhtUGxheSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1JY29uJyk7CiAKICAgICAgICAgICAgemhtUGxheS5pbm5lckhUTUwgPSBwbGF5V3JhcEh0bWw7CiAKICAgICAgICAgICAgbGV0IGp4VmlkZW9XZWIgPSBqeFZpZGVvRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwogCiAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobWxvZ28nKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgbGV0IGp4VmlkZW9XZWIgPSBqeFZpZGVvRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbG9jYXRpb24uaHJlZi5tYXRjaChpdGVtLm1hdGNoKTsKIAogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgaWYoanhWaWRlb1dlYi5sZW5ndGggPT0gMCl7CiAKICAgICAgICAgICAgICAgICAgICB0b2FzdCgn6K+35Zyo6KeG6aKR5pKt5pS+6aG154K55Ye75Zu+5qCHJyk7CiAKICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgdmFyIHtmdW5jTmFtZSxtYXRjaDpub3dNYXRjaCxub2RlOm5vd05vZGUsbmFtZTpub3dOYW1lfSA9IGp4VmlkZW9XZWJbMF07CiAKICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUxpbmVEaXYgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuemhtX3BsYXlfdmlkZW9fd3JhcCcpOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlTaG93ID0gcGxheUxpbmVEaXYuc3R5bGUuZGlzcGxheTsKIAogICAgICAgICAgICAgICAgICAgIHBsYXlTaG93ID09ICdub25lJz8gcGxheUxpbmVEaXYuc3R5bGUuZGlzcGxheSA9ICdibG9jayc6cGxheUxpbmVEaXYuc3R5bGUuZGlzcGxheSA9ICdub25lJzsKIAogICAgICAgICAgICAgICAgICAgIHZhciBwbGF5TGluZVRkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnBsYXlMaW5lVGQnKTsKIAogICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lVGQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnNldEF0dHJpYnV0ZSgnY2xhc3MnLCdwbGF5TGluZVRkIHpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGknKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saSB6aG1fbGluZV9zZWxlY3RlZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRDb29raWUoJ3BsYXlMaW5lQWN0aW9uJyx0aGlzLmdldEF0dHJpYnV0ZSgndXJsJyksMzApOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm93V2ViTm9kZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iobm93Tm9kZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd1dlYk5vZGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93V2ViTm9kZS5pbm5lckhUTUwgPSBwbGF5SnhIdG1sOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlJZnJhbWUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGxheUlmcmFtZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheUlmcmFtZS5zcmM9IGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop4bpopHnvZHnq5nnu5PngrnkuI3lrZjlnKgnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICB9KQogCiAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgbGV0IGk9MDsKIAogICAgICAgICAgICAgICAgZS5wYXRoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNsYXNzTmFtZT09J2ljb25Mb2dvJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaT0xOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGkpOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgaWYoaT09MCl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgaXNTaG93ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnpobV9wbGF5X3ZpZGVvX3dyYXAnKS5zdHlsZS5kaXNwbGF5OwogCiAgICAgICAgICAgICAgICAgICAgaWYoaXNTaG93ID09ICdibG9jaycpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy56aG1fcGxheV92aWRlb193cmFwJykuc3R5bGUuZGlzcGxheT0nbm9uZSc7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KQogICAgICAgIH0KIAogICAgICAgIHBsYXlWaWRlb0Z1bmMoKTsKIAogICAgfWVsc2V7CiAgICAgICAgLyotLWNvbmZpZy0tKi8KICAgICAgICB2YXIgQ29uZmlnID17CiAKICAgICAgICBjb3Vwb25Vcmw6d2luZG93LmxvY2F0aW9uLmhyZWYsCiAKICAgICAgICBjb3Vwb25Ib3N0OndpbmRvdy5sb2NhdGlvbi5ob3N0LAogCiAgICAgICAgemhtQXBpVXJsOidodHRwczovL3d3dy5lZ2d2b2QuY24vJywKIAogICAgICAgIGljb25WaXBUb3A6MzYwLAogCiAgICAgICAgaWNvblZpcFBvc2l0aW9uIDogJ2xlZnQnLAogCiAgICAgICAgaWNvblZpcFdpZHRoIDogNDAsCiAKICAgICAgICBqeENvZGVJbmZvIDogeydpbic6ODE1MTY2OTksJ2NvZGUnOjR9LAogCiAgICAgICAgY291cG9uVGltZXJOdW0gOiAxMDAsLy8xMDDmrKHnrYnkuo4xMOenkgogCiAgICAgICAgY291cG9uV2FpdFRpbWUgOiAxMDAsCiAKICAgICAgICBpY29uV2FpdFRpbWUgOiAxMDAsCiAKICAgICAgICBzZWxlY3RlZExlZnQ6J3NlbGVjdGVkJywKIAogICAgICAgIHNlbGVjdGVkUmlnaHQ6JycsCiAKICAgICAgICB2aWRlb1BsYXlMaW5lQWRkOkdNX2dldFZhbHVlKCd2aWRlb1BsYXlMaW5lQWRkJywwKSwKIAogICAgICAgIGR5VmlkZW9Eb3dubG9hZDpHTV9nZXRWYWx1ZSgnZHlWaWRlb0Rvd25sb2FkJywyMiksCiAKICAgICAgICBrc1ZpZGVvRG93bmxvYWQ6R01fZ2V0VmFsdWUoJ2tzVmlkZW9Eb3dubG9hZCcsMjIpLAogCiAgICAgICAgeGlndWFWaWRlb0Rvd25sb2FkOkdNX2dldFZhbHVlKCd4aWd1YVZpZGVvRG93bmxvYWQnLDIyKSwKIAogICAgICAgIGJpbGlWaWRlb0Rvd25sb2FkOkdNX2dldFZhbHVlKCdiaWxpVmlkZW9Eb3dubG9hZCcsMjIpLAogICAgICAgIH0KIAogICAgICAgIHZhciB7Y291cG9uVXJsLAogICAgICAgICAgICBjb3Vwb25Ib3N0LAogICAgICAgICAgICB6aG1BcGlVcmwsCiAgICAgICAgICAgIGljb25WaXBUb3AsCiAgICAgICAgICAgIGljb25WaXBQb3NpdGlvbiwKICAgICAgICAgICAgaWNvblZpcFdpZHRoLAogICAgICAgICAgICBqeENvZGVJbmZvLAogICAgICAgICAgICBjb3Vwb25UaW1lck51bSwKICAgICAgICAgICAgY291cG9uV2FpdFRpbWUsCiAgICAgICAgICAgIGljb25XYWl0VGltZSwKICAgICAgICAgICAgc2VsZWN0ZWRMZWZ0LAogICAgICAgICAgICBzZWxlY3RlZFJpZ2h0LAogICAgICAgICAgICB2aWRlb1BsYXlMaW5lQWRkLAogICAgICAgICAgICBkeVZpZGVvRG93bmxvYWQsCiAgICAgICAgICAgIGtzVmlkZW9Eb3dubG9hZCwKICAgICAgICAgICAgeGlndWFWaWRlb0Rvd25sb2FkLAogICAgICAgICAgICBiaWxpVmlkZW9Eb3dubG9hZAogICAgICAgIH0gPSBDb25maWc7CiAgICAgICAgLyotLWxhbmctLSovCiAgICAgICAgdmFyIGxhbmcgPSB7CiAgICAgICAgICAgIHNldDon6K6+572uJywKICAgICAgICAgICAgaWNvblBvc2l0aW9uOiflm77moIfkvY3nva4nLAogICAgICAgICAgICBwbGF5VmlkZW86J+inhumikeino+aekCcsCiAgICAgICAgICAgIHBsYXlNdXNpYzon6Z+z5LmQ5LiL6L29JywKICAgICAgICAgICAgemhOaWNlOifnn6XkuY7lop7lvLonLAogICAgICAgICAgICB2aWRlb0Rvd25sb2FkOifop4bpopHkuIvovb0nLAogICAgICAgICAgICBiYWlkdURvd25sb2FkOifnmb7luqbkuIvovb0nLAogICAgICAgICAgICBpY29uSGVpZ2h0Oiflm77moIfpq5jluqYnLAogICAgICAgICAgICBpY29uV2lkdGg6J+Wbvuagh+Wkp+WwjycsCiAgICAgICAgICAgIGljb25MaW5lOifmsLTlubPkvY3nva4nLAogICAgICAgICAgICBpY29uV2FpdFRpbWU6J+etieW+heaXtumXtCcsCiAgICAgICAgICAgIGljb25MZWZ0OifpnaDlt6YnLAogICAgICAgICAgICBpY29uUmlnaHQ6J+mdoOWPsycsCiAgICAgICAgICAgIHRpcEljb25IZWlnaHQ6J+m7mOiupDM2MCzlu7rorq4xfjUwMCcsCiAgICAgICAgICAgIHRpcEljb25XaWR0aDon6buY6K6kNDAs5bu66K6uMjB+NTAnLAogICAgICAgICAgICB0aXBFcnJvckljb25IZWlnaHQ6Jzzlm77moIfkvY3nva4+5Lit55qEPOWbvuagh+mrmOW6pj7lupTkuLoxMDAw5Lul5YaF5q2j5pW05pWw77yM5bu66K6uMX41MDAnLAogICAgICAgICAgICB0aXBFcnJvckljb25XaWR0aDonPOWbvuagh+S9jee9rj7kuK3nmoQ85Zu+5qCH5aSn5bCPPuW6lOS4ujEwMOS7peWGheato+aVtOaVsO+8jOW7uuiurjIwfjUwJywKICAgICAgICAgICAgc2V0UGxheVZpZGVvOifop6PmnpDorr7nva4nLAogICAgICAgICAgICBwbGF5VmlkZW9MaW5lQWRkOifmt7vliqDnur/ot68nLAogICAgICAgICAgICB0aXBQbGF5VmlkZW9MaW5lQWRkOifor7fovpPlhaXnur/ot6/lkI3np7Dlkozop6PmnpDlnLDlnYDvvIzkvos6Iue6v+i3r+WFrWh0dHBzOi8vanguemR5LmNvbS8/dXJsPSLvvIzmr4/nur/ot6/kuIDooYzjgIInLAogICAgICAgICAgICB6aFNldDon55+l5LmO6K6+572uJywKICAgICAgICAgICAgemhWaWRlb0Nsb3NlOiflsY/olL3op4bpopEnLAogICAgICAgICAgICB6aFZpZGVvRG93bmxvYWQ6J+inhumikeS4i+i9vScsCiAgICAgICAgICAgIHpoQURDbG9zZTon5bGP6JS95bm/5ZGKJywKICAgICAgICAgICAgemhDbG9zZUxlZnQ6J+WFs+mXreS+p+i+ueagjycsCiAgICAgICAgICAgIHpoQ2hhbmdlTGluazon6ZO+5o6l55u05o6l6Lez6L2sJywKICAgICAgICAgICAgc3BlY2lhbENvbHVtbjon5qCH6K6w5paH56ugJywKICAgICAgICAgICAgdmlkZW9UaXRsZTon5qCH6K6w6KeG6aKRJywKICAgICAgICAgICAgemhLZXl3b3JkQ2xvc2U6J+Wxj+iUveWFs+mUruivjScsCiAgICAgICAgICAgIHRpcEtleXdvcmQ6J+ivt+i+k+WFpeWFs+mUruivjSznlKgiLCLlj7fpmpTlvIAnLAogICAgICAgICAgICBhdXRob3JOYW1lQ2xvc2U6J+Wxj+iUveeUqOaItycsCiAgICAgICAgICAgIHRpcEF1dGhvck5hbWU6J+ivt+i+k+WFpeeUqOaIt+WQjSznlKgiLCLlj7fpmpTlvIAnLAogICAgICAgICAgICB5YW54dWFuQ2xvc2U6J+Wxj+iUveebkOmAiScsCiAgICAgICAgICAgIGR5VmlkZW9Eb3dubG9hZDon5oqW6Z+z5LiL6L29JywKICAgICAgICAgICAga3NWaWRlb0Rvd25sb2FkOiflv6vmiYvkuIvovb0nLAogICAgICAgICAgICB4aWd1YVZpZGVvRG93bmxvYWQ6J+ilv+eTnOS4i+i9vScsCiAgICAgICAgICAgIGJpbGlWaWRlb0Rvd25sb2FkOidC56uZIChiaWxpYmlsaSkg5LiL6L29JywKICAgICAgICAgICAgcXVlc3Rpb246J+W4uOingemXrumimCcsCiAgICAgICAgICAgIHFxR3JvdXA6J+S6pOa1gee+pCcsCiAgICAgICAgICAgIHJld2FyZDon5omT6LWPJywKICAgICAgICAgICAgcmVkUmV3YXJkOifnuqLljIUnLAogICAgICAgICAgICB0aGFuazon5oSf6LCiJywKIAogICAgICAgIH07CiAKICAgICAgICAvKi0tZGF0YXMtLSovCiAgICAgICAgdmFyIGRhdGFzID0gewogCiAgICAgICAgICAgIGdldENvdXBvbjpbe2lzT3BlbjoyMix3ZWI6WwogICAgICAgICAgICAgICAge2Z1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ICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi9eaHR0cHM/OlwvXC93d3dcLmJpbGliaWxpXC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbWF0Y2g6L15odHRwcz86XC9cL21cLmJpbGliaWxpXC5jb20vfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIudmlkZW8tYXJlYSIsbm9kZVR5cGU6J2NsYXNzJyxtYXRjaDovbVwubWd0dlwuY29tXC9iL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi9tZ3R2XC5jb20vLGFyZWFDbGFzc05hbWU6J2VwaXNvZGUtaXRlbXMgY2xlYXJmaXgnfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbm9kZToiLngtY292ZXItcGxheWJ0bi13cmFwIixub2RlVHlwZTonY2xhc3MnLG1hdGNoOi8udHZcLnNvaHVcLmNvbS99LAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIueC1jb3Zlci1wbGF5YnRuLXdyYXAiLG5vZGVUeXBlOidjbGFzcycsbWF0Y2g6L21cLnR2XC5zb2h1XC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbm9kZToiI3BsYXllcldyYXAiLG5vZGVUeXBlOidpZCcsbWF0Y2g6L2ZpbG1cLnNvaHVcLmNvbS99LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi90dWRvdVwuY29tL30sCiAKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIixtYXRjaDovbGVcLmNvbS99LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsbWF0Y2g6L3BwdHZcLmNvbS99LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsbWF0Y2g6LzE5MDVcLmNvbS99LAogCiAgICAgICAgICAgIF19XSwKICAgICAgICAgICAgCiAgICAgICAgICAgIGp4TXVzaWM6W3tpc09wZW46R01fZ2V0VmFsdWUoJ211c2ljTGlzdCcsJzIyJyksd2ViOlsKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOiduZXRlYXNlJyxtYXRjaDovXmh0dHBzPzpcL1wvbXVzaWNcLjE2M1wuY29tLyx0aXA6J+ivt+WcqOmfs+S5kOWNleabsumhteeCueWHu+Wbvuagh+S4i+i9vSd9LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlNdXNpYyIsbmFtZToncXEnLG1hdGNoOi9eaHR0cHM/OlwvXC95XC5xcVwuY29tLyx0aXA6J+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOWcqOaSreaUvumhteeCueWHu+Wbvuagh+S4i+i9vSd9LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlNdXNpYyIsbmFtZTona3Vnb3UnLG1hdGNoOi9rdWdvdVwuY29tLyx0aXA6J+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0iJ30sCiAKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOidrdXdvJyxtYXRjaDova3V3b1wuY24vLHRpcDon6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5TXVzaWMiLG5hbWU6J3hpbWFsYXlhJyxtYXRjaDovXmh0dHBzPzpcL1wvd3d3XC54aW1hbGF5YVwuY29tLyx0aXA6J+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0iJ30KICAgICAgICAgICAgXX1dLAogCiAgICAgICAgICAgIHBsYXlMaW5lOlsKICAgICAgICAgICAgICAgIHsibmFtZSI6Iue6r+WHgDEiLCJ1cmwiOiJodHRwczovL3oxLm0xOTA3LnRvcC8/ang9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IkLnq5kxIiwidXJsIjoiaHR0cHM6Ly9qeC5ib3pyYy5jb206NDQzMy9wbGF5ZXIvP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi54ix6LGGIiwidXJsIjoiaHR0cHM6Ly9qeC5haWRvdWVyLm5ldC8/dXJsPSIsIm1vYmlsZSI6MX0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJCTCIsInVybCI6Imh0dHBzOi8vdmlwLmJsamlleC5jb20vP3Y9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuWGsOixhiIsInVybCI6Imh0dHBzOi8vYXBpLnFpYW5xaS5uZXQvdmlwLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IueZvuWfnyIsInVybCI6Imh0dHBzOi8vanguNjE4Zy5jb20vP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiQ0siLCJ1cmwiOiJodHRwczovL3d3dy5ja3BsYXllci52aXAvamlleGkvP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiQ0hvayIsInVybCI6Imh0dHBzOi8vd3d3LmdhaTQuY29tLz91cmw9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6ImNrbW92IiwidXJsIjoiaHR0cHM6Ly93d3cuY2ttb3YudmlwL2FwaS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJIOCIsInVybCI6Imh0dHBzOi8vd3d3Lmg4anguY29tL2ppZXhpLnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IkpZIiwidXJsIjoiaHR0cHM6Ly9qeC5wbGF5ZXJqeS5jb20vP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi6Kej5p6QIiwidXJsIjoiaHR0cHM6Ly9ja21vdi5jY3lqamQuY29tL2NrbW92Lz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6Iuino+aekGxhIiwidXJsIjoiaHR0cHM6Ly9hcGkuamlleGkubGEvP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi6ICB5p2/IiwidXJsIjoiaHR0cHM6Ly92aXAubGFvYmFuZHEuY29tL2ppZXhpLnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6Ik1BTyIsInVybCI6Imh0dHBzOi8vd3d3Lm10b3N6LmNvbS9tM3U4LnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6Ik0zVTgiLCJ1cmwiOiJodHRwczovL2p4Lm0zdTgudHYvamlleGkvP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi6K+66K6vIiwidXJsIjoiaHR0cHM6Ly93d3cubnhmbHYuY29tLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6Ik9LIiwidXJsIjoiaHR0cHM6Ly9va2p4LmNjLz91cmw9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IlBNIiwidXJsIjoiaHR0cHM6Ly93d3cucGxheW0zdTguY24vamlleGkucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi55uY5Y+kIiwidXJsIjoiaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jYy9qaWV4aS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLkuIPlk6UiLCJ1cmwiOiJodHRwczovL2p4Lm1ta3YuY24vdHYucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiUkRISyIsInVybCI6Imh0dHBzOi8vangucmRoay5uZXQvP3Y9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuS6uuS6uui/tyIsInVybCI6Imh0dHBzOi8vanguYmxiby5jYzo0NDMzLz91cmw9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuaAneS6kSIsInVybCI6Imh0dHBzOi8vanguYXAycC5jbi8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLmgJ3lj6QzIiwidXJsIjoiaHR0cHM6Ly9qc2FwLmF0dGFraWRzLmNvbS8/dXJsPSIsIm1vYmlsZSI6MX0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLlkKzkuZAiLCJ1cmwiOiJodHRwczovL2p4LmRqNnUuY29tLz91cmw9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6Iue7tOWkmiIsInVybCI6Imh0dHBzOi8vanguaXZpdG8uY24vP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi6Jm+57GzIiwidXJsIjoiaHR0cHM6Ly9qeC54bWZsdi5jb20vP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi5LqR56uvIiwidXJsIjoiaHR0cHM6Ly9zYi41Z3Nlby5uZXQvP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi5LqR5p6QIiwidXJsIjoiaHR0cHM6Ly9qeC55cGFyc2UuY29tL2luZGV4LnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IjA1MjMiLCJ1cmwiOiJodHRwczovL2dvLnloMDUyMy5jbi95LmN5P3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiMTfkupEiLCJ1cmwiOiJodHRwczovL3d3dy4xNzE3eXVuLmNvbS9qeC90eS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiIxODAiLCJ1cmwiOiJodHRwczovL2p4LjAwMDE4MC50b3AvangvP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiNEsiLCJ1cmwiOiJodHRwczovL2p4LjRrZHYuY29tLz91cmw9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IjgwOTAiLCJ1cmwiOiJodHRwczovL3d3dy44MDkwZy5jbi8/dXJsPSIsIm1vYmlsZSI6MH0KICAgICAgICAgICAgXSwKIAogICAgICAgICAgICB6aE5pY2U6W3tpc09wZW46R01fZ2V0VmFsdWUoJ3poaWh1TGlzdCcsJzIyJyksd2ViOlsKICAgICAgICAgICAgICAgIHtmdW5jTmFtZTonemhOaWNlJyxtYXRjaDovXmh0dHBzPzpcL1wvW2Etel0rXC56aGlodVwuY29tL30KICAgICAgICAgICAgXX1dLAogICAgICAgICAgICAKICAgICAgICAgICAgdmlkZW9Eb3dubG9hZDpbe2lzT3BlbjpHTV9nZXRWYWx1ZSgndmlkZW9Eb3dubG9hZExpc3QnLCcyMicpLHdlYjpbCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6J3ZpZGVvRG93bmxvYWQnLG5hb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vd25sb2FkT3B0aW9uLGJhaWR1fSA9IGRhdGFzOwogCiAgICAgICAgLyotLUNsYXNzLS0qLwogICAgICAgIGNsYXNzIEJhc2VDbGFzc3sKIAogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogCiAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgnaWNvblBvc2l0aW9uU2V0UGFnZScpICE9IDApewogCiAgICAgICAgICAgICAgICAgICAgaWNvblZpcFRvcCA9IHRoaXMuZ2V0Q29va2llKCdpY29uVG9wJyk/dGhpcy5nZXRDb29raWUoJ2ljb25Ub3AnKTppY29uVmlwVG9wOwogCiAgICAgICAgICAgICAgICAgICAgaWNvblZpcFBvc2l0aW9uID0gdGhpcy5nZXRDb29raWUoJ2ljb25Qb3NpdGlvbicpP3RoaXMuZ2V0Q29va2llKCdpY29uUG9zaXRpb24nKTppY29uVmlwUG9zaXRpb247CiAKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZExlZnQgPSBpY29uVmlwUG9zaXRpb249PSdsZWZ0Jz8nc2VsZWN0ZWQnOicnOwogCiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRSaWdodCA9IGljb25WaXBQb3NpdGlvbj09J3JpZ2h0Jz8nc2VsZWN0ZWQnOicnOwogCiAgICAgICAgICAgICAgICAgICAgaWNvblZpcFdpZHRoID0gdGhpcy5nZXRDb29raWUoJ2ljb25XaWR0aCcpP3RoaXMuZ2V0Q29va2llKCdpY29uV2lkdGgnKTppY29uVmlwV2lkdGg7CiAKICAgICAgICAgICAgICAgICAgICBpY29uV2FpdFRpbWUgPSBHTV9nZXRWYWx1ZSgnaWNvbldhaXRUaW1lJyk/R01fZ2V0VmFsdWUoJ2ljb25XYWl0VGltZScpKjEwMDA6aWNvbldhaXRUaW1lOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIEdNX3JlZ2lzdGVyTWVudUNvbW1hbmQoIuiuvue9riIsICgpID0+IHRoaXMubWVudVNldCgpKTsKIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgbWVudVNldCgpewogCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogCiAgICAgICAgICAgICAgICBsZXQgbWVudVNldFN0eWxlID0gYAogICAgICAgICAgICAgICAgICAgICAgICAuemhtTWFza3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTk5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojMDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO3RvcDogMDtyaWdodDogMDtib3R0b206IDA7bGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6MC44OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC53cmFwLWJveHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkOzt0b3A6IDUwJTtsZWZ0OiA1MCU7dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSwgLTIwMHB4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAzMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiAjNTU1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OmhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6MTZweCBudW1Gb250LFBpbmdGYW5nU0MtUmVndWxhcixUYWhvbWEsTWljcm9zb2Z0IFlhaGVpLHNhbnMtc2VyaWYgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OjQwMCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRXcmFwSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MztoZWlnaHQ6NDBweDtjb2xvcjojZmZmO3RleHQtYWxpZ246Y2VudGVyO2xpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaSBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoxMnB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaUNvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRXcmFwU2F2ZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlO3RvcDotMnB4O3JpZ2h0OjEwcHg7Zm9udC1zaXplOjI0cHg7Y3Vyc29yOnBvaW50ZXIKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3R7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjphYnNvbHV0ZTtib3R0b206MHB4O3BhZGRpbmc6MTBweCAyMHB4O3dpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwOTtiYWNrZ3JvdW5kOiNmZWY5ZWY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRGb290TGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRGb290TGkgbGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtZmxleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4IDJweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdExpIGxpIGF7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjojNTU1OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdExpIGE6aG92ZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OjEwMDAwMDAwMDE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MHB4O2xlZnQ6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0VWxIZWFkewogICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2VIZWFkewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2NjYzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDo0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTVweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2VMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlTGkgbGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzo4cHggMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAyO3Bvc2l0aW9uOmFic29sdXRlO3RvcDowcHg7bGVmdDozMDBweDtiYWNrZ3JvdW5kOiNmZmY7d2lkdGg6MzAwcHg7aGVpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlSW5wdXR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZUxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6IHNjcm9sbDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlTGk6Oi13ZWJraXQtc2Nyb2xsYmFyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8q5rua5Yqo5p2h5pW05L2T5qC35byPKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoIDogMnB4OyAgLyrpq5jlrr3liIbliKvlr7nlupTmqKrnq5bmu5rliqjmnaHnmoTlsLrlr7gqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZUxpOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoemHjOmdouWwj+aWueWdlyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzICAgOiAycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aGlodVNldFBhZ2VMaTo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLovajpgZMqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdyAgIDogaW5zZXQgMCAwIDVweCByZ2JhKDAsIDAsIDAsIDAuMik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kICAgOiAjZWRlZGVkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMTBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlTGkgbGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlO3BhZGRpbmc6MTJweCAyMHB4O2Rpc3BsYXk6YmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZUNvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAuY2lyY3VsYXJ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogNDBweDtoZWlnaHQ6IDIwcHg7Ym9yZGVyLXJhZGl1czogMTZweDt0cmFuc2l0aW9uOiAuM3M7Y3Vyc29yOiBwb2ludGVyO2JveC1zaGFkb3c6IDAgMCAzcHggIzk5OSBpbnNldDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAucm91bmQtYnV0dG9uewogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDIwcHg7aGVpZ2h0OiAyMHB4Oztib3JkZXItcmFkaXVzOiA1MCU7Ym94LXNoYWRvdzogMCAxcHggNXB4IHJnYmEoMCwwLDAsLjUpO3RyYW5zaXRpb246IC4zcztwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmJhY2t7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IHNvbGlkICNGRkY7IGJvcmRlci13aWR0aDogMCAzcHggM3B4IDA7IGRpc3BsYXk6IGlubGluZS1ibG9jazsgcGFkZGluZzogM3B4O3RyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7ICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7bWFyZ2luLWxlZnQ6MTBweDtjdXJzb3I6cG9pbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudG8tcmlnaHR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDoyMHB4OyBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHBhZGRpbmc6IDNweDt0cmFuc2Zvcm06IHJvdGF0ZSgtNDVkZWcpOyAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKC00NWRlZyk7Y3Vyc29yOnBvaW50ZXI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFNhdmV7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MjRweDtjdXJzb3I6cG9pbnRlcjttYXJnaW4tcmlnaHQ6NXB4O21hcmdpbi1ib3R0b206NHB4O2NvbG9yOiNGRkY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOjBweDtsZWZ0OjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2hlYWRlcnsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE1cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9jb250ZW50ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0IGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLypib3JkZXItYm90dG9tOjFweCBzb2xpZCAjY2NjOyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjEycHggMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6YmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGxpOmxhc3QtY2hpbGR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOm5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLyotZm9ybS0qLwogICAgICAgICAgICAgICAgICAgICAgICA6cm9vdCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLWJhc2UtY29sb3I6ICM0MzRhNTY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLXdoaXRlLWNvbG9yLXByaW1hcnk6ICNmN2Y4Zjg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLXdoaXRlLWNvbG9yLXNlY29uZGFyeTogI2ZlZmVmZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tZ3JheS1jb2xvci1wcmltYXJ5OiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXNlY29uZGFyeTogI2MyYzJjMjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tZ3JheS1jb2xvci10ZXJ0aWFyeTogIzY3NmY3OTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tYWN0aXZlLWNvbG9yOiAjMjI3YzlkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS12YWxpZC1jb2xvcjogI2MyYzJjMjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0taW52YWxpZC1jb2xvcjogI2Y3MmY0NzsKICAgICAgICAgICAgICAgICAgICAgIC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ZHkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLW1vei1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tZ3JheS1jb2xvci1wcmltYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDNweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMS43ZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lLWhlaWdodDogMS43OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IDJweCAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpczsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4zczsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjU1JTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5Oi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5OjotbW96LXBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6OnBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgKiwgOjphZnRlciwgOjpiZWZvcmUgewogICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBpbml0aWFsICFpbXBvcnRhbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZF0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1yaWdodDogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5W2RhdGEtaXMtdmFsaWQ9dHJ1ZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTpmb2N1cyB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6LXdlYmtpdC1hdXRvZmlsbCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uLWRlbGF5OiA5OTk5czsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tcHJvcGVydHk6IGJhY2tncm91bmQtY29sb3I7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX3ZhbGlkYXRvciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiByaWdodCAwLjVlbSBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLXJlcGVhdDogbm8tcmVwZWF0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1zaXplOiAxLjVlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6IC0xOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdICsgLnRleHQtaW5wdXRfX3ZhbGlkYXRvciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWltYWdlOiB2YXIoLS1pbnZhbGlkLWljb24pOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE2cHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIDAuNXMgZWFzZS1vdXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDo5MHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94OjphZnRlciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWdyYXktY29sb3Itc2Vjb25kYXJ5KSB0cmFuc3BhcmVudCB0cmFuc3BhcmVudCB0cmFuc3BhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1zdHlsZTogc29saWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItd2lkdGg6IDZweCA0cHggMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvdHRvbTogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICIiOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOiBhdXRvIDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJpZ2h0OiAtNzJweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogMTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveF9fYm9keSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBpbmhlcml0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLW1vei1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tZ3JheS1jb2xvci1wcmltYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDNweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMS43ZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lLWhlaWdodDogMS43OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiBjYWxjKDFlbSArIDE2cHgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDE0MCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctdG9wOjJweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOjJweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveF9fYm9keVtkYXRhLWlzLXZhbGlkPXRydWVdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveF9fYm9keVtkYXRhLWlzLXZhbGlkPWZhbHNlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5LmZvY3VzLXZpc2libGUgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRsaW5lOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5Oi13ZWJraXQtYXV0b2ZpbGwgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1kZWxheTogOTk5OXM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zaXRpb24tcHJvcGVydHk6IGJhY2tncm91bmQtY29sb3I7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250OiBpbmhlcml0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldHRlci1zcGFjaW5nOiBpbmhlcml0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2l6ZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC41cyBlYXNlLW91dDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHk6b25seS1jaGlsZCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNpemU6IHZlcnRpY2FsOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keTpmb2N1cyB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5W2RhdGEtaXMtdmFsaWQ9dHJ1ZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keVtkYXRhLWlzLXZhbGlkPWZhbHNlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhIC5fZHVtbXktYm94IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbi1oZWlnaHQ6IDI0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXdyYXA6IGJyZWFrLXdvcmQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aXNpYmlsaXR5OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRvTGVmdE1vdmV7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuaW1hdGlvbjptb3ZlVG9MZWZ0IDAuNXMgaW5maW5pdGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjptb3ZlVG9MZWZ0IDAuNXMgaW5maW5pdGU7IC8qU2FmYXJpIGFuZCBDaHJvbWUqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWl0ZXJhdGlvbi1jb3VudDoxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWZpbGwtbW9kZTogZm9yd2FyZHM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBAa2V5ZnJhbWVzIG1vdmVUb0xlZnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHtsZWZ0OjIwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBALXdlYmtpdC1rZXlmcmFtZXMgbW92ZVRvTGVmdCAvKlNhZmFyaSBhbmQgQ2hyb21lKi97CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHtsZWZ0OjIwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAudG9SaWdodE1vdmV7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuaW1hdGlvbjptb3ZlVG9SaWdodCAycyBpbmZpbml0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYW5pbWF0aW9uOm1vdmVUb1JpZ2h0IDJzIGluZmluaXRlOyAvKlNhZmFyaSBhbmQgQ2hyb21lKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1pdGVyYXRpb24tY291bnQ6MTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1maWxsLW1vZGU6IGZvcndhcmRzOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIEBrZXlmcmFtZXMgbW92ZVRvUmlnaHR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHtsZWZ0OjBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB7bGVmdDoyMDAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIG1vdmVUb1JpZ2h0IC8qU2FmYXJpIGFuZCBDaHJvbWUqL3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjIwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGA7CiAKICAgICAgICAgICAgICAgIGRvbVN0eWxlIC5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShtZW51U2V0U3R5bGUpKTsKIAogICAgICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAKICAgICAgICAgICAgICAgIHZhciBzZXRMaXN0SnNvbj0gWwogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcuaW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PC9vcHRpb24+IjsKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijwvc2VsZWN0PjwvZGl2PjwvbGk+IgogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvdWw+PC9kaXY+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fc2V0X3BhZ2UnIGlkPSd2aWRlb0Rvd25sb2FkU2V0UGFnZSc+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8dWwgY2xhc3M9J2ljb25TZXRVbEhlYWQnPjxsaSBjbGFzcz0nemhtX3NldF9wYWdlX2hlYWRlcic+PHNwYW4gY2xhc3M9J2JhY2snPjwvc3Bhbj48c3Bhbj4iK2xhbmcudmlkZW9Eb3dubG9hZCsiPC9zcGFuPjxzcGFuICBjbGFzcz0naWNvblNldFNhdmUnPsOXPC9saT48L3VsPiI7CiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPHVsIGNsYXNzPSd6aG1fc2V0X3BhZ2VfbGlzdCc+IjsKIAogICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTx2aWRlb0Rvd25sb2FkT3B0aW9uSnNvbi5sZW5ndGg7aSsrKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3Isc3dpdGNoQmFja0NvcmxvcixkaXNwbGF5OwogCiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvblZhbHVlID0gR01fZ2V0VmFsdWUodmlkZW9Eb3dubG9hZE9wdGlvbkpzb25baV0ub3B0aW9uSUQsdmlkZW9Eb3dubG9hZE9wdGlvbkpzb25baV0uZGVmYXVsdCk7CiAKICAgICAgICAgICAgICAgICAgICBpZihvcHRpb25WYWx1ZSAhPSAnMjInKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CiAKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZGJzsKIAogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gJ25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZTZkNzMnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9ICdibG9jayc7CiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxsaT4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fc2V0X3BhZ2VfY29udGVudCc+IjsKIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0gIjxzcGFuPiIrdmlkZW9Eb3dubG9hZE9wdGlvbkpzb25baV0ub3B0aW9uTmFtZSsiPC9zcGFuPiI7CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2NpcmN1bGFyJyBzdHlsZT0nYmFja2dyb3VuZC1jb2xvcjoiK3N3aXRjaEJhY2tDb3Jsb3IrIicgaWQ9JyIrdmlkZW9Eb3dubG9hZE9wdGlvbkpzb25baV0ub3B0aW9uSUQrIic+IjsKIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBjbGFzcz0ncm91bmQtYnV0dG9uJyBzdHlsZT0nYmFja2dyb3VuZDogIitiYWNrQ29sb3IrIjsgbGVmdDogIitvcHRpb25WYWx1ZSsicHg7Jz48L2Rpdj4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSAiPC9kaXY+PC9kaXY+IjsKIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0gIjwvbGk+IjsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8L3VsPiIKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8L2Rpdj4iCiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBjbGFzcz0nemhtX3NldF9wYWdlJyBpZD0nbW92aWVWaWRlb1NldFBhZ2UnPiI7CiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPHVsIGNsYXNzPSdpY29uU2V0VWxIZWFkJz48bGkgY2xhc3M9J3pobV9zZXRfcGFnZV9oZWFkZXInPjxzcGFuIGNsYXNzPSdiYWNrJz48L3NwYW4+PHNwYW4+IitsYW5nLnNldFBsYXlWaWRlbysiPC9zcGFuPjxzcGFuICBjbGFzcz0naWNvblNldFNhdmUnPsOXPC9saT48L3VsPiI7CiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPHVsIGNsYXNzPSd6aG1fc2V0X3BhZ2VfbGlzdCc+IjsKIAogICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxwbGF5VmlkZW9PcHRpb25Kc29uLmxlbmd0aDtpKyspewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGJhY2tDb2xvcixzd2l0Y2hCYWNrQ29ybG9yLGRpc3BsYXk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgb3B0aW9uVmFsdWUgPSBHTV9nZXRWYWx1ZShwbGF5VmlkZW9PcHRpb25Kc29uW2ldLm9wdGlvbklELHBsYXlWaWRlb09wdGlvbkpzb25baV0uZGVmYXVsdCk7CiAKICAgICAgICAgICAgICAgICAgICBpZihvcHRpb25WYWx1ZSAhPSAnMjInKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CiAKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZGJzsKIAogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gJ25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZTZkNzMnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9ICdibG9jayc7CiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxsaT4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fc2V0X3BhZ2VfY29udGVudCc+IjsKIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0gIjxzcGFuPiIrbGFuZy5wbGF5VmlkZW9MaW5lQWRkKyI8L3NwYW4+IjsKIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBjbGFzcz0nY2lyY3VsYXInIHN0eWxlPSdiYWNrZ3JvdW5kLWNvbG9yOiIrc3dpdGNoQmFja0NvcmxvcisiJyBpZD0nIitwbGF5VmlkZW9PcHRpb25Kc29uW2ldLm9wdGlvbklEKyInPiI7CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J3JvdW5kLWJ1dHRvbicgc3R5bGU9J2JhY2tncm91bmQ6ICIrYmFja0NvbG9yKyI7IGxlZnQ6ICIrb3B0aW9uVmFsdWUrInB4Oyc+PC9kaXY+IjsKIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0gIjwvZGl2PjwvZGl2PiI7CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2Zvcm1fX3RleHRhcmVhJz4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd0ZXh0YXJlYSBqcy1mbGV4aWJsZS10ZXh0YXJlYScgc3R5bGU9J21hcmdpbi10b3A6IDEwcHg7IGRpc3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aWh1T3B0aW9uSnNvbi5sZW5ndGg7b3B0aW9uTisrKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3Isc3dpdGNoQmFja0NvcmxvcjsKIAogICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb25WYWx1ZSA9IEdNX2dldFZhbHVlKHpoaWh1T3B0aW9uSnNvbltvcHRpb25OXS5vcHRpb25JRCx6aGlodU9wdGlvbkpzb25bb3B0aW9uTl0uZGVmYXVsdCk7CiAKICAgICAgICAgICAgICAgICAgICBpZihvcHRpb25WYWx1ZSAhPSAnMjInKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CiAKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZGJzsKIAogICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKIAogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkU1RTUnOwogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGkgPjxkaXYgY2xhc3M9J3poaWh1U2V0UGFnZUNvbnRlbnQnPjxzcGFuPiIremhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbk5hbWUrIjwvc3Bhbj4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSdjaXJjdWxhcicgc3R5bGU9J2JhY2tncm91bmQtY29sb3I6ICIrc3dpdGNoQmFja0NvcmxvcisiOycgaWQ9Iit6aGlodU9wdGlvbkpzb25bb3B0aW9uTl0ub3B0aW9uSUQrIj48ZGl2IGNsYXNzPSdyb3VuZC1idXR0b24nIHN0eWxlPSdiYWNrZ3JvdW5kOiAiK2JhY2tDb2xvcisiO2xlZnQ6ICIrb3B0aW9uVmFsdWUrInB4Oyc+PC9kaXY+PC9kaXY+PC9kaXY+IjsKIAogICAgICAgICAgICAgICAgICAgIGlmKHpoaWh1T3B0aW9uSnNvbltvcHRpb25OXS5vcHRpb25JRCA9PSAncmVtb3ZlS2V5d29yZCcpewogCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBrZXl3b3JkU2hvdzsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgncmVtb3ZlS2V5d29yZCcsJzAnKSA9PSAnMjInKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5d29yZFNob3cgPSAnYmxvY2snOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5d29yZFNob3cgPSAnbm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgc3R5bGU9J21hcmdpbi10b3A6MTBweDtkaXNwbGF5OiIra2V5d29yZFNob3crIjtwYWRkaW5nOjVweCAwcHg7JyBpZD0nemhpaHVLZXl3b3JkJz48c3BhbiBjbGFzcz0ndGV4dC1pbnB1dCc+PGlucHV0IHZhbHVlPSciK0dNX2dldFZhbHVlKCdpbnB1dFpoS2V5d29yZCcsJycpKyInIGlkPSdpbnB1dFpoS2V5d29yZCcgY2xhc3M9J3RleHQtaW5wdXRfX2JvZHknIHBsYWNlaG9sZGVyPSciK2xhbmcudGlwS2V5d29yZCsiJyBzdHlsZT0nd2lkdGg6ODglJz48c3Bhbj48L2Rpdj4iOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGlmKHpoaWh1T3B0aW9uSnNvbltvcHRpb25OXS5vcHRpb25JRCA9PSAncmVtb3ZlQXV0aG9yTmFtZScpewogCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdXRob3JOYW1lU2hvdzsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgncmVtb3ZlQXV0aG9yTmFtZScsJzAnKSA9PSAnMjInKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXV0aG9yTmFtZVNob3cgPSAnYmxvY2snOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXV0aG9yTmFtZVNob3cgPSAnbm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgc3R5bGU9J21hcmdpbi10b3A6MTBweDtkaXNwbGF5OiIrYXV0aG9yTmFtZVNob3crIjtwYWRkaW5nOjVweCAwcHg7JyBpZD0nemhpaHVBdXRob3JOYW1lJz48c3BhbiBjbGFzcz0ndGV4dC1pbnB1dCc+PGlucHV0IHZhbHVlPSciK0dNX2dldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScsJycpKyInIGlkPSdpbnB1dFpoQXV0aG9yTmFtZScgY2xhc3M9J3RleHQtaW5wdXRfX2JvZHknIHBsYWNlaG9sZGVyPSciK2xhbmcudGlwQXV0aG9yTmFtZSsiJyBzdHlsZT0nd2lkdGg6ODglJz48c3Bhbj48L2Rpdj4iOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvbGk+IjsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8L3VsPiIKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8L2Rpdj4iOwogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0naWNvblNldFVsSGVhZCc+PGxpIGNsYXNzPSdpY29uU2V0UGFnZUhlYWQnPjxzcGFuPjwvc3Bhbj48c3Bhbj4iK2xhbmcuc2V0KyI8L3NwYW4+PHNwYW4gY2xhc3M9J2ljb25TZXRTYXZlJz7Dlzwvc3Bhbj48L2xpPjwvdWw+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8dWwgY2xhc3M9J3NldFdyYXBMaSc+IjsKIAogICAgICAgICAgICAgICAgZm9yKHZhciBzZXROPTA7c2V0TjxzZXRMaXN0SnNvbi5sZW5ndGg7c2V0TisrKXsKIAogICAgICAgICAgICAgICAgICAgIHZhciBsaXN0VmFsdWUgPSBHTV9nZXRWYWx1ZShzZXRMaXN0SnNvbltzZXROXS5zZXRMaXN0SUQsJzIyJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgYmFja0NvbG9yLGFycm93Q29sb3Isc3dpdGNoQmFja0NvcmxvcjsKIAogICAgICAgICAgICAgICAgICAgIGlmKGxpc3RWYWx1ZSAhPSAyMil7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmZmJzsKICAgICAgICAgICAgICAgICAgICAgICAgYXJyb3dDb2xvcj0gJyNFRUUnOwogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKICAgICAgICAgICAgICAgICAgICAgICAgYXJyb3dDb2xvciA9ICcjQ0NDJzsKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZFNUU1JzsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBpZihzZXRMaXN0SnNvbltzZXROXS5zZXRQYWdlSUQgPT0gJycpewogICAgICAgICAgICAgICAgICAgICAgICBhcnJvd0NvbG9yID0gJyNFRUUnOwogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGk+PHNwYW4+IitzZXRMaXN0SnNvbltzZXROXS5saXN0TmFtZSsiPC9zcGFuPiI7CiAK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uKCl7CiAKICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobU1lbnUnKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lclpobUljb24pOyAvLyDlj5bmtojlrprml7blmagKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2lyY3VsYXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuY2lyY3VsYXInKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBjaXJjdWxhci5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZnVuY3Rpb24oX2UpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJ1dHRvblN0eWxlID0gaXRlbS5jaGlsZHJlblswXS5zdHlsZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsZWZ0ID0gYnV0dG9uU3R5bGUubGVmdDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBwYXJzZUludChsZWZ0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaXN0TGVmdFZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobGVmdD09MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uU3R5bGUubGVmdCA9ICcyMnB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25TdHlsZS5iYWNrZ3JvdW5kID0gJyNmZTZkNzMnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUuYmFja2dyb3VuZD0nI2ZmRTVFNSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5uZXh0U2libGluZyAmJiBpdGVtLm5leHRTaWJsaW5nLmdldEF0dHJpYnV0ZSgnZGF0YScpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5uZXh0U2libGluZy5zZXRBdHRyaWJ1dGUoJ3N0eWxlJywnYm9yZGVyOiBzb2xpZCAjY2NjO2JvcmRlci13aWR0aDogMCAzcHggM3B4IDA7JykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RMZWZ0VmFsdWUgPSAyMjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmxlZnQgPSAnMHB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25TdHlsZS5iYWNrZ3JvdW5kID0gJyNmZmYnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUuYmFja2dyb3VuZD0nI2ZmZic7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5uZXh0U2libGluZyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0ubmV4dFNpYmxpbmcuc2V0QXR0cmlidXRlKCdzdHlsZScsJ2JvcmRlcjogc29saWQgI0VFRTtib3JkZXItd2lkdGg6IDAgM3B4IDNweCAwOycpCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RMZWZ0VmFsdWUgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZXRMaXN0SUQgPSBpdGVtLmlkOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdElEID09ICdyZW1vdmVLZXl3b3JkJyAmJiBsaXN0TGVmdFZhbHVlPT0yMil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3poaWh1S2V5d29yZCcpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1UYWtlUGxhY2UnKS5zdHlsZT0gJ2hlaWdodDoyMjBweCc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdElEID09ICdyZW1vdmVLZXl3b3JkJyAmJiBsaXN0TGVmdFZhbHVlPT0wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhpaHVLZXl3b3JkJykuc3R5bGUuZGlzcGxheT0nbm9uZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9ICdoZWlnaHQ6MTgwcHgnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAncmVtb3ZlQXV0aG9yTmFtZScgJiYgbGlzdExlZnRWYWx1ZT09MjIpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aGlodUF1dGhvck5hbWUnKS5zdHlsZS5kaXNwbGF5PSdibG9jayc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9ICdoZWlnaHQ6MjYwcHgnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAncmVtb3ZlQXV0aG9yTmFtZScgJiYgbGlzdExlZnRWYWx1ZT09MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3poaWh1QXV0aG9yTmFtZScpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobVRha2VQbGFjZScpLnN0eWxlPSAnaGVpZ2h0OjEyMHB4JzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRMaXN0SUQgPT0gJ3ZpZGVvUGxheUxpbmVBZGQnICYmIGxpc3RMZWZ0VmFsdWU9PTIyKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdmlkZW9QbGF5TGluZUFkZFRleHRhcmVhJykuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAndmlkZW9QbGF5TGluZUFkZCcgJiYgbGlzdExlZnRWYWx1ZT09MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3ZpZGVvUGxheUxpbmVBZGRUZXh0YXJlYScpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKHNldExpc3RJRCxsaXN0TGVmdFZhbHVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG9SaWdodCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy50by1yaWdodCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHRvUmlnaHQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxlZnQgPSBpdGVtLnByZXZpb3VzU2libGluZy5jaGlsZHJlblswXS5zdHlsZS5sZWZ0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdCA9IHBhcnNlSW50KGxlZnQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobGVmdCAhPSAyMikgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNldFBhZ2VJRCA9IGl0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUlkID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoc2V0UGFnZUlEKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2VJZC5jbGFzc05hbWU9J2ljb25TZXRQYWdlIHRvTGVmdE1vdmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/nn6XkuY7orr7nva7mmoLkvY3pq5jluqYKIAogCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRQYWdlSUQ9PSd6aGlodUljb25TZXRQYWdlJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobVRha2VQbGFjZScpLnN0eWxlPSBgaGVpZ2h0OjY4cHhgOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRvQmFjayA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5iYWNrJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdG9CYWNrLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJlbnREb20gPSBpdGVtLnBhcmVudE5vZGUucGFyZW50Tm9kZS5wYXJlbnROb2RlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50RG9tLmNsYXNzTmFtZT0naWNvblNldFBhZ2UgdG9SaWdodE1vdmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobVRha2VQbGFjZScpLnN0eWxlPSdoZWlnaHQ6NDBweDsnCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0U2F2ZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5pY29uU2V0U2F2ZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFNhdmUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsKCk9PnsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uVG9wID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25Ub3AnKS52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uUG9zaXRpb24gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvblBvc2l0aW9uJykudmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldpZHRoID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XaWR0aCcpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25XYWl0VGltZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uV2FpdFRpbWUnKS52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9MaW5lVGV4dCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGF5VmlkZW9MaW5lVGV4dGFyZWEnKS52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9MaW5lTGVmdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN2aWRlb1BsYXlMaW5lQWRkJykuY2hpbGRyZW5bMF0uc3R5bGUubGVmdDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dFpoS2V5d29yZCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpbnB1dFpoS2V5d29yZCcpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlucHV0QXV0aG9yTmFtZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpbnB1dFpoQXV0aG9yTmFtZScpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblRvcCAhPSAnJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvKF5bMS05XVswLTldezAsMn0kKS8udGVzdChpY29uVG9wKSkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydChsYW5nLnRpcEVycm9ySWNvbkhlaWdodCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnNldENvb2tpZSgnaWNvblRvcCcsaWNvblRvcCwzMCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpY29uUG9zaXRpb24gIT0gJycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnNldENvb2tpZSgnaWNvblBvc2l0aW9uJyxpY29uUG9zaXRpb24sMzApCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvbldhaXRUaW1lICE9ICcnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaWNvbldhaXRUaW1lJyxpY29uV2FpdFRpbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGljb25XaWR0aCAhPScnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXihbMS05XVswLTldPykkKS8udGVzdChpY29uV2lkdGgpKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsZXJ0KGxhbmcudGlwRXJyb3JJY29uV2lkdGgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5zZXRDb29raWUoJ2ljb25XaWR0aCcsaWNvbldpZHRoLDMwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgndmlkZW9QbGF5TGluZUFkZCcpID09IDIyKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwbGF5VmlkZW9MaW5lVGV4dCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5lT2JqID0gX3RoaXMuZ2V0TGluZShwbGF5VmlkZW9MaW5lVGV4dCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxpbmVPYmoubGVuZ3RoPjApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ3BsYXlWaWRlb0xpbmVUZXh0JyxwbGF5VmlkZW9MaW5lVGV4dCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsZXJ0KCfnur/ot6/ovpPlhaXkuI3mraPnoa4nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdwbGF5VmlkZW9MaW5lVGV4dCcsJycpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLHBsYXlWaWRlb0xpbmVUZXh0KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpbnB1dFpoS2V5d29yZCAhPSAnJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2lucHV0WmhLZXl3b3JkJyxpbnB1dFpoS2V5d29yZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgnaW5wdXRaaEtleXdvcmQnKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2RlbGV0ZVZhbHVlKCdpbnB1dFpoS2V5d29yZCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpbnB1dEF1dGhvck5hbWUgIT0gJycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScsaW5wdXRBdXRob3JOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fZGVsZXRlVmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpc3RvcnkuZ28oMCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uVG9wJykuYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvblRvcCA9IHRoaXMudmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEoLyheWzEtOV1cZCokKS8udGVzdChpY29uVG9wKSkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2RhdGEtaXMtdmFsaWQnLCdmYWxzZScpCiAKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEF0dHJpYnV0ZSgnZGF0YS1pcy12YWxpZCcsJ3RydWUnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvbldpZHRoJykuYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldpZHRoID0gdGhpcy52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvKF5bMS05XVxkKiQpLy50ZXN0KGljb25XaWR0aCkpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywnZmFsc2UnKQogCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2RhdGEtaXMtdmFsaWQnLCd0cnVlJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIC8v6IW+6K6v6KeG6aKR5b+r5o236ZSu5Yay56qBCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5tYXRjaCgvdlwucXFcLmNvbVwveFwvY292ZXIvKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhZGRMaW5lVGV4dCA9ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlWaWRlb0xpbmVUZXh0YXJlYScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdGFydFBvcyA9IGFkZExpbmVUZXh0LnNlbGVjdGlvblN0YXJ0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVuZFBvcyA9IGFkZExpbmVUZXh0LnNlbGVjdGlvbkVuZDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGFydFBvcyA9PT0gdW5kZWZpbmVkIHx8IGVuZFBvcyA9PT0gdW5kZWZpbmVkKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlDb2RlLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZS5rZXlDb2RlID09IGl0ZW0uY29kZSAmJiBlLnNoaWZ0S2V5PT1pdGVtLmlzU2hpZnQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dFZhbHVlID0gYWRkTGluZVRleHQudmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdGFydFZhbHVlID0gdGV4dFZhbHVlLnN1YnN0cmluZygwLHN0YXJ0UG9zKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVuZFZhbHVlID0gdGV4dFZhbHVlLnN1YnN0cmluZyhzdGFydFBvcyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhbGxWYWx1ZSA9IHN0YXJ0VmFsdWUraXRlbS52YWx1ZStlbmRWYWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGluZVRleHQudmFsdWU9YWxsVmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZExpbmVUZXh0LnNlbGVjdGlvblN0YXJ0ID0gc3RhcnRQb3MrMTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGluZVRleHQuc2VsZWN0aW9uRW5kID0gZW5kUG9zKzE7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICBjcmVhdGVFbGVtZW50KGRvbSxkb21JZCl7CiAKICAgICAgICAgICAgICAgIHZhciByb290RWxlbWVudCA9IGRvY3VtZW50LmJvZHk7CiAKICAgICAgICAgICAgICAgIHZhciBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChkb20pOwogCiAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmlkID0gZG9tSWQ7CiAKICAgICAgICAgICAgICAgIHZhciBuZXdFbGVtZW50SHRtbENvbnRlbnQgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnJyk7CiAKICAgICAgICAgICAgICAgIHJvb3RFbGVtZW50LmFwcGVuZENoaWxkKG5ld0VsZW1lbnQpOwogCiAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmFwcGVuZENoaWxkKG5ld0VsZW1lbnRIdG1sQ29udGVudCk7CiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHJlcXVlc3QobWV0aG9kLHVybCxkYXRhKXsKIAogICAgICAgICAgICAgICAgbGV0IHJlcXVlc3QgPSBuZXcgWE1MSHR0cFJlcXVlc3QoKTsKIAogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKIAogICAgICAgICAgICAgICAgICAgIHJlcXVlc3Qub25yZWFkeXN0YXRlY2hhbmdlPWZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVxdWVzdC5yZWFkeVN0YXRlPT00KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVxdWVzdC5zdGF0dXM9PTIwMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlcXVlc3QucmVzcG9uc2VUZXh0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QocmVxdWVzdC5zdGF0dXMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0Lm9wZW4obWV0aG9kLHVybCk7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5zZXRSZXF1ZXN0SGVhZGVyKCdDb250ZW50LVR5cGUnLCAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyk7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5zZW5kKGRhdGEpOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBzZXRDb29raWUoY25hbWUsY3ZhbHVlLGV4ZGF5cyl7CiAKICAgICAgICAgICAgICAgIHZhciBkID0gbmV3IERhdGUoKTsKIAogICAgICAgICAgICAgICAgZC5zZXRUaW1lKGQuZ2V0VGltZSgpKyhleGRheXMqMjQqNjAqNjAqMTAwMCkpOwogCiAgICAgICAgICAgICAgICB2YXIgZXhwaXJlcyA9ICJleHBpcmVzPSIrZC50b0dNVFN0cmluZygpOwogCiAgICAgICAgICAgICAgICBkb2N1bWVudC5jb29raWUgPSBjbmFtZSsiPSIrY3ZhbHVlKyI7ICIrZXhwaXJlczsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGdldENvb2tpZShjbmFtZSl7CiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICAgICAgdmFyIGNhID0gZG9jdW1lbnQuY29va2llLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgICAgICBmb3IodmFyIGk9MDsgaTxjYS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjLmluZGV4T2YobmFtZSk9PTApIHsgcmV0dXJuIGMuc3Vic3RyaW5nKG5hbWUubGVuZ3RoLGMubGVuZ3RoKTsgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZ2V0UXVlcnlTdHJpbmcoZSkgewogICAgICAgICAgICAgICAgdmFyIHQgPSBuZXcgUmVnRXhwKCIoXnwmKSIgKyBlICsgIj0oW14mXSopKCZ8JCkiKTsKICAgICAgICAgICAgICAgIHZhciBhID0gd2luZG93LmxvY2F0aW9uLnNlYXJjaC5zdWJzdHIoMSkubWF0Y2godCk7CiAgICAgICAgICAgICAgICBpZiAoYSAhPSBudWxsKSByZXR1cm4gYVsyXTsKICAgICAgICAgICAgICAgIHJldHVybiAiIjsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGdldFVybFBhcmFtcyh1cmwpewogICAgICAgICAgICAgICAgbGV0IHJlZyA9IC8oW14/JisjXSspPShbXj8mKyNdKykvZzsKICAgICAgICAgICAgICAgIGxldCBvYmo9e307CiAgICAgICAgICAgICAgICB1cmwucmVwbGFjZShyZWcsKHJlcywkMSwkMik9PntvYmpbJDFdPSQyfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gb2JqOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZ2V0TGluZSh0ZXh0KXsKIAogICAgICAgICAgICAgICAgbGV0IHRleHRBcnIgPSB0ZXh0LnNwbGl0KCdcbicpOwogCiAgICAgICAgICAgICAgICBpZih0ZXh0QXJyLmxlbmd0aCA+IDApewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVPYmogPSBbXTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBtYXRjaCA9IC9eKC4rKShodHRwcz86XC9cLy4rKSQvOwogCiAgICAgICAgICAgICAgICAgICAgdGV4dEFyci5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0gPSBpdGVtLnJlcGxhY2UoL1xzKiwqL2csJycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpdGVtKSByZXR1cm4gdHJ1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluZU1hdGNoID0gaXRlbS5tYXRjaChtYXRjaCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYobGluZU1hdGNoKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZU9iai5wdXNoKHsnbmFtZSc6bGluZU1hdGNoWzFdLnN1YnN0cmluZygwLDQpLCd1cmwnOmxpbmVNYXRjaFsyXX0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT2JqPVtdOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGluZU9iajsKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAKICAgICAgICAgICAgc3RhdGljIGdldEVsZW1lbnQoY3NzKXsKIAogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKIAogICAgICAgICAgICAgICAgICAgIGxldCBudW0gPSAwOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBudW0rKwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGNzcyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoZG9tKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtPT0yMCl7Y2xlYXJJbnRlcnZhbCh0aW1lcik7cmVzb2x2ZShmYWxzZSk7fQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9LDMwMCkKIAogICAgICAgICAgICAgICAgICAgIH0pCiAKIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgc3RhdGljIHRvYXN0KG1zZyxkdXJhdGlvbil7CiAKICAgICAgICAgICAgICAgIGR1cmF0aW9uPWlzTmFOKGR1cmF0aW9uKT8zMDAwOmR1cmF0aW9uOwogCiAgICAgICAgICAgICAgICBsZXQgdG9hc3REb20gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKIAogICAgICAgICAgICAgICAgdG9hc3REb20uaW5uZXJIVE1MID0gbXNnOwogCiAgICAgICAgICAgICAgICAvL3RvYXN0RG9tLnN0eWxlLmNzc1RleHQ9IndpZHRoOiA2MCU7bWluLXdpZHRoOiAxNTBweDtvcGFjaXR5OiAwLjc7aGVpZ2h0OiAzMHB4O2NvbG9yOiByZ2IoMjU1LCAyNTUsIDI1NSk7bGluZS1oZWlnaHQ6IDMwcHg7dGV4dC1hbGlnbjogY2VudGVyO2JvcmRlci1yYWRpdXM6IDVweDtwb3NpdGlvbjogZml4ZWQ7dG9wOiA0MCU7bGVmdDogMjAlO3otaW5kZXg6IDk5OTk5OTtiYWNrZ3JvdW5kOiByZ2IoMCwgMCwgMCk7Zm9udC1zaXplOiAxMnB4OyI7CiAgICAgICAgICAgICAgIC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gICAgICAgdGhpcy5kaXZFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7CiAKICAgICAgICAgICAgICAgIHRoaXMuZGl2RWxlbWVudC5pZD0nemhtX2Rpdl9zJzsKIAogICAgICAgICAgICB9CiAgICAgICAgICAgIHRhb2JhbygpewogCiAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNKX2p1VmFsaWQnKTsKIAogICAgICAgICAgICAgICAgbm9kZS5zdHlsZT0nb3ZlcmZsb3c6aW5oZXJpdDsnCiAKICAgICAgICAgICAgICAgIGxldCBjbGFzc05hbWUgPSAnemhtX3RhYl90YW9iYW8nOwogCiAgICAgICAgICAgICAgICB0aGlzLmdldENvdXBvbkluZm8obm9kZSxjbGFzc05hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRtYWxsKCl7CiAKICAgICAgICAgICAgICAgIGxldCBub2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLkFjdGlvbnMtLWxlZnRCdXR0b25zLS0xTTNLa0Y3Jyk/ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLkFjdGlvbnMtLWxlZnRCdXR0b25zLS0xTTNLa0Y3Jyk6ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI0pfTGlua0J1eScpLnBhcmVudE5vZGU7CiAKICAgICAgICAgICAgICAgIGxldCBjbGFzc05hbWUgPSAnemhtX3RhYl90bWFsbCc7CiAKICAgICAgICAgICAgICAgIHRoaXMuZ2V0Q291cG9uSW5mbyhub2RlLGNsYXNzTmFtZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdG1hbGxDYW9zaGkoKXsKIAogICAgICAgICAgICAgICAgbGV0IG5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjSl9MaW5rQnV5JykucGFyZW50Tm9kZTsKIAogICAgICAgICAgICAgICAgbGV0IGNsYXNzTmFtZSA9ICd6aG1fdGFiX3RtYWxsJzsKIAogICAgICAgICAgICAgICAgdGhpcy5nZXRDb3Vwb25JbmZvKG5vZGUsY2xhc3NOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0bWFsbE90aGVyKCl7CiAKICAgICAgICAgICAgICAgIGxldCBub2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnRtLW1zZy1ib3gnKTsKIAogICAgICAgICAgICAgICAgbGV0IGNsYXNzTmFtZSA9ICd6aG1fdGFiX3RtYWxsJzsKIAogICAgICAgICAgICAgICAgdGhpcy5nZXRDb3Vwb25JbmZvKG5vZGUsY2xhc3NOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBqZCgpewogICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+ewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGpkR29vZHNJZCA9IGNvdXBvblVybC5tYXRjaCgvamRcLmNvbVwvKFxTKikuaHRtbC8pOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IG5vZGU9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNjaG9vc2UtYnRucycpOwogCiAgICAgICAgICAgICAgICAgICAgbm9kZS5iZWZvcmUodGhpcy5kaXZFbGVtZW50KTsKIAogICAgICAgICAgICAgICAgICAgIHRoaXMucmVxdWVzdCgnZ2V0JyxgaHR0cHM6Ly96dWlodWltYWkubmV0L3ZyaHIvaW5kZXhfamRfbmV3LnBocD9nb29kc19pZD0ke2pkR29vZHNJZFsxXX1gKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3A9IEpTT04ucGFyc2UocmVzdWx0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbD0nJzsKIAogICAgICAgICAgICAgICAgICAgICAgICByZXNwLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgKz0KICAgICAgICAg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qU8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9tb25leV9udW0iPiR7aXRlbS5kaXNjb3VudH08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jb25kaXRpb24iPua7oSR7aXRlbS5xdW90YX3lhYPlj6/nlKg8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGltZSIgc3R5bGU9J21hcmdpbi10b3A6MTBweDsnPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGVybSI+5pyJ5pWI5pyfPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9kYXRlIj4ke2l0ZW0uZW5kVGltZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NpcmNsZSI+PC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9saW5rX2NvdXBvbiI+CiAgICAgICAgICAgICAgICA8YSBjbGFzcz0iemhtX2xpbmtfdGV4dCIgaHJlZj0iJHtpdGVtLmNvdXBvbl9saW5rfSIgdGFyZ2V0PSdfYmxhbmsnIHJlbD0nbm9vcGVuZXIgbm9yZWZlcnJlciBub2ZvbGxvdycgc3R5bGU9Im1hcmdpbi1sZWZ0OjE2cHg7d2lkdGg6MzRweDsiPumihuWPljwvYT4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICAgICAgYAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtX2Rpdl9zJykuaW5uZXJIVE1MID0gaHRtbDsKIAogICAgICAgICAgICAgICAgICAgIH0pCiAKIAogCiAgICAgICAgICAgICAgICB9LGNvdXBvbldhaXRUaW1lKQogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZ2V0Q291cG9uSW5mbyhub2RlLGNsYXNzTmFtZSl7CiAKICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCk9PnsKIAogICAgICAgICAgICAgICAgICAgIGxldCBnb29kc19pZCA9IHRoaXMuZ2V0UXVlcnlTdHJpbmcoJ2lkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZighZ29vZHNfaWQpe2NvbnNvbGUubG9nKCdnb29kc19pZCcpO3JldHVybn07CiAKICAgICAgICAgICAgICAgICAgICBpZihjbGFzc05hbWUgPT0gJ3pobV90YWJfdGFvYmFvJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoMSknKS5iZWZvcmUodGhpcy5kaXZFbGVtZW50KTsKIAogICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICBub2RlLmJlZm9yZSh0aGlzLmRpdkVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIHRoaXMucmVxdWVzdCgnZ2V0JyxgaHR0cHM6Ly93d3cuenVpaHVpbWFpLm5ldC92cmhyL2luZGV4X25ldy5waHA/Z29vZHNfaWQ9JHtnb29kc19pZH1gKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzdWx0KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3A9IEpTT04ucGFyc2UocmVzdWx0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgICA8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XY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jb25kaXRpb24iPiR7cmVzcC5jb3Vwb25faW5mb308L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGltZSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV90ZXJtIj7mnInmlYjmnJ88L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2RhdGUiPiR7cmVzcC5jb3Vwb25fZW5kX3RpbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jaXJjbGUiPjwvZGl2PgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fbGlua19jb3Vwb24iIHN0eWxlPSJtYXJnaW4tcmlnaHQ6Ij4KICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJ6aG1fbGlua190ZXh0IiBvbmNsaWNrPSJ3aW5kb3cub3BlbignJHtyZXNwLmNvdXBvbl9saW5rfScpIj7pooblj5Y8L2E+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICAgIGA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtX2Rpdl9zJykuaW5uZXJIVE1MPWh0bWw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgfSxjb3Vwb25XYWl0VGltZSk7CiAgICAgICAgICAgIH0KIAogICAgICAgIH0KIAogICAgICAgIGNsYXNzIFBsYXlWaWRlb0NsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQogCiAgICAgICAgfQogCiAgICAgICAgY2xhc3MgUGxheU11c2ljQ2xhc3MgZXh0ZW5kcyBCYXNlQ2xhc3N7CiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CiAgICAgICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgeG1seUNyZWF0ZUNoZWNrYm94KCl7CiAKICAgICAgICAgICAgICAgIGxldCBzb3VuZExpc3RsaSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5zb3VuZC1saXN0IHVsIGxpJyk7CiAKICAgICAgICAgICAgICAgIHNvdW5kTGlzdGxpLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgY2hlY2tib3hlZCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignaW5wdXQnKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGNoZWNrYm94ZWQpewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcudGV4dCcpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH07CiAKICAgICAgICAgICAgICAgICAgICB0aXRsZS5zdHlsZSA9ICJ3aWR0aDozNjBweCI7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgc3JjID0gdGl0bGUucXVlcnlTZWxlY3RvcignYScpLmdldEF0dHJpYnV0ZSgnaHJlZicpOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0RG9tID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuaWNvbi13cmFwcGVyJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgaW5wdXREb20gPSBmaXJzdERvbS5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgICAgICBpbnB1dERvbS5zdHlsZT0gJ21pbi13aWR0aDogMHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICBpbnB1dERvbS5pbm5lckhUTUwgPSAiPGlucHV0IHR5cGU9J2NoZWNrYm94JyBuYW1lPSd6aG1DaGVja2JveCcgdmFsdWU9IitzcmMrIiA+IjsKIAogICAgICAgICAgICAgICAgICAgIGZpcnN0RG9tLmJlZm9yZShpbnB1dERvbSk7CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgfQogICAgICAgIH0KIAogICAgICAgIGNsYXNzIFpoQ2xhc3MgZXh0ZW5kcyBCYXNlQ2xhc3N7CiAKICAgICAgICAgICAgY29uc3RydWN0b3IoKXsKICAgICAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2hvd1NwZWNpYWxDb2x1bW4oKXsKIAogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZiA9PSAnaHR0cHM6Ly93d3cuemhpaHUuY29tLycpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGNhcmRSZWNvbW1lbmQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuRmVlZCcpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoY2FyZFJlY29tbWVuZC5sZW5ndGggPjApewogCiAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRSZWNvbW1lbmQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5xdWVyeVNlbGVjdG9yKCcuc3BlY2lhbENvbHVtbicpKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkYXRhWm9wKXJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBkYXRhWm9wLmNhcmQuY29udGVudC50eXBlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlID09ICdQb3N0Jyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2Rpdj5kaXY+aDI+c3Bhbj5hJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdGl0bGUpcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdidXR0b24nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuY2xhc3NOYW1lID0gJ3NwZWNpYWxDb2x1bW4gQnV0dG9uIFZvdGVCdXR0b24gVm90ZUJ1dHRvbi0tdXAnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5zdHlsZSA9ICdsaW5lLWhlaWdodDoyMHB4O3BhZGRpbmc6MHB4IDVweDttYXJnaW4tcmlnaHQ6NXB4O2JvcmRlci1yYWRpdXM6MnB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmlubmVyVGV4dCA9ICfmlofnq6AnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUuYmVmb3JlKG5ld0VsZW1lbnQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvc2VhcmNoLykpewogICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgdGltZXI9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNhcmRTZWFyY2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuU2VhcmNoUmVzdWx0LUNhcmQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihuKys+NjAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY2FyZFNlYXJjaC5sZW5ndGggPjApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZFNlYXJjaC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5xdWVyeVNlbGVjdG9yKCcuc3BlY2lhbENvbHVtbicpKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighZGF0YVpvcClyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZSA9IGRhdGFab3AuY2FyZC5jb250ZW50LnR5cGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlID09ICdQb3N0Jyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+ZGl2PmEnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdGl0bGUpcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5jbGFzc05hbWUgPSAnc3BlY2lhbENvbHVtbiBCdXR0b24gVm90ZUJ1dHRvbiBWb3RlQnV0dG9uLS11cCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5zdHlsZSA9ICdsaW5lLWhlaWdodDoyMHB4O3BhZGRpbmc6MHB4IDVweDttYXJnaW4tcmlnaHQ6NXB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pbm5lclRleHQgPSAn5paH56ugJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5iZWZvcmUobmV3RWxlbWVudCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKIAogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNob3dWaWRlb1RpdGxlKCl7CiAKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYgPT0gJ2h0dHBzOi8vd3d3LnpoaWh1LmNvbS8nKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBjYXJkUmVjb21tZW5kID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkZlZWQnKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGNhcmRSZWNvbW1lbmQubGVuZ3RoID4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBjYXJkUmVjb21tZW5kLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnZpZGVvVGl0bGUnKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighZGF0YVpvcClyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNWaWRlbyA9IGRhdGFab3AuY2FyZC5oYXNfdmlkZW87CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhhc1ZpZGVvID09IHRydWUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPmRpdj5hJykpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPmRpdj5hJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2Rpdj5kaXY+aDI+c3Bhbj5hJykpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+YScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmNsYXNzTmFtZSA9ICd2aWRlb1RpdGxlJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuc3R5bGUgPSAnYmFja2dyb3VuZDogcmdiYSgyNTUsIDEzMSwgODYsIDAuMTIpO2NvbG9yOiByZ2IoMjU1LCA3MywgMTIpO2xpbmUtaGVpZ2h0OjIwcHg7cGFkZGluZzoxcHggNnB4O21hcmdpbi1yaWdodDo1cHg7Ym9yZGVyLXJhZGl1czoycHg7Zm9udC1zaXplOjE0cHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuaW5uZXJUZXh0ID0gJ+inhumikSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5iZWZvcmUobmV3RWxlbWVudCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvaHR0cHM/OlwvXC93d3cuemhpaHUuY29tXC9zZWFyY2gvKSl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbj0wOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjYXJkU2VhcmNoID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLlNlYXJjaFJlc3VsdC1DYXJkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrPjYwMCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNhcmRTZWFyY2gubGVuZ3RoID4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRTZWFyY2guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnZpZGVvVGl0bGUnKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRhdGFab3ApcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBkYXRhWm9wLmNhcmQuY29udGVudC50eXBlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAnWnZpZGVvJyApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5zcGFuPmRpdj5hJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2J1dHRvbicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuY2xhc3NOYW1lID0gJ3ZpZGVvVGl0bGUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuc3R5bGUgPSAnYmFja2dyb3VuZDogcmdiYSgyNTUsIDEzMSwgODYsIDAuMTIpO2NvbG9yOiByZ2IoMjU1LCA3MywgMTIpO2xpbmUtaGVpZ2h0OjIwcHg7cGFkZGluZzoxcHggNnB4O21hcmdpbi1yaWdodDo1cHg7Ym9yZGVyLXJhZGl1czoycHg7Zm9udC1zaXplOjE0cHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmlubmVyVGV4dCA9ICfop4bpopEnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLmJlZm9yZShuZXdFbGVtZW50KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVWaWRlbygpewogCiAgICAgICAgICAgICAgICBsZXQgY2FyZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5GZWVkJyk7CiAKICAgICAgICAgICAgICAgIGNhcmQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW8gPSBkYXRhWm9wLmNhcmQuY29udGVudC52aWRlb19pZDsKIAogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnBhcmVudE5vZGUuc3R5bGU9J2Rpc3BsYXk6bm9uZTsnOwogCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlbW92ZUFEKCl7CiAKICAgICAgICAgICAgICAgIGxldCB6aEhpZGVBRCA9IGAuUGMtY2FyZHtkaXNwbGF5Om5vbmUgIWltcG9ydGFudDt9LlRvcHN0b3J5SXRlbS0tYWR2ZXJ0Q2FyZHtkaXNwbGF5Om5vbmUgIWltcG9ydGFudH1gOwogCiAgICAgICAgICAgICAgICBkb21TdHlsZSAuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoemhIaWRlQUQpKTsKIAogICAgICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAKICAgICAgICAgICAgfQogICAgICAgICAgICBkb3dubG9hZFZpZGVvKCl7CiAKICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsKGUpPT57CiAKICAgICAgICAgICAgICAgICAgICBpZihlLnRhcmdldC5pbm5lclRleHQgPT0gJ+S4i+i9vScpewogCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWRlb0lkOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5aVmlkZW8tcGxheWVyJykpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgelZpZGVvID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLlpWaWRlbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9EYXRhID0gSlNPTi5wYXJzZSh6VmlkZW8uZ2V0QXR0cmlidXRlKCdkYXRhLXphLWV4dHJhLW1vZHVsZScpKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9JZCA9IHZpZGVvRGF0YS5jYXJkLmNvbnRlbnQudmlkZW9faWQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1VybCA9IHdpbmRvdy5sb2NhdGlvbi5ocmVmOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9PYmogPSB2aWRlb1VybC5zcGxpdCgnPycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0lkID0gdmlkZW9PYmpbMF0uc3BsaXQoJy8nKS5wb3AoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAnaHR0cHM6Ly9sZW5zLnpoaWh1LmNvbS9hcGkvdjQvdmlkZW9zLycrdmlkZW9JZDsKIAogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhLnBsYXlsaXN0ICE9IHVuZGVmaW5lZCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheV91cmwgPSBkYXRhLnBsYXlsaXN0LkxELnBsYXlfdXJsOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvTmFtZSA9IHZpZGVvSWQrIi5tcDQiOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQocGxheV91cmwsdmlkZW9OYW1lKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+S4i+i9veWksei0pe+8gScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ0RPTU5vZGVJbnNlcnRlZCcsKGUpID0+IHsKIAogICAgICAgICAgICAgICAgICAgIGlmKCFlLnJlbGF0ZWROb2RlLnF1ZXJ5U2VsZWN0b3IpIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgIHZhciBwbGF5QmFyID0gZS5yZWxhdGVkTm9kZS5xdWVyeVNlbGVjdG9yKCc6c2NvcGUgPiBkaXY6bGFzdC1jaGlsZCA+IGRpdjpmaXJzdC1jaGlsZCA+IGRpdjpudGgtb2YtdHlwZSgyKScpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoIXBsYXlCYXIgfHwgcGxheUJhci5xdWVyeVNlbGVjdG9yKCcuemhtRG93bmxvYWQnKSkgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXlCdXQgPSBwbGF5QmFyLnF1ZXJ5U2VsZWN0b3IoJzpzY29wZSA+IGRpdjpsYXN0LWNoaWxkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZighcGxheUJ1dCkgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXlCdXRMaSA9IHBsYXlCdXQucXVlcnlTZWxlY3RvcignZGl2OmZpcnN0LWNoaWxkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZighcGxheUJ1dExpKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICB2YXIgZG93bmxvYWRCdXQgPSBwbGF5QnV0TGkuY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRCdXQuY2xhc3NOYW1lID0gcGxheUJ1dExpLmNsYXNzTmFtZSArICcgemhtRG93bmxvYWQnOwogCiAgICAgICAgICAgICAgICAgICAgaWYoIWRvd25sb2FkQnV0LnF1ZXJ5U2VsZWN0b3IoJy5fMXRnOG9pcicpKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEJ1dC5xdWVyeVNlbGVjdG9yKCcuXzF0ZzhvaXInKS5pbm5lclRleHQ9J+S4i+i9vSc7CiAKICAgICAgICAgICAgICAgICAgICBwbGF5QnV0TGkuYmVmb3JlKGRvd25sb2FkQnV0KTsKIAogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlbW92ZVJpZ2h0KCl7CiAKICAgICAgICAgICAgICAgIGxldCB6aEZ1bGxTY3JlZW4gPSBgLkdsb2JhbFNpZGVCYXIge2Rpc3BsYXk6IG5vbmUgIWltcG9ydGFudDt9CiAgICAgICAgICAgICAgICAgICAgLmNzcy0xcXl5dGo3e2Rpc3BsYXk6IG5vbmUgIWltcG9ydGFudDt9CiAgICAgICAgICAgICAgICAgICAgLlF1ZXN0aW9uLXNpZGVDb2x1bW57ZGlzcGxheTpub25lICFpbXBvcnRhbnR9CiAgICAgICAgICAgICAgICAgICAgLlRvcHN0b3J5LW1haW5Db2x1bW57d2lkdGg6MTAwJSAhaW1wb3J0YW50fQogICAgICAgICAgICAgICAgICAgIC5RdWVzdGlvbi1tYWluQ29sdW1ue3dpZHRoOjEwMDBweCAhaW1wb3J0YW50fQogICAgICAgICAgICAgICAgICAgIC5jc3MtY2F6ZzQ4e21hcmdpbjogMHB4IDE2cHggMHB4IDBweCAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuUXVlc3Rpb25XYWl0aW5nLW1haW5Db2x1bW57d2lkdGg6MTAwJSAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuY3NzLTFqNWQzbGx7cGFkZGluZy1sZWZ0OjEwcHg7fQogICAgICAgICAgICAgICAgICAgIC5jc3MteWhqd29le2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbiAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICBgOwogICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHpoRnVsbFNjcmVlbikpOwogCiAgICAgICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjaGFuZ2VMaW5rKCl7CiAKICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5pbmRleE9mKCd0YXJnZXQnKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0gdGhpcy5nZXRVcmxQYXJhbXMoY291cG9uVXJsKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKG9iai50YXJnZXQgPT0gdW5kZWZpbmVkKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGRlY29kZVVSSUNvbXBvbmVudChvYmoudGFyZ2V0KTsKIAogICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bGluazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVLZXl3b3JkKCl7CiAKICAgICAgICAgICAgICAgIHZhciBHTUtleXdvcmQgPSBHTV9nZXRWYWx1ZSgnaW5wdXRaaEtleXdvcmQnLCcwJyk7CiAKICAgICAgICAgICAgICAgIGlmKEdNS2V5d29yZCA9PSAnMCcgfHwgR01LZXl3b3JkID09ICcnKSByZXR1cm47CiAKICAgICAgICAgICAgICAgIGxldCBrZXl3b3JkID0gR01LZXl3b3JkLnNwbGl0KCcsJyk7CiAKICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkNvbnRlbnRJdGVtJyk7CiAKICAgICAgICAgICAgICAgIGtleXdvcmQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgIGNvbnRlbnQuZm9yRWFjaChmdW5jdGlvbih2YWx1ZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFab3AgPSBKU09OLnBhcnNlKHZhbHVlLmdldEF0dHJpYnV0ZSgnZGF0YS16b3AnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YVpvcCAmJiBkYXRhWm9wLnRpdGxlLmluZGV4T2YoaXRlbSkgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbUNhcmQgPSB2YWx1ZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucGFyZW50Tm9kZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1DYXJkQ2xhc3M9IGl0ZW1DYXJkLmNsYXNzTmFtZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbUNhcmRDbGFzcy5pbmRleE9mKCdUb3BzdG9yeUl0ZW0taXNSZWNvbW1lbmQnKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtQ2FyZC5zdHlsZT0nZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVtb3ZlQXV0aG9yTmFtZSgpewogCiAgICAgICAgICAgICAgICB2YXIgR01BdXRob3JOYW1lID0gR01fZ2V0VmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJywnMCcpOwogCiAgICAgICAgICAgICAgICBpZihHTUF1dGhvck5hbWUgPT0gJzAnIHx8IEdNQXV0aG9yTmFtZSA9PSAnJykgcmV0dXJuOwogCiAgICAgICAgICAgICAgICBsZXQgYXV0aG9yTmFtZSA9IEdNQXV0aG9yTmFtZS5zcGxpdCgnLCcpOwogCiAgICAgICAgICAgICAgICAvL+aQnOe0oumhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvc2VhcmNoLykpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKIAogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgdXNlckxpbmsgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ2FyZCcpOwogCiAgICAgICAgICAgICAgICAgICAgaWYodXNlckxpbmsubGVuZ3RoID4gNSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdXNlckxpbmsuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdiJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGF1dGhvci5pbm5lclRleHQpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobj4zMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuKys7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMTAwKQogICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8v5Zue562U6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM/OlwvXC93d3cuemhpaHUuY29tXC9xdWVzdGlvblwvLiovKSl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbURvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5MaXN0LWl0ZW0nKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW1Eb20ubGVuZ3RoPjApewogCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Eb20uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5Db250ZW50SXRlbScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihjb250ZW50KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShjb250ZW50LmdldEF0dHJpYnV0ZSgnZGF0YS16b3AnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRob3JOYW1lLmluZGV4T2YoZGF0YVpvcC5hdXRob3JOYW1lKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/nrYnkvaDlm57nrZTpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYgPT0gJ2h0dHBzOi8vd3d3LnpoaWh1LmNvbS9xdWVzdGlvbi93YWl0aW5nJyl7CiAKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHF1ZXN0aW9uTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5qc05hdmlnYWJsZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHF1ZXN0aW9uTGlzdC5sZW5ndGg+MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXN0aW9uTGlzdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dGhvckRvbVRleHQgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5jc3MtdG5zYXhoJykuaW5uZXJUZXh0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yRG9tVGV4dCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dGhvciA9IGF1dGhvckRvbVRleHQucmVwbGFjZSgnIicsJycpLnJlcGxhY2UoJ+eahOaPkOmXricsJycpLnJlcGxhY2UoLyheXHMrKXwoXHMrJCkvZywnJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGF1dGhvcikgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZT0nZGlzcGxheTpub25lOyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSwzMDApCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+aOqOiNkOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZiA9PSAnaHR0cHM6Ly93d3cuemhpaHUuY29tLycpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ29udGVudEl0ZW0nKTsKIAogICAgICAgICAgICAgICAgICAgIGNvbnRlbnQuZm9yRWFjaChmdW5jdGlvbih2YWx1ZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFab3AgPSBKU09OLnBhcnNlKHZhbHVlLmdldEF0dHJpYnV0ZSgnZGF0YS16b3AnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGRhdGFab3AuYXV0aG9yTmFtZSkgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbUNhcmQgPSB2YWx1ZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucGFyZW50Tm9kZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbUNhcmQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbUNhcmQuc3R5bGU9J2Rpc3BsYXk6bm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgcmVtb3ZlWWFueHVhbigpewogCiAgICAgICAgICAgICAgICAvL+WbnuetlOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvcXVlc3Rpb25cLy4qLykpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1Eb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuTGlzdC1pdGVtJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihpdGVtRG9tLmxlbmd0aD4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtRG9tLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuS2ZlQ29sbGVjdGlvbi1PcmRpbmFyeUxhYmVsLWNvbnRlbnQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29udGVudCAmJiBjb250ZW50LmlubmVyVGV4dC5pbmRleE9mKCfnm5DpgIknKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGxldCBhbnN3ZXJDYXJkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLkFuc3dlckNhcmQnKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGFuc3dlckNhcmQpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gYW5zd2VyQ2FyZC5xdWVyeVNlbGVjdG9yKCcuS2ZlQ29sbGVjdGlvbi1PcmRpbmFyeUxhYmVsLWNvbnRlbnQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihjb250ZW50ICYmIGNvbnRlbnQuaW5uZXJUZXh0LmluZGV4T2YoJ+ebkOmAiScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5zd2VyQ2FyZC5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8v5pCc57Si6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM/OlwvXC93d3cuemhpaHUuY29tXC9zZWFyY2gvKSl7CiAKICAgICAgICAgICAgICAgICAgIGxldCBudW0gPSAwOwogCiAgICAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjYXJkTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5DYXJkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY2FyZExpc3QubGVuZ3RoID4gNSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXJkTGlzdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5LZmVDb2xsZWN0aW9uLVBjQ29sbGVnZUNhcmQtdHlwZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSAmJiB0eXBlLmlubmVyVGV4dC5pbmRleE9mKCfnm5DpgInkuJPmoI8nKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3IgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2InKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3JZYW54dWFuID0gWyfmlYXkuovmoaPmoYjlsYAnLCAn55uQ6YCJ5o6o6I2QJywgJ+ebkOmAieenkeaZricsICfnm5DpgInmiJDplb/orqHliJInLCAn55+l5LmO55uQ6YCJ5Lya5ZGYJywgJ+efpeS5juebkOmAieWIm+S9nOiAhScsICfnm5DpgInlv4PnkIYnLCAn55uQ6YCJ5YGl5bq35b+F5L+u6K++JywgJ+ebkOmAieWlh+WmmeeJqeivrScsICfnm5DpgInnlJ/mtLvppoYnLCAn55uQ6YCJ6IGM5Zy6JywgJ+ebkOmAieaWh+WtpueUhOmAiScsICfnm5DpgInkvZzogIXlsI/nrqHlrrYnLCAn55uQ6YCJ5Y2a54mp6aaGJywgJ+ebkOmAieeCuemHkScsICfnm5DpgInmtYvor4TlrqQnLCAn55uQ6YCJ56eR5oqA5YmN5rK/JywgJ+ebkOmAieS8muWRmOeyvuWTgScsICfljoblj7Lnjq/muLjorrAnXTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvciAmJiBhdXRob3JZYW54dWFuLmluZGV4T2YoYXV0aG9yLmlubmVyVGV4dCkgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihudW0+MzApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtKys7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMTAwKQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8v5o6o6I2Q6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmID09ICdodHRwczovL3d3dy56aGlodS5jb20vJyl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5Db250ZW50SXRlbScpOwogCiAgICAgICAgICAgICAgICAgICAgY29udGVudC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuS2ZlQ29sbGVjdGlvbi1PcmRpbmFyeUxhYmVsLWNvbnRlbnQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihjb250ZW50ICYmIGNvbnRlbnQuaW5uZXJUZXh0LmluZGV4T2YoJ+ebkOmAiScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KIAogICAgICAgIH0KIAogICAgICAgIGNsYXNzIFZpZGVvRG93bmxvYWRDbGFzcyBleHRlbmRzIEJhc2VDbGFzc3sKIAogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogCiAgICAgICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZHlWaWRlb0Rvd25sb2FkKCl7CiAKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdsb2FkJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb20gPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLnhnLXZpZGVvLWNvbnRhaW5lcicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb0RvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdnNOYXYgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuZnV5X3dtY3Q6bnRoLW9mLXR5cGUoNSknKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZigodnNOYXYgJiYgdnNOYXYuY2xhc3NOYW1lLmluZGV4T2YoJ0xYWDc5bGU1JykgIT0gLTEpIHx8IGNvdXBvblVybC5pbmRleE9mKCd2c2RldGFpbCcpICE9IC0xKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfnu7zoibrmoI/nm67lhbPpl63kuIvovb0nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVEeVZpZGVvRG93bmxvYWQoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9QbGF5RG9tQWxsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgndmlkZW8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9JbmRleCA9IHZpZGVvUGxheURvbUFsbC5sZW5ndGg+MT92aWRlb1BsYXlEb21BbGwubGVuZ3RoLTI6dmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0xOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1BsYXlEb20gPSB2aWRlb1BsYXlEb21BbGxbdmlkZW9JbmRleF07CiAKICAgICAgICAgICAgICAgICAgICAgICAgLy9sZXQgdmlkZW9QbGF5RG9tID0gdmlkZW9QbGF5RG9tQWxsLmxlbmd0aD4xP3ZpZGVvUGxheURvbUFsbFt2aWRlb1BsYXlEb21BbGwubGVuZ3RoLTJdOnZpZGVvUGxheURvbUFsbFt2aWRlb1BsYXlEb21BbGwubGVuZ3RoLTFdOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvUGxheURvbS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIuaSreaUvue7k+adnyIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b1BsYXkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueGctc3dpdGNoLWNoZWNrZWQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5q2j5Zyo5LiL6L296K+356iN5L6vJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhVXJsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobURvdXlpbkRvd25sb2FkJykuZ2V0QXR0cmlidXRlKCdkYXRhLXVybCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWF0Y2ggPSAvW2h0dHBzXT86P1wvXC93d3dcLmRvdXlpblwuY29tXC8uK1wvKFswLTldKykvOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW8gPSBkYXRhVXJsLm1hdGNoKG1hdGNoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvSWQgPSB2aWRlb1sxXTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICdodHRwczovL3d3dy5pZXNkb3V5aW4uY29tL3dlYi9hcGkvdjIvYXdlbWUvaXRlbWluZm8vP2l0ZW1faWRzPScrdmlkZW9bMV07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJnZXQiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6ICcnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHsnQWNjZXB0JzogJ3RleHQvcGxhaW4sIHRleHQvaHRtbCxhcHBsaWNhdGlvbi9qc29uJ30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25sb2FkOiBmdW5jdGlvbihyZXN1bHQpIHsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzdWx0LnJlc3BvbnNlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLml0ZW1fbGlzdC5sZW5ndGggPiAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVyaUlkID0gcmVzcC5pdGVtX2xpc3RbMF0udmlkZW8ucGxheV9hZGRyLnVyaTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlVcmwgPSBgaHR0cHM6Ly9hd2VtZS5zbnNzZGsuY29tL2F3ZW1lL3YxL3BsYXkvP3ZpZGVvX2lkPSR7dXJpSWR9JmxpbmU9MCZyYXRpbz01NDBwJm1lZGlhX3R5cGU9NCZ2cl90eXBlPTAmaW1wcm92ZV9iaXRyYXRlPTAmaXNfcGxheV91cmw9MSZpc19zdXBwb3J0X2gyNjU9MCZzb3VyY2U9UGFja1NvdXJjZUVudW1fUFVCTElTSGA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbmZvID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLk51NjZQX2JhJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhY2NvdW50ID0gaW5mb1t2aWRlb0luZGV4KjJdLmlubmVyVGV4dDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlQXJyID0gaW5mb1t2aWRlb0luZGV4KjIrMV0uaW5uZXJUZXh0LnNwbGl0KCcjJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHRpdGxlQXJyWzBdP3RpdGxlQXJyWzBdOnRpdGxlQXJyWzFdOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGFjY291bnQsdGl0bGUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9kb3dubG9hZChwbGF5VXJsLHRpdGxlK2FjY291bnQrIi5tcDQiKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdBUEnmsqHmnInojrflj5bop4bpopFJRCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Db3B5JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5bey5aSN5Yi25Yiw5Ymq6LS05p2/Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldENsaXBib2FyZCh2aWRlb1BsYXlEb20uY2hpbGRyZW5bMF0uc3JjKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG9MaW5rJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKHZpZGVvUGxheURvbS5jaGlsZHJlblswXS5zcmMpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAKICAgICAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigid2hlZWwiLGdldENvbnRyb2xzKTsKIAogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihlLmNvZGU9PSdBcnJvd0Rvd24nIHx8IGUuY29kZT09J0Fycm93VXAnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGluc2VydGVkRG9tKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJ3ZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvRG9tLmFkZEV2ZW50TGlzdGVuZXIoJ0RPTU5vZGVJbnNlcnRlZCcsKGUpID0+IHsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgaW5zZXJ0ZWREb20oKTsKIAogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZ2V0Q29udHJvbHMpOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBjcmVhdGVEeVZpZGVvRG93bmxvYWQoKXsKIAogICAgICAgICAgICAgICAgbGV0IGNvbnRyb2xBbGwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcueGctcmlnaHQtZ3JpZCcpOwogCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBjb250cm9sQWxsLmxlbmd0aD4xP2NvbnRyb2xBbGxbY29udHJvbEFsbC5sZW5ndGgtMl06Y29udHJvbEFsbFtjb250cm9sQWxsLmxlbmd0aC0xXTsKIAogICAgICAgICAgICAgICAgbGV0IHZpZGVvRG93bmxvYWREb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtRG91eWluRG93bmxvYWQnKTsKIAogICAgICAgICAgICAgICAgaWYodmlkZW9Eb3dubG9hZERvbSl7CiAKICAgICAgICAgICAgICAgICAgICB2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUpOwogCiAgICAgICAgICAgICAgICAgICAgLy92aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUucGFyZW50Tm9kZS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHZpZGVvRG93bmxvYWREb20ucGFyZW50Tm9kZS5wYXJlbnROb2RlKQogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBsZXQgcGxheVNldGluZyA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJy54Z3BsYXllci1wbGF5YmFjay1zZXR0aW5nJyk7CiAKICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZERvbSA9IHBsYXlTZXRpbmcuY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5zdHlsZT0nbWFyZ2luLXJpZ2h0OjIwcHg7JzsKIAogICAgICAgICAgICAgICAgLy9sZXQgZG93bmxvYWRUZXh0ID0gZG93bmxvYWREb20ucXVlcnlTZWxlY3RvcignZGl2OmZpcnN0LWNoaWxkID4gc3BhbjpmaXJzdC1jaGlsZCcpOwogCiAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRUZXh0ID0gZG93bmxvYWREb20ucXVlcnlTZWxlY3RvcignZGl2OmZpcnN0LWNoaWxkJyk7CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5pbm5lclRleHQ9J+S4i+i9vSc7CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5zdHlsZSA9ICdmb250LXNpemU6MTJweDtmb250LXdlaWdodDo0MDA7JzsKIAogICAgICAgICAgICAgICAgZG93bmxvYWRUZXh0LnNldEF0dHJpYnV0ZSgnaWQnLCd6aG1Eb3V5aW5Eb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICBsZXQgZGV0YWlsID0gY29udHJvbHMucXVlcnlTZWxlY3RvcigneGctaWNvbjpudGgtb2YtdHlwZSgxKScpLmNoaWxkcmVuWzBdOwogCiAgICAgICAgICAgICAgICBsZXQgbGlua1VybCA9IGRldGFpbC5nZXRBdHRyaWJ1dGUoJ2hyZWYnKT9kZXRhaWwuZ2V0QXR0cmlidXRlKCdocmVmJyk6bG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICAgICAgZG93bmxvYWRUZXh0LnNldEF0dHJpYnV0ZSgnZGF0YS11cmwnLGxpbmtVcmwpOwogCiAgICAgICAgICAgICAgICBkb3dubG9hZFRleHQucmVtb3ZlQXR0cmlidXRlKCd0YXJnZXQnKTsKIAogICAgICAgICAgICAgICAgZG93bmxvYWRUZXh0LnNldEF0dHJpYnV0ZSgnaHJlZicsJ2phdmFzY3JpcHQ6dm9pZCgwKTsnKTsKIAogICAgICAgICAgICAgICAgZG93bmxvYWREb20ub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLmNsYXNzTmFtZT0neGdwbGF5ZXItcGxheWJhY2stc2V0dGluZyBzbGlkZS1zaG93JzsKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5vbm1vdXNlb3V0PWZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5jbGFzc05hbWU9J3hncGxheWVyLXBsYXliYWNrLXNldHRpbmcnOwogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRIdG1sID0gJyc7CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkT3B0aW9uLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEh0bWwgKz0gYDxkaXYgY2xhc3M9InhncGxheWVyLXBsYXlyYXRpby1pdGVtICR7aXRlbS5pZH0iIGlkPSIke2l0ZW0uaWR9Ij4ke2l0ZW0ubmFtZX08L2Rpdj5gOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5xdWVyeVNlbGVjdG9yKCcueGdwbGF5ZXItcGxheXJhdGlvLXdyYXAnKS5pbm5lckhUTUwgPSBkb3dubG9hZEh0bWw7CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLnF1ZXJ5U2VsZWN0b3IoJy54Z3BsYXllci1zbGlkZXInKS5zdHlsZT0nd2lkdGg6NjBweCBpbXBvcnRhbnQ7JzsKIAogICAgICAgICAgICAgICAgbGV0IGF1dG9QbGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhncGxheWVyLWF1dG9wbGF5LXNldHRpbmcnKTsKIAogICAgICAgICAgICAgICAgYXV0b1BsYXkuYWZ0ZXIoZG93bmxvYWREb20pOwogCiAgICAgICAgICAgICAgICBsZXQgZGl2RG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAKICAgICAgICAgICAgICAgIGRpdkRvbS5zdHlsZT0icG9zaXRpb246IGFic29sdXRlO3otaW5kZXg6LTk5OTtoZWlnaHQ6ODBweDt3aWR0aDo0MHB4O21hcmdpbi10b3A6LTgwcHg7IgogCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5hcHBlbmRDaGlsZChkaXZEb20pOwogCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBrc1ZpZGVvRG93bmxvYWQoKXsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2xvYWQnLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiBnZXRDb250cm9scygpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcucGxheWVyLXZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYodmlkZW9Eb20uZ2V0QXR0cmlidXRlKCdzcmMnKS5tYXRjaCgvXmJsb2IvKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnYmxvYuinhumikeaXoOazleS4i+i9vScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUtzVmlkZW9Eb3dubG9hZCh2aWRlb0RvbSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb20uYWRkRXZlbnRMaXN0ZW5lcigncGxheWluZycsZnVuY3Rpb24oKXsgLy/mkq3mlL7kuK0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7kuK0iKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb20uYWRkRXZlbnRMaXN0ZW5lcignZW5kZWQnLGZ1bmN0aW9uKCl7IC8v57uT5p2fCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7nu5PmnZ8iKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9QbGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF1dG8td2FycHBlcicpLmdldEF0dHJpYnV0ZSgnYXV0b3BsYXknKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5q2j5Zyo5LiL6L296K+356iN5L6vJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VGltZVRvdGFsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnRvdGFsJykuaW5uZXJUZXh0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2Vjb25kID0gcGxheVRpbWVUb3RhbC5tYXRjaCgvKC4rKTooLispLyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZWNvbmRUb3RhbCA9IHNlY29uZFsxXSo2MCtwYXJzZUludChzZWNvbmRbMl0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVVybCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0Rvd25sb2FkJykuZ2V0QXR0cmlidXRlKCdkYXRhLXVybCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYWNjb3VudCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wcm9maWxlLXVzZXItbmFtZS10aXRsZScpLmlubmVyVGV4dDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWluZm8tdGl0bGUnKS5pbm5lclRleHQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0ZpbGVOYW1lID0gKGFjY291bnQgJiYgdGl0bGUpP2FjY291bnQrJy0nK3RpdGxlKycubXA0JzpuZXcgRGF0ZSgpLmdldFRpbWUoKSsnLm1wNCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKGRhdGFVcmwsdmlkZW9GaWxlTmFtZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Db3B5JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5bey5aSN5Yi25Yiw5Ymq6LS05p2/Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldENsaXBib2FyZCh2aWRlb0RvbS5nZXRBdHRyaWJ1dGUoJ3NyYycpKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9MaW5rJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKHZpZGVvRG9tLmdldEF0dHJpYnV0ZSgnc3JjJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwogCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAKIAogICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH0pCiAKIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgY3JlYXRlS3NWaWRlb0Rvd25sb2FkKHZpZGVvRG9tKXsKIAogICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gL15odHRwcz86XC9cL3d3d1wua3VhaXNob3VcLmNvbVwvKC4rKVwvLisvOwogCiAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IGxvY2F0aW9uLmhyZWYubWF0Y2gobWF0Y2gpOwogCiAgICAgICAgICAgICAgICBpZighcmVzcCB8fCAocmVzcFsxXSAhPSAnc2hvcnQtdmlkZW8nICYmIHJlc3BbMV0gIT0gJ3ZpZGVvJykpewogCiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjeS4jeaYr+inhumikeaSreaUvumhtScpO3JldHVybjsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgaWYocmVzcFsxXSA9PSAnc2hvcnQtdmlkZW8nKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJBcmVhID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWNvbnRhaW5lci1wbGF5ZXInKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJBcmVhV2lkdGggPSBwbGF5ZXJBcmVhLnN0eWxlLndpZHRoLm1hdGNoKC8oLispcHgvKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJCYXJQcm9ncmVzcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5ZXItYmFyLXByb2dyZXNzJyk7CiAKICAgICAgICAgICAgICAgICAgICBwbGF5ZXJCYXJQcm9ncmVzcy5zdHlsZS53aWR0aCA9IHBsYXllckFyZWFXaWR0aFsxXS0yNjArJ3B4JzsKIAogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lVG90YWwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG90YWwnKTsKIAogICAgICAgICAgICAgICAgICAgIHRpbWVUb3RhbC5zdHlsZS5yaWdodD0nMTIwcHgnOwogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucmlnaHQnKTsKIAogICAgICAgICAgICAgICAgbGV0IHZpZGVvRG93bmx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pZD0iJHtpdGVtLmlkfSI+JHtpdGVtLm5hbWV9PC9kaXY+YDsKIAogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgc2xpZGVyLmlubmVySFRNTCA9IGRvd25sb2FkTGlzdDsKIAogICAgICAgICAgICAgICAgeGdJY29uLnNldEF0dHJpYnV0ZSgnZGF0YS11cmwnLGxpbmtVcmwpOwogCiAgICAgICAgICAgICAgICB4Z0ljb24uc2V0QXR0cmlidXRlKCdpZCcsJ3pobUtzRG93bmxvYWQnKTsKIAogICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyh4Z0ljb24pOwogCiAgICAgICAgICAgICAgICAvL3hnSWNvbi5pbm5lckhUTUw9IjxkaXYgc3R5bGU9J2N1cnNvcjpwb2ludGVyOyc+5LiL6L29PC9kaXY+IjsKIAogICAgICAgICAgICAgICAgZGV0YWlsRG9tLmJlZm9yZSh4Z0ljb24pOwogCiAgICAgICAgICAgICAgICAvL+mHjeaehOaSreaUvuaTjeS9nOaMiemSrgogCiAgICAgICAgICAgICAgICBsZXQgemhtS3NCdXR0b24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtS3NCdXR0b24nKTsKIAogICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyh6aG1Lc0J1dHRvbik7CiAKICAgICAgICAgICAgICAgIGlmKHpobUtzQnV0dG9uKXsKIAogICAgICAgICAgICAgICAgICAgIC8vemhtS3NCdXR0b24ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh6aG1Lc0J1dHRvbik7CiAKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGxldCBidXR0b25JY29uID0gZGV0YWlsRG9tLmNsb25lTm9kZSh0cnVlKTsKICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coYnV0dG9uSWNvbik7CiAgICAgICAgICAgICAgICBidXR0b25JY29uLnNldEF0dHJpYnV0ZSgnaWQnLCd6aG1Lc0J1dHRvbicpOwogCiAgICAgICAgICAgICAgICBsZXQgYnV0dG9uSWNvbkltZyA9IGJ1dHRvbkljb24ucXVlcnlTZWxlY3RvcignLnVubXV0ZWQtaWNvbicpOwogCiAgICAgICAgICAgICAgICBidXR0b25JY29uSW1nLnN0eWxlID0gJ2JhY2tncm91bmQ6IHVybChodHRwczovL3MyLTEwNjIzLmt3aW1ncy5jb20vdWRhdGEvcGtnL2Nsb3VkY2RuL2ltZy9wbGF5ZXItc2V0dGluZy5hZDFmNWNlOC5zdmcpIG5vLXJlcGVhdCc7CiAKICAgICAgICAgICAgICAgIGRldGFpbERvbS5hZnRlcihidXR0b25JY29uKTsKIAogICAgICAgICAgICAgICAgbGV0IHBsU2xpZGVyID0gYnV0dG9uSWNvbi5xdWVyeVNlbGVjdG9yKCcucGwtc2xpZGVyJyk7CiAKICAgICAgICAgICAgICAgIHBsU2xpZGVyLnN0eWxlPSd3aWR0aDphdXRvO3BhZGRpbmc6MTBweCAxMHB4IDI1cHggMTBweDsnOwogCiAgICAgICAgICAgICAgICBwbFNsaWRlci5pbm5lckhUTUwgPSAiIjsKIAogICAgICAgICAgICAgICAgbGV0IGJ1dHRvbkZvdXIgPSBjb250cm9scy5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoNCknKTsKIAogICAgICAgICAgICAgICAgYnV0dG9uRm91ci5zdHlsZS5tYXJnaW49JzBweCc7CiAKICAgICAgICAgICAgICAgIGxldCBhdXRvUGxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5LXNldHRpbmctY29udGFpbmVyJyk7CiAKICAgICAgICAgICAgICAgIGF1dG9QbGF5LnN0eWxlLm1hcmdpbj0nMHB4IDQwcHggMHB4IDBweCc7CiAKICAgICAgICAgICAgICAgIGxldCBidXR0b25GaXZlID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDUpJyk7CiAKICAgICAgICAgICAgICAgIGJ1dHRvbkZpdmUuc3R5bGUubWFyZ2luPScxNXB4IDBweCc7CiAKICAgICAgICAgICAgICAgIGJ1dHRvbkZpdmUub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG9vbFRpcCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5rd2FpLXBsYXllci1yb3RhdGUtdG9vbHRpcCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRvb2xUaXApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b29sVGlwLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQodG9vbFRpcCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogCiAgICAgICAgICAgICAgICAgICAgfSwzMCkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBsZXQgYnV0dG9uU2l4ID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDYpJyk7CiAKICAgICAgICAgICAgICAgIGJ1dHRvblNpeC5zdHlsZS5tYXJnaW49JzE1cHggMHB4JzsKIAogICAgICAgICAgICAgICAgbGV0IHRvb2xUaXAgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3dhaS1wbGF5ZXItZnVsbHNjcmVlbi10b29sdGlwJyk7CiAKICAgICAgICAgICAgICAgIGJ1dHRvblNpeC5vbm1vdXNlb3Zlcj1mdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b29sVGlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt3YWktcGxheWVyLWZ1bGxzY3JlZW4tdG9vbHRpcCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRvb2xUaXApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b29sVGlwLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQodG9vbFRpcCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSwzMCkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBwbFNsaWRlci5hcHBlbmRDaGlsZChidXR0b25Gb3VyKTsKIAogICAgICAgICAgICAgICAgcGxTbGlkZXIuYXBwZW5kQ2hpbGQoYnV0dG9uRml2ZSk7CiAKICAgICAgICAgICAgICAgIHBsU2xpZGVyLmFwcGVuZENoaWxkKGJ1dHRvblNpeCk7CiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHhpZ3VhVmlkZW9Eb3dubG9hZCgpewogCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJ3ZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlWGlndWFWaWRlb0Rvd25sb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICdodHRwczovL3hnLmVnZ3ZvZC5jbi94aWd1YVZpZGVvLnBocD91cmw9JytlbmNvZGVVUklDb21wb25lbnQobG9jYXRpb24uaHJlZik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVyaSA9IF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXNwID0gSlNPTi5wYXJzZShyZXN1bHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9TcmMgPSAnJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzcC5jb2RlID09IDApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9TcmMgPSByZXNwLmRhdGEudXJsOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9TcmMpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1RpdGxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvVGl0bGUgaDEnKS5pbm5lclRleHQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9BdXRob3IgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYXV0aG9yX191c2VyTmFtZScpLnRpdGxlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfmraPlnKjkuIvovb3or7fnqI3kvq8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKHZpZGVvU3JjLHZpZGVvVGl0bGUrJ0AnK3ZpZGVvQXV0aG9yKycubXA0Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvQ29weScpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvU3JjKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeS4jeiDveWkjeWItuWcsOWdgCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+W3suWkjeWItuWIsOWJqui0tOadvycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHZpZGVvU3JjKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0xpbmsnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHkuI3og73nm7TmjqXmiZPlvIAnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9TcmMpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNsYXNzTmFtZSA9PSAneGdwbGF5ZXItY29udHJvbC1pdGVtIGNvbnRyb2xfcGxheW5leHQgY29tbW9uLWNvbnRyb2wtaXRlbScpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9iakxpbmsgPSB7fTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaHJlZil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsuaHJlZiA9IGl0ZW0uaHJlZj9pdGVtLmhyZWY6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsudGFyZ2V0ID0gaXRlbS50YXJnZXQ/aXRlbS50YXJnZXQ6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG9iakxpbmsuaHJlZiAmJiBvYmpMaW5rLnRhcmdldCAhPSAnX2JsYW5rJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IG9iakxpbmsuaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KS5jYXRjaCgoZXJyb3IpPT57IGNvbnNvbGUubG9nKGVycm9yKTt9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ3ZpZGVvJykuYWRkRXZlbnRMaXN0ZW5lcignZW5kZWQnLGZ1bmN0aW9uKCl7IC8v57uT5p2fCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7nu5PmnZ8iKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sNTUwMCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBjcmVhdGVYaWd1YVZpZGVvRG93bmxvYWQoKXsKIAogICAgICAgICAgICAgICAgbGV0IHJpZ2h0R3JpZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54Zy1yaWdodC1ncmlkJyk7CiAKICAgICAgICAgICAgICAgIGxldCBwbGF5Q29udHJvbCA9IHJpZ2h0R3JpZC5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoMiknKTsKIAogICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBwbGF5Q29udHJvbC5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgIGxldCBlbnRyeT0gY29udHJvbC5xdWVyeVNlbGVjdG9yKCcueGdwbGF5ZXItY29udHJvbC1pdGVtX19lbnRyeScpOwogCiAgICAgICAgICAgICAgICBlbnRyeS5pbm5lckhUTUwgPSAnPGRpdiBjbGFzcz0ieGdwY1BsYXllcl90ZXh0RW50cnkiPjxzcGFuPuS4i+i9vTwvc3Bhbj48L2Rpdj4nOwogCiAgICAgICAgICAgICAgICBsZXQgcG9wb3ZlciA9IGNvbnRyb2wucXVlcnlTZWxlY3RvcignLnhncGxheWVyLWNvbnRyb2wtaXRlbV9fcG9wb3ZlcicpOwogCiAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRMaXN0ID0gJzx1bD4nOwogCiAgICAgICAgICAgICAgICBkb3dubG9hZE9wdGlvbi5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRMaXN0ICs9IGA8bGkgdGFiaW5kZXg9IjAiIHJvbGU9Im1lbnVpdGVtcmFkaW8iIGFyaWEtY2hlY2tlZD0iZmFsc2UiIGlkPSIke2l0ZW0uaWR9Ij4ke2l0ZW0ubmFtZX08L2xpPmA7CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIGRvd25sb2FkTGlzdCArPSAnPC91bD4nOwogCiAgICAgICAgICAgICAgICBwb3BvdmVyLmlubmVySFRNTCA9IGRvd25sb2FkTGlzdDsKIAogICAgICAgICAgICAgICAgcGxheUNvbnRyb2wuYmVmb3JlKGNvbnRyb2wpOwogCiAgICAgICAgICAgICAgICBsZXQgZGl2RG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAKICAgICAgICAgICAgICAgIGRpdkRvbS5zdHlsZT0id2lkdGg6IDgwcHg7IGhlaWdodDogMTQwcHg7cG9zaXRpb246YWJzb2x1dGU7Ym90dG9tOjQwcHg7bGVmdDoyMHB4O3otaW5kZXg6LTEiOwogCiAgICAgICAgICAgICAgICBjb250cm9sLmFwcGVuZENoaWxkKGRpdkRvbSk7CiAKICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIHBvcG92ZXIuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW91dD1mdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgcG9wb3Zlci5zdHlsZS5kaXNwbGF5PSdub25lJzsKIAogICAgICAgICAgICAgICAgfQogCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGJpbGlWaWRlb0Rvd25sb2FkKCl7CiAKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdsb2FkJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByaWdodENvbnRyb2wgPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLnNxdWlydGxlLWNvbnRyb2xsZXItd3JhcC1yaWdodCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighcmlnaHRDb250cm9sKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmJpbGliaWxpLXBsYXllci12aWRlby1idG4tcXVhbGl0eScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbU90aGVyID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoZG9tT3RoZXIpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkT3RoZXIoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrPjMwKWNsZWFySW50ZXJ2YWwodGltZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLy9fdGhpcy5jcmVhdGVCaWxpVmlkZW9Eb3dubG9hZCgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aW1lclpobUljb24gPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb20gPSBbe25hbWU6J3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonYndwX3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonLmJpbGliaWxpLXBsYXllci12aWRlbycsdHlwZTonY2xhc3MnfV07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7aTx2aWRlb0RvbS5sZW5ndGg7aSsrKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IHZpZGVvRG9tW2ldLnR5cGUgPT0gJ2RvbSc/ZG9jdW1lbnQucXVlcnlTZWxlY3Rvcih2aWRlb0RvbVtpXS5uYW1lKTpkb2N1bWVudC5xdWVyeVNlbGVjdG9yKHZpZGVvRG9tW2ldLm5hbWUpLmZpcnN0Q2hpbGQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlbyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lclpobUljb24pOyAvL+WPlua2iOWumuaXtuWZqAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLmFkZEV2ZW50TGlzdGVuZXIoJ3BsYXknLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7lvIDlp4siKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8uYWRkRXZlbnRMaXN0ZW5lcignZW5kZWQnLGZ1bmN0aW9uKCl7IC8v57uT5p2fCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiaWxpRG93bmxvYWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhiaWxpRG93bmxvYWQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmlsaURvd25sb2FkLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoYmlsaURvd25sb2FkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKIAogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKXsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZEljb24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihkb3dubG9hZEljb24pewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5LiL6L295oyJ6ZKu5bey5a2Y5ZyoJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcXVhbGl0eSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuc3F1aXJ0bGUtcXVhbGl0eS13cmFwJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXF1YWxpdHkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBxdWFsaXR5LmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5zcXVpcnRsZS12aWRlby1xdWFsaXR5LXRleHQnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykuaW5uZXJUZXh0PSfkuIvovb0nOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHF1YWxpdHkuYmVmb3JlKGNvbnRyb2wpOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b0ljb25Eb20gPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLmJpbGliaWxpLXBsYXllci12aWRlby1idG4tcXVhbGl0eScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFhdXRvSWNvbkRvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gYXV0b0ljb25Eb20uY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc3R5bGU9J21hcmdpbi1yaWdodDoyMHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnVpLXNlbGVjdC1yZXN1bHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnVpLXNlbGVjdC1yZXN1bHQnKS5zZXRBdHRyaWJ1dGUoJ2lkJywnYmlsaURvd25sb2FkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgYXV0b0ljb25Eb20uYmVmb3JlKGNvbnRyb2wpOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemhtemdouS4jeaYr+inhumikeaIlueVquWJpycpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnZpZCA9ICcnLGF2aWQ9Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF2LWxpbmsnKS5pbm5lclRleHQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmFtcyA9IGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzOlwvXC93d3cuYmlsaWJpbGkuY29tXC92aWRlb1wvKC4rKVw/Lyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcmFtc1sxXS5pbmRleE9mKCdhdicpICE9LTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXZpZCA9IHBhcmFtc1sxXS5yZXBsYWNlKCdhdicsJycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBwYXJhbXNbMV0uc3Vic3RyaW5nKHBhcmFtc1sxXS5sZW5ndGgtMSk9PScvJz9wYXJhbXNbMV0uc3Vic3RyaW5nKDAscGFyYW1zWzFdLmxlbmd0aC0xKTpwYXJhbXNbMV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5b2T5YmN6aG16Z2i5peg5rOV5LiL6L29Jyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWJ2aWQgJiYgIWF2aWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5pyq6I635Y+WYnZpZOaIlmF2aWQnKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9idmlkPSIrYnZpZCsiJmFpZD0iK2F2aWQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVyaSA9IF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXNwID0gSlNPTi5wYXJzZShyZXN1bHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPCAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR5L+h5oGv5o6l5Y+j6L+U5Zue5pWw5o2u6ZSZ6K+vJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+mAiembhmNpZAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUlkID0gX3RoaXMuZ2V0UXVlcnlTdHJpbmcoJ3AnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNpZCA9ICcnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYWdlSWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLnBhZ2VzW3BhZ2VJZC0xXS5jaWQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLmNpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coY2lkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSAnaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvcGxheWVyL3BsYXl1cmw/YXZpZD0nK3Jlc3AuZGF0YS5haWQrJyZjaWQ9JytjaWQrJyZxbj0xMTInOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gX3RoaXMucmVxdWVzdCgnZ2V0JyxsaW5rKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IEpTT04ucGFyc2UocmVzdWx0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEuY29kZSA8IDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR5Zyw5Z2A5o6l5Y+j6L+U5Zue5pWw5o2u6ZSZ6K+vJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZFVybCA9IGRhdGEuZGF0YS5kdXJsWzBdLnVybDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vR01fZG93bmxvYWQoZG93bmxvYWRVcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oZG93bmxvYWRVcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkT3RoZXIoKXsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZEljb24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihkb3dubG9hZEljb24pewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5LiL6L295oyJ6ZKu5bey5a2Y5ZyoJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcXVhbGl0eSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuc3F1aXJ0bGUtcXVhbGl0eS13cmFwJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXF1YWxpdHkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBxdWFsaXR5LmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5zcXVpcnRsZS12aWRlby1xdWFsaXR5LXRleHQnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykuaW5uZXJUZXh0PSfkuIvovb0nOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHF1YWxpdHkuYmVmb3JlKGNvbnRyb2wpOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b0ljb25Eb20gPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWF1dG9JY29uRG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBhdXRvSWNvbkRvbS5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5zdHlsZT0nbWFyZ2luLXJpZ2h0OjIwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1yZXN1bHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktcmVzdWx0Jykuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGF1dG9JY29uRG9tLmJlZm9yZShjb250cm9sKTsKIAogICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCflvZPliY3pobXpnaLkuI3mmK/op4bpopHmiJbnlarliacnKTtyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJ2aWQgPSAnJyxhdmlkPScnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hdi1saW5rJykuaW5uZXJUZXh0OwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZigndmlkZW8nKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dVcmwgPSBsb2NhdGlvbi5ocmVmLnNwbGl0KCc/Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKG5vd1VybCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJhbXMgPSBub3dVcmxbMF0ubWF0Y2goL2h0dHBzOlwvXC93d3cuYmlsaWJpbGkuY29tXC92aWRlb1wvKC4rKS8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYXJhbXNbMV0uaW5kZXhPZignYXYnKSAhPS0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2aWQgPSBwYXJhbXNbMV0ucmVwbGFjZSgnYXYnLCcnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gcGFyYW1zWzFdLnN1YnN0cmluZyhwYXJhbXNbMV0ubGVuZ3RoLTEpPT0nLyc/cGFyYW1zWzFdLnN1YnN0cmluZygwLHBhcmFtc1sxXS5sZW5ndGgtMSk6cGFyYW1zWzFdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+W9k+WJjemhtemdouaXoOazleS4i+i9vScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFidmlkICYmICFhdmlkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+acquiOt+WPlmJ2aWTmiJZhdmlkJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL3ZpZXc/YnZpZD0iK2J2aWQrIiZhaWQ9IithdmlkOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmkgPSBfdGhpcy5yZXF1ZXN0KCdnZXQnLHVybCkudGhlbigocmVzdWx0KT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzdWx0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzcC5jb2RlIDwgMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeS/oeaBr+aOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/pgInpm4ZjaWQKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2VJZCA9IF90aGlzLmdldFF1ZXJ5U3RyaW5nKCdwJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaWQgPSAnJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFnZUlkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IHJlc3AuZGF0YS5wYWdlc1twYWdlSWQtMV0uY2lkOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IHJlc3AuZGF0YS5jaWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNpZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gJ2h0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3BsYXllci9wbGF5dXJsP2F2aWQ9JytyZXNwLmRhdGEuYWlkKycmY2lkPScrY2lkKycmcW49MTEyJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IF90aGlzLnJlcXVlc3QoJ2dldCcsbGluaykudGhlbigocmVzdWx0KT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhLmNvZGUgPCAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeWcsOWdgOaOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRVcmwgPSBkYXRhLmRhdGEuZHVybFswXS51cmw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL0dNX2Rvd25sb2FkKGRvd25sb2FkVXJsKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGRvd25sb2FkVXJsKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwogCiAgICAgICAgICAgIH0KIAogICAgICAgIH0KIAogICAgICAgIHZhciBhbGxXZWIgPSBbLi4uZ2V0Q291cG9uLC4uLmp4VmlkZW8sLi4uanhNdXNpYywuLi56aE5pY2UsLi4udmlkZW9Eb3dubG9hZCwuLi5iYWlkdV07CiAKICAgICAgICB2YXIgbm93V2ViPVtdOwogCiAgICAgICAgYWxsV2ViLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgaWYoaXRlbS5pc09wZW4gPT0gMCkgcmV0dXJuIHRydWU7CiAKICAgICAgICAgICAgaXRlbS53ZWIuZm9yRWFjaChmdW5jdGlvbih2YWwpewogCiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gbG9jYXRpb24uaHJlZi5tYXRjaCh2YWwubWF0Y2gpOwogCiAgICAgICAgICAgICAgICBpZihyZXN1bHQpewogCiAgICAgICAgICAgICAgICAgICAgbm93V2ViLnB1c2godmFsKTsKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KQogCiAgICAgICAgfSkKIAogICAgICAgIGlmKG5vd1dlYi5sZW5ndGg9PTApewogCiAgICAgICAgICAgIGxldCBiYXNlQ2xhc3MgPSBuZXcgQmFzZUNsYXNzKCk7CiAKICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieWMuemFjeivpee9keermeaIluivpeaooeWdl+W3suWFs+mXrScpO3JldHVybjsKICAgICAgICB9CiAKICAgICAgICBub3dXZWIuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICBzd2l0Y2goaXRlbS5mdW5jTmFtZSl7CiAgICAgICAgICAgICAgICBjYXNlICdjb3Vwb24nOgogCiAgICAgICAgICAgICAgICAgICAgY291cG9uRnVuYyhpdGVtKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ3BsYXlWaWRlbyc6CiAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvRnVuYygpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAncGxheU11c2ljJzoKICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNGdW5jKGl0ZW0pOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnemhOaWNlJzoKICAgICAgICAgICAgICAgICAgICB6aE5pY2VGdW5jKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdiYWlkdSc6CiAgICAgICAgICAgICAgICAgICAgdmFyIGJhc2VDbGFzcyA9IG5ldyBCYXNlQ2xhc3M7CiAgICAgICAgICAgICAgICAgICAgYmFpZHVGdW5jKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICd2aWRlb0Rvd25sb2FkJzoKIAogICAgICAgICAgICAgICAgICAgIHZhciB2aWRlb0Rvd25sb2FkQ2xhc3MgPSBuZXcgVmlkZW9Eb3dubG9hZENsYXNzKCk7CiAKICAgICAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0gaXRlbTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaXNXZWJPcGVuID09IDApewogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGl0ZW0ubmFtZSsn5bey5YWz6ZetJyk7cmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb3dubG9hZENsYXNzW25vd05hbWVdKCk7CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgfQogCiAgICAgICAgfSkKIAogICAgICAgIGZ1bmN0aW9uIGNvdXBvbkZ1bmMoaXRlbSl7CiAKICAgICAgICAgICAgdmFyIGNvdXBvbkNsYXNzID0gbmV3IENvdXBvbkNsYXNzKCk7CiAKICAgICAgICAgICAgdmFyIHtmdW5jTmFtZSxtYXRjaDpub3dNYXRjaCxub2RlOm5vd05vZGUsbmFtZTpub3dOYW1lfSA9IGl0ZW07CiAKICAgICAgICAgICAgdmFyIGNvdXBvblN0eWxlID1gCiAgICAgICAgICAgICAgICAgICAgaHRtbHsKICAgICAgICAgICAgICAgICAgICAtLXJpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgICAgLS1sZWZ0OjEwMCU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2NvdXBvbnsKICAgICAgICAgICAgICAgICAgICB3aWR0aDpmaXQtY29udGVudDsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6ZmxleC1zdGFydDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLWJvdHRvbToxNXB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9sZWZ0ewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246cm93OwogICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDpmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogcmFkaWFsLWdyYWRpZW50KGNpcmNsZSBhdCByaWdodCB0b3AsIHRyYW5zcGFyZW50IDhweCwjZmZmIDApIHRvcCBsZWZ0IC92YXIoLS1yaWdodCkgNTElIG5vLXJlcGVhdCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IHJpZ2h0IGJvdHRvbSwgdHJhbnNwYXJlbnQgOHB4LCAjZmZmIDApIGJvdHRvbSBsZWZ0IC92YXIoLS1yaWdodCkgNTElIG5vLXJlcGVhdDsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6IGRyb3Atc2hhZG93KDJweCAycHggM3B4ICM4ODgpOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDo4NHB4OwogICAgICAgICAgICAgICAgICAgIHdpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2ltZ19pY29uewogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6NHB4IDBweCAwcHggNXB4OwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi1yaWdodDo1cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2ltZ19pY29uIGltZ3sKICAgICAgICAgICAgICAgICAgICB3aWR0aDo0N3B4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9jb250ZW50ewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246Y29sdW1uOwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi1yaWdodDogMThweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fbW9uZXl7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjpyb3c7CiAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2Ftb3VudF9tb25leXsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9tb25leV9zaWduewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmMjMwMzA7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAyMHB4OwogICAgICAgICAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBBcmlhbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fbW9uZXlfbnVtewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmMjMwMzA7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjM2cHg7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IDJweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fY29uZGl0aW9uewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmYjBmM2E7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjRlYzsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tdG9wOjVweDsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogNXB4OwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MnB4IDVweDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTJweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fdGltZXsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tdG9wOiAtNXB4OwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MnB4IDRweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fdGVybXsKICAgICAgICAgICAgICAgICAgICBjb2xvcjojZmIwZjNhOwogICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICNmYjBmM2E7CiAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czoycHg7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweCA0cHg7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjEycHg7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxOHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9kYXRlewogICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTRweDsKICAgICAgICAgICAgICAgICAgICBmb250LXdlaWdodDogNTAwOwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmctbGVmdDo4cHg7CiAKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fY2lyY2xlewogICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQ6ICNmYjBmM2EgdXJsKGRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBQWdBQUFBSUNBWUFBQURFRDc2TEFBQUFDWEJJV1hNQUFBc1NBQUFMRWdIUzNYNzhBQUFBelVsRVFWUVlsUzNOTVVvRFFSaUc0WGNtdTlsQVhCUWJxKzFDQ3F1Y3dzYk9PM2dBUzI5aDRRbThnUmRJTUtWZ2xRVkJGaVNGallLQnFXWjJkLzdQSXZZUFBFNlNNQ0h2Y0Q4SHVMekJVc0lLRHlZOEFONFJVK0o5LzhuSDhvTFlKM3dXY2h4QmpKSHRaa04xZnNicDlvbXZoenY2Y2NEalFKTGF0bFhYZFpJazVhd2tLVnpkS2s5VzhnQkZVVkRYTlFBMmpKVEE3R1NPbVIyTHBta0lJV0E1NDZzcHZPNXdMMjlRejNHU0JCQ0hubndJek80ZjBmTWFZb0t5L0FjbThBNitmeGtYMTVBTnFpbVk4UWVtQ205MjByMWFVQUFBQUFCSlJVNUVya0pnZ2c9PSkgcmVwZWF0LXk7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLXRvcDoxMHB4OwogICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxMHB4OwogICAgICAgICAgICAgICAgICAgIGhlaWdodDo2NnB4OwogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICByaWdodDo0NHB4OwogICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MjsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6bm9uZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fbGlua19jb3Vwb257CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjpyb3c7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6Y2VudGVyOwogICAgICAgICAgICAgICAgICAgIGZpbHRlcjogZHJvcC1zaGFkb3coMnB4IDJweCAzcHggIzg4OCk7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogcmFkaWFsLWdyYWRpZW50KGNpcmNsZSBhdCBsZWZ0IHRvcCwgdHJhbnNwYXJlbnQgOHB4LCAjZmIwNTNhIDApIHRvcCByaWdodCAvdmFyKC0tbGVmdCkgNTAlIG5vLXJlcGVhdCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IGxlZnQgYm90dG9tLCB0cmFuc3BhcmVudCA4cHgsICNmYjA1M2EgMCkgYm90dG9tIHJpZ2h0IC92YXIoLS1sZWZ0KSA1MCUgbm8tcmVwZWF0OwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogODRweDsKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9saW5rX3RleHR7CiAgICAgICAgICAgICAgICAgICAgY3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLXRvcDogMTBweDsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogMTJweDsKICAgICAgICAgICAgICAgICAgICB3cml0aW5nLW1vZGU6dmVydGljYWwtbHI7CiAgICAgICAgICAgICAgICAgICAgbGV0dGVyLXNwYWNpbmc6MTBweDsKICAgICAgICAgICAgICAgICAgICBjb2xvcjogI2ZmZiAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNnB4OwogICAgICAgICAgICAgICAgICAgIGZvbnQtZmFtaWx5OiJNaWNyb3NvZnQgWWFIZWkiOwogICAgICAgICAgICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjpub25lOwogICAgICAgICAgICAgICAgICAgIHdpZHRoOjM4cHg7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogcmFkaWFsLWdyYWRpZW50KGNpcmNsZSBhdCBsZWZ0IHRvcCwgdHJhbnNwYXJlbnQgOHB4LCAjZmIwNTNhIDApIHRvcCByaWdodCAvdmFyKC0tbGVmdCkgNTAlIG5vLXJlcGVhdCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IGxlZnQgYm90dG9tLCB0cmFuc3BhcmVudCA4cHgsICNmYjA1M2EgMCkgYm90dG9tIHJpZ2h0IC92YXIoLS1sZWZ0KSA1MCUgbm8tcmVwZWF0OwogCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2xpbmtfdGV4dDpob3ZlcnsKICAgICAgICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjpub25lOwogICAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6ODAwOwogICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6Ik1pY3Jvc29mdCBZYUhlaSI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBgOwogCiAgICAgICAgICAgIGRvbVN0eWxlIC5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShjb3Vwb25TdHlsZSkpOwogCiAgICAgICAgICAgIGRvbUhlYWQuYXBwZW5kQ2hpbGQoZG9tU3R5bGUpOwogCiAgICAgICAgICAgIGxldCBuPTA7CiAKICAgICAgICAgICAgbGV0IGNvdXBvblRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgbisrOwogCiAgICAgICAgICAgICAgICBsZXQgcGFnZU5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpCiAKICAgICAgICAgICAgICAgIGlmKHBhZ2VOb2RlKXsKIAogICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoY291cG9uVGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgY291cG9uQ2xhc3Nbbm93TmFtZV0oKTsKIAogICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICBpZihuPT1jb3Vwb25UaW1lck51bSkgY2xlYXJJbnRlcnZhbChjb3Vwb25UaW1lcik7CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfSwxMDApCiAgICAgICAgICAgIH0KIAogICAgICAgIGZ1bmN0aW9uIHBsYXlWaWRlb0Z1bmMoKXsKIAogICAgICAgICAgICB2YXIgcGxheVZpZGVvQ2xhc3MgPSBuZXcgUGxheVZpZGVvQ2xhc3MoKTsKIAogICAgICAgICAgICAvL2NzcwogICAgICAgICAgICBsZXQgcGxheVZpZGVvU3R5bGUgPSBgCiAgICAgICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZG9lX2ljb257CiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctdG9wOjJweDtjdXJzb3I6cG9pbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OwogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OmJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjpmaXhlZDske2ljb25WaXBQb3NpdGlvbn06MHB4O3RvcDoke2ljb25WaXBUb3B9cHg7dGV4dC1hbGlnbjpjZW50ZXI7b3ZlcmZsb3c6dmlzaWJsZQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fd3JhcHsKICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246Zml4ZWQ7JHtpY29uVmlwUG9zaXRpb259OiR7aWNvblZpcFdpZHRofXB4O3RvcDoke2ljb25WaXBUb3B9cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTsKICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lewogICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDozMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjMxNnB4OwogICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy15OnNjcm9sbDsKICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteDpoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlX2xpbmVfdWx7CiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgICAgICAgIGZsZXgtZmxvdzogcm93IHdyYXA7CiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4OwogCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lX3VsX2xpewogICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjRweCAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjoycHg7CiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjMwJTsKICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6I0ZGRjsKICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MzsKICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzowcHggMHB4IDEwcHggI2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lX3VsX2xpOmhvdmVyewogICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLnpobV9saW5lX3NlbGVjdGVkewogICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fanh7CiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTsKICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO3RvcDowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYDsKIAogICAgICAgICAgICBkb21TdHlsZSAuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUocGxheVZpZGVvU3R5bGUpKTsKIAogICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKIAogICAgICAgICAgICAvL2N1c3RvbSBhZGQgbGluZQogCiAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCd2aWRlb1BsYXlMaW5lQ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F5VmlkZW8iLCBub2RlOiIjcGxheWVyIixub2RlVHlwZTonaWQnLG1hdGNoOi92aXBcLjE5MDUuY29tXC9wbGF5XC8vfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjdm9kUGxheWVyIixub2RlVHlwZTonaWQnLG1hdGNoOi93d3dcLjE5MDUuY29tXC92b2RcL3BsYXlcLy99LAogICAgICAgICAgICBdOwogCiAgICAgICAgICAgIC8v5Yib5bu6bG9nb19pY29uCiAgICAgICAgICAgIHBsYXlWaWRlb0NsYXNzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobUljb24nKTsKIAogICAgICAgICAgICBsZXQgemhtUGxheSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1JY29uJyk7CiAKICAgICAgICAgICAgemhtUGxheS5pbm5lckhUTUwgPSBwbGF5V3JhcEh0bWw7CiAKICAgICAgICAgICAgbGV0IGp4VmlkZW9XZWIgPSBqeFZpZGVvRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwogCiAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgLy/mmK/lkKblnKjmkq3mlL7pobUKICAgICAgICAgICAgaWYoanhWaWRlb1dlYi5sZW5ndGggPT0gMCl7CiAKICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1JY29uJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivt+WcqOinhumikeaSreaUvumhteeCueWHu+WbvuaghycpOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0ganhWaWRlb1dlYlswXTsKIAogICAgICAgICAgICAgICAgLy/pvKDmoIfnu4/ov4fmmL7npLrnur/ot68KICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW92ZXI9KCk9PnsKIAogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheUJ1dHRvbicpLm9ubW91c2VvdXQ9KCk9PnsKIAogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8v6YCJ5oup57q/6Lev6Kej5p6Q5pKt5pS+CiAKICAgICAgICAgICAgICAgIHZhciBwbGF5TGluZVRkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnBsYXlMaW5lVGQnKTsKIAogICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScpOwogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saSB6aG1fbGluZV9zZWxlY3RlZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlWaWRlb0NsYXNzLnNldENvb2tpZSgncGxheUxpbmVBY3Rpb24nLHRoaXMuZ2V0QXR0cmlidXRlKCd1cmwnKSwzMCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd1dlYk5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd1dlYk5vZGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dXZWJOb2RlLmlubmVySFRNTCA9IHBsYXlKeEh0bWw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5SWZyYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlJZnJhbWUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheUlmcmFtZS5zcmM9IGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR572R56uZ57uT54K55LiN5a2Y5ZyoJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIC8qLS3nibnmrorlpITnkIYtLSovCiAgICAgICAgICAgICAgICAvL+S8mOmFt+WOu+W5v+WRigogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNwbGF5ZXIiKXsKIAogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgeW91a3VBZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hZHZlcnRpc2UtbGF5ZXInKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgeWtBZCA9IHlvdWt1QWQubGFzdENoaWxkOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHlrQWQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh5a0FkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3VpLWRhc2hib2FyZC0wJykuc3R5bGU9J2Rpc3BsYXk6ZmxleCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlWaWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1sYXllciB2aWRlbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlWaWRlby5wbGF5KCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKIAogICAgICAgICAgICAgICAgICAgICAgICAvL+aaguWBnAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3VpLXBsYXktaWNvbi0wJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1sYXllciB2aWRlbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihuKyslMiA9PSAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBhdXNlKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8ucGxheSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlWaWRlby5hZGRFdmVudExpc3RlbmVyKCd0aW1ldXBkYXRlJyxmdW5jdGlvbigpeyAvL+aSreaUvuaXtumXtOaUueWPmAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgeW91a3VBZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hZHZlcnRpc2UtbGF5ZXInKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlrQWQgPSB5b3VrdUFkLmxhc3RDaGlsZDsKIAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih5a0FkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlrQWQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh5a0FkKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt1aS1kYXNoYm9hcmQtMCcpLnN0eWxlPSdkaXNwbGF5OmZsZXgnOwogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgIH0sMzAwMCkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8v54ix5aWH6Im65Y675bm/5ZGKCiAgICAgICAgICAgICAgICBpZihub3dOb2RlPT0iI2ZsYXNoYm94Iil7CiAKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5za2lwcGFibGUtYWZ0ZXInKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihkb20pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb20uY2xpY2soKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgLy/ohb7orq/ljrvlvLnnqpcKICAgICAgICAgICAgICAgIGlmKG5vd05vZGU9PSIjcGxheWVyLWNvbnRhaW5lciIpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IG4gPSAwOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihuKysgPCAxMDApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFuZWxUaXBWaXAgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGFuZWwtb3ZlcmxheScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYW5lbFRpcFZpcCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYW5lbFRpcFZpcC5zdHlsZS5kaXNwbGF5PSdub25lJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9LDEwMCkKIAogCiAKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+S5kOinhumAiembhuWkhOeQhgogICAgICAgICAgICAgICAgaWYobm93Tm9kZSA9PSAiI2xlX3BsYXlib3giKXsKIAogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgakJsb2NrID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmpfYmxvY2snKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZighakJsb2NrKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxqQmxvY2subGVuZ3RoO2krKyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0lkID0gakJsb2NrW2ldLmdldEF0dHJpYnV0ZSgnZGF0YS12aWQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSBgaHR0cHM6Ly93d3cubGUuY29tL3B0di92cGxheS8ke3ZpZGVvSWR9Lmh0bWxgOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqQmxvY2tbaV0uZmlyc3RDaGlsZC5zZXRBdHRyaWJ1dGUoJ2hyZWYnLGxpbmspOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSwzMDAwKQogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAvL0Lnq5nlpKfkvJrlkZh1cmzlpITnkIbvvIzpobXpnaJjbGFzc+S4jeS4gOiHtAogICAgICAgICAgICAgICAgaWYobm93Tm9kZSA9PSAiLnBsYXllci1jb250YWluZXIiKXsKIAogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZighZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXllci1jb250YWluZXInKSAmJiAhZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmJweC1wbGF5ZXItY29udGFpbmVyJykpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dOb2RlID0gJy5wbGF5ZXItbWFzayc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd05vZGUgPSAnLmJweC1wbGF5ZXItY29udGFpbmVyJzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSwzMDAwKQogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuaWNvbkxvZ28nKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIHBsYXlWaWRlb0NsYXNzLnJlcXVlc3QoJ2dldCcsYCR7emhtQXBpVXJsfS9qeGNvZGUucGhwP2luPSR7anhDb2RlSW5mby5pbn0mY29kZT0ke2p4Q29kZUluZm8uY29kZX1gKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1gJHt6aG1BcGlVcmx9L2p4angucGhwP2xyc3BtPSR7cmVzdWx0fSZ6aG1fang9JHtsb2NhdGlvbi5ocmVmfWA7CiAKICAgICAgICAgICAgICAgICAgICB9KS5jYXRoKGVycj0+e30pCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAvL+WFqOWxgGNsaWNr55uR5ZCsCiAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAvKueIseWlh+iJuumAiembhuWOu+W5v+WRiiovCiAgICAgICAgICAgICAgICAgICAgaWYobm93TmFtZT09J2lxaXlpUGMnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5jbGFzc05hbWUuaW5kZXhPZignc2VsZWN0LWl0ZW0nKSE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmPWxvY2F0aW9uLmhyZWY7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5za2lwcGFibGUtYWZ0ZXInKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbS5jbGljaygpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9LDUwMDApCiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBsZXQgYXJlYUNsYXNzTmFtZSA9IFtdOwogCiAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNsYXNzTmFtZSA9PSBub3dXZWJbMF0uYXJlYUNsYXNzTmFtZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZWFDbGFzc05hbWU9aXRlbTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9OwogCiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIGlmKGFyZWFDbGFzc05hbWUubGVuZ3RoID09IDApewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5LiN5Zyo6YCJ6ZuG6IyD5Zu0Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBpZihub3dOYW1lPT0ncXFQQycpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNsYXNzTmFtZT09J2VwaXNvZGUtbGlzdC1yZWN0X19pdGVtJyB8fCBpdGVtLmNsYXNzTmFtZS5pbmRleE9mKCdlcGlzb2RlLWl0ZW0nKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1sb2NhdGlvbi5ocmVmOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBpZihub3dOYW1lID09ICdiaWxpUGMnKXsKICAgICAgICAgICAgICAgICAgICAgICAgLy/lnKjlhYPntKDojIPlm7TlhoXvvIzkuI3nlKjot7PovazvvIwKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNsYXNzTmFtZSA9IFsnYnB4LXBsYXllci12aWRlby1hcmVhJ107Ly/ngrnlh7vlhYPntKDojIPlm7TvvIzojIPlm7Tlj5bop4bpopHmkq3lj5HljLrln5/jgILlkI7nu63mnInot7PovazplJnor6/vvIzmlrDlop7ljLrln5/ljbPlj6/jgIIKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWF0Y2hOdW0gPSAwOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNsYXNzTmFtZS5pbmRleE9mKGl0ZW0uY2xhc3NOYW1lKSAhPSAtMSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hOdW0rKzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG1hdGNoTnVtID4gMCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLy/op4bpopHpobXpnaLpgInpm4bot7PovawKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9DbGFzc05hbWUgPSBbJ3ZpZGVvLWVwaXNvZGUtY2FyZCddOy8v6KeG6aKR6aG16Z2i57ut6ZuGZG9tCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlb0NsYXNzTmFtZS5pbmRleE9mKGl0ZW0uY2xhc3NOYW1lKSAhPSAtMSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWYgPSBsb2NhdGlvbi5ocmVmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgdmFyIG9iakxpbmsgPSB7fTsKIAogICAgICAgICAgICAgICAgICAgIGUucGF0aC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaHJlZil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsuaHJlZiA9IGl0ZW0uaHJlZj9pdGVtLmhyZWY6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsudGFyZ2V0ID0gaXRlbS50YXJnZXQ/aXRlbS50YXJnZXQ6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIGlmKG9iakxpbmsuaHJlZiAmJiBvYmpMaW5rLnRhcmdldCAhPSAnX2JsYW5rJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IG9iakxpbmsuaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAvKuiFvuiur+inhumikeeCueWHu+WFtuWug+inhumikei3s+i9rCovCiAgICAgICAgICAgICAgICBpZihub3dOYW1lPT0ncXFQQycpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGZpZ3VyZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5maWd1cmUnKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBmaWd1cmVEZXRhaWwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuZmlndXJlX2RldGFpbCcpOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3RJdGVtID0gWy4uLmZpZ3VyZSwuLi5maWd1cmVEZXRhaWxdOwogCiAgICAgICAgICAgICAgICAgICAgaWYobGlzdEl0ZW0ubGVuZ3RoID4gMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGlzdEl0ZW0uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gdGhpcy5nZXRBdHRyaWJ1dGUoJ2hyZWYnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxpbmspewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWYgPSBsaW5rOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfQogCiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gcGxheU11c2ljRnVuYygpewogCiAgICAgICAgICAgIGlmKHNlbGYuZnJhbWVFbGVtZW50ICYmIHNlbGYuZnJhbWVFbGVtZW50LnRhZ05hbWUgPT0gIklGUkFNRSIpewogCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICB2YXIgcGxheU11c2ljQ2xhc3MgPSBuZXcgUGxheU11c2ljQ2xhc3MoKTsKIAogICAgICAgICAgICBjb25zdCB3ZWJVcmwgPSAnaHR0cDovL211c2ljLmVnZ3ZvZC5jbi8nOwogCiAgICAgICAgICAgIHZhciBtdXNpY0lkID0gTWF0aC5jZWlsKE1hdGgucmFuZG9tKCkqMTAwMDAwMDAwKTsKIAogICAgICAgICAgICB2YXIgbXVzaWNIdG1sID0gIjxkaXYgaHJlZj0namF2YXNjcmlwdDp2b2lkKDApJyBpZD1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gICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyWmhtSWNvbik7IC8vIOWPlua2iOWumuaXtuWZqAogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGp4TXVzaWNXZWJbMF0ubmFtZT09J2t1d28nKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuaWNvbi1iYXJfaWNvbl9kb3dubG9hZF8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uID0gY29udHJvbC5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uLmNsYXNzTmFtZSA9ICcnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbi5zdHlsZT0nbWFyZ2luLWxlZnQ6MTBweDsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbi5pbm5lckhUTUwgPSAiPGEgc3R5bGU9J2ZvbnQtc2l6ZToxMHB4O3doaXRlLXNwYWNlOiBub3dyYXA7Y3Vyc29yOnBvaW50ZXI7Y29sb3I6IzU1NTsnIGlkPSdrdXdvRG93bmxvYWQnPuS4i+i9vTwvYT4iOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2xzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmNvbF9yJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9scy5iZWZvcmUoaWNvbik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcja3V3b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvU3JjID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiYXVkaW8iKS5zcmM7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvbmdOYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmNvbnRyb2wgLnNvbmdfbmFtZScpLnRpdGxlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnRpc3QgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuY29udHJvbCAuYXJ0aXN0JykudGl0bGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQoYXVkaW9TcmMsc29uZ05hbWUrJy0nK2FydGlzdCsnLm1wMycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwyMDAwKQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoanhNdXNpY1dlYlswXS5uYW1lPT0neGltYWxheWEnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5pKt5pS+5Zmo5Yib5bu65LiL6L29aWNvbgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB4bUNvbnRyb2xzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhtLXBsYXllci1vcHJhdGlvbnMnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0geG1Db250cm9scy5xdWVyeVNlbGVjdG9yKCdhOm50aC1vZi10eXBlKDIpJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbiA9IGNvbnRyb2wuY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbi5pbm5lckhUTUwgPSAiPHNwYW4gc3R5bGU9J2ZvbnQtc2l6ZToxMHB4O3doaXRlLXNwYWNlOiBub3dyYXA7Y3Vyc29yOnBvaW50ZXI7Y29sb3I6I0ZGRjsnIGlkPSd4aW1hRG93bmxvYWQnPuS4i+i9vTwvc3Bhbj4iOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeG1Db250cm9scy5zdHlsZT0ncG9zaXRpb246IHJlbGF0aXZlO21hcmdpbi1sZWZ0Oi0yMHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueG0tcGxheWVyLXByb2dyZXNzJykuc3R5bGUud2lkdGg9JzQ1MHB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54bS1wbGF5ZXItcGxheXRpbWUnKS5zdHlsZT0ncG9zaXRpb246IGFic29sdXRlO3JpZ2h0OjQwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhtQ29udHJvbHMucHJlcGVuZChpY29uKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+aSreaUvuWZqOS4i+i9veS6i+S7tgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN4aW1hRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm1UaXRsZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5mbS10aXRsZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmbVRpdGxlTWF0Y2ggPSBmbVRpdGxlLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3d1wueGltYWxheWFcLmNvbVwvc291bmRcLyhcUyopJC8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAnaHR0cHM6Ly9tb2JpbGUueGltYWxheWEuY29tL21vYmlsZS1wbGF5cGFnZS90cmFjay92My9iYXNlSW5mby8nK25ldyBEYXRlKCkuZ2V0VGltZSgpKyc/ZGV2aWNlPXdlYiZ0cmFja0lkPScrZm1UaXRsZU1hdGNoWzFdOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVVybCA9IGRhdGEudHJhY2tJbmZvLnBsYXlVcmxMaXN0WzFdLnVybDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjEgPSBwbGF5VXJsLnJlcGxhY2VBbGwoJy0nLCcrJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdHIyID0gc3RyMS5yZXBsYWNlQWxsKCdfJywnLycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbnVtID0gc3RyMi5sZW5ndGglNDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cjIgKz0gJz09PT0nLnN1YnN0cihudW0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVjcnlwdGVkID0gQ3J5cHRvSlMuQUVTLmRlY3J5cHQoewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lwaGVydGV4dDogQ3J5cHRvSlMuZW5jLkJhc2U2NC5wYXJzZShzdHIyKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBDcnlwdG9KUy5lbmMuSGV4LnBhcnNlKCJhYWFkM2U0ZmQ1NDBiMGY3OWRjYTk1NjA2ZTcyYmY5MyIpLCB7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlOiBDcnlwdG9KUy5tb2RlLkVDQiwKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IENyeXB0b0pTLnBhZC5Qa2NzNwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS50b1N0cmluZyhDcnlwdG9KUy5lbmMuVXRmOCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGRlY3J5cHRlZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRlY3J5cHRlZCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9kb3dubG9hZChkZWNyeXB0ZWQsZGF0YS50cmFja0luZm8udGl0bGUrJy5tcDMnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ino+WvhuWcsOWdgOWksei0pScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/pobXpnaLliJfooajliJvlu7rmibnph4/kuIvovb0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsTWF0Y2ggPSBuZXdVcmwubWF0Y2goL15odHRwczpcL1wvd3d3LnhpbWFsYXlhLmNvbVwvYWxidW1cL1swLTldKy8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodXJsTWF0Y2gpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb3VuZExpc3QgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYW5jaG9yX3NvdW5kX2xpc3QnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzb3VuZExpc3QpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc291bmRMaXN0SGVhZCA9IHNvdW5kTGlzdC5xdWVyeVNlbGVjdG9yKCcuaGVhZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc291bmRMaXN0SGVhZFRpdGxlID0gc291bmRMaXN0SGVhZC5xdWVyeVNlbGVjdG9yKCcuc29ydCcpLmxhc3RDaGlsZDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBbe25hbWU6J+aJuemHj+S4i+i9vScsaWQ6J2JhdGNoRG93bmxvYWQnfSx7bmFtZTon6YeN572uJyxpZDoncmVzZXQnfSx7bmFtZTon5YWo6YCJJyxpZDonc2VsZWN0QWxsJ31dOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IHNvdW5kTGlzdEhlYWRUaXRsZS5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnNldEF0dHJpYnV0ZSgnaWQnLGl0ZW0uaWQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5pbm5lclRleHQgPSBpdGVtLm5hbWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VuZExpc3RIZWFkVGl0bGUuYWZ0ZXIoY29udHJvbCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLmJlZm9yZSgiIHwgIik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy54bWx5Q3JlYXRlQ2hlY2tib3goKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3NlbGVjdEFsbCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNoZWNrYm94ID0gc291bmRMaXN0LnF1ZXJ5U2VsZWN0b3JBbGwoImlucHV0W25hbWU9J3pobUNoZWNrYm94J10iKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUNoZWNrYm94LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWl0ZW0uY2hlY2tlZCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uY2hlY2tlZD10cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3Jlc2V0JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgemhtQ2hlY2tib3ggPSBzb3VuZExpc3QucXVlcnlTZWxlY3RvckFsbCgiaW5wdXRbbmFtZT0nemhtQ2hlY2tib3gnXSIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmNoZWNrZWQgPSBmYWxzZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiYXRjaERvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL0Jhc2VDbGFzcy50b2FzdCgn5bey5LiL6L2977yM6K+356iN5YCZJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgemhtQ2hlY2tib3ggPSBzb3VuZExpc3QucXVlcnlTZWxlY3RvckFsbCgiaW5wdXRbbmFtZT0nemhtQ2hlY2tib3gnXSIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNoZWNrZWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2NyTWF0Y2ggPSBpdGVtLnZhbHVlLm1hdGNoKC9cL3NvdW5kXC8oWzAtOV0rKS8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gJ2h0dHBzOi8vbW9iaWxlLnhpbWFsYXlhLmNvbS9tb2JpbGUtcGxheXBhZ2UvdHJhY2svdjMvYmFzZUluZm8vJytuZXcgRGF0ZSgpLmdldFRpbWUoKSsnP2RldmljZT13ZWImdHJhY2tJZD0nK3Njck1hdGNoWzFdOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy5yZXF1ZXN0KCdnZXQnLHVybCkudGhlbigocmVzdWx0KT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVVybCA9IGRhdGEudHJhY2tJbmZvLnBsYXlVcmxMaXN0WzFdLnVybDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdHIxID0gcGxheVVybC5yZXBsYWNlQWxsKCctJywnKycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjIgPSBzdHIxLnJlcGxhY2VBbGwoJ18nLCcvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbnVtID0gc3RyMi5sZW5ndGglNDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG51bSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyMiArPSAnPT09PScuc3Vic3RyKG51bSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlY3J5cHRlZCA9IENyeXB0b0pTLkFFUy5kZWNyeXB0KHsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaXBoZXJ0ZXh0OiBDcnlwdG9KUy5lbmMuQmFzZTY0LnBhcnNlKHN0cjIpCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBDcnlwdG9KUy5lbmMuSGV4LnBhcnNlKCJhYWFkM2U0ZmQ1NDBiMGY3OWRjYTk1NjA2ZTcyYmY5MyIpLCB7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5FQ0IsCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogQ3J5cHRvSlMucGFkLlBrY3M3CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS50b1N0cmluZyhDcnlwdG9KUy5lbmMuVXRmOCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGRlY3J5cHRlZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkZWNyeXB0ZWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKGRlY3J5cHRlZCxkYXRhLnRyYWNrSW5mby50aXRsZSsnLm1wMycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop6Plr4blnLDlnYDlpLHotKUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mraPluo/lgJLluo/kuovku7YKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291bmRMaXN0SGVhZC5xdWVyeVNlbGVjdG9yKCcuc29ydCcpLmZpcnN0Q2hpbGQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDIwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VuZExpc3RIZWFkVGl0bGUuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDIwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+e/u+mhteS6i+S7tgogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUJhciA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wYWdpbmF0aW9uLXBhZ2UnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZUJhci5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy54bWx5Q3JlYXRlQ2hlY2tib3goKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMjAwMCkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v6Lez6aG15LqL5Lu2CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdidXR0b25bdHlwZT1zdWJtaXRdJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ3VybOWcsOWdgOmUmeivrycpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lhajlsYDngrnlh7vkuovku7YKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvYmpMaW5rID0ge307CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmhyZWYpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLmhyZWYgPSBpdGVtLmhyZWY/aXRlbS5ocmVmOicnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLnRhcmdldCA9IGl0ZW0udGFyZ2V0P2l0ZW0udGFyZ2V0OicnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihvYmpMaW5rLmhyZWYgJiYgb2JqTGluay50YXJnZXQgIT0gJ19ibGFuaycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWYgPSBvYmpMaW5rLmhyZWY7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGp4TXVzaWNXZWJbMF0ubmFtZT09J2t1Z291Jyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhRG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnYScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhRG9tLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YU9iaiA9IGl0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhb2JqJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhT2JqKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YW9iaicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc2V0QXR0cmlidXRlKCd0YXJnZXQnLCdfYmxhbmsnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhkYXRhT2JqKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5pbmRleE9mKCdtaXhzb25nJykhPS0xIHx8IGNvdXBvblVybC5pbmRleE9mKCdzb25nJykgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2b2x1bWVEb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdm9sdW1lJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkRG9tID0gdm9sdW1lRG9tLmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5yZW1vdmVBdHRyaWJ1dGUoJ2lkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20uc3R5bGU9J21hcmdpbi10b3A6MzBweCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20uaW5uZXJIVE1MID0gIjxhIHN0eWxlPSdjb2xvcjojZmZmO2ZvbnQtc2l6ZToxMHB4O3doaXRlLXNwYWNlOm5vd3JhcDtjdXJzb3I6cG9pbnRlcjsnIGlkPSdrdWdvdURvd25sb2FkJyBqYXZhc2NyaXB0OnZvaWQoMCk7PuS4i+i9vTwvYT4iOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvbHVtZURvbS5iZWZvcmUoZG93bmxvYWREb20pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvbHVtZURvbS5zdHlsZT0nbGVmdDo1MHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI21vZGUnKS5zdHlsZT0nbWFyZ2luLWxlZnQ6OTBweDsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwYl9kb3dubG9hZCcpLnN0eWxlPSdtYXJnaW4tbGVmdDoxMzBweDsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwYl9zaGFyZScpLnN0eWxlPSdtYXJnaW4tbGVmdDoxNzBweDsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNsaXN0Jykuc3R5bGU9J3JpZ2h0Oi0yMHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2t1Z291RG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI215QXVkaW8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvU3JjID0gYXVkaW8uZ2V0QXR0cmlidXRlKCdzcmMnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNpbmdlck5hbWUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuc2luZ2VyTmFtZScpLnRpdGxlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc29uZ05hbWUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjc29uZ05hbWVUZW1wJykudGl0bGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKGF1ZGlvU3JjLHNvbmdOYW1lKyctJytzaW5nZXJOYW1lLnN1YnN0cigwLHNpbmdlck5hbWUubGVuZ3RoLTEpKycubXAzJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNvdXBvblVybCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBpZihqeE11c2ljV2ViWzBdLm5hbWU9PSduZXRlYXNlJyAmJiBsb2NhdGlvbi5ocmVmID09ICdodHRwczovL211c2ljLjE2My5jb20vc3QvZG93bmxvYWQnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtSWNvbicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtUGxheS5pbm5lckhUTUwgPSBtdXNpY0h0bWw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy56aG1faWNvbicpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG11c2ljVXJsRGF0YSA9IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC9tdXNpY1wuMTYzXC5jb21cLyNcLyg/OnNvbmd8ZGopXD9pZC99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL3lcLm11c2ljXC4xNjNcLmNvbVwvbVwvKD86c29uZ3xkailcP2lkL30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDovXmh0dHBzPzpcL1wvbXVzaWNcLjE2M1wuY29tXC8oPzpzb25nfGRqKVw/aWQvfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC95XC5xcVwuY29tXC9uXC9yeXFxXC9wbGF5ZXIvfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9rdWdvdVwuY29tL30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDova3V3b1wuY24vfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC93d3dcLnhpbWFsYXlhXC5jb20vfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbXVzaWNVcmwgPSBtdXNpY1VybERhdGEuZmlsdGVyKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG11c2ljVXJsLmxlbmd0aD09MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KGp4TXVzaWNXZWJbMF0udGlwKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKGp4TXVzaWNXZWJbMF0ubmFtZSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25ldGVhc2UnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV0ZWFzZUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3FxJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxRnVuKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAna3Vnb3UnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga3Vnb3VGdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdrdXdvJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt1d29GdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd4aW1hbGF5YSc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4aW1hbGF5YUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gbmV0ZWFzZUZ1bigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmxQYXJhbXMgPSBwbGF5TXVzaWNDbGFzcy5nZXRVcmxQYXJhbXMobG9jYXRpb24uaHJlZik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodXJsUGFyYW1zLmlkID09IHVuZGVmaW5lZCkgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXRlYXNlVXJsRW5jb2RlID0gZW5jb2RlVVJJQ29tcG9uZW50KCdodHRwczovL211c2ljLjE2My5jb20vc29uZz9pZD0nK3VybFBhcmFtcy5pZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz91cmw9JytuZXRlYXNlVXJsRW5jb2RlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKG9wZW5VcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gcXFGdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcXFTb25nTWF0Y2g7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLnBsYXllcl9tdXNpY19faW5mbyIpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheWVyX211c2ljX19pbmZvIikuY2hpbGROb2Rlc1swXS5ocmVmLm1hdGNoKC9zb25nRGV0YWlsXC8oXFMqKVw/Lyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiI3NpbV9zb25nX2luZm8iKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxU29uZ01hdGNoID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiI3NpbV9zb25nX2luZm8iKS5jaGlsZE5vZGVzWzBdLmhyZWYubWF0Y2goL3NvbmdcLyhcUyopLmh0bWwvKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSAnJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFxcVNvbmdNYXRjaFsxXSl7Y29uc29sZS5sb2coJ+ayoeacieiOt+WPluWIsOatjOabsklEJyk7IHJldHVybn07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvTGluayA9IGVuY29kZVVSSUNvbXBvbmVudChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJhdWRpbyIpLnNyYyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz9pZD0nK3FxU29uZ01hdGNoWzFdKycmdHlwZT1xcSZwbGF5VXJsPScrYXVkaW9MaW5rOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKG9wZW5VcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24ga3Vnb3VGdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW9Nb2R1bGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYXVkaW9Nb2R1bGUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdWRpb01vZHVsZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhdWRpb01vZHVsZScpLnN0eWxlPSdib3R0b206MHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNzaG93SGlkZV9wbGF5YmFyJykuY2xhc3NOYW1lID0gJ2ljb24gc2hvdy1wbGF5YmFyLWJ0bic7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0iJywyMDAwKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBrdXdvRnVuKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXlDb250cm9sJykuc3R5bGU9J2JvdHRvbTowcHgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInLDIwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB4aW1hbGF5YUZ1bigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54bS1wbGF5ZXInKS5zdHlsZT0nYm90dG9tOjBweCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29IicsMjAwMCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0saWNvbldhaXRUaW1lKTsKIAogICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobUljb24nKTsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXlEb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtSWNvbicpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoemhtUGxheURvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgemhtUGxheURvbS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobVBsYXlEb20pOwogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemfs+mikee9keWdgOayoeaciea3u+WKoOWMuemFjeaIluWMuemFjemUmeivrycpOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICB9CiAKICAgICAgICBmdW5jdGlvbiB6aE5pY2VGdW5jKCl7CiAKICAgICAgICAgICAgdmFyIHpoQ2xhc3MgPSBuZXcgWmhDbGFzcygpOwogCiAgICAgICAgICAgIHZhciB6aERhdGEgPSBbCiAgICAgICAgICAgICAgICB7ZnVuYzoncmVtb3ZlVmlkZW8nLGlzT3BlbjpHTV9nZXRWYWx1ZSgncmVtb3ZlVmlkZW8nLCcwJyksaXNPbnNjcm9sbDoxLG9ubG9hZDoxfSwKICAgICAgICAgICAgICAgIHtmdW5jOidyZW1vdmVBRCcsaXNPcGVuOkdNX2dldFZhbHVlKCdyZW1vdmVBRCcsJzIyJyksaXNPbnNjcm9sbDowLG9ubG9hZDowfSwKICAgICAgICAgICAgICAgIHtmdW5jOidkb3dubG9hZFZpZGVvJyxpc09wZW46R01fZ2V0VmFsdWUoJ2Rvd25sb2FkVmlkZW8nLCcyMicpLGlzT25zY3JvbGw6MCxvbmxvYWQ6MH0sCiAgICAgICAgICAgICAgICB7ZnVuYzoncmVtb3ZlUmlnaHQnLGlzT3BlbjpHTV9nZXRWYWx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ICAgICAgfQogICAgICAgICAgICB9KQogCiAgICAgICAgICAgIHdpbmRvdy5vbmxvYWQ9ZnVuY3Rpb24oKXsKICAgICAgICAgICAgICAgIHpoRGF0YS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaXNPcGVuPT0yMiAmJiBpdGVtLm9ubG9hZD09MSl7CiAgICAgICAgICAgICAgICAgICAgICAgIHpoQ2xhc3NbaXRlbS5mdW5jXSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2luZG93Lm9uc2Nyb2xsID0gZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgdmFyIHNjcm9sbFRvcCA9IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5zY3JvbGxUb3A7CiAKICAgICAgICAgICAgICAgIGlmKHNjcm9sbFRvcCA+IDIwMCl7CiAKICAgICAgICAgICAgICAgICAgICB6aERhdGEuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5pc09wZW49PTIyICYmIGl0ZW0uaXNPbnNjcm9sbD09MSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpoQ2xhc3NbaXRlbS5mdW5jXSgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgIH0KIAogICAgICAgIH0KIAogICAgICAgIGZ1bmN0aW9uIGJhaWR1RnVuYygpewogICAgICAgIGxldCBwdCA9ICcnLCBzZWxlY3RMaXN0ID0gW10sIHBhcmFtcyA9IHt9LCBtb2RlID0gJycsIHdpZHRoID0gODAwLCBwYW4gPSB7fSwgY29sb3IgPSAnJywKICAgICAgICBkb2MgPSAkKGRvY3VtZW50KSwgcHJvZ3Jlc3MgPSB7fSwgcmVxdWVzdCA9IHt9LCBpbnMgPSB7fSwgaWRtID0ge307CiAgICAgICAgY29uc3QgdmVyc2lvbiA9ICc1LjkuNCc7CiAgICAgICAgY29uc3QgYXV0aG9yID0gJ0dyZWFzeUZvcmsnOwogICAgICAgIGNvbnN0IG5hbWUgPSAn572R55uY55u06ZO+5LiL6L295Yqp5omLJzsKICAgICAgICBjb25zdCBjdXN0b21DbGFzcyA9IHsKICAgICAgICBwb3B1cDogJ3BsLXBvcHVwJywKICAgICAgICBoZWFkZXI6ICdwbC1oZWFkZXInLAogICAgICAgIHRpdGxlOiAncGwtdGl0bGUnLAogICAgICAgIGNsb3NlQnV0dG9uOiAncGwtY2xvc2UnLAogICAgICAgIGNvbnRlbnQ6ICdwbC1jb250ZW50JywKICAgICAgICBpbnB1dDogJ3BsLWlucHV0JywKICAgICAgICBmb290ZXI6ICdwbC1mb290ZXInCiAgICB9OwogCiAgICBjb25zdCB0ZXJtaW5hbFR5cGUgPSB7CiAgICAgICAgd2M6ICJXaW5kb3dzIENNRCIsCiAgICAgICAgd3A6ICJXaW5kb3dzIFBvd2VyU2hlbGwiLAogICAgICAgIGx0OiAiTGludXgg57uI56uvIiwKICAgICAgICBsczogIkxpbnV4IFNoZWxsIiwKICAgICAgICBtdDogIk1hY09TIOe7iOerryIsCiAgICB9OwogCiAgICBsZXQgdG9hc3QgPSBTd2FsLm1peGluKHsKICAgICAgICB0b2FzdDogdHJ1ZSwKICAgICAgICBwb3NpdGlvbjogJ3RvcCcsCiAgICAgICAgc2hvd0NvbmZpcm1CdXR0b246IGZhbHNlLAogICAgICAgIHRpbWVyOiAzNTAwLAogICAgICAgIHRpbWVyUHJvZ3Jlc3NCYXI6IGZhbHNlLAogICAgICAgIGRpZE9wZW46ICh0b2FzdCkgPT4gewogICAgICAgICAgICB0b2FzdC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWVudGVyJywgU3dhbC5zdG9wVGltZXIpOwogICAgICAgICAgICB0b2FzdC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWxlYXZlJywgU3dhbC5yZXN1bWVUaW1lcik7CiAgICAgICAgfQogICAgfSk7CiAKICAgIGNvbnN0IG1lc3NhZ2UgPSB7CiAgICAgICAgc3VjY2VzczogKHRleHQpID0+IHsKICAgICAgICAgICAgdG9hc3QuZmlyZSh7dGl0bGU6IHRleHQsIGljb246ICdzdWNjZXNzJ30pOwogICAgICAgIH0sCiAgICAgICAgZXJyb3I6ICh0ZXh0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmZpcmUoe3RpdGxlOiB0ZXh0LCBpY29uOiAnZXJyb3InfSk7CiAgICAgICAgfSwKICAgICAgICB3YXJuaW5nOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ3dhcm5pbmcnfSk7CiAgICAgICAgfSwKICAgICAgICBpbmZvOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ2luZm8nfSk7CiAgICAgICAgfSwKICAgICAgICBxdWVzdGlvbjogKHRleHQpID0+IHsKICAgICAgICAgICAgdG9hc3QuZmlyZSh7dGl0bGU6IHRleHQsIGljb246ICdxdWVzdGlvbid9KTsKICAgICAgICB9CiAgICB9OwogCiAgICBsZXQgYmFzZSA9IHsKIAogICAgICAgIGdldENvb2tpZShuYW1lKSB7CiAgICAgICAgICAgIGxldCBhcnIgPSBkb2N1bWVudC5jb29raWUucmVwbGFjZSgvXHMvZywgIiIpLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBsID0gYXJyLmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgICAgICAgICAgbGV0IHRlbXBBcnIgPSBhcnJbaV0uc3BsaXQoJz0nKTsKICAgICAgICAgICAgICAgIGlmICh0ZW1wQXJyWzBdID09PSBuYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudCh0ZW1wQXJyWzFdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKIAogICAgICAgIGlzVHlwZShvYmopIHsKICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvYmopLnJlcGxhY2UoL15cW29iamVjdCAoLispXF0kLywgJyQxJykudG9Mb3dlckNhc2UoKTsKICAgICAgICB9LAogCiAgICAgICAgZ2V0VmFsdWUobmFtZSkgewogICAgICAgICAgICByZXR1cm4gR01fZ2V0VmFsdWUobmFtZSk7CiAgICAgICAgfSwKIAogICAgICAgIHNldFZhbHVlKG5hbWUsIHZhbHVlKSB7CiAgICAgICAgICAgIEdNX3NldFZhbHVlKG5hbWUsIHZhbHVlKTsKICAgICAgICB9LAogCiAgICAgICAgZ2V0U3RvcmFnZShrZXkpIHsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGxvY2FsU3RvcmFnZS5nZXRJdGVtKGtleSkpOwogICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbG9jYWxTdG9yYWdlLmdldEl0ZW0oa2V5KTsKICAgICAgICAgICAgfQogICAgICAgIH0sCiAKICAgICAgICBzZXRTdG9yYWdlKGtleSwgdmFsdWUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNUeXBlKHZhbHVlKSA9PT0gJ29iamVjdCcgfHwgdGhpcy5pc1R5cGUodmFsdWUpID09PSAnYXJyYXknKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbG9jYWxTdG9yYWdlLnNldEl0ZW0oa2V5LCBKU09OLnN0cmluZ2lmeSh2YWx1ZSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBsb2NhbFN0b3JhZ2Uuc2V0SXRlbShrZXksIHZhbHVlKTsKICAgICAgICB9LAogCiAgICAgICAgc2V0Q2xpcGJvYXJkKHRleHQpIHsKICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHRleHQsICd0ZXh0Jyk7CiAgICAgICAgfSwKIAogICAgICAgIGUoc3RyKSB7CiAgICAgICAgICAgIHJldHVybiBidG9hKHVuZXNjYXBlKGVuY29kZVVSSUNvbXBvbmVudChzdHIpKSk7CiAgICAgICAgfSwKIAogICAgICAgIGQoc3RyKSB7CiAgICAgICAgICAgIHJldHVybiBkZWNvZGVVUklDb21wb25lbnQoZXNjYXBlKGF0b2Ioc3RyKSkpOwogICAgICAgIH0sCiAKICAgICAgICBnZXRFeHRlbnNpb24obmFtZSkgewogICAgICAgICAgICBjb25zdCByZWcgPSAvKD8hXC4pXHcrJC87CiAgICAgICAgICAgIGlmIChyZWcudGVzdChuYW1lKSkgewogICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gbmFtZS5tYXRjaChyZWcpOwogICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoWzBdLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0sCiAKICAgICAgICBzaXplRm9ybWF0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gK3ZhbHVlKSB7CiAgICAgICAgICAgICAgICBsZXQgdW5pdCA9IFsiQiIsICJLQiIsICJNQiIsICJHQiIsICJUQiIsICJQQiIsICJFQiIsICJaQiIsICJZQiJdOwogICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gTWF0aC5mbG9vcihNYXRoLmxvZyh2YWx1ZSkgLyBNYXRoLmxvZygxMDI0KSk7CiAgICAgICAgICAgICAgICBsZXQgc2l6ZSA9IHZhbHVlIC8gTWF0aC5wb3coMTAyNCwgaW5kZXgpOwogICAgICAgICAgICAgICAgc2l6ZSA9IHNpemUudG9GaXhlZCgxKTsKICAgICAgICAgICAgICAgIHJldHVybiBzaXplICsgdW5pdFtpbmRleF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0sCiAKICAgICAgICBzb3J0QnlOYW1lKGFycikgewogICAgICAgICAgICBjb25zdCBoYW5kbGUgPSAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gKGEsIGIpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBwMSA9IGEuZmlsZW5hbWUgPyBhLmZpbGVuYW1lIDogYS5zZXJ2ZXJfZmlsZW5hbWU7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcDIgPSBiLmZpbGVuYW1lID8gYi5maWxlbmFtZSA6IGIuc2VydmVyX2ZpbGVuYW1lOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBwMS5sb2NhbGVDb21wYXJlKHAyLCAiemgtQ04iKTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGFyci5zb3J0KGhhbmRsZSgpKTsKICAgICAgICB9LAogCiAgICAgICAgYmxvYkRvd25sb2FkKGJsb2IsIGZpbGVuYW1lKSB7CiAgICAgICAgICAgIGlmIChibG9iIGluc3RhbmNlb2YgQmxvYikgewogICAgICAgICAgICAgICAgY29uc3QgdXJsID0gVVJMLmNyZWF0ZU9iamVjdFVSTChibG9iKTsKICAgICAgICAgICAgICAgIGNvbnN0IGEgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7CiAgICAgICAgICAgICAgICBhLmhyZWYgPSB1cmw7CiAgICAgICAgICAgICAgICBhLmRvd25sb2FkID0gZmlsZW5hbWU7CiAgICAgICAgICAgICAgICBhLmNsaWNrKCk7CiAgICAgICAgICAgICAgICBVUkwucmV2b2tlT2JqZWN0VVJMKHVybCk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAogCiAgICAgICAgcG9zdCh1cmwsIGRhdGEsIGhlYWRlcnMsIHR5cGUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNUeXBlKGRhdGEpID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgZGF0YSA9IEpTT04uc3RyaW5naWZ5KGRhdGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBHTV94bWxodHRwUmVxdWVzdCh7CiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAiUE9TVCIsIHVybCwgaGVhZGVycywgZGF0YSwKICAgICAgICAgICAgICAgICAgICByZXNwb25zZVR5cGU6IHR5cGUgfHwgJ2pzb24nLAogICAgICAgICAgICAgICAgICAgIG9ubG9hZDogKHJlcykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICB0eXBlID09PSAnYmxvYicgPyByZXNvbHZlKHJlcykgOiByZXNvbHZlKHJlcy5yZXNwb25zZSB8fCByZXMucmVzcG9uc2VUZXh0KTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9uZXJyb3I6IChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAogCiAgICAgICAgZ2V0KHVybCwgaGVhZGVycywgdHlwZSwgZXh0cmEpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgICAgICAgICAgIGxldCByZXF1ZXN0T2JqID0gR01feG1saHR0cFJlcXVlc3QoewogICAgICAgICAgICAgICAgICAgIG1ldGhvZDogIkdFVCIsIHVybCwgaGVhZGVycywKICAgICAgICAgICAgICAgICAgICByZXNwb25zZVR5cGU6IHR5cGUgfHwgJ2pzb24nLAogICAgICAgICAgICAgICAgICAgIG9ubG9hZDogKHJlcykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzLnN0YXR1cyA9PT0gMjA0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0T2JqLmFib3J0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZG1bZXh0cmEuaW5kZXhdID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZSA9PT0gJ2Jsb2InKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMuc3RhdHVzID09PSAyMDAgJiYgYmFzZS5ibG9iRG93bmxvYWQocmVzLnJlc3BvbnNlLCBleHRyYS5maWxlbmFtZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlcyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlcy5yZXNwb25zZSB8fCByZXMucmVzcG9uc2VUZXh0KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgb25wcm9ncmVzczogKHJlcykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXh0cmEgJiYgZXh0cmEuZmlsZW5hbWUgJiYgZXh0cmEuaW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy50b3RhbCA+IDAgPyBwcm9ncmVzc1tleHRyYS5pbmRleF0gPSAocmVzLmxvYWRlZCAqIDEwMCAvIHJlcy50b3RhbCkudG9GaXhlZCgyKSA6IHByb2dyZXNzW2V4dHJhLmluZGV4XSA9IDAuMDA7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9ubG9hZHN0YXJ0KCkgewogICAgICAgICAgICAgICAgICAgICAgICBleHRyYSAmJiBleHRyYS5maWxlbmFtZSAmJiBleHRyYS5pbmRleCAmJiAocmVxdWVzdFtleHRyYS5pbmRleF0gPSByZXF1ZXN0T2JqKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9uZXJyb3I6IChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAogCiAgICAgICAgZ2V0RmluYWxVcmwodXJsLCBoZWFkZXJzKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcmVxdWVzdE9iaiA9IEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJHRVQiLCB1cmwsIGhlYWRlcnMsCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzLmZpbmFsVXJsKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9uZXJyb3I6IChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAogCiAgICAgICAgYWRkU3R5bGUoaWQsIHRhZywgY3NzKSB7CiAgICAgICAgICAgIHRhZyA9IHRhZyB8fCAnc3R5bGUnOwogICAgICAgICAgICBsZXQgZG9jID0gZG9jdW1lbnQsIHN0eWxlRG9tID0gZG9jLmdldEVsZW1lbnRCeUlkKGlkKTsKICAgICAgICAgICAgaWYgKHN0eWxlRG9tKSByZXR1cm47CiAgICAgICAgICAgIGxldCBzdHlsZSA9IGRvYy5jcmVhdGVFbGVtZW50KHRhZyk7CiAgICAgICAgICAgIHN0eWxlLnJlbCA9ICdzdHlsZXNoZWV0JzsKICAgICAgICAgICAgc3R5bGUuaWQgPSBpZDsKICAgICAgICAgICAgdGFnID09PSAnc3R5bGUnID8gc3R5bGUuaW5uZXJIVE1MID0gY3NzIDogc3R5bGUuaHJlZiA9IGNzczsKICAgICAgICAgICAgZG9jLmdldEVsZW1lbnRzQnlUYWdOYW1lKCdoZWFkJylbMF0uYXBwZW5kQ2hpbGQoc3R5bGUpOwogICAgICAgIH0sCiAKICAgICAgICBmaW5kUmVhY3QoZG9tLCB0cmF2ZXJzZVVwID0gMCkgewogICAgICAgICAgICBjb25zdCBrZXkgPSBPYmplY3Qua2V5cyhkb20pLmZpbmQoa2V5ID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBrZXkuc3RhcnRzV2l0aCgiX19yZWFjdEZpYmVyJCIpCiAgICAgICAgICAgICAgICAgICAgfHwga2V5LnN0YXJ0c1dpdGgoIl9fcmVhY3RJbnRlcm5hbEluc3RhbmNlJCIpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgY29uc3QgZG9tRmliZXIgPSBkb21ba2V5XTsKICAgICAgICAgICAgaWYgKGRvbUZpYmVyID09IG51bGwpIHJldHVybiBudWxsOwogCiAgICAgICAgICAgIGlmIChkb21GaWJlci5fY3VycmVudEVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIGxldCBjb21wRmliZXIgPSBkb21GaWJlci5fY3VycmVudEVsZW1lbnQuX293bmVyOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0cmF2ZXJzZVVwOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBjb21wRmliZXIgPSBjb21wRmliZXIuX2N1cnJlbnRFbGVtZW50Ll9vd25lcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBjb21wRmliZXIuX2luc3RhbmNlOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgY29uc3QgR2V0Q29tcEZpYmVyID0gZmliZXIgPT4gewogICAgICAgICAgICAgICAgbGV0IHBhcmVudEZpYmVyID0gZmliZXIucmV0dXJuOwogICAgICAgICAgICAgICAgd2hpbGUgKHR5cGVvZiBwYXJlbnRGaWJlci50eXBlID09ICJzdHJpbmciKSB7CiAgICAgICAgICAgICAgICAgICAgcGFyZW50RmliZXIgPSBwYXJlbnRGaWJlci5yZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50RmliZXI7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGxldCBjb21wRmliZXIgPSBHZXRDb21wRmliZXIoZG9tRmliZXIpOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRyYXZlcnNlVXA7IGkrKykgewogICAgICAgICAgICAgICAgY29tcEZpYmVyID0gR2V0Q29tcEZpYmVyKGNvbXBGaWJlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGNvbXBGaWJlci5zdGF0ZU5vZGUgfHwgY29tcEZpYmVyOwogICAgICAgIH0sCiAKICAgICAgICBpbml0RGVmYXVsdENvbmZpZygpIHsKICAgICAgICAgICAgbGV0IHZhbHVlID0gW3sKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3JwY19kb21haW4nLAogICAgICAgICAgICAgICAgdmFsdWU6ICdodHRwOi8vbG9jYWxob3N0JwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19ycGNfcG9ydCcsCiAgICAgICAgICAgICAgICB2YWx1ZTogJzE2ODAwJwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19ycGNfcGF0aCcsCiAgICAgICAgICAgICAgICB2YWx1ZTogJy9qc29ucnBjJwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19ycGNfdG9rZW4nLAogICAgICAgICAgICAgICAgdmFsdWU6ICcnCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3JwY19kaXInLAogICAgICAgICAgICAgICAgdmFsdWU6ICdEOicKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfdGVybWluYWxfdHlwZScsCiAgICAgICAgICAgICAgICB2YWx1ZTogJ3djJwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ190aGVtZV9jb2xvcicsCiAgICAgICAgICAgICAgICB2YWx1ZTogJyMwOUFBRkYnCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX2luaXRfY29kZScsCiAgICAgICAgICAgICAgICB2YWx1ZTogJycKICAgICAgICAgICAgfV07CiAKICAgICAgICAgICAgdmFsdWUuZm9yRWFjaCgodikgPT4gewogICAgICAgICAgICAgICAgYmFzZS5nZXRWYWx1ZSh2Lm5hbWUpID09PSB1bmRlZmluZWQgJiYgYmFzZS5zZXRWYWx1ZSh2Lm5hbWUsIHYudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAogCiAgICAgICAgc2hvd1NldHRpbmcoKSB7CiAgICAgICAgICAgIGxldCBkb20gPSAnJywgYnRuID0gJycsCiAgICAgICAgICAgICAgICBjb2xvckxpc3QgPSBbJyMwOUFBRkYnLCAnI2NjMzIzNScsICcjNTI2ZWZhJywgJyM1MThjMTcnLCAnI2VkOTQ0YicsICcjZjk2OWE1JywgJyNiY2EyODAnXTsKICAgICAgICAgICAgZG9tICs9IGA8bGFiZWwgY2xhc3M9InBsLXNldHRpbmctbGFiZWwiPjxkaXYgY2xhc3M9InBsLWxhYmVsIj5SUEPkuLvmnLo8L2Rpdj48aW5wdXQgdHlwZT0idGV4dCIgIHBsYWNlaG9sZGVyPSLkuLvmnLrlnLDlnYDvvIzpnIDluKbkuIpodHRwKHMpOi8vIiBjbGFzcz0icGwtaW5wdXQgbGlzdGVuZXItZG9tYWluIiB2YWx1ZT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pOwogICAgICAgICAgICBkb20gKz0gYDwvc2VsZWN0PjwvbGFiZWw+YDsKICAgICAgICAgICAgZG9tICs9IGA8bGFiZWwgY2xhc3M9InBsLXNldHRpbmctbGFiZWwiPjxkaXYgY2xhc3M9InBsLWxhYmVsIj7kuLvpopjpopzoibI8L2Rpdj4gPGRpdiBjbGFzcz0icGwtY29sb3IiPiR7YnRufTxkaXY+PC9sYWJlbD5gOwogICAgICAgICAgICBkb20gPSAnPGRpdj4nICsgZG9tICsgJzwvZGl2Pic7CiAKICAgICAgICAgICAgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgIHRpdGxlOiAn5Yqp5omL6YWN572uJywKICAgICAgICAgICAgICAgIGh0bWw6IGRvbSwKICAgICAgICAgICAgICAgIGljb246ICdpbmZvJywKICAgICAgICAgICAgICAgIHNob3dDbG9zZUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiBmYWxzZSwKICAgICAgICAgICAgICAgIGZvb3RlcjogcGFuLmZvb3RlciwKICAgICAgICAgICAgfSkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICBtZXNzYWdlLnN1Y2Nlc3MoJ+iuvue9ruaIkOWKn++8gScpOwogICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItY29sb3InLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zZXRWYWx1ZSgnc2V0dGluZ190aGVtZV9jb2xvcicsIGUudGFyZ2V0LmRhdGFzZXQuY29sb3IpOwogICAgICAgICAgICAgICAgbWVzc2FnZS5zdWNjZXNzKCforr7nva7miJDlip/vvIEnKTsKICAgICAgICAgICAgICAgIGhpc3RvcnkuZ28oMCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1kb21haW4nLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zZXRWYWx1ZSgnc2V0dGluZ19ycGNfZG9tYWluJywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdpbnB1dCcsICcubGlzdGVuZXItcG9ydCcsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19wb3J0JywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdpbnB1dCcsICcubGlzdGVuZXItcGF0aCcsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19wYXRoJywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdpbnB1dCcsICcubGlzdGVuZXItdG9rZW4nLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zZXRWYWx1ZSgnc2V0dGluZ19ycGNfdG9rZW4nLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1kaXInLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zZXRWYWx1ZSgnc2V0dGluZ19ycGNfZGlyJywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjaGFuZ2UnLCAnLmxpc3RlbmVyLXRlcm1pbmFsJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfdGVybWluYWxfdHlwZScsIGUudGFyZ2V0LnZhbHVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwKIAogICAgICAgIHJlZ2lzdGVyTWVudUNvbW1hbmQoKSB7CiAgICAgICAgICAgIEdNX3JlZ2lzdGVyTWVudUNvbW1hbmQoJ+Kame+4jyDorr7nva4nLCAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnNob3dTZXR0aW5nKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCiAKICAgICAgICBjcmVhdGVUaXAoKSB7CiAgICAgICAgICAgICQoJ2JvZHknKS5hcHBlbmQoJzxkaXYgY2xhc3M9InBsLXRvb2x0aXAiPjwvZGl2PicpOwogCiAgICAgICAgICAgIGRvYy5vbignbW91c2VlbnRlciBtb3VzZWxlYXZlJywgJy5saXN0ZW5lci10aXAnLCAoZSkgPT4gewogICAgICAgICAgICAgICAgaWYgKGUudHlwZSA9PT0gJ21vdXNlZW50ZXInKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGZpbGVuYW1lID0gZS5jdXJyZW50VGFyZ2V0LmlubmVyVGV4dDsKICAgICAgICAgICAgICAgICAgICBsZXQgc2l6ZSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0LnNpemU7CiAgICAgICAgICAgICAgICAgICAgbGV0IHRpcCA9IGAke2ZpbGVuYW1lfTxzcGFuIHN0eWxlPSJtYXJnaW4tbGVmdDogMTBweDtjb2xvcjogI2Y1NmM2YzsiPiR7c2l6ZX08L3NwYW4+YDsKICAgICAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkuY3NzKHtvcGFjaXR5OiAnMC41J30pOwogICAgICAgICAgICAgICAgICAgICQoJy5wbC10b29sdGlwJykuaHRtbCh0aXApLmNzcyh7CiAgICAgICAgICAgICAgICAgICAgICAgICdsZWZ0JzogZS5wYWdlWCArIDEwICsgJ3B4JywKICAgICAgICAgICAgICAgICAgICAgICAgJ3RvcCc6IGUucGFnZVkgLSBlLmN1cnJlbnRUYXJnZXQub2Zmc2V0VG9wID4gMTQgPyBlLnBhZ2VZICsgJ3B4JyA6IGUucGFnZVkgKyAyMCArICdweCcKICAgICAgICAgICAgICAgICAgICB9KS5zaG93KCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5jc3Moe29wYWNpdHk6ICcxJ30pOwogICAgICAgICAgICAgICAgICAgICQoJy5wbC10b29sdGlwJykuaGlkZSgwKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfSwKIAogICAgICAgIGNyZWF0ZUxvYWRpbmcoKSB7CiAgICAgICAgICAgIHJldHVybiAkKCc8ZGl2IGNsYXNzPSJwbC1sb2FkaW5nIj48ZGl2IGNsYXNzPSJwbC1sb2FkaW5nLWJveCI+PGRpdj48ZGl2PjwvZGl2PjxkaXY+PC9kaXY+PC9kaXY+PC9kaXY+PC9kaXY+Jyk7CiAgICAgICAgfSwKIAogICAgICAgIGNyZWF0ZURvd25sb2FkSWZyYW1lKCkgewogICAgICAgICAgICBsZXQgJGRpdiA9ICQoJzxkaXYgc3R5bGU9InBhZGRpbmc6MDttYXJnaW46MDtkaXNwbGF5OmJsb2NrIj48L2Rpdj4nKTsKICAgICAgICAgICAgbGV0ICRpZnJhbWUgPSAkKCc8aWZyYW1lIHNyYz0iamF2YXNjcmlwdDo7IiBpZD0iZG93bmxvYWRJZnJhbWUiIHN0eWxlPSJkaXNwbGF5Om5vbmUiPjwvaWZyYW1lPicpOwogICAgICAgICAgICAkZGl2LmFwcGVuZCgkaWZyYW1lKTsKICAgICAgICAgICAgJCgnYm9keScpLmFwcGVuZCgkZGl2KTsKICAgICAgICB9LAogCiAgICAgICAgZ2V0TWlycm9yTGlzdChsaW5rLCBtaXJyb3IsIHRocmVhZCA9IDIpIHsKICAgICAgICAgICAgbGV0IGhvc3QgPSBuZXcgVVJMKGxpbmspLmhvc3Q7CiAgICAgICAgICAgIGxldCBtaXJyb3JzID0gW107CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWlycm9yLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHRocmVhZDsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW0gPSBsaW5rLnJlcGxhY2UoaG9zdCwgbWlycm9yW2ldKSArICcmJy5yZXBlYXQoaik7CiAgICAgICAgICAgICAgICAgICAgbWlycm9ycy5wdXNoKGl0ZW0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBtaXJyb3JzLmpvaW4oJ1xuJyk7CiAgICAgICAgfSwKIAogICAgICAgIGFkZFBhbkxpbmtlclN0eWxlKCkgewogICAgICAgICAgICBjb2xvciA9IGJhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfdGhlbWVfY29sb3InKTsKICAgICAgICAgICAgbGV0IGNzcyA9IGAKICAgICAgICAgICAgYm9keTo6LXdlYmtpdC1zY3JvbGxiYXIgeyBkaXNwbGF5OiBub25lIH0KICAgICAgICAgICAgOjotd2Via2l0LXNjcm9sbGJhciB7IHdpZHRoOiA2cHg7IGhlaWdodDogMTBweCB9CiAgICAgICAgICAgIDo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sgeyBib3JkZXItcmFkaXVzOiAwOyBiYWNrZ3JvdW5kOiBub25lIH0KICAgICAgICAgICAgOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7IGJhY2tncm91bmQtY29sb3I6IHJnYmEoODUsODUsODUsLjQpIH0KICAgICAgICAgICAgOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiw6Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1iOmhvdmVyIHsgYm9yZGVyLXJhZGl1czogNXB4OyAtd2Via2l0LWJveC1zaGFkb3c6IGluc2V0IDAgMCA2cHggcmdiYSgwLDAsMCwuMikgfQogICAgICAgICAgICA6Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1iOmhvdmVyIHsgYmFja2dyb3VuZC1jb2xvcjogcmdiYSg4NSw4NSw4NSwuMykgfQogICAgICAgICAgICAuc3dhbDItcG9wdXAgeyBmb250LXNpemU6IDE2cHggIWltcG9ydGFudDsgfQogICAgICAgICAgICAucGwtcG9wdXAgeyBmb250LXNpemU6IDEycHggIWltcG9ydGFudDsgfQogICAgICAgICAgICAucGwtcG9wdXAgYSB7IGNvbG9yOiAke2NvbG9yfSAhaW1wb3J0YW50OyB9CiAgICAgICAgICAgIC5wbC1oZWFkZXIgeyBwYWRkaW5nOiAwIWltcG9ydGFudDthbGlnbi1pdGVtczogZmxleC1zdGFydCFpbXBvcnRhbnQ7IGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZWVlIWltcG9ydGFudDsgbWFyZ2luOiAwIDAgMTBweCFpbXBvcnRhbnQ7IHBhZGRpbmc6IDAgMCA1cHghaW1wb3J0YW50OyB9CiAgICAgICAgICAgIC5wbC10aXRsZSB7IGZvbnQtc2l6ZTogMTZweCFpbXBvcnRhbnQ7IGxpbmUtaGVpZ2h0OiAxIWltcG9ydGFudDt3aGl0ZS1zcGFjZTogbm93cmFwIWltcG9ydGFudDsgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXMhaW1wb3J0YW50O30KICAgICAgICAgICAgLnBsLWNvbnRlbnQgeyBwYWRkaW5nOiAwICFpbXBvcnRhbnQ7IGZvbnQtc2l6ZTogMTJweCFpbXBvcnRhbnQ7IH0KICAgICAgICAgICAgLnBsLW1haW4geyBtYXgtaGVpZ2h0OiA0MDBweDtvdmVyZmxvdy15OnNjcm9sbDsgfQogICAgICAgICAgICAucGwtZm9vdGVyIHtmb250LXNpemU6IDEycHghaW1wb3J0YW50O2p1c3RpZnktY29udGVudDogZmxleC1zdGFydCFpbXBvcnRhbnQ7IG1hcmdpbjogMTBweCAwIDAhaW1wb3J0YW50OyBwYWRkaW5nOiA1cHggMCAwIWltcG9ydGFudDsgY29sb3I6ICNmNTZjNmMhaW1wb3J0YW50OyB9CiAgICAgICAgICAgIC5wbC1pdGVtIHsgZGlzcGxheTogZmxleDs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AgICAucGwtbG9hZGluZy1ib3ggZGl2IHsgYm94LXNpemluZzogY29udGVudC1ib3g7IH0KICAgICAgICAgICAgLnN3YWwyLWNvbnRhaW5lciB7IHotaW5kZXg6MTAwMDAwIWltcG9ydGFudDsgfQogICAgICAgICAgICBib2R5LnN3YWwyLWhlaWdodC1hdXRvIHsgaGVpZ2h0OiBpbmhlcml0IWltcG9ydGFudDsgfQogICAgICAgICAgICBgOwogICAgICAgICAgICB0aGlzLmFkZFN0eWxlKCdwYW5saW5rZXItc3R5bGUnLCAnc3R5bGUnLCBjc3MpOwogICAgICAgIH0sCiAKICAgICAgICBhc3luYyBpbml0RGlhbG9nKCkgewogICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IGF3YWl0IFN3YWwuZmlyZSh7CiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICLor7fmlK/mjIHljp/liJsiLAogICAgICAgICAgICAgICAgICAgIGh0bWw6IGA8ZGl2PjxpbWcgc3R5bGU9IndpZHRoOiAyNTBweDttYXJnaW4tYm90dG9tOiAxMHB4OyIgc3JjPSIke3Bhbi5pbWd9IiBhbHQ9IiR7cGFuLmltZ30iPjxpbnB1dCBjbGFzcz0ic3dhbDItaW5wdXQiIGlkPSJpbml0IiB0eXBlPSJ0ZXh0IiBwbGFjZWhvbGRlcj0i6K+36ZqP5L6/6L6T5YWl5pqX5Y+3Ij48L2Rpdj5gLAogICAgICAgICAgICAgICAgICAgIGFsbG93T3V0c2lkZUNsaWNrOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBzaG93Q2xvc2VCdXR0b246IHRydWUsCiAgICAgICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvblRleHQ6ICfnoLTop6MnCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuaXNEaXNtaXNzZWQgJiYgcmVzdWx0LmRpc21pc3MgPT09ICdjbG9zZScpIHJldHVybjsKICAgICAgICAgICAgICAgIGlmIChwYW4ubnVtID09IHBhbi5udW0pIHsKICAgICAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX2luaXRfY29kZScsIHBhbi5udW0pOwogICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3VjY2Vzcygi5pqX5Y+35q2j56GuIik7CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhpc3RvcnkuZ28oMCk7CiAgICAgICAgICAgICAgICAgICAgfSwgMTUwMCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIGF3YWl0IFN3YWwuZmlyZSh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiLmmpflj7fkuI3mraPnoa4iLAogICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAi5pqX5Y+35LiN5q2j56GuIiwKICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvblRleHQ6ICfph43mlrDovpPlhaUnLAogICAgICAgICAgICAgICAgICAgICAgICBpbWFnZVVybDogcGFuLmltZywKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLmluaXREaWFsb2coKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICB9OwogCiAgICBsZXQgYmFpZHUgPSB7CiAKICAgICAgICBfZ2V0RXh0cmEoKSB7CiAgICAgICAgICAgIGxldCBzZUtleSA9IGRlY29kZVVSSUNvbXBvbmVudChiYXNlLmdldENvb2tpZSgnQkRDTE5EJykpOwogICAgICAgICAgICByZXR1cm4gJ3snICsgJyJzZWtleSI6IicgKyBzZUtleSArICciJyArICJ9IjsKICAgICAgICB9LAogCiAgICAgICAgX2dldFN1cmwoKSB7CiAgICAgICAgICAgIGxldCByZWcgPSAvKD88PXNcL3xzdXJsPSkoW2EtekEtWjAtOV8tXSspL2c7CiAgICAgICAgICAgIGlmIChyZWcudGVzdChsb2NhdGlvbi5ocmVmKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGxvY2F0aW9uLmhyZWYubWF0Y2gocmVnKVswXTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKIAogICAgICAgIF9nZXRGaWRMaXN0KCkgewogICAgICAgICAgICBsZXQgZmlkbGlzdCA9IFtdOwogICAgICAgICAgICBzZWxlY3RMaXN0LmZvckVhY2godiA9PiB7CiAgICAgICAgICAgICAgICBpZiAoK3YuaXNkaXIgPT09IDEpIHJldHVybjsKICAgICAgICAgICAgICAgIGZpZGxpc3QucHVzaCh2LmZzX2lkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiAnWycgKyBmaWRsaXN0ICsgJ10nOwogICAgICAgIH0sCiAKICAgICAgICBfcmVzZXREYXRhKCkgewogICAgICAgICAgICBwcm9ncmVzcyA9IHt9OwogICAgICAgICAgICAkLmVhY2gocmVxdWVzdCwgKGtleSkgPT4gewogICAgICAgICAgICAgICAgKHJlcXVlc3Rba2V5XSkuYWJvcnQoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICQuZWFjaChpbnMsIChrZXkpID0+IHsKICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2tleV0pOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgaWRtID0ge307CiAgICAgICAgICAgIGlucyA9IHt9OwogICAgICAgICAgICByZXF1ZXN0ID0ge307CiAgICAgICAgfSwKIAogICAgICAgIHNldEJEVVNTKCkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgR01fY29va2llICYmIEdNX2Nvb2tpZSgnbGlzdCcsIHtuYW1lOiAnQkRVU1MnfSwgKGNvb2tpZXMsIGVycm9yKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFlcnJvcikgewogICAgICAgICAgICAgICAgICAgICAgICBiYXNlLnNldFN0b3JhZ2UoImJhaWR1eXVuUGx1Z2luX0JEVVNTIiwge0JEVVNTOiBjb29raWVzWzBdLnZhbHVlfSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgfQogICAgICAgIH0sCiAKICAgICAgICBnZXRCRFVTUygpIHsKICAgICAgICAgICAgbGV0IGJhaWR1eXVuUGx1Z2luX0JEVVNTID0gYmFzZS5nZXRTdG9yYWdlKCdiYWlkdXl1blBsdWdpbl9CRFVTUycpID8gYmFzZS5nZXRTdG9yYWdlKCdiYWlkdXl1blBsdWdpbl9CRFVTUycpIDogJ3siYmFpZHV5dW5QbHVnaW5fQkRVU1MiOiIifSc7CiAgICAgICAgICAgIHJldHVybiBiYWlkdXl1blBsdWdpbl9CRFVTUy5CRFVTUyB8fCAnJzsKICAgICAgICB9LAogCiAgICAgICAgY29udmVydExpbmtUb0FyaWEobGluaywgZmlsZW5hbWUsIHVhKSB7CiAgICAgICAgICAgIGxldCBCRFVTUyA9IHRoaXMuZ2V0QkRVU1MoKTsKICAgICAgICAgICAgaWYgKCEhQkRVU1MpIHsKICAgICAgICAgICAgICAgIGZpbGVuYW1lID0gZmlsZW5hbWUucmVwbGFjZSgnICcsICdfJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KGBhcmlhMmMgIiR7bGlua30iIC0tb3V0ICIke2ZpbGVuYW1lfSIgLS1oZWFkZXIgIlVzZXItQWdlbnQ6ICR7dWF9IiAtLWhlYWRlciAiQ29va2llOiBCRFVTUz0ke0JEVVNTfSJgKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbGluazogcGFuLmFzc2lzdGFudCwKICAgICAgICAgICAgICAgIHRleHQ6IHBhbi5pbml0WzVdCiAgICAgICAgICAgIH07CiAgICAgICAgfSwKIAogICAgICAgIGNvbnZlcnRMaW5rVG9CQyhsaW5rLCBmaWxlbmFtZSwgdWEpIHsKICAgICAgICAgICAgbGV0IEJEVVNTID0gdGhpcy5nZXRCRFVTUygpOwogICAgICAgICAgICBpZiAoISFCRFVTUykgewogICAgICAgICAgICAgICAgbGV0IGNvb2tpZSA9IGBCRFVTUz0ke0JEVVNTfWA7CiAgICAgICAgICAgICAgICBsZXQgYmMgPSBgQUEvJHtlbmNvZGVVUklDb21wb25lbnQoZmlsZW5hbWUpfS8/dXJsPSR7ZW5jb2RlVVJJQ29tcG9uZW50KGxpbmspfSZjb29raWU9JHtlbmNvZGVVUklDb21wb25lbnQoY29va2llKX0mdXNlcl9hZ2VudD0ke2VuY29kZVVSSUNvbXBvbmVudCh1YSl9WlpgOwogICAgICAgICAgICAgICAgcmV0dXJuIGVuY29kZVVSSUNvbXBvbmVudChgYmM6Ly9odHRwLyR7YmFzZS5lKGJjKX1gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbGluazogcGFuLmFzc2lzdGFudCwKICAgICAgICAgICAgICAgIHRleHQ6IHBhbi5pbml0WzVdCiAgICAgICAgICAgIH07CiAgICAgICAgfSwKIAogICAgICAgIGNvbnZlcnRMaW5rVG9DdXJsKGxpbmssIGZpbGVuYW1lLCB1YSkgewogICAgICAgICAgICBsZXQgQkRVU1MgPSB0aGlzLmdldEJEVVNTKCk7CiAgICAgICAgICAgIGlmICghIUJEVVNTKSB7CiAgICAgICAgICAgICAgICBsZXQgdGVybWluYWwgPSBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3Rlcm1pbmFsX3R5cGUnKTsKICAgICAgICAgICAgICAgIGZpbGVuYW1lID0gZmlsZW5hbWUucmVwbGFjZSgnICcsICdfJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KGAke3Rlcm1pbmFsICE9PSAnd3AnID8gJ2N1cmwnIDogJ2N1cmwuZXhlJ30gLUwgIiR7bGlua30iIC0tb3V0cHV0ICIke2ZpbGVuYW1lfSIgLUEgIiR7dWF9IiAtYiAiQkRVU1M9JHtCRFVTU30iYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIGxpbms6IHBhbi5hc3Npc3RhbnQsCiAgICAgICAgICAgICAgICB0ZXh0OiBwYW4uaW5pdFs1XQogICAgICAgICAgICB9OwogICAgICAgIH0sCiAKICAgICAgICBhZGRQYWdlTGlzdGVuZXIoKSB7CiAgICAgICAgICAgIGZ1bmN0aW9uIF9mYWN0b3J5KGUpIHsKICAgICAgICAgICAgICAgIGxldCB0YXJnZXQgPSAkKGUudGFyZ2V0KTsKICAgICAgICAgICAgICAgIGxldCBpdGVtID0gdGFyZ2V0LnBhcmVudHMoJy5wbC1pdGVtJyk7CiAgICAgICAgICAgICAgICBsZXQgbGluayA9IGl0ZW0uZmluZCgnLnBsLWl0ZW0tbGluaycpOwogICAgICAgICAgICAgICAgbGV0IHByb2dyZXNzID0gaXRlbS5maW5kKCcucGwtaXRlbS1wcm9ncmVzcycpOwogICAgICAgICAgICAgICAgbGV0IHRpcCA9IGl0ZW0uZmluZCgnLnBsLWl0ZW0tdGlwJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGl0ZW0sIGxpbmssIHByb2dyZXNzLCB0aXAsIHRhcmdldCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBmdW5jdGlvbiBfcmVzZXQoaSkgewogICAgICAgICAgICAgICAgaW5zW2ldICYmIGNsZWFySW50ZXJ2YWwoaW5zW2ldKTsKICAgICAgICAgICAgICAgIHJlcXVlc3RbaV0gJiYgcmVxdWVzdFtpXS5hYm9ydCgpOwogICAgICAgICAgICAgICAgcHJvZ3Jlc3NbaV0gPSAwOwogICAgICAgICAgICAgICAgaWRtW2ldID0gZmFsc2U7CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBkb2Mub24oJ21vdXNlZW50ZXIgbW91c2VsZWF2ZSBjbGljaycsICcucGwtYnV0dG9uLmctZHJvcGRvd24tYnV0dG9uJywgKGUpID0+IHsKICAgICAgICAgICAgICAgIGlmIChlLnR5cGUgPT09ICdtb3VzZWxlYXZlJykgewogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5yZW1vdmVDbGFzcygnYnV0dG9uLW9wZW4nKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgJChlLmN1cnJlbnRUYXJnZXQpLmFkZENsYXNzKCdidXR0b24tb3BlbicpOwogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5maW5kKCcucGwtZHJvcGRvd24tbWVudScpLnNob3coKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignbW91c2VsZWF2ZScsICcucGwtYnV0dG9uLmctZHJvcGRvd24tYnV0dG9uIC5wbC1kcm9wZG93bi1tZW51JywgKGUpID0+IHsKICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5oaWRlKCk7CiAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLnBsLWJ1dHRvbi1tb2RlJywgKGUpID0+IHsKICAgICAgICAgICAgICAgIG1vZGUgPSBlLnRhcmdldC5kYXRhc2V0Lm1vZGU7CiAgICAgICAgICAgICAgICBTd2FsLnNob3dMb2FkaW5nKCk7CiAgICAgICAgICAgICAgICB0aGlzLmdldFBDU0xpbmsoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWxpbmstYXBpJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIGxldCBvID0gX2ZhY3RvcnkoZSk7CiAgICAgICAgICAgICAgICBsZXQgJHdpZHRoID0gby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1pbm5lcicpOwogICAgICAgICAgICAgICAgbGV0ICR0ZXh0ID0gby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1pbm5lci10ZXh0Jyk7CiAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSBvLmxpbmtbMF0uZGF0YXNldC5maWxlbmFtZTsKICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IG8ubGlua1swXS5kYXRhc2V0LmluZGV4OwogICAgICAgICAgICAgICAgX3Jlc2V0KGluZGV4KTsKICAgICAgICAgICAgICAgIGJhc2UuZ2V0KG8ubGlua1swXS5kYXRhc2V0LmxpbmssIHsiVXNlci1BZ2VudCI6IHBhbi51YX0sICdibG9iJywge2ZpbGVuYW1lLCBpbmRleH0pOwogICAgICAgICAgICAgICAgaW5zW2luZGV4XSA9IHNldEludGVydmFsKCgpID0+IHsKICAgICAgICAgICAgICAgICAgICBsZXQgcHJvZyA9ICtwcm9ncmVzc1tpbmRleF0gfHwgMDsKICAgICAgICAgICAgICAgICAgICBsZXQgaXNJRE0gPSBpZG1baW5kZXhdIHx8IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIGlmIChpc0lETSkgewogICAgICAgICAgICAgICAgICAgICAgICBvLnRpcC5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG8ucHJvZ3Jlc3MuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBvLmxpbmsudGV4dCgn5bey5oiQ5Yqf5ZSk6LW3SURN77yM6K+35p+l55yLSURN5LiL6L295qGG77yBJykuYW5pbWF0ZSh7b3BhY2l0eTogJzAuNSd9LCAic2xvdyIpLnNob3coKTsKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnNbaW5kZXhdKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWRtW2luZGV4XSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG8ubGluay5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5zaG93KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICR3aWR0aC5jc3MoJ3dpZHRoJywgcHJvZyArICclJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICR0ZXh0LnRleHQocHJvZyArICclJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9nID09PSAxMDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9ncmVzc1tpbmRleF0gPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1zdG9wJykuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy10aXAnKS5odG1sKCfkuIvovb3lrozmiJDvvIzmraPlnKjlvLnlh7rmtY/op4jlmajkuIvovb3moYbvvIEnKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sIDUwMCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1yZXRyeScsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbyA9IF9mYWN0b3J5KGUpOwogICAgICAgICAgICAgICAgby50aXAuaGlkZSgpOwogICAgICAgICAgICAgICAgby5saW5rLnNob3coKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWhvdycsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbyA9IF9mYWN0b3J5KGUpOwogICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gby5saW5rWzBdLmRhdGFzZXQuaW5kZXg7CiAgICAgICAgICAgICAgICBpZiAocmVxdWVzdFtpbmRleF0pIHsKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0W2luZGV4XS5hYm9ydCgpOwogICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgby50aXAuc2hvdygpOwogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1zdG9wJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGxldCBvID0gX2ZhY3RvcnkoZSk7CiAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSBvLmxpbmtbMF0uZGF0YXNldC5pbmRleDsKICAgICAgICAgICAgICAgIGlmIChyZXF1ZXN0W2luZGV4XSkgewogICAgICAgICAgICAgICAgICAgIHJlcXVlc3RbaW5kZXhdLmFib3J0KCk7CiAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnNbaW5kZXhdKTsKICAgICAgICAgICAgICAgICAgICBvLnRpcC5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgby5saW5rLnNob3coMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1iYWNrJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGxldCBvID0gX2ZhY3RvcnkoZSk7CiAgICAgICAgICAgICAgICBvLnRpcC5oaWRlKCk7CiAgICAgICAgICAgICAgICBvLmxpbmsuc2hvdygpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItbGluay1hcmlhLCAubGlzdGVuZXItY29weS1hbGwnLCAoZSkgPT4gewogICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgaWYgKCFlLnRhcmdldC5kYXRhc2V0LmxpbmspIHsKICAgICAgICAgICAgICAgICAgICAkKGUudGFyZ2V0KS5yZW1vdmVDbGFzcygnbGlzdGVuZXItY29weS1hbGwnKS5hZGRDbGFzcygncGwtYnRuLWRhbmdlcicpLmh0bWwoYCR7cGFuLmluaXRbNV198J+RiTxhIGhyZWY9IiR7cGFuLmFzc2lzdGFudH0iIHRhcmdldD0iX2JsYW5rIiBjbGFzcz0icGwtYSI+54K55Ye75q2k5aSE5a6J6KOFPC9hPvCfkYhgKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYmFzZS5zZXRDbGlwYm9hcmQoZGVjb2RlVVJJQ29tcG9uZW50KGUudGFyZ2V0LmRhdGFzZXQubGluaykpOwogICAgICAgICAgICAgICAgICAgICQoZS50YXJnZXQpLnRleHQoJ+WkjeWItuaIkOWKn++8jOW/q+WOu+eymOi0tOWQp++8gScpLmFuaW1hdGUoe29wYWNpdHk6ICcwLjUnfSwgInNsb3ciKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWxpbmstcnBjJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGxldCB0YXJnZXQgPSAkKGUuY3VycmVudFRhcmdldCk7CiAgICAgICAgICAgICAgICB0YXJnZXQuZmluZCgnLmljb24nKS5yZW1vdmUoKTsKICAgICAgICAgICAgICAgIHRhcmdldC5maW5kKCcucGwtbG9hZGluZycpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgdGFyZ2V0LnByZXBlbmQoYmFzZS5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gICAgICAgICAkKCcubGlzdGVuZXItbGluay1ycGMnKS5jbGljaygpOwogICAgICAgICAgICAgICAgJChlLnRhcmdldCkudGV4dCgn5Y+R6YCB5a6M5oiQ77yM5Y+R6YCB57uT5p6c6KeB5LiK5pa55oyJ6ZKu77yBJykuYW5pbWF0ZSh7b3BhY2l0eTogJzAuNSd9LCAic2xvdyIpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItb3Blbi1zZXR0aW5nJywgKCkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zaG93U2V0dGluZygpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItcnBjLXRhc2snLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcnBjID0gSlNPTi5zdHJpbmdpZnkoewogICAgICAgICAgICAgICAgICAgIGRvbWFpbjogYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ19ycGNfZG9tYWluJyksCiAgICAgICAgICAgICAgICAgICAgcG9ydDogYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ19ycGNfcG9ydCcpLAogICAgICAgICAgICAgICAgfSksIHVybCA9IGAke3Bhbi5kfS8/cnBjPSR7YmFzZS5lKHJwYyl9IyR7YmFzZS5nZXRWYWx1ZSgnc2V0dGluZ19ycGNfdG9rZW4nKX1gOwogICAgICAgICAgICAgICAgR01fb3BlbkluVGFiKHVybCwge2FjdGl2ZTogdHJ1ZX0pOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNldXAnLCAoZSkgPT4gewogICAgICAgICAgICAgICAgaWYgKGUudGFyZ2V0Lm5vZGVOYW1lID09PSAnQScgJiYgfmUudGFyZ2V0LmNsYXNzTmFtZS5pbmRleE9mKCdwbC1hJykpIHsKICAgICAgICAgICAgICAgICAgICBlLnN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RGlhbG9nKCkpOwogICAgICAgIH0sCiAKICAgICAgICBhc3luYyBnZXRQQ1NMaW5rKCkgewogICAgICAgICAgICBzZWxlY3RMaXN0ID0gdGhpcy5nZXRTZWxlY3RlZExpc3QoKTsKICAgICAgICAgICAgbGV0IGZpZExpc3QgPSB0aGlzLl9nZXRGaWRMaXN0KCksIHVybCwgcmVzOwogCiAgICAgICAgICAgIGlmIChwdCA9PT0gJ2hvbWUnIHx8IHB0ID09PSAnbWFpbicpIHsKICAgICAgICAgICAgICAgIGlmIChzZWxlY3RMaXN0Lmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJror7flhYjli77pgInopoHkuIvovb3nmoTmlofku7bvvIEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChmaWRMaXN0Lmxlbmd0aCA9PT0gMikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJror7fmiZPlvIDmlofku7blpLnlkI7li77pgInmlofku7bvvIEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZpZExpc3QgPSBlbmNvZGVVUklDb21wb25lbnQoZmlkTGlzdCk7CiAgICAgICAgICAgICAgICB1cmwgPSBgJHtwYW4ucGNzWzBdfSZmc2lkcz0ke2ZpZExpc3R9YDsKICAgICAgICAgICAgICAgIHJlcyA9IGF3YWl0IGJhc2UuZ2V0KHVybCwgeyJVc2VyLUFnZW50IjogcGFuLnVhfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHB0ID09PSAnc2hhcmUnKSB7CiAgICAgICAgICAgICAgICB0aGlzLmdldFNoYXJlRGF0YSgpOwogICAgICAgICAgICAgICAgaWYgKHNlbGVjdExpc3QubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8muivt+WFiOWLvumAieimgeS4i+i9veeahOaWh+S7tu+8gScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGZpZExpc3QubGVuZ3RoID09PSAyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8muivt+aJk+W8gOaWh+S7tuWkueWQjuWLvumAieaWh+S7tu+8gScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFwYXJhbXMuc2lnbikgewogICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBgJHtwYW4ucGNzWzJdfSZzdXJsPSR7cGFyYW1zLnN1cmx9JmxvZ2lkPSR7cGFyYW1zLmxvZ2lkfWA7CiAgICAgICAgICAgICAgICAgICAgbGV0IHIgPSBhd2FpdCBiYXNlLmdldCh1cmwpOwogICAgICAgICAgICAgICAgICAgIGlmIChyLmVycm5vID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5zaWduID0gci5kYXRhLnNpZ247CiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy50aW1lc3RhbXAgPSByLmRhdGEudGltZXN0YW1wOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkaWFsb2cgPSBhd2FpdCBTd2FsLmZpcmUoewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3Q6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAnaW5mbycsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogYOaPkOekuu+8muivt+WwhuaWh+S7tjxzcGFuIGNsYXNzPSJ0YWctZGFuZ2VyIj5b5L+d5a2Y5Yiw572R55uYXTwvc3Bhbj7wn5GJ5YmN5b6APHNwYW4gY2xhc3M9InRhZy1kYW5nZXIiPlvmiJHnmoTnvZHnm5hdPC9zcGFuPuS4reS4i+i9ve+8gWAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93Q29uZmlybUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpcm1CdXR0b25UZXh0OiAn54K55Ye75L+d5a2YJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiAndG9wJywKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkaWFsb2cuaXNDb25maXJtZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJy50b29scy1zaGFyZS1zYXZlLWhiJylbMF0uY2xpY2soKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFwYXJhbXMuYmRzdG9rZW4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZS5lcnJvcign5o+Q56S677ya6K+35YWI55m75b2V572R55uY77yBJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsZXQgZm9ybURhdGEgPSBuZXcgRm9ybURhdGEoKTsKICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgnZW5jcnlwdCcsIHBhcmFtcy5lbmNyeXB0KTsKICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgncHJvZHVjdCcsIHBhcmFtcy5wcm9kdWN0KTsKICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgndWsnLCBwYXJhbXMudWspOwogICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCdwcmltYXJ5aWQnLCBwYXJhbXMucHJpbWFyeWlkKTsKICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgnZmlkX2xpc3QnLCBmaWRMaXN0KTsKICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgnbG9naWQnLCBwYXJhbXMubG9naWQpOwogICAgICAgICAgICAgICAgcGFyYW1zLnNoYXJlVHlwZSA9PT0gJ3NlY3JldCcgPyBmb3JtRGF0YS5hcHBlbmQoJ2V4dHJhJywgcGFyYW1zLmV4dHJhKSA6ICcnOwogICAgICAgICAgICAgICAgdXJsID0gYCR7cGFuLnBjc1sxXX0mc2lnbj0ke3BhcmFtcy5zaWdufSZ0aW1lc3RhbXA9JHtwYXJhbXMudGltZXN0YW1wfWA7CiAgICAgICAgICAgICAgICByZXMgPSBhd2FpdCBiYXNlLnBvc3QodXJsLCBmb3JtRGF0YSwgeyJVc2VyLUFnZW50IjogcGFuLnVhfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHJlcy5lcnJubyA9PT0gMCkgewogICAgICAgICAgICAgICAgbGV0IGh0bWwgPSB0aGlzLmdlbmVyYXRlRG9tKHJlcy5saXN0KTsKICAgICAgICAgICAgICAgIHRoaXMuc2hvd01haW5EaWFsb2cocGFuW21vZGVdWzBdLCBodG1sLCBwYW5bbW9kZV1bMV0pOwogICAgICAgICAgICB9IGVsc2UgaWYgKHJlcy5lcnJubyA9PT0gMTEyKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZS5lcnJvcign5o+Q56S677ya6aG16Z2i6L+H5pyf77yM6K+35Yi35paw6YeN6K+V77yBJyk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJrojrflj5bkuIvovb3pk77mjqXlpLHotKXvvIHor7fliLfmlrDnvZHpobXlkI7ph43or5XvvIEnKTsKICAgICAgICAgICAgfQogICAgICAgIH0sCiAKICAgICAgICBnZW5lcmF0ZURvbShsaXN0KSB7CiAgICAgICAgICAgIGxldCBjb250ZW50ID0gJzxkaXYgY2xhc3M9InBsLW1haW4iPic7CiAgICAgICAgICAgIGxldCBhbGlua0FsbFRleHQgPSAnJzsKICAgICAgICAgICAgYmFzZS5zb3J0QnlOYW1lKGxpc3QpOwogICAgICAgICAgICBsaXN0LmZvckVhY2goKHYsIGkpID0+IHsKICAgICAgICAgICAgICAgIGlmICh2LmlzZGlyID09PSAxKSByZXR1cm47CiAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSB2LnNlcnZlcl9maWxlbmFtZSB8fCB2LmZpbGVuYW1lOwogICAgICAgICAgICAgICAgbGV0IGV4dCA9IGJhc2UuZ2V0RXh0ZW5zaW9uKGZpbGVuYW1lKTsKICAgICAgICAgICAgICAgIGxldCBzaXplID0gYmFzZS5zaXplRm9ybWF0KHYuc2l6ZSk7CiAgICAgICAgICAgICAgICBsZXQgZGxpbmsgPSB2LmRsaW5rOwogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdhcGknKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSBsaXN0ZW5lci1saW5rLWFwaSIgaHJlZj0iJHtkbGlua30iIGRhdGEtZmlsZW5hbWU9IiR7ZmlsZW5hbWV9IiBkYXRhLWxpbms9IiR7ZGxpbmt9IiBkYXRhLWluZGV4PSIke2l9Ij4ke2RsaW5rfTwvYT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLXRpcCIgc3R5bGU9ImRpc3BsYXk6IG5vbmUiPjxzcGFuPuiLpeayoeacieW8ueWHuklETeS4i+i9veahhu+8jOaJvuWIsElETSA8Yj7pgInpobk8L2I+IC0+IDxiPuaWh+S7tuexu+WeizwvYj4gLT4gPGI+56ys5LiA5Liq5qGGPC9iPiDkuK3mt7vliqDlkI7nvIAgPHNwYW4gY2xhc3M9InBsLWV4dCI+JHtleHR9PC9zcGFuPu+8jDxhIGhyZWY9IiR7cGFuLmlkbX0iIHRhcmdldD0iX2JsYW5rIiBjbGFzcz0icGwtYSI+6K+m6KeB5q2k5aSEPC9hPjwvc3Bhbj4gPHNwYW4gY2xhc3M9InBsLWJhY2sgbGlzdGVuZXItYmFjayI+6L+U5ZuePC9zcGFuPjwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLWl0ZW0tcHJvZ3Jlc3MiIHN0eWxlPSJkaXNwbGF5OiBub25lIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3MiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3Mtb3V0ZXIiPjwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3MtaW5uZXIiIHN0eWxlPSJ3aWR0aDo1JSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLXByb2dyZXNzLWlubmVyLXRleHQiPjAlPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJwbC1wcm9ncmVzcy1zdG9wIGxpc3RlbmVyLXN0b3AiPuWPlua2iOS4i+i9vTwvc3Bhbj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InBsLXByb2dyZXNzLXRpcCI+5pyq5Y+R546wSURN77yM5L2/55So6Ieq5bim5rWP6KeI5Zmo5LiL6L29PC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0icGwtcHJvZ3Jlc3MtaG93IGxpc3RlbmVyLWhvdyI+5aaC5L2V5ZSk6LW3SURN77yfPC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PjwvZGl2PmA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2FyaWEnKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGFsaW5rID0gdGhpcy5jb252ZXJ0TGlua1RvQXJpYShkbGluaywgZmlsZW5hbWUsIHBhbi51YSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYWxpbmspID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiB0YXJnZXQ9Il9ibGFuayIgaHJlZj0iJHthbGluay5saW5rfSIgdGl0bGU9IueCueWHu+WkjeWItmFyaWEyY+mTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGluay5saW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmsudGV4dCl9PC9hPiA8L2Rpdj5gOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgIC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ZGV2aWNlIj48L2VtPjxzcGFuIHN0eWxlPSJtYXJnaW4tbGVmdDogNXB4OyI+5o6o6YCB5YiwIFJQQyDkuIvovb3lmag8L3NwYW4+PC9idXR0b24+PC9kaXY+YDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChtb2RlID09PSAnY3VybCcpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgYWxpbmsgPSB0aGlzLmNvbnZlcnRMaW5rVG9DdXJsKGRsaW5rLCBmaWxlbmFtZSwgcGFuLnVhKTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIChhbGluaykgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgKz0gYDxkaXYgY2xhc3M9InBsLWl0ZW0iPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLWl0ZW0tbmFtZSBsaXN0ZW5lci10aXAiIGRhdGEtc2l6ZT0iJHtzaXplfSI+JHtmaWxlbmFtZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBjbGFzcz0icGwtaXRlbS1saW5rIHBsLWEiIHRhcmdldD0iX2JsYW5rIiBocmVmPSIke2FsaW5rLmxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2Y3VybOmTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGluay5saW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmsudGV4dCl9PC9hPiA8L2Rpdj5gOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFsaW5rQWxsVGV4dCArPSBhbGluayArICdcclxuJzsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSBsaXN0ZW5lci1saW5rLWFyaWEiIGhyZWY9IiR7YWxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2Y3VybOmTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGlua30iPiR7ZGVjb2RlVVJJQ29tcG9uZW50KGFsaW5rKX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdiYycpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgYWxpbmsgPSB0aGlzLmNvbnZlcnRMaW5rVG9CQyhkbGluaywgZmlsZW5hbWUsIHBhbi51YSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYWxpbmspID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiBocmVmPSIke2RlY29kZVVSSUNvbXBvbmVudChhbGluay5saW5rKX0iIHRpdGxlPSLngrnlh7vnlKjmr5TnibnlvZfmmJ/kuIvovb0iIGRhdGEtZmlsZW5hbWU9IiR7ZmlsZW5hbWV9IiBkYXRhLWxpbms9IiR7YWxpbmt9Ij4ke2RlY29kZVVSSUNvbXBvbmVudChhbGluay50ZXh0KX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgYWxpbmtBbGxUZXh0ICs9IGFsaW5rICsgJ1xyXG4nOwogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiBocmVmPSIke2RlY29kZVVSSUNvbXBvbmVudChhbGluayl9IiB0aXRsZT0i54K55Ye755So5q+U54m55b2X5pif5LiL6L29IiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2FsaW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmspfTwvYT4gPC9kaXY+YDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBjb250ZW50ICs9ICc8L2Rpdj4nOwogICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2FyaWEnKQogICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtZXh0cmEiPjxidXR0b24gY2xhc3M9InBsLWJ0bi1wcmltYXJ5IGxpc3RlbmVyLWNvcHktYWxsIiBkYXRhLWxpbms9IiR7YWxpbmtBbGxUZXh0fSI+5aSN5Yi25YWo6YOo6ZO+5o6lPC9idXR0b24+PC9kaXY+YDsKICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdycGMnKSB7CiAgICAgICAgICA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blbi1zZXR0aW5nIiBzdHlsZT0ibWFyZ2luLWxlZnQ6IDEwcHg7Ij7orr7nva7nu4jnq6/nsbvlnovvvIjlvZPliY3kuLrvvJoke3Rlcm1pbmFsVHlwZVtiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3Rlcm1pbmFsX3R5cGUnKV1977yJPC9idXR0b24+PC9kaXY+YDsKICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnQ7CiAgICAgICAgfSwKIAogICAgICAgIGFzeW5jIHNlbmRMaW5rVG9SUEMoZmlsZW5hbWUsIGxpbmspIHsKICAgICAgICAgICAgbGV0IHJwYyA9IHsKICAgICAgICAgICAgICAgIGRvbWFpbjogYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ19ycGNfZG9tYWluJyksCiAgICAgICAgICAgICAgICBwb3J0OiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19wb3J0JyksCiAgICAgICAgICAgICAgICBwYXRoOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19wYXRoJyksCiAgICAgICAgICAgICAgICB0b2tlbjogYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ19ycGNfdG9rZW4nKSwKICAgICAgICAgICAgICAgIGRpcjogYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ19ycGNfZGlyJyksCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGxldCBCRFVTUyA9IHRoaXMuZ2V0QkRVU1MoKTsKICAgICAgICAgICAgaWYgKCFCRFVTUykgcmV0dXJuICdhc3Npc3RhbnQnOwogCiAgICAgICAgICAgIGxldCB1cmwgPSBgJHtycGMuZG9tYWlufToke3JwYy5wb3J0fSR7cnBjLnBhdGh9YDsKICAgICAgICAgICAgbGV0IHJwY0RhdGEgPSB7CiAgICAgICAgICAgICAgICBpZDogbmV3IERhdGUoKS5nZXRUaW1lKCksCiAgICAgICAgICAgICAgICBqc29ucnBjOiAnMi4wJywKICAgICAgICAgICAgICAgIG1ldGhvZDogJ2FyaWEyLmFkZFVyaScsCiAgICAgICAgICAgICAgICBwYXJhbXM6IFtgdG9rZW46JHtycGMudG9rZW59YCwgW2xpbmtdLCB7CiAgICAgICAgICAgICAgICAgICAgZGlyOiBycGMuZGlyLAogICAgICAgICAgICAgICAgICAgIG91dDogZmlsZW5hbWUsCiAgICAgICAgICAgICAgICAgICAgaGVhZGVyOiBbYFVzZXItQWdlbnQ6ICR7cGFuLnVhfWAsIGBDb29raWU6IEJEVVNTPSR7QkRVU1N9YF0KICAgICAgICAgICAgICAgIH1dCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBsZXQgcmVzID0gYXdhaXQgYmFzZS5wb3N0KHVybCwgcnBjRGF0YSwgeyJVc2VyLUFnZW50IjogcGFuLnVhfSwgJycpOwogICAgICAgICAgICAgICAgaWYgKHJlcy5yZXN1bHQpIHJldHVybiAnc3VjY2Vzcyc7CiAgICAgICAgICAgICAgICByZXR1cm4gJ2ZhaWwnOwogICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJ2ZhaWwnOwogICAgICAgICAgICB9CiAgICAgICAgfSwKIAogICAgICAgIGdldFNlbGVjdGVkTGlzdCgpIHsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJldHVybiByZXF1aXJlKCdzeXN0ZW0tY29yZTpjb250ZXh0L2NvbnRleHQuanMnKS5pbnN0YW5jZUZvclN5c3RlbS5saXN0LmdldFNlbGVjdGVkKCk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcud3Atcy1jb3JlLXBhbicpLl9fdnVlX18uc2VsZWN0ZWRMaXN0OwogICAgICAgICAgICB9CiAgICAgICAgfSwKIAogICAgICAgIGdldExvZ2lkKCkgewogICAgICAgICAgICBsZXQgdXQgPSByZXF1aXJlKCJzeXN0ZW0tY29yZTpjb250ZXh0L2NvbnRleHQuanMiKS5pbnN0YW5jZUZvclN5c3RlbS50b29scy5iYXNlU2VydmljZTsKICAgICAgICAgICAgcmV0dXJuIHV0LmJhc2U2NEVuY29kZShiYXNlLmdldENvb2tpZSgiQkFJRFVJRCIpKTsKICAgICAgICB9LAogCiAgICAgICAgZ2V0U2hhcmVEYXRhKCkgewogICAgICAgICAgICBsZXQgcmVzID0gbG9jYWxzLmR1bXAoKTsKICAgICAgICAgICAgcGFyYW1zLnNoYXJlVHlwZSA9ICdzZWNyZXQnOwogICAgICAgICAgICBwYXJhbXMuc2lnbiA9ICcnOwogICAgICAgICAgICBwYXJhbXMudGltZXN0YW1wID0gJyc7CiAgICAgICAgICAgIHBhcmFtcy5iZHN0b2tlbiA9IHJlcy5iZHN0b2tlbi52YWx1ZTsKICAgICAgICAgICAgcGFyYW1zLmNoYW5uZWwgPSAnY2h1bmxlaSc7CiAgICAgICAgICAgIHBhcmFtcy5jbGllbnR0eXBlID0gMDsKICAgICAgICAgICAgcGFyYW1zLndlYiA9IDE7CiAgICAgICAgICAgIHBhcmFtcy5hcHBfaWQgPSAyNTA1Mjg7CiAgICAgICAgICAgIHBhcmFtcy5lbmNyeXB0ID0gMDsKICAgICAgICAgICAgcGFyYW1zLnByb2R1Y3QgPSAnc2hhcmUnOwogICAgICAgICAgICBwYXJhbXMubG9naWQgPSB0aGlzLmdldExvZ2lkKCk7CiAgICAgICAgICAgIHBhcmFtcy5wcmltYXJ5aWQgPSByZXMuc2hhcmVpZC52YWx1ZTsKICAgICAgICAgICAgcGFyYW1zLnVrID0gcmVzLnNoYXJlX3VrLnZhbHVlOwogICAgICAgICAgICBwYXJhbXMuc2hhcmVUeXBlID09PSAnc2VjcmV0JyAmJiAocGFyYW1zLmV4dHJhID0gdGhpcy5fZ2V0RXh0cmEoKSk7CiAgICAgICAgICAgIHBhcmFtcy5zdXJsID0gdGhpcy5fZ2V0U3VybCgpOwogICAgICAgIH0sCiAKICAgICAgICBkZXRlY3RQYWdlKCkgewogICAgICAgICAgICBsZXQgcGF0aCA9IGxvY2F0aW9uLnBhdGhuYW1lOwogICAgICAgICAgICBpZiAoL15cL2Rpc2tcL2hvbWUvLnRlc3QocGF0aCkpIHJldHVybiAnaG9tZSc7CiAgICAgICAgICAgIGlmICgvXlwvZGlza1wvbWFpbi8udGVzdChwYXRoKSkgcmV0dXJuICdtYWluJzsKICAgICAgICAgICAgaWYgKC9eXC8oc3xzaGFyZSlcLy8udGVzdChwYXRoKSkgcmV0dXJuICdzaGFyZSc7CiAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0sCiAKICAgICAgICBzaG93TWFpbkRpYWxvZyh0aXRsZSwgaHRtbCwgZm9vdGVyKSB7CiAgICAgICAgICAgIFN3YWwuZmlyZSh7CiAgICAgICAgICAgICAgICB0aXRsZSwKICAgICAgICAgICAgICAgIGh0bWwsCiAgICAgICAgICAgICAgICBmb290ZXIsCiAgICAgICAgICAgICAgICBhbGxvd091dHNpZGVDbGljazogZmFsc2UsCiAgICAgICAgICAgICAgICBzaG93Q2xvc2VCdXR0b246IHRydWUsCiAgICAgICAgICAgICAgICBzaG93Q29uZmlybUJ1dHRvbjogZmFsc2UsCiAgICAgICAgICAgICAgICBwb3NpdGlvbjogJ3RvcCcsCiAgICAgICAgICAgICAgICB3aWR0aCwKICAgICAgICAgICAgICAgIHBhZGRpbmc6ICcxNXB4IDIwcHggNXB4JywKICAgICAgICAgICAgICAgIGN1c3RvbUNsYXNzLAogICAgICAgICAgICB9KS50aGVuKCgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3Jlc2V0RGF0YSgpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAogCiAgICAgICAgYXN5bmMgaW5pdFBhbkxpbmtlcigpIHsKICAgICAgICAgICAgYmFzZS5pbml0RGVmYXVsdENvbmZpZygpOwogICAgICAgICAgICBiYXNlLmFkZFBhbkxpbmtlclN0eWxlKCk7CiAgICAgICAgICAgIHB0ID0gdGhpcy5kZXRlY3RQYWdlKCk7CiAgICAgICAgICAgIGxldCByZXMgPSBhd2FpdCBiYXNlLnBvc3QKICAgICAgICAgICAgKGBodHRwczovL2FwaS55b3V4aWFvaG91LmNvbS9jb25maWc/dmVyPSR7dmVyc2lvbn0mYT0ke2F1dGhvcn1gLCB7fSwge30sICd0ZXh0Jyk7CiAgICAgICAgICAgIHBhbiA9IEpTT04ucGFyc2UoYmFzZS5kKHJlcykpOwogICAgICAgICAgICBPYmplY3QuZnJlZXplICYmIE9iamVjdC5mcmVlemUocGFuKTsKICAgICAgICAgICAgY29uc29sZS5sb2cocGFuKTsKICAgICAgICAgICAgcGFuLm51bSA9PT0gYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ19pbml0X2NvZGUnKSA/IHRoaXMuYWRkQnV0dG9uKCkgOiB0aGlzLmFkZEluaXRCdXR0b24oKTsKICAgICAgICAgICAgYmFzZS5jcmVhdGVUaXAoKTsKICAgICAgICAgICAgYmFzZS5yZWdpc3Rlck1lbnVDb21tYW5kKCk7CiAgICAgICAgfQogICAgfTsKIAogICAgbGV0IG1haW4gPSB7CiAgICAgICAgaW5pdCgpIHsKICAgICAgICAgICAgaWYgKC8ocGFufHl1bikuYmFpZHUuY29tLy50ZXN0KGxvY2F0aW9uLmhvc3QpKSB7CiAgICAgICAgICAgICAgICBiYWlkdS5pbml0UGFuTGlua2VyKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogCiAgICBtYWluLmluaXQoKTsKICAgIH0KICAgIH0KfSkoKTs=
Add Comment
Please, Sign In to add comment