/*!*************************************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[1]!./vendor/symfony/ux-live-component/assets/dist/live.min.css ***!
  \*************************************************************************************************************************************/
[data-loading=""],[data-loading=show],[data-loading*=\|show]{display:none}
/*!*************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[1]!./assets/styles/app.css ***!
  \*************************************************************************************************/
body {
    background-color: white;
}

/*!**********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./assets/vue/Search.vue?vue&type=style&index=0&id=0fe08b42&scoped=true&lang=css ***!
  \**********************************************************************************************************************************************************************************************************************************************************************/

.container[data-v-0fe08b42] {
  max-width: 400px;
  margin: 0 auto;
  font-family: sans-serif;
}
.lien-search[data-v-0fe08b42] {font-size: 12px; text-decoration: none;}
input[data-v-0fe08b42] {
  padding: 5px;
  flex-grow: 1;
}
button[data-v-0fe08b42] {
  margin-top: 20px;
  padding: 10px 20px;
  cursor: pointer;
}

/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./assets/vue/TableauMap2.vue?vue&type=style&index=0&id=3ee031d1&lang=css ***!
  \***************************************************************************************************************************************************************************************************************************************************************/

:deep(tr.my-custom-highlight) {
    /*background: #fcd9a5 !important;*/
    /*font-weight: bold;*/
}
.p-datatable-thead > tr > th  {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-right: 0px !important;
    padding-left: 4px !important;
}
.p-datatable-header-cell   {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-right: 0px !important;
    padding-left: 4px !important;
}
.p-datatable-frozen-tbody > tr > td {
  /*background-color: #c8e3fe !important; */
  font-weight: bold;
  color: blue !important;
}


/*!************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./assets/vue/Creneau2.vue?vue&type=style&index=0&id=cb3c0470&lang=css ***!
  \************************************************************************************************************************************************************************************************************************************************************/

.p-tab {padding-bottom: 2px !important;padding-top: 2px !important;}

/*!*********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./assets/vue/Param.vue?vue&type=style&index=0&id=3e4572b4&scoped=true&lang=css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************/

.container[data-v-3e4572b4] {
  max-width: 400px;
  margin: 0 auto;
  font-family: sans-serif;
}
.form-group[data-v-3e4572b4] {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}
label[data-v-3e4572b4] {
  font-weight: bold;
  width: 60px;
}
input[data-v-3e4572b4] {
  padding: 5px;
  flex-grow: 1;
}
button[data-v-3e4572b4] {
  margin-top: 20px;
  padding: 10px 20px;
  cursor: pointer;
}


