Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_觅影20.20.final.DIY@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDop4XlvbEKLy8gQHZlcnNpb24gICAgICAyMC4yMC5maW5hbAovLyBAYXV0aG9yICAgICAgIChvy5jil6HLmG8pCi8vIEBkZXNjcmlwdGlvbiAg5pSv5oyB56e75Yqo56uv77yb5Yqg6YCf6Lez5bm/5ZGK77ybVklQIOinhumikeino+aekO+8m+aUr+aMgeiHquWKqOino+aekO+8m+makOiXj+inhumikeawtOWNsO+8m+W/q+aNt+i3s+i9rOaQnOe0oua6kO+8m+iHquWumuS5ieino+aekOWSjOaQnOe0oua6kO+8m+ixhueTo8K36YCJ5b2x6KeGIOWHgOWMlgovLyBAbmFtZXNwYWNlICAgIChvy5jil6HLmG8pCi8vIEBpY29uICAgICAgICAgaHR0cHM6Ly9wLnBzdGF0cC5jb20vb3JpZ2luL2ZlNjkwMDAwYzkxNDE5NTViYmFjCi8vIEBsaWNlbnNlICAgICAgR1BMIExpY2Vuc2UKLy8gQGluY2x1ZGUgICAgICAqCi8vIEBydW4tYXQgICAgICAgZG9jdW1lbnQtc3RhcnQKLy8gQGdyYW50ICAgICAgICBHTV9zZXRWYWx1ZQovLyBAZ3JhbnQgICAgICAgIEdNX2dldFZhbHVlCi8vIEBncmFudCAgICAgICAgR01fZGVsZXRlVmFsdWUKLy8gQGdyYW50ICAgICAgICB1bnNhZmVXaW5kb3cKLy8gPT0vVXNlclNjcmlwdD09CgohYXN5bmMgZnVuY3Rpb24oKSB7CiAgbGV0IF9NYXRoZmxvb3IgPSBNYXRoLmZsb29yLCBfTWF0aG1heCA9IE1hdGgubWF4OwogIGZ1bmN0aW9uIElzKG4pIHsKICAgIGxldCBlID0gMSA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMV0gPyBhcmd1bWV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ib290Y2RuLm5ldC9hamF4L2xpYnMiICsgbjsKICB9CiAgYXN5bmMgZnVuY3Rpb24gZmV0Y2hDZG5VcmwobiwgZSkgewogICAgbGV0IHQ7CiAgICBjb25zdCBpID0gL15cL1x3Ly50ZXN0KG4pOwogICAgaWYgKG4gPSBpID8gZ2V0Q2RuVXJsKG4pIDogbiwgIWUgJiYgaSkgewogICAgICBjb25zdCBlID0gbi5tYXRjaCgvLipcLyhbXlwvXSspXC8oW15cL10rKSQvKTsKICAgICAgdCA9IGVbMl07CiAgICB9IGVsc2UgdCA9IGUgJiYgZS5uYW1lIHx8IG47CiAgICBjb25zdCBvID0gR2xvYmFsU3RvcmUuZ2V0KHQpOwogICAgbGV0IGE7CiAgICByZXR1cm4gYSA9IG8gJiYgIjIwLjYuMTMiID09PSBvLnZlcnNpb24gPyBvLmRhdGEgOiBhd2FpdCB3aW5kb3cuZmV0Y2gobikudGhlbigoZnVuY3Rpb24obikgewogICAgICByZXR1cm4gbi50ZXh0KCk7CiAgICB9KSkudGhlbigoZnVuY3Rpb24obikgewogICAgICByZXR1cm4gR2xvYmFsU3RvcmUuc2V0KHQsIHsKICAgICAgICBkYXRhOiBuLAogICAgICAgIHZlcnNpb246IFZFUlNJT04KICAgICAgfSksIG47CiAgICB9KSksIGE7CiAgfQogIGFzeW5jIGZ1bmN0aW9uIGFkZEpzKHVybCwgb3B0cykgewogICAgY29uc3QgZGF0YSA9IGF3YWl0IGZldGNoQ2RuVXJsKHVybCwgb3B0cyk7CiAgICByZXR1cm4gZXZhbChkYXRhKTsKICB9CiAgYXN5bmMgZnVuY3Rpb24gYWRkQ3NzVXJsKG4pIHsKICAgIGFkZENzcyhhd2FpdCBmZXRjaENkblVybChuKSk7CiAgfQogIGZ1bmN0aW9uIGFkZENzcyhuKSB7CiAgICBsZXQgZTsKICAgIHJldHVybiAvXihodHRwfFwvKS8udGVzdChuKSA/IGFkZENzc1VybChuKSA6IChuID0gbi5yZXBsYWNlKC9cbitccyovZywgIiAi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mV0dXJuIG8oZG4sIG4pOwogICAgICBmb3IgKGxldCBlID0gMTsgZSA8IHQ7IGUrKykgZm9yIChsZXQgdCBpbiBhcmd1bWVudHNbZV0pIG5bdF0gPSBhcmd1bWVudHNbZV1bdF07CiAgICAgIHJldHVybiBuOwogICAgfQogICAgZnVuY3Rpb24gYShuLCBlKSB7CiAgICAgIGxldCB0ID0gbiAmJiAobi5tYXRjaGVzIHx8IG4ud2Via2l0TWF0Y2hlc1NlbGVjdG9yIHx8IG4ubXNNYXRjaGVzU2VsZWN0b3IpOwogICAgICByZXR1cm4gISF0ICYmICEhZSAmJiB0LmNhbGwobiwgZSk7CiAgICB9CiAgICBmdW5jdGlvbiByKG4pIHsKICAgICAgcmV0dXJuIG4gaW5zdGFuY2VvZiBsbjsKICAgIH0KICAgIGZ1bmN0aW9uIHMobikgewogICAgICByZXR1cm4gISFuICYmIG4gPT09IG4ud2luZG93OwogICAgfQogICAgZnVuY3Rpb24gbChuKSB7CiAgICAgIHJldHVybiAhIW4gJiYgOSA9PT0gbi5ub2RlVHlwZTsKICAgIH0KICAgIGZ1bmN0aW9uIGMobikgewogICAgICByZXR1cm4gISFuICYmIDEgPT09IG4ubm9kZVR5cGU7CiAgICB9CiAgICBmdW5jdGlvbiBkKG4pIHsKICAgICAgcmV0dXJuICJmdW5jdGlvbiIgPT0gdHlwZW9mIG47CiAgICB9CiAgICBmdW5jdGlvbiBwKG4pIHsKICAgICAgcmV0dXJuICJzdHJpbmciID09IHR5cGVvZiBuOwogICAgfQogICAgZnVuY3Rpb24gZihuKSB7CiAgICAgIHJldHVybiB2b2lkIDAgPT09IG47CiAgICB9CiAgICBmdW5jdGlvbiB1KG4pIHsKICAgICAgcmV0dXJuIG51bGwgPT09IG47CiAgICB9CiAgICBmdW5jdGlvbiBtKG4pIHsKICAgICAgcmV0dXJuICFpc05hTihwYXJzZUZsb2F0KG4pKSAmJiBpc0Zpbml0ZShuKTsKICAgIH0KICAgIGZ1bmN0aW9uIGgobikgewog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AgICAgaWYgKGMobikpIHsKICAgICAgICBsZXQgaSA9IEwuZ2V0Q29tcHV0ZWRTdHlsZShuLCBudWxsKTsKICAgICAgICByZXR1cm4gdCA/IGkuZ2V0UHJvcGVydHlWYWx1ZShlKSB8fCB2b2lkIDAgOiBpW2VdOwogICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiB3KG4sIGUpIHsKICAgICAgcmV0dXJuIHBhcnNlSW50KHgobiwgZSksIDEwKSB8fCAwOwogICAgfQogICAgZnVuY3Rpb24gXyhuKSB7CiAgICAgIHJldHVybiB1bi50ZXN0KG4pOwogICAgfQogICAgZnVuY3Rpb24gayhuLCBlKSB7CiAgICAgIGlmICh2b2lkIDAgPT09IGUgJiYgKGUgPSBfKG4pKSwgZSkgcmV0dXJuIG47CiAgICAgIGlmICghbW5bbl0pIHsKICAgICAgICBsZXQgZSA9IHQobiksIG8gPSAiIiArIGVbMF0udG9VcHBlckNhc2UoKSArIGUuc2xpY2UoMSk7CiAgICAgICAgaSgoZSArICIgIiArIGduLmpvaW4obyArICIgIikgKyBvKS5zcGxpdCgiICIpLCAoZnVuY3Rpb24oZSwgdCkgewogICAgICAgICAgaWYgKHQgaW4gaG4pIHJldHVybiBtbltuXSA9IHQsICExOwogICAgICAgIH0pKTsKICAgICAgfQogICAgICByZXR1cm4gbW5bbl07CiAgICB9CiAgICBmdW5jdGlvbiBTKG4sIGUsIHQpIHsKICAgICAgcmV0dXJuIHZvaWQgMCA9PT0gdCAmJiAodCA9IF8obikpLCB0IHx8IGJuW25dIHx8ICFtKGUpID8gZSA6IGUgKyAicHgiOwogICAgfQogICAgZnVuY3Rpb24gaihlLCBpKSB7CiAgICAgIGxldCBvID0gZS5kYXRhc2V0W2ldIHx8IGUuZGF0YXNldFt0KGkpXTsKICAgICAgcmV0dXJuIHZuLnRlc3QobykgPyBvIDogbihKU09OLnBhcnNlLCBvKTsKICAgIH0KICAgIGZ1bmN0aW9uIEkoZSwgaSwgbykgewogICAgICBvID0gbihKU09O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AgICAgIHJldHVybiB0LmlubmVySFRNTCA9IG4sIGRuKHQuY2hpbGROb2RlcykuZGV0YWNoKCkuZ2V0KCk7CiAgICB9CiAgICBmdW5jdGlvbiBOKG4sIGUsIHQsIG8sIGEpIHsKICAgICAgbyA/IG4uaW5zZXJ0QmVmb3JlKGUsIHQgPyBuLmZpcnN0Q2hpbGQgOiBudWxsKSA6IG4ucGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUoZSwgdCA/IG4gOiBuLm5leHRTaWJsaW5nKSwKICAgICAgYSAmJiBmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgbGV0IHQgPSBkbihuKTsKICAgICAgICB0LmZpbHRlcigic2NyaXB0IikuYWRkKHQuZmluZCgic2NyaXB0IikpLmVhY2goKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICAgIGlmIChUbi50ZXN0KHQudHlwZSkgJiYgRy5jb250YWlucyh0KSkgewogICAgICAgICAgICBsZXQgbiA9IEgoInNjcmlwdCIpOwogICAgICAgICAgICBuLnRleHQgPSB0LnRleHRDb250ZW50LnJlcGxhY2UoVW4sICIiKSwgaShxbiwgKGZ1bmN0aW9uKGUsIGkpIHsKICAgICAgICAgICAgICB0W2ldICYmIChuW2ldID0gdFtpXSk7CiAgICAgICAgICAgIH0pKSwgZS5oZWFkLmluc2VydEJlZm9yZShuLCBudWxsKSwgZS5oZWFkLnJlbW92ZUNoaWxkKG4pOwogICAgICAgICAgfQogICAgICAgIH0pKTsKICAgICAgfShlLCBuLm93bmVyRG9jdW1lbnQpOwogICAgfQogICAgZnVuY3Rpb24gUihuLCBlLCB0LCBvLCBhLCByLCBzLCBsKSB7CiAgICAgIHJldHVybiBpKG4sIChmdW5jdGlvbihuLCByKSB7CiAgICAgICAgaShkbihyKSwgKGZ1bmN0aW9uKG4sIHIpIHsKICAgICAgICAgIGkoZG4oZSksIChmdW5jdGlvbihlLCBpKSB7CiAgICAgICAgICAgIGxldCBzID0gdCA/IGkgOiByLCBsID0gdCA/IG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obikpIHsKICAgICAgICAgIGxldCBvID0gKHIodCkgPyB0WzBdIDogdCkgfHwgRjsKICAgICAgICAgIGlmIChpID0gL14jW1x3LV0qJC8udGVzdChuKSA/IG8uZ2V0RWxlbWVudEJ5SWQobi5zbGljZSgxKSkgOiAvPC4rPi8udGVzdChuKSA/IFYobikgOiBlKG4sIG8pLAogICAgICAgICAgIWkpIHJldHVybjsKICAgICAgICB9IGVsc2UgaWYgKGQobikpIHJldHVybiB0aGlzLnJlYWR5KG4pOwogICAgICAgIChpLm5vZGVUeXBlIHx8IGkgPT09IEwpICYmIChpID0gWyBpIF0pLCB0aGlzLmxlbmd0aCA9IGkubGVuZ3RoOwogICAgICAgIGZvciAobGV0IG4gPSAwLCBlID0gdGhpcy5sZW5ndGg7IG4gPCBlOyBuKyspIHRoaXNbbl0gPSBpW25dOwogICAgICB9CiAgICAgIHJldHVybiBuLnByb3RvdHlwZS5pbml0ID0gZnVuY3Rpb24oZSwgdCkgewogICAgICAgIHJldHVybiBuZXcgbihlLCB0KTsKICAgICAgfSwgbjsKICAgIH0oKSwgY24gPSBsbi5wcm90b3R5cGUsIGRuID0gY24uaW5pdDsKICAgIGRuLmZuID0gZG4ucHJvdG90eXBlID0gY24sIGNuLmxlbmd0aCA9IDAsIGNuLnNwbGljZSA9IGFuLCAiZnVuY3Rpb24iID09IHR5cGVvZiBTeW1ib2wgJiYgKGNuW1N5bWJvbC5pdGVyYXRvcl0gPSBLW1N5bWJvbC5pdGVyYXRvcl0pLAogICAgY24ubWFwID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZG4oUS5hcHBseShbXSwgbm4uY2FsbCh0aGlzLCAoZnVuY3Rpb24oZSwgdCkgewogICAgICAgIHJldHVybiBuLmNhbGwoZSwgdCwgZSk7CiAgICAgIH0pKSkpOwogICAgfSwgY24uc2xpY2UgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIHJldHVybiBkbih0bi5jYWxsKHRoaXMsIG4sIGUpKTsKICAgIH07Ci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7CiAgICAgIHJldHVybiB0aGlzLmVxKDApOwogICAgfSwgY24ubGFzdCA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gdGhpcy5lcSgtMSk7CiAgICB9LCBjbi5maWx0ZXIgPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gaChuKTsKICAgICAgcmV0dXJuIGRuKFouY2FsbCh0aGlzLCAoZnVuY3Rpb24obiwgdCkgewogICAgICAgIHJldHVybiBlLmNhbGwobiwgdCwgbik7CiAgICAgIH0pKSk7CiAgICB9OwogICAgbGV0IGZuID0gL1xTKy9nOwogICAgY24uaGFzQ2xhc3MgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiAhIW4gJiYgb24uY2FsbCh0aGlzLCAoZnVuY3Rpb24oZSkgewogICAgICAgIHJldHVybiBjKGUpICYmIGUuY2xhc3NMaXN0LmNvbnRhaW5zKG4pOwogICAgICB9KSk7CiAgICB9LCBjbi5yZW1vdmVBdHRyID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IGIobik7CiAgICAgIHJldHVybiB0aGlzLmVhY2goKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICBjKHQpICYmIGkoZSwgKGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgICAgIHQucmVtb3ZlQXR0cmlidXRlKGUpOwogICAgICAgIH0pKTsKICAgICAgfSkpOwogICAgfSwgY24uYXR0ciA9IGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgaWYgKG4pIHsKICAgICAgICBpZiAocChuKSkgewogICAgICAgICAgaWYgKDIgPiBhcmd1bWVudHMubGVuZ3RoKSB7CiAgICAgICAgICAgIGlmICghdGhpc1swXSB8fCAhYyh0aGlzWzBdKSkgcmV0dXJuOwogICAgICAgICAgICBsZXQgZSA9IHRoaXNbMF0uZ2V0QXR0cmlidXRlKG4pOwogICAgICAgICAgICByZXR1cm4gdShlKSA/IHZvaWQgMCA6IGU7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4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3ZWJraXQiLCAibW96IiwgIm1zIiBdLCBibiA9IHsKICAgICAgYW5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICEwLAogICAgICBjb2x1bW5Db3VudDogITAsCiAgICAgIGZsZXhHcm93OiAhMCwKICAgICAgZmxleFNocmluazogITAsCiAgICAgIGZvbnRXZWlnaHQ6ICEwLAogICAgICBncmlkQXJlYTogITAsCiAgICAgIGdyaWRDb2x1bW46ICEwLAogICAgICBncmlkQ29sdW1uRW5kOiAhMCwKICAgICAgZ3JpZENvbHVtblN0YXJ0OiAhMCwKICAgICAgZ3JpZFJvdzogITAsCiAgICAgIGdyaWRSb3dFbmQ6ICEwLAogICAgICBncmlkUm93U3RhcnQ6ICEwLAogICAgICBsaW5lSGVpZ2h0OiAhMCwKICAgICAgb3BhY2l0eTogITAsCiAgICAgIG9yZGVyOiAhMCwKICAgICAgb3JwaGFuczogITAsCiAgICAgIHdpZG93czogITAsCiAgICAgIHpJbmRleDogITAKICAgIH07CiAgICBjbi5jc3MgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIGlmIChwKG4pKSB7CiAgICAgICAgbGV0IHQgPSBfKG4pOwogICAgICAgIHJldHVybiBuID0gayhuLCB0KSwgMiA+IGFyZ3VtZW50cy5sZW5ndGggPyB0aGlzWzBdICYmIHgodGhpc1swXSwgbiwgdCkgOiBuID8gKGUgPSBTKG4sIGUsIHQpLAogICAgICAgIHRoaXMuZWFjaCgoZnVuY3Rpb24oaSwgbykgewogICAgICAgICAgYyhvKSAmJiAodCA/IG8uc3R5bGUuc2V0UHJvcGVydHkobiwgZSkgOiBvLnN0eWxlW25dID0gZSk7CiAgICAgICAgfSkpKSA6IHRoaXM7CiAgICAgIH0KICAgICAgZm9yIChsZXQgZSBpbiBuKSB0aGlzLmNzcyhlLCBuW2VdKTsKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9OwogICAgbGV0IHZuID0gL15ccyt8XHMrJC87CiAgICBjbi5kYXRhID0gZnVuY3Rpb24ob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ICAgIH0pKSwgaShbICJXaWR0aCIsICJIZWlnaHQiIF0sIChmdW5jdGlvbihuLCBlKSB7CiAgICAgIGxldCB0ID0gZS50b0xvd2VyQ2FzZSgpOwogICAgICBjblt0XSA9IGZ1bmN0aW9uKGkpIHsKICAgICAgICBpZiAoIXRoaXNbMF0pIHJldHVybiBmKGkpID8gdm9pZCAwIDogdGhpczsKICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBzKHRoaXNbMF0pID8gdGhpc1swXS5kb2N1bWVudC5kb2N1bWVudEVsZW1lbnRbImNsaWVudCIgKyBlXSA6IGwodGhpc1swXSkgPyAkKHRoaXNbMF0sIGUpIDogdGhpc1swXS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKVt0XSAtIEModGhpc1swXSwgIW4pOwogICAgICAgIGxldCBvID0gcGFyc2VJbnQoaSwgMTApOwogICAgICAgIHJldHVybiB0aGlzLmVhY2goKGZ1bmN0aW9uKGUsIGkpIHsKICAgICAgICAgIGlmIChjKGkpKSB7CiAgICAgICAgICAgIGxldCBlID0geChpLCAiYm94U2l6aW5nIik7CiAgICAgICAgICAgIGkuc3R5bGVbdF0gPSBTKHQsIG8gKyAoImJvcmRlci1ib3giID09PSBlID8gQyhpLCAhbikgOiAwKSk7CiAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICB9OwogICAgfSkpOwogICAgbGV0IHluID0ge307CiAgICBjbi50b2dnbGUgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiB0aGlzLmVhY2goKGZ1bmN0aW9uKGUsIHQpIHsKICAgICAgICBpZiAoYyh0KSkgewogICAgICAgICAgKGYobikgPyBBKHQpIDogbikgPyAodC5zdHlsZS5kaXNwbGF5ID0gdC5fX19jZCB8fCAiIiwgQSh0KSAmJiAodC5zdHlsZS5kaXNwbGF5ID0gZnVuY3Rpb24obikgewogICAgICAgICAgICBpZiAoeW5bbl0pIHJldHVybiB5bltuXTsKICAgICAgICAgICAgbGV0IGUgPSBIKG4pOwogICAgICAgICAgICBGLmJvZHkuaW5zZXJ0QmVmb3JlKGUsIG51bGwpOwogICAgICAgICAgICBsZXQgdCA9IHgoZSwgImRpc3BsYXkiKTsKICAgICAgICAgICAgcmV0dXJuIEYuYm9keS5yZW1vdmVDaGlsZChlKSwgeW5bbl0gPSAibm9uZSIgPT09IHQgPyAiYmxvY2siIDogdDsKICAgICAgICAgIH0odC50YWdOYW1lKSkpIDogKHQuX19fY2QgPSB4KHQsICJkaXNwbGF5IiksIHQuc3R5bGUuZGlzcGxheSA9ICJub25lIik7CiAgICAgICAgfQogICAgICB9KSk7CiAgICB9LCBjbi5oaWRlID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLnRvZ2dsZSghMSk7CiAgICB9LCBjbi5zaG93ID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLnRvZ2dsZSghMCk7CiAgICB9OwogICAgbGV0IHhuID0gIl9fX2NlIiwgd24gPSAiLiIsIF9uID0gewogICAgICBmb2N1czogImZvY3VzaW4iLAogICAgICBibHVyOiAiZm9jdXNvdXQiCiAgICB9LCBrbiA9IHsKICAgICAgbW91c2VlbnRlcjogIm1vdXNlb3ZlciIsCiAgICAgIG1vdXNlbGVhdmU6ICJtb3VzZW91dCIKICAgIH07CiAgICBjbi5vZmYgPSBmdW5jdGlvbihuLCBlLCB0KSB7CiAgICAgIGxldCBvID0gdGhpczsKICAgICAgaWYgKGYobikpIHRoaXMuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgIChjKGUpIHx8IGwoZSkgfHwgcyhlKSkgJiYgUChlKTsKICAgICAgfSkpOyBlbHNlIGlmIChwKG4pKSBkKGUpICYmICh0ID0gZSwgZSA9ICIiKSwgaShiKG4pLCAoZnVuY3Rpb24obiwgaSkgewogICAgICAgIGxldCBhID0gTShpKSwgciA9IGFbMF0sIGQgPSBhWzFdLCBwID0gVChyKTsKICAgICAgICBvLmVhY2goKGZ1bmN0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lUHJvcGFnYXRpb24oKSwgMSkpKSByZXR1cm47CiAgICAgICAgICAgICAgaWYgKHMubmFtZXNwYWNlICYmICFVKGYsIHMubmFtZXNwYWNlLnNwbGl0KHduKSkpIHJldHVybjsKICAgICAgICAgICAgICBsZXQgbCA9IGk7CiAgICAgICAgICAgICAgaWYgKGUpIHsKICAgICAgICAgICAgICAgIGxldCBuID0gcy50YXJnZXQ7CiAgICAgICAgICAgICAgICBmb3IgKDshYShuLCBlKTsgKSB7CiAgICAgICAgICAgICAgICAgIGlmIChuID09PSBpKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIGlmIChuID0gbi5wYXJlbnROb2RlLCAhbikgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbCA9IG4sIHMuX19fY2QgPSAhMDsKICAgICAgICAgICAgICB9IGVsc2UgaWYgKGcgJiYgcy5fX19vdCA9PT0gcCAmJiBpICE9PSBzLnRhcmdldCAmJiBpLmNvbnRhaW5zKHMudGFyZ2V0KSkgcmV0dXJuOwogICAgICAgICAgICAgIHMuX19fY2QgJiYgT2JqZWN0LmRlZmluZVByb3BlcnR5KHMsICJjdXJyZW50VGFyZ2V0IiwgewogICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiAhMCwKICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pLCBPYmplY3QuZGVmaW5lUHJvcGVydHkocywgImRhdGEiLCB7CiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6ICEwLAogICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgbGV0IGMgPSBvLmNhbGwobCwgcywgcy5fX190ZCk7CiAgICAgICAgICAgICAgciAmJiBQ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l9fX290ID0gdDsKICAgICAgfQogICAgICBuLl9fX3RkID0gZTsKICAgICAgbGV0IHQgPSBuLl9fX290IGluIF9uOwogICAgICByZXR1cm4gdGhpcy5lYWNoKChmdW5jdGlvbihlLCBpKSB7CiAgICAgICAgdCAmJiBkKGlbbi5fX19vdF0pICYmIChpWyJfX19pIiArIG4uX19fb3RdID0gITAsIGlbbi5fX19vdF0oKSksIGkuZGlzcGF0Y2hFdmVudChuKTsKICAgICAgfSkpOwogICAgfTsKICAgIGxldCBTbiA9IC8lMjAvZywgam4gPSAvXHI/XG4vZywgSW4gPSAvcmFkaW98Y2hlY2tib3gvaTsKICAgIGNuLnNlcmlhbGl6ZSA9IGZ1bmN0aW9uKCkgewogICAgICBsZXQgbiA9ICIiOwogICAgICByZXR1cm4gdGhpcy5lYWNoKChmdW5jdGlvbihlLCB0KSB7CiAgICAgICAgaSh0LmVsZW1lbnRzIHx8IFsgdCBdLCAoZnVuY3Rpb24oZSwgdCkgewogICAgICAgICAgaWYgKCEodC5kaXNhYmxlZCB8fCAhdC5uYW1lIHx8ICJGSUVMRFNFVCIgPT09IHQudGFnTmFtZSB8fCAvZmlsZXxyZXNldHxzdWJtaXR8YnV0dG9ufGltYWdlL2kudGVzdCh0LnR5cGUpIHx8IEluLnRlc3QodC50eXBlKSAmJiAhdC5jaGVja2VkKSkgewogICAgICAgICAgICBsZXQgZSA9IEUodCk7CiAgICAgICAgICAgIGlmICghZihlKSkgewogICAgICAgICAgICAgIGkoSihlKSA/IGUgOiBbIGUgXSwgKGZ1bmN0aW9uKGUsIGkpIHsKICAgICAgICAgICAgICAgIG4gKz0gZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICByZXR1cm4gIiYiICsgZW5jb2RlVVJJQ29tcG9uZW50KG4pICsgIj0iICsgZW5jb2RlVVJJQ29tcG9uZW50KGUucmVwbGFjZShqbiwgIlxyXG4iKSkucmVwbGFjZShTbiwgIisiKTsKICAgICAgICAgICAgICAgIH0odC5uYW1lLCBpKTsKICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9KSk7CiAgICAgIH0pKSwgbi5zbGljZSgxKTsKICAgIH0sIGNuLnZhbCA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyB0aGlzLmVhY2goKGZ1bmN0aW9uKGUsIHQpIHsKICAgICAgICBsZXQgbyA9IHQubXVsdGlwbGUgJiYgdC5vcHRpb25zOwogICAgICAgIGlmIChvIHx8IEluLnRlc3QodC50eXBlKSkgewogICAgICAgICAgbGV0IGUgPSBKKG4pID8gbm4uY2FsbChuLCBTdHJpbmcpIDogdShuKSA/IFtdIDogWyBuICsgIiIgXTsKICAgICAgICAgIG8gPyBpKHQub3B0aW9ucywgKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICAgICAgdC5zZWxlY3RlZCA9IDAgPD0gZS5pbmRleE9mKHQudmFsdWUpOwogICAgICAgICAgfSksICEwKSA6IHQuY2hlY2tlZCA9IDAgPD0gZS5pbmRleE9mKHQudmFsdWUpOwogICAgICAgIH0gZWxzZSB0LnZhbHVlID0gZihuKSB8fCB1KG4pID8gIiIgOiBuOwogICAgICB9KSkgOiB0aGlzWzBdICYmIEUodGhpc1swXSk7CiAgICB9LCBjbi5jbG9uZSA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gdGhpcy5tYXAoKGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgICByZXR1cm4gZS5jbG9uZU5vZGUoITApOwogICAgICB9KSk7CiAgICB9LCBjbi5kZXRhY2ggPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiBnKHRoaXMsIG4pLmVhY2goKGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgICBlLnBhcmVudE5vZGUgJiYgZS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKGUpOwogICAgICB9KSksIHRoaXM7CiAgICB9OwogICAgbGV0ICRuID0gL15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ICgiQk9EWSIgIT09IGUudGFnTmFtZSkgewogICAgICAgICAgbGV0IG4gPSBkbihlKTsKICAgICAgICAgIG4ucmVwbGFjZVdpdGgobi5jaGlsZHJlbigpKTsKICAgICAgICB9CiAgICAgIH0pKSwgdGhpczsKICAgIH0sIGNuLm9mZnNldCA9IGZ1bmN0aW9uKCkgewogICAgICBsZXQgbiA9IHRoaXNbMF07CiAgICAgIGlmIChuKSB7CiAgICAgICAgbGV0IGUgPSBuLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICB0b3A6IGUudG9wICsgTC5wYWdlWU9mZnNldCwKICAgICAgICAgIGxlZnQ6IGUubGVmdCArIEwucGFnZVhPZmZzZXQKICAgICAgICB9OwogICAgICB9CiAgICB9LCBjbi5vZmZzZXRQYXJlbnQgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIHRoaXMubWFwKChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgbGV0IHQgPSBlLm9mZnNldFBhcmVudDsKICAgICAgICBmb3IgKDt0ICYmICJzdGF0aWMiID09PSB4KHQsICJwb3NpdGlvbiIpOyApIHQgPSB0Lm9mZnNldFBhcmVudDsKICAgICAgICByZXR1cm4gdCB8fCBHOwogICAgICB9KSk7CiAgICB9LCBjbi5wb3NpdGlvbiA9IGZ1bmN0aW9uKCkgewogICAgICBsZXQgbiA9IHRoaXNbMF07CiAgICAgIGlmIChuKSB7CiAgICAgICAgbGV0IGUgPSAiZml4ZWQiID09PSB4KG4sICJwb3NpdGlvbiIpLCB0ID0gZSA/IG4uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkgOiB0aGlzLm9mZnNldCgpOwogICAgICAgIGlmICghZSkgewogICAgICAgICAgbGV0IGUgPSBuLm93bmVyRG9jdW1lbnQsIGkgPSBuLm9mZnNldFBhcmVudCB8fCBlLmRvY3VtZW50RWxlbWVudDsKICAgICAgICAgIGZvciAoOyhpID09PSBlLmJvZHkgfHwgaSA9PT0gZS5kb2N1bWVudEVsZW1lbnQpICYmICJzdGF0aWMiID09PSB4KGksICJwb3NpdGlvbiIpOyApIGkgPSBpLnBhcmVudE5vZGU7CiAgICAgICAgICBpZiAoaSAhPT0gbiAmJiBjKGkpKSB7CiAgICAgICAgICAgIGxldCBuID0gZG4oaSkub2Zmc2V0KCk7CiAgICAgICAgICAgIHQudG9wIC09IG4udG9wICsgdyhpLCAiYm9yZGVyVG9wV2lkdGgiKSwgdC5sZWZ0IC09IG4ubGVmdCArIHcoaSwgImJvcmRlckxlZnRXaWR0aCIpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gewogICAgICAgICAgdG9wOiB0LnRvcCAtIHcobiwgIm1hcmdpblRvcCIpLAogICAgICAgICAgbGVmdDogdC5sZWZ0IC0gdyhuLCAibWFyZ2luTGVmdCIpCiAgICAgICAgfTsKICAgICAgfQogICAgfSwgY24uY2hpbGRyZW4gPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiBnKGRuKHkodih0aGlzLCAoZnVuY3Rpb24obikgewogICAgICAgIHJldHVybiBuLmNoaWxkcmVuOwogICAgICB9KSkpKSwgbik7CiAgICB9LCBjbi5jb250ZW50cyA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gZG4oeSh2KHRoaXMsIChmdW5jdGlvbihuKSB7CiAgICAgICAgcmV0dXJuICJJRlJBTUUiID09PSBuLnRhZ05hbWUgPyBbIG4uY29udGVudERvY3VtZW50IF0gOiAiVEVNUExBVEUiID09PSBuLnRhZ05hbWUgPyBuLmNvbnRlbnQuY2hpbGROb2RlcyA6IG4uY2hpbGROb2RlczsKICAgICAgfSkpKSk7CiAgICB9LCBjbi5maW5kID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZG4oeSh2KHRoaXMsIChmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGUobiwgdCk7CiAgICAgIH0pKSkpOwogICAgfTsKICAgIGxldCBVbiA9IC9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gPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gaChuKTsKICAgICAgcmV0dXJuIG9uLmNhbGwodGhpcywgKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICByZXR1cm4gZS5jYWxsKG4sIHQsIG4pOwogICAgICB9KSk7CiAgICB9LCBjbi5uZXh0ID0gZnVuY3Rpb24obiwgZSwgdCkgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgIm5leHRFbGVtZW50U2libGluZyIsIGUsIHQpKSksIG4pOwogICAgfSwgY24ubmV4dEFsbCA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIHRoaXMubmV4dChuLCAhMCk7CiAgICB9LCBjbi5uZXh0VW50aWwgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIHJldHVybiB0aGlzLm5leHQoZSwgITAsIG4pOwogICAgfSwgY24ubm90ID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IGgobik7CiAgICAgIHJldHVybiB0aGlzLmZpbHRlcigoZnVuY3Rpb24odCwgaSkgewogICAgICAgIHJldHVybiAoIXAobikgfHwgYyhpKSkgJiYgIWUuY2FsbChpLCB0LCBpKTsKICAgICAgfSkpOwogICAgfSwgY24ucGFyZW50ID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgInBhcmVudE5vZGUiKSkpLCBuKTsKICAgIH0sIGNuLmluZGV4ID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IG4gPyBkbihuKVswXSA6IHRoaXNbMF0sIHQgPSBuID8gdGhpcyA6IGRuKGUpLnBhcmVudCgpLmNoaWxkcmVuKCk7CiAgICAgIHJldHVybiBZLmNhbGwodCwgZSk7CiAgICB9LCBjbi5jbG9zZXN0ID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IHRoaXMuZmlsdGVyKG4pOwogICAgICBpZiAoZS5sZW5ndGgpIHJldHVybiBlOwogICAgICBsZXQgdCA9IHRoaXMucGFyZW50KCk7CiAgICAgIHJldHVybiB0Lmxlbmd0aCA/IHQuY2xvc2VzdChuKSA6IGU7CiAgICB9LCBjbi5wYXJlbnRzID0gZnVuY3Rpb24obiwgZSkgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgInBhcmVudEVsZW1lbnQiLCAhMCwgZSkpKSwgbik7CiAgICB9LCBjbi5wYXJlbnRzVW50aWwgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIHJldHVybiB0aGlzLnBhcmVudHMoZSwgbik7CiAgICB9LCBjbi5wcmV2ID0gZnVuY3Rpb24obiwgZSwgdCkgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgInByZXZpb3VzRWxlbWVudFNpYmxpbmciLCBlLCB0KSkpLCBuKTsKICAgIH0sIGNuLnByZXZBbGwgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiB0aGlzLnByZXYobiwgITApOwogICAgfSwgY24ucHJldlVudGlsID0gZnVuY3Rpb24obiwgZSkgewogICAgICByZXR1cm4gdGhpcy5wcmV2KGUsICEwLCBuKTsKICAgIH0sIGNuLnNpYmxpbmdzID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgKGZ1bmN0aW9uKG4pIHsKICAgICAgICByZXR1cm4gZG4obikucGFyZW50KCkuY2hpbGRyZW4oKS5ub3Qobik7CiAgICAgIH0pKSkpLCBuKTsKICAgIH0sIGRuOwogIH0KICBmdW5jdGlvbiB3YWl0VG9SdW4obiwgZSkgewogICAgbGV0IHQgPSAyIDwgYXJndW1lbnRzLmxlbmd0aCAmJiB2b2lkIDAgIT09IGFyZ3VtZW50c1syXSA/IGFyZ3VtZW50c1syXSA6IDA7CiAgICBjb25zdCBpID0gbiBpbnN0YW5jZW9mIEZ1bmN0aW9uID8gbigpIDogMCA8ICQobikubGVuZ3RoOwogICAgcmV0dXJuIGkgPyB2b2lkIChlIGluc3RhbmNlb2YgRnVuY3Rpb24gJiYgZShpKSkgOiB2b2lkICgx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pLmFkZENsYXNzKCJpcy1jb2xsYXBzZSIpKSA6ICF0ICYmICQoaSkuaGFzQ2xhc3MoIm8tLWNvbGxhcHNlIikgJiYgJChpKS5hZGRDbGFzcygiaXMtY29sbGFwc2UiKTsKICAgIH0pKSwgJChuKS5wYXJlbnQoKS5hZGRDbGFzcygiby0tY29sbGFwc2UtYm94IiksICQoIi5vLS1jb2xsYXBzZSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICQodGhpcykucGFyZW50KCkudG9nZ2xlQ2xhc3MoImlzLW9wZW4iKTsKICAgIH0pKTsKICB9CiAgZnVuY3Rpb24gZml4TTN1OFBsYXlpbmcoKSB7CiAgICBmdW5jdGlvbiBuKG4pIHsKICAgICAgbi5mcm9tID0gSHJlZiwgbi5vcmlnaW4gPSBIcmVmLCBuLnVybCA9IGksIGlzTm90VG9wICYmIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoT2JqZWN0LmFzc2lnbih7fSwgbiwgewogICAgICAgIF9pZDogTUVTU0FHRV9JRCwKICAgICAgICBhY3Rpb246ICJsb2ciLAogICAgICAgIHBhcmVudDogITAKICAgICAgfSksICIqIik7CiAgICB9CiAgICBjb25zdCBlID0gRGF0ZS5ub3coKTsKICAgIGxldCB0LCBpOwogICAgY29uc3QgbyA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgY29uc3QgYSA9IERhdGUubm93KCkgLSBlOwogICAgICBpID0gIiIsIHQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJ2aWRlb1tzcmNdIiksIHQgJiYgKGkgPSB0LnNyYyksIC8oXC5tM3U4fFwvbTN1OHBsYXkpW15cL10qJC8udGVzdChpKSA/IChjbGVhckludGVydmFsKG8pLAogICAgICBzZXRUaW1lb3V0KChhc3luYyBmdW5jdGlvbigpIHsKICAgICAgICBpZiAoMCA9PT0gdC5yZWFkeVN0YXRlKSB7CiAgICAgICAgICBsZXQgZS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Sk7CiAgICAgICAgICB9KSwgNjApOwogICAgICAgIH0pKTsKICAgICAgICBjb25zdCBuID0gJCgidmlkZW8gc291cmNlW3NyY10iKS5lcSgwKS5hdHRyKCJzcmMiKSB8fCAkKCJ2aWRlb1tzcmNdIikuZXEoMCkuYXR0cigic3JjIikgfHwgIiI7CiAgICAgICAgcmV0dXJuIG4gJiYgJCgidmlkZW8sIGF1ZGlvIikucmVtb3ZlKCksIC9eXC9bXlwvXS8udGVzdChuKSAmJiAobiA9IGxvY2F0aW9uLm9yaWdpbiArIG4pLAogICAgICAgIHZvaWQgKGlzVmFsaWRWaWRlb1VybChuKSA/IHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoewogICAgICAgICAgcGFnZUluZm86IHBhZ2VJbmZvLAogICAgICAgICAgdXNlZFRpbWU6IHQsCiAgICAgICAgICBfaWQ6IE1FU1NBR0VfSUQsCiAgICAgICAgICBhY3Rpb246ICJwbGF5LnZpZGVvIiwKICAgICAgICAgIGZyb206IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICBvcmlnaW46IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICB1cmw6IG4udHJpbSgpLAogICAgICAgICAgcGFyZW50OiAhMAogICAgICAgIH0sICIqIikgOiAvXmJsb2I6Ly50ZXN0KG4pID8gd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSh7CiAgICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgICB1c2VkVGltZTogdCwKICAgICAgICAgIF9pZDogTUVTU0FHRV9JRCwKICAgICAgICAgIGFjdGlvbjogInNuaWZmLmJsb2IiLAogICAgICAgICAgZnJvbTogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIG9yaWdpbjogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIHVybDogbiwKICAgICAgICAgIHBhcmVudDogITAKICAgICAgICB9LCAiKiIpIDogd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSh7CiAgICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgICB1c2VkVGltZTogdCwKICAgICAgICAgIHRleHQ6ICJOT1QgTUFUQ0ggVklERU8gVVJMIiwKICAgICAgICAgIF9pZDogTUVTU0FHRV9JRCwKICAgICAgICAgIGFjdGlvbjogImxvZyIsCiAgICAgICAgICBmcm9tOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgdXJsOiBuLAogICAgICAgICAgcGFyZW50OiAhMAogICAgICAgIH0sICIqIikpOwogICAgICB9CiAgICAgIGNvbnN0IGkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJpZnJhbWVbc3JjXSIpOwogICAgICBpZiAoaSkgewogICAgICAgIGNvbnN0IG4gPSBpLnNjciwgZSA9IGRlY29kZVVSSUNvbXBvbmVudChuKS5tYXRjaCgvPShodHRwW14mPV0rXC4obTN1OHxtcDQpKS8pOwogICAgICAgICgvZHBsYXllci8udGVzdChuKSB8fCBpc1ZpZGVvVXJsUmVnZXgudGVzdChuKSkgJiYgd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSh7CiAgICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgICB1c2VkVGltZTogdCwKICAgICAgICAgIHRleHQ6ICJpZnJhbWUgcGxheWVyIHVybCIsCiAgICAgICAgICBfaWQ6IE1FU1NBR0VfSUQsCiAgICAgICAgICBhY3Rpb246ICJsb2ciLAogICAgICAgICAgZnJvbTogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIG9yaWdpbjogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIHVybDogZSA/IGVbMV0gOiBuLAogICAgICAgICAgaXNNYXRjaDogZSAmJiBpc1ZhbGlkVmlkZW9VcmwoZVsxXSksCiAgICAgICAgICBwYXJlbnQ6ICEwCiAgICAgICAgfSwgIioiKSwgZSAmJiBpc1ZhbGlkVmlkZW9VcmwoZVsxXSkgJiYgKCQoImlmcmFtZSIpLnJlbW92ZSgpLCB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKHsKICAgICAgICAgIHBhZ2VJbmZvOiBwYWdlSW5mbywKICAgICAgICAgIHVzZWRUaW1lOiB0LAogICAgICAgICAgX2lkOiBNRVNTQUdFX0lELAogICAgICAgICAgYWN0aW9uOiAicGxheS52aWRlbyIsCiAgICAgICAgICBmcm9tOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgdXJsOiBlWzFdLnRyaW0oKSwKICAgICAgICAgIHBhcmVudDogITAKICAgICAgICB9LCAiKiIpKTsKICAgICAgfQogICAgICBpZiAoNGUzIDw9IHQgJiYgaSkgcmV0dXJuIHZvaWQgY2xlYXJJbnRlcnZhbChlKTsKICAgICAgY29uc3QgbyA9IDAgPCAkKCJ2aWRlbyIpLmxlbmd0aDsKICAgICAgKHQgPj0gM2U0IHx8IDJlMyA8PSB0ICYmIG8pICYmIChjbGVhckludGVydmFsKGUpLCB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKHsKICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgdXNlZFRpbWU6IHQsCiAgICAgICAgaGFzVmlkZW86IG8sCiAgICAgICAgaGFzSWZyYW1lOiAhIWksCiAgICAgICAgX2lkOiBNRVNTQUdFX0lELAogICAgICAgIGFjdGlvbjogInNuaWZmLmZhaWwiLAogICAgICAgIGZyb206IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgIHBhcmVudDogITAKICAgICAgfSwgIioiKSk7CiAgICB9KSwgMTAwKTsKICB9CiAgbGV0IEhyZWYgPSBsb2NhdGlvbi5ocmVmOwogIGlmIChJcygvY29va2llLmh0bWwvKSB8fCBJcygvbVwubGVcLmNvbS8pICYmIElzTm90KC9tLmxlLmNvbVwvc2VhcmNofHNvLmxlLmNvbVwvc3xcLmx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sIC50dy1wbGF5LXRpdGxlIiwKICAgICAgZml4VXJsOiBuID0+IG4ucmVwbGFjZSgvXC5odG1sLiovLCAiLmh0bWwiKS5yZXBsYWNlKCJ0dy4iLCAid3d3LiIpLAogICAgICBqcygpIHsKICAgICAgICBsZXQgbiA9IFtdLCBlID0gKCQoJ1tuYW1lPSJhcHBsZS1pdHVuZXMtYXBwIl0nKS5hdHRyKCJjb250ZW50IikgfHwgIiIpLm1hdGNoKC9haWQ9XGR7Mix9Lyk7CiAgICAgICAgaWYgKGUpIHsKICAgICAgICAgIGZldGNoKCJodHRwczovL3Bjdy1hcGkuaXFpeWkuY29tL2FsYnVtcy9hbGJ1bS9hdmxpc3RpbmZvP3BhZ2U9MSZzaXplPTk5OTkmIiArIGVbMF0pLnRoZW4oKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgcmV0dXJuIG4uanNvbigpOwogICAgICAgICAgfSkpLnRoZW4oKGZ1bmN0aW9uKGUpIHsKICAgICAgICAgICAgbiA9IGUuZGF0YS5lcHNvZGVsaXN0OwogICAgICAgICAgfSkpOwogICAgICAgICAgbGV0IHQgPSAwOwogICAgICAgICAgc2V0SW50ZXJ2YWwoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICBsZXQgZSA9ICsoJCgiLnF5LWVwaXNvZGUtbnVtIC5zZWxlY3QtaXRlbS5zZWxlY3RlZCAuc2VsZWN0LWxpbmsiKS50ZXh0KCkgfHwgMCk7CiAgICAgICAgICAgIGlmIChlICYmIGUgIT09IHQpIHsKICAgICAgICAgICAgICB0ID0gZTsKICAgICAgICAgICAgICBsZXQgaSA9IG5bdCAtIDFdOwogICAgICAgICAgICAgIGlmIChpKSB7CiAgICAgICAgICAgICAgICBsZXQgbiA9IGkucGxheVVybC5yZXBsYWNlKC9odHRwcz86LywgbG9jYXRpb24ucHJvdG9jb2wpOwogICAgICAgICAgICAgICAgaWYgKG4gIT09IG9vUGxheVVybCkgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gb29QbGF5VXJsIHx8IGxvY2F0aW9uLmhyZWY7CiAgICAgICAgICAgICAgICAgIG9vUGxheVVybCA9IG47CiAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSAoJCgiLnF5LWVwaXNvZGUtbnVtIC5zZWxlY3QtaXRlbS5zZWxlY3RlZCAuaWNvbi10ciBpbWciKS5hdHRyKCJzcmMiKSB8fCAiIikuaW5jbHVkZXMoIi1wcmUtIik7CiAgICAgICAgICAgICAgICAgIEUuZW1pdCgidXJsLmNoYW5nZSIsIHsKICAgICAgICAgICAgICAgICAgICBvbGRVcmw6IGUsCiAgICAgICAgICAgICAgICAgICAgbmV3VXJsOiBuLAogICAgICAgICAgICAgICAgICAgIGF1dG9QbGF5OiAhdAogICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pLCAyMDApOwogICAgICAgIH0KICAgICAgICBpZiAoaXNNb2JpbGUpIHJldHVybjsKICAgICAgICBsZXQgdCA9IDA7CiAgICAgICAgc2tpcEFkVmlkZW9XcmFwcGVyKChmdW5jdGlvbigpIHsKICAgICAgICAgIGlmICgwID09PSB0ICYmIDAgPCAkKCIuY3VwaWQtcHVibGljLXRpbWUiKS5sZW5ndGggJiYgIm5vbmUiICE9PSAkKCIuY3VwaWQtcHVibGljLXRpbWUiKS5jc3MoImRpc3BsYXkiKSkgewogICAgICAgICAgICBnZXRHbG9iYWwoIkRhdGUiKS5ub3cgPSBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICByZXR1cm4gKG5ldyB3aW5kb3cuRGF0ZSkuZ2V0VGltZSgpICsgKHQgKz0gMWU0KTsKICAgICAgICAgICAgfSwgc2V0SW50ZXJ2YWwoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHQgPSAwOwogICAgICAgICAgICB9KSwgNmU1KTsKICAgICAgICAgIH0KICAgICAgICAgIGNvbnN0IG4gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuaXFwLXBsYXllciB2aWRlbyIpOwogICAgICAgICAgaWYgKG4gJiYgIW4uaXNTa2lwICYmIDEgPCBuLnJlYWR5U3RhdGUgJiYgMCA8ICQoIi5ib3R0b20tcHVibGljIikubGVuZ3RoICYmICJub25lIiAhPT0gJCgiLmJvdHRvbS1wdWJsaWMiKS5jc3MoImRpc3BsYXkiKSkgewogICAgICAgICAgICBjb25zdCBuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLnNraXBwYWJsZS1hZnRlciIpOwogICAgICAgICAgICBuICYmICFuLmlzU2tpcENsaWNrICYmIChpc1NraXBDbGljayA9ICEwLCBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICBuLmNsaWNrKCksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgbi5pc1NraXBDbGljayA9ICExOwogICAgICAgICAgICAgIH0pLCAxZTMpOwogICAgICAgICAgICB9KSwgMWUzKSk7CiAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICB9CiAgICB9LAogICAgaGlkZTogJy5tLWlxeURvd24sIC5oZWFkZXItbG9naW4gKyBkaXYsIC5tLXZpZGVvLWFjdGlvbiwgZGl2W25hbWU9Im0tdmlwUmlnaHRzIl0sIGRpdltuYW1lPSJtLWV4dGVuZEJhciJdLCAubS1pcXlsaW5rLWRpdmVyc2lvbiwgLm0taXF5bGluay1ndWlkZSwgLmMtb3BlblZpcCwgLmMtc2NvcmUtYnRuLCAubS12aWRlb1VzZXItc3BhY2luZywgLm0tcHAtZW50cmFuY2UsIC5tLWhvdFdvcmRzLWJvdHRvbSwgZGl2W3RlbXBsYXRlLXR5cGU9IkFMQlVNIl0gLm0tcGxheWVyLXRpcCwgLmlxcC1ib3gtaW50ZWdyYWwsIC5idG4tdGlja2V0LCAuYnRuLXl1eXVlLCAuYnRuLWRvd25sb2FkLCAubS1pcXlEb3duLCAuaXFwLXBsYXllciBkaX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Bhbm5lbCIsCiAgICAgIGp1bXBUbzogWyAiLnN0dWktdm9kbGlzdF9fbWVkaWEgYSIsIC8uKnByb2plY3RcLyhcZCspLiovLCAiL3BsYXkvJDEtMS0xLmh0bWwiIF0sCiAgICAgIHJlc3VsdDogImgzLnRpdGxlIGEiCiAgICB9LAogICAgcGxheTogewogICAgICBtYXRjaDogL1wvcGxheS8sCiAgICAgIHRpdGxlOiAiaDEgYSIsCiAgICAgIGp1bXA6ICItLnBsYXlsaXN0IgogICAgfSwKICAgIGhpZGU6ICIuY29udGFpbmVyIH4gKltpZF0iCiAgfSwgewogICAgbmFtZTogIuWcqOe6v+S5i+WutiIsCiAgICBtYXRjaDogInp4emoubWUiLAogICAgc2VhcmNoOiB7CiAgICAgIG1hdGNoOiAvd2Q9LywKICAgICAganVtcDogIi5zdHVpLXBhbm5lbF9fZnQiLAogICAgICBqdW1wVG86IFsgIi5zdHVpLXZvZGxpc3QgYSIsIC8uKmRldGFpbFwvKFxkKykuKi8sICIvdmlkZW8vJDEtMS0xLmh0bWwiIF0sCiAgICAgIHJlc3VsdDogIi5zdHVpLXZvZGxpc3QgLnRpdGxlIGEiCiAgICB9LAogICAgcGxheTogewogICAgICBtYXRjaDogL1wvdmlkZW8vLAogICAgICB0aXRsZTogImgxIiwKICAgICAganVtcDogIi5zdHVpLXBsYXllciIKICAgIH0sCiAgICBoaWRlOiAnYm9keSA+IGRpdltjbGFzc149IkFEIl0sIGJvZHkgPiAqOm5vdChzY3JpcHQpICsgc2NyaXB0IH4gKltpZF0nCiAgfSwgewogICAgbmFtZTogIjkx576O5YmnIiwKICAgIG1hdGNoOiAiOTFtancuY29tIiwKICAgIHNlYXJjaDogewogICAgICBtYXRjaDogL3M9LywKICAgICAga2V5d29yZDogL3M9KC4rKS8sCiAgICAgIGp1bXA6ICIubGlzdC1jb250ZW50IHwgYXBwZW5kIiwKICAgICAgcmVzdWx0OiB7CiAgICAgICAgdGl0bGU6ICIubS1tb3ZpZXMgLnUtbW92aW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i5zdWJqZWN0LWludHJvIC5iZCBwIikuZ2V0KDApLmNsaWNrKCksICQoIi5zdWItY292ZXIiKS5hdHRyKCJocmVmIiwgIiMiKSwgJCgiI3N1YmplY3QtaG9ub3Itcm9vdCBhIikuYXR0cigiaHJlZiIsICIjIik7CiAgICAgIH0pLCAxZTMpOwogICAgICBsZXQgZSA9IDA7CiAgICAgIGNvbnN0IHQgPSBzZXRJbnRlcnZhbCgoZnVuY3Rpb24oKSB7CiAgICAgICAgJCgiYm9keSA+IGlucywgYm9keSA+IGlmcmFtZSwgLmFkc2J5Z29vZ2xlIikucmVtb3ZlKCksIDUgPCBlKysgJiYgY2xlYXJJbnRlcnZhbCh0KTsKICAgICAgfSksIDUwMCk7CiAgICAgICFmdW5jdGlvbiBuKCkgewogICAgICAgIGNvbnN0IGUgPSAkKCIjc3ViamVjdC1oZWFkZXItY29udGFpbmVyIikuYXR0cigic3R5bGUiKTsKICAgICAgICBpZiAoZSkgewogICAgICAgICAgY29uc3QgbiA9IGUubWF0Y2goLzpccyooW147XSspOz8vKVsxXSwgdCA9IG4ucmVwbGFjZSgiKSIsICIsIDApIik7CiAgICAgICAgICB0cnkgewogICAgICAgICAgICBhZGRDc3MoIi5zdWItY292ZXI6OmJlZm9yZSB7YmFja2dyb3VuZDogLXdlYmtpdC1saW5lYXItZ3JhZGllbnQoYm90dG9tLCAiICsgbiArICIgMCUsICIgKyB0ICsgIiA1JSksIC13ZWJraXQtbGluZWFyLWdyYWRpZW50KHJpZ2h0LCAiICsgbiArICIgMCUsICIgKyB0ICsgIiA1JSksLXdlYmtpdC1saW5lYXItZ3JhZGllbnQodG9wLCAiICsgbiArICIgMCUsICIgKyB0ICsgIiA1JSksIC13ZWJraXQtbGluZWFyLWdyYWRpZW50KGxlZnQsICIgKyBuICsgIiAwJSwgIiArIHQgKyAnIDUlKTtjb250ZW50OiAiIjtib3R0b206IDA7cG9zaXRpb246IGFic29sdXRlO2xlZnQ6IDA7cmlnaHQ6IDA7dG9wOi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biA6IG4uc3BsaXQoL1xzKixccyovKSkuZm9yRWFjaCgoZnVuY3Rpb24obikgewogICAgICAgICAgICBuID0gbi5zcGxpdCgvXHMqXHxccyovKSwgaW5zZXJ0U2VhcmNoQWRkb24odCwgblswXSwgblsxXSB8fCAiYWZ0ZXIiKTsKICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgIH0KICAgICAgZnVuY3Rpb24gZXhlY0FkZG9uSnMobikgewogICAgICAgIG4gJiYgbi5qcyBpbnN0YW5jZW9mIEZ1bmN0aW9uICYmIG4uanMoKTsKICAgICAgfQogICAgICBmdW5jdGlvbiBhZGRvbkdvKCkgewogICAgICAgIGNvbnN0IGFkZG9uID0gQURET05TLmZpbmQoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgIHJldHVybiAhbi5kaXNhYmxlICYmIElzKG4ubWF0Y2gpOwogICAgICAgIH0pKTsKICAgICAgICBpZiAoYWRkb24pIHsKICAgICAgICAgIGlmIChpc0ZpcnN0UnVuQWRkb24pIHsKICAgICAgICAgICAgbGV0IG4gPSBnZXRCYXNlU3R5bGUoKTsKICAgICAgICAgICAgYWRkb24uaGlkZSAmJiAobiArPSAiXG4iICsgYWRkb24uaGlkZSArICIgeyIgKyBQdXJpZnlTdHlsZSArICJ9IiksIGFkZG9uLmNzcyAmJiAobiArPSBhZGRvbi5jc3MpLAogICAgICAgICAgICBhZGRDc3Mobik7CiAgICAgICAgICB9CiAgICAgICAgICBfRCAmJiAkKCJvby1sb2dzIikubGVuZ3RoLCBfRCAmJiAkKCJvby1sb2dzIikubGVuZ3RoLCAkKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgbGV0IF9NYXRobWluID0gTWF0aC5taW47CiAgICAgICAgICAgIGNvbnN0IHBsYXlBZGRvbiA9IGFkZG9uLnBsYXk7CiAgICAgICAgICAgIGlmIChwbGF5QWRkb24gJiYgSXMocGxheUFkZG9uLm1hdGNoKSkgewogICAgICAgICAgICAgIGlmIChwbGF5QWRkb24udmlwICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tdmlwIikpIHsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZvcm1hdFBhc3NlZFRpbWUobikgewogICAgICAgICAgICAgICAgICByZXR1cm4gKChEYXRlLm5vdygpIC0gbikgLyAxZTMpLnRvRml4ZWQoMikgKyAicyI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiB1cGRhdGVRcmNvZGUoKSB7CiAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAwIDwgYXJndW1lbnRzLmxlbmd0aCAmJiB2b2lkIDAgIT09IGFyZ3VtZW50c1swXSA/IGFyZ3VtZW50c1swXSA6IEhyZWY7CiAgICAgICAgICAgICAgICAgIGlzTW9iaWxlIHx8ICghcXJjb2RlQ29kZSAmJiAocXJjb2RlQ29kZSA9IGF3YWl0IGZldGNoQ2RuVXJsKCIvcXJjb2RlLWdlbmVyYXRvci8xLjQuNC9xcmNvZGUubWluLmpzIikpLAogICAgICAgICAgICAgICAgICBldmFsKHFyY29kZUNvZGUpLCBxcmNvZGUgJiYgKFFSID0gcXJjb2RlKDAsICJMIiksIFFSLmFkZERhdGEodXJsKSwgUVIubWFrZSgpLCAkKCIuby0tcXJjb2RlLWJveCIpLnJlbW92ZUNsYXNzKCJvLS1oaWRlIiksCiAgICAgICAgICAgICAgICAgICQoIi5vLS1xcmNvZGUiKS5odG1sKFFSLmNyZWF0ZUltZ1RhZygpKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZml4VXJsKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG4ucmVwbGFjZSgvW1w/I10uKy9nLCAiIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBmaXhWaXBVcmwobikgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gQURET05TLmZpbmQoKGZ1bmN0aW9uKGUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gSXMoZS5tYXRjaCwgbikgJiYgZS5wbGF5ICYmIGUucGxheS5maXhVcmw7CiAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGUgPyAhMCA9PT0gZS5wbGF5LmZpeFVybCA/IGZpeFVybChuKSA6IGUucGxheS5maXhVcmwobikgOiBuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZ2V0VmlwVGFyZ2V0VXJsKCkgewogICAgICAgICAgICAgICAgICBpZiAob29QbGF5VXJsKSByZXR1cm4gb29QbGF5VXJsOwogICAgICAgICAgICAgICAgICBsZXQgbiA9IGxvY2F0aW9uLmhyZWYucmVwbGFjZSgvJj9cdys9aHR0cFteJl0rLywgIiIpLnJlcGxhY2UoLy4raHR0cC8sICJodHRwIik7CiAgICAgICAgICAgICAgICAgIHJldHVybiBuID0gZGVjb2RlVVJJKGZpeFZpcFVybChuKSB8fCBuKSwgbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNhblBsYXlJblBhZ2UobikgewogICAgICAgICAgICAgICAgICByZXR1cm4gIWlzT25seURvd25sb2FkVmlkZW9VcmxSZWdleC50ZXN0KG4pICYmICghL1wvXC92d2VjYW0udGMucXEuY29tLy50ZXN0KG4pIHx8IElzKCJ2LnFxLmNvbSIpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRvU2hvcnRWaWRlb1VybChuKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBuLm1hdGNoKHNob3J0VmlkZW9VcmxSZWdleCkgfHwgbi5tYXRjaChzaG9ydFZpZGVvVXJsTG9zZVJlZ2V4KTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGUgPyBlWzFdLnNwbGl0KCIuIikuc2xpY2UoLTIpLmpvaW4oIi4iKSArICIgLi4uICIgKyBlW2UubGVuZ3RoIC0gMl0uc2xpY2UoLTEwKSArICI8c3Bhbj4gLiAiICsgZVtlLmxlbmd0aCAtIDFdICsgIjwvc3Bhbj4iIDogbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZpeElmcmFtZVVybChuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBuLnJlcGxhY2UoL1wvP1w/LisvLCAiIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRJZnJhbWVJZChuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBpZnJhbWVzW2ZpeElmcmFtZVVybChuKV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRJZnJhbWUobikgewogICAgICAgICAgICAgICAgICByZXR1cm4gZnJhbWVzW2dldElmcmFtZUlkKG4pXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNldElmcmFtZShuLCBlKSB7CiAgICAgICAgICAgICAgICAgIGlmcmFtZXNbZml4SWZyYW1lVXJsKG4pXSA9IGU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBhZGRJZnJhbWUobikgewogICAgICAgICAgICAgICAgICBsZXQgZSA9IDEgPCBhcmd1bWVudHMubGVuZ3RoICYmIHZvaWQgMCAhPT0gYXJndW1lbnRzWzFdID8gYXJndW1lbnRzWzFdIDogIm9vLWlmcmFtZXMiOwogICAgICAgICAgICAgICAgICBjb25zdCB0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiaWZyYW1lIik7CiAgICAgICAgICAgICAgICAgIHJldHVybiB0LmlkID0gdXVpZCgpLCB0LmZyYW1lYm9yZGVyID0gIjAiLCB0LnNjcm9sbGluZyA9ICJubyIsIHQuc2VhbWxlc3MgPSAhMCwKICAgICAgICAgICAgICAgICAgdC5zYW5kYm94ID0gImFsbG93LXNjcmlwdHMgYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctZm9ybXMiLCBuICYmICh0LnNyYyA9IG4sIHNldElmcmFtZShuLCB0LmlkKSksCiAgICAgICAgICAgICAgICAgICQoZSkuYXBwZW5kKHQpLCB0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gcmVtb3ZlSWZyYW1lKCkgewogICAgICAgICAgICAgICAgICBsZXQgbiA9IDAgPCBhcmd1bWVudHMubGVuZ3RoICYmIHZvaWQgMCAhPT0gYXJndW1lbnRzWzBdID8gYXJndW1lbnRzWzBdIDogIm9vLWlmcmFtZXMgPiBpZnJhbWUiOwogICAgICAgICAgICAgICAgICBjb25zdCBlID0gJCgic3RyaW5nIiA9PSB0eXBlb2YgbiA/IG4uc3RhcnRzV2l0aCgib28taWZyYW1lcyIpID8gbiA6ICIjIiArIG4gOiBuLmlkID8gIiMiICsgbi5pZCA6IG4pLmdldCgwKTsKICAgICAgICAgICAgICAgICAgZSAmJiAoZS5zcmMgPSAiYWJvdXQ6YmxhbmsiLCAkKGUpLnJlbW92ZSgpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGVtcHR5SWZyYW1lcygpIHsKICAgICAgICAgICAgICAgICAgJCgib28taWZyYW1lcyA+IGlmcmFtZSIpLmVhY2goKGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUoZSk7CiAgICAgICAgICAgICAgICAgIH0pKSwgJCgib28taWZyYW1lcyIpLmVtcHR5KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRTbmlmZlRpbWUobikgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gc25pZmZUaW1lc1tmaXhJZnJhbWVVcmwobildOwogICAgICAgICAgICAgICAgICByZXR1cm4gZSA/IGZvcm1hdFBhc3NlZFRpbWUoZSkgOiAiMHMiOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmZTdGFydCgpIHsKICAgICAgICAgICAgICAgICAgaXNTbmlmZmluZyA9ICEwLCBpc0Vuc3VyZVBsYXlpbmdDaGVjayA9ICExLCBzbmlmZlRpbWVzdGFtcCA9IERhdGUubm93KCksIHNuaWZmVXJscyA9IFtdLAogICAgICAgICAgICAgICAgICBzbmlmZlVybHNLZXkgPSBbXSwgJCgiLm8tLXBsYXllciIpLmVtcHR5KCksICQoImh0bWwiKS5hZGRDbGFzcygiby0tc25pZmZpbmciKSwgJCgiLm8tLXZpcCIpLnJlbW92ZUNsYXNzKCJpcy1wbGF5LWluLXBhZ2UiKSwKICAgICAgICAgICAgICAgICAgYmxvYkNvdW50ID0gMCwgJCgiLm8tLXZpcC1pdGVtLmlzLWJsb2IiKS5yZW1vdmUoKSwgcHJvZ3Jlc3NJbnRlcnZhbCA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAkKCIuby0tc25pZmYtcHJvZ3Jlc3MiKS5jc3MoewogICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICskKCIuby0tc25pZmYtcHJvZ3Jlc3MiKS5jc3MoIndpZHRoIikucmVwbGFjZSgiJSIsICIiKSArIC4xICsgIiUiCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgIH0pLCAyMDApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmZEb25lKCkgewogICAgICAgICAgICAgICAgICBmb3JtYXRQYXNzZWRUaW1lKHNuaWZmU3RhcnRUaW1lKSwgaXNTbmlmZmluZyA9ICExLCBlbXB0eUlmcmFtZXMoKSwgJCgiLm8tLXNuaWZmLXByb2dyZXNzIikuY3NzKHsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogIjEwMCUiCiAgICAgICAgICAgICAgICAgIH0pLCBjbGVhckludGVydmFsKHByb2dyZXNzSW50ZXJ2YWwpLCAkKCIuby0tdmlwIikucmVtb3ZlQ2xhc3MoImlzLXNuaWZmaW5nIikuYWRkQ2xhc3MoImlzLXNuaWZmLWRvbmUiKSwKICAgICAgICAgICAgICAgICAgJCgiaHRtbCIpLnJlbW92ZUNsYXNzKCJvLS1zbmlmZmluZyIpLCAwIDwgc25pZmZVcmxzLmxlbmd0aCAmJiAwID09PSAkKCIuby0tc25pZmYtZG9uZSIpLmxlbmd0aCAmJiAkKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMiKS5sZW5ndGggJiYgJCgiLm8tLXZpcC1wbGF5IC5vLS1zb3VyY2VzIikuYXBwZW5kKCc8c3BhbiBjbGFzcz0iby0tc25pZmYtZG9uZSI+4pyUPC9zcGFuPicpLAogICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAkKCIuby0tc25pZmYtcHJvZ3Jlc3MiKS5jc3MoewogICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICIwIgogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICB9KSwgMWUzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNuaWZmU3VjY2VzcyhuLCBlKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSAobiA9IGRlY29kZVVSSUNvbXBvbmVudChuLnRyaW0oKSkucmVwbGFjZSgvXihodHRwOik/XC9cLy8sICJodHRwczovLyIpKS5yZXBsYWNlKC9cPy4rLywgIiIpOwogICAgICAgICAgICAgICAgICBpZiAoc25pZmZVcmxzS2V5LmluY2x1ZGVzKHQpKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIHNuaWZmVXJsc0tleS5wdXNoKHQpLCBzbmlmZlVybHMucHVzaChuKTsKICAgICAgICAgICAgICAgICAgY29uc3QgaSA9IHNuaWZmVXJscy5sZW5ndGgsIG8gPSBuLm1hdGNoKHZpZGVvRXh0UmVnZXgpLCBhID0gbyA/IG9bMV0gOiAidW5rbm93IjsKICAgICAgICAgICAgICAgICAgaWYgKCQoIi5vLS12aXAtcGxheSAuby0tc291cmNlcyIpLmFwcGVuZCgnPGEgX2hyZWY9IicgKyAoImJsb2IiID09PSBhID8gZSA6IG4pICsgJyIgY2xhc3M9ImlzLScgKyBhICsgJyI+57q/6LevJyArIGkgKyAiPC9hPiIpLAogICAgICAgICAgICAgICAgICAkKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMgYSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgbiA9ICQodGhpcykuYXR0cigiX2hyZWYiKTsKICAgICAgICAgICAgICAgICAgICB1cGRhdGVRcmNvZGUobik7CiAgICAgICAgICAgICAgICAgICAgbGV0IGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tcGxheWVyIHZpZGVvIik7CiAgICAgICAgICAgICAgICAgICAgZSB8fCAoJCgiLm8tLXBsYXllciIpLnByZXBlbmQoJzx2aWRlbyBjbGFzcz0iby0tdmlkZW8iIHBvc3Rlcj0iJyArIFBsYXllclBsYXlpbmdDb3ZlciArICciIGNvbnRyb2xzIHBsYXlzaW5saW5lPjwvdmlkZW8+JyksCiAgICAgICAgICAgICAgICAgICAgZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5vLS1wbGF5ZXIgdmlkZW8iKSk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdCA9IGdldEdsb2JhbCgiUGx5ciIpLCBpID0gZ2V0R2xvYmFsKCJIbHMiKSB8fCBnZXRHbG9iYWwoImhscyIpOwogICAgICAgICAgICAgICAgICAgIGlmICghcGxheWVyICYmIHQgJiYgKHBsYXllciA9IG5ldyB0KGUsIHsKICAgICAgICAgICAgICAgICAgICAgIGRlYnVnOiBfRCwKICAgICAgICAgICAgICAgICAgICAgIGludmVydFRpbWU6ICExLAogICAgICAgICAgICAgICAgICAgICAgYXV0b3BsYXk6ICEwLAogICAgICAgICAgICAgICAgICAgICAgdm9sdW1lOiAuNzUsCiAgICAgICAgICAgICAgICAgICAgICBzcGVlZDogewogICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZDogMSwKICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogWyAuNSwgLjc1LCAxLCAxLjI1LCAxLjUsIDIgXQogICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2U6IHsKICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZDogITAsCiAgICAgICAgICAgICAgICAgICAgICAgIGtleTogc3RvcmVQcmVmaXggKyAicGx5ciIKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KSwgcGxheWVyLm9uKCJlbnRlcmZ1bGxzY3JlZW4iLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAkKCJodG1sIikuYWRkQ2xhc3MoIm8tLWZ1bGxzY3JlZW4iKTsKICAgICAgICAgICAgICAgICAgICB9KSksIHBsYXllci5vbigiZXhpdGZ1bGxzY3JlZSIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICQoImh0bWwiKS5yZW1vdmVDbGFzcygiby0tZnVsbHNjcmVlbiIpOwogICAgICAgICAgICAgICAgICAgIH0pKSksICQoIi5vLS1wbGF5ZXItYmciKS5yZW1vdmUoKSwgL1wubTN1OC8udGVzdChuKSAmJiBpICYmIGkuaXNTdXBwb3J0ZWQoKSkgewogICAgICAgICAgICAgICAgICAgICAgY29uc3QgdCA9IG5ldyBpOwogICAgICAgICAgICAgICAgICAgICAgdC5sb2FkU291cmNlKG4pLCB0LmF0dGFjaE1lZGlhKGUpLCB0Lm9uKGkuRXZlbnRzLk1BTklGRVNUX1BBUlNFRCwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgICBlLnBsYXkoKTsKICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgZS5zcmMgPSBuLCBlLmFkZEV2ZW50TGlzdGVuZXIoImxvYWRlZG1ldGFkYXRhIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgZS5wbGF5KCk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgICQoIi5vLS1wbGF5LXVybCIpLmh0bWwoJ+adpea6kO+8mjxhIF9ocmVmPSInICsgbiArICciPicgKyB0b1Nob3J0VmlkZW9VcmwobikgKyAiPC9hPiIgKyAoY2FuUGxheUluUGFnZShuKSA/ICc8c3BhbiBjbGFzcz0iby0tc3BhbiI+5aaC5p6c5YWo6YOo57q/6Lev6YO95peg5rOV5pKt5pS+77yM5Y+v5Lul54K55Ye75p2l5rqQ6ZO+5o6l5LiL6L295p2l5pKt5pS+77yM5oiW5L2/55So5Y2V5Liq6Kej5p6Q5pKt5pS+44CCPC9zcGFuPicgOiAnPHNwYW4gY2xhc3M9Im8tLXNwYW4gaXMtd2FybmluZyI+PHNwYW4+6K+l6ZO+5o6l5peg5rOV5Zyo5b2T5YmN56uZ54K55pKt5pS+77yM6K+354K55Ye75p2l5rqQ5LiL6L295pKt5pS+PC9zcGFuPjwvc3Bhbj4nKSksCiAgICAgICAgICAgICAgICAgICAgJCgiLm8tLXBsYXktdXJsIGEiKS5vZmYoImNsaWNrIikub24oImNsaWNrIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgY29uc3QgbiA9ICQodGhpcykuYXR0cigiX2hyZWYiKTsKICAgICAgICAgICAgICAgICAgICAgIGlzSGlrZXIgJiYgd2luZG93LmZ5X2JyaWRnZV9hcHAucGxheVZpZGVvID8gd2luZG93LmZ5X2JyaWRnZV9hcHAucGxheVZpZGVvKG4pIDogaXNNaXhpYSAmJiB3aW5kb3cubXhfYnJvd3Nlcl9vYmoucGxheXZp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0KGUsIDQ1MDApKTsKICAgICAgICAgICAgICAgICAgICB9KSwgNGUzKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmZGYWlsKCkgewogICAgICAgICAgICAgICAgICBzbmlmZkRvbmUoKSwgJCgiLm8tLXBsYXllci1iZyIpLmFkZENsYXNzKCJpcy1mYWlsIiksICQoIi5vLS12aXAiKS5hZGRDbGFzcygiaXMtc25pZmYtZmFpbCIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gaVNuaWZmKCkge30KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGhpa2VyU25pZmYoc25pZmZUaWNrSWQpIHsKICAgICAgICAgICAgICAgICAgaWYgKHNuaWZmVGlja0lkICE9PSBzbmlmZlRpY2spIHJldHVybjsKICAgICAgICAgICAgICAgICAgbGV0IHJlc291cmNlID0gZXZhbCh3aW5kb3cuZnlfYnJpZGdlX2FwcC5nZXROZXR3b3JrUmVjb3JkcygpKTsKICAgICAgICAgICAgICAgICAgcmVzb3VyY2UgPSByZXNvdXJjZS5maWx0ZXIoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbi50aW1lc3RhbXAgPiBzbmlmZlRpbWVzdGFtcCAmJiBpc1ZhbGlkVmlkZW9Vcmwobi51cmwpOwogICAgICAgICAgICAgICAgICB9KSksIGlzU25pZmZpbmcgJiYgKHJlc291cmNlLmZvckVhY2goKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICBzbmlmZlN1Y2Nlc3Mobi51cmwpOwogICAgICAgICAgICAgICAgICB9KSksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIGhpa2VyU25pZmYoc25pZmZUaWNrSWQpOwogICAgICAgICAgICAgICAgICB9KSwgMTAwKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBtaXhpYVNuaWZmKG4pIHsKICAgICAgICAgICAgICAgICAgaWYgKG4gIT09IHNuaWZmVGljaykgcmV0dXJuOwogICAgICAgICAgICAgICAgICBsZXQgZSA9IFtdLCB0ID0gd2luZG93Lm14X2Jyb3dzZXJfb2JqLmdldHdlYmxvZ3MoImh0dHAiKTsKICAgICAgICAgICAgICAgICAgImVycm9yIiAhPT0gdCAmJiAoZSA9IHQudHJpbSgpLnNwbGl0KC9ccypcbltcblxzXSovKSwgZSA9IGUuZmlsdGVyKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlzVmFsaWRWaWRlb1VybChuKTsKICAgICAgICAgICAgICAgICAgfSkpKSwgaXNTbmlmZmluZyAmJiAoZS5mb3JFYWNoKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgc25pZmZTdWNjZXNzKG4pOwogICAgICAgICAgICAgICAgICB9KSksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIG1peGlhU25pZmYobik7CiAgICAgICAgICAgICAgICAgIH0pLCAxMDApKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGluc2VydFBsYXllckh0bWwoKSB7CiAgICAgICAgICAgICAgICAgIGxldCBuID0gMCA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMF0gPyBhcmd1bWVudHNbMF0gOiAiIjsKICAgICAgICAgICAgICAgICAgY29uc3QgZSA9IGdldFZpcFBsYXllcigpOwogICAgICAgICAgICAgICAgICBpZiAoZSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSAnPGRpdiBjbGFzcz0iby0tcGxheWVyLWJnIiBzdHlsZT0iYmFja2dyb3VuZC1pbWFnZTogdXJsKCcgKyBnZXRDZG5JbWFnZVVybChQbGF5ZXJMb2FkaW5nQ292ZXJzW3BhcnNl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sKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmYobikgewogICAgICAgICAgICAgICAgICBpZiAoaXNTbmlmZmluZyAmJiBzbmlmZkRvbmUoKSwgc25pZmZTdGFydCgpLCBpc0FsbG93SWZyYW1lU25pZmYpIGlTbmlmZigpOyBlbHNlIGlmIChpc0FsbG93SGlrZXJTbmlmZikgaGlrZXJTbmlmZihuKTsgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0FsbG93TWl4aWFTbmlmZikgcmV0dXJuIHZvaWQgc25pZmZEb25lKCk7CiAgICAgICAgICAgICAgICAgICAgbWl4aWFTbmlmZihuKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpbnNlcnRQbGF5ZXJIdG1sKGlzTW9iaWxlID8gIiIgOiAnPGRpdiBjbGFzcz0iby0tdmlwLXBsYXkgaXMtaGlkZSI+PGRpdiBjbGFzcz0iby0tc291cmNlcyI+PC9kaXY+PGRpdiBjbGFzcz0iby0tcGxheS11cmwiPjwvZGl2PjwvZGl2PicpLAogICAgICAgICAgICAgICAgICBpc01vYmlsZSAmJiAoJCgiLm8tLXZpcC1wbGF5IikucmVtb3ZlKCksICQoIi5vLS12aXAtcGFuZWwiKS5hZnRlcignPGRpdiBjbGFzcz0iby0tdmlwLXBsYXkgaXMtaGlkZSI+PGRpdiBjbGFzcz0iby0tc291cmNlcyI+PC9kaXY+PGRpdiBjbGFzcz0iby0tcGxheS11cmwiPjwvZGl2PjwvZGl2PicpKSwKICAgICAgICAgICAgICAgICAgcGF1c2VQbGF5KCksIHNuaWZmVXJscyA9IFtdLCBzbmlmZlRpbWVzID0ge30sIHNuaWZmSW5kZXggPSAtMSwgZ29TbmlmZigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZ29TbmlmZigpIHsKICAgICAgICAgICAgICAgICAgaWYgKCFpc1NuaWZmaW5nKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIHNuaWZmSW5kZXggKz0gMTsKICAgICAgICAgICAgICAgICAgY29uc3QgbiA9IFZfVVtzbmlmZkluZGV4XSwgZSA9IChzbmlmZkluZGV4ICsgMSkgLyAoVl9VLmxlbmd0aCArIDEpLCB0ID0gKHNuaWZmVXJscy5sZW5ndGggKyAxKSAvIE1BWF9TTklGRl9QTEFZX0NPVU5ULCBpID0gX01hdGhtaW4oMTAgKiAoMi41ICogZSArIDIuNSAqIHQgKyA1ICogX01hdGhtYXgoZSwgdCkgKyAuNSksIDk5KS50b0ZpeGVkKDQpICsgIiUiOwogICAgICAgICAgICAgICAgICBpZiAoJCgiLm8tLXNuaWZmLXByb2dyZXNzIikuY3NzKHsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogaQogICAgICAgICAgICAgICAgICB9KSwgIW4pIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gc2V0SW50ZXJ2YWwoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09ICQoIm9vLWlmcmFtZXMgPiBpZnJhbWUiKS5sZW5ndGggJiYgKGNsZWFySW50ZXJ2YWwobiksIHNuaWZmRG9uZSgpLCAwID09PSBzbmlmZlVybHMubGVuZ3RoKSkgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLm8tLXZpcC1pdGVtLmlzLWJsb2IiKTsKICAgICAgICAgICAgICAgICAgICAgICAgbiA/IG4uY2xpY2soKSA6IHNuaWZmRmFpbCgpOwogICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pLCAxZTMpOwogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpZiAoc25pZmZVcmxzLmxlbmd0aCA+PSBNQVhfU05JRkZfUExBWV9DT1VOVCArIChwbGF5ZXIgJiYgcGxheWVyLnJlYWR5ICYmIDAgPCBwbGF5ZXIuZHVyYXRpb24gPyAtMSA6IDIpIHx8IHNuaWZmVXJscy5sZW5ndGggPj0gTUFYX1NOSUZGX1BMQVlfQ09VTlQgLyAyICYmIERhdGUubm93KCkgLSBzbmlmZlRpbWVzdGFtcCA+IDFlMyAqIF9NYXRobWF4KDI1MCAtIDEwICogc25pZmZVcmxzLmxlbmd0aCwgMTUwKSkgcmV0dXJuIHZvaWQgc25pZmZEb25lKCk7CiAgICAgICAgICAgICAgICAgIGNvbnN0IG8gPSBnZXRWaXBUYXJnZXRVcmwoKSwgYSA9IE1fVmlwVXJsKG4pICsgbzsKICAgICAgICAgICAgICAgICAgc25pZmZUaW1lc1tmaXhJZnJhbWVVcmwoYSldID0gRGF0ZS5ub3coKTsKICAgICAgICAgICAgICAgICAgY29uc3QgciA9IGFkZElmcmFtZShhKSwgcyA9IGlzTW9iaWxlID8gNyA6IDU7CiAgICAgICAgICAgICAgICAgIHIub25sb2FkID0gZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUociwgIlRJTUVPVVQiKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTJlMyk7CiAgICAgICAgICAgICAgICAgIH0sIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIHJlbW92ZUlmcmFtZShyLCAiTUFYIFRJTUVPVVQiKSwgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBpc1NuaWZmaW5nICYmIDAgPT09ICQoIm9vLWlmcmFtZXMgPiBpZnJhbWUiKS5sZW5ndGggJiYgc25pZmZJbmRleCA+PSBWX1UubGVuZ3RoIC0gMSAmJiBzbmlmZkRvbmUoKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTUwMCk7CiAgICAgICAgICAgICAgICAgIH0pLCAxNWUzKSwgZnVuY3Rpb24gbigpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBlID0gJCgib28taWZyYW1lcyA+IGlmcmFtZSIpLmxlbmd0aDsKICAgICAgICAgICAgICAgICAgICBpZiAoZSA+IHMgLSAxKSBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIG4oKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTAwKTsgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gcGxheWVyICYmIHBsYXllci5yZWFkeSAmJiAwIDwgcGxheWVyLmR1cmF0aW9uLCB0ID0gX01hdGhtaW4oc25pZmZVcmxzLmxlbmd0aCAqIChuID8gMjAwIDogMTUwKSArIDEwMCAqIChzIC0gZSkgKyBfTWF0aG1pbig1MCAqIHNuaWZmSW5kZXgsIDFlMyksIDNlMykgKiAoaXNNb2JpbGUgPyAuNyA6IDEpOwogICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGdvU25pZmYoKTsKICAgICAgICAgICAgICAgICAgICAgIH0pLCB0KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0oKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGF1dG9TbmlmZlBsYXkoKSB7CiAgICAgICAgICAgICAgICAgIGF3YWl0IHBsYXlCZWZvcmUoKSwgMCA8IHNuaWZmVGljayAmJiBzbmlmZkRvbmUoKSwgc25pZmZTdGFydFRpbWUgPSBEYXRlLm5vdygpLCBzbmlmZigrK3NuaWZmVGljayksCiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAiKS5yZW1vdmVDbGFzcygiaXMtc25pZmYtc3VjY2VzcyBpcy1zbmlmZi1kb25lIikuYWRkQ2xhc3MoImlzLXNuaWZmaW5nIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBwYXVzZVBsYXkoKSB7CiAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgJCgidmlkZW86bm90KC5vLS12aWRlbyksIGF1ZGlvIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgICAgZS5wYXVzZSgpLCBlLnZvbHVtZSA9IDAsIGUubXV0ZWQgPSAhMCwgJCgidmlkZW86bm90KC5vLS12aWRlbyksIGF1ZGlvIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgICAgICAkKGUpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gRGF0ZS5ub3coKSwgZSA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSBEYXRlLm5vdygpIC0gbiwgaSA9IGdldEdsb2JhbCgicGxheWVyT2JqZWN0IikgfHwgZ2V0R2xvYmFsKCJNR1RWUGxheWVyIikgJiYgZ2V0R2xvYmFsKCJNR1RWUGxheWVyIikucGxheWVyIHx8IGdldEdsb2JhbCgidmlkZW9QbGF5ZXIiKSB8fCBnZXRHbG9iYWwoIlBMQVlFUiIpOwogICAgICAgICAgICAgICAgICAgICAgaSAmJiAoaS5wYXVzZSBpbnN0YW5jZW9mIEZ1bmN0aW9uICYmIGkucGF1c2UoKSwgaS5tdXRlIGluc3RhbmNlb2YgRnVuY3Rpb24gJiYgaS5tdXRlKCkpLAogICAgICAgICAgICAgICAgICAgICAgKCFpIHx8IHQgPiA5ZTQpICYmIGNsZWFySW50ZXJ2YWwoZSk7CiAgICAgICAgICAgICAgICAgICAgfSksIDYwKTsKICAgICAgICAgICAgICAgICAgfSBjYXRjaCAobikge30KICAgICAgICAgICAg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ImFsbG93LXNjcmlwdHMgYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctZm9ybXMiIHNyYz0iJyArIG4gKyAnIj48L2lmcmFtZT4nKSkgOiBsb2NhdGlvbi5ocmVmID0gbiwKICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgJCgiLm8tLXBsYXllciIpLmFkZENsYXNzKCJpcy1sb2FkZWQiKTsKICAgICAgICAgICAgICAgICAgfSksIDI1MDApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gcGxheVZpcFVybChuKSB7CiAgICAgICAgICAgICAgICAgIGlmICghbikgcmV0dXJuOwogICAgICAgICAgICAgICAgICBjb25zdCBlID0gbiArIGdldFZpcFRhcmdldFVybCgpOwogICAgICAgICAgICAgICAgICAkKCIuby0tdmlwIikucmVtb3ZlQ2xhc3MoImlzLXNuaWZmLXN1Y2Nlc3MgaXMtc25pZmYtZG9uZSBpcy1zbmlmZmluZyIpLmFkZENsYXNzKCJpcy1wbGF5LWluLXBhZ2UiKSwKICAgICAgICAgICAgICAgICAgdXBkYXRlUXJjb2RlKGUpLCBpc1BsYXlpbmdJblBhZ2UgJiYgIS9odHRwOi8udGVzdChuKSA/IHBsYXlJblBhZ2UoZSkgOiAocGF1c2VQbGF5KCksCiAgICAgICAgICAgICAgICAgICQoIiNvLS1wbGF5ZXItaWZyYW1lIikucmVtb3ZlKCksICQoIi5vLS1wbGF5ZXIiKS5yZW1vdmVDbGFzcygiaXMtbG9hZGVkIiksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGUsICJfYmxhbmsiKTsKICAgICAgICAgICAgICAgICAgfSksIDEwMCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gcGxheVZpcEl0ZW0obikgewogICAgICAgICAgICAgICAgICBjb25zdCBl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AgcmV0dXJuIE1fU3RyaW5nKGUpOwogICAgICAgICAgICAgICAgICB9KSkgOiAiIjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1fVmlwVXJsKG4pIHsKICAgICAgICAgICAgICAgICAgaWYgKCFuKSByZXR1cm4gIiI7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBNX1NvdXJjZShuKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuICJodHRwczovLyIgKyBlICsgKGUuaW5jbHVkZXMoIj8iKSA/ICIiIDogKGUuZW5kc1dpdGgoIi4iKSA/ICJwaHAiIDogL1wvJC8udGVzdChlKSA/ICIiIDogIi8iKSArICI/dXJsIikgKyAiPSI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBpbnNlcnRWaXBTb3VyY2UobikgewogICAgICAgICAgICAgICAgICBmdW5jdGlvbiBlKCkgewogICAgICAgICAgICAgICAgICAgICQoIi5vLS1zZXR0aW5nLWJ1dHRvbiIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwIikudG9nZ2xlQ2xhc3MoImlzLXNldHRpbmctb24iKTsKICAgICAgICAgICAgICAgICAgICB9KSksICQoIi5vLS10b2dnbGUiKS5vZmYoImNsaWNrIikub24oImNsaWNrIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS50b2dnbGVDbGFzcygiaXMtbiIpLCAkKHRoaXMpLmhhc0NsYXNzKCJvLS1hY3Rpb24tcGlwIikgPyAoaXNQbGF5aW5nSW5QYWdlID0gIWlzUGxheWluZ0luUGFnZSwKICAgICAgICAgICAgICAgICAgICAgIEdsb2JhbFN0b3JlLnNldCgiaXNQbGF5aW5nSW5QYWdlIiwgaXNQbGF5aW5nSW5QYWdlKSkgOiAkKHRoaXMpLmhhc0NsYXNzKCJvLS1hY3Rpb24tc2tpcC1hZCIpICYmIChpc1NraXBBZFZpZGVvID0gIWlzU2tpcEFkVmlkZW8sCiAgICAgICAgICAgICAgICAgICAgICBTdG9yZS5zZXQoImlzU2tpcEFkVmlkZW8iLCBpc1NraXBBZFZpZGVvKSk7CiAgICAgICAgICAgICAgICAgICAgfSkpLCAkKCIuby0tZWRpdC12aXAtc291cmNlLXBhbmVsIHRleHRhcmVhIikub2ZmKCJpbnB1dCIpLm9uKCJpbnB1dCIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIEdsb2JhbFN0b3JlLnNldCgiVmlwVXJscyIsICQodGhpcykudmFsKCkpOwogICAgICAgICAgICAgICAgICAgIH0pKSwgJCgiLm8tLXZpcC1pdGVtOm5vdCguby0tbm9ybWFsKSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlwSXRlbSh0aGlzKTsKICAgICAgICAgICAgICAgICAgICB9KSksICQoIi5vLS1sb2ctYnV0dG9uIikub2ZmKCJjbGljayIpLm9uKCJjbGljayIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICQoIm9vLWxvZ3MiKS50b2dnbGVDbGFzcygiaXMtYWN0aXZlIik7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIGxldCB0ID0gMSA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMV0gPyBhcmd1bWVudHNbMV0gOiAiYWZ0ZXIiLCBpID0gMiA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMl0gPyBhcmd1bWVudHNbMl0gOiAwOwogICAgICAgICAgICAgICAgICBpZiAoMCA8ICQoIi5vLS12aXAiKS5sZW5ndGggfHwgMjAgPCBpKSByZXR1cm47CiAgICA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tY/op4jlmajnmoQ8c3Ryb25nPuWXheaOouWKn+iDvTwvc3Ryb25nPuS9v+eUqO+8jOS9k+mqjOabtOS9s+OAgjwvZGl2PicgOiAiIikgKyAiPC9kaXY+IiksCiAgICAgICAgICAgICAgICAgIGEgJiYgc21hcnRDb2xsYXBzZSgiLm8tLXZpcC1pdGVtIik7CiAgICAgICAgICAgICAgICAgIGxldCBzID0gMCwgbCA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICBlKCksIDEwMCA8IHMrKyAmJiBjbGVhckludGVydmFsKGwpOwogICAgICAgICAgICAgICAgICB9KSwgX01hdGhtaW4oMjAwICsgNTAgKiBzLCAxZTMpKTsKICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBjb25zdCBWaXBVcmxzID0gIvCfjonlpKnml7bwn46JIGh0dHBzOi8vYXBpLjFkaW9yLmNuL2FuYWx5c2lzLzEyMy9pbmRleC5waHA/dWlkPTE0MjgmbXk9YWZrcnVERklZWiZ1cmw9XG7wn46J5Zyw5Yip8J+OiSBodHRwczovL3BsYXllci5tYXFxLmNuLz91cmw9XG7wn46J5Lq65ZKM8J+OiSBodHRwOi8vNjBqeC5jb20vP3VybD1cbvCflKVqeDEgaHR0cHM6Ly93d3cucGxheW0zdTguY24vamlleGkucGhwP3VybD1cbvCflKVqeDIgaHR0cDovL3d3dy5tZ3R2LmNvbS5vamJranguY29tLz91cmw9XG7wn5SlangzIGh0dHA6Ly9hcGkueXVlbGlhbmdqeC5jb20vP3VybD1cbvCflKVqeDQgaHR0cHM6Ly9hcGkubGVkdW90di5jb20vd3AtYXBpL2lmci5waHA/dmlkPVxu8J+UpWp4NSBodHRwOi8vYXBpLm15emNoLmNuLz91cmw9XG7wn5Slang2IGh0dHA6Ly93d3cuaWt1a2suY29tLz91cmw9XG5qeDcgaHR0cHM6Ly9hcGkueXVlbGlhbmdqeC5jb20vP3VybD1cbmp4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lkKG4uZnJvbSkpOwogICAgICAgICAgICAgICAgICBjb25zdCBlID0gbi5mcm9tLnJlcGxhY2UoLz1odHRwLisvLCAiPSIpOwogICAgICAgICAgICAgICAgICBsZXQgdCA9ICExOwogICAgICAgICAgICAgICAgICBpZiAoJCgiLm8tLXZpcC1pdGVtLmlzLXBsYXktaW4tcGFnZSIpLmVhY2goKGZ1bmN0aW9uKG4sIGkpIHsKICAgICAgICAgICAgICAgICAgICAkKGkpLmF0dHIoIl9ocmVmIikgPT09IGUgJiYgKHQgPSAhMCk7CiAgICAgICAgICAgICAgICAgIH0pKSwgIXQpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gYmxvYk5hbWVzW2Jsb2JDb3VudCsrXSB8fCAi6Kej5p6QIiArIGJsb2JDb3VudDsKICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwLWl0ZW0uaXMtcGxheS1pbi1wYWdlOm5vdCguaXMtYmxvYikiKS5lcSgwKS5iZWZvcmUoJzxzcGFuIGNsYXNzPSJvLS12aXAtaXRlbSBpcy1wbGF5LWluLXBhZ2UgaXMtYmxvYiIgX2hyZWY9IicgKyBlICsgJyI+JyArIG4gKyAiPC9zcGFuPiIpLAogICAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAtaXRlbTpub3QoLm8tLW5vcm1hbCkiKS5vZmYoImNsaWNrIikub24oImNsaWNrIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgcGxheVZpcEl0ZW0odGhpcyk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICBjb25zdCBjaGFyVG9OdW0gPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBuLmNoYXJDb2RlQXQoMCkgLSA5NzsKICAgICAgICAgICAgICAgIH0sIG51bVRvQ2hhciA9IGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuICgwLCBTdHJpbmcuZnJvbUNoYXJDb2RlKSg5NyArIG4pOwogICAgICAgICAgICAgICAgfSwgTV9OdW1iZXIgPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiArbiArICgxID09IG4gJSAyID8gLTEgOiAxKTsKICAgICAgICAgICAgICAgIH0sIE1fTGV0dGVyID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbnVtVG9DaGFyKE1fTnVtYmVyKGNoYXJUb051bShuKSkpOwogICAgICAgICAgICAgICAgfSwgTV9DaGFyID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gL1thLXpdL2kudGVzdChuKSA/IE1fTGV0dGVyKG4pIDogL1xkLy50ZXN0KG4pID8gTV9OdW1iZXIobikgOiAiIjsKICAgICAgICAgICAgICAgIH0sIE1fU3RyaW5nID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbi5zcGxpdCgiIikucmV2ZXJzZSgpLm1hcCgoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBNX0NoYXIobik7CiAgICAgICAgICAgICAgICAgIH0pKS5qb2luKCIiKTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBsZXQgVl9VID0gIndpLjgxMXVzZy5ucGQsb2p1Lmp3ZmppMzQub3BzLGpvYi4xMzh1cy5ucGTCt3dpLGp3ZmppLmhqN25hLm1kLHdpLnh6ejg4Lm5wZCx1LmN6ZDYubnBkwrdvanUsd2lscC5kZCxiYmJyaS5ucGTCt3dpLixqd2ZqaS5sMTkyLm5wZCx3aS51c2p6dnB6Lm5wZCx1LmZqaXBiYW5tLm5wZMK3anFobWpuwrdqcWhtam4uLHh4eC51cG5sZC55enfCt3dpwrdqb2IsbWQubWJndG1iYWlhLm1kwrd3aS4seHh4Lmp0cGJqY3cubnBkwrdvanUsd2kuaWxrcXYubnBkLHh4eC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2s4YWEuY29tL2p4L2luZGV4LnBocD91cmw9XG5qeDc1IGh0dHBzOi8vd3d3LjE3MTd5dW4uY29tL2JlaXlvbmcvP3VybD1cbmp4NzYgaHR0cDovL2p4LjE3OGR1LmNvbS9qeDIucGhwP3VybD1cbmp4NzcgaHR0cDovL2p4LjYxOGcuY29tLz91cmw9XG5qeDc4IGh0dHBzOi8vanguNjE4Zy5jb20vP3VybD1cbmp4NzkgaHR0cDovL2p4Lml6dHl5LmNvbS9zdmlwLz91cmw9XG5qeDgwIGh0dHBzOi8vanguaXp0eXkuY29tL3N2aXAvP3VybD1cbmp4OTEgaHR0cDovL2Nkbi56eWM4ODgudG9wLz91cmw9XG5qeDkyIGh0dHBzOi8vanguZnV4aW5nNTYuY29tL2ppZXhpLz91cmw9IiwgdmlwVXJscyA9IGVuc3VyZUFycmF5KGN1c3RvbVZpcFVybHMpLm1hcCgoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICBsZXQgZSA9IG4uc3BsaXQoL1xzKy8pOwogICAgICAgICAgICAgICAgICBpZiAobiA9IGUucG9wKCksICEvXmh0dHAuKz0vLnRlc3QobikpIHJldHVybiB7fTsKICAgICAgICAgICAgICAgICAgbGV0IHQgPSAwIDwgZS5sZW5ndGggPyBlLmpvaW4oIiAiKSA6IG4ubWF0Y2goL1wvXC8oLitcLik/KFteXC9dKylcLlx3K1wvLylbMl0ucmVwbGFjZSgvXihcdykvLCAoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBuLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICB1cmw6IG4sCiAgICAgICAgICAgICAgICAgICAgbmFtZTogdAogICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgfSkpLmZpbHRlcigoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbi51cmwgJiYgKC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GkvP3Y9XG5qeDk5IGh0dHBzOi8vYXBpLnFpYW5xaS5uZXQvdmlwLz91cmw9XG5qeDk5IGh0dHBzOi8vcWltaWhlLmNvbS8/dXJsPVxuang5OSBodHRwczovL3d3dy5rcGV6cC5jbi9qbGV4aS5waHA/dXJsPVxuang5OSBodHRwczovL2p4LnJkaGsubmV0Lz92PVxuang5OSBodHRwOi8vangubXcwLmNjLz91cmw9XG5qeDk5IGh0dHBzOi8vanguZXJnYW4udG9wLz91cmw9XG5qeDk5IGh0dHA6Ly9qeC40MDgwanguY2MvP3VybD1cbmp4OTkgaHR0cHM6Ly9qeC55YW9odWF4dWFuLmNvbS8/dXJsPVxuang5OSBodHRwczovL2p4LnBwZmx2LmNvbS8/dXJsPVxuang5OSBodHRwOi8vdmlwMTIza2FuLnZpcDo1MjAvbTN1OC5waHA/dXJsPVxuang5OSBodHRwczovL2p4LnlwYXJzZS5jb20vaW5kZXgucGhwP3VybD1cbmp4OTE5aHR0cDovL2p4LnlwYXJzZS5jb20vaW5kZXgucGhwP3VybD1cbmp4OTkgaHR0cHM6Ly96eS5hb3h0di5jb20vP3VybD1odHRwczovL2p4Lnl1bmJveXMuY24vP3VybD1cbmp4NiBodHRwOi8vd3d3LnBhbmd1amlleGkuY2MvamlleGkucGhwP3VybD1cbmp4MTAgaHR0cDovL2p4Lm13MC5jYy8/dXJsPVxuangxNyBodHRwczovL2p4LjdjeWQuY29tLz91cmw9XG5qeDI3IGh0dHA6Ly8xN2t5dW4uY29tL2FwaS5waHA/dXJsPVxuangyOCBodHRwOi8vamlleGkua2luZ3NudWcuY24vdHgucGhwP3VybD1cbmp4MjkgaHR0cDovL3l1bi50dnpubi5jbi9saW5lcz91cmw9XG5qeDMwIGh0dHBzOi8vanguc21iay5jYy8/dj1cbmp4MzEgaHR0cDovLzUuNTI1MmUuY29tL2p4LnBocD91cmw9XG5qeDMyIGh0dHA6Ly94LmRsY2FpeGluLmNvbS8/dXJsPVxuangzMyBodHRwczovL2FwaS5z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aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbi50cmltKCk7CiAgICAgICAgICAgICAgICAgIH0pKS5maWx0ZXIoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbjsKICAgICAgICAgICAgICAgICAgfSkpLCBlID0gbltwYXJzZUludChEYXRlLm5vdygpIC8gMWUzIC8gNjAgJSBuLmxlbmd0aCldLnNwbGl0KCIiKTsKICAgICAgICAgICAgICAgICAgVl9VLnNsaWNlKDAsIDcpLm1hcCgoZnVuY3Rpb24obiwgdCkgewogICAgICAgICAgICAgICAgICAgIHZpcFVybHMucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBlW3RdLAogICAgICAgICAgICAgICAgICAgICAgdXJsOiBNX1ZpcFVybChuKSwKICAgICAgICAgICAgICAgICAgICAgIGlzUmFuZG9tOiAhMAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIWlzQ2hlY2tJZnJhbWVTbmlmZikgewogICAgICAgICAgICAgICAgICAkKCJodG1sIikuYXBwZW5kKCc8b28taWZyYW1lcyBzdHlsZT0idmlzaWJpbGl0eTogaGlkZGVuOyBwb3NpdGlvbjogZml4ZWQ7IGJvdHRvbTogMDsgcG9pbnRlci1ldmVudHM6IG5vbmU7Ij48L29vLWlmcmFtZXM+Jyk7CiAgICAgICAgICAgICAgICAgIGNvbnN0IG4gPSBhZGRJZnJhbWUoU25pZmZDaGVja1VybCk7CiAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIHJlbW92ZUlmcmFtZShuKTsKICAgICAgICAgICAgICAgICAgfSksIDVlMyksIGlzQ2hlY2tJZnJhbWVTbmlmZiA9ICEwOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgdmlwcyA9IEFycmF5LmlzQXJyYXkocGxheUFkZG9uLnZpcCkgPyBwbGF5QWRkb24udmlwIDogWyBwbGF5QWRkb24udmlwIF07CiAgICAgICAgICAgICAgICB2aXBzLmZvckVhY2goKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgaW5zZXJ0VmlwU291cmNlKChuID0gbi5zcGxpdCgvXHMqXHxccyovKSlbMF0sIG5bMV0pOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBwbGF5QWRkb24udGl0bGUgJiYgIWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5vLS1qdW1wIikgJiYgKHBsYXlBZGRvbi52aXAgJiYgJCQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgcmV0dXJuICQocGxheUFkZG9uLnRpdGxlKS5lcSgwKS50ZXh0KCk7CiAgICAgICAgICAgICAgfSksIChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICBwbGF5QWRkb24uZml4VGl0bGUgJiYgKG4gPSBwbGF5QWRkb24uZml4VGl0bGUobikpLCBpbnNlcnRTZWFyY2hBZGRvbihuLCAiLm8tLXZpcC1saXN0IiwgImFmdGVyIik7CiAgICAgICAgICAgICAgfSkpLCBwbGF5QWRkb24uanVtcCAmJiBnb0p1bXAocGxheUFkZG9uLmp1bXAsIHBsYXlBZGRvbi50aXRsZSkpLCBleGVjQWRkb25KcyhwbGF5QWRkb24pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHNlYXJjaEFkZG9uID0gYWRkb24uc2VhcmNoOwogICAgICAgICAgICBpZiAoc2VhcmNoQWRkb24gJiYgSXMoc2VhcmNoQWRkb24ubWF0Y2gpKSB7CiAgICAgICAgICAgICAgaWYgKHNlYXJjaEFkZG9uLmp1bXAgJiYgZ29KdW1wKHNlYXJjaEFkZG9uLmp1bXAsIHNlYXJjaEFkZG9uLmtleXdvcmQpLCBzZWFyY2hBZGRvbi5qdW1wVG8gJiYgJCQoc2VhcmNoQWRkb24uanVtcFRvWzBdLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAkKHNlYXJjaEFkZG9uLmp1bXBUb1swXSkuZWFjaCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgIGxldCBuID0gJCh0aGlzKS5hdHRyKCJocmVmIik7CiAgICAgICAgICAgICAgICAgICQodGhpcykuYXR0cigiaHJlZiIsIG4ucmVwbGFjZShzZWFyY2hBZGRvbi5qdW1wVG9bMV0sIHNlYXJjaEFkZG9uLmp1bXBUb1syXSkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgIH0pKSwgc2VhcmNoQWRkb24ucmVzdWx0KSB7CiAgICAgICAgICAgICAgICBjb25zdCBuID0gInN0cmluZyIgPT0gdHlwZW9mIHNlYXJjaEFkZG9uLnJlc3VsdCA/IHsKICAgICAgICAgICAgICAgICAgdGl0bGU6IHNlYXJjaEFkZG9uLnJlc3VsdCwKICAgICAgICAgICAgICAgICAgdXJsOiBzZWFyY2hBZGRvbi5yZXN1bHQKICAgICAgICAgICAgICAgIH0gOiBzZWFyY2hBZGRvbi5yZXN1bHQ7CiAgICAgICAgICAgICAgICBpZiAoMSA9PT0gJChuLnRpdGxlKS5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgY29uc3QgZSA9ICQobi50aXRsZSkudGV4dCgpOwogICAgICAgICAgICAgICAgICBpZiAoIS/nrKwuezEsM31b5a2j6ZuG6K+d6YOoXS4qJC8udGVzdChlKSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSAkKG4udXJsKS5lcSgwKS5hdHRyKCJocmVmIik7CiAgICAgICAgICAgICAgICAgICAgZSAmJiAobG9jYXRpb24uaHJlZiA9IGUpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGV4ZWNBZGRvbkpzKHNlYXJjaEFkZG9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBleGVjQWRkb25KcyhhZGRvbik7CiAgICAgICAgICB9KSksIGlzRmlyc3RSdW5BZGRvbiA9ICExOwogICAgICAgIH0gZWxzZSBpc0ZpcnN0UnVuQWRkb24gJiYgKCQoImh0bWwiKS5yZW1vdmVDbGFzcygiby0tbWl5aW5nIG8tLW0gby0tcGMgby0tZGVidWciKSwKICAgICAgICBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICRodG1sLnJlbW92ZUF0dHJpYnV0ZShQTFVHSU5fQVRUUik7CiAgICAgICAgfSksIDFlMykpOwogICAgICB9CiAgICAgIGZ1bmN0aW9uIHVybERldGVjdG9yKCkgewogICAgICAgIHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICFmdW5jdGlvbigpIHsKICAgICAgICAgICAgaWYgKEhyZWYgIT09IHdpbmRvdy5sb2NhdGlvbi5ocmVmKSB7CiAgICAgICAgICAgICAgY29uc3QgbiA9IEhyZWY7CiAgICAgICAgICAgICAgSHJlZiA9IHdpbmRvdy5sb2NhdGlvbi5ocmVmLCBFLmVtaXQoInVybC5jaGFuZ2UiLCB7CiAgICAgICAgICAgICAgICBuZXdVcmw6IEhyZWYsCiAgICAgICAgICAgICAgICBvbGRVcmw6IG4KICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgfSgpOwogICAgICAgIH0pLCAyNTApOwogICAgICB9CiAgICAgIGxldCBpc0ZpcnN0UnVuQWRkb24gPSAhMCwgaXNDaGVja0lmcmFtZVNuaWZmID0gITE7CiAgICAgIHRyeSB7CiAgICAgICAgYWRkb25HbygpOwogICAgICB9IGNhdGNoIChuKSB7fQogICAgICB1cmxEZXRlY3RvcigpOwogICAgfQogIH0KfSgpOw==
Add Comment
Please, Sign In to add comment