From 097e602fd0e1093bcc8faf2f742c63bf57d90056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obernd=C3=B6rfer?= Date: Mon, 18 Nov 2013 10:07:18 +0100 Subject: [PATCH] Fix grunt-browserify dependency --- .gitignore | 2 ++ package.json | 4 ++-- resources/openpgp.js | 8 ++++---- test/test-bundle.js | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 7b35202b..5b5aca84 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ resources/openpgpjs.pem build/ .DS_Store +node_modules/ +npm* diff --git a/package.json b/package.json index edfa445e..01d1d960 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "test": "" }, "devDependencies": { - "browserify": "~2.33", + "browserify": "~2.35", "grunt": "~0.4.1", - "grunt-browserify": "~1.2.8", + "grunt-browserify": "~1.2.11", "grunt-contrib-uglify": "*", "grunt-text-replace": "*", "grunt-jsbeautifier": "*", diff --git a/resources/openpgp.js b/resources/openpgp.js index 325d432c..06c6481e 100644 --- a/resources/openpgp.js +++ b/resources/openpgp.js @@ -9023,6 +9023,8 @@ var enums = { module.exports = enums; +},{}],"openpgp":[function(require,module,exports){ +module.exports=require('IKGp/G'); },{}],"IKGp/G":[function(require,module,exports){ module.exports = require('./openpgp.js'); @@ -9038,9 +9040,7 @@ module.exports.enums = require('./enums.js'); module.exports.config = require('./config'); module.exports.crypto = require('./crypto'); -},{"./config":2,"./crypto":15,"./encoding/armor.js":24,"./enums.js":26,"./key.js":29,"./message.js":30,"./openpgp.js":31,"./packet":34,"./type/keyid.js":52,"./type/mpi.js":53,"./type/s2k.js":54,"./util":55}],"openpgp":[function(require,module,exports){ -module.exports=require('IKGp/G'); -},{}],29:[function(require,module,exports){ +},{"./config":2,"./crypto":15,"./encoding/armor.js":24,"./enums.js":26,"./key.js":29,"./message.js":30,"./openpgp.js":31,"./packet":34,"./type/keyid.js":52,"./type/mpi.js":53,"./type/s2k.js":54,"./util":55}],29:[function(require,module,exports){ // GPG4Browsers - An OpenPGP implementation in javascript // Copyright (C) 2011 Recurity Labs GmbH // @@ -13005,5 +13005,5 @@ var Util = function() { module.exports = new Util(); },{}]},{},[]) -//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlcyI6WyIvaG9tZS90b2Jlcm5kby9kZXYvb3BlbnBncGpzLWRldmVsL3NyYy9jb21wcmVzc2lvbi9qeGcuanMiLCIvaG9tZS90b2Jlcm5kby9kZXYvb3BlbnBncGpzLWRldmVsL3NyYy9jb25maWcvY29uZmlnLmpzIiwiL2hvbWUvdG9iZXJuZG8vZGV2L29wZW5wZ3Bqcy1kZXZlbC9zcmMvY3J5cHRvL2NmYi5qcyIsIi9ob21lL3RvYmVybmRvL2Rldi9vcGVucGdwanMtZGV2ZWwvc3JjL2NyeXB0by9jaXBoZXIvYWVzLmpzIiwiL2hvbWUvdG9iZXJuZG8vZGV2L29wZW5wZ3Bqcy1kZXZlbC9zcmMvY3J5cHRvL2NpcGhlci9ibG93ZmlzaC5qcyIsIi9ob21lL3RvYmVybmRvL2Rldi9vcGVucGdwanMtZGV2ZWwvc3JjL2NyeXB0by9jaXBoZXIvY2FzdDUuanMiLCIvaG9tZS90b2Jlcm5kby9kZXYvb3BlbnBncGpzLWRldmVsL3NyYy9jcnlwdG8vY2lwaGVyL2Rlcy5qcyIsIi9ob21lL3RvYmVybmRvL2Rldi9vcGVucGdwanMtZGV2ZWwvc3JjL2NyeXB0by9jaXBoZXIvaW5kZXguanMiLCIvaG9tZS90b2Jlcm5kby9kZXYvb3BlbnBncGpzLWRldmVsL3NyYy9jcnlwdG8vY2lwaGVyL3R3b2Zpc2guanMiLCIvaG9tZS90b2Jlcm5kby9kZXYvb3BlbnBncGpzLWRldmVsL3NyYy9jcnlwdG8vY3J5cHRvLmpzIiwiL2hvbWUvdG9iZXJuZG8vZGV2L29wZW5wZ3B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ID0gMCxcbiAgICBtb2RlWklQID0gZmFsc2UsXG5cbiAgICBDUkMsIFNJWkUsXG5cbiAgICBiaXRSZXZlcnNlID0gW1xuICAgICAgICAweDAwLCAweDgwLCAweDQwLCAweGMwLCAweDIwLCAweGEwLCAweDYwLCAweGUwLFxuICAgICAgICAweDEwLCAweDkwLCAweDUwLCAweGQwLCAweDMwLCAweGIwLCAweDcwLCAweGYwLFxuICAgICAgICAweDA4LCAweDg4LCAweDQ4LCAweGM4LCAweDI4LCAweGE4LCAweDY4LCAweGU4LFxuICAgICAgICAweDE4LCAweDk4LCAweDU4LCAweGQ4LCAweDM4LCAweGI4LCAweDc4LCAweGY4LFxuICAgICAgICAweDA0LCAweDg0LCAweDQ0LCAweGM0LCAweDI0LCAweGE0LCAweDY0LCAweGU0LFxuICAgICAgICAweDE0LCAweDk0LCAweDU0LCAweGQ0LCAweDM0LCAweGI0LCAweDc0LCAweGY0LFxuICAgICAgICAweDBjLCAweDhjLCAweDRjLCAweGNjLCAweDJjLCAweGFjLCAweDZjLCAweGVjLFxuICAgICAgICAweDFjLCAweDljLCAweDVjLCAweGRjLCAweDNjLCAweGJjLCAweDdjLCAweGZjLFxuICAgICAgICAweDAyLCAweDgyLCAweDQyLCAweGMyLCAweDIyLCAweGEyLCAweDYyLCAweGUyLFxuICAgICAgICAweDEyLCAweDkyLCAweDUyLCAweGQyLCAweDMyLCAweGIyLCAweDcyLCAweGYyLFxuICAgICAgICAweDBhLCAweDhhLCAweDRhLCAweGNhLCAweDJhLCAweGFhLCAweDZhLCAweGVhLFxuICAgICAgICAweDFhLCAweDlhLCAweDVhLCAweGRhLCAweDNhLCAweGJhLCAweDdhLCAweGZhLFxuICAgICAgICAweDA2LCAweDg2LCAweDQ2LCAweGM2LCAweDI2LCAweGE2LCAweDY2LCAweGU2LFxuICAgICAgICAweDE2LCAweDk2LCAweDU2LCAweGQ2LCAweDM2LCAweGI2LCAweDc2LCAweGY2LFxuICAgICAgICAweDBlLCAweDhlLCAweDRlLCAweGNlLCAweDJlLCAweGFlLCAweDZlLCAweGVlLFxuICAgICAgICAweDFlLCAweDllLCAweDVlLCAweGRlLCAweDNlLCAweGJlLCAweDdlLCAweGZlLFxuICAgICAgICAweDAxLCAweDgxLCAweDQxLCAweGMxLCAweDIxLCAweGExLCAweDYxLCAweGUxLFxuICAgICAgICAweDExLCAweDkxLCAweDUxLCAweGQxLCAweDMxLCAweGIxLCAweDcxLCAweGYxLFxuICAgICAgICAweDA5LCAweDg5LCAweDQ5LCAweGM5LCAweDI5LCAweGE5LCAweDY5LCAweGU5LFxuICAgICAgICAweDE5LCAweDk5LCAweDU5LCAweGQ5LCAweDM5LCAweGI5LCAweDc5LCAweGY5LFxuICAgICAgICAweDA1LCAweDg1LCAweDQ1LCAweGM1LCAweDI1LCAweGE1LCAweDY1LCAweGU1LFxuICAgICAgICAweDE1LCAweDk1LCAweDU1LCAweGQ1LCAweDM1LCAweGI1LCAweDc1LCAweGY1LFxuICAgICAgICAweDBkLCAweDhkLCAweDRkLCAweGNkLCAweDJkLCAweGFkLCAweDZkLCAweGVkLFxuICAgICAgICAweDFkLCAweDlkLCAweDVkLCAweGRkLCAweDNkLCAweGJkLCAweDdkLCAweGZkLFxuICAgICAgICAweDAzLCAweDgzLCAweDQzLCAweGMzLCAweDIzLCAweGEzLCAweDYzLCAweGUzLFxuICAgICAgICAweDEzLCAweDkzLCAweDUzLCAweGQzLCAweDMzLCAweGIzLCAweDczLCAweGYzLFxuICAgICAgICAweDBiLCAweDhiLCAweDRiLCAweGNiLCAweDJiLCAweGFiLCAweDZiLCAweGViLFxuICAgICAgICAweDFiLCAweDliLCAweDViLCAweGRiLCAweDNiLCAweGJiLCAweDdiLCAweGZiLFxuICAgICAgICAweDA3LCAweDg3LCAweDQ3LCAweGM3LCAweDI3LCAweGE3LCAweDY3LCAweGU3LFxuICAgICAgICAweDE3LCAweDk3LCAweDU3LCAweGQ3LCAweDM3LCAweGI3LCAweDc3LCAweGY3LFxuICAgICAgICA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HRtcDtcbiAgICAgICAgICAgIGZvcih0bXA9Y3VycmVudFRyZWU7dG1wPFBsYWNlczt0bXArKykge1xuICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIjB4JTAzeCAgMHglMDN4ICgweCUwNHgpXCIsdG1wLWN1cnJlbnRUcmVlLCB0bXAtPmp1bXA/dG1wLT5qdW1wLWN1cnJlbnRUcmVlOjAsKHRtcC0+anVtcD90bXAtPmp1bXAtY3VycmVudFRyZWU6MCkqNisweGNmMCk7XG4gICAgICAgICAgICAgICAgaWYoISh0bXAuYjAgJiAweDgwMDApKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vZnByaW50ZihzdGRvdXQsIFwiICAweCUwM3ggKCVjKVwiLCB0bXAtPmIwLCh0bXAtPmIwPDI1NiAmJiBpc3ByaW50KHRtcC0+YjApKT90bXAtPmIwOifvv70nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYoISh0bXAuYjEgJiAweDgwMDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmKCh0bXAuYjAgJiAweDgwMDApKVxuICAgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRvdXQsIFwiICAgICAgICAgICBcIik7XG4gICAgICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIiAgMHglMDN4ICglYylcIiwgdG1wLT5iMSwodG1wLT5iMTwyNTYgJiYgaXNwcmludCh0bXAtPmIxKSk/dG1wLT5iMTon77+9Jyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIlxcblwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSovXG4gICAgcmV0dXJuIDA7XG4gIH07XG5cbiAgZnVuY3Rpb24gRGVjb2RlVmFsdWUoY3VycmVudFRyZWUpIHtcbiAgICB2YXIgbGVuLCBpLFxuICAgICAgeHRyZWVwb3MgPSAwLFxuICAgICAgWCA9IGN1cnJlbnRUcmVlW3h0cmVlcG9zXSxcbiAgICAgIGI7XG5cbiAgICAvKiBkZWNvZGUgb25lIHN5bWJvbCBvZiB0aGUgZGF0YSAqL1xuICAgIHdoaWxlICgxKSB7XG4gICAgICBiID0gcmVhZEJpdCgpO1xuICAgICAgaWYgKGRlYnVnKVxuICAgICAgICBkb2N1bWVudC53cml0ZShcImI9XCIgKyBiKTtcbiAgICAgIGlmIChiKSB7XG4gICAgICAgIGlmICghKFguYjEgJiAweDgwMDApKSB7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCJyZXQxXCIpO1xuICAgICAgICAgIHJldHVybiBYLmIxOyAvKiBJZiBsZWFmIG5vZGUsIHJldHVybiBkYXRhICovXG4gICAgICAgIH1cbiAgICAgICAgWCA9IFguanVtcDtcbiAgICAgICAgbGVuID0gY3VycmVudFRyZWUubGVuZ3RoO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICBpZiAoY3VycmVudFRyZWVbaV0gPT09IFgpIHtcbiAgICAgICAgICAgIHh0cmVlcG9zID0gaTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvL3h0cmVlcG9zKys7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoIShYLmIwICYgMHg4MDAwKSkge1xuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwicmV0MlwiKTtcbiAgICAgICAgICByZXR1cm4gWC5iMDsgLyogSWYgbGVhZiBub2RlLCByZXR1cm4gZGF0YSAqL1xuICAgICAgICB9XG4gICAgICAgIC8vWCsrOyAvLz8/Pz8/Pz8/Pz8/Pz8/Pz8/P1xuICAgICAgICB4dHJlZXBvcysrO1xuICAgICAgICBYID0gY3VycmVudFRyZWVbeHRyZWVwb3NdO1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAoZGVidWcpXG4gICAgICBkb2N1bWVudC53cml0ZShcInJldDNcIik7XG4gICAgcmV0dXJuIC0xO1xuICB9O1xuXG4gIGZ1bmN0aW9uIERlZmxhdGVMb29wKCkge1xuICAgIHZhciBsYXN0LCBjLCB0eXBlLCBpLCBsZW47XG5cbiAgICBkbyB7XG4gICAgICAvKmlmKChsYXN0ID0gcmVhZEJpdCgpKSl7XG4gICAgICAgICAgICBmcHJpbnRmKGVycmZwLCBcIkxhc3QgQmxvY2s6IFwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGZwcmludGYoZXJyZnAsIFwiTm90IExhc3QgQmxvY2s6IFwiKTtcbiAgICAgICAgfSovXG4gICAgICBsYXN0ID0gcmVhZEJpdCgpO1xuICAgICAgdHlwZSA9IHJlYWRCaXRzKDIpO1xuICAgICAgc3dpdGNoICh0eXBlKSB7XG4gICAgICAgIGNhc2UgMDpcbiAgICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgICBhbGVydChcIlN0b3JlZFxcblwiKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwiRml4ZWQgSHVmZm1hbiBjb2Rlc1xcblwiKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAyOlxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwiRHluYW1pYyBIdWZmbWFuIGNvZGVzXFxuXCIpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJSZXNlcnZlZCBibG9jayB0eXBlISFcXG5cIik7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJVbmV4cGVjdGVkIHZhbHVlICVkIVxcblwiLCB0eXBlKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgaWYgKHR5cGUgPT0gMCkge1xuICAgICAgICB2YXIgYmxvY2tMZW4sIGNTdW07XG5cbiAgICAgICAgLy8gU3RvcmVkIFxuICAgICAgICBieXRlQWxpZ24oKTtcbiAgICAgICAgYmxvY2tMZW4gPSByZWFkQnl0ZSgpO1xuICAgICAgICBibG9ja0xlbiB8PSAocmVhZEJ5dGUoKSA8PCA4KTtcblxuICAgICAgICBjU3VtID0gcmVhZEJ5dGUoKTtcbiAgICAgICAgY1N1bSB8PSAocmVhZEJ5dGUoKSA8PCA4KTtcblxuICAgICAgICBpZiAoKChibG9ja0xlbiBeIH5jU3VtKSAmIDB4ZmZmZikpIHtcbiAgICAgICAgICBkb2N1bWVudC53cml0ZShcIkJsb2NrTGVuIGNoZWNrc3VtIG1pc21hdGNoXFxuXCIpO1xuICAgICAgICB9XG4gICAgICAgIHdoaWxlIChibG9ja0xlbi0tKSB7XG4gICAgICAgICAgYyA9IHJlYWRCeXRlKCk7XG4gICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKHR5cGUgPT0gMSkge1xuICAgICAgICB2YXIgajtcblxuICAgICAgICAvKiBGaXhlZCBIdWZmbWFuIHRhYmxlcyAtLSBmaXhlZCBkZWNvZGUgcm91dGluZSAqL1xuICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgMjU2ICAgIDAwMDAwMDAgICAgICAgIDBcbiAgICAgICAgICAgICAgICA6ICAgOiAgICAgOlxuICAgICAgICAgICAgICAgIDI3OSAgICAwMDEwMTExICAgICAgICAyM1xuICAgICAgICAgICAgICAgIDAgICAwMDExMDAwMCAgICA0OFxuICAgICAgICAgICAgICAgIDogICAgOiAgICAgIDpcbiAgICAgICAgICAgICAgICAxNDMgICAgMTAxMTExMTEgICAgMTkxXG4gICAgICAgICAgICAgICAgMjgwIDExMDAwMDAwICAgIDE5MlxuICAgICAgICAgICAgICAgIDogICAgOiAgICAgIDpcbiAgICAgICAgICAgICAgICAyODcgMTEwMDAxMTEgICAgMTk5XG4gICAgICAgICAgICAgICAgMTQ0ICAgIDExMDAxMDAwMCAgICA0MDBcbiAgICAgICAgICAgICAgICA6ICAgIDogICAgICAgOlxuICAgICAgICAgICAgICAgIDI1NSAgICAxMTExMTExMTEgICAgNTExXG4gICAgXG4gICAgICAgICAgICAgICAgTm90ZSB0aGUgYml0IG9yZGVyIVxuICAgICAgICAgICAgICAgICovXG5cbiAgICAgICAgICBqID0gKGJpdFJldmVyc2VbcmVhZEJpdHMoNyldID4+IDEpO1xuICAgICAgICAgIGlmIChqID4gMjMpIHtcbiAgICAgICAgICAgIGogPSAoaiA8PCAxKSB8IHJlYWRCaXQoKTsgLyogNDguLjI1NSAqL1xuXG4gICAgICAgICAgICBpZiAoaiA+IDE5OSkgeyAvKiAyMDAuLjI1NSAqL1xuICAgICAgICAgICAgICBqIC09IDEyODsgLyogIDcyLi4xMjcgKi9cbiAgICAgICAgICAgICAgaiA9IChqIDw8IDEpIHwgcmVhZEJpdCgpOyAvKiAxNDQuLjI1NSA8PCAqL1xuICAgICAgICAgICAgfSBlbHNlIHsgLyogIDQ4Li4xOTkgKi9cbiAgICAgICAgICAgICAgaiAtPSA0ODsgLyogICAwLi4xNTEgKi9cbiAgICAgICAgICAgICAgaWYgKGogPiAxNDMpIHtcbiAgICAgICAgICAgICAgICBqID0gaiArIDEzNjsgLyogMjgwLi4yODcgPDwgKi9cbiAgICAgICAgICAgICAgICAvKiAgIDAuLjE0MyA8PCAqL1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHsgLyogICAwLi4yMyAqL1xuICAgICAgICAgICAgaiArPSAyNTY7IC8qIDI1Ni4uMjc5IDw8ICovXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChqIDwgMjU2KSB7XG4gICAgICAgICAgICBhZGRCdWZmZXIoaik7XG4gICAgICAgICAgICAvL2RvY3VtZW50LndyaXRlKFwib3V0OlwiK1N0cmluZy5mcm9tQ2hhckNvZGUoaikpO1xuICAgICAgICAgICAgLypmcHJpbnRmKGVycmZwLCBcIkAlZCAlMDJ4XFxuXCIsIFNJWkUsIGopOyovXG4gICAgICAgICAgfSBlbHNlIGlmIChqID09IDI1Nikge1xuICAgICAgICAgICAgLyogRU9GICovXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGxlbiwgZGlzdDtcblxuICAgICAgICAgICAgaiAtPSAyNTYgKyAxOyAvKiBieXRlcyArIEVPRiAqL1xuICAgICAgICAgICAgbGVuID0gcmVhZEJpdHMoY3BsZXh0W2pdKSArIGNwbGVuc1tqXTtcblxuICAgICAgICAgICAgaiA9IGJpdFJldmVyc2VbcmVhZEJpdHMoNSldID4+IDM7XG4gICAgICAgICAgICBpZiAoY3BkZXh0W2pdID4gOCkge1xuICAgICAgICAgICAgICBkaXN0ID0gcmVhZEJpdHMoOCk7XG4gICAgICAgICAgICAgIGRpc3QgfD0gKHJlYWRCaXRzKGNwZGV4dFtqXSAtIDgpIDw8IDgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZGlzdCA9IHJlYWRCaXRzKGNwZGV4dFtqXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkaXN0ICs9IGNwZGlzdFtqXTtcblxuICAgICAgICAgICAgLypmcHJpbnRmKGVycmZwLCBcIkAlZCAobCUwMngsZCUwNHgpXFxuXCIsIFNJWkUsIGxlbiwgZGlzdCk7Ki9cbiAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBsZW47IGorKykge1xuICAgICAgICAgICAgICB2YXIgYyA9IGJ1ZjMya1soYklkeCAtIGRpc3QpICYgMHg3ZmZmXTtcbiAgICAgICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyB3aGlsZVxuICAgICAgfSBlbHNlIGlmICh0eXBlID09IDIpIHtcbiAgICAgICAgdmFyIGosIG4sIGxpdGVyYWxDb2RlcywgZGlzdENvZGVzLCBsZW5Db2RlcztcbiAgICAgICAgdmFyIGxsID0gbmV3IEFycmF5KDI4OCArIDMyKTsgLy8gXCJzdGF0aWNcIiBqdXN0IHRvIHByZXNlcnZlIHN0YWNrXG5cbiAgICAgICAgLy8gRHluYW1pYyBIdWZmbWFuIHRhYmxlcyBcblxuICAgICAgICBsaXRlcmFsQ29kZXMgPSAyNTcgKyByZWFkQml0cyg1KTtcbiAgICAgICAgZGlzdENvZGVzID0gMSArIHJlYWRCaXRzKDUpO1xuICAgICAgICBsZW5Db2RlcyA9IDQgKyByZWFkQml0cyg0KTtcbiAgICAgICAgLy9kb2N1bWVudC53cml0ZShcIjxicj5wYXJhbTogXCIrbGl0ZXJhbENvZGVzK1wiIFwiK2Rpc3RDb2RlcytcIiBcIitsZW5Db2RlcytcIjxicj5cIik7XG4gICAgICAgIGZvciAoaiA9IDA7IGogPCAxOTsgaisrKSB7XG4gICAgICAgICAgbGxbal0gPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gR2V0IHRoZSBkZWNvZGUgdHJlZSBjb2RlIGxlbmd0aHNcblxuICAgICAgICAvL2RvY3VtZW50LndyaXRlKFwiPGJyPlwiKTtcbiAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbkNvZGVzOyBqKyspIHtcbiAgICAgICAgICBsbFtib3JkZXJbal1dID0gcmVhZEJpdHMoMyk7XG4gICAgICAgICAgLy9kb2N1bWVudC53cml0ZShsbFtib3JkZXJbal1dK1wiIFwiKTtcbiAgICAgICAgfVxuICAgICAgICAvL2ZwcmludGYoZXJyZnAsIFwiXFxuXCIpO1xuICAgICAgICAvL2RvY3VtZW50LndyaXRlKCc8YnI+bGw6J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0gbGl0ZXJhbENvZGVzICsgZGlzdENvZGVzO1xuICAgICAgICBpID0gMDtcbiAgICAgICAgdmFyIHogPSAtMTtcbiAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwiPGJyPm49XCIgKyBuICsgXCIgYml0czogXCIgKyBiaXRzICsgXCI8YnI+XCIpO1xuICAgICAgICB3aGlsZSAoaSA8IG4pIHtcbiAgICAgICAgICB6Kys7XG4gICAgICAgICAgaiA9IERlY29kZVZhbHVlKGRpc3RhbmNlVHJlZSk7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCI8YnI+XCIgKyB6ICsgXCIgaTpcIiArIGkgKyBcIiBkZWNvZGU6IFwiICsgaiArIFwiICAgIGJpdHMgXCIgKyBiaXRzICsgXCI8YnI+XCIpO1xuICAgICAgICAgIGlmIChqIDwgMTYpIHsgLy8gbGVuZ3RoIG9mIGNvZGUgaW4gYml0cyAoMC4uMTUpXG4gICAgICAgICAgICBsbFtpKytdID0gajtcbiAgICAgICAgICB9IGVsc2UgaWYgKGogPT0gMTYpIHsgLy8gcmVwZWF0IGxhc3QgbGVuZ3RoIDMgdG8gNiB0aW1lcyBcbiAgICAgICAgICAgIHZhciBsO1xuICAgICAgICAgICAgaiA9IDMgKyByZWFkQml0cygyKTtcbiAgICAgICAgICAgIGlmIChpICsgaiA+IG4pIHtcbiAgICAgICAgICAgICAgZmx1c2hCdWZmZXIoKTtcbiAgICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsID0gaSA/IGxsW2kgLSAxXSA6IDA7XG4gICAgICAgICAgICB3aGlsZSAoai0tKSB7XG4gICAgICAgICAgICAgIGxsW2krK10gPSBsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoaiA9PSAxNykgeyAvLyAzIHRvIDEwIHplcm8gbGVuZ3RoIGNvZGVzXG4gICAgICAgICAgICAgIGogPSAzICsgcmVhZEJpdHMoMyk7XG4gICAgICAgICAgICB9IGVsc2UgeyAvLyBqID09IDE4OiAxMSB0byAxMzggemVybyBsZW5ndGggY29kZXMgXG4gICAgICAgICAgICAgIGogPSAxMSArIHJlYWRCaXRzKDcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGkgKyBqID4gbikge1xuICAgICAgICAgICAgICBmbHVzaEJ1ZmZlcigpO1xuICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdoaWxlIChqLS0pIHtcbiAgICAgICAgICAgICAgbGxbaSsrXSA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8qZm9yKGo9MDsgajxsaXRlcmFsQ29kZXMrZGlzdENvZGVzOyBqKyspIHtcbiAgICAgICAgICAgICAgICAvL2ZwcmludGYoZXJyZnAsIFwiJWQgXCIsIGxsW2pdKTtcbiAgICAgICAgICAgICAgICBpZiAoKGomNyk9PTcpXG4gICAgICAgICAgICAgICAgICAgIGZwcmludGYoZXJyZnAsIFwiXFxuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnByaW50ZihlcnJmcCwgXCJcXG5cIik7Ki9cbiAgICAgICAgLy8gQ2FuIG92ZXJ3cml0ZSB0cmVlIGRlY29kZSB0cmVlIGFzIGl0IGlzIG5vdCB1c2VkIGFueW1vcmVcbiAgICAgICAgbGVuID0gbGl0ZXJhbFRyZWUubGVuZ3RoO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspXG4gICAgICAgICAgbGl0ZXJhbFRyZWVbaV0gPSBuZXcgSHVmTm9kZSgpO1xuICAgICAgICBpZiAoQ3JlYXRlVHJlZShsaXRlcmFsVHJlZSwgbGl0ZXJhbENvZGVzLCBsbCwgMCkpIHtcbiAgICAgICAgICBmbHVzaEJ1ZmZlcigpO1xuICAgICAgICAgIHJldHVybiAxO1xuICAgICAgICB9XG4gICAgICAgIGxlbiA9IGxpdGVyYWxUcmVlLmxlbmd0aDtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSsrKVxuICAgICAgICAgIGRpc3RhbmNlVHJlZVtpXSA9IG5ldyBIdWZOb2RlKCk7XG4gICAgICAgIHZhciBsbDIgPSBuZXcgQXJyYXkoKTtcbiAgICAgICAgZm9yIChpID0gbGl0ZXJhbENvZGVzOyBpIDwgbGwubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICBsbDJbaSAtIGxpdGVyYWxDb2Rlc10gPSBsbFtpXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoQ3JlYXRlVHJlZShkaXN0YW5jZVRyZWUsIGRpc3RDb2RlcywgbGwyLCAwKSkge1xuICAgICAgICAgIGZsdXNoQnVmZmVyKCk7XG4gICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwiPGJyPmxpdGVyYWxUcmVlXCIpO1xuICAgICAgICBvdXRlcjogd2hpbGUgKDEpIHtcbiAgICAgICAgICBqID0gRGVjb2RlVmFsdWUobGl0ZXJhbFRyZWUpO1xuICAgICAgICAgIGlmIChqID49IDI1NikgeyAvLyBJbiBDNjQ6IGlmIGNhcnJ5IHNldFxuICAgICAgICAgICAgdmFyIGxlbiwgZGlzdDtcbiAgICAgICAgICAgIGogLT0gMjU2O1xuICAgICAgICAgICAgaWYgKGogPT0gMCkge1xuICAgICAgICAgICAgICAvLyBFT0ZcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBqLS07XG4gICAgICAgICAgICBsZW4gPSByZWFkQml0cyhjcGxleHRbal0pICsgY3BsZW5zW2pdO1xuXG4gICAgICAgICAgICBqID0gRGVjb2RlVmFsdWUoZGlzdGFuY2VUcmVlKTtcbiAgICAgICAgICAgIGlmIChjcGRleHRbal0gPiA4KSB7XG4gICAgICAgICAgICAgIGRpc3QgPSByZWFkQml0cyg4KTtcbiAgICAgICAgICAgICAgZGlzdCB8PSAocmVhZEJpdHMoY3BkZXh0W2pdIC0gOCkgPDwgOCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBkaXN0ID0gcmVhZEJpdHMoY3BkZXh0W2pdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpc3QgKz0gY3BkaXN0W2pdO1xuICAgICAgICAgICAgd2hpbGUgKGxlbi0tKSB7XG4gICAgICAgICAgICAgIGlmIChiSWR4IC0gZGlzdCA8IDApIHtcbiAgICAgICAgICAgICAgICBicmVhayBvdXRlcjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgYyA9IGJ1ZjMya1soYklkeCAtIGRpc3QpICYgMHg3ZmZmXTtcbiAgICAgICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBhZGRCdWZmZXIoaik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSB3aGlsZSAoIWxhc3QpO1xuICAgIGZsdXNoQnVmZmVyKCk7XG5cbiAgICBieXRlQWxpZ24oKTtcbiAgICByZXR1cm4gMDtcbiAgfTtcblxuICBKWEcuVXRpbC5VbnppcC5wcm90b3R5cGUudW56aXBGaWxlID0gZnVuY3Rpb24obmFtZSkge1xuICAgIHZhciBpO1xuICAgIHRoaXMudW56aXAoKTtcbiAgICAvL2FsZXJ0KHVuemlwcGVkWzBdWzFdKTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgdW56aXBwZWQubGVuZ3RoOyBpKyspIHtcbiAgICAgIGlmICh1bnppcHBlZFtpXVsxXSA9PSBuYW1lKSB7XG4gICAgICAgIHJldHVybiB1bnppcHBlZFtpXVswXTtcbiAgICAgIH1c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QnVmOiBcIiArIG5hbWVCdWYpO1xuXG4gICAgICAgIC8vbmFtZUJ1ZltpXSA9IFwiXFwwXCI7XG4gICAgICAgIGlmICghZmlsZW91dClcbiAgICAgICAgICBmaWxlb3V0ID0gbmFtZUJ1ZjtcblxuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIHdoaWxlIChpIDwgZXh0cmFsZW4pIHtcbiAgICAgICAgICBjID0gcmVhZEJ5dGUoKTtcbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBDUkMgPSAweGZmZmZmZmZmO1xuICAgICAgICBTSVpFID0gMDtcblxuICAgICAgICBpZiAoc2l6ZSA9IDAgJiYgZmlsZU91dC5jaGFyQXQoZmlsZW91dC5sZW5ndGggLSAxKSA9PSBcIi9cIikge1xuICAgICAgICAgIC8vc2tpcGRpclxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwic2tpcGRpclwiKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWV0aG9kID09IDgpIHtcbiAgICAgICAgICBEZWZsYXRlTG9vcCgpO1xuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KG91dHB1dEFyci5qb2luKCcnKSk7XG4gICAgICAgICAgdW56aXBwZWRbZmlsZXNdID0gbmV3IEFycmF5KDIpO1xuICAgICAgICAgIHVuemlwcGVkW2ZpbGVzXVswXSA9IG91dHB1dEFyci5qb2luKCcnKTtcbiAgICAgICAgICB1bnppcHBlZFtmaWxlc11bMV0gPSBuYW1lQnVmLmpvaW4oJycpO1xuICAgICAgICAgIGZpbGVzKys7XG4gICAgICAgICAgLy9yZXR1cm4gb3V0cHV0QXJyLmpvaW4oJycpO1xuICAgICAgICB9XG4gICAgICAgIHNraXBkaXIoKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZnVuY3Rpb24gc2tpcGRpcigpIHtcbiAgICB2YXIgY3JjLFxuICAgICAgdG1wID0gW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wgZGVjLmxlbmd0aDsgaSsrKSB7XG4gICAgICBhcltpXSA9IGRlYy5jaGFyQ29kZUF0KGkpO1xuICAgIH1cbiAgICByZXR1cm4gYXI7XG4gIH0sXG5cbiAgZGVjb2RlR0VPTkV4VDogZnVuY3Rpb24oaW5wdXQpIHtcbiAgICByZXR1cm4gZGVjb2RlQXNBcnJheShkZXN0cmlwKGlucHV0KSwgZmFsc2UpO1xuICB9XG59O1xuXG4vKipcbiAqIEBwcml2YXRlXG4gKi9cbkpYRy5VdGlsLmFzY2lpQ2hhckNvZGVBdCA9IGZ1bmN0aW9uKHN0ciwgaSkge1xuICB2YXIgYyA9IHN0ci5jaGFyQ29kZUF0KGkpO1xuICBpZiAoYyA+IDI1NSkge1xuICAgIHN3aXRjaCAoYykge1xuICAgICAgY2FzZSA4MzY0OlxuICAgICAgICBjID0gMTI4O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxODpcbiAgICAgICAgYyA9IDEzMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDQwMjpcbiAgICAgICAgYyA9IDEzMTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjI6XG4gICAgICAgIGMgPSAxMzI7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjMwOlxuICAgICAgICBjID0gMTMzO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIyNDpcbiAgICAgICAgYyA9IDEzNDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjU6XG4gICAgICAgIGMgPSAxMzU7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA3MTA6XG4gICAgICAgIGMgPSAxMzY7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjQwOlxuICAgICAgICBjID0gMTM3O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzUyOlxuICAgICAgICBjID0gMTM4O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODI0OTpcbiAgICAgICAgYyA9IDEzOTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDMzODpcbiAgICAgICAgYyA9IDE0MDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM4MTpcbiAgICAgICAgYyA9IDE0MjtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMTY6XG4gICAgICAgIGMgPSAxNDU7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjE3OlxuICAgICAgICBjID0gMTQ2O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIyMDpcbiAgICAgICAgYyA9IDE0NztcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjE6XG4gICAgICAgIGMgPSAxNDg7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjI2OlxuICAgICAgICBjID0gMTQ5O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxMTpcbiAgICAgICAgYyA9IDE1MDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMTI6XG4gICAgICAgIGMgPSAxNTE7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA3MzI6XG4gICAgICAgIGMgPSAxNTI7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4NDgyOlxuICAgICAgICBjID0gMTUzO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzUzOlxuICAgICAgICBjID0gMTU0O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODI1MDpcbiAgICAgICAgYyA9IDE1NTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDMzOTpcbiAgICAgICAgYyA9IDE1NjtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM4MjpcbiAgICAgICAgYyA9IDE1ODtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM3NjpcbiAgICAgICAgYyA9IDE1OTtcbiAgICAg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AgIGZvciAoaSA9IDA7IGkgPCBsZW5ndGg7IGkgKz0gY2hhclNpemUpIHtcbiAgICAgICAgYmluW2kgPj4gNV0gfD0gKHN0ci5jaGFyQ29kZUF0KGkgLyBjaGFyU2l6ZSkgJiBtYXNrKSA8PFxuICAgICAgICAgICgzMiAtIGNoYXJTaXplIC0gKGkgJSAzMikpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gYmluO1xuICAgIH0sXG5cbiAgICAvKlxuICAgICAqIENvbnZlcnQgYSBoZXggc3RyaW5nIHRvIGFuIGFycmF5IG9mIGJpZy1lbmRpYW4gd29yZHNcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBzdHIgU3RyaW5nIHRvIGJlIGNvbnZlcnRlZCB0byBiaW5hcnkgcmVwcmVzZW50YXRpb25cbiAgICAgKiBAcmV0dXJuIEludGVnZXIgYXJyYXkgcmVwcmVzZW50YXRpb24gb2YgdGhlIHBhcmFtZXRlclxuICAgICAqL1xuICAgIGhleDJiaW5iID0gZnVuY3Rpb24oc3RyKSB7XG4gICAgICB2YXIgYmluID0gW10sXG4gICAgICAgIGxlbmd0aCA9IHN0ci5sZW5ndGgsXG4gICAgICAgIGksIG51bTtcblxuICAgICAgZm9yIChpID0gMDsgaSA8IGxlbmd0aDsgaSArPSAyKSB7XG4gICAgICAgIG51bSA9IHBhcnNlSW50KHN0ci5zdWJzdHIoaSwgMiksIDE2KTtcbiAgICAgICAgaWYgKCFpc05hTihudW0pKSB7XG4gICAgICAgICAgYmluW2kgPj4gM10gfD0gbnVtIDw8ICgyNCAtICg0ICogKGkgJSA4KSkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiBcIklOVkFMSUQgSEVYIFNUUklOR1wiO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBiaW47XG4gICAgfSxcblxuICAgIC8qXG4gICAgICogQ29udmVydCBhbiBhcnJheSBvZiBiaWctZW5kaWFuIHdvcmR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ICAgICAgICBmID0gSFs1XTtcbiAgICAgICAgZyA9IEhbNl07XG4gICAgICAgIGggPSBIWzddO1xuXG4gICAgICAgIGZvciAodCA9IDA7IHQgPCBudW1Sb3VuZHM7IHQgKz0gMSkge1xuICAgICAgICAgIGlmICh0IDwgMTYpIHtcbiAgICAgICAgICAgIC8qIEJpdCBvZiBhIGhhY2sgLSBmb3IgMzItYml0LCB0aGUgc2Vjb25kIHRlcm0gaXMgaWdub3JlZCAqL1xuICAgICAgICAgICAgV1t0XSA9IG5ldyBJbnQobWVzc2FnZVt0ICogYmluYXJ5U3RyaW5nTXVsdCArIGldLFxuICAgICAgICAgICAgICBtZXNzYWdlW3QgKiBiaW5hcnlTdHJpbmdNdWx0ICsgaSArIDFdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgV1t0XSA9IHNhZmVBZGRfNChcbiAgICAgICAgICAgICAgZ2FtbWExKFdbdCAtIDJdKSwgV1t0IC0gN10sXG4gICAgICAgICAgICAgIGdhbW1hMChXW3QgLSAxNV0pLCBXW3QgLSAxNl0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIFQxID0gc2FmZUFkZF81KGgsIHNpZ21hMShlKSwgY2goZSwgZiwgZyksIEtbdF0sIFdbdF0pO1xuICAgICAgICAgIFQyID0gc2FmZUFkZF8yKHNpZ21hMChhKSwgbWFqKGEsIGIsIGMpKTtcbiAgICAgICAgICBoID0gZztcbiAgICAgICAgICBnID0gZjtcbiAgICAgICAgICBmID0gZTtcbiAgICAgICAgICBlID0gc2FmZUFkZF8yKGQsIFQxKTtcbiAgICAgICAgICBkID0gYztcbiAgICAgICAgICBjID0gYjtcbiAgICAgICAgICBiID0gYTtcbiAgICAgICAgICBhID0gc2FmZUFkZF8yKFQxLCBUMik7XG4gICAgICAgIH1cblxuICAgICAgICBIWzBdID0gc2FmZUFkZF8yKGEsIEhbMF0pO1xuICAgICAgICBIWzFdID0gc2FmZUFkZF8yKGIsIEhbMV0pO1xuICAgICAgICBIWzJdID0gc2FmZUFkZF8yKGMsIEhbMl0pO1xuICAgICAgICBIWzNdID0gc2FmZUFkZF8yKGQsIEhbM10pO1xuICAgICAgICBIWzRdID0gc2FmZUFkZF8yKGUsIEhbNF0pO1xuICAgICAgICBIWzVdID0gc2FmZUFkZF8yKGYsIEhbNV0pO1xuICAgICAgICBIWzZdID0gc2FmZUFkZF8yKGcsIEhbNl0pO1xuICAgICAgICBIWzddID0gc2FmZUFkZF8yKGgsIEhbN10pO1xuICAgICAgfVxuXG4gICAgICBzd2l0Y2ggKHZhcmlhbnQpIHtcbiAgICAgICAgY2FzZSBcIlNIQS0yMjRcIjpcbiAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgSFswXSwgSFsxXSwgSFsyXSwgSFszXSxcbiAgICAgICAgICAgIEhbNF0sIEhbNV0sIEhbNl1dO1xuICAgICAgICBjYXNlIFwiU0hBLTI1NlwiOlxuICAgICAgICAgIHJldHVybiBIO1xuICAgICAgICBjYXNlIFwiU0hBLTM4NFwiOlxuICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICBIWzBdLmhpZ2hPcmRlciwgSFswXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbMV0uaGlnaE9yZGVyLCBIWzFdLmxvd09yZGVyLFxuICAgICAgICAgICAgSFsyXS5oaWdoT3JkZXIsIEhbMl0ubG93T3JkZXIsXG4gICAgICAgICAgICBIWzNdLmhpZ2hPcmRlciwgSFszXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbNF0uaGlnaE9yZGVyLCBIWzRdLmxvd09yZGVyLFxuICAgICAgICAgICAgSFs1XS5oaWdoT3JkZXIsIEhbNV0ubG93T3JkZXJdO1xuICAgICAgICBjYXNlIFwiU0hBLTUxMlwiOlxuICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICBIWzBdLmhpZ2hPcmRlciwgSFswXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbMV0uaGlnaE9yZGVyLCBIWzFdL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ICBibG9ja0J5dGVTaXplID0gNjQ7XG4gICAgICAgICAgaGFzaEJpdFNpemUgPSAyNTY7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgXCJTSEEtMzg0XCI6XG4gICAgICAgICAgYmxvY2tCeXRlU2l6ZSA9IDEyODtcbiAgICAgICAgICBoYXNoQml0U2l6ZSA9IDM4NDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBcIlNIQS01MTJcIjpcbiAgICAgICAgICBibG9ja0J5dGVTaXplID0gMTI4O1xuICAgICAgICAgIGhhc2hCaXRTaXplID0gNTEyO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIHJldHVybiBcIkhBU0ggTk9UIFJFQ09HTklaRURcIjtcbiAgICAgIH1cblxuICAgICAgLyogVmFsaWRhdGUgaW5wdXQgZm9ybWF0IHNlbGVjdGlvbiAqL1xuICAgICAgaWYgKFwiSEVYXCIgPT09IGlucHV0Rm9ybWF0KSB7XG4gICAgICAgIC8qIE5pYmJsZXMgbXVzdCBjb21lIGluIHBhaXJzICovXG4gICAgICAgIGlmICgwICE9PSAoa2V5Lmxlbmd0aCAlIDIpKSB7XG4gICAgICAgICAgcmV0dXJuIFwiS0VZIE1VU1QgQkUgSU4gQllURSBJTkNSRU1FTlRTXCI7XG4gICAgICAgIH1cbiAgICAgICAga2V5VG9Vc2UgPSBoZXgyYmluYihrZXkpO1xuICAgICAgICBrZXlCaW5MZW4gPSBrZXkubGVuZ3RoICogNDtcbiAgICAgIH0gZWxzZSBpZiAoXCJBU0NJSVwiID09PSBpbnB1dEZvcm1hdCkge1xuICAgICAgICBrZXlUb1VzZSA9IHN0cjJiaW5iKGtleSk7XG4gICAgICAgIGtleUJpbkxlbiA9IGtleS5sZW5ndGggKiBjaGFyU2l6ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBcIlVOS05PV04gS0VZIElOUFVUIFRZUEVcIjtcbiA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pdChuLCBvcF9hbmRub3QpO1xufVxuXG4vLyAocHVibGljKSB0aGlzIF4gKDE8PG4pXG5cbmZ1bmN0aW9uIGJuRmxpcEJpdChuKSB7XG4gIHJldHVybiB0aGlzLmNoYW5nZUJpdChuLCBvcF94b3IpO1xufVxuXG4vLyAocHJvdGVjdGVkKSByID0gdGhpcyArIGFcblxuZnVuY3Rpb24gYm5wQWRkVG8oYSwgcikge1xuICB2YXIgaSA9IDAsXG4gICAgYyA9IDAsXG4gICAgbSA9IE1hdGgubWluKGEudCwgdGhpcy50KTtcbiAgd2hpbGUgKGkgPCBtKSB7XG4gICAgYyArPSB0aGlzW2ldICsgYVtpXTtcbiAgICByW2krK10gPSBjICYgdGhpcy5ETTtcbiAgICBjID4+PSB0aGlzLkRCO1xuICB9XG4gIGlmIChhLnQgPCB0aGlzLnQpIHtcbiAgICBjICs9IGEucztcbiAgICB3aGlsZSAoaSA8IHRoaXMudCkge1xuICAgICAgYyArPSB0aGlzW2ldO1xuICAgICAgcltpKytdID0gYyAmIHRoaXMuRE07XG4gICAgICBjID4+PSB0aGlzLkRCO1xuICAgIH1cbiAgICBjICs9IHRoaXMucztcbiAgfSBlbHNlIHtcbiAgICBjICs9IHRoaXMucztcbiAgICB3aGlsZSAoaSA8IGEudCkge1xuICAgICAgYyArPSBhW2ldO1xuICAgICAgcltpKytdID0gYyAmIHRoaXMuRE07XG4gICAgICBjID4+PSB0aGlzLkRCO1xuICAgIH1cbiAgICBjICs9IGEucztcbiAgfVxuICByLnMgPSAoYyA8IDApID8gLTEgOiAwO1xuICBpZiAoYyA+IDApIHJbaSsrXSA9IGM7XG4gIGVsc2UgaWYgKGMgPCAtMSkgcltpKytdID0gdGhpcy5EViArIGM7XG4gIHIudCA9IGk7XG4gIHIuY2xhbXAoKTtcbn1cblxuLy8gKHB1YmxpYykgdGhpcyArIGFcblxuZnVuY3Rpb24gYm5BZGQoYSkge1xuICB2YXIgciA9IG5iaSgpO1xuICB0aGlzLmFkZFRvKGEs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IChjICYgMTUpIDw8IDI7XG4gICAgfSBlbHNlIGlmIChzID09IDIpIHtcbiAgICAgIHIgKz0gYjY0cy5jaGFyQXQoYSB8ICgoYyA+PiA2KSAmIDMpKTtcbiAgICAgIGwgKz0gMTtcbiAgICAgIGlmICgobCAlIDYwKSA9PSAwKVxuICAgICAgICByICs9IFwiXFxuXCI7XG4gICAgICByICs9IGI2NHMuY2hhckF0KGMgJiA2Myk7XG4gICAgfVxuICAgIGwgKz0gMTtcbiAgICBpZiAoKGwgJSA2MCkgPT0gMClcbiAgICAgIHIgKz0gXCJcXG5cIjtcblxuICAgIHMgKz0gMTtcbiAgICBpZiAocyA9PSAzKVxuICAgICAgcyA9IDA7XG4gIH1cbiAgaWYgKHMgPiAwKSB7XG4gICAgciArPSBiNjRzLmNoYXJBdChhKTtcbiAgICBsICs9IDE7XG4gICAgaWYgKChsICUgNjApID09IDApXG4gICAgICByICs9IFwiXFxuXCI7XG4gICAgciArPSAnPSc7XG4gICAgbCArPSAxO1xuICB9XG4gIGlmIChzID09IDEpIHtcbiAgICBpZiAoKGwgJSA2MCkgPT0gMClcbiAgICAgIHIgKz0gXCJcXG5cIjtcbiAgICByICs9ICc9JztcbiAgfVxuXG4gIHJldHVybiByO1xufVxuXG5mdW5jdGlvbiByMnModCkge1xuICB2YXIgYywgbjtcbiAgdmFyIHIgPSAnJyxcbiAgICBzID0gMCxcbiAgICBhID0gMDtcbiAgdmFyIHRsID0gdC5sZW5ndGg7XG5cbiAgZm9yIChuID0gMDsgbiA8IHRsOyBuKyspIHtcbiAgICBjID0gYjY0cy5pbmRleE9mKHQuY2hhckF0KG4pKTtcbiAgICBpZiAoYyA+PSAwKSB7XG4gICAgICBpZiAocylcbiAgICAgICAgciArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGEgfCAoYyA+PiAoNiAtIHMpKSAmIDI1NSk7XG4gICAgICBzID0gKHMgKyAyKSAmIDc7XG4gICAgICBhID0gKGMgPDwgcykgJiAyNTU7XG4gICAg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zXG4gICAqIEByZXR1cm5zIHtbcHVibGljX3N1YmtleXxzZWNyZXRfc3Via2V5XX0gXG4gICAqL1xuICB0aGlzLmdldFN1YmtleVBhY2tldHMgPSBmdW5jdGlvbigpIHtcblxuICAgIHZhciBzdWJrZXlzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMucGFja2V0cy5sZW5ndGg7IGkrKykge1xuICAgICAgaWYgKHRoaXMucGFja2V0c1tpXS50YWcgPT0gZW51bXMucGFja2V0LnB1YmxpY19zdWJrZXkgfHxcbiAgICAgICAgdGhpcy5wYWNrZXRzW2ldLnRhZyA9PSBlbnVtcy5wYWNrZXQuc2VjcmV0X3N1YmtleSkge1xuICAgICAgICBzdWJrZXlzLnB1c2godGhpcy5wYWNrZXRzW2ldKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gc3Via2V5cztcbiAgfVxuXG4gIC8qKiBcbiAgICogUmV0dXJucyBhbGwgdGhlIHByaXZhdGUgYW5kIHB1YmxpYyBrZXkgYW5kIHN1YmtleSBwYWNrZXRzXG4gICAqIEByZXR1cm5zIHtbcHVibGljX3N1YmtleXxzZWNyZXRfc3Via2V5fHBhY2tldF9zZWNyZXRfa2V5fHBhY2tldF9wdWJsaWNfa2V5XX0gXG4gICAqL1xuICB0aGlzLmdldEFsbEtleVBhY2tldHMgPSBmdW5jdGlvbigpIHtcbiAgICByZXR1cm4gW3RoaXMuZ2V0S2V5UGFja2V0KCldLmNvbmNhdCh0aGlzLmdldFN1YmtleVBhY2tldHMoKSk7XG4gIH1cblxuICAvKiogXG4gICAqIFJldHVybnMga2V5IElEcyBvZiBhbGwga2V5IHBhY2tldHNcbiAgICogQHJldHVybnMge1trZXlpZF19IFxuICAgKi9cbiAgdGhpcy5nZXRLZXlJZHMgPSBmdW5jdGlvbigpIHtcbiAgICB2YXIga2V5SWRzID0gW107XG4gICAgdmFyIGtleXMgPSB0aGlzLmdldEFsbEtleVBhY2tldHMoKTtcbi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K10uY2hhckNvZGVBdCgpO1xuICAgICAgICAgICAgcGFja2V0X2xlbmd0aCArPSB0bXBsZW47XG4gICAgICAgICAgICBib2R5ZGF0YSArPSBpbnB1dC5zdWJzdHJpbmcobXlwb3MyLCBteXBvczIgKyB0bXBsZW4pO1xuICAgICAgICAgICAgbXlwb3MyICs9IHRtcGxlbjtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXRbbXlwb3MyXS5jaGFyQ29kZUF0KCkgPj0gMTkyICYmIGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpIDwgMjI0KSB7XG4gICAgICAgICAgICB2YXIgdG1wbGVuID0gKChpbnB1dFtteXBvczIrK10uY2hhckNvZGVBdCgpIC0gMTkyKSA8PCA4KSArIChpbnB1dFtteXBvczIrK10uY2hhckNvZGVBdCgpKSArIDE5MjtcbiAgICAgICAgICAgIHBhY2tldF9sZW5ndGggKz0gdG1wbGVuO1xuICAgICAgICAgICAgYm9keWRhdGEgKz0gaW5wdXQuc3Vic3RyaW5nKG15cG9zMiwgbXlwb3MyICsgdG1wbGVuKTtcbiAgICAgICAgICAgIG15cG9zMiArPSB0bXBsZW47XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpID4gMjIzICYmIGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpIDwgMjU1KSB7XG4gICAgICAgICAgICB2YXIgdG1wbGVuID0gMSA8PCAoaW5wdXRbbXlwb3MyKytdLmNoYXJDb2RlQXQoKSAmIDB4MUYpO1xuICAgICAgICAgICAgcGFja2V0X2xlbmd0aCArPSB0bXBsZW47XG4gICAgICAgICAgICBib2R5ZGF0YSArPSBpbnB1dC5zdWJzdHJpbmcobXlwb3MyLCBteXBvczIgKyB0bXBsZW4pO1xuICAgICAgICAgICAgbXlwb3MyICs9IHRtcGxlbjtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbXlwb3MyKys7XG4gICAgICAgICAgICB2YXIgdG1wbGVuID0gKGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCkgPDwgMjQpIHwgKGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCkgPDwgMTYpIHwgKGlucHV0W215cG9zMisrXVxuICAgICAgICAgICAgICAuY2hhckNvZGVBdCgpIDw8IDgpIHwgaW5wdXRbbXlwb3MyKytdLmNoYXJDb2RlQXQoKTtcbiAgICAgICAgICAgIGJvZHlkYXRhICs9IGlucHV0LnN1YnN0cmluZyhteXBvczIsIG15cG9zMiArIHRtcGxlbik7XG4gICAgICAgICAgICBwYWNrZXRfbGVuZ3RoICs9IHRtcGxlbjtcbiAgICAgICAgICAgIG15cG9zMiArPSB0bXBsZW47XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmVhbF9wYWNrZXRfbGVuZ3RoID0gbXlwb3MyO1xuICAgICAgICAvLyA0LjIuMi4zLiBGaXZlLU9jdGV0IExlbmd0aHNcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIG15cG9zKys7XG4gICAgICAgIHBhY2tldF9sZW5ndGggPSAoaW5wdXRbbXlwb3MrK10uY2hhckNvZGVBdCgpIDw8IDI0KSB8IChpbnB1dFtteXBvcysrXS5jaGFyQ29kZUF0KCkgPDwgMTYpIHwgKGlucHV0W215cG9zKytdLmNoYXJDb2RlQXQoKSA8PFxuICAgICAgICAgIDgpIHwgaW5wdXRbbXlwb3MrK10uY2hhckNvZGVBdCgpO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIGlmIHRoZXJlIHdhcydudCBhIHBhcnRpYWwgYm9keSBsZW5ndGg6IHVzZSB0aGUgc3BlY2lmaWVkXG4gICAgLy8gcGFja2V0X2xlbmd0aFxuICAgIGlmIChyZWFsX3BhY2tldF9sZW5ndGggPT0gLTEpIHtcbiAgICAgIHJlYWxfcGFja2V0X2xlbmd0aC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uY2hhckNvZGVBdCgpO1xuICAgICAgICB0aGlzLnRydXN0QW1vdW50ID0gYnl0ZXNbbXlwb3MrK10uY2hhckNvZGVBdCgpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgNjpcbiAgICAgICAgLy8gUmVndWxhciBFeHByZXNzaW9uXG4gICAgICAgIHRoaXMucmVndWxhckV4cHJlc3Npb24gPSBieXRlcy5zdWJzdHIobXlwb3MpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgNzpcbiAgICAgICAgLy8gUmV2b2NhYmxlXG4gICAgICAgIHRoaXMucmV2b2NhYmxlID0gYnl0ZXNbbXlwb3MrK10uY2hhckNvZGVBdCgpID09IDE7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA5OlxuICAgICAgICAvLyBLZXkgRXhwaXJhdGlvbiBUaW1lXG4gICAgICAgIHZhciB0aW1lID0gdXRpbC5yZWFkRGF0ZShieXRlcy5zdWJzdHIobXlwb3MpKTtcblxuICAgICAgICB0aGlzLmtleUV4cGlyYXRpb25UaW1lID0gdGltZTtcbiAgICAgICAgdGhpcy5rZXlOZXZlckV4cGlyZXMgPSB0aW1lLmdldFRpbWUoKSA9PSAwO1xuXG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAxMTpcbiAgICAgICAgLy8gUHJlZmVycmVkIFN5bW1ldHJpYyBBbGdvcml0aG1zXG4gICAgICAgIHRoaXMucHJlZmVycmVkU3ltbWV0cmljQWxnb3JpdGhtcyA9IFtdO1xuXG4gICAgICAgIHdoaWxlIChteXBvcyAhPSBieXRlcy5sZW5ndGgpIHtcbiAgICAgICAgICB0aGlzLnByZWZlcnJlZFN5bW1ldHJpY0FsZ29yaXRobXMucHVzaChieXRlc1tteXBvcysrXS5jaGFyQ29kZUF0KCkpO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDEyOlxuICAgICAgICAvLyBSZXZvY2F0aW9uIEtleVxuICAgICAgICAvLyA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AgICAgICdzdXBwbGllZCBmb3IgY2VydGlmaWNhdGlvbi4nKTtcblxuICAgICAgICAgIHZhciBieXRlcyA9IHBhY2tldC53cml0ZSgpO1xuXG4gICAgICAgICAgcmV0dXJuIHRoaXMudG9TaWduKHQua2V5LCBkYXRhKSArXG4gICAgICAgICAgICBTdHJpbmcuZnJvbUNoYXJDb2RlKHRhZykgK1xuICAgICAgICAgICAgdXRpbC53cml0ZU51bWJlcihieXRlcy5sZW5ndGgsIDQpICtcbiAgICAgICAgICAgIGJ5dGVzO1xuICAgICAgICB9XG4gICAgICBjYXNlIHQuc3Via2V5X2JpbmRpbmc6XG4gICAgICBjYXNlIHQua2V5X2JpbmRpbmc6XG4gICAgICAgIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy50b1NpZ24odC5rZXksIGRhdGEpICsgdGhpcy50b1NpZ24odC5rZXksIHtcbiAgICAgICAgICAgIGtleTogZGF0YS5iaW5kXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIGNhc2UgdC5rZXk6XG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoZGF0YS5rZXkgPT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdLZXkgcGFja2V0IGlzIHJlcXVpcmVkIGZvciB0aGlzIHNpZ3RhdHVyZS4nKTtcblxuICAgICAgICAgIHJldHVybiBkYXRhLmtleS53cml0ZU9sZCgpO1xuICAgICAgICB9XG4gICAgICBjYXNlIHQua2V5X3Jldm9jYXRpb246XG4gICAgICBjYXNlIHQuc3Via2V5X3Jldm9jYXRpb246XG4gICAgICAgIHJldHVybiB0aGlzLnRvU2lnbih0LmtleSwgZGF0YSk7XG4gICAgICBjYXNlIHQudGltZXN0YW1wOlxuICAgICAgICByZXR1cm4gJyc7XG4gICAgICBjYXNlIHQudGhyaWRfcGFydHk6XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignTm90IGltcGxlbWVudGVkJyk7XG4gICAgICAgIGJyZWF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tb2RlWklQID0gZmFsc2UsXG5cbiAgICBDUkMsIFNJWkUsXG5cbiAgICBiaXRSZXZlcnNlID0gW1xuICAgICAgICAweDAwLCAweDgwLCAweDQwLCAweGMwLCAweDIwLCAweGEwLCAweDYwLCAweGUwLFxuICAgICAgICAweDEwLCAweDkwLCAweDUwLCAweGQwLCAweDMwLCAweGIwLCAweDcwLCAweGYwLFxuICAgICAgICAweDA4LCAweDg4LCAweDQ4LCAweGM4LCAweDI4LCAweGE4LCAweDY4LCAweGU4LFxuICAgICAgICAweDE4LCAweDk4LCAweDU4LCAweGQ4LCAweDM4LCAweGI4LCAweDc4LCAweGY4LFxuICAgICAgICAweDA0LCAweDg0LCAweDQ0LCAweGM0LCAweDI0LCAweGE0LCAweDY0LCAweGU0LFxuICAgICAgICAweDE0LCAweDk0LCAweDU0LCAweGQ0LCAweDM0LCAweGI0LCAweDc0LCAweGY0LFxuICAgICAgICAweDBjLCAweDhjLCAweDRjLCAweGNjLCAweDJjLCAweGFjLCAweDZjLCAweGVjLFxuICAgICAgICAweDFjLCAweDljLCAweDVjLCAweGRjLCAweDNjLCAweGJjLCAweDdjLCAweGZjLFxuICAgICAgICAweDAyLCAweDgyLCAweDQyLCAweGMyLCAweDIyLCAweGEyLCAweDYyLCAweGUyLFxuICAgICAgICAweDEyLCAweDkyLCAweDUyLCAweGQyLCAweDMyLCAweGIyLCAweDcyLCAweGYyLFxuICAgICAgICAweDBhLCAweDhhLCAweDRhLCAweGNhLCAweDJhLCAweGFhLCAweDZhLCAweGVhLFxuICAgICAgICAweDFhLCAweDlhLCAweDVhLCAweGRhLCAweDNhLCAweGJhLCAweDdhLCAweGZhLFxuICAgICAgICAweDA2LCAweDg2LCAweDQ2LCAweGM2LCAweDI2LCAweGE2LCAweDY2LCAweGU2LFxuICAgICAgICAweDE2LCAweDk2LCAweDU2LCAweGQ2LCAweDM2LCAweGI2LCAweDc2LCAweGY2LFxuICAgICAgICAweDBlLCAweDhlLCAweDRlLCAweGNlLCAweDJlLCAweGFlLCAweDZlLCAweGVlLFxuICAgICAgICAweDFlLCAweDllLCAweDVlLCAweGRlLCAweDNlLCAweGJlLCAweDdlLCAweGZlLFxuICAgICAgICAweDAxLCAweDgxLCAweDQxLCAweGMxLCAweDIxLCAweGExLCAweDYxLCAweGUxLFxuICAgICAgICAweDExLCAweDkxLCAweDUxLCAweGQxLCAweDMxLCAweGIxLCAweDcxLCAweGYxLFxuICAgICAgICAweDA5LCAweDg5LCAweDQ5LCAweGM5LCAweDI5LCAweGE5LCAweDY5LCAweGU5LFxuICAgICAgICAweDE5LCAweDk5LCAweDU5LCAweGQ5LCAweDM5LCAweGI5LCAweDc5LCAweGY5LFxuICAgICAgICAweDA1LCAweDg1LCAweDQ1LCAweGM1LCAweDI1LCAweGE1LCAweDY1LCAweGU1LFxuICAgICAgICAweDE1LCAweDk1LCAweDU1LCAweGQ1LCAweDM1LCAweGI1LCAweDc1LCAweGY1LFxuICAgICAgICAweDBkLCAweDhkLCAweDRkLCAweGNkLCAweDJkLCAweGFkLCAweDZkLCAweGVkLFxuICAgICAgICAweDFkLCAweDlkLCAweDVkLCAweGRkLCAweDNkLCAweGJkLCAweDdkLCAweGZkLFxuICAgICAgICAweDAzLCAweDgzLCAweDQzLCAweGMzLCAweDIzLCAweGEzLCAweDYzLCAweGUzLFxuICAgICAgICAweDEzLCAweDkzLCAweDUzLCAweGQzLCAweDMzLCAweGIzLCAweDczLCAweGYzLFxuICAgICAgICAweDBiLCAweDhiLCAweDRiLCAweGNiLCAweDJiLCAweGFiLCAweDZiLCAweGViLFxuICAgICAgICAweDFiLCAweDliLCAweDViLCAweGRiLCAweDNiLCAweGJiLCAweDdiLCAweGZiLFxuICAgICAgICAweDA3LCAweDg3LCAweDQ3LCAweGM3LCAweDI3LCAweGE3LCAweDY3LCAweGU3LFxuICAgICAgICAweDE3LCAweDk3LCAweDU3LCAweGQ3LCAweDM3LCAweGI3LCAweDc3LCAweGY3LFxuICAgICAgICAweDBmLCAweDhmLCA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ICAgICAgIGZvcih0bXA9Y3VycmVudFRyZWU7dG1wPFBsYWNlczt0bXArKykge1xuICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIjB4JTAzeCAgMHglMDN4ICgweCUwNHgpXCIsdG1wLWN1cnJlbnRUcmVlLCB0bXAtPmp1bXA/dG1wLT5qdW1wLWN1cnJlbnRUcmVlOjAsKHRtcC0+anVtcD90bXAtPmp1bXAtY3VycmVudFRyZWU6MCkqNisweGNmMCk7XG4gICAgICAgICAgICAgICAgaWYoISh0bXAuYjAgJiAweDgwMDApKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vZnByaW50ZihzdGRvdXQsIFwiICAweCUwM3ggKCVjKVwiLCB0bXAtPmIwLCh0bXAtPmIwPDI1NiAmJiBpc3ByaW50KHRtcC0+YjApKT90bXAtPmIwOifvv70nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYoISh0bXAuYjEgJiAweDgwMDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmKCh0bXAuYjAgJiAweDgwMDApKVxuICAgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRvdXQsIFwiICAgICAgICAgICBcIik7XG4gICAgICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIiAgMHglMDN4ICglYylcIiwgdG1wLT5iMSwodG1wLT5iMTwyNTYgJiYgaXNwcmludCh0bXAtPmIxKSk/dG1wLT5iMTon77+9Jyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIlxcblwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSovXG4gICAgcmV0dXJuIDA7XG4gIH07XG5cbiAgZnVuY3Rpb24gRGVjb2RlVmFsdWUoY3VycmVudFRyZWUpIHtcbiAgICB2YXIgbGVuLCBpLFxuICAgICAgeHRyZWVwb3MgPSAwLFxuICAgICAgWCA9IGN1cnJlbnRUcmVlW3h0cmVlcG9zXSxcbiAgICAgIGI7XG5cbiAgICAvKiBkZWNvZGUgb25lIHN5bWJvbCBvZiB0aGUgZGF0YSAqL1xuICAgIHdoaWxlICgxKSB7XG4gICAgICBiID0gcmVhZEJpdCgpO1xuICAgICAgaWYgKGRlYnVnKVxuICAgICAgICBkb2N1bWVudC53cml0ZShcImI9XCIgKyBiKTtcbiAgICAgIGlmIChiKSB7XG4gICAgICAgIGlmICghKFguYjEgJiAweDgwMDApKSB7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCJyZXQxXCIpO1xuICAgICAgICAgIHJldHVybiBYLmIxOyAvKiBJZiBsZWFmIG5vZGUsIHJldHVybiBkYXRhICovXG4gICAgICAgIH1cbiAgICAgICAgWCA9IFguanVtcDtcbiAgICAgICAgbGVuID0gY3VycmVudFRyZWUubGVuZ3RoO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICBpZiAoY3VycmVudFRyZWVbaV0gPT09IFgpIHtcbiAgICAgICAgICAgIHh0cmVlcG9zID0gaTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvL3h0cmVlcG9zKys7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoIShYLmIwICYgMHg4MDAwKSkge1xuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwicmV0MlwiKTtcbiAgICAgICAgICByZXR1cm4gWC5iMDsgLyogSWYgbGVhZiBub2RlLCByZXR1cm4gZGF0YSAqL1xuICAgICAgICB9XG4gICAgICAgIC8vWCsrOyAvLz8/Pz8/Pz8/Pz8/Pz8/Pz8/P1xuICAgICAgICB4dHJlZXBvcysrO1xuICAgICAgICBYID0gY3VycmVudFRyZWVbeHRyZWVwb3NdO1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAoZGVidWcpXG4gICAgICBkb2N1bWVudC53cml0ZShcInJldDNcIik7XG4gICAgcmV0dXJuIC0xO1xuICB9O1xuXG4gIGZ1bmN0aW9uIERlZmxhdGVMb29wKCkge1xuICAgIHZhciBsYXN0LCBjLCB0eXBlLCBpLCBsZW47XG5cbiAgICBkbyB7XG4gICAgICAvKmlmKChsYXN0ID0gcmVhZEJpdCgpKSl7XG4gICAgICAgICAgICBmcHJpbnRmKGVycmZwLCBcIkxhc3QgQmxvY2s6IFwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGZwcmludGYoZXJyZnAsIFwiTm90IExhc3QgQmxvY2s6IFwiKTtcbiAgICAgICAgfSovXG4gICAgICBsYXN0ID0gcmVhZEJpdCgpO1xuICAgICAgdHlwZSA9IHJlYWRCaXRzKDIpO1xuICAgICAgc3dpdGNoICh0eXBlKSB7XG4gICAgICAgIGNhc2UgMDpcbiAgICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgICBhbGVydChcIlN0b3JlZFxcblwiKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwiRml4ZWQgSHVmZm1hbiBjb2Rlc1xcblwiKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAyOlxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwiRHluYW1pYyBIdWZmbWFuIGNvZGVzXFxuXCIpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJSZXNlcnZlZCBibG9jayB0eXBlISFcXG5cIik7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJVbmV4cGVjdGVkIHZhbHVlICVkIVxcblwiLCB0eXBlKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgaWYgKHR5cGUgPT0gMCkge1xuICAgICAgICB2YXIgYmxvY2tMZW4sIGNTdW07XG5cbiAgICAgICAgLy8gU3RvcmVkIFxuICAgICAgICBieXRlQWxpZ24oKTtcbiAgICAgICAgYmxvY2tMZW4gPSByZWFkQnl0ZSgpO1xuICAgICAgICBibG9ja0xlbiB8PSAocmVhZEJ5dGUoKSA8PCA4KTtcblxuICAgICAgICBjU3VtID0gcmVhZEJ5dGUoKTtcbiAgICAgICAgY1N1bSB8PSAocmVhZEJ5dGUoKSA8PCA4KTtcblxuICAgICAgICBpZiAoKChibG9ja0xlbiBeIH5jU3VtKSAmIDB4ZmZmZikpIHtcbiAgICAgICAgICBkb2N1bWVudC53cml0ZShcIkJsb2NrTGVuIGNoZWNrc3VtIG1pc21hdGNoXFxuXCIpO1xuICAgICAgICB9XG4gICAgICAgIHdoaWxlIChibG9ja0xlbi0tKSB7XG4gICAgICAgICAgYyA9IHJlYWRCeXRlKCk7XG4gICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKHR5cGUgPT0gMSkge1xuICAgICAgICB2YXIgajtcblxuICAgICAgICAvKiBGaXhlZCBIdWZmbWFuIHRhYmxlcyAtLSBmaXhlZCBkZWNvZGUgcm91dGluZSAqL1xuICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgMjU2ICAgIDAwMDAwMDAgICAgICAgIDBcbiAgICAgICAgICAgICAgICA6ICAgOiAgICAgOlxuICAgICAgICAgICAgICAgIDI3OSAgICAwMDEwMTExICAgICAgICAyM1xuICAgICAgICAgICAgICAgIDAgICAwMDExMDAwMCAgICA0OFxuICAgICAgICAgICAgICAgIDogICAgOiAgICAgIDpcbiAgICAgICAgICAgICAgICAxNDMgICAgMTAxMTExMTEgICAgMTkxXG4gICAgICAgICAgICAgICAgMjgwIDExMDAwMDAwICAgIDE5MlxuICAgICAgICAgICAgICAgIDogICAgOiAgICAgIDpcbiAgICAgICAgICAgICAgICAyODcgMTEwMDAxMTEgICAgMTk5XG4gICAgICAgICAgICAgICAgMTQ0ICAgIDExMDAxMDAwMCAgICA0MDBcbiAgICAgICAgICAgICAgICA6ICAgIDogICAgICAgOlxuICAgICAgICAgICAgICAgIDI1NSAgICAxMTExMTExMTEgICAgNTExXG4gICAgXG4gICAgICAgICAgICAgICAgTm90ZSB0aGUgYml0IG9yZGVyIVxuICAgICAgICAgICAgICAgICovXG5cbiAgICAgICAgICBqID0gKGJpdFJldmVyc2VbcmVhZEJpdHMoNyldID4+IDEpO1xuICAgICAgICAgIGlmIChqID4gMjMpIHtcbiAgICAgICAgICAgIGogPSAoaiA8PCAxKSB8IHJlYWRCaXQoKTsgLyogNDguLjI1NSAqL1xuXG4gICAgICAgICAgICBpZiAoaiA+IDE5OSkgeyAvKiAyMDAuLjI1NSAqL1xuICAgICAgICAgICAgICBqIC09IDEyODsgLyogIDcyLi4xMjcgKi9cbiAgICAgICAgICAgICAgaiA9IChqIDw8IDEpIHwgcmVhZEJpdCgpOyAvKiAxNDQuLjI1NSA8PCAqL1xuICAgICAgICAgICAgfSBlbHNlIHsgLyogIDQ4Li4xOTkgKi9cbiAgICAgICAgICAgICAgaiAtPSA0ODsgLyogICAwLi4xNTEgKi9cbiAgICAgICAgICAgICAgaWYgKGogPiAxNDMpIHtcbiAgICAgICAgICAgICAgICBqID0gaiArIDEzNjsgLyogMjgwLi4yODcgPDwgKi9cbiAgICAgICAgICAgICAgICAvKiAgIDAuLjE0MyA8PCAqL1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHsgLyogICAwLi4yMyAqL1xuICAgICAgICAgICAgaiArPSAyNTY7IC8qIDI1Ni4uMjc5IDw8ICovXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChqIDwgMjU2KSB7XG4gICAgICAgICAgICBhZGRCdWZmZXIoaik7XG4gICAgICAgICAgICAvL2RvY3VtZW50LndyaXRlKFwib3V0OlwiK1N0cmluZy5mcm9tQ2hhckNvZGUoaikpO1xuICAgICAgICAgICAgLypmcHJpbnRmKGVycmZwLCBcIkAlZCAlMDJ4XFxuXCIsIFNJWkUsIGopOyovXG4gICAgICAgICAgfSBlbHNlIGlmIChqID09IDI1Nikge1xuICAgICAgICAgICAgLyogRU9GICovXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGxlbiwgZGlzdDtcblxuICAgICAgICAgICAgaiAtPSAyNTYgKyAxOyAvKiBieXRlcyArIEVPRiAqL1xuICAgICAgICAgICAgbGVuID0gcmVhZEJpdHMoY3BsZXh0W2pdKSArIGNwbGVuc1tqXTtcblxuICAgICAgICAgICAgaiA9IGJpdFJldmVyc2VbcmVhZEJpdHMoNSldID4+IDM7XG4gICAgICAgICAgICBpZiAoY3BkZXh0W2pdID4gOCkge1xuICAgICAgICAgICAgICBkaXN0ID0gcmVhZEJpdHMoOCk7XG4gICAgICAgICAgICAgIGRpc3QgfD0gKHJlYWRCaXRzKGNwZGV4dFtqXSAtIDgpIDw8IDgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZGlzdCA9IHJlYWRCaXRzKGNwZGV4dFtqXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkaXN0ICs9IGNwZGlzdFtqXTtcblxuICAgICAgICAgICAgLypmcHJpbnRmKGVycmZwLCBcIkAlZCAobCUwMngsZCUwNHgpXFxuXCIsIFNJWkUsIGxlbiwgZGlzdCk7Ki9cbiAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBsZW47IGorKykge1xuICAgICAgICAgICAgICB2YXIgYyA9IGJ1ZjMya1soYklkeCAtIGRpc3QpICYgMHg3ZmZmXTtcbiAgICAgICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyB3aGlsZVxuICAgICAgfSBlbHNlIGlmICh0eXBlID09IDIpIHtcbiAgICAgICAgdmFyIGosIG4sIGxpdGVyYWxDb2RlcywgZGlzdENvZGVzLCBsZW5Db2RlcztcbiAgICAgICAgdmFyIGxsID0gbmV3IEFycmF5KDI4OCArIDMyKTsgLy8gXCJzdGF0aWNcIiBqdXN0IHRvIHByZXNlcnZlIHN0YWNrXG5cbiAgICAgICAgLy8gRHluYW1pYyBIdWZmbWFuIHRhYmxlcyBcblxuICAgICAgICBsaXRlcmFsQ29kZXMgPSAyNTcgKyByZWFkQml0cyg1KTtcbiAgICAgICAgZGlzdENvZGVzID0gMSArIHJlYWRCaXRzKDUpO1xuICAgICAgICBsZW5Db2RlcyA9IDQgKyByZWFkQml0cyg0KTtcbiAgICAgICAgLy9kb2N1bWVudC53cml0ZShcIjxicj5wYXJhbTogXCIrbGl0ZXJhbENvZGVzK1wiIFwiK2Rpc3RDb2RlcytcIiBcIitsZW5Db2RlcytcIjxicj5cIik7XG4gICAgICAgIGZvciAoaiA9IDA7IGogPCAxOTsgaisrKSB7XG4gICAgICAgICAgbGxbal0gPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gR2V0IHRoZSBkZWNvZGUgdHJlZSBjb2RlIGxlbmd0aHNcblxuICAgICAgICAvL2RvY3VtZW50LndyaXRlKFwiPGJyPlwiKTtcbiAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbkNvZGVzOyBqKyspIHtcbiAgICAgICAgICBsbFtib3JkZXJbal1dID0gcmVhZEJpdHMoMyk7XG4gICAgICAgICAgLy9kb2N1bWVudC53cml0ZShsbFtib3JkZXJbal1dK1wiIFwiKTtcbiAgICAgICAgfVxuICAgICAgICAvL2ZwcmludGYoZXJyZnAsIFwiXFxuXCIpO1xuICAgICAgICAvL2RvY3VtZW50LndyaXRlKCc8YnI+bGw6JytsbCk7XG4gICAgIC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ZGVzICsgZGlzdENvZGVzO1xuICAgICAgICBpID0gMDtcbiAgICAgICAgdmFyIHogPSAtMTtcbiAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwiPGJyPm49XCIgKyBuICsgXCIgYml0czogXCIgKyBiaXRzICsgXCI8YnI+XCIpO1xuICAgICAgICB3aGlsZSAoaSA8IG4pIHtcbiAgICAgICAgICB6Kys7XG4gICAgICAgICAgaiA9IERlY29kZVZhbHVlKGRpc3RhbmNlVHJlZSk7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCI8YnI+XCIgKyB6ICsgXCIgaTpcIiArIGkgKyBcIiBkZWNvZGU6IFwiICsgaiArIFwiICAgIGJpdHMgXCIgKyBiaXRzICsgXCI8YnI+XCIpO1xuICAgICAgICAgIGlmIChqIDwgMTYpIHsgLy8gbGVuZ3RoIG9mIGNvZGUgaW4gYml0cyAoMC4uMTUpXG4gICAgICAgICAgICBsbFtpKytdID0gajtcbiAgICAgICAgICB9IGVsc2UgaWYgKGogPT0gMTYpIHsgLy8gcmVwZWF0IGxhc3QgbGVuZ3RoIDMgdG8gNiB0aW1lcyBcbiAgICAgICAgICAgIHZhciBsO1xuICAgICAgICAgICAgaiA9IDMgKyByZWFkQml0cygyKTtcbiAgICAgICAgICAgIGlmIChpICsgaiA+IG4pIHtcbiAgICAgICAgICAgICAgZmx1c2hCdWZmZXIoKTtcbiAgICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsID0gaSA/IGxsW2kgLSAxXSA6IDA7XG4gICAgICAgICAgICB3aGlsZSAoai0tKSB7XG4gICAgICAgICAgICAgIGxsW2krK10gPSBsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoaiA9PSAxNykgeyAvLyAzIHRvIDEwIHplcm8gbGVuZ3RoIGNvZGVzXG4gICAgICAgICAgICAgIGogPSAzICsgcmVhZEJpdHMoMyk7XG4gICAgICAgICAgICB9IGVsc2UgeyAvLyBqID09IDE4OiAxMSB0byAxMzggemVybyBsZW5ndGggY29kZXMgXG4gICAgICAgICAgICAgIGogPSAxMSArIHJlYWRCaXRzKDcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGkgKyBqID4gbikge1xuICAgICAgICAgICAgICBmbHVzaEJ1ZmZlcigpO1xuICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdoaWxlIChqLS0pIHtcbiAgICAgICAgICAgICAgbGxbaSsrXSA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8qZm9yKGo9MDsgajxsaXRlcmFsQ29kZXMrZGlzdENvZGVzOyBqKyspIHtcbiAgICAgICAgICAgICAgICAvL2ZwcmludGYoZXJyZnAsIFwiJWQgXCIsIGxsW2pdKTtcbiAgICAgICAgICAgICAgICBpZiAoKGomNyk9PTcpXG4gICAgICAgICAgICAgICAgICAgIGZwcmludGYoZXJyZnAsIFwiXFxuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnByaW50ZihlcnJmcCwgXCJcXG5cIik7Ki9cbiAgICAgICAgLy8gQ2FuIG92ZXJ3cml0ZSB0cmVlIGRlY29kZSB0cmVlIGFzIGl0IGlzIG5vdCB1c2VkIGFueW1vcmVcbiAgICAgICAgbGVuID0gbGl0ZXJhbFRyZWUubGVuZ3RoO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspXG4gICAgICAgICAgbGl0ZXJhbFRyZWVbaV0gPSBuZXcgSHVmTm9kZSgpO1xuICAgICAgICBpZiAoQ3JlYXRlVHJlZShsaXRlcmFsVHJlZSwgbGl0ZXJhbENvZGVzLCBsbCwgMCkpIHtcbiAgICAgICAgICBmbHVzaEJ1ZmZlcigpO1xuICAgICAgICAgIHJldHVybiAxO1xuICAgICAgICB9XG4gICAgICAgIGxlbiA9IGxpdGVyYWxUcmVlLmxlbmd0aDtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSsrKVxuICAgICAgICAgIGRpc3RhbmNlVHJlZVtpXSA9IG5ldyBIdWZOb2RlKCk7XG4gICAgICAgIHZhciBsbDIgPSBuZXcgQXJyYXkoKTtcbiAgICAgICAgZm9yIChpID0gbGl0ZXJhbENvZGVzOyBpIDwgbGwubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICBsbDJbaSAtIGxpdGVyYWxDb2Rlc10gPSBsbFtpXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoQ3JlYXRlVHJlZShkaXN0YW5jZVRyZWUsIGRpc3RDb2RlcywgbGwyLCAwKSkge1xuICAgICAgICAgIGZsdXNoQnVmZmVyKCk7XG4gICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwiPGJyPmxpdGVyYWxUcmVlXCIpO1xuICAgICAgICBvdXRlcjogd2hpbGUgKDEpIHtcbiAgICAgICAgICBqID0gRGVjb2RlVmFsdWUobGl0ZXJhbFRyZWUpO1xuICAgICAgICAgIGlmIChqID49IDI1NikgeyAvLyBJbiBDNjQ6IGlmIGNhcnJ5IHNldFxuICAgICAgICAgICAgdmFyIGxlbiwgZGlzdDtcbiAgICAgICAgICAgIGogLT0gMjU2O1xuICAgICAgICAgICAgaWYgKGogPT0gMCkge1xuICAgICAgICAgICAgICAvLyBFT0ZcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBqLS07XG4gICAgICAgICAgICBsZW4gPSByZWFkQml0cyhjcGxleHRbal0pICsgY3BsZW5zW2pdO1xuXG4gICAgICAgICAgICBqID0gRGVjb2RlVmFsdWUoZGlzdGFuY2VUcmVlKTtcbiAgICAgICAgICAgIGlmIChjcGRleHRbal0gPiA4KSB7XG4gICAgICAgICAgICAgIGRpc3QgPSByZWFkQml0cyg4KTtcbiAgICAgICAgICAgICAgZGlzdCB8PSAocmVhZEJpdHMoY3BkZXh0W2pdIC0gOCkgPDwgOCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBkaXN0ID0gcmVhZEJpdHMoY3BkZXh0W2pdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpc3QgKz0gY3BkaXN0W2pdO1xuICAgICAgICAgICAgd2hpbGUgKGxlbi0tKSB7XG4gICAgICAgICAgICAgIGlmIChiSWR4IC0gZGlzdCA8IDApIHtcbiAgICAgICAgICAgICAgICBicmVhayBvdXRlcjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgYyA9IGJ1ZjMya1soYklkeCAtIGRpc3QpICYgMHg3ZmZmXTtcbiAgICAgICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBhZGRCdWZmZXIoaik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSB3aGlsZSAoIWxhc3QpO1xuICAgIGZsdXNoQnVmZmVyKCk7XG5cbiAgICBieXRlQWxpZ24oKTtcbiAgICByZXR1cm4gMDtcbiAgfTtcblxuICBKWEcuVXRpbC5VbnppcC5wcm90b3R5cGUudW56aXBGaWxlID0gZnVuY3Rpb24obmFtZSkge1xuICAgIHZhciBpO1xuICAgIHRoaXMudW56aXAoKTtcbiAgICAvL2FsZXJ0KHVuemlwcGVkWzBdWzFdKTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgdW56aXBwZWQubGVuZ3RoOyBpKyspIHtcbiAgICAgIGlmICh1bnppcHBlZFtpXVsxXSA9PSBuYW1lKSB7XG4gICAgICAgIHJldHVybiB1bnppcHBlZFtpXVswXTtcbiAgICAgIH1cbiAgICB9XG5cbiA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hbWVCdWYpO1xuXG4gICAgICAgIC8vbmFtZUJ1ZltpXSA9IFwiXFwwXCI7XG4gICAgICAgIGlmICghZmlsZW91dClcbiAgICAgICAgICBmaWxlb3V0ID0gbmFtZUJ1ZjtcblxuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIHdoaWxlIChpIDwgZXh0cmFsZW4pIHtcbiAgICAgICAgICBjID0gcmVhZEJ5dGUoKTtcbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBDUkMgPSAweGZmZmZmZmZmO1xuICAgICAgICBTSVpFID0gMDtcblxuICAgICAgICBpZiAoc2l6ZSA9IDAgJiYgZmlsZU91dC5jaGFyQXQoZmlsZW91dC5sZW5ndGggLSAxKSA9PSBcIi9cIikge1xuICAgICAgICAgIC8vc2tpcGRpclxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwic2tpcGRpclwiKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWV0aG9kID09IDgpIHtcbiAgICAgICAgICBEZWZsYXRlTG9vcCgpO1xuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KG91dHB1dEFyci5qb2luKCcnKSk7XG4gICAgICAgICAgdW56aXBwZWRbZmlsZXNdID0gbmV3IEFycmF5KDIpO1xuICAgICAgICAgIHVuemlwcGVkW2ZpbGVzXVswXSA9IG91dHB1dEFyci5qb2luKCcnKTtcbiAgICAgICAgICB1bnppcHBlZFtmaWxlc11bMV0gPSBuYW1lQnVmLmpvaW4oJycpO1xuICAgICAgICAgIGZpbGVzKys7XG4gICAgICAgICAgLy9yZXR1cm4gb3V0cHV0QXJyLmpvaW4oJycpO1xuICAgICAgICB9XG4gICAgICAgIHNraXBkaXIoKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZnVuY3Rpb24gc2tpcGRpcigpIHtcbiAgICB2YXIgY3JjLFxuICAgICAgdG1wID0gW10sXG4gICAgICBjb21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aDsgaSsrKSB7XG4gICAgICBhcltpXSA9IGRlYy5jaGFyQ29kZUF0KGkpO1xuICAgIH1cbiAgICByZXR1cm4gYXI7XG4gIH0sXG5cbiAgZGVjb2RlR0VPTkV4VDogZnVuY3Rpb24oaW5wdXQpIHtcbiAgICByZXR1cm4gZGVjb2RlQXNBcnJheShkZXN0cmlwKGlucHV0KSwgZmFsc2UpO1xuICB9XG59O1xuXG4vKipcbiAqIEBwcml2YXRlXG4gKi9cbkpYRy5VdGlsLmFzY2lpQ2hhckNvZGVBdCA9IGZ1bmN0aW9uKHN0ciwgaSkge1xuICB2YXIgYyA9IHN0ci5jaGFyQ29kZUF0KGkpO1xuICBpZiAoYyA+IDI1NSkge1xuICAgIHN3aXRjaCAoYykge1xuICAgICAgY2FzZSA4MzY0OlxuICAgICAgICBjID0gMTI4O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxODpcbiAgICAgICAgYyA9IDEzMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDQwMjpcbiAgICAgICAgYyA9IDEzMTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjI6XG4gICAgICAgIGMgPSAxMzI7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjMwOlxuICAgICAgICBjID0gMTMzO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIyNDpcbiAgICAgICAgYyA9IDEzNDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjU6XG4gICAgICAgIGMgPSAxMzU7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA3MTA6XG4gICAgICAgIGMgPSAxMzY7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjQwOlxuICAgICAgICBjID0gMTM3O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzUyOlxuICAgICAgICBjID0gMTM4O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODI0OTpcbiAgICAgICAgYyA9IDEzOTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDMzODpcbiAgICAgICAgYyA9IDE0MDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM4MTpcbiAgICAgICAgYyA9IDE0MjtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMTY6XG4gICAgICAgIGMgPSAxNDU7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjE3OlxuICAgICAgICBjID0gMTQ2O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIyMDpcbiAgICAgICAgYyA9IDE0NztcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjE6XG4gICAgICAgIGMgPSAxNDg7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjI2OlxuICAgICAgICBjID0gMTQ5O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxMTpcbiAgICAgICAgYyA9IDE1MDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMTI6XG4gICAgICAgIGMgPSAxNTE7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA3MzI6XG4gICAgICAgIGMgPSAxNTI7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4NDgyOlxuICAgICAgICBjID0gMTUzO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzUzOlxuICAgICAgICBjID0gMTU0O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODI1MDpcbiAgICAgICAgYyA9IDE1NTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDMzOTpcbiAgICAgICAgYyA9IDE1NjtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM4MjpcbiAgICAgICAgYyA9IDE1ODtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM3NjpcbiAgICAgICAgYyA9IDE1OTtcbiAgICAgICAgYnJlYWs7XG4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AwLCA4LCAxMF1cbiAgICBdO1xuICAgIHZhciByb3I0ID0gWzAsIDgsIDEsIDksIDIsIDEwLCAzLCAxMSwgNCwgMTIsIDUsIDEzLCA2LCAxNCwgNywgMTVdO1xuICAgIHZhciBhc2h4ID0gWzAsIDksIDIsIDExLCA0LCAxMywgNiwgMTUsIDgsIDEsIDEwLCAzLCAxMiwgNSwgMTQsIDddO1xuICAgIHZhciBxID0gW1xuICAgICAgW10sXG4gICAgICBbXVxuICAgIF07XG4gICAgdmFyIG0gPSBbXG4gICAgICBbXSxcbiAgICAgIFtdLFxuICAgICAgW10sXG4gICAgICBbXVxuICAgIF07XG5cbiAgICBmdW5jdGlvbiBmZm01Yih4KSB7XG4gICAgICByZXR1cm4geCBeICh4ID4+IDIpIF4gWzAsIDkwLCAxODAsIDIzOF1beCAmIDNdO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGZmbUVmKHgpIHtcbiAgICAgIHJldHVybiB4IF4gKHggPj4gMSkgXiAoeCA+PiAyKSBeIFswLCAyMzgsIDE4MCwgOTBdW3ggJiAzXTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBtZHNSZW0ocCwgcSkge1xuICAgICAgdmFyIGksIHQsIHU7XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgODsgaSsrKSB7XG4gICAgICAgIHQgPSBxID4+PiAyNDtcbiAgICAgICAgcSA9ICgocSA8PCA4KSAmIE1BWElOVCkgfCBwID4+PiAyNDtcbiAgICAgICAgcCA9IChwIDw8IDgpICYgTUFYSU5UO1xuICAgICAgICB1ID0gdCA8PCAxO1xuICAgICAgICBpZiAodCAmIDEyOCkge1xuICAgICAgICAgIHUgXj0gMzMzO1xuICAgICAgICB9XG4gICAgICAgIHEgXj0gdCBeICh1IDw8IDE2KTtcbiAgICAgICAgdSBePSB0ID4+PiAxO1xuICAgICAgICBpZiAodCAmIDEpIHtcbiAgICAgICAgICB1IF49IDE2NjtcbiAgICAgICAgfVxuICAgICAgICBxIF49IHUgPD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DA7IGkgPCBsZW5ndGg7IGkgKz0gY2hhclNpemUpIHtcbiAgICAgICAgYmluW2kgPj4gNV0gfD0gKHN0ci5jaGFyQ29kZUF0KGkgLyBjaGFyU2l6ZSkgJiBtYXNrKSA8PFxuICAgICAgICAgICgzMiAtIGNoYXJTaXplIC0gKGkgJSAzMikpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gYmluO1xuICAgIH0sXG5cbiAgICAvKlxuICAgICAqIENvbnZlcnQgYSBoZXggc3RyaW5nIHRvIGFuIGFycmF5IG9mIGJpZy1lbmRpYW4gd29yZHNcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBzdHIgU3RyaW5nIHRvIGJlIGNvbnZlcnRlZCB0byBiaW5hcnkgcmVwcmVzZW50YXRpb25cbiAgICAgKiBAcmV0dXJuIEludGVnZXIgYXJyYXkgcmVwcmVzZW50YXRpb24gb2YgdGhlIHBhcmFtZXRlclxuICAgICAqL1xuICAgIGhleDJiaW5iID0gZnVuY3Rpb24oc3RyKSB7XG4gICAgICB2YXIgYmluID0gW10sXG4gICAgICAgIGxlbmd0aCA9IHN0ci5sZW5ndGgsXG4gICAgICAgIGksIG51bTtcblxuICAgICAgZm9yIChpID0gMDsgaSA8IGxlbmd0aDsgaSArPSAyKSB7XG4gICAgICAgIG51bSA9IHBhcnNlSW50KHN0ci5zdWJzdHIoaSwgMiksIDE2KTtcbiAgICAgICAgaWYgKCFpc05hTihudW0pKSB7XG4gICAgICAgICAgYmluW2kgPj4gM10gfD0gbnVtIDw8ICgyNCAtICg0ICogKGkgJSA4KSkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiBcIklOVkFMSUQgSEVYIFNUUklOR1wiO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBiaW47XG4gICAgfSxcblxuICAgIC8qXG4gICAgICogQ29udmVydCBhbiBhcnJheSBvZiBiaWctZW5kaWFuIHdvcmRzIHRvIGEgaGV4I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s1XTtcbiAgICAgICAgZyA9IEhbNl07XG4gICAgICAgIGggPSBIWzddO1xuXG4gICAgICAgIGZvciAodCA9IDA7IHQgPCBudW1Sb3VuZHM7IHQgKz0gMSkge1xuICAgICAgICAgIGlmICh0IDwgMTYpIHtcbiAgICAgICAgICAgIC8qIEJpdCBvZiBhIGhhY2sgLSBmb3IgMzItYml0LCB0aGUgc2Vjb25kIHRlcm0gaXMgaWdub3JlZCAqL1xuICAgICAgICAgICAgV1t0XSA9IG5ldyBJbnQobWVzc2FnZVt0ICogYmluYXJ5U3RyaW5nTXVsdCArIGldLFxuICAgICAgICAgICAgICBtZXNzYWdlW3QgKiBiaW5hcnlTdHJpbmdNdWx0ICsgaSArIDFdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgV1t0XSA9IHNhZmVBZGRfNChcbiAgICAgICAgICAgICAgZ2FtbWExKFdbdCAtIDJdKSwgV1t0IC0gN10sXG4gICAgICAgICAgICAgIGdhbW1hMChXW3QgLSAxNV0pLCBXW3QgLSAxNl0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIFQxID0gc2FmZUFkZF81KGgsIHNpZ21hMShlKSwgY2goZSwgZiwgZyksIEtbdF0sIFdbdF0pO1xuICAgICAgICAgIFQyID0gc2FmZUFkZF8yKHNpZ21hMChhKSwgbWFqKGEsIGIsIGMpKTtcbiAgICAgICAgICBoID0gZztcbiAgICAgICAgICBnID0gZjtcbiAgICAgICAgICBmID0gZTtcbiAgICAgICAgICBlID0gc2FmZUFkZF8yKGQsIFQxKTtcbiAgICAgICAgICBkID0gYztcbiAgICAgICAgICBjID0gYjtcbiAgICAgICAgICBiID0gYTtcbiAgICAgICAgICBhID0gc2FmZUFkZF8yKFQxLCBUMik7XG4gICAgICAgIH1cblxuICAgICAgICBIWzBdID0gc2FmZUFkZF8yKGEsIEhbMF0pO1xuICAgICAgICBIWzFdID0gc2FmZUFkZF8yKGIsIEhbMV0pO1xuICAgICAgICBIWzJdID0gc2FmZUFkZF8yKGMsIEhbMl0pO1xuICAgICAgICBIWzNdID0gc2FmZUFkZF8yKGQsIEhbM10pO1xuICAgICAgICBIWzRdID0gc2FmZUFkZF8yKGUsIEhbNF0pO1xuICAgICAgICBIWzVdID0gc2FmZUFkZF8yKGYsIEhbNV0pO1xuICAgICAgICBIWzZdID0gc2FmZUFkZF8yKGcsIEhbNl0pO1xuICAgICAgICBIWzddID0gc2FmZUFkZF8yKGgsIEhbN10pO1xuICAgICAgfVxuXG4gICAgICBzd2l0Y2ggKHZhcmlhbnQpIHtcbiAgICAgICAgY2FzZSBcIlNIQS0yMjRcIjpcbiAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgSFswXSwgSFsxXSwgSFsyXSwgSFszXSxcbiAgICAgICAgICAgIEhbNF0sIEhbNV0sIEhbNl1dO1xuICAgICAgICBjYXNlIFwiU0hBLTI1NlwiOlxuICAgICAgICAgIHJldHVybiBIO1xuICAgICAgICBjYXNlIFwiU0hBLTM4NFwiOlxuICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICBIWzBdLmhpZ2hPcmRlciwgSFswXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbMV0uaGlnaE9yZGVyLCBIWzFdLmxvd09yZGVyLFxuICAgICAgICAgICAgSFsyXS5oaWdoT3JkZXIsIEhbMl0ubG93T3JkZXIsXG4gICAgICAgICAgICBIWzNdLmhpZ2hPcmRlciwgSFszXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbNF0uaGlnaE9yZGVyLCBIWzRdLmxvd09yZGVyLFxuICAgICAgICAgICAgSFs1XS5oaWdoT3JkZXIsIEhbNV0ubG93T3JkZXJdO1xuICAgICAgICBjYXNlIFwiU0hBLTUxMlwiOlxuICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICBIWzBdLmhpZ2hPcmRlciwgSFswXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbMV0uaGlnaE9yZGVyLCBIWzFdLmxvd09yZGVyLFxu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aXplID0gNjQ7XG4gICAgICAgICAgaGFzaEJpdFNpemUgPSAyNTY7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgXCJTSEEtMzg0XCI6XG4gICAgICAgICAgYmxvY2tCeXRlU2l6ZSA9IDEyODtcbiAgICAgICAgICBoYXNoQml0U2l6ZSA9IDM4NDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBcIlNIQS01MTJcIjpcbiAgICAgICAgICBibG9ja0J5dGVTaXplID0gMTI4O1xuICAgICAgICAgIGhhc2hCaXRTaXplID0gNTEyO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIHJldHVybiBcIkhBU0ggTk9UIFJFQ09HTklaRURcIjtcbiAgICAgIH1cblxuICAgICAgLyogVmFsaWRhdGUgaW5wdXQgZm9ybWF0IHNlbGVjdGlvbiAqL1xuICAgICAgaWYgKFwiSEVYXCIgPT09IGlucHV0Rm9ybWF0KSB7XG4gICAgICAgIC8qIE5pYmJsZXMgbXVzdCBjb21lIGluIHBhaXJzICovXG4gICAgICAgIGlmICgwICE9PSAoa2V5Lmxlbmd0aCAlIDIpKSB7XG4gICAgICAgICAgcmV0dXJuIFwiS0VZIE1VU1QgQkUgSU4gQllURSBJTkNSRU1FTlRTXCI7XG4gICAgICAgIH1cbiAgICAgICAga2V5VG9Vc2UgPSBoZXgyYmluYihrZXkpO1xuICAgICAgICBrZXlCaW5MZW4gPSBrZXkubGVuZ3RoICogNDtcbiAgICAgIH0gZWxzZSBpZiAoXCJBU0NJSVwiID09PSBpbnB1dEZvcm1hdCkge1xuICAgICAgICBrZXlUb1VzZSA9IHN0cjJiaW5iKGtleSk7XG4gICAgICAgIGtleUJpbkxlbiA9IGtleS5sZW5ndGggKiBjaGFyU2l6ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBcIlVOS05PV04gS0VZIElOUFVUIFRZUEVcIjtcbiAgICAgIH1cblxuICAg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Rub3QpO1xufVxuXG4vLyAocHVibGljKSB0aGlzIF4gKDE8PG4pXG5cbmZ1bmN0aW9uIGJuRmxpcEJpdChuKSB7XG4gIHJldHVybiB0aGlzLmNoYW5nZUJpdChuLCBvcF94b3IpO1xufVxuXG4vLyAocHJvdGVjdGVkKSByID0gdGhpcyArIGFcblxuZnVuY3Rpb24gYm5wQWRkVG8oYSwgcikge1xuICB2YXIgaSA9IDAsXG4gICAgYyA9IDAsXG4gICAgbSA9IE1hdGgubWluKGEudCwgdGhpcy50KTtcbiAgd2hpbGUgKGkgPCBtKSB7XG4gICAgYyArPSB0aGlzW2ldICsgYVtpXTtcbiAgICByW2krK10gPSBjICYgdGhpcy5ETTtcbiAgICBjID4+PSB0aGlzLkRCO1xuICB9XG4gIGlmIChhLnQgPCB0aGlzLnQpIHtcbiAgICBjICs9IGEucztcbiAgICB3aGlsZSAoaSA8IHRoaXMudCkge1xuICAgICAgYyArPSB0aGlzW2ldO1xuICAgICAgcltpKytdID0gYyAmIHRoaXMuRE07XG4gICAgICBjID4+PSB0aGlzLkRCO1xuICAgIH1cbiAgICBjICs9IHRoaXMucztcbiAgfSBlbHNlIHtcbiAgICBjICs9IHRoaXMucztcbiAgICB3aGlsZSAoaSA8IGEudCkge1xuICAgICAgYyArPSBhW2ldO1xuICAgICAgcltpKytdID0gYyAmIHRoaXMuRE07XG4gICAgICBjID4+PSB0aGlzLkRCO1xuICAgIH1cbiAgICBjICs9IGEucztcbiAgfVxuICByLnMgPSAoYyA8IDApID8gLTEgOiAwO1xuICBpZiAoYyA+IDApIHJbaSsrXSA9IGM7XG4gIGVsc2UgaWYgKGMgPCAtMSkgcltpKytdID0gdGhpcy5EViArIGM7XG4gIHIudCA9IGk7XG4gIHIuY2xhbXAoKTtcbn1cblxuLy8gKHB1YmxpYykgdGhpcyArIGFcblxuZnVuY3Rpb24gYm5BZGQoYSkge1xuICB2YXIgciA9IG5iaSgpO1xuICB0aGlzLmFkZFRvKGEsIHIpO1xuICByZXR1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IDI7XG4gICAgfSBlbHNlIGlmIChzID09IDIpIHtcbiAgICAgIHIgKz0gYjY0cy5jaGFyQXQoYSB8ICgoYyA+PiA2KSAmIDMpKTtcbiAgICAgIGwgKz0gMTtcbiAgICAgIGlmICgobCAlIDYwKSA9PSAwKVxuICAgICAgICByICs9IFwiXFxuXCI7XG4gICAgICByICs9IGI2NHMuY2hhckF0KGMgJiA2Myk7XG4gICAgfVxuICAgIGwgKz0gMTtcbiAgICBpZiAoKGwgJSA2MCkgPT0gMClcbiAgICAgIHIgKz0gXCJcXG5cIjtcblxuICAgIHMgKz0gMTtcbiAgICBpZiAocyA9PSAzKVxuICAgICAgcyA9IDA7XG4gIH1cbiAgaWYgKHMgPiAwKSB7XG4gICAgciArPSBiNjRzLmNoYXJBdChhKTtcbiAgICBsICs9IDE7XG4gICAgaWYgKChsICUgNjApID09IDApXG4gICAgICByICs9IFwiXFxuXCI7XG4gICAgciArPSAnPSc7XG4gICAgbCArPSAxO1xuICB9XG4gIGlmIChzID09IDEpIHtcbiAgICBpZiAoKGwgJSA2MCkgPT0gMClcbiAgICAgIHIgKz0gXCJcXG5cIjtcbiAgICByICs9ICc9JztcbiAgfVxuXG4gIHJldHVybiByO1xufVxuXG5mdW5jdGlvbiByMnModCkge1xuICB2YXIgYywgbjtcbiAgdmFyIHIgPSAnJyxcbiAgICBzID0gMCxcbiAgICBhID0gMDtcbiAgdmFyIHRsID0gdC5sZW5ndGg7XG5cbiAgZm9yIChuID0gMDsgbiA8IHRsOyBuKyspIHtcbiAgICBjID0gYjY0cy5pbmRleE9mKHQuY2hhckF0KG4pKTtcbiAgICBpZiAoYyA+PSAwKSB7XG4gICAgICBpZiAocylcbiAgICAgICAgciArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGEgfCAoYyA+PiAoNiAtIHMpKSAmIDI1NSk7XG4gICAgICBzID0gKHMgKyAyKSAmIDc7XG4gICAgICBhID0gKGMgPDwgcykgJiAyNTU7XG4gICAgfVxuICB9XG4gIHJ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1cm5zIHtbcHVibGljX3N1YmtleXxzZWNyZXRfc3Via2V5XX0gXG4gICAqL1xuICB0aGlzLmdldFN1YmtleVBhY2tldHMgPSBmdW5jdGlvbigpIHtcblxuICAgIHZhciBzdWJrZXlzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMucGFja2V0cy5sZW5ndGg7IGkrKykge1xuICAgICAgaWYgKHRoaXMucGFja2V0c1tpXS50YWcgPT0gZW51bXMucGFja2V0LnB1YmxpY19zdWJrZXkgfHxcbiAgICAgICAgdGhpcy5wYWNrZXRzW2ldLnRhZyA9PSBlbnVtcy5wYWNrZXQuc2VjcmV0X3N1YmtleSkge1xuICAgICAgICBzdWJrZXlzLnB1c2godGhpcy5wYWNrZXRzW2ldKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gc3Via2V5cztcbiAgfVxuXG4gIC8qKiBcbiAgICogUmV0dXJucyBhbGwgdGhlIHByaXZhdGUgYW5kIHB1YmxpYyBrZXkgYW5kIHN1YmtleSBwYWNrZXRzXG4gICAqIEByZXR1cm5zIHtbcHVibGljX3N1YmtleXxzZWNyZXRfc3Via2V5fHBhY2tldF9zZWNyZXRfa2V5fHBhY2tldF9wdWJsaWNfa2V5XX0gXG4gICAqL1xuICB0aGlzLmdldEFsbEtleVBhY2tldHMgPSBmdW5jdGlvbigpIHtcbiAgICByZXR1cm4gW3RoaXMuZ2V0S2V5UGFja2V0KCldLmNvbmNhdCh0aGlzLmdldFN1YmtleVBhY2tldHMoKSk7XG4gIH1cblxuICAvKiogXG4gICAqIFJldHVybnMga2V5IElEcyBvZiBhbGwga2V5IHBhY2tldHNcbiAgICogQHJldHVybnMge1trZXlpZF19IFxuICAgKi9cbiAgdGhpcy5nZXRLZXlJZHMgPSBmdW5jdGlvbigpIHtcbiAgICB2YXIga2V5SWRzID0gW107XG4gICAgdmFyIGtleXMgPSB0aGlzLmdldEFsbEtleVBhY2tldHMoKTtcbiAgICBmb3IgKHZhci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dCgpO1xuICAgICAgICAgICAgcGFja2V0X2xlbmd0aCArPSB0bXBsZW47XG4gICAgICAgICAgICBib2R5ZGF0YSArPSBpbnB1dC5zdWJzdHJpbmcobXlwb3MyLCBteXBvczIgKyB0bXBsZW4pO1xuICAgICAgICAgICAgbXlwb3MyICs9IHRtcGxlbjtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXRbbXlwb3MyXS5jaGFyQ29kZUF0KCkgPj0gMTkyICYmIGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpIDwgMjI0KSB7XG4gICAgICAgICAgICB2YXIgdG1wbGVuID0gKChpbnB1dFtteXBvczIrK10uY2hhckNvZGVBdCgpIC0gMTkyKSA8PCA4KSArIChpbnB1dFtteXBvczIrK10uY2hhckNvZGVBdCgpKSArIDE5MjtcbiAgICAgICAgICAgIHBhY2tldF9sZW5ndGggKz0gdG1wbGVuO1xuICAgICAgICAgICAgYm9keWRhdGEgKz0gaW5wdXQuc3Vic3RyaW5nKG15cG9zMiwgbXlwb3MyICsgdG1wbGVuKTtcbiAgICAgICAgICAgIG15cG9zMiArPSB0bXBsZW47XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpID4gMjIzICYmIGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpIDwgMjU1KSB7XG4gICAgICAgICAgICB2YXIgdG1wbGVuID0gMSA8PCAoaW5wdXRbbXlwb3MyKytdLmNoYXJDb2RlQXQoKSAmIDB4MUYpO1xuICAgICAgICAgICAgcGFja2V0X2xlbmd0aCArPSB0bXBsZW47XG4gICAgICAgICAgICBib2R5ZGF0YSArPSBpbnB1dC5zdWJzdHJpbmcobXlwb3MyLCBteXBvczIgKyB0bXBsZW4pO1xuICAgICAgICAgICAgbXlwb3MyICs9IHRtcGxlbjtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbXlwb3MyKys7XG4gICAgICAgICAgICB2YXIgdG1wbGVuID0gKGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCkgPDwgMjQpIHwgKGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCkgPDwgMTYpIHwgKGlucHV0W215cG9zMisrXVxuICAgICAgICAgICAgICAuY2hhckNvZGVBdCgpIDw8IDgpIHwgaW5wdXRbbXlwb3MyKytdLmNoYXJDb2RlQXQoKTtcbiAgICAgICAgICAgIGJvZHlkYXRhICs9IGlucHV0LnN1YnN0cmluZyhteXBvczIsIG15cG9zMiArIHRtcGxlbik7XG4gICAgICAgICAgICBwYWNrZXRfbGVuZ3RoICs9IHRtcGxlbjtcbiAgICAgICAgICAgIG15cG9zMiArPSB0bXBsZW47XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmVhbF9wYWNrZXRfbGVuZ3RoID0gbXlwb3MyO1xuICAgICAgICAvLyA0LjIuMi4zLiBGaXZlLU9jdGV0IExlbmd0aHNcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIG15cG9zKys7XG4gICAgICAgIHBhY2tldF9sZW5ndGggPSAoaW5wdXRbbXlwb3MrK10uY2hhckNvZGVBdCgpIDw8IDI0KSB8IChpbnB1dFtteXBvcysrXS5jaGFyQ29kZUF0KCkgPDwgMTYpIHwgKGlucHV0W215cG9zKytdLmNoYXJDb2RlQXQoKSA8PFxuICAgICAgICAgIDgpIHwgaW5wdXRbbXlwb3MrK10uY2hhckNvZGVBdCgpO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIGlmIHRoZXJlIHdhcydudCBhIHBhcnRpYWwgYm9keSBsZW5ndGg6IHVzZSB0aGUgc3BlY2lmaWVkXG4gICAgLy8gcGFja2V0X2xlbmd0aFxuICAgIGlmIChyZWFsX3BhY2tldF9sZW5ndGggPT0gLTEpIHtcbiAgICAgIHJlYWxfcGFja2V0X2xlbmd0aCA9IHBhY2tldF9sZ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gpO1xuICAgICAgICB0aGlzLnRydXN0QW1vdW50ID0gYnl0ZXNbbXlwb3MrK10uY2hhckNvZGVBdCgpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgNjpcbiAgICAgICAgLy8gUmVndWxhciBFeHByZXNzaW9uXG4gICAgICAgIHRoaXMucmVndWxhckV4cHJlc3Npb24gPSBieXRlcy5zdWJzdHIobXlwb3MpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgNzpcbiAgICAgICAgLy8gUmV2b2NhYmxlXG4gICAgICAgIHRoaXMucmV2b2NhYmxlID0gYnl0ZXNbbXlwb3MrK10uY2hhckNvZGVBdCgpID09IDE7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA5OlxuICAgICAgICAvLyBLZXkgRXhwaXJhdGlvbiBUaW1lXG4gICAgICAgIHZhciB0aW1lID0gdXRpbC5yZWFkRGF0ZShieXRlcy5zdWJzdHIobXlwb3MpKTtcblxuICAgICAgICB0aGlzLmtleUV4cGlyYXRpb25UaW1lID0gdGltZTtcbiAgICAgICAgdGhpcy5rZXlOZXZlckV4cGlyZXMgPSB0aW1lLmdldFRpbWUoKSA9PSAwO1xuXG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAxMTpcbiAgICAgICAgLy8gUHJlZmVycmVkIFN5bW1ldHJpYyBBbGdvcml0aG1zXG4gICAgICAgIHRoaXMucHJlZmVycmVkU3ltbWV0cmljQWxnb3JpdGhtcyA9IFtdO1xuXG4gICAgICAgIHdoaWxlIChteXBvcyAhPSBieXRlcy5sZW5ndGgpIHtcbiAgICAgICAgICB0aGlzLnByZWZlcnJlZFN5bW1ldHJpY0FsZ29yaXRobXMucHVzaChieXRlc1tteXBvcysrXS5jaGFyQ29kZUF0KCkpO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDEyOlxuICAgICAgICAvLyBSZXZvY2F0aW9uIEtleVxuICAgICAgICAvLyAoMSBvY3RldCBvZi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llZCBmb3IgY2VydGlmaWNhdGlvbi4nKTtcblxuICAgICAgICAgIHZhciBieXRlcyA9IHBhY2tldC53cml0ZSgpO1xuXG4gICAgICAgICAgcmV0dXJuIHRoaXMudG9TaWduKHQua2V5LCBkYXRhKSArXG4gICAgICAgICAgICBTdHJpbmcuZnJvbUNoYXJDb2RlKHRhZykgK1xuICAgICAgICAgICAgdXRpbC53cml0ZU51bWJlcihieXRlcy5sZW5ndGgsIDQpICtcbiAgICAgICAgICAgIGJ5dGVzO1xuICAgICAgICB9XG4gICAgICBjYXNlIHQuc3Via2V5X2JpbmRpbmc6XG4gICAgICBjYXNlIHQua2V5X2JpbmRpbmc6XG4gICAgICAgIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy50b1NpZ24odC5rZXksIGRhdGEpICsgdGhpcy50b1NpZ24odC5rZXksIHtcbiAgICAgICAgICAgIGtleTogZGF0YS5iaW5kXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIGNhc2UgdC5rZXk6XG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoZGF0YS5rZXkgPT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdLZXkgcGFja2V0IGlzIHJlcXVpcmVkIGZvciB0aGlzIHNpZ3RhdHVyZS4nKTtcblxuICAgICAgICAgIHJldHVybiBkYXRhLmtleS53cml0ZU9sZCgpO1xuICAgICAgICB9XG4gICAgICBjYXNlIHQua2V5X3Jldm9jYXRpb246XG4gICAgICBjYXNlIHQuc3Via2V5X3Jldm9jYXRpb246XG4gICAgICAgIHJldHVybiB0aGlzLnRvU2lnbih0LmtleSwgZGF0YSk7XG4gICAgICBjYXNlIHQudGltZXN0YW1wOlxuICAgICAgICByZXR1cm4gJyc7XG4gICAgICBjYXNlIHQudGhyaWRfcGFydHk6XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignTm90IGltcGxlbWVudGVkJyk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgZGV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c3RhbmNlIHRoYXQgc2hvdWxkIGJlIHVzZWQuIFxuICovXG5tb2R1bGUuZXhwb3J0cyA9IG5ldyBVdGlsKCk7XG4iXX0= ; \ No newline at end of file diff --git a/test/test-bundle.js b/test/test-bundle.js index e4498c39..3e149d72 100644 --- a/test/test-bundle.js +++ b/test/test-bundle.js @@ -14429,5 +14429,5 @@ module.exports = { },{"__browserify_process":1}]},{},[]) -//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlcyI6WyIvaG9tZS90b2Jlcm5kby9kZXYvbm9kZS9saWIvbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2luc2VydC1tb2R1bGUtZ2xvYmFscy9ub2RlX21vZHVsZXMvcHJvY2Vzcy9icm93c2VyLmpzIiwiL2hvbWUvdG9iZXJuZG8vZGV2L29wZW5wZ3Bqcy1kZXZlbC9zcmMvY29tcHJlc3Npb24vanhnLmpzIiwiL2hvbWUvdG9iZXJuZG8vZGV2L29wZW5wZ3Bqcy1kZXZlbC9zcmMvY29uZmlnL2NvbmZpZy5qcyIsIi9ob21lL3RvYmVybmRvL2Rldi9vcGVucGdwanMtZGV2ZWwvc3JjL2NyeXB0by9jZmIuanMiLCIvaG9tZS90b2Jlcm5kby9kZXYvb3BlbnBncGpzLWRldmVsL3NyYy9jcnlwdG8vY2lwaGVyL2Flcy5qcyIsIi9ob21lL3RvYmVybmRvL2Rldi9vcGVucGdwanMtZGV2ZWwvc3JjL2NyeXB0by9jaXBoZXIvYmxvd2Zpc2guanMiLCIvaG9tZS90b2Jlcm5kby9kZXYvb3BlbnBncGpzLWRldmVsL3NyYy9jcnlwdG8vY2lwaGVyL2Nhc3Q1LmpzIiwiL2hvbWUvdG9iZXJuZG8vZGV2L29wZW5wZ3Bqcy1kZXZlbC9zcmMvY3J5cHRvL2NpcGhlci9kZXMuanMiLCIvaG9tZS90b2Jlcm5k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gZnByaW50ZihzdGRvdXQsIFwiMHglMDN4ICAweCUwM3ggKDB4JTA0eClcIix0bXAtY3VycmVudFRyZWUsIHRtcC0+anVtcD90bXAtPmp1bXAtY3VycmVudFRyZWU6MCwodG1wLT5qdW1wP3RtcC0+anVtcC1jdXJyZW50VHJlZTowKSo2KzB4Y2YwKTtcbiAgICAgICAgICAgICAgICBpZighKHRtcC5iMCAmIDB4ODAwMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy9mcHJpbnRmKHN0ZG91dCwgXCIgIDB4JTAzeCAoJWMpXCIsIHRtcC0+YjAsKHRtcC0+YjA8MjU2ICYmIGlzcHJpbnQodG1wLT5iMCkpP3RtcC0+YjA6J++/vScpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZighKHRtcC5iMSAmIDB4ODAwMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYoKHRtcC5iMCAmIDB4ODAwMCkpXG4gICAgICAgICAgICAgICAgICAgICAgICBmcHJpbnRmKHN0ZG91dCwgXCIgICAgICAgICAgIFwiKTtcbiAgICAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRvdXQsIFwiICAweCUwM3ggKCVjKVwiLCB0bXAtPmIxLCh0bXAtPmIxPDI1NiAmJiBpc3ByaW50KHRtcC0+YjEpKT90bXAtPmIxOifvv70nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZnByaW50ZihzdGRvdXQsIFwiXFxuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9Ki9cbiAgICByZXR1cm4gMDtcbiAgfTtcblxuICBmdW5jdGlvbiBEZWNvZGVWYWx1ZShjdXJyZW50VHJlZSkge1xuICAgIHZhciBsZW4sIGksXG4gICAgICB4dHJlZXBvcyA9IDAsXG4gICAgICBYID0gY3VycmVudFRyZWVbeHRyZWVwb3NdLFxuICAgICAgYjtcblxuICAgIC8qIGRlY29kZSBvbmUgc3ltYm9sIG9mIHRoZSBkYXRhICovXG4gICAgd2hpbGUgKDEpIHtcbiAgICAgIGIgPSByZWFkQml0KCk7XG4gICAgICBpZiAoZGVidWcpXG4gICAgICAgIGRvY3VtZW50LndyaXRlKFwiYj1cIiArIGIpO1xuICAgICAgaWYgKGIpIHtcbiAgICAgICAgaWYgKCEoWC5iMSAmIDB4ODAwMCkpIHtcbiAgICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgICBkb2N1bWVudC53cml0ZShcInJldDFcIik7XG4gICAgICAgICAgcmV0dXJuIFguYjE7IC8qIElmIGxlYWYgbm9kZSwgcmV0dXJuIGRhdGEgKi9cbiAgICAgICAgfVxuICAgICAgICBYID0gWC5qdW1wO1xuICAgICAgICBsZW4gPSBjdXJyZW50VHJlZS5sZW5ndGg7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkrKykge1xuICAgICAgICAgIGlmIChjdXJyZW50VHJlZVtpXSA9PT0gWCkge1xuICAgICAgICAgICAgeHRyZWVwb3MgPSBpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8veHRyZWVwb3MrKztcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmICghKFguYjAgJiAweDgwMDApKSB7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCJyZXQyXCIpO1xuICAgICAgICAgIHJldHVybiBYLmIwOyAvKiBJZiBsZWFmIG5vZGUsIHJldHVybiBkYXRhICovXG4gICAgICAgIH1cbiAgICAgICAgLy9YKys7IC8vPz8/Pz8/Pz8/Pz8/Pz8/Pz8/XG4gICAgICAgIHh0cmVlcG9zKys7XG4gICAgICAgIFggPSBjdXJyZW50VHJlZVt4dHJlZXBvc107XG4gICAgICB9XG4gICAgfVxuICAgIGlmIChkZWJ1ZylcbiAgICAgIGRvY3VtZW50LndyaXRlKFwicmV0M1wiKTtcbiAgICByZXR1cm4gLTE7XG4gIH07XG5cbiAgZnVuY3Rpb24gRGVmbGF0ZUxvb3AoKSB7XG4gICAgdmFyIGxhc3QsIGMsIHR5cGUsIGksIGxlbjtcblxuICAgIGRvIHtcbiAgICAgIC8qaWYoKGxhc3QgPSByZWFkQml0KCkpKXtcbiAgICAgICAgICAgIGZwcmludGYoZXJyZnAsIFwiTGFzdCBCbG9jazogXCIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZnByaW50ZihlcnJmcCwgXCJOb3QgTGFzdCBCbG9jazogXCIpO1xuICAgICAgICB9Ki9cbiAgICAgIGxhc3QgPSByZWFkQml0KCk7XG4gICAgICB0eXBlID0gcmVhZEJpdHMoMik7XG4gICAgICBzd2l0Y2ggKHR5cGUpIHtcbiAgICAgICAgY2FzZSAwOlxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwiU3RvcmVkXFxuXCIpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJGaXhlZCBIdWZmbWFuIGNvZGVzXFxuXCIpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJEeW5hbWljIEh1ZmZtYW4gY29kZXNcXG5cIik7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMzpcbiAgICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgICBhbGVydChcIlJlc2VydmVkIGJsb2NrIHR5cGUhIVxcblwiKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgICBhbGVydChcIlVuZXhwZWN0ZWQgdmFsdWUgJWQhXFxuXCIsIHR5cGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZSA9PSAwKSB7XG4gICAgICAgIHZhciBibG9ja0xlbiwgY1N1bTtcblxuICAgICAgICAvLyBTdG9yZWQgXG4gICAgICAgIGJ5dGVBbGlnbigpO1xuICAgICAgICBibG9ja0xlbiA9IHJlYWRCeXRlKCk7XG4gICAgICAgIGJsb2NrTGVuIHw9IChyZWFkQnl0ZSgpIDw8IDgpO1xuXG4gICAgICAgIGNTdW0gPSByZWFkQnl0ZSgpO1xuICAgICAgICBjU3VtIHw9IChyZWFkQnl0ZSgpIDw8IDgpO1xuXG4gICAgICAgIGlmICgoKGJsb2NrTGVuIF4gfmNTdW0pICYgMHhmZmZmKSkge1xuICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwiQmxvY2tMZW4gY2hlY2tzdW0gbWlzbWF0Y2hcXG5cIik7XG4gICAgICAgIH1cbiAgICAgICAgd2hpbGUgKGJsb2NrTGVuLS0pIHtcbiAgICAgICAgICBjID0gcmVhZEJ5dGUoKTtcbiAgICAgICAgICBhZGRCdWZmZXIoYyk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAodHlwZSA9PSAxKSB7XG4gICAgICAgIHZhciBqO1xuXG4gICAgICAgIC8qIEZpeGVkIEh1ZmZtYW4gdGFibGVzIC0tIGZpeGVkIGRlY29kZSByb3V0aW5lICovXG4gICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgLypcbiAgICAgICAgICAgICAgICAyNTYgICAgMDAwMDAwMCAgICAgICAgMFxuICAgICAgICAgICAgICAgIDogICA6ICAgICA6XG4gICAgICAgICAgICAgICAgMjc5ICAgIDAwMTAxMTEgICAgICAgIDIzXG4gICAgICAgICAgICAgICAgMCAgIDAwMTEwMDAwICAgIDQ4XG4gICAgICAgICAgICAgICAgOiAgICA6ICAgICAgOlxuICAgICAgICAgICAgICAgIDE0MyAgICAxMDExMTExMSAgICAxOTFcbiAgICAgICAgICAgICAgICAyODAgMTEwMDAwMDAgICAgMTkyXG4gICAgICAgICAgICAgICAgOiAgICA6ICAgICAgOlxuICAgICAgICAgICAgICAgIDI4NyAxMTAwMDExMSAgICAxOTlcbiAgICAgICAgICAgICAgICAxNDQgICAgMTEwMDEwMDAwICAgIDQwMFxuICAgICAgICAgICAgICAgIDogICAgOiAgICAgICA6XG4gICAgICAgICAgICAgICAgMjU1ICAgIDExMTExMTExMSAgICA1MTFcbiAgICBcbiAgICAgICAgICAgICAgICBOb3RlIHRoZSBiaXQgb3JkZXIhXG4gICAgICAgICAgICAgICAgKi9cblxuICAgICAgICAgIGogPSAoYml0UmV2ZXJzZVtyZWFkQml0cyg3KV0gPj4gMSk7XG4gICAgICAgICAgaWYgKGogPiAyMykge1xuICAgICAgICAgICAgaiA9IChqIDw8IDEpIHwgcmVhZEJpdCgpOyAvKiA0OC4uMjU1ICovXG5cbiAgICAgICAgICAgIGlmIChqID4gMTk5KSB7IC8qIDIwMC4uMjU1ICovXG4gICAgICAgICAgICAgIGogLT0gMTI4OyAvKiAgNzIuLjEyNyAqL1xuICAgICAgICAgICAgICBqID0gKGogPDwgMSkgfCByZWFkQml0KCk7IC8qIDE0NC4uMjU1IDw8ICovXG4gICAgICAgICAgICB9IGVsc2UgeyAvKiAgNDguLjE5OSAqL1xuICAgICAgICAgICAgICBqIC09IDQ4OyAvKiAgIDAuLjE1MSAqL1xuICAgICAgICAgICAgICBpZiAoaiA+IDE0Mykge1xuICAgICAgICAgICAgICAgIGogPSBqICsgMTM2OyAvKiAyODAuLjI4NyA8PCAqL1xuICAgICAgICAgICAgICAgIC8qICAgMC4uMTQzIDw8ICovXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgeyAvKiAgIDAuLjIzICovXG4gICAgICAgICAgICBqICs9IDI1NjsgLyogMjU2Li4yNzkgPDwgKi9cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGogPCAyNTYpIHtcbiAgICAgICAgICAgIGFkZEJ1ZmZlcihqKTtcbiAgICAgICAgICAgIC8vZG9jdW1lbnQud3JpdGUoXCJvdXQ6XCIrU3RyaW5nLmZyb21DaGFyQ29kZShqKSk7XG4gICAgICAgICAgICAvKmZwcmludGYoZXJyZnAsIFwiQCVkICUwMnhcXG5cIiwgU0laRSwgaik7Ki9cbiAgICAgICAgICB9IGVsc2UgaWYgKGogPT0gMjU2KSB7XG4gICAgICAgICAgICAvKiBFT0YgKi9cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgbGVuLCBkaXN0O1xuXG4gICAgICAgICAgICBqIC09IDI1NiArIDE7IC8qIGJ5dGVzICsgRU9GICovXG4gICAgICAgICAgICBsZW4gPSByZWFkQml0cyhjcGxleHRbal0pICsgY3BsZW5zW2pdO1xuXG4gICAgICAgICAgICBqID0gYml0UmV2ZXJzZVtyZWFkQml0cyg1KV0gPj4gMztcbiAgICAgICAgICAgIGlmIChjcGRleHRbal0gPiA4KSB7XG4gICAgICAgICAgICAgIGRpc3QgPSByZWFkQml0cyg4KTtcbiAgICAgICAgICAgICAgZGlzdCB8PSAocmVhZEJpdHMoY3BkZXh0W2pdIC0gOCkgPDwgOCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBkaXN0ID0gcmVhZEJpdHMoY3BkZXh0W2pdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpc3QgKz0gY3BkaXN0W2pdO1xuXG4gICAgICAgICAgICAvKmZwcmludGYoZXJyZnAsIFwiQCVkIChsJTAyeCxkJTA0eClcXG5cIiwgU0laRSwgbGVuLCBkaXN0KTsqL1xuICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbjsgaisrKSB7XG4gICAgICAgICAgICAgIHZhciBjID0gYnVmMzJrWyhiSWR4IC0gZGlzdCkgJiAweDdmZmZdO1xuICAgICAgICAgICAgICBhZGRCdWZmZXIoYyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9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gIGkgPSAwO1xuICAgICAgICB2YXIgeiA9IC0xO1xuICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCI8YnI+bj1cIiArIG4gKyBcIiBiaXRzOiBcIiArIGJpdHMgKyBcIjxicj5cIik7XG4gICAgICAgIHdoaWxlIChpIDwgbikge1xuICAgICAgICAgIHorKztcbiAgICAgICAgICBqID0gRGVjb2RlVmFsdWUoZGlzdGFuY2VUcmVlKTtcbiAgICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgICBkb2N1bWVudC53cml0ZShcIjxicj5cIiArIHogKyBcIiBpOlwiICsgaSArIFwiIGRlY29kZTogXCIgKyBqICsgXCIgICAgYml0cyBcIiArIGJpdHMgKyBcIjxicj5cIik7XG4gICAgICAgICAgaWYgKGogPCAxNikgeyAvLyBsZW5ndGggb2YgY29kZSBpbiBiaXRzICgwLi4xNSlcbiAgICAgICAgICAgIGxsW2krK10gPSBqO1xuICAgICAgICAgIH0gZWxzZSBpZiAoaiA9PSAxNikgeyAvLyByZXBlYXQgbGFzdCBsZW5ndGggMyB0byA2IHRpbWVzIFxuICAgICAgICAgICAgdmFyIGw7XG4gICAgICAgICAgICBqID0gMyArIHJlYWRCaXRzKDIpO1xuICAgICAgICAgICAgaWYgKGkgKyBqID4gbikge1xuICAgICAgICAgICAgICBmbHVzaEJ1ZmZlcigpO1xuICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGwgPSBpID8gbGxbaSAtIDFdIDogMDtcbiAgICAgICAgICAgIHdoaWxlIChqLS0pIHtcbiAgICAgICAgICAgICAgbGxbaSsrXSA9IGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChqID09IDE3KSB7IC8vIDMgdG8gMTAgemVybyBsZW5ndGggY29kZXNcbiAgICAgICAgICAgICAgaiA9IDMgKyByZWFkQml0cygzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7IC8vIGogPT0gMTg6IDExIHRvIDEzOCB6ZXJvIGxlbmd0aCBjb2RlcyBcbiAgICAgICAgICAgICAgaiA9IDExICsgcmVhZEJpdHMoNyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaSArIGogPiBuKSB7XG4gICAgICAgICAgICAgIGZsdXNoQnVmZmVyKCk7XG4gICAgICAgICAgICAgIHJldHVybiAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKGotLSkge1xuICAgICAgICAgICAgICBsbFtpKytdID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLypmb3Ioaj0wOyBqPGxpdGVyYWxDb2RlcytkaXN0Q29kZXM7IGorKykge1xuICAgICAgICAgICAgICAgIC8vZnByaW50ZihlcnJmcCwgXCIlZCBcIiwgbGxbal0pO1xuICAgICAgICAgICAgICAgIGlmICgoaiY3KT09NylcbiAgICAgICAgICAgICAgICAgICAgZnByaW50ZihlcnJmcCwgXCJcXG5cIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmcHJpbnRmKGVycmZwLCBcIlxcblwiKTsqL1xuICAgICAgICAvLyBDYW4gb3ZlcndyaXRlIHRyZWUgZGVjb2RlIHRyZWUgYXMgaXQgaXMgbm90IHVzZWQgYW55bW9yZVxuICAgICAgICBsZW4gPSBsaXRlcmFsVHJlZS5sZW5ndGg7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkrKylcbiAgICAgICAgICBsaXRlcmFsVHJlZVtpXSA9IG5ldyBIdWZOb2RlKCk7XG4gICAgICAgIGlmIChDcmVhdGVUcmVlKGxpdGVyYWxUcmVlLCBsaXRlcmFsQ29kZXMsIGxsLCAwKSkge1xuICAgICAgICAgIGZsdXNoQnVmZmVyKCk7XG4gICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgIH1cbiAgICAgICAgbGVuID0gbGl0ZXJhbFRyZWUubGVuZ3RoO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspXG4gICAgICAgICAgZGlzdGFuY2VUcmVlW2ldID0gbmV3IEh1Zk5vZGUoKTtcbiAgICAgICAgdmFyIGxsMiA9IG5ldyBBcnJheSgpO1xuICAgICAgICBmb3IgKGkgPSBsaXRlcmFsQ29kZXM7IGkgPCBsbC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgIGxsMltpIC0gbGl0ZXJhbENvZGVzXSA9IGxsW2ldO1xuICAgICAgICB9XG4gICAgICAgIGlmIChDcmVhdGVUcmVlKGRpc3RhbmNlVHJlZSwgZGlzdENvZGVzLCBsbDIsIDApKSB7XG4gICAgICAgICAgZmx1c2hCdWZmZXIoKTtcbiAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCI8YnI+bGl0ZXJhbFRyZWVcIik7XG4gICAgICAgIG91dGVyOiB3aGlsZSAoMSkge1xuICAgICAgICAgIGogPSBEZWNvZGVWYWx1ZShsaXRlcmFsVHJlZSk7XG4gICAgICAgICAgaWYgKGogPj0gMjU2KSB7IC8vIEluIEM2NDogaWYgY2Fycnkgc2V0XG4gICAgICAgICAgICB2YXIgbGVuLCBkaXN0O1xuICAgICAgICAgICAgaiAtPSAyNTY7XG4gICAgICAgICAgICBpZiAoaiA9PSAwKSB7XG4gICAgICAgICAgICAgIC8vIEVPRlxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGotLTtcbiAgICAgICAgICAgIGxlbiA9IHJlYWRCaXRzKGNwbGV4dFtqXSkgKyBjcGxlbnNbal07XG5cbiAgICAgICAgICAgIGogPSBEZWNvZGVWYWx1ZShkaXN0YW5jZVRyZWUpO1xuICAgICAgICAgICAgaWYgKGNwZGV4dFtqXSA+IDgpIHtcbiAgICAgICAgICAgICAgZGlzdCA9IHJlYWRCaXRzKDgpO1xuICAgICAgICAgICAgICBkaXN0IHw9IChyZWFkQml0cyhjcGRleHRbal0gLSA4KSA8PCA4KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGRpc3QgPSByZWFkQml0cyhjcGRleHRbal0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGlzdCArPSBjcGRpc3Rbal07XG4gICAgICAgICAgICB3aGlsZSAobGVuLS0pIHtcbiAgICAgICAgICAgICAgaWYgKGJJZHggLSBkaXN0IDwgMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHZhciBjID0gYnVmMzJrWyhiSWR4IC0gZGlzdCkgJiAweDdmZmZdO1xuICAgICAgICAgICAgICBhZGRCdWZmZXIoYyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGFkZEJ1ZmZlcihqKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IHdoaWxlICghbGFzdCk7XG4gICAgZmx1c2hCdWZmZXIoKTtcblxuICAgIGJ5dGVBbGlnbigpO1xuICAgIHJldHVybiAwO1xuICB9O1xuXG4gIEpYRy5VdGlsLlVuemlwLnByb3RvdHlwZS51bnppcEZpbGUgPSBmdW5jdGlvbihuYW1lKSB7XG4gICAgdmFyIGk7XG4gICAgdGhpcy51bnppcCgpO1xuICAgIC8vYWxlcnQodW56aXBwZWRbMF1bMV0pO1xuICAgIGZvciAoaSA9IDA7IGkgPCB1bnppcHBlZC5sZW5ndGg7IGkrKykge1xuICAgICAgaWYgKHVuemlwcGVkW2ldWzFdID09IG5hbWUpIHtcbiAgICAgICAgcmV0dXJuIHVuemlwcGVkW2ldWzBdO1xuICAgICAgfVxuICAgIH1cblxuICB9O1xuXG4gIEpYRy5VdGlsLlVuemlwLnByb3RvdHlwZS5kZWZsYXRlID0gZnVuY3R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QnVmW2ldID0gXCJcXDBcIjtcbiAgICAgICAgaWYgKCFmaWxlb3V0KVxuICAgICAgICAgIGZpbGVvdXQgPSBuYW1lQnVmO1xuXG4gICAgICAgIHZhciBpID0gMDtcbiAgICAgICAgd2hpbGUgKGkgPCBleHRyYWxlbikge1xuICAgICAgICAgIGMgPSByZWFkQnl0ZSgpO1xuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIENSQyA9IDB4ZmZmZmZmZmY7XG4gICAgICAgIFNJWkUgPSAwO1xuXG4gICAgICAgIGlmIChzaXplID0gMCAmJiBmaWxlT3V0LmNoYXJBdChmaWxlb3V0Lmxlbmd0aCAtIDEpID09IFwiL1wiKSB7XG4gICAgICAgICAgLy9za2lwZGlyXG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJza2lwZGlyXCIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXRob2QgPT0gOCkge1xuICAgICAgICAgIERlZmxhdGVMb29wKCk7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQob3V0cHV0QXJyLmpvaW4oJycpKTtcbiAgICAgICAgICB1bnppcHBlZFtmaWxlc10gPSBuZXcgQXJyYXkoMik7XG4gICAgICAgICAgdW56aXBwZWRbZmlsZXNdWzBdID0gb3V0cHV0QXJyLmpvaW4oJycpO1xuICAgICAgICAgIHVuemlwcGVkW2ZpbGVzXVsxXSA9IG5hbWVCdWYuam9pbignJyk7XG4gICAgICAgICAgZmlsZXMrKztcbiAgICAgICAgICAvL3JldHVybiBvdXRwdXRBcnIuam9pbignJyk7XG4gICAgICAgIH1cbiAgICAgICAgc2tpcGRpcigpO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBmdW5jdGlvbiBza2lwZGlyKCkge1xuICAgIHZhciBjcmMsXG4gICAgICB0bXAgPSBbXSxcbiAgICAgIGNvbXBTaXplLCBzaXplLCBvcywgaSwgYztcblxuICAgIG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AgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzM4OlxuICAgICAgICBjID0gMTQwO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzgxOlxuICAgICAgICBjID0gMTQyO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxNjpcbiAgICAgICAgYyA9IDE0NTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMTc6XG4gICAgICAgIGMgPSAxNDY7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjIwOlxuICAgICAgICBjID0gMTQ3O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIyMTpcbiAgICAgICAgYyA9IDE0ODtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjY6XG4gICAgICAgIGMgPSAxNDk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjExOlxuICAgICAgICBjID0gMTUwO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxMjpcbiAgICAgICAgYyA9IDE1MTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDczMjpcbiAgICAgICAgYyA9IDE1MjtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDg0ODI6XG4gICAgICAgIGMgPSAxNTM7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAzNTM6XG4gICAgICAgIGMgPSAxNTQ7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjUwOlxuICAgICAgICBjID0gMTU1O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzM5OlxuICAgICAgICBjID0gMTU2O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzgyOlxuICAgICAgICBjID0gMTU4O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzc2OlxuICAgICAgICBjID0gMTU5O1xuICAgICAgICBicmVhaztcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIGJyZWFrO1x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XQoYyAmIDYzKTtcbiAgICB9XG4gICAgbCArPSAxO1xuICAgIGlmICgobCAlIDYwKSA9PSAwKVxuICAgICAgciArPSBcIlxcblwiO1xuXG4gICAgcyArPSAxO1xuICAgIGlmIChzID09IDMpXG4gICAgICBzID0gMDtcbiAgfVxuICBpZiAocyA+IDApIHtcbiAgICByICs9IGI2NHMuY2hhckF0KGEpO1xuICAgIGwgKz0gMTtcbiAgICBpZiAoKGwgJSA2MCkgPT0gMClcbiAgICAgIHIgKz0gXCJcXG5cIjtcbiAgICByICs9ICc9JztcbiAgICBsICs9IDE7XG4gIH1cbiAgaWYgKHMgPT0gMSkge1xuICAgIGlmICgobCAlIDYwKSA9PSAwKVxuICAgICAgciArPSBcIlxcblwiO1xuICAgIHIgKz0gJz0nO1xuICB9XG5cbiAgcmV0dXJuIHI7XG59XG5cbmZ1bmN0aW9uIHIycyh0KSB7XG4gIHZhciBjLCBuO1xuICB2YXIgciA9ICcnLFxuICAgIHMgPSAwLFxuICAgIGEgPSAwO1xuICB2YXIgdGwgPSB0Lmxlbmd0aDtcblxuICBmb3IgKG4gPSAwOyBuIDwgdGw7IG4rKykge1xuICAgIGMgPSBiNjRzLmluZGV4T2YodC5jaGFyQXQobikpO1xuICAgIGlmIChjID49IDApIHtcbiAgICAgIGlmIChzKVxuICAgICAgICByICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoYSB8IChjID4+ICg2IC0gcykpICYgMjU1KTtcbiAgICAgIHMgPSAocyArIDIpICYgNztcbiAgICAgIGEgPSAoYyA8PCBzKSAmIDI1NTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHI7XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBlbmNvZGU6IHMycixcbiAgZGVjb2RlOiByMnNcbn1cbiIsInZhciBlbnVtcyA9IHtcblxuICAvKiogQSBzdHJpbmcgdG8ga2V5IHNwZWNpZmllciB0eXBlXG4gICAqIEBlbnVtIHtJbnRlZ2VyfVxuICAgKi9cbiAgczJr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cGFja2V0X2xlbmd0aCk7XG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgaWYgKGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpIDwgMTkyKSB7XG4gICAgICAgICAgICB2YXIgdG1wbGVuID0gaW5wdXRbbXlwb3MyKytdLmNoYXJDb2RlQXQoKTtcbiAgICAgICAgICAgIHBhY2tldF9sZW5ndGggKz0gdG1wbGVuO1xuICAgICAgICAgICAgYm9keWRhdGEgKz0gaW5wdXQuc3Vic3RyaW5nKG15cG9zMiwgbXlwb3MyICsgdG1wbGVuKTtcbiAgICAgICAgICAgIG15cG9zMiArPSB0bXBsZW47XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0W215cG9zMl0uY2hhckNvZGVBdCgpID49IDE5MiAmJiBpbnB1dFtteXBvczJdLmNoYXJDb2RlQXQoKSA8IDIyNCkge1xuICAgICAgICAgICAgdmFyIHRtcGxlbiA9ICgoaW5wdXRbbXlwb3MyKytdLmNoYXJDb2RlQXQoKSAtIDE5MikgPDwgOCkgKyAoaW5wdXRbbXlwb3MyKytdLmNoYXJDb2RlQXQoKSkgKyAxOTI7XG4gICAgICAgICAgICBwYWNrZXRfbGVuZ3RoICs9IHRtcGxlbjtcbiAgICAgICAgICAgIGJvZHlkYXRhICs9IGlucHV0LnN1YnN0cmluZyhteXBvczIsIG15cG9zMiArIHRtcGxlbik7XG4gICAgICAgICAgICBteXBvczIgKz0gdG1wbGVuO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnB1dFtteXBvczJdLmNoYXJDb2RlQXQoKSA+IDIyMyAmJiBpbnB1dFtteXBvczJdLmNoYXJDb2RlQXQoKSA8IDI1NSkge1xuICAgICAgICAgICAgdmFyIHRtcGxlbiA9IDEgPDwgKGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCkgJiAweDFGKTtcbiAgICAgICAgICAgIHBhY2tldF9sZW5ndGggKz0gdG1wbGVuO1xuICAgICAgICAgICAgYm9keWRhdGEgKz0gaW5wdXQuc3Vic3RyaW5nKG15cG9zMiwgbXlwb3MyICsgdG1wbGVuKTtcbiAgICAgICAgICAgIG15cG9zMiArPSB0bXBsZW47XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG15cG9zMisrO1xuICAgICAgICAgICAgdmFyIHRtcGxlbiA9IChpbnB1dFtteXBvczIrK10uY2hhckNvZGVBdCgpIDw8IDI0KSB8IChpbnB1dFtteXBvczIrK10uY2hhckNvZGVBdCgpIDw8IDE2KSB8IChpbnB1dFtteXBvczIrK11cbiAgICAgICAgICAgICAgLmNoYXJDb2RlQXQoKSA8PCA4KSB8IGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCk7XG4gICAgICAgICAgICBib2R5ZGF0YSArPSBpbnB1dC5zdWJzdHJpbmcobXlwb3MyLCBteXBvczIgKyB0bXBsZW4pO1xuICAgICAgICAgICAgcGFja2V0X2xlbmd0aCArPSB0bXBsZW47XG4gICAgICAgICAgICBteXBvczIgKz0gdG1wbGVuO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJlYWxfcGFja2V0X2xlbmd0aCA9IG15cG9zMjtcbiAgICAgICAgLy8gNC4yLjIuMy4gRml2ZS1PY3RldCBMZW5ndGhzXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBteXBvcysrO1xuICAgICAgICBwYWNrZXRfbGVuZ3RoID0gKGlucHV0W215cG9zKytdLmNoYXJDb2RlQXQoKSA8PCAyNCkgfCAoaW5wdXRbbXlwb3MrK10uY2hhckNvZGVBdCgpIDw8IDE2KSB8IChpbnB1dFtteXBvcysrXS5jaGFyQ29kZUF0KCkgPDxcbiAgICAgICAgICA4KSB8IGlucHV0W215cG9zKytdLmNoYXJDb2RlQXQoKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBpZiB0aGVyZSB3YX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E9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRhZyA9IDB4RDE7XG4gICAgICAgICAgICBwYWNrZXQgPSBkYXRhLnVzZXJhdHRyaWJ1dGU7XG4gICAgICAgICAgfSBlbHNlIHRocm93IG5ldyBFcnJvcignRWl0aGVyIGEgdXNlcmlkIG9yIHVzZXJhdHRyaWJ1dGUgcGFja2V0IG5lZWRzIHRvIGJlICcgK1xuICAgICAgICAgICAgICAnc3VwcGxpZWQgZm9yIGNlcnRpZmljYXRpb24uJyk7XG5cbiAgICAgICAgICB2YXIgYnl0ZXMgPSBwYWNrZXQud3JpdGUoKTtcblxuICAgICAgICAgIHJldHVybiB0aGlzLnRvU2lnbih0LmtleSwgZGF0YSkgK1xuICAgICAgICAgICAgU3RyaW5nLmZyb21DaGFyQ29kZSh0YWcpICtcbiAgICAgICAgICAgIHV0aWwud3JpdGVOdW1iZXIoYnl0ZXMubGVuZ3RoLCA0KSArXG4gICAgICAgICAgICBieXRlcztcbiAgICAgICAgfVxuICAgICAgY2FzZSB0LnN1YmtleV9iaW5kaW5nOlxuICAgICAgY2FzZSB0LmtleV9iaW5kaW5nOlxuICAgICAgICB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMudG9TaWduKHQua2V5LCBkYXRhKSArIHRoaXMudG9TaWduKHQua2V5LCB7XG4gICAgICAgICAgICBrZXk6IGRhdGEuYmluZFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICBjYXNlIHQua2V5OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKGRhdGEua2V5ID09IHVuZGVmaW5lZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignS2V5IHBhY2tldCBpcyByZXF1aXJlZCBmb3IgdGhpcyBzaWd0YXR1cmUuJyk7XG5cbiAgICAgICAgICByZXR1cm4gZGF0YS5rZXkud3JpdGVPbGQoKTtcbiAgICAgICAgfVxuICAgICAgY2FzZSB0LmtleV9yZXZvY2F0aW9uOlxuICAgICAgY2Fz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eXB0ZWQpID09IHV0aWwuYmluMnN0cih0aGlzVmVjdG9yU2V0W2ldWzBdKSk7XHJcbiAgICAgICAgICAgIHJlcyAmPSByZXMyO1xyXG4gICAgICAgICAgICByZXMgJj0gcmVzMztcclxuICAgICAgICAgICAgaWYgKCFyZXMyIHx8ICFyZXMzKSB7XHJcbiAgICAgICAgICAgICAgICByZXN1bHRbal0gPSBuZXcgdW5pdC5yZXN1bHQoXHJcbiAgICAgICAgICAgICAgICAgICAgXCJUZXN0aW5nIHZlY3RvciB3aXRoIGJsb2NrIFtcIiArXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHV0aWwuaGV4aWR1bXAodGhpc1ZlY3RvclNldFtpXVswXSkgK1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBcIl0gYW5kIGtleSBbXCIgKyB1dGlsLmhleHN0cmR1bXAoa2V5KSArXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiXSBhbmQgcGFkZGluZyBbXCIgKyBwYWRkaW5nICtcclxuICAgICAgICAgICAgICAgICAgICAgICAgXCJdIHNob3VsZCBiZSBcIiArIHV0aWwuaGV4aWR1bXAodGhpc1ZlY3RvclNldFtpXVsxXSkgKyBcIiAtIEFjdHVhbGx5IFtFTkM6XCIgKyB1dGlsLmhleGlkdW1wKGVuY3J5cHRlZCkgKyBcIiwgREVDOlwiICsgdXRpbC5oZXhpZHVtcChkZWNyeXB0ZWQpICsgXCJdXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgaisrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgaWYgKHJlcykge1xyXG4gICAgICAgIHJlc3VsdFtqXSA9IG5ldyB1bml0LnJlc3VsdChcIkFsbCBERVMgdGVzdCB2ZWN0b3JzIGNvbXBsZXRlZFwiLCB0cnVlKTtcclxuICAgIH1cclxuICAgIHJldHVybiByZXN1bHQ7XHJcbn0pO1xyXG4i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ZDAsMHg4NCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGVhLDB4ZmYsMHgzOSwweGI1LDB4MjcsMHg3MCwweGVhLDB4NGEsMHhiMiwweDJlLDB4OWQsMHhmMSwweDdjLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjMsMHhlYywweGY0LDB4NWUsMHhlYSwweDYxLDB4M2QsMHhlNSwweGQ4LDB4MGQsMHhmOSwweDU5LDB4NmQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOCwweDAwLDB4ZWIsMHhjYiwweGM5LDB4NTUsMHgwMCwweDcyLDB4MzAsMHgxZiwweDY1LDB4OWQsMHhkNixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE3LDB4NTgsMHg1ZiwweGE2LDB4NGEsMHhhMCwweGRkLDB4ZTEsMHg3NiwweGYyLDB4ZWYsMHgyMSwweDlmLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODQsMHhmYywweGFhLDB4NWIsMHg1MiwweDZlLDB4YzEsMHhhMiwweGI5LDB4YmQsMHhiOSwweGY0LDB4OWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0OSwweDkyLDB4ZjIsMHhhZiwweDU3LDB4ODYsMHhmMiwweGVmLDB4NzAsMHhiZiwweDUxLDB4NDAsMHhmZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGJmLDB4NTYsMHg1MSwweGU4LDB4MmMsMHhhMiwweDRmLDB4ZjgsMHhhNCwweGQ3LDB4MzYsMHgxOCwweDg1LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4Y2UsMHgwOSwweDBkLDB4YmMsMHg4ZCwweDY1LDB4NWUsMHg4YSwweDFkLDB4OTgsMHhiMCwweDRkLDB4OWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhjMSwweGNmLDB4ODIsMHhlMSwweGI3LDB4NDMsMHg1ZCwweDVhLDB4NzIsMHhjZCwweDU1LDB4ZDIsMHhmZixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGIxLDB4YjQsMHg3OCwweGJmLDB4YTEsMHg3ZCwweGFjLDB4ZDksMHgxYiwweGM0LDB4ZmEsMHgzOSwweDM0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OTIsMHgwOSwweGY5LDB4MDgsMHgyYSwweDZiLDB4OWQsMHgxNCwweDU2LDB4MTIsMHg0YywweGU5LDB4YTYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOSwweGMxLDB4ZjMsMHhhOSwweDBiLDB4ZmMsMHgzMSwweDc1LDB4NTgsMHg3NCwweDJhLDB4ODgsMHhhZixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGVlLDB4YzksMHhhNCwweGNkLDB4MTUsMHhkYywweDFiLDB4OGQsMHg2NCwweGMxLDB4MzYsMHgxNywweGM0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OGQsMHg1ZSwweDk5LDB4N2EsMHg1YiwweDlmLDB4MzksMHhkMCwweDAwLDB4NmUsMHhmOV0pLFxuICAgICAgICAgICAgICB1dGlsLmJpbjJzdHIoWzB4MDAsMHgxMSwweDAxLDB4MDAsMHgwMV0pXTtcbiAgdmFyIFJTQXNlY01QSXN0cnMgPSBbXG4gICAgICAgICAgICAgIHV0aWwuYmluMnN0cihbMHgwNywweGZlLDB4MjMsMHhmZiwweGNlLDB4NDUsMHg2YywweDYwLDB4NjUsMHg0MCwweDZlLDB4YWUsMHgzNSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwLDB4NTYsMHg2MCwweGVlLDB4YWIsMHhmYSwweDEwLDB4NDIsMHhiYSwweGM3LDB4MDQsMHhhZiwweDYzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4Y2QsMHgzZiwweDYyLDB4Y2EsMHg0YiwweGZhLDB4ZTEsMHhhOSwweDcwLDB4Y2QsMHgzNCwweDhiLDB4YzgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwZSwweGU0LDB4YzQsMHhiYSwweDgzLDB4MTcsMHg1ZiwweGE0LDB4YjgsMHhlYSwweDYwLDB4YzIsMHg0ZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDlhLDB4ZjIsMHhhOSwweDAzLDB4ZWIsMHhmNiwweGFhLDB4YzIsMHhiOCwweDhiLDB4NDMsMHgxMiwweGU5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZjcsMHg4OCwweGQyLDB4NWEsMHhhNiwweGFhLDB4MjMsMHg3MSwweDMxLDB4NzQsMHhkYiwweDE5LDB4MjAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNSwweDQxLDB4MWIsMHg0MywweDY4LDB4NjIsMHhkOCwweGMwLDB4OTMsMHg5MSwweGU4LDB4ZmMsMHhiMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGE5LDB4OWEsMHg1MiwweDZjLDB4ZTAsMHhiZiwweDQzLDB4MDEsMHhhOCwweDM3LDB4MTQsMHgyOCwweGJmLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGIsMHgxNSwweDU2LDB4M2UsMHhhNSwweDc5LDB4YTAsMHhjNCwweDQyLDB4ODgsMHhlZSwweGViLDB4MWIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhmNCwweDdhLDB4NGEsMHg1OCwweDMxLDB4NTgsMHg4MSwweGQyLDB4M2UsMHhkZSwweDA3LDB4NjQsMHg5MixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGYwLDB4NjAsMHhkMywweDlhLDB4MjksMHhjYSwweGM2LDB4NjcsMHg3NSwweDA3LDB4Y2EsMHg5MiwweDM5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTYsMHhmNiwweDExLDB4ODQsMHhiYSwweDZkLDB4NGIsMHhlNiwweDZmLDB4NjYsMHhjMiwweDE3LDB4ZWIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NiwweDY5LDB4MWMsMHhiYiwweGRmLDB4YzAsMHgzOCwweDAwLDB4ZDYsMHgwMSwweGU2LDB4NzAsMHg5ZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDRiLDB4OWIsMHg3MCwweGVkLDB4NWMsMHhiOCwweGNmLDB4ZTgsMHg2OCwweDcxLDB4YmUsMHgyNCwweDZkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4YjEsMHhhMywweDEzLDB4Y2MsMHhmMSwweGJjLDB4NjcsMHhkYywweGUwLDB4NjksMHgwOSwweDgyLDB4M2MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzYiwweDBmLDB4MTQsMHg5OCwweDQ4LDB4MzAsMHhiMiwweDcwLDB4YzYsMHg5ZSwweGZhLDB4NDYsMHg4ZixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGYxLDB4YzAsMHg2NSwweDhlLDB4YzYsMHhhZSwweGRjLDB4NDcsMHg5MSwweDEzLDB4MWUsMHhkNiwweDRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZjIsMHhhZCwweGRhLDB4YzIsMHhjNywweDM5LDB4NzgsMHg5OSwweGRlLDB4NTcsMHgxNCwweDQ1LDB4N2YsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMiwweDM4LDB4YTMsMHg0NCwweDBmLDB4ZTcsMHgzOSwweDRjLDB4NmYsMHgwZiwweDMyLDB4N2UsMHhmMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDVjLDB4ODQsMHg5NywweGRkLDB4YTAsMHgwYywweDg3LDB4NjYsMHg3ZCwweDc1LDB4NzldKSxcbiAgICAgICAgICAgICAgdXRpbC5iaW4yc3RyKFsweDA0LDB4MDAsMHhjMiwweGJjLDB4NzEsMHhmNywweDQxLDB4NGEsMHgwOSwweDY2LDB4NzAsMHgwMiwweDY4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OGIsMHhlYiwweGUyLDB4MzQsMHhkMSwweDEyLDB4ODMsMHg5MywweDc1LDB4ZTksMHg3MSwweDMyLDB4ZTIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhlZCwweDE4LDB4NmYsMHg4ZSwweDNhLDB4ZmYsMHgyMiwweDcwLDB4MjgsMHgwMSwweGJmLDB4NGEsMHgzOSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQxLDB4YmIsMHgzYywweDRhLDB4YmMsMHhiOCwweDEzLDB4ZmMsMHgxNCwweGY2LDB4NzEsMHhhMSwweDQ0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWMsMHgwMiwweGExLDB4NzMsMHg4MSwweGNjLDB4YTAsMHgzNSwweDAyLDB4M2UsMHg5NywweGI1LDB4YzQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg5NCwweDMzLDB4ZjEsMHhkMSwweGRmLDB4MTQsMHgzZiwweGZiLDB4OGYsMHhiOSwweDc1LDB4NzAsMHhkYyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDc0LDB4M2YsMHgwNywweDM1LDB4OGYsMHg1MywweGFhLDB4YjIsMHhkNiwweDg4LDB4NTEsMHg3MSwweDRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEsMHgyNCwweGVjLDB4N2QsMHhjYSwweGY2LDB4YTIsMHhiMywweGJiLDB4YWQsMHgyZSwweDYwLDB4ZmIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxYywweGVlLDB4NDksMHhkMCwweDRlLDB4NWMsMHhlMywweDFmLDB4ODgsMHg0OCwweGU0LDB4NjgsMHgxNCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNkLDB4NzEsMHhiYSwweGQ3LDB4NGQsMHgzNSwweDEwLDB4ODYsMHgzNywweDYyLDB4ZTAsMHhhNSwweDBiXSksXG4gICAgICAgICAgICAgIHV0aWwuYmluMnN0cihbMHgwNCwweDAwLDB4ZTIsMHgzOCwweGY5LDB4YzgsMHgzYywweGQxLDB4Y2YsMHg2MiwweDkzLDB4YzMsMHg3NyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDc2LDB4OTcsMHg0NCwweGU4LDB4YzgsMHhjYSwweDkzLDB4OWEsMHhlZiwweGYwLDB4NjMsMHg3NiwweDI1LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M2IsMHgxYywweDQ2LDB4ZmYsMHg5MCwweDEzLDB4OTEsMHgxNSwweDk3LDB4N2UsMHg4OCwweDk1LDB4ZDQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3ZiwweDJmLDB4NTIsMHg2ZSwweDBkLDB4NTUsMHg1NSwweDJlLDB4ZjEsMHg1OCwweDVjLDB4N2UsMHg1NixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGQ0LDB4NDgsMHhhYSwweGRiLDB4OGMsMHg0NCwweDRkLDB4ODQsMHg2OSwweDMzLDB4ODcsMHgwNywweGIyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N2UsMHhmNSwweGEwLDB4NjAsMHhmYiwweDczLDB4NTksMHg0NiwweDI5LDB4Y2IsMHgxZSwweDNmLDB4N2MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyZiwweGE2LDB4NTMsMHhlMywweDhjLDB4ZWYsMHhkNSwweGViLDB4YmIsMHhjOCwweDlhLDB4OGUsMHg2NixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDRhLDB4NDcsMHgyZiwweGUxLDB4YmEsMHg1ZSwweDMyLDB4ZDQsMHg1MiwweDA0LDB4ODgsMHg5ZCwweDYzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M2UsMHhiYSwweDcxLDB4MmQsMHhmNywweDYxLDB4ZDUsMHhmYywweDI2LDB4YmYsMHhkOCwweDYwLDB4OTIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3YiwweDk0LDB4ZjgsMHg2ZiwweDNkLDB4OTcsMHgwYiwweDBjLDB4NTIsMHg4YywweGIzLDB4YjYsMHg4Yl0pLFxuICAgICAgICAgICAgICB1dGlsLmJpbjJzdHIoWzB4MDQsMHgwMCwweGI3LDB4YzUsMHg0ZCwweDZlLDB4MmYsMHhkZCwweGVmLDB4ZWMsMHgwNywweDcwLDB4YTIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3YywweDFjLDB4OWQsMHg4ZSwweDY2LDB4NjAsMHg3YywweDYxLDB4MWUsMHg0NSwweGU5LDB4ZGMsMHg4MixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJmLDB4YzUsMHg3ZSwweDFhLDB4YzYsMHhkMCwweDkyLDB4YzUsMHgyMiwweDliLDB4OWEsMHhmYiwweDczLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OTUsMHg5OSwweGYyLDB4N2MsMHhkYiwweDJhLDB4OTMsMHg3YiwweDVhLDB4MjksMHg3MywweDI0LDB4MTYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MSwweDQ5LDB4YjUsMHhmMiwweDVmLDB4YmUsMHhlNywweDY0LDB4NGQsMHhkYSwweDUyLDB4OWUsMHhjMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQxLDB4NDAsMHg1ZSwweDAzLDB4OTIsMHg4ZCwweDM5LDB4OTUsMHgxZiwweDY4LDB4OWYsMHgwMCwweDJlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGMsMHg2ZiwweGNmLDB4ZDksMHg2ZCwweDY4LDB4ZjcsMHgwMCwweDRmLDB4MGUsMHhjOCwweDBiLDB4ZmEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MSwweGUwLDB4MjIsMHhmMCwweGZmLDB4YTcsMHg0MiwweGQ0LDB4ZGUsMHgwYiwweDQ3LDB4OGYsMHgyYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGY1LDB4NGQsMHgwNCwweDMyLDB4OTEsMHg4OSwweDRiLDB4MGUsMHgwNSwweDhkLDB4NzAsMHhmOSwweGJiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZTcsMHhkNiwweDc2LDB4ZWEsMHgwZSwweDFhLDB4OTAsMHgzMCwweGY1LDB4OTgsMHgwMSwweGM1LDB4NzNdKV07XG4gIFxuICB2YXIgRFNBcHViTVBJc3RycyA9IFtcbiAgICAgICAgICB1dGlsLmJpbjJzdHIoWzB4MDgsMHgwMCwweGE4LDB4ODUsMHg1YywweDI4LDB4MDUsMHg5NCwweDAzLDB4YmUsMHgwNywweDZjLDB4MTMsMHgzZSwweDY1LFxuICAgICAgICAgICAgICAgICAgICAgICAgMHhmYiwweGI1LDB4ZTEsMHg5OSwweDdjLDB4ZmEsMHg4NCwweGUzLDB4YWMsMHg0NywweGE1LDB4YzQsMHg0NiwweGQ4LDB4NWYsXG4gICAgICAgICAgICAgICAgICAgICAgICAweDQ0LDB4ZTksMHhjMSwweDZiLDB4NjksMHhmNywweDEwLDB4NzYsMHg0OSwweGE3LDB4MjUsMHg4NSwweGY0LDB4MWIsMHhlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4YzYsMHg2MCwweGM0LDB4NWIsMHhhYSwweGQ0LDB4ODcsMHhkNiwweDhmLDB4OTIsMHg1NiwweDdkLDB4NTUsMHgzZiwweDQ1LFxuICAgICAgICAgICAgICAgICAgICAgICAgMHhhZSwweDEyLDB4NzMsMHhkYSwweDI5LDB4OGMsMHhiYSwweDMyLDB4Y2MsMHhkNywweGE0LDB4ZDAsMHgyNCwweGIwLDB4N2MsXG4gICAgICAgICAgICAgICAgICAgICAgICAweGQ4LDB4MGMsMHgzYSwweDkxLDB4NmYsMHg5OCwweDQwLDB4OWMsMHg5YSwweGE4LDB4Y2MsMHgyOCwweDI3LDB4OTUsMHgwYixcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4ZTEsMHg1YiwweGI5LDB4M2IsMHgxYywweDFjLDB4ZDIsMHhlYywweGFiLDB4MDcsMHgyNSwweDhkLDB4N2EsMHgyYSwweDJiLFxuICAgICAgICAgICAgICAgICAgICAgICAgMHgxNiwweDE0LDB4ZTgsMHhkYSwweDcxLDB4ZDIsMHhhYiwweGJhLDB4ODUsMHgxNCwweDBkLDB4YzUsMHhlMCwweDg4LDB4ZWIsXG4gICAgICAgICAgICAgICAgICAgICAgICAweGE1LDB4ZTIsMHhkNSwweDQ4LDB4M2QsMHg3NCwweDBjLDB4NDEsMHhlYiwweGZkLDB4YjYsMHg0ZSwweGY5LDB4MmMsMHg4MixcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4MTcsMHhkZCwweDY0LDB4MWUsMHgxOSwweDM5LDB4YTMsMHg3ZiwweGY5LDB4MDAsMHhjZCwweDliLDB4ZGEsMHgyZSwweGJkLFxuICAgICAgICAgICAgICAgICAgICAgICAgMHg3MSwweDEyLDB4ZGYsMHgwZCwweDdjLDB4MGEsMHg2YiwweDJkLDB4MjEsMHgzYiwweDljLDB4NjYsMHg5MywweDRhLDB4MWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAweDkwLDB4NzksMHhkMywweDVhLDB4NWIsMHhlNSwweGI5LDB4OTQsMHgxYiwweGU2LDB4NDcsMHg5OSwweDA2LDB4OTgsMHhkOCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4MmEsMHhlNSwweGUyLDB4YTYsMHg5NSwweDZhLDB4MDcsMHhjOCwweGFjLDB4N2MsMHhlOSwweGZjLDB4YTIsMHg2YSwweDE2LFxuICAgICAgICAgICAgICAgICAgICAgICAgMHgyYywweDk0LDB4OTgsMHhiZCwweDkxLDB4MGEsMHg3YywweDdjLDB4MmMsMHhiOSwweDdlLDB4YTIsMHg1MSwweDhiLDB4NDUsXG4gICAgICAgICAgICAgICAgICAgICAgICAweDFkLDB4NDYsMHgzNCwweGE4LDB4NTIsMHgyYiwweG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gICAgICAgICAgICAweGI0LDB4MjksMHgyOSwweDI2LDB4NGUsMHgxYywweGEwLDB4YWQsMHgxYywweDA3LDB4MjgsMHgzZiwweGU1LDB4NDMsMHgxMCxcbiAgICAgICAgICAgICAgICAgICAgMHhiYSwweGI0LDB4MDgsMHhlMCwweGRjLDB4YTIsMHhjMywweDViLDB4MWYsMHhiZCwweDk0LDB4YzcsMHg0MywweGU1LDB4ZjIsXG4gICAgICAgICAgICAgICAgICAgIDB4MTcsMHgzMCwweDU0LDB4N2YsMHgxNCwweGJlLDB4ZjQsMHhiZCwweDkxLDB4M2IsMHhlNCwweDM2LDB4YTQsMHg1MCwweDViLFxuICAgICAgICAgICAgICAgICAgICAweDM3LDB4ODksMHg1ZSwweGNjLDB4YzcsMHg3NCwweDU0LDB4MzIsMHgyMCwweDA5LDB4NjMsMHg5OCwweGI3LDB4ZDksMHhhZixcbiAgICAgICAgICAgICAgICAgICAgMHg3ZiwweGIwLDB4NmMsMHgyNywweDQzLDB4ZmUsMHg1MiwweGU2LDB4MWEsMHg4OCwweDU5LDB4MjUsMHhmYywweGViLDB4NDMsXG4gICAgICAgICAgICAgICAgICAgIDB4NTAsMHhjNywweDY1LDB4NDMsMHhjMSwweDg2LDB4NzMsMHg1OCwweDUzLDB4M2EsMHhjZiwweDdhLDB4YTMsMHgxZCwweDU2LFxuICAgICAgICAgICAgICAgICAgICAweGM4LDB4NGEsMHg4MCwweDcwLDB4YjcsMHhiZiwweGYyLDB4YTMsMHhlYywweGU4LDB4NzcsMHgwNSwweDMzLDB4MDksMHg5ZCxcbiAgICAgICAgICAgICAgICAgICAgMHhhYSwweGNhLDB4YTAsMHhlMSwweDY0LDB4NjQsMHg2ZiwweDc2LDB4OTksMHg0MSwweDc1LDB4NzgsMHg5MCwweGY2LDB4ZTcsXG4gICAgICAgICAgICAgICAgICAgIDB4MjMsMHhlNiwweGVjLDB4NTAsMHhlNSwweDk5LDB4YTgsMHgzZSwweDFhLDB4NGIsMHhjOSwweDg4LDB4NTgsMHg2NiwweGFlLFxuICAgICAgICAgICAgICAgICAgICAweDFhLDB4NTMsMHg1ZSwweGU0LDB4YjcsMHg4NiwweGNmLDB4YTYsMHhlNSwweGFkLDB4YjQsMHg4MCwweGEwLDB4ZjEsMHgwZCxcbiAgICAgICAgICAgICAgICAgICAgMHg5NiwweGI4LDB4NDEsMHhkMCwweDA3LDB4OWEsMHgyMSwweDhkLDB4NTAsMHg3ZiwweDRmLDB4NzMsMHgxMywweGEyLDB4ZTIsXG4gICAgICAgICAgICAgICAgICAgIDB4MDIsMHgwNywweGMzLDB4YTMsMHgwZiwweDA5LDB4MTgsMHg3ZiwweGY3LDB4NmIsMHg5MCwweDcwLDB4YzAsMHhmOSwweDBjLFxuICAgICAgICAgICAgICAgICAgICAweDY3LDB4OGQsMHg5ZCwweDE0LDB4YjYsMHg5ZCwweDMyLDB4ODIsMHhkMCwweGI1LDB4YzYsMHg1NywweGYwLDB4OTEsMHhkOSxcbiAgICAgICAgICAgICAgICAgICAgMHhjMywweDI2LDB4YWUsMHg5ZiwweGE5LDB4NjcsMHg0OSwweDk2LDB4NWMsMHgwNywweDNlLDB4NDcsMHg1YywweGVkLDB4NjAsXG4gICAgICAgICAgICAgICAgICAgIDB4MDcsMHhhYywweDZhXSldO1xuICB2YXIgRFNBc2VjTVBJc3RycyA9IFt1dGlsLmJpbjJzdHIoWzB4MDEsMHgwMCwweDliLDB4NTgsMHhhOCwweGY0LDB4MDQsMHhiMSwweGQ1LDB4MTQsMHgwOSwweGUxLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhlMSwweGExLDB4OGEsMHgwYiwweGEzLDB4YzMsMHhhMywweDY2LDB4YWEsMHgyNywweDk5LDB4NTAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAweDFjLDB4NGQsMHhiYSwweDI0LDB4ZWUsMHhkZiwweGRmLDB4YjgsMHg4ZSwweDhlXSldO1xuICAgICAgICAgICAgXG4gIHZhciBFbGdhbWFscHViTVBJc3R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sMHgyMywweDQyLDB4OTEsMHgxOCxcbiAgICAgICAgICAgICAgICAgICAgIDB4NGMsMHg5NywweGYxLDB4MjcsMHg2MiwweDc3XSksXG4gICAgICAgdXRpbC5iaW4yc3RyKFsweDAwLDB4MDMsMHgwNV0pLFxuICAgICAgIHV0aWwuYmluMnN0cihbMHgwNywweGZmLDB4NTcsMHgxOSwweDc2LDB4ZmMsMHgwOSwweDZhLDB4N2EsMHhmNywweGJhLDB4YjIsMHg0MiwweGJmLFxuICAgICAgICAgICAgICAgICAgICAgMHhjZCwweDJiLDB4YzEsMHgxYSwweDc5LDB4MjUsMHg4YywweGFkLDB4ZjQsMHgzYSwweDBhLDB4N2EsMHg5YiwweDRjLFxuICAgICAgICAgICAgICAgICAgICAgMHg0NiwweDNjLDB4ZTAsMHg0ZiwweGNjLDB4NmUsMHhlNSwweDdhLDB4MzMsMHgzYSwweDRlLDB4ODAsMHhjYiwweGQzLFxuICAgICAgICAgICAgICAgICAgICAgMHg2MiwweGQ3LDB4OGYsMHhlMiwweGM4LDB4YjAsMHhkMCwweGNiLDB4NDksMHhjOSwweDllLDB4MmQsMHg5NywweDE2LFxuICAgICAgICAgICAgICAgICAgICAgMHgzYSwweDdkLDB4YjEsMHhlMSwweGQzLDB4ZDksMHhkNywweDNmLDB4MjAsMHg2MCwweGUzLDB4M2UsMHg3NywweGVhLFxuICAgICAgICAgICAgICAgICAgICAgMHgwYywweGU0LDB4N2IsMHhmMCwweDM5LDB4MWEsMHgwZCwweGQ5LDB4OGYsMHg3MywweGQyLDB4NTEsMHhiOCwweDBjLFxuICAgICAgICAgICAgICAgICAgICAgMHgwZSwweDE1LDB4MWUsMHhhZCwweDdjLDB4ZDgsMHg5ZCwweDc0LDB4NmUsMHhhMiwweDE3LDB4NmIsMHg1OCwweDE0LFxuICAgICAgICAgICAgICAgICAgICAgMHgyYiwweGI3LDB4YWQsMHg4YSwweGQ3LDB4NjYsMHhjMCwweGRmLDB4ZWEsMHgyZCwweGZjLDB4Yz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G5cbiAgICBiaXRSZXZlcnNlID0gW1xuICAgICAgICAweDAwLCAweDgwLCAweDQwLCAweGMwLCAweDIwLCAweGEwLCAweDYwLCAweGUwLFxuICAgICAgICAweDEwLCAweDkwLCAweDUwLCAweGQwLCAweDMwLCAweGIwLCAweDcwLCAweGYwLFxuICAgICAgICAweDA4LCAweDg4LCAweDQ4LCAweGM4LCAweDI4LCAweGE4LCAweDY4LCAweGU4LFxuICAgICAgICAweDE4LCAweDk4LCAweDU4LCAweGQ4LCAweDM4LCAweGI4LCAweDc4LCAweGY4LFxuICAgICAgICAweDA0LCAweDg0LCAweDQ0LCAweGM0LCAweDI0LCAweGE0LCAweDY0LCAweGU0LFxuICAgICAgICAweDE0LCAweDk0LCAweDU0LCAweGQ0LCAweDM0LCAweGI0LCAweDc0LCAweGY0LFxuICAgICAgICAweDBjLCAweDhjLCAweDRjLCAweGNjLCAweDJjLCAweGFjLCAweDZjLCAweGVjLFxuICAgICAgICAweDFjLCAweDljLCAweDVjLCAweGRjLCAweDNjLCAweGJjLCAweDdjLCAweGZjLFxuICAgICAgICAweDAyLCAweDgyLCAweDQyLCAweGMyLCAweDIyLCAweGEyLCAweDYyLCAweGUyLFxuICAgICAgICAweDEyLCAweDkyLCAweDUyLCAweGQyLCAweDMyLCAweGIyLCAweDcyLCAweGYyLFxuICAgICAgICAweDBhLCAweDhhLCAweDRhLCAweGNhLCAweDJhLCAweGFhLCAweDZhLCAweGVhLFxuICAgICAgICAweDFhLCAweDlhLCAweDVhLCAweGRhLCAweDNhLCAweGJhLCAweDdhLCAweGZhLFxuICAgICAgICAweDA2LCAweDg2LCAweDQ2LCAweGM2LCAweDI2LCAweGE2LCAweDY2LCAweGU2LFxuICAgICAgICAweDE2LCAweDk2LCAweDU2LCAweGQ2LCAweDM2LCAweGI2LCAweDc2LCAweGY2LFxuICAgICAgICAweDBlLCAweDhlLCAweDRlLCAweGNlLCAweDJlLCAweGFlLCAweDZlLCAweGVlLFxuICAgICAgICAweDFlLCAweDllLCAweDVlLCAweGRlLCAweDNlLCAweGJlLCAweDdlLCAweGZlLFxuICAgICAgICAweDAxLCAweDgxLCAweDQxLCAweGMxLCAweDIxLCAweGExLCAweDYxLCAweGUxLFxuICAgICAgICAweDExLCAweDkxLCAweDUxLCAweGQxLCAweDMxLCAweGIxLCAweDcxLCAweGYxLFxuICAgICAgICAweDA5LCAweDg5LCAweDQ5LCAweGM5LCAweDI5LCAweGE5LCAweDY5LCAweGU5LFxuICAgICAgICAweDE5LCAweDk5LCAweDU5LCAweGQ5LCAweDM5LCAweGI5LCAweDc5LCAweGY5LFxuICAgICAgICAweDA1LCAweDg1LCAweDQ1LCAweGM1LCAweDI1LCAweGE1LCAweDY1LCAweGU1LFxuICAgICAgICAweDE1LCAweDk1LCAweDU1LCAweGQ1LCAweDM1LCAweGI1LCAweDc1LCAweGY1LFxuICAgICAgICAweDBkLCAweDhkLCAweDRkLCAweGNkLCAweDJkLCAweGFkLCAweDZkLCAweGVkLFxuICAgICAgICAweDFkLCAweDlkLCAweDVkLCAweGRkLCAweDNkLCAweGJkLCAweDdkLCAweGZkLFxuICAgICAgICAweDAzLCAweDgzLCAweDQzLCAweGMzLCAweDIzLCAweGEzLCAweDYzLCAweGUzLFxuICAgICAgICAweDEzLCAweDkzLCAweDUzLCAweGQzLCAweDMzLCAweGIzLCAweDczLCAweGYzLFxuICAgICAgICAweDBiLCAweDhiLCAweDRiLCAweGNiLCAweDJiLCAweGFiLCAweDZiLCAweGViLFxuICAgICAgICAweDFiLCAweDliLCAweDViLCAweGRiLCAweDNiLCAweGJiLCAweDdiLCAweGZiLFxuICAgICAgICAweDA3LCAweDg3LCAweDQ3LCAweGM3LCAweDI3LCAweGE3LCAweDY3LCAweGU3LFxuICAgICAgICAweDE3LCAweDk3LCAweDU3LCAweGQ3LCAweDM3LCAweGI3LCAweDc3LCAweGY3LFxuICAgICAgICAweDBmLCAweDhmLCAweDRmLCAweGNmLCAweDJmLCAweGFmLCAweDZmLCAweGVmLFxu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lczt0bXArKykge1xuICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIjB4JTAzeCAgMHglMDN4ICgweCUwNHgpXCIsdG1wLWN1cnJlbnRUcmVlLCB0bXAtPmp1bXA/dG1wLT5qdW1wLWN1cnJlbnRUcmVlOjAsKHRtcC0+anVtcD90bXAtPmp1bXAtY3VycmVudFRyZWU6MCkqNisweGNmMCk7XG4gICAgICAgICAgICAgICAgaWYoISh0bXAuYjAgJiAweDgwMDApKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vZnByaW50ZihzdGRvdXQsIFwiICAweCUwM3ggKCVjKVwiLCB0bXAtPmIwLCh0bXAtPmIwPDI1NiAmJiBpc3ByaW50KHRtcC0+YjApKT90bXAtPmIwOifvv70nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYoISh0bXAuYjEgJiAweDgwMDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmKCh0bXAuYjAgJiAweDgwMDApKVxuICAgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRvdXQsIFwiICAgICAgICAgICBcIik7XG4gICAgICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIiAgMHglMDN4ICglYylcIiwgdG1wLT5iMSwodG1wLT5iMTwyNTYgJiYgaXNwcmludCh0bXAtPmIxKSk/dG1wLT5iMTon77+9Jyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZwcmludGYoc3Rkb3V0LCBcIlxcblwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSovXG4gICAgcmV0dXJuIDA7XG4gIH07XG5cbiAgZnVuY3Rpb24gRGVjb2RlVmFsdWUoY3VycmVudFRyZWUpIHtcbiAgICB2YXIgbGVuLCBpLFxuICAgICAgeHRyZWVwb3MgPSAwLFxuICAgICAgWCA9IGN1cnJlbnRUcmVlW3h0cmVlcG9zXSxcbiAgICAgIGI7XG5cbiAgICAvKiBkZWNvZGUgb25lIHN5bWJvbCBvZiB0aGUgZGF0YSAqL1xuICAgIHdoaWxlICgxKSB7XG4gICAgICBiID0gcmVhZEJpdCgpO1xuICAgICAgaWYgKGRlYnVnKVxuICAgICAgICBkb2N1bWVudC53cml0ZShcImI9XCIgKyBiKTtcbiAgICAgIGlmIChiKSB7XG4gICAgICAgIGlmICghKFguYjEgJiAweDgwMDApKSB7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCJyZXQxXCIpO1xuICAgICAgICAgIHJldHVybiBYLmIxOyAvKiBJZiBsZWFmIG5vZGUsIHJldHVybiBkYXRhICovXG4gICAgICAgIH1cbiAgICAgICAgWCA9IFguanVtcDtcbiAgICAgICAgbGVuID0gY3VycmVudFRyZWUubGVuZ3RoO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICBpZiAoY3VycmVudFRyZWVbaV0gPT09IFgpIHtcbiAgICAgICAgICAgIHh0cmVlcG9zID0gaTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvL3h0cmVlcG9zKys7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoIShYLmIwICYgMHg4MDAwKSkge1xuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwicmV0MlwiKTtcbiAgICAgICAgICByZXR1cm4gWC5iMDsgLyogSWYgbGVhZiBub2RlLCByZXR1cm4gZGF0YSAqL1xuICAgICAgICB9XG4gICAgICAgIC8vWCsrOyAvLz8/Pz8/Pz8/Pz8/Pz8/Pz8/P1xuICAgICAgICB4dHJlZXBvcysrO1xuICAgICAgICBYID0gY3VycmVudFRyZWVbeHRyZWVwb3NdO1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAoZGVidWcpXG4gICAgICBkb2N1bWVudC53cml0ZShcInJldDNcIik7XG4gICAgcmV0dXJuIC0xO1xuICB9O1xuXG4gIGZ1bmN0aW9uIERlZmxhdGVMb29wKCkge1xuICAgIHZhciBsYXN0LCBjLCB0eXBlLCBpLCBsZW47XG5cbiAgICBkbyB7XG4gICAgICAvKmlmKChsYXN0ID0gcmVhZEJpdCgpKSl7XG4gICAgICAgICAgICBmcHJpbnRmKGVycmZwLCBcIkxhc3QgQmxvY2s6IFwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGZwcmludGYoZXJyZnAsIFwiTm90IExhc3QgQmxvY2s6IFwiKTtcbiAgICAgICAgfSovXG4gICAgICBsYXN0ID0gcmVhZEJpdCgpO1xuICAgICAgdHlwZSA9IHJlYWRCaXRzKDIpO1xuICAgICAgc3dpdGNoICh0eXBlKSB7XG4gICAgICAgIGNhc2UgMDpcbiAgICAgICAgICBpZiAoZGVidWcpXG4gICAgICAgICAgICBhbGVydChcIlN0b3JlZFxcblwiKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwiRml4ZWQgSHVmZm1hbiBjb2Rlc1xcblwiKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAyOlxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwiRHluYW1pYyBIdWZmbWFuIGNvZGVzXFxuXCIpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJSZXNlcnZlZCBibG9jayB0eXBlISFcXG5cIik7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgYWxlcnQoXCJVbmV4cGVjdGVkIHZhbHVlICVkIVxcblwiLCB0eXBlKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgaWYgKHR5cGUgPT0gMCkge1xuICAgICAgICB2YXIgYmxvY2tMZW4sIGNTdW07XG5cbiAgICAgICAgLy8gU3RvcmVkIFxuICAgICAgICBieXRlQWxpZ24oKTtcbiAgICAgICAgYmxvY2tMZW4gPSByZWFkQnl0ZSgpO1xuICAgICAgICBibG9ja0xlbiB8PSAocmVhZEJ5dGUoKSA8PCA4KTtcblxuICAgICAgICBjU3VtID0gcmVhZEJ5dGUoKTtcbiAgICAgICAgY1N1bSB8PSAocmVhZEJ5dGUoKSA8PCA4KTtcblxuICAgICAgICBpZiAoKChibG9ja0xlbiBeIH5jU3VtKSAmIDB4ZmZmZikpIHtcbiAgICAgICAgICBkb2N1bWVudC53cml0ZShcIkJsb2NrTGVuIGNoZWNrc3VtIG1pc21hdGNoXFxuXCIpO1xuICAgICAgICB9XG4gICAgICAgIHdoaWxlIChibG9ja0xlbi0tKSB7XG4gICAgICAgICAgYyA9IHJlYWRCeXRlKCk7XG4gICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKHR5cGUgPT0gMSkge1xuICAgICAgICB2YXIgajtcblxuICAgICAgICAvKiBGaXhlZCBIdWZmbWFuIHRhYmxlcyAtLSBmaXhlZCBkZWNvZGUgcm91dGluZSAqL1xuICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgMjU2ICAgIDAwMDAwMDAgICAgICAgIDBcbiAgICAgICAgICAgICAgICA6ICAgOiAgICAgOlxuICAgICAgICAgICAgICAgIDI3OSAgICAwMDEwMTExICAgICAgICAyM1xuICAgICAgICAgICAgICAgIDAgICAwMDExMDAwMCAgICA0OFxuICAgICAgICAgICAgICAgIDogICAgOiAgICAgIDpcbiAgICAgICAgICAgICAgICAxNDMgICAgMTAxMTExMTEgICAgMTkxXG4gICAgICAgICAgICAgICAgMjgwIDExMDAwMDAwICAgIDE5MlxuICAgICAgICAgICAgICAgIDogICAgOiAgICAgIDpcbiAgICAgICAgICAgICAgICAyODcgMTEwMDAxMTEgICAgMTk5XG4gICAgICAgICAgICAgICAgMTQ0ICAgIDExMDAxMDAwMCAgICA0MDBcbiAgICAgICAgICAgICAgICA6ICAgIDogICAgICAgOlxuICAgICAgICAgICAgICAgIDI1NSAgICAxMTExMTExMTEgICAgNTExXG4gICAgXG4gICAgICAgICAgICAgICAgTm90ZSB0aGUgYml0IG9yZGVyIVxuICAgICAgICAgICAgICAgICovXG5cbiAgICAgICAgICBqID0gKGJpdFJldmVyc2VbcmVhZEJpdHMoNyldID4+IDEpO1xuICAgICAgICAgIGlmIChqID4gMjMpIHtcbiAgICAgICAgICAgIGogPSAoaiA8PCAxKSB8IHJlYWRCaXQoKTsgLyogNDguLjI1NSAqL1xuXG4gICAgICAgICAgICBpZiAoaiA+IDE5OSkgeyAvKiAyMDAuLjI1NSAqL1xuICAgICAgICAgICAgICBqIC09IDEyODsgLyogIDcyLi4xMjcgKi9cbiAgICAgICAgICAgICAgaiA9IChqIDw8IDEpIHwgcmVhZEJpdCgpOyAvKiAxNDQuLjI1NSA8PCAqL1xuICAgICAgICAgICAgfSBlbHNlIHsgLyogIDQ4Li4xOTkgKi9cbiAgICAgICAgICAgICAgaiAtPSA0ODsgLyogICAwLi4xNTEgKi9cbiAgICAgICAgICAgICAgaWYgKGogPiAxNDMpIHtcbiAgICAgICAgICAgICAgICBqID0gaiArIDEzNjsgLyogMjgwLi4yODcgPDwgKi9cbiAgICAgICAgICAgICAgICAvKiAgIDAuLjE0MyA8PCAqL1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHsgLyogICAwLi4yMyAqL1xuICAgICAgICAgICAgaiArPSAyNTY7IC8qIDI1Ni4uMjc5IDw8ICovXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChqIDwgMjU2KSB7XG4gICAgICAgICAgICBhZGRCdWZmZXIoaik7XG4gICAgICAgICAgICAvL2RvY3VtZW50LndyaXRlKFwib3V0OlwiK1N0cmluZy5mcm9tQ2hhckNvZGUoaikpO1xuICAgICAgICAgICAgLypmcHJpbnRmKGVycmZwLCBcIkAlZCAlMDJ4XFxuXCIsIFNJWkUsIGopOyovXG4gICAgICAgICAgfSBlbHNlIGlmIChqID09IDI1Nikge1xuICAgICAgICAgICAgLyogRU9GICovXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGxlbiwgZGlzdDtcblxuICAgICAgICAgICAgaiAtPSAyNTYgKyAxOyAvKiBieXRlcyArIEVPRiAqL1xuICAgICAgICAgICAgbGVuID0gcmVhZEJpdHMoY3BsZXh0W2pdKSArIGNwbGVuc1tqXTtcblxuICAgICAgICAgICAgaiA9IGJpdFJldmVyc2VbcmVhZEJpdHMoNSldID4+IDM7XG4gICAgICAgICAgICBpZiAoY3BkZXh0W2pdID4gOCkge1xuICAgICAgICAgICAgICBkaXN0ID0gcmVhZEJpdHMoOCk7XG4gICAgICAgICAgICAgIGRpc3QgfD0gKHJlYWRCaXRzKGNwZGV4dFtqXSAtIDgpIDw8IDgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZGlzdCA9IHJlYWRCaXRzKGNwZGV4dFtqXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkaXN0ICs9IGNwZGlzdFtqXTtcblxuICAgICAgICAgICAgLypmcHJpbnRmKGVycmZwLCBcIkAlZCAobCUwMngsZCUwNHgpXFxuXCIsIFNJWkUsIGxlbiwgZGlzdCk7Ki9cbiAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBsZW47IGorKykge1xuICAgICAgICAgICAgICB2YXIgYyA9IGJ1ZjMya1soYklkeCAtIGRpc3QpICYgMHg3ZmZmXTtcbiAgICAgICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAg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AgICAgdmFyIHogPSAtMTtcbiAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwiPGJyPm49XCIgKyBuICsgXCIgYml0czogXCIgKyBiaXRzICsgXCI8YnI+XCIpO1xuICAgICAgICB3aGlsZSAoaSA8IG4pIHtcbiAgICAgICAgICB6Kys7XG4gICAgICAgICAgaiA9IERlY29kZVZhbHVlKGRpc3RhbmNlVHJlZSk7XG4gICAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgICAgZG9jdW1lbnQud3JpdGUoXCI8YnI+XCIgKyB6ICsgXCIgaTpcIiArIGkgKyBcIiBkZWNvZGU6IFwiICsgaiArIFwiICAgIGJpdHMgXCIgKyBiaXRzICsgXCI8YnI+XCIpO1xuICAgICAgICAgIGlmIChqIDwgMTYpIHsgLy8gbGVuZ3RoIG9mIGNvZGUgaW4gYml0cyAoMC4uMTUpXG4gICAgICAgICAgICBsbFtpKytdID0gajtcbiAgICAgICAgICB9IGVsc2UgaWYgKGogPT0gMTYpIHsgLy8gcmVwZWF0IGxhc3QgbGVuZ3RoIDMgdG8gNiB0aW1lcyBcbiAgICAgICAgICAgIHZhciBsO1xuICAgICAgICAgICAgaiA9IDMgKyByZWFkQml0cygyKTtcbiAgICAgICAgICAgIGlmIChpICsgaiA+IG4pIHtcbiAgICAgICAgICAgICAgZmx1c2hCdWZmZXIoKTtcbiAgICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsID0gaSA/IGxsW2kgLSAxXSA6IDA7XG4gICAgICAgICAgICB3aGlsZSAoai0tKSB7XG4gICAgICAgICAgICAgIGxsW2krK10gPSBsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoaiA9PSAxNykgeyAvLyAzIHRvIDEwIHplcm8gbGVuZ3RoIGNvZGVzXG4gICAgICAgICAgICAgIGogPSAzICsgcmVhZEJpdHMoMyk7XG4gICAgICAgICAgICB9IGVsc2UgeyAvLyBqID09IDE4OiAxMSB0byAxMzggemVybyBsZW5ndGggY29kZXMgXG4gICAgICAgICAgICAgIGogPSAxMSArIHJlYWRCaXRzKDcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGkgKyBqID4gbikge1xuICAgICAgICAgICAgICBmbHVzaEJ1ZmZlcigpO1xuICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdoaWxlIChqLS0pIHtcbiAgICAgICAgICAgICAgbGxbaSsrXSA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8qZm9yKGo9MDsgajxsaXRlcmFsQ29kZXMrZGlzdENvZGVzOyBqKyspIHtcbiAgICAgICAgICAgICAgICAvL2ZwcmludGYoZXJyZnAsIFwiJWQgXCIsIGxsW2pdKTtcbiAgICAgICAgICAgICAgICBpZiAoKGomNyk9PTcpXG4gICAgICAgICAgICAgICAgICAgIGZwcmludGYoZXJyZnAsIFwiXFxuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnByaW50ZihlcnJmcCwgXCJcXG5cIik7Ki9cbiAgICAgICAgLy8gQ2FuIG92ZXJ3cml0ZSB0cmVlIGRlY29kZSB0cmVlIGFzIGl0IGlzIG5vdCB1c2VkIGFueW1vcmVcbiAgICAgICAgbGVuID0gbGl0ZXJhbFRyZWUubGVuZ3RoO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspXG4gICAgICAgICAgbGl0ZXJhbFRyZWVbaV0gPSBuZXcgSHVmTm9kZSgpO1xuICAgICAgICBpZiAoQ3JlYXRlVHJlZShsaXRlcmFsVHJlZSwgbGl0ZXJhbENvZGVzLCBsbCwgMCkpIHtcbiAgICAgICAgICBmbHVzaEJ1ZmZlcigpO1xuICAgICAgICAgIHJldHVybiAxO1xuICAgICAgICB9XG4gICAgICAgIGxlbiA9IGxpdGVyYWxUcmVlLmxlbmd0aDtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSsrKVxuICAgICAgICAgIGRpc3RhbmNlVHJlZVtpXSA9IG5ldyBIdWZOb2RlKCk7XG4gICAgICAgIHZhciBsbDIgPSBuZXcgQXJyYXkoKTtcbiAgICAgICAgZm9yIChpID0gbGl0ZXJhbENvZGVzOyBpIDwgbGwubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICBsbDJbaSAtIGxpdGVyYWxDb2Rlc10gPSBsbFtpXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoQ3JlYXRlVHJlZShkaXN0YW5jZVRyZWUsIGRpc3RDb2RlcywgbGwyLCAwKSkge1xuICAgICAgICAgIGZsdXNoQnVmZmVyKCk7XG4gICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGRlYnVnKVxuICAgICAgICAgIGRvY3VtZW50LndyaXRlKFwiPGJyPmxpdGVyYWxUcmVlXCIpO1xuICAgICAgICBvdXRlcjogd2hpbGUgKDEpIHtcbiAgICAgICAgICBqID0gRGVjb2RlVmFsdWUobGl0ZXJhbFRyZWUpO1xuICAgICAgICAgIGlmIChqID49IDI1NikgeyAvLyBJbiBDNjQ6IGlmIGNhcnJ5IHNldFxuICAgICAgICAgICAgdmFyIGxlbiwgZGlzdDtcbiAgICAgICAgICAgIGogLT0gMjU2O1xuICAgICAgICAgICAgaWYgKGogPT0gMCkge1xuICAgICAgICAgICAgICAvLyBFT0ZcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBqLS07XG4gICAgICAgICAgICBsZW4gPSByZWFkQml0cyhjcGxleHRbal0pICsgY3BsZW5zW2pdO1xuXG4gICAgICAgICAgICBqID0gRGVjb2RlVmFsdWUoZGlzdGFuY2VUcmVlKTtcbiAgICAgICAgICAgIGlmIChjcGRleHRbal0gPiA4KSB7XG4gICAgICAgICAgICAgIGRpc3QgPSByZWFkQml0cyg4KTtcbiAgICAgICAgICAgICAgZGlzdCB8PSAocmVhZEJpdHMoY3BkZXh0W2pdIC0gOCkgPDwgOCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBkaXN0ID0gcmVhZEJpdHMoY3BkZXh0W2pdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpc3QgKz0gY3BkaXN0W2pdO1xuICAgICAgICAgICAgd2hpbGUgKGxlbi0tKSB7XG4gICAgICAgICAgICAgIGlmIChiSWR4IC0gZGlzdCA8IDApIHtcbiAgICAgICAgICAgICAgICBicmVhayBvdXRlcjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgYyA9IGJ1ZjMya1soYklkeCAtIGRpc3QpICYgMHg3ZmZmXTtcbiAgICAgICAgICAgICAgYWRkQnVmZmVyKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBhZGRCdWZmZXIoaik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSB3aGlsZSAoIWxhc3QpO1xuICAgIGZsdXNoQnVmZmVyKCk7XG5cbiAgICBieXRlQWxpZ24oKTtcbiAgICByZXR1cm4gMDtcbiAgfTtcblxuICBKWEcuVXRpbC5VbnppcC5wcm90b3R5cGUudW56aXBGaWxlID0gZnVuY3Rpb24obmFtZSkge1xuICAgIHZhciBpO1xuICAgIHRoaXMudW56aXAoKTtcbiAgICAvL2FsZXJ0KHVuemlwcGVkWzBdWzFdKTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgdW56aXBwZWQubGVuZ3RoOyBpKyspIHtcbiAgICAgIGlmICh1bnppcHBlZFtpXVsxXSA9PSBuYW1lKSB7XG4gICAgICAgIHJldHVybiB1bnppcHBlZFtpXVswXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgfTtcblxuICBKWEcuVXRpbC5VbnppcC5wcm90b3R5cGUuZG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9IFwiXFwwXCI7XG4gICAgICAgIGlmICghZmlsZW91dClcbiAgICAgICAgICBmaWxlb3V0ID0gbmFtZUJ1ZjtcblxuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIHdoaWxlIChpIDwgZXh0cmFsZW4pIHtcbiAgICAgICAgICBjID0gcmVhZEJ5dGUoKTtcbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBDUkMgPSAweGZmZmZmZmZmO1xuICAgICAgICBTSVpFID0gMDtcblxuICAgICAgICBpZiAoc2l6ZSA9IDAgJiYgZmlsZU91dC5jaGFyQXQoZmlsZW91dC5sZW5ndGggLSAxKSA9PSBcIi9cIikge1xuICAgICAgICAgIC8vc2tpcGRpclxuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KFwic2tpcGRpclwiKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWV0aG9kID09IDgpIHtcbiAgICAgICAgICBEZWZsYXRlTG9vcCgpO1xuICAgICAgICAgIGlmIChkZWJ1ZylcbiAgICAgICAgICAgIGFsZXJ0KG91dHB1dEFyci5qb2luKCcnKSk7XG4gICAgICAgICAgdW56aXBwZWRbZmlsZXNdID0gbmV3IEFycmF5KDIpO1xuICAgICAgICAgIHVuemlwcGVkW2ZpbGVzXVswXSA9IG91dHB1dEFyci5qb2luKCcnKTtcbiAgICAgICAgICB1bnppcHBlZFtmaWxlc11bMV0gPSBuYW1lQnVmLmpvaW4oJycpO1xuICAgICAgICAgIGZpbGVzKys7XG4gICAgICAgICAgLy9yZXR1cm4gb3V0cHV0QXJyLmpvaW4oJycpO1xuICAgICAgICB9XG4gICAgICAgIHNraXBkaXIoKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZnVuY3Rpb24gc2tpcGRpcigpIHtcbiAgICB2YXIgY3JjLFxuICAgICAgdG1wID0gW10sXG4gICAgICBjb21wU2l6ZSwgc2l6ZSwgb3MsIGksIGM7XG5cbiAgICBpZi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29kZUF0KGkpO1xuICAgIH1cbiAgICByZXR1cm4gYXI7XG4gIH0sXG5cbiAgZGVjb2RlR0VPTkV4VDogZnVuY3Rpb24oaW5wdXQpIHtcbiAgICByZXR1cm4gZGVjb2RlQXNBcnJheShkZXN0cmlwKGlucHV0KSwgZmFsc2UpO1xuICB9XG59O1xuXG4vKipcbiAqIEBwcml2YXRlXG4gKi9cbkpYRy5VdGlsLmFzY2lpQ2hhckNvZGVBdCA9IGZ1bmN0aW9uKHN0ciwgaSkge1xuICB2YXIgYyA9IHN0ci5jaGFyQ29kZUF0KGkpO1xuICBpZiAoYyA+IDI1NSkge1xuICAgIHN3aXRjaCAoYykge1xuICAgICAgY2FzZSA4MzY0OlxuICAgICAgICBjID0gMTI4O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxODpcbiAgICAgICAgYyA9IDEzMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDQwMjpcbiAgICAgICAgYyA9IDEzMTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjI6XG4gICAgICAgIGMgPSAxMzI7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjMwOlxuICAgICAgICBjID0gMTMzO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIyNDpcbiAgICAgICAgYyA9IDEzNDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjU6XG4gICAgICAgIGMgPSAxMzU7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA3MTA6XG4gICAgICAgIGMgPSAxMzY7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjQwOlxuICAgICAgICBjID0gMTM3O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzUyOlxuICAgICAgICBjID0gMTM4O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODI0OTpcbiAgICAgICAgYyA9IDEzOTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDMzODpcbiAgICAgICAgYyA9IDE0MDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM4MTpcbiAgICAgICAgYyA9IDE0MjtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMTY6XG4gICAgICAgIGMgPSAxNDU7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjE3OlxuICAgICAgICBjID0gMTQ2O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIyMDpcbiAgICAgICAgYyA9IDE0NztcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMjE6XG4gICAgICAgIGMgPSAxNDg7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4MjI2OlxuICAgICAgICBjID0gMTQ5O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODIxMTpcbiAgICAgICAgYyA9IDE1MDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDgyMTI6XG4gICAgICAgIGMgPSAxNTE7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA3MzI6XG4gICAgICAgIGMgPSAxNTI7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSA4NDgyOlxuICAgICAgICBjID0gMTUzO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzUzOlxuICAgICAgICBjID0gMTU0O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgODI1MDpcbiAgICAgICAgYyA9IDE1NTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDMzOTpcbiAgICAgICAgYyA9IDE1NjtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM4MjpcbiAgICAgICAgYyA9IDE1ODtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDM3NjpcbiAgICAgICAgYyA9IDE1OTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBkZWZhdWx0OlxuICAgICAgICBicmVhaztcbiAgICB9XG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zAsIDgsIDEsIDksIDIsIDEwLCAzLCAxMSwgNCwgMTIsIDUsIDEzLCA2LCAxNCwgNywgMTVdO1xuICAgIHZhciBhc2h4ID0gWzAsIDksIDIsIDExLCA0LCAxMywgNiwgMTUsIDgsIDEsIDEwLCAzLCAxMiwgNSwgMTQsIDddO1xuICAgIHZhciBxID0gW1xuICAgICAgW10sXG4gICAgICBbXVxuICAgIF07XG4gICAgdmFyIG0gPSBbXG4gICAgICBbXSxcbiAgICAgIFtdLFxuICAgICAgW10sXG4gICAgICBbXVxuICAgIF07XG5cbiAgICBmdW5jdGlvbiBmZm01Yih4KSB7XG4gICAgICByZXR1cm4geCBeICh4ID4+IDIpIF4gWzAsIDkwLCAxODAsIDIzOF1beCAmIDNdO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGZmbUVmKHgpIHtcbiAgICAgIHJldHVybiB4IF4gKHggPj4gMSkgXiAoeCA+PiAyKSBeIFswLCAyMzgsIDE4MCwgOTBdW3ggJiAzXTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBtZHNSZW0ocCwgcSkge1xuICAgICAgdmFyIGksIHQsIHU7XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgODsgaSsrKSB7XG4gICAgICAgIHQgPSBxID4+PiAyNDtcbiAgICAgICAgcSA9ICgocSA8PCA4KSAmIE1BWElOVCkgfCBwID4+PiAyNDtcbiAgICAgICAgcCA9IChwIDw8IDgpICYgTUFYSU5UO1xuICAgICAgICB1ID0gdCA8PCAxO1xuICAgICAgICBpZiAodCAmIDEyOCkge1xuICAgICAgICAgIHUgXj0gMzMzO1xuICAgICAgICB9XG4gICAgICAgIHEgXj0gdCBeICh1IDw8IDE2KTtcbiAgICAgICAgdSBePSB0ID4+PiAxO1xuICAgICAgICBpZiAodCAmIDEpIHtcbiAgICAgICAgICB1IF49IDE2NjtcbiAgICAgICAgfVxuICAgICAgICBxIF49IHUgPDwgMjQgfCB1IDw8IDg7XG4gICAgICB9XG4gICAgICByZXR1cm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AgICAgICAgYmluW2kgPj4gNV0gfD0gKHN0ci5jaGFyQ29kZUF0KGkgLyBjaGFyU2l6ZSkgJiBtYXNrKSA8PFxuICAgICAgICAgICgzMiAtIGNoYXJTaXplIC0gKGkgJSAzMikpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gYmluO1xuICAgIH0sXG5cbiAgICAvKlxuICAgICAqIENvbnZlcnQgYSBoZXggc3RyaW5nIHRvIGFuIGFycmF5IG9mIGJpZy1lbmRpYW4gd29yZHNcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBzdHIgU3RyaW5nIHRvIGJlIGNvbnZlcnRlZCB0byBiaW5hcnkgcmVwcmVzZW50YXRpb25cbiAgICAgKiBAcmV0dXJuIEludGVnZXIgYXJyYXkgcmVwcmVzZW50YXRpb24gb2YgdGhlIHBhcmFtZXRlclxuICAgICAqL1xuICAgIGhleDJiaW5iID0gZnVuY3Rpb24oc3RyKSB7XG4gICAgICB2YXIgYmluID0gW10sXG4gICAgICAgIGxlbmd0aCA9IHN0ci5sZW5ndGgsXG4gICAgICAgIGksIG51bTtcblxuICAgICAgZm9yIChpID0gMDsgaSA8IGxlbmd0aDsgaSArPSAyKSB7XG4gICAgICAgIG51bSA9IHBhcnNlSW50KHN0ci5zdWJzdHIoaSwgMiksIDE2KTtcbiAgICAgICAgaWYgKCFpc05hTihudW0pKSB7XG4gICAgICAgICAgYmluW2kgPj4gM10gfD0gbnVtIDw8ICgyNCAtICg0ICogKGkgJSA4KSkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiBcIklOVkFMSUQgSEVYIFNUUklOR1wiO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBiaW47XG4gICAgfSxcblxuICAgIC8qXG4gICAgICogQ29udmVydCBhbiBhcnJheSBvZiBiaWctZW5kaWFuIHdvcmRzIHRvIGEgaGV4IHN0cmluZy5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gIC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IWzddO1xuXG4gICAgICAgIGZvciAodCA9IDA7IHQgPCBudW1Sb3VuZHM7IHQgKz0gMSkge1xuICAgICAgICAgIGlmICh0IDwgMTYpIHtcbiAgICAgICAgICAgIC8qIEJpdCBvZiBhIGhhY2sgLSBmb3IgMzItYml0LCB0aGUgc2Vjb25kIHRlcm0gaXMgaWdub3JlZCAqL1xuICAgICAgICAgICAgV1t0XSA9IG5ldyBJbnQobWVzc2FnZVt0ICogYmluYXJ5U3RyaW5nTXVsdCArIGldLFxuICAgICAgICAgICAgICBtZXNzYWdlW3QgKiBiaW5hcnlTdHJpbmdNdWx0ICsgaSArIDFdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgV1t0XSA9IHNhZmVBZGRfNChcbiAgICAgICAgICAgICAgZ2FtbWExKFdbdCAtIDJdKSwgV1t0IC0gN10sXG4gICAgICAgICAgICAgIGdhbW1hMChXW3QgLSAxNV0pLCBXW3QgLSAxNl0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIFQxID0gc2FmZUFkZF81KGgsIHNpZ21hMShlKSwgY2goZSwgZiwgZyksIEtbdF0sIFdbdF0pO1xuICAgICAgICAgIFQyID0gc2FmZUFkZF8yKHNpZ21hMChhKSwgbWFqKGEsIGIsIGMpKTtcbiAgICAgICAgICBoID0gZztcbiAgICAgICAgICBnID0gZjtcbiAgICAgICAgICBmID0gZTtcbiAgICAgICAgICBlID0gc2FmZUFkZF8yKGQsIFQxKTtcbiAgICAgICAgICBkID0gYztcbiAgICAgICAgICBjID0gYjtcbiAgICAgICAgICBiID0gYTtcbiAgICAgICAgICBhID0gc2FmZUFkZF8yKFQxLCBUMik7XG4gICAgICAgIH1cblxuICAgICAgICBIWzBdID0gc2FmZUFkZF8yKGEsIEhbMF0pO1xuICAgICAgICBIWzFdID0gc2FmZUFkZF8yKGIsIEhbMV0pO1xuICAgICAgICBIWzJdID0gc2FmZUFkZF8yKGMsIEhbMl0pO1xuICAgICAgICBIWzNdID0gc2FmZUFkZF8yKGQsIEhbM10pO1xuICAgICAgICBIWzRdID0gc2FmZUFkZF8yKGUsIEhbNF0pO1xuICAgICAgICBIWzVdID0gc2FmZUFkZF8yKGYsIEhbNV0pO1xuICAgICAgICBIWzZdID0gc2FmZUFkZF8yKGcsIEhbNl0pO1xuICAgICAgICBIWzddID0gc2FmZUFkZF8yKGgsIEhbN10pO1xuICAgICAgfVxuXG4gICAgICBzd2l0Y2ggKHZhcmlhbnQpIHtcbiAgICAgICAgY2FzZSBcIlNIQS0yMjRcIjpcbiAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgSFswXSwgSFsxXSwgSFsyXSwgSFszXSxcbiAgICAgICAgICAgIEhbNF0sIEhbNV0sIEhbNl1dO1xuICAgICAgICBjYXNlIFwiU0hBLTI1NlwiOlxuICAgICAgICAgIHJldHVybiBIO1xuICAgICAgICBjYXNlIFwiU0hBLTM4NFwiOlxuICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICBIWzBdLmhpZ2hPcmRlciwgSFswXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbMV0uaGlnaE9yZGVyLCBIWzFdLmxvd09yZGVyLFxuICAgICAgICAgICAgSFsyXS5oaWdoT3JkZXIsIEhbMl0ubG93T3JkZXIsXG4gICAgICAgICAgICBIWzNdLmhpZ2hPcmRlciwgSFszXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbNF0uaGlnaE9yZGVyLCBIWzRdLmxvd09yZGVyLFxuICAgICAgICAgICAgSFs1XS5oaWdoT3JkZXIsIEhbNV0ubG93T3JkZXJdO1xuICAgICAgICBjYXNlIFwiU0hBLTUxMlwiOlxuICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICBIWzBdLmhpZ2hPcmRlciwgSFswXS5sb3dPcmRlcixcbiAgICAgICAgICAgIEhbMV0uaGlnaE9yZGVyLCBIWzFdLmxvd09yZGVyLFxuICAgICAgICAgICAgSFsyXS5oaWdoT3JkZXIsIEhbMl0ubG93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4pXG5cbmZ1bmN0aW9uIGJuRmxpcEJpdChuKSB7XG4gIHJldHVybiB0aGlzLmNoYW5nZUJpdChuLCBvcF94b3IpO1xufVxuXG4vLyAocHJvdGVjdGVkKSByID0gdGhpcyArIGFcblxuZnVuY3Rpb24gYm5wQWRkVG8oYSwgcikge1xuICB2YXIgaSA9IDAsXG4gICAgYyA9IDAsXG4gICAgbSA9IE1hdGgubWluKGEudCwgdGhpcy50KTtcbiAgd2hpbGUgKGkgPCBtKSB7XG4gICAgYyArPSB0aGlzW2ldICsgYVtpXTtcbiAgICByW2krK10gPSBjICYgdGhpcy5ETTtcbiAgICBjID4+PSB0aGlzLkRCO1xuICB9XG4gIGlmIChhLnQgPCB0aGlzLnQpIHtcbiAgICBjICs9IGEucztcbiAgICB3aGlsZSAoaSA8IHRoaXMudCkge1xuICAgICAgYyArPSB0aGlzW2ldO1xuICAgICAgcltpKytdID0gYyAmIHRoaXMuRE07XG4gICAgICBjID4+PSB0aGlzLkRCO1xuICAgIH1cbiAgICBjICs9IHRoaXMucztcbiAgfSBlbHNlIHtcbiAgICBjICs9IHRoaXMucztcbiAgICB3aGlsZSAoaSA8IGEudCkge1xuICAgICAgYyArPSBhW2ldO1xuICAgICAgcltpKytdID0gYyAmIHRoaXMuRE07XG4gICAgICBjID4+PSB0aGlzLkRCO1xuICAgIH1cbiAgICBjICs9IGEucztcbiAgfVxuICByLnMgPSAoYyA8IDApID8gLTEgOiAwO1xuICBpZiAoYyA+IDApIHJbaSsrXSA9IGM7XG4gIGVsc2UgaWYgKGMgPCAtMSkgcltpKytdID0gdGhpcy5EViArIGM7XG4gIHIudCA9IGk7XG4gIHIuY2xhbXAoKTtcbn1cblxuLy8gKHB1YmxpYykgdGhpcyArIGFcblxuZnVuY3Rpb24gYm5BZGQoYSkge1xuICB2YXIgciA9IG5iaSgpO1xuICB0aGlzLmFkZFRvKGEsIHIpO1xuICByZXR1cm4gcjtcbn1cblxuLy8gKHB1YmxpYykgdGhpcyAtIGFcbl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pO1xuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgIGlmIChpbnB1dFtteXBvczJdLmNoYXJDb2RlQXQoKSA8IDE5Mikge1xuICAgICAgICAgICAgdmFyIHRtcGxlbiA9IGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCk7XG4gICAgICAgICAgICBwYWNrZXRfbGVuZ3RoICs9IHRtcGxlbjtcbiAgICAgICAgICAgIGJvZHlkYXRhICs9IGlucHV0LnN1YnN0cmluZyhteXBvczIsIG15cG9zMiArIHRtcGxlbik7XG4gICAgICAgICAgICBteXBvczIgKz0gdG1wbGVuO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnB1dFtteXBvczJdLmNoYXJDb2RlQXQoKSA+PSAxOTIgJiYgaW5wdXRbbXlwb3MyXS5jaGFyQ29kZUF0KCkgPCAyMjQpIHtcbiAgICAgICAgICAgIHZhciB0bXBsZW4gPSAoKGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCkgLSAxOTIpIDw8IDgpICsgKGlucHV0W215cG9zMisrXS5jaGFyQ29kZUF0KCkpICsgMTkyO1xuICAgICAgICAgICAgcGFja2V0X2xlbmd0aCArPSB0bXBsZW47XG4gICAgICAgICAgICBib2R5ZGF0YSArPSBpbnB1dC5zdWJzdHJpbmcobXlwb3MyLCBteXBvczIgKyB0bXBsZW4pO1xuICAgICAgICAgICAgbXlwb3MyICs9IHRtcGxlbjtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXRbbXlwb3MyXS5jaGFyQ29kZUF0KCkgPiAyMjMgJiYgaW5wdXRbbXlwb3MyXS5jaGFyQ29kZUF0KCkgPCAyNTUpIHtcbiAgICAgICAgICAgIHZhciB0bXBsZW4gPSAxIDw8IChpbnB1dFtteXBvczIrK10uY2hhckNvZGVBdCgpICYgMHgxRik7XG4gICAgICAgICAgICBwYWNrZXRfbGVuZ3RoICs9IHR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T0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB0YWcgPSAweEQxO1xuICAgICAgICAgICAgcGFja2V0ID0gZGF0YS51c2VyYXR0cmlidXRlO1xuICAgICAgICAgIH0gZWxzZSB0aHJvdyBuZXcgRXJyb3IoJ0VpdGhlciBhIHVzZXJpZCBvciB1c2VyYXR0cmlidXRlIHBhY2tldCBuZWVkcyB0byBiZSAnICtcbiAgICAgICAgICAgICAgJ3N1cHBsaWVkIGZvciBjZXJ0aWZpY2F0aW9uLicpO1xuXG4gICAgICAgICAgdmFyIGJ5dGVzID0gcGFja2V0LndyaXRlKCk7XG5cbiAgICAgICAgICByZXR1cm4gdGhpcy50b1NpZ24odC5rZXksIGRhdGEpICtcbiAgICAgICAgICAgIFN0cmluZy5mcm9tQ2hhckNvZGUodGFnKSArXG4gICAgICAgICAgICB1dGlsLndyaXRlTnVtYmVyKGJ5dGVzLmxlbmd0aCwgNCkgK1xuICAgICAgICAgICAgYnl0ZXM7XG4gICAgICAgIH1cbiAgICAgIGNhc2UgdC5zdWJrZXlfYmluZGluZzpcbiAgICAgIGNhc2UgdC5rZXlfYmluZGluZzpcbiAgICAgICAge1xuICAgICAgICAgIHJldHVybiB0aGlzLnRvU2lnbih0LmtleSwgZGF0YSkgKyB0aGlzLnRvU2lnbih0LmtleSwge1xuICAgICAgICAgICAga2V5OiBkYXRhLmJpbmRcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgY2FzZSB0LmtleTpcbiAgICAgICAge1xuICAgICAgICAgIGlmIChkYXRhLmtleSA9PSB1bmRlZmluZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0tleSBwYWNrZXQgaXMgcmVxdWlyZWQgZm9yIHRoaXMgc2lndGF0dXJlLicpO1xuXG4gICAgICAgICAgcmV0dXJuIGRhdGEua2V5LndyaXRlT2xkKCk7XG4gICAgICAgIH1cbiAgICAgIGNhc2UgdC5rZXlfcmV2b2NhdGlvbjpcbiAgICAgI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biAgICAgIHZhciBhbGdvcml0aG0gPSBlbnVtcy53cml0ZShlbnVtcy5oYXNoLCBzMmsuYWxnb3JpdGhtKTtcblxuICAgICAgc3dpdGNoIChzMmsudHlwZSkge1xuICAgICAgICBjYXNlICdzaW1wbGUnOlxuICAgICAgICAgIHJldHVybiBjcnlwdG8uaGFzaC5kaWdlc3QoYWxnb3JpdGhtLCBwcmVmaXggKyBwYXNzcGhyYXNlKTtcblxuICAgICAgICBjYXNlICdzYWx0ZWQnOlxuICAgICAgICAgIHJldHVybiBjcnlwdG8uaGFzaC5kaWdlc3QoYWxnb3JpdGhtLFxuICAgICAgICAgICAgcHJlZml4ICsgczJrLnNhbHQgKyBwYXNzcGhyYXNlKTtcblxuICAgICAgICBjYXNlICdpdGVyYXRlZCc6XG4gICAgICAgICAgdmFyIGlzcCA9IFtdLFxuICAgICAgICAgICAgY291bnQgPSBzMmsuZ2V0X2NvdW50KCk7XG4gICAgICAgICAgZGF0YSA9IHMyay5zYWx0ICsgcGFzc3BocmFzZTtcblxuICAgICAgICAgIHdoaWxlIChpc3AubGVuZ3RoICogZGF0YS5sZW5ndGggPCBjb3VudClcbiAgICAgICAgICAgIGlzcC5wdXNoKGRhdGEpO1xuXG4gICAgICAgICAgaXNwID0gaXNwLmpvaW4oJycpO1xuXG4gICAgICAgICAgaWYgKGlzcC5sZW5ndGggPiBjb3VudClcbiAgICAgICAgICAgIGlzcCA9IGlzcC5zdWJzdHIoMCwgY291bnQpO1xuXG4gICAgICAgICAgcmV0dXJuIGNyeXB0by5oYXNoLmRpZ2VzdChhbGdvcml0aG0sIHByZWZpeCArIGlzcCk7XG4gICAgICB9O1xuICAgIH1cblxuICAgIHZhciByZXN1bHQgPSAnJyxcbiAgICAgIHByZWZpeCA9ICcnO1xuXG4gICAgd2hpbGUgKHJlc3VsdC5sZW5ndGggPD0gbnVtQnl0ZXMpIHtcbiAgICAgIHJlc3VsdCArPSByb3VuZChwcmVmaXgsIHRoaXMpO1xuICAgICAgcHJ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GLDB4RkYsMHhGRiwweEZGLDB4RkZdLFsweDUxLDB4ODYsMHg2RiwweEQ1LDB4QjgsMHg1RSwweENCLDB4OEFdXSxcbiAgICAgICAgICAgICAgICAgICAgIFtbMHgzMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwXSxbMHgxMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAxXSxbMHg3RCwweDg1LDB4NkYsMHg5QSwweDYxLDB4MzAsMHg2MywweEYyXV0sXG4gICAgICAgICAgICAgICAgICAgICBbWzB4MTEsMHgxMSwweDExLDB4MTEsMHgxMSwweDExLDB4MTEsMHgxMV0sWzB4MTEsMHgxMSwweDExLDB4MTEsMHgxMSwweDExLDB4MTEsMHgxMV0sWzB4MjQsMHg2NiwweERELDB4ODcsMHg4QiwweDk2LDB4M0MsMHg5RF1dLFxuICAgICAgICAgICAgICAgICAgICAgW1sweDAxLDB4MjMsMHg0NSwweDY3LDB4ODksMHhBQiwweENELDB4RUZdLFsweDExLDB4MTEsMHgxMSwweDExLDB4MTEsMHgxMSwweDExLDB4MTFdLFsweDYxLDB4RjksMHhDMywweDgwLDB4MjIsMHg4MSwweEIwLDB4OTZdXSxcbiAgICAgICAgICAgICAgICAgICAgIFtbMHgxMSwweDExLDB4MTEsMHgxMSwweDExLDB4MTEsMHgxMSwweDExXSxbMHgwMSwweDIzLDB4NDUsMHg2NywweDg5LDB4QUIsMHhDRCwweEVGXSxbMHg3RCwweDBDLDB4QzYsMHgzMCwweEFGLDB4REEsMHgxRSwweEM3XV0sXG4gICAgICAgICAgICAgICAgICAgICBbWzB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMF0sWzB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMF0sWzB4NEUsMHhGOSwweDk3LDB4NDUsMHg2MSwweDk4LDB4REQsMHg3OF1dLFxuICAgICAgICAgICAgICAgICAgICAgW1s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ICAgW1sweDA0LDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDU1LDB4NTcsMHg5MywweDgwLDB4RDcsMHg3MSwweDM4LDB4RUZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAyLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDZDLDB4QzUsMHhERSwweEZBLDB4QUYsMHgwNCwweDUxLDB4MkZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAxLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDBELDB4OUYsMHgyNywweDlCLDB4QTUsMHhEOCwweDcyLDB4NjBdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4ODAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEQ5LDB4MDMsMHgxQiwweDAyLDB4NzEsMHhCRCwweDVBLDB4MEFdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4NDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDQyLDB4NDIsMHg1MCwweEIzLDB4N0MsMHgzRCwweEQ5LDB4NTFdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MjAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEI4LDB4MDYsMHgxQiwweDdFLDB4Q0QsMHg5QSwweDIxLDB4RTVdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MTAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEYxLDB4NUQsMHgwRiwweDI4LDB4NkIsMHg2NSwweEJELDB4MjhdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDgsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEFELDB4RDAsMHhDQywweDhELDB4NkUsMHg1RCwweEVCLDB4QTFdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDQsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEU2LDB4RDUsMHhGOCwweDI3LDB4NTIsMHhBRCwweDYzLDB4RDFdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDIsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEVDLDB4QkYsMHhFMywweEJELDB4M0YsMHg1OSwweDFBLDB4NUVdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDEsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEYzLDB4NTYsMHg4MywweDQzLDB4NzksMHhEMSwweDY1LDB4Q0RdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHg4MCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDJCLDB4OUYsMHg5OCwweDJGLDB4MjAsMHgwMywweDdGLDB4QTldXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHg0MCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDg4LDB4OUQsMHhFMCwweDY4LDB4QTEsMHg2RiwweDBCLDB4RTZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgyMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEUxLDB4OUUsMHgyNywweDVELDB4ODQsMHg2QSwweDEyLDB4OThdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgxMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDMyLDB4OUEsMHg4RSwweEQ1LDB4MjMsMHhENywweDFBLDB4RUNdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwOCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEU3LDB4RkMsMHhFMiwweDI1LDB4NTcsMHhEMiwweDNDLDB4OTddXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwNCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDEyLDB4QTksMHhGNSwweDgxLDB4N0YsMHhGMiwweEQ2LDB4NURdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMiwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEE0LDB4ODQsMHhDMywweEFELDB4MzgsMHhEQywweDlDLDB4MTldXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMSwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEZCLDB4RTAsMHgwQSwweDhBLDB4MUUsMHhGOCwweEFELDB4NzJdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDgwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDc1LDB4MEQsMHgwNywweDk0LDB4MDcsMHg1MiwweDEzLDB4NjNdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDQwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDY0LDB4RkUsMHhFRCwweDlDLDB4NzIsMHg0QywweDJGLDB4QUZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDIwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEYwLDB4MkIsMHgyNiwweDNCLDB4MzIsMHg4RSwweDJCLDB4NjBdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDEwLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweDlELDB4NjQsMHg1NSwweDVBLDB4OUEsMHgxMCwweEI4LDB4NTJdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDA4LDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEQxLDB4MDYsMHhGRiwweDBCLDB4RUQsMHg1MiwweDU1LDB4RDddXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDA0LDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEUxLDB4NjUsMHgyQywweDZCLDB4MTMsMHg4QywweDY0LDB4QTVdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAyLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEU0LDB4MjgsMHg1OCwweDExLDB4ODYsMHhFQywweDhGLDB4NDZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAxLDB4MDAsMHgwMCwweDAwLDB4MDBdLFsweEFFLDB4QjUsMHhGNSwweEVELDB4RTIsMHgyRCwweDFBLDB4MzZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4ODAsMHgwMCwweDAwLDB4MDBdLFsweEU5LDB4NDMsMHhENywweDU2LDB4OEEsMHhFQywweDBDLDB4NUNdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4NDAsMHgwMCwweDAwLDB4MDBdLFsweERGLDB4OTgsMHhDOCwweDI3LDB4NkYsMHg1NCwweEIwLDB4NEJdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MjAsMHgwMCwweDAwLDB4MDBdLFsweEIxLDB4NjAsMHhFNCwweDY4LDB4MEYsMHg2QywweDY5LDB4NkZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MTAsMHgwMCwweDAwLDB4MDBdLFsweEZBLDB4MDcsMHg1MiwweEIwLDB4N0QsMHg5QywweDRBLDB4QjhdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDgsMHgwMCwweDAwLDB4MDBdLFsweENBLDB4M0EsMHgyQiwweDAzLDB4NkQsMHhCQywweDg1LDB4MDJdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDQsMHgwMCwweDAwLDB4MDBdLFsweDVFLDB4MDksMHgwNSwweDUxLDB4N0IsMHhCNSwweDlCLDB4Q0ZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDIsMHgwMCwweDAwLDB4MDBdLFsweDgxLDB4NEUsMHhFQiwweDNCLDB4OTEsMHhEOSwweDA3LDB4MjZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDEsMHgwMCwweDAwLDB4MDBdLFsweDRELDB4NDksMHhEQiwweDE1LDB4MzIsMHg5MSwweDlDLDB4OUZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHg4MCwweDAwLDB4MDBdLFsweDI1LDB4RUIsMHg1RiwweEMzLDB4RjgsMHhDRiwweDA2LDB4MjFdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHg0MCwweDAwLDB4MDBdLFsweEFCLDB4NkEsMHgyMCwweEMwLDB4NjIsMHgwRCwweDFDLDB4NkZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgyMCwweDAwLDB4MDBdLFsweDc5LDB4RTksMHgwRCwweEJDLDB4OTgsMHhGOSwweDJDLDB4Q0FdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgxMCwweDAwLDB4MDBdLFsweDg2LDB4NkUsMHhDRSwweERELDB4ODAsMHg3MiwweEJCLDB4MEVdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwOCwweDAwLDB4MDBdLFsweDhCLDB4NTQsMHg1MywweDZGLDB4MkYsMHgzRSwweDY0LDB4QThdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwNCwweDAwLDB4MDBdLFsweEVBLDB4NTEsMHhEMywweDk3LDB4NTUsMHg5NSwweEI4LDB4NkJdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMiwweDAwLDB4MDBdLFsweENBLDB4RkYsMHhDNiwweEFDLDB4NDUsMHg0MiwweERFLDB4MzFdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMSwweDAwLDB4MDBdLFsweDhELDB4RDQsMHg1QSwweDJELDB4REYsMHg5MCwweDc5LDB4NkNdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDgwLDB4MDBdLFsweDEwLDB4MjksMHhENSwweDVFLDB4ODgsMHgwRSwweEMyLDB4RDBdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDQwLDB4MDBdLFsweDVELDB4ODYsMHhDQiwweDIzLDB4NjMsMHg5RCwweEJFLDB4QTldXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDIwLDB4MDBdLFsweDFELDB4MUMsMHhBOCwweDUzLDB4QUUsMHg3QywweDBDLDB4NUZdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDEwLDB4MDBdLFsweENFLDB4MzMsMHgyMywweDI5LDB4MjQsMHg4RiwweDMyLDB4MjhdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDA4LDB4MDBdLFsweDg0LDB4MDUsMHhEMSwweEFCLDB4RTIsMHg0RiwweEI5LDB4NDJdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDA0LDB4MDBdLFsweEU2LDB4NDMsMHhENywweDgwLDB4OTAsMHhDQSwweDQyLDB4MDddXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAyLDB4MDBdLFsweDQ4LDB4MjIsMHgxQiwweDk5LDB4MzcsMHg3NCwweDhBLDB4MjNdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAxLDB4MDBdLFsweERELDB4N0MsMHgwQiwweEJELDB4NjEsMHhGQSwweEZELDB4NTRdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4ODBdLFsweDJGLDB4QkMsMHgyOSwweDFBLDB4NTcsMHgwRCwweEI1LDB4QzRdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4NDBdLFsweEUwLDB4N0MsMHgzMCwweEQ3LDB4RTQsMHhFMiwweDZFLDB4MTJdXSxcclxuICAgICAgICAgICAgICAgICAgICAgW1sweDAwLDB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MjBdLFsweDA5LDB4NTMsMHhFMiwweDI1LDB4OEUsMHg4RSwweDkwLDB4QTFdXSxcclxuICAgICAgICAgICAg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wLnV0aWw7XG4gIHZhciByZXN1bHQgPSBbXTtcbiAgdmFyIFJTQXB1Yk1QSXN0cnMgPSBbXG4gICAgICAgICAgICAgIHV0aWwuYmluMnN0cihbMHgwOCwweDAwLDB4YWMsMHgxNSwweGIzLDB4ZDYsMHhkMiwweDBmLDB4ZjAsMHg3YSwweGRkLDB4MjEsMHhiNyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGJmLDB4NjEsMHhmYSwweGNhLDB4OTMsMHg4NiwweGM4LDB4NTUsMHg1YSwweDRiLDB4YTYsMHhhNCwweDFhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjAsMHhhMiwweDNhLDB4MzcsMHgwNiwweDA4LDB4ZDgsMHgxNSwweDhlLDB4ODUsMHg0NSwweGFhLDB4YjcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxZCwweDdiLDB4MGIsMHg3MywweDk0LDB4NTUsMHgwYywweDVjLDB4ZWMsMHhjMCwweDIyLDB4NGIsMHhhMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDY0LDB4MjAsMHg3ZCwweDRkLDB4YTgsMHg5NiwweDFhLDB4NjQsMHgzOCwweDkzLDB4Y2QsMHhlYywweDczLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NWQsMHhmOSwweDg5LDB4ODgsMHgyNCwweDNkLDB4NDgsMHhmZiwweDNiLDB4ODcsMHg2MiwweGQwLDB4ODQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhlYSwweGZmLDB4MzksMHhiNSwweDI3LDB4NzAsMHhlYSwweDRhLDB4YjIsMHgyZSwweDlkLDB4ZjEsMHg3YyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIzLDB4ZWMsMHhmNCwweDVlLDB4ZWEsMHg2MSwweDNkLDB4ZTUsMHhkOCwweDBkLDB4ZjksMHg1OSwweDZkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjgsMHgwMCwweGViLDB4Y2IsMHhjOSwweDU1LDB4MDAsMHg3MiwweDMwLDB4MWYsMHg2NSwweDlkLDB4ZDYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNywweDU4LDB4NWYsMHhhNiwweDRhLDB4YTAsMHhkZCwweGUxLDB4NzYsMHhmMiwweGVmLDB4MjEsMHg5ZixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDg0LDB4ZmMsMHhhYSwweDViLDB4NTIsMHg2ZSwweGMxLDB4YTIsMHhiOSwweGJkLDB4YjksMHhmNCwweDllLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDksMHg5MiwweGYyLDB4YWYsMHg1NywweDg2LDB4ZjIsMHhlZiwweDcwLDB4YmYsMHg1MSwweDQwLDB4ZmQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhiZiwweDU2LDB4NTEsMHhlOCwweDJjLDB4YTIsMHg0ZiwweGY4LDB4YTQsMHhkNywweDM2LDB4MTgsMHg4NSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGNlLDB4MDksMHgwZCwweGJjLDB4OGQsMHg2NSwweDVlLDB4OGEsMHgxZCwweDk4LDB4YjAsMHg0ZCwweDlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4YzEsMHhjZiwweDgyLDB4ZTEsMHhiNywweDQzLDB4NWQsMHg1YSwweDcyLDB4Y2QsMHg1NSwweGQyLDB4ZmYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhiMSwweGI0LDB4NzgsMHhiZiwweGExLDB4N2QsMHhhYywweGQ5LDB4MWIsMHhjNCwweGZhLDB4MzksMHgzNCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDkyLDB4MDksMHhmOSwweDA4LDB4MmEsMHg2YiwweDlkLDB4MTQsMHg1NiwweDEyLDB4NGMsMHhlOSwweGE2LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjksMHhjMSwweGYzLDB4YTksMHgwYiwweGZjLDB4MzEsMHg3NSwweDU4LDB4NzQsMHgyYSwweDg4LDB4YWYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhlZSwweGM5LDB4YTQsMHhjZCwweDE1LDB4ZGMsMHgxYiwweDhkLDB4NjQsMHhjMSwweDM2LDB4MTcsMHhjNCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDhkLDB4NWUsMHg5OSwweDdhLDB4NWIsMHg5ZiwweDM5LDB4ZDAsMHgwMCwweDZlLDB4ZjldKSxcbiAgICAgICAgICAgICAgdXRpbC5iaW4yc3RyKFsweDAwLDB4MTEsMHgwMSwweDAwLDB4MDFdKV07XG4gIHZhciBSU0FzZWNNUElzdHJzID0gW1xuICAgICAgICAgICAgICB1dGlsLmJpbjJzdHIoWzB4MDcsMHhmZSwweDIzLDB4ZmYsMHhjZSwweDQ1LDB4NmMsMHg2MCwweDY1LDB4NDAsMHg2ZSwweGFlLDB4MzUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMCwweDU2LDB4NjAsMHhlZSwweGFiLDB4ZmEsMHgxMCwweDQyLDB4YmEsMHhjNywweDA0LDB4YWYsMHg2MyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGNkLDB4M2YsMHg2MiwweGNhLDB4NGIsMHhmYSwweGUxLDB4YTksMHg3MCwweGNkLDB4MzQsMHg4YiwweGM4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGUsMHhlNCwweGM0LDB4YmEsMHg4MywweDE3LDB4NWYsMHhhNCwweGI4LDB4ZWEsMHg2MCwweGMyLDB4NGQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg5YSwweGYyLDB4YTksMHgwMywweGViLDB4ZjYsMHhhYSwweGMyLDB4YjgsMHg4YiwweDQzLDB4MTIsMHhlOSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGY3LDB4ODgsMHhkMiwweDVhLDB4YTYsMHhhYSwweDIzLDB4NzEsMHgzMSwweDc0LDB4ZGIsMHgxOSwweDIwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTUsMHg0MSwweDFiLDB4NDMsMHg2OCwweDYyLDB4ZDgsMHhjMCwweDkzLDB4OTEsMHhlOCwweGZjLDB4YjEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhhOSwweDlhLDB4NTIsMHg2YywweGUwLDB4YmYsMHg0MywweDAxLDB4YTgsMHgzNywweDE0LDB4MjgsMHhiZixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBiLDB4MTUsMHg1NiwweDNlLDB4YTUsMHg3OSwweGEwLDB4YzQsMHg0MiwweDg4LDB4ZWUsMHhlYiwweDFiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZjQsMHg3YSwweDRhLDB4NTgsMHgzMSwweDU4LDB4ODEsMHhkMiwweDNlLDB4ZGUsMHgwNywweDY0LDB4OTIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhmMCwweDYwLDB4ZDMsMHg5YSwweDI5LDB4Y2EsMHhjNiwweDY3LDB4NzUsMHgwNywweGNhLDB4OTIsMHgzOSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDU2LDB4ZjYsMHgxMSwweDg0LDB4YmEsMHg2ZCwweDRiLDB4ZTYsMHg2ZiwweDY2LDB4YzIsMHgxNywweGViLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYsMHg2OSwweDFjLDB4YmIsMHhkZiwweGMwLDB4MzgsMHgwMCwweGQ2LDB4MDEsMHhlNiwweDcwLDB4OWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0YiwweDliLDB4NzAsMHhlZCwweDVjLDB4YjgsMHhjZiwweGU4LDB4NjgsMHg3MSwweGJlLDB4MjQsMHg2ZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGIxLDB4YTMsMHgxMywweGNjLDB4ZjEsMHhiYywweDY3LDB4ZGMsMHhlMCwweDY5LDB4MDksMHg4MiwweDNjLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M2IsMHgwZiwweDE0LDB4OTgsMHg0OCwweDMwLDB4YjIsMHg3MCwweGM2LDB4OWUsMHhmYSwweDQ2LDB4OGYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhmMSwweGMwLDB4NjUsMHg4ZSwweGM2LDB4YWUsMHhkYywweDQ3LDB4OTEsMHgxMywweDFlLDB4ZDYsMHg0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGYyLDB4YWQsMHhkYSwweGMyLDB4YzcsMHgzOSwweDc4LDB4OTksMHhkZSwweDU3LDB4MTQsMHg0NSwweDdmLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzIsMHgzOCwweGEzLDB4NDQsMHgwZiwweGU3LDB4MzksMHg0YywweDZmLDB4MGYsMHgzMiwweDdlLDB4ZjEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1YywweDg0LDB4OTcsMHhkZCwweGEwLDB4MGMsMHg4NywweDY2LDB4N2QsMHg3NSwweDc5XSksXG4gICAgICAgICAgICAgIHV0aWwuYmluMnN0cihbMHgwNCwweDAwLDB4YzIsMHhiYywweDcxLDB4ZjcsMHg0MSwweDRhLDB4MDksMHg2NiwweDcwLDB4MDIsMHg2OCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDhiLDB4ZWIsMHhlMiwweDM0LDB4ZDEsMHgxMiwweDgzLDB4OTMsMHg3NSwweGU5LDB4NzEsMHgzMiwweGUyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZWQsMHgxOCwweDZmLDB4OGUsMHgzYSwweGZmLDB4MjIsMHg3MCwweDI4LDB4MDEsMHhiZiwweDRhLDB4MzksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MSwweGJiLDB4M2MsMHg0YSwweGJjLDB4YjgsMHgxMywweGZjLDB4MTQsMHhmNiwweDcxLDB4YTEsMHg0NCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFjLDB4MDIsMHhhMSwweDczLDB4ODEsMHhjYywweGEwLDB4MzUsMHgwMiwweDNlLDB4OTcsMHhiNSwweGM0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OTQsMHgzMywweGYxLDB4ZDEsMHhkZiwweDE0LDB4M2YsMHhmYiwweDhmLDB4YjksMHg3NSwweDcwLDB4ZGMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3NCwweDNmLDB4MDcsMHgzNSwweDhmLDB4NTMsMHhhYSwweGIyLDB4ZDYsMHg4OCwweDUxLDB4NzEsMHg0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxLDB4MjQsMHhlYywweDdkLDB4Y2EsMHhmNiwweGEyLDB4YjMsMHhiYiwweGFkLDB4MmUsMHg2MCwweGZiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWMsMHhlZSwweDQ5LDB4ZDAsMHg0ZSwweDVjLDB4ZTMsMHgxZiwweDg4LDB4NDgsMHhlNCwweDY4LDB4MTQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzZCwweDcxLDB4YmEsMHhkNywweDRkLDB4MzUsMHgxMCwweDg2LDB4MzcsMHg2MiwweGUwLDB4YTUsMHgwYl0pLFxuICAgICAgICAgICAgICB1dGlsLmJpbjJzdHIoWzB4MDQsMHgwMCwweGUyLDB4MzgsMHhmOSwweGM4LDB4M2MsMHhkMSwweGNmLDB4NjIsMHg5MywweGMzLDB4NzcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3NiwweDk3LDB4NDQsMHhlOCwweGM4LDB4Y2EsMHg5MywweDlhLDB4ZWYsMHhmMCwweDYzLDB4NzYsMHgyNSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNiLDB4MWMsMHg0NiwweGZmLDB4OTAsMHgxMywweDkxLDB4MTUsMHg5NywweDdlLDB4ODgsMHg5NSwweGQ0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N2YsMHgyZiwweDUyLDB4NmUsMHgwZCwweDU1LDB4NTUsMHgyZSwweGYxLDB4NTgsMHg1YywweDdlLDB4NTYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhkNCwweDQ4LDB4YWEsMHhkYiwweDhjLDB4NDQsMHg0ZCwweDg0LDB4NjksMHgzMywweDg3LDB4MDcsMHhiMixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdlLDB4ZjUsMHhhMCwweDYwLDB4ZmIsMHg3MywweDU5LDB4NDYsMHgyOSwweGNiLDB4MWUsMHgzZiwweDdjLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmYsMHhhNiwweDUzLDB4ZTMsMHg4YywweGVmLDB4ZDUsMHhlYiwweGJiLDB4YzgsMHg5YSwweDhlLDB4NjYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0YSwweDQ3LDB4MmYsMHhlMSwweGJhLDB4NWUsMHgzMiwweGQ0LDB4NTIsMHgwNCwweDg4LDB4OWQsMHg2MyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNlLDB4YmEsMHg3MSwweDJkLDB4ZjcsMHg2MSwweGQ1LDB4ZmMsMHgyNiwweGJmLDB4ZDgsMHg2MCwweDkyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N2IsMHg5NCwweGY4LDB4NmYsMHgzZCwweDk3LDB4MGIsMHgwYywweDUyLDB4OGMsMHhiMywweGI2LDB4OGJdKSxcbiAgICAgICAgICAgICAgdXRpbC5iaW4yc3RyKFsweDA0LDB4MDAsMHhiNywweGM1LDB4NGQsMHg2ZSwweDJmLDB4ZGQsMHhlZiwweGVjLDB4MDcsMHg3MCwweGEyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N2MsMHgxYywweDlkLDB4OGUsMHg2NiwweDYwLDB4N2MsMHg2MSwweDFlLDB4NDUsMHhlOSwweGRjLDB4ODIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyZiwweGM1LDB4N2UsMHgxYSwweGM2LDB4ZDAsMHg5MiwweGM1LDB4MjIsMHg5YiwweDlhLDB4ZmIsMHg3MyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDk1LDB4OTksMHhmMiwweDdjLDB4ZGIsMHgyYSwweDkzLDB4N2IsMHg1YSwweDI5LDB4NzMsMHgyNCwweDE2LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDEsMHg0OSwweGI1LDB4ZjIsMHg1ZiwweGJlLDB4ZTcsMHg2NCwweDRkLDB4ZGEsMHg1MiwweDllLDB4YzEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MSwweDQwLDB4NWUsMHgwMywweDkyLDB4OGQsMHgzOSwweDk1LDB4MWYsMHg2OCwweDlmLDB4MDAsMHgyZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjLDB4NmYsMHhjZiwweGQ5LDB4NmQsMHg2OCwweGY3LDB4MDAsMHg0ZiwweDBlLDB4YzgsMHgwYiwweGZhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTEsMHhlMCwweDIyLDB4ZjAsMHhmZiwweGE3LDB4NDIsMHhkNCwweGRlLDB4MGIsMHg0NywweDhmLDB4MmIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhmNSwweDRkLDB4MDQsMHgzMiwweDkxLDB4ODksMHg0YiwweDBlLDB4MDUsMHg4ZCwweDcwLDB4ZjksMHhiYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGU3LDB4ZDYsMHg3NiwweGVhLDB4MGUsMHgxYSwweDkwLDB4MzAsMHhmNSwweDk4LDB4MDEsMHhjNSwweDczXSldO1xuICBcbiAgdmFyIERTQXB1Yk1QSXN0cnMgPSBbXG4gICAgICAgICAgdXRpbC5iaW4yc3RyKFsweDA4LDB4MDAsMHhhOCwweDg1LDB4NWMsMHgyOCwweDA1LDB4OTQsMHgwMywweGJlLDB4MDcsMHg2YywweDEzLDB4M2UsMHg2NSxcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4ZmIsMHhiNSwweGUxLDB4OTksMHg3YywweGZhLDB4ODQsMHhlMywweGFjLDB4NDcsMHhhNSwweGM0LDB4NDYsMHhkOCwweDVmLFxuICAgICAgICAgICAgICAgICAgICAgICAgMHg0NCwweGU5LDB4YzEsMHg2YiwweDY5LDB4ZjcsMHgxMCwweDc2LDB4NDksMHhhNywweDI1LDB4ODUsMHhmNCwweDFiLDB4ZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAweGM2LDB4NjAsMHhjNCwweDViLDB4YWEsMHhkNCwweDg3LDB4ZDYsMHg4ZiwweDkyLDB4NTYsMHg3ZCwweDU1LDB4M2YsMHg0NSxcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4YWUsMHgxMiwweDczLDB4ZGEsMHgyOSwweDhjLDB4YmEsMHgzMiwweGNjLDB4ZDcsMHhhNCwweGQwLDB4MjQsMHhiMCwweDdjLFxuICAgICAgICAgICAgICAgICAgICAgICAgMHhkOCwweDBjLDB4M2EsMHg5MSwweDZmLDB4OTgsMHg0MCwweDljLDB4OWEsMHhhOCwweGNjLDB4MjgsMHgyNywweDk1LDB4MGIsXG4gICAgICAgICAgICAgICAgICAgICAgICAweGUxLDB4NWIsMHhiOSwweDNiLDB4MWMsMHgxYywweGQyLDB4ZWMsMHhhYiwweDA3LDB4MjUsMHg4ZCwweDdhLDB4MmEsMHgyYixcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4MTYsMHgxNCwweGU4LDB4ZGEsMHg3MSwweGQyLDB4YWIsMHhiYSwweDg1LDB4MTQsMHgwZCwweGM1LDB4ZTAsMHg4OCwweGViLFxuICAgICAgICAgICAgICAgICAgICAgICAgMHhhNSwweGUyLDB4ZDUsMHg0OCwweDNkLDB4NzQsMHgwYywweDQxLDB4ZWIsMHhmZCwweGI2LDB4NGUsMHhmOSwweDJjLDB4ODIsXG4gICAgICAgICAgICAgICAgICAgICAgICAweDE3LDB4ZGQsMHg2NCwweDFlLDB4MTksMHgzOSwweGEzLDB4N2YsMHhmOSwweDAwLDB4Y2QsMHg5YiwweGRhLDB4MmUsMHhiZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4NzEsMHgxMiwweGRmLDB4MGQsMHg3YywweDBhLDB4NmIsMHgyZCwweDIxLDB4M2IsMHg5YywweDY2LDB4OTMsMHg0YSwweDFlLFxuICAgICAgICAgICAgICAgICAgICAgICAgMHg5MCwweDc5LDB4ZDMsMHg1YSwweDViLDB4ZTUsMHhiOSwweDk0LDB4MWIsMHhlNiwweDQ3LDB4OTksMHgwNiwweDk4LDB4ZDgsXG4gICAgICAgICAgICAgICAgICAgICAgICAweDJhLDB4ZTUsMHhlMiwweGE2LDB4OTUsMHg2YSwweDA3LDB4YzgsMHhhYywweDdjLDB4ZTksMHhmYywweGEyLDB4NmEsMHgxNixcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4MmMsMHg5NCwweDk4LDB4YmQsMHg5MSwweDBhLDB4N2MsMHg3YywweDJjLDB4YjksMHg3ZSwweGEyLDB4NTEsMHg4YiwweDQ1LFxuICAgICAgICAgICAgICAgICAgICAgICAgMHgxZCwweDQ2LDB4MzQsMHhhOCwweDUyLDB4MmIsMHhkZCwweGQ5LDB4YTgsMHhiYywweDQ2LDB4NzgsMHg2NiwweGUxLDB4NzIsXG4gICAgICAgICAgICAgICAgICAgICAgICAweDExLDB4ZjEsMHhjYiwweDFhLDB4YjYsMHg0ZSwweDA1LDB4NTQsMHhmNywweGU5LDB4YmUsMHg0YywweDI1LDB4NTksMHgwOCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDB4OWYsMHhmOCwweGVhLDB4MjUsMHg5NywweDMzLDB4ZDYsMHhjOSwweDBmLDB4NTksMHgwZSwweGZkLDB4OWYsMHhkYywweGUyLFxu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FkLDB4MzMsMHhlMywweDJkLDB4OTEsMHgyMywweDY5LDB4OTUsXG4gICAgICAgICAgICAgICAgICAgICAweDk4LDB4ZDcsMHgxOCwweDVhLDB4YWYsMHhhNywweDkzLDB4YzYsMHgwNSwweDkzLDB4M2EsMHhjNywweGVhLDB4ZDAsXG4gICAgICAgICAgICAgICAgICAgICAweGIxLDB4YTksMHhjNywweGFiLDB4NDEsMHg4OSwweGM4LDB4MzgsMHg5OSwweGRjLDB4MWEsMHg1NywweDM1LDB4MWEsXG4gICAgICAgICAgICAgICAgICAgICAweDI3LDB4NjIsMHg0MCwweDcxLDB4OWYsMHgzNiwweDFjLDB4NmQsMHgxOCwweDFjLDB4OTMsMHhmNywweGJhLDB4MzUsXG4gICAgICAgICAgICAgICAgICAgICAweDA2LDB4ZWQsMHgzMCwweGI4LDB4ZDksMHg4YSwweDdjLDB4MDMsMHhhZiwweGJhLDB4NDAsMHgxZiwweDYyLDB4ZjEsXG4gICAgICAgICAgICAgICAgICAgICAweDZkLDB4ODcsMHgyYywweGE2LDB4MmUsMHg0NiwweGIwLDB4YWEsMHhiYywweGJjLDB4OTMsMHhmYSwweDliLDB4NDcsXG4gICAgICAgICAgICAgICAgICAgICAweDNmLDB4NzAsMHgxZiwweDJhLDB4YzIsMHg2NiwweDljLDB4N2MsMHg2OSwweGUwLDB4MmIsMHgwNSwweGVlLDB4YjcsXG4gICAgICAgICAgICAgICAgICAgICAweGE3LDB4N2YsMHhmMywweDIxLDB4NDgsMHg4NSwweGMyLDB4OTUsMHg1ZiwweDZmLDB4MWUsMHhiMywweDliLDB4OTcsXG4gICAgICAgICAgICAgICAgICAgICAweGY4LDB4MTQsMHhjMywweGZmLDB4NGQsMHg5NywweDI1LDB4MjksMHg5NCwweDQxLDB4NGIsMHg5MCwweGQ4LDB4YmEsXG4gICAgICAgICAgICAgICAgICAgICAweDcxLDB4NDUsMHg0YiwweDFlLDB4MmYsMHhjYSwweDgyLDB4NWYsMHg1NiwweDc3LDB4ZTksMHhkMywweDg4LDB4NWQsXG4gICAgICAgICAgICAgICAgICAgICAweDhiLDB4ZWMsMHg5MiwweDhiLDB4OGEsMHgyMywweDg4LDB4MDUsMHhmOCwweDJjLDB4YTgsMHhmMSwweDcwLDB4NzYsXG4gICAgICAgICAgICAgICAgICAgICAweGU3LDB4YmYsMHg3NSwweGE4LDB4MzEsMHgxNCwweDhlLDB4NzYsMHhjOCwweDAxLDB4YTYsMHgyNSwweDI3LDB4NDksXG4gICAgICAgICAgICAgICAgICAgICAweGFmLDB4ZGMsMHhmNCwweGY2LDB4ZjQsMHhjZSwweDkwLDB4ODQsMHgxNSwweDJiLDB4NGQsMHhiMywweGNjLDB4NzcsXG4gICAgICAgICAgICAgICAgICAgICAweGRiLDB4NjUsMHg3MSwweDc1LDB4ZDMsMHgwMCwweDFkLDB4MjIsMHhjNSwweDQyLDB4MmYsMHg1MSwweGZhLDB4N2IsXG4gICAgICAgICAgICAgICAgICAgICAweGViLDB4NmUsMHgwMywweGQ5LDB4NDEsMHhkZCwweDJkLDB4MWEsMHhkZCwweDA3LDB4NzQsMHg4YiwweGI3LDB4YTIsXG4gICAgICAgICAgICAgICAgICAgICAweGZhLDB4YjIsMHg1OSwweDBlLDB4MGUsMHg5NCwweDdjLDB4MDAsMHhhZCwweDk1LDB4MjMsMHg0MiwweDkxLDB4MTgsXG4gICAgICAgICAgICAgICAgICAgICAweDRjLDB4OTcsMHhmMSwweDI3LDB4NjIsMHg3N10pLFxuICAgICAgIHV0aWwuYmluMnN0cihbMHgwMCwweDAzLDB4MDVdKSxcbiAgICAgICB1dGlsLmJpbjJzdHIoWzB4MDcsMHhmZiwweDU3LDB4MTksMHg3NiwweGZjLDB4MDksMHg2YSwweDdhLDB4ZjcsMHhiYSwweGIyLDB4NDIsMHhiZixcbiAgICAgICAgICAgICAgICAgICAgIDB4Y2QsMHgyYiwweGMxLDB4MWEsMHg3OSwweDI1LDB4OGMsMHhhZCwweGY0LDB4M2EsMHgwYSwweDdhLDB4O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