/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmNzcyIsIm1hcHBpbmdzIjoiOzs7QUFBQSw2REFBNkQsWUFBWSxDOzs7O0FDQXpFO0lBQ0ksdUJBQXVCO0FBQzNCOzs7Ozs7QUNpSUE7RUFDRSxnQkFBZ0I7RUFDaEIsY0FBYztFQUNkLHVCQUF1QjtBQUN6QjtBQUNBLCtCQUFjLGVBQWUsRUFBRSxxQkFBcUIsQ0FBQztBQUNyRDtFQUNFLFlBQVk7RUFDWixZQUFZO0FBQ2Q7QUFDQTt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Sk7XG4gICAgICAgIGNvbnN0IGNsdXN0ZXJTZWFyY2ggPSByZWYobnVsbCk7XG5cbmNvbnN0IHByb3BzID0gZGVmaW5lUHJvcHMoe1xuICBwYXJhbTogIHtcbiAgICB0eXBlOiBPYmplY3QsIFxuICAgIHJlcXVpcmVkOiB0cnVlIFxuICB9XG59KTtcblxuLy9DRU5UUkFMRSBERSBDT01NVU5JQ0FUSU9OXG4gICAgICAgIGNvbnN0IHNvdW1ldHRyZUZvcm11bGFpcmUgPSBhc3luYygpID0+IHtcbiAgICAgICAgICAvL2NvbnRyb2xlclxuICAgICAgICAgIGlmICghZm9ybXVsYWlyZUVzdFZhbGlkZS52YWx1ZSkge1xuICAgICAgICAgICAgICAgIG1lc3NhZ2V1ci52YWx1ZSA9ICdMZXMgZG9ubsOpZXMgbmUgcGV1dmVudCBwYXMgw6p0cmUgdmlkZXMnO1xuICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH0gXG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXNwb25zZSA9IGF3YWl0IGZldGNoKCcvYXBpL3NlYXJjaCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWFyY2g6IHNlYXJjaGluZy52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdGlvbjogb3BlcmF0aW9uLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCByZXNwb25zZS5qc29uKCk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdGF0cy52YWx1ZSA9IGRhdGE7XG5cbiAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLm9rKSB7bWVzc2FnZXVyLnZhbHVlID0gXCJFcnJldXIgc2F1dmVnYXJkZVwiO31cbiAgICAgICAgICAgICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvdW50ID0gcmVzdWx0YXRzLnZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvdW50ID09IDApe21lc3NhZ2V1ci52YWx1ZSA9IFwiQXVjdW4gcsOpc3VsdGF0XCI7fVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZXttZXNzYWdldXIudmFsdWUgPSBjb3VudCArIFwiIHLDqXN1bHRhdChzKVwiO31cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZXVyLnZhbHVlID0gXCJFcnJldXIgcsOpc2VhdVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkVycmV1ciByw6lzZWF1XCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGNvbnN0IGZvcm11bGFpcmVFc3RWYWxpZGUgPSBjb21wdXRlZCgoKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIHNlYXJjaGluZy52YWx1ZS50cmltKCkgIT09ICcnO1xuICAgICAgICB9KTtcblxuICAgICAgICBmdW5jdGlvbiByZWRpcmlnZShpZCwgdHlwZSkge1xuICAgICAgICAgICAgIGNsdXN0ZXJTZWFyY2gudmFsdWUgPSBpZDtcbiAgICAgICAgICAgICBjbHVzdGVyU2VhcmNoLnR5cGUgPSB0eXBlO1xuICAgICAgICAgICAgIGJ1cy5lbWl0KCdjbHVzdGVyLXNlbGVjdGVkJywgY2x1c3RlclNlYXJjaCk7XG4gICAgICAgICAgICAgaGlkZURpYWxvZygpO1xuICAgICAgICAgfVxuXG5cbi8vRVZFTlQgSU5URVJGQUNFICBcbiAgICAgICAgY29uc3QgZWRpdERpYWxvZz0gKCkgPT4ge1xuICAgICAgICAgICAgc2VhcmNoRGlhbG9nLnZhbHVlID0gdHJ1ZTtcbiAgICAgICAgfTtcbiAgICAgICAgY29uc3QgaGlkZURpYWxvZyA9ICgpID0+IHtcbiAgICAgICAgICAgIHNlYXJjaERpYWxvZy52YWx1ZSA9IGZhbHNlO1xuICAgICAgICAgICAgLy9zdWJtaXR0ZWQudmFsdWUgPSBmYWxzZTtcbiAgICAgICAgfTtcblxuLy9ERU1BUlJBR0VcbiAgICAgICAgb25Nb3VudGVkKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgb3BlcmF0aW9uLnZhbHVlID0gcHJvcHMucGFyYW0ub3BlcmF0aW9uO1xuICAgICAgICB9KTtcblxuICAgICAgICBsZXQgZXZlbnRTb3VyY2UgPSBudWxsO1xuXG4gICAgICAgIG9uVW5tb3VudGVkKCgpID0+IHtcbiAgICAgICAgICAgIGlmIChldmVudFNvdXJjZSkge1xuICAgICAgICAgICAgICAgIGV2ZW50U291cmNlLmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJNZXJjdXJlIEV2ZW50U291cmNlIGNsb3NlZC5cIik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIG9uQmVmb3JlVW5tb3VudCgoKSA9PiB7XG4gICAgICAgICAgaWYgKGV2ZW50U291cmNlKSB7XG4gICAgICAgICAgICBldmVudFNvdXJjZS5jbG9zZSgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbjwvc2NyaXB0PlxuPHRlbXBsYXRlPlxuICAgICAgICA8ZGl2IGlkPVw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ICAgICAgICAgICAgIGNvbnN0IHJlc3BvbnNlID0gYXdhaXQgZmV0Y2goJy9hcGkvcG9pbnRzL2NsdXN0ZXIvJytjbHVzdGVyX2lkKTsgLy8gVm90cmUgZW5kcG9pbnQgQVBJIFN5bWZvbnlcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0gYXdhaXQgcmVzcG9uc2UuanNvbigpO1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdjaGFyZ2VtZW50IHBvaW50cycpO1xuICAgICAgICAgICAgICAgIHBvaW50cy52YWx1ZSA9IGRhdGEubWFwKHAgPT4gKHsgLi4ucCwgaXNFZGl0aW5nOiBmYWxzZSwgb3JpZ2luYWw6IHt9LCBzZWxlY3RlZDogZmFsc2UgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZmlyc3RJdGVtID0gcG9pbnRzLnZhbHVlLmZpbmQoeD0+eCE9PXVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpcnN0SXRlbS5zZWxlY3RlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGlmKHNlYXJjaCA+IDApe1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwb2ludEluZGV4ID0gcG9pbnRzLnZhbHVlLmZpbmRJbmRleChwID0+IHAuaWQgPT09IHNlYXJjaCk7XG4gICAgICAgICAgICAgICAgICAgIHBvaW50cy52YWx1ZVtwb2ludEluZGV4XS5zZWxlY3RlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHBvaW50cy52YWx1ZVtwb2ludEluZGV4XS5maXJzdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGVkaXRQb2ludChwb2ludHMudmFsdWVbcG9pbnRJbmRleF0uaWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2FkaW5nLnZhbHVlID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycmV1ciBsb3JzIGRlIGxhIHLDqWN1cMOpcmF0aW9uIGRlcyBwb2ludHM6XCIsIGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICAvLyBGb25jdGlvbiBwb3VyIGfDqXJlciBsZXMgbWVzc2FnZXMgTWVyY3VyZVxuICAgICAgICBjb25zdCBoYW5kbGVNZXJjdXJlTWVzc2FnZV91cGRhdGUgPSAoZGF0YSkgPT4ge1xuICAgICAgICAgICAgY29uc29sZS5sb2coYE1lcmN1cmUgbWVzc2FnZSByZWNlaXZlZCB2dWUgOmAsIGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAvLyBNZXQgw6Agam91ciB1biBwcm9kdWl0IGV4aXN0YW50XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBvaW50SW5kZXggPSBmcm96ZW5Qb2ludHMudmFsdWUuZmluZEluZGV4KHAgPT4gcC5pZCA9PT0gZGF0YS5pZCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwb2ludEluZGV4ICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnJvemVuUG9pbnRzLnZhbHVlW3BvaW50SW5kZXhdID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBvaW50SW5kZXggPSBwb2ludHMudmFsdWUuZmluZEluZGV4KHAgPT4gcC5pZCA9PT0gZGF0YS5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocG9pbnRJbmRleCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb2ludHMudmFsdWVbcG9pbnRJbmRleF0gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgaGFuZGxlTWVyY3VyZU1lc3NhZ2UgPSAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBKU09OLnBhcnNlKGV2ZW50LmRhdGEpOyBcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGBNZXJjdXJlIG1lc3NhZ2UgcmVjZWl2ZWQgOmAsIGRhdGEpO1xuICAgICAgICAgICAgZGF0YS5mb3JFYWNoKChlbGVtZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgdHlwZSA9IGVsZW1lbnQuYWN0aW9uO1xuICAgICAgICAgICAgICAgIHZhciByZWZyZXNoX2NyZW5lYXUgPSAwO1xuICAgICAgICAgICAgICAgIHN3aXRjaCAodHlwZSkge1xuICAgICAgICAgICAgICAgIC8vbWlzZSDDoCBqb3VyIGRlcyBjbHVzdGVycyBjb21wbGV0XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2NsdXN0ZXJfY29tcGxldGVkJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGN1c3RvbUV2ZW50ID0gbmV3IEN1c3RvbUV2ZW50KCdjbHVzdGVyc2NvbXBsZXRlZCcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRhaWw6IGVsZW1lbnQsIC8vIFBhc3MgeW91ciBkYXRhIGluIHRoZSAnZGV0YWlsJyBwcm9wZXJ0eVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1YmJsZXM6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FuY2VsYWJsZTogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL2RvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdsZWFmbGV0bWFwJykuY29udGVudFdpbmRvdy5kaXNwYXRjaEV2ZW50KGN1c3RvbUV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3Byb2R1Y3RfdXBkYXRlZCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZU1lcmN1cmVNZXNzYWdlX3VwZGF0ZShlbGVtZW50LnBvaW50KTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2NyZW5lYXVfdXBkYXRlZCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnY3JlbmVhdV91cGRhdGVkJylcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hfY3JlbmVhdSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbFVwZGF0ZShlbGVtZW50LmRvbm5lZXMubm9tYnJlKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2NhcnRlLXJlZnJlc2gnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2NhcnRlIHRvIHJlZnJlc2gnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ1cy5lbWl0KCdjYXJ0ZS1yZWZyZXNoJywgJycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZihyZWZyZXNoX2NyZW5lYXUgPT0gMSl7XG4gICAgICAgICAgICAgICAgYnVzLmVtaXQoJ2NyZW5lYXUtdXBkYXRlZCcsICcnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4vLyBJTlRFUkZBQ0VcblxuICAgICAgICBjb25zdCB2aWxsZXMgID0gY29tcHV0ZWQoKCkgPT4ge1xuICAgICAgICAgICAgaWYgKCFwb2ludHMudmFsdWUgfHwgcG9pbnRzLnZhbHVlLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGFsbENpdGllc1dpdGhEdXBsaWNhdGVzID0gcG9pbnRzLnZhbHVlLm1hcChwb2ludCA9PiBwb2ludC52aWxsZSk7XG4gICAgICAgICAgICBjb25zdCB1bmlxdWVDaXR5U2V0ID0gbmV3IFNldChhbGxDaXRpZXNXaXRoRHVwbGljYXRlcyk7XG4gICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbSh1bmlxdWVDaXR5U2V0KS5zb3J0KCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbnN0IHF1YXJ0aWVycyAgPSBjb21wdXRlZCgoKSA9PiB7XG4gICAgICAgICAgICBpZiAoIXBvaW50cy52YWx1ZSB8fCBwb2ludHMudmFsdWUubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgYWxsUXVhcnRpZXJzV2l0aER1cGxpY2F0ZXMgPSBwb2ludHMudmFsdWUubWFwKHBvaW50ID0+IHBvaW50LnF1YXJ0aWVyKTtcbiAgICAgICAgICAgIGNvbnN0IHVuaXF1ZVF1YXJ0aWVyU2V0ID0gbmV3IFNldChhbGxRdWFydGllcnNXaXRoRHVwbGljYXRlcyk7XG4gICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbSh1bmlxdWVRdWFydGllclNldCkuc29ydCgpO1xuICAgICAgICB9KTtcblxuICAgICAgICBjb25zdCBydWVzICA9IGNvbXB1dGVkKCgpID0+IHtcbiAgICAgICAgICAgIGlmICghcG9pbnRzLnZhbHVlIHx8IHBvaW50cy52YWx1ZS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBhbGxSdWVzV2l0aER1cGxpY2F0ZXMgPSBwb2ludHMudmFsdWUubWFwKHBvaW50ID0+IHBvaW50Lm5vbVJ1ZSk7XG4gICAgICAgICAgICBjb25zdCB1bmlxdWVSdWVTZXQgPSBuZXcgU2V0KGFsbFJ1ZXNXaXRoRHVwbGljYXRlcyk7XG4gICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbSh1bmlxdWVSdWVTZXQpLnNvcnQoKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3QgbGliZWxsZXMgID0gY29tcHV0ZWQoKCkgPT4ge1xuICAgICAgICAgICAgaWYgKCFwb2ludHMudmFsdWUgfHwgcG9pbnRzLnZhbHVlLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGFsbExpYmVsbGVzV2l0aER1cGxpY2F0ZXMgPSBwb2ludHMudmFsdWUubWFwKHBvaW50ID0+IHBvaW50LmxpYmVsbGVDb21wdGV1cik7XG4gICAgICAgICAgICBjb25zdCB1bmlxdWVMaWJlbGxlc1NldCA9IG5ldyBTZXQoYWxsTGliZWxsZXNXaXRoRHVwbGljYXRlcyk7XG4gICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbSh1bmlxdWVMaWJlbGxlc1NldCkuc29ydCgpO1xuICAgICAgICB9KTtcblxuICAgICAgICBjb25zdCBkYXRlc1JWICA9IGNvbXB1dGVkKCgpID0+IHtcbiAgICAgICAgICAgIGlmICghcG9pbnRzLnZhbHVlIHx8IHBvaW50cy52YWx1ZS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgICB9XG4gIC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gKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy9GaWx0cmUgcGFyIFF1YXJ0aWVyXG4gICAgICAgICAgICAvL2NvbnNvbGUubG9nKCdxdWFydGllcicrc2VhcmNoUXVhcnRpZXIudmFsdWUpXG4gICAgICAgICAgICBpZiAoc2VhcmNoUXVhcnRpZXIudmFsdWUgJiYgc2VhcmNoUXVhcnRpZXIudmFsdWUgIT09ICdUb3VzJykge1xuICAgICAgICAgICAgICAgIHBvaW50c1RvRmlsdGVyID0gcG9pbnRzVG9GaWx0ZXIuZmlsdGVyKHBvaW50ID0+IFxuICAgICAgICAgICAgICAgICAgICBwb2ludC5xdWFydGllciA9PT0gc2VhcmNoUXVhcnRpZXIudmFsdWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvL0ZpbHRyZSBwYXIgTGliZWxsZVxuICAgICAgICAgICAgLy9jb25zb2xlLmxvZygncXVhcnRpZXInK3NlYXJjaFF1YXJ0aWVyLnZhbHVlKVxuICAgICAgICAgICAgaWYgKHNlYXJjaExpYmVsbGUudmFsdWUgJiYgc2VhcmNoTGliZWxsZS52YWx1ZSAhPT0gJ1RvdXMnKSB7XG4gICAgICAgICAgICAgICAgcG9pbnRzVG9GaWx0ZXIgPSBwb2ludHNUb0ZpbHRlci5maWx0ZXIocG9pbnQgPT4gXG4gICAgICAgICAgICAgICAgICAgIHBvaW50LmxpYmVsbGVDb21wdGV1ciA9PT0gc2VhcmNoTGliZWxsZS52YWx1ZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vRmlsdHJlIHBhciBEYXRlUlZcbiAgICAgICAgICAgIC8vY29uc29sZS5sb2coJ3F1YXJ0aWVyJytzZWFyY2hRdWFydGllci52YWx1ZSlcbiAgICAgICAgICAgIGlmIChzZWFyY2hEYXRlUlYudmFsdWUgJiYgc2VhcmNoRGF0ZVJWLnZhbHVlICE9PSAnVG91dGVzJykge1xuICAgICAgICAgICAgICAgIHBvaW50c1RvRmlsdGVyID0gcG9pbnRzVG9GaWx0ZXIuZmlsdGVyKHBvaW50ID0+IFxuICAgICAgICAgICAgICAgICAgICBjb25kaXRpb25fcG9pbnRfUlYocG9pbnQsIHNlYXJjaERhdGVSVi52YWx1ZSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29uZGl0aW9uX3BvaW50X1JWKHBvaW50LCBkYXRlUlYpe1xuICAgICAgICAgICAgICBpZihwb2ludC5jcmVuZWF1KXsgXG4gICAgICAgICAgICAgICAgIGlmKHBvaW50LmNyZW5lYXUuZGF0ZSl7XG4gICAgICAgICAgICAgICAgICAgICAgaWYocG9pbnQuY3JlbmVhdS5kYXRlID09IGRhdGVSVil7cmV0dXJuIHRydWU7fVxuICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgIGVsc2V7XG4gICAgICAgICAgICAgICAgICAgICBpZihkYXRlUlYgPT0gJ1NhbnMgUlYnKXtyZXR1cm4gdHJ1ZTt9XG4gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgIGlmKGRhdGVSViA9PSAnU2FucyBSVicpe3JldHVybiB0cnVlO31cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vRmlsdHJlIHBhciBFdGF0XG4gICAgICAgICAgICAvL2NvbnNvbGUubG9nKCdldGF0JytzZWFyY2hFdGF0LnZhbHVlKVxuICAgICAgICAgICAgaWYgKHNlYXJjaEV0YXQudmFsdWUgJiYgc2VhcmNoRXRhdC52YWx1ZSAhPT0gJ1RvdXMnKSB7XG4gICAgICAgICAgICAgICAgcG9pbnRzVG9GaWx0ZXIgPSBwb2ludHNUb0ZpbHRlci5maWx0ZXIocG9pbnQgPT4gXG4gICAgICAgICAgICAgICAgICAgIHBvaW50LmV0YXQuaWQgPT09IHNlYXJjaEV0YXQudmFsdWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy9GaWx0cmUgcGFyIENsdXN0ZXIgMVxuICAgICAgICAgICAgaWYgKHNlYXJjaENsdXN0ZXIxLnZhbHVlICYmIHNlYXJjaENsdXN0ZXIxLnZhbHVlICE9PSAnJykge1xuICAgICAgICAgICAgICAgIHBvaW50c1RvRmlsdGVyID0gcG9pbnRzVG9GaWx0ZXIuZmlsdGVyKHBvaW50ID0+IFxuICAgICAgICAgICAgICAgICAgICBwb2ludC5jbHVzdGVyMSA9PT0gc2VhcmNoQ2x1c3RlcjEudmFsdWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy9GaWx0cmUgcGFyIENsdXN0ZXIgMlxuICAgICAgICAgICAgaWYgKHNlYXJjaENsdXN0ZXIyLnZhbHVlICYmIHNlYXJjaENsdXN0ZXIyLnZhbHVlICE9PSAnJykge1xuICAgICAgICAgICAgICAgIHBvaW50c1RvRmlsdGVyID0gcG9pbnRzVG9GaWx0ZXIuZmlsdGVyKHBvaW50ID0+IFxuICAgICAgICAgICAgICAgICAgICBwb2ludC5jbHVzdGVyMiA9PT0gc2VhcmNoQ2x1c3RlcjIudmFsdWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy9GaWx0cmUgcGFyIENsdXN0ZXIgM1xuICAgICAgICAgICAgaWYgKHNlYXJjaENsdXN0ZXIzLnZhbHVlICYmIHNlYXJjaENsdXN0ZXIzLnZhbHVlICE9PSAnJykge1xuICAgICAgICAgICAgICAgIHBvaW50c1RvRmlsdGVyID0gcG9pbnRzVG9GaWx0ZXIuZmlsdGVyKHBvaW50ID0+IFxuICAgICAgICAgICAgICAgICAgICBwb2ludC5jbHVzdGVyMyA9PT0gc2VhcmNoQ2x1c3RlcjMudmFsdWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy9GaWx0cmUgcGFyIENsdXN0ZXIgNFxuICAgICAgICAgICAgaWYgKHNlYXJjaENsdXN0ZXI0LnZhbHVlICYmIHNlYXJjaENsdXN0ZXI0LnZhbHVlICE9PSAnJykge1xuICAgICAgICAgICAgICAgIHBvaW50c1RvRmlsdGVyID0gcG9pbnRzVG9GaWx0ZXIuZmlsdGVyKHBvaW50ID0+IFxuICAgICAgICAgICAgICAgICAgICBwb2ludC5jbHVzdGVyNCA9PT0gc2VhcmNoQ2x1c3RlcjQudmFsdWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy9GaWx0cmUgcGFyIENsdXN0ZXIgNVxuICAgICAgICAgICAgaWYgKHNlYXJjaENsdXN0ZXI1LnZhbHVlICYmIHNlYXJjaENsdXN0ZXI1LnZhbHVlICE9PSAnJykge1xuICAgICAgICAgICAgICAgIHBvaW50c1RvRmlsdGVyID0gcG9pbnRzVG9GaWx0ZXIuZmlsdGVyKHBvaW50ID0+IFxuICAgICAgICAgICAgICAgICAgICBwb2ludC5jbHVzdGVyNSA9PT0gc2VhcmNoQ2x1c3RlcjUudmFsdWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvL0ZpbHRyZSBwYXIgRGF0ZVJWXG4gICAgICAgICAgICBwb2ludHNUb0ZpbHRlciA9IHBvaW50c1RvRmlsdGVyLmZpbHRlcihwb2ludCA9PiBcbiAgICAgICAgICAgICAgICAgICAgY29uZGl0aW9uX3NlbGVjdGVkKHBvaW50KVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgICBmdW5jdGlvbiBjb25kaXRpb25fc2VsZWN0ZWQocG9pbnQpe1xuICAgICAgICAgICAgICAgICBpZihwb2ludC5mcm96ZW4pe1xuICAgICAgICAgICAgICAgICAgICAgIGlmKHBvaW50LmZyb3plbiA9PSB0cnVlKXtyZXR1cm4gZmFsc2U7fVxuICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb3VudC52YWx1ZSA9IHBvaW50c1RvRmlsdGVyLmxlbmd0aDtcbiAgICAgICAgICAgIHJldHVybiBwb2ludHNUb0ZpbHRlcjtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3QgY2xlYXJGaWx0ZXIgPSAoKSA9PiB7XG4gICAgICAgICAgICBzZWFyY2hOb20udmFsdWUgPSAnJztcbiAgICAgICAgICAgIHNlYXJjaEV0YXQudmFsdWUgPSAnVG91cyc7XG4gICAgICAgICAgICBzZWFyY2hRdWFydGllci52YWx1ZSA9ICdUb3VzJztcbiAgICAgICAgICAgIHNlYXJjaExpYmVsbGUudmFsdWUgPSAnVG91cyc7XG4gICAgICAgICAgICBzZWFyY2hUZWwudmFsdWUgPSAnJztcbiAgICAgICAgICAgIHNlYXJjaFZpbGxlLnZhbHVlID0gJ1RvdXRlcyc7XG4gICAgICAgICAgICBzZWFyY2hOb21SdWUudmFsdWUgPSAnVG91dGVzJztcbiAgICAgICAgICAgIHNlYXJjaE51bWVyb0NsaWVudC52YWx1ZSAgPSAnJztcbiAgICAgICAgICAgIHNlYXJjaE51bWVyb1BoeXNpcXVlLnZhbHVlICA9ICcnO1xuICAgICAgICAgICAgc2VhcmNoQ2x1c3RlcjEudmFsdWUgPSAnJztcbiAgICAgICAgICAgIHNlYXJjaENsdXN0ZXIyLnZhbHVlID0gJyc7XG4gICAgICAgICAgICBzZWFyY2hDbHVzdGVyMy52YWx1ZSA9ICcnO1xuICAgICAgICAgICAgc2VhcmNoQ2x1c3RlcjQudmFsdWUgPSAnJztcbiAgICAgICAgICAgIHNlYXJjaENsdXN0ZXI1LnZhbHVlID0gJyc7XG4gICAgICAgICAgICBzZWFyY2hEYXRlUlYudmFsdWUgPSAnJztcbiAgICAgICAgfVxuXG4gICAgICAgIC8vb24gcmVjb2l0IHVuIG1lc3NhZ2UgZGUgbGVhZmxldFxuICAgICAgICBjb25zdCB1cGRhdGVDbHVzdGVyID0gKGNsdXN0ZXJTZWFyY2gpID0+IHtcbiAgICAgICAgICAgIGNsZWFyRmlsdGVyKCk7XG4gICAgICAgICAgICBldmFsKCdzZWFyY2hDbHVzdGVyJytjbHVzdGVyU2VhcmNoLnR5cGUrJy52YWx1ZSA9ICcrY2x1c3RlclNlYXJjaC52YWx1ZSk7XG4gICAgICAgICAgICBjb25zb2xlLmxvZygnY2xpYyByZWNpZXZlZCcgKyBjbHVzdGVyU2VhcmNoLnR5cGUgKydpZCcrICsgY2x1c3RlclNlYXJjaC52YWx1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICAvL29uIHLDqWluaXRhbGlzZSBsJ2FmZmljaGFnZSwgb24gbMOodmUgbGUgbG9ja1xuICAgICAgICBjb25zdCBnbG9iYWxFeHRlcm5hbENhbGwgPSAoY2x1c3Rlcl9pZCwgc2VsKSA9PiB7XG4gICAgICAgICAgICAvL3NlbmRMb2NrKG51bGwsIDIpO1xuICAgICAgICAgICAgc2VhcmNoID0gc2VsO1xuICAgICAgICAgICAgZmV0Y2hQb2ludHMoY2x1c3Rlcl9pZCk7XG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgZWRpdFBvaW50ID0gKGlkKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBwb2ludCA9IHBvaW50cy52YWx1ZS5maW5kKHAgPT4gcC5pZCA9PT0gaWQpO1xuICAgICAgICAgICAgaWYgKHBvaW50KSB7XG4gICAgICAgICAgICAgICAgcG9pbnQub3JpZ2luYWwgPSB7IC4uLnBvaW50IH07XG4gICAgICAgICAgICAgICAgcG9pbnQuaXNFZGl0aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKCdwb2ludEMnK3BvaW50LmlkKTtcbiAgICAgICAgICAgICAgICBpZiAocG9pbnQuY3JlbmVhdSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBwb2ludC5jcmVuZWF1ID0ge307XG4gICAgICAgICAgICAgICAgICAgIHBvaW50LmNyZW5lYXUuaWQgPSAnJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy9zZW5kTG9jayhwb2ludCwgMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgY2FuY2VsRWRpdCA9IChpZCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgcG9pbnRJbmRleCA9IHBvaW50cy52YWx1ZS5maW5kSW5kZXgocCA9PiBwLmlkID09PSBpZCk7XG4gICAgICAgICAgICBpZiAocG9pbnRJbmRleCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBwb2ludHMudmFsdWVbcG9pbnRJbmRleF0gPSB7IC4uLnBvaW50cy52YWx1ZVtwb2ludEluZGV4XS5vcmlnaW5hbCwgaXNFZGl0aW5nOiBmYWxzZSwgb3JpZ2luYWw6IHt9IH07XG4gICAgICAgICAgICAgICAgLy9zZW5kTG9jayhwb2ludHMudmFsdWVbcG9pbnRJbmRleF0sIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGNvbnN0IHNlbmRJbmZvcyA9IGFzeW5jKGlkKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3BvbnNlID0gYXdhaXQgZmV0Y2goJy9hcGkvcG9pbnRzL3VwZGF0ZS8nK2lkLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQVVQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogcHJvZHVjdC52YWx1ZS5jb21tZW50YWlyZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY2Nlc3NpYmxlOiBwcm9kdWN0LnZhbHVlLmNvbXB0ZXVyQWNjZXNzaWJsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaXZpbGl0ZTogcHJvZHVjdC52YWx1ZS5jaXZpbGl0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub206IHByb2R1Y3QudmFsdWUubm9tLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWVyb0NsaWVudDogcHJvZHVjdC52YWx1ZS5udW1lcm9DbGllbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVsMTogcHJvZHVjdC52YWx1ZS50ZWwxLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbDI6IHByb2R1Y3QudmFsdWUudGVsMixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbWFpbDogcHJvZHVjdC52YWx1ZS5lbWFpbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldGF0OiBwcm9kdWN0LnZhbHVlLmV0YXQuaWRcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZygnTW9kaWZpY2F0aW9uIGVudm95w6llIMOgIFN5bWZvbnkuIEF0dGVudGUgZGUgbGEgbWlzZSDDoCBqb3VyIE1lcmN1cmUuLi4nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2V1ci52YWx1ZSA9ICdGaWNoZSBtaXNlIMOgIGpvdXInO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QuYWRkKHsgc2V2ZXJpdHk6ICdpbmZvJywgc3VtbWFyeTogJ0luZm8nLCBkZXRhaWw6IG1lc3NhZ2V1ci52YWx1ZSwgbGlmZTogMzAwMCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y3QuaXNFZGl0aW5nID0gZmFsc2U7IC8vIFNvcnRpciBkdSBtb2RlIMOpZGl0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwb2ludEluZGV4ID0gcG9pbnRzLnZhbHVlLmZpbmRJbmRleChwID0+IHAuaWQgPT09IGlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50cy52YWx1ZVtwb2ludEluZGV4XSA9IHByb2R1Y3QudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBoaWRlRGlhbG9nKCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUuZXJyb3IoXCJFcnJldXIgbG9ycyBkZSBsYSBzYXV2ZWdhcmRlIGR1IHByb2R1aXQ6XCIsIGF3YWl0IHJlc3BvbnNlLnRleHQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdldXIudmFsdWUgPSAnRXJyZXVyIGxvcnMgZGUgbGEgc2F1dmVnYXJkZSBkZSBsYSBmaWNoZSA6ICcrYXdhaXQgcmVzcG9uc2UudGV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QuYWRkKHsgc2V2ZXJpdHk6ICdpbmZvJywgc3VtbWFyeTogJ0luZm8nLCBkZXRhaWw6IG1lc3NhZ2V1ci52YWx1ZSwgbGlmZTogMzAwMCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycmV1ciByw6lzZWF1IGxvcnMgZGUgbGEgc2F1dmVnYXJkZVwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBzZW5kRXhjZWwoKXtcbiAgICAgICAgICAgIGhpZGVEaWFsb2coKTtcbiAgICAgICAgICAgIGxldCBjaGFpbmUgPSAnJztcbiAgICAgICAgICAgIGZyb3plblBvaW50cy52YWx1ZS5mb3JFYWNoKChlbGVtZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgY2hhaW5lID0gY2hhaW5lICsgZWxlbWVudC5pZCArICcsJztcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICBmaWx0ZXJlZFBvaW50cy52YWx1ZS5mb3JFYWNoKChlbGVtZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgY2hhaW5lID0gY2hhaW5lICsgZWxlbWVudC5pZCArICcsJztcblxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIGNoYWluZS5zbGljZSgwLCAtMSlcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGZldGNoKCcvZXhjZWwvZXhwb3J0LycsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhaW5lOiBjaGFpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWlzc2lvbl9pZDogcHJvcHMucGFyYW0ubWlzc2lvblxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfSkudGhlbihyZXNwb25zZSA9PiByZXNwb25zZS5ibG9iKCkpLnRoZW4oZGF0YSA9PiB3aW5kb3cub3BlbihVUkwuY3JlYXRlT2JqZWN0VVJMKGRhdGEpKSlcbiAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJFcnJldXIgZXhjZWxcIik7XG4gICAgICAgICAgICAgfSAgIFxuICAgICAgICAgICAgLy93aW5kb3cub3BlbignL2V4Y2VsL2V4cG9ydC8/JytjaGFpbmUsICdfYmxhbmsnKS5mb2N1cygpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qgc2VuZExvY2sgPSBhc3luYyhwb2ludCwgbG9ja2luZykgPT4ge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEVudm95ZXIgbGVzIG1vZGlmaWNhdGlvbnMgw6AgbCdBUEkgU3ltZm9ueVxuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNwb25zZSA9IGF3YWl0IGZldGNoKGAvYXBpL3BvaW50cy9sb2NraW5nL2ArcG9pbnQuaWQrJy8nK2xvY2tpbmcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BVVCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHt9KVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLm9rKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyZXVyIGxvcnMgZGUgbGEgc2F1dmVnYXJkZSBkdSBwcm9kdWl0OlwiLCBhd2FpdCByZXNwb25zZS50ZXh0KCkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycmV1ciByw6lzZWF1IGxvcnMgZGUgbGEgc2F1dmVnYXJkZVwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBkaXN0YW5jZVVwZGF0ZSA9IChwb2ludCwgZGlzdGFuY2UpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwb2ludEluZGV4ID0gcG9pbnRzLnZhbHVlLmZpbmRJbmRleChwID0+IHAuaWQgPT09IHBvaW50KTtcbiAgICAgICAgICAgICAgICBwb2ludHMudmFsdWVbcG9pbnRJbmRleF0uc2VsZWN0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGRhdGFDcmVuZWF1LnBvaW50ID0gcG9pbnQ7XG4gICAgICAgICAgICAgICAgZGF0YUNyZW5lYXUuZGlzdGFuY2UgPSBkaXN0YW5jZTtcbiAgICAgICAgICAgICAgICBkYXRhQ3JlbmVhdS5kYXRlID0gMDtcbiAgICAgICAgICAgICAgICBidXMuZW1pdCgnY3JlbmVhdS10b1VwZGF0ZScsIGRhdGFDcmVuZWF1KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGNhcnRlVXBkYXRlID0gKHBvaW50KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgcG9pbnRJbmRleCA9IHBvaW50cy52YWx1ZS5maW5kSW5kZXgocCA9PiBwLmlkID09PSBwb2ludCk7XG4gICAgICAgICAgICAgICAgZGF0YUNhcnRlLmNsdXN0ZXJJZCA9IHBvaW50cy52YWx1ZVtwb2ludEluZGV4XS5jbHVzdGVyNTtcbiAgICAgICAgICAgICAgICBidXMuZW1pdCgnY2FydGUtdG9VcGRhdGUnLCBkYXRhQ2FydGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdG90YWxVcGRhdGUgPSAoZGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ3JlY3Vub21icmUnK2RhdGEpO1xuICAgICAgICAgICAgICAgdmFsdWUudmFsdWUgPSBNYXRoLnJvdW5kKGRhdGEqMTAwIC8gdG90YWwudmFsdWUpO1xuICAgICAgICAgICAgICAgbm9tYnJlLnZhbHVlID0gZGF0YTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgZnVuY3Rpb24gc2VsZWN0ZWRQb2ludHMoKSB7XG4gICAgICAgICAgcmV0dXJuIHBvaW50cy52YWx1ZS5maWx0ZXIocG9pbnQgPT4ge1xuICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhwb2ludC5zZWxlY3RlZCk7XG4gICAgICAgICAgICByZXR1cm4gKHBvaW50LnNlbGVjdGVkKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfTtcblxuICAgICAgICBmdW5jdGlvbiBzZWFyY2hEYXRlQ3JlbmVhdShpZCkge1xuICAgICAgICAgICAgICAgIGRhdGFDcmVuZWF1LnBvaW50ID0gaWQ7XG4gICAgICAgICAgICAgICAgZGF0YUNyZW5lYXUuZGlzdGFuY2UgPSAncmVzZXQnO1xuICAgICAgICAgICAgICAgIGRhdGFDcmVuZWF1LmRhdGUgPSBmb3JtYXREYXRlKGRhdGUudmFsdWUpO1xuICAgICAgICAgICAgICBidXMuZW1pdCgnY3JlbmVhdS10b1VwZGF0ZScsIGRhdGFDcmVuZWF1KTtcbiAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJMYSBkYXRlIGEgw6l0w6kgc8OpbGVjdGlvbm7DqWUgOlwiLCBmb3JtYXREYXRlKGRhdGUudmFsdWUpKTtcblxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gZm9ybWF0RGF0ZShkYXRlVG9Gb3JtYXQpe1xuICAgICAgIC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AgICAgICAgICBjb25zb2xlLmxvZygnc2VsZWN0ZWQnICsgc2VsZWN0ZWQpO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEVudm95ZXIgbGVzIG1vZGlmaWNhdGlvbnMgw6AgbCdBUEkgU3ltZm9ueVxuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNwb25zZSA9IGF3YWl0IGZldGNoKGAvYXBpL3BvaW50cy9jcmVuZWF1L3VwZGF0ZS9gLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQVVQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBzZWxlY3RlZFxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLm9rKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyZXVyIHLDqXNlYXUgdXBkYXRlIGNlcmVuYXUgOlwiLCBhd2FpdCByZXNwb25zZS50ZXh0KCkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycmV1ciByw6lzZWF1IHVwZGF0ZSBjZXJlbmF1XCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHNlbmRUZWwgPSBhc3luYyhwb2ludCwgdGVsKSA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKCdwb2ludGlkJytwb2ludC5pZClcbiAgICAgICAgICAgICAgICBpZih0ZWwubGVuZ3RoID09IDcpe3RlbCA9ICcwJyArIHRlbDt9XG4gICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oJ3RlbDonK3RlbCwgJ19ibGFuaycpLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgLyoqL1xuICAgICAgICAgICAgICAgIGNvbnN0IHJlc3BvbnNlID0gYXdhaXQgZmV0Y2goJy9hcGkvdGVsLycrcG9pbnQuaWQrJy9zZW5kJywge1xuICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAvL21lc3NhZ2V1cj0gYXdhaXQgcmVzcG9uc2UuanNvbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qgc2VuZFNNUyA9IGFzeW5jKHBvaW50LCB0ZWwpID0+IHtcbiAgICAgICAgICAgICAgICBpZih0ZWwubGVuZ3RoID09IDcpe3RlbCA9ICcwJyArIHRlbDt9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgbWVzc2FnZVNNUy52YWx1ZSA9IG1lc3NhZ2VTTVMudmFsdWUucmVwbGFjZShcIk5PTVwiLCBwb2ludC5jaXZpbGl0ZSsnICcrcG9pbnQubm9tKTtcbiAgICAgICAgICAgICAgICBtZXNzYWdlU01TLnZhbHVlID0gbWVzc2FnZVNNUy52YWx1ZS5yZXBsYWNlKFwiQURSRVNTRVwiLCBwb2ludC5udW1lcm9SdWUrJyAnK3BvaW50LnRpdHJlUnVlKycgJytwb2ludC5ub21SdWUrJyAnK3BvaW50LmNvZGVQb3N0YWwrJyAnK3BvaW50LnZpbGxlKTtcbiAgICAgICAgICAgICAgICB3aW5kb3cub3Blbignc21zOicrdGVsKyc/Ym9keT0nK21lc3NhZ2VTTVMudmFsdWUsICdfYmxhbmsnKS5mb2N1cygpO1xuICAgICAgICAgICAgICAgIC8qKi9cbiAgICAgICAgICAgICAgICBjb25zdCByZXNwb25zZSA9IGF3YWl0IGZldGNoKCcvYXBpL3Ntcy8nK3BvaW50LmlkKycvc2VuZCcsIHtcbiAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAvLyBtZXNzYWdldXI9IGF3YWl0IHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHNlbmRFbWFpbCA9IGFzeW5jKGlkKSA9PiB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHJlc3BvbnNlID0gYXdhaXQgZmV0Y2goJy9hcGkvbWFpbC8nK2lkKycvbWFpbHNlbmQnLCB7XG4gICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCByZXNwb25zZS5qc29uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXNwb25zZS5vaykge21lc3NhZ2V1ci52YWx1ZSA9IFwiRXJyZXVyIGVudm9pIG1haWxcIjt9XG4gICAgICAgICAgICAgICAgICAgICAgZWxzZXtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2V1ci52YWx1ZSA9IGRhdGEuZGF0YVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZXVyLnZhbHVlID0gXCJFcnJldXIgcsOpc2VhdVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkVycmV1ciByw6lzZWF1XCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cblxuXG4gICAgICAgIGNvbnN0IHJvd0NsYXNzID0gKGRhdGEpID0+IHtcbiAgICAgICAgICByZXR1cm4geyAnY3VzdG9tLWZyb3plbi1yb3cnOiBkYXRhLmZyb3plbiB9O1xuICAgICAgICB9O1xuXG4vL2xlcyBwb2ludHMgc8OpbGVjdGlvbm7DqXNcblxuLy9FVkVOVCBJTlRFUkZBQ0UgIFxuICAgICAgICBjb25zdCBMb2NrID0gKGV2ZW50KSA9PiB7ICAgICAgXG4gICAgICAgICAgICBsZXQgcG9pbnRJbmRleCA9IC0xOyAgICAgIFxuICAgICAgICAgICAgbG9ja2VkUG9pbnRzLnZhbHVlID0gW107XG4gICAgICAgICAgICBwb2ludEluZGV4ID0gZmlsdGVyZWRQb2ludHMudmFsdWUuZmluZEluZGV4KHAgPT4gcC5pZCA9PT0gZXZlbnQuZGF0YS5pZCk7XG4gICAgICAgICAgICBpZihwb2ludEluZGV4ICE9IC0xKXtcbiAgICAgICAgICAgICAgICAvL2xvY2tlZFBvaW50cy52YWx1ZSA9IFtsb2NrZWRQb2ludHMudmFsdWUuZmlsdGVyKHAgPT4gcC5pZCAhPT0gZXZlbnQuZGF0YS5pZCldOyAgXG4gICAgICAgICAgICAgICAgZmlsdGVyZWRQb2ludHMudmFsdWVbcG9pbnRJbmRleF0uZnJvemVuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBmcm96ZW5Qb2ludHMudmFsdWUucHVzaChldmVudC5kYXRhKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcG9pbnRJbmRleCA9IGZyb3plblBvaW50cy52YWx1ZS5maW5kSW5kZXgocCA9PiBwLmlkID09PSBldmVudC5kYXRhLmlkKTtcbiAgICAgICAgICAgIC8vZXhwYW5kZWRSb3dzVGFiLnZhbHVlID0gW107XG4gICAgICAgICAgICAvL2V4cGFuZGVkUm93c1RhYi52YWx1ZS5wdXNoKGZyb3plblBvaW50cy52YWx1ZVtwb2ludEluZGV4XSk7XG4gICAgICAgICAgICBcblxuICAgICAgICAgICAgZmlsdGVyZWRQb2ludHMudmFsdWUuc29ydCgodmFsMSwgdmFsMikgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiB2YWwxLmlkIDwgdmFsMi5pZCA/IC0xIDogMTtcbiAgICAgICAgICAgIH0pOyAgICAgICAgICAgIFxuICAgICAgICB9O1xuICAgICAgICBjb25zdCBEZXNlbGVjdEFsbCA9ICgpID0+IHtcbiAgICAgICAgICAgIGZpbHRlcmVkUG9pbnRzLnZhbHVlLmZpbHRlcihwID0+IHAubG9ja2VkID09IHRydWUpLmZvckVhY2goKGVsZW1lbnQpID0+IGVsZW1lbnQudmFsdWUubG9ja2VkID0gZmFsc2UpO1xuICAgICAgICAgICAgZnJvemVuUG9pbnRzLnZhbHVlID0gW107XG5cbiAgICAgICAgfTtcbiAgICAgICAgY29uc3Qgb25Sb3dFeHBhbmQgPSAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKCdkZXBsb3knICsgZXZlbnQuaW5kZXggKyAnaWQnICsgZXZlbnQuZGF0YS5pZClcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgXG4gICAgICAgICAgICBsZXQgcG9pbnRJbmRleCA9IGZpbHRlcmVkUG9pbnRzLnZhbHVlLmZpbmRJbmRleChwID0+IHAuaWQgPT09IGV2ZW50LmRhdGEuaWQpO1xuICAgICAgICAgICAgY29uc29sZS5sb2coJ3BvaW50SW5kZXgnK3BvaW50SW5kZXgpO1xuICAgICAgICAgICAgLy9cbiAgICAgICAgICAgIHBvaW50SW5kZXggPSBsb2NrZWRQb2ludHMudmFsdWUuZmluZEluZGV4KHAgPT4gcC5pZCA9PT0gZXZlbnQuZGF0YS5pZCk7XG4gICAgICAgICAgICBpZihwb2ludEluZGV4ID09IC0xKXsgICAgICAgICAgICBcbiAgICAgICAgICAgIExvY2soZXZlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGNvbnN0IG9uUm93U2VsZWN0ID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIC8qXG4gICAgICAgICAgICBjb25zb2xlLmxvZygnc2VsZWN0JylcbiAgICAgICAgICAgIGlmKCFldmVudC5kYXRhLmZyb3plbil7XG4gICAgICAgICAgICAgICAgZXZlbnQuZGF0YS5mcm96ZW4gPSB0cnVlO1xuICAgICAgICAgICAgICAgIGZyb3plblBvaW50cy52YWx1ZS5wdXNoKGV2ZW50LmRhdGEpO1xuICAgICAgICAgICAgICAgIGxvY2tlZFBvaW50cy52YWx1ZS5wdXNoKGV2ZW50LmRhdGEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgKi9cbiAgICAgICAgfTtcblxuICAgICAgICBjb25zdCBvblJvd1Vuc2VsZWN0ID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIC8qXG4gICAgICAgICAgICBjb25zb2xlLmxvZygndW5zZWxlY3RlcicpXG4gICAgICAgICAgICBldmVudC5kYXRhLmZyb3plbiA9IGZhbHNlO1xuICAgICAgICAgICAgZnJvemVuUG9pbnRzLnZhbHVlID0gZnJvemVuUG9pbnRzLnZhbHVlLmZpbHRlcigoYywgaSkgPT4gaSAhPT0gZXZlbnQuaW5kZXgpO1xuICAgICAgICAgICAgbG9ja2VkUG9pbnRzLnZhbHVlID0gbG9ja2VkUG9pbnRzLnZhbHVlLmZpbHRlcihwb2ludCA9PiBwb2ludC5pZCAhPT0gZXZlbnQuZGF0YS5pZCk7XG4gICAgICAgICAgICAqL1xuICAgICAgICAgICAgLy9leHBhbmRlZFJvd3NUYWIudmFsdWUgPSBleHBhbmRlZFJvd3NUYWIudmFsdWUuZmlsdGVyKChjLCBpKSA9PiBpID09IGV2ZW50LmluZGV4KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IG9uUm93Q29sbGFwc2UgPSAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgICAvL2V2ZW50LmRhdGEuZnJvemVuLmZhbHNlID0gdHJ1ZTtcbiAgICAgICAgICAgICAvL2Zyb3plblBvaW50cy52YWx1ZSA9IGZyb3plblBvaW50cy52YWx1ZS5maWx0ZXIoKGMsIGkpID0+IGkgIT09IGV2ZW50LmluZGV4KTtcbiAgICAgICAgfTtcbiAgICAgICAgY29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FwidG9waWNcIiwgXCIvY2FydGVcIik7XG4gICAgICAgICAgICAgICAgICAgICAgZXZlbnRTb3VyY2UgPSBuZXcgRXZlbnRTb3VyY2UodXJsKTtcbiAgICAgICAgICAgICAgICAgICAgICBldmVudFNvdXJjZS5vbm1lc3NhZ2UgPSBoYW5kbGVNZXJjdXJlTWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICBldmVudFNvdXJjZS5hZGRFdmVudExpc3RlbmVyKCdjYXJ0ZScsIGhhbmRsZU1lcmN1cmVNZXNzYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgICBldmVudFNvdXJjZS5vbmVycm9yID0gKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycmV1ciBFdmVudFNvdXJjZTpcIiwgZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgbW9pcy52YWx1ZSA9IHByb3BzLnBhcmFtLm1vaXM7XG4gICAgICAgICAgICAgICAgICAgIHRvdGFsLnZhbHVlID0gcHJvcHMucGFyYW0udG90YWw7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0RGF0ZS52YWx1ZSA9IHByb3BzLnBhcmFtLnN0YXJ0RGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgbm9tYnJlLnZhbHVlID0gcHJvcHMucGFyYW0ubm9tYnJlO1xuICAgICAgICAgICAgICAgICAgICB0b3RhbC52YWx1ZSA9IHByb3BzLnBhcmFtLnRvdGFsO1xuICAgICAgICAgICAgICAgICAgICBwb3VyY2VudC52YWx1ZSA9IE1hdGgucm91bmQocHJvcHMucGFyYW0ubm9tYnJlKjEwMCAvIHByb3BzLnBhcmFtLnRvdGFsKTtcbiAgICAgICAgICAgICAgICAgICAgY2x1c3RlcklELnZhbHVlID0gcHJvcHMucGFyYW0uY2x1c3RlcklkO1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlU01TLnZhbHVlID0gcHJvcHMucGFyYW0ubWVzc2FnZVNNUztcbiAgICAgICAgICAgICAgICAgICAgZXRhdHMudmFsdWUgPSBwcm9wcy5wYXJhbS5ldGF0cztcblxuICAgICAgICAgICAgICAgICAgICAvL2V0YXRzLnZhbHVlID0gRXRhdFNlcnZpY2UuZ2V0RGF0YSgpO1xuICAgICAgICAgICAgICAgICAgICBldGF0cy52YWx1ZS5mb3JFYWNoKChlbGVtZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBDb2xvcnMudmFsdWVbZWxlbWVudC5pZF0gPSBlbGVtZW50LmNvdWxldXI7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBidXMub24oJ2NsdXN0ZXItc2VsZWN0ZWQnLCB1cGRhdGVDbHVzdGVyKTtcbiAgICAgICAgICAgICAgICAgICAgZmV0Y2hQb2ludHMoY2x1c3RlcklELnZhbHVlKTtcblxuICAgICAgICB9KTtcblxuICAgICAgICBsZXQgZXZlbnRTb3VyY2UgPSBudWxsO1xuXG4gICAgICAgIG9uVW5tb3VudGVkKCgpID0+IHtcblxuICAgICAgICAgICAgYnVzLm9mZignY2x1c3Rlci1zZWxlY3RlZCcsIHVwZGF0ZUNsdXN0ZXIpO1xuXG4gICAgICAgICAgICBpZiAoZXZlbnRTb3VyY2UpIHtcbiAgICAgICAgICAgICAgICBldmVudFNvdXJjZS5jbG9zZSgpO1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiTWVyY3VyZSBFdmVudFNvdXJjZSBjbG9zZWQuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuXG4gICAgICAgIC8vIG9uQmVmb3JlVW5tb3VudCBlc3QgYXBwZWzDqSBqdXN0ZSBhdmFudCBxdWUgbGUgY29tcG9zYW50IG5lIHNvaXQgcmV0aXLDqSBkdSBET00uXG4gICAgICAgIG9uQmVmb3JlVW5tb3VudCgoKSA9PiB7XG4gICAgICAgICAgYnVzLm9m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gICAgICAgPHRlbXBsYXRlICNib2R5PVwieyBkYXRhIH1cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIHt7IGRhdGEuY2l2aWxpdGUgfX0ge3sgZGF0YS5ub20gfX1cbiAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlICNoZWFkZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8SW5wdXRUZXh0IHYtbW9kZWw9XCJzZWFyY2hOb21cIiB0eXBlPVwidGV4dFwiIHBsYWNlaG9sZGVyPVwiTm9tXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICA8L0NvbHVtbj4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgPENvbHVtbiBmaWVsZD1cIm51bWVyb0NsaWVudFwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgICNib2R5PVwieyBkYXRhIH1cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIHt7IGRhdGEubnVtZXJvQ2xpZW50IH19XG4gICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAjaGVhZGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgPElucHV0VGV4dCB2LW1vZGVsPVwic2VhcmNoTnVtZXJvQ2xpZW50XCIgdHlwZT1cInRleHRcIiBwbGFjZWhvbGRlcj1cIk7CsCBjbGllbnRcIiAvPlxuICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvQ29sdW1uPiBcbiAgICAgICAgICAgICAgICA8Q29sdW1uIGZpZWxzPVwidGVsXCIgc3R5bGU9XCJtaW4td2lkdGg6IDEycmVtXCI+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAjYm9keT1cInsgZGF0YSB9XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICB7eyBkYXRhLnRlbDEgfX1cbiAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlICNoZWFkZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8SW5wdXRUZXh0IHYtbW9kZWw9XCJzZWFyY2hUZWxcIiB0eXBlPVwidGV4dFwiIHBsYWNlaG9sZGVyPVwiVGVsIDFcIiAvPlxuICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvQ29sdW1uPlxuICAgICAgICAgICAgICAgIDxDb2x1bW4gZmllbGQ9XCJudW1lcm9QaHlzaXF1ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgICNib2R5PVwieyBkYXRhIH1cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIHt7IGRhdGEubnVtZXJvUGh5c2lxdWUgfX1cbiAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlICNoZWFkZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8SW5wdXRUZXh0IHYtbW9kZWw9XCJzZWFyY2hOdW1lcm9QaHlzaXF1ZVwiIHR5cGU9XCJ0ZXh0XCIgcGxhY2Vob2xkZXI9XCJOwrAgcGh5c2lxdWVcIiAvPlxuICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvQ29sdW1uPlxuICAgICAgICAgICAgICAgIDxDb2x1bW4gIGZpZWxkPVwiZXRhdFwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgI2JvZHk9XCJ7IGRhdGEgfVwiPlxuICAgICAgICAgICAgICAgICAgICA8c3BhbiB2LWlmPVwiZGF0YS5ldGF0ICYmIGRhdGEuZXRhdC5pZFwiIDpzdHlsZT1cInsgXG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6ICcycHggOHB4JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogJzFweCBzb2xpZCAjY2NjJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlclJhZGl1czogJzRweCcsXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJzE2MHB4JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiAnI2ZmZicsIC8qIENvdWxldXIgZGUgdGV4dGUgYmxhbmNoZSBwb3VyIHVuIG1laWxsZXVyIGNvbnRyYXN0ZSAqL1xuICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiBDb2xvcnNbZGF0YS5ldGF0LmlkXSBcbiAgICAgICAgICAgICAgICAgICAgfVwiPlxuICAgICAgICAgICAgICAgICAgICB7eyBkYXRhLmV0YXQubm9tIH19PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgI2hlYWRlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgaWQ9XCJldGF0LWZpbHRlclwiIHYtbW9kZWw9XCJzZWFyY2hFdGF0XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cIlRvdXNcIj5Ub3VzPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2LWZvcj1cImV0YXQgaW4gZXRhdHNcIiA6a2V5PVwiZXRhdFwiIDp2YWx1ZT1cImV0YXQuaWRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgZXRhdC5ub20gfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L29wdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PlxuICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvQ29sdW1uPlxuICAgICAgICAgICAgICAgIDxDb2x1bW4gZmllbGQ9XCJsaWJlbGxlQ29tcHRldXJcIiBzdHlsZT1cIm1pbi13aWR0aDogMTAwcHg7XCI+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAgI2JvZHk9XCJ7IGRhdGEgfVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAge3sgZGF0YS5saWJlbGxlQ29tcHRldXIgfX1cbiAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlICNoZWFkZXI+XG4gICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgaWQ9XCJsaWJlbGxlLWZpbHRlclwiIHYtbW9kZWw9XCJzZWFyY2hMaWJlbGxlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwiVG91c1wiPlRvdXRlcyBsZXMgbGliZWxsw6lzPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHYtZm9yPVwibGliZWxsZSBpbiBsaWJlbGxlc1wiIDprZXk9XCJsaWJlbGxlXCIgOnZhbHVlPVwibGliZWxsZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7IGxpYmVsbGUgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICA8L29wdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XG4gICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgPC9Db2x1bW4+XG4gICAgICAgICAgICAgICAgPENvbHVtbiBzdHlsZT1cIndpZHRoOiA0MHB4XCI+XG4gICAgICAgICAgICAgICAgPHRlbXBsYXRlICNib2R5PVwic2xvdFByb3BzXCI+XG4gICAgICAgICAgICAgICAgICAgIDxidXR0b24gaWNvbj1cInBpIHBpLXBlbmNpbFwiIHZhcmlhbnQ9XCJvdXRsaW5lZFwiIHJvdW5kZWQgY2xhc3M9XCJtci0yXCIgQGNsaWNrPVwiY2FydGVVcGRhdGUoc2xvdFByb3BzLmRhdGEuaWQpXCI+Q2FydGU8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvQ29sdW1uPlxuICAgICAgICAgICAgICAgIDxDb2x1bW4gc3R5bGU9XCJ3aWR0aDogNDBweFwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgI2JvZHk9XCJzbG90UHJvcHNcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gaWNvbj1cInBpIHBpLXBlbmNpbFwiIHZhcmlhbnQ9XCJvdXRsaW5lZFwiIHJvdW5kZWQgY2xhc3M9XCJtci0yXCIgQGNsaWNrPVwiZGlzdGFuY2VVcGRhdGUoc2xvdFByb3BzLmRhdGEuaWQsIDMwMClcIj4zMDBtPC9idXR0b24+XG4gICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgPC9Db2x1bW4+XG4gICAgICAgICAgICAgICAgPENvbHVtbiBmaWVsZD1cIm5vbVJ1ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgICNib2R5PVwieyBkYXRhIH1cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIHt7IGRhdGEubnVtZXJvUnVlIH19IHt7IGRhdGEudGl0cmVSdWUgIH19IHt7IGRhdGEubm9tUnVlIH19XG4gICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAjaGVhZGVyPlxuICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwibm9tUnVlLWZpbHRlclwiIHYtbW9kZWw9XCJzZWFyY2hOb21SdWVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCJUb3V0ZXNcIj5Ub3V0ZXMgbGVzIHJ1ZXM8L29wdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdi1mb3I9XCJydWUgaW4gcnVlc1wiIDprZXk9XCJydWVcIiA6dmFsdWU9XCJydWVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBydWUgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cbiAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICA8L0NvbHVtbj5cbiAgICAgICAgICAgICAgICA8Q29sdW1uIGZpZWxkPVwicXVhcnRpZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlICAjYm9keT1cInsgZGF0YSB9XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICB7eyBkYXRhLnF1YXJ0aWVyIH19XG4gICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAjaGVhZGVyPlxuICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwicXVhcnRpZXItZmlsdGVyXCIgdi1tb2RlbD1cInNlYXJjaFF1YXJ0aWVyXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwiVG91c1wiPlRvdXMgcXVhcnRpZXJzPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHYtZm9yPVwicXVhcnRpZXIgaW4gcXVhcnRpZXJzXCIgOmtleT1cInF1YXJ0aWVyXCIgOnZhbHVlPVwicXVhcnRpZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBxdWFydGllciB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PlxuICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvQ29sdW1uPlxuICAgICAgICAgICAgICAgIDxDb2x1bW4gZmllbGQ9XCJ2aWxsZVwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgICNib2R5PVwieyBkYXRhIH1cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIHt7IGRhdGEuY29kZVBvc3RhbCB9fSB7eyBkYXRhLnZpbGxlIH19XG4gICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAjaGVhZGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgPHNlbGVjdCBpZD1cInZpbGxlLWZpbHRlclwiIHYtbW9kZWw9XCJzZWFyY2hWaWxsZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCJUb3V0ZXNcIj5Ub3V0ZXMgdmlsbGVzPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2LWZvcj1cInZpbGxlIGluIHZpbGxlc1wiIDprZXk9XCJ2aWxsZVwiIDp2YWx1ZT1cInZpbGxlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7IHZpbGxlIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cbiAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICA8L0NvbHVtbj5cbiAgICAgICAgICAgICAgICA8Q29sdW1uIGZpZWxkPVwiZGF0ZVJWXCIgc3R5bGU9XCJtaW4td2lkdGg6IDE1MHB4XCI+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAjYm9keT1cInsgZGF0YSB9XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiB2LWlmPVwiZGF0YS5jcmVuZWF1XCI+e3sgZGF0YS5jcmVuZWF1LmRhdGUgfX0ge3sgZGF0YS5jcmVuZWF1LmNyZW5lYXVIb3JhaXJlLm5vbSB9fTxicj5BZ2VudCA6IHt7IGRhdGEuY3JlbmVhdS5hZ2VudC5ub20gfX08L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAjaGVhZGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgPHNlbGVjdCBpZD1cImRhdGVSVi1maWx0ZXJcIiB2LW1vZGVsPVwic2VhcmNoRGF0ZVJWXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cIlRvdXRlc1wiPlJWIC8gVG91dGVzIGRhdGVzPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2LWZvcj1cImRhdGVSViBpbiBkYXRlc1JWXCIgOmtleT1cImRhdGVSVlwiIDp2YWx1ZT1cImRhdGVSVlwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBkYXRlUlYgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L29wdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PlxuICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvQ29sdW1uPlxuICAgICAgICAgICAgICAgICA8Q29sdW1uIGhlYWRlcj1cIkVkaXRcIiBzdHlsZT1cIndpZHRoOiA1MHB4XCI+XG4gICAgICAgICAgICAgICAgPHRlbXBsYXRlICNib2R5PVwic2xvdFByb3BzXCI+XG4gICAgICAgICAgICAgICAgPEJ1dHRvbiBpY29uPVwicGkgcGktcGVuY2lsXCIgdmFyaWFudD1cIm91dGxpbmVkXCIgcm91bmRlZCBjbGFzcz1cIm1yLTJcIiBAY2xpY2s9XCJlZGl0UHJvZHVjdChzbG90UHJvcHMuZGF0YSlcIj5FZGl0PC9CdXR0b24+XG4gICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICA8L0NvbHVtbj5cbiAgICAgICAgICAgICAgICA8dGVtcGxhdGUgI2V4cGFuc2lvbj1cInNsb3RQcm9wc1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPHN0cm9uZz57eyBzbG90UHJvcHMuZGF0YS5ub20gfX08L3N0cm9uZz4mbmJzcDsmbmJzcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJpbmZvc1RhYnNcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImluZm9zVGFiXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPkNvbnRhY3RzPC9wPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGFibGUgIHN0eWxlPVwid2lkdGg6IDEwMCU7bWF4LXdpZHRoOiA0MDBweDtwYWRkaW5nOiAycHggIWltcG9ydGFudDtcIj48dGJvZHk+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHIgdi1pZj1cInNsb3RQcm9wcy5kYXRhLnRlbDEubGVuZ3RoID4gNlwiPjx0ZD48YnV0dG9uIGNsYXNzPVwiYnRuIGJ0bi1pbmZvXCIgQGNsaWNrPVwic2VuZFRlbChzbG90UHJvcHMuZGF0YSxzbG90UHJvcHMuZGF0YS50ZWwxKVwiPjxzcGFuIGNsYXNzPVwicGkgcGktcGhvbmVcIiBzdHlsZT1cImNvbG9yOiB3aGl0ZVwiPjwvc3Bhbj4mbmJzcDsmbmJzcDtUZWwge3sgc2xvdFByb3BzLmRhdGEudGVsMSB9fTwvYnV0dG9uPjwvdGQ+PC90cj5cbiAgICAgICAgICAgICAgICAgICAgICAgICA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bDEgfX08L2J1dHRvbj48L3RkPjwvdHI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHIgdi1pZj1cInNsb3RQcm9wcy5kYXRhLnRlbDIubGVuZ3RoID4gNlwiPjx0ZD48YnV0dG9uIGNsYXNzPVwiYnRuIGJ0bi1pbmZvXCIgQGNsaWNrPVwic2VuZFNNUyhzbG90UHJvcHMuZGF0YSxzbG90UHJvcHMuZGF0YS50ZWwyKVwiPjxzcGFuIGNsYXNzPVwicGkgcGktbW9iaWxlXCIgc3R5bGU9XCJjb2xvcjogd2hpdGVcIj48L3NwYW4+Jm5ic3A7Jm5ic3A7U01TIHt7IHNsb3RQcm9wcy5kYXRhLnRlbDIgfX08L2J1dHRvbj48L3RkPjwvdHI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+PHRkPjxidXR0b24gY2xhc3M9XCJidG4gYnRuLWluZm9cIj5XZWI8L2J1dHRvbj48L3RkPjwvdHI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3Rib2R5PjwvdGFibGU+PGJyPjxicj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbmZvc1RhYlwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cD5DcsOpbmVhdXg8L3A+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0YWJsZSBzdHlsZT1cIndpZHRoOiAyNTBweDtcIj48dGJvZHk+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+PHRkPjxidXR0b24gQGNsaWNrPVwiZGlzdGFuY2VVcGRhdGUoc2xvdFByb3BzLmRhdGEuaWQsIDUwKVwiIGNsYXNzPVwibWItMTBcIj41MCBtPC9idXR0b24+Jm5ic3A7Jm5ic3A7PGJ1dHRvbiBAY2xpY2s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NDAwcHg7cGFkZGluZzogMnB4ICFpbXBvcnRhbnQ7XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRib2R5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHIgdi1mb3I9XCJsb2cgaW4gc2xvdFByb3BzLmRhdGEubG9ncG9pbnRzXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPnt7IGxvZy5kYXRlY3JlYSB9fTwvdGQ+PHRkPnt7IGxvZy5hY3Rpb24ubm9tIH19PC90ZD48dGQ+e3sgbG9nLmNvbW1lbnRhaXJlIH19PC90ZD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90cj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3Rib2R5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90YWJsZT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbmZvc1RhYlwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cD5Db21tZW50YWlyZTwvcD48QnV0dG9uIGljb249XCJwaSBwaS1wZW5jaWxcIiB2YXJpYW50PVwib3V0bGluZWRcIiByb3VuZGVkIGNsYXNzPVwibXItMiB0b3AtcmlnaHRcIiBAY2xpY2s9XCJlZGl0UHJvZHVjdChzbG90UHJvcHMuZGF0YSlcIiAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgIHNsb3RQcm9wcy5kYXRhLmNvbW1lbnRhaXJlIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgP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AgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwiY29tcHRldXJBY2Nlc3NpYmxlXCIgdi1tb2RlbD1cInByb2R1Y3QuY29tcHRldXJBY2Nlc3NpYmxlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiA6dmFsdWU9XCJ0cnVlXCIgc3R5bGU9XCJiYWNrZ3JvdW5kLWNvbG9yOiBncmVlblwiPk91aTwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gOnZhbHVlPVwiZmFsc2VcIiBzdHlsZT1cImJhY2tncm91bmQtY29sb3I6IHJlZFwiPk5vbjwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XG4gICAgICAgICAgICAgICAgPC9kaXY+IFxuICAgICAgICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPVwiZXRhdFwiIGNsYXNzPVwiYmxvY2sgZm9udC1ib2xkIG1iLTZcIj5DaGFuZ2VyIGwnw6l0YXQ8L2xhYmVsPlxuICAgICAgICAgICAgICAgICAgICA8U2VsZWN0IHYtbW9kZWw9XCJwcm9kdWN0LmV0YXRcIiA6b3B0aW9ucz1cImV0YXRzXCIgb3B0aW9uTGFiZWw9XCJub21cIiAgOmluaXRpYWxWYWx1ZXM9XCJwcm9kdWN0LmV0YXQuaWRcIiBwbGFjZWhvbGRlcj1cIlNlbGVjdGlvbm5lciB1biDDqXRhdFwiIHJlcXVpcmVkPVwidHJ1ZVwiIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+ICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGZvcj1cImNpdmlsaXRlXCIgY2xhc3M9XCJibG9jayBmb250LWJvbGQgbWItNlwiPkNpdmlsaXTDqTwv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ldCc7XG4gICAgICAgIHZhciBkYXRlICA9ICcnO1xuICAgICAgICBjb25zdCB0YWJ2YWx1ZSA9IHJlZignMCcpO1xuICAgICAgICBjb25zdCBjaGVja2VkID0gcmVmKHRydWUpO1xuICAgICAgICBjb25zdCBjb3VudCA9IHJlZihmYWxzZSk7XG5cbiAgICAgICAgY29uc3QgcHJvcHMgPSBkZWZpbmVQcm9wcyh7XG4gICAgICAgICAgcGFyYW06ICB7XG4gICAgICAgICAgICB0eXBlOiBPYmplY3QsIFxuICAgICAgICAgICAgcmVxdWlyZWQ6IHRydWUgXG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgXG4gICAgICAgIHBhcmFtTGVhZmxldC52YWx1ZSA9IHByb3BzLnBhcmFtO1xuXG4gICAgICAgIGZ1bmN0aW9uIHVwZGF0ZUNyZW5lYXVzKGRhdGFDcmVuZWF1KXtcbiAgICAgICAgICAgIHBvaW50ID0gZGF0YUNyZW5lYXUucG9pbnQ7XG4gICAgICAgICAgICBkaXN0YW5jZSA9IGRhdGFDcmVuZWF1LmRpc3RhbmNlO1xuICAgICAgICAgICAgZGF0ZSAgPSBkYXRhQ3JlbmVhdS5kYXRlO1xuICAgICAgICAgICAgdGFidmFsdWUudmFsdWUgPSAnMSc7XG4gICAgICAgICAgICBmZXRjaENyZW5lYXVzKCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgZmV0Y2hDcmVuZWF1cyA9IGFzeW5jICgpID0+IHtcbiAgICAgICAgICAgIHNlYXJjaEFnZW50LnZhbHVlID0gJ1RvdXMnO1xuICAgICAgICAgICAgdHJ5IHtcblxuICAgICAgICAgICAgICAgIGNvbnN0IHJlc3BvbnNlID0gYXdhaXQgZmV0Y2goJy9hcGkvY3JlbmVhdXMvJytwcm9wcy5wYXJhbS5taXNzaW9uKycvMC8nICsgcG9pbnQgKyAnLycgKyBkaXN0YW5jZSArICcvJyArIGRhdGUpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCByZXNwb25zZS5qc29uKCk7XG4gICAgICAgICAgICAgICBpZihkYXRhLmxlbmd0aCA+IDMpe2NvdW50LnZhbHVlID0gZmFsc2U7fVxuICAgICAgICAgICAgICAgZWxzZXtjb3VudC52YWx1ZSA9IHRydWU7fVxuICAgICAgICAgICAgICAgICAgYWdlbnRzLnZhbHVlID0gZGF0YS5yZWR1Y2UoKGFjYywgaXRlbSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIGFjY1tpdGVtLmlkXSA9IGl0ZW07XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgICAgICAgICAgICAgfSwge30pO1xuICAgICAgICAgICAgICAgICBsb2FkaW5nLnZhbHVlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgIGNoZWNrZWQudmFsdWUgPSB0cnVlO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyZXVyIGxvcnMgZGUgbGEgcsOpY3Vww6lyYXRpb24gZGVzIHBvaW50czpcIiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICB0YWJ2YWx1ZS52YWx1ZSA9ICcxJztcbiAgICAgICAgICAgIGNoZWNrZWQudmFsdWUgPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgZmV0Y2hDcmVuZWF1ID0gYXN5bmMgKGRhdGEyKSA9PiB7XG4gICAgICAgICAgICBzZWFyY2hBZ2VudC52YWx1ZSAgPSAnVG91cyc7XG4gICAgICAgICAgICBsZXQgYWdlbnRfaWQgPSBkYXRhMjtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgZGF0ZS52YWx1ZT0nJztcbiAgICAgICAgICAgICAgICBzaG93Q29tcGxldGVkLnZhbHVlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVzcG9uc2UgPSBhd2FpdCBmZXRjaCgnL2FwaS9jcmVuZWF1cy8nK3BhcmFtLnZhbHVlLm1pc3Npb24rJy8nK2FnZW50X2lkKycvMC9yZXNldCcpOyAvLyBWb3RyZSBlbmRwb2ludCBBUEkgU3ltZm9ueVxuICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCByZXNwb25zZS5qc29uKCk7XG4gICAgICAgICAgICAgICAgLy9qZSByZW52b2llIGxlcyBhZ2VudHNcbiAgICAgICAgICAgICAgICAgIGFnZW50c19tYWoudmFsdWUgPSBkYXRhLnJlZHVjZSgoYWNjLCBpdGVtKSA9PiB7XG4gICAgICAgICAgICAgICAgICBhY2NbaXRlbS5pZF0gPSBpdGVtO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgICAgICAgICB9LCB7fSk7XG4gICAgICAgICAgICAgICAgYWdlbnRzLnZhbHVlWzBdPVtdO1xuICAgICAgICAgICAgICAgIGFnZW50cy52YWx1ZVthZ2VudF9pZF0gPSBhZ2VudHNfbWFqLnZhbHVlW2FnZW50X2lkXTtcbiAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJFcnJldXIgbG9ycyBkZSBsYSByw6ljdXDDqXJhdGlvbiBkZXMgcG9pbnRzOlwiLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHRhYnZhbHVlLnZhbHVlID0gJzEnO1xuICAgICAgICAgICAgY2hlY2tlZC52YWx1ZSA9IHRydWU7XG5cbiAgICAgICAgfTtcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlQ2FydGUoKXtcbiAgICAgICAgICAgIHRhYnZhbHVlLnZhbHVlID0gJzAnO1xuICAgICAgICAgICAgY2hlY2tlZC52YWx1ZSA9IHRydWU7XG4gICAgICAgIH1cblxuXG4gICAgICAgIGNvbnN0IGFnZW50c0ZpbHRlcmVkID0gY29tcHV0ZWQoKCkgPT4ge1xuICAgICAgICAgICAgLy8gU2kgb24gbidhIHBhcyBlbmNvcmUgZGUgZG9ubsOpZXMsIG9uIHJlbnZvaWUgdW4gdGFibGVhdSB2aWRlXG4gICAgICAgICAgICBpZiAoIWFnZW50cy52YWx1ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNlYXJjaEFnZW50LnZhbHVlICE9PSAnVG91cycpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnYWd0cycrYWdlbnRzLnZhbHVlW3NlYXJjaEFnZW50LnZhbHVlXS5ub20pO1xuICAgICAgICAgICAgICAgIGFnZW50czIudmFsdWUgPSBbXTtcbiAgICAgICAgICAgICAgICBhZ2VudHMyLnZhbHVlW3BhcnNlSW50KHNlYXJjaEFnZW50LnZhbHVlKV0gPSBhZ2VudHMudmFsdWVbcGFyc2VJbnQoc2VhcmNoQWdlbnQudmFsdWUpXTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYWdlbnRzMi52YWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge3JldHVybiBhZ2VudHMudmFsdWU7fVxuXG4gICAgICAgIH0pXG5cbiAgICAgICAgZnVuY3Rpb24gcmVzZXRDcmVuZWF1KCkge1xuICAgICAgICAgICAgcG9pbnQgPSAwO1xuICAgICAgICAgICAgZGlzdGFuY2UgPSAncmVzZXQnO1xuICAgICAgICAgICAgZGF0ZSAgPSAnJztcbiAgICAgICAgICAgIGZldGNoQ3JlbmVhdXMoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIHN0YXJ0RHJhZyhldnQsIGl0ZW0pIHtcbiAgICAgICAgICBldnQuZGF0YVRyYW5zZmVyLmRyb3BFZmZlY3QgPSAnbW92ZSdcbiAgICAgICAgICBldnQuZGF0YVRyYW5zZmVyLmVmZmVjdEFsbG93ZWQgP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BhcmFtPVwicGFyYW1MZWFmbGV0XCIgLz5cbiAgICAgICAgICAgICAgICA8L1RhYlBhbmVsPlxuICAgICAgICAgICAgICAgIDxUYWJQYW5lbCB2YWx1ZT1cIjFcIj4gICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJhZ2VudHNcIiBzdHlsZT1cImJvcmRlcjogMXB4IHNvbGlkIGJsYWNrO1wiIGNsYXNzPVwibS0wXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgdi1pZj1cImNvdW50XCI+IFBhcyBkZSBjcsOpbmVhdSB0cm91dsOpLiA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSAgdi1mb3I9XCJhZ2VudCBpbiBhZ2VudHNGaWx0ZXJlZFwiID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgdi1pZj1cIm51bGwgIT0gYWdlbnRcIiBjbGFzcz1cImFnZW50IGl0ZW0tYWdlbnRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiB2LWZvcj1cIihjcmVuZWF1LCBpbmRleCkgaW4gYWdlbnQuY3JlbmVhdXNcIiA6a2V5PVwiYWdlbnQuY3JlbmVhdXMuaWRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiB2LWlmPVwiYWdlbnQubm9tXCIgY2xhc3M9XCJhZ2VudC1ub21cIj57eyBhZ2VudC5ub20gfX08L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiB2LWlmPVwiTnVtYmVyLmlzSW50ZWdlcihpbmRleC80KVwiIGNsYXNzPVwiZGF0ZWNyZW5lYXVcIj57eyBjcmVuZWF1LmRhdGUgfX08L2Rpdj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgOmNsYXNzPVwiW2NyZW5lYXUuY29tcGxldCA/ICdwcm9kdWN0LWNhcmQgcHJvZHVjdC1jYXJkLWNvbXBsZXQnIDogJ3Byb2R1Y3QtY2FyZCcsIGNyZW5lYXUuY29tcGxldCA/ICdzaG93Q29tcGxldGVkJyA6ICcnXVwiIEBkcmFnc3RhcnQ9XCJzdGFydERyYWcoJGV2ZW50LCBjcmVuZWF1LmlkKVwiIGRyYWdnYWJsZT1cInRydWVcIiBjbGFzcz1cImVsLWRyYWdcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJwcm9kdWN0LWRldGFpbHNcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNyZW5lYXUtaWRlbnRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0YWJsZT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0Ym9keT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD48c3BhbiBjbGFzcz1cIm51bWJlckNpcmNsZVwiPjxzdHJvbmc+e3sgY3JlbmVhdS5pZCB9fTwvc3Ryb25nPjxzcGFuIDpjbGFzcz1cIltjcmVuZWF1LnRvdGFsID4gMCA/ICdudW1iZXJDaXJjbGUyIGdyZWVuJyA6ICdudW1iZXJDaXJjbGUyJ11cIj48c3Ryb25nPnt7IGNyZW5lYXUudG90YWwgfX08L3N0cm9uZz48L3NwYW4+PC9zcGFuPjwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgOmNsYXNzPVwiWydpdGVtLWFnZW50LWRhdGUnXVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHN0cm9uZz5MZSB7eyBjcmVuZWF1LmRhdGUgfX08YnI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBjcmVuZWF1LmNyZW5lYXVIb3JhaXJlLm5vbSB9fTwvc3Ryb25nPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiB2LWlmPVwiY3JlbmVhdS5wb2ludHMubGVuZ3RoICE9PSAwXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IHN0eWxlPVwicG9zaXRpb246cmVsYXRpdmVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPVwiamF2YXNjcmlwdDp2b2lkKDApXCIgY2xhc3M9XCJpbmZvXCI+SW5mb3M8c3BhbiBjbGFzcz1cImJsdWVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IHYtZm9yPVwicG9pbnQgaW4gY3JlbmVhdS5wb2ludHNcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIDxzdHJvbmc+e3twb2ludC5ub219fTwvc3Ryb25nPiA6IHt7cG9pbnQudGl0cmVSdWV9fSB7e3BvaW50Lm51bWVyb1J1ZX19IHt7cG9pbnQudGl0cmVSdWV9fSB7e3BvaW50Lm5vbVJ1ZX19IHt7cG9pbnQudmlsbGV9fSAoe3twb2ludC5pZH19KTxicj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj48L3NwYW4+PC9hPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiY3JlbmVhdS1kaXN0YW5jZVwiPjxzcGFuIHYtaWY9XCJjcmVuZWF1LmRpc3RhbmNlXCI+e3sgY3JlbmVhdS5kaXN0YW5jZSB9fW08L3NwYW4+PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPjwvdHI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGJvZHk+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGFibGU+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4g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GVhZGVyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeShldGF0cy52YWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IGF3YWl0IHJlc3BvbnNlLmpzb24oKTtcblxuICAgICAgICAgICAgICAgICAgICAgIGlmICghcmVzcG9uc2Uub2spIHttZXNzYWdldXIudmFsdWUgPSBcIkVycmV1ciBzYXV2ZWdhcmRlXCI7dG9hc3QuYWRkKHsgc2V2ZXJpdHk6ICdkYW5nZXInLCBzdW1tYXJ5OiAnSW5mbycsIGRldGFpbDogbWVzc2FnZXVyLnZhbHVlLCBsaWZlOiAzMDAwIH0pO31cbiAgICAgICAgICAgICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZXVyLnZhbHVlID0gXCJQYXJhbcOodHJlcyBlbnJlZ2lzdHLDqXNcIjtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZXVyLnZhbHVlID0gXCJFcnJldXIgcsOpc2VhdVwiO1xuICAgICAgICAgICAgICAgICAgICB0b2FzdC5hZGQoeyBzZXZlcml0eTogJ2RhbmdlcicsIHN1bW1hcnk6ICdJbmZvJywgZGV0YWlsOiBtZXNzYWdldXIudmFsdWUsIGxpZmU6IDMwMDAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiRXJyZXVyIHLDqXNlYXVcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgY29uc29sZS5sb2coXCJEb25uw6llcyDDoCBzYXV2ZWdhcmRlciA6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F0cztcbiAgICAgICAgfSk7XG5cbiAgICAgICAgbGV0IGV2ZW50U291cmNlID0gbnVsbDtcblxuICAgICAgICBvblVubW91bnRlZCgoKSA9PiB7XG4gICAgICAgICAgICBpZiAoZXZlbnRTb3VyY2UpIHtcbiAgICAgICAgICAgICAgICBldmVudFNvdXJjZS5jbG9zZSgpO1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiTWVyY3VyZSBFdmVudFNvdXJjZSBjbG9zZWQuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBvbkJlZm9yZVVubW91bnQoKCkgPT4ge1xuICAgICAgICAgIGlmIChldmVudFNvdXJjZSkge1xuICAgICAgICAgICAgZXZlbnRTb3VyY2UuY2xvc2UoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG48L3NjcmlwdD5cbjx0ZW1wbGF0ZT5cbjxUb2FzdCAvPlxuICAgICAgICA8ZGl2IGlkPVwicGFyYW1CdXR0b25cIj5cbiAgICAgICAgICAgICA8QnV0dG9uIGljb249XCJwaSBwaS1jb2dcIiBjbGFzcz1cIm1yLTIgdG9wLXJpZ2h0XCIgQGNsaWNrPVwiZWRpdFBhcmFtKClcIiAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPERpYWxvZyB2LW1vZGVsOnZpc2libGU9XCJwYXJhbURpYWxvZ1wiIDpzdHlsZT1cInsgd2lkdGg6ICc0NTBweCcgfVwiIGhlYWRlcj1cIlBhcmFtw6l0cmFnZVwiIDptb2RhbD1cInRydWVcIj5cbiAgICAgICAgPGRpdj57eyBtZXNzYWdldXIgfX08L2Rpdj5cbiAgICAgICAgICAgIDxmb3JtIEBzdWJtaXQucHJldmVudD1cInNvdW1ldHRyZUZvcm11bGFpcmVcIj5cbiAgICAgICAgICAgICAgPCEtLSAzLiBCb3VjbGUgZHluYW1pcXVlIHN1ciBsZSB0YWJsZWF1IC0tPlxuICAgICAgICAgICAgICA8ZGl2IFxuICAgICAgICAgICAgICAgIHYtZm9yPVwiKGV0YXQsIGluZGV4KSBpbiBldGF0c1wiIFxuICAgICAgICAgICAgICAgIDprZXk9XCJldGF0LmlkXCIgXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJmb3JtLWdyb3VwXCJcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxsYWJlbCA6Zm9yPVwiJ2V0YXQtJyArIGV0YXQuaWRcIj5JRCB7eyBldGF0LmlkIH19IDo8L2xhYmVsPlxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIDwhLS0gNC4gTGlhaXNvbiBiaWRpcmVjdGlvbm5lbGxlIGF2ZWMgdi1tb2RlbCAtLT5cbiAgICAgICAgICAgICAgICA8aW5wdXQgXG4gICAgICAgICAgICAgICAgICA6aWQ9XCInZXRhdC0nICsgZXRhdC5pZFwiXG4gICAgICAgICAgICAgICAgICB0eXBlPVwidGV4dFwiIFxuICAgICAgICAgICAgICAgICAgdi1tb2RlbD1cImV0YXQubm9tXCIgXG4gICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj1cIk5vbSBkZSBsJ8OpdGF0XCJcbiAgICAgICAgICAgICAgICAgIHJlcXVpcmVkXG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8c3BhbiB2LWlmPVwiIWV0YXQubm9tIHx8IGV0YXQubm9tLnRyaW0oKSA9PT0gJydcIiBjbGFzcz1cImVycm9yLW1zZ1wiPlxuICAgICAgICAgICAgICAgICAgICBSZXF1aXNcbiAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgPENvbG9yUGlja2VyIHYtbW9kZWw9XCJldGF0LmNvdWxldXJcIiA6aWQ9XCInY291bGV1ci0nICsgZXRhdC5pZFwiIHJlcXVpcmVkLz5cbiAgICAgICAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwic3VibWl0XCI+U2F1dmVnYXJkZXIgdG91dD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