xiaomianao666

ε°η¨‹εΊοΌšπ‘€π‘¦πΉπ‘–π‘’π‘™π‘‘α΄°βΏ

Mar 23rd, 2022
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ζ΅·ι˜”θ§†η•Œθ§„εˆ™εˆ†δΊ«οΌŒε½“ε‰εˆ†δΊ«ηš„ζ˜―οΌšε°η¨‹εΊοΏ₯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+G0sOKBvycpIHtcbiAgICAgICAgICAgICAgICBsb2NhbFY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HMgPCBTY3JpcHQubGVuZ3RoOyBzKyspIHtcbiAgICAgICAgbGV0IFN0ID0gU2NyaXB0W3NdO1xuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cImNvbG9yOiMyOThBMDhcIj48c21hbGw+JyArIFN0LnRpdGxlICsgJyAtICcgKyBTdC52ZXJzaW9uLFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInLFxuICAgICAgICAgICAgdXJsOiAoJycgKyBTdC51cmwpLnN0YXJ0c1dpdGgoJ3RvYXN0JykgPyBTdC51cmwgOiAkKFN0LnVybCArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChmTGlua3MpID0+IHtcbiAgICAgICAgICAgICAgICB2YXIgYXJyID0gaW5wdXQuc3BsaXQoJyMjJyk7XG4gICAgICAgICAgICAgICAgdmFyIGZyb20gPSBhcnJbMF0sXG4gICAgICAgICAgICAgICAgICAgIG5hbWUgPSBhcnJbMV07XG4gICAgICAgICAgICAgICAgdmFyIFVybCA9IG5hbWUgPT0gdW5kZWZpbmVkID8gZnJvbSA6IGZMaW5rc1tmcm9tXSArIG5hbWU7XG4gICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBmZXRjaENhY2hlKFVybCwgMik7XG4gICAgICAgICAgICAgICAgaWYgKG5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL2NhY2hlLycgKyBuYW1lLCBodG1sKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WvvOWFpeaIkOWKnyc7XG4gICAgICAgICAgICB9LCBmTGlua3MpXG4gICAgICAgIH0pO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gY3pHdWlkZSgpIHtcbiAgICByZXR1cm4gZkxpbmtzLmN6enlcbn1cblxuZnVuY3Rpb24gdG9mTGluayhVcmwpIHtcbiAgICByZXR1cm4gJ2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KFVybCkgKyAnLmpzJztcbn1cblxuZnVuY3Rpb24gZWRpdEZpbGUoKSB7XG4gICAgdmFyIExpc3RzID0gW3tcbiAgICAgICAgdGl0bGU6ICfnlKjmiLfop6PmnpDmlofku7YnLFxuICAgICAgICBsaW5rOiBmTGlua3MucGFyc2VzXG4gICAgfSwge1xuICAgICAgICB0aXRsZTogJ1BhcnNlX0RuLmpzJyxcbiAgICAgICAgbGluazogZkxpbmtzLmNqY2FjaGVcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn572R6aG16ISa5pys5Luj56CBJyxcbiAgICAgICAgbGluazogZkxpbmtzLng1Y2FjaGVcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn6LCD55So6Lev55Sx5Luj56CBJyxcbiAgICAgICAgbGluazogdG9mTGluayhmTGlua3Mucm91dGVVcmwpXG4gICAgfSwge1xuICAgICAgICB0aXRsZTogJ+ino+aekOmhueS4u+S7o+eggScsXG4gICAgICAgIGxpbms6IHRvZkxpbmsoZkxpbmtzLmp4SXRVcmwpXG4gICAgfSwge1xuICAgICAgICB0aXRsZTogJ+e8lui+keino+aekOmhueS7o+eggScsXG4gICAgICAgIGxpbms6IHRvZkxpbmsoZkxpbmtzLl9ialVybClcbiAgICB9XTtcbiAgICBmb3IgKGkgb2YgTGlzdHMpIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBpLnRpdGxlLFxuICAgICAgICAgICAgdXJsOiAnZWRpdEZpbGU6Ly8nICsgaS5saW5rLFxuICAgICAgICAgICAgLy9jb2xfdHlwZTogJ3RleHRfMidcbiAgICAgICAgfSlcbiAgICB9XG4gICAgaWYgKCFnZXRWYXIoJ2VkaXRGaWxlUG9wdXAnKSkge1xuICAgICAgICBjb25maXJtKHtcbiAgICAgICAgICAgIHRpdGxlOiAn5rip6aao5o+Q56S6JyxcbiAgICAgICAgICAgIGNvbnRlbnQ6ICfmraTpobnlip/og73kuI3lu7rorq7lsI/nmb3nlKjmiLfkvb/nlKgnLFxuICAgICAgICAgICAgY29uZmlybTogJ3B1dFZhcihcImVkaXRGaWxlUG9wdXBcIixcIjFcIiknXG4gICAgICAgIH0pXG4gICAgfVxufVxuXG50cnkge1xuICAgIHJlcXVpcmUoXCJodHRwczovL2dpdGVhLmNvbS9BSTk1Ny9IaWtlci9yYXcvbS92L1JvdXRlLmpzXCIpO1xuICAgIHN3aXRjaCAoZ2V0UGFyYW0oJ2NsYXNzJykpIHtcbiAgICAgICAgY2FzZSBcImVkaXRGaWxlXCI6XG4gICAgICAgICAgICBlZGl0RmlsZSgpO1xuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgXCJVcGRhdGVcIjpcbiAgICAgICAgICAgIHJ1bGVzVXBkYXRlKCk7XG4gICAgICAgICAgICBzZXRSZXN1bHQoZCk7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICByZXF1aXJlKGZMaW5rcy5qeEl0VXJsKTtcbiAgICAgICAgICAgIGp4SXRlbS5scUZpbGUoKTtcbiAgICAgICAgICAgIFJvdXRlLmFkZExhbkppZShkKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgIH1cbn0gY2F0Y2ggKGUpIHtcbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogXCLmk43kvZzmjIflvJVcIixcbiAgICAgICAgdXJsOiBjekd1aWRlKCksXG4gICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIlxuICAgIH0pXG4gICAgY29uZmlybSh7XG4gICAgICAgIHRpdGxlOiAn56iL5bqP5Ye66ZSZ5LqGKF8gXyknLFxuICAgICAgICBjb250ZW50OiAn6KGM5pWwOiAnICsgZS5saW5lTnVtYmVyICsgJ1xcbuivpuaDhTogJyArIGUubWVzc2FnZSxcbiAgICAgICAgY29uZmlybTogJ2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gICAgIGhlaWdodDogYXV0bztcXG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgfVxcbiAgICAgICAgYm9keSB7XFxuICAgICAgICAgICAgbWFyZ2luOiAwIDVweCAwIDVweDtcXG4gICAgICAgICAgICBwYWRkaW5nOiAwIDBweCAwIDBweDtcXG4gICAgICAgICAgICAvL2JhY2tncm91bmQ6ICNGOUYwREE7XFxuICAgICAgICAgICAgZm9udC13ZWlnaHQ6IDA7XFxuICAgICAgICAgICAgZm9udC1mYW1pbHk6IFxcXCJNaWNyb3NvZnQgWWFIZWlcXFwiLFxcXCLlrovkvZNcXFwiLFxcXCJTZWdvZSBVSVxcXCIsIFxcXCJMdWNpZGEgR3JhbmRlXFxcIiwgSGVsdmV0aWNhLCBBcmlhbCxzYW5zLXNlcmlmLCBGcmVlU2FucywgQXJpbW87XFxuICAgICAgICB9XFxuICAgICAgICAjZGl2MntcXG4gICAgICAgICAgIG1hcmdpbi10b3A6MzVweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q6L6T5YWl5qGG54i25YWD57SgKi9cXG4gICAgICAgIGRpdi5ib3gge1xcbiAgICAgICAgICAgIGhlaWdodDogNTNweDtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogMjBweDtcXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICB9XFxuICAgICAgICAvKui+k+WFpeahhuWwuuWvuCovXFxuICAgICAgICBmb3JtIHtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICAgICAgd2lkdGg6IDkyJTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlucHV0LCBsYWJlbCwgLmxpZWIgYnV0dG9uIHtcXG4gICAgICAgICAgICBib3JkZXI6IG5vbmU7XFxuICAgICAgICAgICAgb3V0bGluZTogbm9uZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q5a2X5L2T5L2N572uKi9cXG4gICAgICAgIGlucHV0IHtcXG4gICAgICAgICAgICB3aWR0aDogNzclO1xcbiAgICAgICAgICAgIGhlaWdodDogMzJweDtcXG4gICAgICAgICAgICBwYWRkaW5nLWxlZnQ6IDY2cHg7XFxuICAgICAgICAgICAgcGFkZGluZy1yaWdodDogMzBweDtcXG4gICAgICAgIH1cXG4gICAgICAgIGxhYmVsIHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNDNweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q5bCP5qGGKi9cXG4gICAgICAgIC5iYXIgbGFiZWwge1xcbiAgICAgICAgICAgIGJhY2tncm91bmQ6ICNEMDZCNkM7XFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNTU1IDU1NXB4IDU1NXB4IDU1NTtcXG4gICAgICAgICAgICB3aWR0aDogNjBweDtcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgY29sb3I6ICNGOUYwREE7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIGxlZnQ6IDNweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q6L6T5YWl5qGG5qC35byPKi9cXG4gICAgICAgIC5iYXIgaW5wdXQge1xcbiAgICAgICAgICAgIGJhY2tncm91bmQ6ICNGOUYwREE7XFxuICAgICAgICAgICAgYm9yZGVyOiAzcHggc29saWQgI0QwNkI2QztcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWIl+ihqCovXFxuICAgICAgICAubGllYiBidXR0b24ge1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyO1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIHdpZHRoOiAyN3B4O1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWIl+ihqCovXFxuICAgICAgICAubGllYiBidXR0b257XFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xcbiAgICAgICAgICAgIGJhY2tncm91bmQ6ICNEMDZCNkM7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIGNvbG9yOiAjRjlGMERBO1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAgICAgICAgICByaWdodDogMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlpLTlg48qL1xcbiAgICAgICAgLnJvdW5kX2ljb257XFxuICAgICAgICAgICAgd2lkdGg6IDQwcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNTAlO1xcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XFxuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XFxuICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC5qeC11bCwgLmNqLXVsIHtcXG4gICAgICAgICAgICB6LWluZGV4OiA5OTk7XFxuICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO1xcbiAgICAgICAgICAgIHdpZHRoOiA3NyU7XFxuICAgICAgICAgICAvLyBsZWZ0OiAxMCU7XFxuICAgICAgICB9XFxuICAgICAgICAuangtdWwsIC5jai11bCB7XFxuICAgICAgICAgICAgZGlzcGxheTogbm9uZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC5qeC11bCB7XFxuICAgICAgICAgICAgdG9wOiAzJTtcXG4gICAgICAgIH1cXG4gICAgICAgIC5jai11bCB7XFxuICAgICAgICAgICAgdG9wOiAzMCU7XFxuICAgICAgICB9XFxuICAgICAgICBsaSB7XFxuICAgICAgICAgICAgaGVpZ2h0OiAzNXB4O1xcbiAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICMwMWJmZGE7XFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNnB4O1xcbiAgICAgICAgICAgIGJhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgMC44KTtcXG4gICAgICAgICAgICBjb2xvcjogd2hpdGU7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDM1cHg7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDtcXG4gICAgICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xcbiAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47XFxuICAgICAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XFxuICAgICAgICB9XFxuICAgICAgICBsaSB7XFxuICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxpOmhvdmVyIHtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogcmdiYSgxMzksIDEzMSwgMTIwLCAwLjkpO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGlbY2hlY2s9XFxcInRydWVcXFwiXSB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogcmdiYSgxMzksIDAsIDAsIDAuOSk7XFxuIC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AgICAgRGlkKFxcXCJkaXYyXFxcIikuaW5zZXJ0QWRqYWNlbnRIVE1MKCdhZnRlckJlZ2luJywnXFxcXFxcbjxoND7mj5DnpLrvvJo8YnI+4pGg5rOo5oSP5o+S5Lu26YCJ6aG577yM5rKh5pyJ5omL5Yqo5a+85YWl5o+S5Lu255qE6K+d5LiN55So5Yqo5a6D44CC5aaC6K6+572u5LiN5b2T5Lya5a+86Ie06KeE5YiZ5peg5rOV5L2/55So77yMPGJyPuino+WGs+WKnuazle+8muWwj+eoi+W6j+mmlumhteeCueWHu+aBouWkjem7mOiupOaPkuS7tu+8mzxicj7ikaHlhajlsYDorr7nva7lpoLmnpzpgInmi6nkuobpnZ7pu5jorqTpgqPkuYjlhajpg6jnmoTop6PmnpDkvJrkvb/nlKjov5nkuIDorr7nva7vvIzkuI3mg7Pov5nmoLfnmoTor53or7floavlhaXpu5jorqTvvJs8YnI+4pGi57u/6Imy5L+d5a2Y5oyJ6ZKu5LuF5LuF5L+d5a2Y6YWN572u5LiN5Lya5YWz6Zet6K6+572u6aG16Z2i77yM6YWN572u5ZCO5oOz5L+d5a2Y5bm25YWz6Zet6K6+572u6aG16Z2i55qE6K+d6K+354K56JOd6Imy5oyJ6ZKu77ybPGJyPuKRo+mYheivu+WujOaPkOekuueCueWFs+mXreWKoOi9veWujOaVtOiuvue9rumhtemdou+8jOWmguWHuumXrumimOaXoOazleiHquihjOino+WGs+eCueWbvueJh+i/m+WFpeiuuuWdm+WQkeaIkeWPjemmiOOAgjxicj48L2g0PicpO1xcbiAgICB9XFxuICAgIFxcbiAgICB2YXIgYm94RGF0YSA9IFtcXG4gICAgICAgIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuWlhyDlpYdcXFwiLFxcbiAgICAgICAgICAgIGlkOiBcXFwicXlcXFwiLFxcbiAgICAgICAgICAgIHZhbHVlOiBzZXR0aW5ncy5xeSxcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIumFtyDphbdcXFwiLFxcbiAgICAgICAgICAgIGlkOiBcXFwieWtcXFwiLFxcbiAgICAgICAgICAgIHZhbHVlOiBzZXR0aW5ncy55ayxcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuiFviDohb5cXFwiLFxcbiAgICAgICAgICAgIGlkOiBcXFwidHhcXFwiLFxcbiAgICAgICAgICAgIHZhbHVlOiBzZXR0aW5ncy50eCxcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuaenCDmnpxcXFwiLFxcbiAgICAgICAgICAgIGlkOiBcXFwibWdcXFwiLFxcbiAgICAgICAgICAgIHZhbHVlOiBzZXR0aW5ncy5tZyxcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuWTqSDlk6lcXFwiLFxcbiAgICAgICAgICAgIGlkOiBcXFwiYmxcXFwiLFxcbiAgICAgICAgICAgIHZhbHVlOiBzZXR0aW5ncy5ibCxcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuWFtiDku5ZcXFwiLFxcbiAgICAgICAgICAgIGlkOiBcXFwib3RoXFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3Mub3RoLFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5YWoIOWxgFxcXCIsXFxuICAgICAgICAgICAgaWQ6IFxcXCJxanVcXFwiLFxcbiAgICAgICAgICAgIHZhbHVlOiBzZXR0aW5ncy5xanUsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLmj5Ig5Lu2XFxcIixcXG4gICAgICAgICAgICBpZDogXFxcImNqXFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3MuY2osXFxuICAgICAgICB9XFxuICAgIF07XFxuXFxuICAgIHZhciBpbnB1dEJveCA9IFxcXCJcXFwiO1xcbiAgICBmb3IobGV0IGkgPSAw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XCIuemotZGl2XFxcIixcXG4gICAgICAgIGRhdGE6IHtcXG4gICAgICAgICAgICBqeERhdGE6IG15U2VsZWN0LFxcbiAgICAgICAgICAgIGNqRGF0YTogW1xcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL1BhcnNlX0RuLmpzXFxcIiwgXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvZHpIb3VzZS9qcy9zcmNhdXRvLmpzXFxcIiwgXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvanMvUGFyc2UtVjJfRG4uanNcXFwiXVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG5cXG4gICAgJChkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24oKSB7XFxuICAgICAgICB2YXIgbGVuID0gJCgnLmp4LXVsJykuY2hpbGRyZW4oJ2xpJykubGVuZ3RoO1xcbiAgICAgICAgdmFyIGxlbjIgPSAkKCcuY2otdWwnKS5jaGlsZHJlbignbGknKS5sZW5ndGg7XFxuICAgICAgICAkKCcubGllYiBidXR0b24nKS5jbGljayhmdW5jdGlvbihlKSB7XFxuICAgICAgICAgICAgaWYoJCgnLmxpZWIgYnV0dG9uJykudGV4dCgpLmluY2x1ZGVzKCfilIEnKSl7XFxuICAgICAgICAgICAgICAgICQoJy5saWViIGJ1dHRvbicpLmNzcygnYmFja2dyb3VuZCcsICcnKTtcXG4gICAgICAgICAgICAgICAgJCgnLmxpZWIgYnV0dG9uJykudGV4dCgn4piwJyk7XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICQodGhpcykudGV4dCgn4pSBJyk7XFxuICAgICAgICAgICAgICAgICQodGhpcykuY3NzKCdiYWNrZ3JvdW5kJywgJ3JlZCcpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAkKCdsaScpLmF0dHIoJ2NoZWNrJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgdmFyIGlucHV0aWQgPSBcXFwiI1xcXCIgKyB0aGlzLmlkLnNwbGl0KFxcXCJTZWxlY3RcXFwiKVswXTtcXG4gICAgICAgICAgICB2YXIgYXJyID0gJChpbnB1dGlkKS52YWwoKS5zcGxpdCgnLCcpO1xcbiAgICAgICAgICAgIGFyciA9IGFyclswXSA9PSAnJyA/IFtdIDogYXJyO1xcbiAgICAgICAgICAgICQoJy5teUNob2ljZScpLnRleHQoYXJyKTtcXG4gICAgICAgICAgICBpZiAoaW5wdXRpZCAhPT0gJyNjaicgJiYgJCgnLmNqLXVsJykuY3NzKCdkaXNwbGF5Jyk9PSdub25lJykge1xcbiAgICAgICAgICAgICAgICAkKCcuangtdWwnKS5zbGlkZVRvZ2dsZSgzMDApO1xcbiAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IGxlbjsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIganhMaXN0ID0gJCgnLmp4LXVsIGxpOm5vdCgubXlDaG9pY2UpJykuZXEoaSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoYXJyLmluY2x1ZGVzKGp4TGlzdC50ZXh0KCkpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAganhMaXN0LmF0dHIoJ2NoZWNrJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGp4TGlzdC51bmJpbmQoJ2NsaWNrJykuY2xpY2soZnVuY3Rpb24oZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQodGhpcykuYXR0cignY2hlY2snKSAhPT0gXFxcInRydWVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuYXR0cignY2hlY2snLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIudW5zaGlmdCgkKHRoaXMpLnRleHQoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoaW5wdXRpZCkudmFsKGFycik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJy5teUNob2ljZScpLnRleHQoYXJyKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmF0dHIoJ2NoZWNrJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGEgPSAwOyBhIDwgYXJyLmxlbmd0aDsgYSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXJyW2FdID09ICQodGhpcykudGV4dCgpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyLnNwbGljZShhLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKGlucHV0aWQpLnZhbChhcnIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJy5teUNob2ljZScpLnRleHQoYXJyKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2UgaWYoJCgnLmp4LXVsJykuY3NzKCdkaXNwbGF5Jyk9PSdub25lJyl7XFxuICAgICAgICAgICAgICAgICQoJy5jai11bCcpLnNsaWRlVG9nZ2xlKDIwMCk7XFxuICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuMjsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgY2pMaXN0ID0gJCgnLmNqLXVsIGxpJykuZXEoaSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoJChpbnB1dGlkKS52YWwoKSA9PSBjakxpc3QudGV4dCgpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2pMaXN0LmF0dHIoJ2NoZWNrJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGNqTGlzdC51bmJpbmQoJ2NsaWNrJykuY2xpY2soZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJChpbnB1dGlkKS52YWwoJCh0aGlzKS50ZXh0KCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmF0dHIoJ2NoZWNrJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5zaWJsaW5ncygpLmF0dHIoJ2NoZWNrJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgJChkb2N1bWVudCkubm90KCQoJy54bExpc3QnKSkuY2xpY2soZnVuY3Rpb24oZSkge1xcbiAgICAgICAgICAgICQoJy5qeC11bCcpLnNsaWRlVXAoKTtcXG4gICAgICAgICAgICAkKCcuY2otdWwnKS5zbGlkZVVwKCk7XFxuICAgICAgICAgICAgJCgnLmxpZWIgYnV0dG9uJykudGV4dCgn4piwJyk7XFxuICAgICAgICAgICAgJCgnLmxpZWIgYnV0dG9uJykuY3NzKCdiYWNrZ3JvdW5kJywgJycpO1xcbiAgICAgICAgfSk7XFxuICAgICAgICAkKGZ1bmN0aW9uKCl7XFxuICAgICAgICAgICAgJCgnbGFiZWwnKS5tb3VzZXVwKGZ1bmN0aW9uKCl7XFxuICAgICAgICAgICAgICAgIGxldCBpbnB1dGlkID0gJyMnICsgJCh0aGlzKS5uZXh0KCkuYXR0cignaWQnKTtcXG4gICAgICAgICAgICAgICAgb25lT3JEYmwoaW5wdXRpZCk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgdmFyIGNvdW50ID0gMDtcXG4gICAgICAgICAgICB2YXIgdGltZXI7XFxuICAgICAgICAgICAgZnVuY3Rpb24gb25lT3JEYmwoaW5wdXRpZCl7XFxuICAgICAgICAgICAgICAgIGNvdW50Kys7XFxuICAgICAgICAgICAgICAgIHRpbWVyID0gd2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24oKXtcXG4gICAgICAgICAgICAgICAgICAgIGlmKGNvdW50ID09IDEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnIgPSAkKGlucHV0aWQpLnZhbCgpLnNwbGl0KCcsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYXJyLnNwbGljZSgwLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAkKGlucHV0aWQpLnZhbChhcnIpO1xcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJChpbnB1dGlkKS52YWwoJycpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmNsZWFyVGltZW91dCh0aW1lcik7XFxuICAgICAgICAgICAgICAgICAgICBjb3VudCA9IDA7XFxuICAgICAgICAgICAgICAgIH0sMjYwKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH0pO1xcbiAgICBcXG4gICAgZnVuY3Rpb24gVG9hc3QobXNnLGR1cmF0aW9uKXsgIFxcbiAgICAgICAgZHVyYXRpb249aXNOYU4oZHVyYXRpb24pPzIwMDA6ZHVyYXRpb247ICBcXG4gICAgICAgIHZhciBtID0gZG9jdW1lbnQuY3JlYXRlR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tdmIvO1xcbiAgICAgICAgICAgIHZhciBSZWcyID0gL3BsYXltM3U4fC5jc3MkfC5qcyR8LmljbyR8Y256elxcXFwuLztcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IFVybHMubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgbGV0IGlzVXJsID0gVXJsc1tpXTtcXG4gICAgICAgICAgICAgICAgaWYgKFJlZzEudGVzdChpc1VybCkgJiYgIVJlZzIudGVzdChpc1VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5oaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlzVXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9LFxcbiAgICBtYW9zczogZnVuY3Rpb24oanh1cmwsIHJlZiwga2V5KSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBnZXRWaWRlb0luZm8gPSBmdW5jdGlvbih0ZXh0KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0b29scy5BRVModGV4dCwga2V5LCBpdik7XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICBrZXkgPSBrZXkgPT0gdW5kZWZpbmVkID8gJ2R2eVlSUWxuUFJDTWRRU2UnIDoga2V5O1xcbiAgICAgICAgICAgIGlmIChyZWYpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGh0bWwgPSByZXF1ZXN0KGp4dXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiByZWZcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIGh0bWwgPSByZXF1ZXN0KGp4dXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGh0bWwuaW5kZXhPZignJmJ0d2FmPScpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KGp4dXJsICsgJyZidHdhZicgKyBodG1sLm1hdGNoKC8mYnR3YWYoLio/KVxcXCIvKVsxXSwge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogcmVmXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBpdiA9IGh0bWwuc3BsaXQoJ190b2tlbiA9IFxcXCInKVsxXS5zcGxpdCgnXFxcIicpWzBdO1xcbiAgICAgICAgICAgIGV2YWwoaHRtbC5tYXRjaCgvdmFyIGNvbmZpZyA9IHtbXFxcXHNcXFxcU10qP30vKVswXSArICcnKTtcXG4gICAgICAgICAgICBpZiAoY29uZmlnLnVybC5zbGljZSgwLCA0KSAhPSAnaHR0cCcpIHtcXG4gICAgICAgICAgICAgICAgY29uZmlnLnVybCA9IGRlY29kZVVSSUNvbXBvbmVudCh0b29scy5BRVMoY29uZmlnLnVybCwga2V5LCBpdikpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLnVybDtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gJyc7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIExMUTogZnVuY3Rpb24oanh1cmwpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgdmFyIGFwaSA9IGp4dXJsLnNwbGl0KCc/dXJsPScpWzBdICsgXFxcImFwaS5waHBcXFwiO1xcbiAgICAgICAgICAgIHZhciBiNjRpZCA9IGJhc2U2NEVuY29kZShqeHVybC5zcGxpdCgndXJsPScpWzFdKTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VpZCA9IHRvb2xzLmNhZXNhckNpcGhlcihiNjRpZCwgLTEpO1xcbiAgICAgICAgICAgIHZhciBqc29uID0gSlNPTi5wYXJzZShyZXF1ZXN0KGFwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IGp4dXJsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxcbiAgICAgICAgICAgICAgICBib2R5OiAndXJsPScgKyBwYXJzZWlkXFxuICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgIHVybCA9IChqc29uLmNvZGUgPT0gMjAwID8gYmFzZTY0RGVjb2RlKHRvb2xzLmNhZXNhckNpcGhlcihqc29uLnVybCwgLTEpKSA6ICcnKTtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgUGFuR3U6IGZ1bmN0aW9uKHZpcFVybCwgZGF0YSkge1xcbiAgICAgICAgLyp2YXIgcmVmID0gJ2h0dHBzOi8vd3d3LnBhbmd1amlleGkuY29tLyc7XFxuICAgICAgICB2YXIgcGFyc2UgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpLz91cmw9JyArIHZpcFVybDtcXG4gICAgICAgIHZhciBhcGkgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpL2FwaS5waHAnO1xcbiAgICAgICAgKi9cXG4gICAgICAgIC8vdmFyIHJlZiA9ICdodHRwczovL3hteXN0di5jb20vJztcXG4gICAgICAgIC8vdmFyIHBhcnNlID0gJ2h0dHBzOi8vd3d3Ljk5a3B3LmNvbS9wYW5ndS9pbmRleC5waHA/dXJsPScgKy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gICAgICAgICAgIHZhciBwYXJzZSA9IHJlZjtcXG4gICAgICAgICAgICB2YXIgYXBpID0gJ2h0dHBzOi8vangueHVldHVpZ3VhbmcuY24vamlleGkvYXBpdV9meC5waHAnO1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLlBhbkd1KHZpcFVybCwgW3JlZiwgcGFyc2UsIGFwaV0pO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgXFxcIvCfpZpcXFwiOiBmdW5jdGlvbih2aXBVcmwpIHtcXG4gICAgICAgIGxldCDkvZzogIVf6KeG55WM55+l5ZCN5aSn5L2sO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgcGxheSA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHA6Ly93d3cuenJ1aXJ5LmNvbS95dW4vYXBpLnBocFxcXCIsIHtcXG4gICAgICAgICAgICAgICAgYm9keTogXFxcInVybD1cXFwiICsgaW5wdXQsXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogXFxcIlBPU1RcXFwiXFxuICAgICAgICAgICAgfSkpLnVybDtcXG4gICAgICAgICAgICBpZiAocGxheS5zdGFydHNXaXRoKFxcXCIvXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJodHRwczpcXFwiICsgcGxheTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gcGxheTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJcXFwiO1xcbiAgICAgICAgfVxcbiAgICB9XFxufTtcXG5cXG52YXIgZnJvbXMgPSBbJ2R1b2R1b3p5JywgJ3J4JywgJ3JlbnJlbm1pJywgJ2x0bmInLCAneGZ5dW4nXTtcXG5mb3IobGV0IGkgaW4gZnJvbXMpIHtc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AgICAgICAgICAgICAgICBjYXNlIFxcXCJ5b3VrdS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueWs7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwibWd0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWc7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwiYmlsaWJpbGkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmJsO1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBob3N0ID09IG51bGwgPyBub1VybCA6IG15U2V0Lm90aDtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBicmVhaztcXG4gICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgc3RyID0gaG9zdCA9PSBudWxsID8gbm9VcmwgOiBteVNldC5xanU7XFxuICAgICAgICAgICAgYnJlYWs7XFxuICAgIH1cXG4gICAgaWYgKHBhcnNlTmFtZSkge1xcbiAgICAgICAgc3RyID0gcGFyc2VOYW1lO1xcbiAgICB9XFxuICAgIGxldCBteUNob2ljZSA9IHN0ci5zcGxpdCgnLCcpO1xcbiAgICBsZXQgbGVuID0gbXlDaG9pY2UubGVuZ3RoO1xcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbjsgaSsrKSB7XFxuICAgICAgICBsZXQgbmFtZSA9IG15Q2hvaWNlW2ldO1xcbiAgICAgICAgaWYgKHR5cGVvZiBQYXJzZVNbbmFtZV0gPT0gJ2Z1bmN0aW9uJykge1xcbiAgICAgICAgICAgIGxldCB1cmwgPSBQYXJzZVNbbmFtZV0od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gICAgICAgdmFyIGRwVXJsID0gcGRmaChodG1sLCBcXFwiaWZyYW1lJiZkYXRhLXBsYXlcXFwiKTtcXG4gICAgICAgIGlmIChjb2RlMSAhPSBudWxsKSB7XFxuICAgICAgICAgICAgZXZhbChjb2RlMVswXS5yZXBsYWNlKC9wbGF5ZXJfLio/ey8sICdwZGF0YT17JykpO1xcbiAgICAgICAgICAgIFVybCA9IHBkYXRhLnVybDtcXG4gICAgICAgICAgICBmcm9tID0gcGRhdGEuZnJvbTtcXG4gICAgICAgIH0gZWxzZSBpZiAoZHBVcmwgIT0gJycpIHtcXG4gICAgICAgICAgICBVcmwgPSBkcFVybC5zdGFydHNXaXRoKFxcXCJodHRwXFxcIikgPyBkZHBVcmwgOiBkcFVybC5zbGljZSgzKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgY29kZTIgPSBodG1sLm1hdGNoKC92YXIgbm93W1xcXFxzXFxcXFNdKj92YXIgcG5bXFxcXHNcXFxcU10qPzsvKTtcXG4gICAgICAgICAgICBpZiAoY29kZTIgIT0gbnVsbCkge1xcbiAgICAgICAgICAgICAgICBldmFsKGNvZGUyWzBdKTtcXG4gICAgICAgICAgICAgICAgVXJsID0gbm93O1xcbiAgICAgICAgICAgICAgICBmcm9tID0gcG47XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKFVybC5zdWJzdHIoMCwgOCkubWF0Y2goL0pULi5KVC4uLykgfHwgVXJsLnN0YXJ0c1dpdGgoXFxcImFIUjBcXFwiKSkge1xcbiAgICAgICAgICAgIFVybCA9IGJhc2U2NERlY29kZShVcmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKFVybC5zdWJzdHIoMCwgOCkubWF0Y2goLyUuLiUuLi8pKSB7XFxuICAgICAgICAgICAgVXJsID0gdW5lc2NhcGUoVXJsKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChmcm9tcy5pbmNsdWRlcyhmcm9tKSkge1xcbiAgICAgICAgICAgIHZhciBuYW1lID0gZnJvbSArICco6YCa55So5Ye95pWwKSc7XFxuICAgICAgICAgICAgcmV0dXJuIFBhcnNlU1tuYW1lXShVcmwsIGp1cmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKC9odG1sfGJpbGliaWxpLy50ZXN0KFVybCkpIHtcXG4gICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKFVybCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBVcmwuc3RhcnRzV2l0aCgnaHR0cCcpID8gVXJsICsgJyNpc1ZpZGVvPXRydWUjJyA6IFBhcnNlUy5kZWZhdWx0UGFyc2UoanVybCk7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIHBsYXllcl94eDogZnVuY3Rpb24oanVybCkge1xcbiAgICAgICAgcmV0dXJuICQoanVybCkubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb24nKSkuY2opKTtcXG4gICAgICAgICAgICByZXR1cm4gcGxheVBhcnNlLnBsYXllclMoaW5wdXQpO1xcbiAgICAgICAgfSkgXFxuICAgIH1cXG59O1xcblxcbmZ1bmN0aW9uIHNldFBhcnNlKCkge1xcbiAgICB0aGlzLmQgPSBbXTtcXG4gICAgcmVxdWlyZSgnaHR0cHM6Ly9naXRlYS5jb20vQUk5NTcvSGlrZXIvcmF3L20vdi9Sb3V0ZS5qcycpO1xcbiAgICBSb3V0ZS5zZXRQYXJzZSgpO1xcbiAgICBzZXRSZXN1bHQoZCk7XFxufVwifV0iLCJpY29uIjoiaHR0cHM6Ly9zdGF0aWMwMS5pbWdrci5jb20vdGVtcC8yMzgxMzdlZmI2MTY0NTg3OTY4N2E4NTAzZjM0ZDg5My5wbmcifQ==
Add Comment
Please, Sign In to add comment