Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ζ΅·ιθ§ηθ§εεδΊ«οΌε½εεδΊ«ηζ―οΌε°η¨εΊοΏ₯home_rule_v2οΏ₯base64://@ππ¦πΉππππα΄°βΏ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi8J2RgPCdkabwnZC58J2RlvCdkZLwnZGZ8J2RkeG0sOKBvyIsImF1dGhvciI6IuaWreW/tSIsInVybCI6Imhpa2VyOi8vZW1wdHk/Y2xhc3M9ZnlBbGwiLCJ2ZXJzaW9uIjoxNywiY29sX3R5cGUiOiJ0ZXh0X2NlbnRlcl8xIiwiY2xhc3NfbmFtZSI6Ik15UGFyc2VTJue8lui+keaWh+S7tibmm7TmlrAiLCJ0eXBlIjoidG9vbCIsImNsYXNzX3VybCI6IiZlZGl0RmlsZSZVcGRhdGUiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnRoaXMuZCA9IFtdO1xuXG5mdW5jdGlvbiBqeEl0ZW1IZWFkKCkge1xuICAgIGFkZExpc3RlbmVyKCdvblJlZnJlc2gnLCAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgc3dpdGNoIChnZXRWYXIoJ2txanhjcycsICcwJykpIHtcbiAgICAgICAgICAgIGNhc2UgJzAnOlxuICAgICAgICAgICAgICAgIHB1dFZhcigna3FqeGNzJywgMSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICcxJzpcbiAgICAgICAgICAgICAgICBwdXRWYXIoJ2txanhjcycsIDIpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBwdXRWYXIoJ2txanhjcycsIDApO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfSkpO1xuICAgIGlmIChnZXRWYXIoJ2txanhjcycpID09IDIpIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHNwYW4gc3R5bGU9XCJjb2xvcjojRkFDQzJFXCI+6Kej5p6Q5rWL6K+VJyxcbiAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgICAgICB2YXIgdmlwVXJsID0gZ2V0VmFyKCdwbHVnaW5MaW5rJyk7XG4gICAgICAgICAgICAgICAgaWYgKHZpcFVybC5zdWJzdHIoMCwgNCkgPT0gJ2h0dHAnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmUoJ2h0dHBzOi8vZ2l0ZWEuY29tL0FJOTU3L0hpa2VyL3Jhdy9tL3YvUm91dGUuanMnKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZSh2aXBVcmwpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ovpPlhaXmoYbmnKrloatVcmzmiJbogIXml6DmlYhVcmwnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIHZhciBydWxlViA9IGdldFZhcihcInJ1bGVWZXJzaW9uXCIpLFxuICAgICAgICB1cGRUaXBzID0gJ1xcbueCueWHu+KAnOabtOaWsOiEmuacrOS+nei1luKAneabtOaWsOKAmeKAmSc7XG4gICAgdmFyIGp4SXROZXdWID0gZ2V0VmFyKCdqeEl0TmV3VicsICcnKSxcbiAgICAgICAganhJdGVtViA9IGdldFZhcignanhJdGVtVicpO1xuICAgIGlmIChNWV9SVUxFLnZlcnNpb24gPCBydWxlVikge1xuICAgICAgICBqeEl0TmV3ViA9ICflsI/nqIvluo/mnInmlrDniYjmnKw6ICcgKyBydWxlVjtcbiAgICAgICAgdXBkVGlwcyA9ICdcXG7mm7TmlrDlpb3lsI/nqIvluo/lkI7ngrnlh7vmm7TmlrDohJrmnKzkvp3otZbigJnigJknO1xuICAgIH1cbiAgICB2YXIgdmVyc2lvblRpcHMgPSBqeEl0TmV3ViA9PSAnJyA/ICdWZXJzaW9uICcgKyBqeEl0ZW1WIDogJ+KAmOKAmCcgKyBqeEl0TmV3ViArIHVwZFRpcHM7XG5cbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiaWc+PGJpZz48c3BhbiBzdHlsZT1cImNvbG9yOiMwQzAwMDBcIj5NeVBhcnNlUycsXG4gICAgICAgIGRlc2M6IHZlcnNpb25UaXBzLFxuICAgICAgICB1cmw6ICFnZXRWYXIoJ2txanhjcycpID8gJ3RvYXN0Oi8v6L+Z5piv5qCH6aKYJyA6IHNldHVwUGFnZXMoJ+iuvue9ricsIDEpLFxuICAgICAgICAvKiAkKFtcIuWIh+aNouino+aekFwiLCBcIuajgOa1i+ino+aekFwiLCBcIuWIh+aNouearuiCpFwiXSwgMikuc2VsZWN0KCgpID0+ICQoKS5ydWxlKChrKSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KFt7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrXG4gICAgICAgICAgICAgICAgfV0pXG4gICAgICAgICAgICB9LCBpbnB1dCkpLCovXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBuZXdXaW5kb3c6IHRydWUsXG4gICAgICAgICAgICB3aW5kb3dJZDogXCJNeVBhcnNlU1wiLFxuICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcbiAgICB9KTtcbiAgICBzcGxpdExpbmUoJ2xpbmUnLCA1KTtcbn1cblxuZnVuY3Rpb24gcnVsZXNVcGRhdGUoKSB7XG4gICAgcmVxdWlyZShmTGlua3Mua1QgKyAnTXlGaWVsZFVwZGF0ZS50eHQnKTtcbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxzbWFsbD7liLfmlrDmlbDmja4nLFxuICAgICAgICBkZXNjOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPumhtemdouaVsOaNruS4uue8k+WtmOaVsOaNru+8jOS4jeWumuaXtuiHquWKqOabtOaWsO+8jOWPr+aJi+WKqOeCueWHu+abtOaWsCcsXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoVXJsKSA9PiB7XG4gICAgICAgICAgICBsZXQgbm93VGltZSA9IERhdGUubm93KCk7XG4gICAgICAgICAgICBpZiAobm93VGltZSAtIGdldEl0ZW0oJ2lzUmVmcmVzaFRpbWUnLCAnJykgPiA2MDAwMDApIHtcbiAgICAgICAgICAgICAgICByZXF1aXJlKFVybCk7XG4gICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNSZWZyZXNoVGltZScsIG5vd1RpbWUgKyAnJyk7XG4gICAgICAgICAgICAgICAgZ2V0Q2xvdWREYXRhKDApO1xuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VmFyKCdnZXREYXRhU3RhdGUnKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mXtOmalOWwj+S6jjEw5YiG6ZKfJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgZkxpbmtzLmp4SXRVcmwpXG4gICAgfSk7XG4gICAgZC5wdXNoKHtcbiAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcbiAgICB9KTtcbiAgICBkLnB1c2goe1xuICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXG4gICAgfSk7XG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c3Ryb25nPuinhCDliJk8L3N0cm9uZz48YnI+PHNtYWxsPjxzcGFuIHN0eWxlPVwiY29sb3I6Z3JleVwiPueCueWHu+afpeeci+abtOaWsOaXpeW/lycsXG4gICAgICAgIHVybDogZkxpbmtzLmd4cnpcbiAgICB9KTtcbiAgICBsZXQgTXlScyA9IFtdO1xuICAgIGxldCBhbGxScyA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vaG9tZScpKTtcbiAgICBmb3IgKGxldCByID0gMDsgciA8IGFsbFJzLmxlbmd0aDsgcisrKSB7XG4gICAgICAgIGxldCBhUnMgPSBhbGxSc1tyXTtcbiAgICAgICAgaWYgKGFScy5hdXRob3IgPT0gJ+aWreW/tScpIHtcbiAgICAgICAgICAgIE15UnMucHVzaCh7XG4gICAgICAgICAgICAgICAgdGl0bGU6IGFScy50aXRsZSxcbiAgICAgICAgICAgICAgICB2ZXJzaW9uOiBhUnMudmVyc2lvblxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBSdWxlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICBsZXQgbG9jYWxWID0gJ+acquWvvOWFpScsXG4gICAgICAgICAgICBScyA9IFJ1bGVzW2ldO1xuICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IE15UnMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmIChNeVJzW2pdLnRpdGxlID09IFJzLnRpdGxlICsgJ+G0sOKBvycpIHtcbiAgICAgICAgICAgICAgICBsb2NhbFYgPSBNeVJzW2pdLnZlcnNpb247XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgbGV0IHlWID0gbG9jYWxWICE9IFJzLnZlcnNpb24gPyAn4oCY4oCYJyArIFJzLnZlcnNpb24gKyA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iBzdHlsZT1cImNvbG9yOiMyOThBMDhcIj48c21hbGw+JyArIFN0LnRpdGxlICsgJyAtICcgKyBTdC52ZXJzaW9uLFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInLFxuICAgICAgICAgICAgdXJsOiAoJycgKyBTdC51cmwpLnN0YXJ0c1dpdGgoJ3RvYXN0JykgPyBTdC51cmwgOiAkKFN0LnVybCArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChmTGlua3MpID0+IHtcbiAgICAgICAgICAgICAgICB2YXIgYXJyID0gaW5wdXQuc3BsaXQoJyMjJyk7XG4gICAgICAgICAgICAgICAgdmFyIGZyb20gPSBhcnJbMF0sXG4gICAgICAgICAgICAgICAgICAgIG5hbWUgPSBhcnJbMV07XG4gICAgICAgICAgICAgICAgdmFyIFVybCA9IG5hbWUgPT0gdW5kZWZpbmVkID8gZnJvbSA6IGZMaW5rc1tmcm9tXSArIG5hbWU7XG4gICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBmZXRjaENhY2hlKFVybCwgMik7XG4gICAgICAgICAgICAgICAgaWYgKG5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL2NhY2hlLycgKyBuYW1lLCBodG1sKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WvvOWFpeaIkOWKnyc7XG4gICAgICAgICAgICB9LCBmTGlua3MpXG4gICAgICAgIH0pO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gY3pHdWlkZSgpIHtcbiAgICByZXR1cm4gZkxpbmtzLmN6enlcbn1cblxuZnVuY3Rpb24gdG9mTGluayhVcmwpIHtcbiAgICByZXR1cm4gJ2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KFVybCkgKyAnLmpzJztcbn1cblxuZnVuY3Rpb24gZWRpdEZpbGUoKSB7XG4gICAgdmFyIExpc3RzID0gW3tcbiAgICAgICAgdGl0bGU6ICfnlKjmiLfop6PmnpDmlofku7YnLFxuICAgICAgICBsaW5rOiBmTGlua3MucGFyc2VzXG4gICAgfSwge1xuICAgICAgICB0aXRsZTogJ1BhcnNlX0RuLmpzJyxcbiAgICAgICAgbGluazogZkxpbmtzLmNqY2FjaGVcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn572R6aG16ISa5pys5Luj56CBJyxcbiAgICAgICAgbGluazogZkxpbmtzLng1Y2FjaGVcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn6LCD55So6Lev55Sx5Luj56CBJyxcbiAgICAgICAgbGluazogdG9mTGluayhmTGlua3Mucm91dGVVcmwpXG4gICAgfSwge1xuICAgICAgICB0aXRsZTogJ+ino+aekOmhueS4u+S7o+eggScsXG4gICAgICAgIGxpbms6IHRvZkxpbmsoZkxpbmtzLmp4SXRVcmwpXG4gICAgfSwge1xuICAgICAgICB0aXRsZTogJ+e8lui+keino+aekOmhueS7o+eggScsXG4gICAgICAgIGxpbms6IHRvZkxpbmsoZkxpbmtzLl9ialVybClcbiAgICB9XTtcbiAgICBmb3IgKGkgb2YgTGlzdHMpIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBpLnRpdGxlLFxuICAgICAgICAgICAgdXJsOiAnZWRpdEZpbGU6Ly8nICsgaS5saW5rLFxuICAgICAgICAgICAgLy9jb2xfdHlwZTogJ3RleHRfMidcbiAgICAgICAgfSlcbiAgICB9XG4gICAgaWYgKCFnZXRWYXIoJ2VkaXRGaWxlUG9wdXAnKSkge1xuICAgICAgICBjb25maXJtKHtcbiAgICAgICAgICAgIHRpdGxlOiAn5rip6aao5o+Q56S6JyxcbiAgICAgICAgICAgIGNvbnRlbnQ6ICfmraTpobnlip/og73kuI3lu7rorq7lsI/nmb3nlKjmiLfkvb/nlKgnLFxuICAgICAgICAgICAgY29uZmlybTogJ3B1dFZhcihcImVkaXRGaWxlUG9wdXBcIixcIjFcIiknXG4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ICAgICAgIHBhZGRpbmctbGVmdDogNjZweDtcXG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAzMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgbGFiZWwge1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyO1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiA0M3B4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogNjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlsI/moYYqL1xcbiAgICAgICAgLmJhciBsYWJlbCB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogI0QwNkI2QztcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1NTUgNTU1cHggNTU1cHggNTU1O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTNweDtcXG4gICAgICAgICAgICBjb2xvcjogI0Y5RjBEQTtcXG4gICAgICAgICAgICB0b3A6IDA7XFxuICAgICAgICAgICAgbGVmdDogM3B4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrovpPlhaXmoYbmoLflvI8qL1xcbiAgICAgICAgLmJhciBpbnB1dCB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogI0Y5RjBEQTtcXG4gICAgICAgICAgICBib3JkZXI6IDNweCBzb2xpZCAjRDA2QjZDO1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIC5saWViIGJ1dHRvbiB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDI3cHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIC5saWViIGJ1dHRvbntcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogI0QwNkI2QztcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgY29sb3I6ICNGOUYwREE7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIHJpZ2h0OiAwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWktOWDjyovXFxuICAgICAgICAucm91bmRfaWNvbntcXG4gICAgICAgICAgICB3aWR0aDogNDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcXG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLmp4LXVsLCAuY2otdWwge1xcbiAgICAgICAgICAgIHotaW5kZXg6IDk5OTtcXG4gICAgICAgICAgICBwb3NpdGlvbjogZml4ZWQ7XFxuICAgICAgICAgICAgd2lkdGg6IDc3JTtcXG4gICAgICAgICAgIC8vIGxlZnQ6IDEwJTtcXG4gICAgICAgIH1cXG4gICAgICAgIC5qeC11bCwgLmNqLXVsIHtcXG4gICAgICAgICAgICBkaXNwbGF5OiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgLmp4LXVsIHtcXG4gICAgICAgICAgICB0b3A6IDMlO1xcbiAgICAgICAgfVxcbiAgICAgICAgLmNqLXVsIHtcXG4gICAgICAgICAgICB0b3A6IDMwJTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxpIHtcXG4gICAgICAgICAgICBoZWlnaHQ6IDM1cHg7XFxuICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgIzAxYmZkYTtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA2cHg7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogcmdiYSgwLCAwLCAwLCAwLjgpO1xcbiAgICAgICAgICAgIGNvbG9yOiB3aGl0ZTtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogMzVweDtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4O1xcbiAgICAgICAgICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7XFxuICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcXG4gICAgICAgICAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcXG4gICAgICAgIH1cXG4gICAgICAgIGxpIHtcXG4gICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGk6aG92ZXIge1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiByZ2JhKDEzOSwgMTMxLCAxMjAsIDAuOSk7XFxuICAgICAgICB9XFxuICAgICAgICBsaVtjaGVjaz1cXFwidHJ1ZVxcXCJdIHtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiByZ2JhKDEzOSwgMCwgMCwgMC45KTtcXG4gICAgICAgIH1cXG5cXG4gICAgPC9zdHlsZT5cXG48L2hlYWQ+XFxuXFxuPGJvZHk+XFxuICAgIDxkaXYgY2xhc3M9XFxcImZ1bmdcXFwiPlxcbi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mVnaW4nLCdcXFxcXFxuPGg0PuaPkOekuu+8mjxicj7ikaDms6jmhI/mj5Lku7bpgInpobnvvIzmsqHmnInmiYvliqjlr7zlhaXmj5Lku7bnmoTor53kuI3nlKjliqjlroPjgILlpoLorr7nva7kuI3lvZPkvJrlr7zoh7Top4TliJnml6Dms5Xkvb/nlKjvvIw8YnI+6Kej5Yaz5Yqe5rOV77ya5bCP56iL5bqP6aaW6aG154K55Ye75oGi5aSN6buY6K6k5o+S5Lu277ybPGJyPuKRoeWFqOWxgOiuvue9ruWmguaenOmAieaLqeS6humdnum7mOiupOmCo+S5iOWFqOmDqOeahOino+aekOS8muS9v+eUqOi/meS4gOiuvue9ru+8jOS4jeaDs+i/meagt+eahOivneivt+Whq+WFpem7mOiupO+8mzxicj7ikaLnu7/oibLkv53lrZjmjInpkq7ku4Xku4Xkv53lrZjphY3nva7kuI3kvJrlhbPpl63orr7nva7pobXpnaLvvIzphY3nva7lkI7mg7Pkv53lrZjlubblhbPpl63orr7nva7pobXpnaLnmoTor53or7fngrnok53oibLmjInpkq7vvJs8YnI+4pGj6ZiF6K+75a6M5o+Q56S654K55YWz6Zet5Yqg6L295a6M5pW06K6+572u6aG16Z2i77yM5aaC5Ye66Zeu6aKY5peg5rOV6Ieq6KGM6Kej5Yaz54K55Zu+54mH6L+b5YWl6K665Z2b5ZCR5oiR5Y+N6aaI44CCPGJyPjwvaDQ+Jyk7XFxuICAgIH1cXG4gICAgXFxuICAgIHZhciBib3hEYXRhID0gW1xcbiAgICAgICAge1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5aWHIOWlh1xcXCIsXFxuICAgICAgICAgICAgaWQ6IFxcXCJxeVxcXCIsXFxuICAgICAgICAgICAgdmFsdWU6IHNldHRpbmdzLnF5LFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi6YW3IOmFt1xcXCIsXFxuICAgICAgICAgICAgaWQ6IFxcXCJ5a1xcXCIsXFxuICAgICAgICAg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aWQpLnZhbCgpLnNwbGl0KCcsJyk7XFxuICAgICAgICAgICAgYXJyID0gYXJyWzBdID09ICcnID8gW10gOiBhcnI7XFxuICAgICAgICAgICAgJCgnLm15Q2hvaWNlJykudGV4dChhcnIpO1xcbiAgICAgICAgICAgIGlmIChpbnB1dGlkICE9PSAnI2NqJyAmJiAkKCcuY2otdWwnKS5jc3MoJ2Rpc3BsYXknKT09J25vbmUnKSB7XFxuICAgICAgICAgICAgICAgICQoJy5qeC11bCcpLnNsaWRlVG9nZ2xlKDMwMCk7XFxuICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAxOyBpIDwgbGVuOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBqeExpc3QgPSAkKCcuangtdWwgbGk6bm90KC5teUNob2ljZSknKS5lcShpKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcnIuaW5jbHVkZXMoanhMaXN0LnRleHQoKSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqeExpc3QuYXR0cignY2hlY2snLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAganhMaXN0LnVuYmluZCgnY2xpY2snKS5jbGljayhmdW5jdGlvbihlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCh0aGlzKS5hdHRyKCdjaGVjaycpICE9PSBcXFwidHJ1ZVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hdHRyKCdjaGVjaycsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci51bnNoaWZ0KCQodGhpcykudGV4dCgpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJChpbnB1dGlkKS52YWwoYXJyKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCgnLm15Q2hvaWNlJykudGV4dChhcnIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuYXR0cignY2hlY2snLCAnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgYSA9IDA7IGEgPCBhcnIubGVuZ3RoOyBhKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcnJbYV0gPT0gJCh0aGlzKS50ZXh0KCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKGEsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoaW5wdXRpZCkudmFsKGFycik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCgnLm15Q2hvaWNlJykudGV4dChhcnIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gZWxzZSBpZigkKCcuangtdWwnKS5jc3MoJ2Rpc3BsYXknKT09J25vbmUnKXtcXG4gICAgICAgICAgICAgICAgJCgnLmNqLXVsJykuc2xpZGVUb2dnbGUoMjAwKTtcXG4gICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW4yOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBjakxpc3QgPSAkKCcuY2otdWwgbGknKS5lcShpKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgkKGlucHV0aWQpLnZhbCgpID09IGNqTGlzdC50ZXh0KCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjakxpc3QuYXR0cignY2hlY2snLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgY2pMaXN0LnVuYmluZCgnY2xpY2snKS5jbGljayhmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaSAhPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKGlucHV0aWQpLnZhbCgkKHRoaXMpLnRleHQoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuYXR0cignY2hlY2snLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnNpYmxpbmdzKCkuYXR0cignY2hlY2snLCAnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICAkKGRvY3VtZW50KS5ub3QoJCgnLnhsTGlzdCcpKS5jbGljayhmdW5jdGlvbihlKSB7XFxuICAgICAgICAgICAgJCgnLmp4LXVsJykuc2xpZGVVcCgpO1xcbiAgICAgICAgICAgICQoJy5jai11bCcpLnNsaWRlVXAoKTtcXG4gICAgICAgICAgICAkKCcubGllYiBidXR0b24nKS50ZXh0KCfimLAnKTtcXG4gICAgICAgICAgICAkKCcubGllYiBidXR0b24nKS5jc3MoJ2JhY2tncm91bmQnLCAnJyk7XFxuICAgICAgICB9KTtcXG4gICAgICAgICQoZnVuY3Rpb24oKXtcXG4gICAgICAgICAgICAkKCdsYWJlbCcpLm1vdXNldXAoZnVuY3Rpb24oKXtcXG4gICAgICAgICAgICAgICAgbGV0IGlucHV0aWQgPSAnIycgKyAkKHRoaXMpLm5leHQoKS5hdHRyKCdpZCcpO1xcbiAgICAgICAgICAgICAgICBvbmVPckRibChpbnB1dGlkKTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB2YXIgY291bnQgPSAwO1xcbiAgICAgICAgICAgIHZhciB0aW1lcjtcXG4gICAgICAgICAgICBmdW5jdGlvbiBvbmVPckRibChpbnB1dGlkKXtcXG4gICAgICAgICAgICAgICAgY291bnQrKztcXG4gICAgICAgICAgICAgICAgdGltZXIgPSB3aW5kb3cuc2V0VGltZW91dChmdW5jdGlvbigpe1xcbiAgICAgICAgICAgICAgICAgICAgaWYoY291bnQgPT0gMSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9ICQoaW5wdXRpZCkudmFsKCkuc3BsaXQoJywnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKDAsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICQoaW5wdXRpZCkudmFsKGFycik7XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAkKGlucHV0aWQpLnZhbCgnJyk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2xlYXJUaW1lb3V0KHRpbWVyKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ID0gMDtcXG4gICAgICAgICAgICAgICAgfSwyNjApXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgfSk7XFxuICAgIFxcbiAgICBmdW5jdGlvbiBUb2FzdChtc2csZHVyYXRpb24peyAgXFxuICAgICAgICBkdXJhdGlvbj1pc05hTihkdXJhdGlvbik/MjAwMDpkdXJhdGlvbjsgIFxcbiAgICAgICAgdmFyIG0gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsgIFxcbiAgICAgICAgbS5pbm5lckhUTUwgPSBtc2c7ICBcXG4gICAgICAgIG0uc3R5bGUuY3NzVGV4d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luZy5mcm9tQ2hhckNvZGUocyArIGspO1xcbiAgICB9LFxcbiAgICAvL+WHr+aSklxcbiAgICBjYWVzYXJDaXBoZXI6IGZ1bmN0aW9uKHN0cmluZ1ZhbHVlLCBrKSB7XFxuICAgICAgICB2YXIgbmV3U3RyaW5nID0gXFxcIlxcXCI7XFxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZ1ZhbHVlLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgbmV3U3RyaW5nICs9IHRoaXMubmV4dENoYXJhY3RlcihzdHJpbmdWYWx1ZVtpXS5jaGFyQ29kZUF0KCksIGspO1xcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIG5ld1N0cmluZztcXG4gICAgfSxcXG4gICAgaGFuZGxlVXJsOiBmdW5jdGlvbih1cmwsIHZpcFVybCwgbmFtZSkge1xcbiAgICAgICAgaWYodXJsID09IFxcXCJcXFwiIHx8IHVybCA9PSB2aXBVcmwpIHtcXG4gICAgICAgICAgICBsb2cobmFtZSArIFxcXCLop6PmnpDlpLHotKVcXFwiKTtcXG4gICAgICAgICAgICByZXR1cm4gdmlwVXJsO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKHVybFswXSA9PSAnLycpIHtcXG4gICAgICAgICAgICB1cmwgPSAnaHR0cHM6JyArIHVybDtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh1cmwuaW5kZXhPZignPWh0dHAnKSAhPSAtMSkge1xcbiAgICAgICAgICAgIHVybCA9IHVybC5pbmRleE9mKCcmdXJsPScpID4gLTEgPyB1cmwgOiAnaHR0cCcgKyBkZWNvZGVVUklDb21wb25lbnQodXJsLnNwbGl0KCc9aHR0cCcpWzFdKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh2aXBVcmwuaW5kZXhPZignbWd0di5jb20nKSAhPSAtMSAmJiB1cmwuaW5kZXhPZignVXNlci1BZ2VudCcpID09IC0xKSB7XFxuICAgICAgICAgICAgdXJsID0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krKykge1xcbiAgICAgICAgICAgICAgICBsZXQgaXNVcmwgPSBVcmxzW2ldO1xcbiAgICAgICAgICAgICAgICBpZiAoUmVnMS50ZXN0KGlzVXJsKSAmJiAhUmVnMi50ZXN0KGlzVXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLmhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXNVcmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH0sXFxuICAgIG1hb3NzOiBmdW5jdGlvbihqeHVybCwgcmVmLCBrZXkpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgdmFyIGdldFZpZGVvSW5mbyA9IGZ1bmN0aW9uKHRleHQpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRvb2xzLkFFUyh0ZXh0LCBrZXksIGl2KTtcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIGtleSA9IGtleSA9PSB1bmRlZmluZWQgPyAnZHZ5WVJRbG5QUkNNZFFTZScgOiBrZXk7XFxuICAgICAgICAgICAgaWYgKHJlZikge1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3Qoanh1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHJlZlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3Qoanh1cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoaHRtbC5pbmRleE9mKCcmYnR3YWY9JykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IHJlcXVlc3Qoanh1cmwgKyAnJmJ0d2FmJyArIGh0bWwubWF0Y2goLyZidHdhZiguKj8pXFxcIi8pWzFdLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiByZWZcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGl2ID0gaHRtbC5zcGxpdCgnX3Rva2VuID0gXFxcIicpWzFdLnNwbGl0KCdcXFwiJylbMF07XFxuICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC92YXIgY29uZmlnID0ge1tcXFxcc1xcXFxTXSo/fS8pWzBdICsgJycpO1xcbiAgICAgICAgICAgIGlmIChjb25maWcudXJsLnNsaWNlKDAsIDQpICE9ICdodHRwJykge1xcbiAgICAgICAgICAgICAgICBjb25maWcudXJsID0gZGVjb2RlVVJJQ29tcG9uZW50KHRvb2xzLkFFUyhjb25maWcudXJsLCBrZXksIGl2KSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBjb25maWcudXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgTExROiBmdW5jdGlvbihqeHVybCkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgYXBpID0ganh1cmwuc3BsaXQoJz91cmw9JylbMF0gKyBcXFwiYXBpLnBocFxcXCI7XFxuICAgICAgICAgICAgdmFyIGI2NGlkID0gYmFzZTY0RW5jb2RlKGp4dXJsLnNwbGl0KCd1cmw9JylbMV0pO1xcbiAgICAgICAgICAgIHZhciBwYXJzZWlkID0gdG9vbHMuY2Flc2FyQ2lwaGVyKGI2NGlkLCAtMSk7XFxuICAgICAgICAgICAgdmFyIGpzb24gPSBKU09OLnBhcnNlKHJlcXVlc3QoYXBpLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzoganh1cmxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHBhcnNlaWRcXG4gICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgdXJsID0gKGpzb24uY29kZSA9PSAyMDAgPyBiYXNlNjREZWNvZGUodG9vbHMuY2Flc2FyQ2lwaGVyKGpzb24udXJsLCAtMSkpIDogJycpO1xcbiAgICAgICAgICAgIHJldHVybiB1cmw7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBQYW5HdTogZnVuY3Rpb24odmlwVXJsLCBkYXRhKSB7XFxuICAgICAgICAvKnZhciByZWYgPSAnaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jb20vJztcXG4gICAgICAgIHZhciBwYXJzZSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgdmFyIGFwaSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvYXBpLnBocCc7XFxuICAgICAgICAqL1xcbiAgICAgICAgLy92YXIgcmVmID0gJ2h0dHBzOi8veG15c3R2LmNvbS8nO1xcbiAgICAgICAgLy92YXIgcGFyc2UgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2luZGV4LnBocD91cmw9JyArIHRhaWxVcmw7XFxuICAgICAgICAvL3ZhciBhcGkgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2FwaS5waHAnO1xcbiAgICAgICAgdmFyIHBhcnNlID0gXFxcImh0dHBzOi8vd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gICAgICAgICAgcmV0dXJuIHRoaXMuUGFuR3UodmlwVXJsLCBbcmVmLCBwYXJzZSwgYXBpXSk7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBcXFwi8J+lmlxcXCI6IGZ1bmN0aW9uKHZpcFVybCkge1xcbiAgICAgICAgbGV0IOS9nOiAhV/op4bnlYznn6XlkI3lpKfkvaw7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBwbGF5ID0gSlNPTi5wYXJzZShmZXRjaChcXFwiaHR0cDovL3d3dy56cnVpcnkuY29tL3l1bi9hcGkucGhwXFxcIiwge1xcbiAgICAgICAgICAgICAgICBib2R5OiBcXFwidXJsPVxcXCIgKyBpbnB1dCxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcXFwiUE9TVFxcXCJcXG4gICAgICAgICAgICB9KSkudXJsO1xcbiAgICAgICAgICAgIGlmIChwbGF5LnN0YXJ0c1dpdGgoXFxcIi9cXFwiKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImh0dHBzOlxcXCIgKyBwbGF5O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBwbGF5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcIlxcXCI7XFxuICAgICAgICB9XFxuICAgIH1cXG59O1xcblxcbnZhciBmcm9tcyA9IFsnZHVvZHVvenknLCAncngnLCAncmVucmVubWknLCAnbHRuYicsICd4Znl1biddO1xcbmZvcihsZXQgaSBpbiBmcm9tcykge1xcbiAgICBsZXQgbmFtZSA9IGZyb21zW2ldICsgXFxcIijpgJrnlKjlh73mlbApXFxcIjtcXG4gICAgUGFyc2VTW25hbWVdID0gZnVuY3Rpb24oVXJsLCByZWZlcmVyKXtcXG4gICAg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7XFxuICAgICAgICBpZihpc05hTihwYXJhbTEudGltZW91dCkpIHtcXG4gICAgICAgICAgICBwYXJhbTEudGltZW91dCA9IDMwMDA7XFxuICAgICAgICB9XFxuICAgICAgICBwYXJhbTIgPSBNWV9SVUxFO1xcbiAgICAgICAgdmFyIHJldFN0ciA9IG1ldGhvZF9mZXRjaC5pbnZva2UoamF2YUNvbnRleHQsIHBhcmFtMCwgcGFyYW0xLCBwYXJhbTIpO1xcbiAgICAgICAgcmV0dXJuIHJldFN0ciA9PSBudWxsID8gcmV0U3RyIDogcmV0U3RyICsgXFxcIlxcXCI7XFxuICAgIH07XFxuICAgIHZhciBob3N0ID0gdmlwVXJsLm1hdGNoKC9cXFxcLiguKj8pXFxcXC8vKTtcXG4gICAgaG9zdCA9IGhvc3QgPT0gbnVsbCA/IG51bGwgOiBob3N0WzFdO1xcbiAgICB2YXIgbm9VcmwgPSBcXFwidG9hc3Q6Ly/mjqXmlLbliLDnmoTpk77mjqXkuLo6IFxcXCI7XFxuICAgIHN3aXRjaCAobXlTZXQucWp1KSB7XFxuICAgICAgICBjYXNlIFxcXCLpu5jorqRcXFwiOlxcbiAgICAgICAgICAgIHN3aXRjaCAoaG9zdCkge1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCJxcS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQudHg7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwiaXFpeWkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnF5O1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIGNhc2UgXFxcInlvdWt1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC55aztcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCJtZ3R2LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5tZztcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCJiaWxpYmlsaS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuYmw7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IGhvc3QgPT0gbnVsbCA/IG5vVXJsIDogbXlTZXQub3RoO1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICBzdHIgPSBob3N0ID09IG51bGwgPyBub1VybCA6IG15U2V0LnFqdTtcXG4gICAgICAgICAgICBicmVhaztcXG4gICAgfVxcbiAgICBpZiAocGFyc2VOYW1lKSB7XFxuICAgICAgICBzdHIgPSBwYXJzZU5hbWU7XFxuICAgIH1cXG4gICAgbGV0IG15Q2hvaWNlID0gc3RyLnNwbGl0KCcsJyk7XFxuICAgIGxldCBsZW4gPSBteUNob2ljZS5sZW5ndGg7XFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcXG4gICAgICAgIGxldCBuYW1lID0gbXlDaG9pY2VbaV07XFxuICAgICAgICBpZiAodHlwZW9mIFBhcnNlU1tuYW1lXSA9PSAnZnVuY3Rpb24nKSB7XFxuICAgICAgICAgICAgbGV0IHVybCA9IFBhcnNlU1tuYW1lXSh2aXBVcmwpO1xcbiAgICAgICAgICAgIGxldCBSZWcgPSBuZXcgUmVnRXhwKFxcXCJtM3U4fG1wNHxcXFwiICsgdmlwVXJsICsgXFxcInxodHRwXFxcIik7XFxuICAgICAgICAgICAgaWYgKGkgIT0gbGVuIC0gMSAmJiAhUmV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llcl8uKj97LywgJ3BkYXRhPXsnKSk7XFxuICAgICAgICAgICAgVXJsID0gcGRhdGEudXJsO1xcbiAgICAgICAgICAgIGZyb20gPSBwZGF0YS5mcm9tO1xcbiAgICAgICAgfSBlbHNlIGlmIChkcFVybCAhPSAnJykge1xcbiAgICAgICAgICAgIFVybCA9IGRwVXJsLnN0YXJ0c1dpdGgoXFxcImh0dHBcXFwiKSA/IGRkcFVybCA6IGRwVXJsLnNsaWNlKDMpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBjb2RlMiA9IGh0bWwubWF0Y2goL3ZhciBub3dbXFxcXHNcXFxcU10qP3ZhciBwbltcXFxcc1xcXFxTXSo/Oy8pO1xcbiAgICAgICAgICAgIGlmIChjb2RlMiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgICAgIGV2YWwoY29kZTJbMF0pO1xcbiAgICAgICAgICAgICAgICBVcmwgPSBub3c7XFxuICAgICAgICAgICAgICAgIGZyb20gPSBwbjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoVXJsLnN1YnN0cigwLCA4KS5tYXRjaCgvSlQuLkpULi4vKSB8fCBVcmwuc3RhcnRzV2l0aChcXFwiYUhSMFxcXCIpKSB7XFxuICAgICAgICAgICAgVXJsID0gYmFzZTY0RGVjb2RlKFVybCk7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoVXJsLnN1YnN0cigwLCA4KS5tYXRjaCgvJS4uJS4uLykpIHtcXG4gICAgICAgICAgICBVcmwgPSB1bmVzY2FwZShVcmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGZyb21zLmluY2x1ZGVzKGZyb20pKSB7XFxuICAgICAgICAgICAgdmFyIG5hbWUgPSBmcm9tICsgJyjpgJrnlKjlh73mlbApJztcXG4gICAgICAgICAgICByZXR1cm4gUGFyc2VTW25hbWVdKFVybCwganVybCk7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoL2h0bWx8YmlsaWJpbGkvLnRlc3QoVXJsKSkge1xcbiAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UoVXJsKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuIFVybC5zdGFydHNXaXRoKCdodHRwJykgPyBVcmwgKyAnI2lzVmlkZW89dHJ1ZSMnIDogUGFyc2VTLmRlZmF1bHRQYXJzZShqdXJsKTtcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgcGxheWVyX3h4OiBmdW5jdGlvbihqdXJsKSB7XFxuICAgICAgICByZXR1cm4gJChqdXJsKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgZXZhbChmZXRjaChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvbicpKS5jaikpO1xcbiAgICAgICAgICAgIHJldHVybiBwbGF5UGFyc2UucGxheWVyUyhpbnB1dCk7XFxuICAgICAgICB9KSBcXG4gICAgfVxcbn07XFxuXFxuZnVuY3Rpb24gc2V0UGFyc2UoKSB7XFxuICAgIHRoaXMuZCA9IFtdO1xcbiAgICByZXF1aXJlKCdodHRwczovL2dpdGVhLmNvbS9BSTk1Ny9IaWtlci9yYXcvbS92L1JvdXRlLmpzJyk7XFxuICAgIFJvdXRlLnNldFBhcnNlKCk7XFxuICAgIHNldFJlc3VsdChkKTtcXG59XCJ9XSIsImljb24iOiJodHRwczovL3N0YXRpYzAxLmltZ2tyLmNvbS90ZW1wLzIzODEzN2VmYjYxNjQ1ODc5Njg3YTg1MDNmMzRkODkzLnBuZyJ9
Add Comment
Please, Sign In to add comment